@useinsider/guido 3.13.1 → 3.14.0-beta.8d5df20

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