@quickflo/quickforms-vue 1.2.0 → 1.2.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/DynamicForm.vue.d.ts.map +1 -1
- package/dist/index.js +640 -624
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { provide as Ys, inject as Qs, computed as
|
|
1
|
+
import { provide as Ys, inject as Qs, computed as G, defineComponent as fe, ref as de, createElementBlock as M, openBlock as N, createElementVNode as U, withDirectives as Ce, createCommentVNode as L, createTextVNode as qe, toDisplayString as X, vModelText as wr, normalizeClass as Hn, vModelDynamic as Sr, vModelCheckbox as Xs, Fragment as Ee, renderList as We, vModelSelect as ea, createBlock as mt, resolveDynamicComponent as ta, createVNode as Kn, watch as jt, onMounted as Bn, reactive as ra, toRaw as na, markRaw as sa } from "vue";
|
|
2
2
|
import { useField as aa, useForm as oa } from "vee-validate";
|
|
3
3
|
class ia {
|
|
4
4
|
constructor() {
|
|
@@ -61,7 +61,7 @@ const he = (e, t) => t ? e : -1, Qe = (e) => e.type === "string" || e.const !==
|
|
|
61
61
|
function Jn(e) {
|
|
62
62
|
return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
|
|
63
63
|
}
|
|
64
|
-
var mr = { exports: {} }, xn = {}, ge = {}, Ze = {},
|
|
64
|
+
var mr = { exports: {} }, xn = {}, ge = {}, Ze = {}, pt = {}, B = {}, ht = {};
|
|
65
65
|
(function(e) {
|
|
66
66
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.regexpCode = e.getEsmExportName = e.getProperty = e.safeStringify = e.stringify = e.strConcat = e.addCodeArg = e.str = e._ = e.nil = e._Code = e.Name = e.IDENTIFIER = e._CodeOrName = void 0;
|
|
67
67
|
class t {
|
|
@@ -181,11 +181,11 @@ var mr = { exports: {} }, xn = {}, ge = {}, Ze = {}, ht = {}, B = {}, mt = {};
|
|
|
181
181
|
return new r(h.toString());
|
|
182
182
|
}
|
|
183
183
|
e.regexpCode = p;
|
|
184
|
-
})(
|
|
184
|
+
})(ht);
|
|
185
185
|
var hr = {};
|
|
186
186
|
(function(e) {
|
|
187
187
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.ValueScope = e.ValueScopeName = e.Scope = e.varKinds = e.UsedValueState = void 0;
|
|
188
|
-
const t =
|
|
188
|
+
const t = ht;
|
|
189
189
|
class n extends Error {
|
|
190
190
|
constructor(c) {
|
|
191
191
|
super(`CodeGen: "code" for ${c} not defined`), this.value = c.value;
|
|
@@ -305,8 +305,8 @@ var hr = {};
|
|
|
305
305
|
})(hr);
|
|
306
306
|
(function(e) {
|
|
307
307
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.or = e.and = e.not = e.CodeGen = e.operators = e.varKinds = e.ValueScopeName = e.ValueScope = e.Scope = e.Name = e.regexpCode = e.stringify = e.getProperty = e.nil = e.strConcat = e.str = e._ = void 0;
|
|
308
|
-
const t =
|
|
309
|
-
var r =
|
|
308
|
+
const t = ht, n = hr;
|
|
309
|
+
var r = ht;
|
|
310
310
|
Object.defineProperty(e, "_", { enumerable: !0, get: function() {
|
|
311
311
|
return r._;
|
|
312
312
|
} }), Object.defineProperty(e, "str", { enumerable: !0, get: function() {
|
|
@@ -358,8 +358,8 @@ var hr = {};
|
|
|
358
358
|
super(), this.varKind = l, this.name = f, this.rhs = E;
|
|
359
359
|
}
|
|
360
360
|
render({ es5: l, _n: f }) {
|
|
361
|
-
const E = l ? n.varKinds.var : this.varKind,
|
|
362
|
-
return `${E} ${this.name}${
|
|
361
|
+
const E = l ? n.varKinds.var : this.varKind, A = this.rhs === void 0 ? "" : ` = ${this.rhs}`;
|
|
362
|
+
return `${E} ${this.name}${A};` + f;
|
|
363
363
|
}
|
|
364
364
|
optimizeNames(l, f) {
|
|
365
365
|
if (l[this.name.str])
|
|
@@ -386,8 +386,8 @@ var hr = {};
|
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
class d extends i {
|
|
389
|
-
constructor(l, f, E,
|
|
390
|
-
super(l, E,
|
|
389
|
+
constructor(l, f, E, A) {
|
|
390
|
+
super(l, E, A), this.op = f;
|
|
391
391
|
}
|
|
392
392
|
render({ _n: l }) {
|
|
393
393
|
return `${this.lhs} ${this.op}= ${this.rhs};` + l;
|
|
@@ -455,15 +455,15 @@ var hr = {};
|
|
|
455
455
|
}
|
|
456
456
|
optimizeNames(l, f) {
|
|
457
457
|
const { nodes: E } = this;
|
|
458
|
-
let
|
|
459
|
-
for (;
|
|
460
|
-
const
|
|
461
|
-
|
|
458
|
+
let A = E.length;
|
|
459
|
+
for (; A--; ) {
|
|
460
|
+
const C = E[A];
|
|
461
|
+
C.optimizeNames(l, f) || ($e(l, C.names), E.splice(A, 1));
|
|
462
462
|
}
|
|
463
463
|
return E.length > 0 ? this : void 0;
|
|
464
464
|
}
|
|
465
465
|
get names() {
|
|
466
|
-
return this.nodes.reduce((l, f) =>
|
|
466
|
+
return this.nodes.reduce((l, f) => H(l, f.names), {});
|
|
467
467
|
}
|
|
468
468
|
}
|
|
469
469
|
class _ extends b {
|
|
@@ -495,7 +495,7 @@ var hr = {};
|
|
|
495
495
|
f = this.else = Array.isArray(E) ? new p(E) : E;
|
|
496
496
|
}
|
|
497
497
|
if (f)
|
|
498
|
-
return l === !1 ? f instanceof h ? f : f.nodes : this.nodes.length ? this : new h(
|
|
498
|
+
return l === !1 ? f instanceof h ? f : f.nodes : this.nodes.length ? this : new h(bt(l), f instanceof h ? [f] : f.nodes);
|
|
499
499
|
if (!(l === !1 || !this.nodes.length))
|
|
500
500
|
return this;
|
|
501
501
|
}
|
|
@@ -506,7 +506,7 @@ var hr = {};
|
|
|
506
506
|
}
|
|
507
507
|
get names() {
|
|
508
508
|
const l = super.names;
|
|
509
|
-
return oe(l, this.condition), this.else &&
|
|
509
|
+
return oe(l, this.condition), this.else && H(l, this.else.names), l;
|
|
510
510
|
}
|
|
511
511
|
}
|
|
512
512
|
h.kind = "if";
|
|
@@ -525,16 +525,16 @@ var hr = {};
|
|
|
525
525
|
return this.iteration = ne(this.iteration, l, f), this;
|
|
526
526
|
}
|
|
527
527
|
get names() {
|
|
528
|
-
return
|
|
528
|
+
return H(super.names, this.iteration.names);
|
|
529
529
|
}
|
|
530
530
|
}
|
|
531
531
|
class k extends y {
|
|
532
|
-
constructor(l, f, E,
|
|
533
|
-
super(), this.varKind = l, this.name = f, this.from = E, this.to =
|
|
532
|
+
constructor(l, f, E, A) {
|
|
533
|
+
super(), this.varKind = l, this.name = f, this.from = E, this.to = A;
|
|
534
534
|
}
|
|
535
535
|
render(l) {
|
|
536
|
-
const f = l.es5 ? n.varKinds.var : this.varKind, { name: E, from:
|
|
537
|
-
return `for(${f} ${E}=${
|
|
536
|
+
const f = l.es5 ? n.varKinds.var : this.varKind, { name: E, from: A, to: C } = this;
|
|
537
|
+
return `for(${f} ${E}=${A}; ${E}<${C}; ${E}++)` + super.render(l);
|
|
538
538
|
}
|
|
539
539
|
get names() {
|
|
540
540
|
const l = oe(super.names, this.from);
|
|
@@ -542,8 +542,8 @@ var hr = {};
|
|
|
542
542
|
}
|
|
543
543
|
}
|
|
544
544
|
class O extends y {
|
|
545
|
-
constructor(l, f, E,
|
|
546
|
-
super(), this.loop = l, this.varKind = f, this.name = E, this.iterable =
|
|
545
|
+
constructor(l, f, E, A) {
|
|
546
|
+
super(), this.loop = l, this.varKind = f, this.name = E, this.iterable = A;
|
|
547
547
|
}
|
|
548
548
|
render(l) {
|
|
549
549
|
return `for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})` + super.render(l);
|
|
@@ -553,10 +553,10 @@ var hr = {};
|
|
|
553
553
|
return this.iterable = ne(this.iterable, l, f), this;
|
|
554
554
|
}
|
|
555
555
|
get names() {
|
|
556
|
-
return
|
|
556
|
+
return H(super.names, this.iterable.names);
|
|
557
557
|
}
|
|
558
558
|
}
|
|
559
|
-
class
|
|
559
|
+
class D extends _ {
|
|
560
560
|
constructor(l, f, E) {
|
|
561
561
|
super(), this.name = l, this.args = f, this.async = E;
|
|
562
562
|
}
|
|
@@ -564,14 +564,14 @@ var hr = {};
|
|
|
564
564
|
return `${this.async ? "async " : ""}function ${this.name}(${this.args})` + super.render(l);
|
|
565
565
|
}
|
|
566
566
|
}
|
|
567
|
-
|
|
568
|
-
class
|
|
567
|
+
D.kind = "func";
|
|
568
|
+
class V extends b {
|
|
569
569
|
render(l) {
|
|
570
570
|
return "return " + super.render(l);
|
|
571
571
|
}
|
|
572
572
|
}
|
|
573
|
-
|
|
574
|
-
class
|
|
573
|
+
V.kind = "return";
|
|
574
|
+
class I extends _ {
|
|
575
575
|
render(l) {
|
|
576
576
|
let f = "try" + super.render(l);
|
|
577
577
|
return this.catch && (f += this.catch.render(l)), this.finally && (f += this.finally.render(l)), f;
|
|
@@ -581,15 +581,15 @@ var hr = {};
|
|
|
581
581
|
return super.optimizeNodes(), (l = this.catch) === null || l === void 0 || l.optimizeNodes(), (f = this.finally) === null || f === void 0 || f.optimizeNodes(), this;
|
|
582
582
|
}
|
|
583
583
|
optimizeNames(l, f) {
|
|
584
|
-
var E,
|
|
585
|
-
return super.optimizeNames(l, f), (E = this.catch) === null || E === void 0 || E.optimizeNames(l, f), (
|
|
584
|
+
var E, A;
|
|
585
|
+
return super.optimizeNames(l, f), (E = this.catch) === null || E === void 0 || E.optimizeNames(l, f), (A = this.finally) === null || A === void 0 || A.optimizeNames(l, f), this;
|
|
586
586
|
}
|
|
587
587
|
get names() {
|
|
588
588
|
const l = super.names;
|
|
589
|
-
return this.catch &&
|
|
589
|
+
return this.catch && H(l, this.catch.names), this.finally && H(l, this.finally.names), l;
|
|
590
590
|
}
|
|
591
591
|
}
|
|
592
|
-
class
|
|
592
|
+
class T extends _ {
|
|
593
593
|
constructor(l) {
|
|
594
594
|
super(), this.error = l;
|
|
595
595
|
}
|
|
@@ -597,13 +597,13 @@ var hr = {};
|
|
|
597
597
|
return `catch(${this.error})` + super.render(l);
|
|
598
598
|
}
|
|
599
599
|
}
|
|
600
|
-
|
|
601
|
-
class
|
|
600
|
+
T.kind = "catch";
|
|
601
|
+
class F extends _ {
|
|
602
602
|
render(l) {
|
|
603
603
|
return "finally" + super.render(l);
|
|
604
604
|
}
|
|
605
605
|
}
|
|
606
|
-
|
|
606
|
+
F.kind = "finally";
|
|
607
607
|
class W {
|
|
608
608
|
constructor(l, f = {}) {
|
|
609
609
|
this._values = {}, this._blockStarts = [], this._constants = {}, this.opts = { ...f, _n: f.lines ? `
|
|
@@ -636,9 +636,9 @@ var hr = {};
|
|
|
636
636
|
scopeCode() {
|
|
637
637
|
return this._extScope.scopeCode(this._values);
|
|
638
638
|
}
|
|
639
|
-
_def(l, f, E,
|
|
640
|
-
const
|
|
641
|
-
return E !== void 0 &&
|
|
639
|
+
_def(l, f, E, A) {
|
|
640
|
+
const C = this._scope.toName(f);
|
|
641
|
+
return E !== void 0 && A && (this._constants[C.str] = E), this._leafNode(new o(l, C, E)), C;
|
|
642
642
|
}
|
|
643
643
|
// `const` declaration (`var` in es5 mode)
|
|
644
644
|
const(l, f, E) {
|
|
@@ -667,8 +667,8 @@ var hr = {};
|
|
|
667
667
|
// returns code for object literal for the passed argument list of key-value pairs
|
|
668
668
|
object(...l) {
|
|
669
669
|
const f = ["{"];
|
|
670
|
-
for (const [E,
|
|
671
|
-
f.length > 1 && f.push(","), f.push(E), (E !==
|
|
670
|
+
for (const [E, A] of l)
|
|
671
|
+
f.length > 1 && f.push(","), f.push(E), (E !== A || this.opts.es5) && (f.push(":"), (0, t.addCodeArg)(f, A));
|
|
672
672
|
return f.push("}"), new t._Code(f);
|
|
673
673
|
}
|
|
674
674
|
// `if` clause (or statement if `thenBody` and, optionally, `elseBody` are passed)
|
|
@@ -701,28 +701,28 @@ var hr = {};
|
|
|
701
701
|
return this._for(new S(l), f);
|
|
702
702
|
}
|
|
703
703
|
// `for` statement for a range of values
|
|
704
|
-
forRange(l, f, E,
|
|
704
|
+
forRange(l, f, E, A, C = this.opts.es5 ? n.varKinds.var : n.varKinds.let) {
|
|
705
705
|
const Z = this._scope.toName(l);
|
|
706
|
-
return this._for(new k(
|
|
706
|
+
return this._for(new k(C, Z, f, E), () => A(Z));
|
|
707
707
|
}
|
|
708
708
|
// `for-of` statement (in es5 mode replace with a normal for loop)
|
|
709
|
-
forOf(l, f, E,
|
|
710
|
-
const
|
|
709
|
+
forOf(l, f, E, A = n.varKinds.const) {
|
|
710
|
+
const C = this._scope.toName(l);
|
|
711
711
|
if (this.opts.es5) {
|
|
712
712
|
const Z = f instanceof t.Name ? f : this.var("_arr", f);
|
|
713
713
|
return this.forRange("_i", 0, (0, t._)`${Z}.length`, (x) => {
|
|
714
|
-
this.var(
|
|
714
|
+
this.var(C, (0, t._)`${Z}[${x}]`), E(C);
|
|
715
715
|
});
|
|
716
716
|
}
|
|
717
|
-
return this._for(new O("of",
|
|
717
|
+
return this._for(new O("of", A, C, f), () => E(C));
|
|
718
718
|
}
|
|
719
719
|
// `for-in` statement.
|
|
720
720
|
// With option `ownProperties` replaced with a `for-of` loop for object keys
|
|
721
|
-
forIn(l, f, E,
|
|
721
|
+
forIn(l, f, E, A = this.opts.es5 ? n.varKinds.var : n.varKinds.const) {
|
|
722
722
|
if (this.opts.ownProperties)
|
|
723
723
|
return this.forOf(l, (0, t._)`Object.keys(${f})`, E);
|
|
724
|
-
const
|
|
725
|
-
return this._for(new O("in",
|
|
724
|
+
const C = this._scope.toName(l);
|
|
725
|
+
return this._for(new O("in", A, C, f), () => E(C));
|
|
726
726
|
}
|
|
727
727
|
// end `for` loop
|
|
728
728
|
endFor() {
|
|
@@ -738,21 +738,21 @@ var hr = {};
|
|
|
738
738
|
}
|
|
739
739
|
// `return` statement
|
|
740
740
|
return(l) {
|
|
741
|
-
const f = new
|
|
741
|
+
const f = new V();
|
|
742
742
|
if (this._blockNode(f), this.code(l), f.nodes.length !== 1)
|
|
743
743
|
throw new Error('CodeGen: "return" should have one node');
|
|
744
|
-
return this._endBlockNode(
|
|
744
|
+
return this._endBlockNode(V);
|
|
745
745
|
}
|
|
746
746
|
// `try` statement
|
|
747
747
|
try(l, f, E) {
|
|
748
748
|
if (!f && !E)
|
|
749
749
|
throw new Error('CodeGen: "try" without "catch" and "finally"');
|
|
750
|
-
const
|
|
751
|
-
if (this._blockNode(
|
|
752
|
-
const
|
|
753
|
-
this._currNode =
|
|
750
|
+
const A = new I();
|
|
751
|
+
if (this._blockNode(A), this.code(l), f) {
|
|
752
|
+
const C = this.name("e");
|
|
753
|
+
this._currNode = A.catch = new T(C), f(C);
|
|
754
754
|
}
|
|
755
|
-
return E && (this._currNode =
|
|
755
|
+
return E && (this._currNode = A.finally = new F(), this.code(E)), this._endBlockNode(T, F);
|
|
756
756
|
}
|
|
757
757
|
// `throw` statement
|
|
758
758
|
throw(l) {
|
|
@@ -773,12 +773,12 @@ var hr = {};
|
|
|
773
773
|
return this._nodes.length = f, this;
|
|
774
774
|
}
|
|
775
775
|
// `function` heading (or definition if funcBody is passed)
|
|
776
|
-
func(l, f = t.nil, E,
|
|
777
|
-
return this._blockNode(new
|
|
776
|
+
func(l, f = t.nil, E, A) {
|
|
777
|
+
return this._blockNode(new D(l, f, E)), A && this.code(A).endFunc(), this;
|
|
778
778
|
}
|
|
779
779
|
// end function definition
|
|
780
780
|
endFunc() {
|
|
781
|
-
return this._endBlockNode(
|
|
781
|
+
return this._endBlockNode(D);
|
|
782
782
|
}
|
|
783
783
|
optimize(l = 1) {
|
|
784
784
|
for (; l-- > 0; )
|
|
@@ -815,44 +815,44 @@ var hr = {};
|
|
|
815
815
|
}
|
|
816
816
|
}
|
|
817
817
|
e.CodeGen = W;
|
|
818
|
-
function
|
|
818
|
+
function H(w, l) {
|
|
819
819
|
for (const f in l)
|
|
820
820
|
w[f] = (w[f] || 0) + (l[f] || 0);
|
|
821
821
|
return w;
|
|
822
822
|
}
|
|
823
823
|
function oe(w, l) {
|
|
824
|
-
return l instanceof t._CodeOrName ?
|
|
824
|
+
return l instanceof t._CodeOrName ? H(w, l.names) : w;
|
|
825
825
|
}
|
|
826
826
|
function ne(w, l, f) {
|
|
827
827
|
if (w instanceof t.Name)
|
|
828
828
|
return E(w);
|
|
829
|
-
if (!
|
|
829
|
+
if (!A(w))
|
|
830
830
|
return w;
|
|
831
|
-
return new t._Code(w._items.reduce((
|
|
832
|
-
function E(
|
|
833
|
-
const Z = f[
|
|
834
|
-
return Z === void 0 || l[
|
|
831
|
+
return new t._Code(w._items.reduce((C, Z) => (Z instanceof t.Name && (Z = E(Z)), Z instanceof t._Code ? C.push(...Z._items) : C.push(Z), C), []));
|
|
832
|
+
function E(C) {
|
|
833
|
+
const Z = f[C.str];
|
|
834
|
+
return Z === void 0 || l[C.str] !== 1 ? C : (delete l[C.str], Z);
|
|
835
835
|
}
|
|
836
|
-
function C
|
|
837
|
-
return
|
|
836
|
+
function A(C) {
|
|
837
|
+
return C instanceof t._Code && C._items.some((Z) => Z instanceof t.Name && l[Z.str] === 1 && f[Z.str] !== void 0);
|
|
838
838
|
}
|
|
839
839
|
}
|
|
840
840
|
function $e(w, l) {
|
|
841
841
|
for (const f in l)
|
|
842
842
|
w[f] = (w[f] || 0) - (l[f] || 0);
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function bt(w) {
|
|
845
845
|
return typeof w == "boolean" || typeof w == "number" || w === null ? !w : (0, t._)`!${P(w)}`;
|
|
846
846
|
}
|
|
847
|
-
e.not =
|
|
847
|
+
e.not = bt;
|
|
848
848
|
const Gt = v(e.operators.AND);
|
|
849
849
|
function Jt(...w) {
|
|
850
850
|
return w.reduce(Gt);
|
|
851
851
|
}
|
|
852
852
|
e.and = Jt;
|
|
853
|
-
const
|
|
853
|
+
const $t = v(e.operators.OR);
|
|
854
854
|
function j(...w) {
|
|
855
|
-
return w.reduce(
|
|
855
|
+
return w.reduce($t);
|
|
856
856
|
}
|
|
857
857
|
e.or = j;
|
|
858
858
|
function v(w) {
|
|
@@ -862,21 +862,21 @@ var hr = {};
|
|
|
862
862
|
return w instanceof t.Name ? w : (0, t._)`(${w})`;
|
|
863
863
|
}
|
|
864
864
|
})(B);
|
|
865
|
-
var
|
|
866
|
-
Object.defineProperty(
|
|
867
|
-
|
|
868
|
-
const Y = B, _a =
|
|
865
|
+
var q = {};
|
|
866
|
+
Object.defineProperty(q, "__esModule", { value: !0 });
|
|
867
|
+
q.checkStrictMode = q.getErrorPath = q.Type = q.useFunc = q.setEvaluated = q.evaluatedPropsToName = q.mergeEvaluated = q.eachItem = q.unescapeJsonPointer = q.escapeJsonPointer = q.escapeFragment = q.unescapeFragment = q.schemaRefOrVal = q.schemaHasRulesButRef = q.schemaHasRules = q.checkUnknownRules = q.alwaysValidSchema = q.toHash = void 0;
|
|
868
|
+
const Y = B, _a = ht;
|
|
869
869
|
function ga(e) {
|
|
870
870
|
const t = {};
|
|
871
871
|
for (const n of e)
|
|
872
872
|
t[n] = !0;
|
|
873
873
|
return t;
|
|
874
874
|
}
|
|
875
|
-
|
|
875
|
+
q.toHash = ga;
|
|
876
876
|
function ba(e, t) {
|
|
877
877
|
return typeof t == "boolean" ? t : Object.keys(t).length === 0 ? !0 : (Wn(e, t), !Zn(t, e.self.RULES.all));
|
|
878
878
|
}
|
|
879
|
-
|
|
879
|
+
q.alwaysValidSchema = ba;
|
|
880
880
|
function Wn(e, t = e.schema) {
|
|
881
881
|
const { opts: n, self: r } = e;
|
|
882
882
|
if (!n.strictSchema || typeof t == "boolean")
|
|
@@ -885,7 +885,7 @@ function Wn(e, t = e.schema) {
|
|
|
885
885
|
for (const a in t)
|
|
886
886
|
s[a] || Xn(e, `unknown keyword: "${a}"`);
|
|
887
887
|
}
|
|
888
|
-
|
|
888
|
+
q.checkUnknownRules = Wn;
|
|
889
889
|
function Zn(e, t) {
|
|
890
890
|
if (typeof e == "boolean")
|
|
891
891
|
return !e;
|
|
@@ -894,7 +894,7 @@ function Zn(e, t) {
|
|
|
894
894
|
return !0;
|
|
895
895
|
return !1;
|
|
896
896
|
}
|
|
897
|
-
|
|
897
|
+
q.schemaHasRules = Zn;
|
|
898
898
|
function $a(e, t) {
|
|
899
899
|
if (typeof e == "boolean")
|
|
900
900
|
return !e;
|
|
@@ -903,7 +903,7 @@ function $a(e, t) {
|
|
|
903
903
|
return !0;
|
|
904
904
|
return !1;
|
|
905
905
|
}
|
|
906
|
-
|
|
906
|
+
q.schemaHasRulesButRef = $a;
|
|
907
907
|
function wa({ topSchemaRef: e, schemaPath: t }, n, r, s) {
|
|
908
908
|
if (!s) {
|
|
909
909
|
if (typeof n == "number" || typeof n == "boolean")
|
|
@@ -913,23 +913,23 @@ function wa({ topSchemaRef: e, schemaPath: t }, n, r, s) {
|
|
|
913
913
|
}
|
|
914
914
|
return (0, Y._)`${e}${t}${(0, Y.getProperty)(r)}`;
|
|
915
915
|
}
|
|
916
|
-
|
|
916
|
+
q.schemaRefOrVal = wa;
|
|
917
917
|
function Sa(e) {
|
|
918
918
|
return Yn(decodeURIComponent(e));
|
|
919
919
|
}
|
|
920
|
-
|
|
920
|
+
q.unescapeFragment = Sa;
|
|
921
921
|
function ka(e) {
|
|
922
922
|
return encodeURIComponent(kr(e));
|
|
923
923
|
}
|
|
924
|
-
|
|
924
|
+
q.escapeFragment = ka;
|
|
925
925
|
function kr(e) {
|
|
926
926
|
return typeof e == "number" ? `${e}` : e.replace(/~/g, "~0").replace(/\//g, "~1");
|
|
927
927
|
}
|
|
928
|
-
|
|
928
|
+
q.escapeJsonPointer = kr;
|
|
929
929
|
function Yn(e) {
|
|
930
930
|
return e.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
931
931
|
}
|
|
932
|
-
|
|
932
|
+
q.unescapeJsonPointer = Yn;
|
|
933
933
|
function Ea(e, t) {
|
|
934
934
|
if (Array.isArray(e))
|
|
935
935
|
for (const n of e)
|
|
@@ -937,14 +937,14 @@ function Ea(e, t) {
|
|
|
937
937
|
else
|
|
938
938
|
t(e);
|
|
939
939
|
}
|
|
940
|
-
|
|
940
|
+
q.eachItem = Ea;
|
|
941
941
|
function vn({ mergeNames: e, mergeToName: t, mergeValues: n, resultToName: r }) {
|
|
942
942
|
return (s, a, o, i) => {
|
|
943
943
|
const d = o === void 0 ? a : o instanceof Y.Name ? (a instanceof Y.Name ? e(s, a, o) : t(s, a, o), o) : a instanceof Y.Name ? (t(s, o, a), a) : n(a, o);
|
|
944
944
|
return i === Y.Name && !(d instanceof Y.Name) ? r(s, d) : d;
|
|
945
945
|
};
|
|
946
946
|
}
|
|
947
|
-
|
|
947
|
+
q.mergeEvaluated = {
|
|
948
948
|
props: vn({
|
|
949
949
|
mergeNames: (e, t, n) => e.if((0, Y._)`${n} !== true && ${t} !== undefined`, () => {
|
|
950
950
|
e.if((0, Y._)`${t} === true`, () => e.assign(n, !0), () => e.assign(n, (0, Y._)`${n} || {}`).code((0, Y._)`Object.assign(${n}, ${t})`));
|
|
@@ -968,11 +968,11 @@ function Qn(e, t) {
|
|
|
968
968
|
const n = e.var("props", (0, Y._)`{}`);
|
|
969
969
|
return t !== void 0 && Er(e, n, t), n;
|
|
970
970
|
}
|
|
971
|
-
|
|
971
|
+
q.evaluatedPropsToName = Qn;
|
|
972
972
|
function Er(e, t, n) {
|
|
973
973
|
Object.keys(n).forEach((r) => e.assign((0, Y._)`${t}${(0, Y.getProperty)(r)}`, !0));
|
|
974
974
|
}
|
|
975
|
-
|
|
975
|
+
q.setEvaluated = Er;
|
|
976
976
|
const _n = {};
|
|
977
977
|
function Pa(e, t) {
|
|
978
978
|
return e.scopeValue("func", {
|
|
@@ -980,11 +980,11 @@ function Pa(e, t) {
|
|
|
980
980
|
code: _n[t.code] || (_n[t.code] = new _a._Code(t.code))
|
|
981
981
|
});
|
|
982
982
|
}
|
|
983
|
-
|
|
983
|
+
q.useFunc = Pa;
|
|
984
984
|
var pr;
|
|
985
985
|
(function(e) {
|
|
986
986
|
e[e.Num = 0] = "Num", e[e.Str = 1] = "Str";
|
|
987
|
-
})(pr || (
|
|
987
|
+
})(pr || (q.Type = pr = {}));
|
|
988
988
|
function Oa(e, t, n) {
|
|
989
989
|
if (e instanceof Y.Name) {
|
|
990
990
|
const r = t === pr.Num;
|
|
@@ -992,7 +992,7 @@ function Oa(e, t, n) {
|
|
|
992
992
|
}
|
|
993
993
|
return n ? (0, Y.getProperty)(e).toString() : "/" + kr(e);
|
|
994
994
|
}
|
|
995
|
-
|
|
995
|
+
q.getErrorPath = Oa;
|
|
996
996
|
function Xn(e, t, n = e.opts.strictSchema) {
|
|
997
997
|
if (n) {
|
|
998
998
|
if (t = `strict mode: ${t}`, n === !0)
|
|
@@ -1000,9 +1000,9 @@ function Xn(e, t, n = e.opts.strictSchema) {
|
|
|
1000
1000
|
e.self.logger.warn(t);
|
|
1001
1001
|
}
|
|
1002
1002
|
}
|
|
1003
|
-
|
|
1004
|
-
var
|
|
1005
|
-
Object.defineProperty(
|
|
1003
|
+
q.checkStrictMode = Xn;
|
|
1004
|
+
var Pe = {};
|
|
1005
|
+
Object.defineProperty(Pe, "__esModule", { value: !0 });
|
|
1006
1006
|
const ie = B, ja = {
|
|
1007
1007
|
// validation function arguments
|
|
1008
1008
|
data: new ie.Name("data"),
|
|
@@ -1032,23 +1032,23 @@ const ie = B, ja = {
|
|
|
1032
1032
|
jsonLen: new ie.Name("jsonLen"),
|
|
1033
1033
|
jsonPart: new ie.Name("jsonPart")
|
|
1034
1034
|
};
|
|
1035
|
-
|
|
1035
|
+
Pe.default = ja;
|
|
1036
1036
|
(function(e) {
|
|
1037
1037
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.extendErrors = e.resetErrorsCount = e.reportExtraError = e.reportError = e.keyword$DataError = e.keywordError = void 0;
|
|
1038
|
-
const t = B, n =
|
|
1038
|
+
const t = B, n = q, r = Pe;
|
|
1039
1039
|
e.keywordError = {
|
|
1040
1040
|
message: ({ keyword: p }) => (0, t.str)`must pass "${p}" keyword validation`
|
|
1041
1041
|
}, e.keyword$DataError = {
|
|
1042
1042
|
message: ({ keyword: p, schemaType: h }) => h ? (0, t.str)`"${p}" keyword must be ${h} ($data)` : (0, t.str)`"${p}" keyword is invalid ($data)`
|
|
1043
1043
|
};
|
|
1044
1044
|
function s(p, h = e.keywordError, y, S) {
|
|
1045
|
-
const { it: k } = p, { gen: O, compositeRule:
|
|
1046
|
-
S ?? (
|
|
1045
|
+
const { it: k } = p, { gen: O, compositeRule: D, allErrors: V } = k, I = m(p, h, y);
|
|
1046
|
+
S ?? (D || V) ? d(O, I) : c(k, (0, t._)`[${I}]`);
|
|
1047
1047
|
}
|
|
1048
1048
|
e.reportError = s;
|
|
1049
1049
|
function a(p, h = e.keywordError, y) {
|
|
1050
|
-
const { it: S } = p, { gen: k, compositeRule: O, allErrors:
|
|
1051
|
-
d(k,
|
|
1050
|
+
const { it: S } = p, { gen: k, compositeRule: O, allErrors: D } = S, V = m(p, h, y);
|
|
1051
|
+
d(k, V), O || D || c(S, r.default.vErrors);
|
|
1052
1052
|
}
|
|
1053
1053
|
e.reportExtraError = a;
|
|
1054
1054
|
function o(p, h) {
|
|
@@ -1058,9 +1058,9 @@ Ee.default = ja;
|
|
|
1058
1058
|
function i({ gen: p, keyword: h, schemaValue: y, data: S, errsCount: k, it: O }) {
|
|
1059
1059
|
if (k === void 0)
|
|
1060
1060
|
throw new Error("ajv implementation error");
|
|
1061
|
-
const
|
|
1062
|
-
p.forRange("i", k, r.default.errors, (
|
|
1063
|
-
p.const(
|
|
1061
|
+
const D = p.name("err");
|
|
1062
|
+
p.forRange("i", k, r.default.errors, (V) => {
|
|
1063
|
+
p.const(D, (0, t._)`${r.default.vErrors}[${V}]`), p.if((0, t._)`${D}.instancePath === undefined`, () => p.assign((0, t._)`${D}.instancePath`, (0, t.strConcat)(r.default.instancePath, O.errorPath))), p.assign((0, t._)`${D}.schemaPath`, (0, t.str)`${O.errSchemaPath}/${h}`), O.opts.verbose && (p.assign((0, t._)`${D}.schema`, y), p.assign((0, t._)`${D}.data`, S));
|
|
1064
1064
|
});
|
|
1065
1065
|
}
|
|
1066
1066
|
e.extendErrors = i;
|
|
@@ -1102,13 +1102,13 @@ Ee.default = ja;
|
|
|
1102
1102
|
return y && (k = (0, t.str)`${k}${(0, n.getErrorPath)(y, n.Type.Str)}`), [u.schemaPath, k];
|
|
1103
1103
|
}
|
|
1104
1104
|
function g(p, { params: h, message: y }, S) {
|
|
1105
|
-
const { keyword: k, data: O, schemaValue:
|
|
1106
|
-
S.push([u.keyword, k], [u.params, typeof h == "function" ? h(p) : h || (0, t._)`{}`]),
|
|
1105
|
+
const { keyword: k, data: O, schemaValue: D, it: V } = p, { opts: I, propertyName: T, topSchemaRef: F, schemaPath: W } = V;
|
|
1106
|
+
S.push([u.keyword, k], [u.params, typeof h == "function" ? h(p) : h || (0, t._)`{}`]), I.messages && S.push([u.message, typeof y == "function" ? y(p) : y]), I.verbose && S.push([u.schema, D], [u.parentSchema, (0, t._)`${F}${W}`], [r.default.data, O]), T && S.push([u.propertyName, T]);
|
|
1107
1107
|
}
|
|
1108
|
-
})(
|
|
1108
|
+
})(pt);
|
|
1109
1109
|
Object.defineProperty(Ze, "__esModule", { value: !0 });
|
|
1110
1110
|
Ze.boolOrEmptySchema = Ze.topBoolOrEmptySchema = void 0;
|
|
1111
|
-
const Na =
|
|
1111
|
+
const Na = pt, Ia = B, qa = Pe, Ma = {
|
|
1112
1112
|
message: "boolean schema is false"
|
|
1113
1113
|
};
|
|
1114
1114
|
function Ta(e) {
|
|
@@ -1158,26 +1158,26 @@ function Va() {
|
|
|
1158
1158
|
};
|
|
1159
1159
|
}
|
|
1160
1160
|
Ue.getRules = Va;
|
|
1161
|
-
var
|
|
1162
|
-
Object.defineProperty(
|
|
1163
|
-
|
|
1161
|
+
var je = {};
|
|
1162
|
+
Object.defineProperty(je, "__esModule", { value: !0 });
|
|
1163
|
+
je.shouldUseRule = je.shouldUseGroup = je.schemaHasRulesForType = void 0;
|
|
1164
1164
|
function Fa({ schema: e, self: t }, n) {
|
|
1165
1165
|
const r = t.RULES.types[n];
|
|
1166
1166
|
return r && r !== !0 && ts(e, r);
|
|
1167
1167
|
}
|
|
1168
|
-
|
|
1168
|
+
je.schemaHasRulesForType = Fa;
|
|
1169
1169
|
function ts(e, t) {
|
|
1170
1170
|
return t.rules.some((n) => rs(e, n));
|
|
1171
1171
|
}
|
|
1172
|
-
|
|
1172
|
+
je.shouldUseGroup = ts;
|
|
1173
1173
|
function rs(e, t) {
|
|
1174
1174
|
var n;
|
|
1175
1175
|
return e[t.keyword] !== void 0 || ((n = t.definition.implements) === null || n === void 0 ? void 0 : n.some((r) => e[r] !== void 0));
|
|
1176
1176
|
}
|
|
1177
|
-
|
|
1177
|
+
je.shouldUseRule = rs;
|
|
1178
1178
|
Object.defineProperty(te, "__esModule", { value: !0 });
|
|
1179
1179
|
te.reportTypeError = te.checkDataTypes = te.checkDataType = te.coerceAndCheckDataType = te.getJSONTypes = te.getSchemaTypes = te.DataType = void 0;
|
|
1180
|
-
const za = Ue, Ua =
|
|
1180
|
+
const za = Ue, Ua = je, La = pt, K = B, ns = q;
|
|
1181
1181
|
var Je;
|
|
1182
1182
|
(function(e) {
|
|
1183
1183
|
e[e.Correct = 0] = "Correct", e[e.Wrong = 1] = "Wrong";
|
|
@@ -1322,7 +1322,7 @@ function Wa(e) {
|
|
|
1322
1322
|
var zt = {};
|
|
1323
1323
|
Object.defineProperty(zt, "__esModule", { value: !0 });
|
|
1324
1324
|
zt.assignDefaults = void 0;
|
|
1325
|
-
const Ke = B, Za =
|
|
1325
|
+
const Ke = B, Za = q;
|
|
1326
1326
|
function Ya(e, t) {
|
|
1327
1327
|
const { properties: n, items: r } = e.schema;
|
|
1328
1328
|
if (t === "object" && n)
|
|
@@ -1343,25 +1343,25 @@ function gn(e, t, n) {
|
|
|
1343
1343
|
let d = (0, Ke._)`${i} === undefined`;
|
|
1344
1344
|
o.useDefaults === "empty" && (d = (0, Ke._)`${d} || ${i} === null || ${i} === ""`), r.if(d, (0, Ke._)`${i} = ${(0, Ke.stringify)(n)}`);
|
|
1345
1345
|
}
|
|
1346
|
-
var Se = {},
|
|
1347
|
-
Object.defineProperty(
|
|
1348
|
-
|
|
1349
|
-
const Q = B, jr =
|
|
1346
|
+
var Se = {}, J = {};
|
|
1347
|
+
Object.defineProperty(J, "__esModule", { value: !0 });
|
|
1348
|
+
J.validateUnion = J.validateArray = J.usePattern = J.callValidateCode = J.schemaProperties = J.allSchemaProperties = J.noPropertyInData = J.propertyInData = J.isOwnProperty = J.hasPropFunc = J.reportMissingProp = J.checkMissingProp = J.checkReportMissingProp = void 0;
|
|
1349
|
+
const Q = B, jr = q, Me = Pe, Qa = q;
|
|
1350
1350
|
function Xa(e, t) {
|
|
1351
1351
|
const { gen: n, data: r, it: s } = e;
|
|
1352
1352
|
n.if(Ir(n, r, t, s.opts.ownProperties), () => {
|
|
1353
1353
|
e.setParams({ missingProperty: (0, Q._)`${t}` }, !0), e.error();
|
|
1354
1354
|
});
|
|
1355
1355
|
}
|
|
1356
|
-
|
|
1356
|
+
J.checkReportMissingProp = Xa;
|
|
1357
1357
|
function eo({ gen: e, data: t, it: { opts: n } }, r, s) {
|
|
1358
1358
|
return (0, Q.or)(...r.map((a) => (0, Q.and)(Ir(e, t, a, n.ownProperties), (0, Q._)`${s} = ${a}`)));
|
|
1359
1359
|
}
|
|
1360
|
-
|
|
1360
|
+
J.checkMissingProp = eo;
|
|
1361
1361
|
function to(e, t) {
|
|
1362
1362
|
e.setParams({ missingProperty: t }, !0), e.error();
|
|
1363
1363
|
}
|
|
1364
|
-
|
|
1364
|
+
J.reportMissingProp = to;
|
|
1365
1365
|
function os(e) {
|
|
1366
1366
|
return e.scopeValue("func", {
|
|
1367
1367
|
// eslint-disable-next-line @typescript-eslint/unbound-method
|
|
@@ -1369,29 +1369,29 @@ function os(e) {
|
|
|
1369
1369
|
code: (0, Q._)`Object.prototype.hasOwnProperty`
|
|
1370
1370
|
});
|
|
1371
1371
|
}
|
|
1372
|
-
|
|
1372
|
+
J.hasPropFunc = os;
|
|
1373
1373
|
function Nr(e, t, n) {
|
|
1374
1374
|
return (0, Q._)`${os(e)}.call(${t}, ${n})`;
|
|
1375
1375
|
}
|
|
1376
|
-
|
|
1376
|
+
J.isOwnProperty = Nr;
|
|
1377
1377
|
function ro(e, t, n, r) {
|
|
1378
1378
|
const s = (0, Q._)`${t}${(0, Q.getProperty)(n)} !== undefined`;
|
|
1379
1379
|
return r ? (0, Q._)`${s} && ${Nr(e, t, n)}` : s;
|
|
1380
1380
|
}
|
|
1381
|
-
|
|
1381
|
+
J.propertyInData = ro;
|
|
1382
1382
|
function Ir(e, t, n, r) {
|
|
1383
1383
|
const s = (0, Q._)`${t}${(0, Q.getProperty)(n)} === undefined`;
|
|
1384
1384
|
return r ? (0, Q.or)(s, (0, Q.not)(Nr(e, t, n))) : s;
|
|
1385
1385
|
}
|
|
1386
|
-
|
|
1386
|
+
J.noPropertyInData = Ir;
|
|
1387
1387
|
function is(e) {
|
|
1388
1388
|
return e ? Object.keys(e).filter((t) => t !== "__proto__") : [];
|
|
1389
1389
|
}
|
|
1390
|
-
|
|
1390
|
+
J.allSchemaProperties = is;
|
|
1391
1391
|
function no(e, t) {
|
|
1392
1392
|
return is(t).filter((n) => !(0, jr.alwaysValidSchema)(e, t[n]));
|
|
1393
1393
|
}
|
|
1394
|
-
|
|
1394
|
+
J.schemaProperties = no;
|
|
1395
1395
|
function so({ schemaCode: e, data: t, it: { gen: n, topSchemaRef: r, schemaPath: s, errorPath: a }, it: o }, i, d, c) {
|
|
1396
1396
|
const u = c ? (0, Q._)`${e}, ${t}, ${r}${s}` : t, m = [
|
|
1397
1397
|
[Me.default.instancePath, (0, Q.strConcat)(Me.default.instancePath, a)],
|
|
@@ -1403,7 +1403,7 @@ function so({ schemaCode: e, data: t, it: { gen: n, topSchemaRef: r, schemaPath:
|
|
|
1403
1403
|
const $ = (0, Q._)`${u}, ${n.object(...m)}`;
|
|
1404
1404
|
return d !== Q.nil ? (0, Q._)`${i}.call(${d}, ${$})` : (0, Q._)`${i}(${$})`;
|
|
1405
1405
|
}
|
|
1406
|
-
|
|
1406
|
+
J.callValidateCode = so;
|
|
1407
1407
|
const ao = (0, Q._)`new RegExp`;
|
|
1408
1408
|
function oo({ gen: e, it: { opts: t } }, n) {
|
|
1409
1409
|
const r = t.unicodeRegExp ? "u" : "", { regExp: s } = t.code, a = s(n, r);
|
|
@@ -1413,7 +1413,7 @@ function oo({ gen: e, it: { opts: t } }, n) {
|
|
|
1413
1413
|
code: (0, Q._)`${s.code === "new RegExp" ? ao : (0, Qa.useFunc)(e, s)}(${n}, ${r})`
|
|
1414
1414
|
});
|
|
1415
1415
|
}
|
|
1416
|
-
|
|
1416
|
+
J.usePattern = oo;
|
|
1417
1417
|
function io(e) {
|
|
1418
1418
|
const { gen: t, data: n, keyword: r, it: s } = e, a = t.name("valid");
|
|
1419
1419
|
if (s.allErrors) {
|
|
@@ -1432,7 +1432,7 @@ function io(e) {
|
|
|
1432
1432
|
});
|
|
1433
1433
|
}
|
|
1434
1434
|
}
|
|
1435
|
-
|
|
1435
|
+
J.validateArray = io;
|
|
1436
1436
|
function lo(e) {
|
|
1437
1437
|
const { gen: t, schema: n, keyword: r, it: s } = e;
|
|
1438
1438
|
if (!Array.isArray(n))
|
|
@@ -1449,10 +1449,10 @@ function lo(e) {
|
|
|
1449
1449
|
t.assign(o, (0, Q._)`${o} || ${i}`), e.mergeValidEvaluated(u, i) || t.if((0, Q.not)(o));
|
|
1450
1450
|
})), e.result(o, () => e.reset(), () => e.error(!0));
|
|
1451
1451
|
}
|
|
1452
|
-
|
|
1452
|
+
J.validateUnion = lo;
|
|
1453
1453
|
Object.defineProperty(Se, "__esModule", { value: !0 });
|
|
1454
1454
|
Se.validateKeywordUsage = Se.validSchemaType = Se.funcKeywordCode = Se.macroKeywordCode = void 0;
|
|
1455
|
-
const le = B, Ve =
|
|
1455
|
+
const le = B, Ve = Pe, co = J, uo = pt;
|
|
1456
1456
|
function fo(e, t) {
|
|
1457
1457
|
const { gen: n, keyword: r, schema: s, parentSchema: a, it: o } = e, i = t.macro.call(o.self, s, a, o), d = ls(n, r, i);
|
|
1458
1458
|
o.opts.validateSchema !== !1 && o.self.validateSchema(i, !0);
|
|
@@ -1539,7 +1539,7 @@ Se.validateKeywordUsage = vo;
|
|
|
1539
1539
|
var Ae = {};
|
|
1540
1540
|
Object.defineProperty(Ae, "__esModule", { value: !0 });
|
|
1541
1541
|
Ae.extendSubschemaMode = Ae.extendSubschemaData = Ae.getSubschema = void 0;
|
|
1542
|
-
const we = B, ds =
|
|
1542
|
+
const we = B, ds = q;
|
|
1543
1543
|
function _o(e, { keyword: t, schemaProp: n, schema: r, schemaPath: s, errSchemaPath: a, topSchemaRef: o }) {
|
|
1544
1544
|
if (t !== void 0 && r !== void 0)
|
|
1545
1545
|
throw new Error('both "keyword" and "schema" passed, only one allowed');
|
|
@@ -1619,7 +1619,7 @@ var ae = {}, cs = function e(t, n) {
|
|
|
1619
1619
|
var r = typeof n == "function" ? n : n.pre || function() {
|
|
1620
1620
|
}, s = n.post || function() {
|
|
1621
1621
|
};
|
|
1622
|
-
|
|
1622
|
+
Nt(t, r, s, e, "", e);
|
|
1623
1623
|
};
|
|
1624
1624
|
Re.keywords = {
|
|
1625
1625
|
additionalItems: !0,
|
|
@@ -1665,7 +1665,7 @@ Re.skipKeywords = {
|
|
|
1665
1665
|
maxProperties: !0,
|
|
1666
1666
|
minProperties: !0
|
|
1667
1667
|
};
|
|
1668
|
-
function
|
|
1668
|
+
function Nt(e, t, n, r, s, a, o, i, d, c) {
|
|
1669
1669
|
if (r && typeof r == "object" && !Array.isArray(r)) {
|
|
1670
1670
|
t(r, s, a, o, i, d, c);
|
|
1671
1671
|
for (var u in r) {
|
|
@@ -1673,12 +1673,12 @@ function jt(e, t, n, r, s, a, o, i, d, c) {
|
|
|
1673
1673
|
if (Array.isArray(m)) {
|
|
1674
1674
|
if (u in Re.arrayKeywords)
|
|
1675
1675
|
for (var $ = 0; $ < m.length; $++)
|
|
1676
|
-
|
|
1676
|
+
Nt(e, t, n, m[$], s + "/" + u + "/" + $, a, s, u, r, $);
|
|
1677
1677
|
} else if (u in Re.propsKeywords) {
|
|
1678
1678
|
if (m && typeof m == "object")
|
|
1679
1679
|
for (var b in m)
|
|
1680
|
-
|
|
1681
|
-
} else (u in Re.keywords || e.allKeys && !(u in Re.skipKeywords)) &&
|
|
1680
|
+
Nt(e, t, n, m[b], s + "/" + u + "/" + $o(b), a, s, u, r, b);
|
|
1681
|
+
} else (u in Re.keywords || e.allKeys && !(u in Re.skipKeywords)) && Nt(e, t, n, m, s + "/" + u, a, s, u, r);
|
|
1682
1682
|
}
|
|
1683
1683
|
n(r, s, a, o, i, d, c);
|
|
1684
1684
|
}
|
|
@@ -1689,7 +1689,7 @@ function $o(e) {
|
|
|
1689
1689
|
var wo = us.exports;
|
|
1690
1690
|
Object.defineProperty(ae, "__esModule", { value: !0 });
|
|
1691
1691
|
ae.getSchemaRefs = ae.resolveUrl = ae.normalizeId = ae._getFullPath = ae.getFullPath = ae.inlineRef = void 0;
|
|
1692
|
-
const So =
|
|
1692
|
+
const So = q, ko = cs, Eo = wo, Po = /* @__PURE__ */ new Set([
|
|
1693
1693
|
"type",
|
|
1694
1694
|
"format",
|
|
1695
1695
|
"pattern",
|
|
@@ -1795,7 +1795,7 @@ function Mo(e, t) {
|
|
|
1795
1795
|
ae.getSchemaRefs = Mo;
|
|
1796
1796
|
Object.defineProperty(ge, "__esModule", { value: !0 });
|
|
1797
1797
|
ge.getData = ge.KeywordCxt = ge.validateFunctionCode = void 0;
|
|
1798
|
-
const ps = Ze, $n = te, qr =
|
|
1798
|
+
const ps = Ze, $n = te, qr = je, Rt = te, To = zt, lt = Se, lr = Ae, R = B, z = Pe, Ro = ae, Ne = q, st = pt;
|
|
1799
1799
|
function Ao(e) {
|
|
1800
1800
|
if (_s(e) && (gs(e), vs(e))) {
|
|
1801
1801
|
Vo(e);
|
|
@@ -1805,33 +1805,33 @@ function Ao(e) {
|
|
|
1805
1805
|
}
|
|
1806
1806
|
ge.validateFunctionCode = Ao;
|
|
1807
1807
|
function ys({ gen: e, validateName: t, schema: n, schemaEnv: r, opts: s }, a) {
|
|
1808
|
-
s.code.es5 ? e.func(t, (0,
|
|
1809
|
-
e.code((0,
|
|
1810
|
-
}) : e.func(t, (0,
|
|
1808
|
+
s.code.es5 ? e.func(t, (0, R._)`${z.default.data}, ${z.default.valCxt}`, r.$async, () => {
|
|
1809
|
+
e.code((0, R._)`"use strict"; ${wn(n, s)}`), Do(e, s), e.code(a);
|
|
1810
|
+
}) : e.func(t, (0, R._)`${z.default.data}, ${Co(s)}`, r.$async, () => e.code(wn(n, s)).code(a));
|
|
1811
1811
|
}
|
|
1812
1812
|
function Co(e) {
|
|
1813
|
-
return (0,
|
|
1813
|
+
return (0, R._)`{${z.default.instancePath}="", ${z.default.parentData}, ${z.default.parentDataProperty}, ${z.default.rootData}=${z.default.data}${e.dynamicRef ? (0, R._)`, ${z.default.dynamicAnchors}={}` : R.nil}}={}`;
|
|
1814
1814
|
}
|
|
1815
1815
|
function Do(e, t) {
|
|
1816
|
-
e.if(
|
|
1817
|
-
e.var(
|
|
1816
|
+
e.if(z.default.valCxt, () => {
|
|
1817
|
+
e.var(z.default.instancePath, (0, R._)`${z.default.valCxt}.${z.default.instancePath}`), e.var(z.default.parentData, (0, R._)`${z.default.valCxt}.${z.default.parentData}`), e.var(z.default.parentDataProperty, (0, R._)`${z.default.valCxt}.${z.default.parentDataProperty}`), e.var(z.default.rootData, (0, R._)`${z.default.valCxt}.${z.default.rootData}`), t.dynamicRef && e.var(z.default.dynamicAnchors, (0, R._)`${z.default.valCxt}.${z.default.dynamicAnchors}`);
|
|
1818
1818
|
}, () => {
|
|
1819
|
-
e.var(
|
|
1819
|
+
e.var(z.default.instancePath, (0, R._)`""`), e.var(z.default.parentData, (0, R._)`undefined`), e.var(z.default.parentDataProperty, (0, R._)`undefined`), e.var(z.default.rootData, z.default.data), t.dynamicRef && e.var(z.default.dynamicAnchors, (0, R._)`{}`);
|
|
1820
1820
|
});
|
|
1821
1821
|
}
|
|
1822
1822
|
function Vo(e) {
|
|
1823
1823
|
const { schema: t, opts: n, gen: r } = e;
|
|
1824
1824
|
ys(e, () => {
|
|
1825
|
-
n.$comment && t.$comment && $s(e), Ho(e), r.let(
|
|
1825
|
+
n.$comment && t.$comment && $s(e), Ho(e), r.let(z.default.vErrors, null), r.let(z.default.errors, 0), n.unevaluated && Fo(e), bs(e), Go(e);
|
|
1826
1826
|
});
|
|
1827
1827
|
}
|
|
1828
1828
|
function Fo(e) {
|
|
1829
1829
|
const { gen: t, validateName: n } = e;
|
|
1830
|
-
e.evaluated = t.const("evaluated", (0,
|
|
1830
|
+
e.evaluated = t.const("evaluated", (0, R._)`${n}.evaluated`), t.if((0, R._)`${e.evaluated}.dynamicProps`, () => t.assign((0, R._)`${e.evaluated}.props`, (0, R._)`undefined`)), t.if((0, R._)`${e.evaluated}.dynamicItems`, () => t.assign((0, R._)`${e.evaluated}.items`, (0, R._)`undefined`));
|
|
1831
1831
|
}
|
|
1832
1832
|
function wn(e, t) {
|
|
1833
1833
|
const n = typeof e == "object" && e[t.schemaId];
|
|
1834
|
-
return n && (t.code.source || t.code.process) ? (0,
|
|
1834
|
+
return n && (t.code.source || t.code.process) ? (0, R._)`/*# sourceURL=${n} */` : R.nil;
|
|
1835
1835
|
}
|
|
1836
1836
|
function zo(e, t) {
|
|
1837
1837
|
if (_s(e) && (gs(e), vs(e))) {
|
|
@@ -1854,11 +1854,11 @@ function _s(e) {
|
|
|
1854
1854
|
function Uo(e, t) {
|
|
1855
1855
|
const { schema: n, gen: r, opts: s } = e;
|
|
1856
1856
|
s.$comment && n.$comment && $s(e), Ko(e), Bo(e);
|
|
1857
|
-
const a = r.const("_errs",
|
|
1858
|
-
bs(e, a), r.var(t, (0,
|
|
1857
|
+
const a = r.const("_errs", z.default.errors);
|
|
1858
|
+
bs(e, a), r.var(t, (0, R._)`${a} === ${z.default.errors}`);
|
|
1859
1859
|
}
|
|
1860
1860
|
function gs(e) {
|
|
1861
|
-
(0,
|
|
1861
|
+
(0, Ne.checkUnknownRules)(e), Lo(e);
|
|
1862
1862
|
}
|
|
1863
1863
|
function bs(e, t) {
|
|
1864
1864
|
if (e.opts.jtd)
|
|
@@ -1868,11 +1868,11 @@ function bs(e, t) {
|
|
|
1868
1868
|
}
|
|
1869
1869
|
function Lo(e) {
|
|
1870
1870
|
const { schema: t, errSchemaPath: n, opts: r, self: s } = e;
|
|
1871
|
-
t.$ref && r.ignoreKeywordsWithRef && (0,
|
|
1871
|
+
t.$ref && r.ignoreKeywordsWithRef && (0, Ne.schemaHasRulesButRef)(t, s.RULES) && s.logger.warn(`$ref: keywords ignored in schema at path "${n}"`);
|
|
1872
1872
|
}
|
|
1873
1873
|
function Ho(e) {
|
|
1874
1874
|
const { schema: t, opts: n } = e;
|
|
1875
|
-
t.default !== void 0 && n.useDefaults && n.strictSchema && (0,
|
|
1875
|
+
t.default !== void 0 && n.useDefaults && n.strictSchema && (0, Ne.checkStrictMode)(e, "default is ignored in the schema root");
|
|
1876
1876
|
}
|
|
1877
1877
|
function Ko(e) {
|
|
1878
1878
|
const t = e.schema[e.opts.schemaId];
|
|
@@ -1885,22 +1885,22 @@ function Bo(e) {
|
|
|
1885
1885
|
function $s({ gen: e, schemaEnv: t, schema: n, errSchemaPath: r, opts: s }) {
|
|
1886
1886
|
const a = n.$comment;
|
|
1887
1887
|
if (s.$comment === !0)
|
|
1888
|
-
e.code((0,
|
|
1888
|
+
e.code((0, R._)`${z.default.self}.logger.log(${a})`);
|
|
1889
1889
|
else if (typeof s.$comment == "function") {
|
|
1890
|
-
const o = (0,
|
|
1891
|
-
e.code((0,
|
|
1890
|
+
const o = (0, R.str)`${r}/$comment`, i = e.scopeValue("root", { ref: t.root });
|
|
1891
|
+
e.code((0, R._)`${z.default.self}.opts.$comment(${a}, ${o}, ${i}.schema)`);
|
|
1892
1892
|
}
|
|
1893
1893
|
}
|
|
1894
1894
|
function Go(e) {
|
|
1895
1895
|
const { gen: t, schemaEnv: n, validateName: r, ValidationError: s, opts: a } = e;
|
|
1896
|
-
n.$async ? t.if((0,
|
|
1896
|
+
n.$async ? t.if((0, R._)`${z.default.errors} === 0`, () => t.return(z.default.data), () => t.throw((0, R._)`new ${s}(${z.default.vErrors})`)) : (t.assign((0, R._)`${r}.errors`, z.default.vErrors), a.unevaluated && Jo(e), t.return((0, R._)`${z.default.errors} === 0`));
|
|
1897
1897
|
}
|
|
1898
1898
|
function Jo({ gen: e, evaluated: t, props: n, items: r }) {
|
|
1899
|
-
n instanceof
|
|
1899
|
+
n instanceof R.Name && e.assign((0, R._)`${t}.props`, n), r instanceof R.Name && e.assign((0, R._)`${t}.items`, r);
|
|
1900
1900
|
}
|
|
1901
1901
|
function Sn(e, t, n, r) {
|
|
1902
1902
|
const { gen: s, schema: a, data: o, allErrors: i, opts: d, self: c } = e, { RULES: u } = c;
|
|
1903
|
-
if (a.$ref && (d.ignoreKeywordsWithRef || !(0,
|
|
1903
|
+
if (a.$ref && (d.ignoreKeywordsWithRef || !(0, Ne.schemaHasRulesButRef)(a, u))) {
|
|
1904
1904
|
s.block(() => ks(e, "$ref", u.all.$ref.definition));
|
|
1905
1905
|
return;
|
|
1906
1906
|
}
|
|
@@ -1910,7 +1910,7 @@ function Sn(e, t, n, r) {
|
|
|
1910
1910
|
m(u.post);
|
|
1911
1911
|
});
|
|
1912
1912
|
function m($) {
|
|
1913
|
-
(0, qr.shouldUseGroup)(a, $) && ($.type ? (s.if((0,
|
|
1913
|
+
(0, qr.shouldUseGroup)(a, $) && ($.type ? (s.if((0, Rt.checkDataType)($.type, o, d.strictNumbers)), kn(e, $), t.length === 1 && t[0] === $.type && n && (s.else(), (0, Rt.reportTypeError)(e)), s.endIf()) : kn(e, $), i || s.if((0, R._)`${z.default.errors} === ${r || 0}`));
|
|
1914
1914
|
}
|
|
1915
1915
|
}
|
|
1916
1916
|
function kn(e, t) {
|
|
@@ -1961,24 +1961,24 @@ function Xo(e, t) {
|
|
|
1961
1961
|
}
|
|
1962
1962
|
function Mr(e, t) {
|
|
1963
1963
|
const n = e.schemaEnv.baseId + e.errSchemaPath;
|
|
1964
|
-
t += ` at "${n}" (strictTypes)`, (0,
|
|
1964
|
+
t += ` at "${n}" (strictTypes)`, (0, Ne.checkStrictMode)(e, t, e.opts.strictTypes);
|
|
1965
1965
|
}
|
|
1966
1966
|
class Ss {
|
|
1967
1967
|
constructor(t, n, r) {
|
|
1968
|
-
if ((0, lt.validateKeywordUsage)(t, n, r), this.gen = t.gen, this.allErrors = t.allErrors, this.keyword = r, this.data = t.data, this.schema = t.schema[r], this.$data = n.$data && t.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0,
|
|
1968
|
+
if ((0, lt.validateKeywordUsage)(t, n, r), this.gen = t.gen, this.allErrors = t.allErrors, this.keyword = r, this.data = t.data, this.schema = t.schema[r], this.$data = n.$data && t.opts.$data && this.schema && this.schema.$data, this.schemaValue = (0, Ne.schemaRefOrVal)(t, this.schema, r, this.$data), this.schemaType = n.schemaType, this.parentSchema = t.schema, this.params = {}, this.it = t, this.def = n, this.$data)
|
|
1969
1969
|
this.schemaCode = t.gen.const("vSchema", Es(this.$data, t));
|
|
1970
1970
|
else if (this.schemaCode = this.schemaValue, !(0, lt.validSchemaType)(this.schema, n.schemaType, n.allowUndefined))
|
|
1971
1971
|
throw new Error(`${r} value must be ${JSON.stringify(n.schemaType)}`);
|
|
1972
|
-
("code" in n ? n.trackErrors : n.errors !== !1) && (this.errsCount = t.gen.const("_errs",
|
|
1972
|
+
("code" in n ? n.trackErrors : n.errors !== !1) && (this.errsCount = t.gen.const("_errs", z.default.errors));
|
|
1973
1973
|
}
|
|
1974
1974
|
result(t, n, r) {
|
|
1975
|
-
this.failResult((0,
|
|
1975
|
+
this.failResult((0, R.not)(t), n, r);
|
|
1976
1976
|
}
|
|
1977
1977
|
failResult(t, n, r) {
|
|
1978
1978
|
this.gen.if(t), r ? r() : this.error(), n ? (this.gen.else(), n(), this.allErrors && this.gen.endIf()) : this.allErrors ? this.gen.endIf() : this.gen.else();
|
|
1979
1979
|
}
|
|
1980
1980
|
pass(t, n) {
|
|
1981
|
-
this.failResult((0,
|
|
1981
|
+
this.failResult((0, R.not)(t), void 0, n);
|
|
1982
1982
|
}
|
|
1983
1983
|
fail(t) {
|
|
1984
1984
|
if (t === void 0) {
|
|
@@ -1991,7 +1991,7 @@ class Ss {
|
|
|
1991
1991
|
if (!this.$data)
|
|
1992
1992
|
return this.fail(t);
|
|
1993
1993
|
const { schemaCode: n } = this;
|
|
1994
|
-
this.fail((0,
|
|
1994
|
+
this.fail((0, R._)`${n} !== undefined && (${(0, R.or)(this.invalid$data(), t)})`);
|
|
1995
1995
|
}
|
|
1996
1996
|
error(t, n, r) {
|
|
1997
1997
|
if (n) {
|
|
@@ -2017,35 +2017,35 @@ class Ss {
|
|
|
2017
2017
|
setParams(t, n) {
|
|
2018
2018
|
n ? Object.assign(this.params, t) : this.params = t;
|
|
2019
2019
|
}
|
|
2020
|
-
block$data(t, n, r =
|
|
2020
|
+
block$data(t, n, r = R.nil) {
|
|
2021
2021
|
this.gen.block(() => {
|
|
2022
2022
|
this.check$data(t, r), n();
|
|
2023
2023
|
});
|
|
2024
2024
|
}
|
|
2025
|
-
check$data(t =
|
|
2025
|
+
check$data(t = R.nil, n = R.nil) {
|
|
2026
2026
|
if (!this.$data)
|
|
2027
2027
|
return;
|
|
2028
2028
|
const { gen: r, schemaCode: s, schemaType: a, def: o } = this;
|
|
2029
|
-
r.if((0,
|
|
2029
|
+
r.if((0, R.or)((0, R._)`${s} === undefined`, n)), t !== R.nil && r.assign(t, !0), (a.length || o.validateSchema) && (r.elseIf(this.invalid$data()), this.$dataError(), t !== R.nil && r.assign(t, !1)), r.else();
|
|
2030
2030
|
}
|
|
2031
2031
|
invalid$data() {
|
|
2032
2032
|
const { gen: t, schemaCode: n, schemaType: r, def: s, it: a } = this;
|
|
2033
|
-
return (0,
|
|
2033
|
+
return (0, R.or)(o(), i());
|
|
2034
2034
|
function o() {
|
|
2035
2035
|
if (r.length) {
|
|
2036
|
-
if (!(n instanceof
|
|
2036
|
+
if (!(n instanceof R.Name))
|
|
2037
2037
|
throw new Error("ajv implementation error");
|
|
2038
2038
|
const d = Array.isArray(r) ? r : [r];
|
|
2039
|
-
return (0,
|
|
2039
|
+
return (0, R._)`${(0, Rt.checkDataTypes)(d, n, a.opts.strictNumbers, Rt.DataType.Wrong)}`;
|
|
2040
2040
|
}
|
|
2041
|
-
return
|
|
2041
|
+
return R.nil;
|
|
2042
2042
|
}
|
|
2043
2043
|
function i() {
|
|
2044
2044
|
if (s.validateSchema) {
|
|
2045
2045
|
const d = t.scopeValue("validate$data", { ref: s.validateSchema });
|
|
2046
|
-
return (0,
|
|
2046
|
+
return (0, R._)`!${d}(${n})`;
|
|
2047
2047
|
}
|
|
2048
|
-
return
|
|
2048
|
+
return R.nil;
|
|
2049
2049
|
}
|
|
2050
2050
|
}
|
|
2051
2051
|
subschema(t, n) {
|
|
@@ -2056,12 +2056,12 @@ class Ss {
|
|
|
2056
2056
|
}
|
|
2057
2057
|
mergeEvaluated(t, n) {
|
|
2058
2058
|
const { it: r, gen: s } = this;
|
|
2059
|
-
r.opts.unevaluated && (r.props !== !0 && t.props !== void 0 && (r.props =
|
|
2059
|
+
r.opts.unevaluated && (r.props !== !0 && t.props !== void 0 && (r.props = Ne.mergeEvaluated.props(s, t.props, r.props, n)), r.items !== !0 && t.items !== void 0 && (r.items = Ne.mergeEvaluated.items(s, t.items, r.items, n)));
|
|
2060
2060
|
}
|
|
2061
2061
|
mergeValidEvaluated(t, n) {
|
|
2062
2062
|
const { it: r, gen: s } = this;
|
|
2063
2063
|
if (r.opts.unevaluated && (r.props !== !0 || r.items !== !0))
|
|
2064
|
-
return s.if(n, () => this.mergeEvaluated(t,
|
|
2064
|
+
return s.if(n, () => this.mergeEvaluated(t, R.Name)), !0;
|
|
2065
2065
|
}
|
|
2066
2066
|
}
|
|
2067
2067
|
ge.KeywordCxt = Ss;
|
|
@@ -2073,11 +2073,11 @@ const ei = /^\/(?:[^~]|~0|~1)*$/, ti = /^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;
|
|
|
2073
2073
|
function Es(e, { dataLevel: t, dataNames: n, dataPathArr: r }) {
|
|
2074
2074
|
let s, a;
|
|
2075
2075
|
if (e === "")
|
|
2076
|
-
return
|
|
2076
|
+
return z.default.rootData;
|
|
2077
2077
|
if (e[0] === "/") {
|
|
2078
2078
|
if (!ei.test(e))
|
|
2079
2079
|
throw new Error(`Invalid JSON-pointer: ${e}`);
|
|
2080
|
-
s = e, a =
|
|
2080
|
+
s = e, a = z.default.rootData;
|
|
2081
2081
|
} else {
|
|
2082
2082
|
const c = ti.exec(e);
|
|
2083
2083
|
if (!c)
|
|
@@ -2096,21 +2096,21 @@ function Es(e, { dataLevel: t, dataNames: n, dataPathArr: r }) {
|
|
|
2096
2096
|
let o = a;
|
|
2097
2097
|
const i = s.split("/");
|
|
2098
2098
|
for (const c of i)
|
|
2099
|
-
c && (a = (0,
|
|
2099
|
+
c && (a = (0, R._)`${a}${(0, R.getProperty)((0, Ne.unescapeJsonPointer)(c))}`, o = (0, R._)`${o} && ${a}`);
|
|
2100
2100
|
return o;
|
|
2101
2101
|
function d(c, u) {
|
|
2102
2102
|
return `Cannot access ${c} ${u} levels up, current level is ${t}`;
|
|
2103
2103
|
}
|
|
2104
2104
|
}
|
|
2105
2105
|
ge.getData = Es;
|
|
2106
|
-
var
|
|
2107
|
-
Object.defineProperty(
|
|
2106
|
+
var yt = {};
|
|
2107
|
+
Object.defineProperty(yt, "__esModule", { value: !0 });
|
|
2108
2108
|
class ri extends Error {
|
|
2109
2109
|
constructor(t) {
|
|
2110
2110
|
super("validation failed"), this.errors = t, this.ajv = this.validation = !0;
|
|
2111
2111
|
}
|
|
2112
2112
|
}
|
|
2113
|
-
|
|
2113
|
+
yt.default = ri;
|
|
2114
2114
|
var Xe = {};
|
|
2115
2115
|
Object.defineProperty(Xe, "__esModule", { value: !0 });
|
|
2116
2116
|
const dr = ae;
|
|
@@ -2123,7 +2123,7 @@ Xe.default = ni;
|
|
|
2123
2123
|
var ue = {};
|
|
2124
2124
|
Object.defineProperty(ue, "__esModule", { value: !0 });
|
|
2125
2125
|
ue.resolveSchema = ue.getCompilingSchema = ue.resolveRef = ue.compileSchema = ue.SchemaEnv = void 0;
|
|
2126
|
-
const ye = B, si =
|
|
2126
|
+
const ye = B, si = yt, De = Pe, _e = ae, En = q, ai = ge;
|
|
2127
2127
|
class Ut {
|
|
2128
2128
|
constructor(t) {
|
|
2129
2129
|
var n;
|
|
@@ -2523,7 +2523,7 @@ const Rs = (
|
|
|
2523
2523
|
parse: Ms,
|
|
2524
2524
|
serialize: Ts
|
|
2525
2525
|
}
|
|
2526
|
-
),
|
|
2526
|
+
), It = (
|
|
2527
2527
|
/** @type {SchemeHandler} */
|
|
2528
2528
|
{
|
|
2529
2529
|
scheme: "ws",
|
|
@@ -2535,9 +2535,9 @@ const Rs = (
|
|
|
2535
2535
|
/** @type {SchemeHandler} */
|
|
2536
2536
|
{
|
|
2537
2537
|
scheme: "wss",
|
|
2538
|
-
domainHost:
|
|
2539
|
-
parse:
|
|
2540
|
-
serialize:
|
|
2538
|
+
domainHost: It.domainHost,
|
|
2539
|
+
parse: It.parse,
|
|
2540
|
+
serialize: It.serialize
|
|
2541
2541
|
}
|
|
2542
2542
|
), Ci = (
|
|
2543
2543
|
/** @type {SchemeHandler} */
|
|
@@ -2555,32 +2555,32 @@ const Rs = (
|
|
|
2555
2555
|
serialize: Ti,
|
|
2556
2556
|
skipNormalize: !0
|
|
2557
2557
|
}
|
|
2558
|
-
),
|
|
2558
|
+
), At = (
|
|
2559
2559
|
/** @type {Record<SchemeName, SchemeHandler>} */
|
|
2560
2560
|
{
|
|
2561
2561
|
http: Rs,
|
|
2562
2562
|
https: Ri,
|
|
2563
|
-
ws:
|
|
2563
|
+
ws: It,
|
|
2564
2564
|
wss: Ai,
|
|
2565
2565
|
urn: Ci,
|
|
2566
2566
|
"urn:uuid": Di
|
|
2567
2567
|
}
|
|
2568
2568
|
);
|
|
2569
|
-
Object.setPrototypeOf(
|
|
2569
|
+
Object.setPrototypeOf(At, null);
|
|
2570
2570
|
function Ar(e) {
|
|
2571
|
-
return e && (
|
|
2571
|
+
return e && (At[
|
|
2572
2572
|
/** @type {SchemeName} */
|
|
2573
2573
|
e
|
|
2574
|
-
] ||
|
|
2574
|
+
] || At[
|
|
2575
2575
|
/** @type {SchemeName} */
|
|
2576
2576
|
e.toLowerCase()
|
|
2577
2577
|
]) || void 0;
|
|
2578
2578
|
}
|
|
2579
2579
|
var Vi = {
|
|
2580
|
-
SCHEMES:
|
|
2580
|
+
SCHEMES: At,
|
|
2581
2581
|
getSchemeHandler: Ar
|
|
2582
2582
|
};
|
|
2583
|
-
const { normalizeIPv6: Fi, removeDotSegments: ot, recomposeAuthority: zi, normalizeComponentEncoding:
|
|
2583
|
+
const { normalizeIPv6: Fi, removeDotSegments: ot, recomposeAuthority: zi, normalizeComponentEncoding: wt, isIPv4: Ui, nonSimpleDomain: Li } = Is, { SCHEMES: Hi, getSchemeHandler: As } = Vi;
|
|
2584
2584
|
function Ki(e, t) {
|
|
2585
2585
|
return typeof e == "string" ? e = /** @type {T} */
|
|
2586
2586
|
ke(Ie(e, t), t) : typeof e == "object" && (e = /** @type {T} */
|
|
@@ -2595,7 +2595,7 @@ function Cs(e, t, n, r) {
|
|
|
2595
2595
|
return r || (e = Ie(ke(e, n), n), t = Ie(ke(t, n), n)), n = n || {}, !n.tolerant && t.scheme ? (s.scheme = t.scheme, s.userinfo = t.userinfo, s.host = t.host, s.port = t.port, s.path = ot(t.path || ""), s.query = t.query) : (t.userinfo !== void 0 || t.host !== void 0 || t.port !== void 0 ? (s.userinfo = t.userinfo, s.host = t.host, s.port = t.port, s.path = ot(t.path || ""), s.query = t.query) : (t.path ? (t.path[0] === "/" ? s.path = ot(t.path) : ((e.userinfo !== void 0 || e.host !== void 0 || e.port !== void 0) && !e.path ? s.path = "/" + t.path : e.path ? s.path = e.path.slice(0, e.path.lastIndexOf("/") + 1) + t.path : s.path = t.path, s.path = ot(s.path)), s.query = t.query) : (s.path = e.path, t.query !== void 0 ? s.query = t.query : s.query = e.query), s.userinfo = e.userinfo, s.host = e.host, s.port = e.port), s.scheme = e.scheme), s.fragment = t.fragment, s;
|
|
2596
2596
|
}
|
|
2597
2597
|
function Gi(e, t, n) {
|
|
2598
|
-
return typeof e == "string" ? (e = unescape(e), e = ke(
|
|
2598
|
+
return typeof e == "string" ? (e = unescape(e), e = ke(wt(Ie(e, n), !0), { ...n, skipEscape: !0 })) : typeof e == "object" && (e = ke(wt(e, !0), { ...n, skipEscape: !0 })), typeof t == "string" ? (t = unescape(t), t = ke(wt(Ie(t, n), !0), { ...n, skipEscape: !0 })) : typeof t == "object" && (t = ke(wt(t, !0), { ...n, skipEscape: !0 })), e.toLowerCase() === t.toLowerCase();
|
|
2599
2599
|
}
|
|
2600
2600
|
function ke(e, t) {
|
|
2601
2601
|
const n = {
|
|
@@ -2693,7 +2693,7 @@ Rr.default = Ds;
|
|
|
2693
2693
|
} }), Object.defineProperty(e, "CodeGen", { enumerable: !0, get: function() {
|
|
2694
2694
|
return n.CodeGen;
|
|
2695
2695
|
} });
|
|
2696
|
-
const r =
|
|
2696
|
+
const r = yt, s = Xe, a = Ue, o = ue, i = B, d = ae, c = te, u = q, m = vi, $ = Rr, b = (j, v) => new RegExp(j, v);
|
|
2697
2697
|
b.code = "new RegExp";
|
|
2698
2698
|
const _ = ["removeAdditional", "useDefaults", "coerceTypes"], g = /* @__PURE__ */ new Set([
|
|
2699
2699
|
"validate",
|
|
@@ -2731,11 +2731,11 @@ Rr.default = Ds;
|
|
|
2731
2731
|
unicode: '"minLength"/"maxLength" account for unicode characters by default.'
|
|
2732
2732
|
}, y = 200;
|
|
2733
2733
|
function S(j) {
|
|
2734
|
-
var v, P, w, l, f, E,
|
|
2734
|
+
var v, P, w, l, f, E, A, C, Z, x, re, He, xt, Wt, Zt, Yt, Qt, Xt, er, tr, rr, nr, sr, ar, or;
|
|
2735
2735
|
const nt = j.strict, ir = (v = j.code) === null || v === void 0 ? void 0 : v.optimize, pn = ir === !0 || ir === void 0 ? 1 : ir || 0, yn = (w = (P = j.code) === null || P === void 0 ? void 0 : P.regExp) !== null && w !== void 0 ? w : b, Zs = (l = j.uriResolver) !== null && l !== void 0 ? l : $.default;
|
|
2736
2736
|
return {
|
|
2737
2737
|
strictSchema: (E = (f = j.strictSchema) !== null && f !== void 0 ? f : nt) !== null && E !== void 0 ? E : !0,
|
|
2738
|
-
strictNumbers: (
|
|
2738
|
+
strictNumbers: (C = (A = j.strictNumbers) !== null && A !== void 0 ? A : nt) !== null && C !== void 0 ? C : !0,
|
|
2739
2739
|
strictTypes: (x = (Z = j.strictTypes) !== null && Z !== void 0 ? Z : nt) !== null && x !== void 0 ? x : "log",
|
|
2740
2740
|
strictTuples: (He = (re = j.strictTuples) !== null && re !== void 0 ? re : nt) !== null && He !== void 0 ? He : "log",
|
|
2741
2741
|
strictRequired: (Wt = (xt = j.strictRequired) !== null && xt !== void 0 ? xt : nt) !== null && Wt !== void 0 ? Wt : !1,
|
|
@@ -2758,9 +2758,9 @@ Rr.default = Ds;
|
|
|
2758
2758
|
constructor(v = {}) {
|
|
2759
2759
|
this.schemas = {}, this.refs = {}, this.formats = {}, this._compilations = /* @__PURE__ */ new Set(), this._loading = {}, this._cache = /* @__PURE__ */ new Map(), v = this.opts = { ...v, ...S(v) };
|
|
2760
2760
|
const { es5: P, lines: w } = this.opts.code;
|
|
2761
|
-
this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: P, lines: w }), this.logger =
|
|
2761
|
+
this.scope = new i.ValueScope({ scope: {}, prefixes: g, es5: P, lines: w }), this.logger = H(v.logger);
|
|
2762
2762
|
const l = v.validateFormats;
|
|
2763
|
-
v.validateFormats = !1, this.RULES = (0, a.getRules)(), O.call(this, p, v, "NOT SUPPORTED"), O.call(this, h, v, "DEPRECATED", "warn"), this._metaOpts =
|
|
2763
|
+
v.validateFormats = !1, this.RULES = (0, a.getRules)(), O.call(this, p, v, "NOT SUPPORTED"), O.call(this, h, v, "DEPRECATED", "warn"), this._metaOpts = F.call(this), v.formats && I.call(this), this._addVocabularies(), this._addDefaultMetaSchema(), v.keywords && T.call(this, v.keywords), typeof v.meta == "object" && this.addMetaSchema(v.meta), V.call(this), v.validateFormats = l;
|
|
2764
2764
|
}
|
|
2765
2765
|
_addVocabularies() {
|
|
2766
2766
|
this.addKeyword("$async");
|
|
@@ -2807,14 +2807,14 @@ Rr.default = Ds;
|
|
|
2807
2807
|
} catch (re) {
|
|
2808
2808
|
if (!(re instanceof s.default))
|
|
2809
2809
|
throw re;
|
|
2810
|
-
return
|
|
2810
|
+
return A.call(this, re), await C.call(this, re.missingSchema), E.call(this, x);
|
|
2811
2811
|
}
|
|
2812
2812
|
}
|
|
2813
|
-
function
|
|
2813
|
+
function A({ missingSchema: x, missingRef: re }) {
|
|
2814
2814
|
if (this.refs[x])
|
|
2815
2815
|
throw new Error(`AnySchema ${x} is loaded but ${re} cannot be resolved`);
|
|
2816
2816
|
}
|
|
2817
|
-
async function
|
|
2817
|
+
async function C(x) {
|
|
2818
2818
|
const re = await Z.call(this, x);
|
|
2819
2819
|
this.refs[x] || await f.call(this, re.$schema), this.refs[x] || this.addSchema(re, x, P);
|
|
2820
2820
|
}
|
|
@@ -2872,7 +2872,7 @@ Rr.default = Ds;
|
|
|
2872
2872
|
// (`key` that was passed to `addSchema` or full schema reference - `schema.$id` or resolved id)
|
|
2873
2873
|
getSchema(v) {
|
|
2874
2874
|
let P;
|
|
2875
|
-
for (; typeof (P =
|
|
2875
|
+
for (; typeof (P = D.call(this, v)) == "string"; )
|
|
2876
2876
|
v = P;
|
|
2877
2877
|
if (P === void 0) {
|
|
2878
2878
|
const { schemaId: w } = this.opts, l = new o.SchemaEnv({ schema: {}, schemaId: w });
|
|
@@ -2893,7 +2893,7 @@ Rr.default = Ds;
|
|
|
2893
2893
|
case "undefined":
|
|
2894
2894
|
return this._removeAllSchemas(this.schemas), this._removeAllSchemas(this.refs), this._cache.clear(), this;
|
|
2895
2895
|
case "string": {
|
|
2896
|
-
const P =
|
|
2896
|
+
const P = D.call(this, v);
|
|
2897
2897
|
return typeof P == "object" && this._cache.delete(P.schema), delete this.schemas[v], delete this.refs[v], this;
|
|
2898
2898
|
}
|
|
2899
2899
|
case "object": {
|
|
@@ -2958,14 +2958,14 @@ Rr.default = Ds;
|
|
|
2958
2958
|
for (const l of P) {
|
|
2959
2959
|
const f = l.split("/").slice(1);
|
|
2960
2960
|
let E = v;
|
|
2961
|
-
for (const
|
|
2962
|
-
E = E[
|
|
2963
|
-
for (const
|
|
2964
|
-
const
|
|
2965
|
-
if (typeof
|
|
2961
|
+
for (const A of f)
|
|
2962
|
+
E = E[A];
|
|
2963
|
+
for (const A in w) {
|
|
2964
|
+
const C = w[A];
|
|
2965
|
+
if (typeof C != "object")
|
|
2966
2966
|
continue;
|
|
2967
|
-
const { $data: Z } =
|
|
2968
|
-
Z && x && (E[
|
|
2967
|
+
const { $data: Z } = C.definition, x = E[A];
|
|
2968
|
+
Z && x && (E[A] = $t(x));
|
|
2969
2969
|
}
|
|
2970
2970
|
}
|
|
2971
2971
|
return v;
|
|
@@ -2978,21 +2978,21 @@ Rr.default = Ds;
|
|
|
2978
2978
|
}
|
|
2979
2979
|
_addSchema(v, P, w, l = this.opts.validateSchema, f = this.opts.addUsedSchema) {
|
|
2980
2980
|
let E;
|
|
2981
|
-
const { schemaId:
|
|
2981
|
+
const { schemaId: A } = this.opts;
|
|
2982
2982
|
if (typeof v == "object")
|
|
2983
|
-
E = v[
|
|
2983
|
+
E = v[A];
|
|
2984
2984
|
else {
|
|
2985
2985
|
if (this.opts.jtd)
|
|
2986
2986
|
throw new Error("schema must be object");
|
|
2987
2987
|
if (typeof v != "boolean")
|
|
2988
2988
|
throw new Error("schema must be object or boolean");
|
|
2989
2989
|
}
|
|
2990
|
-
let
|
|
2991
|
-
if (
|
|
2992
|
-
return
|
|
2990
|
+
let C = this._cache.get(v);
|
|
2991
|
+
if (C !== void 0)
|
|
2992
|
+
return C;
|
|
2993
2993
|
w = (0, d.normalizeId)(E || w);
|
|
2994
2994
|
const Z = d.getSchemaRefs.call(this, v, w);
|
|
2995
|
-
return
|
|
2995
|
+
return C = new o.SchemaEnv({ schema: v, schemaId: A, meta: P, baseId: w, localRefs: Z }), this._cache.set(C.schema, C), f && !w.startsWith("#") && (w && this._checkUnique(w), this.refs[w] = C), l && this.validateSchema(v, !0), C;
|
|
2996
2996
|
}
|
|
2997
2997
|
_checkUnique(v) {
|
|
2998
2998
|
if (this.schemas[v] || this.refs[v])
|
|
@@ -3020,10 +3020,10 @@ Rr.default = Ds;
|
|
|
3020
3020
|
f in v && this.logger[w](`${P}: option ${l}. ${j[f]}`);
|
|
3021
3021
|
}
|
|
3022
3022
|
}
|
|
3023
|
-
function
|
|
3023
|
+
function D(j) {
|
|
3024
3024
|
return j = (0, d.normalizeId)(j), this.schemas[j] || this.refs[j];
|
|
3025
3025
|
}
|
|
3026
|
-
function
|
|
3026
|
+
function V() {
|
|
3027
3027
|
const j = this.opts.schemas;
|
|
3028
3028
|
if (j)
|
|
3029
3029
|
if (Array.isArray(j))
|
|
@@ -3032,13 +3032,13 @@ Rr.default = Ds;
|
|
|
3032
3032
|
for (const v in j)
|
|
3033
3033
|
this.addSchema(j[v], v);
|
|
3034
3034
|
}
|
|
3035
|
-
function
|
|
3035
|
+
function I() {
|
|
3036
3036
|
for (const j in this.opts.formats) {
|
|
3037
3037
|
const v = this.opts.formats[j];
|
|
3038
3038
|
v && this.addFormat(j, v);
|
|
3039
3039
|
}
|
|
3040
3040
|
}
|
|
3041
|
-
function
|
|
3041
|
+
function T(j) {
|
|
3042
3042
|
if (Array.isArray(j)) {
|
|
3043
3043
|
this.addVocabulary(j);
|
|
3044
3044
|
return;
|
|
@@ -3049,7 +3049,7 @@ Rr.default = Ds;
|
|
|
3049
3049
|
P.keyword || (P.keyword = v), this.addKeyword(P);
|
|
3050
3050
|
}
|
|
3051
3051
|
}
|
|
3052
|
-
function
|
|
3052
|
+
function F() {
|
|
3053
3053
|
const j = { ...this.opts };
|
|
3054
3054
|
for (const v of _)
|
|
3055
3055
|
delete j[v];
|
|
@@ -3059,7 +3059,7 @@ Rr.default = Ds;
|
|
|
3059
3059
|
}, warn() {
|
|
3060
3060
|
}, error() {
|
|
3061
3061
|
} };
|
|
3062
|
-
function
|
|
3062
|
+
function H(j) {
|
|
3063
3063
|
if (j === !1)
|
|
3064
3064
|
return W;
|
|
3065
3065
|
if (j === void 0)
|
|
@@ -3085,10 +3085,10 @@ Rr.default = Ds;
|
|
|
3085
3085
|
if (P && l)
|
|
3086
3086
|
throw new Error('keyword with "post" flag cannot have "type"');
|
|
3087
3087
|
const { RULES: f } = this;
|
|
3088
|
-
let E = l ? f.post : f.rules.find(({ type:
|
|
3088
|
+
let E = l ? f.post : f.rules.find(({ type: C }) => C === P);
|
|
3089
3089
|
if (E || (E = { type: P, rules: [] }, f.rules.push(E)), f.keywords[j] = !0, !v)
|
|
3090
3090
|
return;
|
|
3091
|
-
const
|
|
3091
|
+
const A = {
|
|
3092
3092
|
keyword: j,
|
|
3093
3093
|
definition: {
|
|
3094
3094
|
...v,
|
|
@@ -3096,20 +3096,20 @@ Rr.default = Ds;
|
|
|
3096
3096
|
schemaType: (0, c.getJSONTypes)(v.schemaType)
|
|
3097
3097
|
}
|
|
3098
3098
|
};
|
|
3099
|
-
v.before ?
|
|
3099
|
+
v.before ? bt.call(this, E, A, v.before) : E.rules.push(A), f.all[j] = A, (w = v.implements) === null || w === void 0 || w.forEach((C) => this.addKeyword(C));
|
|
3100
3100
|
}
|
|
3101
|
-
function
|
|
3101
|
+
function bt(j, v, P) {
|
|
3102
3102
|
const w = j.rules.findIndex((l) => l.keyword === P);
|
|
3103
3103
|
w >= 0 ? j.rules.splice(w, 0, v) : (j.rules.push(v), this.logger.warn(`rule ${P} is not defined`));
|
|
3104
3104
|
}
|
|
3105
3105
|
function Gt(j) {
|
|
3106
3106
|
let { metaSchema: v } = j;
|
|
3107
|
-
v !== void 0 && (j.$data && this.opts.$data && (v =
|
|
3107
|
+
v !== void 0 && (j.$data && this.opts.$data && (v = $t(v)), j.validateSchema = this.compile(v, !0));
|
|
3108
3108
|
}
|
|
3109
3109
|
const Jt = {
|
|
3110
3110
|
$ref: "https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"
|
|
3111
3111
|
};
|
|
3112
|
-
function
|
|
3112
|
+
function $t(j) {
|
|
3113
3113
|
return { anyOf: [j, Jt] };
|
|
3114
3114
|
}
|
|
3115
3115
|
})(xn);
|
|
@@ -3125,7 +3125,7 @@ Fr.default = Wi;
|
|
|
3125
3125
|
var Le = {};
|
|
3126
3126
|
Object.defineProperty(Le, "__esModule", { value: !0 });
|
|
3127
3127
|
Le.callRef = Le.getValidate = void 0;
|
|
3128
|
-
const Zi = Xe, On =
|
|
3128
|
+
const Zi = Xe, On = J, ce = B, Be = Pe, jn = ue, St = q, Yi = {
|
|
3129
3129
|
keyword: "$ref",
|
|
3130
3130
|
schemaType: "string",
|
|
3131
3131
|
code(e) {
|
|
@@ -3140,13 +3140,13 @@ const Zi = Xe, On = G, ce = B, Be = Ee, jn = ue, wt = N, Yi = {
|
|
|
3140
3140
|
return b(u);
|
|
3141
3141
|
function m() {
|
|
3142
3142
|
if (a === c)
|
|
3143
|
-
return
|
|
3143
|
+
return qt(e, o, a, a.$async);
|
|
3144
3144
|
const _ = t.scopeValue("root", { ref: c });
|
|
3145
|
-
return
|
|
3145
|
+
return qt(e, (0, ce._)`${_}.validate`, c, c.$async);
|
|
3146
3146
|
}
|
|
3147
3147
|
function $(_) {
|
|
3148
3148
|
const g = Vs(e, _);
|
|
3149
|
-
|
|
3149
|
+
qt(e, g, _, _.$async);
|
|
3150
3150
|
}
|
|
3151
3151
|
function b(_) {
|
|
3152
3152
|
const g = t.scopeValue("schema", i.code.source === !0 ? { ref: _, code: (0, ce.stringify)(_) } : { ref: _ }), p = t.name("valid"), h = e.subschema({
|
|
@@ -3165,7 +3165,7 @@ function Vs(e, t) {
|
|
|
3165
3165
|
return t.validate ? n.scopeValue("validate", { ref: t.validate }) : (0, ce._)`${n.scopeValue("wrapper", { ref: t })}.validate`;
|
|
3166
3166
|
}
|
|
3167
3167
|
Le.getValidate = Vs;
|
|
3168
|
-
function
|
|
3168
|
+
function qt(e, t, n, r) {
|
|
3169
3169
|
const { gen: s, it: a } = e, { allErrors: o, schemaEnv: i, opts: d } = a, c = d.passContext ? Be.default.this : ce.nil;
|
|
3170
3170
|
r ? u() : m();
|
|
3171
3171
|
function u() {
|
|
@@ -3192,21 +3192,21 @@ function It(e, t, n, r) {
|
|
|
3192
3192
|
const p = (g = n == null ? void 0 : n.validate) === null || g === void 0 ? void 0 : g.evaluated;
|
|
3193
3193
|
if (a.props !== !0)
|
|
3194
3194
|
if (p && !p.dynamicProps)
|
|
3195
|
-
p.props !== void 0 && (a.props =
|
|
3195
|
+
p.props !== void 0 && (a.props = St.mergeEvaluated.props(s, p.props, a.props));
|
|
3196
3196
|
else {
|
|
3197
3197
|
const h = s.var("props", (0, ce._)`${_}.evaluated.props`);
|
|
3198
|
-
a.props =
|
|
3198
|
+
a.props = St.mergeEvaluated.props(s, h, a.props, ce.Name);
|
|
3199
3199
|
}
|
|
3200
3200
|
if (a.items !== !0)
|
|
3201
3201
|
if (p && !p.dynamicItems)
|
|
3202
|
-
p.items !== void 0 && (a.items =
|
|
3202
|
+
p.items !== void 0 && (a.items = St.mergeEvaluated.items(s, p.items, a.items));
|
|
3203
3203
|
else {
|
|
3204
3204
|
const h = s.var("items", (0, ce._)`${_}.evaluated.items`);
|
|
3205
|
-
a.items =
|
|
3205
|
+
a.items = St.mergeEvaluated.items(s, h, a.items, ce.Name);
|
|
3206
3206
|
}
|
|
3207
3207
|
}
|
|
3208
3208
|
}
|
|
3209
|
-
Le.callRef =
|
|
3209
|
+
Le.callRef = qt;
|
|
3210
3210
|
Le.default = Yi;
|
|
3211
3211
|
Object.defineProperty(Vr, "__esModule", { value: !0 });
|
|
3212
3212
|
const Qi = Fr, Xi = Le, el = [
|
|
@@ -3222,23 +3222,23 @@ const Qi = Fr, Xi = Le, el = [
|
|
|
3222
3222
|
Vr.default = el;
|
|
3223
3223
|
var zr = {}, Ur = {};
|
|
3224
3224
|
Object.defineProperty(Ur, "__esModule", { value: !0 });
|
|
3225
|
-
const
|
|
3225
|
+
const Ct = B, Te = Ct.operators, Dt = {
|
|
3226
3226
|
maximum: { okStr: "<=", ok: Te.LTE, fail: Te.GT },
|
|
3227
3227
|
minimum: { okStr: ">=", ok: Te.GTE, fail: Te.LT },
|
|
3228
3228
|
exclusiveMaximum: { okStr: "<", ok: Te.LT, fail: Te.GTE },
|
|
3229
3229
|
exclusiveMinimum: { okStr: ">", ok: Te.GT, fail: Te.LTE }
|
|
3230
3230
|
}, tl = {
|
|
3231
|
-
message: ({ keyword: e, schemaCode: t }) => (0,
|
|
3232
|
-
params: ({ keyword: e, schemaCode: t }) => (0,
|
|
3231
|
+
message: ({ keyword: e, schemaCode: t }) => (0, Ct.str)`must be ${Dt[e].okStr} ${t}`,
|
|
3232
|
+
params: ({ keyword: e, schemaCode: t }) => (0, Ct._)`{comparison: ${Dt[e].okStr}, limit: ${t}}`
|
|
3233
3233
|
}, rl = {
|
|
3234
|
-
keyword: Object.keys(
|
|
3234
|
+
keyword: Object.keys(Dt),
|
|
3235
3235
|
type: "number",
|
|
3236
3236
|
schemaType: "number",
|
|
3237
3237
|
$data: !0,
|
|
3238
3238
|
error: tl,
|
|
3239
3239
|
code(e) {
|
|
3240
3240
|
const { keyword: t, data: n, schemaCode: r } = e;
|
|
3241
|
-
e.fail$data((0,
|
|
3241
|
+
e.fail$data((0, Ct._)`${n} ${Dt[t].fail} ${r} || isNaN(${n})`);
|
|
3242
3242
|
}
|
|
3243
3243
|
};
|
|
3244
3244
|
Ur.default = rl;
|
|
@@ -3271,7 +3271,7 @@ function Fs(e) {
|
|
|
3271
3271
|
Kr.default = Fs;
|
|
3272
3272
|
Fs.code = 'require("ajv/dist/runtime/ucs2length").default';
|
|
3273
3273
|
Object.defineProperty(Hr, "__esModule", { value: !0 });
|
|
3274
|
-
const Fe = B, al =
|
|
3274
|
+
const Fe = B, al = q, ol = Kr, il = {
|
|
3275
3275
|
message({ keyword: e, schemaCode: t }) {
|
|
3276
3276
|
const n = e === "maxLength" ? "more" : "fewer";
|
|
3277
3277
|
return (0, Fe.str)`must NOT have ${n} than ${t} characters`;
|
|
@@ -3291,9 +3291,9 @@ const Fe = B, al = N, ol = Kr, il = {
|
|
|
3291
3291
|
Hr.default = ll;
|
|
3292
3292
|
var Br = {};
|
|
3293
3293
|
Object.defineProperty(Br, "__esModule", { value: !0 });
|
|
3294
|
-
const dl =
|
|
3295
|
-
message: ({ schemaCode: e }) => (0,
|
|
3296
|
-
params: ({ schemaCode: e }) => (0,
|
|
3294
|
+
const dl = J, Vt = B, cl = {
|
|
3295
|
+
message: ({ schemaCode: e }) => (0, Vt.str)`must match pattern "${e}"`,
|
|
3296
|
+
params: ({ schemaCode: e }) => (0, Vt._)`{pattern: ${e}}`
|
|
3297
3297
|
}, ul = {
|
|
3298
3298
|
keyword: "pattern",
|
|
3299
3299
|
type: "string",
|
|
@@ -3301,8 +3301,8 @@ const dl = G, Dt = B, cl = {
|
|
|
3301
3301
|
$data: !0,
|
|
3302
3302
|
error: cl,
|
|
3303
3303
|
code(e) {
|
|
3304
|
-
const { data: t, $data: n, schema: r, schemaCode: s, it: a } = e, o = a.opts.unicodeRegExp ? "u" : "", i = n ? (0,
|
|
3305
|
-
e.fail$data((0,
|
|
3304
|
+
const { data: t, $data: n, schema: r, schemaCode: s, it: a } = e, o = a.opts.unicodeRegExp ? "u" : "", i = n ? (0, Vt._)`(new RegExp(${s}, ${o}))` : (0, dl.usePattern)(e, r);
|
|
3305
|
+
e.fail$data((0, Vt._)`!${i}.test(${t})`);
|
|
3306
3306
|
}
|
|
3307
3307
|
};
|
|
3308
3308
|
Br.default = ul;
|
|
@@ -3328,7 +3328,7 @@ const ct = B, fl = {
|
|
|
3328
3328
|
Gr.default = ml;
|
|
3329
3329
|
var Jr = {};
|
|
3330
3330
|
Object.defineProperty(Jr, "__esModule", { value: !0 });
|
|
3331
|
-
const at =
|
|
3331
|
+
const at = J, ut = B, hl = q, pl = {
|
|
3332
3332
|
message: ({ params: { missingProperty: e } }) => (0, ut.str)`must have required property '${e}'`,
|
|
3333
3333
|
params: ({ params: { missingProperty: e } }) => (0, ut._)`{missingProperty: ${e}}`
|
|
3334
3334
|
}, yl = {
|
|
@@ -3400,13 +3400,13 @@ const ft = B, vl = {
|
|
|
3400
3400
|
}
|
|
3401
3401
|
};
|
|
3402
3402
|
xr.default = _l;
|
|
3403
|
-
var Wr = {},
|
|
3404
|
-
Object.defineProperty(
|
|
3403
|
+
var Wr = {}, vt = {};
|
|
3404
|
+
Object.defineProperty(vt, "__esModule", { value: !0 });
|
|
3405
3405
|
const zs = cs;
|
|
3406
3406
|
zs.code = 'require("ajv/dist/runtime/equal").default';
|
|
3407
|
-
|
|
3407
|
+
vt.default = zs;
|
|
3408
3408
|
Object.defineProperty(Wr, "__esModule", { value: !0 });
|
|
3409
|
-
const ur = te, se = B, gl =
|
|
3409
|
+
const ur = te, se = B, gl = q, bl = vt, $l = {
|
|
3410
3410
|
message: ({ params: { i: e, j: t } }) => (0, se.str)`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,
|
|
3411
3411
|
params: ({ params: { i: e, j: t } }) => (0, se._)`{i: ${e}, j: ${t}}`
|
|
3412
3412
|
}, wl = {
|
|
@@ -3447,7 +3447,7 @@ const ur = te, se = B, gl = N, bl = yt, $l = {
|
|
|
3447
3447
|
Wr.default = wl;
|
|
3448
3448
|
var Zr = {};
|
|
3449
3449
|
Object.defineProperty(Zr, "__esModule", { value: !0 });
|
|
3450
|
-
const _r = B, Sl =
|
|
3450
|
+
const _r = B, Sl = q, kl = vt, El = {
|
|
3451
3451
|
message: "must be equal to constant",
|
|
3452
3452
|
params: ({ schemaCode: e }) => (0, _r._)`{allowedValue: ${e}}`
|
|
3453
3453
|
}, Pl = {
|
|
@@ -3462,7 +3462,7 @@ const _r = B, Sl = N, kl = yt, El = {
|
|
|
3462
3462
|
Zr.default = Pl;
|
|
3463
3463
|
var Yr = {};
|
|
3464
3464
|
Object.defineProperty(Yr, "__esModule", { value: !0 });
|
|
3465
|
-
const it = B, Ol =
|
|
3465
|
+
const it = B, Ol = q, jl = vt, Nl = {
|
|
3466
3466
|
message: "must be equal to one of the allowed values",
|
|
3467
3467
|
params: ({ schemaCode: e }) => (0, it._)`{allowedValues: ${e}}`
|
|
3468
3468
|
}, Il = {
|
|
@@ -3521,7 +3521,7 @@ zr.default = Ul;
|
|
|
3521
3521
|
var Qr = {}, et = {};
|
|
3522
3522
|
Object.defineProperty(et, "__esModule", { value: !0 });
|
|
3523
3523
|
et.validateAdditionalItems = void 0;
|
|
3524
|
-
const ze = B, gr =
|
|
3524
|
+
const ze = B, gr = q, Ll = {
|
|
3525
3525
|
message: ({ params: { len: e } }) => (0, ze.str)`must NOT have more than ${e} items`,
|
|
3526
3526
|
params: ({ params: { len: e } }) => (0, ze._)`{limit: ${e}}`
|
|
3527
3527
|
}, Hl = {
|
|
@@ -3560,7 +3560,7 @@ et.default = Hl;
|
|
|
3560
3560
|
var Xr = {}, tt = {};
|
|
3561
3561
|
Object.defineProperty(tt, "__esModule", { value: !0 });
|
|
3562
3562
|
tt.validateTuple = void 0;
|
|
3563
|
-
const Nn = B,
|
|
3563
|
+
const Nn = B, Mt = q, Kl = J, Bl = {
|
|
3564
3564
|
keyword: "items",
|
|
3565
3565
|
type: "array",
|
|
3566
3566
|
schemaType: ["object", "array", "boolean"],
|
|
@@ -3569,15 +3569,15 @@ const Nn = B, qt = N, Kl = G, Bl = {
|
|
|
3569
3569
|
const { schema: t, it: n } = e;
|
|
3570
3570
|
if (Array.isArray(t))
|
|
3571
3571
|
return Ls(e, "additionalItems", t);
|
|
3572
|
-
n.items = !0, !(0,
|
|
3572
|
+
n.items = !0, !(0, Mt.alwaysValidSchema)(n, t) && e.ok((0, Kl.validateArray)(e));
|
|
3573
3573
|
}
|
|
3574
3574
|
};
|
|
3575
3575
|
function Ls(e, t, n = e.schema) {
|
|
3576
3576
|
const { gen: r, parentSchema: s, data: a, keyword: o, it: i } = e;
|
|
3577
|
-
u(s), i.opts.unevaluated && n.length && i.items !== !0 && (i.items =
|
|
3577
|
+
u(s), i.opts.unevaluated && n.length && i.items !== !0 && (i.items = Mt.mergeEvaluated.items(r, n.length, i.items));
|
|
3578
3578
|
const d = r.name("valid"), c = r.const("len", (0, Nn._)`${a}.length`);
|
|
3579
3579
|
n.forEach((m, $) => {
|
|
3580
|
-
(0,
|
|
3580
|
+
(0, Mt.alwaysValidSchema)(i, m) || (r.if((0, Nn._)`${c} > ${$}`, () => e.subschema({
|
|
3581
3581
|
keyword: o,
|
|
3582
3582
|
schemaProp: $,
|
|
3583
3583
|
dataProp: $
|
|
@@ -3587,7 +3587,7 @@ function Ls(e, t, n = e.schema) {
|
|
|
3587
3587
|
const { opts: $, errSchemaPath: b } = i, _ = n.length, g = _ === m.minItems && (_ === m.maxItems || m[t] === !1);
|
|
3588
3588
|
if ($.strictTuples && !g) {
|
|
3589
3589
|
const p = `"${o}" is ${_}-tuple, but minItems or maxItems/${t} are not specified or different at path "${b}"`;
|
|
3590
|
-
(0,
|
|
3590
|
+
(0, Mt.checkStrictMode)(i, p, $.strictTuples);
|
|
3591
3591
|
}
|
|
3592
3592
|
}
|
|
3593
3593
|
}
|
|
@@ -3604,7 +3604,7 @@ const Gl = tt, Jl = {
|
|
|
3604
3604
|
Xr.default = Jl;
|
|
3605
3605
|
var en = {};
|
|
3606
3606
|
Object.defineProperty(en, "__esModule", { value: !0 });
|
|
3607
|
-
const In = B, xl =
|
|
3607
|
+
const In = B, xl = q, Wl = J, Zl = et, Yl = {
|
|
3608
3608
|
message: ({ params: { len: e } }) => (0, In.str)`must NOT have more than ${e} items`,
|
|
3609
3609
|
params: ({ params: { len: e } }) => (0, In._)`{limit: ${e}}`
|
|
3610
3610
|
}, Ql = {
|
|
@@ -3621,7 +3621,7 @@ const In = B, xl = N, Wl = G, Zl = et, Yl = {
|
|
|
3621
3621
|
en.default = Ql;
|
|
3622
3622
|
var tn = {};
|
|
3623
3623
|
Object.defineProperty(tn, "__esModule", { value: !0 });
|
|
3624
|
-
const pe = B,
|
|
3624
|
+
const pe = B, kt = q, Xl = {
|
|
3625
3625
|
message: ({ params: { min: e, max: t } }) => t === void 0 ? (0, pe.str)`must contain at least ${e} valid item(s)` : (0, pe.str)`must contain at least ${e} and no more than ${t} valid item(s)`,
|
|
3626
3626
|
params: ({ params: { min: e, max: t } }) => t === void 0 ? (0, pe._)`{minContains: ${e}}` : (0, pe._)`{minContains: ${e}, maxContains: ${t}}`
|
|
3627
3627
|
}, ed = {
|
|
@@ -3638,14 +3638,14 @@ const pe = B, St = N, Xl = {
|
|
|
3638
3638
|
a.opts.next ? (o = d === void 0 ? 1 : d, i = c) : o = 1;
|
|
3639
3639
|
const u = t.const("len", (0, pe._)`${s}.length`);
|
|
3640
3640
|
if (e.setParams({ min: o, max: i }), i === void 0 && o === 0) {
|
|
3641
|
-
(0,
|
|
3641
|
+
(0, kt.checkStrictMode)(a, '"minContains" == 0 without "maxContains": "contains" keyword ignored');
|
|
3642
3642
|
return;
|
|
3643
3643
|
}
|
|
3644
3644
|
if (i !== void 0 && o > i) {
|
|
3645
|
-
(0,
|
|
3645
|
+
(0, kt.checkStrictMode)(a, '"minContains" > "maxContains" is always invalid'), e.fail();
|
|
3646
3646
|
return;
|
|
3647
3647
|
}
|
|
3648
|
-
if ((0,
|
|
3648
|
+
if ((0, kt.alwaysValidSchema)(a, n)) {
|
|
3649
3649
|
let g = (0, pe._)`${u} >= ${o}`;
|
|
3650
3650
|
i !== void 0 && (g = (0, pe._)`${g} && ${u} <= ${i}`), e.pass(g);
|
|
3651
3651
|
return;
|
|
@@ -3662,7 +3662,7 @@ const pe = B, St = N, Xl = {
|
|
|
3662
3662
|
e.subschema({
|
|
3663
3663
|
keyword: "contains",
|
|
3664
3664
|
dataProp: h,
|
|
3665
|
-
dataPropType:
|
|
3665
|
+
dataPropType: kt.Type.Num,
|
|
3666
3666
|
compositeRule: !0
|
|
3667
3667
|
}, g), p();
|
|
3668
3668
|
});
|
|
@@ -3676,7 +3676,7 @@ tn.default = ed;
|
|
|
3676
3676
|
var Hs = {};
|
|
3677
3677
|
(function(e) {
|
|
3678
3678
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.validateSchemaDeps = e.validatePropertyDeps = e.error = void 0;
|
|
3679
|
-
const t = B, n =
|
|
3679
|
+
const t = B, n = q, r = J;
|
|
3680
3680
|
e.error = {
|
|
3681
3681
|
message: ({ params: { property: d, depsCount: c, deps: u } }) => {
|
|
3682
3682
|
const m = c === 1 ? "property" : "properties";
|
|
@@ -3746,7 +3746,7 @@ var Hs = {};
|
|
|
3746
3746
|
})(Hs);
|
|
3747
3747
|
var rn = {};
|
|
3748
3748
|
Object.defineProperty(rn, "__esModule", { value: !0 });
|
|
3749
|
-
const Ks = B, td =
|
|
3749
|
+
const Ks = B, td = q, rd = {
|
|
3750
3750
|
message: "property name must be valid",
|
|
3751
3751
|
params: ({ params: e }) => (0, Ks._)`{propertyName: ${e.propertyName}}`
|
|
3752
3752
|
}, nd = {
|
|
@@ -3775,7 +3775,7 @@ const Ks = B, td = N, rd = {
|
|
|
3775
3775
|
rn.default = nd;
|
|
3776
3776
|
var Kt = {};
|
|
3777
3777
|
Object.defineProperty(Kt, "__esModule", { value: !0 });
|
|
3778
|
-
const
|
|
3778
|
+
const Et = J, ve = B, sd = Pe, Pt = q, ad = {
|
|
3779
3779
|
message: "must NOT have additional properties",
|
|
3780
3780
|
params: ({ params: e }) => (0, ve._)`{additionalProperty: ${e.additionalProperty}}`
|
|
3781
3781
|
}, od = {
|
|
@@ -3790,9 +3790,9 @@ const kt = G, ve = B, sd = Ee, Et = N, ad = {
|
|
|
3790
3790
|
if (!a)
|
|
3791
3791
|
throw new Error("ajv implementation error");
|
|
3792
3792
|
const { allErrors: i, opts: d } = o;
|
|
3793
|
-
if (o.props = !0, d.removeAdditional !== "all" && (0,
|
|
3793
|
+
if (o.props = !0, d.removeAdditional !== "all" && (0, Pt.alwaysValidSchema)(o, n))
|
|
3794
3794
|
return;
|
|
3795
|
-
const c = (0,
|
|
3795
|
+
const c = (0, Et.allSchemaProperties)(r.properties), u = (0, Et.allSchemaProperties)(r.patternProperties);
|
|
3796
3796
|
m(), e.ok((0, ve._)`${a} === ${sd.default.errors}`);
|
|
3797
3797
|
function m() {
|
|
3798
3798
|
t.forIn("key", s, (p) => {
|
|
@@ -3802,10 +3802,10 @@ const kt = G, ve = B, sd = Ee, Et = N, ad = {
|
|
|
3802
3802
|
function $(p) {
|
|
3803
3803
|
let h;
|
|
3804
3804
|
if (c.length > 8) {
|
|
3805
|
-
const y = (0,
|
|
3806
|
-
h = (0,
|
|
3805
|
+
const y = (0, Pt.schemaRefOrVal)(o, r.properties, "properties");
|
|
3806
|
+
h = (0, Et.isOwnProperty)(t, y, p);
|
|
3807
3807
|
} else c.length ? h = (0, ve.or)(...c.map((y) => (0, ve._)`${p} === ${y}`)) : h = ve.nil;
|
|
3808
|
-
return u.length && (h = (0, ve.or)(h, ...u.map((y) => (0, ve._)`${(0,
|
|
3808
|
+
return u.length && (h = (0, ve.or)(h, ...u.map((y) => (0, ve._)`${(0, Et.usePattern)(e, y)}.test(${p})`))), (0, ve.not)(h);
|
|
3809
3809
|
}
|
|
3810
3810
|
function b(p) {
|
|
3811
3811
|
t.code((0, ve._)`delete ${s}[${p}]`);
|
|
@@ -3819,7 +3819,7 @@ const kt = G, ve = B, sd = Ee, Et = N, ad = {
|
|
|
3819
3819
|
e.setParams({ additionalProperty: p }), e.error(), i || t.break();
|
|
3820
3820
|
return;
|
|
3821
3821
|
}
|
|
3822
|
-
if (typeof n == "object" && !(0,
|
|
3822
|
+
if (typeof n == "object" && !(0, Pt.alwaysValidSchema)(o, n)) {
|
|
3823
3823
|
const h = t.name("valid");
|
|
3824
3824
|
d.removeAdditional === "failing" ? (g(p, h, !1), t.if((0, ve.not)(h), () => {
|
|
3825
3825
|
e.reset(), b(p);
|
|
@@ -3830,7 +3830,7 @@ const kt = G, ve = B, sd = Ee, Et = N, ad = {
|
|
|
3830
3830
|
const S = {
|
|
3831
3831
|
keyword: "additionalProperties",
|
|
3832
3832
|
dataProp: p,
|
|
3833
|
-
dataPropType:
|
|
3833
|
+
dataPropType: Pt.Type.Str
|
|
3834
3834
|
};
|
|
3835
3835
|
y === !1 && Object.assign(S, {
|
|
3836
3836
|
compositeRule: !0,
|
|
@@ -3843,7 +3843,7 @@ const kt = G, ve = B, sd = Ee, Et = N, ad = {
|
|
|
3843
3843
|
Kt.default = od;
|
|
3844
3844
|
var nn = {};
|
|
3845
3845
|
Object.defineProperty(nn, "__esModule", { value: !0 });
|
|
3846
|
-
const id = ge, qn =
|
|
3846
|
+
const id = ge, qn = J, fr = q, Mn = Kt, ld = {
|
|
3847
3847
|
keyword: "properties",
|
|
3848
3848
|
type: "object",
|
|
3849
3849
|
schemaType: "object",
|
|
@@ -3875,7 +3875,7 @@ const id = ge, qn = G, fr = N, Mn = Kt, ld = {
|
|
|
3875
3875
|
nn.default = ld;
|
|
3876
3876
|
var sn = {};
|
|
3877
3877
|
Object.defineProperty(sn, "__esModule", { value: !0 });
|
|
3878
|
-
const Tn =
|
|
3878
|
+
const Tn = J, Ot = B, Rn = q, An = q, dd = {
|
|
3879
3879
|
keyword: "patternProperties",
|
|
3880
3880
|
type: "object",
|
|
3881
3881
|
schemaType: "object",
|
|
@@ -3884,7 +3884,7 @@ const Tn = G, Pt = B, Rn = N, An = N, dd = {
|
|
|
3884
3884
|
if (i.length === 0 || d.length === i.length && (!a.opts.unevaluated || a.props === !0))
|
|
3885
3885
|
return;
|
|
3886
3886
|
const c = o.strictSchema && !o.allowMatchingProperties && s.properties, u = t.name("valid");
|
|
3887
|
-
a.props !== !0 && !(a.props instanceof
|
|
3887
|
+
a.props !== !0 && !(a.props instanceof Ot.Name) && (a.props = (0, An.evaluatedPropsToName)(t, a.props));
|
|
3888
3888
|
const { props: m } = a;
|
|
3889
3889
|
$();
|
|
3890
3890
|
function $() {
|
|
@@ -3897,14 +3897,14 @@ const Tn = G, Pt = B, Rn = N, An = N, dd = {
|
|
|
3897
3897
|
}
|
|
3898
3898
|
function _(g) {
|
|
3899
3899
|
t.forIn("key", r, (p) => {
|
|
3900
|
-
t.if((0,
|
|
3900
|
+
t.if((0, Ot._)`${(0, Tn.usePattern)(e, g)}.test(${p})`, () => {
|
|
3901
3901
|
const h = d.includes(g);
|
|
3902
3902
|
h || e.subschema({
|
|
3903
3903
|
keyword: "patternProperties",
|
|
3904
3904
|
schemaProp: g,
|
|
3905
3905
|
dataProp: p,
|
|
3906
3906
|
dataPropType: An.Type.Str
|
|
3907
|
-
}, u), a.opts.unevaluated && m !== !0 ? t.assign((0,
|
|
3907
|
+
}, u), a.opts.unevaluated && m !== !0 ? t.assign((0, Ot._)`${m}[${p}]`, !0) : !h && !a.allErrors && t.if((0, Ot.not)(u), () => t.break());
|
|
3908
3908
|
});
|
|
3909
3909
|
});
|
|
3910
3910
|
}
|
|
@@ -3913,7 +3913,7 @@ const Tn = G, Pt = B, Rn = N, An = N, dd = {
|
|
|
3913
3913
|
sn.default = dd;
|
|
3914
3914
|
var an = {};
|
|
3915
3915
|
Object.defineProperty(an, "__esModule", { value: !0 });
|
|
3916
|
-
const cd =
|
|
3916
|
+
const cd = q, ud = {
|
|
3917
3917
|
keyword: "not",
|
|
3918
3918
|
schemaType: ["object", "boolean"],
|
|
3919
3919
|
trackErrors: !0,
|
|
@@ -3936,7 +3936,7 @@ const cd = N, ud = {
|
|
|
3936
3936
|
an.default = ud;
|
|
3937
3937
|
var on = {};
|
|
3938
3938
|
Object.defineProperty(on, "__esModule", { value: !0 });
|
|
3939
|
-
const fd =
|
|
3939
|
+
const fd = J, md = {
|
|
3940
3940
|
keyword: "anyOf",
|
|
3941
3941
|
schemaType: "array",
|
|
3942
3942
|
trackErrors: !0,
|
|
@@ -3946,9 +3946,9 @@ const fd = G, md = {
|
|
|
3946
3946
|
on.default = md;
|
|
3947
3947
|
var ln = {};
|
|
3948
3948
|
Object.defineProperty(ln, "__esModule", { value: !0 });
|
|
3949
|
-
const
|
|
3949
|
+
const Tt = B, hd = q, pd = {
|
|
3950
3950
|
message: "must match exactly one schema in oneOf",
|
|
3951
|
-
params: ({ params: e }) => (0,
|
|
3951
|
+
params: ({ params: e }) => (0, Tt._)`{passingSchemas: ${e.passing}}`
|
|
3952
3952
|
}, yd = {
|
|
3953
3953
|
keyword: "oneOf",
|
|
3954
3954
|
schemaType: "array",
|
|
@@ -3969,8 +3969,8 @@ const Mt = B, hd = N, pd = {
|
|
|
3969
3969
|
keyword: "oneOf",
|
|
3970
3970
|
schemaProp: m,
|
|
3971
3971
|
compositeRule: !0
|
|
3972
|
-
}, d), m > 0 && t.if((0,
|
|
3973
|
-
t.assign(o, !0), t.assign(i, m), $ && e.mergeEvaluated($,
|
|
3972
|
+
}, d), m > 0 && t.if((0, Tt._)`${d} && ${o}`).assign(o, !1).assign(i, (0, Tt._)`[${i}, ${m}]`).else(), t.if(d, () => {
|
|
3973
|
+
t.assign(o, !0), t.assign(i, m), $ && e.mergeEvaluated($, Tt.Name);
|
|
3974
3974
|
});
|
|
3975
3975
|
});
|
|
3976
3976
|
}
|
|
@@ -3979,7 +3979,7 @@ const Mt = B, hd = N, pd = {
|
|
|
3979
3979
|
ln.default = yd;
|
|
3980
3980
|
var dn = {};
|
|
3981
3981
|
Object.defineProperty(dn, "__esModule", { value: !0 });
|
|
3982
|
-
const vd =
|
|
3982
|
+
const vd = q, _d = {
|
|
3983
3983
|
keyword: "allOf",
|
|
3984
3984
|
schemaType: "array",
|
|
3985
3985
|
code(e) {
|
|
@@ -3998,9 +3998,9 @@ const vd = N, _d = {
|
|
|
3998
3998
|
dn.default = _d;
|
|
3999
3999
|
var cn = {};
|
|
4000
4000
|
Object.defineProperty(cn, "__esModule", { value: !0 });
|
|
4001
|
-
const
|
|
4002
|
-
message: ({ params: e }) => (0,
|
|
4003
|
-
params: ({ params: e }) => (0,
|
|
4001
|
+
const Ft = B, Bs = q, gd = {
|
|
4002
|
+
message: ({ params: e }) => (0, Ft.str)`must match "${e.ifClause}" schema`,
|
|
4003
|
+
params: ({ params: e }) => (0, Ft._)`{failingKeyword: ${e.ifClause}}`
|
|
4004
4004
|
}, bd = {
|
|
4005
4005
|
keyword: "if",
|
|
4006
4006
|
schemaType: ["object", "boolean"],
|
|
@@ -4016,7 +4016,7 @@ const Vt = B, Bs = N, gd = {
|
|
|
4016
4016
|
if (d(), e.reset(), s && a) {
|
|
4017
4017
|
const u = t.let("ifClause");
|
|
4018
4018
|
e.setParams({ ifClause: u }), t.if(i, c("then", u), c("else", u));
|
|
4019
|
-
} else s ? t.if(i, c("then")) : t.if((0,
|
|
4019
|
+
} else s ? t.if(i, c("then")) : t.if((0, Ft.not)(i), c("else"));
|
|
4020
4020
|
e.pass(o, () => e.error(!0));
|
|
4021
4021
|
function d() {
|
|
4022
4022
|
const u = e.subschema({
|
|
@@ -4030,7 +4030,7 @@ const Vt = B, Bs = N, gd = {
|
|
|
4030
4030
|
function c(u, m) {
|
|
4031
4031
|
return () => {
|
|
4032
4032
|
const $ = e.subschema({ keyword: u }, i);
|
|
4033
|
-
t.assign(o, i), e.mergeValidEvaluated($, o), m ? t.assign(m, (0,
|
|
4033
|
+
t.assign(o, i), e.mergeValidEvaluated($, o), m ? t.assign(m, (0, Ft._)`${u}`) : e.setParams({ ifClause: u });
|
|
4034
4034
|
};
|
|
4035
4035
|
}
|
|
4036
4036
|
}
|
|
@@ -4042,7 +4042,7 @@ function Cn(e, t) {
|
|
|
4042
4042
|
cn.default = bd;
|
|
4043
4043
|
var un = {};
|
|
4044
4044
|
Object.defineProperty(un, "__esModule", { value: !0 });
|
|
4045
|
-
const $d =
|
|
4045
|
+
const $d = q, wd = {
|
|
4046
4046
|
keyword: ["then", "else"],
|
|
4047
4047
|
schemaType: ["object", "boolean"],
|
|
4048
4048
|
code({ keyword: e, parentSchema: t, it: n }) {
|
|
@@ -4122,8 +4122,8 @@ const ee = B, zd = {
|
|
|
4122
4122
|
}
|
|
4123
4123
|
}
|
|
4124
4124
|
function S(O) {
|
|
4125
|
-
const
|
|
4126
|
-
return typeof O == "object" && !(O instanceof RegExp) ? [O.type || "string", O.validate, (0, ee._)`${
|
|
4125
|
+
const D = O instanceof RegExp ? (0, ee.regexpCode)(O) : d.code.formats ? (0, ee._)`${d.code.formats}${(0, ee.getProperty)(a)}` : void 0, V = n.scopeValue("formats", { key: a, ref: O, code: D });
|
|
4126
|
+
return typeof O == "object" && !(O instanceof RegExp) ? [O.type || "string", O.validate, (0, ee._)`${V}.validate`] : ["string", O, V];
|
|
4127
4127
|
}
|
|
4128
4128
|
function k() {
|
|
4129
4129
|
if (typeof _ == "object" && !(_ instanceof RegExp) && _.async) {
|
|
@@ -4175,7 +4175,7 @@ var Vn;
|
|
|
4175
4175
|
e.Tag = "tag", e.Mapping = "mapping";
|
|
4176
4176
|
})(Vn || (Bt.DiscrError = Vn = {}));
|
|
4177
4177
|
Object.defineProperty(hn, "__esModule", { value: !0 });
|
|
4178
|
-
const Ge = B, br = Bt, Fn = ue, Wd = Xe, Zd =
|
|
4178
|
+
const Ge = B, br = Bt, Fn = ue, Wd = Xe, Zd = q, Yd = {
|
|
4179
4179
|
message: ({ params: { discrError: e, tagName: t } }) => e === br.DiscrError.Tag ? `tag "${t}" must be string` : `value of tag "${t}" must be in oneOf`,
|
|
4180
4180
|
params: ({ params: { discrError: e, tag: t, tagName: n } }) => (0, Ge._)`{error: ${e}, tag: ${n}, tagValue: ${t}}`
|
|
4181
4181
|
}, Qd = {
|
|
@@ -4214,14 +4214,14 @@ const Ge = B, br = Bt, Fn = ue, Wd = Xe, Zd = N, Yd = {
|
|
|
4214
4214
|
for (let k = 0; k < o.length; k++) {
|
|
4215
4215
|
let O = o[k];
|
|
4216
4216
|
if (O != null && O.$ref && !(0, Zd.schemaHasRulesButRef)(O, a.self.RULES)) {
|
|
4217
|
-
const
|
|
4218
|
-
if (O = Fn.resolveRef.call(a.self, a.schemaEnv.root, a.baseId,
|
|
4219
|
-
throw new Wd.default(a.opts.uriResolver, a.baseId,
|
|
4217
|
+
const V = O.$ref;
|
|
4218
|
+
if (O = Fn.resolveRef.call(a.self, a.schemaEnv.root, a.baseId, V), O instanceof Fn.SchemaEnv && (O = O.schema), O === void 0)
|
|
4219
|
+
throw new Wd.default(a.opts.uriResolver, a.baseId, V);
|
|
4220
4220
|
}
|
|
4221
|
-
const
|
|
4222
|
-
if (typeof
|
|
4221
|
+
const D = (b = O == null ? void 0 : O.properties) === null || b === void 0 ? void 0 : b[i];
|
|
4222
|
+
if (typeof D != "object")
|
|
4223
4223
|
throw new Error(`discriminator: oneOf subschemas (or referenced schemas) must have "properties/${i}"`);
|
|
4224
|
-
p = p && (g || h(O)), y(
|
|
4224
|
+
p = p && (g || h(O)), y(D, k);
|
|
4225
4225
|
}
|
|
4226
4226
|
if (!p)
|
|
4227
4227
|
throw new Error(`discriminator: "${i}" must be required`);
|
|
@@ -4233,8 +4233,8 @@ const Ge = B, br = Bt, Fn = ue, Wd = Xe, Zd = N, Yd = {
|
|
|
4233
4233
|
if (k.const)
|
|
4234
4234
|
S(k.const, O);
|
|
4235
4235
|
else if (k.enum)
|
|
4236
|
-
for (const
|
|
4237
|
-
S(
|
|
4236
|
+
for (const D of k.enum)
|
|
4237
|
+
S(D, O);
|
|
4238
4238
|
else
|
|
4239
4239
|
throw new Error(`discriminator: "properties/${i}" must have "const" or "enum"`);
|
|
4240
4240
|
}
|
|
@@ -4524,7 +4524,7 @@ const Xd = "http://json-schema.org/draft-07/schema#", ec = "http://json-schema.o
|
|
|
4524
4524
|
} }), Object.defineProperty(t, "CodeGen", { enumerable: !0, get: function() {
|
|
4525
4525
|
return u.CodeGen;
|
|
4526
4526
|
} });
|
|
4527
|
-
var m =
|
|
4527
|
+
var m = yt;
|
|
4528
4528
|
Object.defineProperty(t, "ValidationError", { enumerable: !0, get: function() {
|
|
4529
4529
|
return m.default;
|
|
4530
4530
|
} });
|
|
@@ -4538,8 +4538,8 @@ const oc = /* @__PURE__ */ Jn(Gs);
|
|
|
4538
4538
|
var $r = { exports: {} }, Js = {};
|
|
4539
4539
|
(function(e) {
|
|
4540
4540
|
Object.defineProperty(e, "__esModule", { value: !0 }), e.formatNames = e.fastFormats = e.fullFormats = void 0;
|
|
4541
|
-
function t(
|
|
4542
|
-
return { validate:
|
|
4541
|
+
function t(T, F) {
|
|
4542
|
+
return { validate: T, compare: F };
|
|
4543
4543
|
}
|
|
4544
4544
|
e.fullFormats = {
|
|
4545
4545
|
// date: http://tools.ietf.org/html/rfc3339#section-5.6
|
|
@@ -4561,7 +4561,7 @@ var $r = { exports: {} }, Js = {};
|
|
|
4561
4561
|
// optimized https://www.safaribooksonline.com/library/view/regular-expressions-cookbook/9780596802837/ch07s16.html
|
|
4562
4562
|
ipv4: /^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,
|
|
4563
4563
|
ipv6: /^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,
|
|
4564
|
-
regex:
|
|
4564
|
+
regex: I,
|
|
4565
4565
|
// uuid: http://tools.ietf.org/html/rfc4122
|
|
4566
4566
|
uuid: /^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,
|
|
4567
4567
|
// JSON-pointer: https://tools.ietf.org/html/rfc6901
|
|
@@ -4578,9 +4578,9 @@ var $r = { exports: {} }, Js = {};
|
|
|
4578
4578
|
// signed 64 bit integer
|
|
4579
4579
|
int64: { type: "number", validate: O },
|
|
4580
4580
|
// C-type float
|
|
4581
|
-
float: { type: "number", validate:
|
|
4581
|
+
float: { type: "number", validate: D },
|
|
4582
4582
|
// C-type double
|
|
4583
|
-
double: { type: "number", validate:
|
|
4583
|
+
double: { type: "number", validate: D },
|
|
4584
4584
|
// hint to the UI to hide input strings
|
|
4585
4585
|
password: !0,
|
|
4586
4586
|
// unchecked string payload
|
|
@@ -4598,72 +4598,72 @@ var $r = { exports: {} }, Js = {};
|
|
|
4598
4598
|
// http://www.w3.org/TR/html5/forms.html#valid-e-mail-address (search for 'wilful violation')
|
|
4599
4599
|
email: /^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i
|
|
4600
4600
|
}, e.formatNames = Object.keys(e.fullFormats);
|
|
4601
|
-
function n(
|
|
4602
|
-
return
|
|
4601
|
+
function n(T) {
|
|
4602
|
+
return T % 4 === 0 && (T % 100 !== 0 || T % 400 === 0);
|
|
4603
4603
|
}
|
|
4604
4604
|
const r = /^(\d\d\d\d)-(\d\d)-(\d\d)$/, s = [0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
4605
|
-
function a(
|
|
4606
|
-
const
|
|
4607
|
-
if (!
|
|
4605
|
+
function a(T) {
|
|
4606
|
+
const F = r.exec(T);
|
|
4607
|
+
if (!F)
|
|
4608
4608
|
return !1;
|
|
4609
|
-
const W = +
|
|
4610
|
-
return
|
|
4609
|
+
const W = +F[1], H = +F[2], oe = +F[3];
|
|
4610
|
+
return H >= 1 && H <= 12 && oe >= 1 && oe <= (H === 2 && n(W) ? 29 : s[H]);
|
|
4611
4611
|
}
|
|
4612
|
-
function o(
|
|
4613
|
-
if (
|
|
4614
|
-
return
|
|
4612
|
+
function o(T, F) {
|
|
4613
|
+
if (T && F)
|
|
4614
|
+
return T > F ? 1 : T < F ? -1 : 0;
|
|
4615
4615
|
}
|
|
4616
4616
|
const i = /^(\d\d):(\d\d):(\d\d)(\.\d+)?(z|[+-]\d\d(?::?\d\d)?)?$/i;
|
|
4617
|
-
function d(
|
|
4618
|
-
const W = i.exec(
|
|
4617
|
+
function d(T, F) {
|
|
4618
|
+
const W = i.exec(T);
|
|
4619
4619
|
if (!W)
|
|
4620
4620
|
return !1;
|
|
4621
|
-
const
|
|
4622
|
-
return (
|
|
4621
|
+
const H = +W[1], oe = +W[2], ne = +W[3], $e = W[5];
|
|
4622
|
+
return (H <= 23 && oe <= 59 && ne <= 59 || H === 23 && oe === 59 && ne === 60) && (!F || $e !== "");
|
|
4623
4623
|
}
|
|
4624
|
-
function c(
|
|
4625
|
-
if (!(
|
|
4624
|
+
function c(T, F) {
|
|
4625
|
+
if (!(T && F))
|
|
4626
4626
|
return;
|
|
4627
|
-
const W = i.exec(
|
|
4628
|
-
if (W &&
|
|
4629
|
-
return
|
|
4627
|
+
const W = i.exec(T), H = i.exec(F);
|
|
4628
|
+
if (W && H)
|
|
4629
|
+
return T = W[1] + W[2] + W[3] + (W[4] || ""), F = H[1] + H[2] + H[3] + (H[4] || ""), T > F ? 1 : T < F ? -1 : 0;
|
|
4630
4630
|
}
|
|
4631
4631
|
const u = /t|\s/i;
|
|
4632
|
-
function m(
|
|
4633
|
-
const
|
|
4634
|
-
return
|
|
4632
|
+
function m(T) {
|
|
4633
|
+
const F = T.split(u);
|
|
4634
|
+
return F.length === 2 && a(F[0]) && d(F[1], !0);
|
|
4635
4635
|
}
|
|
4636
|
-
function $(
|
|
4637
|
-
if (!(
|
|
4636
|
+
function $(T, F) {
|
|
4637
|
+
if (!(T && F))
|
|
4638
4638
|
return;
|
|
4639
|
-
const [W,
|
|
4639
|
+
const [W, H] = T.split(u), [oe, ne] = F.split(u), $e = o(W, oe);
|
|
4640
4640
|
if ($e !== void 0)
|
|
4641
|
-
return $e || c(
|
|
4641
|
+
return $e || c(H, ne);
|
|
4642
4642
|
}
|
|
4643
4643
|
const b = /\/|:/, _ = /^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'()*+,;=:@]|%[0-9a-f]{2})*)*)(?:\?(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i;
|
|
4644
|
-
function g(
|
|
4645
|
-
return b.test(
|
|
4644
|
+
function g(T) {
|
|
4645
|
+
return b.test(T) && _.test(T);
|
|
4646
4646
|
}
|
|
4647
4647
|
const p = /^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/gm;
|
|
4648
|
-
function h(
|
|
4649
|
-
return p.lastIndex = 0, p.test(
|
|
4648
|
+
function h(T) {
|
|
4649
|
+
return p.lastIndex = 0, p.test(T);
|
|
4650
4650
|
}
|
|
4651
4651
|
const y = -2147483648, S = 2 ** 31 - 1;
|
|
4652
|
-
function k(
|
|
4653
|
-
return Number.isInteger(
|
|
4652
|
+
function k(T) {
|
|
4653
|
+
return Number.isInteger(T) && T <= S && T >= y;
|
|
4654
4654
|
}
|
|
4655
|
-
function O(
|
|
4656
|
-
return Number.isInteger(
|
|
4655
|
+
function O(T) {
|
|
4656
|
+
return Number.isInteger(T);
|
|
4657
4657
|
}
|
|
4658
|
-
function
|
|
4658
|
+
function D() {
|
|
4659
4659
|
return !0;
|
|
4660
4660
|
}
|
|
4661
|
-
const
|
|
4662
|
-
function
|
|
4663
|
-
if (
|
|
4661
|
+
const V = /[^\\]\\Z/;
|
|
4662
|
+
function I(T) {
|
|
4663
|
+
if (V.test(T))
|
|
4664
4664
|
return !1;
|
|
4665
4665
|
try {
|
|
4666
|
-
return new RegExp(
|
|
4666
|
+
return new RegExp(T), !0;
|
|
4667
4667
|
} catch {
|
|
4668
4668
|
return !1;
|
|
4669
4669
|
}
|
|
@@ -4746,7 +4746,7 @@ var xs = {};
|
|
|
4746
4746
|
})($r, $r.exports);
|
|
4747
4747
|
var ic = $r.exports;
|
|
4748
4748
|
const lc = /* @__PURE__ */ Jn(ic);
|
|
4749
|
-
class
|
|
4749
|
+
class _t {
|
|
4750
4750
|
constructor() {
|
|
4751
4751
|
this.validators = /* @__PURE__ */ new Map(), this.ajv = new oc({
|
|
4752
4752
|
allErrors: !0,
|
|
@@ -4903,7 +4903,7 @@ function dc(e) {
|
|
|
4903
4903
|
function rt() {
|
|
4904
4904
|
return Qs(Ws, void 0);
|
|
4905
4905
|
}
|
|
4906
|
-
function
|
|
4906
|
+
function Oe(e) {
|
|
4907
4907
|
return `field-${e.replace(/\./g, "-")}`;
|
|
4908
4908
|
}
|
|
4909
4909
|
function Yf(e, t) {
|
|
@@ -4919,7 +4919,7 @@ function Qf(e) {
|
|
|
4919
4919
|
function Xf(...e) {
|
|
4920
4920
|
return e.filter(Boolean).join(".");
|
|
4921
4921
|
}
|
|
4922
|
-
const zn = new
|
|
4922
|
+
const zn = new _t();
|
|
4923
4923
|
function uc(e) {
|
|
4924
4924
|
return /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(e);
|
|
4925
4925
|
}
|
|
@@ -4943,103 +4943,103 @@ function Un(e) {
|
|
|
4943
4943
|
return typeof e == "boolean" || typeof e == "string" ? e : e && typeof e == "object" && e.valid === !1 ? e.message || "Validation failed" : !0;
|
|
4944
4944
|
}
|
|
4945
4945
|
function be(e, t, n = {}) {
|
|
4946
|
-
const r = rt(), s = (r == null ? void 0 : r.validationMode) || "ValidateAndShow", a = r == null ? void 0 : r.errorMessages, o = r == null ? void 0 : r.validators, i = r == null ? void 0 : r.validatorDebounce, d = (
|
|
4946
|
+
const r = rt(), s = (r == null ? void 0 : r.validationMode) || "ValidateAndShow", a = r == null ? void 0 : r.errorMessages, o = r == null ? void 0 : r.validators, i = r == null ? void 0 : r.validatorDebounce, d = (I, T) => {
|
|
4947
4947
|
var W;
|
|
4948
|
-
const
|
|
4949
|
-
return
|
|
4948
|
+
const F = t["x-error-messages"];
|
|
4949
|
+
return F != null && F[I] ? F[I] : (W = a == null ? void 0 : a[e]) != null && W[I] ? a[e][I] : T;
|
|
4950
4950
|
}, c = () => {
|
|
4951
4951
|
if (typeof i == "number")
|
|
4952
4952
|
return i;
|
|
4953
4953
|
if (i && typeof i == "object")
|
|
4954
4954
|
return i[e];
|
|
4955
|
-
}, u = (
|
|
4955
|
+
}, u = (I) => {
|
|
4956
4956
|
var W;
|
|
4957
4957
|
if (s === "NoValidation")
|
|
4958
4958
|
return !0;
|
|
4959
|
-
const
|
|
4960
|
-
if (
|
|
4959
|
+
const T = r == null ? void 0 : r.schema;
|
|
4960
|
+
if (T && zn.isRequired(T, e) && (I == null || I === ""))
|
|
4961
4961
|
return d(
|
|
4962
4962
|
"required",
|
|
4963
4963
|
`${t.title || e} is required`
|
|
4964
4964
|
);
|
|
4965
4965
|
if (t.type === "string") {
|
|
4966
|
-
if (t.minLength !== void 0 && typeof
|
|
4966
|
+
if (t.minLength !== void 0 && typeof I == "string" && I.length < t.minLength)
|
|
4967
4967
|
return d(
|
|
4968
4968
|
"minLength",
|
|
4969
4969
|
`Must be at least ${t.minLength} characters`
|
|
4970
4970
|
);
|
|
4971
|
-
if (
|
|
4971
|
+
if (I == null || I === "")
|
|
4972
4972
|
return !0;
|
|
4973
|
-
if (typeof
|
|
4974
|
-
if (t.maxLength !== void 0 &&
|
|
4973
|
+
if (typeof I == "string") {
|
|
4974
|
+
if (t.maxLength !== void 0 && I.length > t.maxLength)
|
|
4975
4975
|
return d(
|
|
4976
4976
|
"maxLength",
|
|
4977
4977
|
`Must be at most ${t.maxLength} characters`
|
|
4978
4978
|
);
|
|
4979
4979
|
if (t.pattern)
|
|
4980
4980
|
try {
|
|
4981
|
-
if (!new RegExp(t.pattern).test(
|
|
4981
|
+
if (!new RegExp(t.pattern).test(I))
|
|
4982
4982
|
return d("pattern", "Invalid format");
|
|
4983
4983
|
} catch {
|
|
4984
4984
|
console.warn("Invalid regex pattern:", t.pattern);
|
|
4985
4985
|
}
|
|
4986
|
-
if (t.format === "email" && !uc(
|
|
4986
|
+
if (t.format === "email" && !uc(I))
|
|
4987
4987
|
return d("format", "Invalid email address");
|
|
4988
|
-
if ((t.format === "url" || t.format === "uri") && !fc(
|
|
4988
|
+
if ((t.format === "url" || t.format === "uri") && !fc(I))
|
|
4989
4989
|
return d("format", "Invalid URL");
|
|
4990
4990
|
}
|
|
4991
4991
|
}
|
|
4992
|
-
if ((t.type === "number" || t.type === "integer") &&
|
|
4993
|
-
const
|
|
4994
|
-
if (isNaN(
|
|
4992
|
+
if ((t.type === "number" || t.type === "integer") && I !== "") {
|
|
4993
|
+
const H = Number(I);
|
|
4994
|
+
if (isNaN(H))
|
|
4995
4995
|
return d("type", "Must be a valid number");
|
|
4996
|
-
if (t.type === "integer" && !Number.isInteger(
|
|
4996
|
+
if (t.type === "integer" && !Number.isInteger(H))
|
|
4997
4997
|
return d("type", "Must be a whole number");
|
|
4998
|
-
if (t.minimum !== void 0 &&
|
|
4998
|
+
if (t.minimum !== void 0 && H < t.minimum)
|
|
4999
4999
|
return d("minimum", `Must be at least ${t.minimum}`);
|
|
5000
|
-
if (t.maximum !== void 0 &&
|
|
5000
|
+
if (t.maximum !== void 0 && H > t.maximum)
|
|
5001
5001
|
return d("maximum", `Must be at most ${t.maximum}`);
|
|
5002
|
-
if (t.exclusiveMinimum !== void 0 &&
|
|
5002
|
+
if (t.exclusiveMinimum !== void 0 && H <= t.exclusiveMinimum)
|
|
5003
5003
|
return d(
|
|
5004
5004
|
"exclusiveMinimum",
|
|
5005
5005
|
`Must be greater than ${t.exclusiveMinimum}`
|
|
5006
5006
|
);
|
|
5007
|
-
if (t.exclusiveMaximum !== void 0 &&
|
|
5007
|
+
if (t.exclusiveMaximum !== void 0 && H >= t.exclusiveMaximum)
|
|
5008
5008
|
return d(
|
|
5009
5009
|
"exclusiveMaximum",
|
|
5010
5010
|
`Must be less than ${t.exclusiveMaximum}`
|
|
5011
5011
|
);
|
|
5012
|
-
if (t.multipleOf !== void 0 &&
|
|
5012
|
+
if (t.multipleOf !== void 0 && H % t.multipleOf !== 0)
|
|
5013
5013
|
return d(
|
|
5014
5014
|
"multipleOf",
|
|
5015
5015
|
`Must be a multiple of ${t.multipleOf}`
|
|
5016
5016
|
);
|
|
5017
5017
|
}
|
|
5018
|
-
if (t.type === "array" && Array.isArray(
|
|
5019
|
-
if (t.minItems !== void 0 &&
|
|
5018
|
+
if (t.type === "array" && Array.isArray(I)) {
|
|
5019
|
+
if (t.minItems !== void 0 && I.length < t.minItems)
|
|
5020
5020
|
return d(
|
|
5021
5021
|
"minItems",
|
|
5022
5022
|
`Must have at least ${t.minItems} items`
|
|
5023
5023
|
);
|
|
5024
|
-
if (t.maxItems !== void 0 &&
|
|
5024
|
+
if (t.maxItems !== void 0 && I.length > t.maxItems)
|
|
5025
5025
|
return d(
|
|
5026
5026
|
"maxItems",
|
|
5027
5027
|
`Must have at most ${t.maxItems} items`
|
|
5028
5028
|
);
|
|
5029
|
-
if (t.uniqueItems && new Set(
|
|
5029
|
+
if (t.uniqueItems && new Set(I).size !== I.length)
|
|
5030
5030
|
return d("uniqueItems", "All items must be unique");
|
|
5031
5031
|
}
|
|
5032
|
-
if (t.enum && !t.enum.includes(
|
|
5032
|
+
if (t.enum && !t.enum.includes(I))
|
|
5033
5033
|
return d("enum", "Invalid value");
|
|
5034
|
-
if (t.const !== void 0 &&
|
|
5034
|
+
if (t.const !== void 0 && I !== t.const)
|
|
5035
5035
|
return d("const", `Must be ${t.const}`);
|
|
5036
|
-
const
|
|
5037
|
-
if (
|
|
5036
|
+
const F = o == null ? void 0 : o[e];
|
|
5037
|
+
if (F)
|
|
5038
5038
|
try {
|
|
5039
|
-
const
|
|
5039
|
+
const H = ((W = r == null ? void 0 : r.formValues) == null ? void 0 : W.call(r)) || {}, oe = (r == null ? void 0 : r.context) || {}, ne = F(I, H, oe);
|
|
5040
5040
|
return ne instanceof Promise ? ne.then(Un) : Un(ne);
|
|
5041
|
-
} catch (
|
|
5042
|
-
return console.error("Custom validator error for", e, ":",
|
|
5041
|
+
} catch (H) {
|
|
5042
|
+
return console.error("Custom validator error for", e, ":", H), "Validation error";
|
|
5043
5043
|
}
|
|
5044
5044
|
return !0;
|
|
5045
5045
|
}, m = c(), $ = m && (o != null && o[e]) ? mc(u, m) : u, { value: b, errorMessage: _, errors: g, setValue: p, setTouched: h, meta: y } = aa(
|
|
@@ -5051,25 +5051,25 @@ function be(e, t, n = {}) {
|
|
|
5051
5051
|
validateOnMount: !1
|
|
5052
5052
|
// Note: VeeValidate will still validate, we just control when errors are displayed
|
|
5053
5053
|
}
|
|
5054
|
-
), S =
|
|
5055
|
-
const
|
|
5056
|
-
if (
|
|
5057
|
-
return r != null && r.hintRenderer ? r.hintRenderer(
|
|
5054
|
+
), S = G(() => n.label !== void 0 ? n.label : t.title || e), k = G(() => {
|
|
5055
|
+
const I = cc(t);
|
|
5056
|
+
if (I)
|
|
5057
|
+
return r != null && r.hintRenderer ? r.hintRenderer(I, {
|
|
5058
5058
|
schema: t,
|
|
5059
5059
|
path: e,
|
|
5060
5060
|
value: b.value
|
|
5061
|
-
}) :
|
|
5062
|
-
}), O =
|
|
5063
|
-
var
|
|
5064
|
-
const
|
|
5065
|
-
return
|
|
5066
|
-
}),
|
|
5067
|
-
const
|
|
5068
|
-
return
|
|
5069
|
-
}),
|
|
5061
|
+
}) : I;
|
|
5062
|
+
}), O = G(() => {
|
|
5063
|
+
var T, F;
|
|
5064
|
+
const I = t["x-hint-mode"];
|
|
5065
|
+
return I || ((F = (T = r == null ? void 0 : r.componentDefaults) == null ? void 0 : T.hints) == null ? void 0 : F.showMode) || "always";
|
|
5066
|
+
}), D = G(() => {
|
|
5067
|
+
const I = r == null ? void 0 : r.schema;
|
|
5068
|
+
return I ? zn.isRequired(I, e) : !1;
|
|
5069
|
+
}), V = G(() => s === "ValidateAndHide" || s === "NoValidation" ? null : _.value);
|
|
5070
5070
|
return {
|
|
5071
5071
|
value: b,
|
|
5072
|
-
errorMessage:
|
|
5072
|
+
errorMessage: V,
|
|
5073
5073
|
errors: g,
|
|
5074
5074
|
setValue: p,
|
|
5075
5075
|
setTouched: h,
|
|
@@ -5077,7 +5077,7 @@ function be(e, t, n = {}) {
|
|
|
5077
5077
|
label: S,
|
|
5078
5078
|
hint: k,
|
|
5079
5079
|
hintMode: O,
|
|
5080
|
-
required:
|
|
5080
|
+
required: D
|
|
5081
5081
|
};
|
|
5082
5082
|
}
|
|
5083
5083
|
const hc = /* @__PURE__ */ fe({
|
|
@@ -5097,9 +5097,9 @@ const hc = /* @__PURE__ */ fe({
|
|
|
5097
5097
|
n.path,
|
|
5098
5098
|
n.schema,
|
|
5099
5099
|
{ label: n.label }
|
|
5100
|
-
), u =
|
|
5100
|
+
), u = Oe(n.path), m = de(!1), $ = de(!1), b = de(!1), _ = G(() => n.schema.format === "password"), g = G(() => n.schema.format === "email" ? "email" : n.schema.format === "url" || n.schema.format === "uri" ? "url" : n.schema.format === "password" ? m.value ? "text" : "password" : "text"), p = G(() => n.schema.format === "textarea" || n.schema.maxLength && n.schema.maxLength > 200), h = () => {
|
|
5101
5101
|
m.value = !m.value;
|
|
5102
|
-
}, y =
|
|
5102
|
+
}, y = G(() => !d.value || o.value ? !1 : c.value === "always" ? !0 : c.value === "focus" ? $.value : c.value === "hover" ? b.value : !0), S = { props: n, formContext: r, validationMode: s, value: a, errorMessage: o, label: i, hint: d, hintMode: c, fieldId: u, showPassword: m, isFocused: $, isHovered: b, isPassword: _, inputType: g, isTextarea: p, togglePasswordVisibility: h, showHint: y };
|
|
5103
5103
|
return Object.defineProperty(S, "__isScriptSetup", { enumerable: !1, value: !0 }), S;
|
|
5104
5104
|
}
|
|
5105
5105
|
}), me = (e, t) => {
|
|
@@ -5141,8 +5141,8 @@ const hc = /* @__PURE__ */ fe({
|
|
|
5141
5141
|
};
|
|
5142
5142
|
function Oc(e, t, n, r, s, a) {
|
|
5143
5143
|
var o, i;
|
|
5144
|
-
return
|
|
5145
|
-
|
|
5144
|
+
return N(), M("div", pc, [
|
|
5145
|
+
U("label", {
|
|
5146
5146
|
for: r.fieldId,
|
|
5147
5147
|
class: "quickform-label"
|
|
5148
5148
|
}, [
|
|
@@ -5151,9 +5151,9 @@ function Oc(e, t, n, r, s, a) {
|
|
|
5151
5151
|
1
|
|
5152
5152
|
/* TEXT */
|
|
5153
5153
|
),
|
|
5154
|
-
r.props.schema.required ? (
|
|
5154
|
+
r.props.schema.required ? (N(), M("span", vc, "*")) : L("v-if", !0)
|
|
5155
5155
|
], 8, yc),
|
|
5156
|
-
r.isTextarea ? Ce((
|
|
5156
|
+
r.isTextarea ? Ce((N(), M("textarea", {
|
|
5157
5157
|
key: 0,
|
|
5158
5158
|
id: r.fieldId,
|
|
5159
5159
|
"onUpdate:modelValue": t[0] || (t[0] = (d) => r.value = d),
|
|
@@ -5171,8 +5171,8 @@ function Oc(e, t, n, r, s, a) {
|
|
|
5171
5171
|
onMouseleave: t[4] || (t[4] = (d) => r.isHovered = !1)
|
|
5172
5172
|
}, null, 40, _c)), [
|
|
5173
5173
|
[wr, r.value]
|
|
5174
|
-
]) : (
|
|
5175
|
-
Ce(
|
|
5174
|
+
]) : (N(), M("div", gc, [
|
|
5175
|
+
Ce(U("input", {
|
|
5176
5176
|
id: r.fieldId,
|
|
5177
5177
|
"onUpdate:modelValue": t[5] || (t[5] = (d) => r.value = d),
|
|
5178
5178
|
type: r.inputType,
|
|
@@ -5192,22 +5192,22 @@ function Oc(e, t, n, r, s, a) {
|
|
|
5192
5192
|
}, null, 42, bc), [
|
|
5193
5193
|
[Sr, r.value]
|
|
5194
5194
|
]),
|
|
5195
|
-
r.isPassword ? (
|
|
5195
|
+
r.isPassword ? (N(), M("button", {
|
|
5196
5196
|
key: 0,
|
|
5197
5197
|
type: "button",
|
|
5198
5198
|
class: "quickform-password-toggle",
|
|
5199
5199
|
"aria-label": r.showPassword ? (o = r.formContext) == null ? void 0 : o.labels.hidePassword : (i = r.formContext) == null ? void 0 : i.labels.showPassword,
|
|
5200
5200
|
onClick: r.togglePasswordVisibility
|
|
5201
5201
|
}, [
|
|
5202
|
-
r.showPassword ? (
|
|
5203
|
-
|
|
5202
|
+
r.showPassword ? (N(), M("svg", wc, [...t[10] || (t[10] = [
|
|
5203
|
+
U(
|
|
5204
5204
|
"path",
|
|
5205
5205
|
{ d: "M17.94 17.94A10.07 10.07 0 0 1 12 20c-7 0-11-8-11-8a18.45 18.45 0 0 1 5.06-5.94M9.9 4.24A9.12 9.12 0 0 1 12 4c7 0 11 8 11 8a18.5 18.5 0 0 1-2.16 3.19m-6.72-1.07a3 3 0 1 1-4.24-4.24" },
|
|
5206
5206
|
null,
|
|
5207
5207
|
-1
|
|
5208
5208
|
/* CACHED */
|
|
5209
5209
|
),
|
|
5210
|
-
|
|
5210
|
+
U(
|
|
5211
5211
|
"line",
|
|
5212
5212
|
{
|
|
5213
5213
|
x1: "1",
|
|
@@ -5219,15 +5219,15 @@ function Oc(e, t, n, r, s, a) {
|
|
|
5219
5219
|
-1
|
|
5220
5220
|
/* CACHED */
|
|
5221
5221
|
)
|
|
5222
|
-
])])) : (
|
|
5223
|
-
|
|
5222
|
+
])])) : (N(), M("svg", Sc, [...t[11] || (t[11] = [
|
|
5223
|
+
U(
|
|
5224
5224
|
"path",
|
|
5225
5225
|
{ d: "M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z" },
|
|
5226
5226
|
null,
|
|
5227
5227
|
-1
|
|
5228
5228
|
/* CACHED */
|
|
5229
5229
|
),
|
|
5230
|
-
|
|
5230
|
+
U(
|
|
5231
5231
|
"circle",
|
|
5232
5232
|
{
|
|
5233
5233
|
cx: "12",
|
|
@@ -5241,14 +5241,14 @@ function Oc(e, t, n, r, s, a) {
|
|
|
5241
5241
|
])]))
|
|
5242
5242
|
], 8, $c)) : L("v-if", !0)
|
|
5243
5243
|
])),
|
|
5244
|
-
r.showHint ? (
|
|
5244
|
+
r.showHint ? (N(), M("div", {
|
|
5245
5245
|
key: 2,
|
|
5246
5246
|
id: `${r.fieldId}-hint`,
|
|
5247
5247
|
class: "quickform-hint"
|
|
5248
5248
|
}, [
|
|
5249
|
-
|
|
5249
|
+
U("span", { innerHTML: r.hint }, null, 8, Ec)
|
|
5250
5250
|
], 8, kc)) : L("v-if", !0),
|
|
5251
|
-
r.errorMessage ? (
|
|
5251
|
+
r.errorMessage ? (N(), M(
|
|
5252
5252
|
"div",
|
|
5253
5253
|
Pc,
|
|
5254
5254
|
X(r.errorMessage),
|
|
@@ -5270,7 +5270,7 @@ const jc = /* @__PURE__ */ me(hc, [["render", Oc], ["__scopeId", "data-v-ad9ab1f
|
|
|
5270
5270
|
},
|
|
5271
5271
|
setup(e, { expose: t }) {
|
|
5272
5272
|
t();
|
|
5273
|
-
const n = e, r = rt(), s = (r == null ? void 0 : r.validationMode) || "ValidateAndShow", { value: a, errorMessage: o, label: i, hint: d, hintMode: c } = be(n.path, n.schema, { label: n.label }), u =
|
|
5273
|
+
const n = e, r = rt(), s = (r == null ? void 0 : r.validationMode) || "ValidateAndShow", { value: a, errorMessage: o, label: i, hint: d, hintMode: c } = be(n.path, n.schema, { label: n.label }), u = Oe(n.path), m = de(!1), $ = de(!1), b = G(() => (n.schema.type === "integer", "number")), _ = G(() => n.schema.multipleOf ? n.schema.multipleOf : n.schema.type === "integer" ? 1 : "any"), g = G(() => !d.value || o.value ? !1 : c.value === "always" ? !0 : c.value === "focus" ? m.value : c.value === "hover" ? $.value : !0), p = { props: n, formContext: r, validationMode: s, value: a, errorMessage: o, label: i, hint: d, hintMode: c, fieldId: u, isFocused: m, isHovered: $, inputType: b, step: _, showHint: g };
|
|
5274
5274
|
return Object.defineProperty(p, "__isScriptSetup", { enumerable: !1, value: !0 }), p;
|
|
5275
5275
|
}
|
|
5276
5276
|
}), Ic = { class: "quickform-field quickform-number-field" }, qc = ["for"], Mc = {
|
|
@@ -5281,8 +5281,8 @@ const jc = /* @__PURE__ */ me(hc, [["render", Oc], ["__scopeId", "data-v-ad9ab1f
|
|
|
5281
5281
|
class: "quickform-error"
|
|
5282
5282
|
};
|
|
5283
5283
|
function Dc(e, t, n, r, s, a) {
|
|
5284
|
-
return
|
|
5285
|
-
|
|
5284
|
+
return N(), M("div", Ic, [
|
|
5285
|
+
U("label", {
|
|
5286
5286
|
for: r.fieldId,
|
|
5287
5287
|
class: "quickform-label"
|
|
5288
5288
|
}, [
|
|
@@ -5291,9 +5291,9 @@ function Dc(e, t, n, r, s, a) {
|
|
|
5291
5291
|
1
|
|
5292
5292
|
/* TEXT */
|
|
5293
5293
|
),
|
|
5294
|
-
r.props.schema.required ? (
|
|
5294
|
+
r.props.schema.required ? (N(), M("span", Mc, "*")) : L("v-if", !0)
|
|
5295
5295
|
], 8, qc),
|
|
5296
|
-
Ce(
|
|
5296
|
+
Ce(U("input", {
|
|
5297
5297
|
id: r.fieldId,
|
|
5298
5298
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => r.value = o),
|
|
5299
5299
|
type: r.inputType,
|
|
@@ -5318,14 +5318,14 @@ function Dc(e, t, n, r, s, a) {
|
|
|
5318
5318
|
{ number: !0 }
|
|
5319
5319
|
]
|
|
5320
5320
|
]),
|
|
5321
|
-
r.showHint ? (
|
|
5321
|
+
r.showHint ? (N(), M("div", {
|
|
5322
5322
|
key: 0,
|
|
5323
5323
|
id: `${r.fieldId}-hint`,
|
|
5324
5324
|
class: "quickform-hint"
|
|
5325
5325
|
}, [
|
|
5326
|
-
|
|
5326
|
+
U("span", { innerHTML: r.hint }, null, 8, Ac)
|
|
5327
5327
|
], 8, Rc)) : L("v-if", !0),
|
|
5328
|
-
r.errorMessage ? (
|
|
5328
|
+
r.errorMessage ? (N(), M(
|
|
5329
5329
|
"div",
|
|
5330
5330
|
Cc,
|
|
5331
5331
|
X(r.errorMessage),
|
|
@@ -5347,7 +5347,7 @@ const Vc = /* @__PURE__ */ me(Nc, [["render", Dc], ["__scopeId", "data-v-7def4a8
|
|
|
5347
5347
|
},
|
|
5348
5348
|
setup(e, { expose: t }) {
|
|
5349
5349
|
t();
|
|
5350
|
-
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = be(n.path, n.schema, { label: n.label }), d =
|
|
5350
|
+
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = be(n.path, n.schema, { label: n.label }), d = Oe(n.path), c = de(!1), u = de(!1), m = G(() => !o.value || s.value ? !1 : i.value === "always" ? !0 : i.value === "focus" ? c.value : i.value === "hover" ? u.value : !0), $ = { props: n, value: r, errorMessage: s, label: a, hint: o, hintMode: i, fieldId: d, isFocused: c, isHovered: u, showHint: m };
|
|
5351
5351
|
return Object.defineProperty($, "__isScriptSetup", { enumerable: !1, value: !0 }), $;
|
|
5352
5352
|
}
|
|
5353
5353
|
}), zc = { class: "quickform-field quickform-boolean-field" }, Uc = ["for"], Lc = ["id", "disabled", "readonly", "aria-describedby", "aria-invalid"], Hc = { class: "quickform-checkbox-text" }, Kc = {
|
|
@@ -5358,14 +5358,14 @@ const Vc = /* @__PURE__ */ me(Nc, [["render", Dc], ["__scopeId", "data-v-7def4a8
|
|
|
5358
5358
|
class: "quickform-error"
|
|
5359
5359
|
};
|
|
5360
5360
|
function xc(e, t, n, r, s, a) {
|
|
5361
|
-
return
|
|
5362
|
-
|
|
5361
|
+
return N(), M("div", zc, [
|
|
5362
|
+
U("label", {
|
|
5363
5363
|
for: r.fieldId,
|
|
5364
5364
|
class: "quickform-checkbox-label",
|
|
5365
5365
|
onMouseenter: t[3] || (t[3] = (o) => r.isHovered = !0),
|
|
5366
5366
|
onMouseleave: t[4] || (t[4] = (o) => r.isHovered = !1)
|
|
5367
5367
|
}, [
|
|
5368
|
-
Ce(
|
|
5368
|
+
Ce(U("input", {
|
|
5369
5369
|
id: r.fieldId,
|
|
5370
5370
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => r.value = o),
|
|
5371
5371
|
type: "checkbox",
|
|
@@ -5379,23 +5379,23 @@ function xc(e, t, n, r, s, a) {
|
|
|
5379
5379
|
}, null, 40, Lc), [
|
|
5380
5380
|
[Xs, r.value]
|
|
5381
5381
|
]),
|
|
5382
|
-
|
|
5382
|
+
U("span", Hc, [
|
|
5383
5383
|
qe(
|
|
5384
5384
|
X(r.label) + " ",
|
|
5385
5385
|
1
|
|
5386
5386
|
/* TEXT */
|
|
5387
5387
|
),
|
|
5388
|
-
r.props.schema.required ? (
|
|
5388
|
+
r.props.schema.required ? (N(), M("span", Kc, "*")) : L("v-if", !0)
|
|
5389
5389
|
])
|
|
5390
5390
|
], 40, Uc),
|
|
5391
|
-
r.showHint ? (
|
|
5391
|
+
r.showHint ? (N(), M("div", {
|
|
5392
5392
|
key: 0,
|
|
5393
5393
|
id: `${r.fieldId}-hint`,
|
|
5394
5394
|
class: "quickform-hint"
|
|
5395
5395
|
}, [
|
|
5396
|
-
|
|
5396
|
+
U("span", { innerHTML: r.hint }, null, 8, Gc)
|
|
5397
5397
|
], 8, Bc)) : L("v-if", !0),
|
|
5398
|
-
r.errorMessage ? (
|
|
5398
|
+
r.errorMessage ? (N(), M(
|
|
5399
5399
|
"div",
|
|
5400
5400
|
Jc,
|
|
5401
5401
|
X(r.errorMessage),
|
|
@@ -5421,7 +5421,7 @@ const Wc = /* @__PURE__ */ me(Fc, [["render", xc], ["__scopeId", "data-v-1ff012c
|
|
|
5421
5421
|
n.path,
|
|
5422
5422
|
n.schema,
|
|
5423
5423
|
{ label: n.label }
|
|
5424
|
-
), d = rt(), c =
|
|
5424
|
+
), d = rt(), c = Oe(n.path), u = `${c}-datalist`, m = de(!1), $ = de(!1), b = G(() => {
|
|
5425
5425
|
if (!n.schema.enum) return [];
|
|
5426
5426
|
const y = n.schema["x-enum-labels"];
|
|
5427
5427
|
return n.schema.enum.map((S) => {
|
|
@@ -5431,17 +5431,17 @@ const Wc = /* @__PURE__ */ me(Fc, [["render", xc], ["__scopeId", "data-v-1ff012c
|
|
|
5431
5431
|
label: k
|
|
5432
5432
|
};
|
|
5433
5433
|
});
|
|
5434
|
-
}), _ =
|
|
5435
|
-
var O,
|
|
5434
|
+
}), _ = G(() => {
|
|
5435
|
+
var O, D, V, I;
|
|
5436
5436
|
const y = n.schema["x-component-props"];
|
|
5437
5437
|
if ((y == null ? void 0 : y.autocomplete) !== void 0)
|
|
5438
5438
|
return y.autocomplete;
|
|
5439
|
-
const S = ((
|
|
5439
|
+
const S = ((D = (O = d == null ? void 0 : d.componentDefaults) == null ? void 0 : O.select) == null ? void 0 : D.autocomplete) || !1, k = ((I = (V = d == null ? void 0 : d.componentDefaults) == null ? void 0 : V.select) == null ? void 0 : I.autocompleteThreshold) || 5;
|
|
5440
5440
|
return S || b.value.length >= k;
|
|
5441
|
-
}), g =
|
|
5441
|
+
}), g = G(() => {
|
|
5442
5442
|
var y;
|
|
5443
5443
|
return ((y = d == null ? void 0 : d.labels) == null ? void 0 : y.selectPlaceholder) || "Select an option...";
|
|
5444
|
-
}), p =
|
|
5444
|
+
}), p = G(() => !o.value || s.value ? !1 : i.value === "always" ? !0 : i.value === "focus" ? m.value : i.value === "hover" ? $.value : !0), h = { props: n, value: r, errorMessage: s, label: a, hint: o, hintMode: i, formContext: d, fieldId: c, datalistId: u, isFocused: m, isHovered: $, options: b, useAutocomplete: _, placeholder: g, showHint: p };
|
|
5445
5445
|
return Object.defineProperty(h, "__isScriptSetup", { enumerable: !1, value: !0 }), h;
|
|
5446
5446
|
}
|
|
5447
5447
|
}), Yc = { class: "quickform-field quickform-enum-field" }, Qc = ["for"], Xc = {
|
|
@@ -5452,8 +5452,8 @@ const Wc = /* @__PURE__ */ me(Fc, [["render", xc], ["__scopeId", "data-v-1ff012c
|
|
|
5452
5452
|
class: "quickform-error"
|
|
5453
5453
|
};
|
|
5454
5454
|
function lu(e, t, n, r, s, a) {
|
|
5455
|
-
return
|
|
5456
|
-
|
|
5455
|
+
return N(), M("div", Yc, [
|
|
5456
|
+
U("label", {
|
|
5457
5457
|
for: r.fieldId,
|
|
5458
5458
|
class: "quickform-label"
|
|
5459
5459
|
}, [
|
|
@@ -5462,10 +5462,10 @@ function lu(e, t, n, r, s, a) {
|
|
|
5462
5462
|
1
|
|
5463
5463
|
/* TEXT */
|
|
5464
5464
|
),
|
|
5465
|
-
r.props.schema.required ? (
|
|
5465
|
+
r.props.schema.required ? (N(), M("span", Xc, "*")) : L("v-if", !0)
|
|
5466
5466
|
], 8, Qc),
|
|
5467
5467
|
L(" Use datalist for autocomplete when enabled "),
|
|
5468
|
-
r.useAutocomplete ? Ce((
|
|
5468
|
+
r.useAutocomplete ? Ce((N(), M("input", {
|
|
5469
5469
|
key: 0,
|
|
5470
5470
|
id: r.fieldId,
|
|
5471
5471
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => r.value = o),
|
|
@@ -5482,11 +5482,11 @@ function lu(e, t, n, r, s, a) {
|
|
|
5482
5482
|
}, null, 40, eu)), [
|
|
5483
5483
|
[wr, r.value]
|
|
5484
5484
|
]) : L("v-if", !0),
|
|
5485
|
-
|
|
5486
|
-
(
|
|
5487
|
-
|
|
5485
|
+
U("datalist", { id: r.datalistId }, [
|
|
5486
|
+
(N(!0), M(
|
|
5487
|
+
Ee,
|
|
5488
5488
|
null,
|
|
5489
|
-
We(r.options, (o) => (
|
|
5489
|
+
We(r.options, (o) => (N(), M("option", {
|
|
5490
5490
|
key: String(o.value),
|
|
5491
5491
|
value: o.value
|
|
5492
5492
|
}, X(o.label), 9, tu))),
|
|
@@ -5495,7 +5495,7 @@ function lu(e, t, n, r, s, a) {
|
|
|
5495
5495
|
))
|
|
5496
5496
|
]),
|
|
5497
5497
|
L(" Use regular select when autocomplete disabled "),
|
|
5498
|
-
r.useAutocomplete ? L("v-if", !0) : Ce((
|
|
5498
|
+
r.useAutocomplete ? L("v-if", !0) : Ce((N(), M("select", {
|
|
5499
5499
|
key: 1,
|
|
5500
5500
|
id: r.fieldId,
|
|
5501
5501
|
"onUpdate:modelValue": t[5] || (t[5] = (o) => r.value = o),
|
|
@@ -5508,17 +5508,17 @@ function lu(e, t, n, r, s, a) {
|
|
|
5508
5508
|
onMouseenter: t[8] || (t[8] = (o) => r.isHovered = !0),
|
|
5509
5509
|
onMouseleave: t[9] || (t[9] = (o) => r.isHovered = !1)
|
|
5510
5510
|
}, [
|
|
5511
|
-
|
|
5511
|
+
U(
|
|
5512
5512
|
"option",
|
|
5513
5513
|
nu,
|
|
5514
5514
|
X(r.placeholder),
|
|
5515
5515
|
1
|
|
5516
5516
|
/* TEXT */
|
|
5517
5517
|
),
|
|
5518
|
-
(
|
|
5519
|
-
|
|
5518
|
+
(N(!0), M(
|
|
5519
|
+
Ee,
|
|
5520
5520
|
null,
|
|
5521
|
-
We(r.options, (o) => (
|
|
5521
|
+
We(r.options, (o) => (N(), M("option", {
|
|
5522
5522
|
key: String(o.value),
|
|
5523
5523
|
value: o.value
|
|
5524
5524
|
}, X(o.label), 9, su))),
|
|
@@ -5528,14 +5528,14 @@ function lu(e, t, n, r, s, a) {
|
|
|
5528
5528
|
], 40, ru)), [
|
|
5529
5529
|
[ea, r.value]
|
|
5530
5530
|
]),
|
|
5531
|
-
r.showHint ? (
|
|
5531
|
+
r.showHint ? (N(), M("div", {
|
|
5532
5532
|
key: 2,
|
|
5533
5533
|
id: `${r.fieldId}-hint`,
|
|
5534
5534
|
class: "quickform-hint"
|
|
5535
5535
|
}, [
|
|
5536
|
-
|
|
5536
|
+
U("span", { innerHTML: r.hint }, null, 8, ou)
|
|
5537
5537
|
], 8, au)) : L("v-if", !0),
|
|
5538
|
-
r.errorMessage ? (
|
|
5538
|
+
r.errorMessage ? (N(), M(
|
|
5539
5539
|
"div",
|
|
5540
5540
|
iu,
|
|
5541
5541
|
X(r.errorMessage),
|
|
@@ -5557,7 +5557,7 @@ const du = /* @__PURE__ */ me(Zc, [["render", lu], ["__scopeId", "data-v-666cc49
|
|
|
5557
5557
|
},
|
|
5558
5558
|
setup(e, { expose: t }) {
|
|
5559
5559
|
t();
|
|
5560
|
-
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = be(n.path, n.schema, { label: n.label }), d =
|
|
5560
|
+
const n = e, { value: r, errorMessage: s, label: a, hint: o, hintMode: i } = be(n.path, n.schema, { label: n.label }), d = Oe(n.path), c = de(!1), u = de(!1), m = G(() => n.schema.format === "time" ? "time" : n.schema.format === "date-time" ? "datetime-local" : "date"), $ = G(() => !o.value || s.value ? !1 : i.value === "always" ? !0 : i.value === "focus" ? c.value : i.value === "hover" ? u.value : !0), b = { props: n, value: r, errorMessage: s, label: a, hint: o, hintMode: i, fieldId: d, isFocused: c, isHovered: u, inputType: m, showHint: $ };
|
|
5561
5561
|
return Object.defineProperty(b, "__isScriptSetup", { enumerable: !1, value: !0 }), b;
|
|
5562
5562
|
}
|
|
5563
5563
|
}), uu = { class: "quickform-field quickform-date-field" }, fu = ["for"], mu = {
|
|
@@ -5568,8 +5568,8 @@ const du = /* @__PURE__ */ me(Zc, [["render", lu], ["__scopeId", "data-v-666cc49
|
|
|
5568
5568
|
class: "quickform-error"
|
|
5569
5569
|
};
|
|
5570
5570
|
function _u(e, t, n, r, s, a) {
|
|
5571
|
-
return
|
|
5572
|
-
|
|
5571
|
+
return N(), M("div", uu, [
|
|
5572
|
+
U("label", {
|
|
5573
5573
|
for: r.fieldId,
|
|
5574
5574
|
class: "quickform-label"
|
|
5575
5575
|
}, [
|
|
@@ -5578,9 +5578,9 @@ function _u(e, t, n, r, s, a) {
|
|
|
5578
5578
|
1
|
|
5579
5579
|
/* TEXT */
|
|
5580
5580
|
),
|
|
5581
|
-
r.props.schema.required ? (
|
|
5581
|
+
r.props.schema.required ? (N(), M("span", mu, "*")) : L("v-if", !0)
|
|
5582
5582
|
], 8, fu),
|
|
5583
|
-
Ce(
|
|
5583
|
+
Ce(U("input", {
|
|
5584
5584
|
id: r.fieldId,
|
|
5585
5585
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => r.value = o),
|
|
5586
5586
|
type: r.inputType,
|
|
@@ -5596,14 +5596,14 @@ function _u(e, t, n, r, s, a) {
|
|
|
5596
5596
|
}, null, 40, hu), [
|
|
5597
5597
|
[Sr, r.value]
|
|
5598
5598
|
]),
|
|
5599
|
-
r.showHint ? (
|
|
5599
|
+
r.showHint ? (N(), M("div", {
|
|
5600
5600
|
key: 0,
|
|
5601
5601
|
id: `${r.fieldId}-hint`,
|
|
5602
5602
|
class: "quickform-hint"
|
|
5603
5603
|
}, [
|
|
5604
|
-
|
|
5604
|
+
U("span", { innerHTML: r.hint }, null, 8, yu)
|
|
5605
5605
|
], 8, pu)) : L("v-if", !0),
|
|
5606
|
-
r.errorMessage ? (
|
|
5606
|
+
r.errorMessage ? (N(), M(
|
|
5607
5607
|
"div",
|
|
5608
5608
|
vu,
|
|
5609
5609
|
X(r.errorMessage),
|
|
@@ -5627,7 +5627,7 @@ const gu = /* @__PURE__ */ me(cu, [["render", _u], ["__scopeId", "data-v-e0ddab6
|
|
|
5627
5627
|
const n = e, r = rt();
|
|
5628
5628
|
if (!r)
|
|
5629
5629
|
throw new Error("FieldRenderer must be used within a DynamicForm");
|
|
5630
|
-
const s =
|
|
5630
|
+
const s = G(() => {
|
|
5631
5631
|
const d = n.schema;
|
|
5632
5632
|
if (d["x-hidden"] === !0) return !1;
|
|
5633
5633
|
if (d["x-roles"]) {
|
|
@@ -5637,7 +5637,7 @@ const gu = /* @__PURE__ */ me(cu, [["render", _u], ["__scopeId", "data-v-e0ddab6
|
|
|
5637
5637
|
)) return !1;
|
|
5638
5638
|
}
|
|
5639
5639
|
return !0;
|
|
5640
|
-
}), a =
|
|
5640
|
+
}), a = G(() => {
|
|
5641
5641
|
if (n.readonly || r.readonly) return !0;
|
|
5642
5642
|
const d = n.schema;
|
|
5643
5643
|
if (d["x-readonly"] === !0) return !0;
|
|
@@ -5648,7 +5648,7 @@ const gu = /* @__PURE__ */ me(cu, [["render", _u], ["__scopeId", "data-v-e0ddab6
|
|
|
5648
5648
|
)) return !0;
|
|
5649
5649
|
}
|
|
5650
5650
|
return !1;
|
|
5651
|
-
}), o =
|
|
5651
|
+
}), o = G(() => {
|
|
5652
5652
|
if (!s.value) return null;
|
|
5653
5653
|
const d = r.registry.getComponent(n.schema, n.uischema);
|
|
5654
5654
|
return d || (console.warn("No renderer found for schema:", n.schema), null);
|
|
@@ -5660,16 +5660,16 @@ const gu = /* @__PURE__ */ me(cu, [["render", _u], ["__scopeId", "data-v-e0ddab6
|
|
|
5660
5660
|
class: "quickform-no-renderer"
|
|
5661
5661
|
};
|
|
5662
5662
|
function wu(e, t, n, r, s, a) {
|
|
5663
|
-
return
|
|
5664
|
-
|
|
5663
|
+
return N(), M(
|
|
5664
|
+
Ee,
|
|
5665
5665
|
null,
|
|
5666
5666
|
[
|
|
5667
5667
|
L(" Only render if visible "),
|
|
5668
|
-
r.isVisible ? (
|
|
5669
|
-
|
|
5668
|
+
r.isVisible ? (N(), M(
|
|
5669
|
+
Ee,
|
|
5670
5670
|
{ key: 0 },
|
|
5671
5671
|
[
|
|
5672
|
-
r.component ? (
|
|
5672
|
+
r.component ? (N(), mt(ta(r.component), {
|
|
5673
5673
|
key: 0,
|
|
5674
5674
|
schema: n.schema,
|
|
5675
5675
|
uischema: n.uischema,
|
|
@@ -5677,15 +5677,15 @@ function wu(e, t, n, r, s, a) {
|
|
|
5677
5677
|
label: n.label,
|
|
5678
5678
|
disabled: n.disabled || r.context.disabled,
|
|
5679
5679
|
readonly: r.isFieldReadonly
|
|
5680
|
-
}, null, 8, ["schema", "uischema", "path", "label", "disabled", "readonly"])) : (
|
|
5681
|
-
|
|
5680
|
+
}, null, 8, ["schema", "uischema", "path", "label", "disabled", "readonly"])) : (N(), M("div", $u, [
|
|
5681
|
+
U(
|
|
5682
5682
|
"p",
|
|
5683
5683
|
null,
|
|
5684
5684
|
"No renderer available for field: " + X(n.path),
|
|
5685
5685
|
1
|
|
5686
5686
|
/* TEXT */
|
|
5687
5687
|
),
|
|
5688
|
-
|
|
5688
|
+
U(
|
|
5689
5689
|
"pre",
|
|
5690
5690
|
null,
|
|
5691
5691
|
X(JSON.stringify(n.schema, null, 2)),
|
|
@@ -5702,7 +5702,7 @@ function wu(e, t, n, r, s, a) {
|
|
|
5702
5702
|
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
5703
5703
|
);
|
|
5704
5704
|
}
|
|
5705
|
-
const
|
|
5705
|
+
const gt = /* @__PURE__ */ me(bu, [["render", wu], ["__scopeId", "data-v-abf28e2e"], ["__file", "/Users/zachsherbondy/src/github.com/quickflo-forms/packages/vue/src/components/FieldRenderer.vue"]]), Su = /* @__PURE__ */ fe({
|
|
5706
5706
|
__name: "ObjectField",
|
|
5707
5707
|
props: {
|
|
5708
5708
|
schema: { type: Object, required: !0 },
|
|
@@ -5715,11 +5715,11 @@ const _t = /* @__PURE__ */ me(bu, [["render", wu], ["__scopeId", "data-v-abf28e2
|
|
|
5715
5715
|
},
|
|
5716
5716
|
setup(e, { expose: t }) {
|
|
5717
5717
|
t();
|
|
5718
|
-
const n = e, { label: r, hint: s, errorMessage: a } = be(n.path, n.schema, { label: n.label }), o =
|
|
5718
|
+
const n = e, { label: r, hint: s, errorMessage: a } = be(n.path, n.schema, { label: n.label }), o = Oe(n.path), i = G(() => n.schema.properties ? Object.entries(n.schema.properties).map(([c, u]) => ({
|
|
5719
5719
|
key: c,
|
|
5720
5720
|
schema: u,
|
|
5721
5721
|
path: n.path ? `${n.path}.${c}` : c
|
|
5722
|
-
})) : []), d = { props: n, label: r, hint: s, errorMessage: a, fieldId: o, properties: i, FieldRenderer:
|
|
5722
|
+
})) : []), d = { props: n, label: r, hint: s, errorMessage: a, fieldId: o, properties: i, FieldRenderer: gt };
|
|
5723
5723
|
return Object.defineProperty(d, "__isScriptSetup", { enumerable: !1, value: !0 }), d;
|
|
5724
5724
|
}
|
|
5725
5725
|
}), ku = { class: "quickform-field quickform-object-field" }, Eu = ["id", "aria-describedby"], Pu = {
|
|
@@ -5733,32 +5733,32 @@ const _t = /* @__PURE__ */ me(bu, [["render", wu], ["__scopeId", "data-v-abf28e2
|
|
|
5733
5733
|
class: "quickform-error"
|
|
5734
5734
|
};
|
|
5735
5735
|
function Mu(e, t, n, r, s, a) {
|
|
5736
|
-
return
|
|
5737
|
-
|
|
5736
|
+
return N(), M("div", ku, [
|
|
5737
|
+
U("fieldset", {
|
|
5738
5738
|
id: r.fieldId,
|
|
5739
5739
|
class: "quickform-fieldset",
|
|
5740
5740
|
"aria-describedby": r.hint ? `${r.fieldId}-hint` : void 0
|
|
5741
5741
|
}, [
|
|
5742
|
-
r.label ? (
|
|
5742
|
+
r.label ? (N(), M("legend", Pu, [
|
|
5743
5743
|
qe(
|
|
5744
5744
|
X(r.label) + " ",
|
|
5745
5745
|
1
|
|
5746
5746
|
/* TEXT */
|
|
5747
5747
|
),
|
|
5748
|
-
r.props.schema.required ? (
|
|
5748
|
+
r.props.schema.required ? (N(), M("span", Ou, "*")) : L("v-if", !0)
|
|
5749
5749
|
])) : L("v-if", !0),
|
|
5750
|
-
r.hint ? (
|
|
5750
|
+
r.hint ? (N(), M("div", {
|
|
5751
5751
|
key: 1,
|
|
5752
5752
|
id: `${r.fieldId}-hint`,
|
|
5753
5753
|
class: "quickform-hint quickform-object-hint"
|
|
5754
5754
|
}, [
|
|
5755
|
-
|
|
5755
|
+
U("span", { innerHTML: r.hint }, null, 8, Nu)
|
|
5756
5756
|
], 8, ju)) : L("v-if", !0),
|
|
5757
|
-
|
|
5758
|
-
(
|
|
5759
|
-
|
|
5757
|
+
U("div", Iu, [
|
|
5758
|
+
(N(!0), M(
|
|
5759
|
+
Ee,
|
|
5760
5760
|
null,
|
|
5761
|
-
We(r.properties, (o) => (
|
|
5761
|
+
We(r.properties, (o) => (N(), mt(r.FieldRenderer, {
|
|
5762
5762
|
key: o.key,
|
|
5763
5763
|
schema: o.schema,
|
|
5764
5764
|
path: o.path,
|
|
@@ -5769,7 +5769,7 @@ function Mu(e, t, n, r, s, a) {
|
|
|
5769
5769
|
/* KEYED_FRAGMENT */
|
|
5770
5770
|
))
|
|
5771
5771
|
]),
|
|
5772
|
-
r.errorMessage ? (
|
|
5772
|
+
r.errorMessage ? (N(), M(
|
|
5773
5773
|
"div",
|
|
5774
5774
|
qu,
|
|
5775
5775
|
X(r.errorMessage),
|
|
@@ -5796,10 +5796,10 @@ const Tu = /* @__PURE__ */ me(Su, [["render", Mu], ["__scopeId", "data-v-8012fc1
|
|
|
5796
5796
|
n.path,
|
|
5797
5797
|
n.schema,
|
|
5798
5798
|
{ label: n.label }
|
|
5799
|
-
), i = rt(), d =
|
|
5799
|
+
), i = rt(), d = Oe(n.path), c = new _t(), u = G({
|
|
5800
5800
|
get: () => Array.isArray(r.value) ? r.value : [],
|
|
5801
5801
|
set: (S) => r.value = S
|
|
5802
|
-
}), m =
|
|
5802
|
+
}), m = G(() => Array.isArray(n.schema.items) ? n.schema.items[0] : n.schema.items), $ = () => {
|
|
5803
5803
|
if (!m.value) return;
|
|
5804
5804
|
const S = c.getDefaultValue(m.value);
|
|
5805
5805
|
r.value = [...u.value, S];
|
|
@@ -5808,26 +5808,26 @@ const Tu = /* @__PURE__ */ me(Su, [["render", Mu], ["__scopeId", "data-v-8012fc1
|
|
|
5808
5808
|
k.splice(S, 1), r.value = k;
|
|
5809
5809
|
}, _ = (S, k) => {
|
|
5810
5810
|
if (k === "up" && S === 0 || k === "down" && S === u.value.length - 1) return;
|
|
5811
|
-
const O = [...u.value],
|
|
5812
|
-
O[S] = O[
|
|
5813
|
-
}, g =
|
|
5814
|
-
var
|
|
5811
|
+
const O = [...u.value], D = k === "up" ? S - 1 : S + 1, V = O[S];
|
|
5812
|
+
O[S] = O[D], O[D] = V, r.value = O;
|
|
5813
|
+
}, g = G(() => !(n.disabled || n.readonly || n.schema.maxItems && u.value.length >= n.schema.maxItems)), p = G(() => !(n.disabled || n.readonly || n.schema.minItems && u.value.length <= n.schema.minItems)), y = { props: n, value: r, errorMessage: s, label: a, hint: o, formContext: i, fieldId: d, schemaUtils: c, arrayValue: u, itemsSchema: m, addItem: $, removeItem: b, moveItem: _, canAdd: g, canRemove: p, getItemLabel: (S) => {
|
|
5814
|
+
var D;
|
|
5815
5815
|
const k = n.schema["x-item-label"];
|
|
5816
5816
|
if (k === "none" || k === !1)
|
|
5817
5817
|
return "";
|
|
5818
5818
|
if (typeof k == "string" && k.includes("{{")) {
|
|
5819
|
-
const
|
|
5820
|
-
if (typeof
|
|
5821
|
-
let
|
|
5822
|
-
if (
|
|
5823
|
-
const
|
|
5824
|
-
return
|
|
5825
|
-
}),
|
|
5826
|
-
return
|
|
5819
|
+
const V = u.value[S];
|
|
5820
|
+
if (typeof V == "object" && V !== null) {
|
|
5821
|
+
let I = k, T = !1;
|
|
5822
|
+
if (I = I.replace(/\{\{([^}]+)\}\}/g, (F, W) => {
|
|
5823
|
+
const H = V[W.trim()];
|
|
5824
|
+
return H != null && H !== "" ? (T = !0, String(H)) : "";
|
|
5825
|
+
}), I = I.replace(/^\s*-\s*/, "").replace(/\s*-\s*$/, ""), T && I.trim())
|
|
5826
|
+
return I.trim();
|
|
5827
5827
|
}
|
|
5828
5828
|
}
|
|
5829
|
-
return `${((
|
|
5830
|
-
}, FieldRenderer:
|
|
5829
|
+
return `${((D = m.value) == null ? void 0 : D.title) || "Item"} #${S + 1}`;
|
|
5830
|
+
}, FieldRenderer: gt };
|
|
5831
5831
|
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
5832
5832
|
}
|
|
5833
5833
|
}), Au = { class: "quickform-field quickform-array-field" }, Cu = ["id", "aria-describedby"], Du = {
|
|
@@ -5844,36 +5844,36 @@ const Tu = /* @__PURE__ */ me(Su, [["render", Mu], ["__scopeId", "data-v-8012fc1
|
|
|
5844
5844
|
class: "quickform-error"
|
|
5845
5845
|
};
|
|
5846
5846
|
function Yu(e, t, n, r, s, a) {
|
|
5847
|
-
return
|
|
5848
|
-
|
|
5847
|
+
return N(), M("div", Au, [
|
|
5848
|
+
U("fieldset", {
|
|
5849
5849
|
id: r.fieldId,
|
|
5850
5850
|
class: "quickform-fieldset",
|
|
5851
5851
|
"aria-describedby": r.hint ? `${r.fieldId}-hint` : void 0
|
|
5852
5852
|
}, [
|
|
5853
|
-
r.label ? (
|
|
5853
|
+
r.label ? (N(), M("legend", Du, [
|
|
5854
5854
|
qe(
|
|
5855
5855
|
X(r.label) + " ",
|
|
5856
5856
|
1
|
|
5857
5857
|
/* TEXT */
|
|
5858
5858
|
),
|
|
5859
|
-
r.props.schema.required ? (
|
|
5859
|
+
r.props.schema.required ? (N(), M("span", Vu, "*")) : L("v-if", !0)
|
|
5860
5860
|
])) : L("v-if", !0),
|
|
5861
|
-
r.hint ? (
|
|
5861
|
+
r.hint ? (N(), M("div", {
|
|
5862
5862
|
key: 1,
|
|
5863
5863
|
id: `${r.fieldId}-hint`,
|
|
5864
5864
|
class: "quickform-hint quickform-array-hint"
|
|
5865
5865
|
}, [
|
|
5866
|
-
|
|
5866
|
+
U("span", { innerHTML: r.hint }, null, 8, zu)
|
|
5867
5867
|
], 8, Fu)) : L("v-if", !0),
|
|
5868
|
-
|
|
5869
|
-
(
|
|
5870
|
-
|
|
5868
|
+
U("div", Uu, [
|
|
5869
|
+
(N(!0), M(
|
|
5870
|
+
Ee,
|
|
5871
5871
|
null,
|
|
5872
|
-
We(r.arrayValue, (o, i) => (
|
|
5872
|
+
We(r.arrayValue, (o, i) => (N(), M("div", {
|
|
5873
5873
|
key: i,
|
|
5874
5874
|
class: "quickform-array-item"
|
|
5875
5875
|
}, [
|
|
5876
|
-
|
|
5876
|
+
U("div", Lu, [
|
|
5877
5877
|
Kn(r.FieldRenderer, {
|
|
5878
5878
|
schema: r.itemsSchema,
|
|
5879
5879
|
path: `${n.path}[${i}]`,
|
|
@@ -5882,22 +5882,22 @@ function Yu(e, t, n, r, s, a) {
|
|
|
5882
5882
|
readonly: n.readonly
|
|
5883
5883
|
}, null, 8, ["schema", "path", "label", "disabled", "readonly"])
|
|
5884
5884
|
]),
|
|
5885
|
-
|
|
5886
|
-
|
|
5885
|
+
U("div", Hu, [
|
|
5886
|
+
U("button", {
|
|
5887
5887
|
type: "button",
|
|
5888
5888
|
class: "quickform-btn-icon",
|
|
5889
5889
|
disabled: i === 0 || n.disabled || n.readonly,
|
|
5890
5890
|
onClick: (d) => r.moveItem(i, "up"),
|
|
5891
5891
|
title: "Move Up"
|
|
5892
5892
|
}, " ↑ ", 8, Ku),
|
|
5893
|
-
|
|
5893
|
+
U("button", {
|
|
5894
5894
|
type: "button",
|
|
5895
5895
|
class: "quickform-btn-icon",
|
|
5896
5896
|
disabled: i === r.arrayValue.length - 1 || n.disabled || n.readonly,
|
|
5897
5897
|
onClick: (d) => r.moveItem(i, "down"),
|
|
5898
5898
|
title: "Move Down"
|
|
5899
5899
|
}, " ↓ ", 8, Bu),
|
|
5900
|
-
|
|
5900
|
+
U("button", {
|
|
5901
5901
|
type: "button",
|
|
5902
5902
|
class: "quickform-btn-icon quickform-btn-danger",
|
|
5903
5903
|
disabled: !r.canRemove,
|
|
@@ -5909,17 +5909,17 @@ function Yu(e, t, n, r, s, a) {
|
|
|
5909
5909
|
128
|
|
5910
5910
|
/* KEYED_FRAGMENT */
|
|
5911
5911
|
)),
|
|
5912
|
-
r.arrayValue.length === 0 ? (
|
|
5912
|
+
r.arrayValue.length === 0 ? (N(), M("div", Ju, " No items ")) : L("v-if", !0)
|
|
5913
5913
|
]),
|
|
5914
|
-
|
|
5915
|
-
|
|
5914
|
+
U("div", xu, [
|
|
5915
|
+
U("button", {
|
|
5916
5916
|
type: "button",
|
|
5917
5917
|
class: "quickform-btn quickform-btn-secondary",
|
|
5918
5918
|
disabled: !r.canAdd,
|
|
5919
5919
|
onClick: r.addItem
|
|
5920
5920
|
}, " + " + X(r.formContext.labels.addItem), 9, Wu)
|
|
5921
5921
|
]),
|
|
5922
|
-
r.errorMessage ? (
|
|
5922
|
+
r.errorMessage ? (N(), M(
|
|
5923
5923
|
"div",
|
|
5924
5924
|
Zu,
|
|
5925
5925
|
X(r.errorMessage),
|
|
@@ -5946,8 +5946,8 @@ const Qu = /* @__PURE__ */ me(Ru, [["render", Yu], ["__scopeId", "data-v-a078389
|
|
|
5946
5946
|
n.path,
|
|
5947
5947
|
n.schema,
|
|
5948
5948
|
{ label: n.label }
|
|
5949
|
-
), c =
|
|
5950
|
-
|
|
5949
|
+
), c = Oe(n.path), u = G(() => n.schema["x-show-format-hint"] !== !1), m = de(""), $ = de(null), b = de(!1);
|
|
5950
|
+
jt(
|
|
5951
5951
|
() => r.value,
|
|
5952
5952
|
(k) => {
|
|
5953
5953
|
if (!b.value) {
|
|
@@ -5965,10 +5965,10 @@ const Qu = /* @__PURE__ */ me(Ru, [["render", Yu], ["__scopeId", "data-v-a078389
|
|
|
5965
5965
|
const O = k.target;
|
|
5966
5966
|
m.value = O.value;
|
|
5967
5967
|
try {
|
|
5968
|
-
const
|
|
5969
|
-
s(
|
|
5970
|
-
} catch (
|
|
5971
|
-
$.value =
|
|
5968
|
+
const D = JSON.parse(m.value);
|
|
5969
|
+
s(D), $.value = null;
|
|
5970
|
+
} catch (D) {
|
|
5971
|
+
$.value = D.message;
|
|
5972
5972
|
}
|
|
5973
5973
|
}
|
|
5974
5974
|
function g() {
|
|
@@ -5986,15 +5986,15 @@ const Qu = /* @__PURE__ */ me(Ru, [["render", Yu], ["__scopeId", "data-v-a078389
|
|
|
5986
5986
|
}
|
|
5987
5987
|
if (k.key === "Tab") {
|
|
5988
5988
|
k.preventDefault(), k.stopPropagation();
|
|
5989
|
-
const
|
|
5990
|
-
m.value = m.value.substring(0,
|
|
5991
|
-
O.selectionStart = O.selectionEnd =
|
|
5989
|
+
const D = O.selectionStart, V = O.selectionEnd, I = " ";
|
|
5990
|
+
m.value = m.value.substring(0, D) + I + m.value.substring(V), setTimeout(() => {
|
|
5991
|
+
O.selectionStart = O.selectionEnd = D + I.length;
|
|
5992
5992
|
}, 0);
|
|
5993
5993
|
return;
|
|
5994
5994
|
}
|
|
5995
5995
|
(k.key === "Enter" || k.key === " ") && k.stopPropagation();
|
|
5996
5996
|
}
|
|
5997
|
-
const h =
|
|
5997
|
+
const h = G(() => $.value || i.value), y = G(() => {
|
|
5998
5998
|
const k = n.schema["x-rows"];
|
|
5999
5999
|
return k !== void 0 ? k : 8;
|
|
6000
6000
|
}), S = { props: n, value: r, setValue: s, label: a, hint: o, errorMessage: i, required: d, fieldId: c, showFormatHint: u, jsonText: m, parseError: $, isInitialized: b, handleInput: _, formatJson: g, handleKeyDown: p, displayError: h, rows: y };
|
|
@@ -6015,9 +6015,9 @@ const Qu = /* @__PURE__ */ me(Ru, [["render", Yu], ["__scopeId", "data-v-a078389
|
|
|
6015
6015
|
class: "quickform-error"
|
|
6016
6016
|
};
|
|
6017
6017
|
function cf(e, t, n, r, s, a) {
|
|
6018
|
-
return
|
|
6019
|
-
r.label ? (
|
|
6020
|
-
|
|
6018
|
+
return N(), M("div", ef, [
|
|
6019
|
+
r.label ? (N(), M("div", tf, [
|
|
6020
|
+
U("label", {
|
|
6021
6021
|
for: r.fieldId,
|
|
6022
6022
|
class: "quickform-label"
|
|
6023
6023
|
}, [
|
|
@@ -6026,18 +6026,18 @@ function cf(e, t, n, r, s, a) {
|
|
|
6026
6026
|
1
|
|
6027
6027
|
/* TEXT */
|
|
6028
6028
|
),
|
|
6029
|
-
r.required ? (
|
|
6029
|
+
r.required ? (N(), M("span", nf, "*")) : L("v-if", !0)
|
|
6030
6030
|
], 8, rf),
|
|
6031
|
-
r.showFormatHint ? (
|
|
6031
|
+
r.showFormatHint ? (N(), M("span", sf, "ⓘ")) : L("v-if", !0)
|
|
6032
6032
|
])) : L("v-if", !0),
|
|
6033
|
-
r.hint ? (
|
|
6033
|
+
r.hint ? (N(), M("div", {
|
|
6034
6034
|
key: 1,
|
|
6035
6035
|
id: `${r.fieldId}-hint`,
|
|
6036
6036
|
class: "quickform-hint"
|
|
6037
6037
|
}, [
|
|
6038
|
-
|
|
6038
|
+
U("span", { innerHTML: r.hint }, null, 8, of)
|
|
6039
6039
|
], 8, af)) : L("v-if", !0),
|
|
6040
|
-
Ce(
|
|
6040
|
+
Ce(U("textarea", {
|
|
6041
6041
|
id: r.fieldId,
|
|
6042
6042
|
"onUpdate:modelValue": t[0] || (t[0] = (o) => r.jsonText = o),
|
|
6043
6043
|
class: Hn(["quickform-textarea quickform-json-editor", { "quickform-error-border": r.displayError }]),
|
|
@@ -6053,7 +6053,7 @@ function cf(e, t, n, r, s, a) {
|
|
|
6053
6053
|
}, null, 42, lf), [
|
|
6054
6054
|
[wr, r.jsonText]
|
|
6055
6055
|
]),
|
|
6056
|
-
r.displayError ? (
|
|
6056
|
+
r.displayError ? (N(), M(
|
|
6057
6057
|
"div",
|
|
6058
6058
|
df,
|
|
6059
6059
|
X(r.displayError),
|
|
@@ -6075,17 +6075,17 @@ const uf = /* @__PURE__ */ me(Xu, [["render", cf], ["__scopeId", "data-v-8122fb7
|
|
|
6075
6075
|
},
|
|
6076
6076
|
setup(e, { expose: t }) {
|
|
6077
6077
|
t();
|
|
6078
|
-
const n = e, { value: r, label: s, hint: a, errorMessage: o } = be(n.path, n.schema, { label: n.label }), i =
|
|
6078
|
+
const n = e, { value: r, label: s, hint: a, errorMessage: o } = be(n.path, n.schema, { label: n.label }), i = Oe(n.path), d = new _t(), c = G(() => n.schema.oneOf || n.schema.anyOf || []), u = de(0);
|
|
6079
6079
|
Bn(() => {
|
|
6080
6080
|
if (r.value) {
|
|
6081
6081
|
const g = c.value.findIndex((p) => d.validate(p, r.value).valid);
|
|
6082
6082
|
g !== -1 && (u.value = g);
|
|
6083
6083
|
}
|
|
6084
6084
|
});
|
|
6085
|
-
const m =
|
|
6085
|
+
const m = G(() => c.value[u.value]), $ = G(() => c.value.map((g, p) => g.title || `Option ${p + 1}`)), _ = { props: n, value: r, label: s, hint: a, errorMessage: o, fieldId: i, schemaUtils: d, options: c, selectedIndex: u, activeSchema: m, optionLabels: $, handleOptionChange: (g) => {
|
|
6086
6086
|
const p = Number(g.target.value);
|
|
6087
6087
|
u.value = p;
|
|
6088
|
-
}, FieldRenderer:
|
|
6088
|
+
}, FieldRenderer: gt };
|
|
6089
6089
|
return Object.defineProperty(_, "__isScriptSetup", { enumerable: !1, value: !0 }), _;
|
|
6090
6090
|
}
|
|
6091
6091
|
}), mf = { class: "quickform-field quickform-oneof-field" }, hf = ["id", "aria-describedby"], pf = {
|
|
@@ -6099,38 +6099,38 @@ const uf = /* @__PURE__ */ me(Xu, [["render", cf], ["__scopeId", "data-v-8122fb7
|
|
|
6099
6099
|
class: "quickform-error"
|
|
6100
6100
|
};
|
|
6101
6101
|
function kf(e, t, n, r, s, a) {
|
|
6102
|
-
return
|
|
6103
|
-
|
|
6102
|
+
return N(), M("div", mf, [
|
|
6103
|
+
U("fieldset", {
|
|
6104
6104
|
id: r.fieldId,
|
|
6105
6105
|
class: "quickform-fieldset",
|
|
6106
6106
|
"aria-describedby": r.hint ? `${r.fieldId}-hint` : void 0
|
|
6107
6107
|
}, [
|
|
6108
|
-
r.label ? (
|
|
6108
|
+
r.label ? (N(), M("legend", pf, [
|
|
6109
6109
|
qe(
|
|
6110
6110
|
X(r.label) + " ",
|
|
6111
6111
|
1
|
|
6112
6112
|
/* TEXT */
|
|
6113
6113
|
),
|
|
6114
|
-
r.props.schema.required ? (
|
|
6114
|
+
r.props.schema.required ? (N(), M("span", yf, "*")) : L("v-if", !0)
|
|
6115
6115
|
])) : L("v-if", !0),
|
|
6116
|
-
r.hint ? (
|
|
6116
|
+
r.hint ? (N(), M("div", {
|
|
6117
6117
|
key: 1,
|
|
6118
6118
|
id: `${r.fieldId}-hint`,
|
|
6119
6119
|
class: "quickform-hint quickform-oneof-hint"
|
|
6120
6120
|
}, [
|
|
6121
|
-
|
|
6121
|
+
U("span", { innerHTML: r.hint }, null, 8, _f)
|
|
6122
6122
|
], 8, vf)) : L("v-if", !0),
|
|
6123
|
-
|
|
6124
|
-
|
|
6123
|
+
U("div", gf, [
|
|
6124
|
+
U("select", {
|
|
6125
6125
|
value: r.selectedIndex,
|
|
6126
6126
|
onChange: r.handleOptionChange,
|
|
6127
6127
|
class: "quickform-select",
|
|
6128
6128
|
disabled: n.disabled || n.readonly
|
|
6129
6129
|
}, [
|
|
6130
|
-
(
|
|
6131
|
-
|
|
6130
|
+
(N(!0), M(
|
|
6131
|
+
Ee,
|
|
6132
6132
|
null,
|
|
6133
|
-
We(r.optionLabels, (o, i) => (
|
|
6133
|
+
We(r.optionLabels, (o, i) => (N(), M("option", {
|
|
6134
6134
|
key: i,
|
|
6135
6135
|
value: i
|
|
6136
6136
|
}, X(o), 9, $f))),
|
|
@@ -6139,8 +6139,8 @@ function kf(e, t, n, r, s, a) {
|
|
|
6139
6139
|
))
|
|
6140
6140
|
], 40, bf)
|
|
6141
6141
|
]),
|
|
6142
|
-
|
|
6143
|
-
r.activeSchema ? (
|
|
6142
|
+
U("div", wf, [
|
|
6143
|
+
r.activeSchema ? (N(), mt(r.FieldRenderer, {
|
|
6144
6144
|
key: 0,
|
|
6145
6145
|
schema: r.activeSchema,
|
|
6146
6146
|
path: n.path,
|
|
@@ -6148,7 +6148,7 @@ function kf(e, t, n, r, s, a) {
|
|
|
6148
6148
|
readonly: n.readonly
|
|
6149
6149
|
}, null, 8, ["schema", "path", "disabled", "readonly"])) : L("v-if", !0)
|
|
6150
6150
|
]),
|
|
6151
|
-
r.errorMessage ? (
|
|
6151
|
+
r.errorMessage ? (N(), M(
|
|
6152
6152
|
"div",
|
|
6153
6153
|
Sf,
|
|
6154
6154
|
X(r.errorMessage),
|
|
@@ -6171,16 +6171,16 @@ const Ln = /* @__PURE__ */ me(ff, [["render", kf], ["__scopeId", "data-v-dab625e
|
|
|
6171
6171
|
},
|
|
6172
6172
|
setup(e, { expose: t }) {
|
|
6173
6173
|
t();
|
|
6174
|
-
const n = e, { label: r, hint: s, errorMessage: a } = be(n.path, n.schema, { label: n.label }), o =
|
|
6174
|
+
const n = e, { label: r, hint: s, errorMessage: a } = be(n.path, n.schema, { label: n.label }), o = Oe(n.path), i = new _t(), d = G(() => {
|
|
6175
6175
|
if (!n.schema.allOf) return n.schema;
|
|
6176
6176
|
const u = { ...n.schema };
|
|
6177
6177
|
return delete u.allOf, i.mergeSchemas(u, ...n.schema.allOf);
|
|
6178
|
-
}), c = { props: n, label: r, hint: s, errorMessage: a, fieldId: o, schemaUtils: i, mergedSchema: d, FieldRenderer:
|
|
6178
|
+
}), c = { props: n, label: r, hint: s, errorMessage: a, fieldId: o, schemaUtils: i, mergedSchema: d, FieldRenderer: gt };
|
|
6179
6179
|
return Object.defineProperty(c, "__isScriptSetup", { enumerable: !1, value: !0 }), c;
|
|
6180
6180
|
}
|
|
6181
6181
|
}), Pf = { class: "quickform-field quickform-allof-field" };
|
|
6182
6182
|
function Of(e, t, n, r, s, a) {
|
|
6183
|
-
return
|
|
6183
|
+
return N(), M("div", Pf, [
|
|
6184
6184
|
L(" If the merged result is an object, ObjectField might be better, but FieldRenderer will dispatch correctly "),
|
|
6185
6185
|
Kn(r.FieldRenderer, {
|
|
6186
6186
|
schema: r.mergedSchema,
|
|
@@ -6213,12 +6213,12 @@ const jf = /* @__PURE__ */ me(Ef, [["render", Of], ["__scopeId", "data-v-094fd67
|
|
|
6213
6213
|
}
|
|
6214
6214
|
}), If = ["value"];
|
|
6215
6215
|
function qf(e, t, n, r, s, a) {
|
|
6216
|
-
return
|
|
6217
|
-
|
|
6216
|
+
return N(), M(
|
|
6217
|
+
Ee,
|
|
6218
6218
|
null,
|
|
6219
6219
|
[
|
|
6220
6220
|
L(" Hidden field - renders nothing visible to the user "),
|
|
6221
|
-
|
|
6221
|
+
U("input", {
|
|
6222
6222
|
type: "hidden",
|
|
6223
6223
|
value: r.value
|
|
6224
6224
|
}, null, 8, If)
|
|
@@ -6289,9 +6289,9 @@ const Rf = /* @__PURE__ */ fe({
|
|
|
6289
6289
|
},
|
|
6290
6290
|
emits: ["update:modelValue", "submit", "validation"],
|
|
6291
6291
|
setup(e, { expose: t, emit: n }) {
|
|
6292
|
-
var
|
|
6292
|
+
var S, k, O, D;
|
|
6293
6293
|
t();
|
|
6294
|
-
const r = e, s = n, a = new
|
|
6294
|
+
const r = e, s = n, a = new _t(), o = r.options.registry || Tf(), { handleSubmit: i, values: d, setValues: c, errors: u, meta: m } = oa({
|
|
6295
6295
|
initialValues: r.options.useDefaults !== !1 ? { ...a.getDefaultValue(r.schema), ...r.modelValue } : { ...r.modelValue },
|
|
6296
6296
|
validateOnMount: r.options.validateOnMount ?? !1
|
|
6297
6297
|
}), $ = {
|
|
@@ -6316,14 +6316,14 @@ const Rf = /* @__PURE__ */ fe({
|
|
|
6316
6316
|
showMode: "always"
|
|
6317
6317
|
}
|
|
6318
6318
|
}, _ = ra({
|
|
6319
|
-
readonly:
|
|
6320
|
-
disabled:
|
|
6319
|
+
readonly: G(() => r.options.readonly || !1),
|
|
6320
|
+
disabled: G(() => r.options.disabled || !1),
|
|
6321
6321
|
schema: r.schema,
|
|
6322
6322
|
// Schema usually doesn't change, but if it does, we might need computed
|
|
6323
6323
|
rootPath: "",
|
|
6324
6324
|
registry: sa(o),
|
|
6325
6325
|
// markRaw prevents Vue from making components reactive
|
|
6326
|
-
context:
|
|
6326
|
+
context: G(() => r.options.context || {}),
|
|
6327
6327
|
validationMode: r.options.validationMode || "ValidateAndShow",
|
|
6328
6328
|
errorMessages: r.options.errorMessages,
|
|
6329
6329
|
validators: r.options.validators,
|
|
@@ -6336,76 +6336,92 @@ const Rf = /* @__PURE__ */ fe({
|
|
|
6336
6336
|
// Then merge in the built-in defaults
|
|
6337
6337
|
select: {
|
|
6338
6338
|
...b.select,
|
|
6339
|
-
...(
|
|
6339
|
+
...(S = r.options.componentDefaults) == null ? void 0 : S.select
|
|
6340
6340
|
},
|
|
6341
6341
|
array: {
|
|
6342
6342
|
...b.array,
|
|
6343
|
-
...(
|
|
6343
|
+
...(k = r.options.componentDefaults) == null ? void 0 : k.array
|
|
6344
6344
|
},
|
|
6345
6345
|
number: {
|
|
6346
6346
|
...b.number,
|
|
6347
|
-
...(
|
|
6347
|
+
...(O = r.options.componentDefaults) == null ? void 0 : O.number
|
|
6348
6348
|
},
|
|
6349
6349
|
hints: {
|
|
6350
6350
|
...b.hints,
|
|
6351
|
-
...(
|
|
6351
|
+
...(D = r.options.componentDefaults) == null ? void 0 : D.hints
|
|
6352
6352
|
}
|
|
6353
6353
|
},
|
|
6354
6354
|
hintRenderer: r.options.hintRenderer
|
|
6355
6355
|
});
|
|
6356
|
-
dc(_),
|
|
6356
|
+
dc(_), jt(
|
|
6357
6357
|
() => r.modelValue,
|
|
6358
|
-
(
|
|
6359
|
-
|
|
6358
|
+
(V) => {
|
|
6359
|
+
V && JSON.stringify(V) !== JSON.stringify(d) && c(V);
|
|
6360
6360
|
},
|
|
6361
6361
|
{ deep: !0 }
|
|
6362
|
-
),
|
|
6362
|
+
), jt(
|
|
6363
6363
|
d,
|
|
6364
|
-
(
|
|
6365
|
-
s("update:modelValue",
|
|
6364
|
+
(V) => {
|
|
6365
|
+
s("update:modelValue", V);
|
|
6366
6366
|
},
|
|
6367
6367
|
{ deep: !0 }
|
|
6368
|
-
),
|
|
6368
|
+
), jt(
|
|
6369
6369
|
[u, m],
|
|
6370
|
-
([
|
|
6370
|
+
([V, I]) => {
|
|
6371
6371
|
s("validation", {
|
|
6372
|
-
valid:
|
|
6373
|
-
errors:
|
|
6372
|
+
valid: I.valid,
|
|
6373
|
+
errors: V
|
|
6374
6374
|
});
|
|
6375
6375
|
},
|
|
6376
6376
|
{ deep: !0, immediate: !0 }
|
|
6377
6377
|
);
|
|
6378
|
-
const g = i((
|
|
6379
|
-
const
|
|
6380
|
-
|
|
6381
|
-
}), p =
|
|
6382
|
-
key:
|
|
6383
|
-
schema:
|
|
6384
|
-
path:
|
|
6385
|
-
}))),
|
|
6386
|
-
return Object.defineProperty(
|
|
6378
|
+
const g = i((V) => {
|
|
6379
|
+
const I = a.validate(r.schema, V);
|
|
6380
|
+
I.valid ? s("submit", V) : console.error("Form validation failed:", I.errors);
|
|
6381
|
+
}), p = G(() => r.schema.type === "object" && !r.schema.properties), h = G(() => r.schema.type !== "object" || !r.schema.properties ? [] : Object.entries(r.schema.properties).map(([V, I]) => ({
|
|
6382
|
+
key: V,
|
|
6383
|
+
schema: I,
|
|
6384
|
+
path: V
|
|
6385
|
+
}))), y = { props: r, emit: s, schemaUtils: a, registry: o, handleSubmit: i, values: d, setValues: c, errors: u, meta: m, defaultLabels: $, defaultComponentDefaults: b, formContext: _, onSubmit: g, isSingleField: p, properties: h, FieldRenderer: gt };
|
|
6386
|
+
return Object.defineProperty(y, "__isScriptSetup", { enumerable: !1, value: !0 }), y;
|
|
6387
6387
|
}
|
|
6388
6388
|
});
|
|
6389
6389
|
function Af(e, t, n, r, s, a) {
|
|
6390
|
-
return
|
|
6390
|
+
return N(), M(
|
|
6391
6391
|
"form",
|
|
6392
6392
|
{
|
|
6393
6393
|
class: "quickform",
|
|
6394
6394
|
onSubmit: t[0] || (t[0] = (...o) => r.onSubmit && r.onSubmit(...o))
|
|
6395
6395
|
},
|
|
6396
6396
|
[
|
|
6397
|
-
(
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6402
|
-
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6407
|
-
|
|
6408
|
-
|
|
6397
|
+
L(" Single field schema (e.g., JSON editor, single object field) "),
|
|
6398
|
+
r.isSingleField ? (N(), mt(r.FieldRenderer, {
|
|
6399
|
+
key: 0,
|
|
6400
|
+
schema: n.schema,
|
|
6401
|
+
path: "",
|
|
6402
|
+
disabled: n.options.disabled,
|
|
6403
|
+
readonly: n.options.readonly
|
|
6404
|
+
}, null, 8, ["schema", "disabled", "readonly"])) : (N(), M(
|
|
6405
|
+
Ee,
|
|
6406
|
+
{ key: 1 },
|
|
6407
|
+
[
|
|
6408
|
+
L(" Multiple fields (normal form) "),
|
|
6409
|
+
(N(!0), M(
|
|
6410
|
+
Ee,
|
|
6411
|
+
null,
|
|
6412
|
+
We(r.properties, (o) => (N(), mt(r.FieldRenderer, {
|
|
6413
|
+
key: o.key,
|
|
6414
|
+
schema: o.schema,
|
|
6415
|
+
path: o.path,
|
|
6416
|
+
disabled: n.options.disabled,
|
|
6417
|
+
readonly: n.options.readonly
|
|
6418
|
+
}, null, 8, ["schema", "path", "disabled", "readonly"]))),
|
|
6419
|
+
128
|
|
6420
|
+
/* KEYED_FRAGMENT */
|
|
6421
|
+
))
|
|
6422
|
+
],
|
|
6423
|
+
2112
|
|
6424
|
+
/* STABLE_FRAGMENT, DEV_ROOT_FRAGMENT */
|
|
6409
6425
|
))
|
|
6410
6426
|
],
|
|
6411
6427
|
32
|
|
@@ -6421,17 +6437,17 @@ export {
|
|
|
6421
6437
|
gu as DateField,
|
|
6422
6438
|
em as DynamicForm,
|
|
6423
6439
|
du as EnumField,
|
|
6424
|
-
|
|
6440
|
+
gt as FieldRenderer,
|
|
6425
6441
|
Mf as HiddenField,
|
|
6426
6442
|
uf as JsonField,
|
|
6427
6443
|
Vc as NumberField,
|
|
6428
6444
|
Tu as ObjectField,
|
|
6429
6445
|
Ln as OneOfField,
|
|
6430
|
-
|
|
6446
|
+
_t as SchemaUtils,
|
|
6431
6447
|
jc as StringField,
|
|
6432
6448
|
xf as and,
|
|
6433
6449
|
Tf as createDefaultRegistry,
|
|
6434
|
-
|
|
6450
|
+
Oe as generateFieldId,
|
|
6435
6451
|
cc as getHint,
|
|
6436
6452
|
Yf as getLabel,
|
|
6437
6453
|
va as hasAllOf,
|