@fedify/fedify 0.11.0-dev.243 → 0.11.0-dev.245

Sign up to get free protection for your applications and to get access to all the features.
@@ -3256,8 +3256,13 @@ export class Object {
3256
3256
  }
3257
3257
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : undefined }, options);
3258
3258
  const _49BipA5dq9eoH8LX8xdsVumveTca = [];
3259
- for (const v of values["https://www.w3.org/ns/activitystreams#attachment"] ??
3260
- []) {
3259
+ const _49BipA5dq9eoH8LX8xdsVumveTca__array = values["https://www.w3.org/ns/activitystreams#attachment"];
3260
+ for (const v of _49BipA5dq9eoH8LX8xdsVumveTca__array == null
3261
+ ? []
3262
+ : _49BipA5dq9eoH8LX8xdsVumveTca__array.length === 1 &&
3263
+ "@list" in _49BipA5dq9eoH8LX8xdsVumveTca__array[0]
3264
+ ? _49BipA5dq9eoH8LX8xdsVumveTca__array[0]["@list"]
3265
+ : _49BipA5dq9eoH8LX8xdsVumveTca__array) {
3261
3266
  if (v == null)
3262
3267
  continue;
3263
3268
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3332,8 +3337,13 @@ export class Object {
3332
3337
  }
3333
3338
  instance.#_49BipA5dq9eoH8LX8xdsVumveTca = _49BipA5dq9eoH8LX8xdsVumveTca;
3334
3339
  const _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py = [];
3335
- for (const v of values["https://www.w3.org/ns/activitystreams#attributedTo"] ??
3336
- []) {
3340
+ const _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py__array = values["https://www.w3.org/ns/activitystreams#attributedTo"];
3341
+ for (const v of _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py__array == null
3342
+ ? []
3343
+ : _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py__array.length === 1 &&
3344
+ "@list" in _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py__array[0]
3345
+ ? _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py__array[0]["@list"]
3346
+ : _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py__array) {
3337
3347
  if (v == null)
3338
3348
  continue;
3339
3349
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3368,7 +3378,13 @@ export class Object {
3368
3378
  }
3369
3379
  instance.#_42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py = _42CGqJ94zgQ3ZBbfHwD8Hrr2L5Py;
3370
3380
  const _3ocC3VVi88cEd5sPWL8djkZsvTN6 = [];
3371
- for (const v of values["https://www.w3.org/ns/activitystreams#audience"] ?? []) {
3381
+ const _3ocC3VVi88cEd5sPWL8djkZsvTN6__array = values["https://www.w3.org/ns/activitystreams#audience"];
3382
+ for (const v of _3ocC3VVi88cEd5sPWL8djkZsvTN6__array == null
3383
+ ? []
3384
+ : _3ocC3VVi88cEd5sPWL8djkZsvTN6__array.length === 1 &&
3385
+ "@list" in _3ocC3VVi88cEd5sPWL8djkZsvTN6__array[0]
3386
+ ? _3ocC3VVi88cEd5sPWL8djkZsvTN6__array[0]["@list"]
3387
+ : _3ocC3VVi88cEd5sPWL8djkZsvTN6__array) {
3372
3388
  if (v == null)
3373
3389
  continue;
3374
3390
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3380,7 +3396,13 @@ export class Object {
3380
3396
  }
3381
3397
  instance.#_3ocC3VVi88cEd5sPWL8djkZsvTN6 = _3ocC3VVi88cEd5sPWL8djkZsvTN6;
3382
3398
  const _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz = [];
3383
- for (const v of values["https://www.w3.org/ns/activitystreams#content"] ?? []) {
3399
+ const _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz__array = values["https://www.w3.org/ns/activitystreams#content"];
3400
+ for (const v of _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz__array == null
3401
+ ? []
3402
+ : _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz__array.length === 1 &&
3403
+ "@list" in _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz__array[0]
3404
+ ? _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz__array[0]["@list"]
3405
+ : _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz__array) {
3384
3406
  if (v == null)
3385
3407
  continue;
3386
3408
  const decoded = typeof v === "object" && "@value" in v &&
@@ -3397,7 +3419,13 @@ export class Object {
3397
3419
  }
3398
3420
  instance.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz = _4HuuRSdSrXq8Jj2J9gcdYfoCzeuz;
3399
3421
  const _3mhZzGXSpQ431mBSz2kvych22v4e = [];
3400
- for (const v of values["https://www.w3.org/ns/activitystreams#context"] ?? []) {
3422
+ const _3mhZzGXSpQ431mBSz2kvych22v4e__array = values["https://www.w3.org/ns/activitystreams#context"];
3423
+ for (const v of _3mhZzGXSpQ431mBSz2kvych22v4e__array == null
3424
+ ? []
3425
+ : _3mhZzGXSpQ431mBSz2kvych22v4e__array.length === 1 &&
3426
+ "@list" in _3mhZzGXSpQ431mBSz2kvych22v4e__array[0]
3427
+ ? _3mhZzGXSpQ431mBSz2kvych22v4e__array[0]["@list"]
3428
+ : _3mhZzGXSpQ431mBSz2kvych22v4e__array) {
3401
3429
  if (v == null)
3402
3430
  continue;
3403
3431
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3468,7 +3496,13 @@ export class Object {
3468
3496
  }
3469
3497
  instance.#_3mhZzGXSpQ431mBSz2kvych22v4e = _3mhZzGXSpQ431mBSz2kvych22v4e;
3470
3498
  const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav = [];
3471
- for (const v of values["https://www.w3.org/ns/activitystreams#name"] ?? []) {
3499
+ const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array = values["https://www.w3.org/ns/activitystreams#name"];
3500
+ for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array == null
3501
+ ? []
3502
+ : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array.length === 1 &&
3503
+ "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array[0]
3504
+ ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array[0]["@list"]
3505
+ : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array) {
3472
3506
  if (v == null)
3473
3507
  continue;
3474
3508
  const decoded = typeof v === "object" && "@value" in v &&
@@ -3485,14 +3519,26 @@ export class Object {
3485
3519
  }
3486
3520
  instance.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav = _4ZHbBuK7PrsvGgrjM8wgc6KMWjav;
3487
3521
  const _219RwDanjScTv5tYCjwGZVCM7KZ9 = [];
3488
- for (const v of values["https://www.w3.org/ns/activitystreams#endTime"] ?? []) {
3522
+ const _219RwDanjScTv5tYCjwGZVCM7KZ9__array = values["https://www.w3.org/ns/activitystreams#endTime"];
3523
+ for (const v of _219RwDanjScTv5tYCjwGZVCM7KZ9__array == null
3524
+ ? []
3525
+ : _219RwDanjScTv5tYCjwGZVCM7KZ9__array.length === 1 &&
3526
+ "@list" in _219RwDanjScTv5tYCjwGZVCM7KZ9__array[0]
3527
+ ? _219RwDanjScTv5tYCjwGZVCM7KZ9__array[0]["@list"]
3528
+ : _219RwDanjScTv5tYCjwGZVCM7KZ9__array) {
3489
3529
  if (v == null)
3490
3530
  continue;
3491
3531
  _219RwDanjScTv5tYCjwGZVCM7KZ9.push(dntShim.Temporal.Instant.from(v["@value"]));
3492
3532
  }
3493
3533
  instance.#_219RwDanjScTv5tYCjwGZVCM7KZ9 = _219RwDanjScTv5tYCjwGZVCM7KZ9;
3494
3534
  const _86xFhmgBapoMvYqjbjRuDPayTrS = [];
3495
- for (const v of values["https://www.w3.org/ns/activitystreams#generator"] ?? []) {
3535
+ const _86xFhmgBapoMvYqjbjRuDPayTrS__array = values["https://www.w3.org/ns/activitystreams#generator"];
3536
+ for (const v of _86xFhmgBapoMvYqjbjRuDPayTrS__array == null
3537
+ ? []
3538
+ : _86xFhmgBapoMvYqjbjRuDPayTrS__array.length === 1 &&
3539
+ "@list" in _86xFhmgBapoMvYqjbjRuDPayTrS__array[0]
3540
+ ? _86xFhmgBapoMvYqjbjRuDPayTrS__array[0]["@list"]
3541
+ : _86xFhmgBapoMvYqjbjRuDPayTrS__array) {
3496
3542
  if (v == null)
3497
3543
  continue;
3498
3544
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3563,7 +3609,13 @@ export class Object {
3563
3609
  }
3564
3610
  instance.#_86xFhmgBapoMvYqjbjRuDPayTrS = _86xFhmgBapoMvYqjbjRuDPayTrS;
3565
3611
  const _33CjRLy5ujtsUrwRSCrsggvGdKuR = [];
3566
- for (const v of values["https://www.w3.org/ns/activitystreams#icon"] ?? []) {
3612
+ const _33CjRLy5ujtsUrwRSCrsggvGdKuR__array = values["https://www.w3.org/ns/activitystreams#icon"];
3613
+ for (const v of _33CjRLy5ujtsUrwRSCrsggvGdKuR__array == null
3614
+ ? []
3615
+ : _33CjRLy5ujtsUrwRSCrsggvGdKuR__array.length === 1 &&
3616
+ "@list" in _33CjRLy5ujtsUrwRSCrsggvGdKuR__array[0]
3617
+ ? _33CjRLy5ujtsUrwRSCrsggvGdKuR__array[0]["@list"]
3618
+ : _33CjRLy5ujtsUrwRSCrsggvGdKuR__array) {
3567
3619
  if (v == null)
3568
3620
  continue;
3569
3621
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3575,7 +3627,13 @@ export class Object {
3575
3627
  }
3576
3628
  instance.#_33CjRLy5ujtsUrwRSCrsggvGdKuR = _33CjRLy5ujtsUrwRSCrsggvGdKuR;
3577
3629
  const _3dXrUdkARxwyJLtJcYi1AJ92H41U = [];
3578
- for (const v of values["https://www.w3.org/ns/activitystreams#image"] ?? []) {
3630
+ const _3dXrUdkARxwyJLtJcYi1AJ92H41U__array = values["https://www.w3.org/ns/activitystreams#image"];
3631
+ for (const v of _3dXrUdkARxwyJLtJcYi1AJ92H41U__array == null
3632
+ ? []
3633
+ : _3dXrUdkARxwyJLtJcYi1AJ92H41U__array.length === 1 &&
3634
+ "@list" in _3dXrUdkARxwyJLtJcYi1AJ92H41U__array[0]
3635
+ ? _3dXrUdkARxwyJLtJcYi1AJ92H41U__array[0]["@list"]
3636
+ : _3dXrUdkARxwyJLtJcYi1AJ92H41U__array) {
3579
3637
  if (v == null)
3580
3638
  continue;
3581
3639
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3587,7 +3645,13 @@ export class Object {
3587
3645
  }
3588
3646
  instance.#_3dXrUdkARxwyJLtJcYi1AJ92H41U = _3dXrUdkARxwyJLtJcYi1AJ92H41U;
3589
3647
  const _3fpbDrvZgf3Kq1a5V9aByFn8kx3s = [];
3590
- for (const v of values["https://www.w3.org/ns/activitystreams#inReplyTo"] ?? []) {
3648
+ const _3fpbDrvZgf3Kq1a5V9aByFn8kx3s__array = values["https://www.w3.org/ns/activitystreams#inReplyTo"];
3649
+ for (const v of _3fpbDrvZgf3Kq1a5V9aByFn8kx3s__array == null
3650
+ ? []
3651
+ : _3fpbDrvZgf3Kq1a5V9aByFn8kx3s__array.length === 1 &&
3652
+ "@list" in _3fpbDrvZgf3Kq1a5V9aByFn8kx3s__array[0]
3653
+ ? _3fpbDrvZgf3Kq1a5V9aByFn8kx3s__array[0]["@list"]
3654
+ : _3fpbDrvZgf3Kq1a5V9aByFn8kx3s__array) {
3591
3655
  if (v == null)
3592
3656
  continue;
3593
3657
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3658,7 +3722,13 @@ export class Object {
3658
3722
  }
3659
3723
  instance.#_3fpbDrvZgf3Kq1a5V9aByFn8kx3s = _3fpbDrvZgf3Kq1a5V9aByFn8kx3s;
3660
3724
  const _31k5MUZJsnsPNg8dQQJieWaXTFnR = [];
3661
- for (const v of values["https://www.w3.org/ns/activitystreams#location"] ?? []) {
3725
+ const _31k5MUZJsnsPNg8dQQJieWaXTFnR__array = values["https://www.w3.org/ns/activitystreams#location"];
3726
+ for (const v of _31k5MUZJsnsPNg8dQQJieWaXTFnR__array == null
3727
+ ? []
3728
+ : _31k5MUZJsnsPNg8dQQJieWaXTFnR__array.length === 1 &&
3729
+ "@list" in _31k5MUZJsnsPNg8dQQJieWaXTFnR__array[0]
3730
+ ? _31k5MUZJsnsPNg8dQQJieWaXTFnR__array[0]["@list"]
3731
+ : _31k5MUZJsnsPNg8dQQJieWaXTFnR__array) {
3662
3732
  if (v == null)
3663
3733
  continue;
3664
3734
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3729,7 +3799,13 @@ export class Object {
3729
3799
  }
3730
3800
  instance.#_31k5MUZJsnsPNg8dQQJieWaXTFnR = _31k5MUZJsnsPNg8dQQJieWaXTFnR;
3731
3801
  const _gCVTegXxWWCw6wWRxa1QF65zusg = [];
3732
- for (const v of values["https://www.w3.org/ns/activitystreams#preview"] ?? []) {
3802
+ const _gCVTegXxWWCw6wWRxa1QF65zusg__array = values["https://www.w3.org/ns/activitystreams#preview"];
3803
+ for (const v of _gCVTegXxWWCw6wWRxa1QF65zusg__array == null
3804
+ ? []
3805
+ : _gCVTegXxWWCw6wWRxa1QF65zusg__array.length === 1 &&
3806
+ "@list" in _gCVTegXxWWCw6wWRxa1QF65zusg__array[0]
3807
+ ? _gCVTegXxWWCw6wWRxa1QF65zusg__array[0]["@list"]
3808
+ : _gCVTegXxWWCw6wWRxa1QF65zusg__array) {
3733
3809
  if (v == null)
3734
3810
  continue;
3735
3811
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3800,14 +3876,26 @@ export class Object {
3800
3876
  }
3801
3877
  instance.#_gCVTegXxWWCw6wWRxa1QF65zusg = _gCVTegXxWWCw6wWRxa1QF65zusg;
3802
3878
  const _5e258TDXtuhaFRPZiGoDfEpjdMr = [];
3803
- for (const v of values["https://www.w3.org/ns/activitystreams#published"] ?? []) {
3879
+ const _5e258TDXtuhaFRPZiGoDfEpjdMr__array = values["https://www.w3.org/ns/activitystreams#published"];
3880
+ for (const v of _5e258TDXtuhaFRPZiGoDfEpjdMr__array == null
3881
+ ? []
3882
+ : _5e258TDXtuhaFRPZiGoDfEpjdMr__array.length === 1 &&
3883
+ "@list" in _5e258TDXtuhaFRPZiGoDfEpjdMr__array[0]
3884
+ ? _5e258TDXtuhaFRPZiGoDfEpjdMr__array[0]["@list"]
3885
+ : _5e258TDXtuhaFRPZiGoDfEpjdMr__array) {
3804
3886
  if (v == null)
3805
3887
  continue;
3806
3888
  _5e258TDXtuhaFRPZiGoDfEpjdMr.push(dntShim.Temporal.Instant.from(v["@value"]));
3807
3889
  }
3808
3890
  instance.#_5e258TDXtuhaFRPZiGoDfEpjdMr = _5e258TDXtuhaFRPZiGoDfEpjdMr;
3809
3891
  const _7UpwM3JWcXhADcscukEehBorf6k = [];
3810
- for (const v of values["https://www.w3.org/ns/activitystreams#replies"] ?? []) {
3892
+ const _7UpwM3JWcXhADcscukEehBorf6k__array = values["https://www.w3.org/ns/activitystreams#replies"];
3893
+ for (const v of _7UpwM3JWcXhADcscukEehBorf6k__array == null
3894
+ ? []
3895
+ : _7UpwM3JWcXhADcscukEehBorf6k__array.length === 1 &&
3896
+ "@list" in _7UpwM3JWcXhADcscukEehBorf6k__array[0]
3897
+ ? _7UpwM3JWcXhADcscukEehBorf6k__array[0]["@list"]
3898
+ : _7UpwM3JWcXhADcscukEehBorf6k__array) {
3811
3899
  if (v == null)
3812
3900
  continue;
3813
3901
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3819,14 +3907,26 @@ export class Object {
3819
3907
  }
3820
3908
  instance.#_7UpwM3JWcXhADcscukEehBorf6k = _7UpwM3JWcXhADcscukEehBorf6k;
3821
3909
  const _2w3Jmue4up8iVDUA51WZqomEF438 = [];
3822
- for (const v of values["https://www.w3.org/ns/activitystreams#startTime"] ?? []) {
3910
+ const _2w3Jmue4up8iVDUA51WZqomEF438__array = values["https://www.w3.org/ns/activitystreams#startTime"];
3911
+ for (const v of _2w3Jmue4up8iVDUA51WZqomEF438__array == null
3912
+ ? []
3913
+ : _2w3Jmue4up8iVDUA51WZqomEF438__array.length === 1 &&
3914
+ "@list" in _2w3Jmue4up8iVDUA51WZqomEF438__array[0]
3915
+ ? _2w3Jmue4up8iVDUA51WZqomEF438__array[0]["@list"]
3916
+ : _2w3Jmue4up8iVDUA51WZqomEF438__array) {
3823
3917
  if (v == null)
3824
3918
  continue;
3825
3919
  _2w3Jmue4up8iVDUA51WZqomEF438.push(dntShim.Temporal.Instant.from(v["@value"]));
3826
3920
  }
3827
3921
  instance.#_2w3Jmue4up8iVDUA51WZqomEF438 = _2w3Jmue4up8iVDUA51WZqomEF438;
3828
3922
  const _4LqirZspQbFWWQEbFcXAxm7tTDN1 = [];
3829
- for (const v of values["https://www.w3.org/ns/activitystreams#summary"] ?? []) {
3923
+ const _4LqirZspQbFWWQEbFcXAxm7tTDN1__array = values["https://www.w3.org/ns/activitystreams#summary"];
3924
+ for (const v of _4LqirZspQbFWWQEbFcXAxm7tTDN1__array == null
3925
+ ? []
3926
+ : _4LqirZspQbFWWQEbFcXAxm7tTDN1__array.length === 1 &&
3927
+ "@list" in _4LqirZspQbFWWQEbFcXAxm7tTDN1__array[0]
3928
+ ? _4LqirZspQbFWWQEbFcXAxm7tTDN1__array[0]["@list"]
3929
+ : _4LqirZspQbFWWQEbFcXAxm7tTDN1__array) {
3830
3930
  if (v == null)
3831
3931
  continue;
3832
3932
  const decoded = typeof v === "object" && "@value" in v &&
@@ -3843,7 +3943,13 @@ export class Object {
3843
3943
  }
3844
3944
  instance.#_4LqirZspQbFWWQEbFcXAxm7tTDN1 = _4LqirZspQbFWWQEbFcXAxm7tTDN1;
3845
3945
  const _5chuqj6s95p5gg2sk1HntGfarRf = [];
3846
- for (const v of values["https://www.w3.org/ns/activitystreams#tag"] ?? []) {
3946
+ const _5chuqj6s95p5gg2sk1HntGfarRf__array = values["https://www.w3.org/ns/activitystreams#tag"];
3947
+ for (const v of _5chuqj6s95p5gg2sk1HntGfarRf__array == null
3948
+ ? []
3949
+ : _5chuqj6s95p5gg2sk1HntGfarRf__array.length === 1 &&
3950
+ "@list" in _5chuqj6s95p5gg2sk1HntGfarRf__array[0]
3951
+ ? _5chuqj6s95p5gg2sk1HntGfarRf__array[0]["@list"]
3952
+ : _5chuqj6s95p5gg2sk1HntGfarRf__array) {
3847
3953
  if (v == null)
3848
3954
  continue;
3849
3955
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3914,14 +4020,26 @@ export class Object {
3914
4020
  }
3915
4021
  instance.#_5chuqj6s95p5gg2sk1HntGfarRf = _5chuqj6s95p5gg2sk1HntGfarRf;
3916
4022
  const _385aB7ySixcf5Un6z3VsWmThgCzQ = [];
3917
- for (const v of values["https://www.w3.org/ns/activitystreams#updated"] ?? []) {
4023
+ const _385aB7ySixcf5Un6z3VsWmThgCzQ__array = values["https://www.w3.org/ns/activitystreams#updated"];
4024
+ for (const v of _385aB7ySixcf5Un6z3VsWmThgCzQ__array == null
4025
+ ? []
4026
+ : _385aB7ySixcf5Un6z3VsWmThgCzQ__array.length === 1 &&
4027
+ "@list" in _385aB7ySixcf5Un6z3VsWmThgCzQ__array[0]
4028
+ ? _385aB7ySixcf5Un6z3VsWmThgCzQ__array[0]["@list"]
4029
+ : _385aB7ySixcf5Un6z3VsWmThgCzQ__array) {
3918
4030
  if (v == null)
3919
4031
  continue;
3920
4032
  _385aB7ySixcf5Un6z3VsWmThgCzQ.push(dntShim.Temporal.Instant.from(v["@value"]));
3921
4033
  }
3922
4034
  instance.#_385aB7ySixcf5Un6z3VsWmThgCzQ = _385aB7ySixcf5Un6z3VsWmThgCzQ;
3923
4035
  const _2oPEH9MQ3aj8JVwyYuWkqoVwV865 = [];
3924
- for (const v of values["https://www.w3.org/ns/activitystreams#url"] ?? []) {
4036
+ const _2oPEH9MQ3aj8JVwyYuWkqoVwV865__array = values["https://www.w3.org/ns/activitystreams#url"];
4037
+ for (const v of _2oPEH9MQ3aj8JVwyYuWkqoVwV865__array == null
4038
+ ? []
4039
+ : _2oPEH9MQ3aj8JVwyYuWkqoVwV865__array.length === 1 &&
4040
+ "@list" in _2oPEH9MQ3aj8JVwyYuWkqoVwV865__array[0]
4041
+ ? _2oPEH9MQ3aj8JVwyYuWkqoVwV865__array[0]["@list"]
4042
+ : _2oPEH9MQ3aj8JVwyYuWkqoVwV865__array) {
3925
4043
  if (v == null)
3926
4044
  continue;
3927
4045
  const decoded = typeof v === "object" && "@id" in v &&
@@ -3942,7 +4060,13 @@ export class Object {
3942
4060
  }
3943
4061
  instance.#_2oPEH9MQ3aj8JVwyYuWkqoVwV865 = _2oPEH9MQ3aj8JVwyYuWkqoVwV865;
3944
4062
  const _3hFbw7DTpHhq3cvVhkY8njhcsXbd = [];
3945
- for (const v of values["https://www.w3.org/ns/activitystreams#to"] ?? []) {
4063
+ const _3hFbw7DTpHhq3cvVhkY8njhcsXbd__array = values["https://www.w3.org/ns/activitystreams#to"];
4064
+ for (const v of _3hFbw7DTpHhq3cvVhkY8njhcsXbd__array == null
4065
+ ? []
4066
+ : _3hFbw7DTpHhq3cvVhkY8njhcsXbd__array.length === 1 &&
4067
+ "@list" in _3hFbw7DTpHhq3cvVhkY8njhcsXbd__array[0]
4068
+ ? _3hFbw7DTpHhq3cvVhkY8njhcsXbd__array[0]["@list"]
4069
+ : _3hFbw7DTpHhq3cvVhkY8njhcsXbd__array) {
3946
4070
  if (v == null)
3947
4071
  continue;
3948
4072
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3954,7 +4078,13 @@ export class Object {
3954
4078
  }
3955
4079
  instance.#_3hFbw7DTpHhq3cvVhkY8njhcsXbd = _3hFbw7DTpHhq3cvVhkY8njhcsXbd;
3956
4080
  const _aLZupjwL8XB7tzdLgCMXdjZ6qej = [];
3957
- for (const v of values["https://www.w3.org/ns/activitystreams#bto"] ?? []) {
4081
+ const _aLZupjwL8XB7tzdLgCMXdjZ6qej__array = values["https://www.w3.org/ns/activitystreams#bto"];
4082
+ for (const v of _aLZupjwL8XB7tzdLgCMXdjZ6qej__array == null
4083
+ ? []
4084
+ : _aLZupjwL8XB7tzdLgCMXdjZ6qej__array.length === 1 &&
4085
+ "@list" in _aLZupjwL8XB7tzdLgCMXdjZ6qej__array[0]
4086
+ ? _aLZupjwL8XB7tzdLgCMXdjZ6qej__array[0]["@list"]
4087
+ : _aLZupjwL8XB7tzdLgCMXdjZ6qej__array) {
3958
4088
  if (v == null)
3959
4089
  continue;
3960
4090
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3966,7 +4096,13 @@ export class Object {
3966
4096
  }
3967
4097
  instance.#_aLZupjwL8XB7tzdLgCMXdjZ6qej = _aLZupjwL8XB7tzdLgCMXdjZ6qej;
3968
4098
  const _42a1SvBs24QSLzKcfjCyNTjW5a1g = [];
3969
- for (const v of values["https://www.w3.org/ns/activitystreams#cc"] ?? []) {
4099
+ const _42a1SvBs24QSLzKcfjCyNTjW5a1g__array = values["https://www.w3.org/ns/activitystreams#cc"];
4100
+ for (const v of _42a1SvBs24QSLzKcfjCyNTjW5a1g__array == null
4101
+ ? []
4102
+ : _42a1SvBs24QSLzKcfjCyNTjW5a1g__array.length === 1 &&
4103
+ "@list" in _42a1SvBs24QSLzKcfjCyNTjW5a1g__array[0]
4104
+ ? _42a1SvBs24QSLzKcfjCyNTjW5a1g__array[0]["@list"]
4105
+ : _42a1SvBs24QSLzKcfjCyNTjW5a1g__array) {
3970
4106
  if (v == null)
3971
4107
  continue;
3972
4108
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3978,7 +4114,13 @@ export class Object {
3978
4114
  }
3979
4115
  instance.#_42a1SvBs24QSLzKcfjCyNTjW5a1g = _42a1SvBs24QSLzKcfjCyNTjW5a1g;
3980
4116
  const _3qvegKUB8YLgTXRpEf8E6JZSkz2H = [];
3981
- for (const v of values["https://www.w3.org/ns/activitystreams#bcc"] ?? []) {
4117
+ const _3qvegKUB8YLgTXRpEf8E6JZSkz2H__array = values["https://www.w3.org/ns/activitystreams#bcc"];
4118
+ for (const v of _3qvegKUB8YLgTXRpEf8E6JZSkz2H__array == null
4119
+ ? []
4120
+ : _3qvegKUB8YLgTXRpEf8E6JZSkz2H__array.length === 1 &&
4121
+ "@list" in _3qvegKUB8YLgTXRpEf8E6JZSkz2H__array[0]
4122
+ ? _3qvegKUB8YLgTXRpEf8E6JZSkz2H__array[0]["@list"]
4123
+ : _3qvegKUB8YLgTXRpEf8E6JZSkz2H__array) {
3982
4124
  if (v == null)
3983
4125
  continue;
3984
4126
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -3990,28 +4132,52 @@ export class Object {
3990
4132
  }
3991
4133
  instance.#_3qvegKUB8YLgTXRpEf8E6JZSkz2H = _3qvegKUB8YLgTXRpEf8E6JZSkz2H;
3992
4134
  const _3BLrzmscsjHCw8TF5BHRW9WkPnX8 = [];
3993
- for (const v of values["https://www.w3.org/ns/activitystreams#mediaType"] ?? []) {
4135
+ const _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array = values["https://www.w3.org/ns/activitystreams#mediaType"];
4136
+ for (const v of _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array == null
4137
+ ? []
4138
+ : _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array.length === 1 &&
4139
+ "@list" in _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array[0]
4140
+ ? _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array[0]["@list"]
4141
+ : _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array) {
3994
4142
  if (v == null)
3995
4143
  continue;
3996
4144
  _3BLrzmscsjHCw8TF5BHRW9WkPnX8.push(v["@value"]);
3997
4145
  }
3998
4146
  instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8 = _3BLrzmscsjHCw8TF5BHRW9WkPnX8;
3999
4147
  const _3bNvLMBN1bCJETiTihM3wvi1B2JX = [];
4000
- for (const v of values["https://www.w3.org/ns/activitystreams#duration"] ?? []) {
4148
+ const _3bNvLMBN1bCJETiTihM3wvi1B2JX__array = values["https://www.w3.org/ns/activitystreams#duration"];
4149
+ for (const v of _3bNvLMBN1bCJETiTihM3wvi1B2JX__array == null
4150
+ ? []
4151
+ : _3bNvLMBN1bCJETiTihM3wvi1B2JX__array.length === 1 &&
4152
+ "@list" in _3bNvLMBN1bCJETiTihM3wvi1B2JX__array[0]
4153
+ ? _3bNvLMBN1bCJETiTihM3wvi1B2JX__array[0]["@list"]
4154
+ : _3bNvLMBN1bCJETiTihM3wvi1B2JX__array) {
4001
4155
  if (v == null)
4002
4156
  continue;
4003
4157
  _3bNvLMBN1bCJETiTihM3wvi1B2JX.push(dntShim.Temporal.Duration.from(v["@value"]));
4004
4158
  }
4005
4159
  instance.#_3bNvLMBN1bCJETiTihM3wvi1B2JX = _3bNvLMBN1bCJETiTihM3wvi1B2JX;
4006
4160
  const _u8gdcDTtChQ4tbSQMXc4cYWyum7 = [];
4007
- for (const v of values["https://www.w3.org/ns/activitystreams#sensitive"] ?? []) {
4161
+ const _u8gdcDTtChQ4tbSQMXc4cYWyum7__array = values["https://www.w3.org/ns/activitystreams#sensitive"];
4162
+ for (const v of _u8gdcDTtChQ4tbSQMXc4cYWyum7__array == null
4163
+ ? []
4164
+ : _u8gdcDTtChQ4tbSQMXc4cYWyum7__array.length === 1 &&
4165
+ "@list" in _u8gdcDTtChQ4tbSQMXc4cYWyum7__array[0]
4166
+ ? _u8gdcDTtChQ4tbSQMXc4cYWyum7__array[0]["@list"]
4167
+ : _u8gdcDTtChQ4tbSQMXc4cYWyum7__array) {
4008
4168
  if (v == null)
4009
4169
  continue;
4010
4170
  _u8gdcDTtChQ4tbSQMXc4cYWyum7.push(v["@value"]);
4011
4171
  }
4012
4172
  instance.#_u8gdcDTtChQ4tbSQMXc4cYWyum7 = _u8gdcDTtChQ4tbSQMXc4cYWyum7;
4013
4173
  const _42rPnotok1ivQ2RNCKNbeFJgx8b8 = [];
4014
- for (const v of values["https://w3id.org/security#proof"] ?? []) {
4174
+ const _42rPnotok1ivQ2RNCKNbeFJgx8b8__array = values["https://w3id.org/security#proof"];
4175
+ for (const v of _42rPnotok1ivQ2RNCKNbeFJgx8b8__array == null
4176
+ ? []
4177
+ : _42rPnotok1ivQ2RNCKNbeFJgx8b8__array.length === 1 &&
4178
+ "@list" in _42rPnotok1ivQ2RNCKNbeFJgx8b8__array[0]
4179
+ ? _42rPnotok1ivQ2RNCKNbeFJgx8b8__array[0]["@list"]
4180
+ : _42rPnotok1ivQ2RNCKNbeFJgx8b8__array) {
4015
4181
  if (v == null)
4016
4182
  continue;
4017
4183
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -4739,7 +4905,13 @@ export class PropertyValue {
4739
4905
  }
4740
4906
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : undefined }, options);
4741
4907
  const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav = [];
4742
- for (const v of values["https://www.w3.org/ns/activitystreams#name"] ?? []) {
4908
+ const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array = values["https://www.w3.org/ns/activitystreams#name"];
4909
+ for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array == null
4910
+ ? []
4911
+ : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array.length === 1 &&
4912
+ "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array[0]
4913
+ ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array[0]["@list"]
4914
+ : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array) {
4743
4915
  if (v == null)
4744
4916
  continue;
4745
4917
  const decoded = typeof v === "object" && "@value" in v &&
@@ -4756,7 +4928,13 @@ export class PropertyValue {
4756
4928
  }
4757
4929
  instance.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav = _4ZHbBuK7PrsvGgrjM8wgc6KMWjav;
4758
4930
  const _2cSy2magg4iZ7zLaG8U7DiJMoCkx = [];
4759
- for (const v of values["http://schema.org#value"] ?? []) {
4931
+ const _2cSy2magg4iZ7zLaG8U7DiJMoCkx__array = values["http://schema.org#value"];
4932
+ for (const v of _2cSy2magg4iZ7zLaG8U7DiJMoCkx__array == null
4933
+ ? []
4934
+ : _2cSy2magg4iZ7zLaG8U7DiJMoCkx__array.length === 1 &&
4935
+ "@list" in _2cSy2magg4iZ7zLaG8U7DiJMoCkx__array[0]
4936
+ ? _2cSy2magg4iZ7zLaG8U7DiJMoCkx__array[0]["@list"]
4937
+ : _2cSy2magg4iZ7zLaG8U7DiJMoCkx__array) {
4760
4938
  if (v == null)
4761
4939
  continue;
4762
4940
  const decoded = typeof v === "object" && "@value" in v &&
@@ -5182,14 +5360,26 @@ export class DataIntegrityProof {
5182
5360
  }
5183
5361
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : undefined }, options);
5184
5362
  const _3RurJsa7tnptyqMFR5hDGcP9pMs5 = [];
5185
- for (const v of values["https://w3id.org/security#cryptosuite"] ?? []) {
5363
+ const _3RurJsa7tnptyqMFR5hDGcP9pMs5__array = values["https://w3id.org/security#cryptosuite"];
5364
+ for (const v of _3RurJsa7tnptyqMFR5hDGcP9pMs5__array == null
5365
+ ? []
5366
+ : _3RurJsa7tnptyqMFR5hDGcP9pMs5__array.length === 1 &&
5367
+ "@list" in _3RurJsa7tnptyqMFR5hDGcP9pMs5__array[0]
5368
+ ? _3RurJsa7tnptyqMFR5hDGcP9pMs5__array[0]["@list"]
5369
+ : _3RurJsa7tnptyqMFR5hDGcP9pMs5__array) {
5186
5370
  if (v == null)
5187
5371
  continue;
5188
5372
  _3RurJsa7tnptyqMFR5hDGcP9pMs5.push(v["@value"]);
5189
5373
  }
5190
5374
  instance.#_3RurJsa7tnptyqMFR5hDGcP9pMs5 = _3RurJsa7tnptyqMFR5hDGcP9pMs5;
5191
5375
  const _2mHVKxqA7zncjveJrDEo3pWpMZqg = [];
5192
- for (const v of values["https://w3id.org/security#verificationMethod"] ?? []) {
5376
+ const _2mHVKxqA7zncjveJrDEo3pWpMZqg__array = values["https://w3id.org/security#verificationMethod"];
5377
+ for (const v of _2mHVKxqA7zncjveJrDEo3pWpMZqg__array == null
5378
+ ? []
5379
+ : _2mHVKxqA7zncjveJrDEo3pWpMZqg__array.length === 1 &&
5380
+ "@list" in _2mHVKxqA7zncjveJrDEo3pWpMZqg__array[0]
5381
+ ? _2mHVKxqA7zncjveJrDEo3pWpMZqg__array[0]["@list"]
5382
+ : _2mHVKxqA7zncjveJrDEo3pWpMZqg__array) {
5193
5383
  if (v == null)
5194
5384
  continue;
5195
5385
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -5201,21 +5391,39 @@ export class DataIntegrityProof {
5201
5391
  }
5202
5392
  instance.#_2mHVKxqA7zncjveJrDEo3pWpMZqg = _2mHVKxqA7zncjveJrDEo3pWpMZqg;
5203
5393
  const _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb = [];
5204
- for (const v of values["https://w3id.org/security#proofPurpose"] ?? []) {
5394
+ const _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb__array = values["https://w3id.org/security#proofPurpose"];
5395
+ for (const v of _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb__array == null
5396
+ ? []
5397
+ : _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb__array.length === 1 &&
5398
+ "@list" in _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb__array[0]
5399
+ ? _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb__array[0]["@list"]
5400
+ : _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb__array) {
5205
5401
  if (v == null)
5206
5402
  continue;
5207
5403
  _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb.push(v["@id"].substring(26));
5208
5404
  }
5209
5405
  instance.#_2AeEnPcAvVrPEuKbpmn9ZKNmWHKb = _2AeEnPcAvVrPEuKbpmn9ZKNmWHKb;
5210
5406
  const _3CjFK5vfKpX4HQuNh2b18TykoVLq = [];
5211
- for (const v of values["https://w3id.org/security#proofValue"] ?? []) {
5407
+ const _3CjFK5vfKpX4HQuNh2b18TykoVLq__array = values["https://w3id.org/security#proofValue"];
5408
+ for (const v of _3CjFK5vfKpX4HQuNh2b18TykoVLq__array == null
5409
+ ? []
5410
+ : _3CjFK5vfKpX4HQuNh2b18TykoVLq__array.length === 1 &&
5411
+ "@list" in _3CjFK5vfKpX4HQuNh2b18TykoVLq__array[0]
5412
+ ? _3CjFK5vfKpX4HQuNh2b18TykoVLq__array[0]["@list"]
5413
+ : _3CjFK5vfKpX4HQuNh2b18TykoVLq__array) {
5212
5414
  if (v == null)
5213
5415
  continue;
5214
5416
  _3CjFK5vfKpX4HQuNh2b18TykoVLq.push(decodeMultibase(v["@value"]));
5215
5417
  }
5216
5418
  instance.#_3CjFK5vfKpX4HQuNh2b18TykoVLq = _3CjFK5vfKpX4HQuNh2b18TykoVLq;
5217
5419
  const _3qzP3ukEZoUziK5FEiA1RhU4aqac = [];
5218
- for (const v of values["http://purl.org/dc/terms/created"] ?? []) {
5420
+ const _3qzP3ukEZoUziK5FEiA1RhU4aqac__array = values["http://purl.org/dc/terms/created"];
5421
+ for (const v of _3qzP3ukEZoUziK5FEiA1RhU4aqac__array == null
5422
+ ? []
5423
+ : _3qzP3ukEZoUziK5FEiA1RhU4aqac__array.length === 1 &&
5424
+ "@list" in _3qzP3ukEZoUziK5FEiA1RhU4aqac__array[0]
5425
+ ? _3qzP3ukEZoUziK5FEiA1RhU4aqac__array[0]["@list"]
5426
+ : _3qzP3ukEZoUziK5FEiA1RhU4aqac__array) {
5219
5427
  if (v == null)
5220
5428
  continue;
5221
5429
  _3qzP3ukEZoUziK5FEiA1RhU4aqac.push(dntShim.Temporal.Instant.from(v["@value"]));
@@ -5577,7 +5785,13 @@ export class CryptographicKey {
5577
5785
  }
5578
5786
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : undefined }, options);
5579
5787
  const _5UJq9NDh3ZHgswFwwdVxQvJxdx2 = [];
5580
- for (const v of values["https://w3id.org/security#owner"] ?? []) {
5788
+ const _5UJq9NDh3ZHgswFwwdVxQvJxdx2__array = values["https://w3id.org/security#owner"];
5789
+ for (const v of _5UJq9NDh3ZHgswFwwdVxQvJxdx2__array == null
5790
+ ? []
5791
+ : _5UJq9NDh3ZHgswFwwdVxQvJxdx2__array.length === 1 &&
5792
+ "@list" in _5UJq9NDh3ZHgswFwwdVxQvJxdx2__array[0]
5793
+ ? _5UJq9NDh3ZHgswFwwdVxQvJxdx2__array[0]["@list"]
5794
+ : _5UJq9NDh3ZHgswFwwdVxQvJxdx2__array) {
5581
5795
  if (v == null)
5582
5796
  continue;
5583
5797
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -5612,7 +5826,13 @@ export class CryptographicKey {
5612
5826
  }
5613
5827
  instance.#_5UJq9NDh3ZHgswFwwdVxQvJxdx2 = _5UJq9NDh3ZHgswFwwdVxQvJxdx2;
5614
5828
  const _2fE2QMDdg6KFGqa4NEC3TmjApSAD = [];
5615
- for (const v of values["https://w3id.org/security#publicKeyPem"] ?? []) {
5829
+ const _2fE2QMDdg6KFGqa4NEC3TmjApSAD__array = values["https://w3id.org/security#publicKeyPem"];
5830
+ for (const v of _2fE2QMDdg6KFGqa4NEC3TmjApSAD__array == null
5831
+ ? []
5832
+ : _2fE2QMDdg6KFGqa4NEC3TmjApSAD__array.length === 1 &&
5833
+ "@list" in _2fE2QMDdg6KFGqa4NEC3TmjApSAD__array[0]
5834
+ ? _2fE2QMDdg6KFGqa4NEC3TmjApSAD__array[0]["@list"]
5835
+ : _2fE2QMDdg6KFGqa4NEC3TmjApSAD__array) {
5616
5836
  if (v == null)
5617
5837
  continue;
5618
5838
  _2fE2QMDdg6KFGqa4NEC3TmjApSAD.push(await importSpki(v["@value"]));
@@ -5952,7 +6172,13 @@ export class Multikey {
5952
6172
  }
5953
6173
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : undefined }, options);
5954
6174
  const _2yr3eUBTP6cNcyaxKzAXWjFsnGzN = [];
5955
- for (const v of values["https://w3id.org/security#controller"] ?? []) {
6175
+ const _2yr3eUBTP6cNcyaxKzAXWjFsnGzN__array = values["https://w3id.org/security#controller"];
6176
+ for (const v of _2yr3eUBTP6cNcyaxKzAXWjFsnGzN__array == null
6177
+ ? []
6178
+ : _2yr3eUBTP6cNcyaxKzAXWjFsnGzN__array.length === 1 &&
6179
+ "@list" in _2yr3eUBTP6cNcyaxKzAXWjFsnGzN__array[0]
6180
+ ? _2yr3eUBTP6cNcyaxKzAXWjFsnGzN__array[0]["@list"]
6181
+ : _2yr3eUBTP6cNcyaxKzAXWjFsnGzN__array) {
5956
6182
  if (v == null)
5957
6183
  continue;
5958
6184
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -5987,7 +6213,13 @@ export class Multikey {
5987
6213
  }
5988
6214
  instance.#_2yr3eUBTP6cNcyaxKzAXWjFsnGzN = _2yr3eUBTP6cNcyaxKzAXWjFsnGzN;
5989
6215
  const _4XLHbsR2gLVWU3NpEqKt9wANzn4F = [];
5990
- for (const v of values["https://w3id.org/security#publicKeyMultibase"] ?? []) {
6216
+ const _4XLHbsR2gLVWU3NpEqKt9wANzn4F__array = values["https://w3id.org/security#publicKeyMultibase"];
6217
+ for (const v of _4XLHbsR2gLVWU3NpEqKt9wANzn4F__array == null
6218
+ ? []
6219
+ : _4XLHbsR2gLVWU3NpEqKt9wANzn4F__array.length === 1 &&
6220
+ "@list" in _4XLHbsR2gLVWU3NpEqKt9wANzn4F__array[0]
6221
+ ? _4XLHbsR2gLVWU3NpEqKt9wANzn4F__array[0]["@list"]
6222
+ : _4XLHbsR2gLVWU3NpEqKt9wANzn4F__array) {
5991
6223
  if (v == null)
5992
6224
  continue;
5993
6225
  _4XLHbsR2gLVWU3NpEqKt9wANzn4F.push(await importMultibaseKey(v["@value"]));
@@ -7159,7 +7391,13 @@ export class Activity extends Object {
7159
7391
  throw new TypeError("Unexpected type: " + instance.constructor.name);
7160
7392
  }
7161
7393
  const _2DjTTboo3CNHU2a2JQqUSE2dbv9D = [];
7162
- for (const v of values["https://www.w3.org/ns/activitystreams#actor"] ?? []) {
7394
+ const _2DjTTboo3CNHU2a2JQqUSE2dbv9D__array = values["https://www.w3.org/ns/activitystreams#actor"];
7395
+ for (const v of _2DjTTboo3CNHU2a2JQqUSE2dbv9D__array == null
7396
+ ? []
7397
+ : _2DjTTboo3CNHU2a2JQqUSE2dbv9D__array.length === 1 &&
7398
+ "@list" in _2DjTTboo3CNHU2a2JQqUSE2dbv9D__array[0]
7399
+ ? _2DjTTboo3CNHU2a2JQqUSE2dbv9D__array[0]["@list"]
7400
+ : _2DjTTboo3CNHU2a2JQqUSE2dbv9D__array) {
7163
7401
  if (v == null)
7164
7402
  continue;
7165
7403
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -7194,7 +7432,13 @@ export class Activity extends Object {
7194
7432
  }
7195
7433
  instance.#_2DjTTboo3CNHU2a2JQqUSE2dbv9D = _2DjTTboo3CNHU2a2JQqUSE2dbv9D;
7196
7434
  const _2MH19yxjn1wnHsNfa5n4JBhJzxyc = [];
7197
- for (const v of values["https://www.w3.org/ns/activitystreams#object"] ?? []) {
7435
+ const _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array = values["https://www.w3.org/ns/activitystreams#object"];
7436
+ for (const v of _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array == null
7437
+ ? []
7438
+ : _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array.length === 1 &&
7439
+ "@list" in _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array[0]
7440
+ ? _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array[0]["@list"]
7441
+ : _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array) {
7198
7442
  if (v == null)
7199
7443
  continue;
7200
7444
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -7206,7 +7450,13 @@ export class Activity extends Object {
7206
7450
  }
7207
7451
  instance.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc = _2MH19yxjn1wnHsNfa5n4JBhJzxyc;
7208
7452
  const _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF = [];
7209
- for (const v of values["https://www.w3.org/ns/activitystreams#target"] ?? []) {
7453
+ const _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF__array = values["https://www.w3.org/ns/activitystreams#target"];
7454
+ for (const v of _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF__array == null
7455
+ ? []
7456
+ : _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF__array.length === 1 &&
7457
+ "@list" in _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF__array[0]
7458
+ ? _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF__array[0]["@list"]
7459
+ : _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF__array) {
7210
7460
  if (v == null)
7211
7461
  continue;
7212
7462
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -7218,7 +7468,13 @@ export class Activity extends Object {
7218
7468
  }
7219
7469
  instance.#_3JQCmF2Ww56Ag9EWRYoSZRDNCYtF = _3JQCmF2Ww56Ag9EWRYoSZRDNCYtF;
7220
7470
  const _u4QGFbRFcYmPEKGbPv1hpBR9r5G = [];
7221
- for (const v of values["https://www.w3.org/ns/activitystreams#result"] ?? []) {
7471
+ const _u4QGFbRFcYmPEKGbPv1hpBR9r5G__array = values["https://www.w3.org/ns/activitystreams#result"];
7472
+ for (const v of _u4QGFbRFcYmPEKGbPv1hpBR9r5G__array == null
7473
+ ? []
7474
+ : _u4QGFbRFcYmPEKGbPv1hpBR9r5G__array.length === 1 &&
7475
+ "@list" in _u4QGFbRFcYmPEKGbPv1hpBR9r5G__array[0]
7476
+ ? _u4QGFbRFcYmPEKGbPv1hpBR9r5G__array[0]["@list"]
7477
+ : _u4QGFbRFcYmPEKGbPv1hpBR9r5G__array) {
7222
7478
  if (v == null)
7223
7479
  continue;
7224
7480
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -7230,7 +7486,13 @@ export class Activity extends Object {
7230
7486
  }
7231
7487
  instance.#_u4QGFbRFcYmPEKGbPv1hpBR9r5G = _u4QGFbRFcYmPEKGbPv1hpBR9r5G;
7232
7488
  const _25zu2s3VxVujgEKqrDycjE284XQR = [];
7233
- for (const v of values["https://www.w3.org/ns/activitystreams#origin"] ?? []) {
7489
+ const _25zu2s3VxVujgEKqrDycjE284XQR__array = values["https://www.w3.org/ns/activitystreams#origin"];
7490
+ for (const v of _25zu2s3VxVujgEKqrDycjE284XQR__array == null
7491
+ ? []
7492
+ : _25zu2s3VxVujgEKqrDycjE284XQR__array.length === 1 &&
7493
+ "@list" in _25zu2s3VxVujgEKqrDycjE284XQR__array[0]
7494
+ ? _25zu2s3VxVujgEKqrDycjE284XQR__array[0]["@list"]
7495
+ : _25zu2s3VxVujgEKqrDycjE284XQR__array) {
7234
7496
  if (v == null)
7235
7497
  continue;
7236
7498
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -7242,8 +7504,13 @@ export class Activity extends Object {
7242
7504
  }
7243
7505
  instance.#_25zu2s3VxVujgEKqrDycjE284XQR = _25zu2s3VxVujgEKqrDycjE284XQR;
7244
7506
  const _3c5t2x7DYRo2shwTxpkd4kYSS5WQ = [];
7245
- for (const v of values["https://www.w3.org/ns/activitystreams#instrument"] ??
7246
- []) {
7507
+ const _3c5t2x7DYRo2shwTxpkd4kYSS5WQ__array = values["https://www.w3.org/ns/activitystreams#instrument"];
7508
+ for (const v of _3c5t2x7DYRo2shwTxpkd4kYSS5WQ__array == null
7509
+ ? []
7510
+ : _3c5t2x7DYRo2shwTxpkd4kYSS5WQ__array.length === 1 &&
7511
+ "@list" in _3c5t2x7DYRo2shwTxpkd4kYSS5WQ__array[0]
7512
+ ? _3c5t2x7DYRo2shwTxpkd4kYSS5WQ__array[0]["@list"]
7513
+ : _3c5t2x7DYRo2shwTxpkd4kYSS5WQ__array) {
7247
7514
  if (v == null)
7248
7515
  continue;
7249
7516
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -7727,6 +7994,7 @@ export class Application extends Object {
7727
7994
  #_BBCTgfphhsFzpVfKTykGSpBNwoA = [];
7728
7995
  #_3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
7729
7996
  #_4N1vBJzXDf8NbBumeECQMFvKetja = [];
7997
+ #_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
7730
7998
  #_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
7731
7999
  #_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
7732
8000
  #_gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
@@ -7895,6 +8163,17 @@ export class Application extends Object {
7895
8163
  "Collection | URL" + ".");
7896
8164
  }
7897
8165
  }
8166
+ if ("featuredTags" in values && values.featuredTags != null) {
8167
+ if (values.featuredTags instanceof Collection ||
8168
+ values.featuredTags instanceof URL) {
8169
+ // @ts-ignore: type is checked above.
8170
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
8171
+ }
8172
+ else {
8173
+ throw new TypeError("The featuredTags must be of type " +
8174
+ "Collection | URL" + ".");
8175
+ }
8176
+ }
7898
8177
  if ("streams" in values && values.streams != null) {
7899
8178
  if (Array.isArray(values.streams) &&
7900
8179
  values.streams.every((v) => v instanceof Collection || v instanceof URL)) {
@@ -8132,6 +8411,18 @@ export class Application extends Object {
8132
8411
  "Collection | URL" + ".");
8133
8412
  }
8134
8413
  }
8414
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac;
8415
+ if ("featuredTags" in values && values.featuredTags != null) {
8416
+ if (values.featuredTags instanceof Collection ||
8417
+ values.featuredTags instanceof URL) {
8418
+ // @ts-ignore: type is checked above.
8419
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
8420
+ }
8421
+ else {
8422
+ throw new TypeError("The featuredTags must be of type " +
8423
+ "Collection | URL" + ".");
8424
+ }
8425
+ }
8135
8426
  clone.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
8136
8427
  if ("streams" in values && values.streams != null) {
8137
8428
  if (Array.isArray(values.streams) &&
@@ -8763,6 +9054,64 @@ export class Application extends Object {
8763
9054
  }
8764
9055
  return v;
8765
9056
  }
9057
+ async #fetchFeaturedTags(url, options = {}) {
9058
+ const documentLoader = options.documentLoader ?? this._documentLoader ??
9059
+ fetchDocumentLoader;
9060
+ const contextLoader = options.contextLoader ?? this._contextLoader ??
9061
+ fetchDocumentLoader;
9062
+ let fetchResult;
9063
+ try {
9064
+ fetchResult = await documentLoader(url.href);
9065
+ }
9066
+ catch (error) {
9067
+ if (options.suppressError) {
9068
+ getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
9069
+ return null;
9070
+ }
9071
+ throw error;
9072
+ }
9073
+ const { document } = fetchResult;
9074
+ try {
9075
+ return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
9076
+ }
9077
+ catch (e) {
9078
+ if (!(e instanceof TypeError))
9079
+ throw e;
9080
+ }
9081
+ throw new TypeError("Expected an object of any type of: " +
9082
+ ["https://www.w3.org/ns/activitystreams#Collection"].join(", "));
9083
+ }
9084
+ /**
9085
+ * Similar to
9086
+ * {@link Application.getFeaturedTags},
9087
+ * but returns its `@id` URL instead of the object itself.
9088
+ */
9089
+ get featuredTagsId() {
9090
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
9091
+ return null;
9092
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
9093
+ if (v instanceof URL)
9094
+ return v;
9095
+ return v.id;
9096
+ }
9097
+ /** What is known in Mastodon as "featured hashtags", hashtags that are featured
9098
+ * at people's profiles, is implemented using an extra property `featuredTags`
9099
+ * on the actor object that points to a {@link Collection} of {@link Hashtag}
9100
+ * objects specifically.
9101
+ */
9102
+ async getFeaturedTags(options = {}) {
9103
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
9104
+ return null;
9105
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
9106
+ if (v instanceof URL) {
9107
+ const fetched = await this.#fetchFeaturedTags(v, options);
9108
+ if (fetched == null)
9109
+ return null;
9110
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0] = fetched;
9111
+ return fetched;
9112
+ }
9113
+ return v;
9114
+ }
8766
9115
  async #fetchStream(url, options = {}) {
8767
9116
  const documentLoader = options.documentLoader ?? this._documentLoader ??
8768
9117
  fetchDocumentLoader;
@@ -8973,6 +9322,16 @@ export class Application extends Object {
8973
9322
  values["http://joinmastodon.org/ns#featured"] = array;
8974
9323
  }
8975
9324
  array = [];
9325
+ for (const v of this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac) {
9326
+ const element = v instanceof URL
9327
+ ? { "@id": v.href }
9328
+ : await v.toJsonLd(options);
9329
+ array.push(element);
9330
+ }
9331
+ if (array.length > 0) {
9332
+ values["http://joinmastodon.org/ns#featuredTags"] = array;
9333
+ }
9334
+ array = [];
8976
9335
  for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
8977
9336
  const element = v instanceof URL
8978
9337
  ? { "@id": v.href }
@@ -9039,6 +9398,7 @@ export class Application extends Object {
9039
9398
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
9040
9399
  "toot": "http://joinmastodon.org/ns#",
9041
9400
  "featured": { "@id": "toot:featured", "@type": "@id" },
9401
+ "featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
9042
9402
  "discoverable": "toot:discoverable",
9043
9403
  "suspended": "toot:suspended",
9044
9404
  "memorial": "toot:memorial",
@@ -9090,8 +9450,13 @@ export class Application extends Object {
9090
9450
  throw new TypeError("Unexpected type: " + instance.constructor.name);
9091
9451
  }
9092
9452
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf = [];
9093
- for (const v of values["https://www.w3.org/ns/activitystreams#preferredUsername"] ??
9094
- []) {
9453
+ const _3isuDgRAKSntq9XdbjiNxjwyPZAf__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
9454
+ for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf__array == null
9455
+ ? []
9456
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array.length === 1 &&
9457
+ "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]
9458
+ ? _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]["@list"]
9459
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array) {
9095
9460
  if (v == null)
9096
9461
  continue;
9097
9462
  const decoded = typeof v === "object" && "@value" in v &&
@@ -9108,7 +9473,13 @@ export class Application extends Object {
9108
9473
  }
9109
9474
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf = _3isuDgRAKSntq9XdbjiNxjwyPZAf;
9110
9475
  const _axq166E2eZADq34V4MYUc8KMZdC = [];
9111
- for (const v of values["https://w3id.org/security#publicKey"] ?? []) {
9476
+ const _axq166E2eZADq34V4MYUc8KMZdC__array = values["https://w3id.org/security#publicKey"];
9477
+ for (const v of _axq166E2eZADq34V4MYUc8KMZdC__array == null
9478
+ ? []
9479
+ : _axq166E2eZADq34V4MYUc8KMZdC__array.length === 1 &&
9480
+ "@list" in _axq166E2eZADq34V4MYUc8KMZdC__array[0]
9481
+ ? _axq166E2eZADq34V4MYUc8KMZdC__array[0]["@list"]
9482
+ : _axq166E2eZADq34V4MYUc8KMZdC__array) {
9112
9483
  if (v == null)
9113
9484
  continue;
9114
9485
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9120,7 +9491,13 @@ export class Application extends Object {
9120
9491
  }
9121
9492
  instance.#_axq166E2eZADq34V4MYUc8KMZdC = _axq166E2eZADq34V4MYUc8KMZdC;
9122
9493
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3 = [];
9123
- for (const v of values["https://w3id.org/security#assertionMethod"] ?? []) {
9494
+ const _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array = values["https://w3id.org/security#assertionMethod"];
9495
+ for (const v of _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array == null
9496
+ ? []
9497
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array.length === 1 &&
9498
+ "@list" in _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]
9499
+ ? _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]["@list"]
9500
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array) {
9124
9501
  if (v == null)
9125
9502
  continue;
9126
9503
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9132,14 +9509,26 @@ export class Application extends Object {
9132
9509
  }
9133
9510
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3 = _4EHQFWZSz1k1d4LmPrQiMba2GbP3;
9134
9511
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA = [];
9135
- for (const v of values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] ?? []) {
9512
+ const _36QNc9MxfkKf6h8sEUQSHnV9NZA__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
9513
+ for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA__array == null
9514
+ ? []
9515
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array.length === 1 &&
9516
+ "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]
9517
+ ? _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]["@list"]
9518
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array) {
9136
9519
  if (v == null)
9137
9520
  continue;
9138
9521
  _36QNc9MxfkKf6h8sEUQSHnV9NZA.push(v["@value"]);
9139
9522
  }
9140
9523
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA = _36QNc9MxfkKf6h8sEUQSHnV9NZA;
9141
9524
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB = [];
9142
- for (const v of values["http://www.w3.org/ns/ldp#inbox"] ?? []) {
9525
+ const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array = values["http://www.w3.org/ns/ldp#inbox"];
9526
+ for (const v of _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array == null
9527
+ ? []
9528
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array.length === 1 &&
9529
+ "@list" in _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]
9530
+ ? _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]["@list"]
9531
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array) {
9143
9532
  if (v == null)
9144
9533
  continue;
9145
9534
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9151,7 +9540,13 @@ export class Application extends Object {
9151
9540
  }
9152
9541
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB;
9153
9542
  const _41QwhqJouoLg3h8dRPKat21brynC = [];
9154
- for (const v of values["https://www.w3.org/ns/activitystreams#outbox"] ?? []) {
9543
+ const _41QwhqJouoLg3h8dRPKat21brynC__array = values["https://www.w3.org/ns/activitystreams#outbox"];
9544
+ for (const v of _41QwhqJouoLg3h8dRPKat21brynC__array == null
9545
+ ? []
9546
+ : _41QwhqJouoLg3h8dRPKat21brynC__array.length === 1 &&
9547
+ "@list" in _41QwhqJouoLg3h8dRPKat21brynC__array[0]
9548
+ ? _41QwhqJouoLg3h8dRPKat21brynC__array[0]["@list"]
9549
+ : _41QwhqJouoLg3h8dRPKat21brynC__array) {
9155
9550
  if (v == null)
9156
9551
  continue;
9157
9552
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9163,7 +9558,13 @@ export class Application extends Object {
9163
9558
  }
9164
9559
  instance.#_41QwhqJouoLg3h8dRPKat21brynC = _41QwhqJouoLg3h8dRPKat21brynC;
9165
9560
  const _3yAv8jymNfNuJUDuBzJ1NQhdbAee = [];
9166
- for (const v of values["https://www.w3.org/ns/activitystreams#following"] ?? []) {
9561
+ const _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array = values["https://www.w3.org/ns/activitystreams#following"];
9562
+ for (const v of _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array == null
9563
+ ? []
9564
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array.length === 1 &&
9565
+ "@list" in _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]
9566
+ ? _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]["@list"]
9567
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array) {
9167
9568
  if (v == null)
9168
9569
  continue;
9169
9570
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9175,7 +9576,13 @@ export class Application extends Object {
9175
9576
  }
9176
9577
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee = _3yAv8jymNfNuJUDuBzJ1NQhdbAee;
9177
9578
  const _BBCTgfphhsFzpVfKTykGSpBNwoA = [];
9178
- for (const v of values["https://www.w3.org/ns/activitystreams#followers"] ?? []) {
9579
+ const _BBCTgfphhsFzpVfKTykGSpBNwoA__array = values["https://www.w3.org/ns/activitystreams#followers"];
9580
+ for (const v of _BBCTgfphhsFzpVfKTykGSpBNwoA__array == null
9581
+ ? []
9582
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array.length === 1 &&
9583
+ "@list" in _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]
9584
+ ? _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]["@list"]
9585
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array) {
9179
9586
  if (v == null)
9180
9587
  continue;
9181
9588
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9187,7 +9594,13 @@ export class Application extends Object {
9187
9594
  }
9188
9595
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA = _BBCTgfphhsFzpVfKTykGSpBNwoA;
9189
9596
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
9190
- for (const v of values["https://www.w3.org/ns/activitystreams#liked"] ?? []) {
9597
+ const _3bgkPwJanyTCoVFM9ovRcus8tKkU__array = values["https://www.w3.org/ns/activitystreams#liked"];
9598
+ for (const v of _3bgkPwJanyTCoVFM9ovRcus8tKkU__array == null
9599
+ ? []
9600
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array.length === 1 &&
9601
+ "@list" in _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]
9602
+ ? _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]["@list"]
9603
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array) {
9191
9604
  if (v == null)
9192
9605
  continue;
9193
9606
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9199,7 +9612,13 @@ export class Application extends Object {
9199
9612
  }
9200
9613
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU = _3bgkPwJanyTCoVFM9ovRcus8tKkU;
9201
9614
  const _4N1vBJzXDf8NbBumeECQMFvKetja = [];
9202
- for (const v of values["http://joinmastodon.org/ns#featured"] ?? []) {
9615
+ const _4N1vBJzXDf8NbBumeECQMFvKetja__array = values["http://joinmastodon.org/ns#featured"];
9616
+ for (const v of _4N1vBJzXDf8NbBumeECQMFvKetja__array == null
9617
+ ? []
9618
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array.length === 1 &&
9619
+ "@list" in _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]
9620
+ ? _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]["@list"]
9621
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array) {
9203
9622
  if (v == null)
9204
9623
  continue;
9205
9624
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9210,8 +9629,32 @@ export class Application extends Object {
9210
9629
  _4N1vBJzXDf8NbBumeECQMFvKetja.push(await Collection.fromJsonLd(v, options));
9211
9630
  }
9212
9631
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja = _4N1vBJzXDf8NbBumeECQMFvKetja;
9632
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
9633
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array = values["http://joinmastodon.org/ns#featuredTags"];
9634
+ for (const v of _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array == null
9635
+ ? []
9636
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array.length === 1 &&
9637
+ "@list" in _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]
9638
+ ? _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]["@list"]
9639
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array) {
9640
+ if (v == null)
9641
+ continue;
9642
+ if (typeof v === "object" && "@id" in v && !("@type" in v) &&
9643
+ globalThis.Object.keys(v).length === 1) {
9644
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(new URL(v["@id"]));
9645
+ continue;
9646
+ }
9647
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(await Collection.fromJsonLd(v, options));
9648
+ }
9649
+ instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = _2MxnRRLq9iPzx5CFq2NPrXdUDCac;
9213
9650
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
9214
- for (const v of values["https://www.w3.org/ns/activitystreams#streams"] ?? []) {
9651
+ const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array = values["https://www.w3.org/ns/activitystreams#streams"];
9652
+ for (const v of _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array == null
9653
+ ? []
9654
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array.length === 1 &&
9655
+ "@list" in _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]
9656
+ ? _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]["@list"]
9657
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array) {
9215
9658
  if (v == null)
9216
9659
  continue;
9217
9660
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -9223,35 +9666,65 @@ export class Application extends Object {
9223
9666
  }
9224
9667
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
9225
9668
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
9226
- for (const v of values["https://www.w3.org/ns/activitystreams#endpoints"] ?? []) {
9669
+ const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
9670
+ for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array == null
9671
+ ? []
9672
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array.length === 1 &&
9673
+ "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]
9674
+ ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]["@list"]
9675
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array) {
9227
9676
  if (v == null)
9228
9677
  continue;
9229
9678
  _sEoQwUbfk4hEfugzNQ2ZiDcLMkG.push(await Endpoints.fromJsonLd(v, options));
9230
9679
  }
9231
9680
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG;
9232
9681
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
9233
- for (const v of values["http://joinmastodon.org/ns#discoverable"] ?? []) {
9682
+ const _gAJzg1QDc4rcefFsUzGSYmyXvNH__array = values["http://joinmastodon.org/ns#discoverable"];
9683
+ for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH__array == null
9684
+ ? []
9685
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array.length === 1 &&
9686
+ "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]
9687
+ ? _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]["@list"]
9688
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array) {
9234
9689
  if (v == null)
9235
9690
  continue;
9236
9691
  _gAJzg1QDc4rcefFsUzGSYmyXvNH.push(v["@value"]);
9237
9692
  }
9238
9693
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH = _gAJzg1QDc4rcefFsUzGSYmyXvNH;
9239
9694
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7 = [];
9240
- for (const v of values["http://joinmastodon.org/ns#suspended"] ?? []) {
9695
+ const _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array = values["http://joinmastodon.org/ns#suspended"];
9696
+ for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array == null
9697
+ ? []
9698
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array.length === 1 &&
9699
+ "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]
9700
+ ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]["@list"]
9701
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array) {
9241
9702
  if (v == null)
9242
9703
  continue;
9243
9704
  _2kGKkJtoFWg8c18PaVSqj9NKP4t7.push(v["@value"]);
9244
9705
  }
9245
9706
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7 = _2kGKkJtoFWg8c18PaVSqj9NKP4t7;
9246
9707
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ = [];
9247
- for (const v of values["http://joinmastodon.org/ns#memorial"] ?? []) {
9708
+ const _79S8K4f5J9MWUgCxziRyUe6PTHZ__array = values["http://joinmastodon.org/ns#memorial"];
9709
+ for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ__array == null
9710
+ ? []
9711
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array.length === 1 &&
9712
+ "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]
9713
+ ? _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]["@list"]
9714
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array) {
9248
9715
  if (v == null)
9249
9716
  continue;
9250
9717
  _79S8K4f5J9MWUgCxziRyUe6PTHZ.push(v["@value"]);
9251
9718
  }
9252
9719
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ = _79S8K4f5J9MWUgCxziRyUe6PTHZ;
9253
9720
  const _2diCorzqPGQQqftp6e4SrCEwEnyk = [];
9254
- for (const v of values["http://joinmastodon.org/ns#indexable"] ?? []) {
9721
+ const _2diCorzqPGQQqftp6e4SrCEwEnyk__array = values["http://joinmastodon.org/ns#indexable"];
9722
+ for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk__array == null
9723
+ ? []
9724
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array.length === 1 &&
9725
+ "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]
9726
+ ? _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]["@list"]
9727
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array) {
9255
9728
  if (v == null)
9256
9729
  continue;
9257
9730
  _2diCorzqPGQQqftp6e4SrCEwEnyk.push(v["@value"]);
@@ -9386,6 +9859,17 @@ export class Application extends Object {
9386
9859
  if (_4N1vBJzXDf8NbBumeECQMFvKetja.length == 1) {
9387
9860
  proxy.featured = _4N1vBJzXDf8NbBumeECQMFvKetja[0];
9388
9861
  }
9862
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac
9863
+ // deno-lint-ignore no-explicit-any
9864
+ .map((v) => v instanceof URL
9865
+ ? {
9866
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
9867
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
9868
+ }
9869
+ : v);
9870
+ if (_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length == 1) {
9871
+ proxy.featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
9872
+ }
9389
9873
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9
9390
9874
  // deno-lint-ignore no-explicit-any
9391
9875
  .map((v) => v instanceof URL
@@ -10013,14 +10497,26 @@ export class Document extends Object {
10013
10497
  throw new TypeError("Unexpected type: " + instance.constructor.name);
10014
10498
  }
10015
10499
  const _2e9AP7WdHBJYAgXG6GEyq7nSkNMe = [];
10016
- for (const v of values["https://www.w3.org/ns/activitystreams#width"] ?? []) {
10500
+ const _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array = values["https://www.w3.org/ns/activitystreams#width"];
10501
+ for (const v of _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array == null
10502
+ ? []
10503
+ : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array.length === 1 &&
10504
+ "@list" in _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array[0]
10505
+ ? _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array[0]["@list"]
10506
+ : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array) {
10017
10507
  if (v == null)
10018
10508
  continue;
10019
10509
  _2e9AP7WdHBJYAgXG6GEyq7nSkNMe.push(v["@value"]);
10020
10510
  }
10021
10511
  instance.#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe = _2e9AP7WdHBJYAgXG6GEyq7nSkNMe;
10022
10512
  const _2cGKFeFJMmiNpGZFEF75mCwFQsKb = [];
10023
- for (const v of values["https://www.w3.org/ns/activitystreams#height"] ?? []) {
10513
+ const _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array = values["https://www.w3.org/ns/activitystreams#height"];
10514
+ for (const v of _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array == null
10515
+ ? []
10516
+ : _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array.length === 1 &&
10517
+ "@list" in _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array[0]
10518
+ ? _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array[0]["@list"]
10519
+ : _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array) {
10024
10520
  if (v == null)
10025
10521
  continue;
10026
10522
  _2cGKFeFJMmiNpGZFEF75mCwFQsKb.push(v["@value"]);
@@ -10470,13 +10966,13 @@ export class Collection extends Object {
10470
10966
  }
10471
10967
  if ("items" in values && values.items != null) {
10472
10968
  if (Array.isArray(values.items) &&
10473
- values.items.every((v) => v instanceof Object || v instanceof URL)) {
10969
+ values.items.every((v) => v instanceof Object || v instanceof Link || v instanceof URL)) {
10474
10970
  // @ts-ignore: type is checked above.
10475
10971
  this.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = values.items;
10476
10972
  }
10477
10973
  else {
10478
10974
  throw new TypeError("The items must be an array of type " +
10479
- "Object | URL" + ".");
10975
+ "Object | Link | URL" + ".");
10480
10976
  }
10481
10977
  }
10482
10978
  }
@@ -10537,13 +11033,13 @@ export class Collection extends Object {
10537
11033
  clone.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = this.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg;
10538
11034
  if ("items" in values && values.items != null) {
10539
11035
  if (Array.isArray(values.items) &&
10540
- values.items.every((v) => v instanceof Object || v instanceof URL)) {
11036
+ values.items.every((v) => v instanceof Object || v instanceof Link || v instanceof URL)) {
10541
11037
  // @ts-ignore: type is checked above.
10542
11038
  clone.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = values.items;
10543
11039
  }
10544
11040
  else {
10545
11041
  throw new TypeError("The items must be an array of type " +
10546
- "Object | URL" + ".");
11042
+ "Object | Link | URL" + ".");
10547
11043
  }
10548
11044
  }
10549
11045
  return clone;
@@ -10749,8 +11245,18 @@ export class Collection extends Object {
10749
11245
  if (!(e instanceof TypeError))
10750
11246
  throw e;
10751
11247
  }
11248
+ try {
11249
+ return await Link.fromJsonLd(document, { documentLoader, contextLoader });
11250
+ }
11251
+ catch (e) {
11252
+ if (!(e instanceof TypeError))
11253
+ throw e;
11254
+ }
10752
11255
  throw new TypeError("Expected an object of any type of: " +
10753
- ["https://www.w3.org/ns/activitystreams#Object"].join(", "));
11256
+ [
11257
+ "https://www.w3.org/ns/activitystreams#Object",
11258
+ "https://www.w3.org/ns/activitystreams#Link",
11259
+ ].join(", "));
10754
11260
  }
10755
11261
  /**
10756
11262
  * Similar to
@@ -10839,7 +11345,9 @@ export class Collection extends Object {
10839
11345
  for (const v of this.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg) {
10840
11346
  const element = v instanceof URL
10841
11347
  ? { "@id": v.href }
10842
- : await v.toJsonLd(options);
11348
+ : v instanceof Object
11349
+ ? await v.toJsonLd(options)
11350
+ : await v.toJsonLd(options);
10843
11351
  array.push(element);
10844
11352
  }
10845
11353
  if (array.length > 0) {
@@ -10851,7 +11359,17 @@ export class Collection extends Object {
10851
11359
  if (options.expand) {
10852
11360
  return await jsonld.expand(values, { documentLoader: options.contextLoader });
10853
11361
  }
10854
- return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
11362
+ return await jsonld.compact(values, options.context ??
11363
+ [
11364
+ "https://www.w3.org/ns/activitystreams",
11365
+ "https://w3id.org/security/data-integrity/v1",
11366
+ {
11367
+ "toot": "http://joinmastodon.org/ns#",
11368
+ "sensitive": "as:sensitive",
11369
+ "Emoji": "toot:Emoji",
11370
+ "Hashtag": "as:Hashtag",
11371
+ },
11372
+ ], { documentLoader: options.contextLoader });
10855
11373
  }
10856
11374
  /**
10857
11375
  * Converts a JSON-LD structure to an object of this type.
@@ -10906,15 +11424,26 @@ export class Collection extends Object {
10906
11424
  throw new TypeError("Unexpected type: " + instance.constructor.name);
10907
11425
  }
10908
11426
  const _XDbmNDuWHmrhqH712zqtecdbv1V = [];
10909
- for (const v of values["https://www.w3.org/ns/activitystreams#totalItems"] ??
10910
- []) {
11427
+ const _XDbmNDuWHmrhqH712zqtecdbv1V__array = values["https://www.w3.org/ns/activitystreams#totalItems"];
11428
+ for (const v of _XDbmNDuWHmrhqH712zqtecdbv1V__array == null
11429
+ ? []
11430
+ : _XDbmNDuWHmrhqH712zqtecdbv1V__array.length === 1 &&
11431
+ "@list" in _XDbmNDuWHmrhqH712zqtecdbv1V__array[0]
11432
+ ? _XDbmNDuWHmrhqH712zqtecdbv1V__array[0]["@list"]
11433
+ : _XDbmNDuWHmrhqH712zqtecdbv1V__array) {
10911
11434
  if (v == null)
10912
11435
  continue;
10913
11436
  _XDbmNDuWHmrhqH712zqtecdbv1V.push(v["@value"]);
10914
11437
  }
10915
11438
  instance.#_XDbmNDuWHmrhqH712zqtecdbv1V = _XDbmNDuWHmrhqH712zqtecdbv1V;
10916
11439
  const _3UyUdxnyn6cDn53QKrh4MBiearma = [];
10917
- for (const v of values["https://www.w3.org/ns/activitystreams#current"] ?? []) {
11440
+ const _3UyUdxnyn6cDn53QKrh4MBiearma__array = values["https://www.w3.org/ns/activitystreams#current"];
11441
+ for (const v of _3UyUdxnyn6cDn53QKrh4MBiearma__array == null
11442
+ ? []
11443
+ : _3UyUdxnyn6cDn53QKrh4MBiearma__array.length === 1 &&
11444
+ "@list" in _3UyUdxnyn6cDn53QKrh4MBiearma__array[0]
11445
+ ? _3UyUdxnyn6cDn53QKrh4MBiearma__array[0]["@list"]
11446
+ : _3UyUdxnyn6cDn53QKrh4MBiearma__array) {
10918
11447
  if (v == null)
10919
11448
  continue;
10920
11449
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -10926,7 +11455,13 @@ export class Collection extends Object {
10926
11455
  }
10927
11456
  instance.#_3UyUdxnyn6cDn53QKrh4MBiearma = _3UyUdxnyn6cDn53QKrh4MBiearma;
10928
11457
  const _J52RqweMe6hhv7RnLJMC8BExTE5 = [];
10929
- for (const v of values["https://www.w3.org/ns/activitystreams#first"] ?? []) {
11458
+ const _J52RqweMe6hhv7RnLJMC8BExTE5__array = values["https://www.w3.org/ns/activitystreams#first"];
11459
+ for (const v of _J52RqweMe6hhv7RnLJMC8BExTE5__array == null
11460
+ ? []
11461
+ : _J52RqweMe6hhv7RnLJMC8BExTE5__array.length === 1 &&
11462
+ "@list" in _J52RqweMe6hhv7RnLJMC8BExTE5__array[0]
11463
+ ? _J52RqweMe6hhv7RnLJMC8BExTE5__array[0]["@list"]
11464
+ : _J52RqweMe6hhv7RnLJMC8BExTE5__array) {
10930
11465
  if (v == null)
10931
11466
  continue;
10932
11467
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -10938,7 +11473,13 @@ export class Collection extends Object {
10938
11473
  }
10939
11474
  instance.#_J52RqweMe6hhv7RnLJMC8BExTE5 = _J52RqweMe6hhv7RnLJMC8BExTE5;
10940
11475
  const _gyJJnyEFnuNVi1HFZKfAn3Hfn26 = [];
10941
- for (const v of values["https://www.w3.org/ns/activitystreams#last"] ?? []) {
11476
+ const _gyJJnyEFnuNVi1HFZKfAn3Hfn26__array = values["https://www.w3.org/ns/activitystreams#last"];
11477
+ for (const v of _gyJJnyEFnuNVi1HFZKfAn3Hfn26__array == null
11478
+ ? []
11479
+ : _gyJJnyEFnuNVi1HFZKfAn3Hfn26__array.length === 1 &&
11480
+ "@list" in _gyJJnyEFnuNVi1HFZKfAn3Hfn26__array[0]
11481
+ ? _gyJJnyEFnuNVi1HFZKfAn3Hfn26__array[0]["@list"]
11482
+ : _gyJJnyEFnuNVi1HFZKfAn3Hfn26__array) {
10942
11483
  if (v == null)
10943
11484
  continue;
10944
11485
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -10950,7 +11491,13 @@ export class Collection extends Object {
10950
11491
  }
10951
11492
  instance.#_gyJJnyEFnuNVi1HFZKfAn3Hfn26 = _gyJJnyEFnuNVi1HFZKfAn3Hfn26;
10952
11493
  const _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = [];
10953
- for (const v of values["https://www.w3.org/ns/activitystreams#items"] ?? []) {
11494
+ const _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array = values["https://www.w3.org/ns/activitystreams#items"];
11495
+ for (const v of _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array == null
11496
+ ? []
11497
+ : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array.length === 1 &&
11498
+ "@list" in _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array[0]
11499
+ ? _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array[0]["@list"]
11500
+ : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array) {
10954
11501
  if (v == null)
10955
11502
  continue;
10956
11503
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -10958,7 +11505,66 @@ export class Collection extends Object {
10958
11505
  _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg.push(new URL(v["@id"]));
10959
11506
  continue;
10960
11507
  }
10961
- _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg.push(await Object.fromJsonLd(v, options));
11508
+ const decoded = typeof v === "object" && "@type" in v &&
11509
+ Array.isArray(v["@type"]) &&
11510
+ [
11511
+ "https://www.w3.org/ns/activitystreams#Object",
11512
+ "http://joinmastodon.org/ns#Emoji",
11513
+ "https://www.w3.org/ns/activitystreams#Activity",
11514
+ "https://www.w3.org/ns/activitystreams#Accept",
11515
+ "https://www.w3.org/ns/activitystreams#Add",
11516
+ "https://www.w3.org/ns/activitystreams#Announce",
11517
+ "https://www.w3.org/ns/activitystreams#Create",
11518
+ "https://www.w3.org/ns/activitystreams#Delete",
11519
+ "https://www.w3.org/ns/activitystreams#Dislike",
11520
+ "https://www.w3.org/ns/activitystreams#Flag",
11521
+ "https://www.w3.org/ns/activitystreams#Follow",
11522
+ "https://www.w3.org/ns/activitystreams#Ignore",
11523
+ "https://www.w3.org/ns/activitystreams#Block",
11524
+ "https://www.w3.org/ns/activitystreams#IntransitiveActivity",
11525
+ "https://www.w3.org/ns/activitystreams#Arrive",
11526
+ "https://www.w3.org/ns/activitystreams#Question",
11527
+ "https://www.w3.org/ns/activitystreams#Like",
11528
+ "https://www.w3.org/ns/activitystreams#Offer",
11529
+ "https://www.w3.org/ns/activitystreams#Reject",
11530
+ "https://www.w3.org/ns/activitystreams#Remove",
11531
+ "https://www.w3.org/ns/activitystreams#Undo",
11532
+ "https://www.w3.org/ns/activitystreams#Update",
11533
+ "https://www.w3.org/ns/activitystreams#Application",
11534
+ "https://www.w3.org/ns/activitystreams#Article",
11535
+ "https://www.w3.org/ns/activitystreams#Collection",
11536
+ "https://www.w3.org/ns/activitystreams#CollectionPage",
11537
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
11538
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
11539
+ "https://www.w3.org/ns/activitystreams#Document",
11540
+ "https://www.w3.org/ns/activitystreams#Audio",
11541
+ "https://www.w3.org/ns/activitystreams#Image",
11542
+ "https://www.w3.org/ns/activitystreams#Page",
11543
+ "https://www.w3.org/ns/activitystreams#Video",
11544
+ "https://www.w3.org/ns/activitystreams#Event",
11545
+ "https://www.w3.org/ns/activitystreams#Group",
11546
+ "https://www.w3.org/ns/activitystreams#Note",
11547
+ "https://www.w3.org/ns/activitystreams#Organization",
11548
+ "https://www.w3.org/ns/activitystreams#Person",
11549
+ "https://www.w3.org/ns/activitystreams#Place",
11550
+ "https://www.w3.org/ns/activitystreams#Profile",
11551
+ "https://www.w3.org/ns/activitystreams#Relationship",
11552
+ "https://www.w3.org/ns/activitystreams#Service",
11553
+ "https://www.w3.org/ns/activitystreams#Tombstone",
11554
+ ].some((t) => v["@type"].includes(t))
11555
+ ? await Object.fromJsonLd(v, options)
11556
+ : typeof v === "object" && "@type" in v &&
11557
+ Array.isArray(v["@type"]) &&
11558
+ [
11559
+ "https://www.w3.org/ns/activitystreams#Link",
11560
+ "https://www.w3.org/ns/activitystreams#Hashtag",
11561
+ "https://www.w3.org/ns/activitystreams#Mention",
11562
+ ].some((t) => v["@type"].includes(t))
11563
+ ? await Link.fromJsonLd(v, options)
11564
+ : undefined;
11565
+ if (typeof decoded === "undefined")
11566
+ continue;
11567
+ _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg.push(decoded);
10962
11568
  }
10963
11569
  instance.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg;
10964
11570
  return instance;
@@ -11346,7 +11952,17 @@ export class CollectionPage extends Collection {
11346
11952
  if (options.expand) {
11347
11953
  return await jsonld.expand(values, { documentLoader: options.contextLoader });
11348
11954
  }
11349
- return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
11955
+ return await jsonld.compact(values, options.context ??
11956
+ [
11957
+ "https://www.w3.org/ns/activitystreams",
11958
+ "https://w3id.org/security/data-integrity/v1",
11959
+ {
11960
+ "toot": "http://joinmastodon.org/ns#",
11961
+ "sensitive": "as:sensitive",
11962
+ "Emoji": "toot:Emoji",
11963
+ "Hashtag": "as:Hashtag",
11964
+ },
11965
+ ], { documentLoader: options.contextLoader });
11350
11966
  }
11351
11967
  /**
11352
11968
  * Converts a JSON-LD structure to an object of this type.
@@ -11393,7 +12009,13 @@ export class CollectionPage extends Collection {
11393
12009
  throw new TypeError("Unexpected type: " + instance.constructor.name);
11394
12010
  }
11395
12011
  const _2kWgBhQKjEauxx8C6qF3ZQamK4Le = [];
11396
- for (const v of values["https://www.w3.org/ns/activitystreams#partOf"] ?? []) {
12012
+ const _2kWgBhQKjEauxx8C6qF3ZQamK4Le__array = values["https://www.w3.org/ns/activitystreams#partOf"];
12013
+ for (const v of _2kWgBhQKjEauxx8C6qF3ZQamK4Le__array == null
12014
+ ? []
12015
+ : _2kWgBhQKjEauxx8C6qF3ZQamK4Le__array.length === 1 &&
12016
+ "@list" in _2kWgBhQKjEauxx8C6qF3ZQamK4Le__array[0]
12017
+ ? _2kWgBhQKjEauxx8C6qF3ZQamK4Le__array[0]["@list"]
12018
+ : _2kWgBhQKjEauxx8C6qF3ZQamK4Le__array) {
11397
12019
  if (v == null)
11398
12020
  continue;
11399
12021
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -11405,7 +12027,13 @@ export class CollectionPage extends Collection {
11405
12027
  }
11406
12028
  instance.#_2kWgBhQKjEauxx8C6qF3ZQamK4Le = _2kWgBhQKjEauxx8C6qF3ZQamK4Le;
11407
12029
  const _3BT4kQLcXhHx7TAWaNDKh8nFn9eY = [];
11408
- for (const v of values["https://www.w3.org/ns/activitystreams#next"] ?? []) {
12030
+ const _3BT4kQLcXhHx7TAWaNDKh8nFn9eY__array = values["https://www.w3.org/ns/activitystreams#next"];
12031
+ for (const v of _3BT4kQLcXhHx7TAWaNDKh8nFn9eY__array == null
12032
+ ? []
12033
+ : _3BT4kQLcXhHx7TAWaNDKh8nFn9eY__array.length === 1 &&
12034
+ "@list" in _3BT4kQLcXhHx7TAWaNDKh8nFn9eY__array[0]
12035
+ ? _3BT4kQLcXhHx7TAWaNDKh8nFn9eY__array[0]["@list"]
12036
+ : _3BT4kQLcXhHx7TAWaNDKh8nFn9eY__array) {
11409
12037
  if (v == null)
11410
12038
  continue;
11411
12039
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -11417,7 +12045,13 @@ export class CollectionPage extends Collection {
11417
12045
  }
11418
12046
  instance.#_3BT4kQLcXhHx7TAWaNDKh8nFn9eY = _3BT4kQLcXhHx7TAWaNDKh8nFn9eY;
11419
12047
  const _3b8yG8tDNzQFFEnWhCc13G8eHooA = [];
11420
- for (const v of values["https://www.w3.org/ns/activitystreams#prev"] ?? []) {
12048
+ const _3b8yG8tDNzQFFEnWhCc13G8eHooA__array = values["https://www.w3.org/ns/activitystreams#prev"];
12049
+ for (const v of _3b8yG8tDNzQFFEnWhCc13G8eHooA__array == null
12050
+ ? []
12051
+ : _3b8yG8tDNzQFFEnWhCc13G8eHooA__array.length === 1 &&
12052
+ "@list" in _3b8yG8tDNzQFFEnWhCc13G8eHooA__array[0]
12053
+ ? _3b8yG8tDNzQFFEnWhCc13G8eHooA__array[0]["@list"]
12054
+ : _3b8yG8tDNzQFFEnWhCc13G8eHooA__array) {
11421
12055
  if (v == null)
11422
12056
  continue;
11423
12057
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -12168,45 +12802,78 @@ export class Endpoints {
12168
12802
  }
12169
12803
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : undefined }, options);
12170
12804
  const _2JCYDbSxEHCCLdBYed33cCETfGyR = [];
12171
- for (const v of values["https://www.w3.org/ns/activitystreams#proxyUrl"] ?? []) {
12805
+ const _2JCYDbSxEHCCLdBYed33cCETfGyR__array = values["https://www.w3.org/ns/activitystreams#proxyUrl"];
12806
+ for (const v of _2JCYDbSxEHCCLdBYed33cCETfGyR__array == null
12807
+ ? []
12808
+ : _2JCYDbSxEHCCLdBYed33cCETfGyR__array.length === 1 &&
12809
+ "@list" in _2JCYDbSxEHCCLdBYed33cCETfGyR__array[0]
12810
+ ? _2JCYDbSxEHCCLdBYed33cCETfGyR__array[0]["@list"]
12811
+ : _2JCYDbSxEHCCLdBYed33cCETfGyR__array) {
12172
12812
  if (v == null)
12173
12813
  continue;
12174
12814
  _2JCYDbSxEHCCLdBYed33cCETfGyR.push(new URL(v["@id"]));
12175
12815
  }
12176
12816
  instance.#_2JCYDbSxEHCCLdBYed33cCETfGyR = _2JCYDbSxEHCCLdBYed33cCETfGyR;
12177
12817
  const _25S6UmgzDead8hxL5sQFezZTAusd = [];
12178
- for (const v of values["https://www.w3.org/ns/activitystreams#oauthAuthorizationEndpoint"] ?? []) {
12818
+ const _25S6UmgzDead8hxL5sQFezZTAusd__array = values["https://www.w3.org/ns/activitystreams#oauthAuthorizationEndpoint"];
12819
+ for (const v of _25S6UmgzDead8hxL5sQFezZTAusd__array == null
12820
+ ? []
12821
+ : _25S6UmgzDead8hxL5sQFezZTAusd__array.length === 1 &&
12822
+ "@list" in _25S6UmgzDead8hxL5sQFezZTAusd__array[0]
12823
+ ? _25S6UmgzDead8hxL5sQFezZTAusd__array[0]["@list"]
12824
+ : _25S6UmgzDead8hxL5sQFezZTAusd__array) {
12179
12825
  if (v == null)
12180
12826
  continue;
12181
12827
  _25S6UmgzDead8hxL5sQFezZTAusd.push(new URL(v["@id"]));
12182
12828
  }
12183
12829
  instance.#_25S6UmgzDead8hxL5sQFezZTAusd = _25S6UmgzDead8hxL5sQFezZTAusd;
12184
12830
  const _iAMxqrSba7yBCRB1FZ5kEVdKEZ3 = [];
12185
- for (const v of values["https://www.w3.org/ns/activitystreams#oauthTokenEndpoint"] ??
12186
- []) {
12831
+ const _iAMxqrSba7yBCRB1FZ5kEVdKEZ3__array = values["https://www.w3.org/ns/activitystreams#oauthTokenEndpoint"];
12832
+ for (const v of _iAMxqrSba7yBCRB1FZ5kEVdKEZ3__array == null
12833
+ ? []
12834
+ : _iAMxqrSba7yBCRB1FZ5kEVdKEZ3__array.length === 1 &&
12835
+ "@list" in _iAMxqrSba7yBCRB1FZ5kEVdKEZ3__array[0]
12836
+ ? _iAMxqrSba7yBCRB1FZ5kEVdKEZ3__array[0]["@list"]
12837
+ : _iAMxqrSba7yBCRB1FZ5kEVdKEZ3__array) {
12187
12838
  if (v == null)
12188
12839
  continue;
12189
12840
  _iAMxqrSba7yBCRB1FZ5kEVdKEZ3.push(new URL(v["@id"]));
12190
12841
  }
12191
12842
  instance.#_iAMxqrSba7yBCRB1FZ5kEVdKEZ3 = _iAMxqrSba7yBCRB1FZ5kEVdKEZ3;
12192
12843
  const _8Bx9qN8oU7Bpt2xi6khaxWp1gMr = [];
12193
- for (const v of values["https://www.w3.org/ns/activitystreams#provideClientKey"] ??
12194
- []) {
12844
+ const _8Bx9qN8oU7Bpt2xi6khaxWp1gMr__array = values["https://www.w3.org/ns/activitystreams#provideClientKey"];
12845
+ for (const v of _8Bx9qN8oU7Bpt2xi6khaxWp1gMr__array == null
12846
+ ? []
12847
+ : _8Bx9qN8oU7Bpt2xi6khaxWp1gMr__array.length === 1 &&
12848
+ "@list" in _8Bx9qN8oU7Bpt2xi6khaxWp1gMr__array[0]
12849
+ ? _8Bx9qN8oU7Bpt2xi6khaxWp1gMr__array[0]["@list"]
12850
+ : _8Bx9qN8oU7Bpt2xi6khaxWp1gMr__array) {
12195
12851
  if (v == null)
12196
12852
  continue;
12197
12853
  _8Bx9qN8oU7Bpt2xi6khaxWp1gMr.push(new URL(v["@id"]));
12198
12854
  }
12199
12855
  instance.#_8Bx9qN8oU7Bpt2xi6khaxWp1gMr = _8Bx9qN8oU7Bpt2xi6khaxWp1gMr;
12200
12856
  const _3dU7PMVQZJpsCpo2F4RQXxBXdPmS = [];
12201
- for (const v of values["https://www.w3.org/ns/activitystreams#signClientKey"] ?? []) {
12857
+ const _3dU7PMVQZJpsCpo2F4RQXxBXdPmS__array = values["https://www.w3.org/ns/activitystreams#signClientKey"];
12858
+ for (const v of _3dU7PMVQZJpsCpo2F4RQXxBXdPmS__array == null
12859
+ ? []
12860
+ : _3dU7PMVQZJpsCpo2F4RQXxBXdPmS__array.length === 1 &&
12861
+ "@list" in _3dU7PMVQZJpsCpo2F4RQXxBXdPmS__array[0]
12862
+ ? _3dU7PMVQZJpsCpo2F4RQXxBXdPmS__array[0]["@list"]
12863
+ : _3dU7PMVQZJpsCpo2F4RQXxBXdPmS__array) {
12202
12864
  if (v == null)
12203
12865
  continue;
12204
12866
  _3dU7PMVQZJpsCpo2F4RQXxBXdPmS.push(new URL(v["@id"]));
12205
12867
  }
12206
12868
  instance.#_3dU7PMVQZJpsCpo2F4RQXxBXdPmS = _3dU7PMVQZJpsCpo2F4RQXxBXdPmS;
12207
12869
  const _3JprUSDLVqqX4dwHRi37qGZZCRCc = [];
12208
- for (const v of values["https://www.w3.org/ns/activitystreams#sharedInbox"] ??
12209
- []) {
12870
+ const _3JprUSDLVqqX4dwHRi37qGZZCRCc__array = values["https://www.w3.org/ns/activitystreams#sharedInbox"];
12871
+ for (const v of _3JprUSDLVqqX4dwHRi37qGZZCRCc__array == null
12872
+ ? []
12873
+ : _3JprUSDLVqqX4dwHRi37qGZZCRCc__array.length === 1 &&
12874
+ "@list" in _3JprUSDLVqqX4dwHRi37qGZZCRCc__array[0]
12875
+ ? _3JprUSDLVqqX4dwHRi37qGZZCRCc__array[0]["@list"]
12876
+ : _3JprUSDLVqqX4dwHRi37qGZZCRCc__array) {
12210
12877
  if (v == null)
12211
12878
  continue;
12212
12879
  _3JprUSDLVqqX4dwHRi37qGZZCRCc.push(new URL(v["@id"]));
@@ -12653,6 +13320,7 @@ export class Group extends Object {
12653
13320
  #_BBCTgfphhsFzpVfKTykGSpBNwoA = [];
12654
13321
  #_3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
12655
13322
  #_4N1vBJzXDf8NbBumeECQMFvKetja = [];
13323
+ #_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
12656
13324
  #_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
12657
13325
  #_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
12658
13326
  #_gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
@@ -12821,6 +13489,17 @@ export class Group extends Object {
12821
13489
  "Collection | URL" + ".");
12822
13490
  }
12823
13491
  }
13492
+ if ("featuredTags" in values && values.featuredTags != null) {
13493
+ if (values.featuredTags instanceof Collection ||
13494
+ values.featuredTags instanceof URL) {
13495
+ // @ts-ignore: type is checked above.
13496
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
13497
+ }
13498
+ else {
13499
+ throw new TypeError("The featuredTags must be of type " +
13500
+ "Collection | URL" + ".");
13501
+ }
13502
+ }
12824
13503
  if ("streams" in values && values.streams != null) {
12825
13504
  if (Array.isArray(values.streams) &&
12826
13505
  values.streams.every((v) => v instanceof Collection || v instanceof URL)) {
@@ -13058,6 +13737,18 @@ export class Group extends Object {
13058
13737
  "Collection | URL" + ".");
13059
13738
  }
13060
13739
  }
13740
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac;
13741
+ if ("featuredTags" in values && values.featuredTags != null) {
13742
+ if (values.featuredTags instanceof Collection ||
13743
+ values.featuredTags instanceof URL) {
13744
+ // @ts-ignore: type is checked above.
13745
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
13746
+ }
13747
+ else {
13748
+ throw new TypeError("The featuredTags must be of type " +
13749
+ "Collection | URL" + ".");
13750
+ }
13751
+ }
13061
13752
  clone.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
13062
13753
  if ("streams" in values && values.streams != null) {
13063
13754
  if (Array.isArray(values.streams) &&
@@ -13689,6 +14380,64 @@ export class Group extends Object {
13689
14380
  }
13690
14381
  return v;
13691
14382
  }
14383
+ async #fetchFeaturedTags(url, options = {}) {
14384
+ const documentLoader = options.documentLoader ?? this._documentLoader ??
14385
+ fetchDocumentLoader;
14386
+ const contextLoader = options.contextLoader ?? this._contextLoader ??
14387
+ fetchDocumentLoader;
14388
+ let fetchResult;
14389
+ try {
14390
+ fetchResult = await documentLoader(url.href);
14391
+ }
14392
+ catch (error) {
14393
+ if (options.suppressError) {
14394
+ getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
14395
+ return null;
14396
+ }
14397
+ throw error;
14398
+ }
14399
+ const { document } = fetchResult;
14400
+ try {
14401
+ return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
14402
+ }
14403
+ catch (e) {
14404
+ if (!(e instanceof TypeError))
14405
+ throw e;
14406
+ }
14407
+ throw new TypeError("Expected an object of any type of: " +
14408
+ ["https://www.w3.org/ns/activitystreams#Collection"].join(", "));
14409
+ }
14410
+ /**
14411
+ * Similar to
14412
+ * {@link Group.getFeaturedTags},
14413
+ * but returns its `@id` URL instead of the object itself.
14414
+ */
14415
+ get featuredTagsId() {
14416
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
14417
+ return null;
14418
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
14419
+ if (v instanceof URL)
14420
+ return v;
14421
+ return v.id;
14422
+ }
14423
+ /** What is known in Mastodon as "featured hashtags", hashtags that are featured
14424
+ * at people's profiles, is implemented using an extra property `featuredTags`
14425
+ * on the actor object that points to a {@link Collection} of {@link Hashtag}
14426
+ * objects specifically.
14427
+ */
14428
+ async getFeaturedTags(options = {}) {
14429
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
14430
+ return null;
14431
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
14432
+ if (v instanceof URL) {
14433
+ const fetched = await this.#fetchFeaturedTags(v, options);
14434
+ if (fetched == null)
14435
+ return null;
14436
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0] = fetched;
14437
+ return fetched;
14438
+ }
14439
+ return v;
14440
+ }
13692
14441
  async #fetchStream(url, options = {}) {
13693
14442
  const documentLoader = options.documentLoader ?? this._documentLoader ??
13694
14443
  fetchDocumentLoader;
@@ -13899,6 +14648,16 @@ export class Group extends Object {
13899
14648
  values["http://joinmastodon.org/ns#featured"] = array;
13900
14649
  }
13901
14650
  array = [];
14651
+ for (const v of this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac) {
14652
+ const element = v instanceof URL
14653
+ ? { "@id": v.href }
14654
+ : await v.toJsonLd(options);
14655
+ array.push(element);
14656
+ }
14657
+ if (array.length > 0) {
14658
+ values["http://joinmastodon.org/ns#featuredTags"] = array;
14659
+ }
14660
+ array = [];
13902
14661
  for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
13903
14662
  const element = v instanceof URL
13904
14663
  ? { "@id": v.href }
@@ -13965,6 +14724,7 @@ export class Group extends Object {
13965
14724
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
13966
14725
  "toot": "http://joinmastodon.org/ns#",
13967
14726
  "featured": { "@id": "toot:featured", "@type": "@id" },
14727
+ "featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
13968
14728
  "discoverable": "toot:discoverable",
13969
14729
  "suspended": "toot:suspended",
13970
14730
  "memorial": "toot:memorial",
@@ -14016,8 +14776,13 @@ export class Group extends Object {
14016
14776
  throw new TypeError("Unexpected type: " + instance.constructor.name);
14017
14777
  }
14018
14778
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf = [];
14019
- for (const v of values["https://www.w3.org/ns/activitystreams#preferredUsername"] ??
14020
- []) {
14779
+ const _3isuDgRAKSntq9XdbjiNxjwyPZAf__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
14780
+ for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf__array == null
14781
+ ? []
14782
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array.length === 1 &&
14783
+ "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]
14784
+ ? _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]["@list"]
14785
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array) {
14021
14786
  if (v == null)
14022
14787
  continue;
14023
14788
  const decoded = typeof v === "object" && "@value" in v &&
@@ -14034,7 +14799,13 @@ export class Group extends Object {
14034
14799
  }
14035
14800
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf = _3isuDgRAKSntq9XdbjiNxjwyPZAf;
14036
14801
  const _axq166E2eZADq34V4MYUc8KMZdC = [];
14037
- for (const v of values["https://w3id.org/security#publicKey"] ?? []) {
14802
+ const _axq166E2eZADq34V4MYUc8KMZdC__array = values["https://w3id.org/security#publicKey"];
14803
+ for (const v of _axq166E2eZADq34V4MYUc8KMZdC__array == null
14804
+ ? []
14805
+ : _axq166E2eZADq34V4MYUc8KMZdC__array.length === 1 &&
14806
+ "@list" in _axq166E2eZADq34V4MYUc8KMZdC__array[0]
14807
+ ? _axq166E2eZADq34V4MYUc8KMZdC__array[0]["@list"]
14808
+ : _axq166E2eZADq34V4MYUc8KMZdC__array) {
14038
14809
  if (v == null)
14039
14810
  continue;
14040
14811
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14046,7 +14817,13 @@ export class Group extends Object {
14046
14817
  }
14047
14818
  instance.#_axq166E2eZADq34V4MYUc8KMZdC = _axq166E2eZADq34V4MYUc8KMZdC;
14048
14819
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3 = [];
14049
- for (const v of values["https://w3id.org/security#assertionMethod"] ?? []) {
14820
+ const _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array = values["https://w3id.org/security#assertionMethod"];
14821
+ for (const v of _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array == null
14822
+ ? []
14823
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array.length === 1 &&
14824
+ "@list" in _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]
14825
+ ? _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]["@list"]
14826
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array) {
14050
14827
  if (v == null)
14051
14828
  continue;
14052
14829
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14058,14 +14835,26 @@ export class Group extends Object {
14058
14835
  }
14059
14836
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3 = _4EHQFWZSz1k1d4LmPrQiMba2GbP3;
14060
14837
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA = [];
14061
- for (const v of values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] ?? []) {
14838
+ const _36QNc9MxfkKf6h8sEUQSHnV9NZA__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
14839
+ for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA__array == null
14840
+ ? []
14841
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array.length === 1 &&
14842
+ "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]
14843
+ ? _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]["@list"]
14844
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array) {
14062
14845
  if (v == null)
14063
14846
  continue;
14064
14847
  _36QNc9MxfkKf6h8sEUQSHnV9NZA.push(v["@value"]);
14065
14848
  }
14066
14849
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA = _36QNc9MxfkKf6h8sEUQSHnV9NZA;
14067
14850
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB = [];
14068
- for (const v of values["http://www.w3.org/ns/ldp#inbox"] ?? []) {
14851
+ const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array = values["http://www.w3.org/ns/ldp#inbox"];
14852
+ for (const v of _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array == null
14853
+ ? []
14854
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array.length === 1 &&
14855
+ "@list" in _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]
14856
+ ? _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]["@list"]
14857
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array) {
14069
14858
  if (v == null)
14070
14859
  continue;
14071
14860
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14077,7 +14866,13 @@ export class Group extends Object {
14077
14866
  }
14078
14867
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB;
14079
14868
  const _41QwhqJouoLg3h8dRPKat21brynC = [];
14080
- for (const v of values["https://www.w3.org/ns/activitystreams#outbox"] ?? []) {
14869
+ const _41QwhqJouoLg3h8dRPKat21brynC__array = values["https://www.w3.org/ns/activitystreams#outbox"];
14870
+ for (const v of _41QwhqJouoLg3h8dRPKat21brynC__array == null
14871
+ ? []
14872
+ : _41QwhqJouoLg3h8dRPKat21brynC__array.length === 1 &&
14873
+ "@list" in _41QwhqJouoLg3h8dRPKat21brynC__array[0]
14874
+ ? _41QwhqJouoLg3h8dRPKat21brynC__array[0]["@list"]
14875
+ : _41QwhqJouoLg3h8dRPKat21brynC__array) {
14081
14876
  if (v == null)
14082
14877
  continue;
14083
14878
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14089,7 +14884,13 @@ export class Group extends Object {
14089
14884
  }
14090
14885
  instance.#_41QwhqJouoLg3h8dRPKat21brynC = _41QwhqJouoLg3h8dRPKat21brynC;
14091
14886
  const _3yAv8jymNfNuJUDuBzJ1NQhdbAee = [];
14092
- for (const v of values["https://www.w3.org/ns/activitystreams#following"] ?? []) {
14887
+ const _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array = values["https://www.w3.org/ns/activitystreams#following"];
14888
+ for (const v of _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array == null
14889
+ ? []
14890
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array.length === 1 &&
14891
+ "@list" in _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]
14892
+ ? _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]["@list"]
14893
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array) {
14093
14894
  if (v == null)
14094
14895
  continue;
14095
14896
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14101,7 +14902,13 @@ export class Group extends Object {
14101
14902
  }
14102
14903
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee = _3yAv8jymNfNuJUDuBzJ1NQhdbAee;
14103
14904
  const _BBCTgfphhsFzpVfKTykGSpBNwoA = [];
14104
- for (const v of values["https://www.w3.org/ns/activitystreams#followers"] ?? []) {
14905
+ const _BBCTgfphhsFzpVfKTykGSpBNwoA__array = values["https://www.w3.org/ns/activitystreams#followers"];
14906
+ for (const v of _BBCTgfphhsFzpVfKTykGSpBNwoA__array == null
14907
+ ? []
14908
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array.length === 1 &&
14909
+ "@list" in _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]
14910
+ ? _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]["@list"]
14911
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array) {
14105
14912
  if (v == null)
14106
14913
  continue;
14107
14914
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14113,7 +14920,13 @@ export class Group extends Object {
14113
14920
  }
14114
14921
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA = _BBCTgfphhsFzpVfKTykGSpBNwoA;
14115
14922
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
14116
- for (const v of values["https://www.w3.org/ns/activitystreams#liked"] ?? []) {
14923
+ const _3bgkPwJanyTCoVFM9ovRcus8tKkU__array = values["https://www.w3.org/ns/activitystreams#liked"];
14924
+ for (const v of _3bgkPwJanyTCoVFM9ovRcus8tKkU__array == null
14925
+ ? []
14926
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array.length === 1 &&
14927
+ "@list" in _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]
14928
+ ? _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]["@list"]
14929
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array) {
14117
14930
  if (v == null)
14118
14931
  continue;
14119
14932
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14125,7 +14938,13 @@ export class Group extends Object {
14125
14938
  }
14126
14939
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU = _3bgkPwJanyTCoVFM9ovRcus8tKkU;
14127
14940
  const _4N1vBJzXDf8NbBumeECQMFvKetja = [];
14128
- for (const v of values["http://joinmastodon.org/ns#featured"] ?? []) {
14941
+ const _4N1vBJzXDf8NbBumeECQMFvKetja__array = values["http://joinmastodon.org/ns#featured"];
14942
+ for (const v of _4N1vBJzXDf8NbBumeECQMFvKetja__array == null
14943
+ ? []
14944
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array.length === 1 &&
14945
+ "@list" in _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]
14946
+ ? _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]["@list"]
14947
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array) {
14129
14948
  if (v == null)
14130
14949
  continue;
14131
14950
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14136,8 +14955,32 @@ export class Group extends Object {
14136
14955
  _4N1vBJzXDf8NbBumeECQMFvKetja.push(await Collection.fromJsonLd(v, options));
14137
14956
  }
14138
14957
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja = _4N1vBJzXDf8NbBumeECQMFvKetja;
14958
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
14959
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array = values["http://joinmastodon.org/ns#featuredTags"];
14960
+ for (const v of _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array == null
14961
+ ? []
14962
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array.length === 1 &&
14963
+ "@list" in _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]
14964
+ ? _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]["@list"]
14965
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array) {
14966
+ if (v == null)
14967
+ continue;
14968
+ if (typeof v === "object" && "@id" in v && !("@type" in v) &&
14969
+ globalThis.Object.keys(v).length === 1) {
14970
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(new URL(v["@id"]));
14971
+ continue;
14972
+ }
14973
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(await Collection.fromJsonLd(v, options));
14974
+ }
14975
+ instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = _2MxnRRLq9iPzx5CFq2NPrXdUDCac;
14139
14976
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
14140
- for (const v of values["https://www.w3.org/ns/activitystreams#streams"] ?? []) {
14977
+ const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array = values["https://www.w3.org/ns/activitystreams#streams"];
14978
+ for (const v of _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array == null
14979
+ ? []
14980
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array.length === 1 &&
14981
+ "@list" in _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]
14982
+ ? _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]["@list"]
14983
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array) {
14141
14984
  if (v == null)
14142
14985
  continue;
14143
14986
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -14149,35 +14992,65 @@ export class Group extends Object {
14149
14992
  }
14150
14993
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
14151
14994
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
14152
- for (const v of values["https://www.w3.org/ns/activitystreams#endpoints"] ?? []) {
14995
+ const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
14996
+ for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array == null
14997
+ ? []
14998
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array.length === 1 &&
14999
+ "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]
15000
+ ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]["@list"]
15001
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array) {
14153
15002
  if (v == null)
14154
15003
  continue;
14155
15004
  _sEoQwUbfk4hEfugzNQ2ZiDcLMkG.push(await Endpoints.fromJsonLd(v, options));
14156
15005
  }
14157
15006
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG;
14158
15007
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
14159
- for (const v of values["http://joinmastodon.org/ns#discoverable"] ?? []) {
15008
+ const _gAJzg1QDc4rcefFsUzGSYmyXvNH__array = values["http://joinmastodon.org/ns#discoverable"];
15009
+ for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH__array == null
15010
+ ? []
15011
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array.length === 1 &&
15012
+ "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]
15013
+ ? _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]["@list"]
15014
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array) {
14160
15015
  if (v == null)
14161
15016
  continue;
14162
15017
  _gAJzg1QDc4rcefFsUzGSYmyXvNH.push(v["@value"]);
14163
15018
  }
14164
15019
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH = _gAJzg1QDc4rcefFsUzGSYmyXvNH;
14165
15020
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7 = [];
14166
- for (const v of values["http://joinmastodon.org/ns#suspended"] ?? []) {
15021
+ const _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array = values["http://joinmastodon.org/ns#suspended"];
15022
+ for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array == null
15023
+ ? []
15024
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array.length === 1 &&
15025
+ "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]
15026
+ ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]["@list"]
15027
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array) {
14167
15028
  if (v == null)
14168
15029
  continue;
14169
15030
  _2kGKkJtoFWg8c18PaVSqj9NKP4t7.push(v["@value"]);
14170
15031
  }
14171
15032
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7 = _2kGKkJtoFWg8c18PaVSqj9NKP4t7;
14172
15033
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ = [];
14173
- for (const v of values["http://joinmastodon.org/ns#memorial"] ?? []) {
15034
+ const _79S8K4f5J9MWUgCxziRyUe6PTHZ__array = values["http://joinmastodon.org/ns#memorial"];
15035
+ for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ__array == null
15036
+ ? []
15037
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array.length === 1 &&
15038
+ "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]
15039
+ ? _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]["@list"]
15040
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array) {
14174
15041
  if (v == null)
14175
15042
  continue;
14176
15043
  _79S8K4f5J9MWUgCxziRyUe6PTHZ.push(v["@value"]);
14177
15044
  }
14178
15045
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ = _79S8K4f5J9MWUgCxziRyUe6PTHZ;
14179
15046
  const _2diCorzqPGQQqftp6e4SrCEwEnyk = [];
14180
- for (const v of values["http://joinmastodon.org/ns#indexable"] ?? []) {
15047
+ const _2diCorzqPGQQqftp6e4SrCEwEnyk__array = values["http://joinmastodon.org/ns#indexable"];
15048
+ for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk__array == null
15049
+ ? []
15050
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array.length === 1 &&
15051
+ "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]
15052
+ ? _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]["@list"]
15053
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array) {
14181
15054
  if (v == null)
14182
15055
  continue;
14183
15056
  _2diCorzqPGQQqftp6e4SrCEwEnyk.push(v["@value"]);
@@ -14312,6 +15185,17 @@ export class Group extends Object {
14312
15185
  if (_4N1vBJzXDf8NbBumeECQMFvKetja.length == 1) {
14313
15186
  proxy.featured = _4N1vBJzXDf8NbBumeECQMFvKetja[0];
14314
15187
  }
15188
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac
15189
+ // deno-lint-ignore no-explicit-any
15190
+ .map((v) => v instanceof URL
15191
+ ? {
15192
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
15193
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
15194
+ }
15195
+ : v);
15196
+ if (_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length == 1) {
15197
+ proxy.featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
15198
+ }
14315
15199
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9
14316
15200
  // deno-lint-ignore no-explicit-any
14317
15201
  .map((v) => v instanceof URL
@@ -14970,28 +15854,52 @@ export class Link {
14970
15854
  }
14971
15855
  const instance = new this({ id: "@id" in values ? new URL(values["@id"]) : undefined }, options);
14972
15856
  const _pVjLsybKQdmkjuU7MHjiVmNnuj7 = [];
14973
- for (const v of values["https://www.w3.org/ns/activitystreams#href"] ?? []) {
15857
+ const _pVjLsybKQdmkjuU7MHjiVmNnuj7__array = values["https://www.w3.org/ns/activitystreams#href"];
15858
+ for (const v of _pVjLsybKQdmkjuU7MHjiVmNnuj7__array == null
15859
+ ? []
15860
+ : _pVjLsybKQdmkjuU7MHjiVmNnuj7__array.length === 1 &&
15861
+ "@list" in _pVjLsybKQdmkjuU7MHjiVmNnuj7__array[0]
15862
+ ? _pVjLsybKQdmkjuU7MHjiVmNnuj7__array[0]["@list"]
15863
+ : _pVjLsybKQdmkjuU7MHjiVmNnuj7__array) {
14974
15864
  if (v == null)
14975
15865
  continue;
14976
15866
  _pVjLsybKQdmkjuU7MHjiVmNnuj7.push(new URL(v["@id"]));
14977
15867
  }
14978
15868
  instance.#_pVjLsybKQdmkjuU7MHjiVmNnuj7 = _pVjLsybKQdmkjuU7MHjiVmNnuj7;
14979
15869
  const _2a1c5GkfkQsnyyLybF8UXBQfFuHZ = [];
14980
- for (const v of values["https://www.w3.org/ns/activitystreams#rel"] ?? []) {
15870
+ const _2a1c5GkfkQsnyyLybF8UXBQfFuHZ__array = values["https://www.w3.org/ns/activitystreams#rel"];
15871
+ for (const v of _2a1c5GkfkQsnyyLybF8UXBQfFuHZ__array == null
15872
+ ? []
15873
+ : _2a1c5GkfkQsnyyLybF8UXBQfFuHZ__array.length === 1 &&
15874
+ "@list" in _2a1c5GkfkQsnyyLybF8UXBQfFuHZ__array[0]
15875
+ ? _2a1c5GkfkQsnyyLybF8UXBQfFuHZ__array[0]["@list"]
15876
+ : _2a1c5GkfkQsnyyLybF8UXBQfFuHZ__array) {
14981
15877
  if (v == null)
14982
15878
  continue;
14983
15879
  _2a1c5GkfkQsnyyLybF8UXBQfFuHZ.push(v["@value"]);
14984
15880
  }
14985
15881
  instance.#_2a1c5GkfkQsnyyLybF8UXBQfFuHZ = _2a1c5GkfkQsnyyLybF8UXBQfFuHZ;
14986
15882
  const _3BLrzmscsjHCw8TF5BHRW9WkPnX8 = [];
14987
- for (const v of values["https://www.w3.org/ns/activitystreams#mediaType"] ?? []) {
15883
+ const _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array = values["https://www.w3.org/ns/activitystreams#mediaType"];
15884
+ for (const v of _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array == null
15885
+ ? []
15886
+ : _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array.length === 1 &&
15887
+ "@list" in _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array[0]
15888
+ ? _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array[0]["@list"]
15889
+ : _3BLrzmscsjHCw8TF5BHRW9WkPnX8__array) {
14988
15890
  if (v == null)
14989
15891
  continue;
14990
15892
  _3BLrzmscsjHCw8TF5BHRW9WkPnX8.push(v["@value"]);
14991
15893
  }
14992
15894
  instance.#_3BLrzmscsjHCw8TF5BHRW9WkPnX8 = _3BLrzmscsjHCw8TF5BHRW9WkPnX8;
14993
15895
  const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav = [];
14994
- for (const v of values["https://www.w3.org/ns/activitystreams#name"] ?? []) {
15896
+ const _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array = values["https://www.w3.org/ns/activitystreams#name"];
15897
+ for (const v of _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array == null
15898
+ ? []
15899
+ : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array.length === 1 &&
15900
+ "@list" in _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array[0]
15901
+ ? _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array[0]["@list"]
15902
+ : _4ZHbBuK7PrsvGgrjM8wgc6KMWjav__array) {
14995
15903
  if (v == null)
14996
15904
  continue;
14997
15905
  const decoded = typeof v === "object" && "@value" in v &&
@@ -15008,28 +15916,52 @@ export class Link {
15008
15916
  }
15009
15917
  instance.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav = _4ZHbBuK7PrsvGgrjM8wgc6KMWjav;
15010
15918
  const _f57HKWCp1YRBbTJE8PF12RbDJGf = [];
15011
- for (const v of values["https://www.w3.org/ns/activitystreams#hreflang"] ?? []) {
15919
+ const _f57HKWCp1YRBbTJE8PF12RbDJGf__array = values["https://www.w3.org/ns/activitystreams#hreflang"];
15920
+ for (const v of _f57HKWCp1YRBbTJE8PF12RbDJGf__array == null
15921
+ ? []
15922
+ : _f57HKWCp1YRBbTJE8PF12RbDJGf__array.length === 1 &&
15923
+ "@list" in _f57HKWCp1YRBbTJE8PF12RbDJGf__array[0]
15924
+ ? _f57HKWCp1YRBbTJE8PF12RbDJGf__array[0]["@list"]
15925
+ : _f57HKWCp1YRBbTJE8PF12RbDJGf__array) {
15012
15926
  if (v == null)
15013
15927
  continue;
15014
15928
  _f57HKWCp1YRBbTJE8PF12RbDJGf.push(parseLanguageTag(v["@value"]));
15015
15929
  }
15016
15930
  instance.#_f57HKWCp1YRBbTJE8PF12RbDJGf = _f57HKWCp1YRBbTJE8PF12RbDJGf;
15017
15931
  const _2cGKFeFJMmiNpGZFEF75mCwFQsKb = [];
15018
- for (const v of values["https://www.w3.org/ns/activitystreams#height"] ?? []) {
15932
+ const _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array = values["https://www.w3.org/ns/activitystreams#height"];
15933
+ for (const v of _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array == null
15934
+ ? []
15935
+ : _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array.length === 1 &&
15936
+ "@list" in _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array[0]
15937
+ ? _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array[0]["@list"]
15938
+ : _2cGKFeFJMmiNpGZFEF75mCwFQsKb__array) {
15019
15939
  if (v == null)
15020
15940
  continue;
15021
15941
  _2cGKFeFJMmiNpGZFEF75mCwFQsKb.push(v["@value"]);
15022
15942
  }
15023
15943
  instance.#_2cGKFeFJMmiNpGZFEF75mCwFQsKb = _2cGKFeFJMmiNpGZFEF75mCwFQsKb;
15024
15944
  const _2e9AP7WdHBJYAgXG6GEyq7nSkNMe = [];
15025
- for (const v of values["https://www.w3.org/ns/activitystreams#width"] ?? []) {
15945
+ const _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array = values["https://www.w3.org/ns/activitystreams#width"];
15946
+ for (const v of _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array == null
15947
+ ? []
15948
+ : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array.length === 1 &&
15949
+ "@list" in _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array[0]
15950
+ ? _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array[0]["@list"]
15951
+ : _2e9AP7WdHBJYAgXG6GEyq7nSkNMe__array) {
15026
15952
  if (v == null)
15027
15953
  continue;
15028
15954
  _2e9AP7WdHBJYAgXG6GEyq7nSkNMe.push(v["@value"]);
15029
15955
  }
15030
15956
  instance.#_2e9AP7WdHBJYAgXG6GEyq7nSkNMe = _2e9AP7WdHBJYAgXG6GEyq7nSkNMe;
15031
15957
  const _gCVTegXxWWCw6wWRxa1QF65zusg = [];
15032
- for (const v of values["https://www.w3.org/ns/activitystreams#preview"] ?? []) {
15958
+ const _gCVTegXxWWCw6wWRxa1QF65zusg__array = values["https://www.w3.org/ns/activitystreams#preview"];
15959
+ for (const v of _gCVTegXxWWCw6wWRxa1QF65zusg__array == null
15960
+ ? []
15961
+ : _gCVTegXxWWCw6wWRxa1QF65zusg__array.length === 1 &&
15962
+ "@list" in _gCVTegXxWWCw6wWRxa1QF65zusg__array[0]
15963
+ ? _gCVTegXxWWCw6wWRxa1QF65zusg__array[0]["@list"]
15964
+ : _gCVTegXxWWCw6wWRxa1QF65zusg__array) {
15033
15965
  if (v == null)
15034
15966
  continue;
15035
15967
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -15902,13 +16834,13 @@ export class OrderedCollection extends Collection {
15902
16834
  super(values, { documentLoader, contextLoader });
15903
16835
  if ("items" in values && values.items != null) {
15904
16836
  if (Array.isArray(values.items) &&
15905
- values.items.every((v) => v instanceof Object || v instanceof URL)) {
16837
+ values.items.every((v) => v instanceof Object || v instanceof Link || v instanceof URL)) {
15906
16838
  // @ts-ignore: type is checked above.
15907
16839
  this.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = values.items;
15908
16840
  }
15909
16841
  else {
15910
16842
  throw new TypeError("The items must be an array of type " +
15911
- "Object | URL" + ".");
16843
+ "Object | Link | URL" + ".");
15912
16844
  }
15913
16845
  }
15914
16846
  }
@@ -15923,13 +16855,13 @@ export class OrderedCollection extends Collection {
15923
16855
  clone.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = this.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg;
15924
16856
  if ("items" in values && values.items != null) {
15925
16857
  if (Array.isArray(values.items) &&
15926
- values.items.every((v) => v instanceof Object || v instanceof URL)) {
16858
+ values.items.every((v) => v instanceof Object || v instanceof Link || v instanceof URL)) {
15927
16859
  // @ts-ignore: type is checked above.
15928
16860
  clone.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = values.items;
15929
16861
  }
15930
16862
  else {
15931
16863
  throw new TypeError("The items must be an array of type " +
15932
- "Object | URL" + ".");
16864
+ "Object | Link | URL" + ".");
15933
16865
  }
15934
16866
  }
15935
16867
  return clone;
@@ -15958,8 +16890,18 @@ export class OrderedCollection extends Collection {
15958
16890
  if (!(e instanceof TypeError))
15959
16891
  throw e;
15960
16892
  }
16893
+ try {
16894
+ return await Link.fromJsonLd(document, { documentLoader, contextLoader });
16895
+ }
16896
+ catch (e) {
16897
+ if (!(e instanceof TypeError))
16898
+ throw e;
16899
+ }
15961
16900
  throw new TypeError("Expected an object of any type of: " +
15962
- ["https://www.w3.org/ns/activitystreams#Object"].join(", "));
16901
+ [
16902
+ "https://www.w3.org/ns/activitystreams#Object",
16903
+ "https://www.w3.org/ns/activitystreams#Link",
16904
+ ].join(", "));
15963
16905
  }
15964
16906
  /**
15965
16907
  * Similar to
@@ -16007,7 +16949,9 @@ export class OrderedCollection extends Collection {
16007
16949
  for (const v of this.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg) {
16008
16950
  const element = v instanceof URL
16009
16951
  ? { "@id": v.href }
16010
- : await v.toJsonLd(options);
16952
+ : v instanceof Object
16953
+ ? await v.toJsonLd(options)
16954
+ : await v.toJsonLd(options);
16011
16955
  array.push(element);
16012
16956
  }
16013
16957
  if (array.length > 0) {
@@ -16023,7 +16967,17 @@ export class OrderedCollection extends Collection {
16023
16967
  if (options.expand) {
16024
16968
  return await jsonld.expand(values, { documentLoader: options.contextLoader });
16025
16969
  }
16026
- return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
16970
+ return await jsonld.compact(values, options.context ??
16971
+ [
16972
+ "https://www.w3.org/ns/activitystreams",
16973
+ "https://w3id.org/security/data-integrity/v1",
16974
+ {
16975
+ "toot": "http://joinmastodon.org/ns#",
16976
+ "sensitive": "as:sensitive",
16977
+ "Emoji": "toot:Emoji",
16978
+ "Hashtag": "as:Hashtag",
16979
+ },
16980
+ ], { documentLoader: options.contextLoader });
16027
16981
  }
16028
16982
  /**
16029
16983
  * Converts a JSON-LD structure to an object of this type.
@@ -16066,15 +17020,80 @@ export class OrderedCollection extends Collection {
16066
17020
  throw new TypeError("Unexpected type: " + instance.constructor.name);
16067
17021
  }
16068
17022
  const _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = [];
16069
- for (const v of values["https://www.w3.org/ns/activitystreams#items"] ?? []) {
17023
+ const _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array = values["https://www.w3.org/ns/activitystreams#items"];
17024
+ for (const v of _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array == null
17025
+ ? []
17026
+ : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array.length === 1 &&
17027
+ "@list" in _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array[0]
17028
+ ? _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array[0]["@list"]
17029
+ : _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg__array) {
16070
17030
  if (v == null)
16071
17031
  continue;
16072
17032
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
16073
17033
  globalThis.Object.keys(v).length === 1) {
16074
17034
  _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg.push(new URL(v["@id"]));
16075
17035
  continue;
16076
- }
16077
- _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg.push(await Object.fromJsonLd(v, options));
17036
+ }
17037
+ const decoded = typeof v === "object" && "@type" in v &&
17038
+ Array.isArray(v["@type"]) &&
17039
+ [
17040
+ "https://www.w3.org/ns/activitystreams#Object",
17041
+ "http://joinmastodon.org/ns#Emoji",
17042
+ "https://www.w3.org/ns/activitystreams#Activity",
17043
+ "https://www.w3.org/ns/activitystreams#Accept",
17044
+ "https://www.w3.org/ns/activitystreams#Add",
17045
+ "https://www.w3.org/ns/activitystreams#Announce",
17046
+ "https://www.w3.org/ns/activitystreams#Create",
17047
+ "https://www.w3.org/ns/activitystreams#Delete",
17048
+ "https://www.w3.org/ns/activitystreams#Dislike",
17049
+ "https://www.w3.org/ns/activitystreams#Flag",
17050
+ "https://www.w3.org/ns/activitystreams#Follow",
17051
+ "https://www.w3.org/ns/activitystreams#Ignore",
17052
+ "https://www.w3.org/ns/activitystreams#Block",
17053
+ "https://www.w3.org/ns/activitystreams#IntransitiveActivity",
17054
+ "https://www.w3.org/ns/activitystreams#Arrive",
17055
+ "https://www.w3.org/ns/activitystreams#Question",
17056
+ "https://www.w3.org/ns/activitystreams#Like",
17057
+ "https://www.w3.org/ns/activitystreams#Offer",
17058
+ "https://www.w3.org/ns/activitystreams#Reject",
17059
+ "https://www.w3.org/ns/activitystreams#Remove",
17060
+ "https://www.w3.org/ns/activitystreams#Undo",
17061
+ "https://www.w3.org/ns/activitystreams#Update",
17062
+ "https://www.w3.org/ns/activitystreams#Application",
17063
+ "https://www.w3.org/ns/activitystreams#Article",
17064
+ "https://www.w3.org/ns/activitystreams#Collection",
17065
+ "https://www.w3.org/ns/activitystreams#CollectionPage",
17066
+ "https://www.w3.org/ns/activitystreams#OrderedCollectionPage",
17067
+ "https://www.w3.org/ns/activitystreams#OrderedCollection",
17068
+ "https://www.w3.org/ns/activitystreams#Document",
17069
+ "https://www.w3.org/ns/activitystreams#Audio",
17070
+ "https://www.w3.org/ns/activitystreams#Image",
17071
+ "https://www.w3.org/ns/activitystreams#Page",
17072
+ "https://www.w3.org/ns/activitystreams#Video",
17073
+ "https://www.w3.org/ns/activitystreams#Event",
17074
+ "https://www.w3.org/ns/activitystreams#Group",
17075
+ "https://www.w3.org/ns/activitystreams#Note",
17076
+ "https://www.w3.org/ns/activitystreams#Organization",
17077
+ "https://www.w3.org/ns/activitystreams#Person",
17078
+ "https://www.w3.org/ns/activitystreams#Place",
17079
+ "https://www.w3.org/ns/activitystreams#Profile",
17080
+ "https://www.w3.org/ns/activitystreams#Relationship",
17081
+ "https://www.w3.org/ns/activitystreams#Service",
17082
+ "https://www.w3.org/ns/activitystreams#Tombstone",
17083
+ ].some((t) => v["@type"].includes(t))
17084
+ ? await Object.fromJsonLd(v, options)
17085
+ : typeof v === "object" && "@type" in v &&
17086
+ Array.isArray(v["@type"]) &&
17087
+ [
17088
+ "https://www.w3.org/ns/activitystreams#Link",
17089
+ "https://www.w3.org/ns/activitystreams#Hashtag",
17090
+ "https://www.w3.org/ns/activitystreams#Mention",
17091
+ ].some((t) => v["@type"].includes(t))
17092
+ ? await Link.fromJsonLd(v, options)
17093
+ : undefined;
17094
+ if (typeof decoded === "undefined")
17095
+ continue;
17096
+ _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg.push(decoded);
16078
17097
  }
16079
17098
  instance.#_2JPCKWTcfBmTCcW8Tv3TpRaLVaqg = _2JPCKWTcfBmTCcW8Tv3TpRaLVaqg;
16080
17099
  return instance;
@@ -16201,7 +17220,17 @@ export class OrderedCollectionPage extends CollectionPage {
16201
17220
  if (options.expand) {
16202
17221
  return await jsonld.expand(values, { documentLoader: options.contextLoader });
16203
17222
  }
16204
- return await jsonld.compact(values, options.context ?? "https://www.w3.org/ns/activitystreams", { documentLoader: options.contextLoader });
17223
+ return await jsonld.compact(values, options.context ??
17224
+ [
17225
+ "https://www.w3.org/ns/activitystreams",
17226
+ "https://w3id.org/security/data-integrity/v1",
17227
+ {
17228
+ "toot": "http://joinmastodon.org/ns#",
17229
+ "sensitive": "as:sensitive",
17230
+ "Emoji": "toot:Emoji",
17231
+ "Hashtag": "as:Hashtag",
17232
+ },
17233
+ ], { documentLoader: options.contextLoader });
16205
17234
  }
16206
17235
  /**
16207
17236
  * Converts a JSON-LD structure to an object of this type.
@@ -16244,8 +17273,13 @@ export class OrderedCollectionPage extends CollectionPage {
16244
17273
  throw new TypeError("Unexpected type: " + instance.constructor.name);
16245
17274
  }
16246
17275
  const _2W4yinFwqmpneu2h4m1mZ3pcLADd = [];
16247
- for (const v of values["https://www.w3.org/ns/activitystreams#startIndex"] ??
16248
- []) {
17276
+ const _2W4yinFwqmpneu2h4m1mZ3pcLADd__array = values["https://www.w3.org/ns/activitystreams#startIndex"];
17277
+ for (const v of _2W4yinFwqmpneu2h4m1mZ3pcLADd__array == null
17278
+ ? []
17279
+ : _2W4yinFwqmpneu2h4m1mZ3pcLADd__array.length === 1 &&
17280
+ "@list" in _2W4yinFwqmpneu2h4m1mZ3pcLADd__array[0]
17281
+ ? _2W4yinFwqmpneu2h4m1mZ3pcLADd__array[0]["@list"]
17282
+ : _2W4yinFwqmpneu2h4m1mZ3pcLADd__array) {
16249
17283
  if (v == null)
16250
17284
  continue;
16251
17285
  _2W4yinFwqmpneu2h4m1mZ3pcLADd.push(v["@value"]);
@@ -16296,6 +17330,7 @@ export class Organization extends Object {
16296
17330
  #_BBCTgfphhsFzpVfKTykGSpBNwoA = [];
16297
17331
  #_3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
16298
17332
  #_4N1vBJzXDf8NbBumeECQMFvKetja = [];
17333
+ #_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
16299
17334
  #_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
16300
17335
  #_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
16301
17336
  #_gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
@@ -16464,6 +17499,17 @@ export class Organization extends Object {
16464
17499
  "Collection | URL" + ".");
16465
17500
  }
16466
17501
  }
17502
+ if ("featuredTags" in values && values.featuredTags != null) {
17503
+ if (values.featuredTags instanceof Collection ||
17504
+ values.featuredTags instanceof URL) {
17505
+ // @ts-ignore: type is checked above.
17506
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
17507
+ }
17508
+ else {
17509
+ throw new TypeError("The featuredTags must be of type " +
17510
+ "Collection | URL" + ".");
17511
+ }
17512
+ }
16467
17513
  if ("streams" in values && values.streams != null) {
16468
17514
  if (Array.isArray(values.streams) &&
16469
17515
  values.streams.every((v) => v instanceof Collection || v instanceof URL)) {
@@ -16701,6 +17747,18 @@ export class Organization extends Object {
16701
17747
  "Collection | URL" + ".");
16702
17748
  }
16703
17749
  }
17750
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac;
17751
+ if ("featuredTags" in values && values.featuredTags != null) {
17752
+ if (values.featuredTags instanceof Collection ||
17753
+ values.featuredTags instanceof URL) {
17754
+ // @ts-ignore: type is checked above.
17755
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
17756
+ }
17757
+ else {
17758
+ throw new TypeError("The featuredTags must be of type " +
17759
+ "Collection | URL" + ".");
17760
+ }
17761
+ }
16704
17762
  clone.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
16705
17763
  if ("streams" in values && values.streams != null) {
16706
17764
  if (Array.isArray(values.streams) &&
@@ -17332,6 +18390,64 @@ export class Organization extends Object {
17332
18390
  }
17333
18391
  return v;
17334
18392
  }
18393
+ async #fetchFeaturedTags(url, options = {}) {
18394
+ const documentLoader = options.documentLoader ?? this._documentLoader ??
18395
+ fetchDocumentLoader;
18396
+ const contextLoader = options.contextLoader ?? this._contextLoader ??
18397
+ fetchDocumentLoader;
18398
+ let fetchResult;
18399
+ try {
18400
+ fetchResult = await documentLoader(url.href);
18401
+ }
18402
+ catch (error) {
18403
+ if (options.suppressError) {
18404
+ getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
18405
+ return null;
18406
+ }
18407
+ throw error;
18408
+ }
18409
+ const { document } = fetchResult;
18410
+ try {
18411
+ return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
18412
+ }
18413
+ catch (e) {
18414
+ if (!(e instanceof TypeError))
18415
+ throw e;
18416
+ }
18417
+ throw new TypeError("Expected an object of any type of: " +
18418
+ ["https://www.w3.org/ns/activitystreams#Collection"].join(", "));
18419
+ }
18420
+ /**
18421
+ * Similar to
18422
+ * {@link Organization.getFeaturedTags},
18423
+ * but returns its `@id` URL instead of the object itself.
18424
+ */
18425
+ get featuredTagsId() {
18426
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
18427
+ return null;
18428
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
18429
+ if (v instanceof URL)
18430
+ return v;
18431
+ return v.id;
18432
+ }
18433
+ /** What is known in Mastodon as "featured hashtags", hashtags that are featured
18434
+ * at people's profiles, is implemented using an extra property `featuredTags`
18435
+ * on the actor object that points to a {@link Collection} of {@link Hashtag}
18436
+ * objects specifically.
18437
+ */
18438
+ async getFeaturedTags(options = {}) {
18439
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
18440
+ return null;
18441
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
18442
+ if (v instanceof URL) {
18443
+ const fetched = await this.#fetchFeaturedTags(v, options);
18444
+ if (fetched == null)
18445
+ return null;
18446
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0] = fetched;
18447
+ return fetched;
18448
+ }
18449
+ return v;
18450
+ }
17335
18451
  async #fetchStream(url, options = {}) {
17336
18452
  const documentLoader = options.documentLoader ?? this._documentLoader ??
17337
18453
  fetchDocumentLoader;
@@ -17542,6 +18658,16 @@ export class Organization extends Object {
17542
18658
  values["http://joinmastodon.org/ns#featured"] = array;
17543
18659
  }
17544
18660
  array = [];
18661
+ for (const v of this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac) {
18662
+ const element = v instanceof URL
18663
+ ? { "@id": v.href }
18664
+ : await v.toJsonLd(options);
18665
+ array.push(element);
18666
+ }
18667
+ if (array.length > 0) {
18668
+ values["http://joinmastodon.org/ns#featuredTags"] = array;
18669
+ }
18670
+ array = [];
17545
18671
  for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
17546
18672
  const element = v instanceof URL
17547
18673
  ? { "@id": v.href }
@@ -17608,6 +18734,7 @@ export class Organization extends Object {
17608
18734
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
17609
18735
  "toot": "http://joinmastodon.org/ns#",
17610
18736
  "featured": { "@id": "toot:featured", "@type": "@id" },
18737
+ "featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
17611
18738
  "discoverable": "toot:discoverable",
17612
18739
  "suspended": "toot:suspended",
17613
18740
  "memorial": "toot:memorial",
@@ -17659,8 +18786,13 @@ export class Organization extends Object {
17659
18786
  throw new TypeError("Unexpected type: " + instance.constructor.name);
17660
18787
  }
17661
18788
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf = [];
17662
- for (const v of values["https://www.w3.org/ns/activitystreams#preferredUsername"] ??
17663
- []) {
18789
+ const _3isuDgRAKSntq9XdbjiNxjwyPZAf__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
18790
+ for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf__array == null
18791
+ ? []
18792
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array.length === 1 &&
18793
+ "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]
18794
+ ? _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]["@list"]
18795
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array) {
17664
18796
  if (v == null)
17665
18797
  continue;
17666
18798
  const decoded = typeof v === "object" && "@value" in v &&
@@ -17677,7 +18809,13 @@ export class Organization extends Object {
17677
18809
  }
17678
18810
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf = _3isuDgRAKSntq9XdbjiNxjwyPZAf;
17679
18811
  const _axq166E2eZADq34V4MYUc8KMZdC = [];
17680
- for (const v of values["https://w3id.org/security#publicKey"] ?? []) {
18812
+ const _axq166E2eZADq34V4MYUc8KMZdC__array = values["https://w3id.org/security#publicKey"];
18813
+ for (const v of _axq166E2eZADq34V4MYUc8KMZdC__array == null
18814
+ ? []
18815
+ : _axq166E2eZADq34V4MYUc8KMZdC__array.length === 1 &&
18816
+ "@list" in _axq166E2eZADq34V4MYUc8KMZdC__array[0]
18817
+ ? _axq166E2eZADq34V4MYUc8KMZdC__array[0]["@list"]
18818
+ : _axq166E2eZADq34V4MYUc8KMZdC__array) {
17681
18819
  if (v == null)
17682
18820
  continue;
17683
18821
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17689,7 +18827,13 @@ export class Organization extends Object {
17689
18827
  }
17690
18828
  instance.#_axq166E2eZADq34V4MYUc8KMZdC = _axq166E2eZADq34V4MYUc8KMZdC;
17691
18829
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3 = [];
17692
- for (const v of values["https://w3id.org/security#assertionMethod"] ?? []) {
18830
+ const _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array = values["https://w3id.org/security#assertionMethod"];
18831
+ for (const v of _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array == null
18832
+ ? []
18833
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array.length === 1 &&
18834
+ "@list" in _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]
18835
+ ? _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]["@list"]
18836
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array) {
17693
18837
  if (v == null)
17694
18838
  continue;
17695
18839
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17701,14 +18845,26 @@ export class Organization extends Object {
17701
18845
  }
17702
18846
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3 = _4EHQFWZSz1k1d4LmPrQiMba2GbP3;
17703
18847
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA = [];
17704
- for (const v of values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] ?? []) {
18848
+ const _36QNc9MxfkKf6h8sEUQSHnV9NZA__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
18849
+ for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA__array == null
18850
+ ? []
18851
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array.length === 1 &&
18852
+ "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]
18853
+ ? _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]["@list"]
18854
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array) {
17705
18855
  if (v == null)
17706
18856
  continue;
17707
18857
  _36QNc9MxfkKf6h8sEUQSHnV9NZA.push(v["@value"]);
17708
18858
  }
17709
18859
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA = _36QNc9MxfkKf6h8sEUQSHnV9NZA;
17710
18860
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB = [];
17711
- for (const v of values["http://www.w3.org/ns/ldp#inbox"] ?? []) {
18861
+ const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array = values["http://www.w3.org/ns/ldp#inbox"];
18862
+ for (const v of _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array == null
18863
+ ? []
18864
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array.length === 1 &&
18865
+ "@list" in _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]
18866
+ ? _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]["@list"]
18867
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array) {
17712
18868
  if (v == null)
17713
18869
  continue;
17714
18870
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17720,7 +18876,13 @@ export class Organization extends Object {
17720
18876
  }
17721
18877
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB;
17722
18878
  const _41QwhqJouoLg3h8dRPKat21brynC = [];
17723
- for (const v of values["https://www.w3.org/ns/activitystreams#outbox"] ?? []) {
18879
+ const _41QwhqJouoLg3h8dRPKat21brynC__array = values["https://www.w3.org/ns/activitystreams#outbox"];
18880
+ for (const v of _41QwhqJouoLg3h8dRPKat21brynC__array == null
18881
+ ? []
18882
+ : _41QwhqJouoLg3h8dRPKat21brynC__array.length === 1 &&
18883
+ "@list" in _41QwhqJouoLg3h8dRPKat21brynC__array[0]
18884
+ ? _41QwhqJouoLg3h8dRPKat21brynC__array[0]["@list"]
18885
+ : _41QwhqJouoLg3h8dRPKat21brynC__array) {
17724
18886
  if (v == null)
17725
18887
  continue;
17726
18888
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17732,7 +18894,13 @@ export class Organization extends Object {
17732
18894
  }
17733
18895
  instance.#_41QwhqJouoLg3h8dRPKat21brynC = _41QwhqJouoLg3h8dRPKat21brynC;
17734
18896
  const _3yAv8jymNfNuJUDuBzJ1NQhdbAee = [];
17735
- for (const v of values["https://www.w3.org/ns/activitystreams#following"] ?? []) {
18897
+ const _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array = values["https://www.w3.org/ns/activitystreams#following"];
18898
+ for (const v of _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array == null
18899
+ ? []
18900
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array.length === 1 &&
18901
+ "@list" in _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]
18902
+ ? _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]["@list"]
18903
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array) {
17736
18904
  if (v == null)
17737
18905
  continue;
17738
18906
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17744,7 +18912,13 @@ export class Organization extends Object {
17744
18912
  }
17745
18913
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee = _3yAv8jymNfNuJUDuBzJ1NQhdbAee;
17746
18914
  const _BBCTgfphhsFzpVfKTykGSpBNwoA = [];
17747
- for (const v of values["https://www.w3.org/ns/activitystreams#followers"] ?? []) {
18915
+ const _BBCTgfphhsFzpVfKTykGSpBNwoA__array = values["https://www.w3.org/ns/activitystreams#followers"];
18916
+ for (const v of _BBCTgfphhsFzpVfKTykGSpBNwoA__array == null
18917
+ ? []
18918
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array.length === 1 &&
18919
+ "@list" in _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]
18920
+ ? _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]["@list"]
18921
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array) {
17748
18922
  if (v == null)
17749
18923
  continue;
17750
18924
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17756,7 +18930,13 @@ export class Organization extends Object {
17756
18930
  }
17757
18931
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA = _BBCTgfphhsFzpVfKTykGSpBNwoA;
17758
18932
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
17759
- for (const v of values["https://www.w3.org/ns/activitystreams#liked"] ?? []) {
18933
+ const _3bgkPwJanyTCoVFM9ovRcus8tKkU__array = values["https://www.w3.org/ns/activitystreams#liked"];
18934
+ for (const v of _3bgkPwJanyTCoVFM9ovRcus8tKkU__array == null
18935
+ ? []
18936
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array.length === 1 &&
18937
+ "@list" in _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]
18938
+ ? _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]["@list"]
18939
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array) {
17760
18940
  if (v == null)
17761
18941
  continue;
17762
18942
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17768,7 +18948,13 @@ export class Organization extends Object {
17768
18948
  }
17769
18949
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU = _3bgkPwJanyTCoVFM9ovRcus8tKkU;
17770
18950
  const _4N1vBJzXDf8NbBumeECQMFvKetja = [];
17771
- for (const v of values["http://joinmastodon.org/ns#featured"] ?? []) {
18951
+ const _4N1vBJzXDf8NbBumeECQMFvKetja__array = values["http://joinmastodon.org/ns#featured"];
18952
+ for (const v of _4N1vBJzXDf8NbBumeECQMFvKetja__array == null
18953
+ ? []
18954
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array.length === 1 &&
18955
+ "@list" in _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]
18956
+ ? _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]["@list"]
18957
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array) {
17772
18958
  if (v == null)
17773
18959
  continue;
17774
18960
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17779,8 +18965,32 @@ export class Organization extends Object {
17779
18965
  _4N1vBJzXDf8NbBumeECQMFvKetja.push(await Collection.fromJsonLd(v, options));
17780
18966
  }
17781
18967
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja = _4N1vBJzXDf8NbBumeECQMFvKetja;
18968
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
18969
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array = values["http://joinmastodon.org/ns#featuredTags"];
18970
+ for (const v of _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array == null
18971
+ ? []
18972
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array.length === 1 &&
18973
+ "@list" in _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]
18974
+ ? _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]["@list"]
18975
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array) {
18976
+ if (v == null)
18977
+ continue;
18978
+ if (typeof v === "object" && "@id" in v && !("@type" in v) &&
18979
+ globalThis.Object.keys(v).length === 1) {
18980
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(new URL(v["@id"]));
18981
+ continue;
18982
+ }
18983
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(await Collection.fromJsonLd(v, options));
18984
+ }
18985
+ instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = _2MxnRRLq9iPzx5CFq2NPrXdUDCac;
17782
18986
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
17783
- for (const v of values["https://www.w3.org/ns/activitystreams#streams"] ?? []) {
18987
+ const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array = values["https://www.w3.org/ns/activitystreams#streams"];
18988
+ for (const v of _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array == null
18989
+ ? []
18990
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array.length === 1 &&
18991
+ "@list" in _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]
18992
+ ? _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]["@list"]
18993
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array) {
17784
18994
  if (v == null)
17785
18995
  continue;
17786
18996
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -17792,35 +19002,65 @@ export class Organization extends Object {
17792
19002
  }
17793
19003
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
17794
19004
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
17795
- for (const v of values["https://www.w3.org/ns/activitystreams#endpoints"] ?? []) {
19005
+ const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
19006
+ for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array == null
19007
+ ? []
19008
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array.length === 1 &&
19009
+ "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]
19010
+ ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]["@list"]
19011
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array) {
17796
19012
  if (v == null)
17797
19013
  continue;
17798
19014
  _sEoQwUbfk4hEfugzNQ2ZiDcLMkG.push(await Endpoints.fromJsonLd(v, options));
17799
19015
  }
17800
19016
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG;
17801
19017
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
17802
- for (const v of values["http://joinmastodon.org/ns#discoverable"] ?? []) {
19018
+ const _gAJzg1QDc4rcefFsUzGSYmyXvNH__array = values["http://joinmastodon.org/ns#discoverable"];
19019
+ for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH__array == null
19020
+ ? []
19021
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array.length === 1 &&
19022
+ "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]
19023
+ ? _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]["@list"]
19024
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array) {
17803
19025
  if (v == null)
17804
19026
  continue;
17805
19027
  _gAJzg1QDc4rcefFsUzGSYmyXvNH.push(v["@value"]);
17806
19028
  }
17807
19029
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH = _gAJzg1QDc4rcefFsUzGSYmyXvNH;
17808
19030
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7 = [];
17809
- for (const v of values["http://joinmastodon.org/ns#suspended"] ?? []) {
19031
+ const _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array = values["http://joinmastodon.org/ns#suspended"];
19032
+ for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array == null
19033
+ ? []
19034
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array.length === 1 &&
19035
+ "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]
19036
+ ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]["@list"]
19037
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array) {
17810
19038
  if (v == null)
17811
19039
  continue;
17812
19040
  _2kGKkJtoFWg8c18PaVSqj9NKP4t7.push(v["@value"]);
17813
19041
  }
17814
19042
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7 = _2kGKkJtoFWg8c18PaVSqj9NKP4t7;
17815
19043
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ = [];
17816
- for (const v of values["http://joinmastodon.org/ns#memorial"] ?? []) {
19044
+ const _79S8K4f5J9MWUgCxziRyUe6PTHZ__array = values["http://joinmastodon.org/ns#memorial"];
19045
+ for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ__array == null
19046
+ ? []
19047
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array.length === 1 &&
19048
+ "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]
19049
+ ? _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]["@list"]
19050
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array) {
17817
19051
  if (v == null)
17818
19052
  continue;
17819
19053
  _79S8K4f5J9MWUgCxziRyUe6PTHZ.push(v["@value"]);
17820
19054
  }
17821
19055
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ = _79S8K4f5J9MWUgCxziRyUe6PTHZ;
17822
19056
  const _2diCorzqPGQQqftp6e4SrCEwEnyk = [];
17823
- for (const v of values["http://joinmastodon.org/ns#indexable"] ?? []) {
19057
+ const _2diCorzqPGQQqftp6e4SrCEwEnyk__array = values["http://joinmastodon.org/ns#indexable"];
19058
+ for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk__array == null
19059
+ ? []
19060
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array.length === 1 &&
19061
+ "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]
19062
+ ? _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]["@list"]
19063
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array) {
17824
19064
  if (v == null)
17825
19065
  continue;
17826
19066
  _2diCorzqPGQQqftp6e4SrCEwEnyk.push(v["@value"]);
@@ -17955,6 +19195,17 @@ export class Organization extends Object {
17955
19195
  if (_4N1vBJzXDf8NbBumeECQMFvKetja.length == 1) {
17956
19196
  proxy.featured = _4N1vBJzXDf8NbBumeECQMFvKetja[0];
17957
19197
  }
19198
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac
19199
+ // deno-lint-ignore no-explicit-any
19200
+ .map((v) => v instanceof URL
19201
+ ? {
19202
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
19203
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
19204
+ }
19205
+ : v);
19206
+ if (_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length == 1) {
19207
+ proxy.featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
19208
+ }
17958
19209
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9
17959
19210
  // deno-lint-ignore no-explicit-any
17960
19211
  .map((v) => v instanceof URL
@@ -18163,6 +19414,7 @@ export class Person extends Object {
18163
19414
  #_BBCTgfphhsFzpVfKTykGSpBNwoA = [];
18164
19415
  #_3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
18165
19416
  #_4N1vBJzXDf8NbBumeECQMFvKetja = [];
19417
+ #_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
18166
19418
  #_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
18167
19419
  #_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
18168
19420
  #_gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
@@ -18331,6 +19583,17 @@ export class Person extends Object {
18331
19583
  "Collection | URL" + ".");
18332
19584
  }
18333
19585
  }
19586
+ if ("featuredTags" in values && values.featuredTags != null) {
19587
+ if (values.featuredTags instanceof Collection ||
19588
+ values.featuredTags instanceof URL) {
19589
+ // @ts-ignore: type is checked above.
19590
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
19591
+ }
19592
+ else {
19593
+ throw new TypeError("The featuredTags must be of type " +
19594
+ "Collection | URL" + ".");
19595
+ }
19596
+ }
18334
19597
  if ("streams" in values && values.streams != null) {
18335
19598
  if (Array.isArray(values.streams) &&
18336
19599
  values.streams.every((v) => v instanceof Collection || v instanceof URL)) {
@@ -18568,6 +19831,18 @@ export class Person extends Object {
18568
19831
  "Collection | URL" + ".");
18569
19832
  }
18570
19833
  }
19834
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac;
19835
+ if ("featuredTags" in values && values.featuredTags != null) {
19836
+ if (values.featuredTags instanceof Collection ||
19837
+ values.featuredTags instanceof URL) {
19838
+ // @ts-ignore: type is checked above.
19839
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
19840
+ }
19841
+ else {
19842
+ throw new TypeError("The featuredTags must be of type " +
19843
+ "Collection | URL" + ".");
19844
+ }
19845
+ }
18571
19846
  clone.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
18572
19847
  if ("streams" in values && values.streams != null) {
18573
19848
  if (Array.isArray(values.streams) &&
@@ -19199,6 +20474,64 @@ export class Person extends Object {
19199
20474
  }
19200
20475
  return v;
19201
20476
  }
20477
+ async #fetchFeaturedTags(url, options = {}) {
20478
+ const documentLoader = options.documentLoader ?? this._documentLoader ??
20479
+ fetchDocumentLoader;
20480
+ const contextLoader = options.contextLoader ?? this._contextLoader ??
20481
+ fetchDocumentLoader;
20482
+ let fetchResult;
20483
+ try {
20484
+ fetchResult = await documentLoader(url.href);
20485
+ }
20486
+ catch (error) {
20487
+ if (options.suppressError) {
20488
+ getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
20489
+ return null;
20490
+ }
20491
+ throw error;
20492
+ }
20493
+ const { document } = fetchResult;
20494
+ try {
20495
+ return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
20496
+ }
20497
+ catch (e) {
20498
+ if (!(e instanceof TypeError))
20499
+ throw e;
20500
+ }
20501
+ throw new TypeError("Expected an object of any type of: " +
20502
+ ["https://www.w3.org/ns/activitystreams#Collection"].join(", "));
20503
+ }
20504
+ /**
20505
+ * Similar to
20506
+ * {@link Person.getFeaturedTags},
20507
+ * but returns its `@id` URL instead of the object itself.
20508
+ */
20509
+ get featuredTagsId() {
20510
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
20511
+ return null;
20512
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
20513
+ if (v instanceof URL)
20514
+ return v;
20515
+ return v.id;
20516
+ }
20517
+ /** What is known in Mastodon as "featured hashtags", hashtags that are featured
20518
+ * at people's profiles, is implemented using an extra property `featuredTags`
20519
+ * on the actor object that points to a {@link Collection} of {@link Hashtag}
20520
+ * objects specifically.
20521
+ */
20522
+ async getFeaturedTags(options = {}) {
20523
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
20524
+ return null;
20525
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
20526
+ if (v instanceof URL) {
20527
+ const fetched = await this.#fetchFeaturedTags(v, options);
20528
+ if (fetched == null)
20529
+ return null;
20530
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0] = fetched;
20531
+ return fetched;
20532
+ }
20533
+ return v;
20534
+ }
19202
20535
  async #fetchStream(url, options = {}) {
19203
20536
  const documentLoader = options.documentLoader ?? this._documentLoader ??
19204
20537
  fetchDocumentLoader;
@@ -19409,6 +20742,16 @@ export class Person extends Object {
19409
20742
  values["http://joinmastodon.org/ns#featured"] = array;
19410
20743
  }
19411
20744
  array = [];
20745
+ for (const v of this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac) {
20746
+ const element = v instanceof URL
20747
+ ? { "@id": v.href }
20748
+ : await v.toJsonLd(options);
20749
+ array.push(element);
20750
+ }
20751
+ if (array.length > 0) {
20752
+ values["http://joinmastodon.org/ns#featuredTags"] = array;
20753
+ }
20754
+ array = [];
19412
20755
  for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
19413
20756
  const element = v instanceof URL
19414
20757
  ? { "@id": v.href }
@@ -19475,6 +20818,7 @@ export class Person extends Object {
19475
20818
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
19476
20819
  "toot": "http://joinmastodon.org/ns#",
19477
20820
  "featured": { "@id": "toot:featured", "@type": "@id" },
20821
+ "featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
19478
20822
  "discoverable": "toot:discoverable",
19479
20823
  "suspended": "toot:suspended",
19480
20824
  "memorial": "toot:memorial",
@@ -19526,8 +20870,13 @@ export class Person extends Object {
19526
20870
  throw new TypeError("Unexpected type: " + instance.constructor.name);
19527
20871
  }
19528
20872
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf = [];
19529
- for (const v of values["https://www.w3.org/ns/activitystreams#preferredUsername"] ??
19530
- []) {
20873
+ const _3isuDgRAKSntq9XdbjiNxjwyPZAf__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
20874
+ for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf__array == null
20875
+ ? []
20876
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array.length === 1 &&
20877
+ "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]
20878
+ ? _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]["@list"]
20879
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array) {
19531
20880
  if (v == null)
19532
20881
  continue;
19533
20882
  const decoded = typeof v === "object" && "@value" in v &&
@@ -19544,7 +20893,13 @@ export class Person extends Object {
19544
20893
  }
19545
20894
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf = _3isuDgRAKSntq9XdbjiNxjwyPZAf;
19546
20895
  const _axq166E2eZADq34V4MYUc8KMZdC = [];
19547
- for (const v of values["https://w3id.org/security#publicKey"] ?? []) {
20896
+ const _axq166E2eZADq34V4MYUc8KMZdC__array = values["https://w3id.org/security#publicKey"];
20897
+ for (const v of _axq166E2eZADq34V4MYUc8KMZdC__array == null
20898
+ ? []
20899
+ : _axq166E2eZADq34V4MYUc8KMZdC__array.length === 1 &&
20900
+ "@list" in _axq166E2eZADq34V4MYUc8KMZdC__array[0]
20901
+ ? _axq166E2eZADq34V4MYUc8KMZdC__array[0]["@list"]
20902
+ : _axq166E2eZADq34V4MYUc8KMZdC__array) {
19548
20903
  if (v == null)
19549
20904
  continue;
19550
20905
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19556,7 +20911,13 @@ export class Person extends Object {
19556
20911
  }
19557
20912
  instance.#_axq166E2eZADq34V4MYUc8KMZdC = _axq166E2eZADq34V4MYUc8KMZdC;
19558
20913
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3 = [];
19559
- for (const v of values["https://w3id.org/security#assertionMethod"] ?? []) {
20914
+ const _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array = values["https://w3id.org/security#assertionMethod"];
20915
+ for (const v of _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array == null
20916
+ ? []
20917
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array.length === 1 &&
20918
+ "@list" in _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]
20919
+ ? _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]["@list"]
20920
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array) {
19560
20921
  if (v == null)
19561
20922
  continue;
19562
20923
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19568,14 +20929,26 @@ export class Person extends Object {
19568
20929
  }
19569
20930
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3 = _4EHQFWZSz1k1d4LmPrQiMba2GbP3;
19570
20931
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA = [];
19571
- for (const v of values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] ?? []) {
20932
+ const _36QNc9MxfkKf6h8sEUQSHnV9NZA__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
20933
+ for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA__array == null
20934
+ ? []
20935
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array.length === 1 &&
20936
+ "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]
20937
+ ? _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]["@list"]
20938
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array) {
19572
20939
  if (v == null)
19573
20940
  continue;
19574
20941
  _36QNc9MxfkKf6h8sEUQSHnV9NZA.push(v["@value"]);
19575
20942
  }
19576
20943
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA = _36QNc9MxfkKf6h8sEUQSHnV9NZA;
19577
20944
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB = [];
19578
- for (const v of values["http://www.w3.org/ns/ldp#inbox"] ?? []) {
20945
+ const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array = values["http://www.w3.org/ns/ldp#inbox"];
20946
+ for (const v of _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array == null
20947
+ ? []
20948
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array.length === 1 &&
20949
+ "@list" in _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]
20950
+ ? _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]["@list"]
20951
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array) {
19579
20952
  if (v == null)
19580
20953
  continue;
19581
20954
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19587,7 +20960,13 @@ export class Person extends Object {
19587
20960
  }
19588
20961
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB;
19589
20962
  const _41QwhqJouoLg3h8dRPKat21brynC = [];
19590
- for (const v of values["https://www.w3.org/ns/activitystreams#outbox"] ?? []) {
20963
+ const _41QwhqJouoLg3h8dRPKat21brynC__array = values["https://www.w3.org/ns/activitystreams#outbox"];
20964
+ for (const v of _41QwhqJouoLg3h8dRPKat21brynC__array == null
20965
+ ? []
20966
+ : _41QwhqJouoLg3h8dRPKat21brynC__array.length === 1 &&
20967
+ "@list" in _41QwhqJouoLg3h8dRPKat21brynC__array[0]
20968
+ ? _41QwhqJouoLg3h8dRPKat21brynC__array[0]["@list"]
20969
+ : _41QwhqJouoLg3h8dRPKat21brynC__array) {
19591
20970
  if (v == null)
19592
20971
  continue;
19593
20972
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19599,7 +20978,13 @@ export class Person extends Object {
19599
20978
  }
19600
20979
  instance.#_41QwhqJouoLg3h8dRPKat21brynC = _41QwhqJouoLg3h8dRPKat21brynC;
19601
20980
  const _3yAv8jymNfNuJUDuBzJ1NQhdbAee = [];
19602
- for (const v of values["https://www.w3.org/ns/activitystreams#following"] ?? []) {
20981
+ const _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array = values["https://www.w3.org/ns/activitystreams#following"];
20982
+ for (const v of _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array == null
20983
+ ? []
20984
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array.length === 1 &&
20985
+ "@list" in _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]
20986
+ ? _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]["@list"]
20987
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array) {
19603
20988
  if (v == null)
19604
20989
  continue;
19605
20990
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19611,7 +20996,13 @@ export class Person extends Object {
19611
20996
  }
19612
20997
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee = _3yAv8jymNfNuJUDuBzJ1NQhdbAee;
19613
20998
  const _BBCTgfphhsFzpVfKTykGSpBNwoA = [];
19614
- for (const v of values["https://www.w3.org/ns/activitystreams#followers"] ?? []) {
20999
+ const _BBCTgfphhsFzpVfKTykGSpBNwoA__array = values["https://www.w3.org/ns/activitystreams#followers"];
21000
+ for (const v of _BBCTgfphhsFzpVfKTykGSpBNwoA__array == null
21001
+ ? []
21002
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array.length === 1 &&
21003
+ "@list" in _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]
21004
+ ? _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]["@list"]
21005
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array) {
19615
21006
  if (v == null)
19616
21007
  continue;
19617
21008
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19623,7 +21014,13 @@ export class Person extends Object {
19623
21014
  }
19624
21015
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA = _BBCTgfphhsFzpVfKTykGSpBNwoA;
19625
21016
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
19626
- for (const v of values["https://www.w3.org/ns/activitystreams#liked"] ?? []) {
21017
+ const _3bgkPwJanyTCoVFM9ovRcus8tKkU__array = values["https://www.w3.org/ns/activitystreams#liked"];
21018
+ for (const v of _3bgkPwJanyTCoVFM9ovRcus8tKkU__array == null
21019
+ ? []
21020
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array.length === 1 &&
21021
+ "@list" in _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]
21022
+ ? _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]["@list"]
21023
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array) {
19627
21024
  if (v == null)
19628
21025
  continue;
19629
21026
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19635,7 +21032,13 @@ export class Person extends Object {
19635
21032
  }
19636
21033
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU = _3bgkPwJanyTCoVFM9ovRcus8tKkU;
19637
21034
  const _4N1vBJzXDf8NbBumeECQMFvKetja = [];
19638
- for (const v of values["http://joinmastodon.org/ns#featured"] ?? []) {
21035
+ const _4N1vBJzXDf8NbBumeECQMFvKetja__array = values["http://joinmastodon.org/ns#featured"];
21036
+ for (const v of _4N1vBJzXDf8NbBumeECQMFvKetja__array == null
21037
+ ? []
21038
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array.length === 1 &&
21039
+ "@list" in _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]
21040
+ ? _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]["@list"]
21041
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array) {
19639
21042
  if (v == null)
19640
21043
  continue;
19641
21044
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19646,8 +21049,32 @@ export class Person extends Object {
19646
21049
  _4N1vBJzXDf8NbBumeECQMFvKetja.push(await Collection.fromJsonLd(v, options));
19647
21050
  }
19648
21051
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja = _4N1vBJzXDf8NbBumeECQMFvKetja;
21052
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
21053
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array = values["http://joinmastodon.org/ns#featuredTags"];
21054
+ for (const v of _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array == null
21055
+ ? []
21056
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array.length === 1 &&
21057
+ "@list" in _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]
21058
+ ? _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]["@list"]
21059
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array) {
21060
+ if (v == null)
21061
+ continue;
21062
+ if (typeof v === "object" && "@id" in v && !("@type" in v) &&
21063
+ globalThis.Object.keys(v).length === 1) {
21064
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(new URL(v["@id"]));
21065
+ continue;
21066
+ }
21067
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(await Collection.fromJsonLd(v, options));
21068
+ }
21069
+ instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = _2MxnRRLq9iPzx5CFq2NPrXdUDCac;
19649
21070
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
19650
- for (const v of values["https://www.w3.org/ns/activitystreams#streams"] ?? []) {
21071
+ const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array = values["https://www.w3.org/ns/activitystreams#streams"];
21072
+ for (const v of _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array == null
21073
+ ? []
21074
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array.length === 1 &&
21075
+ "@list" in _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]
21076
+ ? _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]["@list"]
21077
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array) {
19651
21078
  if (v == null)
19652
21079
  continue;
19653
21080
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -19659,35 +21086,65 @@ export class Person extends Object {
19659
21086
  }
19660
21087
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
19661
21088
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
19662
- for (const v of values["https://www.w3.org/ns/activitystreams#endpoints"] ?? []) {
21089
+ const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
21090
+ for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array == null
21091
+ ? []
21092
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array.length === 1 &&
21093
+ "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]
21094
+ ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]["@list"]
21095
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array) {
19663
21096
  if (v == null)
19664
21097
  continue;
19665
21098
  _sEoQwUbfk4hEfugzNQ2ZiDcLMkG.push(await Endpoints.fromJsonLd(v, options));
19666
21099
  }
19667
21100
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG;
19668
21101
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
19669
- for (const v of values["http://joinmastodon.org/ns#discoverable"] ?? []) {
21102
+ const _gAJzg1QDc4rcefFsUzGSYmyXvNH__array = values["http://joinmastodon.org/ns#discoverable"];
21103
+ for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH__array == null
21104
+ ? []
21105
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array.length === 1 &&
21106
+ "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]
21107
+ ? _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]["@list"]
21108
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array) {
19670
21109
  if (v == null)
19671
21110
  continue;
19672
21111
  _gAJzg1QDc4rcefFsUzGSYmyXvNH.push(v["@value"]);
19673
21112
  }
19674
21113
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH = _gAJzg1QDc4rcefFsUzGSYmyXvNH;
19675
21114
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7 = [];
19676
- for (const v of values["http://joinmastodon.org/ns#suspended"] ?? []) {
21115
+ const _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array = values["http://joinmastodon.org/ns#suspended"];
21116
+ for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array == null
21117
+ ? []
21118
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array.length === 1 &&
21119
+ "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]
21120
+ ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]["@list"]
21121
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array) {
19677
21122
  if (v == null)
19678
21123
  continue;
19679
21124
  _2kGKkJtoFWg8c18PaVSqj9NKP4t7.push(v["@value"]);
19680
21125
  }
19681
21126
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7 = _2kGKkJtoFWg8c18PaVSqj9NKP4t7;
19682
21127
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ = [];
19683
- for (const v of values["http://joinmastodon.org/ns#memorial"] ?? []) {
21128
+ const _79S8K4f5J9MWUgCxziRyUe6PTHZ__array = values["http://joinmastodon.org/ns#memorial"];
21129
+ for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ__array == null
21130
+ ? []
21131
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array.length === 1 &&
21132
+ "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]
21133
+ ? _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]["@list"]
21134
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array) {
19684
21135
  if (v == null)
19685
21136
  continue;
19686
21137
  _79S8K4f5J9MWUgCxziRyUe6PTHZ.push(v["@value"]);
19687
21138
  }
19688
21139
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ = _79S8K4f5J9MWUgCxziRyUe6PTHZ;
19689
21140
  const _2diCorzqPGQQqftp6e4SrCEwEnyk = [];
19690
- for (const v of values["http://joinmastodon.org/ns#indexable"] ?? []) {
21141
+ const _2diCorzqPGQQqftp6e4SrCEwEnyk__array = values["http://joinmastodon.org/ns#indexable"];
21142
+ for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk__array == null
21143
+ ? []
21144
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array.length === 1 &&
21145
+ "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]
21146
+ ? _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]["@list"]
21147
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array) {
19691
21148
  if (v == null)
19692
21149
  continue;
19693
21150
  _2diCorzqPGQQqftp6e4SrCEwEnyk.push(v["@value"]);
@@ -19822,6 +21279,17 @@ export class Person extends Object {
19822
21279
  if (_4N1vBJzXDf8NbBumeECQMFvKetja.length == 1) {
19823
21280
  proxy.featured = _4N1vBJzXDf8NbBumeECQMFvKetja[0];
19824
21281
  }
21282
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac
21283
+ // deno-lint-ignore no-explicit-any
21284
+ .map((v) => v instanceof URL
21285
+ ? {
21286
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
21287
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
21288
+ }
21289
+ : v);
21290
+ if (_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length == 1) {
21291
+ proxy.featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
21292
+ }
19825
21293
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9
19826
21294
  // deno-lint-ignore no-explicit-any
19827
21295
  .map((v) => v instanceof URL
@@ -20253,42 +21721,78 @@ export class Place extends Object {
20253
21721
  throw new TypeError("Unexpected type: " + instance.constructor.name);
20254
21722
  }
20255
21723
  const _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne = [];
20256
- for (const v of values["https://www.w3.org/ns/activitystreams#accuracy"] ?? []) {
21724
+ const _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne__array = values["https://www.w3.org/ns/activitystreams#accuracy"];
21725
+ for (const v of _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne__array == null
21726
+ ? []
21727
+ : _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne__array.length === 1 &&
21728
+ "@list" in _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne__array[0]
21729
+ ? _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne__array[0]["@list"]
21730
+ : _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne__array) {
20257
21731
  if (v == null)
20258
21732
  continue;
20259
21733
  _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne.push(v["@value"]);
20260
21734
  }
20261
21735
  instance.#_3UCsHnBHvDAXJnBuzw3zw1VVs3Ne = _3UCsHnBHvDAXJnBuzw3zw1VVs3Ne;
20262
21736
  const _3Q6KDcFQUJRRaBux1BL2yp5QWiBi = [];
20263
- for (const v of values["https://www.w3.org/ns/activitystreams#altitude"] ?? []) {
21737
+ const _3Q6KDcFQUJRRaBux1BL2yp5QWiBi__array = values["https://www.w3.org/ns/activitystreams#altitude"];
21738
+ for (const v of _3Q6KDcFQUJRRaBux1BL2yp5QWiBi__array == null
21739
+ ? []
21740
+ : _3Q6KDcFQUJRRaBux1BL2yp5QWiBi__array.length === 1 &&
21741
+ "@list" in _3Q6KDcFQUJRRaBux1BL2yp5QWiBi__array[0]
21742
+ ? _3Q6KDcFQUJRRaBux1BL2yp5QWiBi__array[0]["@list"]
21743
+ : _3Q6KDcFQUJRRaBux1BL2yp5QWiBi__array) {
20264
21744
  if (v == null)
20265
21745
  continue;
20266
21746
  _3Q6KDcFQUJRRaBux1BL2yp5QWiBi.push(v["@value"]);
20267
21747
  }
20268
21748
  instance.#_3Q6KDcFQUJRRaBux1BL2yp5QWiBi = _3Q6KDcFQUJRRaBux1BL2yp5QWiBi;
20269
21749
  const _3g85RoKRnaNjP7DFyLSvsWDg7HGM = [];
20270
- for (const v of values["https://www.w3.org/ns/activitystreams#latitude"] ?? []) {
21750
+ const _3g85RoKRnaNjP7DFyLSvsWDg7HGM__array = values["https://www.w3.org/ns/activitystreams#latitude"];
21751
+ for (const v of _3g85RoKRnaNjP7DFyLSvsWDg7HGM__array == null
21752
+ ? []
21753
+ : _3g85RoKRnaNjP7DFyLSvsWDg7HGM__array.length === 1 &&
21754
+ "@list" in _3g85RoKRnaNjP7DFyLSvsWDg7HGM__array[0]
21755
+ ? _3g85RoKRnaNjP7DFyLSvsWDg7HGM__array[0]["@list"]
21756
+ : _3g85RoKRnaNjP7DFyLSvsWDg7HGM__array) {
20271
21757
  if (v == null)
20272
21758
  continue;
20273
21759
  _3g85RoKRnaNjP7DFyLSvsWDg7HGM.push(v["@value"]);
20274
21760
  }
20275
21761
  instance.#_3g85RoKRnaNjP7DFyLSvsWDg7HGM = _3g85RoKRnaNjP7DFyLSvsWDg7HGM;
20276
21762
  const _B2GEYdS9yBAF3ho1pm1rcRg7cSf = [];
20277
- for (const v of values["https://www.w3.org/ns/activitystreams#longitude"] ?? []) {
21763
+ const _B2GEYdS9yBAF3ho1pm1rcRg7cSf__array = values["https://www.w3.org/ns/activitystreams#longitude"];
21764
+ for (const v of _B2GEYdS9yBAF3ho1pm1rcRg7cSf__array == null
21765
+ ? []
21766
+ : _B2GEYdS9yBAF3ho1pm1rcRg7cSf__array.length === 1 &&
21767
+ "@list" in _B2GEYdS9yBAF3ho1pm1rcRg7cSf__array[0]
21768
+ ? _B2GEYdS9yBAF3ho1pm1rcRg7cSf__array[0]["@list"]
21769
+ : _B2GEYdS9yBAF3ho1pm1rcRg7cSf__array) {
20278
21770
  if (v == null)
20279
21771
  continue;
20280
21772
  _B2GEYdS9yBAF3ho1pm1rcRg7cSf.push(v["@value"]);
20281
21773
  }
20282
21774
  instance.#_B2GEYdS9yBAF3ho1pm1rcRg7cSf = _B2GEYdS9yBAF3ho1pm1rcRg7cSf;
20283
21775
  const _3ga86BKHUtRkGx5PHBjRiUXXzwnw = [];
20284
- for (const v of values["https://www.w3.org/ns/activitystreams#radius"] ?? []) {
21776
+ const _3ga86BKHUtRkGx5PHBjRiUXXzwnw__array = values["https://www.w3.org/ns/activitystreams#radius"];
21777
+ for (const v of _3ga86BKHUtRkGx5PHBjRiUXXzwnw__array == null
21778
+ ? []
21779
+ : _3ga86BKHUtRkGx5PHBjRiUXXzwnw__array.length === 1 &&
21780
+ "@list" in _3ga86BKHUtRkGx5PHBjRiUXXzwnw__array[0]
21781
+ ? _3ga86BKHUtRkGx5PHBjRiUXXzwnw__array[0]["@list"]
21782
+ : _3ga86BKHUtRkGx5PHBjRiUXXzwnw__array) {
20285
21783
  if (v == null)
20286
21784
  continue;
20287
21785
  _3ga86BKHUtRkGx5PHBjRiUXXzwnw.push(v["@value"]);
20288
21786
  }
20289
21787
  instance.#_3ga86BKHUtRkGx5PHBjRiUXXzwnw = _3ga86BKHUtRkGx5PHBjRiUXXzwnw;
20290
21788
  const _oKrwxU4V8wiKhMW1QEYQibcJh8c = [];
20291
- for (const v of values["https://www.w3.org/ns/activitystreams#units"] ?? []) {
21789
+ const _oKrwxU4V8wiKhMW1QEYQibcJh8c__array = values["https://www.w3.org/ns/activitystreams#units"];
21790
+ for (const v of _oKrwxU4V8wiKhMW1QEYQibcJh8c__array == null
21791
+ ? []
21792
+ : _oKrwxU4V8wiKhMW1QEYQibcJh8c__array.length === 1 &&
21793
+ "@list" in _oKrwxU4V8wiKhMW1QEYQibcJh8c__array[0]
21794
+ ? _oKrwxU4V8wiKhMW1QEYQibcJh8c__array[0]["@list"]
21795
+ : _oKrwxU4V8wiKhMW1QEYQibcJh8c__array) {
20292
21796
  if (v == null)
20293
21797
  continue;
20294
21798
  const decoded = typeof v === "object" && "@value" in v &&
@@ -20574,7 +22078,13 @@ export class Profile extends Object {
20574
22078
  throw new TypeError("Unexpected type: " + instance.constructor.name);
20575
22079
  }
20576
22080
  const _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1 = [];
20577
- for (const v of values["https://www.w3.org/ns/activitystreams#describes"] ?? []) {
22081
+ const _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1__array = values["https://www.w3.org/ns/activitystreams#describes"];
22082
+ for (const v of _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1__array == null
22083
+ ? []
22084
+ : _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1__array.length === 1 &&
22085
+ "@list" in _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1__array[0]
22086
+ ? _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1__array[0]["@list"]
22087
+ : _3CLQ1PLSXrhSQbTGGHuxNyaEFKM1__array) {
20578
22088
  if (v == null)
20579
22089
  continue;
20580
22090
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -20895,7 +22405,13 @@ export class Question extends IntransitiveActivity {
20895
22405
  throw new TypeError("Unexpected type: " + instance.constructor.name);
20896
22406
  }
20897
22407
  const _2N5scKaVEcdYHFmfKYYacAwUhUgQ = [];
20898
- for (const v of values["https://www.w3.org/ns/activitystreams#oneOf"] ?? []) {
22408
+ const _2N5scKaVEcdYHFmfKYYacAwUhUgQ__array = values["https://www.w3.org/ns/activitystreams#oneOf"];
22409
+ for (const v of _2N5scKaVEcdYHFmfKYYacAwUhUgQ__array == null
22410
+ ? []
22411
+ : _2N5scKaVEcdYHFmfKYYacAwUhUgQ__array.length === 1 &&
22412
+ "@list" in _2N5scKaVEcdYHFmfKYYacAwUhUgQ__array[0]
22413
+ ? _2N5scKaVEcdYHFmfKYYacAwUhUgQ__array[0]["@list"]
22414
+ : _2N5scKaVEcdYHFmfKYYacAwUhUgQ__array) {
20899
22415
  if (v == null)
20900
22416
  continue;
20901
22417
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -20907,7 +22423,13 @@ export class Question extends IntransitiveActivity {
20907
22423
  }
20908
22424
  instance.#_2N5scKaVEcdYHFmfKYYacAwUhUgQ = _2N5scKaVEcdYHFmfKYYacAwUhUgQ;
20909
22425
  const _2mV6isMTPRKbWdLCjcpiEysq5dAY = [];
20910
- for (const v of values["https://www.w3.org/ns/activitystreams#anyOf"] ?? []) {
22426
+ const _2mV6isMTPRKbWdLCjcpiEysq5dAY__array = values["https://www.w3.org/ns/activitystreams#anyOf"];
22427
+ for (const v of _2mV6isMTPRKbWdLCjcpiEysq5dAY__array == null
22428
+ ? []
22429
+ : _2mV6isMTPRKbWdLCjcpiEysq5dAY__array.length === 1 &&
22430
+ "@list" in _2mV6isMTPRKbWdLCjcpiEysq5dAY__array[0]
22431
+ ? _2mV6isMTPRKbWdLCjcpiEysq5dAY__array[0]["@list"]
22432
+ : _2mV6isMTPRKbWdLCjcpiEysq5dAY__array) {
20911
22433
  if (v == null)
20912
22434
  continue;
20913
22435
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -21556,7 +23078,13 @@ export class Relationship extends Object {
21556
23078
  throw new TypeError("Unexpected type: " + instance.constructor.name);
21557
23079
  }
21558
23080
  const _2Zqdmi46ZnDQsECS6mzwhrv3rUKq = [];
21559
- for (const v of values["https://www.w3.org/ns/activitystreams#subject"] ?? []) {
23081
+ const _2Zqdmi46ZnDQsECS6mzwhrv3rUKq__array = values["https://www.w3.org/ns/activitystreams#subject"];
23082
+ for (const v of _2Zqdmi46ZnDQsECS6mzwhrv3rUKq__array == null
23083
+ ? []
23084
+ : _2Zqdmi46ZnDQsECS6mzwhrv3rUKq__array.length === 1 &&
23085
+ "@list" in _2Zqdmi46ZnDQsECS6mzwhrv3rUKq__array[0]
23086
+ ? _2Zqdmi46ZnDQsECS6mzwhrv3rUKq__array[0]["@list"]
23087
+ : _2Zqdmi46ZnDQsECS6mzwhrv3rUKq__array) {
21560
23088
  if (v == null)
21561
23089
  continue;
21562
23090
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -21568,7 +23096,13 @@ export class Relationship extends Object {
21568
23096
  }
21569
23097
  instance.#_2Zqdmi46ZnDQsECS6mzwhrv3rUKq = _2Zqdmi46ZnDQsECS6mzwhrv3rUKq;
21570
23098
  const _2MH19yxjn1wnHsNfa5n4JBhJzxyc = [];
21571
- for (const v of values["https://www.w3.org/ns/activitystreams#object"] ?? []) {
23099
+ const _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array = values["https://www.w3.org/ns/activitystreams#object"];
23100
+ for (const v of _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array == null
23101
+ ? []
23102
+ : _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array.length === 1 &&
23103
+ "@list" in _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array[0]
23104
+ ? _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array[0]["@list"]
23105
+ : _2MH19yxjn1wnHsNfa5n4JBhJzxyc__array) {
21572
23106
  if (v == null)
21573
23107
  continue;
21574
23108
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -21580,8 +23114,13 @@ export class Relationship extends Object {
21580
23114
  }
21581
23115
  instance.#_2MH19yxjn1wnHsNfa5n4JBhJzxyc = _2MH19yxjn1wnHsNfa5n4JBhJzxyc;
21582
23116
  const _4Lzz89F9qipAQSGkWyX9DGWiUojG = [];
21583
- for (const v of values["https://www.w3.org/ns/activitystreams#relationship"] ??
21584
- []) {
23117
+ const _4Lzz89F9qipAQSGkWyX9DGWiUojG__array = values["https://www.w3.org/ns/activitystreams#relationship"];
23118
+ for (const v of _4Lzz89F9qipAQSGkWyX9DGWiUojG__array == null
23119
+ ? []
23120
+ : _4Lzz89F9qipAQSGkWyX9DGWiUojG__array.length === 1 &&
23121
+ "@list" in _4Lzz89F9qipAQSGkWyX9DGWiUojG__array[0]
23122
+ ? _4Lzz89F9qipAQSGkWyX9DGWiUojG__array[0]["@list"]
23123
+ : _4Lzz89F9qipAQSGkWyX9DGWiUojG__array) {
21585
23124
  if (v == null)
21586
23125
  continue;
21587
23126
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -21780,6 +23319,7 @@ export class Service extends Object {
21780
23319
  #_BBCTgfphhsFzpVfKTykGSpBNwoA = [];
21781
23320
  #_3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
21782
23321
  #_4N1vBJzXDf8NbBumeECQMFvKetja = [];
23322
+ #_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
21783
23323
  #_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
21784
23324
  #_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
21785
23325
  #_gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
@@ -21948,6 +23488,17 @@ export class Service extends Object {
21948
23488
  "Collection | URL" + ".");
21949
23489
  }
21950
23490
  }
23491
+ if ("featuredTags" in values && values.featuredTags != null) {
23492
+ if (values.featuredTags instanceof Collection ||
23493
+ values.featuredTags instanceof URL) {
23494
+ // @ts-ignore: type is checked above.
23495
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
23496
+ }
23497
+ else {
23498
+ throw new TypeError("The featuredTags must be of type " +
23499
+ "Collection | URL" + ".");
23500
+ }
23501
+ }
21951
23502
  if ("streams" in values && values.streams != null) {
21952
23503
  if (Array.isArray(values.streams) &&
21953
23504
  values.streams.every((v) => v instanceof Collection || v instanceof URL)) {
@@ -22185,6 +23736,18 @@ export class Service extends Object {
22185
23736
  "Collection | URL" + ".");
22186
23737
  }
22187
23738
  }
23739
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac;
23740
+ if ("featuredTags" in values && values.featuredTags != null) {
23741
+ if (values.featuredTags instanceof Collection ||
23742
+ values.featuredTags instanceof URL) {
23743
+ // @ts-ignore: type is checked above.
23744
+ clone.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = [values.featuredTags];
23745
+ }
23746
+ else {
23747
+ throw new TypeError("The featuredTags must be of type " +
23748
+ "Collection | URL" + ".");
23749
+ }
23750
+ }
22188
23751
  clone.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
22189
23752
  if ("streams" in values && values.streams != null) {
22190
23753
  if (Array.isArray(values.streams) &&
@@ -22816,6 +24379,64 @@ export class Service extends Object {
22816
24379
  }
22817
24380
  return v;
22818
24381
  }
24382
+ async #fetchFeaturedTags(url, options = {}) {
24383
+ const documentLoader = options.documentLoader ?? this._documentLoader ??
24384
+ fetchDocumentLoader;
24385
+ const contextLoader = options.contextLoader ?? this._contextLoader ??
24386
+ fetchDocumentLoader;
24387
+ let fetchResult;
24388
+ try {
24389
+ fetchResult = await documentLoader(url.href);
24390
+ }
24391
+ catch (error) {
24392
+ if (options.suppressError) {
24393
+ getLogger(["fedify", "vocab"]).error("Failed to fetch {url}: {error}", { error, url: url.href });
24394
+ return null;
24395
+ }
24396
+ throw error;
24397
+ }
24398
+ const { document } = fetchResult;
24399
+ try {
24400
+ return await Collection.fromJsonLd(document, { documentLoader, contextLoader });
24401
+ }
24402
+ catch (e) {
24403
+ if (!(e instanceof TypeError))
24404
+ throw e;
24405
+ }
24406
+ throw new TypeError("Expected an object of any type of: " +
24407
+ ["https://www.w3.org/ns/activitystreams#Collection"].join(", "));
24408
+ }
24409
+ /**
24410
+ * Similar to
24411
+ * {@link Service.getFeaturedTags},
24412
+ * but returns its `@id` URL instead of the object itself.
24413
+ */
24414
+ get featuredTagsId() {
24415
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
24416
+ return null;
24417
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
24418
+ if (v instanceof URL)
24419
+ return v;
24420
+ return v.id;
24421
+ }
24422
+ /** What is known in Mastodon as "featured hashtags", hashtags that are featured
24423
+ * at people's profiles, is implemented using an extra property `featuredTags`
24424
+ * on the actor object that points to a {@link Collection} of {@link Hashtag}
24425
+ * objects specifically.
24426
+ */
24427
+ async getFeaturedTags(options = {}) {
24428
+ if (this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length < 1)
24429
+ return null;
24430
+ const v = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
24431
+ if (v instanceof URL) {
24432
+ const fetched = await this.#fetchFeaturedTags(v, options);
24433
+ if (fetched == null)
24434
+ return null;
24435
+ this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac[0] = fetched;
24436
+ return fetched;
24437
+ }
24438
+ return v;
24439
+ }
22819
24440
  async #fetchStream(url, options = {}) {
22820
24441
  const documentLoader = options.documentLoader ?? this._documentLoader ??
22821
24442
  fetchDocumentLoader;
@@ -23026,6 +24647,16 @@ export class Service extends Object {
23026
24647
  values["http://joinmastodon.org/ns#featured"] = array;
23027
24648
  }
23028
24649
  array = [];
24650
+ for (const v of this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac) {
24651
+ const element = v instanceof URL
24652
+ ? { "@id": v.href }
24653
+ : await v.toJsonLd(options);
24654
+ array.push(element);
24655
+ }
24656
+ if (array.length > 0) {
24657
+ values["http://joinmastodon.org/ns#featuredTags"] = array;
24658
+ }
24659
+ array = [];
23029
24660
  for (const v of this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9) {
23030
24661
  const element = v instanceof URL
23031
24662
  ? { "@id": v.href }
@@ -23092,6 +24723,7 @@ export class Service extends Object {
23092
24723
  "manuallyApprovesFollowers": "as:manuallyApprovesFollowers",
23093
24724
  "toot": "http://joinmastodon.org/ns#",
23094
24725
  "featured": { "@id": "toot:featured", "@type": "@id" },
24726
+ "featuredTags": { "@id": "toot:featuredTags", "@type": "@id" },
23095
24727
  "discoverable": "toot:discoverable",
23096
24728
  "suspended": "toot:suspended",
23097
24729
  "memorial": "toot:memorial",
@@ -23143,8 +24775,13 @@ export class Service extends Object {
23143
24775
  throw new TypeError("Unexpected type: " + instance.constructor.name);
23144
24776
  }
23145
24777
  const _3isuDgRAKSntq9XdbjiNxjwyPZAf = [];
23146
- for (const v of values["https://www.w3.org/ns/activitystreams#preferredUsername"] ??
23147
- []) {
24778
+ const _3isuDgRAKSntq9XdbjiNxjwyPZAf__array = values["https://www.w3.org/ns/activitystreams#preferredUsername"];
24779
+ for (const v of _3isuDgRAKSntq9XdbjiNxjwyPZAf__array == null
24780
+ ? []
24781
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array.length === 1 &&
24782
+ "@list" in _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]
24783
+ ? _3isuDgRAKSntq9XdbjiNxjwyPZAf__array[0]["@list"]
24784
+ : _3isuDgRAKSntq9XdbjiNxjwyPZAf__array) {
23148
24785
  if (v == null)
23149
24786
  continue;
23150
24787
  const decoded = typeof v === "object" && "@value" in v &&
@@ -23161,7 +24798,13 @@ export class Service extends Object {
23161
24798
  }
23162
24799
  instance.#_3isuDgRAKSntq9XdbjiNxjwyPZAf = _3isuDgRAKSntq9XdbjiNxjwyPZAf;
23163
24800
  const _axq166E2eZADq34V4MYUc8KMZdC = [];
23164
- for (const v of values["https://w3id.org/security#publicKey"] ?? []) {
24801
+ const _axq166E2eZADq34V4MYUc8KMZdC__array = values["https://w3id.org/security#publicKey"];
24802
+ for (const v of _axq166E2eZADq34V4MYUc8KMZdC__array == null
24803
+ ? []
24804
+ : _axq166E2eZADq34V4MYUc8KMZdC__array.length === 1 &&
24805
+ "@list" in _axq166E2eZADq34V4MYUc8KMZdC__array[0]
24806
+ ? _axq166E2eZADq34V4MYUc8KMZdC__array[0]["@list"]
24807
+ : _axq166E2eZADq34V4MYUc8KMZdC__array) {
23165
24808
  if (v == null)
23166
24809
  continue;
23167
24810
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23173,7 +24816,13 @@ export class Service extends Object {
23173
24816
  }
23174
24817
  instance.#_axq166E2eZADq34V4MYUc8KMZdC = _axq166E2eZADq34V4MYUc8KMZdC;
23175
24818
  const _4EHQFWZSz1k1d4LmPrQiMba2GbP3 = [];
23176
- for (const v of values["https://w3id.org/security#assertionMethod"] ?? []) {
24819
+ const _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array = values["https://w3id.org/security#assertionMethod"];
24820
+ for (const v of _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array == null
24821
+ ? []
24822
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array.length === 1 &&
24823
+ "@list" in _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]
24824
+ ? _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array[0]["@list"]
24825
+ : _4EHQFWZSz1k1d4LmPrQiMba2GbP3__array) {
23177
24826
  if (v == null)
23178
24827
  continue;
23179
24828
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23185,14 +24834,26 @@ export class Service extends Object {
23185
24834
  }
23186
24835
  instance.#_4EHQFWZSz1k1d4LmPrQiMba2GbP3 = _4EHQFWZSz1k1d4LmPrQiMba2GbP3;
23187
24836
  const _36QNc9MxfkKf6h8sEUQSHnV9NZA = [];
23188
- for (const v of values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"] ?? []) {
24837
+ const _36QNc9MxfkKf6h8sEUQSHnV9NZA__array = values["https://www.w3.org/ns/activitystreams#manuallyApprovesFollowers"];
24838
+ for (const v of _36QNc9MxfkKf6h8sEUQSHnV9NZA__array == null
24839
+ ? []
24840
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array.length === 1 &&
24841
+ "@list" in _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]
24842
+ ? _36QNc9MxfkKf6h8sEUQSHnV9NZA__array[0]["@list"]
24843
+ : _36QNc9MxfkKf6h8sEUQSHnV9NZA__array) {
23189
24844
  if (v == null)
23190
24845
  continue;
23191
24846
  _36QNc9MxfkKf6h8sEUQSHnV9NZA.push(v["@value"]);
23192
24847
  }
23193
24848
  instance.#_36QNc9MxfkKf6h8sEUQSHnV9NZA = _36QNc9MxfkKf6h8sEUQSHnV9NZA;
23194
24849
  const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB = [];
23195
- for (const v of values["http://www.w3.org/ns/ldp#inbox"] ?? []) {
24850
+ const _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array = values["http://www.w3.org/ns/ldp#inbox"];
24851
+ for (const v of _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array == null
24852
+ ? []
24853
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array.length === 1 &&
24854
+ "@list" in _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]
24855
+ ? _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array[0]["@list"]
24856
+ : _3ghX3VfZXXbLvhCRH7QJqpzLrXjB__array) {
23196
24857
  if (v == null)
23197
24858
  continue;
23198
24859
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23204,7 +24865,13 @@ export class Service extends Object {
23204
24865
  }
23205
24866
  instance.#_3ghX3VfZXXbLvhCRH7QJqpzLrXjB = _3ghX3VfZXXbLvhCRH7QJqpzLrXjB;
23206
24867
  const _41QwhqJouoLg3h8dRPKat21brynC = [];
23207
- for (const v of values["https://www.w3.org/ns/activitystreams#outbox"] ?? []) {
24868
+ const _41QwhqJouoLg3h8dRPKat21brynC__array = values["https://www.w3.org/ns/activitystreams#outbox"];
24869
+ for (const v of _41QwhqJouoLg3h8dRPKat21brynC__array == null
24870
+ ? []
24871
+ : _41QwhqJouoLg3h8dRPKat21brynC__array.length === 1 &&
24872
+ "@list" in _41QwhqJouoLg3h8dRPKat21brynC__array[0]
24873
+ ? _41QwhqJouoLg3h8dRPKat21brynC__array[0]["@list"]
24874
+ : _41QwhqJouoLg3h8dRPKat21brynC__array) {
23208
24875
  if (v == null)
23209
24876
  continue;
23210
24877
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23216,7 +24883,13 @@ export class Service extends Object {
23216
24883
  }
23217
24884
  instance.#_41QwhqJouoLg3h8dRPKat21brynC = _41QwhqJouoLg3h8dRPKat21brynC;
23218
24885
  const _3yAv8jymNfNuJUDuBzJ1NQhdbAee = [];
23219
- for (const v of values["https://www.w3.org/ns/activitystreams#following"] ?? []) {
24886
+ const _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array = values["https://www.w3.org/ns/activitystreams#following"];
24887
+ for (const v of _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array == null
24888
+ ? []
24889
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array.length === 1 &&
24890
+ "@list" in _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]
24891
+ ? _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array[0]["@list"]
24892
+ : _3yAv8jymNfNuJUDuBzJ1NQhdbAee__array) {
23220
24893
  if (v == null)
23221
24894
  continue;
23222
24895
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23228,7 +24901,13 @@ export class Service extends Object {
23228
24901
  }
23229
24902
  instance.#_3yAv8jymNfNuJUDuBzJ1NQhdbAee = _3yAv8jymNfNuJUDuBzJ1NQhdbAee;
23230
24903
  const _BBCTgfphhsFzpVfKTykGSpBNwoA = [];
23231
- for (const v of values["https://www.w3.org/ns/activitystreams#followers"] ?? []) {
24904
+ const _BBCTgfphhsFzpVfKTykGSpBNwoA__array = values["https://www.w3.org/ns/activitystreams#followers"];
24905
+ for (const v of _BBCTgfphhsFzpVfKTykGSpBNwoA__array == null
24906
+ ? []
24907
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array.length === 1 &&
24908
+ "@list" in _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]
24909
+ ? _BBCTgfphhsFzpVfKTykGSpBNwoA__array[0]["@list"]
24910
+ : _BBCTgfphhsFzpVfKTykGSpBNwoA__array) {
23232
24911
  if (v == null)
23233
24912
  continue;
23234
24913
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23240,7 +24919,13 @@ export class Service extends Object {
23240
24919
  }
23241
24920
  instance.#_BBCTgfphhsFzpVfKTykGSpBNwoA = _BBCTgfphhsFzpVfKTykGSpBNwoA;
23242
24921
  const _3bgkPwJanyTCoVFM9ovRcus8tKkU = [];
23243
- for (const v of values["https://www.w3.org/ns/activitystreams#liked"] ?? []) {
24922
+ const _3bgkPwJanyTCoVFM9ovRcus8tKkU__array = values["https://www.w3.org/ns/activitystreams#liked"];
24923
+ for (const v of _3bgkPwJanyTCoVFM9ovRcus8tKkU__array == null
24924
+ ? []
24925
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array.length === 1 &&
24926
+ "@list" in _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]
24927
+ ? _3bgkPwJanyTCoVFM9ovRcus8tKkU__array[0]["@list"]
24928
+ : _3bgkPwJanyTCoVFM9ovRcus8tKkU__array) {
23244
24929
  if (v == null)
23245
24930
  continue;
23246
24931
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23252,7 +24937,13 @@ export class Service extends Object {
23252
24937
  }
23253
24938
  instance.#_3bgkPwJanyTCoVFM9ovRcus8tKkU = _3bgkPwJanyTCoVFM9ovRcus8tKkU;
23254
24939
  const _4N1vBJzXDf8NbBumeECQMFvKetja = [];
23255
- for (const v of values["http://joinmastodon.org/ns#featured"] ?? []) {
24940
+ const _4N1vBJzXDf8NbBumeECQMFvKetja__array = values["http://joinmastodon.org/ns#featured"];
24941
+ for (const v of _4N1vBJzXDf8NbBumeECQMFvKetja__array == null
24942
+ ? []
24943
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array.length === 1 &&
24944
+ "@list" in _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]
24945
+ ? _4N1vBJzXDf8NbBumeECQMFvKetja__array[0]["@list"]
24946
+ : _4N1vBJzXDf8NbBumeECQMFvKetja__array) {
23256
24947
  if (v == null)
23257
24948
  continue;
23258
24949
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23263,8 +24954,32 @@ export class Service extends Object {
23263
24954
  _4N1vBJzXDf8NbBumeECQMFvKetja.push(await Collection.fromJsonLd(v, options));
23264
24955
  }
23265
24956
  instance.#_4N1vBJzXDf8NbBumeECQMFvKetja = _4N1vBJzXDf8NbBumeECQMFvKetja;
24957
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = [];
24958
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array = values["http://joinmastodon.org/ns#featuredTags"];
24959
+ for (const v of _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array == null
24960
+ ? []
24961
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array.length === 1 &&
24962
+ "@list" in _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]
24963
+ ? _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array[0]["@list"]
24964
+ : _2MxnRRLq9iPzx5CFq2NPrXdUDCac__array) {
24965
+ if (v == null)
24966
+ continue;
24967
+ if (typeof v === "object" && "@id" in v && !("@type" in v) &&
24968
+ globalThis.Object.keys(v).length === 1) {
24969
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(new URL(v["@id"]));
24970
+ continue;
24971
+ }
24972
+ _2MxnRRLq9iPzx5CFq2NPrXdUDCac.push(await Collection.fromJsonLd(v, options));
24973
+ }
24974
+ instance.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac = _2MxnRRLq9iPzx5CFq2NPrXdUDCac;
23266
24975
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = [];
23267
- for (const v of values["https://www.w3.org/ns/activitystreams#streams"] ?? []) {
24976
+ const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array = values["https://www.w3.org/ns/activitystreams#streams"];
24977
+ for (const v of _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array == null
24978
+ ? []
24979
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array.length === 1 &&
24980
+ "@list" in _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]
24981
+ ? _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array[0]["@list"]
24982
+ : _3sG2Hdwn9qzKGu9mpYkqakAMUkH9__array) {
23268
24983
  if (v == null)
23269
24984
  continue;
23270
24985
  if (typeof v === "object" && "@id" in v && !("@type" in v) &&
@@ -23276,35 +24991,65 @@ export class Service extends Object {
23276
24991
  }
23277
24992
  instance.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = _3sG2Hdwn9qzKGu9mpYkqakAMUkH9;
23278
24993
  const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG = [];
23279
- for (const v of values["https://www.w3.org/ns/activitystreams#endpoints"] ?? []) {
24994
+ const _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array = values["https://www.w3.org/ns/activitystreams#endpoints"];
24995
+ for (const v of _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array == null
24996
+ ? []
24997
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array.length === 1 &&
24998
+ "@list" in _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]
24999
+ ? _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array[0]["@list"]
25000
+ : _sEoQwUbfk4hEfugzNQ2ZiDcLMkG__array) {
23280
25001
  if (v == null)
23281
25002
  continue;
23282
25003
  _sEoQwUbfk4hEfugzNQ2ZiDcLMkG.push(await Endpoints.fromJsonLd(v, options));
23283
25004
  }
23284
25005
  instance.#_sEoQwUbfk4hEfugzNQ2ZiDcLMkG = _sEoQwUbfk4hEfugzNQ2ZiDcLMkG;
23285
25006
  const _gAJzg1QDc4rcefFsUzGSYmyXvNH = [];
23286
- for (const v of values["http://joinmastodon.org/ns#discoverable"] ?? []) {
25007
+ const _gAJzg1QDc4rcefFsUzGSYmyXvNH__array = values["http://joinmastodon.org/ns#discoverable"];
25008
+ for (const v of _gAJzg1QDc4rcefFsUzGSYmyXvNH__array == null
25009
+ ? []
25010
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array.length === 1 &&
25011
+ "@list" in _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]
25012
+ ? _gAJzg1QDc4rcefFsUzGSYmyXvNH__array[0]["@list"]
25013
+ : _gAJzg1QDc4rcefFsUzGSYmyXvNH__array) {
23287
25014
  if (v == null)
23288
25015
  continue;
23289
25016
  _gAJzg1QDc4rcefFsUzGSYmyXvNH.push(v["@value"]);
23290
25017
  }
23291
25018
  instance.#_gAJzg1QDc4rcefFsUzGSYmyXvNH = _gAJzg1QDc4rcefFsUzGSYmyXvNH;
23292
25019
  const _2kGKkJtoFWg8c18PaVSqj9NKP4t7 = [];
23293
- for (const v of values["http://joinmastodon.org/ns#suspended"] ?? []) {
25020
+ const _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array = values["http://joinmastodon.org/ns#suspended"];
25021
+ for (const v of _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array == null
25022
+ ? []
25023
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array.length === 1 &&
25024
+ "@list" in _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]
25025
+ ? _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array[0]["@list"]
25026
+ : _2kGKkJtoFWg8c18PaVSqj9NKP4t7__array) {
23294
25027
  if (v == null)
23295
25028
  continue;
23296
25029
  _2kGKkJtoFWg8c18PaVSqj9NKP4t7.push(v["@value"]);
23297
25030
  }
23298
25031
  instance.#_2kGKkJtoFWg8c18PaVSqj9NKP4t7 = _2kGKkJtoFWg8c18PaVSqj9NKP4t7;
23299
25032
  const _79S8K4f5J9MWUgCxziRyUe6PTHZ = [];
23300
- for (const v of values["http://joinmastodon.org/ns#memorial"] ?? []) {
25033
+ const _79S8K4f5J9MWUgCxziRyUe6PTHZ__array = values["http://joinmastodon.org/ns#memorial"];
25034
+ for (const v of _79S8K4f5J9MWUgCxziRyUe6PTHZ__array == null
25035
+ ? []
25036
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array.length === 1 &&
25037
+ "@list" in _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]
25038
+ ? _79S8K4f5J9MWUgCxziRyUe6PTHZ__array[0]["@list"]
25039
+ : _79S8K4f5J9MWUgCxziRyUe6PTHZ__array) {
23301
25040
  if (v == null)
23302
25041
  continue;
23303
25042
  _79S8K4f5J9MWUgCxziRyUe6PTHZ.push(v["@value"]);
23304
25043
  }
23305
25044
  instance.#_79S8K4f5J9MWUgCxziRyUe6PTHZ = _79S8K4f5J9MWUgCxziRyUe6PTHZ;
23306
25045
  const _2diCorzqPGQQqftp6e4SrCEwEnyk = [];
23307
- for (const v of values["http://joinmastodon.org/ns#indexable"] ?? []) {
25046
+ const _2diCorzqPGQQqftp6e4SrCEwEnyk__array = values["http://joinmastodon.org/ns#indexable"];
25047
+ for (const v of _2diCorzqPGQQqftp6e4SrCEwEnyk__array == null
25048
+ ? []
25049
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array.length === 1 &&
25050
+ "@list" in _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]
25051
+ ? _2diCorzqPGQQqftp6e4SrCEwEnyk__array[0]["@list"]
25052
+ : _2diCorzqPGQQqftp6e4SrCEwEnyk__array) {
23308
25053
  if (v == null)
23309
25054
  continue;
23310
25055
  _2diCorzqPGQQqftp6e4SrCEwEnyk.push(v["@value"]);
@@ -23439,6 +25184,17 @@ export class Service extends Object {
23439
25184
  if (_4N1vBJzXDf8NbBumeECQMFvKetja.length == 1) {
23440
25185
  proxy.featured = _4N1vBJzXDf8NbBumeECQMFvKetja[0];
23441
25186
  }
25187
+ const _2MxnRRLq9iPzx5CFq2NPrXdUDCac = this.#_2MxnRRLq9iPzx5CFq2NPrXdUDCac
25188
+ // deno-lint-ignore no-explicit-any
25189
+ .map((v) => v instanceof URL
25190
+ ? {
25191
+ [Symbol.for("Deno.customInspect")]: (inspect, options) => "URL " + inspect(v.href, options),
25192
+ [Symbol.for("nodejs.util.inspect.custom")]: (_depth, options, inspect) => "URL " + inspect(v.href, options),
25193
+ }
25194
+ : v);
25195
+ if (_2MxnRRLq9iPzx5CFq2NPrXdUDCac.length == 1) {
25196
+ proxy.featuredTags = _2MxnRRLq9iPzx5CFq2NPrXdUDCac[0];
25197
+ }
23442
25198
  const _3sG2Hdwn9qzKGu9mpYkqakAMUkH9 = this.#_3sG2Hdwn9qzKGu9mpYkqakAMUkH9
23443
25199
  // deno-lint-ignore no-explicit-any
23444
25200
  .map((v) => v instanceof URL
@@ -23657,7 +25413,13 @@ export class Tombstone extends Object {
23657
25413
  throw new TypeError("Unexpected type: " + instance.constructor.name);
23658
25414
  }
23659
25415
  const _8g8g4LiVMhFTXskuDEqx4ascxUr = [];
23660
- for (const v of values["https://www.w3.org/ns/activitystreams#deleted"] ?? []) {
25416
+ const _8g8g4LiVMhFTXskuDEqx4ascxUr__array = values["https://www.w3.org/ns/activitystreams#deleted"];
25417
+ for (const v of _8g8g4LiVMhFTXskuDEqx4ascxUr__array == null
25418
+ ? []
25419
+ : _8g8g4LiVMhFTXskuDEqx4ascxUr__array.length === 1 &&
25420
+ "@list" in _8g8g4LiVMhFTXskuDEqx4ascxUr__array[0]
25421
+ ? _8g8g4LiVMhFTXskuDEqx4ascxUr__array[0]["@list"]
25422
+ : _8g8g4LiVMhFTXskuDEqx4ascxUr__array) {
23661
25423
  if (v == null)
23662
25424
  continue;
23663
25425
  _8g8g4LiVMhFTXskuDEqx4ascxUr.push(dntShim.Temporal.Instant.from(v["@value"]));