@fedify/fedify 1.1.0-dev.444 → 1.1.0-dev.447
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/CHANGES.md +51 -0
- package/esm/federation/middleware.js +1 -1
- package/esm/sig/http.js +2 -1
- package/esm/vocab/application.yaml +24 -1
- package/esm/vocab/group.yaml +24 -1
- package/esm/vocab/organization.yaml +24 -1
- package/esm/vocab/person.yaml +24 -1
- package/esm/vocab/service.yaml +24 -1
- package/esm/vocab/vocab.js +1501 -102
- package/package.json +1 -1
- package/types/federation/handler.d.ts +1 -1
- package/types/federation/handler.d.ts.map +1 -1
- package/types/federation/middleware.d.ts +4 -4
- package/types/federation/middleware.d.ts.map +1 -1
- package/types/sig/http.d.ts +2 -2
- package/types/sig/http.d.ts.map +1 -1
- package/types/vocab/vocab.d.ts +75 -0
- package/types/vocab/vocab.d.ts.map +1 -1
package/esm/vocab/vocab.js
CHANGED
@@ -3882,7 +3882,9 @@ export class Object {
|
|
3882
3882
|
continue;
|
3883
3883
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
3884
3884
|
globalThis.Object.keys(v).length === 1) {
|
3885
|
-
_49BipA5dq9eoH8LX8xdsVumveTca_attachment.push(
|
3885
|
+
_49BipA5dq9eoH8LX8xdsVumveTca_attachment.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
3886
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
3887
|
+
: new URL(v["@id"]));
|
3886
3888
|
continue;
|
3887
3889
|
}
|
3888
3890
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -3976,7 +3978,9 @@ export class Object {
|
|
3976
3978
|
continue;
|
3977
3979
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
3978
3980
|
globalThis.Object.keys(v).length === 1) {
|
3979
|
-
_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo.push(
|
3981
|
+
_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py_attributedTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
3982
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
3983
|
+
: new URL(v["@id"]));
|
3980
3984
|
continue;
|
3981
3985
|
}
|
3982
3986
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -4018,7 +4022,9 @@ export class Object {
|
|
4018
4022
|
continue;
|
4019
4023
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4020
4024
|
globalThis.Object.keys(v).length === 1) {
|
4021
|
-
_3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(
|
4025
|
+
_3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4026
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4027
|
+
: new URL(v["@id"]));
|
4022
4028
|
continue;
|
4023
4029
|
}
|
4024
4030
|
_3ocC3VVi88cEd5sPWL8djkZsvTN6_audience.push(await _a.fromJsonLd(v, options));
|
@@ -4061,7 +4067,9 @@ export class Object {
|
|
4061
4067
|
continue;
|
4062
4068
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4063
4069
|
globalThis.Object.keys(v).length === 1) {
|
4064
|
-
_3mhZzGXSpQ431mBSz2kvych22v4e_context.push(
|
4070
|
+
_3mhZzGXSpQ431mBSz2kvych22v4e_context.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4071
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4072
|
+
: new URL(v["@id"]));
|
4065
4073
|
continue;
|
4066
4074
|
}
|
4067
4075
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -4189,7 +4197,9 @@ export class Object {
|
|
4189
4197
|
continue;
|
4190
4198
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4191
4199
|
globalThis.Object.keys(v).length === 1) {
|
4192
|
-
_86xFhmgBapoMvYqjbjRuDPayTrS_generator.push(
|
4200
|
+
_86xFhmgBapoMvYqjbjRuDPayTrS_generator.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4201
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4202
|
+
: new URL(v["@id"]));
|
4193
4203
|
continue;
|
4194
4204
|
}
|
4195
4205
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -4279,7 +4289,9 @@ export class Object {
|
|
4279
4289
|
continue;
|
4280
4290
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4281
4291
|
globalThis.Object.keys(v).length === 1) {
|
4282
|
-
_33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(
|
4292
|
+
_33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4293
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4294
|
+
: new URL(v["@id"]));
|
4283
4295
|
continue;
|
4284
4296
|
}
|
4285
4297
|
_33CjRLy5ujtsUrwRSCrsggvGdKuR_icon.push(await Image.fromJsonLd(v, options));
|
@@ -4298,7 +4310,9 @@ export class Object {
|
|
4298
4310
|
continue;
|
4299
4311
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4300
4312
|
globalThis.Object.keys(v).length === 1) {
|
4301
|
-
_3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(
|
4313
|
+
_3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4314
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4315
|
+
: new URL(v["@id"]));
|
4302
4316
|
continue;
|
4303
4317
|
}
|
4304
4318
|
_3dXrUdkARxwyJLtJcYi1AJ92H41U_image.push(await Image.fromJsonLd(v, options));
|
@@ -4317,7 +4331,9 @@ export class Object {
|
|
4317
4331
|
continue;
|
4318
4332
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4319
4333
|
globalThis.Object.keys(v).length === 1) {
|
4320
|
-
_3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo.push(
|
4334
|
+
_3fpbDrvZgf3Kq1a5V9aByFn8kx3s_inReplyTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4335
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4336
|
+
: new URL(v["@id"]));
|
4321
4337
|
continue;
|
4322
4338
|
}
|
4323
4339
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -4407,7 +4423,9 @@ export class Object {
|
|
4407
4423
|
continue;
|
4408
4424
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4409
4425
|
globalThis.Object.keys(v).length === 1) {
|
4410
|
-
_31k5MUZJsnsPNg8dQQJieWaXTFnR_location.push(
|
4426
|
+
_31k5MUZJsnsPNg8dQQJieWaXTFnR_location.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4427
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4428
|
+
: new URL(v["@id"]));
|
4411
4429
|
continue;
|
4412
4430
|
}
|
4413
4431
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -4497,7 +4515,9 @@ export class Object {
|
|
4497
4515
|
continue;
|
4498
4516
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4499
4517
|
globalThis.Object.keys(v).length === 1) {
|
4500
|
-
_gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(
|
4518
|
+
_gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4519
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4520
|
+
: new URL(v["@id"]));
|
4501
4521
|
continue;
|
4502
4522
|
}
|
4503
4523
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -4601,7 +4621,9 @@ export class Object {
|
|
4601
4621
|
continue;
|
4602
4622
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4603
4623
|
globalThis.Object.keys(v).length === 1) {
|
4604
|
-
_7UpwM3JWcXhADcscukEehBorf6k_replies.push(
|
4624
|
+
_7UpwM3JWcXhADcscukEehBorf6k_replies.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4625
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4626
|
+
: new URL(v["@id"]));
|
4605
4627
|
continue;
|
4606
4628
|
}
|
4607
4629
|
_7UpwM3JWcXhADcscukEehBorf6k_replies.push(await Collection.fromJsonLd(v, options));
|
@@ -4658,7 +4680,9 @@ export class Object {
|
|
4658
4680
|
continue;
|
4659
4681
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4660
4682
|
globalThis.Object.keys(v).length === 1) {
|
4661
|
-
_5chuqj6s95p5gg2sk1HntGfarRf_tag.push(
|
4683
|
+
_5chuqj6s95p5gg2sk1HntGfarRf_tag.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4684
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4685
|
+
: new URL(v["@id"]));
|
4662
4686
|
continue;
|
4663
4687
|
}
|
4664
4688
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -4791,7 +4815,9 @@ export class Object {
|
|
4791
4815
|
continue;
|
4792
4816
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4793
4817
|
globalThis.Object.keys(v).length === 1) {
|
4794
|
-
_3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(
|
4818
|
+
_3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4819
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4820
|
+
: new URL(v["@id"]));
|
4795
4821
|
continue;
|
4796
4822
|
}
|
4797
4823
|
_3hFbw7DTpHhq3cvVhkY8njhcsXbd_to.push(await _a.fromJsonLd(v, options));
|
@@ -4810,7 +4836,9 @@ export class Object {
|
|
4810
4836
|
continue;
|
4811
4837
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4812
4838
|
globalThis.Object.keys(v).length === 1) {
|
4813
|
-
_aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(
|
4839
|
+
_aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4840
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4841
|
+
: new URL(v["@id"]));
|
4814
4842
|
continue;
|
4815
4843
|
}
|
4816
4844
|
_aLZupjwL8XB7tzdLgCMXdjZ6qej_bto.push(await _a.fromJsonLd(v, options));
|
@@ -4829,7 +4857,9 @@ export class Object {
|
|
4829
4857
|
continue;
|
4830
4858
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4831
4859
|
globalThis.Object.keys(v).length === 1) {
|
4832
|
-
_42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(
|
4860
|
+
_42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4861
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4862
|
+
: new URL(v["@id"]));
|
4833
4863
|
continue;
|
4834
4864
|
}
|
4835
4865
|
_42a1SvBs24QSLzKcfjCyNTjW5a1g_cc.push(await _a.fromJsonLd(v, options));
|
@@ -4848,7 +4878,9 @@ export class Object {
|
|
4848
4878
|
continue;
|
4849
4879
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4850
4880
|
globalThis.Object.keys(v).length === 1) {
|
4851
|
-
_3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(
|
4881
|
+
_3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4882
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4883
|
+
: new URL(v["@id"]));
|
4852
4884
|
continue;
|
4853
4885
|
}
|
4854
4886
|
_3qvegKUB8YLgTXRpEf8E6JZSkz2H_bcc.push(await _a.fromJsonLd(v, options));
|
@@ -4923,7 +4955,9 @@ export class Object {
|
|
4923
4955
|
continue;
|
4924
4956
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
4925
4957
|
globalThis.Object.keys(v).length === 1) {
|
4926
|
-
_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(
|
4958
|
+
_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
4959
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
4960
|
+
: new URL(v["@id"]));
|
4927
4961
|
continue;
|
4928
4962
|
}
|
4929
4963
|
_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.push(await DataIntegrityProof.fromJsonLd(v, options));
|
@@ -7073,7 +7107,9 @@ export class Activity extends Object {
|
|
7073
7107
|
continue;
|
7074
7108
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
7075
7109
|
globalThis.Object.keys(v).length === 1) {
|
7076
|
-
_2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor.push(
|
7110
|
+
_2DjTTboo3CNHU2a2JQqUSE2dbv9D_actor.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
7111
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
7112
|
+
: new URL(v["@id"]));
|
7077
7113
|
continue;
|
7078
7114
|
}
|
7079
7115
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -7115,7 +7151,9 @@ export class Activity extends Object {
|
|
7115
7151
|
continue;
|
7116
7152
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
7117
7153
|
globalThis.Object.keys(v).length === 1) {
|
7118
|
-
_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(
|
7154
|
+
_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
7155
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
7156
|
+
: new URL(v["@id"]));
|
7119
7157
|
continue;
|
7120
7158
|
}
|
7121
7159
|
_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(await Object.fromJsonLd(v, options));
|
@@ -7134,7 +7172,9 @@ export class Activity extends Object {
|
|
7134
7172
|
continue;
|
7135
7173
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
7136
7174
|
globalThis.Object.keys(v).length === 1) {
|
7137
|
-
_3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(
|
7175
|
+
_3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
7176
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
7177
|
+
: new URL(v["@id"]));
|
7138
7178
|
continue;
|
7139
7179
|
}
|
7140
7180
|
_3JQCmF2Ww56Ag9EWRYoSZRDNCYtF_target.push(await Object.fromJsonLd(v, options));
|
@@ -7153,7 +7193,9 @@ export class Activity extends Object {
|
|
7153
7193
|
continue;
|
7154
7194
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
7155
7195
|
globalThis.Object.keys(v).length === 1) {
|
7156
|
-
_u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(
|
7196
|
+
_u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
7197
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
7198
|
+
: new URL(v["@id"]));
|
7157
7199
|
continue;
|
7158
7200
|
}
|
7159
7201
|
_u4QGFbRFcYmPEKGbPv1hpBR9r5G_result.push(await Object.fromJsonLd(v, options));
|
@@ -7172,7 +7214,9 @@ export class Activity extends Object {
|
|
7172
7214
|
continue;
|
7173
7215
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
7174
7216
|
globalThis.Object.keys(v).length === 1) {
|
7175
|
-
_25zu2s3VxVujgEKqrDycjE284XQR_origin.push(
|
7217
|
+
_25zu2s3VxVujgEKqrDycjE284XQR_origin.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
7218
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
7219
|
+
: new URL(v["@id"]));
|
7176
7220
|
continue;
|
7177
7221
|
}
|
7178
7222
|
_25zu2s3VxVujgEKqrDycjE284XQR_origin.push(await Object.fromJsonLd(v, options));
|
@@ -7191,7 +7235,9 @@ export class Activity extends Object {
|
|
7191
7235
|
continue;
|
7192
7236
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
7193
7237
|
globalThis.Object.keys(v).length === 1) {
|
7194
|
-
_3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(
|
7238
|
+
_3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
7239
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
7240
|
+
: new URL(v["@id"]));
|
7195
7241
|
continue;
|
7196
7242
|
}
|
7197
7243
|
_3c5t2x7DYRo2shwTxpkd4kYSS5WQ_instrument.push(await Object.fromJsonLd(v, options));
|
@@ -8704,7 +8750,9 @@ export class DataIntegrityProof {
|
|
8704
8750
|
continue;
|
8705
8751
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
8706
8752
|
globalThis.Object.keys(v).length === 1) {
|
8707
|
-
_2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(
|
8753
|
+
_2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
8754
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
8755
|
+
: new URL(v["@id"]));
|
8708
8756
|
continue;
|
8709
8757
|
}
|
8710
8758
|
_2mHVKxqA7zncjveJrDEo3pWpMZqg_verificationMethod.push(await Multikey.fromJsonLd(v, options));
|
@@ -9221,7 +9269,9 @@ export class CryptographicKey {
|
|
9221
9269
|
continue;
|
9222
9270
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
9223
9271
|
globalThis.Object.keys(v).length === 1) {
|
9224
|
-
_5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner.push(
|
9272
|
+
_5UJq9NDh3ZHgswFwwdVxQvJxdx2_owner.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
9273
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
9274
|
+
: new URL(v["@id"]));
|
9225
9275
|
continue;
|
9226
9276
|
}
|
9227
9277
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -9713,7 +9763,9 @@ export class Multikey {
|
|
9713
9763
|
continue;
|
9714
9764
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
9715
9765
|
globalThis.Object.keys(v).length === 1) {
|
9716
|
-
_2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller.push(
|
9766
|
+
_2yr3eUBTP6cNcyaxKzAXWjFsnGzN_controller.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
9767
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
9768
|
+
: new URL(v["@id"]));
|
9717
9769
|
continue;
|
9718
9770
|
}
|
9719
9771
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -10338,6 +10390,7 @@ export class Application extends Object {
|
|
10338
10390
|
#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
|
10339
10391
|
#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
|
10340
10392
|
#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
|
10393
|
+
#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
10341
10394
|
#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
10342
10395
|
#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = [];
|
10343
10396
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
@@ -10585,6 +10638,20 @@ export class Application extends Object {
|
|
10585
10638
|
"boolean" + ".");
|
10586
10639
|
}
|
10587
10640
|
}
|
10641
|
+
if ("successor" in values && values.successor != null) {
|
10642
|
+
if (values.successor instanceof _b ||
|
10643
|
+
values.successor instanceof Group ||
|
10644
|
+
values.successor instanceof Organization ||
|
10645
|
+
values.successor instanceof Person ||
|
10646
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
10647
|
+
// @ts-ignore: type is checked above.
|
10648
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
10649
|
+
}
|
10650
|
+
else {
|
10651
|
+
throw new TypeError("The successor must be of type " +
|
10652
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
10653
|
+
}
|
10654
|
+
}
|
10588
10655
|
if ("alias" in values && values.alias != null) {
|
10589
10656
|
if (values.alias instanceof _b || values.alias instanceof Group ||
|
10590
10657
|
values.alias instanceof Organization ||
|
@@ -10934,6 +11001,22 @@ export class Application extends Object {
|
|
10934
11001
|
"boolean" + ".");
|
10935
11002
|
}
|
10936
11003
|
}
|
11004
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
11005
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
11006
|
+
if ("successor" in values && values.successor != null) {
|
11007
|
+
if (values.successor instanceof _b ||
|
11008
|
+
values.successor instanceof Group ||
|
11009
|
+
values.successor instanceof Organization ||
|
11010
|
+
values.successor instanceof Person ||
|
11011
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
11012
|
+
// @ts-ignore: type is checked above.
|
11013
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
11014
|
+
}
|
11015
|
+
else {
|
11016
|
+
throw new TypeError("The successor must be of type " +
|
11017
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
11018
|
+
}
|
11019
|
+
}
|
10937
11020
|
clone.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs =
|
10938
11021
|
this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
|
10939
11022
|
if ("alias" in values && values.alias != null) {
|
@@ -11728,6 +11811,95 @@ export class Application extends Object {
|
|
11728
11811
|
return null;
|
11729
11812
|
return this.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
11730
11813
|
}
|
11814
|
+
async #fetchSuccessor(url, options = {}) {
|
11815
|
+
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
11816
|
+
fetchDocumentLoader;
|
11817
|
+
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
11818
|
+
fetchDocumentLoader;
|
11819
|
+
let fetchResult;
|
11820
|
+
try {
|
11821
|
+
fetchResult = await documentLoader(url.href);
|
11822
|
+
}
|
11823
|
+
catch (error) {
|
11824
|
+
if (options.suppressError) {
|
11825
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
11826
|
+
return null;
|
11827
|
+
}
|
11828
|
+
throw error;
|
11829
|
+
}
|
11830
|
+
const { document } = fetchResult;
|
11831
|
+
try {
|
11832
|
+
return await _b.fromJsonLd(document, { documentLoader, contextLoader });
|
11833
|
+
}
|
11834
|
+
catch (e) {
|
11835
|
+
if (!(e instanceof TypeError))
|
11836
|
+
throw e;
|
11837
|
+
}
|
11838
|
+
try {
|
11839
|
+
return await Group.fromJsonLd(document, { documentLoader, contextLoader });
|
11840
|
+
}
|
11841
|
+
catch (e) {
|
11842
|
+
if (!(e instanceof TypeError))
|
11843
|
+
throw e;
|
11844
|
+
}
|
11845
|
+
try {
|
11846
|
+
return await Organization.fromJsonLd(document, { documentLoader, contextLoader });
|
11847
|
+
}
|
11848
|
+
catch (e) {
|
11849
|
+
if (!(e instanceof TypeError))
|
11850
|
+
throw e;
|
11851
|
+
}
|
11852
|
+
try {
|
11853
|
+
return await Person.fromJsonLd(document, { documentLoader, contextLoader });
|
11854
|
+
}
|
11855
|
+
catch (e) {
|
11856
|
+
if (!(e instanceof TypeError))
|
11857
|
+
throw e;
|
11858
|
+
}
|
11859
|
+
try {
|
11860
|
+
return await Service.fromJsonLd(document, { documentLoader, contextLoader });
|
11861
|
+
}
|
11862
|
+
catch (e) {
|
11863
|
+
if (!(e instanceof TypeError))
|
11864
|
+
throw e;
|
11865
|
+
}
|
11866
|
+
throw new TypeError("Expected an object of any type of: " +
|
11867
|
+
[
|
11868
|
+
"https://www.w3.org/ns/activitystreams#Application",
|
11869
|
+
"https://www.w3.org/ns/activitystreams#Group",
|
11870
|
+
"https://www.w3.org/ns/activitystreams#Organization",
|
11871
|
+
"https://www.w3.org/ns/activitystreams#Person",
|
11872
|
+
"https://www.w3.org/ns/activitystreams#Service",
|
11873
|
+
].join(", "));
|
11874
|
+
}
|
11875
|
+
/**
|
11876
|
+
* Similar to
|
11877
|
+
* {@link Application.getSuccessor},
|
11878
|
+
* but returns its `@id` URL instead of the object itself.
|
11879
|
+
*/
|
11880
|
+
get successorId() {
|
11881
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
11882
|
+
return null;
|
11883
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
11884
|
+
if (v instanceof URL)
|
11885
|
+
return v;
|
11886
|
+
return v.id;
|
11887
|
+
}
|
11888
|
+
/** Signifies that an actor has been moved to a different ID. Used in Mastodon-style data portability with the {@link Move} activity; see [ActivityPub Data Portability/Move Action](https://swicg.github.io/activitypub-data-portability/#move-action) for more details.
|
11889
|
+
*/
|
11890
|
+
async getSuccessor(options = {}) {
|
11891
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
11892
|
+
return null;
|
11893
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
11894
|
+
if (v instanceof URL) {
|
11895
|
+
const fetched = await this.#fetchSuccessor(v, options);
|
11896
|
+
if (fetched == null)
|
11897
|
+
return null;
|
11898
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0] = fetched;
|
11899
|
+
return fetched;
|
11900
|
+
}
|
11901
|
+
return v;
|
11902
|
+
}
|
11731
11903
|
async #fetchAlias(url, options = {}) {
|
11732
11904
|
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
11733
11905
|
fetchDocumentLoader;
|
@@ -12192,6 +12364,46 @@ export class Application extends Object {
|
|
12192
12364
|
: compactItems[0];
|
12193
12365
|
}
|
12194
12366
|
compactItems = [];
|
12367
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
12368
|
+
const item = v instanceof URL
|
12369
|
+
? v.href
|
12370
|
+
: v instanceof _b
|
12371
|
+
? await v.toJsonLd({
|
12372
|
+
...options,
|
12373
|
+
format: undefined,
|
12374
|
+
context: undefined,
|
12375
|
+
})
|
12376
|
+
: v instanceof Group
|
12377
|
+
? await v.toJsonLd({
|
12378
|
+
...options,
|
12379
|
+
format: undefined,
|
12380
|
+
context: undefined,
|
12381
|
+
})
|
12382
|
+
: v instanceof Organization
|
12383
|
+
? await v.toJsonLd({
|
12384
|
+
...options,
|
12385
|
+
format: undefined,
|
12386
|
+
context: undefined,
|
12387
|
+
})
|
12388
|
+
: v instanceof Person
|
12389
|
+
? await v.toJsonLd({
|
12390
|
+
...options,
|
12391
|
+
format: undefined,
|
12392
|
+
context: undefined,
|
12393
|
+
})
|
12394
|
+
: await v.toJsonLd({
|
12395
|
+
...options,
|
12396
|
+
format: undefined,
|
12397
|
+
context: undefined,
|
12398
|
+
});
|
12399
|
+
compactItems.push(item);
|
12400
|
+
}
|
12401
|
+
if (compactItems.length > 0) {
|
12402
|
+
result["movedTo"] = compactItems.length > 1
|
12403
|
+
? compactItems
|
12404
|
+
: compactItems[0];
|
12405
|
+
}
|
12406
|
+
compactItems = [];
|
12195
12407
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
12196
12408
|
const item = v instanceof URL
|
12197
12409
|
? v.href
|
@@ -12265,7 +12477,9 @@ export class Application extends Object {
|
|
12265
12477
|
"https://www.w3.org/ns/did/v1",
|
12266
12478
|
"https://w3id.org/security/multikey/v1",
|
12267
12479
|
{
|
12480
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
12268
12481
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
12482
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
12269
12483
|
"toot": "http://joinmastodon.org/ns#",
|
12270
12484
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
12271
12485
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -12468,6 +12682,25 @@ export class Application extends Object {
|
|
12468
12682
|
values["http://joinmastodon.org/ns#indexable"] = propValue;
|
12469
12683
|
}
|
12470
12684
|
array = [];
|
12685
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
12686
|
+
const element = v instanceof URL
|
12687
|
+
? { "@id": v.href }
|
12688
|
+
: v instanceof _b
|
12689
|
+
? await v.toJsonLd(options)
|
12690
|
+
: v instanceof Group
|
12691
|
+
? await v.toJsonLd(options)
|
12692
|
+
: v instanceof Organization
|
12693
|
+
? await v.toJsonLd(options)
|
12694
|
+
: v instanceof Person
|
12695
|
+
? await v.toJsonLd(options)
|
12696
|
+
: await v.toJsonLd(options);
|
12697
|
+
array.push(element);
|
12698
|
+
}
|
12699
|
+
if (array.length > 0) {
|
12700
|
+
const propValue = array;
|
12701
|
+
values["https://www.w3.org/ns/activitystreams#movedTo"] = propValue;
|
12702
|
+
}
|
12703
|
+
array = [];
|
12471
12704
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
12472
12705
|
const element = v instanceof URL
|
12473
12706
|
? { "@id": v.href }
|
@@ -12520,7 +12753,9 @@ export class Application extends Object {
|
|
12520
12753
|
"https://www.w3.org/ns/did/v1",
|
12521
12754
|
"https://w3id.org/security/multikey/v1",
|
12522
12755
|
{
|
12756
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
12523
12757
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
12758
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
12524
12759
|
"toot": "http://joinmastodon.org/ns#",
|
12525
12760
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
12526
12761
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -12643,7 +12878,9 @@ export class Application extends Object {
|
|
12643
12878
|
continue;
|
12644
12879
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12645
12880
|
globalThis.Object.keys(v).length === 1) {
|
12646
|
-
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(
|
12881
|
+
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
12882
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
12883
|
+
: new URL(v["@id"]));
|
12647
12884
|
continue;
|
12648
12885
|
}
|
12649
12886
|
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
|
@@ -12662,7 +12899,9 @@ export class Application extends Object {
|
|
12662
12899
|
continue;
|
12663
12900
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12664
12901
|
globalThis.Object.keys(v).length === 1) {
|
12665
|
-
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(
|
12902
|
+
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
12903
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
12904
|
+
: new URL(v["@id"]));
|
12666
12905
|
continue;
|
12667
12906
|
}
|
12668
12907
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
|
@@ -12697,7 +12936,9 @@ export class Application extends Object {
|
|
12697
12936
|
continue;
|
12698
12937
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12699
12938
|
globalThis.Object.keys(v).length === 1) {
|
12700
|
-
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(
|
12939
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
12940
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
12941
|
+
: new URL(v["@id"]));
|
12701
12942
|
continue;
|
12702
12943
|
}
|
12703
12944
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -12716,7 +12957,9 @@ export class Application extends Object {
|
|
12716
12957
|
continue;
|
12717
12958
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12718
12959
|
globalThis.Object.keys(v).length === 1) {
|
12719
|
-
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(
|
12960
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
12961
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
12962
|
+
: new URL(v["@id"]));
|
12720
12963
|
continue;
|
12721
12964
|
}
|
12722
12965
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -12735,7 +12978,9 @@ export class Application extends Object {
|
|
12735
12978
|
continue;
|
12736
12979
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12737
12980
|
globalThis.Object.keys(v).length === 1) {
|
12738
|
-
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(
|
12981
|
+
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
12982
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
12983
|
+
: new URL(v["@id"]));
|
12739
12984
|
continue;
|
12740
12985
|
}
|
12741
12986
|
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
|
@@ -12754,7 +12999,9 @@ export class Application extends Object {
|
|
12754
12999
|
continue;
|
12755
13000
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12756
13001
|
globalThis.Object.keys(v).length === 1) {
|
12757
|
-
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(
|
13002
|
+
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13003
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13004
|
+
: new URL(v["@id"]));
|
12758
13005
|
continue;
|
12759
13006
|
}
|
12760
13007
|
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
|
@@ -12773,7 +13020,9 @@ export class Application extends Object {
|
|
12773
13020
|
continue;
|
12774
13021
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12775
13022
|
globalThis.Object.keys(v).length === 1) {
|
12776
|
-
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(
|
13023
|
+
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13024
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13025
|
+
: new URL(v["@id"]));
|
12777
13026
|
continue;
|
12778
13027
|
}
|
12779
13028
|
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
|
@@ -12792,7 +13041,9 @@ export class Application extends Object {
|
|
12792
13041
|
continue;
|
12793
13042
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12794
13043
|
globalThis.Object.keys(v).length === 1) {
|
12795
|
-
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(
|
13044
|
+
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13045
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13046
|
+
: new URL(v["@id"]));
|
12796
13047
|
continue;
|
12797
13048
|
}
|
12798
13049
|
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
|
@@ -12811,7 +13062,9 @@ export class Application extends Object {
|
|
12811
13062
|
continue;
|
12812
13063
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12813
13064
|
globalThis.Object.keys(v).length === 1) {
|
12814
|
-
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(
|
13065
|
+
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13066
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13067
|
+
: new URL(v["@id"]));
|
12815
13068
|
continue;
|
12816
13069
|
}
|
12817
13070
|
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
|
@@ -12830,7 +13083,9 @@ export class Application extends Object {
|
|
12830
13083
|
continue;
|
12831
13084
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12832
13085
|
globalThis.Object.keys(v).length === 1) {
|
12833
|
-
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(
|
13086
|
+
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13087
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13088
|
+
: new URL(v["@id"]));
|
12834
13089
|
continue;
|
12835
13090
|
}
|
12836
13091
|
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
|
@@ -12907,6 +13162,50 @@ export class Application extends Object {
|
|
12907
13162
|
}
|
12908
13163
|
instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable =
|
12909
13164
|
_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
|
13165
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
13166
|
+
let _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array = values["https://www.w3.org/ns/activitystreams#movedTo"];
|
13167
|
+
for (const v of _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array == null
|
13168
|
+
? []
|
13169
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array.length === 1 &&
|
13170
|
+
"@list" in _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]
|
13171
|
+
? _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]["@list"]
|
13172
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array) {
|
13173
|
+
if (v == null)
|
13174
|
+
continue;
|
13175
|
+
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
13176
|
+
globalThis.Object.keys(v).length === 1) {
|
13177
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13178
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13179
|
+
: new URL(v["@id"]));
|
13180
|
+
continue;
|
13181
|
+
}
|
13182
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
13183
|
+
Array.isArray(v["@type"]) &&
|
13184
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Application")
|
13185
|
+
? await _b.fromJsonLd(v, options)
|
13186
|
+
: typeof v === "object" && "@type" in v &&
|
13187
|
+
Array.isArray(v["@type"]) &&
|
13188
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Group")
|
13189
|
+
? await Group.fromJsonLd(v, options)
|
13190
|
+
: typeof v === "object" && "@type" in v &&
|
13191
|
+
Array.isArray(v["@type"]) &&
|
13192
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Organization")
|
13193
|
+
? await Organization.fromJsonLd(v, options)
|
13194
|
+
: typeof v === "object" && "@type" in v &&
|
13195
|
+
Array.isArray(v["@type"]) &&
|
13196
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Person")
|
13197
|
+
? await Person.fromJsonLd(v, options)
|
13198
|
+
: typeof v === "object" && "@type" in v &&
|
13199
|
+
Array.isArray(v["@type"]) &&
|
13200
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Service")
|
13201
|
+
? await Service.fromJsonLd(v, options)
|
13202
|
+
: undefined;
|
13203
|
+
if (typeof decoded === "undefined")
|
13204
|
+
continue;
|
13205
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
|
13206
|
+
}
|
13207
|
+
instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
13208
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
12910
13209
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
12911
13210
|
let _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array = values["https://www.w3.org/ns/activitystreams#alsoKnownAs"];
|
12912
13211
|
for (const v of _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array == null
|
@@ -12919,7 +13218,9 @@ export class Application extends Object {
|
|
12919
13218
|
continue;
|
12920
13219
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12921
13220
|
globalThis.Object.keys(v).length === 1) {
|
12922
|
-
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(
|
13221
|
+
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13222
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13223
|
+
: new URL(v["@id"]));
|
12923
13224
|
continue;
|
12924
13225
|
}
|
12925
13226
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -12961,7 +13262,9 @@ export class Application extends Object {
|
|
12961
13262
|
continue;
|
12962
13263
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
12963
13264
|
globalThis.Object.keys(v).length === 1) {
|
12964
|
-
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(
|
13265
|
+
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
13266
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
13267
|
+
: new URL(v["@id"]));
|
12965
13268
|
continue;
|
12966
13269
|
}
|
12967
13270
|
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, options));
|
@@ -13218,6 +13521,18 @@ export class Application extends Object {
|
|
13218
13521
|
if (_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.length == 1) {
|
13219
13522
|
proxy.indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
13220
13523
|
}
|
13524
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = this
|
13525
|
+
.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo
|
13526
|
+
// deno-lint-ignore no-explicit-any
|
13527
|
+
.map((v) => v instanceof URL
|
13528
|
+
? {
|
13529
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
13530
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
13531
|
+
}
|
13532
|
+
: v);
|
13533
|
+
if (_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length == 1) {
|
13534
|
+
proxy.successor = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
13535
|
+
}
|
13221
13536
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = this
|
13222
13537
|
.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs
|
13223
13538
|
// deno-lint-ignore no-explicit-any
|
@@ -15453,7 +15768,9 @@ export class Collection extends Object {
|
|
15453
15768
|
continue;
|
15454
15769
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
15455
15770
|
globalThis.Object.keys(v).length === 1) {
|
15456
|
-
_3UyUdxnyn6cDn53QKrh4MBiearma_current.push(
|
15771
|
+
_3UyUdxnyn6cDn53QKrh4MBiearma_current.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
15772
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
15773
|
+
: new URL(v["@id"]));
|
15457
15774
|
continue;
|
15458
15775
|
}
|
15459
15776
|
_3UyUdxnyn6cDn53QKrh4MBiearma_current.push(await CollectionPage.fromJsonLd(v, options));
|
@@ -15472,7 +15789,9 @@ export class Collection extends Object {
|
|
15472
15789
|
continue;
|
15473
15790
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
15474
15791
|
globalThis.Object.keys(v).length === 1) {
|
15475
|
-
_J52RqweMe6hhv7RnLJMC8BExTE5_first.push(
|
15792
|
+
_J52RqweMe6hhv7RnLJMC8BExTE5_first.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
15793
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
15794
|
+
: new URL(v["@id"]));
|
15476
15795
|
continue;
|
15477
15796
|
}
|
15478
15797
|
_J52RqweMe6hhv7RnLJMC8BExTE5_first.push(await CollectionPage.fromJsonLd(v, options));
|
@@ -15491,7 +15810,9 @@ export class Collection extends Object {
|
|
15491
15810
|
continue;
|
15492
15811
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
15493
15812
|
globalThis.Object.keys(v).length === 1) {
|
15494
|
-
_gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(
|
15813
|
+
_gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
15814
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
15815
|
+
: new URL(v["@id"]));
|
15495
15816
|
continue;
|
15496
15817
|
}
|
15497
15818
|
_gyJJnyEFnuNVi1HFZKfAn3Hfn26_last.push(await CollectionPage.fromJsonLd(v, options));
|
@@ -15510,7 +15831,9 @@ export class Collection extends Object {
|
|
15510
15831
|
continue;
|
15511
15832
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
15512
15833
|
globalThis.Object.keys(v).length === 1) {
|
15513
|
-
_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(
|
15834
|
+
_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
15835
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
15836
|
+
: new URL(v["@id"]));
|
15514
15837
|
continue;
|
15515
15838
|
}
|
15516
15839
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -16164,7 +16487,9 @@ export class CollectionPage extends Collection {
|
|
16164
16487
|
continue;
|
16165
16488
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
16166
16489
|
globalThis.Object.keys(v).length === 1) {
|
16167
|
-
_2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(
|
16490
|
+
_2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
16491
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
16492
|
+
: new URL(v["@id"]));
|
16168
16493
|
continue;
|
16169
16494
|
}
|
16170
16495
|
_2kWgBhQKjEauxx8C6qF3ZQamK4Le_partOf.push(await Collection.fromJsonLd(v, options));
|
@@ -16183,7 +16508,9 @@ export class CollectionPage extends Collection {
|
|
16183
16508
|
continue;
|
16184
16509
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
16185
16510
|
globalThis.Object.keys(v).length === 1) {
|
16186
|
-
_3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(
|
16511
|
+
_3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
16512
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
16513
|
+
: new URL(v["@id"]));
|
16187
16514
|
continue;
|
16188
16515
|
}
|
16189
16516
|
_3BT4kQLcXhHx7TAWaNDKh8nFn9eY_next.push(await _c.fromJsonLd(v, options));
|
@@ -16202,7 +16529,9 @@ export class CollectionPage extends Collection {
|
|
16202
16529
|
continue;
|
16203
16530
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
16204
16531
|
globalThis.Object.keys(v).length === 1) {
|
16205
|
-
_3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(
|
16532
|
+
_3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
16533
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
16534
|
+
: new URL(v["@id"]));
|
16206
16535
|
continue;
|
16207
16536
|
}
|
16208
16537
|
_3b8yG8tDNzQFFEnWhCc13G8eHooA_prev.push(await _c.fromJsonLd(v, options));
|
@@ -17965,6 +18294,7 @@ export class Group extends Object {
|
|
17965
18294
|
#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
|
17966
18295
|
#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
|
17967
18296
|
#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
|
18297
|
+
#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
17968
18298
|
#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
17969
18299
|
#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = [];
|
17970
18300
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
@@ -18212,6 +18542,20 @@ export class Group extends Object {
|
|
18212
18542
|
"boolean" + ".");
|
18213
18543
|
}
|
18214
18544
|
}
|
18545
|
+
if ("successor" in values && values.successor != null) {
|
18546
|
+
if (values.successor instanceof Application ||
|
18547
|
+
values.successor instanceof _d ||
|
18548
|
+
values.successor instanceof Organization ||
|
18549
|
+
values.successor instanceof Person ||
|
18550
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
18551
|
+
// @ts-ignore: type is checked above.
|
18552
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
18553
|
+
}
|
18554
|
+
else {
|
18555
|
+
throw new TypeError("The successor must be of type " +
|
18556
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
18557
|
+
}
|
18558
|
+
}
|
18215
18559
|
if ("alias" in values && values.alias != null) {
|
18216
18560
|
if (values.alias instanceof Application || values.alias instanceof _d ||
|
18217
18561
|
values.alias instanceof Organization ||
|
@@ -18561,6 +18905,22 @@ export class Group extends Object {
|
|
18561
18905
|
"boolean" + ".");
|
18562
18906
|
}
|
18563
18907
|
}
|
18908
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
18909
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
18910
|
+
if ("successor" in values && values.successor != null) {
|
18911
|
+
if (values.successor instanceof Application ||
|
18912
|
+
values.successor instanceof _d ||
|
18913
|
+
values.successor instanceof Organization ||
|
18914
|
+
values.successor instanceof Person ||
|
18915
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
18916
|
+
// @ts-ignore: type is checked above.
|
18917
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
18918
|
+
}
|
18919
|
+
else {
|
18920
|
+
throw new TypeError("The successor must be of type " +
|
18921
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
18922
|
+
}
|
18923
|
+
}
|
18564
18924
|
clone.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs =
|
18565
18925
|
this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
|
18566
18926
|
if ("alias" in values && values.alias != null) {
|
@@ -19355,6 +19715,95 @@ export class Group extends Object {
|
|
19355
19715
|
return null;
|
19356
19716
|
return this.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
19357
19717
|
}
|
19718
|
+
async #fetchSuccessor(url, options = {}) {
|
19719
|
+
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
19720
|
+
fetchDocumentLoader;
|
19721
|
+
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
19722
|
+
fetchDocumentLoader;
|
19723
|
+
let fetchResult;
|
19724
|
+
try {
|
19725
|
+
fetchResult = await documentLoader(url.href);
|
19726
|
+
}
|
19727
|
+
catch (error) {
|
19728
|
+
if (options.suppressError) {
|
19729
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
19730
|
+
return null;
|
19731
|
+
}
|
19732
|
+
throw error;
|
19733
|
+
}
|
19734
|
+
const { document } = fetchResult;
|
19735
|
+
try {
|
19736
|
+
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
19737
|
+
}
|
19738
|
+
catch (e) {
|
19739
|
+
if (!(e instanceof TypeError))
|
19740
|
+
throw e;
|
19741
|
+
}
|
19742
|
+
try {
|
19743
|
+
return await _d.fromJsonLd(document, { documentLoader, contextLoader });
|
19744
|
+
}
|
19745
|
+
catch (e) {
|
19746
|
+
if (!(e instanceof TypeError))
|
19747
|
+
throw e;
|
19748
|
+
}
|
19749
|
+
try {
|
19750
|
+
return await Organization.fromJsonLd(document, { documentLoader, contextLoader });
|
19751
|
+
}
|
19752
|
+
catch (e) {
|
19753
|
+
if (!(e instanceof TypeError))
|
19754
|
+
throw e;
|
19755
|
+
}
|
19756
|
+
try {
|
19757
|
+
return await Person.fromJsonLd(document, { documentLoader, contextLoader });
|
19758
|
+
}
|
19759
|
+
catch (e) {
|
19760
|
+
if (!(e instanceof TypeError))
|
19761
|
+
throw e;
|
19762
|
+
}
|
19763
|
+
try {
|
19764
|
+
return await Service.fromJsonLd(document, { documentLoader, contextLoader });
|
19765
|
+
}
|
19766
|
+
catch (e) {
|
19767
|
+
if (!(e instanceof TypeError))
|
19768
|
+
throw e;
|
19769
|
+
}
|
19770
|
+
throw new TypeError("Expected an object of any type of: " +
|
19771
|
+
[
|
19772
|
+
"https://www.w3.org/ns/activitystreams#Application",
|
19773
|
+
"https://www.w3.org/ns/activitystreams#Group",
|
19774
|
+
"https://www.w3.org/ns/activitystreams#Organization",
|
19775
|
+
"https://www.w3.org/ns/activitystreams#Person",
|
19776
|
+
"https://www.w3.org/ns/activitystreams#Service",
|
19777
|
+
].join(", "));
|
19778
|
+
}
|
19779
|
+
/**
|
19780
|
+
* Similar to
|
19781
|
+
* {@link Group.getSuccessor},
|
19782
|
+
* but returns its `@id` URL instead of the object itself.
|
19783
|
+
*/
|
19784
|
+
get successorId() {
|
19785
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
19786
|
+
return null;
|
19787
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
19788
|
+
if (v instanceof URL)
|
19789
|
+
return v;
|
19790
|
+
return v.id;
|
19791
|
+
}
|
19792
|
+
/** Signifies that an actor has been moved to a different ID. Used in Mastodon-style data portability with the {@link Move} activity; see [ActivityPub Data Portability/Move Action](https://swicg.github.io/activitypub-data-portability/#move-action) for more details.
|
19793
|
+
*/
|
19794
|
+
async getSuccessor(options = {}) {
|
19795
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
19796
|
+
return null;
|
19797
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
19798
|
+
if (v instanceof URL) {
|
19799
|
+
const fetched = await this.#fetchSuccessor(v, options);
|
19800
|
+
if (fetched == null)
|
19801
|
+
return null;
|
19802
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0] = fetched;
|
19803
|
+
return fetched;
|
19804
|
+
}
|
19805
|
+
return v;
|
19806
|
+
}
|
19358
19807
|
async #fetchAlias(url, options = {}) {
|
19359
19808
|
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
19360
19809
|
fetchDocumentLoader;
|
@@ -19819,6 +20268,46 @@ export class Group extends Object {
|
|
19819
20268
|
: compactItems[0];
|
19820
20269
|
}
|
19821
20270
|
compactItems = [];
|
20271
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
20272
|
+
const item = v instanceof URL
|
20273
|
+
? v.href
|
20274
|
+
: v instanceof Application
|
20275
|
+
? await v.toJsonLd({
|
20276
|
+
...options,
|
20277
|
+
format: undefined,
|
20278
|
+
context: undefined,
|
20279
|
+
})
|
20280
|
+
: v instanceof _d
|
20281
|
+
? await v.toJsonLd({
|
20282
|
+
...options,
|
20283
|
+
format: undefined,
|
20284
|
+
context: undefined,
|
20285
|
+
})
|
20286
|
+
: v instanceof Organization
|
20287
|
+
? await v.toJsonLd({
|
20288
|
+
...options,
|
20289
|
+
format: undefined,
|
20290
|
+
context: undefined,
|
20291
|
+
})
|
20292
|
+
: v instanceof Person
|
20293
|
+
? await v.toJsonLd({
|
20294
|
+
...options,
|
20295
|
+
format: undefined,
|
20296
|
+
context: undefined,
|
20297
|
+
})
|
20298
|
+
: await v.toJsonLd({
|
20299
|
+
...options,
|
20300
|
+
format: undefined,
|
20301
|
+
context: undefined,
|
20302
|
+
});
|
20303
|
+
compactItems.push(item);
|
20304
|
+
}
|
20305
|
+
if (compactItems.length > 0) {
|
20306
|
+
result["movedTo"] = compactItems.length > 1
|
20307
|
+
? compactItems
|
20308
|
+
: compactItems[0];
|
20309
|
+
}
|
20310
|
+
compactItems = [];
|
19822
20311
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
19823
20312
|
const item = v instanceof URL
|
19824
20313
|
? v.href
|
@@ -19892,7 +20381,9 @@ export class Group extends Object {
|
|
19892
20381
|
"https://www.w3.org/ns/did/v1",
|
19893
20382
|
"https://w3id.org/security/multikey/v1",
|
19894
20383
|
{
|
20384
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
19895
20385
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
20386
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
19896
20387
|
"toot": "http://joinmastodon.org/ns#",
|
19897
20388
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
19898
20389
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -20095,6 +20586,25 @@ export class Group extends Object {
|
|
20095
20586
|
values["http://joinmastodon.org/ns#indexable"] = propValue;
|
20096
20587
|
}
|
20097
20588
|
array = [];
|
20589
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
20590
|
+
const element = v instanceof URL
|
20591
|
+
? { "@id": v.href }
|
20592
|
+
: v instanceof Application
|
20593
|
+
? await v.toJsonLd(options)
|
20594
|
+
: v instanceof _d
|
20595
|
+
? await v.toJsonLd(options)
|
20596
|
+
: v instanceof Organization
|
20597
|
+
? await v.toJsonLd(options)
|
20598
|
+
: v instanceof Person
|
20599
|
+
? await v.toJsonLd(options)
|
20600
|
+
: await v.toJsonLd(options);
|
20601
|
+
array.push(element);
|
20602
|
+
}
|
20603
|
+
if (array.length > 0) {
|
20604
|
+
const propValue = array;
|
20605
|
+
values["https://www.w3.org/ns/activitystreams#movedTo"] = propValue;
|
20606
|
+
}
|
20607
|
+
array = [];
|
20098
20608
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
20099
20609
|
const element = v instanceof URL
|
20100
20610
|
? { "@id": v.href }
|
@@ -20147,7 +20657,9 @@ export class Group extends Object {
|
|
20147
20657
|
"https://www.w3.org/ns/did/v1",
|
20148
20658
|
"https://w3id.org/security/multikey/v1",
|
20149
20659
|
{
|
20660
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
20150
20661
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
20662
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
20151
20663
|
"toot": "http://joinmastodon.org/ns#",
|
20152
20664
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
20153
20665
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -20270,7 +20782,9 @@ export class Group extends Object {
|
|
20270
20782
|
continue;
|
20271
20783
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20272
20784
|
globalThis.Object.keys(v).length === 1) {
|
20273
|
-
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(
|
20785
|
+
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20786
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20787
|
+
: new URL(v["@id"]));
|
20274
20788
|
continue;
|
20275
20789
|
}
|
20276
20790
|
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
|
@@ -20289,7 +20803,9 @@ export class Group extends Object {
|
|
20289
20803
|
continue;
|
20290
20804
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20291
20805
|
globalThis.Object.keys(v).length === 1) {
|
20292
|
-
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(
|
20806
|
+
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20807
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20808
|
+
: new URL(v["@id"]));
|
20293
20809
|
continue;
|
20294
20810
|
}
|
20295
20811
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
|
@@ -20324,7 +20840,9 @@ export class Group extends Object {
|
|
20324
20840
|
continue;
|
20325
20841
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20326
20842
|
globalThis.Object.keys(v).length === 1) {
|
20327
|
-
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(
|
20843
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20844
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20845
|
+
: new URL(v["@id"]));
|
20328
20846
|
continue;
|
20329
20847
|
}
|
20330
20848
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -20343,7 +20861,9 @@ export class Group extends Object {
|
|
20343
20861
|
continue;
|
20344
20862
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20345
20863
|
globalThis.Object.keys(v).length === 1) {
|
20346
|
-
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(
|
20864
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20865
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20866
|
+
: new URL(v["@id"]));
|
20347
20867
|
continue;
|
20348
20868
|
}
|
20349
20869
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -20362,7 +20882,9 @@ export class Group extends Object {
|
|
20362
20882
|
continue;
|
20363
20883
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20364
20884
|
globalThis.Object.keys(v).length === 1) {
|
20365
|
-
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(
|
20885
|
+
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20886
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20887
|
+
: new URL(v["@id"]));
|
20366
20888
|
continue;
|
20367
20889
|
}
|
20368
20890
|
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
|
@@ -20381,7 +20903,9 @@ export class Group extends Object {
|
|
20381
20903
|
continue;
|
20382
20904
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20383
20905
|
globalThis.Object.keys(v).length === 1) {
|
20384
|
-
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(
|
20906
|
+
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20907
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20908
|
+
: new URL(v["@id"]));
|
20385
20909
|
continue;
|
20386
20910
|
}
|
20387
20911
|
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
|
@@ -20400,7 +20924,9 @@ export class Group extends Object {
|
|
20400
20924
|
continue;
|
20401
20925
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20402
20926
|
globalThis.Object.keys(v).length === 1) {
|
20403
|
-
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(
|
20927
|
+
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20928
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20929
|
+
: new URL(v["@id"]));
|
20404
20930
|
continue;
|
20405
20931
|
}
|
20406
20932
|
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
|
@@ -20419,7 +20945,9 @@ export class Group extends Object {
|
|
20419
20945
|
continue;
|
20420
20946
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20421
20947
|
globalThis.Object.keys(v).length === 1) {
|
20422
|
-
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(
|
20948
|
+
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20949
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20950
|
+
: new URL(v["@id"]));
|
20423
20951
|
continue;
|
20424
20952
|
}
|
20425
20953
|
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
|
@@ -20438,7 +20966,9 @@ export class Group extends Object {
|
|
20438
20966
|
continue;
|
20439
20967
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20440
20968
|
globalThis.Object.keys(v).length === 1) {
|
20441
|
-
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(
|
20969
|
+
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20970
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20971
|
+
: new URL(v["@id"]));
|
20442
20972
|
continue;
|
20443
20973
|
}
|
20444
20974
|
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
|
@@ -20457,7 +20987,9 @@ export class Group extends Object {
|
|
20457
20987
|
continue;
|
20458
20988
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20459
20989
|
globalThis.Object.keys(v).length === 1) {
|
20460
|
-
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(
|
20990
|
+
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
20991
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
20992
|
+
: new URL(v["@id"]));
|
20461
20993
|
continue;
|
20462
20994
|
}
|
20463
20995
|
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
|
@@ -20534,6 +21066,50 @@ export class Group extends Object {
|
|
20534
21066
|
}
|
20535
21067
|
instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable =
|
20536
21068
|
_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
|
21069
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
21070
|
+
let _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array = values["https://www.w3.org/ns/activitystreams#movedTo"];
|
21071
|
+
for (const v of _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array == null
|
21072
|
+
? []
|
21073
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array.length === 1 &&
|
21074
|
+
"@list" in _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]
|
21075
|
+
? _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]["@list"]
|
21076
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array) {
|
21077
|
+
if (v == null)
|
21078
|
+
continue;
|
21079
|
+
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
21080
|
+
globalThis.Object.keys(v).length === 1) {
|
21081
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
21082
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
21083
|
+
: new URL(v["@id"]));
|
21084
|
+
continue;
|
21085
|
+
}
|
21086
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
21087
|
+
Array.isArray(v["@type"]) &&
|
21088
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Application")
|
21089
|
+
? await Application.fromJsonLd(v, options)
|
21090
|
+
: typeof v === "object" && "@type" in v &&
|
21091
|
+
Array.isArray(v["@type"]) &&
|
21092
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Group")
|
21093
|
+
? await _d.fromJsonLd(v, options)
|
21094
|
+
: typeof v === "object" && "@type" in v &&
|
21095
|
+
Array.isArray(v["@type"]) &&
|
21096
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Organization")
|
21097
|
+
? await Organization.fromJsonLd(v, options)
|
21098
|
+
: typeof v === "object" && "@type" in v &&
|
21099
|
+
Array.isArray(v["@type"]) &&
|
21100
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Person")
|
21101
|
+
? await Person.fromJsonLd(v, options)
|
21102
|
+
: typeof v === "object" && "@type" in v &&
|
21103
|
+
Array.isArray(v["@type"]) &&
|
21104
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Service")
|
21105
|
+
? await Service.fromJsonLd(v, options)
|
21106
|
+
: undefined;
|
21107
|
+
if (typeof decoded === "undefined")
|
21108
|
+
continue;
|
21109
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
|
21110
|
+
}
|
21111
|
+
instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
21112
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
20537
21113
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
20538
21114
|
let _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array = values["https://www.w3.org/ns/activitystreams#alsoKnownAs"];
|
20539
21115
|
for (const v of _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array == null
|
@@ -20546,7 +21122,9 @@ export class Group extends Object {
|
|
20546
21122
|
continue;
|
20547
21123
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20548
21124
|
globalThis.Object.keys(v).length === 1) {
|
20549
|
-
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(
|
21125
|
+
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
21126
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
21127
|
+
: new URL(v["@id"]));
|
20550
21128
|
continue;
|
20551
21129
|
}
|
20552
21130
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -20588,7 +21166,9 @@ export class Group extends Object {
|
|
20588
21166
|
continue;
|
20589
21167
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
20590
21168
|
globalThis.Object.keys(v).length === 1) {
|
20591
|
-
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(
|
21169
|
+
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
21170
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
21171
|
+
: new URL(v["@id"]));
|
20592
21172
|
continue;
|
20593
21173
|
}
|
20594
21174
|
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, options));
|
@@ -20845,6 +21425,18 @@ export class Group extends Object {
|
|
20845
21425
|
if (_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.length == 1) {
|
20846
21426
|
proxy.indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
20847
21427
|
}
|
21428
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = this
|
21429
|
+
.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo
|
21430
|
+
// deno-lint-ignore no-explicit-any
|
21431
|
+
.map((v) => v instanceof URL
|
21432
|
+
? {
|
21433
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
21434
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
21435
|
+
}
|
21436
|
+
: v);
|
21437
|
+
if (_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length == 1) {
|
21438
|
+
proxy.successor = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
21439
|
+
}
|
20848
21440
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = this
|
20849
21441
|
.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs
|
20850
21442
|
// deno-lint-ignore no-explicit-any
|
@@ -21747,7 +22339,9 @@ export class Link {
|
|
21747
22339
|
continue;
|
21748
22340
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
21749
22341
|
globalThis.Object.keys(v).length === 1) {
|
21750
|
-
_gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(
|
22342
|
+
_gCVTegXxWWCw6wWRxa1QF65zusg_preview.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
22343
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
22344
|
+
: new URL(v["@id"]));
|
21751
22345
|
continue;
|
21752
22346
|
}
|
21753
22347
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -24178,7 +24772,9 @@ export class OrderedCollection extends Collection {
|
|
24178
24772
|
continue;
|
24179
24773
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
24180
24774
|
globalThis.Object.keys(v).length === 1) {
|
24181
|
-
_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(
|
24775
|
+
_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
24776
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
24777
|
+
: new URL(v["@id"]));
|
24182
24778
|
continue;
|
24183
24779
|
}
|
24184
24780
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -24650,7 +25246,9 @@ export class OrderedCollectionPage extends CollectionPage {
|
|
24650
25246
|
continue;
|
24651
25247
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
24652
25248
|
globalThis.Object.keys(v).length === 1) {
|
24653
|
-
_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(
|
25249
|
+
_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg_items.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
25250
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
25251
|
+
: new URL(v["@id"]));
|
24654
25252
|
continue;
|
24655
25253
|
}
|
24656
25254
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -24818,6 +25416,7 @@ export class Organization extends Object {
|
|
24818
25416
|
#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
|
24819
25417
|
#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
|
24820
25418
|
#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
|
25419
|
+
#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
24821
25420
|
#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
24822
25421
|
#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = [];
|
24823
25422
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
@@ -25065,6 +25664,20 @@ export class Organization extends Object {
|
|
25065
25664
|
"boolean" + ".");
|
25066
25665
|
}
|
25067
25666
|
}
|
25667
|
+
if ("successor" in values && values.successor != null) {
|
25668
|
+
if (values.successor instanceof Application ||
|
25669
|
+
values.successor instanceof Group ||
|
25670
|
+
values.successor instanceof _f ||
|
25671
|
+
values.successor instanceof Person ||
|
25672
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
25673
|
+
// @ts-ignore: type is checked above.
|
25674
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
25675
|
+
}
|
25676
|
+
else {
|
25677
|
+
throw new TypeError("The successor must be of type " +
|
25678
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
25679
|
+
}
|
25680
|
+
}
|
25068
25681
|
if ("alias" in values && values.alias != null) {
|
25069
25682
|
if (values.alias instanceof Application || values.alias instanceof Group ||
|
25070
25683
|
values.alias instanceof _f ||
|
@@ -25414,6 +26027,22 @@ export class Organization extends Object {
|
|
25414
26027
|
"boolean" + ".");
|
25415
26028
|
}
|
25416
26029
|
}
|
26030
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
26031
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
26032
|
+
if ("successor" in values && values.successor != null) {
|
26033
|
+
if (values.successor instanceof Application ||
|
26034
|
+
values.successor instanceof Group ||
|
26035
|
+
values.successor instanceof _f ||
|
26036
|
+
values.successor instanceof Person ||
|
26037
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
26038
|
+
// @ts-ignore: type is checked above.
|
26039
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
26040
|
+
}
|
26041
|
+
else {
|
26042
|
+
throw new TypeError("The successor must be of type " +
|
26043
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
26044
|
+
}
|
26045
|
+
}
|
25417
26046
|
clone.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs =
|
25418
26047
|
this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
|
25419
26048
|
if ("alias" in values && values.alias != null) {
|
@@ -26208,6 +26837,95 @@ export class Organization extends Object {
|
|
26208
26837
|
return null;
|
26209
26838
|
return this.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
26210
26839
|
}
|
26840
|
+
async #fetchSuccessor(url, options = {}) {
|
26841
|
+
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
26842
|
+
fetchDocumentLoader;
|
26843
|
+
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
26844
|
+
fetchDocumentLoader;
|
26845
|
+
let fetchResult;
|
26846
|
+
try {
|
26847
|
+
fetchResult = await documentLoader(url.href);
|
26848
|
+
}
|
26849
|
+
catch (error) {
|
26850
|
+
if (options.suppressError) {
|
26851
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
26852
|
+
return null;
|
26853
|
+
}
|
26854
|
+
throw error;
|
26855
|
+
}
|
26856
|
+
const { document } = fetchResult;
|
26857
|
+
try {
|
26858
|
+
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
26859
|
+
}
|
26860
|
+
catch (e) {
|
26861
|
+
if (!(e instanceof TypeError))
|
26862
|
+
throw e;
|
26863
|
+
}
|
26864
|
+
try {
|
26865
|
+
return await Group.fromJsonLd(document, { documentLoader, contextLoader });
|
26866
|
+
}
|
26867
|
+
catch (e) {
|
26868
|
+
if (!(e instanceof TypeError))
|
26869
|
+
throw e;
|
26870
|
+
}
|
26871
|
+
try {
|
26872
|
+
return await _f.fromJsonLd(document, { documentLoader, contextLoader });
|
26873
|
+
}
|
26874
|
+
catch (e) {
|
26875
|
+
if (!(e instanceof TypeError))
|
26876
|
+
throw e;
|
26877
|
+
}
|
26878
|
+
try {
|
26879
|
+
return await Person.fromJsonLd(document, { documentLoader, contextLoader });
|
26880
|
+
}
|
26881
|
+
catch (e) {
|
26882
|
+
if (!(e instanceof TypeError))
|
26883
|
+
throw e;
|
26884
|
+
}
|
26885
|
+
try {
|
26886
|
+
return await Service.fromJsonLd(document, { documentLoader, contextLoader });
|
26887
|
+
}
|
26888
|
+
catch (e) {
|
26889
|
+
if (!(e instanceof TypeError))
|
26890
|
+
throw e;
|
26891
|
+
}
|
26892
|
+
throw new TypeError("Expected an object of any type of: " +
|
26893
|
+
[
|
26894
|
+
"https://www.w3.org/ns/activitystreams#Application",
|
26895
|
+
"https://www.w3.org/ns/activitystreams#Group",
|
26896
|
+
"https://www.w3.org/ns/activitystreams#Organization",
|
26897
|
+
"https://www.w3.org/ns/activitystreams#Person",
|
26898
|
+
"https://www.w3.org/ns/activitystreams#Service",
|
26899
|
+
].join(", "));
|
26900
|
+
}
|
26901
|
+
/**
|
26902
|
+
* Similar to
|
26903
|
+
* {@link Organization.getSuccessor},
|
26904
|
+
* but returns its `@id` URL instead of the object itself.
|
26905
|
+
*/
|
26906
|
+
get successorId() {
|
26907
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
26908
|
+
return null;
|
26909
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
26910
|
+
if (v instanceof URL)
|
26911
|
+
return v;
|
26912
|
+
return v.id;
|
26913
|
+
}
|
26914
|
+
/** Signifies that an actor has been moved to a different ID. Used in Mastodon-style data portability with the {@link Move} activity; see [ActivityPub Data Portability/Move Action](https://swicg.github.io/activitypub-data-portability/#move-action) for more details.
|
26915
|
+
*/
|
26916
|
+
async getSuccessor(options = {}) {
|
26917
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
26918
|
+
return null;
|
26919
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
26920
|
+
if (v instanceof URL) {
|
26921
|
+
const fetched = await this.#fetchSuccessor(v, options);
|
26922
|
+
if (fetched == null)
|
26923
|
+
return null;
|
26924
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0] = fetched;
|
26925
|
+
return fetched;
|
26926
|
+
}
|
26927
|
+
return v;
|
26928
|
+
}
|
26211
26929
|
async #fetchAlias(url, options = {}) {
|
26212
26930
|
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
26213
26931
|
fetchDocumentLoader;
|
@@ -26672,6 +27390,46 @@ export class Organization extends Object {
|
|
26672
27390
|
: compactItems[0];
|
26673
27391
|
}
|
26674
27392
|
compactItems = [];
|
27393
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
27394
|
+
const item = v instanceof URL
|
27395
|
+
? v.href
|
27396
|
+
: v instanceof Application
|
27397
|
+
? await v.toJsonLd({
|
27398
|
+
...options,
|
27399
|
+
format: undefined,
|
27400
|
+
context: undefined,
|
27401
|
+
})
|
27402
|
+
: v instanceof Group
|
27403
|
+
? await v.toJsonLd({
|
27404
|
+
...options,
|
27405
|
+
format: undefined,
|
27406
|
+
context: undefined,
|
27407
|
+
})
|
27408
|
+
: v instanceof _f
|
27409
|
+
? await v.toJsonLd({
|
27410
|
+
...options,
|
27411
|
+
format: undefined,
|
27412
|
+
context: undefined,
|
27413
|
+
})
|
27414
|
+
: v instanceof Person
|
27415
|
+
? await v.toJsonLd({
|
27416
|
+
...options,
|
27417
|
+
format: undefined,
|
27418
|
+
context: undefined,
|
27419
|
+
})
|
27420
|
+
: await v.toJsonLd({
|
27421
|
+
...options,
|
27422
|
+
format: undefined,
|
27423
|
+
context: undefined,
|
27424
|
+
});
|
27425
|
+
compactItems.push(item);
|
27426
|
+
}
|
27427
|
+
if (compactItems.length > 0) {
|
27428
|
+
result["movedTo"] = compactItems.length > 1
|
27429
|
+
? compactItems
|
27430
|
+
: compactItems[0];
|
27431
|
+
}
|
27432
|
+
compactItems = [];
|
26675
27433
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
26676
27434
|
const item = v instanceof URL
|
26677
27435
|
? v.href
|
@@ -26745,7 +27503,9 @@ export class Organization extends Object {
|
|
26745
27503
|
"https://www.w3.org/ns/did/v1",
|
26746
27504
|
"https://w3id.org/security/multikey/v1",
|
26747
27505
|
{
|
27506
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
26748
27507
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
27508
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
26749
27509
|
"toot": "http://joinmastodon.org/ns#",
|
26750
27510
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
26751
27511
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -26948,6 +27708,25 @@ export class Organization extends Object {
|
|
26948
27708
|
values["http://joinmastodon.org/ns#indexable"] = propValue;
|
26949
27709
|
}
|
26950
27710
|
array = [];
|
27711
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
27712
|
+
const element = v instanceof URL
|
27713
|
+
? { "@id": v.href }
|
27714
|
+
: v instanceof Application
|
27715
|
+
? await v.toJsonLd(options)
|
27716
|
+
: v instanceof Group
|
27717
|
+
? await v.toJsonLd(options)
|
27718
|
+
: v instanceof _f
|
27719
|
+
? await v.toJsonLd(options)
|
27720
|
+
: v instanceof Person
|
27721
|
+
? await v.toJsonLd(options)
|
27722
|
+
: await v.toJsonLd(options);
|
27723
|
+
array.push(element);
|
27724
|
+
}
|
27725
|
+
if (array.length > 0) {
|
27726
|
+
const propValue = array;
|
27727
|
+
values["https://www.w3.org/ns/activitystreams#movedTo"] = propValue;
|
27728
|
+
}
|
27729
|
+
array = [];
|
26951
27730
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
26952
27731
|
const element = v instanceof URL
|
26953
27732
|
? { "@id": v.href }
|
@@ -27000,7 +27779,9 @@ export class Organization extends Object {
|
|
27000
27779
|
"https://www.w3.org/ns/did/v1",
|
27001
27780
|
"https://w3id.org/security/multikey/v1",
|
27002
27781
|
{
|
27782
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
27003
27783
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
27784
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
27004
27785
|
"toot": "http://joinmastodon.org/ns#",
|
27005
27786
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
27006
27787
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -27123,7 +27904,9 @@ export class Organization extends Object {
|
|
27123
27904
|
continue;
|
27124
27905
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27125
27906
|
globalThis.Object.keys(v).length === 1) {
|
27126
|
-
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(
|
27907
|
+
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
27908
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
27909
|
+
: new URL(v["@id"]));
|
27127
27910
|
continue;
|
27128
27911
|
}
|
27129
27912
|
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
|
@@ -27142,7 +27925,9 @@ export class Organization extends Object {
|
|
27142
27925
|
continue;
|
27143
27926
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27144
27927
|
globalThis.Object.keys(v).length === 1) {
|
27145
|
-
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(
|
27928
|
+
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
27929
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
27930
|
+
: new URL(v["@id"]));
|
27146
27931
|
continue;
|
27147
27932
|
}
|
27148
27933
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
|
@@ -27177,7 +27962,9 @@ export class Organization extends Object {
|
|
27177
27962
|
continue;
|
27178
27963
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27179
27964
|
globalThis.Object.keys(v).length === 1) {
|
27180
|
-
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(
|
27965
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
27966
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
27967
|
+
: new URL(v["@id"]));
|
27181
27968
|
continue;
|
27182
27969
|
}
|
27183
27970
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -27196,7 +27983,9 @@ export class Organization extends Object {
|
|
27196
27983
|
continue;
|
27197
27984
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27198
27985
|
globalThis.Object.keys(v).length === 1) {
|
27199
|
-
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(
|
27986
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
27987
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
27988
|
+
: new URL(v["@id"]));
|
27200
27989
|
continue;
|
27201
27990
|
}
|
27202
27991
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -27215,7 +28004,9 @@ export class Organization extends Object {
|
|
27215
28004
|
continue;
|
27216
28005
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27217
28006
|
globalThis.Object.keys(v).length === 1) {
|
27218
|
-
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(
|
28007
|
+
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28008
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28009
|
+
: new URL(v["@id"]));
|
27219
28010
|
continue;
|
27220
28011
|
}
|
27221
28012
|
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
|
@@ -27234,7 +28025,9 @@ export class Organization extends Object {
|
|
27234
28025
|
continue;
|
27235
28026
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27236
28027
|
globalThis.Object.keys(v).length === 1) {
|
27237
|
-
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(
|
28028
|
+
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28029
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28030
|
+
: new URL(v["@id"]));
|
27238
28031
|
continue;
|
27239
28032
|
}
|
27240
28033
|
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
|
@@ -27253,7 +28046,9 @@ export class Organization extends Object {
|
|
27253
28046
|
continue;
|
27254
28047
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27255
28048
|
globalThis.Object.keys(v).length === 1) {
|
27256
|
-
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(
|
28049
|
+
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28050
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28051
|
+
: new URL(v["@id"]));
|
27257
28052
|
continue;
|
27258
28053
|
}
|
27259
28054
|
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
|
@@ -27272,7 +28067,9 @@ export class Organization extends Object {
|
|
27272
28067
|
continue;
|
27273
28068
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27274
28069
|
globalThis.Object.keys(v).length === 1) {
|
27275
|
-
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(
|
28070
|
+
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28071
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28072
|
+
: new URL(v["@id"]));
|
27276
28073
|
continue;
|
27277
28074
|
}
|
27278
28075
|
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
|
@@ -27291,7 +28088,9 @@ export class Organization extends Object {
|
|
27291
28088
|
continue;
|
27292
28089
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27293
28090
|
globalThis.Object.keys(v).length === 1) {
|
27294
|
-
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(
|
28091
|
+
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28092
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28093
|
+
: new URL(v["@id"]));
|
27295
28094
|
continue;
|
27296
28095
|
}
|
27297
28096
|
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
|
@@ -27310,7 +28109,9 @@ export class Organization extends Object {
|
|
27310
28109
|
continue;
|
27311
28110
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27312
28111
|
globalThis.Object.keys(v).length === 1) {
|
27313
|
-
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(
|
28112
|
+
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28113
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28114
|
+
: new URL(v["@id"]));
|
27314
28115
|
continue;
|
27315
28116
|
}
|
27316
28117
|
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
|
@@ -27387,6 +28188,50 @@ export class Organization extends Object {
|
|
27387
28188
|
}
|
27388
28189
|
instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable =
|
27389
28190
|
_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
|
28191
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
28192
|
+
let _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array = values["https://www.w3.org/ns/activitystreams#movedTo"];
|
28193
|
+
for (const v of _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array == null
|
28194
|
+
? []
|
28195
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array.length === 1 &&
|
28196
|
+
"@list" in _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]
|
28197
|
+
? _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]["@list"]
|
28198
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array) {
|
28199
|
+
if (v == null)
|
28200
|
+
continue;
|
28201
|
+
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
28202
|
+
globalThis.Object.keys(v).length === 1) {
|
28203
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28204
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28205
|
+
: new URL(v["@id"]));
|
28206
|
+
continue;
|
28207
|
+
}
|
28208
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
28209
|
+
Array.isArray(v["@type"]) &&
|
28210
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Application")
|
28211
|
+
? await Application.fromJsonLd(v, options)
|
28212
|
+
: typeof v === "object" && "@type" in v &&
|
28213
|
+
Array.isArray(v["@type"]) &&
|
28214
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Group")
|
28215
|
+
? await Group.fromJsonLd(v, options)
|
28216
|
+
: typeof v === "object" && "@type" in v &&
|
28217
|
+
Array.isArray(v["@type"]) &&
|
28218
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Organization")
|
28219
|
+
? await _f.fromJsonLd(v, options)
|
28220
|
+
: typeof v === "object" && "@type" in v &&
|
28221
|
+
Array.isArray(v["@type"]) &&
|
28222
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Person")
|
28223
|
+
? await Person.fromJsonLd(v, options)
|
28224
|
+
: typeof v === "object" && "@type" in v &&
|
28225
|
+
Array.isArray(v["@type"]) &&
|
28226
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Service")
|
28227
|
+
? await Service.fromJsonLd(v, options)
|
28228
|
+
: undefined;
|
28229
|
+
if (typeof decoded === "undefined")
|
28230
|
+
continue;
|
28231
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
|
28232
|
+
}
|
28233
|
+
instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
28234
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
27390
28235
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
27391
28236
|
let _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array = values["https://www.w3.org/ns/activitystreams#alsoKnownAs"];
|
27392
28237
|
for (const v of _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array == null
|
@@ -27399,7 +28244,9 @@ export class Organization extends Object {
|
|
27399
28244
|
continue;
|
27400
28245
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27401
28246
|
globalThis.Object.keys(v).length === 1) {
|
27402
|
-
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(
|
28247
|
+
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28248
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28249
|
+
: new URL(v["@id"]));
|
27403
28250
|
continue;
|
27404
28251
|
}
|
27405
28252
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -27441,7 +28288,9 @@ export class Organization extends Object {
|
|
27441
28288
|
continue;
|
27442
28289
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
27443
28290
|
globalThis.Object.keys(v).length === 1) {
|
27444
|
-
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(
|
28291
|
+
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
28292
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
28293
|
+
: new URL(v["@id"]));
|
27445
28294
|
continue;
|
27446
28295
|
}
|
27447
28296
|
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, options));
|
@@ -27698,6 +28547,18 @@ export class Organization extends Object {
|
|
27698
28547
|
if (_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.length == 1) {
|
27699
28548
|
proxy.indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
27700
28549
|
}
|
28550
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = this
|
28551
|
+
.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo
|
28552
|
+
// deno-lint-ignore no-explicit-any
|
28553
|
+
.map((v) => v instanceof URL
|
28554
|
+
? {
|
28555
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
28556
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
28557
|
+
}
|
28558
|
+
: v);
|
28559
|
+
if (_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length == 1) {
|
28560
|
+
proxy.successor = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
28561
|
+
}
|
27701
28562
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = this
|
27702
28563
|
.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs
|
27703
28564
|
// deno-lint-ignore no-explicit-any
|
@@ -27958,6 +28819,7 @@ export class Person extends Object {
|
|
27958
28819
|
#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
|
27959
28820
|
#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
|
27960
28821
|
#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
|
28822
|
+
#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
27961
28823
|
#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
27962
28824
|
#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = [];
|
27963
28825
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
@@ -28205,6 +29067,20 @@ export class Person extends Object {
|
|
28205
29067
|
"boolean" + ".");
|
28206
29068
|
}
|
28207
29069
|
}
|
29070
|
+
if ("successor" in values && values.successor != null) {
|
29071
|
+
if (values.successor instanceof Application ||
|
29072
|
+
values.successor instanceof Group ||
|
29073
|
+
values.successor instanceof Organization ||
|
29074
|
+
values.successor instanceof _g ||
|
29075
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
29076
|
+
// @ts-ignore: type is checked above.
|
29077
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
29078
|
+
}
|
29079
|
+
else {
|
29080
|
+
throw new TypeError("The successor must be of type " +
|
29081
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
29082
|
+
}
|
29083
|
+
}
|
28208
29084
|
if ("alias" in values && values.alias != null) {
|
28209
29085
|
if (values.alias instanceof Application || values.alias instanceof Group ||
|
28210
29086
|
values.alias instanceof Organization ||
|
@@ -28554,6 +29430,22 @@ export class Person extends Object {
|
|
28554
29430
|
"boolean" + ".");
|
28555
29431
|
}
|
28556
29432
|
}
|
29433
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
29434
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
29435
|
+
if ("successor" in values && values.successor != null) {
|
29436
|
+
if (values.successor instanceof Application ||
|
29437
|
+
values.successor instanceof Group ||
|
29438
|
+
values.successor instanceof Organization ||
|
29439
|
+
values.successor instanceof _g ||
|
29440
|
+
values.successor instanceof Service || values.successor instanceof URL) {
|
29441
|
+
// @ts-ignore: type is checked above.
|
29442
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
29443
|
+
}
|
29444
|
+
else {
|
29445
|
+
throw new TypeError("The successor must be of type " +
|
29446
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
29447
|
+
}
|
29448
|
+
}
|
28557
29449
|
clone.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs =
|
28558
29450
|
this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
|
28559
29451
|
if ("alias" in values && values.alias != null) {
|
@@ -29348,6 +30240,95 @@ export class Person extends Object {
|
|
29348
30240
|
return null;
|
29349
30241
|
return this.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
29350
30242
|
}
|
30243
|
+
async #fetchSuccessor(url, options = {}) {
|
30244
|
+
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
30245
|
+
fetchDocumentLoader;
|
30246
|
+
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
30247
|
+
fetchDocumentLoader;
|
30248
|
+
let fetchResult;
|
30249
|
+
try {
|
30250
|
+
fetchResult = await documentLoader(url.href);
|
30251
|
+
}
|
30252
|
+
catch (error) {
|
30253
|
+
if (options.suppressError) {
|
30254
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
30255
|
+
return null;
|
30256
|
+
}
|
30257
|
+
throw error;
|
30258
|
+
}
|
30259
|
+
const { document } = fetchResult;
|
30260
|
+
try {
|
30261
|
+
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
30262
|
+
}
|
30263
|
+
catch (e) {
|
30264
|
+
if (!(e instanceof TypeError))
|
30265
|
+
throw e;
|
30266
|
+
}
|
30267
|
+
try {
|
30268
|
+
return await Group.fromJsonLd(document, { documentLoader, contextLoader });
|
30269
|
+
}
|
30270
|
+
catch (e) {
|
30271
|
+
if (!(e instanceof TypeError))
|
30272
|
+
throw e;
|
30273
|
+
}
|
30274
|
+
try {
|
30275
|
+
return await Organization.fromJsonLd(document, { documentLoader, contextLoader });
|
30276
|
+
}
|
30277
|
+
catch (e) {
|
30278
|
+
if (!(e instanceof TypeError))
|
30279
|
+
throw e;
|
30280
|
+
}
|
30281
|
+
try {
|
30282
|
+
return await _g.fromJsonLd(document, { documentLoader, contextLoader });
|
30283
|
+
}
|
30284
|
+
catch (e) {
|
30285
|
+
if (!(e instanceof TypeError))
|
30286
|
+
throw e;
|
30287
|
+
}
|
30288
|
+
try {
|
30289
|
+
return await Service.fromJsonLd(document, { documentLoader, contextLoader });
|
30290
|
+
}
|
30291
|
+
catch (e) {
|
30292
|
+
if (!(e instanceof TypeError))
|
30293
|
+
throw e;
|
30294
|
+
}
|
30295
|
+
throw new TypeError("Expected an object of any type of: " +
|
30296
|
+
[
|
30297
|
+
"https://www.w3.org/ns/activitystreams#Application",
|
30298
|
+
"https://www.w3.org/ns/activitystreams#Group",
|
30299
|
+
"https://www.w3.org/ns/activitystreams#Organization",
|
30300
|
+
"https://www.w3.org/ns/activitystreams#Person",
|
30301
|
+
"https://www.w3.org/ns/activitystreams#Service",
|
30302
|
+
].join(", "));
|
30303
|
+
}
|
30304
|
+
/**
|
30305
|
+
* Similar to
|
30306
|
+
* {@link Person.getSuccessor},
|
30307
|
+
* but returns its `@id` URL instead of the object itself.
|
30308
|
+
*/
|
30309
|
+
get successorId() {
|
30310
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
30311
|
+
return null;
|
30312
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
30313
|
+
if (v instanceof URL)
|
30314
|
+
return v;
|
30315
|
+
return v.id;
|
30316
|
+
}
|
30317
|
+
/** Signifies that an actor has been moved to a different ID. Used in Mastodon-style data portability with the {@link Move} activity; see [ActivityPub Data Portability/Move Action](https://swicg.github.io/activitypub-data-portability/#move-action) for more details.
|
30318
|
+
*/
|
30319
|
+
async getSuccessor(options = {}) {
|
30320
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
30321
|
+
return null;
|
30322
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
30323
|
+
if (v instanceof URL) {
|
30324
|
+
const fetched = await this.#fetchSuccessor(v, options);
|
30325
|
+
if (fetched == null)
|
30326
|
+
return null;
|
30327
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0] = fetched;
|
30328
|
+
return fetched;
|
30329
|
+
}
|
30330
|
+
return v;
|
30331
|
+
}
|
29351
30332
|
async #fetchAlias(url, options = {}) {
|
29352
30333
|
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
29353
30334
|
fetchDocumentLoader;
|
@@ -29812,6 +30793,46 @@ export class Person extends Object {
|
|
29812
30793
|
: compactItems[0];
|
29813
30794
|
}
|
29814
30795
|
compactItems = [];
|
30796
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
30797
|
+
const item = v instanceof URL
|
30798
|
+
? v.href
|
30799
|
+
: v instanceof Application
|
30800
|
+
? await v.toJsonLd({
|
30801
|
+
...options,
|
30802
|
+
format: undefined,
|
30803
|
+
context: undefined,
|
30804
|
+
})
|
30805
|
+
: v instanceof Group
|
30806
|
+
? await v.toJsonLd({
|
30807
|
+
...options,
|
30808
|
+
format: undefined,
|
30809
|
+
context: undefined,
|
30810
|
+
})
|
30811
|
+
: v instanceof Organization
|
30812
|
+
? await v.toJsonLd({
|
30813
|
+
...options,
|
30814
|
+
format: undefined,
|
30815
|
+
context: undefined,
|
30816
|
+
})
|
30817
|
+
: v instanceof _g
|
30818
|
+
? await v.toJsonLd({
|
30819
|
+
...options,
|
30820
|
+
format: undefined,
|
30821
|
+
context: undefined,
|
30822
|
+
})
|
30823
|
+
: await v.toJsonLd({
|
30824
|
+
...options,
|
30825
|
+
format: undefined,
|
30826
|
+
context: undefined,
|
30827
|
+
});
|
30828
|
+
compactItems.push(item);
|
30829
|
+
}
|
30830
|
+
if (compactItems.length > 0) {
|
30831
|
+
result["movedTo"] = compactItems.length > 1
|
30832
|
+
? compactItems
|
30833
|
+
: compactItems[0];
|
30834
|
+
}
|
30835
|
+
compactItems = [];
|
29815
30836
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
29816
30837
|
const item = v instanceof URL
|
29817
30838
|
? v.href
|
@@ -29885,7 +30906,9 @@ export class Person extends Object {
|
|
29885
30906
|
"https://www.w3.org/ns/did/v1",
|
29886
30907
|
"https://w3id.org/security/multikey/v1",
|
29887
30908
|
{
|
30909
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
29888
30910
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
30911
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
29889
30912
|
"toot": "http://joinmastodon.org/ns#",
|
29890
30913
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
29891
30914
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -30088,6 +31111,25 @@ export class Person extends Object {
|
|
30088
31111
|
values["http://joinmastodon.org/ns#indexable"] = propValue;
|
30089
31112
|
}
|
30090
31113
|
array = [];
|
31114
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
31115
|
+
const element = v instanceof URL
|
31116
|
+
? { "@id": v.href }
|
31117
|
+
: v instanceof Application
|
31118
|
+
? await v.toJsonLd(options)
|
31119
|
+
: v instanceof Group
|
31120
|
+
? await v.toJsonLd(options)
|
31121
|
+
: v instanceof Organization
|
31122
|
+
? await v.toJsonLd(options)
|
31123
|
+
: v instanceof _g
|
31124
|
+
? await v.toJsonLd(options)
|
31125
|
+
: await v.toJsonLd(options);
|
31126
|
+
array.push(element);
|
31127
|
+
}
|
31128
|
+
if (array.length > 0) {
|
31129
|
+
const propValue = array;
|
31130
|
+
values["https://www.w3.org/ns/activitystreams#movedTo"] = propValue;
|
31131
|
+
}
|
31132
|
+
array = [];
|
30091
31133
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
30092
31134
|
const element = v instanceof URL
|
30093
31135
|
? { "@id": v.href }
|
@@ -30140,7 +31182,9 @@ export class Person extends Object {
|
|
30140
31182
|
"https://www.w3.org/ns/did/v1",
|
30141
31183
|
"https://w3id.org/security/multikey/v1",
|
30142
31184
|
{
|
31185
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
30143
31186
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
31187
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
30144
31188
|
"toot": "http://joinmastodon.org/ns#",
|
30145
31189
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
30146
31190
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -30263,7 +31307,9 @@ export class Person extends Object {
|
|
30263
31307
|
continue;
|
30264
31308
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30265
31309
|
globalThis.Object.keys(v).length === 1) {
|
30266
|
-
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(
|
31310
|
+
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31311
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31312
|
+
: new URL(v["@id"]));
|
30267
31313
|
continue;
|
30268
31314
|
}
|
30269
31315
|
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
|
@@ -30282,7 +31328,9 @@ export class Person extends Object {
|
|
30282
31328
|
continue;
|
30283
31329
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30284
31330
|
globalThis.Object.keys(v).length === 1) {
|
30285
|
-
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(
|
31331
|
+
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31332
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31333
|
+
: new URL(v["@id"]));
|
30286
31334
|
continue;
|
30287
31335
|
}
|
30288
31336
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
|
@@ -30317,7 +31365,9 @@ export class Person extends Object {
|
|
30317
31365
|
continue;
|
30318
31366
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30319
31367
|
globalThis.Object.keys(v).length === 1) {
|
30320
|
-
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(
|
31368
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31369
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31370
|
+
: new URL(v["@id"]));
|
30321
31371
|
continue;
|
30322
31372
|
}
|
30323
31373
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -30336,7 +31386,9 @@ export class Person extends Object {
|
|
30336
31386
|
continue;
|
30337
31387
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30338
31388
|
globalThis.Object.keys(v).length === 1) {
|
30339
|
-
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(
|
31389
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31390
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31391
|
+
: new URL(v["@id"]));
|
30340
31392
|
continue;
|
30341
31393
|
}
|
30342
31394
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -30355,7 +31407,9 @@ export class Person extends Object {
|
|
30355
31407
|
continue;
|
30356
31408
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30357
31409
|
globalThis.Object.keys(v).length === 1) {
|
30358
|
-
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(
|
31410
|
+
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31411
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31412
|
+
: new URL(v["@id"]));
|
30359
31413
|
continue;
|
30360
31414
|
}
|
30361
31415
|
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
|
@@ -30374,7 +31428,9 @@ export class Person extends Object {
|
|
30374
31428
|
continue;
|
30375
31429
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30376
31430
|
globalThis.Object.keys(v).length === 1) {
|
30377
|
-
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(
|
31431
|
+
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31432
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31433
|
+
: new URL(v["@id"]));
|
30378
31434
|
continue;
|
30379
31435
|
}
|
30380
31436
|
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
|
@@ -30393,7 +31449,9 @@ export class Person extends Object {
|
|
30393
31449
|
continue;
|
30394
31450
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30395
31451
|
globalThis.Object.keys(v).length === 1) {
|
30396
|
-
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(
|
31452
|
+
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31453
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31454
|
+
: new URL(v["@id"]));
|
30397
31455
|
continue;
|
30398
31456
|
}
|
30399
31457
|
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
|
@@ -30412,7 +31470,9 @@ export class Person extends Object {
|
|
30412
31470
|
continue;
|
30413
31471
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30414
31472
|
globalThis.Object.keys(v).length === 1) {
|
30415
|
-
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(
|
31473
|
+
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31474
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31475
|
+
: new URL(v["@id"]));
|
30416
31476
|
continue;
|
30417
31477
|
}
|
30418
31478
|
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
|
@@ -30431,7 +31491,9 @@ export class Person extends Object {
|
|
30431
31491
|
continue;
|
30432
31492
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30433
31493
|
globalThis.Object.keys(v).length === 1) {
|
30434
|
-
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(
|
31494
|
+
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31495
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31496
|
+
: new URL(v["@id"]));
|
30435
31497
|
continue;
|
30436
31498
|
}
|
30437
31499
|
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
|
@@ -30450,7 +31512,9 @@ export class Person extends Object {
|
|
30450
31512
|
continue;
|
30451
31513
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30452
31514
|
globalThis.Object.keys(v).length === 1) {
|
30453
|
-
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(
|
31515
|
+
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31516
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31517
|
+
: new URL(v["@id"]));
|
30454
31518
|
continue;
|
30455
31519
|
}
|
30456
31520
|
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
|
@@ -30527,6 +31591,50 @@ export class Person extends Object {
|
|
30527
31591
|
}
|
30528
31592
|
instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable =
|
30529
31593
|
_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
|
31594
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
31595
|
+
let _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array = values["https://www.w3.org/ns/activitystreams#movedTo"];
|
31596
|
+
for (const v of _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array == null
|
31597
|
+
? []
|
31598
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array.length === 1 &&
|
31599
|
+
"@list" in _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]
|
31600
|
+
? _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]["@list"]
|
31601
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array) {
|
31602
|
+
if (v == null)
|
31603
|
+
continue;
|
31604
|
+
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
31605
|
+
globalThis.Object.keys(v).length === 1) {
|
31606
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31607
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31608
|
+
: new URL(v["@id"]));
|
31609
|
+
continue;
|
31610
|
+
}
|
31611
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
31612
|
+
Array.isArray(v["@type"]) &&
|
31613
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Application")
|
31614
|
+
? await Application.fromJsonLd(v, options)
|
31615
|
+
: typeof v === "object" && "@type" in v &&
|
31616
|
+
Array.isArray(v["@type"]) &&
|
31617
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Group")
|
31618
|
+
? await Group.fromJsonLd(v, options)
|
31619
|
+
: typeof v === "object" && "@type" in v &&
|
31620
|
+
Array.isArray(v["@type"]) &&
|
31621
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Organization")
|
31622
|
+
? await Organization.fromJsonLd(v, options)
|
31623
|
+
: typeof v === "object" && "@type" in v &&
|
31624
|
+
Array.isArray(v["@type"]) &&
|
31625
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Person")
|
31626
|
+
? await _g.fromJsonLd(v, options)
|
31627
|
+
: typeof v === "object" && "@type" in v &&
|
31628
|
+
Array.isArray(v["@type"]) &&
|
31629
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Service")
|
31630
|
+
? await Service.fromJsonLd(v, options)
|
31631
|
+
: undefined;
|
31632
|
+
if (typeof decoded === "undefined")
|
31633
|
+
continue;
|
31634
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
|
31635
|
+
}
|
31636
|
+
instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
31637
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
30530
31638
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
30531
31639
|
let _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array = values["https://www.w3.org/ns/activitystreams#alsoKnownAs"];
|
30532
31640
|
for (const v of _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array == null
|
@@ -30539,7 +31647,9 @@ export class Person extends Object {
|
|
30539
31647
|
continue;
|
30540
31648
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30541
31649
|
globalThis.Object.keys(v).length === 1) {
|
30542
|
-
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(
|
31650
|
+
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31651
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31652
|
+
: new URL(v["@id"]));
|
30543
31653
|
continue;
|
30544
31654
|
}
|
30545
31655
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -30581,7 +31691,9 @@ export class Person extends Object {
|
|
30581
31691
|
continue;
|
30582
31692
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
30583
31693
|
globalThis.Object.keys(v).length === 1) {
|
30584
|
-
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(
|
31694
|
+
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
31695
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
31696
|
+
: new URL(v["@id"]));
|
30585
31697
|
continue;
|
30586
31698
|
}
|
30587
31699
|
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, options));
|
@@ -30838,6 +31950,18 @@ export class Person extends Object {
|
|
30838
31950
|
if (_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.length == 1) {
|
30839
31951
|
proxy.indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
30840
31952
|
}
|
31953
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = this
|
31954
|
+
.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo
|
31955
|
+
// deno-lint-ignore no-explicit-any
|
31956
|
+
.map((v) => v instanceof URL
|
31957
|
+
? {
|
31958
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
31959
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
31960
|
+
}
|
31961
|
+
: v);
|
31962
|
+
if (_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length == 1) {
|
31963
|
+
proxy.successor = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
31964
|
+
}
|
30841
31965
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = this
|
30842
31966
|
.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs
|
30843
31967
|
// deno-lint-ignore no-explicit-any
|
@@ -31842,7 +32966,9 @@ export class Profile extends Object {
|
|
31842
32966
|
continue;
|
31843
32967
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
31844
32968
|
globalThis.Object.keys(v).length === 1) {
|
31845
|
-
_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(
|
32969
|
+
_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
32970
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
32971
|
+
: new URL(v["@id"]));
|
31846
32972
|
continue;
|
31847
32973
|
}
|
31848
32974
|
_3CLQ1PLSXrhSQbTGGHuxNyaEFKM1_describes.push(await Object.fromJsonLd(v, options));
|
@@ -32373,7 +33499,9 @@ export class Question extends IntransitiveActivity {
|
|
32373
33499
|
continue;
|
32374
33500
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
32375
33501
|
globalThis.Object.keys(v).length === 1) {
|
32376
|
-
_2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(
|
33502
|
+
_2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
33503
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
33504
|
+
: new URL(v["@id"]));
|
32377
33505
|
continue;
|
32378
33506
|
}
|
32379
33507
|
_2N5scKaVEcdYHFmfKYYacAwUhUgQ_oneOf.push(await Object.fromJsonLd(v, options));
|
@@ -32392,7 +33520,9 @@ export class Question extends IntransitiveActivity {
|
|
32392
33520
|
continue;
|
32393
33521
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
32394
33522
|
globalThis.Object.keys(v).length === 1) {
|
32395
|
-
_2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(
|
33523
|
+
_2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
33524
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
33525
|
+
: new URL(v["@id"]));
|
32396
33526
|
continue;
|
32397
33527
|
}
|
32398
33528
|
_2mV6isMTPRKbWdLCjcpiEysq5dAY_anyOf.push(await Object.fromJsonLd(v, options));
|
@@ -33479,7 +34609,9 @@ export class Relationship extends Object {
|
|
33479
34609
|
continue;
|
33480
34610
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
33481
34611
|
globalThis.Object.keys(v).length === 1) {
|
33482
|
-
_2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(
|
34612
|
+
_2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
34613
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
34614
|
+
: new URL(v["@id"]));
|
33483
34615
|
continue;
|
33484
34616
|
}
|
33485
34617
|
_2Zqdmi46ZnDQsECS6mzwhrv3rUKq_subject.push(await Object.fromJsonLd(v, options));
|
@@ -33498,7 +34630,9 @@ export class Relationship extends Object {
|
|
33498
34630
|
continue;
|
33499
34631
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
33500
34632
|
globalThis.Object.keys(v).length === 1) {
|
33501
|
-
_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(
|
34633
|
+
_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
34634
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
34635
|
+
: new URL(v["@id"]));
|
33502
34636
|
continue;
|
33503
34637
|
}
|
33504
34638
|
_2MH19yxjn1wnHsNfa5n4JBhJzxyc_object.push(await Object.fromJsonLd(v, options));
|
@@ -33517,7 +34651,9 @@ export class Relationship extends Object {
|
|
33517
34651
|
continue;
|
33518
34652
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
33519
34653
|
globalThis.Object.keys(v).length === 1) {
|
33520
|
-
_4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(
|
34654
|
+
_4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
34655
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
34656
|
+
: new URL(v["@id"]));
|
33521
34657
|
continue;
|
33522
34658
|
}
|
33523
34659
|
_4Lzz89F9qipAQSGkWyX9DGWiUojG_relationship.push(await Object.fromJsonLd(v, options));
|
@@ -33780,6 +34916,7 @@ export class Service extends Object {
|
|
33780
34916
|
#_2kGKkJtoFWg8c18PaVSqj9NKP4t7_suspended = [];
|
33781
34917
|
#_79S8K4f5J9MWUgCxziRyUe6PTHZ_memorial = [];
|
33782
34918
|
#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable = [];
|
34919
|
+
#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
33783
34920
|
#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
33784
34921
|
#_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service = [];
|
33785
34922
|
#_2xEU4QtkC53RAun67T81Egqt9vmL_isCat = [];
|
@@ -34027,6 +35164,20 @@ export class Service extends Object {
|
|
34027
35164
|
"boolean" + ".");
|
34028
35165
|
}
|
34029
35166
|
}
|
35167
|
+
if ("successor" in values && values.successor != null) {
|
35168
|
+
if (values.successor instanceof Application ||
|
35169
|
+
values.successor instanceof Group ||
|
35170
|
+
values.successor instanceof Organization ||
|
35171
|
+
values.successor instanceof Person ||
|
35172
|
+
values.successor instanceof _h || values.successor instanceof URL) {
|
35173
|
+
// @ts-ignore: type is checked above.
|
35174
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
35175
|
+
}
|
35176
|
+
else {
|
35177
|
+
throw new TypeError("The successor must be of type " +
|
35178
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
35179
|
+
}
|
35180
|
+
}
|
34030
35181
|
if ("alias" in values && values.alias != null) {
|
34031
35182
|
if (values.alias instanceof Application || values.alias instanceof Group ||
|
34032
35183
|
values.alias instanceof Organization ||
|
@@ -34376,6 +35527,22 @@ export class Service extends Object {
|
|
34376
35527
|
"boolean" + ".");
|
34377
35528
|
}
|
34378
35529
|
}
|
35530
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
35531
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
35532
|
+
if ("successor" in values && values.successor != null) {
|
35533
|
+
if (values.successor instanceof Application ||
|
35534
|
+
values.successor instanceof Group ||
|
35535
|
+
values.successor instanceof Organization ||
|
35536
|
+
values.successor instanceof Person ||
|
35537
|
+
values.successor instanceof _h || values.successor instanceof URL) {
|
35538
|
+
// @ts-ignore: type is checked above.
|
35539
|
+
clone.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [values.successor];
|
35540
|
+
}
|
35541
|
+
else {
|
35542
|
+
throw new TypeError("The successor must be of type " +
|
35543
|
+
"Application | Group | Organization | Person | Service | URL" + ".");
|
35544
|
+
}
|
35545
|
+
}
|
34379
35546
|
clone.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs =
|
34380
35547
|
this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs;
|
34381
35548
|
if ("alias" in values && values.alias != null) {
|
@@ -35170,6 +36337,95 @@ export class Service extends Object {
|
|
35170
36337
|
return null;
|
35171
36338
|
return this.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
35172
36339
|
}
|
36340
|
+
async #fetchSuccessor(url, options = {}) {
|
36341
|
+
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
36342
|
+
fetchDocumentLoader;
|
36343
|
+
const contextLoader = options.contextLoader ?? this._contextLoader ??
|
36344
|
+
fetchDocumentLoader;
|
36345
|
+
let fetchResult;
|
36346
|
+
try {
|
36347
|
+
fetchResult = await documentLoader(url.href);
|
36348
|
+
}
|
36349
|
+
catch (error) {
|
36350
|
+
if (options.suppressError) {
|
36351
|
+
getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
|
36352
|
+
return null;
|
36353
|
+
}
|
36354
|
+
throw error;
|
36355
|
+
}
|
36356
|
+
const { document } = fetchResult;
|
36357
|
+
try {
|
36358
|
+
return await Application.fromJsonLd(document, { documentLoader, contextLoader });
|
36359
|
+
}
|
36360
|
+
catch (e) {
|
36361
|
+
if (!(e instanceof TypeError))
|
36362
|
+
throw e;
|
36363
|
+
}
|
36364
|
+
try {
|
36365
|
+
return await Group.fromJsonLd(document, { documentLoader, contextLoader });
|
36366
|
+
}
|
36367
|
+
catch (e) {
|
36368
|
+
if (!(e instanceof TypeError))
|
36369
|
+
throw e;
|
36370
|
+
}
|
36371
|
+
try {
|
36372
|
+
return await Organization.fromJsonLd(document, { documentLoader, contextLoader });
|
36373
|
+
}
|
36374
|
+
catch (e) {
|
36375
|
+
if (!(e instanceof TypeError))
|
36376
|
+
throw e;
|
36377
|
+
}
|
36378
|
+
try {
|
36379
|
+
return await Person.fromJsonLd(document, { documentLoader, contextLoader });
|
36380
|
+
}
|
36381
|
+
catch (e) {
|
36382
|
+
if (!(e instanceof TypeError))
|
36383
|
+
throw e;
|
36384
|
+
}
|
36385
|
+
try {
|
36386
|
+
return await _h.fromJsonLd(document, { documentLoader, contextLoader });
|
36387
|
+
}
|
36388
|
+
catch (e) {
|
36389
|
+
if (!(e instanceof TypeError))
|
36390
|
+
throw e;
|
36391
|
+
}
|
36392
|
+
throw new TypeError("Expected an object of any type of: " +
|
36393
|
+
[
|
36394
|
+
"https://www.w3.org/ns/activitystreams#Application",
|
36395
|
+
"https://www.w3.org/ns/activitystreams#Group",
|
36396
|
+
"https://www.w3.org/ns/activitystreams#Organization",
|
36397
|
+
"https://www.w3.org/ns/activitystreams#Person",
|
36398
|
+
"https://www.w3.org/ns/activitystreams#Service",
|
36399
|
+
].join(", "));
|
36400
|
+
}
|
36401
|
+
/**
|
36402
|
+
* Similar to
|
36403
|
+
* {@link Service.getSuccessor},
|
36404
|
+
* but returns its `@id` URL instead of the object itself.
|
36405
|
+
*/
|
36406
|
+
get successorId() {
|
36407
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
36408
|
+
return null;
|
36409
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
36410
|
+
if (v instanceof URL)
|
36411
|
+
return v;
|
36412
|
+
return v.id;
|
36413
|
+
}
|
36414
|
+
/** Signifies that an actor has been moved to a different ID. Used in Mastodon-style data portability with the {@link Move} activity; see [ActivityPub Data Portability/Move Action](https://swicg.github.io/activitypub-data-portability/#move-action) for more details.
|
36415
|
+
*/
|
36416
|
+
async getSuccessor(options = {}) {
|
36417
|
+
if (this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length < 1)
|
36418
|
+
return null;
|
36419
|
+
const v = this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
36420
|
+
if (v instanceof URL) {
|
36421
|
+
const fetched = await this.#fetchSuccessor(v, options);
|
36422
|
+
if (fetched == null)
|
36423
|
+
return null;
|
36424
|
+
this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0] = fetched;
|
36425
|
+
return fetched;
|
36426
|
+
}
|
36427
|
+
return v;
|
36428
|
+
}
|
35173
36429
|
async #fetchAlias(url, options = {}) {
|
35174
36430
|
const documentLoader = options.documentLoader ?? this._documentLoader ??
|
35175
36431
|
fetchDocumentLoader;
|
@@ -35634,6 +36890,46 @@ export class Service extends Object {
|
|
35634
36890
|
: compactItems[0];
|
35635
36891
|
}
|
35636
36892
|
compactItems = [];
|
36893
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
36894
|
+
const item = v instanceof URL
|
36895
|
+
? v.href
|
36896
|
+
: v instanceof Application
|
36897
|
+
? await v.toJsonLd({
|
36898
|
+
...options,
|
36899
|
+
format: undefined,
|
36900
|
+
context: undefined,
|
36901
|
+
})
|
36902
|
+
: v instanceof Group
|
36903
|
+
? await v.toJsonLd({
|
36904
|
+
...options,
|
36905
|
+
format: undefined,
|
36906
|
+
context: undefined,
|
36907
|
+
})
|
36908
|
+
: v instanceof Organization
|
36909
|
+
? await v.toJsonLd({
|
36910
|
+
...options,
|
36911
|
+
format: undefined,
|
36912
|
+
context: undefined,
|
36913
|
+
})
|
36914
|
+
: v instanceof Person
|
36915
|
+
? await v.toJsonLd({
|
36916
|
+
...options,
|
36917
|
+
format: undefined,
|
36918
|
+
context: undefined,
|
36919
|
+
})
|
36920
|
+
: await v.toJsonLd({
|
36921
|
+
...options,
|
36922
|
+
format: undefined,
|
36923
|
+
context: undefined,
|
36924
|
+
});
|
36925
|
+
compactItems.push(item);
|
36926
|
+
}
|
36927
|
+
if (compactItems.length > 0) {
|
36928
|
+
result["movedTo"] = compactItems.length > 1
|
36929
|
+
? compactItems
|
36930
|
+
: compactItems[0];
|
36931
|
+
}
|
36932
|
+
compactItems = [];
|
35637
36933
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
35638
36934
|
const item = v instanceof URL
|
35639
36935
|
? v.href
|
@@ -35707,7 +37003,9 @@ export class Service extends Object {
|
|
35707
37003
|
"https://www.w3.org/ns/did/v1",
|
35708
37004
|
"https://w3id.org/security/multikey/v1",
|
35709
37005
|
{
|
37006
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
35710
37007
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
37008
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
35711
37009
|
"toot": "http://joinmastodon.org/ns#",
|
35712
37010
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
35713
37011
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -35910,6 +37208,25 @@ export class Service extends Object {
|
|
35910
37208
|
values["http://joinmastodon.org/ns#indexable"] = propValue;
|
35911
37209
|
}
|
35912
37210
|
array = [];
|
37211
|
+
for (const v of this.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo) {
|
37212
|
+
const element = v instanceof URL
|
37213
|
+
? { "@id": v.href }
|
37214
|
+
: v instanceof Application
|
37215
|
+
? await v.toJsonLd(options)
|
37216
|
+
: v instanceof Group
|
37217
|
+
? await v.toJsonLd(options)
|
37218
|
+
: v instanceof Organization
|
37219
|
+
? await v.toJsonLd(options)
|
37220
|
+
: v instanceof Person
|
37221
|
+
? await v.toJsonLd(options)
|
37222
|
+
: await v.toJsonLd(options);
|
37223
|
+
array.push(element);
|
37224
|
+
}
|
37225
|
+
if (array.length > 0) {
|
37226
|
+
const propValue = array;
|
37227
|
+
values["https://www.w3.org/ns/activitystreams#movedTo"] = propValue;
|
37228
|
+
}
|
37229
|
+
array = [];
|
35913
37230
|
for (const v of this.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs) {
|
35914
37231
|
const element = v instanceof URL
|
35915
37232
|
? { "@id": v.href }
|
@@ -35962,7 +37279,9 @@ export class Service extends Object {
|
|
35962
37279
|
"https://www.w3.org/ns/did/v1",
|
35963
37280
|
"https://w3id.org/security/multikey/v1",
|
35964
37281
|
{
|
37282
|
+
"alsoKnownAs": { "@id": "as:alsoKnownAs", "@type": "@id" },
|
35965
37283
|
"manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
|
37284
|
+
"movedTo": { "@id": "as:movedTo", "@type": "@id" },
|
35966
37285
|
"toot": "http://joinmastodon.org/ns#",
|
35967
37286
|
"featured": { "@id": "toot:featured", "@type": "@id" },
|
35968
37287
|
"featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
|
@@ -36085,7 +37404,9 @@ export class Service extends Object {
|
|
36085
37404
|
continue;
|
36086
37405
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36087
37406
|
globalThis.Object.keys(v).length === 1) {
|
36088
|
-
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(
|
37407
|
+
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37408
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37409
|
+
: new URL(v["@id"]));
|
36089
37410
|
continue;
|
36090
37411
|
}
|
36091
37412
|
_axq166E2eZADq34V4MYUc8KMZdC_publicKey.push(await CryptographicKey.fromJsonLd(v, options));
|
@@ -36104,7 +37425,9 @@ export class Service extends Object {
|
|
36104
37425
|
continue;
|
36105
37426
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36106
37427
|
globalThis.Object.keys(v).length === 1) {
|
36107
|
-
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(
|
37428
|
+
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37429
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37430
|
+
: new URL(v["@id"]));
|
36108
37431
|
continue;
|
36109
37432
|
}
|
36110
37433
|
_4EHQFWZSz1k1d4LmPrQiMba2GbP3_assertionMethod.push(await Multikey.fromJsonLd(v, options));
|
@@ -36139,7 +37462,9 @@ export class Service extends Object {
|
|
36139
37462
|
continue;
|
36140
37463
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36141
37464
|
globalThis.Object.keys(v).length === 1) {
|
36142
|
-
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(
|
37465
|
+
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37466
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37467
|
+
: new URL(v["@id"]));
|
36143
37468
|
continue;
|
36144
37469
|
}
|
36145
37470
|
_3ghX3VfZXXbLvhCRH7QJqpzLrXjB_inbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -36158,7 +37483,9 @@ export class Service extends Object {
|
|
36158
37483
|
continue;
|
36159
37484
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36160
37485
|
globalThis.Object.keys(v).length === 1) {
|
36161
|
-
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(
|
37486
|
+
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37487
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37488
|
+
: new URL(v["@id"]));
|
36162
37489
|
continue;
|
36163
37490
|
}
|
36164
37491
|
_41QwhqJouoLg3h8dRPKat21brynC_outbox.push(await OrderedCollection.fromJsonLd(v, options));
|
@@ -36177,7 +37504,9 @@ export class Service extends Object {
|
|
36177
37504
|
continue;
|
36178
37505
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36179
37506
|
globalThis.Object.keys(v).length === 1) {
|
36180
|
-
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(
|
37507
|
+
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37508
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37509
|
+
: new URL(v["@id"]));
|
36181
37510
|
continue;
|
36182
37511
|
}
|
36183
37512
|
_3yAv8jymNfNuJUDuBzJ1NQhdbAee_following.push(await Collection.fromJsonLd(v, options));
|
@@ -36196,7 +37525,9 @@ export class Service extends Object {
|
|
36196
37525
|
continue;
|
36197
37526
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36198
37527
|
globalThis.Object.keys(v).length === 1) {
|
36199
|
-
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(
|
37528
|
+
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37529
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37530
|
+
: new URL(v["@id"]));
|
36200
37531
|
continue;
|
36201
37532
|
}
|
36202
37533
|
_BBCTgfphhsFzpVfKTykGSpBNwoA_followers.push(await Collection.fromJsonLd(v, options));
|
@@ -36215,7 +37546,9 @@ export class Service extends Object {
|
|
36215
37546
|
continue;
|
36216
37547
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36217
37548
|
globalThis.Object.keys(v).length === 1) {
|
36218
|
-
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(
|
37549
|
+
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37550
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37551
|
+
: new URL(v["@id"]));
|
36219
37552
|
continue;
|
36220
37553
|
}
|
36221
37554
|
_3bgkPwJanyTCoVFM9ovRcus8tKkU_liked.push(await Collection.fromJsonLd(v, options));
|
@@ -36234,7 +37567,9 @@ export class Service extends Object {
|
|
36234
37567
|
continue;
|
36235
37568
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36236
37569
|
globalThis.Object.keys(v).length === 1) {
|
36237
|
-
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(
|
37570
|
+
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37571
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37572
|
+
: new URL(v["@id"]));
|
36238
37573
|
continue;
|
36239
37574
|
}
|
36240
37575
|
_4N1vBJzXDf8NbBumeECQMFvKetja_featured.push(await Collection.fromJsonLd(v, options));
|
@@ -36253,7 +37588,9 @@ export class Service extends Object {
|
|
36253
37588
|
continue;
|
36254
37589
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36255
37590
|
globalThis.Object.keys(v).length === 1) {
|
36256
|
-
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(
|
37591
|
+
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37592
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37593
|
+
: new URL(v["@id"]));
|
36257
37594
|
continue;
|
36258
37595
|
}
|
36259
37596
|
_2MxnRRLq9iPzx5CFq2NPrXdUDCac_featuredTags.push(await Collection.fromJsonLd(v, options));
|
@@ -36272,7 +37609,9 @@ export class Service extends Object {
|
|
36272
37609
|
continue;
|
36273
37610
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36274
37611
|
globalThis.Object.keys(v).length === 1) {
|
36275
|
-
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(
|
37612
|
+
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37613
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37614
|
+
: new URL(v["@id"]));
|
36276
37615
|
continue;
|
36277
37616
|
}
|
36278
37617
|
_3sG2Hdwn9qzKGu9mpYkqakAMUkH9_streams.push(await Collection.fromJsonLd(v, options));
|
@@ -36349,6 +37688,50 @@ export class Service extends Object {
|
|
36349
37688
|
}
|
36350
37689
|
instance.#_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable =
|
36351
37690
|
_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable;
|
37691
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = [];
|
37692
|
+
let _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array = values["https://www.w3.org/ns/activitystreams#movedTo"];
|
37693
|
+
for (const v of _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array == null
|
37694
|
+
? []
|
37695
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array.length === 1 &&
|
37696
|
+
"@list" in _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]
|
37697
|
+
? _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array[0]["@list"]
|
37698
|
+
: _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo__array) {
|
37699
|
+
if (v == null)
|
37700
|
+
continue;
|
37701
|
+
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
37702
|
+
globalThis.Object.keys(v).length === 1) {
|
37703
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37704
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37705
|
+
: new URL(v["@id"]));
|
37706
|
+
continue;
|
37707
|
+
}
|
37708
|
+
const decoded = typeof v === "object" && "@type" in v &&
|
37709
|
+
Array.isArray(v["@type"]) &&
|
37710
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Application")
|
37711
|
+
? await Application.fromJsonLd(v, options)
|
37712
|
+
: typeof v === "object" && "@type" in v &&
|
37713
|
+
Array.isArray(v["@type"]) &&
|
37714
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Group")
|
37715
|
+
? await Group.fromJsonLd(v, options)
|
37716
|
+
: typeof v === "object" && "@type" in v &&
|
37717
|
+
Array.isArray(v["@type"]) &&
|
37718
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Organization")
|
37719
|
+
? await Organization.fromJsonLd(v, options)
|
37720
|
+
: typeof v === "object" && "@type" in v &&
|
37721
|
+
Array.isArray(v["@type"]) &&
|
37722
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Person")
|
37723
|
+
? await Person.fromJsonLd(v, options)
|
37724
|
+
: typeof v === "object" && "@type" in v &&
|
37725
|
+
Array.isArray(v["@type"]) &&
|
37726
|
+
v["@type"].includes("https://www.w3.org/ns/activitystreams#Service")
|
37727
|
+
? await _h.fromJsonLd(v, options)
|
37728
|
+
: undefined;
|
37729
|
+
if (typeof decoded === "undefined")
|
37730
|
+
continue;
|
37731
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.push(decoded);
|
37732
|
+
}
|
37733
|
+
instance.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo =
|
37734
|
+
_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo;
|
36352
37735
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = [];
|
36353
37736
|
let _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array = values["https://www.w3.org/ns/activitystreams#alsoKnownAs"];
|
36354
37737
|
for (const v of _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs__array == null
|
@@ -36361,7 +37744,9 @@ export class Service extends Object {
|
|
36361
37744
|
continue;
|
36362
37745
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36363
37746
|
globalThis.Object.keys(v).length === 1) {
|
36364
|
-
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(
|
37747
|
+
_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37748
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37749
|
+
: new URL(v["@id"]));
|
36365
37750
|
continue;
|
36366
37751
|
}
|
36367
37752
|
const decoded = typeof v === "object" && "@type" in v &&
|
@@ -36403,7 +37788,9 @@ export class Service extends Object {
|
|
36403
37788
|
continue;
|
36404
37789
|
if (typeof v === "object" && "@id" in v && !("@type" in v) &&
|
36405
37790
|
globalThis.Object.keys(v).length === 1) {
|
36406
|
-
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(
|
37791
|
+
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(!URL.canParse(v["@id"]) && v["@id"].startsWith("at://")
|
37792
|
+
? new URL("at://" + encodeURIComponent(v["@id"].substring(5)))
|
37793
|
+
: new URL(v["@id"]));
|
36407
37794
|
continue;
|
36408
37795
|
}
|
36409
37796
|
_4Q6NrKH6bazBGtxwG8vyG77ir7Tg_service.push(await DidService.fromJsonLd(v, options));
|
@@ -36660,6 +38047,18 @@ export class Service extends Object {
|
|
36660
38047
|
if (_2diCorzqPGQQqftp6e4SrCEwEnyk_indexable.length == 1) {
|
36661
38048
|
proxy.indexable = _2diCorzqPGQQqftp6e4SrCEwEnyk_indexable[0];
|
36662
38049
|
}
|
38050
|
+
const _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo = this
|
38051
|
+
.#_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo
|
38052
|
+
// deno-lint-ignore no-explicit-any
|
38053
|
+
.map((v) => v instanceof URL
|
38054
|
+
? {
|
38055
|
+
[Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
|
38056
|
+
[Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
|
38057
|
+
}
|
38058
|
+
: v);
|
38059
|
+
if (_2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo.length == 1) {
|
38060
|
+
proxy.successor = _2ZNWDhuNdSXBwEmrB5kwffdKGzok_movedTo[0];
|
38061
|
+
}
|
36663
38062
|
const _3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs = this
|
36664
38063
|
.#_3NV7TGNhuABbryNjNi4wib4DgNpY_alsoKnownAs
|
36665
38064
|
// deno-lint-ignore no-explicit-any
|