@mattrglobal/verifier-sdk-web 2.1.1-unstable.83 → 2.1.1-unstable.85

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.
@@ -7,13 +7,13 @@
7
7
  * Do Not Translate or Localize
8
8
  *
9
9
  * Bundle of @mattrglobal/verifier-sdk-web
10
- * Generated: 2025-12-05
10
+ * Generated: 2025-12-10
11
11
  * Version: 2.1.0
12
12
  * Dependencies:
13
13
  *
14
14
  * neverthrow -- 4.3.0
15
15
  *
16
- * valibot -- 1.1.0
16
+ * valibot -- 1.2.0
17
17
  *
18
18
  * is-mobile -- 4.0.0
19
19
  */
@@ -579,55 +579,49 @@ function _unsupportedIterableToArray(r, a) {
579
579
  }
580
580
  }
581
581
 
582
- var store;
582
+ var store$4;
583
583
 
584
- function getGlobalConfig(config2) {
585
- var _config2$lang, _store, _config2$abortEarly, _store2, _config2$abortPipeEar, _store3;
584
+ function getGlobalConfig(config$1) {
585
+ var _config$1$lang, _store$, _config$1$abortEarly, _store$2, _config$1$abortPipeEa, _store$3;
586
586
  return {
587
- lang: (_config2$lang = config2 === null || config2 === void 0 ? void 0 : config2.lang) !== null && _config2$lang !== void 0 ? _config2$lang : (_store = store) === null || _store === void 0 ? void 0 : _store.lang,
588
- message: config2 === null || config2 === void 0 ? void 0 : config2.message,
589
- abortEarly: (_config2$abortEarly = config2 === null || config2 === void 0 ? void 0 : config2.abortEarly) !== null && _config2$abortEarly !== void 0 ? _config2$abortEarly : (_store2 = store) === null || _store2 === void 0 ? void 0 : _store2.abortEarly,
590
- abortPipeEarly: (_config2$abortPipeEar = config2 === null || config2 === void 0 ? void 0 : config2.abortPipeEarly) !== null && _config2$abortPipeEar !== void 0 ? _config2$abortPipeEar : (_store3 = store) === null || _store3 === void 0 ? void 0 : _store3.abortPipeEarly
587
+ lang: (_config$1$lang = config$1 === null || config$1 === void 0 ? void 0 : config$1.lang) !== null && _config$1$lang !== void 0 ? _config$1$lang : (_store$ = store$4) === null || _store$ === void 0 ? void 0 : _store$.lang,
588
+ message: config$1 === null || config$1 === void 0 ? void 0 : config$1.message,
589
+ abortEarly: (_config$1$abortEarly = config$1 === null || config$1 === void 0 ? void 0 : config$1.abortEarly) !== null && _config$1$abortEarly !== void 0 ? _config$1$abortEarly : (_store$2 = store$4) === null || _store$2 === void 0 ? void 0 : _store$2.abortEarly,
590
+ abortPipeEarly: (_config$1$abortPipeEa = config$1 === null || config$1 === void 0 ? void 0 : config$1.abortPipeEarly) !== null && _config$1$abortPipeEa !== void 0 ? _config$1$abortPipeEa : (_store$3 = store$4) === null || _store$3 === void 0 ? void 0 : _store$3.abortPipeEarly
591
591
  };
592
592
  }
593
593
 
594
- var store2;
594
+ var store$3;
595
595
 
596
596
  function getGlobalMessage(lang) {
597
- var _store4;
598
- return (_store4 = store2) === null || _store4 === void 0 ? void 0 : _store4.get(lang);
597
+ var _store$4;
598
+ return (_store$4 = store$3) === null || _store$4 === void 0 ? void 0 : _store$4.get(lang);
599
599
  }
600
600
 
601
- var store3;
601
+ var store$2;
602
602
 
603
603
  function getSchemaMessage(lang) {
604
- var _store6;
605
- return (_store6 = store3) === null || _store6 === void 0 ? void 0 : _store6.get(lang);
604
+ var _store$6;
605
+ return (_store$6 = store$2) === null || _store$6 === void 0 ? void 0 : _store$6.get(lang);
606
606
  }
607
607
 
608
- var store4;
608
+ var store$1;
609
609
 
610
610
  function getSpecificMessage(reference, lang) {
611
- var _store8;
612
- return (_store8 = store4) === null || _store8 === void 0 || (_store8 = _store8.get(reference)) === null || _store8 === void 0 ? void 0 : _store8.get(lang);
611
+ var _store$8;
612
+ return (_store$8 = store$1) === null || _store$8 === void 0 || (_store$8 = _store$8.get(reference)) === null || _store$8 === void 0 ? void 0 : _store$8.get(lang);
613
613
  }
614
614
 
615
615
  function _stringify(input) {
616
+ var _ref, _Object$getPrototypeO;
616
617
  var type = _typeof(input);
617
- if (type === "string") {
618
- return '"'.concat(input, '"');
619
- }
620
- if (type === "number" || type === "bigint" || type === "boolean") {
621
- return "".concat(input);
622
- }
623
- if (type === "object" || type === "function") {
624
- var _ref, _Object$getPrototypeO;
625
- return (_ref = input && ((_Object$getPrototypeO = Object.getPrototypeOf(input)) === null || _Object$getPrototypeO === void 0 || (_Object$getPrototypeO = _Object$getPrototypeO.constructor) === null || _Object$getPrototypeO === void 0 ? void 0 : _Object$getPrototypeO.name)) !== null && _ref !== void 0 ? _ref : "null";
626
- }
618
+ if (type === "string") return '"'.concat(input, '"');
619
+ if (type === "number" || type === "bigint" || type === "boolean") return "".concat(input);
620
+ if (type === "object" || type === "function") return (_ref = input && ((_Object$getPrototypeO = Object.getPrototypeOf(input)) === null || _Object$getPrototypeO === void 0 || (_Object$getPrototypeO = _Object$getPrototypeO.constructor) === null || _Object$getPrototypeO === void 0 ? void 0 : _Object$getPrototypeO.name)) !== null && _ref !== void 0 ? _ref : "null";
627
621
  return type;
628
622
  }
629
623
 
630
- function _addIssue(context, label, dataset, config2, other) {
624
+ function _addIssue(context, label, dataset, config$1, other) {
631
625
  var _ref2, _other$expected, _other$received, _ref3, _ref4, _ref5, _ref6, _other$message;
632
626
  var input = other && "input" in other ? other.input : dataset.value;
633
627
  var expected = (_ref2 = (_other$expected = other === null || other === void 0 ? void 0 : other.expected) !== null && _other$expected !== void 0 ? _other$expected : context.expects) !== null && _ref2 !== void 0 ? _ref2 : null;
@@ -642,70 +636,58 @@ function _addIssue(context, label, dataset, config2, other) {
642
636
  requirement: context.requirement,
643
637
  path: other === null || other === void 0 ? void 0 : other.path,
644
638
  issues: other === null || other === void 0 ? void 0 : other.issues,
645
- lang: config2.lang,
646
- abortEarly: config2.abortEarly,
647
- abortPipeEarly: config2.abortPipeEarly
639
+ lang: config$1.lang,
640
+ abortEarly: config$1.abortEarly,
641
+ abortPipeEarly: config$1.abortPipeEarly
648
642
  };
649
643
  var isSchema = context.kind === "schema";
650
- var message2 = (_ref3 = (_ref4 = (_ref5 = (_ref6 = (_other$message = other === null || other === void 0 ? void 0 : other.message) !== null && _other$message !== void 0 ? _other$message : context.message) !== null && _ref6 !== void 0 ? _ref6 : getSpecificMessage(context.reference, issue.lang)) !== null && _ref5 !== void 0 ? _ref5 : isSchema ? getSchemaMessage(issue.lang) : null) !== null && _ref4 !== void 0 ? _ref4 : config2.message) !== null && _ref3 !== void 0 ? _ref3 : getGlobalMessage(issue.lang);
651
- if (message2 !== void 0) {
652
- issue.message = typeof message2 === "function" ? message2(issue) : message2;
653
- }
654
- if (isSchema) {
655
- dataset.typed = false;
656
- }
657
- if (dataset.issues) {
658
- dataset.issues.push(issue);
659
- } else {
660
- dataset.issues = [ issue ];
661
- }
644
+ var message$1 = (_ref3 = (_ref4 = (_ref5 = (_ref6 = (_other$message = other === null || other === void 0 ? void 0 : other.message) !== null && _other$message !== void 0 ? _other$message : context.message) !== null && _ref6 !== void 0 ? _ref6 : getSpecificMessage(context.reference, issue.lang)) !== null && _ref5 !== void 0 ? _ref5 : isSchema ? getSchemaMessage(issue.lang) : null) !== null && _ref4 !== void 0 ? _ref4 : config$1.message) !== null && _ref3 !== void 0 ? _ref3 : getGlobalMessage(issue.lang);
645
+ if (message$1 !== void 0) issue.message = typeof message$1 === "function" ? message$1(issue) : message$1;
646
+ if (isSchema) dataset.typed = false;
647
+ if (dataset.issues) dataset.issues.push(issue); else dataset.issues = [ issue ];
662
648
  }
663
649
 
664
650
  function _getStandardProps(context) {
665
651
  return {
666
652
  version: 1,
667
653
  vendor: "valibot",
668
- validate: function validate(value2) {
654
+ validate: function validate(value$1) {
669
655
  return context["~run"]({
670
- value: value2
656
+ value: value$1
671
657
  }, getGlobalConfig());
672
658
  }
673
659
  };
674
660
  }
675
661
 
676
- function _isValidObjectKey(object2, key) {
677
- return Object.hasOwn(object2, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
662
+ function _isValidObjectKey(object$1, key) {
663
+ return Object.hasOwn(object$1, key) && key !== "__proto__" && key !== "prototype" && key !== "constructor";
678
664
  }
679
665
 
680
- function _joinExpects(values2, separator) {
666
+ function _joinExpects(values$1, separator) {
681
667
  var _list$;
682
- var list = _toConsumableArray(new Set(values2));
683
- if (list.length > 1) {
684
- return "(".concat(list.join(" ".concat(separator, " ")), ")");
685
- }
668
+ var list = _toConsumableArray(new Set(values$1));
669
+ if (list.length > 1) return "(".concat(list.join(" ".concat(separator, " ")), ")");
686
670
  return (_list$ = list[0]) !== null && _list$ !== void 0 ? _list$ : "never";
687
671
  }
688
672
 
689
- function nonEmpty(message2) {
673
+ function nonEmpty(message$1) {
690
674
  return {
691
675
  kind: "validation",
692
676
  type: "non_empty",
693
677
  reference: nonEmpty,
694
678
  async: false,
695
679
  expects: "!0",
696
- message: message2,
697
- "~run": function run(dataset, config2) {
698
- if (dataset.typed && dataset.value.length === 0) {
699
- _addIssue(this, "length", dataset, config2, {
700
- received: "0"
701
- });
702
- }
680
+ message: message$1,
681
+ "~run": function run(dataset, config$1) {
682
+ if (dataset.typed && dataset.value.length === 0) _addIssue(this, "length", dataset, config$1, {
683
+ received: "0"
684
+ });
703
685
  return dataset;
704
686
  }
705
687
  };
706
688
  }
707
689
 
708
- function url(message2) {
690
+ function url(message$1) {
709
691
  return {
710
692
  kind: "validation",
711
693
  type: "url",
@@ -716,26 +698,24 @@ function url(message2) {
716
698
  try {
717
699
  new URL(input);
718
700
  return true;
719
- } catch (_unused) {
701
+ } catch (_unused5) {
720
702
  return false;
721
703
  }
722
704
  },
723
- message: message2,
724
- "~run": function run(dataset, config2) {
725
- if (dataset.typed && !this.requirement(dataset.value)) {
726
- _addIssue(this, "URL", dataset, config2);
727
- }
705
+ message: message$1,
706
+ "~run": function run(dataset, config$1) {
707
+ if (dataset.typed && !this.requirement(dataset.value)) _addIssue(this, "URL", dataset, config$1);
728
708
  return dataset;
729
709
  }
730
710
  };
731
711
  }
732
712
 
733
- function getFallback(schema, dataset, config2) {
734
- return typeof schema.fallback === "function" ? schema.fallback(dataset, config2) : schema.fallback;
713
+ function getFallback(schema, dataset, config$1) {
714
+ return typeof schema.fallback === "function" ? schema.fallback(dataset, config$1) : schema.fallback;
735
715
  }
736
716
 
737
- function getDefault(schema, dataset, config2) {
738
- return typeof schema["default"] === "function" ? schema["default"](dataset, config2) : schema["default"];
717
+ function getDefault(schema, dataset, config$1) {
718
+ return typeof schema["default"] === "function" ? schema["default"](dataset, config$1) : schema["default"];
739
719
  }
740
720
 
741
721
  function any() {
@@ -755,7 +735,7 @@ function any() {
755
735
  };
756
736
  }
757
737
 
758
- function array(item, message2) {
738
+ function array(item, message$1) {
759
739
  return {
760
740
  kind: "schema",
761
741
  type: "array",
@@ -763,89 +743,75 @@ function array(item, message2) {
763
743
  expects: "Array",
764
744
  async: false,
765
745
  item: item,
766
- message: message2,
746
+ message: message$1,
767
747
  get "~standard"() {
768
748
  return _getStandardProps(this);
769
749
  },
770
- "~run": function run(dataset, config2) {
750
+ "~run": function run(dataset, config$1) {
771
751
  var input = dataset.value;
772
752
  if (Array.isArray(input)) {
773
753
  dataset.typed = true;
774
754
  dataset.value = [];
775
755
  for (var key = 0; key < input.length; key++) {
776
- var value2 = input[key];
756
+ var value$1 = input[key];
777
757
  var itemDataset = this.item["~run"]({
778
- value: value2
779
- }, config2);
758
+ value: value$1
759
+ }, config$1);
780
760
  if (itemDataset.issues) {
781
761
  var pathItem = {
782
762
  type: "array",
783
763
  origin: "value",
784
764
  input: input,
785
765
  key: key,
786
- value: value2
766
+ value: value$1
787
767
  };
788
- var _iterator14 = _createForOfIteratorHelper(itemDataset.issues), _step14;
768
+ var _iterator15 = _createForOfIteratorHelper(itemDataset.issues), _step15;
789
769
  try {
790
- for (_iterator14.s(); !(_step14 = _iterator14.n()).done; ) {
770
+ for (_iterator15.s(); !(_step15 = _iterator15.n()).done; ) {
791
771
  var _dataset$issues;
792
- var issue = _step14.value;
793
- if (issue.path) {
794
- issue.path.unshift(pathItem);
795
- } else {
796
- issue.path = [ pathItem ];
797
- }
772
+ var issue = _step15.value;
773
+ if (issue.path) issue.path.unshift(pathItem); else issue.path = [ pathItem ];
798
774
  (_dataset$issues = dataset.issues) === null || _dataset$issues === void 0 || _dataset$issues.push(issue);
799
775
  }
800
776
  } catch (err) {
801
- _iterator14.e(err);
777
+ _iterator15.e(err);
802
778
  } finally {
803
- _iterator14.f();
804
- }
805
- if (!dataset.issues) {
806
- dataset.issues = itemDataset.issues;
779
+ _iterator15.f();
807
780
  }
808
- if (config2.abortEarly) {
781
+ if (!dataset.issues) dataset.issues = itemDataset.issues;
782
+ if (config$1.abortEarly) {
809
783
  dataset.typed = false;
810
784
  break;
811
785
  }
812
786
  }
813
- if (!itemDataset.typed) {
814
- dataset.typed = false;
815
- }
787
+ if (!itemDataset.typed) dataset.typed = false;
816
788
  dataset.value.push(itemDataset.value);
817
789
  }
818
- } else {
819
- _addIssue(this, "type", dataset, config2);
820
- }
790
+ } else _addIssue(this, "type", dataset, config$1);
821
791
  return dataset;
822
792
  }
823
793
  };
824
794
  }
825
795
 
826
- function _boolean(message2) {
796
+ function _boolean(message$1) {
827
797
  return {
828
798
  kind: "schema",
829
799
  type: "boolean",
830
800
  reference: _boolean,
831
801
  expects: "boolean",
832
802
  async: false,
833
- message: message2,
803
+ message: message$1,
834
804
  get "~standard"() {
835
805
  return _getStandardProps(this);
836
806
  },
837
- "~run": function run(dataset, config2) {
838
- if (typeof dataset.value === "boolean") {
839
- dataset.typed = true;
840
- } else {
841
- _addIssue(this, "type", dataset, config2);
842
- }
807
+ "~run": function run(dataset, config$1) {
808
+ if (typeof dataset.value === "boolean") dataset.typed = true; else _addIssue(this, "type", dataset, config$1);
843
809
  return dataset;
844
810
  }
845
811
  };
846
812
  }
847
813
 
848
- function literal(literal_, message2) {
814
+ function literal(literal_, message$1) {
849
815
  return {
850
816
  kind: "schema",
851
817
  type: "literal",
@@ -853,56 +819,48 @@ function literal(literal_, message2) {
853
819
  expects: _stringify(literal_),
854
820
  async: false,
855
821
  literal: literal_,
856
- message: message2,
822
+ message: message$1,
857
823
  get "~standard"() {
858
824
  return _getStandardProps(this);
859
825
  },
860
- "~run": function run(dataset, config2) {
861
- if (dataset.value === this.literal) {
862
- dataset.typed = true;
863
- } else {
864
- _addIssue(this, "type", dataset, config2);
865
- }
826
+ "~run": function run(dataset, config$1) {
827
+ if (dataset.value === this.literal) dataset.typed = true; else _addIssue(this, "type", dataset, config$1);
866
828
  return dataset;
867
829
  }
868
830
  };
869
831
  }
870
832
 
871
- function number(message2) {
833
+ function number(message$1) {
872
834
  return {
873
835
  kind: "schema",
874
836
  type: "number",
875
837
  reference: number,
876
838
  expects: "number",
877
839
  async: false,
878
- message: message2,
840
+ message: message$1,
879
841
  get "~standard"() {
880
842
  return _getStandardProps(this);
881
843
  },
882
- "~run": function run(dataset, config2) {
883
- if (typeof dataset.value === "number" && !isNaN(dataset.value)) {
884
- dataset.typed = true;
885
- } else {
886
- _addIssue(this, "type", dataset, config2);
887
- }
844
+ "~run": function run(dataset, config$1) {
845
+ if (typeof dataset.value === "number" && !isNaN(dataset.value)) dataset.typed = true; else _addIssue(this, "type", dataset, config$1);
888
846
  return dataset;
889
847
  }
890
848
  };
891
849
  }
892
850
 
893
- function object(entries2, message2) {
851
+ function object(entries$1, message$1) {
894
852
  return {
895
853
  kind: "schema",
896
854
  type: "object",
897
855
  reference: object,
898
856
  expects: "Object",
899
857
  async: false,
900
- entries: entries2,
901
- message: message2,
858
+ entries: entries$1,
859
+ message: message$1,
902
860
  get "~standard"() {
903
861
  return _getStandardProps(this);
904
862
  },
905
- "~run": function run(dataset, config2) {
863
+ "~run": function run(dataset, config$1) {
906
864
  var input = dataset.value;
907
865
  if (input && _typeof(input) === "object") {
908
866
  dataset.typed = true;
@@ -910,51 +868,41 @@ function object(entries2, message2) {
910
868
  for (var key in this.entries) {
911
869
  var valueSchema = this.entries[key];
912
870
  if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema["default"] !== void 0) {
913
- var value2 = key in input ? input[key] : getDefault(valueSchema);
871
+ var value$1 = key in input ? input[key] : getDefault(valueSchema);
914
872
  var valueDataset = valueSchema["~run"]({
915
- value: value2
916
- }, config2);
873
+ value: value$1
874
+ }, config$1);
917
875
  if (valueDataset.issues) {
918
876
  var pathItem = {
919
877
  type: "object",
920
878
  origin: "value",
921
879
  input: input,
922
880
  key: key,
923
- value: value2
881
+ value: value$1
924
882
  };
925
- var _iterator30 = _createForOfIteratorHelper(valueDataset.issues), _step30;
883
+ var _iterator31 = _createForOfIteratorHelper(valueDataset.issues), _step31;
926
884
  try {
927
- for (_iterator30.s(); !(_step30 = _iterator30.n()).done; ) {
885
+ for (_iterator31.s(); !(_step31 = _iterator31.n()).done; ) {
928
886
  var _dataset$issues13;
929
- var issue = _step30.value;
930
- if (issue.path) {
931
- issue.path.unshift(pathItem);
932
- } else {
933
- issue.path = [ pathItem ];
934
- }
887
+ var issue = _step31.value;
888
+ if (issue.path) issue.path.unshift(pathItem); else issue.path = [ pathItem ];
935
889
  (_dataset$issues13 = dataset.issues) === null || _dataset$issues13 === void 0 || _dataset$issues13.push(issue);
936
890
  }
937
891
  } catch (err) {
938
- _iterator30.e(err);
892
+ _iterator31.e(err);
939
893
  } finally {
940
- _iterator30.f();
941
- }
942
- if (!dataset.issues) {
943
- dataset.issues = valueDataset.issues;
894
+ _iterator31.f();
944
895
  }
945
- if (config2.abortEarly) {
896
+ if (!dataset.issues) dataset.issues = valueDataset.issues;
897
+ if (config$1.abortEarly) {
946
898
  dataset.typed = false;
947
899
  break;
948
900
  }
949
901
  }
950
- if (!valueDataset.typed) {
951
- dataset.typed = false;
952
- }
902
+ if (!valueDataset.typed) dataset.typed = false;
953
903
  dataset.value[key] = valueDataset.value;
954
- } else if (valueSchema.fallback !== void 0) {
955
- dataset.value[key] = getFallback(valueSchema);
956
- } else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
957
- _addIssue(this, "key", dataset, config2, {
904
+ } else if (valueSchema.fallback !== void 0) dataset.value[key] = getFallback(valueSchema); else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
905
+ _addIssue(this, "key", dataset, config$1, {
958
906
  input: void 0,
959
907
  expected: '"'.concat(key, '"'),
960
908
  path: [ {
@@ -965,14 +913,10 @@ function object(entries2, message2) {
965
913
  value: input[key]
966
914
  } ]
967
915
  });
968
- if (config2.abortEarly) {
969
- break;
970
- }
916
+ if (config$1.abortEarly) break;
971
917
  }
972
918
  }
973
- } else {
974
- _addIssue(this, "type", dataset, config2);
975
- }
919
+ } else _addIssue(this, "type", dataset, config$1);
976
920
  return dataset;
977
921
  }
978
922
  };
@@ -990,22 +934,20 @@ function optional(wrapped, default_) {
990
934
  get "~standard"() {
991
935
  return _getStandardProps(this);
992
936
  },
993
- "~run": function run(dataset, config2) {
937
+ "~run": function run(dataset, config$1) {
994
938
  if (dataset.value === void 0) {
995
- if (this["default"] !== void 0) {
996
- dataset.value = getDefault(this, dataset, config2);
997
- }
939
+ if (this["default"] !== void 0) dataset.value = getDefault(this, dataset, config$1);
998
940
  if (dataset.value === void 0) {
999
941
  dataset.typed = true;
1000
942
  return dataset;
1001
943
  }
1002
944
  }
1003
- return this.wrapped["~run"](dataset, config2);
945
+ return this.wrapped["~run"](dataset, config$1);
1004
946
  }
1005
947
  };
1006
948
  }
1007
949
 
1008
- function picklist(options, message2) {
950
+ function picklist(options, message$1) {
1009
951
  return {
1010
952
  kind: "schema",
1011
953
  type: "picklist",
@@ -1013,22 +955,18 @@ function picklist(options, message2) {
1013
955
  expects: _joinExpects(options.map(_stringify), "|"),
1014
956
  async: false,
1015
957
  options: options,
1016
- message: message2,
958
+ message: message$1,
1017
959
  get "~standard"() {
1018
960
  return _getStandardProps(this);
1019
961
  },
1020
- "~run": function run(dataset, config2) {
1021
- if (this.options.includes(dataset.value)) {
1022
- dataset.typed = true;
1023
- } else {
1024
- _addIssue(this, "type", dataset, config2);
1025
- }
962
+ "~run": function run(dataset, config$1) {
963
+ if (this.options.includes(dataset.value)) dataset.typed = true; else _addIssue(this, "type", dataset, config$1);
1026
964
  return dataset;
1027
965
  }
1028
966
  };
1029
967
  }
1030
968
 
1031
- function record(key, value2, message2) {
969
+ function record(key, value$1, message$1) {
1032
970
  return {
1033
971
  kind: "schema",
1034
972
  type: "record",
@@ -1036,116 +974,100 @@ function record(key, value2, message2) {
1036
974
  expects: "Object",
1037
975
  async: false,
1038
976
  key: key,
1039
- value: value2,
1040
- message: message2,
977
+ value: value$1,
978
+ message: message$1,
1041
979
  get "~standard"() {
1042
980
  return _getStandardProps(this);
1043
981
  },
1044
- "~run": function run(dataset, config2) {
982
+ "~run": function run(dataset, config$1) {
1045
983
  var input = dataset.value;
1046
984
  if (input && _typeof(input) === "object") {
1047
985
  dataset.typed = true;
1048
986
  dataset.value = {};
1049
- for (var entryKey in input) {
1050
- if (_isValidObjectKey(input, entryKey)) {
1051
- var entryValue = input[entryKey];
1052
- var keyDataset = this.key["~run"]({
1053
- value: entryKey
1054
- }, config2);
1055
- if (keyDataset.issues) {
1056
- var pathItem = {
1057
- type: "object",
1058
- origin: "key",
1059
- input: input,
1060
- key: entryKey,
1061
- value: entryValue
1062
- };
1063
- var _iterator39 = _createForOfIteratorHelper(keyDataset.issues), _step39;
1064
- try {
1065
- for (_iterator39.s(); !(_step39 = _iterator39.n()).done; ) {
1066
- var _dataset$issues19;
1067
- var issue = _step39.value;
1068
- issue.path = [ pathItem ];
1069
- (_dataset$issues19 = dataset.issues) === null || _dataset$issues19 === void 0 || _dataset$issues19.push(issue);
1070
- }
1071
- } catch (err) {
1072
- _iterator39.e(err);
1073
- } finally {
1074
- _iterator39.f();
1075
- }
1076
- if (!dataset.issues) {
1077
- dataset.issues = keyDataset.issues;
1078
- }
1079
- if (config2.abortEarly) {
1080
- dataset.typed = false;
1081
- break;
987
+ for (var entryKey in input) if (_isValidObjectKey(input, entryKey)) {
988
+ var entryValue = input[entryKey];
989
+ var keyDataset = this.key["~run"]({
990
+ value: entryKey
991
+ }, config$1);
992
+ if (keyDataset.issues) {
993
+ var pathItem = {
994
+ type: "object",
995
+ origin: "key",
996
+ input: input,
997
+ key: entryKey,
998
+ value: entryValue
999
+ };
1000
+ var _iterator40 = _createForOfIteratorHelper(keyDataset.issues), _step40;
1001
+ try {
1002
+ for (_iterator40.s(); !(_step40 = _iterator40.n()).done; ) {
1003
+ var _dataset$issues19;
1004
+ var issue = _step40.value;
1005
+ issue.path = [ pathItem ];
1006
+ (_dataset$issues19 = dataset.issues) === null || _dataset$issues19 === void 0 || _dataset$issues19.push(issue);
1082
1007
  }
1008
+ } catch (err) {
1009
+ _iterator40.e(err);
1010
+ } finally {
1011
+ _iterator40.f();
1012
+ }
1013
+ if (!dataset.issues) dataset.issues = keyDataset.issues;
1014
+ if (config$1.abortEarly) {
1015
+ dataset.typed = false;
1016
+ break;
1083
1017
  }
1084
- var valueDataset = this.value["~run"]({
1018
+ }
1019
+ var valueDataset = this.value["~run"]({
1020
+ value: entryValue
1021
+ }, config$1);
1022
+ if (valueDataset.issues) {
1023
+ var _pathItem5 = {
1024
+ type: "object",
1025
+ origin: "value",
1026
+ input: input,
1027
+ key: entryKey,
1085
1028
  value: entryValue
1086
- }, config2);
1087
- if (valueDataset.issues) {
1088
- var _pathItem5 = {
1089
- type: "object",
1090
- origin: "value",
1091
- input: input,
1092
- key: entryKey,
1093
- value: entryValue
1094
- };
1095
- var _iterator40 = _createForOfIteratorHelper(valueDataset.issues), _step40;
1096
- try {
1097
- for (_iterator40.s(); !(_step40 = _iterator40.n()).done; ) {
1098
- var _dataset$issues20;
1099
- var _issue5 = _step40.value;
1100
- if (_issue5.path) {
1101
- _issue5.path.unshift(_pathItem5);
1102
- } else {
1103
- _issue5.path = [ _pathItem5 ];
1104
- }
1105
- (_dataset$issues20 = dataset.issues) === null || _dataset$issues20 === void 0 || _dataset$issues20.push(_issue5);
1106
- }
1107
- } catch (err) {
1108
- _iterator40.e(err);
1109
- } finally {
1110
- _iterator40.f();
1111
- }
1112
- if (!dataset.issues) {
1113
- dataset.issues = valueDataset.issues;
1114
- }
1115
- if (config2.abortEarly) {
1116
- dataset.typed = false;
1117
- break;
1029
+ };
1030
+ var _iterator41 = _createForOfIteratorHelper(valueDataset.issues), _step41;
1031
+ try {
1032
+ for (_iterator41.s(); !(_step41 = _iterator41.n()).done; ) {
1033
+ var _dataset$issues20;
1034
+ var _issue5 = _step41.value;
1035
+ if (_issue5.path) _issue5.path.unshift(_pathItem5); else _issue5.path = [ _pathItem5 ];
1036
+ (_dataset$issues20 = dataset.issues) === null || _dataset$issues20 === void 0 || _dataset$issues20.push(_issue5);
1118
1037
  }
1038
+ } catch (err) {
1039
+ _iterator41.e(err);
1040
+ } finally {
1041
+ _iterator41.f();
1119
1042
  }
1120
- if (!keyDataset.typed || !valueDataset.typed) {
1043
+ if (!dataset.issues) dataset.issues = valueDataset.issues;
1044
+ if (config$1.abortEarly) {
1121
1045
  dataset.typed = false;
1122
- }
1123
- if (keyDataset.typed) {
1124
- dataset.value[keyDataset.value] = valueDataset.value;
1046
+ break;
1125
1047
  }
1126
1048
  }
1049
+ if (!keyDataset.typed || !valueDataset.typed) dataset.typed = false;
1050
+ if (keyDataset.typed) dataset.value[keyDataset.value] = valueDataset.value;
1127
1051
  }
1128
- } else {
1129
- _addIssue(this, "type", dataset, config2);
1130
- }
1052
+ } else _addIssue(this, "type", dataset, config$1);
1131
1053
  return dataset;
1132
1054
  }
1133
1055
  };
1134
1056
  }
1135
1057
 
1136
- function strictObject(entries2, message2) {
1058
+ function strictObject(entries$1, message$1) {
1137
1059
  return {
1138
1060
  kind: "schema",
1139
1061
  type: "strict_object",
1140
1062
  reference: strictObject,
1141
1063
  expects: "Object",
1142
1064
  async: false,
1143
- entries: entries2,
1144
- message: message2,
1065
+ entries: entries$1,
1066
+ message: message$1,
1145
1067
  get "~standard"() {
1146
1068
  return _getStandardProps(this);
1147
1069
  },
1148
- "~run": function run(dataset, config2) {
1070
+ "~run": function run(dataset, config$1) {
1149
1071
  var input = dataset.value;
1150
1072
  if (input && _typeof(input) === "object") {
1151
1073
  dataset.typed = true;
@@ -1153,51 +1075,41 @@ function strictObject(entries2, message2) {
1153
1075
  for (var key in this.entries) {
1154
1076
  var valueSchema = this.entries[key];
1155
1077
  if (key in input || (valueSchema.type === "exact_optional" || valueSchema.type === "optional" || valueSchema.type === "nullish") && valueSchema["default"] !== void 0) {
1156
- var value2 = key in input ? input[key] : getDefault(valueSchema);
1078
+ var value$1 = key in input ? input[key] : getDefault(valueSchema);
1157
1079
  var valueDataset = valueSchema["~run"]({
1158
- value: value2
1159
- }, config2);
1080
+ value: value$1
1081
+ }, config$1);
1160
1082
  if (valueDataset.issues) {
1161
1083
  var pathItem = {
1162
1084
  type: "object",
1163
1085
  origin: "value",
1164
1086
  input: input,
1165
1087
  key: key,
1166
- value: value2
1088
+ value: value$1
1167
1089
  };
1168
- var _iterator48 = _createForOfIteratorHelper(valueDataset.issues), _step48;
1090
+ var _iterator49 = _createForOfIteratorHelper(valueDataset.issues), _step49;
1169
1091
  try {
1170
- for (_iterator48.s(); !(_step48 = _iterator48.n()).done; ) {
1092
+ for (_iterator49.s(); !(_step49 = _iterator49.n()).done; ) {
1171
1093
  var _dataset$issues25;
1172
- var issue = _step48.value;
1173
- if (issue.path) {
1174
- issue.path.unshift(pathItem);
1175
- } else {
1176
- issue.path = [ pathItem ];
1177
- }
1094
+ var issue = _step49.value;
1095
+ if (issue.path) issue.path.unshift(pathItem); else issue.path = [ pathItem ];
1178
1096
  (_dataset$issues25 = dataset.issues) === null || _dataset$issues25 === void 0 || _dataset$issues25.push(issue);
1179
1097
  }
1180
1098
  } catch (err) {
1181
- _iterator48.e(err);
1099
+ _iterator49.e(err);
1182
1100
  } finally {
1183
- _iterator48.f();
1184
- }
1185
- if (!dataset.issues) {
1186
- dataset.issues = valueDataset.issues;
1101
+ _iterator49.f();
1187
1102
  }
1188
- if (config2.abortEarly) {
1103
+ if (!dataset.issues) dataset.issues = valueDataset.issues;
1104
+ if (config$1.abortEarly) {
1189
1105
  dataset.typed = false;
1190
1106
  break;
1191
1107
  }
1192
1108
  }
1193
- if (!valueDataset.typed) {
1194
- dataset.typed = false;
1195
- }
1109
+ if (!valueDataset.typed) dataset.typed = false;
1196
1110
  dataset.value[key] = valueDataset.value;
1197
- } else if (valueSchema.fallback !== void 0) {
1198
- dataset.value[key] = getFallback(valueSchema);
1199
- } else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
1200
- _addIssue(this, "key", dataset, config2, {
1111
+ } else if (valueSchema.fallback !== void 0) dataset.value[key] = getFallback(valueSchema); else if (valueSchema.type !== "exact_optional" && valueSchema.type !== "optional" && valueSchema.type !== "nullish") {
1112
+ _addIssue(this, "key", dataset, config$1, {
1201
1113
  input: void 0,
1202
1114
  expected: '"'.concat(key, '"'),
1203
1115
  path: [ {
@@ -1208,54 +1120,44 @@ function strictObject(entries2, message2) {
1208
1120
  value: input[key]
1209
1121
  } ]
1210
1122
  });
1211
- if (config2.abortEarly) {
1212
- break;
1213
- }
1123
+ if (config$1.abortEarly) break;
1214
1124
  }
1215
1125
  }
1216
- if (!dataset.issues || !config2.abortEarly) {
1217
- for (var _key9 in input) {
1218
- if (!(_key9 in this.entries)) {
1219
- _addIssue(this, "key", dataset, config2, {
1220
- input: _key9,
1221
- expected: "never",
1222
- path: [ {
1223
- type: "object",
1224
- origin: "key",
1225
- input: input,
1226
- key: _key9,
1227
- value: input[_key9]
1228
- } ]
1229
- });
1230
- break;
1231
- }
1126
+ if (!dataset.issues || !config$1.abortEarly) {
1127
+ for (var _key9 in input) if (!(_key9 in this.entries)) {
1128
+ _addIssue(this, "key", dataset, config$1, {
1129
+ input: _key9,
1130
+ expected: "never",
1131
+ path: [ {
1132
+ type: "object",
1133
+ origin: "key",
1134
+ input: input,
1135
+ key: _key9,
1136
+ value: input[_key9]
1137
+ } ]
1138
+ });
1139
+ break;
1232
1140
  }
1233
1141
  }
1234
- } else {
1235
- _addIssue(this, "type", dataset, config2);
1236
- }
1142
+ } else _addIssue(this, "type", dataset, config$1);
1237
1143
  return dataset;
1238
1144
  }
1239
1145
  };
1240
1146
  }
1241
1147
 
1242
- function string(message2) {
1148
+ function string(message$1) {
1243
1149
  return {
1244
1150
  kind: "schema",
1245
1151
  type: "string",
1246
1152
  reference: string,
1247
1153
  expects: "string",
1248
1154
  async: false,
1249
- message: message2,
1155
+ message: message$1,
1250
1156
  get "~standard"() {
1251
1157
  return _getStandardProps(this);
1252
1158
  },
1253
- "~run": function run(dataset, config2) {
1254
- if (typeof dataset.value === "string") {
1255
- dataset.typed = true;
1256
- } else {
1257
- _addIssue(this, "type", dataset, config2);
1258
- }
1159
+ "~run": function run(dataset, config$1) {
1160
+ if (typeof dataset.value === "string") dataset.typed = true; else _addIssue(this, "type", dataset, config$1);
1259
1161
  return dataset;
1260
1162
  }
1261
1163
  };
@@ -1264,27 +1166,23 @@ function string(message2) {
1264
1166
  function _subIssues(datasets) {
1265
1167
  var issues;
1266
1168
  if (datasets) {
1267
- var _iterator63 = _createForOfIteratorHelper(datasets), _step63;
1169
+ var _iterator64 = _createForOfIteratorHelper(datasets), _step64;
1268
1170
  try {
1269
- for (_iterator63.s(); !(_step63 = _iterator63.n()).done; ) {
1270
- var dataset = _step63.value;
1271
- if (issues) {
1272
- var _issues;
1273
- (_issues = issues).push.apply(_issues, _toConsumableArray(dataset.issues));
1274
- } else {
1275
- issues = dataset.issues;
1276
- }
1171
+ for (_iterator64.s(); !(_step64 = _iterator64.n()).done; ) {
1172
+ var _issues;
1173
+ var dataset = _step64.value;
1174
+ if (issues) (_issues = issues).push.apply(_issues, _toConsumableArray(dataset.issues)); else issues = dataset.issues;
1277
1175
  }
1278
1176
  } catch (err) {
1279
- _iterator63.e(err);
1177
+ _iterator64.e(err);
1280
1178
  } finally {
1281
- _iterator63.f();
1179
+ _iterator64.f();
1282
1180
  }
1283
1181
  }
1284
1182
  return issues;
1285
1183
  }
1286
1184
 
1287
- function union(options, message2) {
1185
+ function union(options, message$1) {
1288
1186
  return {
1289
1187
  kind: "schema",
1290
1188
  type: "union",
@@ -1294,64 +1192,46 @@ function union(options, message2) {
1294
1192
  })), "|"),
1295
1193
  async: false,
1296
1194
  options: options,
1297
- message: message2,
1195
+ message: message$1,
1298
1196
  get "~standard"() {
1299
1197
  return _getStandardProps(this);
1300
1198
  },
1301
- "~run": function run(dataset, config2) {
1199
+ "~run": function run(dataset, config$1) {
1302
1200
  var _untypedDatasets;
1303
1201
  var validDataset;
1304
1202
  var typedDatasets;
1305
1203
  var untypedDatasets;
1306
- var _iterator64 = _createForOfIteratorHelper(this.options), _step64;
1204
+ var _iterator65 = _createForOfIteratorHelper(this.options), _step65;
1307
1205
  try {
1308
- for (_iterator64.s(); !(_step64 = _iterator64.n()).done; ) {
1309
- var schema = _step64.value;
1206
+ for (_iterator65.s(); !(_step65 = _iterator65.n()).done; ) {
1207
+ var schema = _step65.value;
1310
1208
  var optionDataset = schema["~run"]({
1311
1209
  value: dataset.value
1312
- }, config2);
1210
+ }, config$1);
1313
1211
  if (optionDataset.typed) {
1314
1212
  if (optionDataset.issues) {
1315
- if (typedDatasets) {
1316
- typedDatasets.push(optionDataset);
1317
- } else {
1318
- typedDatasets = [ optionDataset ];
1319
- }
1213
+ if (typedDatasets) typedDatasets.push(optionDataset); else typedDatasets = [ optionDataset ];
1320
1214
  } else {
1321
1215
  validDataset = optionDataset;
1322
1216
  break;
1323
1217
  }
1324
- } else {
1325
- if (untypedDatasets) {
1326
- untypedDatasets.push(optionDataset);
1327
- } else {
1328
- untypedDatasets = [ optionDataset ];
1329
- }
1330
- }
1218
+ } else if (untypedDatasets) untypedDatasets.push(optionDataset); else untypedDatasets = [ optionDataset ];
1331
1219
  }
1332
1220
  } catch (err) {
1333
- _iterator64.e(err);
1221
+ _iterator65.e(err);
1334
1222
  } finally {
1335
- _iterator64.f();
1336
- }
1337
- if (validDataset) {
1338
- return validDataset;
1223
+ _iterator65.f();
1339
1224
  }
1225
+ if (validDataset) return validDataset;
1340
1226
  if (typedDatasets) {
1341
- if (typedDatasets.length === 1) {
1342
- return typedDatasets[0];
1343
- }
1344
- _addIssue(this, "type", dataset, config2, {
1227
+ if (typedDatasets.length === 1) return typedDatasets[0];
1228
+ _addIssue(this, "type", dataset, config$1, {
1345
1229
  issues: _subIssues(typedDatasets)
1346
1230
  });
1347
1231
  dataset.typed = true;
1348
- } else if (((_untypedDatasets = untypedDatasets) === null || _untypedDatasets === void 0 ? void 0 : _untypedDatasets.length) === 1) {
1349
- return untypedDatasets[0];
1350
- } else {
1351
- _addIssue(this, "type", dataset, config2, {
1352
- issues: _subIssues(untypedDatasets)
1353
- });
1354
- }
1232
+ } else if (((_untypedDatasets = untypedDatasets) === null || _untypedDatasets === void 0 ? void 0 : _untypedDatasets.length) === 1) return untypedDatasets[0]; else _addIssue(this, "type", dataset, config$1, {
1233
+ issues: _subIssues(untypedDatasets)
1234
+ });
1355
1235
  return dataset;
1356
1236
  }
1357
1237
  };
@@ -1375,25 +1255,23 @@ function unknown() {
1375
1255
  }
1376
1256
 
1377
1257
  function pipe() {
1378
- for (var _len3 = arguments.length, pipe2 = new Array(_len3), _key13 = 0; _key13 < _len3; _key13++) {
1379
- pipe2[_key13] = arguments[_key13];
1258
+ for (var _len3 = arguments.length, pipe$1 = new Array(_len3), _key13 = 0; _key13 < _len3; _key13++) {
1259
+ pipe$1[_key13] = arguments[_key13];
1380
1260
  }
1381
- return _objectSpread2(_objectSpread2({}, pipe2[0]), {}, {
1382
- pipe: pipe2,
1261
+ return _objectSpread2(_objectSpread2({}, pipe$1[0]), {}, {
1262
+ pipe: pipe$1,
1383
1263
  get "~standard"() {
1384
1264
  return _getStandardProps(this);
1385
1265
  },
1386
- "~run": function run(dataset, config2) {
1387
- for (var _i2 = 0, _pipe = pipe2; _i2 < _pipe.length; _i2++) {
1388
- var item = _pipe[_i2];
1266
+ "~run": function run(dataset, config$1) {
1267
+ for (var _i2 = 0, _pipe$ = pipe$1; _i2 < _pipe$.length; _i2++) {
1268
+ var item = _pipe$[_i2];
1389
1269
  if (item.kind !== "metadata") {
1390
1270
  if (dataset.issues && (item.kind === "schema" || item.kind === "transformation")) {
1391
1271
  dataset.typed = false;
1392
1272
  break;
1393
1273
  }
1394
- if (!dataset.issues || !config2.abortEarly && !config2.abortPipeEarly) {
1395
- dataset = item["~run"](dataset, config2);
1396
- }
1274
+ if (!dataset.issues || !config$1.abortEarly && !config$1.abortPipeEarly) dataset = item["~run"](dataset, config$1);
1397
1275
  }
1398
1276
  }
1399
1277
  return dataset;
@@ -1401,10 +1279,10 @@ function pipe() {
1401
1279
  });
1402
1280
  }
1403
1281
 
1404
- function safeParse(schema, input, config2) {
1282
+ function safeParse(schema, input, config$1) {
1405
1283
  var dataset = schema["~run"]({
1406
1284
  value: input
1407
- }, getGlobalConfig(config2));
1285
+ }, getGlobalConfig(config$1));
1408
1286
  return {
1409
1287
  typed: dataset.typed,
1410
1288
  success: !dataset.issues,