dns-message 1.0.1-canary-5358558d51748ee8060d5894158491696423b95e → 1.0.1-canary-e30ae7317ba5298ba0dbe33fc2f54ef234fb28cb

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -198,7 +198,6 @@ const c = {
198
198
  length: 0
199
199
  };
200
200
  } else {
201
- advance(s, 2);
202
201
  break;
203
202
  }
204
203
  }
@@ -218,6 +217,20 @@ const f = {
218
217
  };
219
218
 
220
219
  const d = {
220
+ bytes: t => t.byteLength + 1,
221
+ write(t, e, n) {
222
+ t.setUint8(e++, n.byteLength);
223
+ new Uint8Array(t.buffer, t.byteOffset + e, n.byteLength).set(n);
224
+ return e += n.byteLength;
225
+ },
226
+ read(t, e) {
227
+ const n = t.getUint8(e.offset);
228
+ advance(e, 1);
229
+ return sliceView(t, e, n);
230
+ }
231
+ };
232
+
233
+ const u = {
221
234
  bytes: t => o(t) + 1,
222
235
  write(t, e, n) {
223
236
  const r = a.encode(n);
@@ -231,7 +244,7 @@ const d = {
231
244
  }
232
245
  };
233
246
 
234
- const u = {
247
+ const l = {
235
248
  bytes(t) {
236
249
  const e = [];
237
250
  for (let n = 0; n < t.length; n++) {
@@ -282,7 +295,7 @@ const u = {
282
295
  }
283
296
  };
284
297
 
285
- const l = {
298
+ const g = {
286
299
  bytes: () => 4,
287
300
  write(t, e, n) {
288
301
  const r = n.split(".", 4);
@@ -299,7 +312,7 @@ const l = {
299
312
  }
300
313
  };
301
314
 
302
- const g = {
315
+ const y = {
303
316
  bytes: () => 2,
304
317
  write(t, e, n) {
305
318
  t.setUint16(e, n);
@@ -312,7 +325,7 @@ const g = {
312
325
  }
313
326
  };
314
327
 
315
- const y = {
328
+ const U = {
316
329
  bytes: () => 16,
317
330
  write(t, e, n) {
318
331
  const r = n.indexOf("::");
@@ -408,14 +421,14 @@ const sliceView = (t, e, n = e.length) => {
408
421
  return r;
409
422
  };
410
423
 
411
- const U = 32768;
424
+ const h = 32768;
412
425
 
413
- const h = {
426
+ const w = {
414
427
  bytes: t => c.bytes(t.name) + 4,
415
428
  write(t, e, r) {
416
429
  let s = r.class || n.IN;
417
430
  if (r.qu) {
418
- s |= U;
431
+ s |= h;
419
432
  }
420
433
  e = c.write(t, e, r.name);
421
434
  t.setUint16(e, r.type);
@@ -427,7 +440,7 @@ const h = {
427
440
  const s = t.getUint16(e.offset);
428
441
  let a = t.getUint16(e.offset + 2) || n.ANY;
429
442
  let i = !1;
430
- if (a !== n.ANY && a & U) {
443
+ if (a !== n.ANY && a & h) {
431
444
  a &= -32769;
432
445
  i = !0;
433
446
  }
@@ -441,7 +454,7 @@ const h = {
441
454
  }
442
455
  };
443
456
 
444
- let w = function(t) {
457
+ let b = function(t) {
445
458
  t[t.v4 = 1] = "v4";
446
459
  t[t.v6 = 2] = "v6";
447
460
  return t;
@@ -456,16 +469,16 @@ const E = withRDLength({
456
469
  })
457
470
  });
458
471
 
459
- const b = "(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])";
472
+ const A = "(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])";
460
473
 
461
- const A = new RegExp(`^${`(?:${b}\\.){3}${b}`}$`);
474
+ const p = new RegExp(`^${`(?:${A}\\.){3}${A}`}$`);
462
475
 
463
- const p = withRDLength({
476
+ const N = withRDLength({
464
477
  bytes: t => Math.ceil((t.sourcePrefixLength || 0) / 8) + 4,
465
478
  write(t, e, n) {
466
479
  const r = n.sourcePrefixLength || 0;
467
480
  const s = n.scopePrefixLength || 0;
468
- const a = n.family || (A.test(n.ip) ? w.v4 : w.v6);
481
+ const a = n.family || (p.test(n.ip) ? b.v4 : b.v6);
469
482
  const i = Math.ceil(r / 8);
470
483
  t.setUint16(e, a);
471
484
  t.setUint8(e + 2, r);
@@ -475,7 +488,7 @@ const p = withRDLength({
475
488
  const n = new ArrayBuffer(t.bytes(e));
476
489
  const r = t.write(new DataView(n), 0, e);
477
490
  return new Uint8Array(n, 0, r);
478
- })(a === w.v4 ? l : y, n.ip);
491
+ })(a === b.v4 ? g : U, n.ip);
479
492
  for (let n = 0; n < i; n++) {
480
493
  t.setUint8(e++, o[n]);
481
494
  }
@@ -491,12 +504,12 @@ const p = withRDLength({
491
504
  family: n,
492
505
  sourcePrefixLength: r,
493
506
  scopePrefixLength: a,
494
- ip: n === w.v4 ? l.read(t, e) : y.read(t, e)
507
+ ip: n === b.v4 ? g.read(t, e) : U.read(t, e)
495
508
  };
496
509
  }
497
510
  });
498
511
 
499
- const N = withRDLength({
512
+ const S = withRDLength({
500
513
  bytes: t => t.timeout ? 2 : 0,
501
514
  write(t, e, n) {
502
515
  if (n.timeout) {
@@ -522,7 +535,7 @@ const N = withRDLength({
522
535
  }
523
536
  });
524
537
 
525
- const S = withRDLength({
538
+ const T = withRDLength({
526
539
  bytes: t => t.length || 0,
527
540
  write: (t, e, n) => e + (n.length || 0),
528
541
  read(t, e) {
@@ -535,7 +548,7 @@ const S = withRDLength({
535
548
  }
536
549
  });
537
550
 
538
- const T = withRDLength({
551
+ const I = withRDLength({
539
552
  bytes: t => 2 * t.tags.length,
540
553
  write(t, e, n) {
541
554
  for (let r = 0; r < n.tags.length; r++) {
@@ -560,23 +573,23 @@ const T = withRDLength({
560
573
 
561
574
  const isUnknownOpt = t => !!t.data;
562
575
 
563
- const I = {
576
+ const P = {
564
577
  bytes(t) {
565
578
  if (isUnknownOpt(t)) {
566
579
  return E.bytes(t) + 2;
567
580
  }
568
581
  switch (t.code) {
569
582
  case s.CLIENT_SUBNET:
570
- return p.bytes(t) + 2;
583
+ return N.bytes(t) + 2;
571
584
 
572
585
  case s.TCP_KEEPALIVE:
573
- return N.bytes(t) + 2;
586
+ return S.bytes(t) + 2;
574
587
 
575
588
  case s.PADDING:
576
- return S.bytes(t) + 2;
589
+ return T.bytes(t) + 2;
577
590
 
578
591
  case s.KEY_TAG:
579
- return T.bytes(t) + 2;
592
+ return I.bytes(t) + 2;
580
593
  }
581
594
  },
582
595
  write(t, e, n) {
@@ -587,16 +600,16 @@ const I = {
587
600
  }
588
601
  switch (n.code) {
589
602
  case s.CLIENT_SUBNET:
590
- return p.write(t, e, n);
603
+ return N.write(t, e, n);
591
604
 
592
605
  case s.TCP_KEEPALIVE:
593
- return N.write(t, e, n);
606
+ return S.write(t, e, n);
594
607
 
595
608
  case s.PADDING:
596
- return S.write(t, e, n);
609
+ return T.write(t, e, n);
597
610
 
598
611
  case s.KEY_TAG:
599
- return T.write(t, e, n);
612
+ return I.write(t, e, n);
600
613
  }
601
614
  },
602
615
  read(t, e) {
@@ -604,16 +617,16 @@ const I = {
604
617
  advance(e, 2);
605
618
  switch (n) {
606
619
  case s.CLIENT_SUBNET:
607
- return p.read(t, e);
620
+ return N.read(t, e);
608
621
 
609
622
  case s.TCP_KEEPALIVE:
610
- return N.read(t, e);
623
+ return S.read(t, e);
611
624
 
612
625
  case s.PADDING:
613
- return S.read(t, e);
626
+ return T.read(t, e);
614
627
 
615
628
  case s.KEY_TAG:
616
- return T.read(t, e);
629
+ return I.read(t, e);
617
630
 
618
631
  default:
619
632
  const r = E.read(t, e);
@@ -623,7 +636,7 @@ const I = {
623
636
  }
624
637
  };
625
638
 
626
- let P = function(t) {
639
+ let R = function(t) {
627
640
  t[t.Mandatory = 0] = "Mandatory";
628
641
  t[t.Alpn = 1] = "Alpn";
629
642
  t[t.NoDefaultAlpn = 2] = "NoDefaultAlpn";
@@ -636,86 +649,87 @@ let P = function(t) {
636
649
  return t;
637
650
  }({});
638
651
 
639
- const R = withRDLength(array(g));
652
+ const D = withRDLength(array(y));
640
653
 
641
- const D = withRDLength(array(d));
654
+ const C = withRDLength(array(u));
642
655
 
643
- const C = withRDLength(g);
656
+ const m = withRDLength(y);
644
657
 
645
- const m = withRDLength(array(l));
658
+ const O = withRDLength(array(g));
646
659
 
647
- const O = withRDLength(array(y));
660
+ const L = withRDLength(array(U));
648
661
 
649
- const L = withRDLength(f);
662
+ const v = withRDLength(f);
650
663
 
651
- const v = {
664
+ const H = {
652
665
  bytes(t) {
653
666
  let e = 0;
654
667
  if (null != t.mandatory) {
655
- e += R.bytes(t.mandatory) + 2;
668
+ e += D.bytes(t.mandatory) + 2;
656
669
  }
657
670
  if (null != t.alpn) {
658
- e += D.bytes(t.alpn) + 2;
671
+ e += C.bytes(t.alpn) + 2;
659
672
  }
660
673
  if (t["no-default-alpn"]) {
661
674
  e += 4;
662
675
  }
663
676
  if (null != t.port) {
664
- e += C.bytes(t.port) + 2;
677
+ e += m.bytes(t.port) + 2;
665
678
  }
666
679
  if (t.ipv4hint) {
667
- e += m.bytes(t.ipv4hint) + 2;
680
+ e += O.bytes(t.ipv4hint) + 2;
668
681
  }
669
682
  if (t.ipv6hint) {
670
- e += O.bytes(t.ipv6hint) + 2;
683
+ e += L.bytes(t.ipv6hint) + 2;
671
684
  }
672
685
  if (t.echconfig) {
673
- e += L.bytes(t.echconfig) + 2;
686
+ e += v.bytes(t.echconfig) + 2;
674
687
  }
675
688
  if (t.dohpath) {
676
- e += L.bytes(t.dohpath) + 2;
689
+ e += v.bytes(t.dohpath) + 2;
677
690
  }
678
691
  if (t.odoh) {
679
- e += L.bytes(t.odoh) + 2;
692
+ e += v.bytes(t.odoh) + 2;
680
693
  }
681
694
  return e;
682
695
  },
683
696
  write(t, e, n) {
684
697
  if (null != n.mandatory) {
685
- t.setUint16(e, P.Mandatory);
686
- e = R.write(t, e + 2, n.mandatory);
698
+ t.setUint16(e, R.Mandatory);
699
+ e = D.write(t, e + 2, n.mandatory);
687
700
  }
688
701
  if (null != n.alpn) {
689
- t.setUint16(e, P.Alpn);
690
- e = D.write(t, e + 2, n.alpn);
702
+ t.setUint16(e, R.Alpn);
703
+ e = C.write(t, e + 2, n.alpn);
691
704
  }
692
705
  if (n["no-default-alpn"]) {
693
- t.setUint16(e, P.NoDefaultAlpn);
706
+ t.setUint16(e, R.NoDefaultAlpn);
707
+ t.setUint16(e + 2, 0);
694
708
  e += 4;
695
709
  }
696
710
  if (null != n.port) {
697
- t.setUint16(e, P.Port);
698
- e = C.write(t, e + 2, n.port);
711
+ t.setUint16(e, R.Port);
712
+ e = m.write(t, e + 2, n.port);
699
713
  }
700
714
  if (n.ipv4hint) {
701
- t.setUint16(e, P.Ipv4Hint);
702
- e = m.write(t, e + 2, n.ipv4hint);
715
+ t.setUint16(e, R.Ipv4Hint);
716
+ e = O.write(t, e + 2, n.ipv4hint);
703
717
  }
704
718
  if (n.ipv6hint) {
705
- t.setUint16(e, P.Ipv6Hint);
706
- e = O.write(t, e + 2, n.ipv6hint);
719
+ t.setUint16(e, R.Ipv6Hint);
720
+ e = L.write(t, e + 2, n.ipv6hint);
707
721
  }
708
722
  if (n.echconfig) {
709
- t.setUint16(e, P.EchConfig);
710
- e = L.write(t, e + 2, n.echconfig);
723
+ t.setUint16(e, R.EchConfig);
724
+ e = v.write(t, e + 2, n.echconfig);
711
725
  }
712
726
  if (n.dohpath) {
713
- t.setUint16(e, P.DohPath);
714
- e = L.write(t, e + 2, n.dohpath);
727
+ t.setUint16(e, R.DohPath);
728
+ e = v.write(t, e + 2, n.dohpath);
715
729
  }
716
730
  if (n.odoh) {
717
- t.setUint16(e, P.Odoh);
718
- e = L.write(t, e + 2, n.odoh);
731
+ t.setUint16(e, R.Odoh);
732
+ e = v.write(t, e + 2, n.odoh);
719
733
  }
720
734
  return e;
721
735
  },
@@ -736,62 +750,62 @@ const v = {
736
750
  const n = t.getUint16(e.offset);
737
751
  advance(e, 2);
738
752
  switch (n) {
739
- case P.Mandatory:
740
- s.mandatory = R.read(t, e);
753
+ case R.Mandatory:
754
+ s.mandatory = D.read(t, e);
741
755
  break;
742
756
 
743
- case P.Alpn:
744
- s.alpn = D.read(t, e);
757
+ case R.Alpn:
758
+ s.alpn = C.read(t, e);
745
759
  break;
746
760
 
747
- case P.NoDefaultAlpn:
761
+ case R.NoDefaultAlpn:
748
762
  s["no-default-alpn"] = !0;
749
763
  advance(e, 2);
750
764
  break;
751
765
 
752
- case P.Port:
753
- s.port = C.read(t, e);
766
+ case R.Port:
767
+ s.port = m.read(t, e);
754
768
  break;
755
769
 
756
- case P.Ipv4Hint:
757
- s.ipv4hint = m.read(t, e);
770
+ case R.Ipv4Hint:
771
+ s.ipv4hint = O.read(t, e);
758
772
  break;
759
773
 
760
- case P.Ipv6Hint:
761
- s.ipv6hint = O.read(t, e);
774
+ case R.Ipv6Hint:
775
+ s.ipv6hint = L.read(t, e);
762
776
  break;
763
777
 
764
- case P.EchConfig:
765
- s.echconfig = L.read(t, e);
778
+ case R.EchConfig:
779
+ s.echconfig = v.read(t, e);
766
780
  break;
767
781
 
768
- case P.DohPath:
769
- s.dohpath = i.decode(L.read(t, e));
782
+ case R.DohPath:
783
+ s.dohpath = i.decode(v.read(t, e));
770
784
  break;
771
785
 
772
- case P.Odoh:
773
- s.odoh = L.read(t, e);
786
+ case R.Odoh:
787
+ s.odoh = v.read(t, e);
774
788
  break;
775
789
 
776
790
  default:
777
- L.read(t, e);
791
+ v.read(t, e);
778
792
  }
779
793
  }
780
794
  return s;
781
795
  }
782
796
  };
783
797
 
784
- const H = withRDLength(f);
798
+ const x = withRDLength(f);
785
799
 
786
- const x = withRDLength(c);
800
+ const _ = withRDLength(c);
787
801
 
788
- const _ = withRDLength(l);
802
+ const M = withRDLength(g);
789
803
 
790
- const M = withRDLength(y);
804
+ const V = withRDLength(U);
791
805
 
792
- const V = withRDLength(array(d));
806
+ const Y = withRDLength(array(u));
793
807
 
794
- const Y = withRDLength({
808
+ const K = withRDLength({
795
809
  bytes: t => c.bytes(t.target) + 6,
796
810
  write(t, e, n) {
797
811
  t.setUint16(e, n.priority || 0);
@@ -815,15 +829,15 @@ const Y = withRDLength({
815
829
  }
816
830
  });
817
831
 
818
- const K = withRDLength({
819
- bytes: t => d.bytes(t.cpu) + d.bytes(t.os),
832
+ const X = withRDLength({
833
+ bytes: t => u.bytes(t.cpu) + u.bytes(t.os),
820
834
  write(t, e, n) {
821
- e = d.write(t, e, n.cpu);
822
- return e = d.write(t, e, n.os);
835
+ e = u.write(t, e, n.cpu);
836
+ return e = u.write(t, e, n.os);
823
837
  },
824
838
  read: (t, e) => ({
825
- cpu: d.read(t, e),
826
- os: d.read(t, e)
839
+ cpu: u.read(t, e),
840
+ os: u.read(t, e)
827
841
  })
828
842
  });
829
843
 
@@ -839,15 +853,15 @@ const toCaaTag = t => {
839
853
  }
840
854
  };
841
855
 
842
- const X = withRDLength({
843
- bytes: t => d.bytes(t.tag) + f.bytes(t.value) + 1,
856
+ const F = withRDLength({
857
+ bytes: t => u.bytes(t.tag) + f.bytes(t.value) + 1,
844
858
  write(t, e, n) {
845
859
  let r = n.flags || 0;
846
860
  if (n.issuerCritical) {
847
- r = 128;
861
+ r |= 128;
848
862
  }
849
863
  t.setUint8(e, r);
850
- e = d.write(t, e + 1, n.tag);
864
+ e = u.write(t, e + 1, n.tag);
851
865
  return e = f.write(t, e, n.value);
852
866
  },
853
867
  read(t, e) {
@@ -855,14 +869,14 @@ const X = withRDLength({
855
869
  advance(e, 1);
856
870
  return {
857
871
  flags: n,
858
- tag: toCaaTag(d.read(t, e)),
872
+ tag: toCaaTag(u.read(t, e)),
859
873
  value: f.read(t, e),
860
874
  issuerCritical: !!(128 & n)
861
875
  };
862
876
  }
863
877
  });
864
878
 
865
- const F = withRDLength({
879
+ const G = withRDLength({
866
880
  bytes: t => c.bytes(t.mname) + c.bytes(t.rname) + 20,
867
881
  write(t, e, n) {
868
882
  e = c.write(t, e, n.mname);
@@ -890,7 +904,7 @@ const F = withRDLength({
890
904
  }
891
905
  });
892
906
 
893
- const G = withRDLength({
907
+ const B = withRDLength({
894
908
  bytes: t => c.bytes(t.exchange) + 2,
895
909
  write(t, e, n) {
896
910
  t.setUint16(e, n.preference || 0);
@@ -907,7 +921,7 @@ const G = withRDLength({
907
921
  }
908
922
  });
909
923
 
910
- const B = withRDLength({
924
+ const k = withRDLength({
911
925
  bytes: t => f.bytes(t.key) + 4,
912
926
  write(t, e, n) {
913
927
  t.setUint16(e, n.flags);
@@ -927,7 +941,7 @@ const B = withRDLength({
927
941
  }
928
942
  });
929
943
 
930
- const k = withRDLength({
944
+ const $ = withRDLength({
931
945
  bytes: t => 18 + c.bytes(t.signersName) + f.bytes(t.signature),
932
946
  write(t, e, n) {
933
947
  t.setUint16(e, n.typeCovered);
@@ -963,7 +977,7 @@ const k = withRDLength({
963
977
  }
964
978
  });
965
979
 
966
- const $ = withRDLength({
980
+ const q = withRDLength({
967
981
  bytes: t => c.bytes(t.mbox) + c.bytes(t.txt),
968
982
  write(t, e, n) {
969
983
  e = c.write(t, e, n.mbox);
@@ -975,27 +989,27 @@ const $ = withRDLength({
975
989
  })
976
990
  });
977
991
 
978
- const q = withRDLength({
979
- bytes: t => c.bytes(t.nextDomain) + u.bytes(t.rrtypes),
992
+ const Q = withRDLength({
993
+ bytes: t => c.bytes(t.nextDomain) + l.bytes(t.rrtypes),
980
994
  write(t, e, n) {
981
995
  e = c.write(t, e, n.nextDomain);
982
- return e = u.write(t, e, n.rrtypes);
996
+ return e = l.write(t, e, n.rrtypes);
983
997
  },
984
998
  read: (t, e) => ({
985
999
  nextDomain: c.read(t, e),
986
- rrtypes: u.read(t, e)
1000
+ rrtypes: l.read(t, e)
987
1001
  })
988
1002
  });
989
1003
 
990
- const Q = withRDLength({
991
- bytes: t => d.bytes(t.salt) + d.bytes(t.nextDomain) + u.bytes(t.rrtypes) + 4,
1004
+ const j = withRDLength({
1005
+ bytes: t => d.bytes(t.salt) + d.bytes(t.nextDomain) + l.bytes(t.rrtypes) + 4,
992
1006
  write(t, e, n) {
993
1007
  t.setUint8(e, n.algorithm);
994
1008
  t.setUint8(e + 1, n.flags);
995
1009
  t.setUint16(e + 2, n.iterations);
996
1010
  e = d.write(t, e + 4, n.salt);
997
1011
  e = d.write(t, e, n.nextDomain);
998
- return e = u.write(t, e, n.rrtypes);
1012
+ return e = l.write(t, e, n.rrtypes);
999
1013
  },
1000
1014
  read(t, e) {
1001
1015
  const n = t.getUint8(e.offset);
@@ -1008,12 +1022,12 @@ const Q = withRDLength({
1008
1022
  iterations: s,
1009
1023
  salt: d.read(t, e),
1010
1024
  nextDomain: d.read(t, e),
1011
- rrtypes: u.read(t, e)
1025
+ rrtypes: l.read(t, e)
1012
1026
  };
1013
1027
  }
1014
1028
  });
1015
1029
 
1016
- const j = withRDLength({
1030
+ const z = withRDLength({
1017
1031
  bytes: t => f.bytes(t.fingerprint) + 2,
1018
1032
  write(t, e, n) {
1019
1033
  t.setUint8(e, n.algorithm);
@@ -1032,7 +1046,7 @@ const j = withRDLength({
1032
1046
  }
1033
1047
  });
1034
1048
 
1035
- const z = withRDLength({
1049
+ const W = withRDLength({
1036
1050
  bytes: t => f.bytes(t.digest) + 4,
1037
1051
  write(t, e, n) {
1038
1052
  t.setUint16(e, n.keyTag);
@@ -1054,14 +1068,14 @@ const z = withRDLength({
1054
1068
  }
1055
1069
  });
1056
1070
 
1057
- const W = withRDLength({
1058
- bytes: t => d.bytes(t.flags) + d.bytes(t.services) + d.bytes(t.regexp) + c.bytes(t.replacement) + 4,
1071
+ const Z = withRDLength({
1072
+ bytes: t => u.bytes(t.flags) + u.bytes(t.services) + u.bytes(t.regexp) + c.bytes(t.replacement) + 4,
1059
1073
  write(t, e, n) {
1060
1074
  t.setUint16(e, n.order);
1061
1075
  t.setUint16(e + 2, n.preference);
1062
- e = d.write(t, e + 4, n.flags);
1063
- e = d.write(t, e, n.services);
1064
- e = d.write(t, e, n.regexp);
1076
+ e = u.write(t, e + 4, n.flags);
1077
+ e = u.write(t, e, n.services);
1078
+ e = u.write(t, e, n.regexp);
1065
1079
  return e = c.write(t, e, n.replacement);
1066
1080
  },
1067
1081
  read(t, e) {
@@ -1071,15 +1085,15 @@ const W = withRDLength({
1071
1085
  return {
1072
1086
  order: n,
1073
1087
  preference: r,
1074
- flags: d.read(t, e),
1075
- services: d.read(t, e),
1076
- regexp: d.read(t, e),
1088
+ flags: u.read(t, e),
1089
+ services: u.read(t, e),
1090
+ regexp: u.read(t, e),
1077
1091
  replacement: c.read(t, e)
1078
1092
  };
1079
1093
  }
1080
1094
  });
1081
1095
 
1082
- const Z = withRDLength({
1096
+ const J = withRDLength({
1083
1097
  bytes: t => f.bytes(t.certificate) + 3,
1084
1098
  write(t, e, n) {
1085
1099
  t.setUint8(e, n.usage);
@@ -1101,12 +1115,12 @@ const Z = withRDLength({
1101
1115
  }
1102
1116
  });
1103
1117
 
1104
- const J = withRDLength({
1105
- bytes: t => c.bytes(t.name) + v.bytes(t.params) + 2,
1118
+ const tt = withRDLength({
1119
+ bytes: t => c.bytes(t.name) + H.bytes(t.params) + 2,
1106
1120
  write(t, e, n) {
1107
1121
  t.setUint16(e, n.priority || 0);
1108
1122
  e = c.write(t, e + 2, n.name);
1109
- return e = v.write(t, e, n.params);
1123
+ return e = H.write(t, e, n.params);
1110
1124
  },
1111
1125
  read(t, e) {
1112
1126
  const n = t.getUint16(e.offset);
@@ -1114,87 +1128,87 @@ const J = withRDLength({
1114
1128
  return {
1115
1129
  name: c.read(t, e),
1116
1130
  priority: n,
1117
- params: v.read(t, e)
1131
+ params: H.read(t, e)
1118
1132
  };
1119
1133
  }
1120
1134
  });
1121
1135
 
1122
- const tt = withRDLength(array(I));
1136
+ const et = withRDLength(array(P));
1123
1137
 
1124
- const et = 32768;
1138
+ const nt = 32768;
1125
1139
 
1126
- const nt = {
1140
+ const rt = {
1127
1141
  bytes(t) {
1128
1142
  const n = 8 + c.bytes(t.type === e.OPT ? "." : t.name);
1129
1143
  switch (t.type) {
1130
1144
  case e.A:
1131
- return n + _.bytes(t.data);
1145
+ return n + M.bytes(t.data);
1132
1146
 
1133
1147
  case e.NS:
1134
- return n + x.bytes(t.data);
1148
+ return n + _.bytes(t.data);
1135
1149
 
1136
1150
  case e.SOA:
1137
- return n + F.bytes(t.data);
1151
+ return n + G.bytes(t.data);
1138
1152
 
1139
1153
  case e.HINFO:
1140
- return n + K.bytes(t.data);
1154
+ return n + X.bytes(t.data);
1141
1155
 
1142
1156
  case e.MX:
1143
- return n + G.bytes(t.data);
1157
+ return n + B.bytes(t.data);
1144
1158
 
1145
1159
  case e.TXT:
1146
- return n + V.bytes(t.data);
1160
+ return n + Y.bytes(t.data);
1147
1161
 
1148
1162
  case e.RP:
1149
- return n + $.bytes(t.data);
1163
+ return n + q.bytes(t.data);
1150
1164
 
1151
1165
  case e.AAAA:
1152
- return n + M.bytes(t.data);
1166
+ return n + V.bytes(t.data);
1153
1167
 
1154
1168
  case e.SRV:
1155
- return n + Y.bytes(t.data);
1169
+ return n + K.bytes(t.data);
1156
1170
 
1157
1171
  case e.NAPTR:
1158
- return n + W.bytes(t.data);
1172
+ return n + Z.bytes(t.data);
1159
1173
 
1160
1174
  case e.OPT:
1161
- return n + tt.bytes(t.data);
1175
+ return n + et.bytes(t.data);
1162
1176
 
1163
1177
  case e.DS:
1164
- return n + z.bytes(t.data);
1178
+ return n + W.bytes(t.data);
1165
1179
 
1166
1180
  case e.SSHFP:
1167
- return n + j.bytes(t.data);
1181
+ return n + z.bytes(t.data);
1168
1182
 
1169
1183
  case e.RRSIG:
1170
- return n + k.bytes(t.data);
1184
+ return n + $.bytes(t.data);
1171
1185
 
1172
1186
  case e.NSEC:
1173
- return n + q.bytes(t.data);
1187
+ return n + Q.bytes(t.data);
1174
1188
 
1175
1189
  case e.DNSKEY:
1176
- return n + B.bytes(t.data);
1190
+ return n + k.bytes(t.data);
1177
1191
 
1178
1192
  case e.NSEC3:
1179
- return n + Q.bytes(t.data);
1193
+ return n + j.bytes(t.data);
1180
1194
 
1181
1195
  case e.TLSA:
1182
- return n + Z.bytes(t.data);
1196
+ return n + J.bytes(t.data);
1183
1197
 
1184
1198
  case e.SVCB:
1185
1199
  case e.HTTPS:
1186
- return n + J.bytes(t.data);
1200
+ return n + tt.bytes(t.data);
1187
1201
 
1188
1202
  case e.CAA:
1189
- return n + X.bytes(t.data);
1203
+ return n + F.bytes(t.data);
1190
1204
 
1191
1205
  case e.PTR:
1192
1206
  case e.CNAME:
1193
1207
  case e.DNAME:
1194
- return n + x.bytes(t.data);
1208
+ return n + _.bytes(t.data);
1195
1209
 
1196
1210
  default:
1197
- return n + H.bytes(t.data);
1211
+ return n + x.bytes(t.data);
1198
1212
  }
1199
1213
  },
1200
1214
  write(t, n, r) {
@@ -1205,79 +1219,79 @@ const nt = {
1205
1219
  t.setUint8(n + 4, r.extendedRcode || 0);
1206
1220
  t.setUint8(n + 5, r.ednsVersion || 0);
1207
1221
  t.setUint16(n + 6, r.flags || 0);
1208
- return tt.write(t, n += 8, r.data);
1222
+ return et.write(t, n += 8, r.data);
1209
1223
  }
1210
1224
  n = c.write(t, n, r.name);
1211
1225
  t.setUint16(n, r.type);
1212
- t.setUint16(n + 2, (r.class || 0) | (r.flush ? et : 0));
1226
+ t.setUint16(n + 2, (r.class || 0) | (r.flush ? nt : 0));
1213
1227
  t.setUint32(n + 4, r.ttl || 0);
1214
1228
  n += 8;
1215
1229
  switch (r.type) {
1216
1230
  case e.A:
1217
- return _.write(t, n, r.data);
1231
+ return M.write(t, n, r.data);
1218
1232
 
1219
1233
  case e.NS:
1220
- return x.write(t, n, r.data);
1234
+ return _.write(t, n, r.data);
1221
1235
 
1222
1236
  case e.SOA:
1223
- return F.write(t, n, r.data);
1237
+ return G.write(t, n, r.data);
1224
1238
 
1225
1239
  case e.HINFO:
1226
- return K.write(t, n, r.data);
1240
+ return X.write(t, n, r.data);
1227
1241
 
1228
1242
  case e.MX:
1229
- return G.write(t, n, r.data);
1243
+ return B.write(t, n, r.data);
1230
1244
 
1231
1245
  case e.TXT:
1232
- return V.write(t, n, r.data);
1246
+ return Y.write(t, n, r.data);
1233
1247
 
1234
1248
  case e.RP:
1235
- return $.write(t, n, r.data);
1249
+ return q.write(t, n, r.data);
1236
1250
 
1237
1251
  case e.AAAA:
1238
- return M.write(t, n, r.data);
1252
+ return V.write(t, n, r.data);
1239
1253
 
1240
1254
  case e.SRV:
1241
- return Y.write(t, n, r.data);
1255
+ return K.write(t, n, r.data);
1242
1256
 
1243
1257
  case e.NAPTR:
1244
- return W.write(t, n, r.data);
1258
+ return Z.write(t, n, r.data);
1245
1259
 
1246
1260
  case e.DS:
1247
- return z.write(t, n, r.data);
1261
+ return W.write(t, n, r.data);
1248
1262
 
1249
1263
  case e.SSHFP:
1250
- return j.write(t, n, r.data);
1264
+ return z.write(t, n, r.data);
1251
1265
 
1252
1266
  case e.RRSIG:
1253
- return k.write(t, n, r.data);
1267
+ return $.write(t, n, r.data);
1254
1268
 
1255
1269
  case e.NSEC:
1256
- return q.write(t, n, r.data);
1270
+ return Q.write(t, n, r.data);
1257
1271
 
1258
1272
  case e.DNSKEY:
1259
- return B.write(t, n, r.data);
1273
+ return k.write(t, n, r.data);
1260
1274
 
1261
1275
  case e.NSEC3:
1262
- return Q.write(t, n, r.data);
1276
+ return j.write(t, n, r.data);
1263
1277
 
1264
1278
  case e.TLSA:
1265
- return Z.write(t, n, r.data);
1279
+ return J.write(t, n, r.data);
1266
1280
 
1267
1281
  case e.SVCB:
1268
1282
  case e.HTTPS:
1269
- return J.write(t, n, r.data);
1283
+ return tt.write(t, n, r.data);
1270
1284
 
1271
1285
  case e.CAA:
1272
- return X.write(t, n, r.data);
1286
+ return F.write(t, n, r.data);
1273
1287
 
1274
1288
  case e.PTR:
1275
1289
  case e.CNAME:
1276
1290
  case e.DNAME:
1277
- return x.write(t, n, r.data);
1291
+ return _.write(t, n, r.data);
1278
1292
 
1279
1293
  default:
1280
- return H.write(t, n, r.data);
1294
+ return x.write(t, n, r.data);
1281
1295
  }
1282
1296
  },
1283
1297
  read(t, n) {
@@ -1295,7 +1309,7 @@ const nt = {
1295
1309
  extendedRcode: r,
1296
1310
  ednsVersion: a,
1297
1311
  flags: i,
1298
- data: tt.read(t, n)
1312
+ data: et.read(t, n)
1299
1313
  };
1300
1314
  }
1301
1315
  const a = t.getUint16(n.offset + 2);
@@ -1305,96 +1319,96 @@ const nt = {
1305
1319
  name: r,
1306
1320
  type: s,
1307
1321
  class: -32769 & a,
1308
- flush: !!(a & et),
1322
+ flush: !!(a & nt),
1309
1323
  ttl: i,
1310
1324
  data: null
1311
1325
  };
1312
1326
  switch (o.type) {
1313
1327
  case e.A:
1314
- o.data = _.read(t, n);
1328
+ o.data = M.read(t, n);
1315
1329
  return o;
1316
1330
 
1317
1331
  case e.NS:
1318
- o.data = x.read(t, n);
1332
+ o.data = _.read(t, n);
1319
1333
  return o;
1320
1334
 
1321
1335
  case e.SOA:
1322
- o.data = F.read(t, n);
1336
+ o.data = G.read(t, n);
1323
1337
  return o;
1324
1338
 
1325
1339
  case e.HINFO:
1326
- o.data = K.read(t, n);
1340
+ o.data = X.read(t, n);
1327
1341
  return o;
1328
1342
 
1329
1343
  case e.MX:
1330
- o.data = G.read(t, n);
1344
+ o.data = B.read(t, n);
1331
1345
  return o;
1332
1346
 
1333
1347
  case e.TXT:
1334
- o.data = V.read(t, n);
1348
+ o.data = Y.read(t, n);
1335
1349
  return o;
1336
1350
 
1337
1351
  case e.RP:
1338
- o.data = $.read(t, n);
1352
+ o.data = q.read(t, n);
1339
1353
  return o;
1340
1354
 
1341
1355
  case e.AAAA:
1342
- o.data = M.read(t, n);
1356
+ o.data = V.read(t, n);
1343
1357
  return o;
1344
1358
 
1345
1359
  case e.SRV:
1346
- o.data = Y.read(t, n);
1360
+ o.data = K.read(t, n);
1347
1361
  return o;
1348
1362
 
1349
1363
  case e.NAPTR:
1350
- o.data = W.read(t, n);
1364
+ o.data = Z.read(t, n);
1351
1365
  return o;
1352
1366
 
1353
1367
  case e.DS:
1354
- o.data = z.read(t, n);
1368
+ o.data = W.read(t, n);
1355
1369
  return o;
1356
1370
 
1357
1371
  case e.SSHFP:
1358
- o.data = j.read(t, n);
1372
+ o.data = z.read(t, n);
1359
1373
  return o;
1360
1374
 
1361
1375
  case e.RRSIG:
1362
- o.data = k.read(t, n);
1376
+ o.data = $.read(t, n);
1363
1377
  return o;
1364
1378
 
1365
1379
  case e.NSEC:
1366
- o.data = q.read(t, n);
1380
+ o.data = Q.read(t, n);
1367
1381
  return o;
1368
1382
 
1369
1383
  case e.DNSKEY:
1370
- o.data = B.read(t, n);
1384
+ o.data = k.read(t, n);
1371
1385
  return o;
1372
1386
 
1373
1387
  case e.NSEC3:
1374
- o.data = Q.read(t, n);
1388
+ o.data = j.read(t, n);
1375
1389
  return o;
1376
1390
 
1377
1391
  case e.TLSA:
1378
- o.data = Z.read(t, n);
1392
+ o.data = J.read(t, n);
1379
1393
  return o;
1380
1394
 
1381
1395
  case e.SVCB:
1382
1396
  case e.HTTPS:
1383
- o.data = J.read(t, n);
1397
+ o.data = tt.read(t, n);
1384
1398
  return o;
1385
1399
 
1386
1400
  case e.CAA:
1387
- o.data = X.read(t, n);
1401
+ o.data = F.read(t, n);
1388
1402
  return o;
1389
1403
 
1390
1404
  case e.PTR:
1391
1405
  case e.CNAME:
1392
1406
  case e.DNAME:
1393
- o.data = x.read(t, n);
1407
+ o.data = _.read(t, n);
1394
1408
  return o;
1395
1409
 
1396
1410
  default:
1397
- o.data = H.read(t, n);
1411
+ o.data = x.read(t, n);
1398
1412
  return o;
1399
1413
  }
1400
1414
  }
@@ -1412,22 +1426,22 @@ const readList = (t, e, n, r) => {
1412
1426
  return i;
1413
1427
  };
1414
1428
 
1415
- const rt = {
1429
+ const st = {
1416
1430
  bytes(t) {
1417
1431
  const {questions: e, answers: n, authorities: r, additionals: s} = t;
1418
1432
  let a = 12;
1419
1433
  let i = 0;
1420
1434
  for (i = 0; e && i < e.length; i++) {
1421
- a += h.bytes(e[i]);
1435
+ a += w.bytes(e[i]);
1422
1436
  }
1423
1437
  for (i = 0; n && i < n.length; i++) {
1424
- a += nt.bytes(n[i]);
1438
+ a += rt.bytes(n[i]);
1425
1439
  }
1426
1440
  for (i = 0; r && i < r.length; i++) {
1427
- a += nt.bytes(r[i]);
1441
+ a += rt.bytes(r[i]);
1428
1442
  }
1429
1443
  for (i = 0; s && i < s.length; i++) {
1430
- a += nt.bytes(s[i]);
1444
+ a += rt.bytes(s[i]);
1431
1445
  }
1432
1446
  return a;
1433
1447
  },
@@ -1443,16 +1457,16 @@ const rt = {
1443
1457
  n += 12;
1444
1458
  let f = 0;
1445
1459
  for (f = 0; s && f < s.length; f++) {
1446
- n = h.write(e, n, s[f]);
1460
+ n = w.write(e, n, s[f]);
1447
1461
  }
1448
1462
  for (f = 0; a && f < a.length; f++) {
1449
- n = nt.write(e, n, a[f]);
1463
+ n = rt.write(e, n, a[f]);
1450
1464
  }
1451
1465
  for (f = 0; i && f < i.length; f++) {
1452
- n = nt.write(e, n, i[f]);
1466
+ n = rt.write(e, n, i[f]);
1453
1467
  }
1454
1468
  for (f = 0; o && f < o.length; f++) {
1455
- n = nt.write(e, n, o[f]);
1469
+ n = rt.write(e, n, o[f]);
1456
1470
  }
1457
1471
  return n;
1458
1472
  },
@@ -1469,17 +1483,17 @@ const rt = {
1469
1483
  flags: s,
1470
1484
  rtype: 15 & s,
1471
1485
  type: s & t.RESPONSE ? t.RESPONSE : t.QUERY,
1472
- questions: readList(h, e, n, a),
1473
- answers: readList(nt, e, n, i),
1474
- authorities: readList(nt, e, n, o),
1475
- additionals: readList(nt, e, n, c)
1486
+ questions: readList(w, e, n, a),
1487
+ answers: readList(rt, e, n, i),
1488
+ authorities: readList(rt, e, n, o),
1489
+ additionals: readList(rt, e, n, c)
1476
1490
  };
1477
1491
  }
1478
1492
  };
1479
1493
 
1480
1494
  function decode(t) {
1481
1495
  const e = "buffer" in t ? new DataView(t.buffer, t.byteOffset, t.byteLength) : new DataView(t);
1482
- return rt.read(e, {
1496
+ return st.read(e, {
1483
1497
  offset: 0,
1484
1498
  length: e.byteLength
1485
1499
  });
@@ -1488,26 +1502,26 @@ function decode(t) {
1488
1502
  function streamDecode(t) {
1489
1503
  const e = "buffer" in t ? new DataView(t.buffer, t.byteOffset, t.byteLength) : new DataView(t);
1490
1504
  const n = Math.min(e.byteLength - 2, e.getUint16(0));
1491
- return rt.read(e, {
1505
+ return st.read(e, {
1492
1506
  offset: 2,
1493
1507
  length: n
1494
1508
  });
1495
1509
  }
1496
1510
 
1497
1511
  function encodingLength(t) {
1498
- return rt.bytes(t);
1512
+ return st.bytes(t);
1499
1513
  }
1500
1514
 
1501
1515
  function encode(t) {
1502
- const e = new ArrayBuffer(rt.bytes(t));
1503
- const n = rt.write(new DataView(e), 0, t);
1516
+ const e = new ArrayBuffer(st.bytes(t));
1517
+ const n = st.write(new DataView(e), 0, t);
1504
1518
  return new Uint8Array(e, 0, n);
1505
1519
  }
1506
1520
 
1507
1521
  function streamEncode(t) {
1508
- const e = new ArrayBuffer(rt.bytes(t) + 2);
1522
+ const e = new ArrayBuffer(st.bytes(t) + 2);
1509
1523
  const n = new DataView(e);
1510
- const r = rt.write(n, 2, t);
1524
+ const r = st.write(n, 2, t);
1511
1525
  n.setUint16(0, r - 2);
1512
1526
  return new Uint8Array(e, 0, r);
1513
1527
  }