@useinsider/guido 1.3.1-beta.7276301 → 1.3.1-beta.cf510dd

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.
Files changed (80) hide show
  1. package/README.md +295 -664
  2. package/dist/@types/config/defaults.js +44 -0
  3. package/dist/@types/config/schemas.js +229 -0
  4. package/dist/@types/config/validator.js +56 -0
  5. package/dist/components/Guido.vue.js +1 -1
  6. package/dist/components/Guido.vue2.js +63 -89
  7. package/dist/components/organisms/email-preview/desktop-preview/EmailHeaderInfo.vue2.js +13 -13
  8. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue.js +5 -5
  9. package/dist/components/organisms/email-preview/mobile-preview/InboxView.vue2.js +13 -13
  10. package/dist/components/organisms/header/LeftSlot.vue.js +1 -1
  11. package/dist/components/organisms/header/LeftSlot.vue2.js +18 -15
  12. package/dist/components/organisms/header/RightSlot.vue.js +10 -10
  13. package/dist/components/organisms/onboarding/NewVersionPopup.vue2.js +22 -19
  14. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue.js +4 -4
  15. package/dist/components/organisms/unsubscribe/UnsubscribeBreadcrumb.vue2.js +8 -8
  16. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue.js +3 -3
  17. package/dist/components/organisms/unsubscribe/UnsubscribeTypeSelection.vue2.js +17 -17
  18. package/dist/components/organisms/unsubscribe/UnsubscribeWrapper.vue.js +10 -10
  19. package/dist/composables/useBlocksConfig.js +23 -20
  20. package/dist/composables/useConfig.js +51 -5
  21. package/dist/composables/useHtmlCompiler.js +20 -19
  22. package/dist/composables/useHtmlValidator.js +41 -41
  23. package/dist/composables/usePartner.js +19 -9
  24. package/dist/composables/useStripo.js +11 -11
  25. package/dist/composables/useTranslations.js +3 -2
  26. package/dist/config/compiler/unsubscribeCompilerRules.js +1 -1
  27. package/dist/enums/defaults.js +3 -67
  28. package/dist/enums/unsubscribe.js +23 -20
  29. package/dist/extensions/Blocks/Recommendation/store/recommendation.js +12 -11
  30. package/dist/guido.css +1 -1
  31. package/dist/library.js +12 -2
  32. package/dist/node_modules/lodash-es/_arrayLikeKeys.js +10 -10
  33. package/dist/node_modules/valibot/dist/index.js +476 -103
  34. package/dist/services/templateLibraryApi.js +18 -18
  35. package/dist/src/@types/config/defaults.d.ts +68 -0
  36. package/dist/src/@types/config/index.d.ts +14 -0
  37. package/dist/src/@types/config/schemas.d.ts +505 -0
  38. package/dist/src/@types/config/types.d.ts +142 -0
  39. package/dist/src/@types/config/validator.d.ts +119 -0
  40. package/dist/src/@types/generic.d.ts +4 -45
  41. package/dist/src/components/Guido.vue.d.ts +13 -12
  42. package/dist/src/components/wrappers/WpModal.vue.d.ts +1 -1
  43. package/dist/src/composables/useConfig.d.ts +184 -2
  44. package/dist/src/composables/usePartner.d.ts +8 -0
  45. package/dist/src/enums/defaults.d.ts +4 -6
  46. package/dist/src/enums/unsubscribe.d.ts +5 -1
  47. package/dist/src/library.d.ts +3 -1
  48. package/dist/src/stores/config.d.ts +1547 -102
  49. package/dist/stores/config.js +141 -9
  50. package/package.json +1 -1
  51. package/dist/node_modules/lodash-es/_apply.js +0 -16
  52. package/dist/node_modules/lodash-es/_assignMergeValue.js +0 -8
  53. package/dist/node_modules/lodash-es/_assignValue.js +0 -10
  54. package/dist/node_modules/lodash-es/_baseAssignValue.js +0 -12
  55. package/dist/node_modules/lodash-es/_baseCreate.js +0 -17
  56. package/dist/node_modules/lodash-es/_baseKeysIn.js +0 -15
  57. package/dist/node_modules/lodash-es/_baseMerge.js +0 -20
  58. package/dist/node_modules/lodash-es/_baseMergeDeep.js +0 -31
  59. package/dist/node_modules/lodash-es/_baseRest.js +0 -9
  60. package/dist/node_modules/lodash-es/_baseSetToString.js +0 -14
  61. package/dist/node_modules/lodash-es/_cloneArrayBuffer.js +0 -8
  62. package/dist/node_modules/lodash-es/_cloneBuffer.js +0 -9
  63. package/dist/node_modules/lodash-es/_cloneTypedArray.js +0 -8
  64. package/dist/node_modules/lodash-es/_copyArray.js +0 -9
  65. package/dist/node_modules/lodash-es/_copyObject.js +0 -14
  66. package/dist/node_modules/lodash-es/_createAssigner.js +0 -15
  67. package/dist/node_modules/lodash-es/_defineProperty.js +0 -11
  68. package/dist/node_modules/lodash-es/_getPrototype.js +0 -5
  69. package/dist/node_modules/lodash-es/_initCloneObject.js +0 -9
  70. package/dist/node_modules/lodash-es/_nativeKeysIn.js +0 -10
  71. package/dist/node_modules/lodash-es/_overRest.js +0 -15
  72. package/dist/node_modules/lodash-es/_safeGet.js +0 -7
  73. package/dist/node_modules/lodash-es/_setToString.js +0 -6
  74. package/dist/node_modules/lodash-es/_shortOut.js +0 -16
  75. package/dist/node_modules/lodash-es/constant.js +0 -8
  76. package/dist/node_modules/lodash-es/isArrayLikeObject.js +0 -8
  77. package/dist/node_modules/lodash-es/isPlainObject.js +0 -16
  78. package/dist/node_modules/lodash-es/keysIn.js +0 -9
  79. package/dist/node_modules/lodash-es/merge.js +0 -8
  80. package/dist/node_modules/lodash-es/toPlainObject.js +0 -8
@@ -1,190 +1,563 @@
1
- var i;
1
+ var v;
2
2
  // @__NO_SIDE_EFFECTS__
3
- function b(e) {
3
+ function E(n) {
4
4
  return {
5
- lang: (e == null ? void 0 : e.lang) ?? (i == null ? void 0 : i.lang),
6
- message: e == null ? void 0 : e.message,
7
- abortEarly: (e == null ? void 0 : e.abortEarly) ?? (i == null ? void 0 : i.abortEarly),
8
- abortPipeEarly: (e == null ? void 0 : e.abortPipeEarly) ?? (i == null ? void 0 : i.abortPipeEarly)
5
+ lang: (n == null ? void 0 : n.lang) ?? (v == null ? void 0 : v.lang),
6
+ message: n == null ? void 0 : n.message,
7
+ abortEarly: (n == null ? void 0 : n.abortEarly) ?? (v == null ? void 0 : v.abortEarly),
8
+ abortPipeEarly: (n == null ? void 0 : n.abortPipeEarly) ?? (v == null ? void 0 : v.abortPipeEarly)
9
9
  };
10
10
  }
11
- var p;
11
+ var g;
12
12
  // @__NO_SIDE_EFFECTS__
13
- function k(e) {
14
- return p == null ? void 0 : p.get(e);
13
+ function D(n) {
14
+ return g == null ? void 0 : g.get(n);
15
15
  }
16
- var c;
16
+ var d;
17
17
  // @__NO_SIDE_EFFECTS__
18
- function E(e) {
19
- return c == null ? void 0 : c.get(e);
18
+ function w(n) {
19
+ return d == null ? void 0 : d.get(n);
20
20
  }
21
- var m;
21
+ var x;
22
22
  // @__NO_SIDE_EFFECTS__
23
- function P(e, n) {
24
- var r;
25
- return (r = m == null ? void 0 : m.get(e)) == null ? void 0 : r.get(n);
23
+ function A(n, r) {
24
+ var e;
25
+ return (e = x == null ? void 0 : x.get(n)) == null ? void 0 : e.get(r);
26
26
  }
27
27
  // @__NO_SIDE_EFFECTS__
28
- function $(e) {
29
- var r, s;
30
- const n = typeof e;
31
- return n === "string" ? `"${e}"` : n === "number" || n === "bigint" || n === "boolean" ? `${e}` : n === "object" || n === "function" ? (e && ((s = (r = Object.getPrototypeOf(e)) == null ? void 0 : r.constructor) == null ? void 0 : s.name)) ?? "null" : n;
28
+ function $(n) {
29
+ var e, t;
30
+ const r = typeof n;
31
+ return r === "string" ? `"${n}"` : r === "number" || r === "bigint" || r === "boolean" ? `${n}` : r === "object" || r === "function" ? (n && ((t = (e = Object.getPrototypeOf(n)) == null ? void 0 : e.constructor) == null ? void 0 : t.name)) ?? "null" : r;
32
32
  }
33
- function l(e, n, r, s, u) {
34
- const f = u && "input" in u ? u.input : r.value, y = (u == null ? void 0 : u.expected) ?? e.expects ?? null, v = (u == null ? void 0 : u.received) ?? /* @__PURE__ */ $(f), a = {
35
- kind: e.kind,
36
- type: e.type,
37
- input: f,
38
- expected: y,
39
- received: v,
40
- message: `Invalid ${n}: ${y ? `Expected ${y} but r` : "R"}eceived ${v}`,
41
- requirement: e.requirement,
42
- path: u == null ? void 0 : u.path,
43
- issues: u == null ? void 0 : u.issues,
44
- lang: s.lang,
45
- abortEarly: s.abortEarly,
46
- abortPipeEarly: s.abortPipeEarly
47
- }, g = e.kind === "schema", t = (u == null ? void 0 : u.message) ?? e.message ?? /* @__PURE__ */ P(e.reference, a.lang) ?? (g ? /* @__PURE__ */ E(a.lang) : null) ?? s.message ?? /* @__PURE__ */ k(a.lang);
48
- t !== void 0 && (a.message = typeof t == "function" ? (
33
+ function y(n, r, e, t, i) {
34
+ const a = i && "input" in i ? i.input : e.value, s = (i == null ? void 0 : i.expected) ?? n.expects ?? null, l = (i == null ? void 0 : i.received) ?? /* @__PURE__ */ $(a), u = {
35
+ kind: n.kind,
36
+ type: n.type,
37
+ input: a,
38
+ expected: s,
39
+ received: l,
40
+ message: `Invalid ${r}: ${s ? `Expected ${s} but r` : "R"}eceived ${l}`,
41
+ requirement: n.requirement,
42
+ path: i == null ? void 0 : i.path,
43
+ issues: i == null ? void 0 : i.issues,
44
+ lang: t.lang,
45
+ abortEarly: t.abortEarly,
46
+ abortPipeEarly: t.abortPipeEarly
47
+ }, p = n.kind === "schema", c = (i == null ? void 0 : i.message) ?? n.message ?? /* @__PURE__ */ A(n.reference, u.lang) ?? (p ? /* @__PURE__ */ w(u.lang) : null) ?? t.message ?? /* @__PURE__ */ D(u.lang);
48
+ c !== void 0 && (u.message = typeof c == "function" ? (
49
49
  // @ts-expect-error
50
- t(a)
51
- ) : t), g && (r.typed = !1), r.issues ? r.issues.push(a) : r.issues = [a];
50
+ c(u)
51
+ ) : c), p && (e.typed = !1), e.issues ? e.issues.push(u) : e.issues = [u];
52
52
  }
53
53
  // @__NO_SIDE_EFFECTS__
54
- function d(e) {
54
+ function f(n) {
55
55
  return {
56
56
  version: 1,
57
57
  vendor: "valibot",
58
- validate(n) {
59
- return e["~run"]({ value: n }, /* @__PURE__ */ b());
58
+ validate(r) {
59
+ return n["~run"]({ value: r }, /* @__PURE__ */ E());
60
60
  }
61
61
  };
62
62
  }
63
63
  // @__NO_SIDE_EFFECTS__
64
- function x(e, n) {
64
+ function S(n, r) {
65
+ const e = [...new Set(n)];
66
+ return e.length > 1 ? `(${e.join(` ${r} `)})` : e[0] ?? "never";
67
+ }
68
+ // @__NO_SIDE_EFFECTS__
69
+ function O(n, r) {
65
70
  return {
66
71
  kind: "validation",
67
72
  type: "check",
68
- reference: x,
73
+ reference: O,
69
74
  async: !0,
70
75
  expects: null,
71
- requirement: e,
72
- message: n,
73
- async "~run"(r, s) {
74
- return r.typed && !await this.requirement(r.value) && l(this, "input", r, s), r;
76
+ requirement: n,
77
+ message: r,
78
+ async "~run"(e, t) {
79
+ return e.typed && !await this.requirement(e.value) && y(this, "input", e, t), e;
75
80
  }
76
81
  };
77
82
  }
78
83
  // @__NO_SIDE_EFFECTS__
79
- function _(e, n) {
84
+ function I(n, r) {
80
85
  return {
81
86
  kind: "validation",
82
87
  type: "max_length",
83
- reference: _,
88
+ reference: I,
84
89
  async: !1,
85
- expects: `<=${e}`,
86
- requirement: e,
87
- message: n,
88
- "~run"(r, s) {
89
- return r.typed && r.value.length > this.requirement && l(this, "length", r, s, {
90
- received: `${r.value.length}`
91
- }), r;
90
+ expects: `<=${n}`,
91
+ requirement: n,
92
+ message: r,
93
+ "~run"(e, t) {
94
+ return e.typed && e.value.length > this.requirement && y(this, "length", e, t, {
95
+ received: `${e.value.length}`
96
+ }), e;
92
97
  }
93
98
  };
94
99
  }
95
100
  // @__NO_SIDE_EFFECTS__
96
- function S(e) {
101
+ function q(n, r) {
102
+ return {
103
+ kind: "validation",
104
+ type: "min_length",
105
+ reference: q,
106
+ async: !1,
107
+ expects: `>=${n}`,
108
+ requirement: n,
109
+ message: r,
110
+ "~run"(e, t) {
111
+ return e.typed && e.value.length < this.requirement && y(this, "length", e, t, {
112
+ received: `${e.value.length}`
113
+ }), e;
114
+ }
115
+ };
116
+ }
117
+ // @__NO_SIDE_EFFECTS__
118
+ function M(n) {
97
119
  return {
98
120
  kind: "validation",
99
121
  type: "non_empty",
100
- reference: S,
122
+ reference: M,
101
123
  async: !1,
102
124
  expects: "!0",
103
- message: e,
104
- "~run"(n, r) {
105
- return n.typed && n.value.length === 0 && l(this, "length", n, r, {
125
+ message: n,
126
+ "~run"(r, e) {
127
+ return r.typed && r.value.length === 0 && y(this, "length", r, e, {
106
128
  received: "0"
107
- }), n;
129
+ }), r;
108
130
  }
109
131
  };
110
132
  }
111
133
  // @__NO_SIDE_EFFECTS__
112
- function o() {
134
+ function G() {
113
135
  return {
114
136
  kind: "transformation",
115
137
  type: "trim",
116
- reference: o,
138
+ reference: G,
139
+ async: !1,
140
+ "~run"(n) {
141
+ return n.value = n.value.trim(), n;
142
+ }
143
+ };
144
+ }
145
+ // @__NO_SIDE_EFFECTS__
146
+ function L(n, r, e) {
147
+ return typeof n.fallback == "function" ? (
148
+ // @ts-expect-error
149
+ n.fallback(r, e)
150
+ ) : (
151
+ // @ts-expect-error
152
+ n.fallback
153
+ );
154
+ }
155
+ // @__NO_SIDE_EFFECTS__
156
+ function _(n, r, e) {
157
+ return typeof n.default == "function" ? (
158
+ // @ts-expect-error
159
+ n.default(r, e)
160
+ ) : (
161
+ // @ts-expect-error
162
+ n.default
163
+ );
164
+ }
165
+ // @__NO_SIDE_EFFECTS__
166
+ function N(n, r) {
167
+ return {
168
+ kind: "schema",
169
+ type: "array",
170
+ reference: N,
171
+ expects: "Array",
172
+ async: !1,
173
+ item: n,
174
+ message: r,
175
+ get "~standard"() {
176
+ return /* @__PURE__ */ f(this);
177
+ },
178
+ "~run"(e, t) {
179
+ var a;
180
+ const i = e.value;
181
+ if (Array.isArray(i)) {
182
+ e.typed = !0, e.value = [];
183
+ for (let s = 0; s < i.length; s++) {
184
+ const l = i[s], u = this.item["~run"]({ value: l }, t);
185
+ if (u.issues) {
186
+ const p = {
187
+ type: "array",
188
+ origin: "value",
189
+ input: i,
190
+ key: s,
191
+ value: l
192
+ };
193
+ for (const c of u.issues)
194
+ c.path ? c.path.unshift(p) : c.path = [p], (a = e.issues) == null || a.push(c);
195
+ if (e.issues || (e.issues = u.issues), t.abortEarly) {
196
+ e.typed = !1;
197
+ break;
198
+ }
199
+ }
200
+ u.typed || (e.typed = !1), e.value.push(u.value);
201
+ }
202
+ } else
203
+ y(this, "type", e, t);
204
+ return e;
205
+ }
206
+ };
207
+ }
208
+ // @__NO_SIDE_EFFECTS__
209
+ function C(n) {
210
+ return {
211
+ kind: "schema",
212
+ type: "boolean",
213
+ reference: C,
214
+ expects: "boolean",
215
+ async: !1,
216
+ message: n,
217
+ get "~standard"() {
218
+ return /* @__PURE__ */ f(this);
219
+ },
220
+ "~run"(r, e) {
221
+ return typeof r.value == "boolean" ? r.typed = !0 : y(this, "type", r, e), r;
222
+ }
223
+ };
224
+ }
225
+ // @__NO_SIDE_EFFECTS__
226
+ function F(n, r) {
227
+ return {
228
+ kind: "schema",
229
+ type: "custom",
230
+ reference: F,
231
+ expects: "unknown",
232
+ async: !1,
233
+ check: n,
234
+ message: r,
235
+ get "~standard"() {
236
+ return /* @__PURE__ */ f(this);
237
+ },
238
+ "~run"(e, t) {
239
+ return this.check(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
240
+ }
241
+ };
242
+ }
243
+ // @__NO_SIDE_EFFECTS__
244
+ function K(n, r) {
245
+ return {
246
+ kind: "schema",
247
+ type: "literal",
248
+ reference: K,
249
+ expects: /* @__PURE__ */ $(n),
250
+ async: !1,
251
+ literal: n,
252
+ message: r,
253
+ get "~standard"() {
254
+ return /* @__PURE__ */ f(this);
255
+ },
256
+ "~run"(e, t) {
257
+ return e.value === this.literal ? e.typed = !0 : y(this, "type", e, t), e;
258
+ }
259
+ };
260
+ }
261
+ // @__NO_SIDE_EFFECTS__
262
+ function R(n) {
263
+ return {
264
+ kind: "schema",
265
+ type: "number",
266
+ reference: R,
267
+ expects: "number",
117
268
  async: !1,
118
- "~run"(e) {
119
- return e.value = e.value.trim(), e;
269
+ message: n,
270
+ get "~standard"() {
271
+ return /* @__PURE__ */ f(this);
272
+ },
273
+ "~run"(r, e) {
274
+ return typeof r.value == "number" && !isNaN(r.value) ? r.typed = !0 : y(this, "type", r, e), r;
120
275
  }
121
276
  };
122
277
  }
123
278
  // @__NO_SIDE_EFFECTS__
124
- function q(e) {
279
+ function V(n, r) {
280
+ return {
281
+ kind: "schema",
282
+ type: "object",
283
+ reference: V,
284
+ expects: "Object",
285
+ async: !1,
286
+ entries: n,
287
+ message: r,
288
+ get "~standard"() {
289
+ return /* @__PURE__ */ f(this);
290
+ },
291
+ "~run"(e, t) {
292
+ var a;
293
+ const i = e.value;
294
+ if (i && typeof i == "object") {
295
+ e.typed = !0, e.value = {};
296
+ for (const s in this.entries) {
297
+ const l = this.entries[s];
298
+ if (s in i || (l.type === "exact_optional" || l.type === "optional" || l.type === "nullish") && // @ts-expect-error
299
+ l.default !== void 0) {
300
+ const u = s in i ? (
301
+ // @ts-expect-error
302
+ i[s]
303
+ ) : /* @__PURE__ */ _(l), p = l["~run"]({ value: u }, t);
304
+ if (p.issues) {
305
+ const c = {
306
+ type: "object",
307
+ origin: "value",
308
+ input: i,
309
+ key: s,
310
+ value: u
311
+ };
312
+ for (const m of p.issues)
313
+ m.path ? m.path.unshift(c) : m.path = [c], (a = e.issues) == null || a.push(m);
314
+ if (e.issues || (e.issues = p.issues), t.abortEarly) {
315
+ e.typed = !1;
316
+ break;
317
+ }
318
+ }
319
+ p.typed || (e.typed = !1), e.value[s] = p.value;
320
+ } else if (l.fallback !== void 0)
321
+ e.value[s] = /* @__PURE__ */ L(l);
322
+ else if (l.type !== "exact_optional" && l.type !== "optional" && l.type !== "nullish" && (y(this, "key", e, t, {
323
+ input: void 0,
324
+ expected: `"${s}"`,
325
+ path: [
326
+ {
327
+ type: "object",
328
+ origin: "key",
329
+ input: i,
330
+ key: s,
331
+ // @ts-expect-error
332
+ value: i[s]
333
+ }
334
+ ]
335
+ }), t.abortEarly))
336
+ break;
337
+ }
338
+ } else
339
+ y(this, "type", e, t);
340
+ return e;
341
+ }
342
+ };
343
+ }
344
+ // @__NO_SIDE_EFFECTS__
345
+ function z(n, r) {
346
+ return {
347
+ kind: "schema",
348
+ type: "optional",
349
+ reference: z,
350
+ expects: `(${n.expects} | undefined)`,
351
+ async: !1,
352
+ wrapped: n,
353
+ default: r,
354
+ get "~standard"() {
355
+ return /* @__PURE__ */ f(this);
356
+ },
357
+ "~run"(e, t) {
358
+ return e.value === void 0 && (this.default !== void 0 && (e.value = /* @__PURE__ */ _(this, e, t)), e.value === void 0) ? (e.typed = !0, e) : this.wrapped["~run"](e, t);
359
+ }
360
+ };
361
+ }
362
+ // @__NO_SIDE_EFFECTS__
363
+ function B(n, r) {
364
+ return {
365
+ kind: "schema",
366
+ type: "picklist",
367
+ reference: B,
368
+ expects: /* @__PURE__ */ S(n.map($), "|"),
369
+ async: !1,
370
+ options: n,
371
+ message: r,
372
+ get "~standard"() {
373
+ return /* @__PURE__ */ f(this);
374
+ },
375
+ "~run"(e, t) {
376
+ return this.options.includes(e.value) ? e.typed = !0 : y(this, "type", e, t), e;
377
+ }
378
+ };
379
+ }
380
+ // @__NO_SIDE_EFFECTS__
381
+ function H(n) {
125
382
  return {
126
383
  kind: "schema",
127
384
  type: "string",
128
- reference: q,
385
+ reference: H,
129
386
  expects: "string",
130
387
  async: !1,
388
+ message: n,
389
+ get "~standard"() {
390
+ return /* @__PURE__ */ f(this);
391
+ },
392
+ "~run"(r, e) {
393
+ return typeof r.value == "string" ? r.typed = !0 : y(this, "type", r, e), r;
394
+ }
395
+ };
396
+ }
397
+ // @__NO_SIDE_EFFECTS__
398
+ function J(n, r, e) {
399
+ return {
400
+ kind: "schema",
401
+ type: "variant",
402
+ reference: J,
403
+ expects: "Object",
404
+ async: !1,
405
+ key: n,
406
+ options: r,
131
407
  message: e,
132
408
  get "~standard"() {
133
- return /* @__PURE__ */ d(this);
409
+ return /* @__PURE__ */ f(this);
410
+ },
411
+ "~run"(t, i) {
412
+ const a = t.value;
413
+ if (a && typeof a == "object") {
414
+ let s, l = 0, u = this.key, p = [];
415
+ const c = (m, j) => {
416
+ for (const h of m.options) {
417
+ if (h.type === "variant")
418
+ c(h, new Set(j).add(h.key));
419
+ else {
420
+ let P = !0, b = 0;
421
+ for (const o of j) {
422
+ const k = h.entries[o];
423
+ if (o in a ? k["~run"](
424
+ // @ts-expect-error
425
+ { typed: !1, value: a[o] },
426
+ { abortEarly: !0 }
427
+ ).issues : k.type !== "exact_optional" && k.type !== "optional" && k.type !== "nullish") {
428
+ P = !1, u !== o && (l < b || l === b && o in a && !(u in a)) && (l = b, u = o, p = []), u === o && p.push(
429
+ h.entries[o].expects
430
+ );
431
+ break;
432
+ }
433
+ b++;
434
+ }
435
+ if (P) {
436
+ const o = h["~run"]({ value: a }, i);
437
+ (!s || !s.typed && o.typed) && (s = o);
438
+ }
439
+ }
440
+ if (s && !s.issues)
441
+ break;
442
+ }
443
+ };
444
+ if (c(this, /* @__PURE__ */ new Set([this.key])), s)
445
+ return s;
446
+ y(this, "type", t, i, {
447
+ // @ts-expect-error
448
+ input: a[u],
449
+ expected: /* @__PURE__ */ S(p, "|"),
450
+ path: [
451
+ {
452
+ type: "object",
453
+ origin: "value",
454
+ input: a,
455
+ key: u,
456
+ // @ts-expect-error
457
+ value: a[u]
458
+ }
459
+ ]
460
+ });
461
+ } else
462
+ y(this, "type", t, i);
463
+ return t;
464
+ }
465
+ };
466
+ }
467
+ // @__NO_SIDE_EFFECTS__
468
+ function Q(...n) {
469
+ return {
470
+ ...n[0],
471
+ pipe: n,
472
+ get "~standard"() {
473
+ return /* @__PURE__ */ f(this);
134
474
  },
135
- "~run"(n, r) {
136
- return typeof n.value == "string" ? n.typed = !0 : l(this, "type", n, r), n;
475
+ "~run"(r, e) {
476
+ for (const t of n)
477
+ if (t.kind !== "metadata") {
478
+ if (r.issues && (t.kind === "schema" || t.kind === "transformation")) {
479
+ r.typed = !1;
480
+ break;
481
+ }
482
+ (!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = t["~run"](r, e));
483
+ }
484
+ return r;
137
485
  }
138
486
  };
139
487
  }
140
488
  // @__NO_SIDE_EFFECTS__
141
- function w(...e) {
489
+ function T(...n) {
142
490
  return {
143
- ...e[0],
144
- pipe: e,
491
+ ...n[0],
492
+ pipe: n,
145
493
  async: !0,
146
494
  get "~standard"() {
147
- return /* @__PURE__ */ d(this);
495
+ return /* @__PURE__ */ f(this);
148
496
  },
149
- async "~run"(n, r) {
150
- for (const s of e)
151
- if (s.kind !== "metadata") {
152
- if (n.issues && (s.kind === "schema" || s.kind === "transformation")) {
153
- n.typed = !1;
497
+ async "~run"(r, e) {
498
+ for (const t of n)
499
+ if (t.kind !== "metadata") {
500
+ if (r.issues && (t.kind === "schema" || t.kind === "transformation")) {
501
+ r.typed = !1;
154
502
  break;
155
503
  }
156
- (!n.issues || !r.abortEarly && !r.abortPipeEarly) && (n = await s["~run"](n, r));
504
+ (!r.issues || !e.abortEarly && !e.abortPipeEarly) && (r = await t["~run"](r, e));
157
505
  }
158
- return n;
506
+ return r;
159
507
  }
160
508
  };
161
509
  }
162
510
  // @__NO_SIDE_EFFECTS__
163
- async function A(e, n, r) {
164
- const s = await e["~run"](
165
- { value: n },
166
- /* @__PURE__ */ b(r)
511
+ function U(n, r, e) {
512
+ const t = n["~run"]({ value: r }, /* @__PURE__ */ E(e));
513
+ return {
514
+ typed: t.typed,
515
+ success: !t.issues,
516
+ output: t.value,
517
+ issues: t.issues
518
+ };
519
+ }
520
+ // @__NO_SIDE_EFFECTS__
521
+ async function W(n, r, e) {
522
+ const t = await n["~run"](
523
+ { value: r },
524
+ /* @__PURE__ */ E(e)
167
525
  );
168
526
  return {
169
- typed: s.typed,
170
- success: !s.issues,
171
- output: s.value,
172
- issues: s.issues
527
+ typed: t.typed,
528
+ success: !t.issues,
529
+ output: t.value,
530
+ issues: t.issues
173
531
  };
174
532
  }
175
533
  export {
176
- l as _addIssue,
177
- d as _getStandardProps,
534
+ y as _addIssue,
535
+ f as _getStandardProps,
536
+ S as _joinExpects,
178
537
  $ as _stringify,
179
- x as checkAsync,
180
- b as getGlobalConfig,
181
- k as getGlobalMessage,
182
- E as getSchemaMessage,
183
- P as getSpecificMessage,
184
- _ as maxLength,
185
- S as nonEmpty,
186
- w as pipeAsync,
187
- A as safeParseAsync,
188
- q as string,
189
- o as trim
538
+ N as array,
539
+ C as boolean,
540
+ O as checkAsync,
541
+ F as custom,
542
+ _ as getDefault,
543
+ L as getFallback,
544
+ E as getGlobalConfig,
545
+ D as getGlobalMessage,
546
+ w as getSchemaMessage,
547
+ A as getSpecificMessage,
548
+ K as literal,
549
+ I as maxLength,
550
+ q as minLength,
551
+ M as nonEmpty,
552
+ R as number,
553
+ V as object,
554
+ z as optional,
555
+ B as picklist,
556
+ Q as pipe,
557
+ T as pipeAsync,
558
+ U as safeParse,
559
+ W as safeParseAsync,
560
+ H as string,
561
+ G as trim,
562
+ J as variant
190
563
  };