@fedify/fedify 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -2805,15 +2805,7 @@ export class Object {
2805
2805
  ...options,
2806
2806
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
2807
2807
  };
2808
- if (options.format == null &&
2809
- (this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content == null ||
2810
- this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content.length < 1) &&
2811
- (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name == null ||
2812
- this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length < 1) &&
2813
- (this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1_summary == null ||
2814
- this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1_summary.length < 1) &&
2815
- (this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof == null ||
2816
- this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.length < 1)) {
2808
+ if (options.format == null && this.isCompactable()) {
2817
2809
  const result = {};
2818
2810
  // deno-lint-ignore no-unused-vars
2819
2811
  let compactItems;
@@ -3663,6 +3655,21 @@ export class Object {
3663
3655
  }
3664
3656
  return compacted;
3665
3657
  }
3658
+ isCompactable() {
3659
+ if (this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content != null &&
3660
+ this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content.length > 0)
3661
+ return false;
3662
+ if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name != null &&
3663
+ this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length > 0)
3664
+ return false;
3665
+ if (this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1_summary != null &&
3666
+ this.#_4LqirZspQbFWWQEbFcXAxm7tTDN1_summary.length > 0)
3667
+ return false;
3668
+ if (this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof != null &&
3669
+ this.#_42rPnotok1ivQ2RNCKNbeFJgx8b8_proof.length > 0)
3670
+ return false;
3671
+ return true;
3672
+ }
3666
3673
  /**
3667
3674
  * Converts a JSON-LD structure to an object of this type.
3668
3675
  * @param json The JSON-LD structure to convert.
@@ -5428,7 +5435,7 @@ export class Emoji extends Object {
5428
5435
  ...options,
5429
5436
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
5430
5437
  };
5431
- if (options.format == null) {
5438
+ if (options.format == null && this.isCompactable()) {
5432
5439
  const result = await super.toJsonLd({
5433
5440
  ...options,
5434
5441
  format: undefined,
@@ -5481,6 +5488,9 @@ export class Emoji extends Object {
5481
5488
  }
5482
5489
  return compacted;
5483
5490
  }
5491
+ isCompactable() {
5492
+ return super.isCompactable();
5493
+ }
5484
5494
  /**
5485
5495
  * Converts a JSON-LD structure to an object of this type.
5486
5496
  * @param json The JSON-LD structure to convert.
@@ -5642,7 +5652,7 @@ export class ChatMessage extends Object {
5642
5652
  ...options,
5643
5653
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
5644
5654
  };
5645
- if (options.format == null) {
5655
+ if (options.format == null && this.isCompactable()) {
5646
5656
  const result = await super.toJsonLd({
5647
5657
  ...options,
5648
5658
  format: undefined,
@@ -5742,6 +5752,9 @@ export class ChatMessage extends Object {
5742
5752
  }
5743
5753
  return compacted;
5744
5754
  }
5755
+ isCompactable() {
5756
+ return super.isCompactable();
5757
+ }
5745
5758
  /**
5746
5759
  * Converts a JSON-LD structure to an object of this type.
5747
5760
  * @param json The JSON-LD structure to convert.
@@ -5975,11 +5988,7 @@ export class PropertyValue {
5975
5988
  ...options,
5976
5989
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
5977
5990
  };
5978
- if (options.format == null &&
5979
- (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name == null ||
5980
- this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length < 1) &&
5981
- (this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx_value == null ||
5982
- this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx_value.length < 1)) {
5991
+ if (options.format == null && this.isCompactable()) {
5983
5992
  const result = {};
5984
5993
  // deno-lint-ignore no-unused-vars
5985
5994
  let compactItems;
@@ -6064,6 +6073,15 @@ export class PropertyValue {
6064
6073
  }
6065
6074
  return compacted;
6066
6075
  }
6076
+ isCompactable() {
6077
+ if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name != null &&
6078
+ this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length > 0)
6079
+ return false;
6080
+ if (this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx_value != null &&
6081
+ this.#_2cSy2magg4iZ7zLaG8U7DiJMoCkx_value.length > 0)
6082
+ return false;
6083
+ return true;
6084
+ }
6067
6085
  /**
6068
6086
  * Converts a JSON-LD structure to an object of this type.
6069
6087
  * @param json The JSON-LD structure to convert.
@@ -6571,6 +6589,9 @@ export class DataIntegrityProof {
6571
6589
  }
6572
6590
  return compacted;
6573
6591
  }
6592
+ isCompactable() {
6593
+ return true;
6594
+ }
6574
6595
  /**
6575
6596
  * Converts a JSON-LD structure to an object of this type.
6576
6597
  * @param json The JSON-LD structure to convert.
@@ -6995,7 +7016,7 @@ export class CryptographicKey {
6995
7016
  ...options,
6996
7017
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
6997
7018
  };
6998
- if (options.format == null) {
7019
+ if (options.format == null && this.isCompactable()) {
6999
7020
  const result = {};
7000
7021
  // deno-lint-ignore no-unused-vars
7001
7022
  let compactItems;
@@ -7100,6 +7121,9 @@ export class CryptographicKey {
7100
7121
  }
7101
7122
  return compacted;
7102
7123
  }
7124
+ isCompactable() {
7125
+ return true;
7126
+ }
7103
7127
  /**
7104
7128
  * Converts a JSON-LD structure to an object of this type.
7105
7129
  * @param json The JSON-LD structure to convert.
@@ -7480,7 +7504,7 @@ export class Multikey {
7480
7504
  ...options,
7481
7505
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
7482
7506
  };
7483
- if (options.format == null) {
7507
+ if (options.format == null && this.isCompactable()) {
7484
7508
  const result = {};
7485
7509
  // deno-lint-ignore no-unused-vars
7486
7510
  let compactItems;
@@ -7588,6 +7612,9 @@ export class Multikey {
7588
7612
  }
7589
7613
  return compacted;
7590
7614
  }
7615
+ isCompactable() {
7616
+ return true;
7617
+ }
7591
7618
  /**
7592
7619
  * Converts a JSON-LD structure to an object of this type.
7593
7620
  * @param json The JSON-LD structure to convert.
@@ -8674,7 +8701,7 @@ export class Activity extends Object {
8674
8701
  ...options,
8675
8702
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
8676
8703
  };
8677
- if (options.format == null) {
8704
+ if (options.format == null && this.isCompactable()) {
8678
8705
  const result = await super.toJsonLd({
8679
8706
  ...options,
8680
8707
  format: undefined,
@@ -8915,6 +8942,9 @@ export class Activity extends Object {
8915
8942
  }
8916
8943
  return compacted;
8917
8944
  }
8945
+ isCompactable() {
8946
+ return super.isCompactable();
8947
+ }
8918
8948
  /**
8919
8949
  * Converts a JSON-LD structure to an object of this type.
8920
8950
  * @param json The JSON-LD structure to convert.
@@ -9361,7 +9391,7 @@ export class Accept extends Activity {
9361
9391
  ...options,
9362
9392
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
9363
9393
  };
9364
- if (options.format == null) {
9394
+ if (options.format == null && this.isCompactable()) {
9365
9395
  const result = await super.toJsonLd({
9366
9396
  ...options,
9367
9397
  format: undefined,
@@ -9416,6 +9446,9 @@ export class Accept extends Activity {
9416
9446
  }
9417
9447
  return compacted;
9418
9448
  }
9449
+ isCompactable() {
9450
+ return super.isCompactable();
9451
+ }
9419
9452
  /**
9420
9453
  * Converts a JSON-LD structure to an object of this type.
9421
9454
  * @param json The JSON-LD structure to convert.
@@ -9540,7 +9573,7 @@ export class Add extends Activity {
9540
9573
  ...options,
9541
9574
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
9542
9575
  };
9543
- if (options.format == null) {
9576
+ if (options.format == null && this.isCompactable()) {
9544
9577
  const result = await super.toJsonLd({
9545
9578
  ...options,
9546
9579
  format: undefined,
@@ -9595,6 +9628,9 @@ export class Add extends Activity {
9595
9628
  }
9596
9629
  return compacted;
9597
9630
  }
9631
+ isCompactable() {
9632
+ return super.isCompactable();
9633
+ }
9598
9634
  /**
9599
9635
  * Converts a JSON-LD structure to an object of this type.
9600
9636
  * @param json The JSON-LD structure to convert.
@@ -9715,7 +9751,7 @@ export class Announce extends Activity {
9715
9751
  ...options,
9716
9752
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
9717
9753
  };
9718
- if (options.format == null) {
9754
+ if (options.format == null && this.isCompactable()) {
9719
9755
  const result = await super.toJsonLd({
9720
9756
  ...options,
9721
9757
  format: undefined,
@@ -9794,6 +9830,9 @@ export class Announce extends Activity {
9794
9830
  }
9795
9831
  return compacted;
9796
9832
  }
9833
+ isCompactable() {
9834
+ return super.isCompactable();
9835
+ }
9797
9836
  /**
9798
9837
  * Converts a JSON-LD structure to an object of this type.
9799
9838
  * @param json The JSON-LD structure to convert.
@@ -11376,9 +11415,7 @@ export class Application extends Object {
11376
11415
  ...options,
11377
11416
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
11378
11417
  };
11379
- if (options.format == null &&
11380
- (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername == null ||
11381
- this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length < 1)) {
11418
+ if (options.format == null && this.isCompactable()) {
11382
11419
  const result = await super.toJsonLd({
11383
11420
  ...options,
11384
11421
  format: undefined,
@@ -11939,6 +11976,12 @@ export class Application extends Object {
11939
11976
  }
11940
11977
  return compacted;
11941
11978
  }
11979
+ isCompactable() {
11980
+ if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null &&
11981
+ this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0)
11982
+ return false;
11983
+ return super.isCompactable();
11984
+ }
11942
11985
  /**
11943
11986
  * Converts a JSON-LD structure to an object of this type.
11944
11987
  * @param json The JSON-LD structure to convert.
@@ -12669,7 +12712,7 @@ export class IntransitiveActivity extends Activity {
12669
12712
  ...options,
12670
12713
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
12671
12714
  };
12672
- if (options.format == null) {
12715
+ if (options.format == null && this.isCompactable()) {
12673
12716
  const result = await super.toJsonLd({
12674
12717
  ...options,
12675
12718
  format: undefined,
@@ -12726,6 +12769,9 @@ export class IntransitiveActivity extends Activity {
12726
12769
  }
12727
12770
  return compacted;
12728
12771
  }
12772
+ isCompactable() {
12773
+ return super.isCompactable();
12774
+ }
12729
12775
  /**
12730
12776
  * Converts a JSON-LD structure to an object of this type.
12731
12777
  * @param json The JSON-LD structure to convert.
@@ -12892,6 +12938,9 @@ export class Arrive extends IntransitiveActivity {
12892
12938
  }
12893
12939
  return compacted;
12894
12940
  }
12941
+ isCompactable() {
12942
+ return super.isCompactable();
12943
+ }
12895
12944
  /**
12896
12945
  * Converts a JSON-LD structure to an object of this type.
12897
12946
  * @param json The JSON-LD structure to convert.
@@ -13049,7 +13098,7 @@ export class Article extends Object {
13049
13098
  ...options,
13050
13099
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
13051
13100
  };
13052
- if (options.format == null) {
13101
+ if (options.format == null && this.isCompactable()) {
13053
13102
  const result = await super.toJsonLd({
13054
13103
  ...options,
13055
13104
  format: undefined,
@@ -13151,6 +13200,9 @@ export class Article extends Object {
13151
13200
  }
13152
13201
  return compacted;
13153
13202
  }
13203
+ isCompactable() {
13204
+ return super.isCompactable();
13205
+ }
13154
13206
  /**
13155
13207
  * Converts a JSON-LD structure to an object of this type.
13156
13208
  * @param json The JSON-LD structure to convert.
@@ -13371,7 +13423,7 @@ export class Document extends Object {
13371
13423
  ...options,
13372
13424
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
13373
13425
  };
13374
- if (options.format == null) {
13426
+ if (options.format == null && this.isCompactable()) {
13375
13427
  const result = await super.toJsonLd({
13376
13428
  ...options,
13377
13429
  format: undefined,
@@ -13468,6 +13520,9 @@ export class Document extends Object {
13468
13520
  }
13469
13521
  return compacted;
13470
13522
  }
13523
+ isCompactable() {
13524
+ return super.isCompactable();
13525
+ }
13471
13526
  /**
13472
13527
  * Converts a JSON-LD structure to an object of this type.
13473
13528
  * @param json The JSON-LD structure to convert.
@@ -13650,7 +13705,7 @@ export class Audio extends Document {
13650
13705
  ...options,
13651
13706
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
13652
13707
  };
13653
- if (options.format == null) {
13708
+ if (options.format == null && this.isCompactable()) {
13654
13709
  const result = await super.toJsonLd({
13655
13710
  ...options,
13656
13711
  format: undefined,
@@ -13703,6 +13758,9 @@ export class Audio extends Document {
13703
13758
  }
13704
13759
  return compacted;
13705
13760
  }
13761
+ isCompactable() {
13762
+ return super.isCompactable();
13763
+ }
13706
13764
  /**
13707
13765
  * Converts a JSON-LD structure to an object of this type.
13708
13766
  * @param json The JSON-LD structure to convert.
@@ -13822,7 +13880,7 @@ export class Ignore extends Activity {
13822
13880
  ...options,
13823
13881
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
13824
13882
  };
13825
- if (options.format == null) {
13883
+ if (options.format == null && this.isCompactable()) {
13826
13884
  const result = await super.toJsonLd({
13827
13885
  ...options,
13828
13886
  format: undefined,
@@ -13877,6 +13935,9 @@ export class Ignore extends Activity {
13877
13935
  }
13878
13936
  return compacted;
13879
13937
  }
13938
+ isCompactable() {
13939
+ return super.isCompactable();
13940
+ }
13880
13941
  /**
13881
13942
  * Converts a JSON-LD structure to an object of this type.
13882
13943
  * @param json The JSON-LD structure to convert.
@@ -14001,7 +14062,7 @@ export class Block extends Ignore {
14001
14062
  ...options,
14002
14063
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
14003
14064
  };
14004
- if (options.format == null) {
14065
+ if (options.format == null && this.isCompactable()) {
14005
14066
  const result = await super.toJsonLd({
14006
14067
  ...options,
14007
14068
  format: undefined,
@@ -14056,6 +14117,9 @@ export class Block extends Ignore {
14056
14117
  }
14057
14118
  return compacted;
14058
14119
  }
14120
+ isCompactable() {
14121
+ return super.isCompactable();
14122
+ }
14059
14123
  /**
14060
14124
  * Converts a JSON-LD structure to an object of this type.
14061
14125
  * @param json The JSON-LD structure to convert.
@@ -14539,7 +14603,7 @@ export class Collection extends Object {
14539
14603
  ...options,
14540
14604
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
14541
14605
  };
14542
- if (options.format == null) {
14606
+ if (options.format == null && this.isCompactable()) {
14543
14607
  const result = await super.toJsonLd({
14544
14608
  ...options,
14545
14609
  format: undefined,
@@ -14736,6 +14800,9 @@ export class Collection extends Object {
14736
14800
  }
14737
14801
  return compacted;
14738
14802
  }
14803
+ isCompactable() {
14804
+ return super.isCompactable();
14805
+ }
14739
14806
  /**
14740
14807
  * Converts a JSON-LD structure to an object of this type.
14741
14808
  * @param json The JSON-LD structure to convert.
@@ -15322,7 +15389,7 @@ export class CollectionPage extends Collection {
15322
15389
  ...options,
15323
15390
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
15324
15391
  };
15325
- if (options.format == null) {
15392
+ if (options.format == null && this.isCompactable()) {
15326
15393
  const result = await super.toJsonLd({
15327
15394
  ...options,
15328
15395
  format: undefined,
@@ -15462,6 +15529,9 @@ export class CollectionPage extends Collection {
15462
15529
  }
15463
15530
  return compacted;
15464
15531
  }
15532
+ isCompactable() {
15533
+ return super.isCompactable();
15534
+ }
15465
15535
  /**
15466
15536
  * Converts a JSON-LD structure to an object of this type.
15467
15537
  * @param json The JSON-LD structure to convert.
@@ -15677,7 +15747,7 @@ export class Create extends Activity {
15677
15747
  ...options,
15678
15748
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
15679
15749
  };
15680
- if (options.format == null) {
15750
+ if (options.format == null && this.isCompactable()) {
15681
15751
  const result = await super.toJsonLd({
15682
15752
  ...options,
15683
15753
  format: undefined,
@@ -15758,6 +15828,9 @@ export class Create extends Activity {
15758
15828
  }
15759
15829
  return compacted;
15760
15830
  }
15831
+ isCompactable() {
15832
+ return super.isCompactable();
15833
+ }
15761
15834
  /**
15762
15835
  * Converts a JSON-LD structure to an object of this type.
15763
15836
  * @param json The JSON-LD structure to convert.
@@ -15877,7 +15950,7 @@ export class Delete extends Activity {
15877
15950
  ...options,
15878
15951
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
15879
15952
  };
15880
- if (options.format == null) {
15953
+ if (options.format == null && this.isCompactable()) {
15881
15954
  const result = await super.toJsonLd({
15882
15955
  ...options,
15883
15956
  format: undefined,
@@ -15958,6 +16031,9 @@ export class Delete extends Activity {
15958
16031
  }
15959
16032
  return compacted;
15960
16033
  }
16034
+ isCompactable() {
16035
+ return super.isCompactable();
16036
+ }
15961
16037
  /**
15962
16038
  * Converts a JSON-LD structure to an object of this type.
15963
16039
  * @param json The JSON-LD structure to convert.
@@ -16076,7 +16152,7 @@ export class Dislike extends Activity {
16076
16152
  ...options,
16077
16153
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
16078
16154
  };
16079
- if (options.format == null) {
16155
+ if (options.format == null && this.isCompactable()) {
16080
16156
  const result = await super.toJsonLd({
16081
16157
  ...options,
16082
16158
  format: undefined,
@@ -16131,6 +16207,9 @@ export class Dislike extends Activity {
16131
16207
  }
16132
16208
  return compacted;
16133
16209
  }
16210
+ isCompactable() {
16211
+ return super.isCompactable();
16212
+ }
16134
16213
  /**
16135
16214
  * Converts a JSON-LD structure to an object of this type.
16136
16215
  * @param json The JSON-LD structure to convert.
@@ -16490,7 +16569,7 @@ export class Endpoints {
16490
16569
  ...options,
16491
16570
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
16492
16571
  };
16493
- if (options.format == null) {
16572
+ if (options.format == null && this.isCompactable()) {
16494
16573
  const result = {};
16495
16574
  // deno-lint-ignore no-unused-vars
16496
16575
  let compactItems;
@@ -16634,6 +16713,9 @@ export class Endpoints {
16634
16713
  }
16635
16714
  return compacted;
16636
16715
  }
16716
+ isCompactable() {
16717
+ return true;
16718
+ }
16637
16719
  /**
16638
16720
  * Converts a JSON-LD structure to an object of this type.
16639
16721
  * @param json The JSON-LD structure to convert.
@@ -16911,7 +16993,7 @@ export class Event extends Object {
16911
16993
  ...options,
16912
16994
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
16913
16995
  };
16914
- if (options.format == null) {
16996
+ if (options.format == null && this.isCompactable()) {
16915
16997
  const result = await super.toJsonLd({
16916
16998
  ...options,
16917
16999
  format: undefined,
@@ -16964,6 +17046,9 @@ export class Event extends Object {
16964
17046
  }
16965
17047
  return compacted;
16966
17048
  }
17049
+ isCompactable() {
17050
+ return super.isCompactable();
17051
+ }
16967
17052
  /**
16968
17053
  * Converts a JSON-LD structure to an object of this type.
16969
17054
  * @param json The JSON-LD structure to convert.
@@ -17084,7 +17169,7 @@ export class Flag extends Activity {
17084
17169
  ...options,
17085
17170
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
17086
17171
  };
17087
- if (options.format == null) {
17172
+ if (options.format == null && this.isCompactable()) {
17088
17173
  const result = await super.toJsonLd({
17089
17174
  ...options,
17090
17175
  format: undefined,
@@ -17139,6 +17224,9 @@ export class Flag extends Activity {
17139
17224
  }
17140
17225
  return compacted;
17141
17226
  }
17227
+ isCompactable() {
17228
+ return super.isCompactable();
17229
+ }
17142
17230
  /**
17143
17231
  * Converts a JSON-LD structure to an object of this type.
17144
17232
  * @param json The JSON-LD structure to convert.
@@ -17260,7 +17348,7 @@ export class Follow extends Activity {
17260
17348
  ...options,
17261
17349
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
17262
17350
  };
17263
- if (options.format == null) {
17351
+ if (options.format == null && this.isCompactable()) {
17264
17352
  const result = await super.toJsonLd({
17265
17353
  ...options,
17266
17354
  format: undefined,
@@ -17315,6 +17403,9 @@ export class Follow extends Activity {
17315
17403
  }
17316
17404
  return compacted;
17317
17405
  }
17406
+ isCompactable() {
17407
+ return super.isCompactable();
17408
+ }
17318
17409
  /**
17319
17410
  * Converts a JSON-LD structure to an object of this type.
17320
17411
  * @param json The JSON-LD structure to convert.
@@ -18897,9 +18988,7 @@ export class Group extends Object {
18897
18988
  ...options,
18898
18989
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
18899
18990
  };
18900
- if (options.format == null &&
18901
- (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername == null ||
18902
- this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length < 1)) {
18991
+ if (options.format == null && this.isCompactable()) {
18903
18992
  const result = await super.toJsonLd({
18904
18993
  ...options,
18905
18994
  format: undefined,
@@ -19460,6 +19549,12 @@ export class Group extends Object {
19460
19549
  }
19461
19550
  return compacted;
19462
19551
  }
19552
+ isCompactable() {
19553
+ if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null &&
19554
+ this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0)
19555
+ return false;
19556
+ return super.isCompactable();
19557
+ }
19463
19558
  /**
19464
19559
  * Converts a JSON-LD structure to an object of this type.
19465
19560
  * @param json The JSON-LD structure to convert.
@@ -20605,9 +20700,7 @@ export class Link {
20605
20700
  ...options,
20606
20701
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
20607
20702
  };
20608
- if (options.format == null &&
20609
- (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name == null ||
20610
- this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length < 1)) {
20703
+ if (options.format == null && this.isCompactable()) {
20611
20704
  const result = {};
20612
20705
  // deno-lint-ignore no-unused-vars
20613
20706
  let compactItems;
@@ -20814,6 +20907,12 @@ export class Link {
20814
20907
  }
20815
20908
  return compacted;
20816
20909
  }
20910
+ isCompactable() {
20911
+ if (this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name != null &&
20912
+ this.#_4ZHbBuK7PrsvGgrjM8wgc6KMWjav_name.length > 0)
20913
+ return false;
20914
+ return true;
20915
+ }
20817
20916
  /**
20818
20917
  * Converts a JSON-LD structure to an object of this type.
20819
20918
  * @param json The JSON-LD structure to convert.
@@ -21244,7 +21343,7 @@ export class Hashtag extends Link {
21244
21343
  ...options,
21245
21344
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
21246
21345
  };
21247
- if (options.format == null) {
21346
+ if (options.format == null && this.isCompactable()) {
21248
21347
  const result = await super.toJsonLd({
21249
21348
  ...options,
21250
21349
  format: undefined,
@@ -21282,6 +21381,9 @@ export class Hashtag extends Link {
21282
21381
  }
21283
21382
  return compacted;
21284
21383
  }
21384
+ isCompactable() {
21385
+ return super.isCompactable();
21386
+ }
21285
21387
  /**
21286
21388
  * Converts a JSON-LD structure to an object of this type.
21287
21389
  * @param json The JSON-LD structure to convert.
@@ -21400,7 +21502,7 @@ export class Image extends Document {
21400
21502
  ...options,
21401
21503
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
21402
21504
  };
21403
- if (options.format == null) {
21505
+ if (options.format == null && this.isCompactable()) {
21404
21506
  const result = await super.toJsonLd({
21405
21507
  ...options,
21406
21508
  format: undefined,
@@ -21447,6 +21549,9 @@ export class Image extends Document {
21447
21549
  }
21448
21550
  return compacted;
21449
21551
  }
21552
+ isCompactable() {
21553
+ return super.isCompactable();
21554
+ }
21450
21555
  /**
21451
21556
  * Converts a JSON-LD structure to an object of this type.
21452
21557
  * @param json The JSON-LD structure to convert.
@@ -21567,7 +21672,7 @@ export class Offer extends Activity {
21567
21672
  ...options,
21568
21673
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
21569
21674
  };
21570
- if (options.format == null) {
21675
+ if (options.format == null && this.isCompactable()) {
21571
21676
  const result = await super.toJsonLd({
21572
21677
  ...options,
21573
21678
  format: undefined,
@@ -21622,6 +21727,9 @@ export class Offer extends Activity {
21622
21727
  }
21623
21728
  return compacted;
21624
21729
  }
21730
+ isCompactable() {
21731
+ return super.isCompactable();
21732
+ }
21625
21733
  /**
21626
21734
  * Converts a JSON-LD structure to an object of this type.
21627
21735
  * @param json The JSON-LD structure to convert.
@@ -21744,7 +21852,7 @@ export class Invite extends Offer {
21744
21852
  ...options,
21745
21853
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
21746
21854
  };
21747
- if (options.format == null) {
21855
+ if (options.format == null && this.isCompactable()) {
21748
21856
  const result = await super.toJsonLd({
21749
21857
  ...options,
21750
21858
  format: undefined,
@@ -21799,6 +21907,9 @@ export class Invite extends Offer {
21799
21907
  }
21800
21908
  return compacted;
21801
21909
  }
21910
+ isCompactable() {
21911
+ return super.isCompactable();
21912
+ }
21802
21913
  /**
21803
21914
  * Converts a JSON-LD structure to an object of this type.
21804
21915
  * @param json The JSON-LD structure to convert.
@@ -21918,7 +22029,7 @@ export class Join extends Activity {
21918
22029
  ...options,
21919
22030
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
21920
22031
  };
21921
- if (options.format == null) {
22032
+ if (options.format == null && this.isCompactable()) {
21922
22033
  const result = await super.toJsonLd({
21923
22034
  ...options,
21924
22035
  format: undefined,
@@ -21973,6 +22084,9 @@ export class Join extends Activity {
21973
22084
  }
21974
22085
  return compacted;
21975
22086
  }
22087
+ isCompactable() {
22088
+ return super.isCompactable();
22089
+ }
21976
22090
  /**
21977
22091
  * Converts a JSON-LD structure to an object of this type.
21978
22092
  * @param json The JSON-LD structure to convert.
@@ -22092,7 +22206,7 @@ export class Leave extends Activity {
22092
22206
  ...options,
22093
22207
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
22094
22208
  };
22095
- if (options.format == null) {
22209
+ if (options.format == null && this.isCompactable()) {
22096
22210
  const result = await super.toJsonLd({
22097
22211
  ...options,
22098
22212
  format: undefined,
@@ -22147,6 +22261,9 @@ export class Leave extends Activity {
22147
22261
  }
22148
22262
  return compacted;
22149
22263
  }
22264
+ isCompactable() {
22265
+ return super.isCompactable();
22266
+ }
22150
22267
  /**
22151
22268
  * Converts a JSON-LD structure to an object of this type.
22152
22269
  * @param json The JSON-LD structure to convert.
@@ -22266,7 +22383,7 @@ export class Like extends Activity {
22266
22383
  ...options,
22267
22384
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
22268
22385
  };
22269
- if (options.format == null) {
22386
+ if (options.format == null && this.isCompactable()) {
22270
22387
  const result = await super.toJsonLd({
22271
22388
  ...options,
22272
22389
  format: undefined,
@@ -22321,6 +22438,9 @@ export class Like extends Activity {
22321
22438
  }
22322
22439
  return compacted;
22323
22440
  }
22441
+ isCompactable() {
22442
+ return super.isCompactable();
22443
+ }
22324
22444
  /**
22325
22445
  * Converts a JSON-LD structure to an object of this type.
22326
22446
  * @param json The JSON-LD structure to convert.
@@ -22439,7 +22559,7 @@ export class Listen extends Activity {
22439
22559
  ...options,
22440
22560
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
22441
22561
  };
22442
- if (options.format == null) {
22562
+ if (options.format == null && this.isCompactable()) {
22443
22563
  const result = await super.toJsonLd({
22444
22564
  ...options,
22445
22565
  format: undefined,
@@ -22494,6 +22614,9 @@ export class Listen extends Activity {
22494
22614
  }
22495
22615
  return compacted;
22496
22616
  }
22617
+ isCompactable() {
22618
+ return super.isCompactable();
22619
+ }
22497
22620
  /**
22498
22621
  * Converts a JSON-LD structure to an object of this type.
22499
22622
  * @param json The JSON-LD structure to convert.
@@ -22612,7 +22735,7 @@ export class Mention extends Link {
22612
22735
  ...options,
22613
22736
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
22614
22737
  };
22615
- if (options.format == null) {
22738
+ if (options.format == null && this.isCompactable()) {
22616
22739
  const result = await super.toJsonLd({
22617
22740
  ...options,
22618
22741
  format: undefined,
@@ -22648,6 +22771,9 @@ export class Mention extends Link {
22648
22771
  }
22649
22772
  return compacted;
22650
22773
  }
22774
+ isCompactable() {
22775
+ return super.isCompactable();
22776
+ }
22651
22777
  /**
22652
22778
  * Converts a JSON-LD structure to an object of this type.
22653
22779
  * @param json The JSON-LD structure to convert.
@@ -22768,7 +22894,7 @@ export class Move extends Activity {
22768
22894
  ...options,
22769
22895
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
22770
22896
  };
22771
- if (options.format == null) {
22897
+ if (options.format == null && this.isCompactable()) {
22772
22898
  const result = await super.toJsonLd({
22773
22899
  ...options,
22774
22900
  format: undefined,
@@ -22823,6 +22949,9 @@ export class Move extends Activity {
22823
22949
  }
22824
22950
  return compacted;
22825
22951
  }
22952
+ isCompactable() {
22953
+ return super.isCompactable();
22954
+ }
22826
22955
  /**
22827
22956
  * Converts a JSON-LD structure to an object of this type.
22828
22957
  * @param json The JSON-LD structure to convert.
@@ -22981,7 +23110,7 @@ export class Note extends Object {
22981
23110
  ...options,
22982
23111
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
22983
23112
  };
22984
- if (options.format == null) {
23113
+ if (options.format == null && this.isCompactable()) {
22985
23114
  const result = await super.toJsonLd({
22986
23115
  ...options,
22987
23116
  format: undefined,
@@ -23083,6 +23212,9 @@ export class Note extends Object {
23083
23212
  }
23084
23213
  return compacted;
23085
23214
  }
23215
+ isCompactable() {
23216
+ return super.isCompactable();
23217
+ }
23086
23218
  /**
23087
23219
  * Converts a JSON-LD structure to an object of this type.
23088
23220
  * @param json The JSON-LD structure to convert.
@@ -23326,7 +23458,7 @@ export class OrderedCollection extends Collection {
23326
23458
  ...options,
23327
23459
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
23328
23460
  };
23329
- if (options.format == null) {
23461
+ if (options.format == null && this.isCompactable()) {
23330
23462
  const result = await super.toJsonLd({
23331
23463
  ...options,
23332
23464
  format: undefined,
@@ -23427,6 +23559,9 @@ export class OrderedCollection extends Collection {
23427
23559
  }
23428
23560
  return compacted;
23429
23561
  }
23562
+ isCompactable() {
23563
+ return super.isCompactable();
23564
+ }
23430
23565
  /**
23431
23566
  * Converts a JSON-LD structure to an object of this type.
23432
23567
  * @param json The JSON-LD structure to convert.
@@ -23771,7 +23906,7 @@ export class OrderedCollectionPage extends CollectionPage {
23771
23906
  ...options,
23772
23907
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
23773
23908
  };
23774
- if (options.format == null) {
23909
+ if (options.format == null && this.isCompactable()) {
23775
23910
  const result = await super.toJsonLd({
23776
23911
  ...options,
23777
23912
  format: undefined,
@@ -23894,6 +24029,9 @@ export class OrderedCollectionPage extends CollectionPage {
23894
24029
  }
23895
24030
  return compacted;
23896
24031
  }
24032
+ isCompactable() {
24033
+ return super.isCompactable();
24034
+ }
23897
24035
  /**
23898
24036
  * Converts a JSON-LD structure to an object of this type.
23899
24037
  * @param json The JSON-LD structure to convert.
@@ -25605,9 +25743,7 @@ export class Organization extends Object {
25605
25743
  ...options,
25606
25744
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
25607
25745
  };
25608
- if (options.format == null &&
25609
- (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername == null ||
25610
- this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length < 1)) {
25746
+ if (options.format == null && this.isCompactable()) {
25611
25747
  const result = await super.toJsonLd({
25612
25748
  ...options,
25613
25749
  format: undefined,
@@ -26168,6 +26304,12 @@ export class Organization extends Object {
26168
26304
  }
26169
26305
  return compacted;
26170
26306
  }
26307
+ isCompactable() {
26308
+ if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null &&
26309
+ this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0)
26310
+ return false;
26311
+ return super.isCompactable();
26312
+ }
26171
26313
  /**
26172
26314
  * Converts a JSON-LD structure to an object of this type.
26173
26315
  * @param json The JSON-LD structure to convert.
@@ -26896,7 +27038,7 @@ export class Page extends Document {
26896
27038
  ...options,
26897
27039
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
26898
27040
  };
26899
- if (options.format == null) {
27041
+ if (options.format == null && this.isCompactable()) {
26900
27042
  const result = await super.toJsonLd({
26901
27043
  ...options,
26902
27044
  format: undefined,
@@ -26949,6 +27091,9 @@ export class Page extends Document {
26949
27091
  }
26950
27092
  return compacted;
26951
27093
  }
27094
+ isCompactable() {
27095
+ return super.isCompactable();
27096
+ }
26952
27097
  /**
26953
27098
  * Converts a JSON-LD structure to an object of this type.
26954
27099
  * @param json The JSON-LD structure to convert.
@@ -28531,9 +28676,7 @@ export class Person extends Object {
28531
28676
  ...options,
28532
28677
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
28533
28678
  };
28534
- if (options.format == null &&
28535
- (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername == null ||
28536
- this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length < 1)) {
28679
+ if (options.format == null && this.isCompactable()) {
28537
28680
  const result = await super.toJsonLd({
28538
28681
  ...options,
28539
28682
  format: undefined,
@@ -29094,6 +29237,12 @@ export class Person extends Object {
29094
29237
  }
29095
29238
  return compacted;
29096
29239
  }
29240
+ isCompactable() {
29241
+ if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null &&
29242
+ this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0)
29243
+ return false;
29244
+ return super.isCompactable();
29245
+ }
29097
29246
  /**
29098
29247
  * Converts a JSON-LD structure to an object of this type.
29099
29248
  * @param json The JSON-LD structure to convert.
@@ -30018,7 +30167,7 @@ export class Place extends Object {
30018
30167
  ...options,
30019
30168
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
30020
30169
  };
30021
- if (options.format == null) {
30170
+ if (options.format == null && this.isCompactable()) {
30022
30171
  const result = await super.toJsonLd({
30023
30172
  ...options,
30024
30173
  format: undefined,
@@ -30206,6 +30355,9 @@ export class Place extends Object {
30206
30355
  }
30207
30356
  return compacted;
30208
30357
  }
30358
+ isCompactable() {
30359
+ return super.isCompactable();
30360
+ }
30209
30361
  /**
30210
30362
  * Converts a JSON-LD structure to an object of this type.
30211
30363
  * @param json The JSON-LD structure to convert.
@@ -30575,7 +30727,7 @@ export class Profile extends Object {
30575
30727
  ...options,
30576
30728
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
30577
30729
  };
30578
- if (options.format == null) {
30730
+ if (options.format == null && this.isCompactable()) {
30579
30731
  const result = await super.toJsonLd({
30580
30732
  ...options,
30581
30733
  format: undefined,
@@ -30653,6 +30805,9 @@ export class Profile extends Object {
30653
30805
  }
30654
30806
  return compacted;
30655
30807
  }
30808
+ isCompactable() {
30809
+ return super.isCompactable();
30810
+ }
30656
30811
  /**
30657
30812
  * Converts a JSON-LD structure to an object of this type.
30658
30813
  * @param json The JSON-LD structure to convert.
@@ -31072,7 +31227,7 @@ export class Question extends IntransitiveActivity {
31072
31227
  ...options,
31073
31228
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
31074
31229
  };
31075
- if (options.format == null) {
31230
+ if (options.format == null && this.isCompactable()) {
31076
31231
  const result = await super.toJsonLd({
31077
31232
  ...options,
31078
31233
  format: undefined,
@@ -31274,6 +31429,9 @@ export class Question extends IntransitiveActivity {
31274
31429
  }
31275
31430
  return compacted;
31276
31431
  }
31432
+ isCompactable() {
31433
+ return super.isCompactable();
31434
+ }
31277
31435
  /**
31278
31436
  * Converts a JSON-LD structure to an object of this type.
31279
31437
  * @param json The JSON-LD structure to convert.
@@ -31556,7 +31714,7 @@ export class Read extends Activity {
31556
31714
  ...options,
31557
31715
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
31558
31716
  };
31559
- if (options.format == null) {
31717
+ if (options.format == null && this.isCompactable()) {
31560
31718
  const result = await super.toJsonLd({
31561
31719
  ...options,
31562
31720
  format: undefined,
@@ -31611,6 +31769,9 @@ export class Read extends Activity {
31611
31769
  }
31612
31770
  return compacted;
31613
31771
  }
31772
+ isCompactable() {
31773
+ return super.isCompactable();
31774
+ }
31614
31775
  /**
31615
31776
  * Converts a JSON-LD structure to an object of this type.
31616
31777
  * @param json The JSON-LD structure to convert.
@@ -31730,7 +31891,7 @@ export class Reject extends Activity {
31730
31891
  ...options,
31731
31892
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
31732
31893
  };
31733
- if (options.format == null) {
31894
+ if (options.format == null && this.isCompactable()) {
31734
31895
  const result = await super.toJsonLd({
31735
31896
  ...options,
31736
31897
  format: undefined,
@@ -31785,6 +31946,9 @@ export class Reject extends Activity {
31785
31946
  }
31786
31947
  return compacted;
31787
31948
  }
31949
+ isCompactable() {
31950
+ return super.isCompactable();
31951
+ }
31788
31952
  /**
31789
31953
  * Converts a JSON-LD structure to an object of this type.
31790
31954
  * @param json The JSON-LD structure to convert.
@@ -32276,7 +32440,7 @@ export class Relationship extends Object {
32276
32440
  ...options,
32277
32441
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
32278
32442
  };
32279
- if (options.format == null) {
32443
+ if (options.format == null && this.isCompactable()) {
32280
32444
  const result = await super.toJsonLd({
32281
32445
  ...options,
32282
32446
  format: undefined,
@@ -32404,6 +32568,9 @@ export class Relationship extends Object {
32404
32568
  }
32405
32569
  return compacted;
32406
32570
  }
32571
+ isCompactable() {
32572
+ return super.isCompactable();
32573
+ }
32407
32574
  /**
32408
32575
  * Converts a JSON-LD structure to an object of this type.
32409
32576
  * @param json The JSON-LD structure to convert.
@@ -32626,7 +32793,7 @@ export class Remove extends Activity {
32626
32793
  ...options,
32627
32794
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
32628
32795
  };
32629
- if (options.format == null) {
32796
+ if (options.format == null && this.isCompactable()) {
32630
32797
  const result = await super.toJsonLd({
32631
32798
  ...options,
32632
32799
  format: undefined,
@@ -32681,6 +32848,9 @@ export class Remove extends Activity {
32681
32848
  }
32682
32849
  return compacted;
32683
32850
  }
32851
+ isCompactable() {
32852
+ return super.isCompactable();
32853
+ }
32684
32854
  /**
32685
32855
  * Converts a JSON-LD structure to an object of this type.
32686
32856
  * @param json The JSON-LD structure to convert.
@@ -34263,9 +34433,7 @@ export class Service extends Object {
34263
34433
  ...options,
34264
34434
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
34265
34435
  };
34266
- if (options.format == null &&
34267
- (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername == null ||
34268
- this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length < 1)) {
34436
+ if (options.format == null && this.isCompactable()) {
34269
34437
  const result = await super.toJsonLd({
34270
34438
  ...options,
34271
34439
  format: undefined,
@@ -34826,6 +34994,12 @@ export class Service extends Object {
34826
34994
  }
34827
34995
  return compacted;
34828
34996
  }
34997
+ isCompactable() {
34998
+ if (this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername != null &&
34999
+ this.#_3isuDgRAKSntq9XdbjiNxjwyPZAf_preferredUsername.length > 0)
35000
+ return false;
35001
+ return super.isCompactable();
35002
+ }
34829
35003
  /**
34830
35004
  * Converts a JSON-LD structure to an object of this type.
34831
35005
  * @param json The JSON-LD structure to convert.
@@ -35670,9 +35844,7 @@ export class Source {
35670
35844
  ...options,
35671
35845
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
35672
35846
  };
35673
- if (options.format == null &&
35674
- (this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content == null ||
35675
- this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content.length < 1)) {
35847
+ if (options.format == null && this.isCompactable()) {
35676
35848
  const result = {};
35677
35849
  // deno-lint-ignore no-unused-vars
35678
35850
  let compactItems;
@@ -35743,6 +35915,12 @@ export class Source {
35743
35915
  }
35744
35916
  return compacted;
35745
35917
  }
35918
+ isCompactable() {
35919
+ if (this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content != null &&
35920
+ this.#_4HuuRSdSrXq8Jj2J9gcdYfoCzeuz_content.length > 0)
35921
+ return false;
35922
+ return true;
35923
+ }
35746
35924
  /**
35747
35925
  * Converts a JSON-LD structure to an object of this type.
35748
35926
  * @param json The JSON-LD structure to convert.
@@ -35927,7 +36105,7 @@ export class TentativeAccept extends Accept {
35927
36105
  ...options,
35928
36106
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
35929
36107
  };
35930
- if (options.format == null) {
36108
+ if (options.format == null && this.isCompactable()) {
35931
36109
  const result = await super.toJsonLd({
35932
36110
  ...options,
35933
36111
  format: undefined,
@@ -35982,6 +36160,9 @@ export class TentativeAccept extends Accept {
35982
36160
  }
35983
36161
  return compacted;
35984
36162
  }
36163
+ isCompactable() {
36164
+ return super.isCompactable();
36165
+ }
35985
36166
  /**
35986
36167
  * Converts a JSON-LD structure to an object of this type.
35987
36168
  * @param json The JSON-LD structure to convert.
@@ -36101,7 +36282,7 @@ export class TentativeReject extends Reject {
36101
36282
  ...options,
36102
36283
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
36103
36284
  };
36104
- if (options.format == null) {
36285
+ if (options.format == null && this.isCompactable()) {
36105
36286
  const result = await super.toJsonLd({
36106
36287
  ...options,
36107
36288
  format: undefined,
@@ -36156,6 +36337,9 @@ export class TentativeReject extends Reject {
36156
36337
  }
36157
36338
  return compacted;
36158
36339
  }
36340
+ isCompactable() {
36341
+ return super.isCompactable();
36342
+ }
36159
36343
  /**
36160
36344
  * Converts a JSON-LD structure to an object of this type.
36161
36345
  * @param json The JSON-LD structure to convert.
@@ -36307,7 +36491,7 @@ export class Tombstone extends Object {
36307
36491
  ...options,
36308
36492
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
36309
36493
  };
36310
- if (options.format == null) {
36494
+ if (options.format == null && this.isCompactable()) {
36311
36495
  const result = await super.toJsonLd({
36312
36496
  ...options,
36313
36497
  format: undefined,
@@ -36382,6 +36566,9 @@ export class Tombstone extends Object {
36382
36566
  }
36383
36567
  return compacted;
36384
36568
  }
36569
+ isCompactable() {
36570
+ return super.isCompactable();
36571
+ }
36385
36572
  /**
36386
36573
  * Converts a JSON-LD structure to an object of this type.
36387
36574
  * @param json The JSON-LD structure to convert.
@@ -36529,7 +36716,7 @@ export class Travel extends IntransitiveActivity {
36529
36716
  ...options,
36530
36717
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
36531
36718
  };
36532
- if (options.format == null) {
36719
+ if (options.format == null && this.isCompactable()) {
36533
36720
  const result = await super.toJsonLd({
36534
36721
  ...options,
36535
36722
  format: undefined,
@@ -36584,6 +36771,9 @@ export class Travel extends IntransitiveActivity {
36584
36771
  }
36585
36772
  return compacted;
36586
36773
  }
36774
+ isCompactable() {
36775
+ return super.isCompactable();
36776
+ }
36587
36777
  /**
36588
36778
  * Converts a JSON-LD structure to an object of this type.
36589
36779
  * @param json The JSON-LD structure to convert.
@@ -36708,7 +36898,7 @@ export class Undo extends Activity {
36708
36898
  ...options,
36709
36899
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
36710
36900
  };
36711
- if (options.format == null) {
36901
+ if (options.format == null && this.isCompactable()) {
36712
36902
  const result = await super.toJsonLd({
36713
36903
  ...options,
36714
36904
  format: undefined,
@@ -36763,6 +36953,9 @@ export class Undo extends Activity {
36763
36953
  }
36764
36954
  return compacted;
36765
36955
  }
36956
+ isCompactable() {
36957
+ return super.isCompactable();
36958
+ }
36766
36959
  /**
36767
36960
  * Converts a JSON-LD structure to an object of this type.
36768
36961
  * @param json The JSON-LD structure to convert.
@@ -36885,7 +37078,7 @@ export class Update extends Activity {
36885
37078
  ...options,
36886
37079
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
36887
37080
  };
36888
- if (options.format == null) {
37081
+ if (options.format == null && this.isCompactable()) {
36889
37082
  const result = await super.toJsonLd({
36890
37083
  ...options,
36891
37084
  format: undefined,
@@ -36986,6 +37179,9 @@ export class Update extends Activity {
36986
37179
  }
36987
37180
  return compacted;
36988
37181
  }
37182
+ isCompactable() {
37183
+ return super.isCompactable();
37184
+ }
36989
37185
  /**
36990
37186
  * Converts a JSON-LD structure to an object of this type.
36991
37187
  * @param json The JSON-LD structure to convert.
@@ -37104,7 +37300,7 @@ export class Video extends Document {
37104
37300
  ...options,
37105
37301
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
37106
37302
  };
37107
- if (options.format == null) {
37303
+ if (options.format == null && this.isCompactable()) {
37108
37304
  const result = await super.toJsonLd({
37109
37305
  ...options,
37110
37306
  format: undefined,
@@ -37157,6 +37353,9 @@ export class Video extends Document {
37157
37353
  }
37158
37354
  return compacted;
37159
37355
  }
37356
+ isCompactable() {
37357
+ return super.isCompactable();
37358
+ }
37160
37359
  /**
37161
37360
  * Converts a JSON-LD structure to an object of this type.
37162
37361
  * @param json The JSON-LD structure to convert.
@@ -37275,7 +37474,7 @@ export class View extends Activity {
37275
37474
  ...options,
37276
37475
  contextLoader: options.contextLoader ?? fetchDocumentLoader,
37277
37476
  };
37278
- if (options.format == null) {
37477
+ if (options.format == null && this.isCompactable()) {
37279
37478
  const result = await super.toJsonLd({
37280
37479
  ...options,
37281
37480
  format: undefined,
@@ -37330,6 +37529,9 @@ export class View extends Activity {
37330
37529
  }
37331
37530
  return compacted;
37332
37531
  }
37532
+ isCompactable() {
37533
+ return super.isCompactable();
37534
+ }
37333
37535
  /**
37334
37536
  * Converts a JSON-LD structure to an object of this type.
37335
37537
  * @param json The JSON-LD structure to convert.