@useinsider/guido 3.20.1 → 3.21.0-beta.1bd7edd
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/README.md +1 -0
- package/dist/@types/config/schemas.js +41 -39
- package/dist/@types/display-condition.js +25 -0
- package/dist/components/Guido.vue.js +6 -6
- package/dist/components/Guido.vue2.js +86 -83
- package/dist/components/organisms/AutoSaveController.vue2.js +10 -9
- package/dist/components/organisms/display-conditions/CodeEditorField.vue.js +20 -0
- package/dist/components/organisms/display-conditions/CodeEditorField.vue2.js +30 -0
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.js +30 -0
- package/dist/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue2.js +71 -0
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.js +34 -0
- package/dist/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue2.js +57 -0
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue.js +17 -0
- package/dist/components/organisms/display-conditions/DisplayConditionsHost.vue2.js +22 -0
- package/dist/components/organisms/header/EditorActions.vue.js +4 -4
- package/dist/components/organisms/header/EditorActions.vue2.js +53 -51
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue.js +3 -3
- package/dist/components/organisms/validation/ValidationErrorDrawer.vue2.js +23 -22
- package/dist/composables/useAutoSave.js +46 -44
- package/dist/composables/useBlocksConfig.js +32 -24
- package/dist/composables/useDisplayConditions.js +102 -0
- package/dist/composables/useLegacyStrategyConversion.js +16 -16
- package/dist/composables/useSave.js +26 -23
- package/dist/composables/useSaveValidation.js +113 -114
- package/dist/composables/useSaveValidationRollout.js +17 -6
- package/dist/composables/useStripo.js +4 -3
- package/dist/enums/academy.js +1 -0
- package/dist/enums/display-condition.js +12 -0
- package/dist/extensions/Blocks/Items/block.js +43 -42
- package/dist/extensions/Blocks/Recommendation/controls/main/index.js +296 -223
- package/dist/extensions/Blocks/Recommendation/store/recommendation.js +221 -203
- package/dist/extensions/Blocks/Recommendation/utils/blockRefresh.js +19 -0
- package/dist/extensions/Blocks/Recommendation/utils/nodeConfigWriter.js +51 -36
- package/dist/extensions/Blocks/Recommendation/utils/strategyCommit.js +31 -35
- package/dist/extensions/Blocks/Unsubscribe/block.js +70 -75
- package/dist/extensions/DisplayConditions/bridge.js +17 -0
- package/dist/extensions/DisplayConditions/constants.js +17 -0
- package/dist/extensions/DisplayConditions/control.js +178 -0
- package/dist/extensions/DisplayConditions/display-conditions.css.js +201 -0
- package/dist/extensions/DisplayConditions/extension.js +28 -0
- package/dist/extensions/DisplayConditions/iconsRegistry.js +20 -0
- package/dist/extensions/DisplayConditions/library.js +27 -0
- package/dist/extensions/DisplayConditions/settingsPanel.js +17 -0
- package/dist/guido.css +1 -1
- package/dist/node_modules/@stripoinc/ui-editor-extensions/dist/esm/index.js +272 -192
- package/dist/node_modules/valibot/dist/index.js +297 -261
- package/dist/package.json.js +1 -1
- package/dist/services/displayConditionApi.js +39 -0
- package/dist/services/settingsApi.js +11 -0
- package/dist/src/@types/config/schemas.d.ts +4 -0
- package/dist/src/@types/display-condition.d.ts +59 -0
- package/dist/src/components/Guido.vue.d.ts +1 -1
- package/dist/src/components/organisms/display-conditions/CodeEditorField.vue.d.ts +43 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionCreateDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionSelectDrawer.vue.d.ts +2 -0
- package/dist/src/components/organisms/display-conditions/DisplayConditionsHost.vue.d.ts +2 -0
- package/dist/src/components/organisms/header/EditorActions.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/HeaderWrapper.vue.d.ts +1 -1
- package/dist/src/components/organisms/header/RightSlot.vue.d.ts +1 -1
- package/dist/src/composables/useAutoSave.d.ts +4 -1
- package/dist/src/composables/useConfig.d.ts +2 -0
- package/dist/src/composables/useDisplayConditions.d.ts +16 -0
- package/dist/src/composables/useSaveValidationRollout.d.ts +1 -0
- package/dist/src/enums/academy.d.ts +1 -0
- package/dist/src/enums/display-condition.d.ts +15 -0
- package/dist/src/extensions/Blocks/Checkbox/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/CouponBlock/controls/index.d.ts +8 -0
- package/dist/src/extensions/Blocks/Items/controls/index.d.ts +40 -0
- package/dist/src/extensions/Blocks/RadioButton/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/button/index.d.ts +11 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/customAttribute/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/image/index.d.ts +2 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/main/index.d.ts +18 -3
- package/dist/src/extensions/Blocks/Recommendation/controls/name/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/oldPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusDiscount/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/omnibusPrice/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/price/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/controls/title/index.d.ts +7 -0
- package/dist/src/extensions/Blocks/Recommendation/store/recommendation.d.ts +9 -1
- package/dist/src/extensions/Blocks/Recommendation/utils/blockRefresh.d.ts +17 -0
- package/dist/src/extensions/Blocks/Recommendation/utils/nodeConfigWriter.d.ts +7 -0
- package/dist/src/extensions/Blocks/Unsubscribe/block.d.ts +1 -6
- package/dist/src/extensions/Blocks/_Boilerplate/controls/blockBackground/index.d.ts +1 -0
- package/dist/src/extensions/Blocks/controlFactories.d.ts +22 -0
- package/dist/src/extensions/DisplayConditions/bridge.d.ts +6 -0
- package/dist/src/extensions/DisplayConditions/constants.d.ts +14 -0
- package/dist/src/extensions/DisplayConditions/control.d.ts +23 -0
- package/dist/src/extensions/DisplayConditions/extension.d.ts +2 -0
- package/dist/src/extensions/DisplayConditions/iconsRegistry.d.ts +4 -0
- package/dist/src/extensions/DisplayConditions/library.d.ts +8 -0
- package/dist/src/extensions/DisplayConditions/settingsPanel.d.ts +5 -0
- package/dist/src/mock/api/display-conditions.d.ts +2 -0
- package/dist/src/services/displayConditionApi.d.ts +8 -0
- package/dist/src/services/settingsApi.d.ts +6 -0
- package/dist/src/stores/config.d.ts +166 -0
- package/dist/src/stores/display-condition.d.ts +81 -0
- package/dist/src/stores/setup-settings.d.ts +4 -0
- package/dist/src/utils/displayCondition.d.ts +10 -0
- package/dist/src/utils/protectTableText.d.ts +2 -0
- package/dist/static/styles/components/button.css.js +5 -0
- package/dist/stores/config.js +13 -6
- package/dist/stores/display-condition.js +28 -0
- package/dist/stores/setup-settings.js +10 -0
- package/dist/utils/displayCondition.js +26 -0
- package/dist/utils/pairProductVariables.js +15 -14
- package/dist/utils/protectTableText.js +22 -0
- package/package.json +4 -4
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
let m;
|
|
2
2
|
// @__NO_SIDE_EFFECTS__
|
|
3
|
-
function
|
|
3
|
+
function g(n) {
|
|
4
4
|
return {
|
|
5
5
|
lang: (n == null ? void 0 : n.lang) ?? (m == null ? void 0 : m.lang),
|
|
6
6
|
message: n == null ? void 0 : n.message,
|
|
@@ -8,66 +8,76 @@ function j(n) {
|
|
|
8
8
|
abortPipeEarly: (n == null ? void 0 : n.abortPipeEarly) ?? (m == null ? void 0 : m.abortPipeEarly)
|
|
9
9
|
};
|
|
10
10
|
}
|
|
11
|
-
let
|
|
11
|
+
let E;
|
|
12
12
|
// @__NO_SIDE_EFFECTS__
|
|
13
13
|
function A(n) {
|
|
14
|
-
return
|
|
14
|
+
return E == null ? void 0 : E.get(n);
|
|
15
15
|
}
|
|
16
|
-
let
|
|
16
|
+
let j;
|
|
17
17
|
// @__NO_SIDE_EFFECTS__
|
|
18
|
-
function
|
|
19
|
-
return
|
|
18
|
+
function V(n) {
|
|
19
|
+
return j == null ? void 0 : j.get(n);
|
|
20
20
|
}
|
|
21
|
-
let
|
|
21
|
+
let _;
|
|
22
22
|
// @__NO_SIDE_EFFECTS__
|
|
23
|
-
function
|
|
23
|
+
function q(n, r) {
|
|
24
24
|
var e;
|
|
25
|
-
return (e =
|
|
25
|
+
return (e = _ == null ? void 0 : _.get(n)) == null ? void 0 : e.get(r);
|
|
26
26
|
}
|
|
27
27
|
// @__NO_SIDE_EFFECTS__
|
|
28
|
-
function
|
|
29
|
-
var e,
|
|
30
|
-
const
|
|
31
|
-
return
|
|
28
|
+
function w(n) {
|
|
29
|
+
var e, s;
|
|
30
|
+
const r = typeof n;
|
|
31
|
+
return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && ((s = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : s.name)) ?? "null" : r;
|
|
32
32
|
}
|
|
33
|
-
function f(n,
|
|
34
|
-
const l = t && "input" in t ? t.input : e.value,
|
|
33
|
+
function f(n, r, e, s, t) {
|
|
34
|
+
const l = t && "input" in t ? t.input : e.value, u = (t == null ? void 0 : t.expected) ?? n.expects ?? null, a = (t == null ? void 0 : t.received) ?? /* @__PURE__ */ w(l), i = {
|
|
35
35
|
kind: n.kind,
|
|
36
36
|
type: n.type,
|
|
37
37
|
input: l,
|
|
38
|
-
expected:
|
|
38
|
+
expected: u,
|
|
39
39
|
received: a,
|
|
40
|
-
message: `Invalid ${
|
|
40
|
+
message: `Invalid ${r}: ${u ? `Expected ${u} but r` : "R"}eceived ${a}`,
|
|
41
41
|
requirement: n.requirement,
|
|
42
42
|
path: t == null ? void 0 : t.path,
|
|
43
43
|
issues: t == null ? void 0 : t.issues,
|
|
44
|
-
lang:
|
|
45
|
-
abortEarly:
|
|
46
|
-
abortPipeEarly:
|
|
47
|
-
}, p = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */
|
|
48
|
-
c !== void 0 && (
|
|
44
|
+
lang: s.lang,
|
|
45
|
+
abortEarly: s.abortEarly,
|
|
46
|
+
abortPipeEarly: s.abortPipeEarly
|
|
47
|
+
}, p = n.kind === "schema", c = (t == null ? void 0 : t.message) ?? n.message ?? /* @__PURE__ */ q(n.reference, i.lang) ?? (p ? /* @__PURE__ */ V(i.lang) : null) ?? s.message ?? /* @__PURE__ */ A(i.lang);
|
|
48
|
+
c !== void 0 && (i.message = typeof c == "function" ? c(i) : c), p && (e.typed = !1), e.issues ? e.issues.push(i) : e.issues = [i];
|
|
49
49
|
}
|
|
50
50
|
// @__NO_SIDE_EFFECTS__
|
|
51
51
|
function o(n) {
|
|
52
52
|
return {
|
|
53
53
|
version: 1,
|
|
54
54
|
vendor: "valibot",
|
|
55
|
-
validate(
|
|
56
|
-
return n["~run"]({ value:
|
|
55
|
+
validate(r) {
|
|
56
|
+
return n["~run"]({ value: r }, /* @__PURE__ */ g());
|
|
57
57
|
}
|
|
58
58
|
};
|
|
59
59
|
}
|
|
60
60
|
// @__NO_SIDE_EFFECTS__
|
|
61
|
-
function I(n,
|
|
62
|
-
return Object.hasOwn(n,
|
|
61
|
+
function I(n, r) {
|
|
62
|
+
return Object.hasOwn(n, r) && r !== "__proto__" && r !== "prototype" && r !== "constructor";
|
|
63
63
|
}
|
|
64
64
|
// @__NO_SIDE_EFFECTS__
|
|
65
|
-
function D(n,
|
|
65
|
+
function D(n, r) {
|
|
66
66
|
const e = [...new Set(n)];
|
|
67
|
-
return e.length > 1 ? `(${e.join(` ${
|
|
68
|
-
}
|
|
67
|
+
return e.length > 1 ? `(${e.join(` ${r} `)})` : e[0] ?? "never";
|
|
68
|
+
}
|
|
69
|
+
var K = class extends Error {
|
|
70
|
+
/**
|
|
71
|
+
* Creates a Valibot error with useful information.
|
|
72
|
+
*
|
|
73
|
+
* @param issues The error issues.
|
|
74
|
+
*/
|
|
75
|
+
constructor(n) {
|
|
76
|
+
super(n[0].message), this.name = "ValiError", this.issues = n;
|
|
77
|
+
}
|
|
78
|
+
};
|
|
69
79
|
// @__NO_SIDE_EFFECTS__
|
|
70
|
-
function M(n,
|
|
80
|
+
function M(n, r) {
|
|
71
81
|
return {
|
|
72
82
|
kind: "validation",
|
|
73
83
|
type: "check",
|
|
@@ -75,75 +85,75 @@ function M(n, s) {
|
|
|
75
85
|
async: !0,
|
|
76
86
|
expects: null,
|
|
77
87
|
requirement: n,
|
|
78
|
-
message:
|
|
79
|
-
async "~run"(e,
|
|
80
|
-
return e.typed && !await this.requirement(e.value) && f(this, "input", e,
|
|
88
|
+
message: r,
|
|
89
|
+
async "~run"(e, s) {
|
|
90
|
+
return e.typed && !await this.requirement(e.value) && f(this, "input", e, s), e;
|
|
81
91
|
}
|
|
82
92
|
};
|
|
83
93
|
}
|
|
84
94
|
// @__NO_SIDE_EFFECTS__
|
|
85
|
-
function
|
|
95
|
+
function z(n, r) {
|
|
86
96
|
return {
|
|
87
97
|
kind: "validation",
|
|
88
98
|
type: "max_length",
|
|
89
|
-
reference:
|
|
99
|
+
reference: z,
|
|
90
100
|
async: !1,
|
|
91
101
|
expects: `<=${n}`,
|
|
92
102
|
requirement: n,
|
|
93
|
-
message:
|
|
94
|
-
"~run"(e,
|
|
95
|
-
return e.typed && e.value.length > this.requirement && f(this, "length", e,
|
|
103
|
+
message: r,
|
|
104
|
+
"~run"(e, s) {
|
|
105
|
+
return e.typed && e.value.length > this.requirement && f(this, "length", e, s, { received: `${e.value.length}` }), e;
|
|
96
106
|
}
|
|
97
107
|
};
|
|
98
108
|
}
|
|
99
109
|
// @__NO_SIDE_EFFECTS__
|
|
100
|
-
function
|
|
110
|
+
function G(n, r) {
|
|
101
111
|
return {
|
|
102
112
|
kind: "validation",
|
|
103
113
|
type: "min_length",
|
|
104
|
-
reference:
|
|
114
|
+
reference: G,
|
|
105
115
|
async: !1,
|
|
106
116
|
expects: `>=${n}`,
|
|
107
117
|
requirement: n,
|
|
108
|
-
message:
|
|
109
|
-
"~run"(e,
|
|
110
|
-
return e.typed && e.value.length < this.requirement && f(this, "length", e,
|
|
118
|
+
message: r,
|
|
119
|
+
"~run"(e, s) {
|
|
120
|
+
return e.typed && e.value.length < this.requirement && f(this, "length", e, s, { received: `${e.value.length}` }), e;
|
|
111
121
|
}
|
|
112
122
|
};
|
|
113
123
|
}
|
|
114
124
|
// @__NO_SIDE_EFFECTS__
|
|
115
|
-
function
|
|
125
|
+
function L(n) {
|
|
116
126
|
return {
|
|
117
127
|
kind: "validation",
|
|
118
128
|
type: "non_empty",
|
|
119
|
-
reference:
|
|
129
|
+
reference: L,
|
|
120
130
|
async: !1,
|
|
121
131
|
expects: "!0",
|
|
122
132
|
message: n,
|
|
123
|
-
"~run"(
|
|
124
|
-
return
|
|
133
|
+
"~run"(r, e) {
|
|
134
|
+
return r.typed && r.value.length === 0 && f(this, "length", r, e, { received: "0" }), r;
|
|
125
135
|
}
|
|
126
136
|
};
|
|
127
137
|
}
|
|
128
138
|
// @__NO_SIDE_EFFECTS__
|
|
129
|
-
function
|
|
139
|
+
function N(n) {
|
|
130
140
|
return {
|
|
131
141
|
kind: "transformation",
|
|
132
142
|
type: "transform",
|
|
133
|
-
reference:
|
|
143
|
+
reference: N,
|
|
134
144
|
async: !1,
|
|
135
145
|
operation: n,
|
|
136
|
-
"~run"(
|
|
137
|
-
return
|
|
146
|
+
"~run"(r) {
|
|
147
|
+
return r.value = this.operation(r.value), r;
|
|
138
148
|
}
|
|
139
149
|
};
|
|
140
150
|
}
|
|
141
151
|
// @__NO_SIDE_EFFECTS__
|
|
142
|
-
function
|
|
152
|
+
function C() {
|
|
143
153
|
return {
|
|
144
154
|
kind: "transformation",
|
|
145
155
|
type: "trim",
|
|
146
|
-
reference:
|
|
156
|
+
reference: C,
|
|
147
157
|
async: !1,
|
|
148
158
|
"~run"(n) {
|
|
149
159
|
return n.value = n.value.trim(), n;
|
|
@@ -151,344 +161,362 @@ function N() {
|
|
|
151
161
|
};
|
|
152
162
|
}
|
|
153
163
|
// @__NO_SIDE_EFFECTS__
|
|
154
|
-
function P(n,
|
|
155
|
-
return typeof n.fallback == "function" ? n.fallback(
|
|
164
|
+
function P(n, r, e) {
|
|
165
|
+
return typeof n.fallback == "function" ? n.fallback(r, e) : n.fallback;
|
|
156
166
|
}
|
|
157
167
|
// @__NO_SIDE_EFFECTS__
|
|
158
|
-
function
|
|
168
|
+
function se(n, r) {
|
|
159
169
|
return {
|
|
160
170
|
...n,
|
|
161
|
-
fallback:
|
|
171
|
+
fallback: r,
|
|
162
172
|
get "~standard"() {
|
|
163
173
|
return /* @__PURE__ */ o(this);
|
|
164
174
|
},
|
|
165
|
-
"~run"(e,
|
|
166
|
-
const t = n["~run"](e,
|
|
175
|
+
"~run"(e, s) {
|
|
176
|
+
const t = n["~run"](e, s);
|
|
167
177
|
return t.issues ? {
|
|
168
178
|
typed: !0,
|
|
169
|
-
value: /* @__PURE__ */ P(this, t,
|
|
179
|
+
value: /* @__PURE__ */ P(this, t, s)
|
|
170
180
|
} : t;
|
|
171
181
|
}
|
|
172
182
|
};
|
|
173
183
|
}
|
|
174
184
|
// @__NO_SIDE_EFFECTS__
|
|
175
|
-
function
|
|
176
|
-
return typeof n.default == "function" ? n.default(
|
|
185
|
+
function x(n, r, e) {
|
|
186
|
+
return typeof n.default == "function" ? n.default(r, e) : n.default;
|
|
177
187
|
}
|
|
178
188
|
// @__NO_SIDE_EFFECTS__
|
|
179
|
-
function
|
|
189
|
+
function F(n, r) {
|
|
180
190
|
return {
|
|
181
191
|
kind: "schema",
|
|
182
192
|
type: "array",
|
|
183
|
-
reference:
|
|
193
|
+
reference: F,
|
|
184
194
|
expects: "Array",
|
|
185
195
|
async: !1,
|
|
186
196
|
item: n,
|
|
187
|
-
message:
|
|
197
|
+
message: r,
|
|
188
198
|
get "~standard"() {
|
|
189
199
|
return /* @__PURE__ */ o(this);
|
|
190
200
|
},
|
|
191
|
-
"~run"(e,
|
|
201
|
+
"~run"(e, s) {
|
|
192
202
|
var l;
|
|
193
203
|
const t = e.value;
|
|
194
204
|
if (Array.isArray(t)) {
|
|
195
205
|
e.typed = !0, e.value = [];
|
|
196
|
-
for (let
|
|
197
|
-
const a = t[
|
|
198
|
-
if (
|
|
206
|
+
for (let u = 0; u < t.length; u++) {
|
|
207
|
+
const a = t[u], i = this.item["~run"]({ value: a }, s);
|
|
208
|
+
if (i.issues) {
|
|
199
209
|
const p = {
|
|
200
210
|
type: "array",
|
|
201
211
|
origin: "value",
|
|
202
212
|
input: t,
|
|
203
|
-
key:
|
|
213
|
+
key: u,
|
|
204
214
|
value: a
|
|
205
215
|
};
|
|
206
|
-
for (const c of
|
|
216
|
+
for (const c of i.issues)
|
|
207
217
|
c.path ? c.path.unshift(p) : c.path = [p], (l = e.issues) == null || l.push(c);
|
|
208
|
-
if (e.issues || (e.issues =
|
|
218
|
+
if (e.issues || (e.issues = i.issues), s.abortEarly) {
|
|
209
219
|
e.typed = !1;
|
|
210
220
|
break;
|
|
211
221
|
}
|
|
212
222
|
}
|
|
213
|
-
|
|
223
|
+
i.typed || (e.typed = !1), e.value.push(i.value);
|
|
214
224
|
}
|
|
215
|
-
} else f(this, "type", e,
|
|
225
|
+
} else f(this, "type", e, s);
|
|
216
226
|
return e;
|
|
217
227
|
}
|
|
218
228
|
};
|
|
219
229
|
}
|
|
220
230
|
// @__NO_SIDE_EFFECTS__
|
|
221
|
-
function
|
|
231
|
+
function R(n) {
|
|
222
232
|
return {
|
|
223
233
|
kind: "schema",
|
|
224
234
|
type: "boolean",
|
|
225
|
-
reference:
|
|
235
|
+
reference: R,
|
|
226
236
|
expects: "boolean",
|
|
227
237
|
async: !1,
|
|
228
238
|
message: n,
|
|
229
239
|
get "~standard"() {
|
|
230
240
|
return /* @__PURE__ */ o(this);
|
|
231
241
|
},
|
|
232
|
-
"~run"(
|
|
233
|
-
return typeof
|
|
242
|
+
"~run"(r, e) {
|
|
243
|
+
return typeof r.value == "boolean" ? r.typed = !0 : f(this, "type", r, e), r;
|
|
234
244
|
}
|
|
235
245
|
};
|
|
236
246
|
}
|
|
237
247
|
// @__NO_SIDE_EFFECTS__
|
|
238
|
-
function
|
|
248
|
+
function B(n, r) {
|
|
239
249
|
return {
|
|
240
250
|
kind: "schema",
|
|
241
251
|
type: "custom",
|
|
242
|
-
reference:
|
|
252
|
+
reference: B,
|
|
243
253
|
expects: "unknown",
|
|
244
254
|
async: !1,
|
|
245
255
|
check: n,
|
|
246
|
-
message:
|
|
256
|
+
message: r,
|
|
247
257
|
get "~standard"() {
|
|
248
258
|
return /* @__PURE__ */ o(this);
|
|
249
259
|
},
|
|
250
|
-
"~run"(e,
|
|
251
|
-
return this.check(e.value) ? e.typed = !0 : f(this, "type", e,
|
|
260
|
+
"~run"(e, s) {
|
|
261
|
+
return this.check(e.value) ? e.typed = !0 : f(this, "type", e, s), e;
|
|
252
262
|
}
|
|
253
263
|
};
|
|
254
264
|
}
|
|
255
265
|
// @__NO_SIDE_EFFECTS__
|
|
256
|
-
function
|
|
266
|
+
function H(n) {
|
|
257
267
|
return {
|
|
258
268
|
kind: "schema",
|
|
259
269
|
type: "lazy",
|
|
260
|
-
reference:
|
|
270
|
+
reference: H,
|
|
261
271
|
expects: "unknown",
|
|
262
272
|
async: !1,
|
|
263
273
|
getter: n,
|
|
264
274
|
get "~standard"() {
|
|
265
275
|
return /* @__PURE__ */ o(this);
|
|
266
276
|
},
|
|
267
|
-
"~run"(
|
|
268
|
-
return this.getter(
|
|
277
|
+
"~run"(r, e) {
|
|
278
|
+
return this.getter(r.value)["~run"](r, e);
|
|
269
279
|
}
|
|
270
280
|
};
|
|
271
281
|
}
|
|
272
282
|
// @__NO_SIDE_EFFECTS__
|
|
273
|
-
function
|
|
283
|
+
function J(n, r) {
|
|
274
284
|
return {
|
|
275
285
|
kind: "schema",
|
|
276
286
|
type: "literal",
|
|
277
|
-
reference:
|
|
278
|
-
expects: /* @__PURE__ */
|
|
287
|
+
reference: J,
|
|
288
|
+
expects: /* @__PURE__ */ w(n),
|
|
279
289
|
async: !1,
|
|
280
290
|
literal: n,
|
|
281
|
-
message:
|
|
291
|
+
message: r,
|
|
282
292
|
get "~standard"() {
|
|
283
293
|
return /* @__PURE__ */ o(this);
|
|
284
294
|
},
|
|
285
|
-
"~run"(e,
|
|
286
|
-
return e.value === this.literal ? e.typed = !0 : f(this, "type", e,
|
|
295
|
+
"~run"(e, s) {
|
|
296
|
+
return e.value === this.literal ? e.typed = !0 : f(this, "type", e, s), e;
|
|
287
297
|
}
|
|
288
298
|
};
|
|
289
299
|
}
|
|
290
300
|
// @__NO_SIDE_EFFECTS__
|
|
291
|
-
function
|
|
301
|
+
function Q(n, r) {
|
|
292
302
|
return {
|
|
293
303
|
kind: "schema",
|
|
294
304
|
type: "loose_object",
|
|
295
|
-
reference:
|
|
305
|
+
reference: Q,
|
|
296
306
|
expects: "Object",
|
|
297
307
|
async: !1,
|
|
298
308
|
entries: n,
|
|
299
|
-
message:
|
|
309
|
+
message: r,
|
|
300
310
|
get "~standard"() {
|
|
301
311
|
return /* @__PURE__ */ o(this);
|
|
302
312
|
},
|
|
303
|
-
"~run"(e,
|
|
313
|
+
"~run"(e, s) {
|
|
304
314
|
var l;
|
|
305
315
|
const t = e.value;
|
|
306
316
|
if (t && typeof t == "object") {
|
|
307
317
|
e.typed = !0, e.value = {};
|
|
308
|
-
for (const
|
|
309
|
-
const a = this.entries[
|
|
310
|
-
if (
|
|
311
|
-
const
|
|
318
|
+
for (const u in this.entries) {
|
|
319
|
+
const a = this.entries[u];
|
|
320
|
+
if (u in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
321
|
+
const i = u in t ? t[u] : /* @__PURE__ */ x(a), p = a["~run"]({ value: i }, s);
|
|
312
322
|
if (p.issues) {
|
|
313
323
|
const c = {
|
|
314
324
|
type: "object",
|
|
315
325
|
origin: "value",
|
|
316
326
|
input: t,
|
|
317
|
-
key:
|
|
318
|
-
value:
|
|
327
|
+
key: u,
|
|
328
|
+
value: i
|
|
319
329
|
};
|
|
320
330
|
for (const y of p.issues)
|
|
321
331
|
y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
|
|
322
|
-
if (e.issues || (e.issues = p.issues),
|
|
332
|
+
if (e.issues || (e.issues = p.issues), s.abortEarly) {
|
|
323
333
|
e.typed = !1;
|
|
324
334
|
break;
|
|
325
335
|
}
|
|
326
336
|
}
|
|
327
|
-
p.typed || (e.typed = !1), e.value[
|
|
328
|
-
} else if (a.fallback !== void 0) e.value[
|
|
329
|
-
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e,
|
|
337
|
+
p.typed || (e.typed = !1), e.value[u] = p.value;
|
|
338
|
+
} else if (a.fallback !== void 0) e.value[u] = /* @__PURE__ */ P(a);
|
|
339
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, s, {
|
|
330
340
|
input: void 0,
|
|
331
|
-
expected: `"${
|
|
341
|
+
expected: `"${u}"`,
|
|
332
342
|
path: [{
|
|
333
343
|
type: "object",
|
|
334
344
|
origin: "key",
|
|
335
345
|
input: t,
|
|
336
|
-
key:
|
|
337
|
-
value: t[
|
|
346
|
+
key: u,
|
|
347
|
+
value: t[u]
|
|
338
348
|
}]
|
|
339
|
-
}),
|
|
349
|
+
}), s.abortEarly))
|
|
340
350
|
break;
|
|
341
351
|
}
|
|
342
|
-
if (!e.issues || !
|
|
343
|
-
for (const
|
|
344
|
-
} else f(this, "type", e,
|
|
352
|
+
if (!e.issues || !s.abortEarly)
|
|
353
|
+
for (const u in t) /* @__PURE__ */ I(t, u) && !(u in this.entries) && (e.value[u] = t[u]);
|
|
354
|
+
} else f(this, "type", e, s);
|
|
345
355
|
return e;
|
|
346
356
|
}
|
|
347
357
|
};
|
|
348
358
|
}
|
|
349
359
|
// @__NO_SIDE_EFFECTS__
|
|
350
|
-
function
|
|
360
|
+
function T(n, r) {
|
|
361
|
+
return {
|
|
362
|
+
kind: "schema",
|
|
363
|
+
type: "nullish",
|
|
364
|
+
reference: T,
|
|
365
|
+
expects: `(${n.expects} | null | undefined)`,
|
|
366
|
+
async: !1,
|
|
367
|
+
wrapped: n,
|
|
368
|
+
default: r,
|
|
369
|
+
get "~standard"() {
|
|
370
|
+
return /* @__PURE__ */ o(this);
|
|
371
|
+
},
|
|
372
|
+
"~run"(e, s) {
|
|
373
|
+
return (e.value === null || e.value === void 0) && (this.default !== void 0 && (e.value = /* @__PURE__ */ x(this, e, s)), e.value === null || e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, s);
|
|
374
|
+
}
|
|
375
|
+
};
|
|
376
|
+
}
|
|
377
|
+
// @__NO_SIDE_EFFECTS__
|
|
378
|
+
function U(n) {
|
|
351
379
|
return {
|
|
352
380
|
kind: "schema",
|
|
353
381
|
type: "number",
|
|
354
|
-
reference:
|
|
382
|
+
reference: U,
|
|
355
383
|
expects: "number",
|
|
356
384
|
async: !1,
|
|
357
385
|
message: n,
|
|
358
386
|
get "~standard"() {
|
|
359
387
|
return /* @__PURE__ */ o(this);
|
|
360
388
|
},
|
|
361
|
-
"~run"(
|
|
362
|
-
return typeof
|
|
389
|
+
"~run"(r, e) {
|
|
390
|
+
return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : f(this, "type", r, e), r;
|
|
363
391
|
}
|
|
364
392
|
};
|
|
365
393
|
}
|
|
366
394
|
// @__NO_SIDE_EFFECTS__
|
|
367
|
-
function
|
|
395
|
+
function W(n, r) {
|
|
368
396
|
return {
|
|
369
397
|
kind: "schema",
|
|
370
398
|
type: "object",
|
|
371
|
-
reference:
|
|
399
|
+
reference: W,
|
|
372
400
|
expects: "Object",
|
|
373
401
|
async: !1,
|
|
374
402
|
entries: n,
|
|
375
|
-
message:
|
|
403
|
+
message: r,
|
|
376
404
|
get "~standard"() {
|
|
377
405
|
return /* @__PURE__ */ o(this);
|
|
378
406
|
},
|
|
379
|
-
"~run"(e,
|
|
407
|
+
"~run"(e, s) {
|
|
380
408
|
var l;
|
|
381
409
|
const t = e.value;
|
|
382
410
|
if (t && typeof t == "object") {
|
|
383
411
|
e.typed = !0, e.value = {};
|
|
384
|
-
for (const
|
|
385
|
-
const a = this.entries[
|
|
386
|
-
if (
|
|
387
|
-
const
|
|
412
|
+
for (const u in this.entries) {
|
|
413
|
+
const a = this.entries[u];
|
|
414
|
+
if (u in t || (a.type === "exact_optional" || a.type === "optional" || a.type === "nullish") && a.default !== void 0) {
|
|
415
|
+
const i = u in t ? t[u] : /* @__PURE__ */ x(a), p = a["~run"]({ value: i }, s);
|
|
388
416
|
if (p.issues) {
|
|
389
417
|
const c = {
|
|
390
418
|
type: "object",
|
|
391
419
|
origin: "value",
|
|
392
420
|
input: t,
|
|
393
|
-
key:
|
|
394
|
-
value:
|
|
421
|
+
key: u,
|
|
422
|
+
value: i
|
|
395
423
|
};
|
|
396
424
|
for (const y of p.issues)
|
|
397
425
|
y.path ? y.path.unshift(c) : y.path = [c], (l = e.issues) == null || l.push(y);
|
|
398
|
-
if (e.issues || (e.issues = p.issues),
|
|
426
|
+
if (e.issues || (e.issues = p.issues), s.abortEarly) {
|
|
399
427
|
e.typed = !1;
|
|
400
428
|
break;
|
|
401
429
|
}
|
|
402
430
|
}
|
|
403
|
-
p.typed || (e.typed = !1), e.value[
|
|
404
|
-
} else if (a.fallback !== void 0) e.value[
|
|
405
|
-
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e,
|
|
431
|
+
p.typed || (e.typed = !1), e.value[u] = p.value;
|
|
432
|
+
} else if (a.fallback !== void 0) e.value[u] = /* @__PURE__ */ P(a);
|
|
433
|
+
else if (a.type !== "exact_optional" && a.type !== "optional" && a.type !== "nullish" && (f(this, "key", e, s, {
|
|
406
434
|
input: void 0,
|
|
407
|
-
expected: `"${
|
|
435
|
+
expected: `"${u}"`,
|
|
408
436
|
path: [{
|
|
409
437
|
type: "object",
|
|
410
438
|
origin: "key",
|
|
411
439
|
input: t,
|
|
412
|
-
key:
|
|
413
|
-
value: t[
|
|
440
|
+
key: u,
|
|
441
|
+
value: t[u]
|
|
414
442
|
}]
|
|
415
|
-
}),
|
|
443
|
+
}), s.abortEarly))
|
|
416
444
|
break;
|
|
417
445
|
}
|
|
418
|
-
} else f(this, "type", e,
|
|
446
|
+
} else f(this, "type", e, s);
|
|
419
447
|
return e;
|
|
420
448
|
}
|
|
421
449
|
};
|
|
422
450
|
}
|
|
423
451
|
// @__NO_SIDE_EFFECTS__
|
|
424
|
-
function
|
|
452
|
+
function X(n, r) {
|
|
425
453
|
return {
|
|
426
454
|
kind: "schema",
|
|
427
455
|
type: "optional",
|
|
428
|
-
reference:
|
|
456
|
+
reference: X,
|
|
429
457
|
expects: `(${n.expects} | undefined)`,
|
|
430
458
|
async: !1,
|
|
431
459
|
wrapped: n,
|
|
432
|
-
default:
|
|
460
|
+
default: r,
|
|
433
461
|
get "~standard"() {
|
|
434
462
|
return /* @__PURE__ */ o(this);
|
|
435
463
|
},
|
|
436
|
-
"~run"(e,
|
|
437
|
-
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */
|
|
464
|
+
"~run"(e, s) {
|
|
465
|
+
return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ x(this, e, s)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, s);
|
|
438
466
|
}
|
|
439
467
|
};
|
|
440
468
|
}
|
|
441
469
|
// @__NO_SIDE_EFFECTS__
|
|
442
|
-
function
|
|
470
|
+
function Y(n, r) {
|
|
443
471
|
return {
|
|
444
472
|
kind: "schema",
|
|
445
473
|
type: "picklist",
|
|
446
|
-
reference:
|
|
447
|
-
expects: /* @__PURE__ */ D(n.map(
|
|
474
|
+
reference: Y,
|
|
475
|
+
expects: /* @__PURE__ */ D(n.map(w), "|"),
|
|
448
476
|
async: !1,
|
|
449
477
|
options: n,
|
|
450
|
-
message:
|
|
478
|
+
message: r,
|
|
451
479
|
get "~standard"() {
|
|
452
480
|
return /* @__PURE__ */ o(this);
|
|
453
481
|
},
|
|
454
|
-
"~run"(e,
|
|
455
|
-
return this.options.includes(e.value) ? e.typed = !0 : f(this, "type", e,
|
|
482
|
+
"~run"(e, s) {
|
|
483
|
+
return this.options.includes(e.value) ? e.typed = !0 : f(this, "type", e, s), e;
|
|
456
484
|
}
|
|
457
485
|
};
|
|
458
486
|
}
|
|
459
487
|
// @__NO_SIDE_EFFECTS__
|
|
460
|
-
function
|
|
488
|
+
function Z(n, r, e) {
|
|
461
489
|
return {
|
|
462
490
|
kind: "schema",
|
|
463
491
|
type: "record",
|
|
464
|
-
reference:
|
|
492
|
+
reference: Z,
|
|
465
493
|
expects: "Object",
|
|
466
494
|
async: !1,
|
|
467
495
|
key: n,
|
|
468
|
-
value:
|
|
496
|
+
value: r,
|
|
469
497
|
message: e,
|
|
470
498
|
get "~standard"() {
|
|
471
499
|
return /* @__PURE__ */ o(this);
|
|
472
500
|
},
|
|
473
|
-
"~run"(
|
|
474
|
-
var
|
|
475
|
-
const l =
|
|
501
|
+
"~run"(s, t) {
|
|
502
|
+
var u, a;
|
|
503
|
+
const l = s.value;
|
|
476
504
|
if (l && typeof l == "object") {
|
|
477
|
-
|
|
478
|
-
for (const
|
|
479
|
-
const p = l[
|
|
505
|
+
s.typed = !0, s.value = {};
|
|
506
|
+
for (const i in l) if (/* @__PURE__ */ I(l, i)) {
|
|
507
|
+
const p = l[i], c = this.key["~run"]({ value: i }, t);
|
|
480
508
|
if (c.issues) {
|
|
481
509
|
const b = {
|
|
482
510
|
type: "object",
|
|
483
511
|
origin: "key",
|
|
484
512
|
input: l,
|
|
485
|
-
key:
|
|
513
|
+
key: i,
|
|
486
514
|
value: p
|
|
487
515
|
};
|
|
488
516
|
for (const h of c.issues)
|
|
489
|
-
h.path = [b], (
|
|
490
|
-
if (
|
|
491
|
-
|
|
517
|
+
h.path = [b], (u = s.issues) == null || u.push(h);
|
|
518
|
+
if (s.issues || (s.issues = c.issues), t.abortEarly) {
|
|
519
|
+
s.typed = !1;
|
|
492
520
|
break;
|
|
493
521
|
}
|
|
494
522
|
}
|
|
@@ -498,88 +526,88 @@ function X(n, s, e) {
|
|
|
498
526
|
type: "object",
|
|
499
527
|
origin: "value",
|
|
500
528
|
input: l,
|
|
501
|
-
key:
|
|
529
|
+
key: i,
|
|
502
530
|
value: p
|
|
503
531
|
};
|
|
504
532
|
for (const h of y.issues)
|
|
505
|
-
h.path ? h.path.unshift(b) : h.path = [b], (a =
|
|
506
|
-
if (
|
|
507
|
-
|
|
533
|
+
h.path ? h.path.unshift(b) : h.path = [b], (a = s.issues) == null || a.push(h);
|
|
534
|
+
if (s.issues || (s.issues = y.issues), t.abortEarly) {
|
|
535
|
+
s.typed = !1;
|
|
508
536
|
break;
|
|
509
537
|
}
|
|
510
538
|
}
|
|
511
|
-
(!c.typed || !y.typed) && (
|
|
539
|
+
(!c.typed || !y.typed) && (s.typed = !1), c.typed && (s.value[c.value] = y.value);
|
|
512
540
|
}
|
|
513
|
-
} else f(this, "type",
|
|
514
|
-
return
|
|
541
|
+
} else f(this, "type", s, t);
|
|
542
|
+
return s;
|
|
515
543
|
}
|
|
516
544
|
};
|
|
517
545
|
}
|
|
518
546
|
// @__NO_SIDE_EFFECTS__
|
|
519
|
-
function
|
|
547
|
+
function $(n) {
|
|
520
548
|
return {
|
|
521
549
|
kind: "schema",
|
|
522
550
|
type: "string",
|
|
523
|
-
reference:
|
|
551
|
+
reference: $,
|
|
524
552
|
expects: "string",
|
|
525
553
|
async: !1,
|
|
526
554
|
message: n,
|
|
527
555
|
get "~standard"() {
|
|
528
556
|
return /* @__PURE__ */ o(this);
|
|
529
557
|
},
|
|
530
|
-
"~run"(
|
|
531
|
-
return typeof
|
|
558
|
+
"~run"(r, e) {
|
|
559
|
+
return typeof r.value == "string" ? r.typed = !0 : f(this, "type", r, e), r;
|
|
532
560
|
}
|
|
533
561
|
};
|
|
534
562
|
}
|
|
535
563
|
// @__NO_SIDE_EFFECTS__
|
|
536
564
|
function S(n) {
|
|
537
|
-
let
|
|
538
|
-
if (n) for (const e of n)
|
|
539
|
-
return
|
|
565
|
+
let r;
|
|
566
|
+
if (n) for (const e of n) r ? r.push(...e.issues) : r = e.issues;
|
|
567
|
+
return r;
|
|
540
568
|
}
|
|
541
569
|
// @__NO_SIDE_EFFECTS__
|
|
542
|
-
function
|
|
570
|
+
function ee(n, r) {
|
|
543
571
|
return {
|
|
544
572
|
kind: "schema",
|
|
545
573
|
type: "union",
|
|
546
|
-
reference:
|
|
574
|
+
reference: ee,
|
|
547
575
|
expects: /* @__PURE__ */ D(n.map((e) => e.expects), "|"),
|
|
548
576
|
async: !1,
|
|
549
577
|
options: n,
|
|
550
|
-
message:
|
|
578
|
+
message: r,
|
|
551
579
|
get "~standard"() {
|
|
552
580
|
return /* @__PURE__ */ o(this);
|
|
553
581
|
},
|
|
554
|
-
"~run"(e,
|
|
555
|
-
let t, l,
|
|
582
|
+
"~run"(e, s) {
|
|
583
|
+
let t, l, u;
|
|
556
584
|
for (const a of this.options) {
|
|
557
|
-
const
|
|
558
|
-
if (
|
|
585
|
+
const i = a["~run"]({ value: e.value }, s);
|
|
586
|
+
if (i.typed) if (i.issues) l ? l.push(i) : l = [i];
|
|
559
587
|
else {
|
|
560
|
-
t =
|
|
588
|
+
t = i;
|
|
561
589
|
break;
|
|
562
590
|
}
|
|
563
|
-
else
|
|
591
|
+
else u ? u.push(i) : u = [i];
|
|
564
592
|
}
|
|
565
593
|
if (t) return t;
|
|
566
594
|
if (l) {
|
|
567
595
|
if (l.length === 1) return l[0];
|
|
568
|
-
f(this, "type", e,
|
|
596
|
+
f(this, "type", e, s, { issues: /* @__PURE__ */ S(l) }), e.typed = !0;
|
|
569
597
|
} else {
|
|
570
|
-
if ((
|
|
571
|
-
f(this, "type", e,
|
|
598
|
+
if ((u == null ? void 0 : u.length) === 1) return u[0];
|
|
599
|
+
f(this, "type", e, s, { issues: /* @__PURE__ */ S(u) });
|
|
572
600
|
}
|
|
573
601
|
return e;
|
|
574
602
|
}
|
|
575
603
|
};
|
|
576
604
|
}
|
|
577
605
|
// @__NO_SIDE_EFFECTS__
|
|
578
|
-
function
|
|
606
|
+
function ne() {
|
|
579
607
|
return {
|
|
580
608
|
kind: "schema",
|
|
581
609
|
type: "unknown",
|
|
582
|
-
reference:
|
|
610
|
+
reference: ne,
|
|
583
611
|
expects: "unknown",
|
|
584
612
|
async: !1,
|
|
585
613
|
get "~standard"() {
|
|
@@ -591,23 +619,23 @@ function $() {
|
|
|
591
619
|
};
|
|
592
620
|
}
|
|
593
621
|
// @__NO_SIDE_EFFECTS__
|
|
594
|
-
function
|
|
622
|
+
function re(n, r, e) {
|
|
595
623
|
return {
|
|
596
624
|
kind: "schema",
|
|
597
625
|
type: "variant",
|
|
598
|
-
reference:
|
|
626
|
+
reference: re,
|
|
599
627
|
expects: "Object",
|
|
600
628
|
async: !1,
|
|
601
629
|
key: n,
|
|
602
|
-
options:
|
|
630
|
+
options: r,
|
|
603
631
|
message: e,
|
|
604
632
|
get "~standard"() {
|
|
605
633
|
return /* @__PURE__ */ o(this);
|
|
606
634
|
},
|
|
607
|
-
"~run"(
|
|
608
|
-
const l =
|
|
635
|
+
"~run"(s, t) {
|
|
636
|
+
const l = s.value;
|
|
609
637
|
if (l && typeof l == "object") {
|
|
610
|
-
let
|
|
638
|
+
let u, a = 0, i = this.key, p = [];
|
|
611
639
|
const c = (y, b) => {
|
|
612
640
|
for (const h of y.options) {
|
|
613
641
|
if (h.type === "variant") c(h, new Set(b).add(h.key));
|
|
@@ -619,58 +647,63 @@ function ee(n, s, e) {
|
|
|
619
647
|
typed: !1,
|
|
620
648
|
value: l[v]
|
|
621
649
|
}, { abortEarly: !0 }).issues : d.type !== "exact_optional" && d.type !== "optional" && d.type !== "nullish") {
|
|
622
|
-
O = !1,
|
|
650
|
+
O = !1, i !== v && (a < k || a === k && v in l && !(i in l)) && (a = k, i = v, p = []), i === v && p.push(h.entries[v].expects);
|
|
623
651
|
break;
|
|
624
652
|
}
|
|
625
653
|
k++;
|
|
626
654
|
}
|
|
627
655
|
if (O) {
|
|
628
656
|
const v = h["~run"]({ value: l }, t);
|
|
629
|
-
(!
|
|
657
|
+
(!u || !u.typed && v.typed) && (u = v);
|
|
630
658
|
}
|
|
631
659
|
}
|
|
632
|
-
if (
|
|
660
|
+
if (u && !u.issues) break;
|
|
633
661
|
}
|
|
634
662
|
};
|
|
635
|
-
if (c(this, /* @__PURE__ */ new Set([this.key])),
|
|
636
|
-
f(this, "type",
|
|
637
|
-
input: l[
|
|
663
|
+
if (c(this, /* @__PURE__ */ new Set([this.key])), u) return u;
|
|
664
|
+
f(this, "type", s, t, {
|
|
665
|
+
input: l[i],
|
|
638
666
|
expected: /* @__PURE__ */ D(p, "|"),
|
|
639
667
|
path: [{
|
|
640
668
|
type: "object",
|
|
641
669
|
origin: "value",
|
|
642
670
|
input: l,
|
|
643
|
-
key:
|
|
644
|
-
value: l[
|
|
671
|
+
key: i,
|
|
672
|
+
value: l[i]
|
|
645
673
|
}]
|
|
646
674
|
});
|
|
647
|
-
} else f(this, "type",
|
|
648
|
-
return
|
|
675
|
+
} else f(this, "type", s, t);
|
|
676
|
+
return s;
|
|
649
677
|
}
|
|
650
678
|
};
|
|
651
679
|
}
|
|
680
|
+
function te(n, r, e) {
|
|
681
|
+
const s = n["~run"]({ value: r }, /* @__PURE__ */ g(e));
|
|
682
|
+
if (s.issues) throw new K(s.issues);
|
|
683
|
+
return s.value;
|
|
684
|
+
}
|
|
652
685
|
// @__NO_SIDE_EFFECTS__
|
|
653
|
-
function
|
|
686
|
+
function ue(...n) {
|
|
654
687
|
return {
|
|
655
688
|
...n[0],
|
|
656
689
|
pipe: n,
|
|
657
690
|
get "~standard"() {
|
|
658
691
|
return /* @__PURE__ */ o(this);
|
|
659
692
|
},
|
|
660
|
-
"~run"(
|
|
661
|
-
for (const
|
|
662
|
-
if (
|
|
663
|
-
|
|
693
|
+
"~run"(r, e) {
|
|
694
|
+
for (const s of n) if (s.kind !== "metadata") {
|
|
695
|
+
if (r.issues && (s.kind === "schema" || s.kind === "transformation")) {
|
|
696
|
+
r.typed = !1;
|
|
664
697
|
break;
|
|
665
698
|
}
|
|
666
|
-
(!
|
|
699
|
+
(!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = s["~run"](r, e));
|
|
667
700
|
}
|
|
668
|
-
return
|
|
701
|
+
return r;
|
|
669
702
|
}
|
|
670
703
|
};
|
|
671
704
|
}
|
|
672
705
|
// @__NO_SIDE_EFFECTS__
|
|
673
|
-
function
|
|
706
|
+
function ie(...n) {
|
|
674
707
|
return {
|
|
675
708
|
...n[0],
|
|
676
709
|
pipe: n,
|
|
@@ -678,74 +711,77 @@ function re(...n) {
|
|
|
678
711
|
get "~standard"() {
|
|
679
712
|
return /* @__PURE__ */ o(this);
|
|
680
713
|
},
|
|
681
|
-
async "~run"(
|
|
682
|
-
for (const
|
|
683
|
-
if (
|
|
684
|
-
|
|
714
|
+
async "~run"(r, e) {
|
|
715
|
+
for (const s of n) if (s.kind !== "metadata") {
|
|
716
|
+
if (r.issues && (s.kind === "schema" || s.kind === "transformation")) {
|
|
717
|
+
r.typed = !1;
|
|
685
718
|
break;
|
|
686
719
|
}
|
|
687
|
-
(!
|
|
720
|
+
(!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = await s["~run"](r, e));
|
|
688
721
|
}
|
|
689
|
-
return
|
|
722
|
+
return r;
|
|
690
723
|
}
|
|
691
724
|
};
|
|
692
725
|
}
|
|
693
726
|
// @__NO_SIDE_EFFECTS__
|
|
694
|
-
function
|
|
695
|
-
const
|
|
727
|
+
function le(n, r, e) {
|
|
728
|
+
const s = n["~run"]({ value: r }, /* @__PURE__ */ g(e));
|
|
696
729
|
return {
|
|
697
|
-
typed:
|
|
698
|
-
success: !
|
|
699
|
-
output:
|
|
700
|
-
issues:
|
|
730
|
+
typed: s.typed,
|
|
731
|
+
success: !s.issues,
|
|
732
|
+
output: s.value,
|
|
733
|
+
issues: s.issues
|
|
701
734
|
};
|
|
702
735
|
}
|
|
703
736
|
// @__NO_SIDE_EFFECTS__
|
|
704
|
-
async function
|
|
705
|
-
const
|
|
737
|
+
async function ae(n, r, e) {
|
|
738
|
+
const s = await n["~run"]({ value: r }, /* @__PURE__ */ g(e));
|
|
706
739
|
return {
|
|
707
|
-
typed:
|
|
708
|
-
success: !
|
|
709
|
-
output:
|
|
710
|
-
issues:
|
|
740
|
+
typed: s.typed,
|
|
741
|
+
success: !s.issues,
|
|
742
|
+
output: s.value,
|
|
743
|
+
issues: s.issues
|
|
711
744
|
};
|
|
712
745
|
}
|
|
713
746
|
export {
|
|
747
|
+
K as ValiError,
|
|
714
748
|
f as _addIssue,
|
|
715
749
|
o as _getStandardProps,
|
|
716
750
|
I as _isValidObjectKey,
|
|
717
751
|
D as _joinExpects,
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
752
|
+
w as _stringify,
|
|
753
|
+
F as array,
|
|
754
|
+
R as boolean,
|
|
721
755
|
M as checkAsync,
|
|
722
|
-
|
|
723
|
-
|
|
724
|
-
|
|
756
|
+
B as custom,
|
|
757
|
+
se as fallback,
|
|
758
|
+
x as getDefault,
|
|
725
759
|
P as getFallback,
|
|
726
|
-
|
|
760
|
+
g as getGlobalConfig,
|
|
727
761
|
A as getGlobalMessage,
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
|
|
732
|
-
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
|
|
736
|
-
|
|
737
|
-
|
|
738
|
-
|
|
739
|
-
|
|
740
|
-
|
|
741
|
-
|
|
742
|
-
|
|
743
|
-
|
|
744
|
-
|
|
745
|
-
|
|
746
|
-
|
|
747
|
-
|
|
748
|
-
|
|
749
|
-
|
|
750
|
-
ee as
|
|
762
|
+
V as getSchemaMessage,
|
|
763
|
+
q as getSpecificMessage,
|
|
764
|
+
H as lazy,
|
|
765
|
+
J as literal,
|
|
766
|
+
Q as looseObject,
|
|
767
|
+
z as maxLength,
|
|
768
|
+
G as minLength,
|
|
769
|
+
L as nonEmpty,
|
|
770
|
+
T as nullish,
|
|
771
|
+
U as number,
|
|
772
|
+
W as object,
|
|
773
|
+
X as optional,
|
|
774
|
+
te as parse,
|
|
775
|
+
Y as picklist,
|
|
776
|
+
ue as pipe,
|
|
777
|
+
ie as pipeAsync,
|
|
778
|
+
Z as record,
|
|
779
|
+
le as safeParse,
|
|
780
|
+
ae as safeParseAsync,
|
|
781
|
+
$ as string,
|
|
782
|
+
N as transform,
|
|
783
|
+
C as trim,
|
|
784
|
+
ee as union,
|
|
785
|
+
ne as unknown,
|
|
786
|
+
re as variant
|
|
751
787
|
};
|