@authhero/kysely-adapter 0.5.1 → 0.5.2

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.
@@ -1,11 +1,11 @@
1
1
  var Hn = Object.defineProperty;
2
2
  var Yn = (n, e, t) => e in n ? Hn(n, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[e] = t;
3
- var Jt = (n, e, t) => Yn(n, typeof e != "symbol" ? e + "" : e, t);
3
+ var Ht = (n, e, t) => Yn(n, typeof e != "symbol" ? e + "" : e, t);
4
4
  var Nt = class extends Error {
5
5
  constructor(e = 500, t) {
6
6
  super(t == null ? void 0 : t.message, { cause: t == null ? void 0 : t.cause });
7
- Jt(this, "res");
8
- Jt(this, "status");
7
+ Ht(this, "res");
8
+ Ht(this, "status");
9
9
  this.res = t == null ? void 0 : t.res, this.status = e;
10
10
  }
11
11
  getResponse() {
@@ -41,10 +41,10 @@ function Gn(n) {
41
41
  };
42
42
  };
43
43
  }
44
- function P(n) {
44
+ function R(n) {
45
45
  const e = { ...n };
46
46
  for (const t in e)
47
- e[t] === null ? delete e[t] : typeof e[t] == "object" && (Array.isArray(e[t]) ? e[t] = e[t].map(P) : e[t] = P(e[t]));
47
+ e[t] === null ? delete e[t] : typeof e[t] == "object" && (Array.isArray(e[t]) ? e[t] = e[t].map(R) : e[t] = R(e[t]));
48
48
  return e;
49
49
  }
50
50
  function Xn(n, e) {
@@ -75,16 +75,16 @@ function tr(n) {
75
75
  param: Object.assign(Object.assign({}, (T = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || T === void 0 ? void 0 : T.param), Q)
76
76
  } : void 0), ue = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(ce).length > 0 ? { _internal: ce } : void 0), Object.keys(de).length > 0 ? { metadata: de } : void 0) }));
77
77
  if (er(this, "ZodObject")) {
78
- const Ae = this.extend;
79
- ue.extend = function(...Re) {
80
- var J, H, Y, le, be, Te;
81
- const Oe = Ae.apply(this, Re);
82
- return Oe._def.openapi = {
78
+ const Re = this.extend;
79
+ ue.extend = function(...$e) {
80
+ var J, H, Y, le, Te, Oe;
81
+ const Se = Re.apply(this, $e);
82
+ return Se._def.openapi = {
83
83
  _internal: {
84
- extendedFrom: !((H = (J = this._def.openapi) === null || J === void 0 ? void 0 : J._internal) === null || H === void 0) && H.refId ? { refId: (le = (Y = this._def.openapi) === null || Y === void 0 ? void 0 : Y._internal) === null || le === void 0 ? void 0 : le.refId, schema: this } : (be = this._def.openapi) === null || be === void 0 ? void 0 : be._internal.extendedFrom
84
+ extendedFrom: !((H = (J = this._def.openapi) === null || J === void 0 ? void 0 : J._internal) === null || H === void 0) && H.refId ? { refId: (le = (Y = this._def.openapi) === null || Y === void 0 ? void 0 : Y._internal) === null || le === void 0 ? void 0 : le.refId, schema: this } : (Te = this._def.openapi) === null || Te === void 0 ? void 0 : Te._internal.extendedFrom
85
85
  },
86
- metadata: (Te = Oe._def.openapi) === null || Te === void 0 ? void 0 : Te.metadata
87
- }, Oe;
86
+ metadata: (Oe = Se._def.openapi) === null || Oe === void 0 ? void 0 : Oe.metadata
87
+ }, Se;
88
88
  };
89
89
  }
90
90
  return ue;
@@ -145,14 +145,14 @@ var I;
145
145
  }
146
146
  n.joinValues = r, n.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
147
147
  })(I || (I = {}));
148
- var Xt;
148
+ var en;
149
149
  (function(n) {
150
150
  n.mergeShapes = (e, t) => ({
151
151
  ...e,
152
152
  ...t
153
153
  // second overwrites first
154
154
  });
155
- })(Xt || (Xt = {}));
155
+ })(en || (en = {}));
156
156
  const _ = I.arrayToEnum([
157
157
  "string",
158
158
  "nan",
@@ -273,7 +273,7 @@ class V extends Error {
273
273
  }
274
274
  }
275
275
  V.create = (n) => new V(n);
276
- const Ue = (n, e) => {
276
+ const Fe = (n, e) => {
277
277
  let t;
278
278
  switch (n.code) {
279
279
  case p.invalid_type:
@@ -329,7 +329,7 @@ const Ue = (n, e) => {
329
329
  }
330
330
  return { message: t };
331
331
  };
332
- let xn = Ue;
332
+ let xn = Fe;
333
333
  function rr(n) {
334
334
  xn = n;
335
335
  }
@@ -366,13 +366,13 @@ function f(n, e) {
366
366
  n.common.contextualErrorMap,
367
367
  n.schemaErrorMap,
368
368
  t,
369
- t === Ue ? void 0 : Ue
369
+ t === Fe ? void 0 : Fe
370
370
  // then global default map
371
371
  ].filter((s) => !!s)
372
372
  });
373
373
  n.common.issues.push(r);
374
374
  }
375
- class R {
375
+ class $ {
376
376
  constructor() {
377
377
  this.value = "valid";
378
378
  }
@@ -400,7 +400,7 @@ class R {
400
400
  value: o
401
401
  });
402
402
  }
403
- return R.mergeObjectSync(e, r);
403
+ return $.mergeObjectSync(e, r);
404
404
  }
405
405
  static mergeObjectSync(e, t) {
406
406
  const r = {};
@@ -415,7 +415,7 @@ class R {
415
415
  }
416
416
  const b = Object.freeze({
417
417
  status: "aborted"
418
- }), Rt = (n) => ({ status: "dirty", value: n }), D = (n) => ({ status: "valid", value: n }), en = (n) => n.status === "aborted", tn = (n) => n.status === "dirty", tt = (n) => n.status === "valid", nt = (n) => typeof Promise < "u" && n instanceof Promise;
418
+ }), Rt = (n) => ({ status: "dirty", value: n }), D = (n) => ({ status: "valid", value: n }), tn = (n) => n.status === "aborted", nn = (n) => n.status === "dirty", tt = (n) => n.status === "valid", nt = (n) => typeof Promise < "u" && n instanceof Promise;
419
419
  function $t(n, e, t, r) {
420
420
  if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
421
421
  return e.get(n);
@@ -486,7 +486,7 @@ class Z {
486
486
  }
487
487
  _processInputParams(e) {
488
488
  return {
489
- status: new R(),
489
+ status: new $(),
490
490
  ctx: {
491
491
  common: e.parent.common,
492
492
  data: e.data,
@@ -566,7 +566,7 @@ class Z {
566
566
  _refinement(e) {
567
567
  return new W({
568
568
  schema: this,
569
- typeName: k.ZodEffects,
569
+ typeName: w.ZodEffects,
570
570
  effect: { type: "refinement", refinement: e }
571
571
  });
572
572
  }
@@ -586,7 +586,7 @@ class Z {
586
586
  return B.create(this, this._def);
587
587
  }
588
588
  promise() {
589
- return ze.create(this, this._def);
589
+ return Be.create(this, this._def);
590
590
  }
591
591
  or(e) {
592
592
  return it.create([this, e], this._def);
@@ -598,7 +598,7 @@ class Z {
598
598
  return new W({
599
599
  ...O(this._def),
600
600
  schema: this,
601
- typeName: k.ZodEffects,
601
+ typeName: w.ZodEffects,
602
602
  effect: { type: "transform", transform: e }
603
603
  });
604
604
  }
@@ -608,12 +608,12 @@ class Z {
608
608
  ...O(this._def),
609
609
  innerType: this,
610
610
  defaultValue: t,
611
- typeName: k.ZodDefault
611
+ typeName: w.ZodDefault
612
612
  });
613
613
  }
614
614
  brand() {
615
- return new cn({
616
- typeName: k.ZodBranded,
615
+ return new dn({
616
+ typeName: w.ZodBranded,
617
617
  type: this,
618
618
  ...O(this._def)
619
619
  });
@@ -624,7 +624,7 @@ class Z {
624
624
  ...O(this._def),
625
625
  innerType: this,
626
626
  catchValue: t,
627
- typeName: k.ZodCatch
627
+ typeName: w.ZodCatch
628
628
  });
629
629
  }
630
630
  describe(e) {
@@ -648,7 +648,7 @@ class Z {
648
648
  }
649
649
  }
650
650
  const ar = /^c[^\s-]{8,}$/i, ir = /^[0-9a-z]+$/, or = /^[0-9A-HJKMNP-TV-Z]{26}$/, cr = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, dr = /^[a-z0-9_-]{21}$/i, ur = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, lr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, pr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
651
- let Ht;
651
+ let Yt;
652
652
  const hr = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, fr = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, mr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Tn = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", _r = new RegExp(`^${Tn}$`);
653
653
  function On(n) {
654
654
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
@@ -675,7 +675,7 @@ class F extends Z {
675
675
  received: s.parsedType
676
676
  }), b;
677
677
  }
678
- const t = new R();
678
+ const t = new $();
679
679
  let r;
680
680
  for (const s of this._def.checks)
681
681
  if (s.kind === "min")
@@ -720,7 +720,7 @@ class F extends Z {
720
720
  message: s.message
721
721
  }), t.dirty());
722
722
  else if (s.kind === "emoji")
723
- Ht || (Ht = new RegExp(pr, "u")), Ht.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, {
723
+ Yt || (Yt = new RegExp(pr, "u")), Yt.test(e.data) || (r = this._getOrReturnCtx(e, r), f(r, {
724
724
  validation: "emoji",
725
725
  code: p.invalid_string,
726
726
  message: s.message
@@ -1018,7 +1018,7 @@ F.create = (n) => {
1018
1018
  var e;
1019
1019
  return new F({
1020
1020
  checks: [],
1021
- typeName: k.ZodString,
1021
+ typeName: w.ZodString,
1022
1022
  coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
1023
1023
  ...O(n)
1024
1024
  });
@@ -1041,7 +1041,7 @@ class me extends Z {
1041
1041
  }), b;
1042
1042
  }
1043
1043
  let t;
1044
- const r = new R();
1044
+ const r = new $();
1045
1045
  for (const s of this._def.checks)
1046
1046
  s.kind === "int" ? I.isInteger(e.data) || (t = this._getOrReturnCtx(e, t), f(t, {
1047
1047
  code: p.invalid_type,
@@ -1195,7 +1195,7 @@ class me extends Z {
1195
1195
  }
1196
1196
  me.create = (n) => new me({
1197
1197
  checks: [],
1198
- typeName: k.ZodNumber,
1198
+ typeName: w.ZodNumber,
1199
1199
  coerce: (n == null ? void 0 : n.coerce) || !1,
1200
1200
  ...O(n)
1201
1201
  });
@@ -1213,7 +1213,7 @@ class _e extends Z {
1213
1213
  }), b;
1214
1214
  }
1215
1215
  let t;
1216
- const r = new R();
1216
+ const r = new $();
1217
1217
  for (const s of this._def.checks)
1218
1218
  s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (t = this._getOrReturnCtx(e, t), f(t, {
1219
1219
  code: p.too_small,
@@ -1322,7 +1322,7 @@ _e.create = (n) => {
1322
1322
  var e;
1323
1323
  return new _e({
1324
1324
  checks: [],
1325
- typeName: k.ZodBigInt,
1325
+ typeName: w.ZodBigInt,
1326
1326
  coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
1327
1327
  ...O(n)
1328
1328
  });
@@ -1341,11 +1341,11 @@ class rt extends Z {
1341
1341
  }
1342
1342
  }
1343
1343
  rt.create = (n) => new rt({
1344
- typeName: k.ZodBoolean,
1344
+ typeName: w.ZodBoolean,
1345
1345
  coerce: (n == null ? void 0 : n.coerce) || !1,
1346
1346
  ...O(n)
1347
1347
  });
1348
- class je extends Z {
1348
+ class Ie extends Z {
1349
1349
  _parse(e) {
1350
1350
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== _.date) {
1351
1351
  const s = this._getOrReturnCtx(e);
@@ -1361,7 +1361,7 @@ class je extends Z {
1361
1361
  code: p.invalid_date
1362
1362
  }), b;
1363
1363
  }
1364
- const t = new R();
1364
+ const t = new $();
1365
1365
  let r;
1366
1366
  for (const s of this._def.checks)
1367
1367
  s.kind === "min" ? e.data.getTime() < s.value && (r = this._getOrReturnCtx(e, r), f(r, {
@@ -1385,7 +1385,7 @@ class je extends Z {
1385
1385
  };
1386
1386
  }
1387
1387
  _addCheck(e) {
1388
- return new je({
1388
+ return new Ie({
1389
1389
  ...this._def,
1390
1390
  checks: [...this._def.checks, e]
1391
1391
  });
@@ -1417,10 +1417,10 @@ class je extends Z {
1417
1417
  return e != null ? new Date(e) : null;
1418
1418
  }
1419
1419
  }
1420
- je.create = (n) => new je({
1420
+ Ie.create = (n) => new Ie({
1421
1421
  checks: [],
1422
1422
  coerce: (n == null ? void 0 : n.coerce) || !1,
1423
- typeName: k.ZodDate,
1423
+ typeName: w.ZodDate,
1424
1424
  ...O(n)
1425
1425
  });
1426
1426
  class Pt extends Z {
@@ -1437,7 +1437,7 @@ class Pt extends Z {
1437
1437
  }
1438
1438
  }
1439
1439
  Pt.create = (n) => new Pt({
1440
- typeName: k.ZodSymbol,
1440
+ typeName: w.ZodSymbol,
1441
1441
  ...O(n)
1442
1442
  });
1443
1443
  class st extends Z {
@@ -1454,7 +1454,7 @@ class st extends Z {
1454
1454
  }
1455
1455
  }
1456
1456
  st.create = (n) => new st({
1457
- typeName: k.ZodUndefined,
1457
+ typeName: w.ZodUndefined,
1458
1458
  ...O(n)
1459
1459
  });
1460
1460
  class at extends Z {
@@ -1471,10 +1471,10 @@ class at extends Z {
1471
1471
  }
1472
1472
  }
1473
1473
  at.create = (n) => new at({
1474
- typeName: k.ZodNull,
1474
+ typeName: w.ZodNull,
1475
1475
  ...O(n)
1476
1476
  });
1477
- class Fe extends Z {
1477
+ class ze extends Z {
1478
1478
  constructor() {
1479
1479
  super(...arguments), this._any = !0;
1480
1480
  }
@@ -1482,11 +1482,11 @@ class Fe extends Z {
1482
1482
  return D(e.data);
1483
1483
  }
1484
1484
  }
1485
- Fe.create = (n) => new Fe({
1486
- typeName: k.ZodAny,
1485
+ ze.create = (n) => new ze({
1486
+ typeName: w.ZodAny,
1487
1487
  ...O(n)
1488
1488
  });
1489
- class Se extends Z {
1489
+ class Ze extends Z {
1490
1490
  constructor() {
1491
1491
  super(...arguments), this._unknown = !0;
1492
1492
  }
@@ -1494,8 +1494,8 @@ class Se extends Z {
1494
1494
  return D(e.data);
1495
1495
  }
1496
1496
  }
1497
- Se.create = (n) => new Se({
1498
- typeName: k.ZodUnknown,
1497
+ Ze.create = (n) => new Ze({
1498
+ typeName: w.ZodUnknown,
1499
1499
  ...O(n)
1500
1500
  });
1501
1501
  class ie extends Z {
@@ -1509,7 +1509,7 @@ class ie extends Z {
1509
1509
  }
1510
1510
  }
1511
1511
  ie.create = (n) => new ie({
1512
- typeName: k.ZodNever,
1512
+ typeName: w.ZodNever,
1513
1513
  ...O(n)
1514
1514
  });
1515
1515
  class Dt extends Z {
@@ -1526,7 +1526,7 @@ class Dt extends Z {
1526
1526
  }
1527
1527
  }
1528
1528
  Dt.create = (n) => new Dt({
1529
- typeName: k.ZodVoid,
1529
+ typeName: w.ZodVoid,
1530
1530
  ...O(n)
1531
1531
  });
1532
1532
  class B extends Z {
@@ -1565,9 +1565,9 @@ class B extends Z {
1565
1565
  exact: !1,
1566
1566
  message: s.maxLength.message
1567
1567
  }), r.dirty()), t.common.async)
1568
- return Promise.all([...t.data].map((o, c) => s.type._parseAsync(new ee(t, o, t.path, c)))).then((o) => R.mergeArray(r, o));
1568
+ return Promise.all([...t.data].map((o, c) => s.type._parseAsync(new ee(t, o, t.path, c)))).then((o) => $.mergeArray(r, o));
1569
1569
  const a = [...t.data].map((o, c) => s.type._parseSync(new ee(t, o, t.path, c)));
1570
- return R.mergeArray(r, a);
1570
+ return $.mergeArray(r, a);
1571
1571
  }
1572
1572
  get element() {
1573
1573
  return this._def.type;
@@ -1599,15 +1599,15 @@ B.create = (n, e) => new B({
1599
1599
  minLength: null,
1600
1600
  maxLength: null,
1601
1601
  exactLength: null,
1602
- typeName: k.ZodArray,
1602
+ typeName: w.ZodArray,
1603
1603
  ...O(e)
1604
1604
  });
1605
- function Pe(n) {
1605
+ function De(n) {
1606
1606
  if (n instanceof N) {
1607
1607
  const e = {};
1608
1608
  for (const t in n.shape) {
1609
1609
  const r = n.shape[t];
1610
- e[t] = G.create(Pe(r));
1610
+ e[t] = G.create(De(r));
1611
1611
  }
1612
1612
  return new N({
1613
1613
  ...n._def,
@@ -1615,8 +1615,8 @@ function Pe(n) {
1615
1615
  });
1616
1616
  } else return n instanceof B ? new B({
1617
1617
  ...n._def,
1618
- type: Pe(n.element)
1619
- }) : n instanceof G ? G.create(Pe(n.unwrap())) : n instanceof ye ? ye.create(Pe(n.unwrap())) : n instanceof te ? te.create(n.items.map((e) => Pe(e))) : n;
1618
+ type: De(n.element)
1619
+ }) : n instanceof G ? G.create(De(n.unwrap())) : n instanceof ye ? ye.create(De(n.unwrap())) : n instanceof te ? te.create(n.items.map((e) => De(e))) : n;
1620
1620
  }
1621
1621
  class N extends Z {
1622
1622
  constructor() {
@@ -1689,7 +1689,7 @@ class N extends Z {
1689
1689
  });
1690
1690
  }
1691
1691
  return d;
1692
- }).then((d) => R.mergeObjectSync(t, d)) : R.mergeObjectSync(t, c);
1692
+ }).then((d) => $.mergeObjectSync(t, d)) : $.mergeObjectSync(t, c);
1693
1693
  }
1694
1694
  get shape() {
1695
1695
  return this._def.shape();
@@ -1762,7 +1762,7 @@ class N extends Z {
1762
1762
  ...this._def.shape(),
1763
1763
  ...e._def.shape()
1764
1764
  }),
1765
- typeName: k.ZodObject
1765
+ typeName: w.ZodObject
1766
1766
  });
1767
1767
  }
1768
1768
  // merge<
@@ -1852,7 +1852,7 @@ class N extends Z {
1852
1852
  * @deprecated
1853
1853
  */
1854
1854
  deepPartial() {
1855
- return Pe(this);
1855
+ return De(this);
1856
1856
  }
1857
1857
  partial(e) {
1858
1858
  const t = {};
@@ -1888,21 +1888,21 @@ N.create = (n, e) => new N({
1888
1888
  shape: () => n,
1889
1889
  unknownKeys: "strip",
1890
1890
  catchall: ie.create(),
1891
- typeName: k.ZodObject,
1891
+ typeName: w.ZodObject,
1892
1892
  ...O(e)
1893
1893
  });
1894
1894
  N.strictCreate = (n, e) => new N({
1895
1895
  shape: () => n,
1896
1896
  unknownKeys: "strict",
1897
1897
  catchall: ie.create(),
1898
- typeName: k.ZodObject,
1898
+ typeName: w.ZodObject,
1899
1899
  ...O(e)
1900
1900
  });
1901
1901
  N.lazycreate = (n, e) => new N({
1902
1902
  shape: n,
1903
1903
  unknownKeys: "strip",
1904
1904
  catchall: ie.create(),
1905
- typeName: k.ZodObject,
1905
+ typeName: w.ZodObject,
1906
1906
  ...O(e)
1907
1907
  });
1908
1908
  class it extends Z {
@@ -1975,10 +1975,10 @@ class it extends Z {
1975
1975
  }
1976
1976
  it.create = (n, e) => new it({
1977
1977
  options: n,
1978
- typeName: k.ZodUnion,
1978
+ typeName: w.ZodUnion,
1979
1979
  ...O(e)
1980
1980
  });
1981
- const pe = (n) => n instanceof dt ? pe(n.schema) : n instanceof W ? pe(n.innerType()) : n instanceof ut ? [n.value] : n instanceof ge ? n.options : n instanceof lt ? I.objectValues(n.enum) : n instanceof pt ? pe(n._def.innerType) : n instanceof st ? [void 0] : n instanceof at ? [null] : n instanceof G ? [void 0, ...pe(n.unwrap())] : n instanceof ye ? [null, ...pe(n.unwrap())] : n instanceof cn || n instanceof ft ? pe(n.unwrap()) : n instanceof ht ? pe(n._def.innerType) : [];
1981
+ const pe = (n) => n instanceof dt ? pe(n.schema) : n instanceof W ? pe(n.innerType()) : n instanceof ut ? [n.value] : n instanceof ge ? n.options : n instanceof lt ? I.objectValues(n.enum) : n instanceof pt ? pe(n._def.innerType) : n instanceof st ? [void 0] : n instanceof at ? [null] : n instanceof G ? [void 0, ...pe(n.unwrap())] : n instanceof ye ? [null, ...pe(n.unwrap())] : n instanceof dn || n instanceof ft ? pe(n.unwrap()) : n instanceof ht ? pe(n._def.innerType) : [];
1982
1982
  class Kt extends Z {
1983
1983
  _parse(e) {
1984
1984
  const { ctx: t } = this._processInputParams(e);
@@ -2033,7 +2033,7 @@ class Kt extends Z {
2033
2033
  }
2034
2034
  }
2035
2035
  return new Kt({
2036
- typeName: k.ZodDiscriminatedUnion,
2036
+ typeName: w.ZodDiscriminatedUnion,
2037
2037
  discriminator: e,
2038
2038
  options: t,
2039
2039
  optionsMap: s,
@@ -2041,14 +2041,14 @@ class Kt extends Z {
2041
2041
  });
2042
2042
  }
2043
2043
  }
2044
- function nn(n, e) {
2044
+ function rn(n, e) {
2045
2045
  const t = he(n), r = he(e);
2046
2046
  if (n === e)
2047
2047
  return { valid: !0, data: n };
2048
2048
  if (t === _.object && r === _.object) {
2049
2049
  const s = I.objectKeys(e), a = I.objectKeys(n).filter((c) => s.indexOf(c) !== -1), o = { ...n, ...e };
2050
2050
  for (const c of a) {
2051
- const d = nn(n[c], e[c]);
2051
+ const d = rn(n[c], e[c]);
2052
2052
  if (!d.valid)
2053
2053
  return { valid: !1 };
2054
2054
  o[c] = d.data;
@@ -2059,7 +2059,7 @@ function nn(n, e) {
2059
2059
  return { valid: !1 };
2060
2060
  const s = [];
2061
2061
  for (let a = 0; a < n.length; a++) {
2062
- const o = n[a], c = e[a], d = nn(o, c);
2062
+ const o = n[a], c = e[a], d = rn(o, c);
2063
2063
  if (!d.valid)
2064
2064
  return { valid: !1 };
2065
2065
  s.push(d.data);
@@ -2070,10 +2070,10 @@ function nn(n, e) {
2070
2070
  class ot extends Z {
2071
2071
  _parse(e) {
2072
2072
  const { status: t, ctx: r } = this._processInputParams(e), s = (a, o) => {
2073
- if (en(a) || en(o))
2073
+ if (tn(a) || tn(o))
2074
2074
  return b;
2075
- const c = nn(a.value, o.value);
2076
- return c.valid ? ((tn(a) || tn(o)) && t.dirty(), { status: t.value, value: c.data }) : (f(r, {
2075
+ const c = rn(a.value, o.value);
2076
+ return c.valid ? ((nn(a) || nn(o)) && t.dirty(), { status: t.value, value: c.data }) : (f(r, {
2077
2077
  code: p.invalid_intersection_types
2078
2078
  }), b);
2079
2079
  };
@@ -2102,7 +2102,7 @@ class ot extends Z {
2102
2102
  ot.create = (n, e, t) => new ot({
2103
2103
  left: n,
2104
2104
  right: e,
2105
- typeName: k.ZodIntersection,
2105
+ typeName: w.ZodIntersection,
2106
2106
  ...O(t)
2107
2107
  });
2108
2108
  class te extends Z {
@@ -2133,7 +2133,7 @@ class te extends Z {
2133
2133
  const c = this._def.items[o] || this._def.rest;
2134
2134
  return c ? c._parse(new ee(r, a, r.path, o)) : null;
2135
2135
  }).filter((a) => !!a);
2136
- return r.common.async ? Promise.all(s).then((a) => R.mergeArray(t, a)) : R.mergeArray(t, s);
2136
+ return r.common.async ? Promise.all(s).then((a) => $.mergeArray(t, a)) : $.mergeArray(t, s);
2137
2137
  }
2138
2138
  get items() {
2139
2139
  return this._def.items;
@@ -2150,7 +2150,7 @@ te.create = (n, e) => {
2150
2150
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
2151
2151
  return new te({
2152
2152
  items: n,
2153
- typeName: k.ZodTuple,
2153
+ typeName: w.ZodTuple,
2154
2154
  rest: null,
2155
2155
  ...O(e)
2156
2156
  });
@@ -2177,7 +2177,7 @@ class ct extends Z {
2177
2177
  value: o._parse(new ee(r, r.data[c], r.path, c)),
2178
2178
  alwaysSet: c in r.data
2179
2179
  });
2180
- return r.common.async ? R.mergeObjectAsync(t, s) : R.mergeObjectSync(t, s);
2180
+ return r.common.async ? $.mergeObjectAsync(t, s) : $.mergeObjectSync(t, s);
2181
2181
  }
2182
2182
  get element() {
2183
2183
  return this._def.valueType;
@@ -2186,12 +2186,12 @@ class ct extends Z {
2186
2186
  return t instanceof Z ? new ct({
2187
2187
  keyType: e,
2188
2188
  valueType: t,
2189
- typeName: k.ZodRecord,
2189
+ typeName: w.ZodRecord,
2190
2190
  ...O(r)
2191
2191
  }) : new ct({
2192
2192
  keyType: F.create(),
2193
2193
  valueType: e,
2194
- typeName: k.ZodRecord,
2194
+ typeName: w.ZodRecord,
2195
2195
  ...O(t)
2196
2196
  });
2197
2197
  }
@@ -2241,10 +2241,10 @@ class Mt extends Z {
2241
2241
  Mt.create = (n, e, t) => new Mt({
2242
2242
  valueType: e,
2243
2243
  keyType: n,
2244
- typeName: k.ZodMap,
2244
+ typeName: w.ZodMap,
2245
2245
  ...O(t)
2246
2246
  });
2247
- class Ie extends Z {
2247
+ class Ce extends Z {
2248
2248
  _parse(e) {
2249
2249
  const { status: t, ctx: r } = this._processInputParams(e);
2250
2250
  if (r.parsedType !== _.set)
@@ -2283,13 +2283,13 @@ class Ie extends Z {
2283
2283
  return r.common.async ? Promise.all(c).then((d) => o(d)) : o(c);
2284
2284
  }
2285
2285
  min(e, t) {
2286
- return new Ie({
2286
+ return new Ce({
2287
2287
  ...this._def,
2288
2288
  minSize: { value: e, message: y.toString(t) }
2289
2289
  });
2290
2290
  }
2291
2291
  max(e, t) {
2292
- return new Ie({
2292
+ return new Ce({
2293
2293
  ...this._def,
2294
2294
  maxSize: { value: e, message: y.toString(t) }
2295
2295
  });
@@ -2301,14 +2301,14 @@ class Ie extends Z {
2301
2301
  return this.min(1, e);
2302
2302
  }
2303
2303
  }
2304
- Ie.create = (n, e) => new Ie({
2304
+ Ce.create = (n, e) => new Ce({
2305
2305
  valueType: n,
2306
2306
  minSize: null,
2307
2307
  maxSize: null,
2308
- typeName: k.ZodSet,
2308
+ typeName: w.ZodSet,
2309
2309
  ...O(e)
2310
2310
  });
2311
- class Le extends Z {
2311
+ class Ve extends Z {
2312
2312
  constructor() {
2313
2313
  super(...arguments), this.validate = this.implement;
2314
2314
  }
@@ -2328,7 +2328,7 @@ class Le extends Z {
2328
2328
  t.common.contextualErrorMap,
2329
2329
  t.schemaErrorMap,
2330
2330
  Et(),
2331
- Ue
2331
+ Fe
2332
2332
  ].filter((u) => !!u),
2333
2333
  issueData: {
2334
2334
  code: p.invalid_arguments,
@@ -2344,7 +2344,7 @@ class Le extends Z {
2344
2344
  t.common.contextualErrorMap,
2345
2345
  t.schemaErrorMap,
2346
2346
  Et(),
2347
- Ue
2347
+ Fe
2348
2348
  ].filter((u) => !!u),
2349
2349
  issueData: {
2350
2350
  code: p.invalid_return_type,
@@ -2353,7 +2353,7 @@ class Le extends Z {
2353
2353
  });
2354
2354
  }
2355
2355
  const a = { errorMap: t.common.contextualErrorMap }, o = t.data;
2356
- if (this._def.returns instanceof ze) {
2356
+ if (this._def.returns instanceof Be) {
2357
2357
  const c = this;
2358
2358
  return D(async function(...d) {
2359
2359
  const u = new V([]), l = await c._def.args.parseAsync(d, a).catch((A) => {
@@ -2383,13 +2383,13 @@ class Le extends Z {
2383
2383
  return this._def.returns;
2384
2384
  }
2385
2385
  args(...e) {
2386
- return new Le({
2386
+ return new Ve({
2387
2387
  ...this._def,
2388
- args: te.create(e).rest(Se.create())
2388
+ args: te.create(e).rest(Ze.create())
2389
2389
  });
2390
2390
  }
2391
2391
  returns(e) {
2392
- return new Le({
2392
+ return new Ve({
2393
2393
  ...this._def,
2394
2394
  returns: e
2395
2395
  });
@@ -2401,10 +2401,10 @@ class Le extends Z {
2401
2401
  return this.parse(e);
2402
2402
  }
2403
2403
  static create(e, t, r) {
2404
- return new Le({
2405
- args: e || te.create([]).rest(Se.create()),
2406
- returns: t || Se.create(),
2407
- typeName: k.ZodFunction,
2404
+ return new Ve({
2405
+ args: e || te.create([]).rest(Ze.create()),
2406
+ returns: t || Ze.create(),
2407
+ typeName: w.ZodFunction,
2408
2408
  ...O(r)
2409
2409
  });
2410
2410
  }
@@ -2420,7 +2420,7 @@ class dt extends Z {
2420
2420
  }
2421
2421
  dt.create = (n, e) => new dt({
2422
2422
  getter: n,
2423
- typeName: k.ZodLazy,
2423
+ typeName: w.ZodLazy,
2424
2424
  ...O(e)
2425
2425
  });
2426
2426
  class ut extends Z {
@@ -2441,13 +2441,13 @@ class ut extends Z {
2441
2441
  }
2442
2442
  ut.create = (n, e) => new ut({
2443
2443
  value: n,
2444
- typeName: k.ZodLiteral,
2444
+ typeName: w.ZodLiteral,
2445
2445
  ...O(e)
2446
2446
  });
2447
2447
  function Zn(n, e) {
2448
2448
  return new ge({
2449
2449
  values: n,
2450
- typeName: k.ZodEnum,
2450
+ typeName: w.ZodEnum,
2451
2451
  ...O(e)
2452
2452
  });
2453
2453
  }
@@ -2541,10 +2541,10 @@ class lt extends Z {
2541
2541
  Ge = /* @__PURE__ */ new WeakMap();
2542
2542
  lt.create = (n, e) => new lt({
2543
2543
  values: n,
2544
- typeName: k.ZodNativeEnum,
2544
+ typeName: w.ZodNativeEnum,
2545
2545
  ...O(e)
2546
2546
  });
2547
- class ze extends Z {
2547
+ class Be extends Z {
2548
2548
  unwrap() {
2549
2549
  return this._def.type;
2550
2550
  }
@@ -2563,9 +2563,9 @@ class ze extends Z {
2563
2563
  })));
2564
2564
  }
2565
2565
  }
2566
- ze.create = (n, e) => new ze({
2566
+ Be.create = (n, e) => new Be({
2567
2567
  type: n,
2568
- typeName: k.ZodPromise,
2568
+ typeName: w.ZodPromise,
2569
2569
  ...O(e)
2570
2570
  });
2571
2571
  class W extends Z {
@@ -2573,7 +2573,7 @@ class W extends Z {
2573
2573
  return this._def.schema;
2574
2574
  }
2575
2575
  sourceType() {
2576
- return this._def.schema._def.typeName === k.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2576
+ return this._def.schema._def.typeName === w.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
2577
2577
  }
2578
2578
  _parse(e) {
2579
2579
  const { status: t, ctx: r } = this._processInputParams(e), s = this._def.effect || null, a = {
@@ -2647,14 +2647,14 @@ class W extends Z {
2647
2647
  }
2648
2648
  W.create = (n, e, t) => new W({
2649
2649
  schema: n,
2650
- typeName: k.ZodEffects,
2650
+ typeName: w.ZodEffects,
2651
2651
  effect: e,
2652
2652
  ...O(t)
2653
2653
  });
2654
2654
  W.createWithPreprocess = (n, e, t) => new W({
2655
2655
  schema: e,
2656
2656
  effect: { type: "preprocess", transform: n },
2657
- typeName: k.ZodEffects,
2657
+ typeName: w.ZodEffects,
2658
2658
  ...O(t)
2659
2659
  });
2660
2660
  class G extends Z {
@@ -2667,7 +2667,7 @@ class G extends Z {
2667
2667
  }
2668
2668
  G.create = (n, e) => new G({
2669
2669
  innerType: n,
2670
- typeName: k.ZodOptional,
2670
+ typeName: w.ZodOptional,
2671
2671
  ...O(e)
2672
2672
  });
2673
2673
  class ye extends Z {
@@ -2680,7 +2680,7 @@ class ye extends Z {
2680
2680
  }
2681
2681
  ye.create = (n, e) => new ye({
2682
2682
  innerType: n,
2683
- typeName: k.ZodNullable,
2683
+ typeName: w.ZodNullable,
2684
2684
  ...O(e)
2685
2685
  });
2686
2686
  class pt extends Z {
@@ -2699,7 +2699,7 @@ class pt extends Z {
2699
2699
  }
2700
2700
  pt.create = (n, e) => new pt({
2701
2701
  innerType: n,
2702
- typeName: k.ZodDefault,
2702
+ typeName: w.ZodDefault,
2703
2703
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
2704
2704
  ...O(e)
2705
2705
  });
@@ -2742,7 +2742,7 @@ class ht extends Z {
2742
2742
  }
2743
2743
  ht.create = (n, e) => new ht({
2744
2744
  innerType: n,
2745
- typeName: k.ZodCatch,
2745
+ typeName: w.ZodCatch,
2746
2746
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
2747
2747
  ...O(e)
2748
2748
  });
@@ -2760,11 +2760,11 @@ class Lt extends Z {
2760
2760
  }
2761
2761
  }
2762
2762
  Lt.create = (n) => new Lt({
2763
- typeName: k.ZodNaN,
2763
+ typeName: w.ZodNaN,
2764
2764
  ...O(n)
2765
2765
  });
2766
- const kr = Symbol("zod_brand");
2767
- class cn extends Z {
2766
+ const wr = Symbol("zod_brand");
2767
+ class dn extends Z {
2768
2768
  _parse(e) {
2769
2769
  const { ctx: t } = this._processInputParams(e), r = t.data;
2770
2770
  return this._def.type._parse({
@@ -2813,7 +2813,7 @@ class It extends Z {
2813
2813
  return new It({
2814
2814
  in: e,
2815
2815
  out: t,
2816
- typeName: k.ZodPipeline
2816
+ typeName: w.ZodPipeline
2817
2817
  });
2818
2818
  }
2819
2819
  }
@@ -2828,28 +2828,28 @@ class ft extends Z {
2828
2828
  }
2829
2829
  ft.create = (n, e) => new ft({
2830
2830
  innerType: n,
2831
- typeName: k.ZodReadonly,
2831
+ typeName: w.ZodReadonly,
2832
2832
  ...O(e)
2833
2833
  });
2834
2834
  function jn(n, e = {}, t) {
2835
- return n ? Fe.create().superRefine((r, s) => {
2835
+ return n ? ze.create().superRefine((r, s) => {
2836
2836
  var a, o;
2837
2837
  if (!n(r)) {
2838
2838
  const c = typeof e == "function" ? e(r) : typeof e == "string" ? { message: e } : e, d = (o = (a = c.fatal) !== null && a !== void 0 ? a : t) !== null && o !== void 0 ? o : !0, u = typeof c == "string" ? { message: c } : c;
2839
2839
  s.addIssue({ code: "custom", ...u, fatal: d });
2840
2840
  }
2841
- }) : Fe.create();
2841
+ }) : ze.create();
2842
2842
  }
2843
- const wr = {
2843
+ const kr = {
2844
2844
  object: N.lazycreate
2845
2845
  };
2846
- var k;
2846
+ var w;
2847
2847
  (function(n) {
2848
2848
  n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
2849
- })(k || (k = {}));
2849
+ })(w || (w = {}));
2850
2850
  const xr = (n, e = {
2851
2851
  message: `Input not instance of ${n.name}`
2852
- }) => jn((t) => t instanceof n, e), In = F.create, Cn = me.create, br = Lt.create, Tr = _e.create, Nn = rt.create, Or = je.create, Sr = Pt.create, Zr = st.create, jr = at.create, Ir = Fe.create, Cr = Se.create, Nr = ie.create, Er = Dt.create, Ar = B.create, Rr = N.create, $r = N.strictCreate, Pr = it.create, Dr = Kt.create, Mr = ot.create, Lr = te.create, Vr = ct.create, Ur = Mt.create, Fr = Ie.create, zr = Le.create, Br = dt.create, qr = ut.create, Wr = ge.create, Kr = lt.create, Qr = ze.create, gn = W.create, Jr = G.create, Hr = ye.create, Yr = W.createWithPreprocess, Gr = It.create, Xr = () => In().optional(), es = () => Cn().optional(), ts = () => Nn().optional(), ns = {
2852
+ }) => jn((t) => t instanceof n, e), In = F.create, Cn = me.create, br = Lt.create, Tr = _e.create, Nn = rt.create, Or = Ie.create, Sr = Pt.create, Zr = st.create, jr = at.create, Ir = ze.create, Cr = Ze.create, Nr = ie.create, Er = Dt.create, Ar = B.create, Rr = N.create, $r = N.strictCreate, Pr = it.create, Dr = Kt.create, Mr = ot.create, Lr = te.create, Vr = ct.create, Ur = Mt.create, Fr = Ce.create, zr = Ve.create, Br = dt.create, qr = ut.create, Wr = ge.create, Kr = lt.create, Qr = Be.create, gn = W.create, Jr = G.create, Hr = ye.create, Yr = W.createWithPreprocess, Gr = It.create, Xr = () => In().optional(), es = () => Cn().optional(), ts = () => Nn().optional(), ns = {
2853
2853
  string: (n) => F.create({ ...n, coerce: !0 }),
2854
2854
  number: (n) => me.create({ ...n, coerce: !0 }),
2855
2855
  boolean: (n) => rt.create({
@@ -2857,29 +2857,29 @@ const xr = (n, e = {
2857
2857
  coerce: !0
2858
2858
  }),
2859
2859
  bigint: (n) => _e.create({ ...n, coerce: !0 }),
2860
- date: (n) => je.create({ ...n, coerce: !0 })
2860
+ date: (n) => Ie.create({ ...n, coerce: !0 })
2861
2861
  }, rs = b;
2862
2862
  var i = /* @__PURE__ */ Object.freeze({
2863
2863
  __proto__: null,
2864
- defaultErrorMap: Ue,
2864
+ defaultErrorMap: Fe,
2865
2865
  setErrorMap: rr,
2866
2866
  getErrorMap: Et,
2867
2867
  makeIssue: At,
2868
2868
  EMPTY_PATH: sr,
2869
2869
  addIssueToContext: f,
2870
- ParseStatus: R,
2870
+ ParseStatus: $,
2871
2871
  INVALID: b,
2872
2872
  DIRTY: Rt,
2873
2873
  OK: D,
2874
- isAborted: en,
2875
- isDirty: tn,
2874
+ isAborted: tn,
2875
+ isDirty: nn,
2876
2876
  isValid: tt,
2877
2877
  isAsync: nt,
2878
2878
  get util() {
2879
2879
  return I;
2880
2880
  },
2881
2881
  get objectUtil() {
2882
- return Xt;
2882
+ return en;
2883
2883
  },
2884
2884
  ZodParsedType: _,
2885
2885
  getParsedType: he,
@@ -2889,12 +2889,12 @@ var i = /* @__PURE__ */ Object.freeze({
2889
2889
  ZodNumber: me,
2890
2890
  ZodBigInt: _e,
2891
2891
  ZodBoolean: rt,
2892
- ZodDate: je,
2892
+ ZodDate: Ie,
2893
2893
  ZodSymbol: Pt,
2894
2894
  ZodUndefined: st,
2895
2895
  ZodNull: at,
2896
- ZodAny: Fe,
2897
- ZodUnknown: Se,
2896
+ ZodAny: ze,
2897
+ ZodUnknown: Ze,
2898
2898
  ZodNever: ie,
2899
2899
  ZodVoid: Dt,
2900
2900
  ZodArray: B,
@@ -2905,13 +2905,13 @@ var i = /* @__PURE__ */ Object.freeze({
2905
2905
  ZodTuple: te,
2906
2906
  ZodRecord: ct,
2907
2907
  ZodMap: Mt,
2908
- ZodSet: Ie,
2909
- ZodFunction: Le,
2908
+ ZodSet: Ce,
2909
+ ZodFunction: Ve,
2910
2910
  ZodLazy: dt,
2911
2911
  ZodLiteral: ut,
2912
2912
  ZodEnum: ge,
2913
2913
  ZodNativeEnum: lt,
2914
- ZodPromise: ze,
2914
+ ZodPromise: Be,
2915
2915
  ZodEffects: W,
2916
2916
  ZodTransformer: W,
2917
2917
  ZodOptional: G,
@@ -2919,16 +2919,16 @@ var i = /* @__PURE__ */ Object.freeze({
2919
2919
  ZodDefault: pt,
2920
2920
  ZodCatch: ht,
2921
2921
  ZodNaN: Lt,
2922
- BRAND: kr,
2923
- ZodBranded: cn,
2922
+ BRAND: wr,
2923
+ ZodBranded: dn,
2924
2924
  ZodPipeline: It,
2925
2925
  ZodReadonly: ft,
2926
2926
  custom: jn,
2927
2927
  Schema: Z,
2928
2928
  ZodSchema: Z,
2929
- late: wr,
2929
+ late: kr,
2930
2930
  get ZodFirstPartyTypeKind() {
2931
- return k;
2931
+ return w;
2932
2932
  },
2933
2933
  coerce: ns,
2934
2934
  any: Ir,
@@ -2981,7 +2981,7 @@ i.object({
2981
2981
  limit: i.number(),
2982
2982
  length: i.number()
2983
2983
  });
2984
- const dn = i.object({
2984
+ const un = i.object({
2985
2985
  created_at: i.string(),
2986
2986
  updated_at: i.string()
2987
2987
  }), ss = i.object({
@@ -3023,7 +3023,7 @@ const dn = i.object({
3023
3023
  provider: i.string().default("email"),
3024
3024
  connection: i.string().default("email")
3025
3025
  });
3026
- is.extend(dn.shape).extend({
3026
+ is.extend(un.shape).extend({
3027
3027
  user_id: i.string(),
3028
3028
  // TODO: this not might be correct if you use the username
3029
3029
  email: i.string(),
@@ -3054,7 +3054,7 @@ i.object({
3054
3054
  updated_at: i.string().transform((n) => n === null ? "" : n)
3055
3055
  }).extend(os.shape);
3056
3056
  var An = /* @__PURE__ */ ((n) => (n.TOKEN = "token", n.TOKEN_ID_TOKEN = "token id_token", n.CODE = "code", n))(An || {}), Rn = /* @__PURE__ */ ((n) => (n.QUERY = "query", n.FRAGMENT = "fragment", n.FORM_POST = "form_post", n.WEB_MESSAGE = "web_message", n))(Rn || {}), $n = /* @__PURE__ */ ((n) => (n.S265 = "S256", n.plain = "plain", n))($n || {});
3057
- const un = i.object({
3057
+ const Qt = i.object({
3058
3058
  client_id: i.string(),
3059
3059
  vendor_id: i.string().optional(),
3060
3060
  response_type: i.nativeEnum(An).optional(),
@@ -3067,17 +3067,6 @@ const un = i.object({
3067
3067
  code_challenge_method: i.nativeEnum($n).optional(),
3068
3068
  code_challenge: i.string().optional(),
3069
3069
  username: i.string().optional()
3070
- }), cs = i.object({
3071
- authParams: un,
3072
- code: i.string(),
3073
- user_id: i.string(),
3074
- created_at: i.string(),
3075
- expires_at: i.string(),
3076
- used_at: i.string().optional()
3077
- });
3078
- i.object({
3079
- ...cs.shape,
3080
- created_at: i.string()
3081
3070
  });
3082
3071
  i.object({
3083
3072
  colors: i.object({
@@ -3095,7 +3084,7 @@ i.object({
3095
3084
  url: i.string()
3096
3085
  }).optional()
3097
3086
  });
3098
- const ds = i.object({
3087
+ const cs = i.object({
3099
3088
  id: i.string().optional(),
3100
3089
  name: i.string(),
3101
3090
  client_id: i.string().optional(),
@@ -3114,7 +3103,7 @@ const ds = i.object({
3114
3103
  id: i.string(),
3115
3104
  created_at: i.string().transform((n) => n === null ? "" : n),
3116
3105
  updated_at: i.string().transform((n) => n === null ? "" : n)
3117
- }).extend(ds.shape), us = i.object({
3106
+ }).extend(cs.shape), ds = i.object({
3118
3107
  domain: i.string(),
3119
3108
  dkim_private_key: i.string().optional(),
3120
3109
  dkim_public_key: i.string().optional(),
@@ -3123,7 +3112,7 @@ const ds = i.object({
3123
3112
  }), Pn = i.object({
3124
3113
  id: i.string(),
3125
3114
  name: i.string(),
3126
- domains: i.array(us),
3115
+ domains: i.array(ds),
3127
3116
  allowed_callback_urls: i.array(i.string()),
3128
3117
  allowed_logout_urls: i.array(i.string()),
3129
3118
  allowed_web_origins: i.array(i.string()),
@@ -3153,28 +3142,46 @@ Pn.extend({
3153
3142
  Pn.extend({
3154
3143
  connections: i.array(ln.partial())
3155
3144
  });
3156
- const ls = i.object({
3145
+ const us = i.enum([
3146
+ "password_reset",
3147
+ "email_verification",
3148
+ "otp",
3149
+ "oauth2",
3150
+ "oauth2_state",
3151
+ "ticket"
3152
+ ]), ls = i.object({
3153
+ code_id: i.string().openapi({
3154
+ description: "The code that will be used in for instance an email verification flow"
3155
+ }),
3156
+ login_id: i.string().openapi({
3157
+ description: "The id of the login session that the code is connected to"
3158
+ }),
3159
+ code_type: us,
3160
+ created_at: i.string(),
3161
+ expires_at: i.string(),
3162
+ used_at: i.string().optional()
3163
+ }), ps = i.object({
3157
3164
  domain: i.string(),
3158
3165
  dkim_private_key: i.string().optional(),
3159
3166
  dkim_public_key: i.string().optional(),
3160
3167
  email_api_key: i.string().optional(),
3161
3168
  email_service: i.enum(["mailgun", "mailchannels"])
3162
3169
  });
3163
- dn.extend({
3164
- ...ls.shape,
3170
+ un.extend({
3171
+ ...ps.shape,
3165
3172
  id: i.string()
3166
3173
  });
3167
- const ps = i.object({
3174
+ const hs = i.object({
3168
3175
  trigger_id: i.enum(["post-user-registration", "post-user-login"]),
3169
3176
  enabled: i.boolean().default(!1),
3170
3177
  url: i.string(),
3171
3178
  hook_id: i.string().optional()
3172
3179
  });
3173
- ps.extend({
3174
- ...dn.shape,
3180
+ hs.extend({
3181
+ ...un.shape,
3175
3182
  hook_id: i.string()
3176
3183
  });
3177
- const hs = i.object({
3184
+ const fs = i.object({
3178
3185
  alg: i.string(),
3179
3186
  e: i.string(),
3180
3187
  kid: i.string(),
@@ -3183,7 +3190,7 @@ const hs = i.object({
3183
3190
  use: i.string().optional()
3184
3191
  });
3185
3192
  i.object({
3186
- keys: i.array(hs)
3193
+ keys: i.array(fs)
3187
3194
  });
3188
3195
  i.object({
3189
3196
  issuer: i.string(),
@@ -3207,7 +3214,24 @@ i.object({
3207
3214
  request_parameter_supported: i.boolean(),
3208
3215
  token_endpoint_auth_signing_alg_values_supported: i.array(i.string())
3209
3216
  });
3210
- const fs = i.enum([
3217
+ const ms = i.object({
3218
+ login_id: i.string().openapi({
3219
+ description: "This is is used as the state in the universal login"
3220
+ }),
3221
+ auth0Client: i.string().optional(),
3222
+ authParams: Qt,
3223
+ expires_at: i.string(),
3224
+ deleted_at: i.string(),
3225
+ ip: i.string().optional()
3226
+ }).openapi({
3227
+ description: "This represents a login sesion"
3228
+ });
3229
+ i.object({
3230
+ ...ms.shape,
3231
+ created_at: i.string(),
3232
+ updated_at: i.string()
3233
+ });
3234
+ const _s = i.enum([
3211
3235
  "sapi",
3212
3236
  // SUCCESS_API_OPERATION
3213
3237
  "ssa",
@@ -3239,7 +3263,7 @@ const fs = i.enum([
3239
3263
  "seacft",
3240
3264
  // SUCCESS_EXCHANGE_AUTHORIZATION_CODE_FOR_ACCESS_TOKEN
3241
3265
  "serft"
3242
- ]), ms = i.object({
3266
+ ]), gs = i.object({
3243
3267
  name: i.string(),
3244
3268
  version: i.string(),
3245
3269
  env: i.object({
@@ -3247,7 +3271,7 @@ const fs = i.enum([
3247
3271
  }).optional()
3248
3272
  });
3249
3273
  i.object({
3250
- type: fs,
3274
+ type: _s,
3251
3275
  date: i.string(),
3252
3276
  description: i.string().optional(),
3253
3277
  log_id: i.string().optional(),
@@ -3268,33 +3292,19 @@ i.object({
3268
3292
  strategy: i.string().optional(),
3269
3293
  strategy_type: i.string().optional(),
3270
3294
  hostname: i.string().optional(),
3271
- auth0_client: ms.optional()
3272
- });
3273
- const _s = i.object({
3274
- id: i.string(),
3275
- email: i.string(),
3276
- code: i.string(),
3277
- ip: i.string().optional(),
3278
- send: i.enum(["code", "link"]),
3279
- authParams: un,
3280
- expires_at: i.string(),
3281
- used_at: i.string().optional(),
3282
- user_id: i.string().optional()
3295
+ auth0_client: gs.optional()
3283
3296
  });
3284
- i.object({
3285
- created_at: i.string(),
3286
- ..._s.shape
3287
- });
3288
- const gs = i.object({
3297
+ const ys = i.object({
3289
3298
  user_id: i.string(),
3290
- password: i.string()
3299
+ password: i.string(),
3300
+ algorithm: i.enum(["bcrypt", "argon2id"]).default("argon2id")
3291
3301
  });
3292
3302
  i.object({
3293
- ...gs.shape,
3303
+ ...ys.shape,
3294
3304
  created_at: i.string(),
3295
3305
  updated_at: i.string()
3296
3306
  });
3297
- const ys = i.object({
3307
+ const vs = i.object({
3298
3308
  session_id: i.string(),
3299
3309
  client_id: i.string(),
3300
3310
  expires_at: i.string(),
@@ -3304,7 +3314,7 @@ const ys = i.object({
3304
3314
  });
3305
3315
  i.object({
3306
3316
  created_at: i.string(),
3307
- ...ys.shape
3317
+ ...vs.shape
3308
3318
  });
3309
3319
  i.object({
3310
3320
  private_key: i.string(),
@@ -3333,7 +3343,7 @@ i.object({
3333
3343
  revoked: i.boolean().optional().openapi({ description: "True if the key is revoked" }),
3334
3344
  revoked_at: i.string().optional().openapi({ description: "The date and time when the key was revoked" })
3335
3345
  });
3336
- const vs = i.object({
3346
+ const ws = i.object({
3337
3347
  name: i.string(),
3338
3348
  audience: i.string(),
3339
3349
  sender_email: i.string().email(),
@@ -3344,7 +3354,7 @@ const vs = i.object({
3344
3354
  secondary_color: i.string().optional(),
3345
3355
  language: i.string().optional()
3346
3356
  });
3347
- vs.extend({
3357
+ ws.extend({
3348
3358
  created_at: i.string().transform((n) => n === null ? "" : n),
3349
3359
  updated_at: i.string().transform((n) => n === null ? "" : n)
3350
3360
  });
@@ -3411,17 +3421,6 @@ i.object({
3411
3421
  state: i.string().optional()
3412
3422
  });
3413
3423
  const ks = i.object({
3414
- id: i.string(),
3415
- expires_at: i.string(),
3416
- auth0Client: i.string().optional(),
3417
- authParams: un
3418
- });
3419
- i.object({
3420
- ...ks.shape,
3421
- created_at: i.string(),
3422
- updated_at: i.string()
3423
- });
3424
- const ws = i.object({
3425
3424
  button_border_radius: i.number(),
3426
3425
  button_border_weight: i.number(),
3427
3426
  buttons_style: i.enum(["pill"]),
@@ -3451,19 +3450,19 @@ const ws = i.object({
3451
3450
  success: i.string(),
3452
3451
  widget_background: i.string(),
3453
3452
  widget_border: i.string()
3454
- }), $e = i.object({
3453
+ }), Pe = i.object({
3455
3454
  bold: i.boolean(),
3456
3455
  size: i.number()
3457
3456
  }), bs = i.object({
3458
- body_text: $e,
3459
- buttons_text: $e,
3457
+ body_text: Pe,
3458
+ buttons_text: Pe,
3460
3459
  font_url: i.string(),
3461
- input_labels: $e,
3462
- links: $e,
3460
+ input_labels: Pe,
3461
+ links: Pe,
3463
3462
  links_style: i.enum(["normal"]),
3464
3463
  reference_text_size: i.number(),
3465
- subtitle: $e,
3466
- title: $e
3464
+ subtitle: Pe,
3465
+ title: Pe
3467
3466
  }), Ts = i.object({
3468
3467
  background_color: i.string(),
3469
3468
  background_image_url: i.string(),
@@ -3475,7 +3474,7 @@ const ws = i.object({
3475
3474
  logo_url: i.string(),
3476
3475
  social_buttons_layout: i.enum(["bottom"])
3477
3476
  }), Ss = i.object({
3478
- borders: ws,
3477
+ borders: ks,
3479
3478
  colors: xs,
3480
3479
  displayName: i.string(),
3481
3480
  fonts: bs,
@@ -3485,6 +3484,44 @@ const ws = i.object({
3485
3484
  Ss.extend({
3486
3485
  themeId: i.string()
3487
3486
  });
3487
+ const Zs = i.object({
3488
+ id: i.string(),
3489
+ expires_at: i.string(),
3490
+ auth0Client: i.string().optional(),
3491
+ authParams: Qt
3492
+ });
3493
+ i.object({
3494
+ ...Zs.shape,
3495
+ created_at: i.string(),
3496
+ updated_at: i.string()
3497
+ });
3498
+ const js = i.object({
3499
+ id: i.string(),
3500
+ email: i.string(),
3501
+ code: i.string(),
3502
+ ip: i.string().optional(),
3503
+ send: i.enum(["code", "link"]),
3504
+ authParams: Qt,
3505
+ expires_at: i.string(),
3506
+ used_at: i.string().optional(),
3507
+ user_id: i.string().optional()
3508
+ });
3509
+ i.object({
3510
+ created_at: i.string(),
3511
+ ...js.shape
3512
+ });
3513
+ const Is = i.object({
3514
+ authParams: Qt,
3515
+ code: i.string(),
3516
+ user_id: i.string(),
3517
+ created_at: i.string(),
3518
+ expires_at: i.string(),
3519
+ used_at: i.string().optional()
3520
+ });
3521
+ i.object({
3522
+ ...Is.shape,
3523
+ created_at: i.string()
3524
+ });
3488
3525
  function hn(n) {
3489
3526
  const [e, t] = n.split("|");
3490
3527
  if (!e || !t)
@@ -3510,7 +3547,7 @@ function Mn(n) {
3510
3547
  }
3511
3548
  };
3512
3549
  }
3513
- function Zs(n) {
3550
+ function Cs(n) {
3514
3551
  return async (e, t) => {
3515
3552
  const [r, s] = await Promise.all([
3516
3553
  n.selectFrom("users").where("users.tenant_id", "=", e).where("users.user_id", "=", t).selectAll().executeTakeFirst(),
@@ -3533,10 +3570,10 @@ function Zs(n) {
3533
3570
  ...s.map(Mn)
3534
3571
  ]
3535
3572
  };
3536
- return P(c);
3573
+ return R(c);
3537
3574
  };
3538
3575
  }
3539
- function Ke(n, e, t, r) {
3576
+ function Ae(n, e, t, r) {
3540
3577
  return t.split(/\s+/).map((a) => a.replace("=", ":")).map((a) => {
3541
3578
  let o = a.startsWith("-"), c, d, u;
3542
3579
  return a.startsWith("-_exists_:") ? (c = a.substring(10), u = !0, o = !0) : a.startsWith("_exists_:") ? (c = a.substring(9), u = !0, o = !1) : a.includes(":") ? (o = a.startsWith("-"), [c, d] = o ? a.substring(1).split(":") : a.split(":"), u = !1) : (c = null, d = a, u = !1), { key: c, value: d, isNegation: o, isExistsQuery: u };
@@ -3553,13 +3590,13 @@ function Ke(n, e, t, r) {
3553
3590
  }
3554
3591
  }), e;
3555
3592
  }
3556
- function Ee(n) {
3593
+ function be(n) {
3557
3594
  return typeof n == "string" ? parseInt(n, 10) : typeof n == "bigint" ? Number(n) : n;
3558
3595
  }
3559
- function js(n) {
3596
+ function Ns(n) {
3560
3597
  return async (e, t) => {
3561
3598
  let r = n.selectFrom("users").where("users.tenant_id", "=", e);
3562
- if (t.q && (r = Ke(n, r, t.q, ["email", "name"])), t.sort && t.sort.sort_by) {
3599
+ if (t.q && (r = Ae(n, r, t.q, ["email", "name"])), t.sort && t.sort.sort_by) {
3563
3600
  const { ref: l } = n.dynamic;
3564
3601
  r = r.orderBy(l(t.sort.sort_by), t.sort.sort_order);
3565
3602
  }
@@ -3567,7 +3604,7 @@ function js(n) {
3567
3604
  const T = c.filter(
3568
3605
  (A) => A.linked_to === l.user_id
3569
3606
  );
3570
- return P({
3607
+ return R({
3571
3608
  ...l,
3572
3609
  email_verified: l.email_verified === 1,
3573
3610
  is_social: l.is_social === 1,
@@ -3586,52 +3623,52 @@ function js(n) {
3586
3623
  users: d,
3587
3624
  start: t.page * t.per_page,
3588
3625
  limit: t.per_page,
3589
- length: Ee(u)
3626
+ length: be(u)
3590
3627
  };
3591
3628
  };
3592
3629
  }
3593
- function Is(n) {
3630
+ function Es(n) {
3594
3631
  return async (e, t) => (await n.deleteFrom("users").where("users.tenant_id", "=", e).where("users.linked_to", "=", t).execute(), (await n.deleteFrom("users").where("users.tenant_id", "=", e).where("users.user_id", "=", t).execute()).length === 1);
3595
3632
  }
3596
- function Cs(n) {
3633
+ function As(n) {
3597
3634
  if (n.email_verified !== void 0)
3598
3635
  return n.email_verified ? 1 : 0;
3599
3636
  }
3600
- function Ns(n) {
3637
+ function Rs(n) {
3601
3638
  return async (e, t, r) => {
3602
3639
  const s = {
3603
3640
  ...r,
3604
- email_verified: Cs(r),
3641
+ email_verified: As(r),
3605
3642
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
3606
3643
  };
3607
3644
  return (await n.updateTable("users").set(s).where("users.tenant_id", "=", e).where("users.user_id", "=", t).execute()).length === 1;
3608
3645
  };
3609
3646
  }
3610
- function Es(n) {
3647
+ function $s(n) {
3611
3648
  return async (e, t, r, s) => {
3612
3649
  const a = { linked_to: null };
3613
3650
  return (await n.updateTable("users").set(a).where("users.tenant_id", "=", e).where("users.user_id", "=", `${r}|${s}`).where("users.linked_to", "=", `${t}`).execute()).length === 1;
3614
3651
  };
3615
3652
  }
3616
- function As(n) {
3653
+ function Ps(n) {
3617
3654
  return {
3618
3655
  create: Gn(n),
3619
- remove: Is(n),
3620
- get: Zs(n),
3621
- list: js(n),
3622
- update: Ns(n),
3656
+ remove: Es(n),
3657
+ get: Cs(n),
3658
+ list: Ns(n),
3659
+ update: Rs(n),
3623
3660
  // TODO - think about this more when other issues fixed
3624
- unlink: Es(n)
3661
+ unlink: $s(n)
3625
3662
  };
3626
3663
  }
3627
- const Rs = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3664
+ const Ds = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3628
3665
  let Qe = (n = 21) => {
3629
3666
  let e = "", t = crypto.getRandomValues(new Uint8Array(n));
3630
3667
  for (; n--; )
3631
- e += Rs[t[n] & 63];
3668
+ e += Ds[t[n] & 63];
3632
3669
  return e;
3633
3670
  };
3634
- function $s(n) {
3671
+ function Ms(n) {
3635
3672
  return async (e) => {
3636
3673
  const t = {
3637
3674
  id: e.id || Qe(),
@@ -3642,13 +3679,13 @@ function $s(n) {
3642
3679
  return await n.insertInto("tenants").values(t).execute(), t;
3643
3680
  };
3644
3681
  }
3645
- function Ps(n) {
3682
+ function Ls(n) {
3646
3683
  return async (e) => {
3647
3684
  const t = await n.selectFrom("tenants").where("tenants.id", "=", e).selectAll().executeTakeFirst();
3648
- return t ? P(t) : null;
3685
+ return t ? R(t) : null;
3649
3686
  };
3650
3687
  }
3651
- function Ds(n) {
3688
+ function Vs(n) {
3652
3689
  return async (e) => {
3653
3690
  let t = n.selectFrom("tenants");
3654
3691
  if (e.sort && e.sort.sort_by) {
@@ -3661,16 +3698,16 @@ function Ds(n) {
3661
3698
  return {
3662
3699
  tenants: s
3663
3700
  };
3664
- const { count: a } = await t.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow(), o = Ee(a);
3701
+ const { count: a } = await t.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow(), o = be(a);
3665
3702
  return {
3666
- tenants: s.map(P),
3703
+ tenants: s.map(R),
3667
3704
  start: (e.page - 1) * e.per_page,
3668
3705
  limit: e.per_page,
3669
3706
  length: o
3670
3707
  };
3671
3708
  };
3672
3709
  }
3673
- function Ms(n) {
3710
+ function Us(n) {
3674
3711
  return async (e, t) => {
3675
3712
  const r = {
3676
3713
  ...t,
@@ -3680,29 +3717,29 @@ function Ms(n) {
3680
3717
  await n.updateTable("tenants").set(r).where("id", "=", e).execute();
3681
3718
  };
3682
3719
  }
3683
- function Ls(n) {
3720
+ function Fs(n) {
3684
3721
  return async (e) => (await n.deleteFrom("tenants").where("tenants.id", "=", e).execute()).length === 1;
3685
3722
  }
3686
- function Vs(n) {
3723
+ function zs(n) {
3687
3724
  return {
3688
- create: $s(n),
3689
- get: Ps(n),
3690
- list: Ds(n),
3691
- update: Ms(n),
3692
- remove: Ls(n)
3725
+ create: Ms(n),
3726
+ get: Ls(n),
3727
+ list: Vs(n),
3728
+ update: Us(n),
3729
+ remove: Fs(n)
3693
3730
  };
3694
3731
  }
3695
3732
  function yn(n) {
3696
3733
  return n ? JSON.stringify(n) : void 0;
3697
3734
  }
3698
- const Us = 1024;
3699
- function Fs(n) {
3735
+ const Bs = 1024;
3736
+ function qs(n) {
3700
3737
  return async (e, t) => {
3701
3738
  var s, a;
3702
3739
  const r = {
3703
3740
  id: Qe(),
3704
3741
  ...t,
3705
- user_agent: t.user_agent.slice(0, Us)
3742
+ user_agent: t.user_agent.slice(0, Bs)
3706
3743
  };
3707
3744
  return await n.insertInto("logs").values({
3708
3745
  ...r,
@@ -3736,10 +3773,10 @@ function Ln(n) {
3736
3773
  _id: n.id
3737
3774
  };
3738
3775
  }
3739
- function zs(n) {
3776
+ function Ws(n) {
3740
3777
  return async (e, t) => {
3741
3778
  let r = n.selectFrom("logs").where("logs.tenant_id", "=", e);
3742
- t.q && (r = Ke(n, r, t.q, ["user_id", "ip"]));
3779
+ t.q && (r = Ae(n, r, t.q, ["user_id", "ip"]));
3743
3780
  let s = r;
3744
3781
  if (t.sort && t.sort.sort_by) {
3745
3782
  const { ref: c } = n.dynamic;
@@ -3754,27 +3791,27 @@ function zs(n) {
3754
3791
  logs: a.map(Ln),
3755
3792
  start: t.page * t.per_page,
3756
3793
  limit: t.per_page,
3757
- length: Ee(o)
3794
+ length: be(o)
3758
3795
  };
3759
3796
  };
3760
3797
  }
3761
- function Bs(n) {
3798
+ function Ks(n) {
3762
3799
  return async (e, t) => {
3763
3800
  const r = await n.selectFrom("logs").where("logs.tenant_id", "=", e).where("logs.id", "=", t).selectAll().executeTakeFirst();
3764
3801
  return r ? Ln(r) : null;
3765
3802
  };
3766
3803
  }
3767
- function qs(n) {
3804
+ function Qs(n) {
3768
3805
  return {
3769
- create: Fs(n),
3770
- list: zs(n),
3771
- get: Bs(n)
3806
+ create: qs(n),
3807
+ list: Ws(n),
3808
+ get: Ks(n)
3772
3809
  };
3773
3810
  }
3774
- function Ws(n) {
3811
+ function Js(n) {
3775
3812
  return async (e, t) => await n.selectFrom("sessions").where("sessions.tenant_id", "=", e).where("sessions.session_id", "=", t).where("sessions.deleted_at", "is", null).selectAll().executeTakeFirst() ?? null;
3776
3813
  }
3777
- function Ks(n) {
3814
+ function Hs(n) {
3778
3815
  return async (e, t) => {
3779
3816
  const r = {
3780
3817
  ...t,
@@ -3784,16 +3821,16 @@ function Ks(n) {
3784
3821
  return await n.insertInto("sessions").values({ ...r, tenant_id: e }).execute(), { ...t, ...r };
3785
3822
  };
3786
3823
  }
3787
- function Qs(n) {
3824
+ function Ys(n) {
3788
3825
  return async (e, t) => !!(await n.updateTable("sessions").set({ deleted_at: (/* @__PURE__ */ new Date()).toISOString() }).where("tenant_id", "=", e).where("sessions.session_id", "=", t).where("sessions.deleted_at", "is", null).execute()).length;
3789
3826
  }
3790
- function Js(n) {
3827
+ function Gs(n) {
3791
3828
  return async (e, t, r) => !!(await n.updateTable("sessions").set(r).where("tenant_id", "=", e).where("sessions.session_id", "=", t).where("sessions.deleted_at", "is", null).execute()).length;
3792
3829
  }
3793
- function Hs(n) {
3830
+ function Xs(n) {
3794
3831
  return async (e, t) => {
3795
3832
  let r = n.selectFrom("sessions").where("sessions.tenant_id", "=", e);
3796
- t.q && (r = Ke(n, r, t.q, ["user_id", "session_id"]));
3833
+ t.q && (r = Ae(n, r, t.q, ["user_id", "session_id"]));
3797
3834
  let s = r;
3798
3835
  if (t.sort && t.sort.sort_by) {
3799
3836
  const { ref: d } = n.dynamic;
@@ -3803,7 +3840,7 @@ function Hs(n) {
3803
3840
  );
3804
3841
  }
3805
3842
  s = s.offset(t.page * t.per_page).limit(t.per_page);
3806
- const a = await s.selectAll().execute(), { count: o } = await r.select((d) => d.fn.countAll().as("count")).executeTakeFirstOrThrow(), c = Ee(o);
3843
+ const a = await s.selectAll().execute(), { count: o } = await r.select((d) => d.fn.countAll().as("count")).executeTakeFirstOrThrow(), c = be(o);
3807
3844
  return {
3808
3845
  sessions: a,
3809
3846
  start: t.page * t.per_page,
@@ -3812,16 +3849,16 @@ function Hs(n) {
3812
3849
  };
3813
3850
  };
3814
3851
  }
3815
- function Ys(n) {
3852
+ function ea(n) {
3816
3853
  return {
3817
- create: Ks(n),
3818
- get: Ws(n),
3819
- list: Hs(n),
3820
- remove: Qs(n),
3821
- update: Js(n)
3854
+ create: Hs(n),
3855
+ get: Js(n),
3856
+ list: Xs(n),
3857
+ remove: Ys(n),
3858
+ update: Gs(n)
3822
3859
  };
3823
3860
  }
3824
- function Gs(n) {
3861
+ function ta(n) {
3825
3862
  return async (e, t) => {
3826
3863
  const r = await n.selectFrom("tickets").where("tickets.tenant_id", "=", e).where("tickets.id", "=", t).where("tickets.used_at", "is", null).selectAll().executeTakeFirst();
3827
3864
  if (!r)
@@ -3851,7 +3888,7 @@ function Gs(n) {
3851
3888
  };
3852
3889
  };
3853
3890
  }
3854
- function Xs(n) {
3891
+ function na(n) {
3855
3892
  return async (e) => {
3856
3893
  const { authParams: t, ...r } = e, s = {
3857
3894
  ...r,
@@ -3863,21 +3900,21 @@ function Xs(n) {
3863
3900
  await n.insertInto("tickets").values(s).execute();
3864
3901
  };
3865
3902
  }
3866
- function ea(n) {
3903
+ function ra(n) {
3867
3904
  return async (e, t) => {
3868
3905
  await n.updateTable("tickets").set({
3869
3906
  used_at: (/* @__PURE__ */ new Date()).toISOString()
3870
3907
  }).where("tickets.tenant_id", "=", e).where("tickets.id", "=", t).execute();
3871
3908
  };
3872
3909
  }
3873
- function ta(n) {
3910
+ function sa(n) {
3874
3911
  return {
3875
- create: Xs(n),
3876
- get: Gs(n),
3877
- remove: ea(n)
3912
+ create: na(n),
3913
+ get: ta(n),
3914
+ remove: ra(n)
3878
3915
  };
3879
3916
  }
3880
- function na(n) {
3917
+ function aa(n) {
3881
3918
  return async (e, t) => {
3882
3919
  const r = (/* @__PURE__ */ new Date()).toISOString();
3883
3920
  return (await n.selectFrom("otps").where("otps.tenant_id", "=", e).where("otps.email", "=", t).where("otps.expires_at", ">", r).where("otps.used_at", "is", null).selectAll().execute()).map((a) => {
@@ -3908,7 +3945,7 @@ function na(n) {
3908
3945
  });
3909
3946
  };
3910
3947
  }
3911
- function ra(n) {
3948
+ function ia(n) {
3912
3949
  return async (e, t) => {
3913
3950
  const { authParams: r, ...s } = t;
3914
3951
  await n.insertInto("otps").values({
@@ -3921,25 +3958,25 @@ function ra(n) {
3921
3958
  }).execute();
3922
3959
  };
3923
3960
  }
3924
- function sa(n) {
3961
+ function oa(n) {
3925
3962
  return async (e, t) => (await n.updateTable("otps").set({
3926
3963
  used_at: (/* @__PURE__ */ new Date()).toISOString()
3927
3964
  }).where("otps.tenant_id", "=", e).where("otps.id", "=", t).execute()).length > 0;
3928
3965
  }
3929
- function aa(n) {
3966
+ function ca(n) {
3930
3967
  return {
3931
- create: ra(n),
3932
- list: na(n),
3933
- remove: sa(n)
3968
+ create: ia(n),
3969
+ list: aa(n),
3970
+ remove: oa(n)
3934
3971
  };
3935
3972
  }
3936
- function ia(n) {
3973
+ function da(n) {
3937
3974
  return async (e, t) => {
3938
3975
  const r = await n.selectFrom("passwords").where("passwords.tenant_id", "=", e).where("passwords.user_id", "=", t).selectAll().executeTakeFirstOrThrow(), { tenant_id: s, ...a } = r;
3939
3976
  return a;
3940
3977
  };
3941
3978
  }
3942
- function oa(n) {
3979
+ function ua(n) {
3943
3980
  return async (e, t) => {
3944
3981
  const r = {
3945
3982
  ...t,
@@ -3952,43 +3989,67 @@ function oa(n) {
3952
3989
  }).execute(), r;
3953
3990
  };
3954
3991
  }
3955
- function ca(n) {
3992
+ function la(n) {
3956
3993
  return async (e, t) => (await n.updateTable("passwords").set({
3957
3994
  password: t.password,
3958
3995
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
3959
3996
  }).where("tenant_id", "=", e).where("user_id", "=", t.user_id).execute()).length === 1;
3960
3997
  }
3961
- function da(n) {
3998
+ function pa(n) {
3962
3999
  return {
3963
- create: oa(n),
3964
- update: ca(n),
3965
- get: ia(n)
4000
+ create: ua(n),
4001
+ update: la(n),
4002
+ get: da(n)
3966
4003
  };
3967
4004
  }
3968
- function ua(n) {
4005
+ function ha(n) {
3969
4006
  return async (e, t) => {
3970
- const r = (/* @__PURE__ */ new Date()).toISOString();
3971
- return (await n.selectFrom("codes").where("codes.tenant_id", "=", e).where("codes.user_id", "=", t).where("codes.used_at", "is", null).where("codes.expires_at", ">", r).selectAll().execute()).map((a) => {
3972
- const { tenant_id: o, ...c } = a;
3973
- return c;
3974
- });
4007
+ let r = n.selectFrom("codes").where("codes.tenant_id", "=", e);
4008
+ t.q && (r = Ae(n, r, t.q, ["code", "login_id"]));
4009
+ const a = await r.offset(t.page * t.per_page).limit(t.per_page).selectAll().execute(), { count: o } = await r.select((d) => d.fn.countAll().as("count")).executeTakeFirstOrThrow();
4010
+ return {
4011
+ codes: a.map((d) => {
4012
+ const { tenant_id: u, ...l } = d;
4013
+ return ls.parse(R(l));
4014
+ }),
4015
+ start: t.page * t.per_page,
4016
+ limit: t.per_page,
4017
+ length: be(o)
4018
+ };
3975
4019
  };
3976
4020
  }
3977
- function la(n) {
4021
+ function fa(n) {
3978
4022
  return async (e, t) => {
3979
- await n.insertInto("codes").values({
4023
+ const r = {
3980
4024
  ...t,
4025
+ tenant_id: e,
4026
+ created_at: (/* @__PURE__ */ new Date()).toISOString(),
4027
+ updated_at: (/* @__PURE__ */ new Date()).toISOString()
4028
+ };
4029
+ return await n.insertInto("codes").values({
4030
+ ...r,
3981
4031
  tenant_id: e
3982
- }).execute();
4032
+ }).execute(), r;
3983
4033
  };
3984
4034
  }
3985
- function pa(n) {
4035
+ function ma(n) {
4036
+ return async (e, t) => (await n.deleteFrom("codes").where("codes.tenant_id", "=", e).where("codes.code_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
4037
+ }
4038
+ function _a(n) {
4039
+ return async (e, t, r) => {
4040
+ const s = await n.selectFrom("codes").where("codes.tenant_id", "=", e).where("codes.code_id", "=", t).where("codes.code_type", "=", r).selectAll().executeTakeFirst();
4041
+ return s ? R(s) : null;
4042
+ };
4043
+ }
4044
+ function ga(n) {
3986
4045
  return {
3987
- create: la(n),
3988
- list: ua(n)
4046
+ create: fa(n),
4047
+ list: ha(n),
4048
+ remove: ma(n),
4049
+ get: _a(n)
3989
4050
  };
3990
4051
  }
3991
- function ha(n) {
4052
+ function ya(n) {
3992
4053
  return async (e) => {
3993
4054
  const t = (/* @__PURE__ */ new Date()).toISOString(), r = await n.selectFrom("universal_login_sessions").where("universal_login_sessions.expires_at", ">", t).where("universal_login_sessions.id", "=", e).selectAll().executeTakeFirst();
3994
4055
  if (!r) return null;
@@ -4026,7 +4087,7 @@ function ha(n) {
4026
4087
  };
4027
4088
  };
4028
4089
  }
4029
- function fa(n) {
4090
+ function va(n) {
4030
4091
  return async (e, t) => {
4031
4092
  const { authParams: r, ...s } = t, a = {
4032
4093
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -4035,20 +4096,20 @@ function fa(n) {
4035
4096
  return await n.insertInto("universal_login_sessions").values({ ...r, ...s, ...a, tenant_id: e }).execute(), { ...t, ...a };
4036
4097
  };
4037
4098
  }
4038
- function ma(n) {
4099
+ function wa(n) {
4039
4100
  return async (e, t, r) => {
4040
4101
  const { authParams: s, ...a } = r;
4041
4102
  return (await n.updateTable("universal_login_sessions").set({ ...s, ...a }).where("id", "=", t).where("tenant_id", "=", e).execute()).length === 1;
4042
4103
  };
4043
4104
  }
4044
- function _a(n) {
4105
+ function ka(n) {
4045
4106
  return {
4046
- create: fa(n),
4047
- get: ha(n),
4048
- update: ma(n)
4107
+ create: va(n),
4108
+ get: ya(n),
4109
+ update: wa(n)
4049
4110
  };
4050
4111
  }
4051
- function ga(n) {
4112
+ function xa(n) {
4052
4113
  return async (e, t) => {
4053
4114
  const r = {
4054
4115
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -4059,21 +4120,21 @@ function ga(n) {
4059
4120
  return await n.insertInto("applications").values({ ...r, tenant_id: e }).execute(), r;
4060
4121
  };
4061
4122
  }
4062
- function ya(n) {
4123
+ function ba(n) {
4063
4124
  return async (e) => ({
4064
4125
  applications: await n.selectFrom("applications").where("applications.tenant_id", "=", e).selectAll().execute()
4065
4126
  });
4066
4127
  }
4067
- function va(n) {
4128
+ function Ta(n) {
4068
4129
  return async (e, t) => {
4069
4130
  const r = await n.selectFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", t).selectAll().executeTakeFirst();
4070
- return r ? (r.disable_sign_ups = !!r.disable_sign_ups, P(r)) : null;
4131
+ return r ? (r.disable_sign_ups = !!r.disable_sign_ups, R(r)) : null;
4071
4132
  };
4072
4133
  }
4073
- function ka(n) {
4134
+ function Oa(n) {
4074
4135
  return async (e, t) => (await n.deleteFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", t).executeTakeFirst()).numDeletedRows > 0;
4075
4136
  }
4076
- function wa(n) {
4137
+ function Sa(n) {
4077
4138
  return async (e, t, r) => {
4078
4139
  const s = {
4079
4140
  ...r,
@@ -4082,16 +4143,16 @@ function wa(n) {
4082
4143
  return await n.updateTable("applications").set(s).where("applications.id", "=", t).where("applications.tenant_id", "=", e).execute(), !0;
4083
4144
  };
4084
4145
  }
4085
- function xa(n) {
4146
+ function Za(n) {
4086
4147
  return {
4087
- create: ga(n),
4088
- list: ya(n),
4089
- get: va(n),
4090
- remove: ka(n),
4091
- update: wa(n)
4148
+ create: xa(n),
4149
+ list: ba(n),
4150
+ get: Ta(n),
4151
+ remove: Oa(n),
4152
+ update: Sa(n)
4092
4153
  };
4093
4154
  }
4094
- function ba(n) {
4155
+ function ja(n) {
4095
4156
  return async (e, t) => {
4096
4157
  const r = {
4097
4158
  id: Qe(),
@@ -4102,29 +4163,29 @@ function ba(n) {
4102
4163
  return await n.insertInto("connections").values({ ...r, tenant_id: e }).execute(), r;
4103
4164
  };
4104
4165
  }
4105
- function Ta(n) {
4166
+ function Ia(n) {
4106
4167
  return async (e, t) => {
4107
4168
  let r = n.selectFrom("connections").where("connections.tenant_id", "=", e);
4108
- t.q && (r = Ke(n, r, t.q, ["user_id", "ip"]));
4169
+ t.q && (r = Ae(n, r, t.q, ["user_id", "ip"]));
4109
4170
  const a = await r.offset(t.page * t.per_page).limit(t.per_page).selectAll().execute(), { count: o } = await r.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
4110
4171
  return {
4111
- connections: a.map(P),
4172
+ connections: a.map(R),
4112
4173
  start: t.page * t.per_page,
4113
4174
  limit: t.per_page,
4114
- length: Ee(o)
4175
+ length: be(o)
4115
4176
  };
4116
4177
  };
4117
4178
  }
4118
- function Oa(n) {
4179
+ function Ca(n) {
4119
4180
  return async (e, t) => (await n.deleteFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", t).executeTakeFirst()).numDeletedRows > 0;
4120
4181
  }
4121
- function Sa(n) {
4182
+ function Na(n) {
4122
4183
  return async (e, t) => {
4123
4184
  const r = await n.selectFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", t).selectAll().executeTakeFirst();
4124
- return r ? P(r) : null;
4185
+ return r ? R(r) : null;
4125
4186
  };
4126
4187
  }
4127
- function Za(n) {
4188
+ function Ea(n) {
4128
4189
  return async (e, t, r) => {
4129
4190
  const s = {
4130
4191
  ...r,
@@ -4133,19 +4194,19 @@ function Za(n) {
4133
4194
  return await n.updateTable("connections").set(s).where("connections.id", "=", t).where("connections.tenant_id", "=", e).execute(), !0;
4134
4195
  };
4135
4196
  }
4136
- function ja(n) {
4197
+ function Aa(n) {
4137
4198
  return {
4138
- create: ba(n),
4139
- get: Sa(n),
4140
- list: Ta(n),
4141
- remove: Oa(n),
4142
- update: Za(n)
4199
+ create: ja(n),
4200
+ get: Na(n),
4201
+ list: Ia(n),
4202
+ remove: Ca(n),
4203
+ update: Ea(n)
4143
4204
  };
4144
4205
  }
4145
- function Yt(n) {
4206
+ function Gt(n) {
4146
4207
  return n != null && n.length ? n.split(",").map((e) => e.trim()) : [];
4147
4208
  }
4148
- function Ia(n) {
4209
+ function Ra(n) {
4149
4210
  return {
4150
4211
  get: async (e) => {
4151
4212
  const t = await n.selectFrom("applications").selectAll().where("id", "=", e).executeTakeFirst();
@@ -4159,41 +4220,41 @@ function Ia(n) {
4159
4220
  id: t.id,
4160
4221
  name: t.name,
4161
4222
  connections: s.map(
4162
- (c) => ln.parse(P(c))
4223
+ (c) => ln.parse(R(c))
4163
4224
  ),
4164
4225
  domains: a,
4165
4226
  tenant_id: r.id,
4166
- allowed_callback_urls: Yt(t.allowed_callback_urls),
4167
- allowed_logout_urls: Yt(t.allowed_logout_urls),
4168
- allowed_web_origins: Yt(t.allowed_web_origins),
4227
+ allowed_callback_urls: Gt(t.allowed_callback_urls),
4228
+ allowed_logout_urls: Gt(t.allowed_logout_urls),
4229
+ allowed_web_origins: Gt(t.allowed_web_origins),
4169
4230
  email_validation: t.email_validation,
4170
4231
  client_secret: t.client_secret,
4171
- tenant: P(r),
4232
+ tenant: R(r),
4172
4233
  // this is really an integer in the database
4173
4234
  disable_sign_ups: !!t.disable_sign_ups
4174
4235
  };
4175
4236
  }
4176
4237
  };
4177
4238
  }
4178
- function Ca(n) {
4239
+ function $a(n) {
4179
4240
  return async () => await n.selectFrom("keys").where("revoked_at", "is", null).selectAll().execute();
4180
4241
  }
4181
- function Na(n) {
4242
+ function Pa(n) {
4182
4243
  return async (e) => {
4183
4244
  await n.insertInto("keys").values(e).execute();
4184
4245
  };
4185
4246
  }
4186
- function Ea(n) {
4247
+ function Da(n) {
4187
4248
  return async (e, t) => !!(await n.updateTable("keys").set({ revoked_at: t.toISOString() }).where("kid", "=", e).execute()).length;
4188
4249
  }
4189
- function Aa(n) {
4250
+ function Ma(n) {
4190
4251
  return {
4191
- create: Na(n),
4192
- list: Ca(n),
4193
- revoke: Ea(n)
4252
+ create: Pa(n),
4253
+ list: $a(n),
4254
+ revoke: Da(n)
4194
4255
  };
4195
4256
  }
4196
- function Ra(n) {
4257
+ function La(n) {
4197
4258
  return async (e, t) => {
4198
4259
  const r = {
4199
4260
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -4205,26 +4266,26 @@ function Ra(n) {
4205
4266
  return await n.insertInto("domains").values(r).execute(), r;
4206
4267
  };
4207
4268
  }
4208
- function $a(n) {
4269
+ function Va(n) {
4209
4270
  return async (e, t) => {
4210
4271
  let r = n.selectFrom("domains").where("domains.tenant_id", "=", e);
4211
- t.q && (r = Ke(n, r, t.q, ["user_id", "ip"]));
4272
+ t.q && (r = Ae(n, r, t.q, ["user_id", "ip"]));
4212
4273
  const a = await r.offset(t.page * t.per_page).limit(t.per_page).selectAll().execute(), { count: o } = await r.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
4213
4274
  return {
4214
4275
  domains: a,
4215
4276
  start: t.page * t.per_page,
4216
4277
  limit: t.per_page,
4217
- length: Ee(o)
4278
+ length: be(o)
4218
4279
  };
4219
4280
  };
4220
4281
  }
4221
- function Pa(n) {
4282
+ function Ua(n) {
4222
4283
  return {
4223
- create: Ra(n),
4224
- list: $a(n)
4284
+ create: La(n),
4285
+ list: Va(n)
4225
4286
  };
4226
4287
  }
4227
- function Da(n) {
4288
+ function Fa(n) {
4228
4289
  return async (e) => {
4229
4290
  const [t] = await n.selectFrom("branding").where("branding.tenant_id", "=", e).selectAll().execute();
4230
4291
  if (!t)
@@ -4239,7 +4300,7 @@ function Da(n) {
4239
4300
  font_url: u,
4240
4301
  ...l
4241
4302
  } = t;
4242
- return P({
4303
+ return R({
4243
4304
  ...l,
4244
4305
  colors: {
4245
4306
  primary: s,
@@ -4254,9 +4315,9 @@ function Da(n) {
4254
4315
  });
4255
4316
  };
4256
4317
  }
4257
- function Ma(n) {
4318
+ function za(n) {
4258
4319
  return async (e, t) => {
4259
- var o, c, d, u, l, T, A, L, Q, se, ce, de, ue, Ae, Re, J, H, Y;
4320
+ var o, c, d, u, l, T, A, L, Q, se, ce, de, ue, Re, $e, J, H, Y;
4260
4321
  const { colors: r, font: s, ...a } = t;
4261
4322
  try {
4262
4323
  await n.insertInto("branding").values({
@@ -4275,20 +4336,20 @@ function Ma(n) {
4275
4336
  colors_primary: r == null ? void 0 : r.primary,
4276
4337
  colors_page_background_type: (ce = (se = t.colors) == null ? void 0 : se.page_background) == null ? void 0 : ce.type,
4277
4338
  colors_page_background_start: (ue = (de = t.colors) == null ? void 0 : de.page_background) == null ? void 0 : ue.start,
4278
- colors_page_background_end: (Re = (Ae = t.colors) == null ? void 0 : Ae.page_background) == null ? void 0 : Re.end,
4339
+ colors_page_background_end: ($e = (Re = t.colors) == null ? void 0 : Re.page_background) == null ? void 0 : $e.end,
4279
4340
  colors_page_background_angle_dev: (H = (J = t.colors) == null ? void 0 : J.page_background) == null ? void 0 : H.angle_deg,
4280
4341
  font_url: (Y = t.font) == null ? void 0 : Y.url
4281
4342
  }).where("tenant_id", "=", e).execute();
4282
4343
  }
4283
4344
  };
4284
4345
  }
4285
- function La(n) {
4346
+ function Ba(n) {
4286
4347
  return {
4287
- get: Da(n),
4288
- set: Ma(n)
4348
+ get: Fa(n),
4349
+ set: za(n)
4289
4350
  };
4290
4351
  }
4291
- function Va(n) {
4352
+ function qa(n) {
4292
4353
  return async (e, t) => {
4293
4354
  const r = await n.selectFrom("authentication_codes").where("tenant_id", "=", e).where("code", "=", t).selectAll().executeTakeFirst();
4294
4355
  if (!r)
@@ -4315,7 +4376,7 @@ function Va(n) {
4315
4376
  };
4316
4377
  };
4317
4378
  }
4318
- function Ua(n) {
4379
+ function Wa(n) {
4319
4380
  return async (e, t) => {
4320
4381
  const { authParams: r, ...s } = t;
4321
4382
  await n.insertInto("authentication_codes").values({
@@ -4325,41 +4386,41 @@ function Ua(n) {
4325
4386
  }).execute();
4326
4387
  };
4327
4388
  }
4328
- function Fa(n) {
4389
+ function Ka(n) {
4329
4390
  return {
4330
- create: Ua(n),
4331
- get: Va(n)
4391
+ create: Wa(n),
4392
+ get: qa(n)
4332
4393
  };
4333
4394
  }
4334
- function za(n) {
4395
+ function Qa(n) {
4335
4396
  return async (e, t) => {
4336
4397
  let r = n.selectFrom("hooks").where("hooks.tenant_id", "=", e);
4337
- t.q && (r = Ke(n, r, t.q, ["url"]));
4398
+ t.q && (r = Ae(n, r, t.q, ["url"]));
4338
4399
  const a = await r.offset(t.page * t.per_page).limit(t.per_page).selectAll().execute(), { count: o } = await r.select((d) => d.fn.countAll().as("count")).executeTakeFirstOrThrow();
4339
4400
  return {
4340
4401
  hooks: a.map((d) => {
4341
4402
  const { tenant_id: u, enabled: l, ...T } = d;
4342
- return P({
4403
+ return R({
4343
4404
  ...T,
4344
4405
  enabled: !!l
4345
4406
  });
4346
4407
  }),
4347
4408
  start: t.page * t.per_page,
4348
4409
  limit: t.per_page,
4349
- length: Ee(o)
4410
+ length: be(o)
4350
4411
  };
4351
4412
  };
4352
4413
  }
4353
- function Ba(n) {
4414
+ function Ja(n) {
4354
4415
  return async (e, t) => {
4355
4416
  const r = await n.selectFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", t).selectAll().executeTakeFirst();
4356
- return r ? (r.enabled = !!r.enabled, P(r)) : null;
4417
+ return r ? (r.enabled = !!r.enabled, R(r)) : null;
4357
4418
  };
4358
4419
  }
4359
- function qa(n) {
4420
+ function Ha(n) {
4360
4421
  return async (e, t) => (await n.deleteFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
4361
4422
  }
4362
- function Wa(n) {
4423
+ function Ya(n) {
4363
4424
  return async (e, t) => {
4364
4425
  const r = {
4365
4426
  hook_id: Qe(),
@@ -4370,7 +4431,7 @@ function Wa(n) {
4370
4431
  return await n.insertInto("hooks").values({ ...r, tenant_id: e }).execute(), r;
4371
4432
  };
4372
4433
  }
4373
- function Ka(n) {
4434
+ function Ga(n) {
4374
4435
  return async (e, t, r) => {
4375
4436
  const s = {
4376
4437
  ...r,
@@ -4379,16 +4440,16 @@ function Ka(n) {
4379
4440
  return await n.updateTable("hooks").set(s).where("hooks.hook_id", "=", t).where("hooks.tenant_id", "=", e).execute(), !0;
4380
4441
  };
4381
4442
  }
4382
- function Qa(n) {
4443
+ function Xa(n) {
4383
4444
  return {
4384
- create: Wa(n),
4385
- get: Ba(n),
4386
- list: za(n),
4387
- update: Ka(n),
4388
- remove: qa(n)
4445
+ create: Ya(n),
4446
+ get: Ja(n),
4447
+ list: Qa(n),
4448
+ update: Ga(n),
4449
+ remove: Ha(n)
4389
4450
  };
4390
4451
  }
4391
- function Ja(n, e) {
4452
+ function ei(n, e) {
4392
4453
  var t = {};
4393
4454
  for (var r in n) Object.prototype.hasOwnProperty.call(n, r) && e.indexOf(r) < 0 && (t[r] = n[r]);
4394
4455
  if (n != null && typeof Object.getOwnPropertySymbols == "function")
@@ -4396,7 +4457,7 @@ function Ja(n, e) {
4396
4457
  e.indexOf(r[s]) < 0 && Object.prototype.propertyIsEnumerable.call(n, r[s]) && (t[r[s]] = n[r[s]]);
4397
4458
  return t;
4398
4459
  }
4399
- function Ha(n, e) {
4460
+ function ti(n, e) {
4400
4461
  var t;
4401
4462
  return ((t = n == null ? void 0 : n._def) === null || t === void 0 ? void 0 : t.typeName) === e;
4402
4463
  }
@@ -4407,25 +4468,25 @@ function He(n, e) {
4407
4468
  return s._def.openapi = this._def.openapi, s;
4408
4469
  };
4409
4470
  }
4410
- function Ya(n) {
4471
+ function ni(n) {
4411
4472
  if (typeof n.ZodType.prototype.openapi < "u")
4412
4473
  return;
4413
4474
  n.ZodType.prototype.openapi = function(s, a) {
4414
4475
  var o, c, d, u, l, T;
4415
- const A = typeof s == "string" ? a : s, L = A ?? {}, { param: Q } = L, se = Ja(L, ["param"]), ce = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof s == "string" ? { refId: s } : void 0), de = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), se), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || Q ? {
4476
+ const A = typeof s == "string" ? a : s, L = A ?? {}, { param: Q } = L, se = ei(L, ["param"]), ce = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof s == "string" ? { refId: s } : void 0), de = Object.assign(Object.assign(Object.assign({}, (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata), se), !((u = (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata) === null || u === void 0) && u.param || Q ? {
4416
4477
  param: Object.assign(Object.assign({}, (T = (l = this._def.openapi) === null || l === void 0 ? void 0 : l.metadata) === null || T === void 0 ? void 0 : T.param), Q)
4417
4478
  } : void 0), ue = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(ce).length > 0 ? { _internal: ce } : void 0), Object.keys(de).length > 0 ? { metadata: de } : void 0) }));
4418
- if (Ha(this, "ZodObject")) {
4419
- const Ae = this.extend;
4420
- ue.extend = function(...Re) {
4421
- var J, H, Y, le, be, Te;
4422
- const Oe = Ae.apply(this, Re);
4423
- return Oe._def.openapi = {
4479
+ if (ti(this, "ZodObject")) {
4480
+ const Re = this.extend;
4481
+ ue.extend = function(...$e) {
4482
+ var J, H, Y, le, Te, Oe;
4483
+ const Se = Re.apply(this, $e);
4484
+ return Se._def.openapi = {
4424
4485
  _internal: {
4425
- extendedFrom: !((H = (J = this._def.openapi) === null || J === void 0 ? void 0 : J._internal) === null || H === void 0) && H.refId ? { refId: (le = (Y = this._def.openapi) === null || Y === void 0 ? void 0 : Y._internal) === null || le === void 0 ? void 0 : le.refId, schema: this } : (be = this._def.openapi) === null || be === void 0 ? void 0 : be._internal.extendedFrom
4486
+ extendedFrom: !((H = (J = this._def.openapi) === null || J === void 0 ? void 0 : J._internal) === null || H === void 0) && H.refId ? { refId: (le = (Y = this._def.openapi) === null || Y === void 0 ? void 0 : Y._internal) === null || le === void 0 ? void 0 : le.refId, schema: this } : (Te = this._def.openapi) === null || Te === void 0 ? void 0 : Te._internal.extendedFrom
4426
4487
  },
4427
- metadata: (Te = Oe._def.openapi) === null || Te === void 0 ? void 0 : Te.metadata
4428
- }, Oe;
4488
+ metadata: (Oe = Se._def.openapi) === null || Oe === void 0 ? void 0 : Oe.metadata
4489
+ }, Se;
4429
4490
  };
4430
4491
  }
4431
4492
  return ue;
@@ -4486,14 +4547,14 @@ var C;
4486
4547
  }
4487
4548
  n.joinValues = r, n.jsonStringifyReplacer = (s, a) => typeof a == "bigint" ? a.toString() : a;
4488
4549
  })(C || (C = {}));
4489
- var rn;
4550
+ var sn;
4490
4551
  (function(n) {
4491
4552
  n.mergeShapes = (e, t) => ({
4492
4553
  ...e,
4493
4554
  ...t
4494
4555
  // second overwrites first
4495
4556
  });
4496
- })(rn || (rn = {}));
4557
+ })(sn || (sn = {}));
4497
4558
  const g = C.arrayToEnum([
4498
4559
  "string",
4499
4560
  "nan",
@@ -4553,7 +4614,7 @@ const g = C.arrayToEnum([
4553
4614
  "invalid_intersection_types",
4554
4615
  "not_multiple_of",
4555
4616
  "not_finite"
4556
- ]), Ga = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
4617
+ ]), ri = (n) => JSON.stringify(n, null, 2).replace(/"([^"]+)":/g, "$1:");
4557
4618
  class U extends Error {
4558
4619
  constructor(e) {
4559
4620
  super(), this.issues = [], this.addIssue = (r) => {
@@ -4614,7 +4675,7 @@ class U extends Error {
4614
4675
  }
4615
4676
  }
4616
4677
  U.create = (n) => new U(n);
4617
- const Be = (n, e) => {
4678
+ const qe = (n, e) => {
4618
4679
  let t;
4619
4680
  switch (n.code) {
4620
4681
  case h.invalid_type:
@@ -4670,8 +4731,8 @@ const Be = (n, e) => {
4670
4731
  }
4671
4732
  return { message: t };
4672
4733
  };
4673
- let Vn = Be;
4674
- function Xa(n) {
4734
+ let Vn = qe;
4735
+ function si(n) {
4675
4736
  Vn = n;
4676
4737
  }
4677
4738
  function Vt() {
@@ -4697,7 +4758,7 @@ const Ut = (n) => {
4697
4758
  path: a,
4698
4759
  message: c
4699
4760
  };
4700
- }, ei = [];
4761
+ }, ai = [];
4701
4762
  function m(n, e) {
4702
4763
  const t = Vt(), r = Ut({
4703
4764
  issueData: e,
@@ -4707,13 +4768,13 @@ function m(n, e) {
4707
4768
  n.common.contextualErrorMap,
4708
4769
  n.schemaErrorMap,
4709
4770
  t,
4710
- t === Be ? void 0 : Be
4771
+ t === qe ? void 0 : qe
4711
4772
  // then global default map
4712
4773
  ].filter((s) => !!s)
4713
4774
  });
4714
4775
  n.common.issues.push(r);
4715
4776
  }
4716
- class $ {
4777
+ class P {
4717
4778
  constructor() {
4718
4779
  this.value = "valid";
4719
4780
  }
@@ -4741,7 +4802,7 @@ class $ {
4741
4802
  value: o
4742
4803
  });
4743
4804
  }
4744
- return $.mergeObjectSync(e, r);
4805
+ return P.mergeObjectSync(e, r);
4745
4806
  }
4746
4807
  static mergeObjectSync(e, t) {
4747
4808
  const r = {};
@@ -4756,7 +4817,7 @@ class $ {
4756
4817
  }
4757
4818
  const x = Object.freeze({
4758
4819
  status: "aborted"
4759
- }), Me = (n) => ({ status: "dirty", value: n }), M = (n) => ({ status: "valid", value: n }), sn = (n) => n.status === "aborted", an = (n) => n.status === "dirty", mt = (n) => n.status === "valid", _t = (n) => typeof Promise < "u" && n instanceof Promise;
4820
+ }), Le = (n) => ({ status: "dirty", value: n }), M = (n) => ({ status: "valid", value: n }), an = (n) => n.status === "aborted", on = (n) => n.status === "dirty", mt = (n) => n.status === "valid", _t = (n) => typeof Promise < "u" && n instanceof Promise;
4760
4821
  function Ft(n, e, t, r) {
4761
4822
  if (typeof e == "function" ? n !== e || !r : !e.has(n)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4762
4823
  return e.get(n);
@@ -4778,7 +4839,7 @@ class ne {
4778
4839
  return this._cachedPath.length || (this._key instanceof Array ? this._cachedPath.push(...this._path, ...this._key) : this._cachedPath.push(...this._path, this._key)), this._cachedPath;
4779
4840
  }
4780
4841
  }
4781
- const kn = (n, e) => {
4842
+ const wn = (n, e) => {
4782
4843
  if (mt(e))
4783
4844
  return { success: !0, data: e.value };
4784
4845
  if (!n.common.issues.length)
@@ -4827,7 +4888,7 @@ class j {
4827
4888
  }
4828
4889
  _processInputParams(e) {
4829
4890
  return {
4830
- status: new $(),
4891
+ status: new P(),
4831
4892
  ctx: {
4832
4893
  common: e.parent.common,
4833
4894
  data: e.data,
@@ -4868,7 +4929,7 @@ class j {
4868
4929
  data: e,
4869
4930
  parsedType: fe(e)
4870
4931
  }, a = this._parseSync({ data: e, path: s.path, parent: s });
4871
- return kn(s, a);
4932
+ return wn(s, a);
4872
4933
  }
4873
4934
  async parseAsync(e, t) {
4874
4935
  const r = await this.safeParseAsync(e, t);
@@ -4889,7 +4950,7 @@ class j {
4889
4950
  data: e,
4890
4951
  parsedType: fe(e)
4891
4952
  }, s = this._parse({ data: e, path: r.path, parent: r }), a = await (_t(s) ? s : Promise.resolve(s));
4892
- return kn(r, a);
4953
+ return wn(r, a);
4893
4954
  }
4894
4955
  refine(e, t) {
4895
4956
  const r = (s) => typeof t == "string" || typeof t > "u" ? { message: t } : typeof t == "function" ? t(s) : t;
@@ -4907,7 +4968,7 @@ class j {
4907
4968
  _refinement(e) {
4908
4969
  return new K({
4909
4970
  schema: this,
4910
- typeName: w.ZodEffects,
4971
+ typeName: k.ZodEffects,
4911
4972
  effect: { type: "refinement", refinement: e }
4912
4973
  });
4913
4974
  }
@@ -4927,19 +4988,19 @@ class j {
4927
4988
  return q.create(this, this._def);
4928
4989
  }
4929
4990
  promise() {
4930
- return We.create(this, this._def);
4991
+ return Ke.create(this, this._def);
4931
4992
  }
4932
4993
  or(e) {
4933
- return kt.create([this, e], this._def);
4994
+ return wt.create([this, e], this._def);
4934
4995
  }
4935
4996
  and(e) {
4936
- return wt.create(this, e, this._def);
4997
+ return kt.create(this, e, this._def);
4937
4998
  }
4938
4999
  transform(e) {
4939
5000
  return new K({
4940
5001
  ...S(this._def),
4941
5002
  schema: this,
4942
- typeName: w.ZodEffects,
5003
+ typeName: k.ZodEffects,
4943
5004
  effect: { type: "transform", transform: e }
4944
5005
  });
4945
5006
  }
@@ -4949,12 +5010,12 @@ class j {
4949
5010
  ...S(this._def),
4950
5011
  innerType: this,
4951
5012
  defaultValue: t,
4952
- typeName: w.ZodDefault
5013
+ typeName: k.ZodDefault
4953
5014
  });
4954
5015
  }
4955
5016
  brand() {
4956
5017
  return new fn({
4957
- typeName: w.ZodBranded,
5018
+ typeName: k.ZodBranded,
4958
5019
  type: this,
4959
5020
  ...S(this._def)
4960
5021
  });
@@ -4965,7 +5026,7 @@ class j {
4965
5026
  ...S(this._def),
4966
5027
  innerType: this,
4967
5028
  catchValue: t,
4968
- typeName: w.ZodCatch
5029
+ typeName: k.ZodCatch
4969
5030
  });
4970
5031
  }
4971
5032
  describe(e) {
@@ -4988,14 +5049,14 @@ class j {
4988
5049
  return this.safeParse(null).success;
4989
5050
  }
4990
5051
  }
4991
- const ti = /^c[^\s-]{8,}$/i, ni = /^[0-9a-z]+$/, ri = /^[0-9A-HJKMNP-TV-Z]{26}$/, si = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ai = /^[a-z0-9_-]{21}$/i, ii = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, oi = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, ci = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
4992
- let Gt;
4993
- const di = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, ui = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, li = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Fn = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", pi = new RegExp(`^${Fn}$`);
5052
+ const ii = /^c[^\s-]{8,}$/i, oi = /^[0-9a-z]+$/, ci = /^[0-9A-HJKMNP-TV-Z]{26}$/, di = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i, ui = /^[a-z0-9_-]{21}$/i, li = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/, pi = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, hi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
5053
+ let Xt;
5054
+ const fi = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/, mi = /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/, _i = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, Fn = "((\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-((0[13578]|1[02])-(0[1-9]|[12]\\d|3[01])|(0[469]|11)-(0[1-9]|[12]\\d|30)|(02)-(0[1-9]|1\\d|2[0-8])))", gi = new RegExp(`^${Fn}$`);
4994
5055
  function zn(n) {
4995
5056
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
4996
5057
  return n.precision ? e = `${e}\\.\\d{${n.precision}}` : n.precision == null && (e = `${e}(\\.\\d+)?`), e;
4997
5058
  }
4998
- function hi(n) {
5059
+ function yi(n) {
4999
5060
  return new RegExp(`^${zn(n)}$`);
5000
5061
  }
5001
5062
  function Bn(n) {
@@ -5003,8 +5064,8 @@ function Bn(n) {
5003
5064
  const t = [];
5004
5065
  return t.push(n.local ? "Z?" : "Z"), n.offset && t.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${t.join("|")})`, new RegExp(`^${e}$`);
5005
5066
  }
5006
- function fi(n, e) {
5007
- return !!((e === "v4" || !e) && di.test(n) || (e === "v6" || !e) && ui.test(n));
5067
+ function vi(n, e) {
5068
+ return !!((e === "v4" || !e) && fi.test(n) || (e === "v6" || !e) && mi.test(n));
5008
5069
  }
5009
5070
  class z extends j {
5010
5071
  _parse(e) {
@@ -5016,7 +5077,7 @@ class z extends j {
5016
5077
  received: a.parsedType
5017
5078
  }), x;
5018
5079
  }
5019
- const r = new $();
5080
+ const r = new P();
5020
5081
  let s;
5021
5082
  for (const a of this._def.checks)
5022
5083
  if (a.kind === "min")
@@ -5055,43 +5116,43 @@ class z extends j {
5055
5116
  message: a.message
5056
5117
  }), r.dirty());
5057
5118
  } else if (a.kind === "email")
5058
- oi.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5119
+ pi.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5059
5120
  validation: "email",
5060
5121
  code: h.invalid_string,
5061
5122
  message: a.message
5062
5123
  }), r.dirty());
5063
5124
  else if (a.kind === "emoji")
5064
- Gt || (Gt = new RegExp(ci, "u")), Gt.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5125
+ Xt || (Xt = new RegExp(hi, "u")), Xt.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5065
5126
  validation: "emoji",
5066
5127
  code: h.invalid_string,
5067
5128
  message: a.message
5068
5129
  }), r.dirty());
5069
5130
  else if (a.kind === "uuid")
5070
- si.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5131
+ di.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5071
5132
  validation: "uuid",
5072
5133
  code: h.invalid_string,
5073
5134
  message: a.message
5074
5135
  }), r.dirty());
5075
5136
  else if (a.kind === "nanoid")
5076
- ai.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5137
+ ui.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5077
5138
  validation: "nanoid",
5078
5139
  code: h.invalid_string,
5079
5140
  message: a.message
5080
5141
  }), r.dirty());
5081
5142
  else if (a.kind === "cuid")
5082
- ti.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5143
+ ii.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5083
5144
  validation: "cuid",
5084
5145
  code: h.invalid_string,
5085
5146
  message: a.message
5086
5147
  }), r.dirty());
5087
5148
  else if (a.kind === "cuid2")
5088
- ni.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5149
+ oi.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5089
5150
  validation: "cuid2",
5090
5151
  code: h.invalid_string,
5091
5152
  message: a.message
5092
5153
  }), r.dirty());
5093
5154
  else if (a.kind === "ulid")
5094
- ri.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5155
+ ci.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5095
5156
  validation: "ulid",
5096
5157
  code: h.invalid_string,
5097
5158
  message: a.message
@@ -5126,23 +5187,23 @@ class z extends j {
5126
5187
  code: h.invalid_string,
5127
5188
  validation: "datetime",
5128
5189
  message: a.message
5129
- }), r.dirty()) : a.kind === "date" ? pi.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5190
+ }), r.dirty()) : a.kind === "date" ? gi.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5130
5191
  code: h.invalid_string,
5131
5192
  validation: "date",
5132
5193
  message: a.message
5133
- }), r.dirty()) : a.kind === "time" ? hi(a).test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5194
+ }), r.dirty()) : a.kind === "time" ? yi(a).test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5134
5195
  code: h.invalid_string,
5135
5196
  validation: "time",
5136
5197
  message: a.message
5137
- }), r.dirty()) : a.kind === "duration" ? ii.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5198
+ }), r.dirty()) : a.kind === "duration" ? li.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5138
5199
  validation: "duration",
5139
5200
  code: h.invalid_string,
5140
5201
  message: a.message
5141
- }), r.dirty()) : a.kind === "ip" ? fi(e.data, a.version) || (s = this._getOrReturnCtx(e, s), m(s, {
5202
+ }), r.dirty()) : a.kind === "ip" ? vi(e.data, a.version) || (s = this._getOrReturnCtx(e, s), m(s, {
5142
5203
  validation: "ip",
5143
5204
  code: h.invalid_string,
5144
5205
  message: a.message
5145
- }), r.dirty()) : a.kind === "base64" ? li.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5206
+ }), r.dirty()) : a.kind === "base64" ? _i.test(e.data) || (s = this._getOrReturnCtx(e, s), m(s, {
5146
5207
  validation: "base64",
5147
5208
  code: h.invalid_string,
5148
5209
  message: a.message
@@ -5359,12 +5420,12 @@ z.create = (n) => {
5359
5420
  var e;
5360
5421
  return new z({
5361
5422
  checks: [],
5362
- typeName: w.ZodString,
5423
+ typeName: k.ZodString,
5363
5424
  coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
5364
5425
  ...S(n)
5365
5426
  });
5366
5427
  };
5367
- function mi(n, e) {
5428
+ function wi(n, e) {
5368
5429
  const t = (n.toString().split(".")[1] || "").length, r = (e.toString().split(".")[1] || "").length, s = t > r ? t : r, a = parseInt(n.toFixed(s).replace(".", "")), o = parseInt(e.toFixed(s).replace(".", ""));
5369
5430
  return a % o / Math.pow(10, s);
5370
5431
  }
@@ -5382,7 +5443,7 @@ class ve extends j {
5382
5443
  }), x;
5383
5444
  }
5384
5445
  let r;
5385
- const s = new $();
5446
+ const s = new P();
5386
5447
  for (const a of this._def.checks)
5387
5448
  a.kind === "int" ? C.isInteger(e.data) || (r = this._getOrReturnCtx(e, r), m(r, {
5388
5449
  code: h.invalid_type,
@@ -5403,7 +5464,7 @@ class ve extends j {
5403
5464
  inclusive: a.inclusive,
5404
5465
  exact: !1,
5405
5466
  message: a.message
5406
- }), s.dirty()) : a.kind === "multipleOf" ? mi(e.data, a.value) !== 0 && (r = this._getOrReturnCtx(e, r), m(r, {
5467
+ }), s.dirty()) : a.kind === "multipleOf" ? wi(e.data, a.value) !== 0 && (r = this._getOrReturnCtx(e, r), m(r, {
5407
5468
  code: h.not_multiple_of,
5408
5469
  multipleOf: a.value,
5409
5470
  message: a.message
@@ -5536,11 +5597,11 @@ class ve extends j {
5536
5597
  }
5537
5598
  ve.create = (n) => new ve({
5538
5599
  checks: [],
5539
- typeName: w.ZodNumber,
5600
+ typeName: k.ZodNumber,
5540
5601
  coerce: (n == null ? void 0 : n.coerce) || !1,
5541
5602
  ...S(n)
5542
5603
  });
5543
- class ke extends j {
5604
+ class we extends j {
5544
5605
  constructor() {
5545
5606
  super(...arguments), this.min = this.gte, this.max = this.lte;
5546
5607
  }
@@ -5554,7 +5615,7 @@ class ke extends j {
5554
5615
  }), x;
5555
5616
  }
5556
5617
  let r;
5557
- const s = new $();
5618
+ const s = new P();
5558
5619
  for (const a of this._def.checks)
5559
5620
  a.kind === "min" ? (a.inclusive ? e.data < a.value : e.data <= a.value) && (r = this._getOrReturnCtx(e, r), m(r, {
5560
5621
  code: h.too_small,
@@ -5588,7 +5649,7 @@ class ke extends j {
5588
5649
  return this.setLimit("max", e, !1, v.toString(t));
5589
5650
  }
5590
5651
  setLimit(e, t, r, s) {
5591
- return new ke({
5652
+ return new we({
5592
5653
  ...this._def,
5593
5654
  checks: [
5594
5655
  ...this._def.checks,
@@ -5602,7 +5663,7 @@ class ke extends j {
5602
5663
  });
5603
5664
  }
5604
5665
  _addCheck(e) {
5605
- return new ke({
5666
+ return new we({
5606
5667
  ...this._def,
5607
5668
  checks: [...this._def.checks, e]
5608
5669
  });
@@ -5659,11 +5720,11 @@ class ke extends j {
5659
5720
  return e;
5660
5721
  }
5661
5722
  }
5662
- ke.create = (n) => {
5723
+ we.create = (n) => {
5663
5724
  var e;
5664
- return new ke({
5725
+ return new we({
5665
5726
  checks: [],
5666
- typeName: w.ZodBigInt,
5727
+ typeName: k.ZodBigInt,
5667
5728
  coerce: (e = n == null ? void 0 : n.coerce) !== null && e !== void 0 ? e : !1,
5668
5729
  ...S(n)
5669
5730
  });
@@ -5682,11 +5743,11 @@ class gt extends j {
5682
5743
  }
5683
5744
  }
5684
5745
  gt.create = (n) => new gt({
5685
- typeName: w.ZodBoolean,
5746
+ typeName: k.ZodBoolean,
5686
5747
  coerce: (n == null ? void 0 : n.coerce) || !1,
5687
5748
  ...S(n)
5688
5749
  });
5689
- class Ce extends j {
5750
+ class Ne extends j {
5690
5751
  _parse(e) {
5691
5752
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== g.date) {
5692
5753
  const a = this._getOrReturnCtx(e);
@@ -5702,7 +5763,7 @@ class Ce extends j {
5702
5763
  code: h.invalid_date
5703
5764
  }), x;
5704
5765
  }
5705
- const r = new $();
5766
+ const r = new P();
5706
5767
  let s;
5707
5768
  for (const a of this._def.checks)
5708
5769
  a.kind === "min" ? e.data.getTime() < a.value && (s = this._getOrReturnCtx(e, s), m(s, {
@@ -5726,7 +5787,7 @@ class Ce extends j {
5726
5787
  };
5727
5788
  }
5728
5789
  _addCheck(e) {
5729
- return new Ce({
5790
+ return new Ne({
5730
5791
  ...this._def,
5731
5792
  checks: [...this._def.checks, e]
5732
5793
  });
@@ -5758,10 +5819,10 @@ class Ce extends j {
5758
5819
  return e != null ? new Date(e) : null;
5759
5820
  }
5760
5821
  }
5761
- Ce.create = (n) => new Ce({
5822
+ Ne.create = (n) => new Ne({
5762
5823
  checks: [],
5763
5824
  coerce: (n == null ? void 0 : n.coerce) || !1,
5764
- typeName: w.ZodDate,
5825
+ typeName: k.ZodDate,
5765
5826
  ...S(n)
5766
5827
  });
5767
5828
  class zt extends j {
@@ -5778,7 +5839,7 @@ class zt extends j {
5778
5839
  }
5779
5840
  }
5780
5841
  zt.create = (n) => new zt({
5781
- typeName: w.ZodSymbol,
5842
+ typeName: k.ZodSymbol,
5782
5843
  ...S(n)
5783
5844
  });
5784
5845
  class yt extends j {
@@ -5795,7 +5856,7 @@ class yt extends j {
5795
5856
  }
5796
5857
  }
5797
5858
  yt.create = (n) => new yt({
5798
- typeName: w.ZodUndefined,
5859
+ typeName: k.ZodUndefined,
5799
5860
  ...S(n)
5800
5861
  });
5801
5862
  class vt extends j {
@@ -5812,10 +5873,10 @@ class vt extends j {
5812
5873
  }
5813
5874
  }
5814
5875
  vt.create = (n) => new vt({
5815
- typeName: w.ZodNull,
5876
+ typeName: k.ZodNull,
5816
5877
  ...S(n)
5817
5878
  });
5818
- class qe extends j {
5879
+ class We extends j {
5819
5880
  constructor() {
5820
5881
  super(...arguments), this._any = !0;
5821
5882
  }
@@ -5823,11 +5884,11 @@ class qe extends j {
5823
5884
  return M(e.data);
5824
5885
  }
5825
5886
  }
5826
- qe.create = (n) => new qe({
5827
- typeName: w.ZodAny,
5887
+ We.create = (n) => new We({
5888
+ typeName: k.ZodAny,
5828
5889
  ...S(n)
5829
5890
  });
5830
- class Ze extends j {
5891
+ class je extends j {
5831
5892
  constructor() {
5832
5893
  super(...arguments), this._unknown = !0;
5833
5894
  }
@@ -5835,8 +5896,8 @@ class Ze extends j {
5835
5896
  return M(e.data);
5836
5897
  }
5837
5898
  }
5838
- Ze.create = (n) => new Ze({
5839
- typeName: w.ZodUnknown,
5899
+ je.create = (n) => new je({
5900
+ typeName: k.ZodUnknown,
5840
5901
  ...S(n)
5841
5902
  });
5842
5903
  class oe extends j {
@@ -5850,7 +5911,7 @@ class oe extends j {
5850
5911
  }
5851
5912
  }
5852
5913
  oe.create = (n) => new oe({
5853
- typeName: w.ZodNever,
5914
+ typeName: k.ZodNever,
5854
5915
  ...S(n)
5855
5916
  });
5856
5917
  class Bt extends j {
@@ -5867,7 +5928,7 @@ class Bt extends j {
5867
5928
  }
5868
5929
  }
5869
5930
  Bt.create = (n) => new Bt({
5870
- typeName: w.ZodVoid,
5931
+ typeName: k.ZodVoid,
5871
5932
  ...S(n)
5872
5933
  });
5873
5934
  class q extends j {
@@ -5906,9 +5967,9 @@ class q extends j {
5906
5967
  exact: !1,
5907
5968
  message: s.maxLength.message
5908
5969
  }), r.dirty()), t.common.async)
5909
- return Promise.all([...t.data].map((o, c) => s.type._parseAsync(new ne(t, o, t.path, c)))).then((o) => $.mergeArray(r, o));
5970
+ return Promise.all([...t.data].map((o, c) => s.type._parseAsync(new ne(t, o, t.path, c)))).then((o) => P.mergeArray(r, o));
5910
5971
  const a = [...t.data].map((o, c) => s.type._parseSync(new ne(t, o, t.path, c)));
5911
- return $.mergeArray(r, a);
5972
+ return P.mergeArray(r, a);
5912
5973
  }
5913
5974
  get element() {
5914
5975
  return this._def.type;
@@ -5940,15 +6001,15 @@ q.create = (n, e) => new q({
5940
6001
  minLength: null,
5941
6002
  maxLength: null,
5942
6003
  exactLength: null,
5943
- typeName: w.ZodArray,
6004
+ typeName: k.ZodArray,
5944
6005
  ...S(e)
5945
6006
  });
5946
- function De(n) {
6007
+ function Me(n) {
5947
6008
  if (n instanceof E) {
5948
6009
  const e = {};
5949
6010
  for (const t in n.shape) {
5950
6011
  const r = n.shape[t];
5951
- e[t] = X.create(De(r));
6012
+ e[t] = X.create(Me(r));
5952
6013
  }
5953
6014
  return new E({
5954
6015
  ...n._def,
@@ -5956,8 +6017,8 @@ function De(n) {
5956
6017
  });
5957
6018
  } else return n instanceof q ? new q({
5958
6019
  ...n._def,
5959
- type: De(n.element)
5960
- }) : n instanceof X ? X.create(De(n.unwrap())) : n instanceof xe ? xe.create(De(n.unwrap())) : n instanceof re ? re.create(n.items.map((e) => De(e))) : n;
6020
+ type: Me(n.element)
6021
+ }) : n instanceof X ? X.create(Me(n.unwrap())) : n instanceof xe ? xe.create(Me(n.unwrap())) : n instanceof re ? re.create(n.items.map((e) => Me(e))) : n;
5961
6022
  }
5962
6023
  class E extends j {
5963
6024
  constructor() {
@@ -6030,7 +6091,7 @@ class E extends j {
6030
6091
  });
6031
6092
  }
6032
6093
  return u;
6033
- }).then((u) => $.mergeObjectSync(r, u)) : $.mergeObjectSync(r, d);
6094
+ }).then((u) => P.mergeObjectSync(r, u)) : P.mergeObjectSync(r, d);
6034
6095
  }
6035
6096
  get shape() {
6036
6097
  return this._def.shape();
@@ -6103,7 +6164,7 @@ class E extends j {
6103
6164
  ...this._def.shape(),
6104
6165
  ...e._def.shape()
6105
6166
  }),
6106
- typeName: w.ZodObject
6167
+ typeName: k.ZodObject
6107
6168
  });
6108
6169
  }
6109
6170
  // merge<
@@ -6193,7 +6254,7 @@ class E extends j {
6193
6254
  * @deprecated
6194
6255
  */
6195
6256
  deepPartial() {
6196
- return De(this);
6257
+ return Me(this);
6197
6258
  }
6198
6259
  partial(e) {
6199
6260
  const t = {};
@@ -6229,24 +6290,24 @@ E.create = (n, e) => new E({
6229
6290
  shape: () => n,
6230
6291
  unknownKeys: "strip",
6231
6292
  catchall: oe.create(),
6232
- typeName: w.ZodObject,
6293
+ typeName: k.ZodObject,
6233
6294
  ...S(e)
6234
6295
  });
6235
6296
  E.strictCreate = (n, e) => new E({
6236
6297
  shape: () => n,
6237
6298
  unknownKeys: "strict",
6238
6299
  catchall: oe.create(),
6239
- typeName: w.ZodObject,
6300
+ typeName: k.ZodObject,
6240
6301
  ...S(e)
6241
6302
  });
6242
6303
  E.lazycreate = (n, e) => new E({
6243
6304
  shape: n,
6244
6305
  unknownKeys: "strip",
6245
6306
  catchall: oe.create(),
6246
- typeName: w.ZodObject,
6307
+ typeName: k.ZodObject,
6247
6308
  ...S(e)
6248
6309
  });
6249
- class kt extends j {
6310
+ class wt extends j {
6250
6311
  _parse(e) {
6251
6312
  const { ctx: t } = this._processInputParams(e), r = this._def.options;
6252
6313
  function s(a) {
@@ -6314,13 +6375,13 @@ class kt extends j {
6314
6375
  return this._def.options;
6315
6376
  }
6316
6377
  }
6317
- kt.create = (n, e) => new kt({
6378
+ wt.create = (n, e) => new wt({
6318
6379
  options: n,
6319
- typeName: w.ZodUnion,
6380
+ typeName: k.ZodUnion,
6320
6381
  ...S(e)
6321
6382
  });
6322
- const ae = (n) => n instanceof bt ? ae(n.schema) : n instanceof K ? ae(n.innerType()) : n instanceof Tt ? [n.value] : n instanceof we ? n.options : n instanceof Ot ? C.objectValues(n.enum) : n instanceof St ? ae(n._def.innerType) : n instanceof yt ? [void 0] : n instanceof vt ? [null] : n instanceof X ? [void 0, ...ae(n.unwrap())] : n instanceof xe ? [null, ...ae(n.unwrap())] : n instanceof fn || n instanceof jt ? ae(n.unwrap()) : n instanceof Zt ? ae(n._def.innerType) : [];
6323
- class Qt extends j {
6383
+ const ae = (n) => n instanceof bt ? ae(n.schema) : n instanceof K ? ae(n.innerType()) : n instanceof Tt ? [n.value] : n instanceof ke ? n.options : n instanceof Ot ? C.objectValues(n.enum) : n instanceof St ? ae(n._def.innerType) : n instanceof yt ? [void 0] : n instanceof vt ? [null] : n instanceof X ? [void 0, ...ae(n.unwrap())] : n instanceof xe ? [null, ...ae(n.unwrap())] : n instanceof fn || n instanceof jt ? ae(n.unwrap()) : n instanceof Zt ? ae(n._def.innerType) : [];
6384
+ class Jt extends j {
6324
6385
  _parse(e) {
6325
6386
  const { ctx: t } = this._processInputParams(e);
6326
6387
  if (t.parsedType !== g.object)
@@ -6373,8 +6434,8 @@ class Qt extends j {
6373
6434
  s.set(c, a);
6374
6435
  }
6375
6436
  }
6376
- return new Qt({
6377
- typeName: w.ZodDiscriminatedUnion,
6437
+ return new Jt({
6438
+ typeName: k.ZodDiscriminatedUnion,
6378
6439
  discriminator: e,
6379
6440
  options: t,
6380
6441
  optionsMap: s,
@@ -6382,14 +6443,14 @@ class Qt extends j {
6382
6443
  });
6383
6444
  }
6384
6445
  }
6385
- function on(n, e) {
6446
+ function cn(n, e) {
6386
6447
  const t = fe(n), r = fe(e);
6387
6448
  if (n === e)
6388
6449
  return { valid: !0, data: n };
6389
6450
  if (t === g.object && r === g.object) {
6390
6451
  const s = C.objectKeys(e), a = C.objectKeys(n).filter((c) => s.indexOf(c) !== -1), o = { ...n, ...e };
6391
6452
  for (const c of a) {
6392
- const d = on(n[c], e[c]);
6453
+ const d = cn(n[c], e[c]);
6393
6454
  if (!d.valid)
6394
6455
  return { valid: !1 };
6395
6456
  o[c] = d.data;
@@ -6400,7 +6461,7 @@ function on(n, e) {
6400
6461
  return { valid: !1 };
6401
6462
  const s = [];
6402
6463
  for (let a = 0; a < n.length; a++) {
6403
- const o = n[a], c = e[a], d = on(o, c);
6464
+ const o = n[a], c = e[a], d = cn(o, c);
6404
6465
  if (!d.valid)
6405
6466
  return { valid: !1 };
6406
6467
  s.push(d.data);
@@ -6408,13 +6469,13 @@ function on(n, e) {
6408
6469
  return { valid: !0, data: s };
6409
6470
  } else return t === g.date && r === g.date && +n == +e ? { valid: !0, data: n } : { valid: !1 };
6410
6471
  }
6411
- class wt extends j {
6472
+ class kt extends j {
6412
6473
  _parse(e) {
6413
6474
  const { status: t, ctx: r } = this._processInputParams(e), s = (a, o) => {
6414
- if (sn(a) || sn(o))
6475
+ if (an(a) || an(o))
6415
6476
  return x;
6416
- const c = on(a.value, o.value);
6417
- return c.valid ? ((an(a) || an(o)) && t.dirty(), { status: t.value, value: c.data }) : (m(r, {
6477
+ const c = cn(a.value, o.value);
6478
+ return c.valid ? ((on(a) || on(o)) && t.dirty(), { status: t.value, value: c.data }) : (m(r, {
6418
6479
  code: h.invalid_intersection_types
6419
6480
  }), x);
6420
6481
  };
@@ -6440,10 +6501,10 @@ class wt extends j {
6440
6501
  }));
6441
6502
  }
6442
6503
  }
6443
- wt.create = (n, e, t) => new wt({
6504
+ kt.create = (n, e, t) => new kt({
6444
6505
  left: n,
6445
6506
  right: e,
6446
- typeName: w.ZodIntersection,
6507
+ typeName: k.ZodIntersection,
6447
6508
  ...S(t)
6448
6509
  });
6449
6510
  class re extends j {
@@ -6474,7 +6535,7 @@ class re extends j {
6474
6535
  const d = this._def.items[c] || this._def.rest;
6475
6536
  return d ? d._parse(new ne(r, o, r.path, c)) : null;
6476
6537
  }).filter((o) => !!o);
6477
- return r.common.async ? Promise.all(a).then((o) => $.mergeArray(t, o)) : $.mergeArray(t, a);
6538
+ return r.common.async ? Promise.all(a).then((o) => P.mergeArray(t, o)) : P.mergeArray(t, a);
6478
6539
  }
6479
6540
  get items() {
6480
6541
  return this._def.items;
@@ -6491,7 +6552,7 @@ re.create = (n, e) => {
6491
6552
  throw new Error("You must pass an array of schemas to z.tuple([ ... ])");
6492
6553
  return new re({
6493
6554
  items: n,
6494
- typeName: w.ZodTuple,
6555
+ typeName: k.ZodTuple,
6495
6556
  rest: null,
6496
6557
  ...S(e)
6497
6558
  });
@@ -6518,7 +6579,7 @@ class xt extends j {
6518
6579
  value: o._parse(new ne(r, r.data[c], r.path, c)),
6519
6580
  alwaysSet: c in r.data
6520
6581
  });
6521
- return r.common.async ? $.mergeObjectAsync(t, s) : $.mergeObjectSync(t, s);
6582
+ return r.common.async ? P.mergeObjectAsync(t, s) : P.mergeObjectSync(t, s);
6522
6583
  }
6523
6584
  get element() {
6524
6585
  return this._def.valueType;
@@ -6527,12 +6588,12 @@ class xt extends j {
6527
6588
  return t instanceof j ? new xt({
6528
6589
  keyType: e,
6529
6590
  valueType: t,
6530
- typeName: w.ZodRecord,
6591
+ typeName: k.ZodRecord,
6531
6592
  ...S(r)
6532
6593
  }) : new xt({
6533
6594
  keyType: z.create(),
6534
6595
  valueType: e,
6535
- typeName: w.ZodRecord,
6596
+ typeName: k.ZodRecord,
6536
6597
  ...S(t)
6537
6598
  });
6538
6599
  }
@@ -6582,10 +6643,10 @@ class qt extends j {
6582
6643
  qt.create = (n, e, t) => new qt({
6583
6644
  valueType: e,
6584
6645
  keyType: n,
6585
- typeName: w.ZodMap,
6646
+ typeName: k.ZodMap,
6586
6647
  ...S(t)
6587
6648
  });
6588
- class Ne extends j {
6649
+ class Ee extends j {
6589
6650
  _parse(e) {
6590
6651
  const { status: t, ctx: r } = this._processInputParams(e);
6591
6652
  if (r.parsedType !== g.set)
@@ -6624,13 +6685,13 @@ class Ne extends j {
6624
6685
  return r.common.async ? Promise.all(c).then((d) => o(d)) : o(c);
6625
6686
  }
6626
6687
  min(e, t) {
6627
- return new Ne({
6688
+ return new Ee({
6628
6689
  ...this._def,
6629
6690
  minSize: { value: e, message: v.toString(t) }
6630
6691
  });
6631
6692
  }
6632
6693
  max(e, t) {
6633
- return new Ne({
6694
+ return new Ee({
6634
6695
  ...this._def,
6635
6696
  maxSize: { value: e, message: v.toString(t) }
6636
6697
  });
@@ -6642,14 +6703,14 @@ class Ne extends j {
6642
6703
  return this.min(1, e);
6643
6704
  }
6644
6705
  }
6645
- Ne.create = (n, e) => new Ne({
6706
+ Ee.create = (n, e) => new Ee({
6646
6707
  valueType: n,
6647
6708
  minSize: null,
6648
6709
  maxSize: null,
6649
- typeName: w.ZodSet,
6710
+ typeName: k.ZodSet,
6650
6711
  ...S(e)
6651
6712
  });
6652
- class Ve extends j {
6713
+ class Ue extends j {
6653
6714
  constructor() {
6654
6715
  super(...arguments), this.validate = this.implement;
6655
6716
  }
@@ -6669,7 +6730,7 @@ class Ve extends j {
6669
6730
  t.common.contextualErrorMap,
6670
6731
  t.schemaErrorMap,
6671
6732
  Vt(),
6672
- Be
6733
+ qe
6673
6734
  ].filter((u) => !!u),
6674
6735
  issueData: {
6675
6736
  code: h.invalid_arguments,
@@ -6685,7 +6746,7 @@ class Ve extends j {
6685
6746
  t.common.contextualErrorMap,
6686
6747
  t.schemaErrorMap,
6687
6748
  Vt(),
6688
- Be
6749
+ qe
6689
6750
  ].filter((u) => !!u),
6690
6751
  issueData: {
6691
6752
  code: h.invalid_return_type,
@@ -6694,7 +6755,7 @@ class Ve extends j {
6694
6755
  });
6695
6756
  }
6696
6757
  const a = { errorMap: t.common.contextualErrorMap }, o = t.data;
6697
- if (this._def.returns instanceof We) {
6758
+ if (this._def.returns instanceof Ke) {
6698
6759
  const c = this;
6699
6760
  return M(async function(...d) {
6700
6761
  const u = new U([]), l = await c._def.args.parseAsync(d, a).catch((L) => {
@@ -6724,13 +6785,13 @@ class Ve extends j {
6724
6785
  return this._def.returns;
6725
6786
  }
6726
6787
  args(...e) {
6727
- return new Ve({
6788
+ return new Ue({
6728
6789
  ...this._def,
6729
- args: re.create(e).rest(Ze.create())
6790
+ args: re.create(e).rest(je.create())
6730
6791
  });
6731
6792
  }
6732
6793
  returns(e) {
6733
- return new Ve({
6794
+ return new Ue({
6734
6795
  ...this._def,
6735
6796
  returns: e
6736
6797
  });
@@ -6742,10 +6803,10 @@ class Ve extends j {
6742
6803
  return this.parse(e);
6743
6804
  }
6744
6805
  static create(e, t, r) {
6745
- return new Ve({
6746
- args: e || re.create([]).rest(Ze.create()),
6747
- returns: t || Ze.create(),
6748
- typeName: w.ZodFunction,
6806
+ return new Ue({
6807
+ args: e || re.create([]).rest(je.create()),
6808
+ returns: t || je.create(),
6809
+ typeName: k.ZodFunction,
6749
6810
  ...S(r)
6750
6811
  });
6751
6812
  }
@@ -6761,7 +6822,7 @@ class bt extends j {
6761
6822
  }
6762
6823
  bt.create = (n, e) => new bt({
6763
6824
  getter: n,
6764
- typeName: w.ZodLazy,
6825
+ typeName: k.ZodLazy,
6765
6826
  ...S(e)
6766
6827
  });
6767
6828
  class Tt extends j {
@@ -6782,17 +6843,17 @@ class Tt extends j {
6782
6843
  }
6783
6844
  Tt.create = (n, e) => new Tt({
6784
6845
  value: n,
6785
- typeName: w.ZodLiteral,
6846
+ typeName: k.ZodLiteral,
6786
6847
  ...S(e)
6787
6848
  });
6788
6849
  function qn(n, e) {
6789
- return new we({
6850
+ return new ke({
6790
6851
  values: n,
6791
- typeName: w.ZodEnum,
6852
+ typeName: k.ZodEnum,
6792
6853
  ...S(e)
6793
6854
  });
6794
6855
  }
6795
- class we extends j {
6856
+ class ke extends j {
6796
6857
  constructor() {
6797
6858
  super(...arguments), Xe.set(this, void 0);
6798
6859
  }
@@ -6837,20 +6898,20 @@ class we extends j {
6837
6898
  return e;
6838
6899
  }
6839
6900
  extract(e, t = this._def) {
6840
- return we.create(e, {
6901
+ return ke.create(e, {
6841
6902
  ...this._def,
6842
6903
  ...t
6843
6904
  });
6844
6905
  }
6845
6906
  exclude(e, t = this._def) {
6846
- return we.create(this.options.filter((r) => !e.includes(r)), {
6907
+ return ke.create(this.options.filter((r) => !e.includes(r)), {
6847
6908
  ...this._def,
6848
6909
  ...t
6849
6910
  });
6850
6911
  }
6851
6912
  }
6852
6913
  Xe = /* @__PURE__ */ new WeakMap();
6853
- we.create = qn;
6914
+ ke.create = qn;
6854
6915
  class Ot extends j {
6855
6916
  constructor() {
6856
6917
  super(...arguments), et.set(this, void 0);
@@ -6882,10 +6943,10 @@ class Ot extends j {
6882
6943
  et = /* @__PURE__ */ new WeakMap();
6883
6944
  Ot.create = (n, e) => new Ot({
6884
6945
  values: n,
6885
- typeName: w.ZodNativeEnum,
6946
+ typeName: k.ZodNativeEnum,
6886
6947
  ...S(e)
6887
6948
  });
6888
- class We extends j {
6949
+ class Ke extends j {
6889
6950
  unwrap() {
6890
6951
  return this._def.type;
6891
6952
  }
@@ -6904,9 +6965,9 @@ class We extends j {
6904
6965
  })));
6905
6966
  }
6906
6967
  }
6907
- We.create = (n, e) => new We({
6968
+ Ke.create = (n, e) => new Ke({
6908
6969
  type: n,
6909
- typeName: w.ZodPromise,
6970
+ typeName: k.ZodPromise,
6910
6971
  ...S(e)
6911
6972
  });
6912
6973
  class K extends j {
@@ -6914,7 +6975,7 @@ class K extends j {
6914
6975
  return this._def.schema;
6915
6976
  }
6916
6977
  sourceType() {
6917
- return this._def.schema._def.typeName === w.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
6978
+ return this._def.schema._def.typeName === k.ZodEffects ? this._def.schema.sourceType() : this._def.schema;
6918
6979
  }
6919
6980
  _parse(e) {
6920
6981
  const { status: t, ctx: r } = this._processInputParams(e), s = this._def.effect || null, a = {
@@ -6936,7 +6997,7 @@ class K extends j {
6936
6997
  path: r.path,
6937
6998
  parent: r
6938
6999
  });
6939
- return d.status === "aborted" ? x : d.status === "dirty" || t.value === "dirty" ? Me(d.value) : d;
7000
+ return d.status === "aborted" ? x : d.status === "dirty" || t.value === "dirty" ? Le(d.value) : d;
6940
7001
  });
6941
7002
  {
6942
7003
  if (t.value === "aborted")
@@ -6946,7 +7007,7 @@ class K extends j {
6946
7007
  path: r.path,
6947
7008
  parent: r
6948
7009
  });
6949
- return c.status === "aborted" ? x : c.status === "dirty" || t.value === "dirty" ? Me(c.value) : c;
7010
+ return c.status === "aborted" ? x : c.status === "dirty" || t.value === "dirty" ? Le(c.value) : c;
6950
7011
  }
6951
7012
  }
6952
7013
  if (s.type === "refinement") {
@@ -6988,14 +7049,14 @@ class K extends j {
6988
7049
  }
6989
7050
  K.create = (n, e, t) => new K({
6990
7051
  schema: n,
6991
- typeName: w.ZodEffects,
7052
+ typeName: k.ZodEffects,
6992
7053
  effect: e,
6993
7054
  ...S(t)
6994
7055
  });
6995
7056
  K.createWithPreprocess = (n, e, t) => new K({
6996
7057
  schema: e,
6997
7058
  effect: { type: "preprocess", transform: n },
6998
- typeName: w.ZodEffects,
7059
+ typeName: k.ZodEffects,
6999
7060
  ...S(t)
7000
7061
  });
7001
7062
  class X extends j {
@@ -7008,7 +7069,7 @@ class X extends j {
7008
7069
  }
7009
7070
  X.create = (n, e) => new X({
7010
7071
  innerType: n,
7011
- typeName: w.ZodOptional,
7072
+ typeName: k.ZodOptional,
7012
7073
  ...S(e)
7013
7074
  });
7014
7075
  class xe extends j {
@@ -7021,7 +7082,7 @@ class xe extends j {
7021
7082
  }
7022
7083
  xe.create = (n, e) => new xe({
7023
7084
  innerType: n,
7024
- typeName: w.ZodNullable,
7085
+ typeName: k.ZodNullable,
7025
7086
  ...S(e)
7026
7087
  });
7027
7088
  class St extends j {
@@ -7040,7 +7101,7 @@ class St extends j {
7040
7101
  }
7041
7102
  St.create = (n, e) => new St({
7042
7103
  innerType: n,
7043
- typeName: w.ZodDefault,
7104
+ typeName: k.ZodDefault,
7044
7105
  defaultValue: typeof e.default == "function" ? e.default : () => e.default,
7045
7106
  ...S(e)
7046
7107
  });
@@ -7083,7 +7144,7 @@ class Zt extends j {
7083
7144
  }
7084
7145
  Zt.create = (n, e) => new Zt({
7085
7146
  innerType: n,
7086
- typeName: w.ZodCatch,
7147
+ typeName: k.ZodCatch,
7087
7148
  catchValue: typeof e.catch == "function" ? e.catch : () => e.catch,
7088
7149
  ...S(e)
7089
7150
  });
@@ -7101,10 +7162,10 @@ class Wt extends j {
7101
7162
  }
7102
7163
  }
7103
7164
  Wt.create = (n) => new Wt({
7104
- typeName: w.ZodNaN,
7165
+ typeName: k.ZodNaN,
7105
7166
  ...S(n)
7106
7167
  });
7107
- const _i = Symbol("zod_brand");
7168
+ const ki = Symbol("zod_brand");
7108
7169
  class fn extends j {
7109
7170
  _parse(e) {
7110
7171
  const { ctx: t } = this._processInputParams(e), r = t.data;
@@ -7128,7 +7189,7 @@ class Ct extends j {
7128
7189
  path: r.path,
7129
7190
  parent: r
7130
7191
  });
7131
- return a.status === "aborted" ? x : a.status === "dirty" ? (t.dirty(), Me(a.value)) : this._def.out._parseAsync({
7192
+ return a.status === "aborted" ? x : a.status === "dirty" ? (t.dirty(), Le(a.value)) : this._def.out._parseAsync({
7132
7193
  data: a.value,
7133
7194
  path: r.path,
7134
7195
  parent: r
@@ -7154,7 +7215,7 @@ class Ct extends j {
7154
7215
  return new Ct({
7155
7216
  in: e,
7156
7217
  out: t,
7157
- typeName: w.ZodPipeline
7218
+ typeName: k.ZodPipeline
7158
7219
  });
7159
7220
  }
7160
7221
  }
@@ -7169,58 +7230,58 @@ class jt extends j {
7169
7230
  }
7170
7231
  jt.create = (n, e) => new jt({
7171
7232
  innerType: n,
7172
- typeName: w.ZodReadonly,
7233
+ typeName: k.ZodReadonly,
7173
7234
  ...S(e)
7174
7235
  });
7175
7236
  function Wn(n, e = {}, t) {
7176
- return n ? qe.create().superRefine((r, s) => {
7237
+ return n ? We.create().superRefine((r, s) => {
7177
7238
  var a, o;
7178
7239
  if (!n(r)) {
7179
7240
  const c = typeof e == "function" ? e(r) : typeof e == "string" ? { message: e } : e, d = (o = (a = c.fatal) !== null && a !== void 0 ? a : t) !== null && o !== void 0 ? o : !0, u = typeof c == "string" ? { message: c } : c;
7180
7241
  s.addIssue({ code: "custom", ...u, fatal: d });
7181
7242
  }
7182
- }) : qe.create();
7243
+ }) : We.create();
7183
7244
  }
7184
- const gi = {
7245
+ const xi = {
7185
7246
  object: E.lazycreate
7186
7247
  };
7187
- var w;
7248
+ var k;
7188
7249
  (function(n) {
7189
7250
  n.ZodString = "ZodString", n.ZodNumber = "ZodNumber", n.ZodNaN = "ZodNaN", n.ZodBigInt = "ZodBigInt", n.ZodBoolean = "ZodBoolean", n.ZodDate = "ZodDate", n.ZodSymbol = "ZodSymbol", n.ZodUndefined = "ZodUndefined", n.ZodNull = "ZodNull", n.ZodAny = "ZodAny", n.ZodUnknown = "ZodUnknown", n.ZodNever = "ZodNever", n.ZodVoid = "ZodVoid", n.ZodArray = "ZodArray", n.ZodObject = "ZodObject", n.ZodUnion = "ZodUnion", n.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", n.ZodIntersection = "ZodIntersection", n.ZodTuple = "ZodTuple", n.ZodRecord = "ZodRecord", n.ZodMap = "ZodMap", n.ZodSet = "ZodSet", n.ZodFunction = "ZodFunction", n.ZodLazy = "ZodLazy", n.ZodLiteral = "ZodLiteral", n.ZodEnum = "ZodEnum", n.ZodEffects = "ZodEffects", n.ZodNativeEnum = "ZodNativeEnum", n.ZodOptional = "ZodOptional", n.ZodNullable = "ZodNullable", n.ZodDefault = "ZodDefault", n.ZodCatch = "ZodCatch", n.ZodPromise = "ZodPromise", n.ZodBranded = "ZodBranded", n.ZodPipeline = "ZodPipeline", n.ZodReadonly = "ZodReadonly";
7190
- })(w || (w = {}));
7191
- const yi = (n, e = {
7251
+ })(k || (k = {}));
7252
+ const bi = (n, e = {
7192
7253
  message: `Input not instance of ${n.name}`
7193
- }) => Wn((t) => t instanceof n, e), Kn = z.create, Qn = ve.create, vi = Wt.create, ki = ke.create, Jn = gt.create, wi = Ce.create, xi = zt.create, bi = yt.create, Ti = vt.create, Oi = qe.create, Si = Ze.create, Zi = oe.create, ji = Bt.create, Ii = q.create, Ci = E.create, Ni = E.strictCreate, Ei = kt.create, Ai = Qt.create, Ri = wt.create, $i = re.create, Pi = xt.create, Di = qt.create, Mi = Ne.create, Li = Ve.create, Vi = bt.create, Ui = Tt.create, Fi = we.create, zi = Ot.create, Bi = We.create, wn = K.create, qi = X.create, Wi = xe.create, Ki = K.createWithPreprocess, Qi = Ct.create, Ji = () => Kn().optional(), Hi = () => Qn().optional(), Yi = () => Jn().optional(), Gi = {
7254
+ }) => Wn((t) => t instanceof n, e), Kn = z.create, Qn = ve.create, Ti = Wt.create, Oi = we.create, Jn = gt.create, Si = Ne.create, Zi = zt.create, ji = yt.create, Ii = vt.create, Ci = We.create, Ni = je.create, Ei = oe.create, Ai = Bt.create, Ri = q.create, $i = E.create, Pi = E.strictCreate, Di = wt.create, Mi = Jt.create, Li = kt.create, Vi = re.create, Ui = xt.create, Fi = qt.create, zi = Ee.create, Bi = Ue.create, qi = bt.create, Wi = Tt.create, Ki = ke.create, Qi = Ot.create, Ji = Ke.create, kn = K.create, Hi = X.create, Yi = xe.create, Gi = K.createWithPreprocess, Xi = Ct.create, eo = () => Kn().optional(), to = () => Qn().optional(), no = () => Jn().optional(), ro = {
7194
7255
  string: (n) => z.create({ ...n, coerce: !0 }),
7195
7256
  number: (n) => ve.create({ ...n, coerce: !0 }),
7196
7257
  boolean: (n) => gt.create({
7197
7258
  ...n,
7198
7259
  coerce: !0
7199
7260
  }),
7200
- bigint: (n) => ke.create({ ...n, coerce: !0 }),
7201
- date: (n) => Ce.create({ ...n, coerce: !0 })
7202
- }, Xi = x;
7203
- var eo = /* @__PURE__ */ Object.freeze({
7261
+ bigint: (n) => we.create({ ...n, coerce: !0 }),
7262
+ date: (n) => Ne.create({ ...n, coerce: !0 })
7263
+ }, so = x;
7264
+ var ao = /* @__PURE__ */ Object.freeze({
7204
7265
  __proto__: null,
7205
- defaultErrorMap: Be,
7206
- setErrorMap: Xa,
7266
+ defaultErrorMap: qe,
7267
+ setErrorMap: si,
7207
7268
  getErrorMap: Vt,
7208
7269
  makeIssue: Ut,
7209
- EMPTY_PATH: ei,
7270
+ EMPTY_PATH: ai,
7210
7271
  addIssueToContext: m,
7211
- ParseStatus: $,
7272
+ ParseStatus: P,
7212
7273
  INVALID: x,
7213
- DIRTY: Me,
7274
+ DIRTY: Le,
7214
7275
  OK: M,
7215
- isAborted: sn,
7216
- isDirty: an,
7276
+ isAborted: an,
7277
+ isDirty: on,
7217
7278
  isValid: mt,
7218
7279
  isAsync: _t,
7219
7280
  get util() {
7220
7281
  return C;
7221
7282
  },
7222
7283
  get objectUtil() {
7223
- return rn;
7284
+ return sn;
7224
7285
  },
7225
7286
  ZodParsedType: g,
7226
7287
  getParsedType: fe,
@@ -7228,31 +7289,31 @@ var eo = /* @__PURE__ */ Object.freeze({
7228
7289
  datetimeRegex: Bn,
7229
7290
  ZodString: z,
7230
7291
  ZodNumber: ve,
7231
- ZodBigInt: ke,
7292
+ ZodBigInt: we,
7232
7293
  ZodBoolean: gt,
7233
- ZodDate: Ce,
7294
+ ZodDate: Ne,
7234
7295
  ZodSymbol: zt,
7235
7296
  ZodUndefined: yt,
7236
7297
  ZodNull: vt,
7237
- ZodAny: qe,
7238
- ZodUnknown: Ze,
7298
+ ZodAny: We,
7299
+ ZodUnknown: je,
7239
7300
  ZodNever: oe,
7240
7301
  ZodVoid: Bt,
7241
7302
  ZodArray: q,
7242
7303
  ZodObject: E,
7243
- ZodUnion: kt,
7244
- ZodDiscriminatedUnion: Qt,
7245
- ZodIntersection: wt,
7304
+ ZodUnion: wt,
7305
+ ZodDiscriminatedUnion: Jt,
7306
+ ZodIntersection: kt,
7246
7307
  ZodTuple: re,
7247
7308
  ZodRecord: xt,
7248
7309
  ZodMap: qt,
7249
- ZodSet: Ne,
7250
- ZodFunction: Ve,
7310
+ ZodSet: Ee,
7311
+ ZodFunction: Ue,
7251
7312
  ZodLazy: bt,
7252
7313
  ZodLiteral: Tt,
7253
- ZodEnum: we,
7314
+ ZodEnum: ke,
7254
7315
  ZodNativeEnum: Ot,
7255
- ZodPromise: We,
7316
+ ZodPromise: Ke,
7256
7317
  ZodEffects: K,
7257
7318
  ZodTransformer: K,
7258
7319
  ZodOptional: X,
@@ -7260,63 +7321,63 @@ var eo = /* @__PURE__ */ Object.freeze({
7260
7321
  ZodDefault: St,
7261
7322
  ZodCatch: Zt,
7262
7323
  ZodNaN: Wt,
7263
- BRAND: _i,
7324
+ BRAND: ki,
7264
7325
  ZodBranded: fn,
7265
7326
  ZodPipeline: Ct,
7266
7327
  ZodReadonly: jt,
7267
7328
  custom: Wn,
7268
7329
  Schema: j,
7269
7330
  ZodSchema: j,
7270
- late: gi,
7331
+ late: xi,
7271
7332
  get ZodFirstPartyTypeKind() {
7272
- return w;
7333
+ return k;
7273
7334
  },
7274
- coerce: Gi,
7275
- any: Oi,
7276
- array: Ii,
7277
- bigint: ki,
7335
+ coerce: ro,
7336
+ any: Ci,
7337
+ array: Ri,
7338
+ bigint: Oi,
7278
7339
  boolean: Jn,
7279
- date: wi,
7280
- discriminatedUnion: Ai,
7281
- effect: wn,
7282
- enum: Fi,
7283
- function: Li,
7284
- instanceof: yi,
7285
- intersection: Ri,
7286
- lazy: Vi,
7287
- literal: Ui,
7288
- map: Di,
7289
- nan: vi,
7290
- nativeEnum: zi,
7291
- never: Zi,
7292
- null: Ti,
7293
- nullable: Wi,
7340
+ date: Si,
7341
+ discriminatedUnion: Mi,
7342
+ effect: kn,
7343
+ enum: Ki,
7344
+ function: Bi,
7345
+ instanceof: bi,
7346
+ intersection: Li,
7347
+ lazy: qi,
7348
+ literal: Wi,
7349
+ map: Fi,
7350
+ nan: Ti,
7351
+ nativeEnum: Qi,
7352
+ never: Ei,
7353
+ null: Ii,
7354
+ nullable: Yi,
7294
7355
  number: Qn,
7295
- object: Ci,
7296
- oboolean: Yi,
7297
- onumber: Hi,
7298
- optional: qi,
7299
- ostring: Ji,
7300
- pipeline: Qi,
7301
- preprocess: Ki,
7302
- promise: Bi,
7303
- record: Pi,
7304
- set: Mi,
7305
- strictObject: Ni,
7356
+ object: $i,
7357
+ oboolean: no,
7358
+ onumber: to,
7359
+ optional: Hi,
7360
+ ostring: eo,
7361
+ pipeline: Xi,
7362
+ preprocess: Gi,
7363
+ promise: Ji,
7364
+ record: Ui,
7365
+ set: zi,
7366
+ strictObject: Pi,
7306
7367
  string: Kn,
7307
- symbol: xi,
7308
- transformer: wn,
7309
- tuple: $i,
7310
- undefined: bi,
7311
- union: Ei,
7312
- unknown: Si,
7313
- void: ji,
7314
- NEVER: Xi,
7368
+ symbol: Zi,
7369
+ transformer: kn,
7370
+ tuple: Vi,
7371
+ undefined: ji,
7372
+ union: Di,
7373
+ unknown: Ni,
7374
+ void: Ai,
7375
+ NEVER: so,
7315
7376
  ZodIssueCode: h,
7316
- quotelessJson: Ga,
7377
+ quotelessJson: ri,
7317
7378
  ZodError: U
7318
7379
  });
7319
- Ya(eo);
7380
+ ni(ao);
7320
7381
  function mn(n, e = "", t = {}) {
7321
7382
  for (let r in n)
7322
7383
  if (Object.prototype.hasOwnProperty.call(n, r)) {
@@ -7325,7 +7386,7 @@ function mn(n, e = "", t = {}) {
7325
7386
  }
7326
7387
  return t;
7327
7388
  }
7328
- function to(n) {
7389
+ function io(n) {
7329
7390
  return async (e, t) => {
7330
7391
  const r = {
7331
7392
  themeId: Qe(),
@@ -7336,16 +7397,16 @@ function to(n) {
7336
7397
  return await n.insertInto("themes").values({ ...mn(r), tenant_id: e }).execute(), r;
7337
7398
  };
7338
7399
  }
7339
- function no(n) {
7400
+ function oo(n) {
7340
7401
  return async (e, t) => (await n.deleteFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", t).executeTakeFirst()).numDeletedRows > 0;
7341
7402
  }
7342
- function ro(n) {
7403
+ function co(n) {
7343
7404
  return async (e, t) => {
7344
7405
  const r = await n.selectFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", t).selectAll().executeTakeFirst();
7345
- return r ? P(r) : null;
7406
+ return r ? R(r) : null;
7346
7407
  };
7347
7408
  }
7348
- function so(n) {
7409
+ function uo(n) {
7349
7410
  return async (e, t, r) => {
7350
7411
  const s = mn({
7351
7412
  ...r,
@@ -7354,36 +7415,36 @@ function so(n) {
7354
7415
  return await n.updateTable("themes").set(s).where("themes.id", "=", t).where("themes.tenant_id", "=", e).execute(), !0;
7355
7416
  };
7356
7417
  }
7357
- function ao(n) {
7418
+ function lo(n) {
7358
7419
  return {
7359
- create: to(n),
7360
- get: ro(n),
7361
- remove: no(n),
7362
- update: so(n)
7420
+ create: io(n),
7421
+ get: co(n),
7422
+ remove: oo(n),
7423
+ update: uo(n)
7363
7424
  };
7364
7425
  }
7365
- function oo(n) {
7426
+ function ho(n) {
7366
7427
  return {
7367
- applications: xa(n),
7368
- authenticationCodes: Fa(n),
7369
- branding: La(n),
7370
- clients: Ia(n),
7371
- codes: pa(n),
7372
- connections: ja(n),
7373
- domains: Pa(n),
7374
- hooks: Qa(n),
7375
- keys: Aa(n),
7376
- logs: qs(n),
7377
- OTP: aa(n),
7378
- passwords: da(n),
7379
- users: As(n),
7380
- sessions: Ys(n),
7381
- tenants: Vs(n),
7382
- themes: ao(n),
7383
- tickets: ta(n),
7384
- universalLoginSessions: _a(n)
7428
+ applications: Za(n),
7429
+ authenticationCodes: Ka(n),
7430
+ branding: Ba(n),
7431
+ clients: Ra(n),
7432
+ codes: ga(n),
7433
+ connections: Aa(n),
7434
+ domains: Ua(n),
7435
+ hooks: Xa(n),
7436
+ keys: Ma(n),
7437
+ logs: Qs(n),
7438
+ OTP: ca(n),
7439
+ passwords: pa(n),
7440
+ users: Ps(n),
7441
+ sessions: ea(n),
7442
+ tenants: zs(n),
7443
+ themes: lo(n),
7444
+ tickets: sa(n),
7445
+ universalLoginSessions: ka(n)
7385
7446
  };
7386
7447
  }
7387
7448
  export {
7388
- oo as default
7449
+ ho as default
7389
7450
  };