@authhero/kysely-adapter 0.24.0 → 0.24.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,9 +1,9 @@
1
- var Wa = Object.defineProperty;
1
+ var qa = Object.defineProperty;
2
2
  var Bn = (t) => {
3
3
  throw TypeError(t);
4
4
  };
5
- var qa = (t, e, n) => e in t ? Wa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
- var ut = (t, e, n) => qa(t, typeof e != "symbol" ? e + "" : e, n), bn = (t, e, n) => e.has(t) || Bn("Cannot " + n);
5
+ var Qa = (t, e, n) => e in t ? qa(t, e, { enumerable: !0, configurable: !0, writable: !0, value: n }) : t[e] = n;
6
+ var ut = (t, e, n) => Qa(t, typeof e != "symbol" ? e + "" : e, n), bn = (t, e, n) => e.has(t) || Bn("Cannot " + n);
7
7
  var v = (t, e, n) => (bn(t, e, "read from private field"), n ? n.call(t) : e.get(t)), ae = (t, e, n) => e.has(t) ? Bn("Cannot add the same private member more than once") : e instanceof WeakSet ? e.add(t) : e.set(t, n), ht = (t, e, n, a) => (bn(t, e, "write to private field"), a ? a.call(t, n) : e.set(t, n), n), T = (t, e, n) => (bn(t, e, "access private method"), n);
8
8
  var Tn = class extends Error {
9
9
  constructor(e = 500, n) {
@@ -21,7 +21,7 @@ var Tn = class extends Error {
21
21
  });
22
22
  }
23
23
  };
24
- function Qa(t) {
24
+ function Ga(t) {
25
25
  return async (e, n) => {
26
26
  const { identities: a, ...r } = n, s = {
27
27
  ...r,
@@ -53,7 +53,7 @@ function R(t) {
53
53
  e[n] === null ? delete e[n] : typeof e[n] == "object" && (Array.isArray(e[n]) ? e[n] = e[n].map(R) : e[n] = R(e[n]));
54
54
  return e;
55
55
  }
56
- function Ga(t, e) {
56
+ function Ha(t, e) {
57
57
  var n = {};
58
58
  for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && e.indexOf(a) < 0 && (n[a] = t[a]);
59
59
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -61,26 +61,26 @@ function Ga(t, e) {
61
61
  e.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, a[r]) && (n[a[r]] = t[a[r]]);
62
62
  return n;
63
63
  }
64
- function Ha(t, e) {
64
+ function Ya(t, e) {
65
65
  var n;
66
66
  return ((n = t == null ? void 0 : t._def) === null || n === void 0 ? void 0 : n.typeName) === e;
67
67
  }
68
- function mt(t, e) {
68
+ function pt(t, e) {
69
69
  const n = t.ZodType.prototype[e];
70
70
  t.ZodType.prototype[e] = function(...a) {
71
71
  const r = n.apply(this, a);
72
72
  return r._def.openapi = this._def.openapi, r;
73
73
  };
74
74
  }
75
- function Ya(t) {
75
+ function Xa(t) {
76
76
  if (typeof t.ZodType.prototype.openapi < "u")
77
77
  return;
78
78
  t.ZodType.prototype.openapi = function(r, s) {
79
79
  var o, d, c, l, u, Z;
80
- const M = typeof r == "string" ? s : r, W = M ?? {}, { param: _e } = W, Je = Ga(W, ["param"]), ge = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ye = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), Je), !((l = (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata) === null || l === void 0) && l.param || _e ? {
80
+ const M = typeof r == "string" ? s : r, W = M ?? {}, { param: _e } = W, Je = Ha(W, ["param"]), ge = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ye = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), Je), !((l = (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata) === null || l === void 0) && l.param || _e ? {
81
81
  param: Object.assign(Object.assign({}, (Z = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || Z === void 0 ? void 0 : Z.param), _e)
82
82
  } : void 0), ve = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(ge).length > 0 ? { _internal: ge } : void 0), Object.keys(ye).length > 0 ? { metadata: ye } : void 0) }));
83
- if (Ha(this, "ZodObject")) {
83
+ if (Ya(this, "ZodObject")) {
84
84
  const We = this.extend;
85
85
  ve.extend = function(...qe) {
86
86
  var ee, te, ne, be, $e, Pe;
@@ -94,7 +94,7 @@ function Ya(t) {
94
94
  };
95
95
  }
96
96
  return ve;
97
- }, mt(t, "optional"), mt(t, "nullable"), mt(t, "default"), mt(t, "transform"), mt(t, "refine");
97
+ }, pt(t, "optional"), pt(t, "nullable"), pt(t, "default"), pt(t, "transform"), pt(t, "refine");
98
98
  const e = t.ZodObject.prototype.deepPartial;
99
99
  t.ZodObject.prototype.deepPartial = function() {
100
100
  const r = this._def.shape(), s = e.apply(this), o = s._def.shape();
@@ -218,7 +218,7 @@ const g = E.arrayToEnum([
218
218
  "invalid_intersection_types",
219
219
  "not_multiple_of",
220
220
  "not_finite"
221
- ]), Xa = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
221
+ ]), er = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
222
222
  class K extends Error {
223
223
  constructor(e) {
224
224
  super(), this.issues = [], this.addIssue = (a) => {
@@ -336,7 +336,7 @@ const st = (t, e) => {
336
336
  return { message: n };
337
337
  };
338
338
  let Xn = st;
339
- function er(t) {
339
+ function tr(t) {
340
340
  Xn = t;
341
341
  }
342
342
  function tn() {
@@ -362,7 +362,7 @@ const nn = (t) => {
362
362
  path: s,
363
363
  message: d
364
364
  };
365
- }, tr = [];
365
+ }, nr = [];
366
366
  function f(t, e) {
367
367
  const n = tn(), a = nn({
368
368
  issueData: e,
@@ -653,14 +653,14 @@ class j {
653
653
  return this.safeParse(null).success;
654
654
  }
655
655
  }
656
- const nr = /^c[^\s-]{8,}$/i, ar = /^[0-9a-z]+$/, rr = /^[0-9A-HJKMNP-TV-Z]{26}$/, sr = /^[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, ir = /^[a-z0-9_-]{21}$/i, or = /^[-+]?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)?)??$/, dr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, cr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
656
+ const ar = /^c[^\s-]{8,}$/i, rr = /^[0-9a-z]+$/, sr = /^[0-9A-HJKMNP-TV-Z]{26}$/, ir = /^[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, or = /^[a-z0-9_-]{21}$/i, dr = /^[-+]?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)?)??$/, cr = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, lr = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
657
657
  let wn;
658
- const lr = /^(?:(?: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])$/, ur = /^(([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})))$/, hr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ta = "((\\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])))", mr = new RegExp(`^${ta}$`);
658
+ const ur = /^(?:(?: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])$/, hr = /^(([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})))$/, pr = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ta = "((\\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])))", mr = new RegExp(`^${ta}$`);
659
659
  function na(t) {
660
660
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
661
661
  return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
662
662
  }
663
- function pr(t) {
663
+ function fr(t) {
664
664
  return new RegExp(`^${na(t)}$`);
665
665
  }
666
666
  function aa(t) {
@@ -668,8 +668,8 @@ function aa(t) {
668
668
  const n = [];
669
669
  return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
670
670
  }
671
- function fr(t, e) {
672
- return !!((e === "v4" || !e) && lr.test(t) || (e === "v6" || !e) && ur.test(t));
671
+ function _r(t, e) {
672
+ return !!((e === "v4" || !e) && ur.test(t) || (e === "v6" || !e) && hr.test(t));
673
673
  }
674
674
  class q extends j {
675
675
  _parse(e) {
@@ -720,43 +720,43 @@ class q extends j {
720
720
  message: r.message
721
721
  }), n.dirty());
722
722
  } else if (r.kind === "email")
723
- dr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
723
+ cr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
724
724
  validation: "email",
725
725
  code: h.invalid_string,
726
726
  message: r.message
727
727
  }), n.dirty());
728
728
  else if (r.kind === "emoji")
729
- wn || (wn = new RegExp(cr, "u")), wn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
729
+ wn || (wn = new RegExp(lr, "u")), wn.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
730
730
  validation: "emoji",
731
731
  code: h.invalid_string,
732
732
  message: r.message
733
733
  }), n.dirty());
734
734
  else if (r.kind === "uuid")
735
- sr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
735
+ ir.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
736
736
  validation: "uuid",
737
737
  code: h.invalid_string,
738
738
  message: r.message
739
739
  }), n.dirty());
740
740
  else if (r.kind === "nanoid")
741
- ir.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
741
+ or.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
742
742
  validation: "nanoid",
743
743
  code: h.invalid_string,
744
744
  message: r.message
745
745
  }), n.dirty());
746
746
  else if (r.kind === "cuid")
747
- nr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
747
+ ar.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
748
748
  validation: "cuid",
749
749
  code: h.invalid_string,
750
750
  message: r.message
751
751
  }), n.dirty());
752
752
  else if (r.kind === "cuid2")
753
- ar.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
753
+ rr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
754
754
  validation: "cuid2",
755
755
  code: h.invalid_string,
756
756
  message: r.message
757
757
  }), n.dirty());
758
758
  else if (r.kind === "ulid")
759
- rr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
759
+ sr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
760
760
  validation: "ulid",
761
761
  code: h.invalid_string,
762
762
  message: r.message
@@ -795,19 +795,19 @@ class q extends j {
795
795
  code: h.invalid_string,
796
796
  validation: "date",
797
797
  message: r.message
798
- }), n.dirty()) : r.kind === "time" ? pr(r).test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
798
+ }), n.dirty()) : r.kind === "time" ? fr(r).test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
799
799
  code: h.invalid_string,
800
800
  validation: "time",
801
801
  message: r.message
802
- }), n.dirty()) : r.kind === "duration" ? or.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
802
+ }), n.dirty()) : r.kind === "duration" ? dr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
803
803
  validation: "duration",
804
804
  code: h.invalid_string,
805
805
  message: r.message
806
- }), n.dirty()) : r.kind === "ip" ? fr(e.data, r.version) || (a = this._getOrReturnCtx(e, a), f(a, {
806
+ }), n.dirty()) : r.kind === "ip" ? _r(e.data, r.version) || (a = this._getOrReturnCtx(e, a), f(a, {
807
807
  validation: "ip",
808
808
  code: h.invalid_string,
809
809
  message: r.message
810
- }), n.dirty()) : r.kind === "base64" ? hr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
810
+ }), n.dirty()) : r.kind === "base64" ? pr.test(e.data) || (a = this._getOrReturnCtx(e, a), f(a, {
811
811
  validation: "base64",
812
812
  code: h.invalid_string,
813
813
  message: r.message
@@ -1029,7 +1029,7 @@ q.create = (t) => {
1029
1029
  ...O(t)
1030
1030
  });
1031
1031
  };
1032
- function _r(t, e) {
1032
+ function gr(t, e) {
1033
1033
  const n = (t.toString().split(".")[1] || "").length, a = (e.toString().split(".")[1] || "").length, r = n > a ? n : a, s = parseInt(t.toFixed(r).replace(".", "")), o = parseInt(e.toFixed(r).replace(".", ""));
1034
1034
  return s % o / Math.pow(10, r);
1035
1035
  }
@@ -1068,7 +1068,7 @@ class ke extends j {
1068
1068
  inclusive: r.inclusive,
1069
1069
  exact: !1,
1070
1070
  message: r.message
1071
- }), a.dirty()) : r.kind === "multipleOf" ? _r(e.data, r.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
1071
+ }), a.dirty()) : r.kind === "multipleOf" ? gr(e.data, r.value) !== 0 && (n = this._getOrReturnCtx(e, n), f(n, {
1072
1072
  code: h.not_multiple_of,
1073
1073
  multipleOf: r.value,
1074
1074
  message: r.message
@@ -1504,7 +1504,7 @@ Re.create = (t) => new Re({
1504
1504
  typeName: x.ZodUnknown,
1505
1505
  ...O(t)
1506
1506
  });
1507
- class pe extends j {
1507
+ class me extends j {
1508
1508
  _parse(e) {
1509
1509
  const n = this._getOrReturnCtx(e);
1510
1510
  return f(n, {
@@ -1514,7 +1514,7 @@ class pe extends j {
1514
1514
  }), C;
1515
1515
  }
1516
1516
  }
1517
- pe.create = (t) => new pe({
1517
+ me.create = (t) => new me({
1518
1518
  typeName: x.ZodNever,
1519
1519
  ...O(t)
1520
1520
  });
@@ -1644,7 +1644,7 @@ class A extends j {
1644
1644
  }), C;
1645
1645
  }
1646
1646
  const { status: n, ctx: a } = this._processInputParams(e), { shape: r, keys: s } = this._getCached(), o = [];
1647
- if (!(this._def.catchall instanceof pe && this._def.unknownKeys === "strip"))
1647
+ if (!(this._def.catchall instanceof me && this._def.unknownKeys === "strip"))
1648
1648
  for (const c in a.data)
1649
1649
  s.includes(c) || o.push(c);
1650
1650
  const d = [];
@@ -1656,7 +1656,7 @@ class A extends j {
1656
1656
  alwaysSet: c in a.data
1657
1657
  });
1658
1658
  }
1659
- if (this._def.catchall instanceof pe) {
1659
+ if (this._def.catchall instanceof me) {
1660
1660
  const c = this._def.unknownKeys;
1661
1661
  if (c === "passthrough")
1662
1662
  for (const l of o)
@@ -1893,21 +1893,21 @@ class A extends j {
1893
1893
  A.create = (t, e) => new A({
1894
1894
  shape: () => t,
1895
1895
  unknownKeys: "strip",
1896
- catchall: pe.create(),
1896
+ catchall: me.create(),
1897
1897
  typeName: x.ZodObject,
1898
1898
  ...O(e)
1899
1899
  });
1900
1900
  A.strictCreate = (t, e) => new A({
1901
1901
  shape: () => t,
1902
1902
  unknownKeys: "strict",
1903
- catchall: pe.create(),
1903
+ catchall: me.create(),
1904
1904
  typeName: x.ZodObject,
1905
1905
  ...O(e)
1906
1906
  });
1907
1907
  A.lazycreate = (t, e) => new A({
1908
1908
  shape: t,
1909
1909
  unknownKeys: "strip",
1910
- catchall: pe.create(),
1910
+ catchall: me.create(),
1911
1911
  typeName: x.ZodObject,
1912
1912
  ...O(e)
1913
1913
  });
@@ -2769,7 +2769,7 @@ cn.create = (t) => new cn({
2769
2769
  typeName: x.ZodNaN,
2770
2770
  ...O(t)
2771
2771
  });
2772
- const gr = Symbol("zod_brand");
2772
+ const yr = Symbol("zod_brand");
2773
2773
  class zn extends j {
2774
2774
  _parse(e) {
2775
2775
  const { ctx: n } = this._processInputParams(e), a = n.data;
@@ -2846,16 +2846,16 @@ function sa(t, e = {}, n) {
2846
2846
  }
2847
2847
  }) : it.create();
2848
2848
  }
2849
- const yr = {
2849
+ const vr = {
2850
2850
  object: A.lazycreate
2851
2851
  };
2852
2852
  var x;
2853
2853
  (function(t) {
2854
2854
  t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
2855
2855
  })(x || (x = {}));
2856
- const vr = (t, e = {
2856
+ const br = (t, e = {
2857
2857
  message: `Input not instance of ${t.name}`
2858
- }) => sa((n) => n instanceof t, e), ia = q.create, oa = ke.create, br = cn.create, wr = Ce.create, da = Nt.create, xr = ze.create, Nr = sn.create, kr = kt.create, Cr = Ct.create, Tr = it.create, Or = Re.create, Sr = pe.create, jr = on.create, Ir = G.create, Zr = A.create, Er = A.strictCreate, $r = Tt.create, Pr = yn.create, Ar = Ot.create, Dr = oe.create, Mr = St.create, Rr = dn.create, Lr = Ue.create, zr = nt.create, Ur = jt.create, Fr = It.create, Vr = Te.create, Br = Zt.create, Kr = ot.create, Jn = Y.create, Jr = re.create, Wr = Oe.create, qr = Y.createWithPreprocess, Qr = Ht.create, Gr = () => ia().optional(), Hr = () => oa().optional(), Yr = () => da().optional(), Xr = {
2858
+ }) => sa((n) => n instanceof t, e), ia = q.create, oa = ke.create, wr = cn.create, xr = Ce.create, da = Nt.create, Nr = ze.create, kr = sn.create, Cr = kt.create, Tr = Ct.create, Or = it.create, Sr = Re.create, jr = me.create, Ir = on.create, Zr = G.create, Er = A.create, $r = A.strictCreate, Pr = Tt.create, Ar = yn.create, Dr = Ot.create, Mr = oe.create, Rr = St.create, Lr = dn.create, zr = Ue.create, Ur = nt.create, Fr = jt.create, Vr = It.create, Br = Te.create, Kr = Zt.create, Jr = ot.create, Jn = Y.create, Wr = re.create, qr = Oe.create, Qr = Y.createWithPreprocess, Gr = Ht.create, Hr = () => ia().optional(), Yr = () => oa().optional(), Xr = () => da().optional(), es = {
2859
2859
  string: (t) => q.create({ ...t, coerce: !0 }),
2860
2860
  number: (t) => ke.create({ ...t, coerce: !0 }),
2861
2861
  boolean: (t) => Nt.create({
@@ -2864,14 +2864,14 @@ const vr = (t, e = {
2864
2864
  }),
2865
2865
  bigint: (t) => Ce.create({ ...t, coerce: !0 }),
2866
2866
  date: (t) => ze.create({ ...t, coerce: !0 })
2867
- }, es = C;
2867
+ }, ts = C;
2868
2868
  var i = /* @__PURE__ */ Object.freeze({
2869
2869
  __proto__: null,
2870
2870
  defaultErrorMap: st,
2871
- setErrorMap: er,
2871
+ setErrorMap: tr,
2872
2872
  getErrorMap: tn,
2873
2873
  makeIssue: nn,
2874
- EMPTY_PATH: tr,
2874
+ EMPTY_PATH: nr,
2875
2875
  addIssueToContext: f,
2876
2876
  ParseStatus: U,
2877
2877
  INVALID: C,
@@ -2901,7 +2901,7 @@ var i = /* @__PURE__ */ Object.freeze({
2901
2901
  ZodNull: Ct,
2902
2902
  ZodAny: it,
2903
2903
  ZodUnknown: Re,
2904
- ZodNever: pe,
2904
+ ZodNever: me,
2905
2905
  ZodVoid: on,
2906
2906
  ZodArray: G,
2907
2907
  ZodObject: A,
@@ -2925,63 +2925,63 @@ var i = /* @__PURE__ */ Object.freeze({
2925
2925
  ZodDefault: Et,
2926
2926
  ZodCatch: $t,
2927
2927
  ZodNaN: cn,
2928
- BRAND: gr,
2928
+ BRAND: yr,
2929
2929
  ZodBranded: zn,
2930
2930
  ZodPipeline: Ht,
2931
2931
  ZodReadonly: Pt,
2932
2932
  custom: sa,
2933
2933
  Schema: j,
2934
2934
  ZodSchema: j,
2935
- late: yr,
2935
+ late: vr,
2936
2936
  get ZodFirstPartyTypeKind() {
2937
2937
  return x;
2938
2938
  },
2939
- coerce: Xr,
2940
- any: Tr,
2941
- array: Ir,
2942
- bigint: wr,
2939
+ coerce: es,
2940
+ any: Or,
2941
+ array: Zr,
2942
+ bigint: xr,
2943
2943
  boolean: da,
2944
- date: xr,
2945
- discriminatedUnion: Pr,
2944
+ date: Nr,
2945
+ discriminatedUnion: Ar,
2946
2946
  effect: Jn,
2947
- enum: Vr,
2948
- function: zr,
2949
- instanceof: vr,
2950
- intersection: Ar,
2951
- lazy: Ur,
2952
- literal: Fr,
2953
- map: Rr,
2954
- nan: br,
2955
- nativeEnum: Br,
2956
- never: Sr,
2957
- null: Cr,
2958
- nullable: Wr,
2947
+ enum: Br,
2948
+ function: Ur,
2949
+ instanceof: br,
2950
+ intersection: Dr,
2951
+ lazy: Fr,
2952
+ literal: Vr,
2953
+ map: Lr,
2954
+ nan: wr,
2955
+ nativeEnum: Kr,
2956
+ never: jr,
2957
+ null: Tr,
2958
+ nullable: qr,
2959
2959
  number: oa,
2960
- object: Zr,
2961
- oboolean: Yr,
2962
- onumber: Hr,
2963
- optional: Jr,
2964
- ostring: Gr,
2965
- pipeline: Qr,
2966
- preprocess: qr,
2967
- promise: Kr,
2968
- record: Mr,
2969
- set: Lr,
2970
- strictObject: Er,
2960
+ object: Er,
2961
+ oboolean: Xr,
2962
+ onumber: Yr,
2963
+ optional: Wr,
2964
+ ostring: Hr,
2965
+ pipeline: Gr,
2966
+ preprocess: Qr,
2967
+ promise: Jr,
2968
+ record: Rr,
2969
+ set: zr,
2970
+ strictObject: $r,
2971
2971
  string: ia,
2972
- symbol: Nr,
2972
+ symbol: kr,
2973
2973
  transformer: Jn,
2974
- tuple: Dr,
2975
- undefined: kr,
2976
- union: $r,
2977
- unknown: Or,
2978
- void: jr,
2979
- NEVER: es,
2974
+ tuple: Mr,
2975
+ undefined: Cr,
2976
+ union: Pr,
2977
+ unknown: Sr,
2978
+ void: Ir,
2979
+ NEVER: ts,
2980
2980
  ZodIssueCode: h,
2981
- quotelessJson: Xa,
2981
+ quotelessJson: er,
2982
2982
  ZodError: K
2983
2983
  });
2984
- Ya(i);
2984
+ Xa(i);
2985
2985
  i.object({
2986
2986
  start: i.number(),
2987
2987
  limit: i.number(),
@@ -2990,7 +2990,7 @@ i.object({
2990
2990
  const Un = i.object({
2991
2991
  created_at: i.string(),
2992
2992
  updated_at: i.string()
2993
- }), ts = i.object({
2993
+ }), ns = i.object({
2994
2994
  email: i.string().optional(),
2995
2995
  email_verified: i.boolean().optional(),
2996
2996
  name: i.string().optional(),
@@ -2999,7 +2999,7 @@ const Un = i.object({
2999
2999
  phone_number: i.string().optional(),
3000
3000
  phone_verified: i.boolean().optional(),
3001
3001
  family_name: i.string().optional()
3002
- }).catchall(i.any()), ns = i.object({
3002
+ }).catchall(i.any()), as = i.object({
3003
3003
  connection: i.string(),
3004
3004
  user_id: i.string(),
3005
3005
  provider: i.string(),
@@ -3007,7 +3007,7 @@ const Un = i.object({
3007
3007
  access_token: i.string().optional(),
3008
3008
  access_token_secret: i.string().optional(),
3009
3009
  refresh_token: i.string().optional(),
3010
- profileData: ts.optional()
3010
+ profileData: ns.optional()
3011
3011
  }), ca = i.object({
3012
3012
  email: i.string().optional(),
3013
3013
  username: i.string().optional(),
@@ -3022,7 +3022,7 @@ const Un = i.object({
3022
3022
  user_id: i.string().optional(),
3023
3023
  app_metadata: i.any().default({}).optional(),
3024
3024
  user_metadata: i.any().default({}).optional()
3025
- }), as = ca.extend({
3025
+ }), rs = ca.extend({
3026
3026
  email_verified: i.boolean().default(!1),
3027
3027
  verify_email: i.boolean().optional(),
3028
3028
  last_ip: i.string().optional(),
@@ -3032,14 +3032,14 @@ const Un = i.object({
3032
3032
  connection: i.string().default("email")
3033
3033
  });
3034
3034
  i.object({
3035
- ...as.shape,
3035
+ ...rs.shape,
3036
3036
  ...Un.shape,
3037
3037
  user_id: i.string(),
3038
3038
  // TODO: this not might be correct if you use the username
3039
3039
  email: i.string(),
3040
3040
  is_social: i.boolean(),
3041
3041
  login_count: i.number(),
3042
- identities: i.array(ns).optional()
3042
+ identities: i.array(as).optional()
3043
3043
  });
3044
3044
  ca.extend({
3045
3045
  email: i.string(),
@@ -3049,14 +3049,14 @@ ca.extend({
3049
3049
  last_login: i.string().optional(),
3050
3050
  user_id: i.string()
3051
3051
  }).catchall(i.any());
3052
- const rs = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3053
- let ss = (t = 21) => {
3052
+ const ss = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3053
+ let is = (t = 21) => {
3054
3054
  let e = "", n = crypto.getRandomValues(new Uint8Array(t));
3055
3055
  for (; t--; )
3056
- e += rs[n[t] & 63];
3056
+ e += ss[n[t] & 63];
3057
3057
  return e;
3058
3058
  };
3059
- const is = i.object({
3059
+ const os = i.object({
3060
3060
  audience: i.string().optional(),
3061
3061
  recipient: i.string().optional(),
3062
3062
  createUpnClaim: i.boolean().optional(),
@@ -3073,7 +3073,7 @@ const is = i.object({
3073
3073
  nameIdentifierProbes: i.array(i.string()).optional(),
3074
3074
  authnContextClassRef: i.string().optional(),
3075
3075
  mappings: i.record(i.string()).optional()
3076
- }), os = i.object({
3076
+ }), ds = i.object({
3077
3077
  id: i.string(),
3078
3078
  name: i.string(),
3079
3079
  callbacks: i.array(i.string()).default([]).optional().openapi({
@@ -3092,24 +3092,24 @@ const is = i.object({
3092
3092
  description: "Ids of clients that will be allowed to perform delegation requests. Clients that will be allowed to make delegation request. By default, all your clients will be allowed. This field allows you to specify specific clients"
3093
3093
  }),
3094
3094
  addons: i.object({
3095
- samlp: is.optional()
3095
+ samlp: os.optional()
3096
3096
  }).default({}).optional().openapi({
3097
3097
  description: "Addons associated with the client. The key is the addon's package name and the value is an object with the configuration for the addon."
3098
3098
  }),
3099
3099
  email_validation: i.enum(["enabled", "disabled", "enforced"]).default("enforced").optional().openapi({
3100
3100
  description: "Defines if it possible to sign in with an unverified email and if verification emails will be sent. This is not available in auth0"
3101
3101
  }),
3102
- client_secret: i.string().default(() => ss()).optional(),
3102
+ client_secret: i.string().default(() => is()).optional(),
3103
3103
  disable_sign_ups: i.boolean().optional().default(!1).openapi({
3104
3104
  description: "Prevents users from signing up using the hosted login page. This is not available in auth0"
3105
3105
  })
3106
- }), ds = i.object({
3106
+ }), cs = i.object({
3107
3107
  created_at: i.string().transform((t) => t === null ? "" : t),
3108
3108
  updated_at: i.string().transform((t) => t === null ? "" : t),
3109
- ...os.shape
3109
+ ...ds.shape
3110
3110
  });
3111
- var la = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(la || {}), ua = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t.SAML_POST = "saml_post", t))(ua || {});
3112
- const cs = i.object({
3111
+ var la = /* @__PURE__ */ ((t) => (t.TOKEN = "token", t.TOKEN_ID_TOKEN = "token id_token", t.CODE = "code", t))(la || {}), ua = /* @__PURE__ */ ((t) => (t.QUERY = "query", t.FRAGMENT = "fragment", t.FORM_POST = "form_post", t.WEB_MESSAGE = "web_message", t.SAML_POST = "saml_post", t))(ua || {}), ha = /* @__PURE__ */ ((t) => (t.S265 = "S256", t.plain = "plain", t))(ha || {});
3112
+ const ls = i.object({
3113
3113
  client_id: i.string(),
3114
3114
  vendor_id: i.string().optional(),
3115
3115
  act_as: i.string().optional(),
@@ -3121,7 +3121,7 @@ const cs = i.object({
3121
3121
  nonce: i.string().optional(),
3122
3122
  scope: i.string().optional(),
3123
3123
  prompt: i.string().optional(),
3124
- code_challenge_method: i.enum(["plain", "S256"]).optional(),
3124
+ code_challenge_method: i.nativeEnum(ha).optional(),
3125
3125
  code_challenge: i.string().optional(),
3126
3126
  username: i.string().optional(),
3127
3127
  ui_locales: i.string().optional()
@@ -3142,7 +3142,7 @@ i.object({
3142
3142
  url: i.string()
3143
3143
  }).optional()
3144
3144
  });
3145
- const ls = i.object({
3145
+ const us = i.object({
3146
3146
  id: i.string().optional(),
3147
3147
  name: i.string(),
3148
3148
  strategy: i.enum([
@@ -3178,11 +3178,11 @@ const ls = i.object({
3178
3178
  enabled_clients: i.array(i.string()).default([]).optional(),
3179
3179
  response_type: i.custom().optional(),
3180
3180
  response_mode: i.custom().optional()
3181
- }), ha = i.object({
3181
+ }), pa = i.object({
3182
3182
  id: i.string(),
3183
3183
  created_at: i.string().transform((t) => t === null ? "" : t),
3184
3184
  updated_at: i.string().transform((t) => t === null ? "" : t)
3185
- }).extend(ls.shape), us = i.object({
3185
+ }).extend(us.shape), hs = i.object({
3186
3186
  name: i.string(),
3187
3187
  audience: i.string(),
3188
3188
  sender_email: i.string().email(),
@@ -3192,11 +3192,11 @@ const ls = i.object({
3192
3192
  primary_color: i.string().optional(),
3193
3193
  secondary_color: i.string().optional(),
3194
3194
  language: i.string().optional()
3195
- }), hs = i.object({
3195
+ }), ps = i.object({
3196
3196
  created_at: i.string().transform((t) => t === null ? "" : t),
3197
3197
  updated_at: i.string().transform((t) => t === null ? "" : t),
3198
3198
  id: i.string(),
3199
- ...us.shape
3199
+ ...hs.shape
3200
3200
  });
3201
3201
  i.object({
3202
3202
  logoUrl: i.string(),
@@ -3224,19 +3224,19 @@ const ms = i.object({
3224
3224
  email_service: i.union([i.literal("mailgun"), i.literal("mailchannels")]).optional()
3225
3225
  });
3226
3226
  i.object({
3227
- ...ds.shape,
3227
+ ...cs.shape,
3228
3228
  domains: i.array(ms),
3229
- tenant: hs,
3230
- connections: i.array(ha)
3229
+ tenant: ps,
3230
+ connections: i.array(pa)
3231
3231
  });
3232
- const ps = i.enum([
3232
+ const fs = i.enum([
3233
3233
  "password_reset",
3234
3234
  "email_verification",
3235
3235
  "otp",
3236
3236
  "authorization_code",
3237
3237
  "oauth2_state",
3238
3238
  "ticket"
3239
- ]), fs = i.object({
3239
+ ]), _s = i.object({
3240
3240
  code_id: i.string().openapi({
3241
3241
  description: "The code that will be used in for instance an email verification flow"
3242
3242
  }),
@@ -3246,14 +3246,14 @@ const ps = i.enum([
3246
3246
  connection_id: i.string().optional().openapi({
3247
3247
  description: "The connection that the code is connected to"
3248
3248
  }),
3249
- code_type: ps,
3249
+ code_type: fs,
3250
3250
  expires_at: i.string(),
3251
3251
  used_at: i.string().optional(),
3252
3252
  user_id: i.string().optional()
3253
- }), _s = i.object({
3254
- ...fs.shape,
3255
- created_at: i.string()
3256
3253
  }), gs = i.object({
3254
+ ..._s.shape,
3255
+ created_at: i.string()
3256
+ }), ys = i.object({
3257
3257
  domain: i.string(),
3258
3258
  dkim_private_key: i.string().optional(),
3259
3259
  dkim_public_key: i.string().optional(),
@@ -3261,10 +3261,10 @@ const ps = i.enum([
3261
3261
  email_service: i.enum(["mailgun", "mailchannels"])
3262
3262
  });
3263
3263
  Un.extend({
3264
- ...gs.shape,
3264
+ ...ys.shape,
3265
3265
  id: i.string()
3266
3266
  });
3267
- const ys = i.object({
3267
+ const vs = i.object({
3268
3268
  trigger_id: i.enum([
3269
3269
  "pre-user-signup",
3270
3270
  "post-user-registration",
@@ -3276,11 +3276,11 @@ const ys = i.object({
3276
3276
  synchronous: i.boolean().default(!1),
3277
3277
  priority: i.number().optional()
3278
3278
  });
3279
- ys.extend({
3279
+ vs.extend({
3280
3280
  ...Un.shape,
3281
3281
  hook_id: i.string()
3282
3282
  });
3283
- const vs = i.object({
3283
+ const bs = i.object({
3284
3284
  alg: i.enum([
3285
3285
  "RS256",
3286
3286
  "RS384",
@@ -3301,7 +3301,7 @@ const vs = i.object({
3301
3301
  use: i.enum(["sig", "enc"]).optional()
3302
3302
  });
3303
3303
  i.object({
3304
- keys: i.array(vs)
3304
+ keys: i.array(bs)
3305
3305
  });
3306
3306
  i.object({
3307
3307
  issuer: i.string(),
@@ -3325,23 +3325,23 @@ i.object({
3325
3325
  request_parameter_supported: i.boolean(),
3326
3326
  token_endpoint_auth_signing_alg_values_supported: i.array(i.string())
3327
3327
  });
3328
- const bs = i.object({
3328
+ const ws = i.object({
3329
3329
  auth0Client: i.string().optional(),
3330
- authParams: cs,
3330
+ authParams: ls,
3331
3331
  expires_at: i.string(),
3332
3332
  deleted_at: i.string().optional(),
3333
3333
  ip: i.string().optional(),
3334
3334
  useragent: i.string().optional()
3335
3335
  }).openapi({
3336
3336
  description: "This represents a login sesion"
3337
- }), ws = i.object({
3338
- ...bs.shape,
3337
+ }), xs = i.object({
3338
+ ...ws.shape,
3339
3339
  login_id: i.string().openapi({
3340
3340
  description: "This is is used as the state in the universal login"
3341
3341
  }),
3342
3342
  created_at: i.string(),
3343
3343
  updated_at: i.string()
3344
- }), xs = i.enum([
3344
+ }), Ns = i.enum([
3345
3345
  "cls",
3346
3346
  // CODE_LINK_SENT
3347
3347
  "fsa",
@@ -3390,7 +3390,7 @@ const bs = i.object({
3390
3390
  // SUCCESS_VERIFICATION_EMAIL
3391
3391
  "svr"
3392
3392
  // SUCCESS_VERIFICATION_EMAIL_REQUEST
3393
- ]), Ns = i.object({
3393
+ ]), ks = i.object({
3394
3394
  name: i.string(),
3395
3395
  version: i.string(),
3396
3396
  env: i.object({
@@ -3398,7 +3398,7 @@ const bs = i.object({
3398
3398
  }).optional()
3399
3399
  });
3400
3400
  i.object({
3401
- type: xs,
3401
+ type: Ns,
3402
3402
  date: i.string(),
3403
3403
  description: i.string().optional(),
3404
3404
  log_id: i.string().optional(),
@@ -3419,19 +3419,19 @@ i.object({
3419
3419
  strategy: i.string().optional(),
3420
3420
  strategy_type: i.string().optional(),
3421
3421
  hostname: i.string().optional(),
3422
- auth0_client: Ns.optional()
3422
+ auth0_client: ks.optional()
3423
3423
  });
3424
- const ks = i.object({
3424
+ const Cs = i.object({
3425
3425
  user_id: i.string(),
3426
3426
  password: i.string(),
3427
3427
  algorithm: i.enum(["bcrypt", "argon2id"]).default("argon2id")
3428
3428
  });
3429
3429
  i.object({
3430
- ...ks.shape,
3430
+ ...Cs.shape,
3431
3431
  created_at: i.string(),
3432
3432
  updated_at: i.string()
3433
3433
  });
3434
- const Cs = i.object({
3434
+ const Ts = i.object({
3435
3435
  session_id: i.string(),
3436
3436
  client_id: i.string(),
3437
3437
  expires_at: i.string(),
@@ -3441,7 +3441,7 @@ const Cs = i.object({
3441
3441
  });
3442
3442
  i.object({
3443
3443
  created_at: i.string(),
3444
- ...Cs.shape
3444
+ ...Ts.shape
3445
3445
  });
3446
3446
  i.object({
3447
3447
  kid: i.string().openapi({ description: "The key id of the signing key" }),
@@ -3476,7 +3476,7 @@ i.object({
3476
3476
  code: i.string(),
3477
3477
  state: i.string().optional()
3478
3478
  });
3479
- const Ts = i.object({
3479
+ const Os = i.object({
3480
3480
  button_border_radius: i.number(),
3481
3481
  button_border_weight: i.number(),
3482
3482
  buttons_style: i.enum(["pill"]),
@@ -3486,7 +3486,7 @@ const Ts = i.object({
3486
3486
  show_widget_shadow: i.boolean(),
3487
3487
  widget_border_weight: i.number(),
3488
3488
  widget_corner_radius: i.number()
3489
- }), Os = i.object({
3489
+ }), Ss = i.object({
3490
3490
  base_focus_color: i.string(),
3491
3491
  base_hover_color: i.string(),
3492
3492
  body_text: i.string(),
@@ -3509,7 +3509,7 @@ const Ts = i.object({
3509
3509
  }), Qe = i.object({
3510
3510
  bold: i.boolean(),
3511
3511
  size: i.number()
3512
- }), Ss = i.object({
3512
+ }), js = i.object({
3513
3513
  body_text: Qe,
3514
3514
  buttons_text: Qe,
3515
3515
  font_url: i.string(),
@@ -3519,28 +3519,28 @@ const Ts = i.object({
3519
3519
  reference_text_size: i.number(),
3520
3520
  subtitle: Qe,
3521
3521
  title: Qe
3522
- }), js = i.object({
3522
+ }), Is = i.object({
3523
3523
  background_color: i.string(),
3524
3524
  background_image_url: i.string(),
3525
3525
  page_layout: i.enum(["center"])
3526
- }), Is = i.object({
3526
+ }), Zs = i.object({
3527
3527
  header_text_alignment: i.enum(["center"]),
3528
3528
  logo_height: i.number(),
3529
3529
  logo_position: i.enum(["center"]),
3530
3530
  logo_url: i.string(),
3531
3531
  social_buttons_layout: i.enum(["bottom"])
3532
- }), Zs = i.object({
3533
- borders: Ts,
3534
- colors: Os,
3532
+ }), Es = i.object({
3533
+ borders: Os,
3534
+ colors: Ss,
3535
3535
  displayName: i.string(),
3536
- fonts: Ss,
3537
- page_background: js,
3538
- widget: Is
3536
+ fonts: js,
3537
+ page_background: Is,
3538
+ widget: Zs
3539
3539
  });
3540
- Zs.extend({
3540
+ Es.extend({
3541
3541
  themeId: i.string()
3542
3542
  });
3543
- const Es = i.object({
3543
+ const $s = i.object({
3544
3544
  universal_login_experience: i.enum(["new", "classic"]).default("new"),
3545
3545
  identifier_first: i.boolean().default(!0),
3546
3546
  password_first: i.boolean().default(!1),
@@ -3602,7 +3602,7 @@ function ma(t) {
3602
3602
  }
3603
3603
  };
3604
3604
  }
3605
- function $s(t) {
3605
+ function Ps(t) {
3606
3606
  return async (e, n) => {
3607
3607
  const [a, r] = await Promise.all([
3608
3608
  t.selectFrom("users").where("users.tenant_id", "=", e).where("users.user_id", "=", n).selectAll().executeTakeFirst(),
@@ -3670,7 +3670,7 @@ function Be(t, e, n, a) {
3670
3670
  function Ee(t) {
3671
3671
  return typeof t == "string" ? parseInt(t, 10) : typeof t == "bigint" ? Number(t) : t;
3672
3672
  }
3673
- function Ps(t) {
3673
+ function As(t) {
3674
3674
  return async (e, n) => {
3675
3675
  let a = t.selectFrom("users").where("users.tenant_id", "=", e);
3676
3676
  if (n.q && (a = Be(t, a, n.q, ["email", "name"])), n.sort && n.sort.sort_by) {
@@ -3706,48 +3706,48 @@ function Ps(t) {
3706
3706
  };
3707
3707
  };
3708
3708
  }
3709
- function As(t) {
3709
+ function Ds(t) {
3710
3710
  return async (e, n) => (await t.deleteFrom("users").where("users.tenant_id", "=", e).where("users.linked_to", "=", n).execute(), (await t.deleteFrom("users").where("users.tenant_id", "=", e).where("users.user_id", "=", n).execute()).length === 1);
3711
3711
  }
3712
- function Ds(t) {
3712
+ function Ms(t) {
3713
3713
  if (t.email_verified !== void 0)
3714
3714
  return t.email_verified ? 1 : 0;
3715
3715
  }
3716
- function Ms(t) {
3716
+ function Rs(t) {
3717
3717
  return async (e, n, a) => {
3718
3718
  const r = {
3719
3719
  ...a,
3720
- email_verified: Ds(a),
3720
+ email_verified: Ms(a),
3721
3721
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
3722
3722
  };
3723
3723
  return a.app_metadata && (r.app_metadata = JSON.stringify(a.app_metadata)), a.user_metadata && (r.user_metadata = JSON.stringify(a.user_metadata)), (await t.updateTable("users").set(r).where("users.tenant_id", "=", e).where("users.user_id", "=", n).execute()).length === 1;
3724
3724
  };
3725
3725
  }
3726
- function Rs(t) {
3726
+ function Ls(t) {
3727
3727
  return async (e, n, a, r) => {
3728
3728
  const s = { linked_to: null };
3729
3729
  return (await t.updateTable("users").set(s).where("users.tenant_id", "=", e).where("users.user_id", "=", `${a}|${r}`).where("users.linked_to", "=", `${n}`).execute()).length === 1;
3730
3730
  };
3731
3731
  }
3732
- function Ls(t) {
3732
+ function zs(t) {
3733
3733
  return {
3734
- create: Qa(t),
3735
- remove: As(t),
3736
- get: $s(t),
3737
- list: Ps(t),
3738
- update: Ms(t),
3734
+ create: Ga(t),
3735
+ remove: Ds(t),
3736
+ get: Ps(t),
3737
+ list: As(t),
3738
+ update: Rs(t),
3739
3739
  // TODO - think about this more when other issues fixed
3740
- unlink: Rs(t)
3740
+ unlink: Ls(t)
3741
3741
  };
3742
3742
  }
3743
- const zs = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3743
+ const Us = "useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict";
3744
3744
  let Ke = (t = 21) => {
3745
3745
  let e = "", n = crypto.getRandomValues(new Uint8Array(t));
3746
3746
  for (; t--; )
3747
- e += zs[n[t] & 63];
3747
+ e += Us[n[t] & 63];
3748
3748
  return e;
3749
3749
  };
3750
- function Us(t) {
3750
+ function Fs(t) {
3751
3751
  return async (e) => {
3752
3752
  const n = {
3753
3753
  id: e.id || Ke(),
@@ -3758,13 +3758,13 @@ function Us(t) {
3758
3758
  return await t.insertInto("tenants").values(n).execute(), n;
3759
3759
  };
3760
3760
  }
3761
- function Fs(t) {
3761
+ function Vs(t) {
3762
3762
  return async (e) => {
3763
3763
  const n = await t.selectFrom("tenants").where("tenants.id", "=", e).selectAll().executeTakeFirst();
3764
3764
  return n ? R(n) : null;
3765
3765
  };
3766
3766
  }
3767
- function Vs(t) {
3767
+ function Bs(t) {
3768
3768
  return async (e) => {
3769
3769
  let n = t.selectFrom("tenants");
3770
3770
  if (e.sort && e.sort.sort_by) {
@@ -3786,7 +3786,7 @@ function Vs(t) {
3786
3786
  };
3787
3787
  };
3788
3788
  }
3789
- function Bs(t) {
3789
+ function Ks(t) {
3790
3790
  return async (e, n) => {
3791
3791
  const a = {
3792
3792
  ...n,
@@ -3796,29 +3796,29 @@ function Bs(t) {
3796
3796
  await t.updateTable("tenants").set(a).where("id", "=", e).execute();
3797
3797
  };
3798
3798
  }
3799
- function Ks(t) {
3799
+ function Js(t) {
3800
3800
  return async (e) => (await t.deleteFrom("tenants").where("tenants.id", "=", e).execute()).length === 1;
3801
3801
  }
3802
- function Js(t) {
3802
+ function Ws(t) {
3803
3803
  return {
3804
- create: Us(t),
3805
- get: Fs(t),
3806
- list: Vs(t),
3807
- update: Bs(t),
3808
- remove: Ks(t)
3804
+ create: Fs(t),
3805
+ get: Vs(t),
3806
+ list: Bs(t),
3807
+ update: Ks(t),
3808
+ remove: Js(t)
3809
3809
  };
3810
3810
  }
3811
3811
  function Wn(t) {
3812
3812
  return t ? JSON.stringify(t) : void 0;
3813
3813
  }
3814
- const Ws = 1024;
3815
- function qs(t) {
3814
+ const qs = 1024;
3815
+ function Qs(t) {
3816
3816
  return async (e, n) => {
3817
3817
  var r, s, o;
3818
3818
  const a = {
3819
3819
  id: Ke(),
3820
3820
  ...n,
3821
- user_agent: n.user_agent.slice(0, Ws)
3821
+ user_agent: n.user_agent.slice(0, qs)
3822
3822
  };
3823
3823
  return await t.insertInto("logs").values({
3824
3824
  ...a,
@@ -3841,7 +3841,7 @@ function qn(t) {
3841
3841
  return t;
3842
3842
  }
3843
3843
  }
3844
- function pa(t) {
3844
+ function fa(t) {
3845
3845
  return {
3846
3846
  ...t,
3847
3847
  client_id: t.client_id,
@@ -3854,7 +3854,7 @@ function pa(t) {
3854
3854
  _id: t.id
3855
3855
  };
3856
3856
  }
3857
- function Qs(t) {
3857
+ function Gs(t) {
3858
3858
  return async (e, n) => {
3859
3859
  let a = t.selectFrom("logs").where("logs.tenant_id", "=", e);
3860
3860
  n.q && (a = Be(t, a, n.q, ["user_id", "ip"]));
@@ -3869,30 +3869,30 @@ function Qs(t) {
3869
3869
  r = r.offset(n.page * n.per_page).limit(n.per_page);
3870
3870
  const s = await r.selectAll().execute(), { count: o } = await a.select((d) => d.fn.countAll().as("count")).executeTakeFirstOrThrow();
3871
3871
  return {
3872
- logs: s.map(pa),
3872
+ logs: s.map(fa),
3873
3873
  start: n.page * n.per_page,
3874
3874
  limit: n.per_page,
3875
3875
  length: Ee(o)
3876
3876
  };
3877
3877
  };
3878
3878
  }
3879
- function Gs(t) {
3879
+ function Hs(t) {
3880
3880
  return async (e, n) => {
3881
3881
  const a = await t.selectFrom("logs").where("logs.tenant_id", "=", e).where("logs.id", "=", n).selectAll().executeTakeFirst();
3882
- return a ? pa(a) : null;
3882
+ return a ? fa(a) : null;
3883
3883
  };
3884
3884
  }
3885
- function Hs(t) {
3885
+ function Ys(t) {
3886
3886
  return {
3887
- create: qs(t),
3888
- list: Qs(t),
3889
- get: Gs(t)
3887
+ create: Qs(t),
3888
+ list: Gs(t),
3889
+ get: Hs(t)
3890
3890
  };
3891
3891
  }
3892
- function Ys(t) {
3892
+ function Xs(t) {
3893
3893
  return async (e, n) => await t.selectFrom("sessions").where("sessions.tenant_id", "=", e).where("sessions.session_id", "=", n).where("sessions.deleted_at", "is", null).selectAll().executeTakeFirst() ?? null;
3894
3894
  }
3895
- function Xs(t) {
3895
+ function ei(t) {
3896
3896
  return async (e, n) => {
3897
3897
  const a = {
3898
3898
  ...n,
@@ -3902,13 +3902,13 @@ function Xs(t) {
3902
3902
  return await t.insertInto("sessions").values({ ...a, tenant_id: e }).execute(), { ...n, ...a };
3903
3903
  };
3904
3904
  }
3905
- function ei(t) {
3905
+ function ti(t) {
3906
3906
  return async (e, n) => !!(await t.updateTable("sessions").set({ deleted_at: (/* @__PURE__ */ new Date()).toISOString() }).where("tenant_id", "=", e).where("sessions.session_id", "=", n).where("sessions.deleted_at", "is", null).execute()).length;
3907
3907
  }
3908
- function ti(t) {
3908
+ function ni(t) {
3909
3909
  return async (e, n, a) => !!(await t.updateTable("sessions").set(a).where("tenant_id", "=", e).where("sessions.session_id", "=", n).where("sessions.deleted_at", "is", null).execute()).length;
3910
3910
  }
3911
- function ni(t) {
3911
+ function ai(t) {
3912
3912
  return async (e, n) => {
3913
3913
  let a = t.selectFrom("sessions").where("sessions.tenant_id", "=", e);
3914
3914
  n.q && (a = Be(t, a, n.q, ["user_id", "session_id"]));
@@ -3930,22 +3930,22 @@ function ni(t) {
3930
3930
  };
3931
3931
  };
3932
3932
  }
3933
- function ai(t) {
3933
+ function ri(t) {
3934
3934
  return {
3935
- create: Xs(t),
3936
- get: Ys(t),
3937
- list: ni(t),
3938
- remove: ei(t),
3939
- update: ti(t)
3935
+ create: ei(t),
3936
+ get: Xs(t),
3937
+ list: ai(t),
3938
+ remove: ti(t),
3939
+ update: ni(t)
3940
3940
  };
3941
3941
  }
3942
- function ri(t) {
3942
+ function si(t) {
3943
3943
  return async (e, n) => {
3944
3944
  const a = await t.selectFrom("passwords").where("passwords.tenant_id", "=", e).where("passwords.user_id", "=", n).selectAll().executeTakeFirstOrThrow(), { tenant_id: r, ...s } = a;
3945
3945
  return s;
3946
3946
  };
3947
3947
  }
3948
- function si(t) {
3948
+ function ii(t) {
3949
3949
  return async (e, n) => {
3950
3950
  const a = {
3951
3951
  ...n,
@@ -3958,20 +3958,20 @@ function si(t) {
3958
3958
  }).execute(), a;
3959
3959
  };
3960
3960
  }
3961
- function ii(t) {
3961
+ function oi(t) {
3962
3962
  return async (e, n) => (await t.updateTable("passwords").set({
3963
3963
  password: n.password,
3964
3964
  updated_at: (/* @__PURE__ */ new Date()).toISOString()
3965
3965
  }).where("tenant_id", "=", e).where("user_id", "=", n.user_id).execute()).length === 1;
3966
3966
  }
3967
- function oi(t) {
3967
+ function di(t) {
3968
3968
  return {
3969
- create: si(t),
3970
- update: ii(t),
3971
- get: ri(t)
3969
+ create: ii(t),
3970
+ update: oi(t),
3971
+ get: si(t)
3972
3972
  };
3973
3973
  }
3974
- function di(t) {
3974
+ function ci(t) {
3975
3975
  return async (e, n) => {
3976
3976
  let a = t.selectFrom("codes").where("codes.tenant_id", "=", e);
3977
3977
  n.q && (a = Be(t, a, n.q, ["code", "login_id"]));
@@ -3979,7 +3979,7 @@ function di(t) {
3979
3979
  return {
3980
3980
  codes: s.map((c) => {
3981
3981
  const { tenant_id: l, ...u } = c;
3982
- return _s.parse(R(u));
3982
+ return gs.parse(R(u));
3983
3983
  }),
3984
3984
  start: n.page * n.per_page,
3985
3985
  limit: n.per_page,
@@ -3987,7 +3987,7 @@ function di(t) {
3987
3987
  };
3988
3988
  };
3989
3989
  }
3990
- function ci(t) {
3990
+ function li(t) {
3991
3991
  return async (e, n) => {
3992
3992
  const a = {
3993
3993
  ...n,
@@ -3999,10 +3999,10 @@ function ci(t) {
3999
3999
  }).execute(), a;
4000
4000
  };
4001
4001
  }
4002
- function li(t) {
4002
+ function ui(t) {
4003
4003
  return async (e, n) => (await t.deleteFrom("codes").where("codes.tenant_id", "=", e).where("codes.code_id", "=", n).executeTakeFirst()).numDeletedRows > 0;
4004
4004
  }
4005
- function ui(t) {
4005
+ function hi(t) {
4006
4006
  return async (e, n, a) => {
4007
4007
  let r = t.selectFrom("codes").where("codes.code_id", "=", n).where("codes.code_type", "=", a);
4008
4008
  e.length && (r = r.where("codes.tenant_id", "=", e));
@@ -4010,12 +4010,12 @@ function ui(t) {
4010
4010
  return s ? R(s) : null;
4011
4011
  };
4012
4012
  }
4013
- function hi(t) {
4013
+ function pi(t) {
4014
4014
  return {
4015
- create: ci(t),
4016
- list: di(t),
4017
- remove: li(t),
4018
- get: ui(t)
4015
+ create: li(t),
4016
+ list: ci(t),
4017
+ remove: ui(t),
4018
+ get: hi(t)
4019
4019
  };
4020
4020
  }
4021
4021
  function mi(t) {
@@ -4038,7 +4038,7 @@ function mi(t) {
4038
4038
  }).execute(), a;
4039
4039
  };
4040
4040
  }
4041
- function pi(t) {
4041
+ function fi(t) {
4042
4042
  return async (e) => ({
4043
4043
  applications: (await t.selectFrom("applications").where("applications.tenant_id", "=", e).selectAll().execute()).map((s) => ({
4044
4044
  ...s,
@@ -4052,7 +4052,7 @@ function pi(t) {
4052
4052
  }))
4053
4053
  });
4054
4054
  }
4055
- function fi(t) {
4055
+ function _i(t) {
4056
4056
  return async (e, n) => {
4057
4057
  const a = await t.selectFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", n).selectAll().executeTakeFirst();
4058
4058
  return a ? R({
@@ -4066,10 +4066,10 @@ function fi(t) {
4066
4066
  }) : null;
4067
4067
  };
4068
4068
  }
4069
- function _i(t) {
4069
+ function gi(t) {
4070
4070
  return async (e, n) => (await t.deleteFrom("applications").where("applications.tenant_id", "=", e).where("applications.id", "=", n).executeTakeFirst()).numDeletedRows > 0;
4071
4071
  }
4072
- function gi(t) {
4072
+ function yi(t) {
4073
4073
  return async (e, n, a) => {
4074
4074
  const r = {
4075
4075
  ...a,
@@ -4085,16 +4085,16 @@ function gi(t) {
4085
4085
  return await t.updateTable("applications").set(r).where("applications.id", "=", n).where("applications.tenant_id", "=", e).execute(), !0;
4086
4086
  };
4087
4087
  }
4088
- function yi(t) {
4088
+ function vi(t) {
4089
4089
  return {
4090
4090
  create: mi(t),
4091
- list: pi(t),
4092
- get: fi(t),
4093
- remove: _i(t),
4094
- update: gi(t)
4091
+ list: fi(t),
4092
+ get: _i(t),
4093
+ remove: gi(t),
4094
+ update: yi(t)
4095
4095
  };
4096
4096
  }
4097
- function vi(t) {
4097
+ function bi(t) {
4098
4098
  return async (e, n) => {
4099
4099
  const a = {
4100
4100
  id: Ke(),
@@ -4110,7 +4110,7 @@ function vi(t) {
4110
4110
  }).execute(), a;
4111
4111
  };
4112
4112
  }
4113
- function bi(t, e) {
4113
+ function wi(t, e) {
4114
4114
  var n = {};
4115
4115
  for (var a in t) Object.prototype.hasOwnProperty.call(t, a) && e.indexOf(a) < 0 && (n[a] = t[a]);
4116
4116
  if (t != null && typeof Object.getOwnPropertySymbols == "function")
@@ -4118,26 +4118,26 @@ function bi(t, e) {
4118
4118
  e.indexOf(a[r]) < 0 && Object.prototype.propertyIsEnumerable.call(t, a[r]) && (n[a[r]] = t[a[r]]);
4119
4119
  return n;
4120
4120
  }
4121
- function wi(t, e) {
4121
+ function xi(t, e) {
4122
4122
  var n;
4123
4123
  return ((n = t == null ? void 0 : t._def) === null || n === void 0 ? void 0 : n.typeName) === e;
4124
4124
  }
4125
- function pt(t, e) {
4125
+ function mt(t, e) {
4126
4126
  const n = t.ZodType.prototype[e];
4127
4127
  t.ZodType.prototype[e] = function(...a) {
4128
4128
  const r = n.apply(this, a);
4129
4129
  return r._def.openapi = this._def.openapi, r;
4130
4130
  };
4131
4131
  }
4132
- function xi(t) {
4132
+ function Ni(t) {
4133
4133
  if (typeof t.ZodType.prototype.openapi < "u")
4134
4134
  return;
4135
4135
  t.ZodType.prototype.openapi = function(r, s) {
4136
4136
  var o, d, c, l, u, Z;
4137
- const M = typeof r == "string" ? s : r, W = M ?? {}, { param: _e } = W, Je = bi(W, ["param"]), ge = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ye = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), Je), !((l = (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata) === null || l === void 0) && l.param || _e ? {
4137
+ const M = typeof r == "string" ? s : r, W = M ?? {}, { param: _e } = W, Je = wi(W, ["param"]), ge = Object.assign(Object.assign({}, (o = this._def.openapi) === null || o === void 0 ? void 0 : o._internal), typeof r == "string" ? { refId: r } : void 0), ye = Object.assign(Object.assign(Object.assign({}, (d = this._def.openapi) === null || d === void 0 ? void 0 : d.metadata), Je), !((l = (c = this._def.openapi) === null || c === void 0 ? void 0 : c.metadata) === null || l === void 0) && l.param || _e ? {
4138
4138
  param: Object.assign(Object.assign({}, (Z = (u = this._def.openapi) === null || u === void 0 ? void 0 : u.metadata) === null || Z === void 0 ? void 0 : Z.param), _e)
4139
4139
  } : void 0), ve = new this.constructor(Object.assign(Object.assign({}, this._def), { openapi: Object.assign(Object.assign({}, Object.keys(ge).length > 0 ? { _internal: ge } : void 0), Object.keys(ye).length > 0 ? { metadata: ye } : void 0) }));
4140
- if (wi(this, "ZodObject")) {
4140
+ if (xi(this, "ZodObject")) {
4141
4141
  const We = this.extend;
4142
4142
  ve.extend = function(...qe) {
4143
4143
  var ee, te, ne, be, $e, Pe;
@@ -4151,7 +4151,7 @@ function xi(t) {
4151
4151
  };
4152
4152
  }
4153
4153
  return ve;
4154
- }, pt(t, "optional"), pt(t, "nullable"), pt(t, "default"), pt(t, "transform"), pt(t, "refine");
4154
+ }, mt(t, "optional"), mt(t, "nullable"), mt(t, "default"), mt(t, "transform"), mt(t, "refine");
4155
4155
  const e = t.ZodObject.prototype.deepPartial;
4156
4156
  t.ZodObject.prototype.deepPartial = function() {
4157
4157
  const r = this._def.shape(), s = e.apply(this), o = s._def.shape();
@@ -4258,7 +4258,7 @@ const y = $.arrayToEnum([
4258
4258
  default:
4259
4259
  return y.unknown;
4260
4260
  }
4261
- }, m = $.arrayToEnum([
4261
+ }, p = $.arrayToEnum([
4262
4262
  "invalid_type",
4263
4263
  "invalid_literal",
4264
4264
  "custom",
@@ -4275,7 +4275,7 @@ const y = $.arrayToEnum([
4275
4275
  "invalid_intersection_types",
4276
4276
  "not_multiple_of",
4277
4277
  "not_finite"
4278
- ]), Ni = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
4278
+ ]), ki = (t) => JSON.stringify(t, null, 2).replace(/"([^"]+)":/g, "$1:");
4279
4279
  class J extends Error {
4280
4280
  constructor(e) {
4281
4281
  super(), this.issues = [], this.addIssue = (a) => {
@@ -4339,52 +4339,52 @@ J.create = (t) => new J(t);
4339
4339
  const dt = (t, e) => {
4340
4340
  let n;
4341
4341
  switch (t.code) {
4342
- case m.invalid_type:
4342
+ case p.invalid_type:
4343
4343
  t.received === y.undefined ? n = "Required" : n = `Expected ${t.expected}, received ${t.received}`;
4344
4344
  break;
4345
- case m.invalid_literal:
4345
+ case p.invalid_literal:
4346
4346
  n = `Invalid literal value, expected ${JSON.stringify(t.expected, $.jsonStringifyReplacer)}`;
4347
4347
  break;
4348
- case m.unrecognized_keys:
4348
+ case p.unrecognized_keys:
4349
4349
  n = `Unrecognized key(s) in object: ${$.joinValues(t.keys, ", ")}`;
4350
4350
  break;
4351
- case m.invalid_union:
4351
+ case p.invalid_union:
4352
4352
  n = "Invalid input";
4353
4353
  break;
4354
- case m.invalid_union_discriminator:
4354
+ case p.invalid_union_discriminator:
4355
4355
  n = `Invalid discriminator value. Expected ${$.joinValues(t.options)}`;
4356
4356
  break;
4357
- case m.invalid_enum_value:
4357
+ case p.invalid_enum_value:
4358
4358
  n = `Invalid enum value. Expected ${$.joinValues(t.options)}, received '${t.received}'`;
4359
4359
  break;
4360
- case m.invalid_arguments:
4360
+ case p.invalid_arguments:
4361
4361
  n = "Invalid function arguments";
4362
4362
  break;
4363
- case m.invalid_return_type:
4363
+ case p.invalid_return_type:
4364
4364
  n = "Invalid function return type";
4365
4365
  break;
4366
- case m.invalid_date:
4366
+ case p.invalid_date:
4367
4367
  n = "Invalid date";
4368
4368
  break;
4369
- case m.invalid_string:
4369
+ case p.invalid_string:
4370
4370
  typeof t.validation == "object" ? "includes" in t.validation ? (n = `Invalid input: must include "${t.validation.includes}"`, typeof t.validation.position == "number" && (n = `${n} at one or more positions greater than or equal to ${t.validation.position}`)) : "startsWith" in t.validation ? n = `Invalid input: must start with "${t.validation.startsWith}"` : "endsWith" in t.validation ? n = `Invalid input: must end with "${t.validation.endsWith}"` : $.assertNever(t.validation) : t.validation !== "regex" ? n = `Invalid ${t.validation}` : n = "Invalid";
4371
4371
  break;
4372
- case m.too_small:
4372
+ case p.too_small:
4373
4373
  t.type === "array" ? n = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "more than"} ${t.minimum} element(s)` : t.type === "string" ? n = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at least" : "over"} ${t.minimum} character(s)` : t.type === "number" ? n = `Number must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${t.minimum}` : t.type === "date" ? n = `Date must be ${t.exact ? "exactly equal to " : t.inclusive ? "greater than or equal to " : "greater than "}${new Date(Number(t.minimum))}` : n = "Invalid input";
4374
4374
  break;
4375
- case m.too_big:
4375
+ case p.too_big:
4376
4376
  t.type === "array" ? n = `Array must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "less than"} ${t.maximum} element(s)` : t.type === "string" ? n = `String must contain ${t.exact ? "exactly" : t.inclusive ? "at most" : "under"} ${t.maximum} character(s)` : t.type === "number" ? n = `Number must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}` : t.type === "bigint" ? n = `BigInt must be ${t.exact ? "exactly" : t.inclusive ? "less than or equal to" : "less than"} ${t.maximum}` : t.type === "date" ? n = `Date must be ${t.exact ? "exactly" : t.inclusive ? "smaller than or equal to" : "smaller than"} ${new Date(Number(t.maximum))}` : n = "Invalid input";
4377
4377
  break;
4378
- case m.custom:
4378
+ case p.custom:
4379
4379
  n = "Invalid input";
4380
4380
  break;
4381
- case m.invalid_intersection_types:
4381
+ case p.invalid_intersection_types:
4382
4382
  n = "Intersection results could not be merged";
4383
4383
  break;
4384
- case m.not_multiple_of:
4384
+ case p.not_multiple_of:
4385
4385
  n = `Number must be a multiple of ${t.multipleOf}`;
4386
4386
  break;
4387
- case m.not_finite:
4387
+ case p.not_finite:
4388
4388
  n = "Number must be finite";
4389
4389
  break;
4390
4390
  default:
@@ -4392,12 +4392,12 @@ const dt = (t, e) => {
4392
4392
  }
4393
4393
  return { message: n };
4394
4394
  };
4395
- let fa = dt;
4396
- function ki(t) {
4397
- fa = t;
4395
+ let _a = dt;
4396
+ function Ci(t) {
4397
+ _a = t;
4398
4398
  }
4399
4399
  function ln() {
4400
- return fa;
4400
+ return _a;
4401
4401
  }
4402
4402
  const un = (t) => {
4403
4403
  const { data: e, path: n, errorMaps: a, issueData: r } = t, s = [...n, ...r.path || []], o = {
@@ -4419,7 +4419,7 @@ const un = (t) => {
4419
4419
  path: s,
4420
4420
  message: d
4421
4421
  };
4422
- }, Ci = [];
4422
+ }, Ti = [];
4423
4423
  function _(t, e) {
4424
4424
  const n = ln(), a = un({
4425
4425
  issueData: e,
@@ -4483,7 +4483,7 @@ function hn(t, e, n, a) {
4483
4483
  if (typeof e == "function" ? t !== e || !a : !e.has(t)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
4484
4484
  return e.get(t);
4485
4485
  }
4486
- function _a(t, e, n, a, r) {
4486
+ function ga(t, e, n, a, r) {
4487
4487
  if (typeof e == "function" ? t !== e || !r : !e.has(t)) throw new TypeError("Cannot write private member to an object whose class did not declare it");
4488
4488
  return e.set(t, n), n;
4489
4489
  }
@@ -4617,7 +4617,7 @@ class I {
4617
4617
  const a = (r) => typeof n == "string" || typeof n > "u" ? { message: n } : typeof n == "function" ? n(r) : n;
4618
4618
  return this._refinement((r, s) => {
4619
4619
  const o = e(r), d = () => s.addIssue({
4620
- code: m.custom,
4620
+ code: p.custom,
4621
4621
  ...a(r)
4622
4622
  });
4623
4623
  return typeof Promise < "u" && o instanceof Promise ? o.then((c) => c ? !0 : (d(), !1)) : o ? !0 : (d(), !1);
@@ -4710,30 +4710,30 @@ class I {
4710
4710
  return this.safeParse(null).success;
4711
4711
  }
4712
4712
  }
4713
- const Ti = /^c[^\s-]{8,}$/i, Oi = /^[0-9a-z]+$/, Si = /^[0-9A-HJKMNP-TV-Z]{26}$/, ji = /^[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, Ii = /^[a-z0-9_-]{21}$/i, Zi = /^[-+]?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)?)??$/, Ei = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, $i = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
4713
+ const Oi = /^c[^\s-]{8,}$/i, Si = /^[0-9a-z]+$/, ji = /^[0-9A-HJKMNP-TV-Z]{26}$/, Ii = /^[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, Zi = /^[a-z0-9_-]{21}$/i, Ei = /^[-+]?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)?)??$/, $i = /^(?!\.)(?!.*\.\.)([A-Z0-9_'+\-\.]*)[A-Z0-9_+-]@([A-Z0-9][A-Z0-9\-]*\.)+[A-Z]{2,}$/i, Pi = "^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";
4714
4714
  let xn;
4715
- const Pi = /^(?:(?: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])$/, Ai = /^(([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})))$/, Di = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ga = "((\\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])))", Mi = new RegExp(`^${ga}$`);
4716
- function ya(t) {
4715
+ const Ai = /^(?:(?: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])$/, Di = /^(([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})))$/, Mi = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/, ya = "((\\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])))", Ri = new RegExp(`^${ya}$`);
4716
+ function va(t) {
4717
4717
  let e = "([01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d";
4718
4718
  return t.precision ? e = `${e}\\.\\d{${t.precision}}` : t.precision == null && (e = `${e}(\\.\\d+)?`), e;
4719
4719
  }
4720
- function Ri(t) {
4721
- return new RegExp(`^${ya(t)}$`);
4720
+ function Li(t) {
4721
+ return new RegExp(`^${va(t)}$`);
4722
4722
  }
4723
- function va(t) {
4724
- let e = `${ga}T${ya(t)}`;
4723
+ function ba(t) {
4724
+ let e = `${ya}T${va(t)}`;
4725
4725
  const n = [];
4726
4726
  return n.push(t.local ? "Z?" : "Z"), t.offset && n.push("([+-]\\d{2}:?\\d{2})"), e = `${e}(${n.join("|")})`, new RegExp(`^${e}$`);
4727
4727
  }
4728
- function Li(t, e) {
4729
- return !!((e === "v4" || !e) && Pi.test(t) || (e === "v6" || !e) && Ai.test(t));
4728
+ function zi(t, e) {
4729
+ return !!((e === "v4" || !e) && Ai.test(t) || (e === "v6" || !e) && Di.test(t));
4730
4730
  }
4731
4731
  class Q extends I {
4732
4732
  _parse(e) {
4733
4733
  if (this._def.coerce && (e.data = String(e.data)), this._getType(e) !== y.string) {
4734
4734
  const s = this._getOrReturnCtx(e);
4735
4735
  return _(s, {
4736
- code: m.invalid_type,
4736
+ code: p.invalid_type,
4737
4737
  expected: y.string,
4738
4738
  received: s.parsedType
4739
4739
  }), k;
@@ -4743,7 +4743,7 @@ class Q extends I {
4743
4743
  for (const s of this._def.checks)
4744
4744
  if (s.kind === "min")
4745
4745
  e.data.length < s.value && (r = this._getOrReturnCtx(e, r), _(r, {
4746
- code: m.too_small,
4746
+ code: p.too_small,
4747
4747
  minimum: s.value,
4748
4748
  type: "string",
4749
4749
  inclusive: !0,
@@ -4752,7 +4752,7 @@ class Q extends I {
4752
4752
  }), a.dirty());
4753
4753
  else if (s.kind === "max")
4754
4754
  e.data.length > s.value && (r = this._getOrReturnCtx(e, r), _(r, {
4755
- code: m.too_big,
4755
+ code: p.too_big,
4756
4756
  maximum: s.value,
4757
4757
  type: "string",
4758
4758
  inclusive: !0,
@@ -4762,14 +4762,14 @@ class Q extends I {
4762
4762
  else if (s.kind === "length") {
4763
4763
  const o = e.data.length > s.value, d = e.data.length < s.value;
4764
4764
  (o || d) && (r = this._getOrReturnCtx(e, r), o ? _(r, {
4765
- code: m.too_big,
4765
+ code: p.too_big,
4766
4766
  maximum: s.value,
4767
4767
  type: "string",
4768
4768
  inclusive: !0,
4769
4769
  exact: !0,
4770
4770
  message: s.message
4771
4771
  }) : d && _(r, {
4772
- code: m.too_small,
4772
+ code: p.too_small,
4773
4773
  minimum: s.value,
4774
4774
  type: "string",
4775
4775
  inclusive: !0,
@@ -4777,45 +4777,45 @@ class Q extends I {
4777
4777
  message: s.message
4778
4778
  }), a.dirty());
4779
4779
  } else if (s.kind === "email")
4780
- Ei.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4780
+ $i.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4781
4781
  validation: "email",
4782
- code: m.invalid_string,
4782
+ code: p.invalid_string,
4783
4783
  message: s.message
4784
4784
  }), a.dirty());
4785
4785
  else if (s.kind === "emoji")
4786
- xn || (xn = new RegExp($i, "u")), xn.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4786
+ xn || (xn = new RegExp(Pi, "u")), xn.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4787
4787
  validation: "emoji",
4788
- code: m.invalid_string,
4788
+ code: p.invalid_string,
4789
4789
  message: s.message
4790
4790
  }), a.dirty());
4791
4791
  else if (s.kind === "uuid")
4792
- ji.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4792
+ Ii.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4793
4793
  validation: "uuid",
4794
- code: m.invalid_string,
4794
+ code: p.invalid_string,
4795
4795
  message: s.message
4796
4796
  }), a.dirty());
4797
4797
  else if (s.kind === "nanoid")
4798
- Ii.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4798
+ Zi.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4799
4799
  validation: "nanoid",
4800
- code: m.invalid_string,
4800
+ code: p.invalid_string,
4801
4801
  message: s.message
4802
4802
  }), a.dirty());
4803
4803
  else if (s.kind === "cuid")
4804
- Ti.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4804
+ Oi.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4805
4805
  validation: "cuid",
4806
- code: m.invalid_string,
4806
+ code: p.invalid_string,
4807
4807
  message: s.message
4808
4808
  }), a.dirty());
4809
4809
  else if (s.kind === "cuid2")
4810
- Oi.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4810
+ Si.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4811
4811
  validation: "cuid2",
4812
- code: m.invalid_string,
4812
+ code: p.invalid_string,
4813
4813
  message: s.message
4814
4814
  }), a.dirty());
4815
4815
  else if (s.kind === "ulid")
4816
- Si.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4816
+ ji.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4817
4817
  validation: "ulid",
4818
- code: m.invalid_string,
4818
+ code: p.invalid_string,
4819
4819
  message: s.message
4820
4820
  }), a.dirty());
4821
4821
  else if (s.kind === "url")
@@ -4824,49 +4824,49 @@ class Q extends I {
4824
4824
  } catch {
4825
4825
  r = this._getOrReturnCtx(e, r), _(r, {
4826
4826
  validation: "url",
4827
- code: m.invalid_string,
4827
+ code: p.invalid_string,
4828
4828
  message: s.message
4829
4829
  }), a.dirty();
4830
4830
  }
4831
4831
  else s.kind === "regex" ? (s.regex.lastIndex = 0, s.regex.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4832
4832
  validation: "regex",
4833
- code: m.invalid_string,
4833
+ code: p.invalid_string,
4834
4834
  message: s.message
4835
4835
  }), a.dirty())) : s.kind === "trim" ? e.data = e.data.trim() : s.kind === "includes" ? e.data.includes(s.value, s.position) || (r = this._getOrReturnCtx(e, r), _(r, {
4836
- code: m.invalid_string,
4836
+ code: p.invalid_string,
4837
4837
  validation: { includes: s.value, position: s.position },
4838
4838
  message: s.message
4839
4839
  }), a.dirty()) : s.kind === "toLowerCase" ? e.data = e.data.toLowerCase() : s.kind === "toUpperCase" ? e.data = e.data.toUpperCase() : s.kind === "startsWith" ? e.data.startsWith(s.value) || (r = this._getOrReturnCtx(e, r), _(r, {
4840
- code: m.invalid_string,
4840
+ code: p.invalid_string,
4841
4841
  validation: { startsWith: s.value },
4842
4842
  message: s.message
4843
4843
  }), a.dirty()) : s.kind === "endsWith" ? e.data.endsWith(s.value) || (r = this._getOrReturnCtx(e, r), _(r, {
4844
- code: m.invalid_string,
4844
+ code: p.invalid_string,
4845
4845
  validation: { endsWith: s.value },
4846
4846
  message: s.message
4847
- }), a.dirty()) : s.kind === "datetime" ? va(s).test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4848
- code: m.invalid_string,
4847
+ }), a.dirty()) : s.kind === "datetime" ? ba(s).test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4848
+ code: p.invalid_string,
4849
4849
  validation: "datetime",
4850
4850
  message: s.message
4851
- }), a.dirty()) : s.kind === "date" ? Mi.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4852
- code: m.invalid_string,
4851
+ }), a.dirty()) : s.kind === "date" ? Ri.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4852
+ code: p.invalid_string,
4853
4853
  validation: "date",
4854
4854
  message: s.message
4855
- }), a.dirty()) : s.kind === "time" ? Ri(s).test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4856
- code: m.invalid_string,
4855
+ }), a.dirty()) : s.kind === "time" ? Li(s).test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4856
+ code: p.invalid_string,
4857
4857
  validation: "time",
4858
4858
  message: s.message
4859
- }), a.dirty()) : s.kind === "duration" ? Zi.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4859
+ }), a.dirty()) : s.kind === "duration" ? Ei.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4860
4860
  validation: "duration",
4861
- code: m.invalid_string,
4861
+ code: p.invalid_string,
4862
4862
  message: s.message
4863
- }), a.dirty()) : s.kind === "ip" ? Li(e.data, s.version) || (r = this._getOrReturnCtx(e, r), _(r, {
4863
+ }), a.dirty()) : s.kind === "ip" ? zi(e.data, s.version) || (r = this._getOrReturnCtx(e, r), _(r, {
4864
4864
  validation: "ip",
4865
- code: m.invalid_string,
4865
+ code: p.invalid_string,
4866
4866
  message: s.message
4867
- }), a.dirty()) : s.kind === "base64" ? Di.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4867
+ }), a.dirty()) : s.kind === "base64" ? Mi.test(e.data) || (r = this._getOrReturnCtx(e, r), _(r, {
4868
4868
  validation: "base64",
4869
- code: m.invalid_string,
4869
+ code: p.invalid_string,
4870
4870
  message: s.message
4871
4871
  }), a.dirty()) : $.assertNever(s);
4872
4872
  return { status: a.value, value: e.data };
@@ -4874,7 +4874,7 @@ class Q extends I {
4874
4874
  _regex(e, n, a) {
4875
4875
  return this.refinement((r) => e.test(r), {
4876
4876
  validation: n,
4877
- code: m.invalid_string,
4877
+ code: p.invalid_string,
4878
4878
  ...w.errToObj(a)
4879
4879
  });
4880
4880
  }
@@ -5086,7 +5086,7 @@ Q.create = (t) => {
5086
5086
  ...S(t)
5087
5087
  });
5088
5088
  };
5089
- function zi(t, e) {
5089
+ function Ui(t, e) {
5090
5090
  const n = (t.toString().split(".")[1] || "").length, a = (e.toString().split(".")[1] || "").length, r = n > a ? n : a, s = parseInt(t.toFixed(r).replace(".", "")), o = parseInt(e.toFixed(r).replace(".", ""));
5091
5091
  return s % o / Math.pow(10, r);
5092
5092
  }
@@ -5098,7 +5098,7 @@ class Se extends I {
5098
5098
  if (this._def.coerce && (e.data = Number(e.data)), this._getType(e) !== y.number) {
5099
5099
  const s = this._getOrReturnCtx(e);
5100
5100
  return _(s, {
5101
- code: m.invalid_type,
5101
+ code: p.invalid_type,
5102
5102
  expected: y.number,
5103
5103
  received: s.parsedType
5104
5104
  }), k;
@@ -5107,30 +5107,30 @@ class Se extends I {
5107
5107
  const r = new F();
5108
5108
  for (const s of this._def.checks)
5109
5109
  s.kind === "int" ? $.isInteger(e.data) || (a = this._getOrReturnCtx(e, a), _(a, {
5110
- code: m.invalid_type,
5110
+ code: p.invalid_type,
5111
5111
  expected: "integer",
5112
5112
  received: "float",
5113
5113
  message: s.message
5114
5114
  }), r.dirty()) : s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (a = this._getOrReturnCtx(e, a), _(a, {
5115
- code: m.too_small,
5115
+ code: p.too_small,
5116
5116
  minimum: s.value,
5117
5117
  type: "number",
5118
5118
  inclusive: s.inclusive,
5119
5119
  exact: !1,
5120
5120
  message: s.message
5121
5121
  }), r.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (a = this._getOrReturnCtx(e, a), _(a, {
5122
- code: m.too_big,
5122
+ code: p.too_big,
5123
5123
  maximum: s.value,
5124
5124
  type: "number",
5125
5125
  inclusive: s.inclusive,
5126
5126
  exact: !1,
5127
5127
  message: s.message
5128
- }), r.dirty()) : s.kind === "multipleOf" ? zi(e.data, s.value) !== 0 && (a = this._getOrReturnCtx(e, a), _(a, {
5129
- code: m.not_multiple_of,
5128
+ }), r.dirty()) : s.kind === "multipleOf" ? Ui(e.data, s.value) !== 0 && (a = this._getOrReturnCtx(e, a), _(a, {
5129
+ code: p.not_multiple_of,
5130
5130
  multipleOf: s.value,
5131
5131
  message: s.message
5132
5132
  }), r.dirty()) : s.kind === "finite" ? Number.isFinite(e.data) || (a = this._getOrReturnCtx(e, a), _(a, {
5133
- code: m.not_finite,
5133
+ code: p.not_finite,
5134
5134
  message: s.message
5135
5135
  }), r.dirty()) : $.assertNever(s);
5136
5136
  return { status: r.value, value: e.data };
@@ -5270,7 +5270,7 @@ class je extends I {
5270
5270
  if (this._def.coerce && (e.data = BigInt(e.data)), this._getType(e) !== y.bigint) {
5271
5271
  const s = this._getOrReturnCtx(e);
5272
5272
  return _(s, {
5273
- code: m.invalid_type,
5273
+ code: p.invalid_type,
5274
5274
  expected: y.bigint,
5275
5275
  received: s.parsedType
5276
5276
  }), k;
@@ -5279,19 +5279,19 @@ class je extends I {
5279
5279
  const r = new F();
5280
5280
  for (const s of this._def.checks)
5281
5281
  s.kind === "min" ? (s.inclusive ? e.data < s.value : e.data <= s.value) && (a = this._getOrReturnCtx(e, a), _(a, {
5282
- code: m.too_small,
5282
+ code: p.too_small,
5283
5283
  type: "bigint",
5284
5284
  minimum: s.value,
5285
5285
  inclusive: s.inclusive,
5286
5286
  message: s.message
5287
5287
  }), r.dirty()) : s.kind === "max" ? (s.inclusive ? e.data > s.value : e.data >= s.value) && (a = this._getOrReturnCtx(e, a), _(a, {
5288
- code: m.too_big,
5288
+ code: p.too_big,
5289
5289
  type: "bigint",
5290
5290
  maximum: s.value,
5291
5291
  inclusive: s.inclusive,
5292
5292
  message: s.message
5293
5293
  }), r.dirty()) : s.kind === "multipleOf" ? e.data % s.value !== BigInt(0) && (a = this._getOrReturnCtx(e, a), _(a, {
5294
- code: m.not_multiple_of,
5294
+ code: p.not_multiple_of,
5295
5295
  multipleOf: s.value,
5296
5296
  message: s.message
5297
5297
  }), r.dirty()) : $.assertNever(s);
@@ -5395,7 +5395,7 @@ class Mt extends I {
5395
5395
  if (this._def.coerce && (e.data = !!e.data), this._getType(e) !== y.boolean) {
5396
5396
  const a = this._getOrReturnCtx(e);
5397
5397
  return _(a, {
5398
- code: m.invalid_type,
5398
+ code: p.invalid_type,
5399
5399
  expected: y.boolean,
5400
5400
  received: a.parsedType
5401
5401
  }), k;
@@ -5413,7 +5413,7 @@ class Fe extends I {
5413
5413
  if (this._def.coerce && (e.data = new Date(e.data)), this._getType(e) !== y.date) {
5414
5414
  const s = this._getOrReturnCtx(e);
5415
5415
  return _(s, {
5416
- code: m.invalid_type,
5416
+ code: p.invalid_type,
5417
5417
  expected: y.date,
5418
5418
  received: s.parsedType
5419
5419
  }), k;
@@ -5421,21 +5421,21 @@ class Fe extends I {
5421
5421
  if (isNaN(e.data.getTime())) {
5422
5422
  const s = this._getOrReturnCtx(e);
5423
5423
  return _(s, {
5424
- code: m.invalid_date
5424
+ code: p.invalid_date
5425
5425
  }), k;
5426
5426
  }
5427
5427
  const a = new F();
5428
5428
  let r;
5429
5429
  for (const s of this._def.checks)
5430
5430
  s.kind === "min" ? e.data.getTime() < s.value && (r = this._getOrReturnCtx(e, r), _(r, {
5431
- code: m.too_small,
5431
+ code: p.too_small,
5432
5432
  message: s.message,
5433
5433
  inclusive: !0,
5434
5434
  exact: !1,
5435
5435
  minimum: s.value,
5436
5436
  type: "date"
5437
5437
  }), a.dirty()) : s.kind === "max" ? e.data.getTime() > s.value && (r = this._getOrReturnCtx(e, r), _(r, {
5438
- code: m.too_big,
5438
+ code: p.too_big,
5439
5439
  message: s.message,
5440
5440
  inclusive: !0,
5441
5441
  exact: !1,
@@ -5486,12 +5486,12 @@ Fe.create = (t) => new Fe({
5486
5486
  typeName: N.ZodDate,
5487
5487
  ...S(t)
5488
5488
  });
5489
- class mn extends I {
5489
+ class pn extends I {
5490
5490
  _parse(e) {
5491
5491
  if (this._getType(e) !== y.symbol) {
5492
5492
  const a = this._getOrReturnCtx(e);
5493
5493
  return _(a, {
5494
- code: m.invalid_type,
5494
+ code: p.invalid_type,
5495
5495
  expected: y.symbol,
5496
5496
  received: a.parsedType
5497
5497
  }), k;
@@ -5499,7 +5499,7 @@ class mn extends I {
5499
5499
  return B(e.data);
5500
5500
  }
5501
5501
  }
5502
- mn.create = (t) => new mn({
5502
+ pn.create = (t) => new pn({
5503
5503
  typeName: N.ZodSymbol,
5504
5504
  ...S(t)
5505
5505
  });
@@ -5508,7 +5508,7 @@ class Rt extends I {
5508
5508
  if (this._getType(e) !== y.undefined) {
5509
5509
  const a = this._getOrReturnCtx(e);
5510
5510
  return _(a, {
5511
- code: m.invalid_type,
5511
+ code: p.invalid_type,
5512
5512
  expected: y.undefined,
5513
5513
  received: a.parsedType
5514
5514
  }), k;
@@ -5525,7 +5525,7 @@ class Lt extends I {
5525
5525
  if (this._getType(e) !== y.null) {
5526
5526
  const a = this._getOrReturnCtx(e);
5527
5527
  return _(a, {
5528
- code: m.invalid_type,
5528
+ code: p.invalid_type,
5529
5529
  expected: y.null,
5530
5530
  received: a.parsedType
5531
5531
  }), k;
@@ -5565,7 +5565,7 @@ class fe extends I {
5565
5565
  _parse(e) {
5566
5566
  const n = this._getOrReturnCtx(e);
5567
5567
  return _(n, {
5568
- code: m.invalid_type,
5568
+ code: p.invalid_type,
5569
5569
  expected: y.never,
5570
5570
  received: n.parsedType
5571
5571
  }), k;
@@ -5575,12 +5575,12 @@ fe.create = (t) => new fe({
5575
5575
  typeName: N.ZodNever,
5576
5576
  ...S(t)
5577
5577
  });
5578
- class pn extends I {
5578
+ class mn extends I {
5579
5579
  _parse(e) {
5580
5580
  if (this._getType(e) !== y.undefined) {
5581
5581
  const a = this._getOrReturnCtx(e);
5582
5582
  return _(a, {
5583
- code: m.invalid_type,
5583
+ code: p.invalid_type,
5584
5584
  expected: y.void,
5585
5585
  received: a.parsedType
5586
5586
  }), k;
@@ -5588,7 +5588,7 @@ class pn extends I {
5588
5588
  return B(e.data);
5589
5589
  }
5590
5590
  }
5591
- pn.create = (t) => new pn({
5591
+ mn.create = (t) => new mn({
5592
5592
  typeName: N.ZodVoid,
5593
5593
  ...S(t)
5594
5594
  });
@@ -5597,14 +5597,14 @@ class H extends I {
5597
5597
  const { ctx: n, status: a } = this._processInputParams(e), r = this._def;
5598
5598
  if (n.parsedType !== y.array)
5599
5599
  return _(n, {
5600
- code: m.invalid_type,
5600
+ code: p.invalid_type,
5601
5601
  expected: y.array,
5602
5602
  received: n.parsedType
5603
5603
  }), k;
5604
5604
  if (r.exactLength !== null) {
5605
5605
  const o = n.data.length > r.exactLength.value, d = n.data.length < r.exactLength.value;
5606
5606
  (o || d) && (_(n, {
5607
- code: o ? m.too_big : m.too_small,
5607
+ code: o ? p.too_big : p.too_small,
5608
5608
  minimum: d ? r.exactLength.value : void 0,
5609
5609
  maximum: o ? r.exactLength.value : void 0,
5610
5610
  type: "array",
@@ -5614,14 +5614,14 @@ class H extends I {
5614
5614
  }), a.dirty());
5615
5615
  }
5616
5616
  if (r.minLength !== null && n.data.length < r.minLength.value && (_(n, {
5617
- code: m.too_small,
5617
+ code: p.too_small,
5618
5618
  minimum: r.minLength.value,
5619
5619
  type: "array",
5620
5620
  inclusive: !0,
5621
5621
  exact: !1,
5622
5622
  message: r.minLength.message
5623
5623
  }), a.dirty()), r.maxLength !== null && n.data.length > r.maxLength.value && (_(n, {
5624
- code: m.too_big,
5624
+ code: p.too_big,
5625
5625
  maximum: r.maxLength.value,
5626
5626
  type: "array",
5627
5627
  inclusive: !0,
@@ -5695,7 +5695,7 @@ class D extends I {
5695
5695
  if (this._getType(e) !== y.object) {
5696
5696
  const l = this._getOrReturnCtx(e);
5697
5697
  return _(l, {
5698
- code: m.invalid_type,
5698
+ code: p.invalid_type,
5699
5699
  expected: y.object,
5700
5700
  received: l.parsedType
5701
5701
  }), k;
@@ -5723,7 +5723,7 @@ class D extends I {
5723
5723
  });
5724
5724
  else if (l === "strict")
5725
5725
  d.length > 0 && (_(r, {
5726
- code: m.unrecognized_keys,
5726
+ code: p.unrecognized_keys,
5727
5727
  keys: d
5728
5728
  }), a.dirty());
5729
5729
  else if (l !== "strip") throw new Error("Internal ZodObject error: invalid unknownKeys value.");
@@ -5944,7 +5944,7 @@ class D extends I {
5944
5944
  });
5945
5945
  }
5946
5946
  keyof() {
5947
- return ba($.objectKeys(this.shape));
5947
+ return wa($.objectKeys(this.shape));
5948
5948
  }
5949
5949
  }
5950
5950
  D.create = (t, e) => new D({
@@ -5980,7 +5980,7 @@ class zt extends I {
5980
5980
  return n.common.issues.push(...d.ctx.common.issues), d.result;
5981
5981
  const o = s.map((d) => new J(d.ctx.common.issues));
5982
5982
  return _(n, {
5983
- code: m.invalid_union,
5983
+ code: p.invalid_union,
5984
5984
  unionErrors: o
5985
5985
  }), k;
5986
5986
  }
@@ -6027,7 +6027,7 @@ class zt extends I {
6027
6027
  return n.common.issues.push(...s.ctx.common.issues), s.result;
6028
6028
  const d = o.map((c) => new J(c));
6029
6029
  return _(n, {
6030
- code: m.invalid_union,
6030
+ code: p.invalid_union,
6031
6031
  unionErrors: d
6032
6032
  }), k;
6033
6033
  }
@@ -6047,7 +6047,7 @@ class vn extends I {
6047
6047
  const { ctx: n } = this._processInputParams(e);
6048
6048
  if (n.parsedType !== y.object)
6049
6049
  return _(n, {
6050
- code: m.invalid_type,
6050
+ code: p.invalid_type,
6051
6051
  expected: y.object,
6052
6052
  received: n.parsedType
6053
6053
  }), k;
@@ -6061,7 +6061,7 @@ class vn extends I {
6061
6061
  path: n.path,
6062
6062
  parent: n
6063
6063
  }) : (_(n, {
6064
- code: m.invalid_union_discriminator,
6064
+ code: p.invalid_union_discriminator,
6065
6065
  options: Array.from(this.optionsMap.keys()),
6066
6066
  path: [a]
6067
6067
  }), k);
@@ -6137,7 +6137,7 @@ class Ut extends I {
6137
6137
  return k;
6138
6138
  const d = Pn(s.value, o.value);
6139
6139
  return d.valid ? (($n(s) || $n(o)) && n.dirty(), { status: n.value, value: d.data }) : (_(a, {
6140
- code: m.invalid_intersection_types
6140
+ code: p.invalid_intersection_types
6141
6141
  }), k);
6142
6142
  };
6143
6143
  return a.common.async ? Promise.all([
@@ -6173,20 +6173,20 @@ class ce extends I {
6173
6173
  const { status: n, ctx: a } = this._processInputParams(e);
6174
6174
  if (a.parsedType !== y.array)
6175
6175
  return _(a, {
6176
- code: m.invalid_type,
6176
+ code: p.invalid_type,
6177
6177
  expected: y.array,
6178
6178
  received: a.parsedType
6179
6179
  }), k;
6180
6180
  if (a.data.length < this._def.items.length)
6181
6181
  return _(a, {
6182
- code: m.too_small,
6182
+ code: p.too_small,
6183
6183
  minimum: this._def.items.length,
6184
6184
  inclusive: !0,
6185
6185
  exact: !1,
6186
6186
  type: "array"
6187
6187
  }), k;
6188
6188
  !this._def.rest && a.data.length > this._def.items.length && (_(a, {
6189
- code: m.too_big,
6189
+ code: p.too_big,
6190
6190
  maximum: this._def.items.length,
6191
6191
  inclusive: !0,
6192
6192
  exact: !1,
@@ -6229,7 +6229,7 @@ class Ft extends I {
6229
6229
  const { status: n, ctx: a } = this._processInputParams(e);
6230
6230
  if (a.parsedType !== y.object)
6231
6231
  return _(a, {
6232
- code: m.invalid_type,
6232
+ code: p.invalid_type,
6233
6233
  expected: y.object,
6234
6234
  received: a.parsedType
6235
6235
  }), k;
@@ -6270,7 +6270,7 @@ class fn extends I {
6270
6270
  const { status: n, ctx: a } = this._processInputParams(e);
6271
6271
  if (a.parsedType !== y.map)
6272
6272
  return _(a, {
6273
- code: m.invalid_type,
6273
+ code: p.invalid_type,
6274
6274
  expected: y.map,
6275
6275
  received: a.parsedType
6276
6276
  }), k;
@@ -6312,20 +6312,20 @@ class Ve extends I {
6312
6312
  const { status: n, ctx: a } = this._processInputParams(e);
6313
6313
  if (a.parsedType !== y.set)
6314
6314
  return _(a, {
6315
- code: m.invalid_type,
6315
+ code: p.invalid_type,
6316
6316
  expected: y.set,
6317
6317
  received: a.parsedType
6318
6318
  }), k;
6319
6319
  const r = this._def;
6320
6320
  r.minSize !== null && a.data.size < r.minSize.value && (_(a, {
6321
- code: m.too_small,
6321
+ code: p.too_small,
6322
6322
  minimum: r.minSize.value,
6323
6323
  type: "set",
6324
6324
  inclusive: !0,
6325
6325
  exact: !1,
6326
6326
  message: r.minSize.message
6327
6327
  }), n.dirty()), r.maxSize !== null && a.data.size > r.maxSize.value && (_(a, {
6328
- code: m.too_big,
6328
+ code: p.too_big,
6329
6329
  maximum: r.maxSize.value,
6330
6330
  type: "set",
6331
6331
  inclusive: !0,
@@ -6379,7 +6379,7 @@ class at extends I {
6379
6379
  const { ctx: n } = this._processInputParams(e);
6380
6380
  if (n.parsedType !== y.function)
6381
6381
  return _(n, {
6382
- code: m.invalid_type,
6382
+ code: p.invalid_type,
6383
6383
  expected: y.function,
6384
6384
  received: n.parsedType
6385
6385
  }), k;
@@ -6394,7 +6394,7 @@ class at extends I {
6394
6394
  dt
6395
6395
  ].filter((l) => !!l),
6396
6396
  issueData: {
6397
- code: m.invalid_arguments,
6397
+ code: p.invalid_arguments,
6398
6398
  argumentsError: c
6399
6399
  }
6400
6400
  });
@@ -6410,7 +6410,7 @@ class at extends I {
6410
6410
  dt
6411
6411
  ].filter((l) => !!l),
6412
6412
  issueData: {
6413
- code: m.invalid_return_type,
6413
+ code: p.invalid_return_type,
6414
6414
  returnTypeError: c
6415
6415
  }
6416
6416
  });
@@ -6492,7 +6492,7 @@ class Bt extends I {
6492
6492
  const n = this._getOrReturnCtx(e);
6493
6493
  return _(n, {
6494
6494
  received: n.data,
6495
- code: m.invalid_literal,
6495
+ code: p.invalid_literal,
6496
6496
  expected: this._def.value
6497
6497
  }), k;
6498
6498
  }
@@ -6507,7 +6507,7 @@ Bt.create = (t, e) => new Bt({
6507
6507
  typeName: N.ZodLiteral,
6508
6508
  ...S(e)
6509
6509
  });
6510
- function ba(t, e) {
6510
+ function wa(t, e) {
6511
6511
  return new Ie({
6512
6512
  values: t,
6513
6513
  typeName: N.ZodEnum,
@@ -6524,14 +6524,14 @@ class Ie extends I {
6524
6524
  return _(n, {
6525
6525
  expected: $.joinValues(a),
6526
6526
  received: n.parsedType,
6527
- code: m.invalid_type
6527
+ code: p.invalid_type
6528
6528
  }), k;
6529
6529
  }
6530
- if (hn(this, gt) || _a(this, gt, new Set(this._def.values)), !hn(this, gt).has(e.data)) {
6530
+ if (hn(this, gt) || ga(this, gt, new Set(this._def.values)), !hn(this, gt).has(e.data)) {
6531
6531
  const n = this._getOrReturnCtx(e), a = this._def.values;
6532
6532
  return _(n, {
6533
6533
  received: n.data,
6534
- code: m.invalid_enum_value,
6534
+ code: p.invalid_enum_value,
6535
6535
  options: a
6536
6536
  }), k;
6537
6537
  }
@@ -6572,7 +6572,7 @@ class Ie extends I {
6572
6572
  }
6573
6573
  }
6574
6574
  gt = /* @__PURE__ */ new WeakMap();
6575
- Ie.create = ba;
6575
+ Ie.create = wa;
6576
6576
  class Kt extends I {
6577
6577
  constructor() {
6578
6578
  super(...arguments), yt.set(this, void 0);
@@ -6584,14 +6584,14 @@ class Kt extends I {
6584
6584
  return _(a, {
6585
6585
  expected: $.joinValues(r),
6586
6586
  received: a.parsedType,
6587
- code: m.invalid_type
6587
+ code: p.invalid_type
6588
6588
  }), k;
6589
6589
  }
6590
- if (hn(this, yt) || _a(this, yt, new Set($.getValidEnumValues(this._def.values))), !hn(this, yt).has(e.data)) {
6590
+ if (hn(this, yt) || ga(this, yt, new Set($.getValidEnumValues(this._def.values))), !hn(this, yt).has(e.data)) {
6591
6591
  const r = $.objectValues(n);
6592
6592
  return _(a, {
6593
6593
  received: a.data,
6594
- code: m.invalid_enum_value,
6594
+ code: p.invalid_enum_value,
6595
6595
  options: r
6596
6596
  }), k;
6597
6597
  }
@@ -6615,7 +6615,7 @@ class lt extends I {
6615
6615
  const { ctx: n } = this._processInputParams(e);
6616
6616
  if (n.parsedType !== y.promise && n.common.async === !1)
6617
6617
  return _(n, {
6618
- code: m.invalid_type,
6618
+ code: p.invalid_type,
6619
6619
  expected: y.promise,
6620
6620
  received: n.parsedType
6621
6621
  }), k;
@@ -6814,7 +6814,7 @@ class _n extends I {
6814
6814
  if (this._getType(e) !== y.nan) {
6815
6815
  const a = this._getOrReturnCtx(e);
6816
6816
  return _(a, {
6817
- code: m.invalid_type,
6817
+ code: p.invalid_type,
6818
6818
  expected: y.nan,
6819
6819
  received: a.parsedType
6820
6820
  }), k;
@@ -6826,7 +6826,7 @@ _n.create = (t) => new _n({
6826
6826
  typeName: N.ZodNaN,
6827
6827
  ...S(t)
6828
6828
  });
6829
- const Ui = Symbol("zod_brand");
6829
+ const Fi = Symbol("zod_brand");
6830
6830
  class Vn extends I {
6831
6831
  _parse(e) {
6832
6832
  const { ctx: n } = this._processInputParams(e), a = n.data;
@@ -6894,7 +6894,7 @@ qt.create = (t, e) => new qt({
6894
6894
  typeName: N.ZodReadonly,
6895
6895
  ...S(e)
6896
6896
  });
6897
- function wa(t, e = {}, n) {
6897
+ function xa(t, e = {}, n) {
6898
6898
  return t ? ct.create().superRefine((a, r) => {
6899
6899
  var s, o;
6900
6900
  if (!t(a)) {
@@ -6903,16 +6903,16 @@ function wa(t, e = {}, n) {
6903
6903
  }
6904
6904
  }) : ct.create();
6905
6905
  }
6906
- const Fi = {
6906
+ const Vi = {
6907
6907
  object: D.lazycreate
6908
6908
  };
6909
6909
  var N;
6910
6910
  (function(t) {
6911
6911
  t.ZodString = "ZodString", t.ZodNumber = "ZodNumber", t.ZodNaN = "ZodNaN", t.ZodBigInt = "ZodBigInt", t.ZodBoolean = "ZodBoolean", t.ZodDate = "ZodDate", t.ZodSymbol = "ZodSymbol", t.ZodUndefined = "ZodUndefined", t.ZodNull = "ZodNull", t.ZodAny = "ZodAny", t.ZodUnknown = "ZodUnknown", t.ZodNever = "ZodNever", t.ZodVoid = "ZodVoid", t.ZodArray = "ZodArray", t.ZodObject = "ZodObject", t.ZodUnion = "ZodUnion", t.ZodDiscriminatedUnion = "ZodDiscriminatedUnion", t.ZodIntersection = "ZodIntersection", t.ZodTuple = "ZodTuple", t.ZodRecord = "ZodRecord", t.ZodMap = "ZodMap", t.ZodSet = "ZodSet", t.ZodFunction = "ZodFunction", t.ZodLazy = "ZodLazy", t.ZodLiteral = "ZodLiteral", t.ZodEnum = "ZodEnum", t.ZodEffects = "ZodEffects", t.ZodNativeEnum = "ZodNativeEnum", t.ZodOptional = "ZodOptional", t.ZodNullable = "ZodNullable", t.ZodDefault = "ZodDefault", t.ZodCatch = "ZodCatch", t.ZodPromise = "ZodPromise", t.ZodBranded = "ZodBranded", t.ZodPipeline = "ZodPipeline", t.ZodReadonly = "ZodReadonly";
6912
6912
  })(N || (N = {}));
6913
- const Vi = (t, e = {
6913
+ const Bi = (t, e = {
6914
6914
  message: `Input not instance of ${t.name}`
6915
- }) => wa((n) => n instanceof t, e), xa = Q.create, Na = Se.create, Bi = _n.create, Ki = je.create, ka = Mt.create, Ji = Fe.create, Wi = mn.create, qi = Rt.create, Qi = Lt.create, Gi = ct.create, Hi = Le.create, Yi = fe.create, Xi = pn.create, eo = H.create, to = D.create, no = D.strictCreate, ao = zt.create, ro = vn.create, so = Ut.create, io = ce.create, oo = Ft.create, co = fn.create, lo = Ve.create, uo = at.create, ho = Vt.create, mo = Bt.create, po = Ie.create, fo = Kt.create, _o = lt.create, Gn = X.create, go = se.create, yo = Ze.create, vo = X.createWithPreprocess, bo = Yt.create, wo = () => xa().optional(), xo = () => Na().optional(), No = () => ka().optional(), ko = {
6915
+ }) => xa((n) => n instanceof t, e), Na = Q.create, ka = Se.create, Ki = _n.create, Ji = je.create, Ca = Mt.create, Wi = Fe.create, qi = pn.create, Qi = Rt.create, Gi = Lt.create, Hi = ct.create, Yi = Le.create, Xi = fe.create, eo = mn.create, to = H.create, no = D.create, ao = D.strictCreate, ro = zt.create, so = vn.create, io = Ut.create, oo = ce.create, co = Ft.create, lo = fn.create, uo = Ve.create, ho = at.create, po = Vt.create, mo = Bt.create, fo = Ie.create, _o = Kt.create, go = lt.create, Gn = X.create, yo = se.create, vo = Ze.create, bo = X.createWithPreprocess, wo = Yt.create, xo = () => Na().optional(), No = () => ka().optional(), ko = () => Ca().optional(), Co = {
6916
6916
  string: (t) => Q.create({ ...t, coerce: !0 }),
6917
6917
  number: (t) => Se.create({ ...t, coerce: !0 }),
6918
6918
  boolean: (t) => Mt.create({
@@ -6921,14 +6921,14 @@ const Vi = (t, e = {
6921
6921
  }),
6922
6922
  bigint: (t) => je.create({ ...t, coerce: !0 }),
6923
6923
  date: (t) => Fe.create({ ...t, coerce: !0 })
6924
- }, Co = k;
6925
- var To = /* @__PURE__ */ Object.freeze({
6924
+ }, To = k;
6925
+ var Oo = /* @__PURE__ */ Object.freeze({
6926
6926
  __proto__: null,
6927
6927
  defaultErrorMap: dt,
6928
- setErrorMap: ki,
6928
+ setErrorMap: Ci,
6929
6929
  getErrorMap: ln,
6930
6930
  makeIssue: un,
6931
- EMPTY_PATH: Ci,
6931
+ EMPTY_PATH: Ti,
6932
6932
  addIssueToContext: _,
6933
6933
  ParseStatus: F,
6934
6934
  INVALID: k,
@@ -6947,19 +6947,19 @@ var To = /* @__PURE__ */ Object.freeze({
6947
6947
  ZodParsedType: y,
6948
6948
  getParsedType: Ne,
6949
6949
  ZodType: I,
6950
- datetimeRegex: va,
6950
+ datetimeRegex: ba,
6951
6951
  ZodString: Q,
6952
6952
  ZodNumber: Se,
6953
6953
  ZodBigInt: je,
6954
6954
  ZodBoolean: Mt,
6955
6955
  ZodDate: Fe,
6956
- ZodSymbol: mn,
6956
+ ZodSymbol: pn,
6957
6957
  ZodUndefined: Rt,
6958
6958
  ZodNull: Lt,
6959
6959
  ZodAny: ct,
6960
6960
  ZodUnknown: Le,
6961
6961
  ZodNever: fe,
6962
- ZodVoid: pn,
6962
+ ZodVoid: mn,
6963
6963
  ZodArray: H,
6964
6964
  ZodObject: D,
6965
6965
  ZodUnion: zt,
@@ -6982,63 +6982,63 @@ var To = /* @__PURE__ */ Object.freeze({
6982
6982
  ZodDefault: Jt,
6983
6983
  ZodCatch: Wt,
6984
6984
  ZodNaN: _n,
6985
- BRAND: Ui,
6985
+ BRAND: Fi,
6986
6986
  ZodBranded: Vn,
6987
6987
  ZodPipeline: Yt,
6988
6988
  ZodReadonly: qt,
6989
- custom: wa,
6989
+ custom: xa,
6990
6990
  Schema: I,
6991
6991
  ZodSchema: I,
6992
- late: Fi,
6992
+ late: Vi,
6993
6993
  get ZodFirstPartyTypeKind() {
6994
6994
  return N;
6995
6995
  },
6996
- coerce: ko,
6997
- any: Gi,
6998
- array: eo,
6999
- bigint: Ki,
7000
- boolean: ka,
7001
- date: Ji,
7002
- discriminatedUnion: ro,
6996
+ coerce: Co,
6997
+ any: Hi,
6998
+ array: to,
6999
+ bigint: Ji,
7000
+ boolean: Ca,
7001
+ date: Wi,
7002
+ discriminatedUnion: so,
7003
7003
  effect: Gn,
7004
- enum: po,
7005
- function: uo,
7006
- instanceof: Vi,
7007
- intersection: so,
7008
- lazy: ho,
7004
+ enum: fo,
7005
+ function: ho,
7006
+ instanceof: Bi,
7007
+ intersection: io,
7008
+ lazy: po,
7009
7009
  literal: mo,
7010
- map: co,
7011
- nan: Bi,
7012
- nativeEnum: fo,
7013
- never: Yi,
7014
- null: Qi,
7015
- nullable: yo,
7016
- number: Na,
7017
- object: to,
7018
- oboolean: No,
7019
- onumber: xo,
7020
- optional: go,
7021
- ostring: wo,
7022
- pipeline: bo,
7023
- preprocess: vo,
7024
- promise: _o,
7025
- record: oo,
7026
- set: lo,
7027
- strictObject: no,
7028
- string: xa,
7029
- symbol: Wi,
7010
+ map: lo,
7011
+ nan: Ki,
7012
+ nativeEnum: _o,
7013
+ never: Xi,
7014
+ null: Gi,
7015
+ nullable: vo,
7016
+ number: ka,
7017
+ object: no,
7018
+ oboolean: ko,
7019
+ onumber: No,
7020
+ optional: yo,
7021
+ ostring: xo,
7022
+ pipeline: wo,
7023
+ preprocess: bo,
7024
+ promise: go,
7025
+ record: co,
7026
+ set: uo,
7027
+ strictObject: ao,
7028
+ string: Na,
7029
+ symbol: qi,
7030
7030
  transformer: Gn,
7031
- tuple: io,
7032
- undefined: qi,
7033
- union: ao,
7034
- unknown: Hi,
7035
- void: Xi,
7036
- NEVER: Co,
7037
- ZodIssueCode: m,
7038
- quotelessJson: Ni,
7031
+ tuple: oo,
7032
+ undefined: Qi,
7033
+ union: ro,
7034
+ unknown: Yi,
7035
+ void: eo,
7036
+ NEVER: To,
7037
+ ZodIssueCode: p,
7038
+ quotelessJson: ki,
7039
7039
  ZodError: J
7040
7040
  });
7041
- xi(To);
7041
+ Ni(Oo);
7042
7042
  function Xt(t, e = "", n = {}) {
7043
7043
  for (let a in t)
7044
7044
  if (Object.prototype.hasOwnProperty.call(t, a)) {
@@ -7047,7 +7047,7 @@ function Xt(t, e = "", n = {}) {
7047
7047
  }
7048
7048
  return n;
7049
7049
  }
7050
- function Ca(t, e) {
7050
+ function Ta(t, e) {
7051
7051
  const n = {};
7052
7052
  for (const [a, r] of Object.entries(t)) {
7053
7053
  const s = e.find(
@@ -7065,12 +7065,12 @@ function Ca(t, e) {
7065
7065
  }
7066
7066
  return n;
7067
7067
  }
7068
- function Oo(t) {
7068
+ function So(t) {
7069
7069
  return async (e, n) => {
7070
7070
  let a = t.selectFrom("connections").where("connections.tenant_id", "=", e);
7071
7071
  n.q && (a = Be(t, a, n.q, ["user_id", "ip"]));
7072
7072
  const o = (await a.offset(n.page * n.per_page).limit(n.per_page).selectAll().execute()).map(
7073
- (c) => R(Ca(c, ["options"]))
7073
+ (c) => R(Ta(c, ["options"]))
7074
7074
  ), { count: d } = await a.select((c) => c.fn.countAll().as("count")).executeTakeFirstOrThrow();
7075
7075
  return {
7076
7076
  connections: o,
@@ -7080,10 +7080,10 @@ function Oo(t) {
7080
7080
  };
7081
7081
  };
7082
7082
  }
7083
- function So(t) {
7083
+ function jo(t) {
7084
7084
  return async (e, n) => (await t.deleteFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", n).executeTakeFirst()).numDeletedRows > 0;
7085
7085
  }
7086
- function jo(t) {
7086
+ function Io(t) {
7087
7087
  return async (e, n) => {
7088
7088
  const a = await t.selectFrom("connections").where("connections.tenant_id", "=", e).where("connections.id", "=", n).selectAll().executeTakeFirst();
7089
7089
  return a ? R({
@@ -7092,7 +7092,7 @@ function jo(t) {
7092
7092
  }) : null;
7093
7093
  };
7094
7094
  }
7095
- function Io(t) {
7095
+ function Zo(t) {
7096
7096
  return async (e, n, a) => {
7097
7097
  const r = {
7098
7098
  ...a,
@@ -7104,16 +7104,16 @@ function Io(t) {
7104
7104
  }).where("connections.id", "=", n).where("connections.tenant_id", "=", e).execute(), !0;
7105
7105
  };
7106
7106
  }
7107
- function Zo(t) {
7107
+ function Eo(t) {
7108
7108
  return {
7109
- create: vi(t),
7110
- get: jo(t),
7111
- list: Oo(t),
7112
- remove: So(t),
7113
- update: Io(t)
7109
+ create: bi(t),
7110
+ get: Io(t),
7111
+ list: So(t),
7112
+ remove: jo(t),
7113
+ update: Zo(t)
7114
7114
  };
7115
7115
  }
7116
- function Eo(t) {
7116
+ function $o(t) {
7117
7117
  return {
7118
7118
  get: async (e) => {
7119
7119
  const n = await t.selectFrom("applications").selectAll().where("id", "=", e).executeTakeFirst();
@@ -7126,7 +7126,7 @@ function Eo(t) {
7126
7126
  return {
7127
7127
  ...n,
7128
7128
  connections: r.map(
7129
- (d) => ha.parse(
7129
+ (d) => pa.parse(
7130
7130
  R({
7131
7131
  ...d,
7132
7132
  options: d.options ? JSON.parse(d.options) : {}
@@ -7147,7 +7147,7 @@ function Eo(t) {
7147
7147
  }
7148
7148
  };
7149
7149
  }
7150
- function $o(t) {
7150
+ function Po(t) {
7151
7151
  return async () => await t.selectFrom("keys").where(
7152
7152
  (n) => n.or([
7153
7153
  n("revoked_at", ">", (/* @__PURE__ */ new Date()).toISOString()),
@@ -7155,22 +7155,22 @@ function $o(t) {
7155
7155
  ])
7156
7156
  ).selectAll().execute();
7157
7157
  }
7158
- function Po(t) {
7158
+ function Ao(t) {
7159
7159
  return async (e) => {
7160
7160
  await t.insertInto("keys").values({ ...e, created_at: (/* @__PURE__ */ new Date()).toDateString() }).execute();
7161
7161
  };
7162
7162
  }
7163
- function Ao(t) {
7163
+ function Do(t) {
7164
7164
  return async (e, n) => !!(await t.updateTable("keys").set(n).where("kid", "=", e).execute()).length;
7165
7165
  }
7166
- function Do(t) {
7166
+ function Mo(t) {
7167
7167
  return {
7168
- create: Po(t),
7169
- list: $o(t),
7170
- update: Ao(t)
7168
+ create: Ao(t),
7169
+ list: Po(t),
7170
+ update: Do(t)
7171
7171
  };
7172
7172
  }
7173
- function Mo(t) {
7173
+ function Ro(t) {
7174
7174
  return async (e, n) => {
7175
7175
  const a = {
7176
7176
  created_at: (/* @__PURE__ */ new Date()).toISOString(),
@@ -7182,7 +7182,7 @@ function Mo(t) {
7182
7182
  return await t.insertInto("domains").values(a).execute(), a;
7183
7183
  };
7184
7184
  }
7185
- function Ro(t) {
7185
+ function Lo(t) {
7186
7186
  return async (e, n) => {
7187
7187
  let a = t.selectFrom("domains").where("domains.tenant_id", "=", e);
7188
7188
  n.q && (a = Be(t, a, n.q, ["user_id", "ip"]));
@@ -7195,13 +7195,13 @@ function Ro(t) {
7195
7195
  };
7196
7196
  };
7197
7197
  }
7198
- function Lo(t) {
7198
+ function zo(t) {
7199
7199
  return {
7200
- create: Mo(t),
7201
- list: Ro(t)
7200
+ create: Ro(t),
7201
+ list: Lo(t)
7202
7202
  };
7203
7203
  }
7204
- function zo(t) {
7204
+ function Uo(t) {
7205
7205
  return async (e) => {
7206
7206
  const [n] = await t.selectFrom("branding").where("branding.tenant_id", "=", e).selectAll().execute();
7207
7207
  if (!n)
@@ -7231,7 +7231,7 @@ function zo(t) {
7231
7231
  });
7232
7232
  };
7233
7233
  }
7234
- function Uo(t) {
7234
+ function Fo(t) {
7235
7235
  return async (e, n) => {
7236
7236
  var o, d, c, l, u, Z, M, W, _e, Je, ge, ye, ve, We, qe, ee, te, ne;
7237
7237
  const { colors: a, font: r, ...s } = n;
@@ -7259,13 +7259,13 @@ function Uo(t) {
7259
7259
  }
7260
7260
  };
7261
7261
  }
7262
- function Fo(t) {
7262
+ function Vo(t) {
7263
7263
  return {
7264
- get: zo(t),
7265
- set: Uo(t)
7264
+ get: Uo(t),
7265
+ set: Fo(t)
7266
7266
  };
7267
7267
  }
7268
- function Vo(t) {
7268
+ function Bo(t) {
7269
7269
  return async (e, n) => {
7270
7270
  let a = t.selectFrom("hooks").where("hooks.tenant_id", "=", e);
7271
7271
  n.q && (a = Be(t, a, n.q, ["url"]));
@@ -7285,7 +7285,7 @@ function Vo(t) {
7285
7285
  };
7286
7286
  };
7287
7287
  }
7288
- function Bo(t) {
7288
+ function Ko(t) {
7289
7289
  return async (e, n) => {
7290
7290
  const a = await t.selectFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", n).selectAll().executeTakeFirst();
7291
7291
  return a ? R({
@@ -7295,10 +7295,10 @@ function Bo(t) {
7295
7295
  }) : null;
7296
7296
  };
7297
7297
  }
7298
- function Ko(t) {
7298
+ function Jo(t) {
7299
7299
  return async (e, n) => (await t.deleteFrom("hooks").where("hooks.tenant_id", "=", e).where("hooks.hook_id", "=", n).executeTakeFirst()).numDeletedRows > 0;
7300
7300
  }
7301
- function Jo(t) {
7301
+ function Wo(t) {
7302
7302
  return async (e, n) => {
7303
7303
  const a = {
7304
7304
  hook_id: Ke(),
@@ -7314,7 +7314,7 @@ function Jo(t) {
7314
7314
  }).execute(), a;
7315
7315
  };
7316
7316
  }
7317
- function Wo(t) {
7317
+ function qo(t) {
7318
7318
  return async (e, n, a) => {
7319
7319
  const r = {
7320
7320
  ...a,
@@ -7325,16 +7325,16 @@ function Wo(t) {
7325
7325
  return await t.updateTable("hooks").set(r).where("hooks.hook_id", "=", n).where("hooks.tenant_id", "=", e).execute(), !0;
7326
7326
  };
7327
7327
  }
7328
- function qo(t) {
7328
+ function Qo(t) {
7329
7329
  return {
7330
- create: Jo(t),
7331
- get: Bo(t),
7332
- list: Vo(t),
7333
- update: Wo(t),
7334
- remove: Ko(t)
7330
+ create: Wo(t),
7331
+ get: Ko(t),
7332
+ list: Bo(t),
7333
+ update: qo(t),
7334
+ remove: Jo(t)
7335
7335
  };
7336
7336
  }
7337
- function Qo(t) {
7337
+ function Go(t) {
7338
7338
  return async (e, n) => {
7339
7339
  const a = {
7340
7340
  themeId: Ke(),
@@ -7345,16 +7345,16 @@ function Qo(t) {
7345
7345
  return await t.insertInto("themes").values({ ...Xt(a), tenant_id: e }).execute(), a;
7346
7346
  };
7347
7347
  }
7348
- function Go(t) {
7348
+ function Ho(t) {
7349
7349
  return async (e, n) => (await t.deleteFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", n).executeTakeFirst()).numDeletedRows > 0;
7350
7350
  }
7351
- function Ho(t) {
7351
+ function Yo(t) {
7352
7352
  return async (e, n) => {
7353
7353
  const a = await t.selectFrom("themes").where("themes.tenant_id", "=", e).where("themes.theme_id", "=", n).selectAll().executeTakeFirst();
7354
7354
  return a ? R(a) : null;
7355
7355
  };
7356
7356
  }
7357
- function Yo(t) {
7357
+ function Xo(t) {
7358
7358
  return async (e, n, a) => {
7359
7359
  const r = Xt({
7360
7360
  ...a,
@@ -7363,23 +7363,23 @@ function Yo(t) {
7363
7363
  return await t.updateTable("themes").set(r).where("themes.id", "=", n).where("themes.tenant_id", "=", e).execute(), !0;
7364
7364
  };
7365
7365
  }
7366
- function Xo(t) {
7366
+ function ed(t) {
7367
7367
  return {
7368
- create: Qo(t),
7369
- get: Ho(t),
7370
- remove: Go(t),
7371
- update: Yo(t)
7368
+ create: Go(t),
7369
+ get: Yo(t),
7370
+ remove: Ho(t),
7371
+ update: Xo(t)
7372
7372
  };
7373
7373
  }
7374
- function ed(t) {
7374
+ function td(t) {
7375
7375
  return async (e, n) => {
7376
7376
  const a = (/* @__PURE__ */ new Date()).toISOString(), r = await t.selectFrom("logins").where("logins.expires_at", ">", a).where("logins.login_id", "=", n).selectAll().executeTakeFirst();
7377
- return r ? ws.parse(
7378
- Ca(R(r), ["authParams"])
7377
+ return r ? xs.parse(
7378
+ Ta(R(r), ["authParams"])
7379
7379
  ) : null;
7380
7380
  };
7381
7381
  }
7382
- function td(t) {
7382
+ function nd(t) {
7383
7383
  return async (e, n) => {
7384
7384
  const a = {
7385
7385
  login_id: Ke(),
@@ -7390,21 +7390,21 @@ function td(t) {
7390
7390
  return await t.insertInto("logins").values({ ...Xt(a), tenant_id: e }).execute(), a;
7391
7391
  };
7392
7392
  }
7393
- function nd(t) {
7393
+ function ad(t) {
7394
7394
  return async (e, n, a) => (await t.updateTable("logins").set(Xt(a)).where("logins.login_id", "=", n).where("logins.tenant_id", "=", e).execute()).length === 1;
7395
7395
  }
7396
- function ad(t) {
7396
+ function rd(t) {
7397
7397
  return async (e, n) => (await t.deleteFrom("logins").where("logins.tenant_id", "=", e).where("logins.login_id", "=", n).execute()).length > 0;
7398
7398
  }
7399
- function rd(t) {
7399
+ function sd(t) {
7400
7400
  return {
7401
- create: td(t),
7402
- get: ed(t),
7403
- update: nd(t),
7404
- remove: ad(t)
7401
+ create: nd(t),
7402
+ get: td(t),
7403
+ update: ad(t),
7404
+ remove: rd(t)
7405
7405
  };
7406
7406
  }
7407
- function sd(t) {
7407
+ function id(t) {
7408
7408
  return async (e) => {
7409
7409
  const [n] = await t.selectFrom("prompt_settings").where("prompt_settings.tenant_id", "=", e).selectAll().execute();
7410
7410
  return R({
@@ -7424,10 +7424,10 @@ function Hn(t) {
7424
7424
  universal_login_experience: t.universal_login_experience
7425
7425
  });
7426
7426
  }
7427
- function id(t) {
7427
+ function od(t) {
7428
7428
  return async (e, n) => {
7429
7429
  try {
7430
- const a = Es.parse(n);
7430
+ const a = $s.parse(n);
7431
7431
  await t.insertInto("prompt_settings").values({
7432
7432
  ...Hn(a),
7433
7433
  tenant_id: e
@@ -7437,13 +7437,13 @@ function id(t) {
7437
7437
  }
7438
7438
  };
7439
7439
  }
7440
- function od(t) {
7440
+ function dd(t) {
7441
7441
  return {
7442
- get: sd(t),
7443
- set: id(t)
7442
+ get: id(t),
7443
+ set: od(t)
7444
7444
  };
7445
7445
  }
7446
- function dd(t) {
7446
+ function cd(t) {
7447
7447
  return async (e) => {
7448
7448
  const [n] = await t.selectFrom("email_providers").where("email_providers.tenant_id", "=", e).selectAll().execute();
7449
7449
  if (!n)
@@ -7463,7 +7463,7 @@ function dd(t) {
7463
7463
  });
7464
7464
  };
7465
7465
  }
7466
- function cd(t) {
7466
+ function ld(t) {
7467
7467
  return async (e, n) => {
7468
7468
  const { credentials: a, settings: r, enabled: s, ...o } = n;
7469
7469
  await t.updateTable("email_providers").set({
@@ -7474,7 +7474,7 @@ function cd(t) {
7474
7474
  }).where("tenant_id", "=", e).execute();
7475
7475
  };
7476
7476
  }
7477
- function ld(t) {
7477
+ function ud(t) {
7478
7478
  return async (e, n) => {
7479
7479
  const { credentials: a, settings: r, enabled: s, ...o } = n;
7480
7480
  await t.insertInto("email_providers").values({
@@ -7488,14 +7488,14 @@ function ld(t) {
7488
7488
  }).execute();
7489
7489
  };
7490
7490
  }
7491
- function ud(t) {
7491
+ function hd(t) {
7492
7492
  return {
7493
- get: dd(t),
7494
- create: ld(t),
7495
- update: cd(t)
7493
+ get: cd(t),
7494
+ create: ud(t),
7495
+ update: ld(t)
7496
7496
  };
7497
7497
  }
7498
- function hd(t) {
7498
+ function pd(t) {
7499
7499
  return t[t.length - 1];
7500
7500
  }
7501
7501
  function z(t) {
@@ -7557,7 +7557,7 @@ const en = z({
7557
7557
  }
7558
7558
  });
7559
7559
  var gn;
7560
- class pd {
7560
+ class fd {
7561
7561
  constructor() {
7562
7562
  ut(this, "nodeStack", []);
7563
7563
  ae(this, gn, z({
@@ -8391,7 +8391,7 @@ class pd {
8391
8391
  }
8392
8392
  }
8393
8393
  gn = new WeakMap();
8394
- const fd = z({
8394
+ const _d = z({
8395
8395
  AlterTableNode: !0,
8396
8396
  CreateIndexNode: !0,
8397
8397
  CreateSchemaNode: !0,
@@ -8410,8 +8410,8 @@ const fd = z({
8410
8410
  UpdateQueryNode: !0,
8411
8411
  MergeQueryNode: !0
8412
8412
  });
8413
- var rt, De, Me, L, Ta, Oa, Sa, Ye, Dn, ja;
8414
- class _d extends pd {
8413
+ var rt, De, Me, L, Oa, Sa, ja, Ye, Dn, Ia;
8414
+ class gd extends fd {
8415
8415
  constructor(n) {
8416
8416
  super();
8417
8417
  ae(this, L);
@@ -8421,12 +8421,12 @@ class _d extends pd {
8421
8421
  ht(this, rt, n);
8422
8422
  }
8423
8423
  transformNodeImpl(n) {
8424
- if (!T(this, L, Ta).call(this, n))
8424
+ if (!T(this, L, Oa).call(this, n))
8425
8425
  return super.transformNodeImpl(n);
8426
- const a = T(this, L, Sa).call(this, n);
8426
+ const a = T(this, L, ja).call(this, n);
8427
8427
  for (const o of a)
8428
8428
  v(this, Me).add(o);
8429
- const r = T(this, L, Oa).call(this, n);
8429
+ const r = T(this, L, Sa).call(this, n);
8430
8430
  for (const o of r)
8431
8431
  v(this, De).add(o);
8432
8432
  const s = super.transformNodeImpl(n);
@@ -8451,9 +8451,9 @@ class _d extends pd {
8451
8451
  };
8452
8452
  }
8453
8453
  }
8454
- rt = new WeakMap(), De = new WeakMap(), Me = new WeakMap(), L = new WeakSet(), Ta = function(n) {
8455
- return n.kind in fd;
8456
- }, Oa = function(n) {
8454
+ rt = new WeakMap(), De = new WeakMap(), Me = new WeakMap(), L = new WeakSet(), Oa = function(n) {
8455
+ return n.kind in _d;
8456
+ }, Sa = function(n) {
8457
8457
  const a = /* @__PURE__ */ new Set();
8458
8458
  if ("name" in n && n.name && An.is(n.name) && T(this, L, Dn).call(this, n.name, a), "from" in n && n.from)
8459
8459
  for (const r of n.from.froms)
@@ -8462,26 +8462,26 @@ rt = new WeakMap(), De = new WeakMap(), Me = new WeakMap(), L = new WeakSet(), T
8462
8462
  for (const r of n.joins)
8463
8463
  T(this, L, Ye).call(this, r.table, a);
8464
8464
  return "using" in n && n.using && T(this, L, Ye).call(this, n.using, a), a;
8465
- }, Sa = function(n) {
8465
+ }, ja = function(n) {
8466
8466
  const a = /* @__PURE__ */ new Set();
8467
- return "with" in n && n.with && T(this, L, ja).call(this, n.with, a), a;
8467
+ return "with" in n && n.with && T(this, L, Ia).call(this, n.with, a), a;
8468
8468
  }, Ye = function(n, a) {
8469
8469
  const r = Nn.is(n) ? n : md.is(n) && Nn.is(n.node) ? n.node : null;
8470
8470
  r && T(this, L, Dn).call(this, r.table, a);
8471
8471
  }, Dn = function(n, a) {
8472
8472
  const r = n.identifier.name;
8473
8473
  !v(this, De).has(r) && !v(this, Me).has(r) && a.add(r);
8474
- }, ja = function(n, a) {
8474
+ }, Ia = function(n, a) {
8475
8475
  for (const r of n.expressions) {
8476
8476
  const s = r.name.table.table.identifier.name;
8477
8477
  v(this, Me).has(s) || a.add(s);
8478
8478
  }
8479
8479
  };
8480
8480
  var Qt;
8481
- class gd {
8481
+ class yd {
8482
8482
  constructor(e) {
8483
8483
  ae(this, Qt);
8484
- ht(this, Qt, new _d(e));
8484
+ ht(this, Qt, new gd(e));
8485
8485
  }
8486
8486
  transformQuery(e) {
8487
8487
  return v(this, Qt).transformNode(e.node);
@@ -8491,7 +8491,7 @@ class gd {
8491
8491
  }
8492
8492
  }
8493
8493
  Qt = new WeakMap();
8494
- class yd {
8494
+ class vd {
8495
8495
  transformQuery(e) {
8496
8496
  return e.node;
8497
8497
  }
@@ -8499,11 +8499,11 @@ class yd {
8499
8499
  return e.result;
8500
8500
  }
8501
8501
  }
8502
- const vd = "kysely_migration", Yn = "kysely_migration_lock", bd = !1, kn = "migration_lock", wd = z({ __noMigrations__: !0 });
8503
- var P, p, vt, ue, he, Xe, Za, me, Ea, $a, Pa, Aa, Da, Mn, et, Rn, Ma, Ra, La, Ln, za, Ua, Fa, Va, Ba, bt;
8504
- class Ia {
8502
+ const bd = "kysely_migration", Yn = "kysely_migration_lock", wd = !1, kn = "migration_lock", xd = z({ __noMigrations__: !0 });
8503
+ var P, m, vt, ue, he, Xe, Ea, pe, $a, Pa, Aa, Da, Ma, Mn, et, Rn, Ra, La, za, Ln, Ua, Fa, Va, Ba, Ka, bt;
8504
+ class Za {
8505
8505
  constructor(e) {
8506
- ae(this, p);
8506
+ ae(this, m);
8507
8507
  ae(this, P);
8508
8508
  ht(this, P, z(e));
8509
8509
  }
@@ -8513,8 +8513,8 @@ class Ia {
8513
8513
  * The returned array is sorted by migration name.
8514
8514
  */
8515
8515
  async getMigrations() {
8516
- const e = await T(this, p, et).call(this, v(this, p, he)) ? await v(this, P).db.withPlugin(v(this, p, me)).selectFrom(v(this, p, he)).select(["name", "timestamp"]).execute() : [];
8517
- return (await T(this, p, Ln).call(this)).map(({ name: a, ...r }) => {
8516
+ const e = await T(this, m, et).call(this, v(this, m, he)) ? await v(this, P).db.withPlugin(v(this, m, pe)).selectFrom(v(this, m, he)).select(["name", "timestamp"]).execute() : [];
8517
+ return (await T(this, m, Ln).call(this)).map(({ name: a, ...r }) => {
8518
8518
  const s = e.find((o) => o.name === a);
8519
8519
  return {
8520
8520
  name: a,
@@ -8571,7 +8571,7 @@ class Ia {
8571
8571
  * ```
8572
8572
  */
8573
8573
  async migrateToLatest() {
8574
- return T(this, p, vt).call(this, () => ({ direction: "Up", step: 1 / 0 }));
8574
+ return T(this, m, vt).call(this, () => ({ direction: "Up", step: 1 / 0 }));
8575
8575
  }
8576
8576
  /**
8577
8577
  * Migrate up/down to a specific migration.
@@ -8597,8 +8597,8 @@ class Ia {
8597
8597
  * ```
8598
8598
  */
8599
8599
  async migrateTo(e) {
8600
- return T(this, p, vt).call(this, ({ migrations: n, executedMigrations: a, pendingMigrations: r }) => {
8601
- if (e === wd)
8600
+ return T(this, m, vt).call(this, ({ migrations: n, executedMigrations: a, pendingMigrations: r }) => {
8601
+ if (e === xd)
8602
8602
  return { direction: "Down", step: 1 / 0 };
8603
8603
  if (!n.find((d) => d.name === e))
8604
8604
  throw new Error(`migration "${e}" doesn't exist`);
@@ -8628,7 +8628,7 @@ class Ia {
8628
8628
  * ```
8629
8629
  */
8630
8630
  async migrateUp() {
8631
- return T(this, p, vt).call(this, () => ({ direction: "Up", step: 1 }));
8631
+ return T(this, m, vt).call(this, () => ({ direction: "Up", step: 1 }));
8632
8632
  }
8633
8633
  /**
8634
8634
  * Migrate one step down.
@@ -8645,69 +8645,69 @@ class Ia {
8645
8645
  * ```
8646
8646
  */
8647
8647
  async migrateDown() {
8648
- return T(this, p, vt).call(this, () => ({ direction: "Down", step: 1 }));
8648
+ return T(this, m, vt).call(this, () => ({ direction: "Down", step: 1 }));
8649
8649
  }
8650
8650
  }
8651
- P = new WeakMap(), p = new WeakSet(), vt = async function(e) {
8651
+ P = new WeakMap(), m = new WeakSet(), vt = async function(e) {
8652
8652
  try {
8653
- return await T(this, p, Ea).call(this), await T(this, p, Ma).call(this, e);
8653
+ return await T(this, m, $a).call(this), await T(this, m, Ra).call(this, e);
8654
8654
  } catch (n) {
8655
8655
  return n instanceof Cn ? n.resultSet : { error: n };
8656
8656
  }
8657
8657
  }, ue = function() {
8658
8658
  return v(this, P).migrationTableSchema;
8659
8659
  }, he = function() {
8660
- return v(this, P).migrationTableName ?? vd;
8660
+ return v(this, P).migrationTableName ?? bd;
8661
8661
  }, Xe = function() {
8662
8662
  return v(this, P).migrationLockTableName ?? Yn;
8663
- }, Za = function() {
8664
- return v(this, P).allowUnorderedMigrations ?? bd;
8665
- }, me = function() {
8666
- return v(this, p, ue) ? new gd(v(this, p, ue)) : new yd();
8667
- }, Ea = async function() {
8668
- await T(this, p, $a).call(this), await T(this, p, Pa).call(this), await T(this, p, Aa).call(this), await T(this, p, Da).call(this);
8663
+ }, Ea = function() {
8664
+ return v(this, P).allowUnorderedMigrations ?? wd;
8665
+ }, pe = function() {
8666
+ return v(this, m, ue) ? new yd(v(this, m, ue)) : new vd();
8669
8667
  }, $a = async function() {
8670
- if (v(this, p, ue) && !await T(this, p, Mn).call(this))
8668
+ await T(this, m, Pa).call(this), await T(this, m, Aa).call(this), await T(this, m, Da).call(this), await T(this, m, Ma).call(this);
8669
+ }, Pa = async function() {
8670
+ if (v(this, m, ue) && !await T(this, m, Mn).call(this))
8671
8671
  try {
8672
- await T(this, p, bt).call(this, v(this, P).db.schema.createSchema(v(this, p, ue)));
8672
+ await T(this, m, bt).call(this, v(this, P).db.schema.createSchema(v(this, m, ue)));
8673
8673
  } catch (e) {
8674
- if (!await T(this, p, Mn).call(this))
8674
+ if (!await T(this, m, Mn).call(this))
8675
8675
  throw e;
8676
8676
  }
8677
- }, Pa = async function() {
8678
- if (!await T(this, p, et).call(this, v(this, p, he)))
8677
+ }, Aa = async function() {
8678
+ if (!await T(this, m, et).call(this, v(this, m, he)))
8679
8679
  try {
8680
- v(this, p, ue) && await T(this, p, bt).call(this, v(this, P).db.schema.createSchema(v(this, p, ue))), await T(this, p, bt).call(this, v(this, P).db.schema.withPlugin(v(this, p, me)).createTable(v(this, p, he)).addColumn("name", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("timestamp", "varchar(255)", (e) => e.notNull()));
8680
+ v(this, m, ue) && await T(this, m, bt).call(this, v(this, P).db.schema.createSchema(v(this, m, ue))), await T(this, m, bt).call(this, v(this, P).db.schema.withPlugin(v(this, m, pe)).createTable(v(this, m, he)).addColumn("name", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("timestamp", "varchar(255)", (e) => e.notNull()));
8681
8681
  } catch (e) {
8682
- if (!await T(this, p, et).call(this, v(this, p, he)))
8682
+ if (!await T(this, m, et).call(this, v(this, m, he)))
8683
8683
  throw e;
8684
8684
  }
8685
- }, Aa = async function() {
8686
- if (!await T(this, p, et).call(this, v(this, p, Xe)))
8685
+ }, Da = async function() {
8686
+ if (!await T(this, m, et).call(this, v(this, m, Xe)))
8687
8687
  try {
8688
- await T(this, p, bt).call(this, v(this, P).db.schema.withPlugin(v(this, p, me)).createTable(v(this, p, Xe)).addColumn("id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("is_locked", "integer", (e) => e.notNull().defaultTo(0)));
8688
+ await T(this, m, bt).call(this, v(this, P).db.schema.withPlugin(v(this, m, pe)).createTable(v(this, m, Xe)).addColumn("id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("is_locked", "integer", (e) => e.notNull().defaultTo(0)));
8689
8689
  } catch (e) {
8690
- if (!await T(this, p, et).call(this, v(this, p, Xe)))
8690
+ if (!await T(this, m, et).call(this, v(this, m, Xe)))
8691
8691
  throw e;
8692
8692
  }
8693
- }, Da = async function() {
8694
- if (!await T(this, p, Rn).call(this))
8693
+ }, Ma = async function() {
8694
+ if (!await T(this, m, Rn).call(this))
8695
8695
  try {
8696
- await v(this, P).db.withPlugin(v(this, p, me)).insertInto(v(this, p, Xe)).values({ id: kn, is_locked: 0 }).execute();
8696
+ await v(this, P).db.withPlugin(v(this, m, pe)).insertInto(v(this, m, Xe)).values({ id: kn, is_locked: 0 }).execute();
8697
8697
  } catch (e) {
8698
- if (!await T(this, p, Rn).call(this))
8698
+ if (!await T(this, m, Rn).call(this))
8699
8699
  throw e;
8700
8700
  }
8701
8701
  }, Mn = async function() {
8702
- return (await v(this, P).db.introspection.getSchemas()).some((n) => n.name === v(this, p, ue));
8702
+ return (await v(this, P).db.introspection.getSchemas()).some((n) => n.name === v(this, m, ue));
8703
8703
  }, et = async function(e) {
8704
- const n = v(this, p, ue);
8704
+ const n = v(this, m, ue);
8705
8705
  return (await v(this, P).db.introspection.getTables({
8706
8706
  withInternalKyselyTables: !0
8707
8707
  })).some((r) => r.name === e && (!n || r.schema === n));
8708
8708
  }, Rn = async function() {
8709
- return !!await v(this, P).db.withPlugin(v(this, p, me)).selectFrom(v(this, p, Xe)).where("id", "=", kn).select("id").executeTakeFirst();
8710
- }, Ma = async function(e) {
8709
+ return !!await v(this, P).db.withPlugin(v(this, m, pe)).selectFrom(v(this, m, Xe)).where("id", "=", kn).select("id").executeTakeFirst();
8710
+ }, Ra = async function(e) {
8711
8711
  const n = v(this, P).db.getExecutor().adapter, a = z({
8712
8712
  lockTable: v(this, P).migrationLockTableName ?? Yn,
8713
8713
  lockRowId: kn,
@@ -8715,27 +8715,27 @@ P = new WeakMap(), p = new WeakSet(), vt = async function(e) {
8715
8715
  }), r = async (s) => {
8716
8716
  try {
8717
8717
  await n.acquireMigrationLock(s, a);
8718
- const o = await T(this, p, Ra).call(this, s);
8718
+ const o = await T(this, m, La).call(this, s);
8719
8719
  if (o.migrations.length === 0)
8720
8720
  return { results: [] };
8721
8721
  const { direction: d, step: c } = e(o);
8722
- return c <= 0 ? { results: [] } : d === "Down" ? await T(this, p, Va).call(this, s, o, c) : d === "Up" ? await T(this, p, Ba).call(this, s, o, c) : { results: [] };
8722
+ return c <= 0 ? { results: [] } : d === "Down" ? await T(this, m, Ba).call(this, s, o, c) : d === "Up" ? await T(this, m, Ka).call(this, s, o, c) : { results: [] };
8723
8723
  } finally {
8724
8724
  await n.releaseMigrationLock(s, a);
8725
8725
  }
8726
8726
  };
8727
8727
  return n.supportsTransactionalDdl ? v(this, P).db.transaction().execute(r) : v(this, P).db.connection().execute(r);
8728
- }, Ra = async function(e) {
8729
- const n = await T(this, p, Ln).call(this), a = await T(this, p, za).call(this, e);
8730
- T(this, p, Ua).call(this, n, a), v(this, p, Za) || T(this, p, Fa).call(this, n, a);
8731
- const r = T(this, p, La).call(this, n, a);
8728
+ }, La = async function(e) {
8729
+ const n = await T(this, m, Ln).call(this), a = await T(this, m, Ua).call(this, e);
8730
+ T(this, m, Fa).call(this, n, a), v(this, m, Ea) || T(this, m, Va).call(this, n, a);
8731
+ const r = T(this, m, za).call(this, n, a);
8732
8732
  return z({
8733
8733
  migrations: n,
8734
8734
  executedMigrations: a,
8735
- lastMigration: hd(a),
8735
+ lastMigration: pd(a),
8736
8736
  pendingMigrations: r
8737
8737
  });
8738
- }, La = function(e, n) {
8738
+ }, za = function(e, n) {
8739
8739
  return e.filter((a) => !n.includes(a.name));
8740
8740
  }, Ln = async function() {
8741
8741
  const e = await v(this, P).provider.getMigrations();
@@ -8743,17 +8743,17 @@ P = new WeakMap(), p = new WeakSet(), vt = async function(e) {
8743
8743
  ...e[n],
8744
8744
  name: n
8745
8745
  }));
8746
- }, za = async function(e) {
8747
- return (await e.withPlugin(v(this, p, me)).selectFrom(v(this, p, he)).select("name").orderBy(["timestamp", "name"]).execute()).map((a) => a.name);
8748
- }, Ua = function(e, n) {
8746
+ }, Ua = async function(e) {
8747
+ return (await e.withPlugin(v(this, m, pe)).selectFrom(v(this, m, he)).select("name").orderBy(["timestamp", "name"]).execute()).map((a) => a.name);
8748
+ }, Fa = function(e, n) {
8749
8749
  for (const a of n)
8750
8750
  if (!e.some((r) => r.name === a))
8751
8751
  throw new Error(`corrupted migrations: previously executed migration ${a} is missing`);
8752
- }, Fa = function(e, n) {
8752
+ }, Va = function(e, n) {
8753
8753
  for (let a = 0; a < n.length; ++a)
8754
8754
  if (e[a].name !== n[a])
8755
8755
  throw new Error(`corrupted migrations: expected previously executed migration ${n[a]} to be at index ${a} but ${e[a].name} was found in its place. New migrations must always have a name that comes alphabetically after the last executed migration.`);
8756
- }, Va = async function(e, n, a) {
8756
+ }, Ba = async function(e, n, a) {
8757
8757
  const r = n.executedMigrations.slice().reverse().slice(0, a).map((o) => n.migrations.find((d) => d.name === o)), s = r.map((o) => ({
8758
8758
  migrationName: o.name,
8759
8759
  direction: "Down",
@@ -8762,7 +8762,7 @@ P = new WeakMap(), p = new WeakSet(), vt = async function(e) {
8762
8762
  for (let o = 0; o < s.length; ++o) {
8763
8763
  const d = r[o];
8764
8764
  try {
8765
- d.down && (await d.down(e), await e.withPlugin(v(this, p, me)).deleteFrom(v(this, p, he)).where("name", "=", d.name).execute(), s[o] = {
8765
+ d.down && (await d.down(e), await e.withPlugin(v(this, m, pe)).deleteFrom(v(this, m, he)).where("name", "=", d.name).execute(), s[o] = {
8766
8766
  migrationName: d.name,
8767
8767
  direction: "Down",
8768
8768
  status: "Success"
@@ -8779,7 +8779,7 @@ P = new WeakMap(), p = new WeakSet(), vt = async function(e) {
8779
8779
  }
8780
8780
  }
8781
8781
  return { results: s };
8782
- }, Ba = async function(e, n, a) {
8782
+ }, Ka = async function(e, n, a) {
8783
8783
  const s = n.pendingMigrations.slice(0, a).map((o) => ({
8784
8784
  migrationName: o.name,
8785
8785
  direction: "Up",
@@ -8788,7 +8788,7 @@ P = new WeakMap(), p = new WeakSet(), vt = async function(e) {
8788
8788
  for (let o = 0; o < s.length; o++) {
8789
8789
  const d = n.pendingMigrations[o];
8790
8790
  try {
8791
- await d.up(e), await e.withPlugin(v(this, p, me)).insertInto(v(this, p, he)).values({
8791
+ await d.up(e), await e.withPlugin(v(this, m, pe)).insertInto(v(this, m, he)).values({
8792
8792
  name: d.name,
8793
8793
  timestamp: (/* @__PURE__ */ new Date()).toISOString()
8794
8794
  }).execute(), s[o] = {
@@ -8823,7 +8823,7 @@ class Cn extends Error {
8823
8823
  }
8824
8824
  }
8825
8825
  Gt = new WeakMap();
8826
- class Ka {
8826
+ class Ja {
8827
8827
  constructor(e) {
8828
8828
  ut(this, "migrations");
8829
8829
  this.migrations = e;
@@ -8832,7 +8832,7 @@ class Ka {
8832
8832
  return this.migrations;
8833
8833
  }
8834
8834
  }
8835
- async function xd(t) {
8835
+ async function Nd(t) {
8836
8836
  await t.schema.createTable("tenants").addColumn("id", "varchar(255)", (e) => e.primaryKey()).addColumn("name", "varchar(255)").addColumn("audience", "varchar(255)").addColumn("sender_email", "varchar(255)").addColumn("sender_name", "varchar(255)").addColumn("language", "varchar(255)").addColumn("logo", "varchar(255)").addColumn("primary_color", "varchar(255)").addColumn("secondary_color", "varchar(255)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).execute(), await t.schema.createTable("users").addColumn("user_id", "varchar(255)", (e) => e.notNull()).addColumn(
8837
8837
  "tenant_id",
8838
8838
  "varchar(255)",
@@ -8900,35 +8900,35 @@ async function xd(t) {
8900
8900
  (e) => e.references("tenants.id").onDelete("cascade").notNull()
8901
8901
  ).addColumn("domain", "varchar(255)", (e) => e.notNull()).addColumn("email_service", "varchar(255)").addColumn("email_api_key", "varchar(255)").addColumn("dkim_private_key", "varchar(2048)").addColumn("dkim_public_key", "varchar(2048)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("updated_at", "varchar(255)", (e) => e.notNull()).execute();
8902
8902
  }
8903
- async function Nd(t) {
8903
+ async function kd(t) {
8904
8904
  await t.schema.dropTable("domains").execute(), await t.schema.dropTable("members").execute(), await t.schema.dropTable("users").execute(), await t.schema.dropTable("connections").execute(), await t.schema.dropTable("applications").execute(), await t.schema.dropTable("migrations").execute(), await t.schema.dropTable("tenants").execute();
8905
8905
  }
8906
- const kd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8906
+ const Cd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8907
8907
  __proto__: null,
8908
- down: Nd,
8909
- up: xd
8908
+ down: kd,
8909
+ up: Nd
8910
8910
  }, Symbol.toStringTag, { value: "Module" }));
8911
- async function Cd(t) {
8911
+ async function Td(t) {
8912
8912
  await t.schema.alterTable("tenants").addColumn("support_url", "varchar(255)").execute();
8913
8913
  }
8914
- async function Td(t) {
8914
+ async function Od(t) {
8915
8915
  await t.schema.alterTable("tenants").dropColumn("support_url").execute();
8916
8916
  }
8917
- const Od = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8917
+ const Sd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8918
8918
  __proto__: null,
8919
- down: Td,
8920
- up: Cd
8919
+ down: Od,
8920
+ up: Td
8921
8921
  }, Symbol.toStringTag, { value: "Module" }));
8922
- async function Sd(t) {
8923
- }
8924
8922
  async function jd(t) {
8925
8923
  }
8926
- const Id = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8924
+ async function Id(t) {
8925
+ }
8926
+ const Zd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8927
8927
  __proto__: null,
8928
- down: jd,
8929
- up: Sd
8928
+ down: Id,
8929
+ up: jd
8930
8930
  }, Symbol.toStringTag, { value: "Module" }));
8931
- async function Zd(t) {
8931
+ async function Ed(t) {
8932
8932
  await t.schema.createTable("logs").addColumn("id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn("category", "varchar(255)", (e) => e.notNull()).addColumn("tenant_id", "varchar(64)").addColumn("user_id", "varchar(64)").addForeignKeyConstraint(
8933
8933
  "tenant_id_constraint",
8934
8934
  ["tenant_id"],
@@ -8937,24 +8937,24 @@ async function Zd(t) {
8937
8937
  (e) => e.onDelete("cascade")
8938
8938
  ).addColumn("ip", "varchar(255)").addColumn("type", "varchar(8)", (e) => e.notNull()).addColumn("date", "varchar(25)", (e) => e.notNull()).addColumn("client_id", "varchar(255)").addColumn("client_name", "varchar(255)").addColumn("user_agent", "varchar(255)").addColumn("description", "varchar(255)").addColumn("details", "varchar(2048)").execute();
8939
8939
  }
8940
- async function Ed(t) {
8940
+ async function $d(t) {
8941
8941
  await t.schema.dropTable("logs").execute();
8942
8942
  }
8943
- const $d = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8943
+ const Pd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8944
8944
  __proto__: null,
8945
- down: Ed,
8946
- up: Zd
8945
+ down: $d,
8946
+ up: Ed
8947
8947
  }, Symbol.toStringTag, { value: "Module" }));
8948
- async function Pd(t) {
8949
- }
8950
8948
  async function Ad(t) {
8951
8949
  }
8952
- const Dd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8950
+ async function Dd(t) {
8951
+ }
8952
+ const Md = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8953
8953
  __proto__: null,
8954
- down: Ad,
8955
- up: Pd
8954
+ down: Dd,
8955
+ up: Ad
8956
8956
  }, Symbol.toStringTag, { value: "Module" }));
8957
- async function Md(t) {
8957
+ async function Rd(t) {
8958
8958
  await t.schema.createTable("sessions").addColumn("session_id", "varchar(255)", (e) => e.primaryKey()).addColumn(
8959
8959
  "client_id",
8960
8960
  "varchar(255)",
@@ -8983,15 +8983,15 @@ async function Md(t) {
8983
8983
  (e) => e.references("applications.id").onDelete("cascade").notNull()
8984
8984
  ).addColumn("code", "varchar(255)", (e) => e.notNull()).addColumn("email", "varchar(255)", (e) => e.notNull()).addColumn("user_id", "varchar(255)").addColumn("send", "varchar(255)").addColumn("nonce", "varchar(255)").addColumn("state", "varchar(1024)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute(), await t.schema.createIndex("otps_email_index").on("otps").column("email").execute(), await t.schema.createIndex("otps_expires_at_index").on("otps").column("expires_at").execute();
8985
8985
  }
8986
- async function Rd(t) {
8986
+ async function Ld(t) {
8987
8987
  await t.schema.dropTable("sessions").execute(), await t.schema.dropTable("tickets").execute(), await t.schema.dropTable("otps").execute();
8988
8988
  }
8989
- const Ld = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8989
+ const zd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
8990
8990
  __proto__: null,
8991
- down: Rd,
8992
- up: Md
8991
+ down: Ld,
8992
+ up: Rd
8993
8993
  }, Symbol.toStringTag, { value: "Module" }));
8994
- async function zd(t) {
8994
+ async function Ud(t) {
8995
8995
  await t.schema.createTable("passwords").addColumn("tenant_id", "varchar(255)").addColumn("user_id", "varchar(255)").addForeignKeyConstraint(
8996
8996
  "user_id_constraint",
8997
8997
  ["user_id", "tenant_id"],
@@ -9006,24 +9006,24 @@ async function zd(t) {
9006
9006
  (e) => e.onDelete("cascade")
9007
9007
  ).addColumn("type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute(), await t.schema.createIndex("codes_expires_at_index").on("codes").column("expires_at").execute();
9008
9008
  }
9009
- async function Ud(t) {
9009
+ async function Fd(t) {
9010
9010
  await t.schema.dropTable("passwords").execute(), await t.schema.dropTable("codes").execute();
9011
9011
  }
9012
- const Fd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9012
+ const Vd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9013
9013
  __proto__: null,
9014
- down: Ud,
9015
- up: zd
9014
+ down: Fd,
9015
+ up: Ud
9016
9016
  }, Symbol.toStringTag, { value: "Module" }));
9017
- async function Vd(t) {
9018
- }
9019
9017
  async function Bd(t) {
9020
9018
  }
9021
- const Kd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9019
+ async function Kd(t) {
9020
+ }
9021
+ const Jd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9022
9022
  __proto__: null,
9023
- down: Bd,
9024
- up: Vd
9023
+ down: Kd,
9024
+ up: Bd
9025
9025
  }, Symbol.toStringTag, { value: "Module" }));
9026
- async function Jd(t) {
9026
+ async function Wd(t) {
9027
9027
  await t.schema.alterTable("passwords").addColumn(
9028
9028
  "password",
9029
9029
  "varchar(255)",
@@ -9031,288 +9031,288 @@ async function Jd(t) {
9031
9031
  (e) => e.notNull()
9032
9032
  ).execute();
9033
9033
  }
9034
- async function Wd(t) {
9034
+ async function qd(t) {
9035
9035
  await t.schema.alterTable("passwords").dropColumn("password").execute();
9036
9036
  }
9037
- const qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9037
+ const Qd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9038
9038
  __proto__: null,
9039
- down: Wd,
9040
- up: Jd
9039
+ down: qd,
9040
+ up: Wd
9041
9041
  }, Symbol.toStringTag, { value: "Module" }));
9042
- async function Qd(t) {
9043
- }
9044
9042
  async function Gd(t) {
9045
9043
  }
9046
- const Hd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9044
+ async function Hd(t) {
9045
+ }
9046
+ const Yd = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9047
9047
  __proto__: null,
9048
- down: Gd,
9049
- up: Qd
9048
+ down: Hd,
9049
+ up: Gd
9050
9050
  }, Symbol.toStringTag, { value: "Module" }));
9051
- async function Yd(t) {
9052
- }
9053
9051
  async function Xd(t) {
9054
9052
  }
9055
- const ec = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9053
+ async function ec(t) {
9054
+ }
9055
+ const tc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9056
9056
  __proto__: null,
9057
- down: Xd,
9058
- up: Yd
9057
+ down: ec,
9058
+ up: Xd
9059
9059
  }, Symbol.toStringTag, { value: "Module" }));
9060
- async function tc(t) {
9061
- }
9062
9060
  async function nc(t) {
9063
9061
  }
9064
- const ac = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9062
+ async function ac(t) {
9063
+ }
9064
+ const rc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9065
9065
  __proto__: null,
9066
- down: nc,
9067
- up: tc
9066
+ down: ac,
9067
+ up: nc
9068
9068
  }, Symbol.toStringTag, { value: "Module" }));
9069
- async function rc(t) {
9069
+ async function sc(t) {
9070
9070
  await t.schema.createIndex("users_email_index").on("users").column("email").execute();
9071
9071
  }
9072
- async function sc(t) {
9072
+ async function ic(t) {
9073
9073
  await t.schema.dropIndex("users_email_index").execute();
9074
9074
  }
9075
- const ic = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9075
+ const oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9076
9076
  __proto__: null,
9077
- down: sc,
9078
- up: rc
9077
+ down: ic,
9078
+ up: sc
9079
9079
  }, Symbol.toStringTag, { value: "Module" }));
9080
- async function oc(t) {
9080
+ async function dc(t) {
9081
9081
  await t.schema.alterTable("users").addColumn("profileData", "varchar(2048)").execute();
9082
9082
  }
9083
- async function dc(t) {
9083
+ async function cc(t) {
9084
9084
  await t.schema.alterTable("users").dropColumn("profileData").execute();
9085
9085
  }
9086
- const cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9086
+ const lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9087
9087
  __proto__: null,
9088
- down: dc,
9089
- up: oc
9088
+ down: cc,
9089
+ up: dc
9090
9090
  }, Symbol.toStringTag, { value: "Module" }));
9091
- async function lc(t) {
9091
+ async function uc(t) {
9092
9092
  await t.schema.createIndex("users_linked_to_index").on("users").column("linked_to").execute();
9093
9093
  }
9094
- async function uc(t) {
9094
+ async function hc(t) {
9095
9095
  await t.schema.dropIndex("users_linked_to_index");
9096
9096
  }
9097
- const hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9097
+ const pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9098
9098
  __proto__: null,
9099
- down: uc,
9100
- up: lc
9099
+ down: hc,
9100
+ up: uc
9101
9101
  }, Symbol.toStringTag, { value: "Module" }));
9102
9102
  async function mc(t) {
9103
9103
  await t.schema.alterTable("users").addColumn("locale", "varchar(255)").execute();
9104
9104
  }
9105
- async function pc(t) {
9105
+ async function fc(t) {
9106
9106
  await t.schema.alterTable("users").dropColumn("locale").execute();
9107
9107
  }
9108
- const fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9108
+ const _c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9109
9109
  __proto__: null,
9110
- down: pc,
9110
+ down: fc,
9111
9111
  up: mc
9112
9112
  }, Symbol.toStringTag, { value: "Module" }));
9113
- async function _c(t) {
9113
+ async function gc(t) {
9114
9114
  await t.schema.createTable("keys").addColumn("kid", "varchar(255)", (e) => e.primaryKey()).addColumn(
9115
9115
  "tenant_id",
9116
9116
  "varchar(255)",
9117
9117
  (e) => e.references("tenants.id").onDelete("cascade")
9118
9118
  ).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("revoked_at", "varchar(255)").addColumn("cert", "varchar(2048)").addColumn("pkcs7", "varchar(2048)").addColumn("fingerprint", "varchar(256)").addColumn("thumbprint", "varchar(256)").addColumn("current_since", "varchar(256)").addColumn("current_until", "varchar(256)").execute();
9119
9119
  }
9120
- async function gc(t) {
9120
+ async function yc(t) {
9121
9121
  await t.schema.dropTable("keys").execute();
9122
9122
  }
9123
- const yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9123
+ const vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9124
9124
  __proto__: null,
9125
- down: gc,
9126
- up: _c
9125
+ down: yc,
9126
+ up: gc
9127
9127
  }, Symbol.toStringTag, { value: "Module" }));
9128
- async function vc(t) {
9129
- }
9130
9128
  async function bc(t) {
9131
9129
  }
9132
- const wc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9130
+ async function wc(t) {
9131
+ }
9132
+ const xc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9133
9133
  __proto__: null,
9134
- down: bc,
9135
- up: vc
9134
+ down: wc,
9135
+ up: bc
9136
9136
  }, Symbol.toStringTag, { value: "Module" }));
9137
- async function xc(t) {
9138
- }
9139
9137
  async function Nc(t) {
9140
9138
  }
9141
- const kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9139
+ async function kc(t) {
9140
+ }
9141
+ const Cc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9142
9142
  __proto__: null,
9143
- down: Nc,
9144
- up: xc
9143
+ down: kc,
9144
+ up: Nc
9145
9145
  }, Symbol.toStringTag, { value: "Module" }));
9146
- async function Cc(t) {
9146
+ async function Tc(t) {
9147
9147
  await t.schema.alterTable("otps").addColumn("audience", "varchar(255)").execute();
9148
9148
  }
9149
- async function Tc(t) {
9149
+ async function Oc(t) {
9150
9150
  await t.schema.alterTable("otps").dropColumn("audience").execute();
9151
9151
  }
9152
- const Oc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9152
+ const Sc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9153
9153
  __proto__: null,
9154
- down: Tc,
9155
- up: Cc
9154
+ down: Oc,
9155
+ up: Tc
9156
9156
  }, Symbol.toStringTag, { value: "Module" }));
9157
- async function Sc(t) {
9158
- }
9159
9157
  async function jc(t) {
9160
9158
  }
9161
- const Ic = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9159
+ async function Ic(t) {
9160
+ }
9161
+ const Zc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9162
9162
  __proto__: null,
9163
- down: jc,
9164
- up: Sc
9163
+ down: Ic,
9164
+ up: jc
9165
9165
  }, Symbol.toStringTag, { value: "Module" }));
9166
- async function Zc(t) {
9166
+ async function Ec(t) {
9167
9167
  await t.schema.alterTable("logs").dropColumn("category").execute();
9168
9168
  }
9169
- async function Ec(t) {
9169
+ async function $c(t) {
9170
9170
  await t.schema.alterTable("logs").addColumn("category", "varchar(255)", (e) => e.notNull()).execute();
9171
9171
  }
9172
- const $c = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9172
+ const Pc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9173
9173
  __proto__: null,
9174
- down: Ec,
9175
- up: Zc
9174
+ down: $c,
9175
+ up: Ec
9176
9176
  }, Symbol.toStringTag, { value: "Module" }));
9177
- async function Pc(t) {
9177
+ async function Ac(t) {
9178
9178
  await t.schema.alterTable("users").dropColumn("tags").execute();
9179
9179
  }
9180
- async function Ac(t) {
9180
+ async function Dc(t) {
9181
9181
  await t.schema.alterTable("users").addColumn("tags", "varchar(255)").execute();
9182
9182
  }
9183
- const Dc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9183
+ const Mc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9184
9184
  __proto__: null,
9185
- down: Ac,
9186
- up: Pc
9185
+ down: Dc,
9186
+ up: Ac
9187
9187
  }, Symbol.toStringTag, { value: "Module" }));
9188
- async function Mc(t) {
9188
+ async function Rc(t) {
9189
9189
  await t.schema.createIndex("logs_user_id").on("logs").column("user_id").execute(), await t.schema.createIndex("logs_tenant_id").on("logs").column("tenant_id").execute(), await t.schema.createIndex("logs_date").on("logs").column("date").execute();
9190
9190
  }
9191
- async function Rc(t) {
9191
+ async function Lc(t) {
9192
9192
  await t.schema.dropIndex("logs_user_id"), await t.schema.dropIndex("logs_tenant_id"), await t.schema.dropIndex("logs_date");
9193
9193
  }
9194
- const Lc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9194
+ const zc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9195
9195
  __proto__: null,
9196
- down: Rc,
9197
- up: Mc
9196
+ down: Lc,
9197
+ up: Rc
9198
9198
  }, Symbol.toStringTag, { value: "Module" }));
9199
- async function zc(t) {
9199
+ async function Uc(t) {
9200
9200
  await t.schema.alterTable("logs").dropColumn("details").execute(), await t.schema.alterTable("logs").addColumn("details", "varchar(8192)").execute();
9201
9201
  }
9202
- async function Uc(t) {
9202
+ async function Fc(t) {
9203
9203
  await t.schema.alterTable("logs").dropColumn("details").execute(), await t.schema.alterTable("logs").addColumn("details", "varchar(2048)").execute();
9204
9204
  }
9205
- const Fc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9205
+ const Vc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9206
9206
  __proto__: null,
9207
- down: Uc,
9208
- up: zc
9207
+ down: Fc,
9208
+ up: Uc
9209
9209
  }, Symbol.toStringTag, { value: "Module" }));
9210
- async function Vc(t) {
9210
+ async function Bc(t) {
9211
9211
  await t.schema.alterTable("logs").addColumn("user_name", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("auth0_client", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("isMobile", "boolean").execute(), await t.schema.alterTable("logs").addColumn("connection", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("connection_id", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("audience", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("scope", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("strategy", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("strategy_type", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("hostname", "varchar(255)").execute(), await t.schema.alterTable("logs").addColumn("session_connection", "varchar(255)").execute();
9212
9212
  }
9213
- async function Bc(t) {
9213
+ async function Kc(t) {
9214
9214
  await t.schema.alterTable("logs").dropColumn("user_name").execute(), await t.schema.alterTable("logs").dropColumn("auth0_client").execute(), await t.schema.alterTable("logs").dropColumn("isMobile").execute(), await t.schema.alterTable("logs").dropColumn("connection").execute(), await t.schema.alterTable("logs").dropColumn("connection_id").execute(), await t.schema.alterTable("logs").dropColumn("audience").execute(), await t.schema.alterTable("logs").dropColumn("scope").execute(), await t.schema.alterTable("logs").dropColumn("strategy").execute(), await t.schema.alterTable("logs").dropColumn("strategy_type").execute(), await t.schema.alterTable("logs").dropColumn("hostname").execute(), await t.schema.alterTable("logs").dropColumn("session_connection").execute();
9215
9215
  }
9216
- const Kc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9216
+ const Jc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9217
9217
  __proto__: null,
9218
- down: Bc,
9219
- up: Vc
9218
+ down: Kc,
9219
+ up: Bc
9220
9220
  }, Symbol.toStringTag, { value: "Module" }));
9221
- async function Jc(t) {
9221
+ async function Wc(t) {
9222
9222
  await t.schema.createIndex("users_name_index").on("users").column("name").execute();
9223
9223
  }
9224
- async function Wc(t) {
9224
+ async function qc(t) {
9225
9225
  await t.schema.dropIndex("users_name_index").execute();
9226
9226
  }
9227
- const qc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9227
+ const Qc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9228
9228
  __proto__: null,
9229
- down: Wc,
9230
- up: Jc
9229
+ down: qc,
9230
+ up: Wc
9231
9231
  }, Symbol.toStringTag, { value: "Module" }));
9232
- async function Qc(t) {
9233
- }
9234
9232
  async function Gc(t) {
9233
+ }
9234
+ async function Hc(t) {
9235
9235
  await t.schema.alterTable("users").dropConstraint("unique_email_provider").execute();
9236
9236
  }
9237
- const Hc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9237
+ const Yc = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9238
9238
  __proto__: null,
9239
- down: Gc,
9240
- up: Qc
9239
+ down: Hc,
9240
+ up: Gc
9241
9241
  }, Symbol.toStringTag, { value: "Module" }));
9242
- async function Yc(t) {
9242
+ async function Xc(t) {
9243
9243
  await t.schema.alterTable("otps").dropColumn("state").execute(), await t.schema.alterTable("otps").addColumn("state", "varchar(8192)").execute();
9244
9244
  }
9245
- async function Xc(t) {
9245
+ async function el(t) {
9246
9246
  await t.schema.alterTable("otps").dropColumn("state").execute(), await t.schema.alterTable("otps").addColumn("state", "varchar(1024)").execute();
9247
9247
  }
9248
- const el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9248
+ const tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9249
9249
  __proto__: null,
9250
- down: Xc,
9251
- up: Yc
9250
+ down: el,
9251
+ up: Xc
9252
9252
  }, Symbol.toStringTag, { value: "Module" }));
9253
- async function tl(t) {
9253
+ async function nl(t) {
9254
9254
  await t.schema.alterTable("tickets").dropColumn("state").execute(), await t.schema.alterTable("tickets").addColumn("state", "varchar(8192)").execute();
9255
9255
  }
9256
- async function nl(t) {
9256
+ async function al(t) {
9257
9257
  await t.schema.alterTable("tickets").dropColumn("state").execute(), await t.schema.alterTable("tickets").addColumn("state", "varchar(1024)").execute();
9258
9258
  }
9259
- const al = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9259
+ const rl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9260
9260
  __proto__: null,
9261
- down: nl,
9262
- up: tl
9261
+ down: al,
9262
+ up: nl
9263
9263
  }, Symbol.toStringTag, { value: "Module" }));
9264
- async function rl(t) {
9264
+ async function sl(t) {
9265
9265
  await t.schema.createTable("branding").addColumn(
9266
9266
  "tenant_id",
9267
9267
  "varchar(255)",
9268
9268
  (e) => e.references("tenants.id").onDelete("cascade").notNull().primaryKey()
9269
9269
  ).addColumn("logo_url", "varchar(512)").addColumn("favicon_url", "varchar(512)").addColumn("font_url", "varchar(512)").addColumn("colors_primary", "varchar(8)").addColumn("colors_page_background_type", "varchar(32)").addColumn("colors_page_background_start", "varchar(8)").addColumn("colors_page_background_end", "varchar(8)").addColumn("colors_page_background_angle_dev", "integer").execute();
9270
9270
  }
9271
- async function sl(t) {
9271
+ async function il(t) {
9272
9272
  await t.schema.dropTable("branding").execute();
9273
9273
  }
9274
- const il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9274
+ const ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9275
9275
  __proto__: null,
9276
- down: sl,
9277
- up: rl
9276
+ down: il,
9277
+ up: sl
9278
9278
  }, Symbol.toStringTag, { value: "Module" }));
9279
- async function ol(t) {
9280
- }
9281
9279
  async function dl(t) {
9282
9280
  }
9283
- const cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9281
+ async function cl(t) {
9282
+ }
9283
+ const ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9284
9284
  __proto__: null,
9285
- down: dl,
9286
- up: ol
9285
+ down: cl,
9286
+ up: dl
9287
9287
  }, Symbol.toStringTag, { value: "Module" }));
9288
- async function ll(t) {
9289
- }
9290
9288
  async function ul(t) {
9291
9289
  }
9292
- const hl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9290
+ async function hl(t) {
9291
+ }
9292
+ const pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9293
9293
  __proto__: null,
9294
- down: ul,
9295
- up: ll
9294
+ down: hl,
9295
+ up: ul
9296
9296
  }, Symbol.toStringTag, { value: "Module" }));
9297
9297
  async function ml(t) {
9298
9298
  }
9299
- async function pl(t) {
9299
+ async function fl(t) {
9300
9300
  }
9301
- const fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9301
+ const _l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9302
9302
  __proto__: null,
9303
- down: pl,
9303
+ down: fl,
9304
9304
  up: ml
9305
9305
  }, Symbol.toStringTag, { value: "Module" }));
9306
- async function _l(t) {
9307
- }
9308
9306
  async function gl(t) {
9309
9307
  }
9310
- const yl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9308
+ async function yl(t) {
9309
+ }
9310
+ const vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9311
9311
  __proto__: null,
9312
- down: gl,
9313
- up: _l
9312
+ down: yl,
9313
+ up: gl
9314
9314
  }, Symbol.toStringTag, { value: "Module" }));
9315
- async function vl(t) {
9315
+ async function bl(t) {
9316
9316
  await t.schema.createTable("authentication_codes").addColumn(
9317
9317
  "tenant_id",
9318
9318
  "varchar(255)",
@@ -9323,55 +9323,55 @@ async function vl(t) {
9323
9323
  (e) => e.references("applications.id").onDelete("cascade").notNull()
9324
9324
  ).addColumn("user_id", "varchar(255)", (e) => e.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(8192)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
9325
9325
  }
9326
- async function bl(t) {
9326
+ async function wl(t) {
9327
9327
  await t.schema.dropTable("authentication_codes").execute();
9328
9328
  }
9329
- const wl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9329
+ const xl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9330
9330
  __proto__: null,
9331
- down: bl,
9332
- up: vl
9331
+ down: wl,
9332
+ up: bl
9333
9333
  }, Symbol.toStringTag, { value: "Module" }));
9334
- async function xl(t) {
9335
- }
9336
9334
  async function Nl(t) {
9337
9335
  }
9338
- const kl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9336
+ async function kl(t) {
9337
+ }
9338
+ const Cl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9339
9339
  __proto__: null,
9340
- down: Nl,
9341
- up: xl
9340
+ down: kl,
9341
+ up: Nl
9342
9342
  }, Symbol.toStringTag, { value: "Module" }));
9343
- async function Cl(t) {
9343
+ async function Tl(t) {
9344
9344
  await t.schema.alterTable("otps").addColumn("ip", "varchar(64)").execute();
9345
9345
  }
9346
- async function Tl(t) {
9346
+ async function Ol(t) {
9347
9347
  await t.schema.alterTable("otps").dropColumn("ip").execute();
9348
9348
  }
9349
- const Ol = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9349
+ const Sl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9350
9350
  __proto__: null,
9351
- down: Tl,
9352
- up: Cl
9351
+ down: Ol,
9352
+ up: Tl
9353
9353
  }, Symbol.toStringTag, { value: "Module" }));
9354
- async function Sl(t) {
9354
+ async function jl(t) {
9355
9355
  await t.schema.alterTable("logs").dropColumn("user_agent").execute(), await t.schema.alterTable("logs").addColumn("user_agent", "varchar(1024)").execute();
9356
9356
  }
9357
- async function jl(t) {
9357
+ async function Il(t) {
9358
9358
  await t.schema.alterTable("logs").dropColumn("user_agent").execute(), await t.schema.alterTable("logs").addColumn("user_agent", "varchar(255)").execute();
9359
9359
  }
9360
- const Il = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9360
+ const Zl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9361
9361
  __proto__: null,
9362
- down: jl,
9363
- up: Sl
9362
+ down: Il,
9363
+ up: jl
9364
9364
  }, Symbol.toStringTag, { value: "Module" }));
9365
- async function Zl(t) {
9366
- }
9367
9365
  async function El(t) {
9368
9366
  }
9369
- const $l = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9367
+ async function $l(t) {
9368
+ }
9369
+ const Pl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9370
9370
  __proto__: null,
9371
- down: El,
9372
- up: Zl
9371
+ down: $l,
9372
+ up: El
9373
9373
  }, Symbol.toStringTag, { value: "Module" }));
9374
- async function Pl(t) {
9374
+ async function Al(t) {
9375
9375
  await t.schema.createTable("hooks").addColumn("hook_id", "varchar(255)", (e) => e.notNull().primaryKey()).addColumn(
9376
9376
  "tenant_id",
9377
9377
  "varchar(255)",
@@ -9382,33 +9382,33 @@ async function Pl(t) {
9382
9382
  (e) => e.defaultTo(!1).notNull()
9383
9383
  ).addColumn("priority", "integer").execute();
9384
9384
  }
9385
- async function Al(t) {
9385
+ async function Dl(t) {
9386
9386
  await t.schema.dropTable("hooks").execute();
9387
9387
  }
9388
- const Dl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9388
+ const Ml = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9389
9389
  __proto__: null,
9390
- down: Al,
9391
- up: Pl
9390
+ down: Dl,
9391
+ up: Al
9392
9392
  }, Symbol.toStringTag, { value: "Module" }));
9393
- async function Ml(t) {
9394
- }
9395
9393
  async function Rl(t) {
9396
9394
  }
9397
- const Ll = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9395
+ async function Ll(t) {
9396
+ }
9397
+ const zl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9398
9398
  __proto__: null,
9399
- down: Rl,
9400
- up: Ml
9399
+ down: Ll,
9400
+ up: Rl
9401
9401
  }, Symbol.toStringTag, { value: "Module" }));
9402
- async function zl(t) {
9403
- }
9404
9402
  async function Ul(t) {
9405
9403
  }
9406
- const Fl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9404
+ async function Fl(t) {
9405
+ }
9406
+ const Vl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9407
9407
  __proto__: null,
9408
- down: Ul,
9409
- up: zl
9408
+ down: Fl,
9409
+ up: Ul
9410
9410
  }, Symbol.toStringTag, { value: "Module" }));
9411
- async function Vl(t) {
9411
+ async function Bl(t) {
9412
9412
  await t.schema.createTable("logins").addColumn("login_id", "varchar(255)", (e) => e.primaryKey()).addColumn(
9413
9413
  "tenant_id",
9414
9414
  "varchar(255)",
@@ -9425,7 +9425,7 @@ async function Vl(t) {
9425
9425
  (e) => e.onDelete("cascade")
9426
9426
  ).addColumn("code_type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
9427
9427
  }
9428
- async function Bl(t) {
9428
+ async function Kl(t) {
9429
9429
  await t.schema.dropTable("logins").execute(), await t.schema.alterTable("passwords").dropColumn("algorithm").execute(), await t.schema.dropTable("codes").execute(), await t.schema.createTable("codes").addColumn("id", "varchar(255)", (e) => e.primaryKey()).addColumn("code", "varchar(255)", (e) => e.notNull()).addColumn("user_id", "varchar(255)").addColumn("tenant_id", "varchar(255)").addForeignKeyConstraint(
9430
9430
  "codes_user_id_tenant_id_constraint",
9431
9431
  ["user_id", "tenant_id"],
@@ -9434,90 +9434,90 @@ async function Bl(t) {
9434
9434
  (e) => e.onDelete("cascade")
9435
9435
  ).addColumn("type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
9436
9436
  }
9437
- const Kl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9437
+ const Jl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9438
9438
  __proto__: null,
9439
- down: Bl,
9440
- up: Vl
9439
+ down: Kl,
9440
+ up: Bl
9441
9441
  }, Symbol.toStringTag, { value: "Module" }));
9442
- async function Jl(t) {
9443
- }
9444
9442
  async function Wl(t) {
9445
9443
  }
9446
- const ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9444
+ async function ql(t) {
9445
+ }
9446
+ const Ql = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9447
9447
  __proto__: null,
9448
- down: Wl,
9449
- up: Jl
9448
+ down: ql,
9449
+ up: Wl
9450
9450
  }, Symbol.toStringTag, { value: "Module" }));
9451
- async function Ql(t) {
9451
+ async function Gl(t) {
9452
9452
  await t.schema.alterTable("logins").addColumn("auth0Client", "varchar(256)").execute();
9453
9453
  }
9454
- async function Gl(t) {
9454
+ async function Hl(t) {
9455
9455
  await t.schema.alterTable("logins").dropColumn("auth0Client").execute();
9456
9456
  }
9457
- const Hl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9457
+ const Yl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9458
9458
  __proto__: null,
9459
- down: Gl,
9460
- up: Ql
9459
+ down: Hl,
9460
+ up: Gl
9461
9461
  }, Symbol.toStringTag, { value: "Module" }));
9462
- async function Yl(t) {
9462
+ async function Xl(t) {
9463
9463
  await t.schema.alterTable("logins").dropColumn("authParams_state").execute(), await t.schema.alterTable("logins").addColumn("authParams_state", "varchar(8192)").execute();
9464
9464
  }
9465
- async function Xl(t) {
9465
+ async function eu(t) {
9466
9466
  await t.schema.alterTable("logins").dropColumn("authParams_state").execute(), await t.schema.alterTable("logins").addColumn("authParams_state", "varchar(511)").execute();
9467
9467
  }
9468
- const eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9468
+ const tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9469
9469
  __proto__: null,
9470
- down: Xl,
9471
- up: Yl
9470
+ down: eu,
9471
+ up: Xl
9472
9472
  }, Symbol.toStringTag, { value: "Module" }));
9473
- async function tu(t) {
9474
- }
9475
9473
  async function nu(t) {
9476
9474
  }
9477
- const au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9475
+ async function au(t) {
9476
+ }
9477
+ const ru = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9478
9478
  __proto__: null,
9479
- down: nu,
9480
- up: tu
9479
+ down: au,
9480
+ up: nu
9481
9481
  }, Symbol.toStringTag, { value: "Module" }));
9482
- async function ru(t) {
9483
- }
9484
9482
  async function su(t) {
9485
9483
  }
9486
- const iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9484
+ async function iu(t) {
9485
+ }
9486
+ const ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9487
9487
  __proto__: null,
9488
- down: su,
9489
- up: ru
9488
+ down: iu,
9489
+ up: su
9490
9490
  }, Symbol.toStringTag, { value: "Module" }));
9491
- async function ou(t) {
9491
+ async function du(t) {
9492
9492
  await t.schema.alterTable("logins").addColumn("authParams_nonce", "varchar(255)").execute();
9493
9493
  }
9494
- async function du(t) {
9494
+ async function cu(t) {
9495
9495
  await t.schema.alterTable("logins").dropColumn("nonce").execute();
9496
9496
  }
9497
- const cu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9497
+ const lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9498
9498
  __proto__: null,
9499
- down: du,
9500
- up: ou
9499
+ down: cu,
9500
+ up: du
9501
9501
  }, Symbol.toStringTag, { value: "Module" }));
9502
- async function lu(t) {
9503
- }
9504
9502
  async function uu(t) {
9505
9503
  }
9506
- const hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9504
+ async function hu(t) {
9505
+ }
9506
+ const pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9507
9507
  __proto__: null,
9508
- down: uu,
9509
- up: lu
9508
+ down: hu,
9509
+ up: uu
9510
9510
  }, Symbol.toStringTag, { value: "Module" }));
9511
9511
  async function mu(t) {
9512
9512
  }
9513
- async function pu(t) {
9513
+ async function fu(t) {
9514
9514
  }
9515
- const fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9515
+ const _u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9516
9516
  __proto__: null,
9517
- down: pu,
9517
+ down: fu,
9518
9518
  up: mu
9519
9519
  }, Symbol.toStringTag, { value: "Module" }));
9520
- async function _u(t) {
9520
+ async function gu(t) {
9521
9521
  await t.schema.dropTable("codes").execute(), await t.schema.createTable("codes").addColumn("code_id", "varchar(255)", (e) => e.notNull()).addColumn(
9522
9522
  "tenant_id",
9523
9523
  "varchar(255)",
@@ -9533,7 +9533,7 @@ async function _u(t) {
9533
9533
  "code_type"
9534
9534
  ]).execute();
9535
9535
  }
9536
- async function gu(t) {
9536
+ async function yu(t) {
9537
9537
  await t.schema.dropTable("codes").execute(), await t.schema.createTable("codes").addColumn("code_id", "varchar(255)", (e) => e.primaryKey()).addColumn(
9538
9538
  "tenant_id",
9539
9539
  "varchar(255)",
@@ -9546,15 +9546,15 @@ async function gu(t) {
9546
9546
  (e) => e.onDelete("cascade")
9547
9547
  ).addColumn("code_type", "varchar(255)", (e) => e.notNull()).addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
9548
9548
  }
9549
- const yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9549
+ const vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9550
9550
  __proto__: null,
9551
- down: gu,
9552
- up: _u
9551
+ down: yu,
9552
+ up: gu
9553
9553
  }, Symbol.toStringTag, { value: "Module" }));
9554
- async function vu(t) {
9554
+ async function bu(t) {
9555
9555
  await t.schema.dropTable("otps").execute(), await t.schema.dropTable("authentication_codes").execute();
9556
9556
  }
9557
- async function bu(t) {
9557
+ async function wu(t) {
9558
9558
  await t.schema.alterTable("keys").addColumn("private_key", "varchar(2048)").addColumn("public_key", "varchar(2048)").execute(), await t.schema.createTable("otps").addColumn(
9559
9559
  "tenant_id",
9560
9560
  "varchar(255)",
@@ -9573,32 +9573,32 @@ async function bu(t) {
9573
9573
  (e) => e.references("applications.id").onDelete("cascade").notNull()
9574
9574
  ).addColumn("user_id", "varchar(255)", (e) => e.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(8192)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
9575
9575
  }
9576
- const wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9576
+ const xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9577
9577
  __proto__: null,
9578
- down: bu,
9579
- up: vu
9578
+ down: wu,
9579
+ up: bu
9580
9580
  }, Symbol.toStringTag, { value: "Module" }));
9581
- async function xu(t) {
9581
+ async function Nu(t) {
9582
9582
  await t.schema.createIndex("IDX_logs_tenant_date_type_user").on("logs").columns(["tenant_id", "date", "type", "user_id"]).execute();
9583
9583
  }
9584
- async function Nu(t) {
9584
+ async function ku(t) {
9585
9585
  await t.schema.dropIndex("IDX_logs_tenant_date_type_user").on("logs").execute();
9586
9586
  }
9587
- const ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9587
+ const Cu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9588
9588
  __proto__: null,
9589
- down: Nu,
9590
- up: xu
9589
+ down: ku,
9590
+ up: Nu
9591
9591
  }, Symbol.toStringTag, { value: "Module" }));
9592
- async function Cu(t) {
9593
- }
9594
9592
  async function Tu(t) {
9595
9593
  }
9596
- const Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9594
+ async function Ou(t) {
9595
+ }
9596
+ const Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9597
9597
  __proto__: null,
9598
- down: Tu,
9599
- up: Cu
9598
+ down: Ou,
9599
+ up: Tu
9600
9600
  }, Symbol.toStringTag, { value: "Module" }));
9601
- async function Su(t) {
9601
+ async function ju(t) {
9602
9602
  await t.schema.createTable("prompt_settings").addColumn("tenant_id", "varchar(64)", (e) => e.primaryKey()).addColumn(
9603
9603
  "universal_login_experience",
9604
9604
  "varchar(16)",
@@ -9617,95 +9617,95 @@ async function Su(t) {
9617
9617
  (e) => e.defaultTo(!1).notNull()
9618
9618
  ).execute();
9619
9619
  }
9620
- async function ju(t) {
9620
+ async function Iu(t) {
9621
9621
  await t.schema.dropTable("prompt_settings").execute();
9622
9622
  }
9623
- const Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9623
+ const Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9624
9624
  __proto__: null,
9625
- down: ju,
9626
- up: Su
9625
+ down: Iu,
9626
+ up: ju
9627
9627
  }, Symbol.toStringTag, { value: "Module" }));
9628
- async function Zu(t) {
9629
- }
9630
9628
  async function Eu(t) {
9631
9629
  }
9632
- const $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9630
+ async function $u(t) {
9631
+ }
9632
+ const Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9633
9633
  __proto__: null,
9634
- down: Eu,
9635
- up: Zu
9634
+ down: $u,
9635
+ up: Eu
9636
9636
  }, Symbol.toStringTag, { value: "Module" }));
9637
- async function Pu(t) {
9638
- }
9639
9637
  async function Au(t) {
9640
9638
  }
9641
- const Du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9639
+ async function Du(t) {
9640
+ }
9641
+ const Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9642
9642
  __proto__: null,
9643
- down: Au,
9644
- up: Pu
9643
+ down: Du,
9644
+ up: Au
9645
9645
  }, Symbol.toStringTag, { value: "Module" }));
9646
- async function Mu(t) {
9647
- }
9648
9646
  async function Ru(t) {
9649
9647
  }
9650
- const Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9648
+ async function Lu(t) {
9649
+ }
9650
+ const zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9651
9651
  __proto__: null,
9652
- down: Ru,
9653
- up: Mu
9652
+ down: Lu,
9653
+ up: Ru
9654
9654
  }, Symbol.toStringTag, { value: "Module" }));
9655
- async function zu(t) {
9655
+ async function Uu(t) {
9656
9656
  await t.schema.alterTable("logins").addColumn("authParams_ui_locales", "varchar(32)").execute();
9657
9657
  }
9658
- async function Uu(t) {
9658
+ async function Fu(t) {
9659
9659
  await t.schema.alterTable("logins").dropColumn("authParams_ui_locales").execute();
9660
9660
  }
9661
- const Fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9661
+ const Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9662
9662
  __proto__: null,
9663
- down: Uu,
9664
- up: zu
9663
+ down: Fu,
9664
+ up: Uu
9665
9665
  }, Symbol.toStringTag, { value: "Module" }));
9666
- async function Vu(t) {
9666
+ async function Bu(t) {
9667
9667
  await t.schema.alterTable("logins").addColumn("authParams_prompt", "varchar(16)").execute();
9668
9668
  }
9669
- async function Bu(t) {
9669
+ async function Ku(t) {
9670
9670
  await t.schema.alterTable("logins").dropColumn("authParams_prompt").execute();
9671
9671
  }
9672
- const Ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9672
+ const Ju = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9673
9673
  __proto__: null,
9674
- down: Bu,
9675
- up: Vu
9674
+ down: Ku,
9675
+ up: Bu
9676
9676
  }, Symbol.toStringTag, { value: "Module" }));
9677
- async function Ju(t) {
9678
- }
9679
9677
  async function Wu(t) {
9680
9678
  }
9681
- const qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9679
+ async function qu(t) {
9680
+ }
9681
+ const Qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9682
9682
  __proto__: null,
9683
- down: Wu,
9684
- up: Ju
9683
+ down: qu,
9684
+ up: Wu
9685
9685
  }, Symbol.toStringTag, { value: "Module" }));
9686
- async function Qu(t) {
9686
+ async function Gu(t) {
9687
9687
  await t.schema.alterTable("logins").addColumn("authParams_act_as", "varchar(255)").execute();
9688
9688
  }
9689
- async function Gu(t) {
9689
+ async function Hu(t) {
9690
9690
  await t.schema.alterTable("logins").dropColumn("authParam_act_as").execute();
9691
9691
  }
9692
- const Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9692
+ const Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9693
9693
  __proto__: null,
9694
- down: Gu,
9695
- up: Qu
9694
+ down: Hu,
9695
+ up: Gu
9696
9696
  }, Symbol.toStringTag, { value: "Module" }));
9697
- async function Yu(t) {
9697
+ async function Xu(t) {
9698
9698
  await t.schema.alterTable("codes").addColumn("code_verifier", "varchar(128)").execute();
9699
9699
  }
9700
- async function Xu(t) {
9700
+ async function eh(t) {
9701
9701
  await t.schema.alterTable("codes").dropColumn("code_verifier").execute();
9702
9702
  }
9703
- const eh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9703
+ const th = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9704
9704
  __proto__: null,
9705
- down: Xu,
9706
- up: Yu
9705
+ down: eh,
9706
+ up: Xu
9707
9707
  }, Symbol.toStringTag, { value: "Module" }));
9708
- async function th(t) {
9708
+ async function nh(t) {
9709
9709
  await t.schema.createTable("email_providers").addColumn("tenant_id", "varchar(255)", (e) => e.primaryKey()).addColumn("name", "varchar(255)", (e) => e.notNull()).addColumn("enabled", "boolean", (e) => e.notNull()).addColumn("default_from_address", "varchar(255)").addColumn(
9710
9710
  "credentials",
9711
9711
  "varchar(2048)",
@@ -9716,18 +9716,18 @@ async function th(t) {
9716
9716
  (e) => e.notNull().defaultTo("{}")
9717
9717
  ).addColumn("created_at", "varchar(29)", (e) => e.notNull()).addColumn("updated_at", "varchar(29)", (e) => e.notNull()).execute();
9718
9718
  }
9719
- async function nh(t) {
9719
+ async function ah(t) {
9720
9720
  await t.schema.dropTable("email_providers").execute();
9721
9721
  }
9722
- const ah = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9722
+ const rh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9723
9723
  __proto__: null,
9724
- down: nh,
9725
- up: th
9724
+ down: ah,
9725
+ up: nh
9726
9726
  }, Symbol.toStringTag, { value: "Module" }));
9727
- async function rh(t) {
9727
+ async function sh(t) {
9728
9728
  await t.schema.dropTable("tickets").execute();
9729
9729
  }
9730
- async function sh(t) {
9730
+ async function ih(t) {
9731
9731
  await t.schema.createTable("tickets").addColumn(
9732
9732
  "tenant_id",
9733
9733
  "varchar(255)",
@@ -9738,93 +9738,93 @@ async function sh(t) {
9738
9738
  (e) => e.references("applications.id").onDelete("cascade").notNull()
9739
9739
  ).addColumn("email", "varchar(255)", (e) => e.notNull()).addColumn("nonce", "varchar(255)").addColumn("state", "varchar(1024)").addColumn("scope", "varchar(1024)").addColumn("response_type", "varchar(256)").addColumn("response_mode", "varchar(256)").addColumn("redirect_uri", "varchar(1024)").addColumn("created_at", "varchar(255)", (e) => e.notNull()).addColumn("expires_at", "varchar(255)", (e) => e.notNull()).addColumn("used_at", "varchar(255)").execute();
9740
9740
  }
9741
- const ih = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9741
+ const oh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9742
9742
  __proto__: null,
9743
- down: sh,
9744
- up: rh
9743
+ down: ih,
9744
+ up: sh
9745
9745
  }, Symbol.toStringTag, { value: "Module" }));
9746
- async function oh(t) {
9747
- }
9748
9746
  async function dh(t) {
9747
+ }
9748
+ async function ch(t) {
9749
9749
  await t.schema.alterTable("logins").dropColumn("ip").dropColumn("useragent").execute();
9750
9750
  }
9751
- const ch = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9751
+ const lh = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
9752
9752
  __proto__: null,
9753
- down: dh,
9754
- up: oh
9755
- }, Symbol.toStringTag, { value: "Module" })), Ja = {
9756
- m1_init: kd,
9757
- m2_magicLink: Od,
9758
- m3_updateAt: Id,
9759
- m4_logTable: $d,
9760
- m5_userProfile: Dd,
9761
- m6_sessions: Ld,
9762
- m7_passwords: Fd,
9763
- m8_logsTableNewFields: Kd,
9764
- m9_passwordTableNewField: qd,
9765
- n01_codesTable: Hd,
9766
- n11_universalLoginSession: ec,
9767
- n12_userFields: ac,
9768
- n13_userEmailIndex: ic,
9769
- n14_profileDataField: cc,
9770
- n15_userEmailIndex: hc,
9771
- n16_userLocale: fc,
9772
- n17_signingKeys: yc,
9773
- n18_logsFields: wc,
9774
- n19_connectionsUserinfo: kc,
9775
- n20_missingFields: Oc,
9776
- n21_sessionDeletedAt: Ic,
9777
- n22_dropLogsFields: $c,
9778
- n23_dropUsersFields: Dc,
9779
- n24_logsIndexes: Lc,
9780
- n25_logDescMaxLength: Fc,
9781
- n26_logsTableExtraFields: Kc,
9782
- n27_usersTableNameIndex: qc,
9783
- n28_usersEmailConstrain: Hc,
9784
- n29_increaseOtpStateLength: el,
9785
- n30_increaseTicketStateLength: al,
9786
- n31_branding: il,
9787
- n32_indexesAndNotNull: cl,
9788
- n33_vendorIdInUniversalLoginSession: hl,
9789
- n34_auth0ClientInUniversalLoginSession: fl,
9790
- n35_increaseUniversalSessionStateLength: yl,
9791
- n36_authenticationCodes: wl,
9792
- n37_disableSignUps: kl,
9793
- n38_otpIpAddress: Ol,
9794
- n39_increaseUserAgentLength: Il,
9795
- n40_userId: $l,
9796
- n41_hooks: Dl,
9797
- n42_userIdIndexes: Ll,
9798
- n43_userIdIndexes: Fl,
9799
- n44_codes: Kl,
9800
- n45_hookProperties: ql,
9801
- n46_loginAuth0Client: Hl,
9802
- n47_loginAuth0Client: eu,
9803
- n48_saml: au,
9804
- n49_removeFields: iu,
9805
- n50_authParamsNonce: cu,
9806
- n51_connectionid: hu,
9807
- n52_cert: fu,
9808
- n53_codes_primary_key: yu,
9809
- n54_cleanup_tables: wu,
9810
- n55_logs_index: ku,
9811
- n56_application_fields: Ou,
9812
- n57_prompt_settings: Iu,
9813
- n58_connection_client_id: $u,
9814
- n59_connection_options: Du,
9815
- n60_users_metadata: Lu,
9816
- n61_userLocales: Fu,
9817
- n62_prompt: Ku,
9818
- n63_connection_cleanup: qu,
9819
- n64_act_as: Hu,
9820
- n65_code_verifier: eh,
9821
- n66_email_providers: ah,
9822
- n67_drop_tickets: ih,
9823
- n68_login_useragents: ch
9753
+ down: ch,
9754
+ up: dh
9755
+ }, Symbol.toStringTag, { value: "Module" })), Wa = {
9756
+ m1_init: Cd,
9757
+ m2_magicLink: Sd,
9758
+ m3_updateAt: Zd,
9759
+ m4_logTable: Pd,
9760
+ m5_userProfile: Md,
9761
+ m6_sessions: zd,
9762
+ m7_passwords: Vd,
9763
+ m8_logsTableNewFields: Jd,
9764
+ m9_passwordTableNewField: Qd,
9765
+ n01_codesTable: Yd,
9766
+ n11_universalLoginSession: tc,
9767
+ n12_userFields: rc,
9768
+ n13_userEmailIndex: oc,
9769
+ n14_profileDataField: lc,
9770
+ n15_userEmailIndex: pc,
9771
+ n16_userLocale: _c,
9772
+ n17_signingKeys: vc,
9773
+ n18_logsFields: xc,
9774
+ n19_connectionsUserinfo: Cc,
9775
+ n20_missingFields: Sc,
9776
+ n21_sessionDeletedAt: Zc,
9777
+ n22_dropLogsFields: Pc,
9778
+ n23_dropUsersFields: Mc,
9779
+ n24_logsIndexes: zc,
9780
+ n25_logDescMaxLength: Vc,
9781
+ n26_logsTableExtraFields: Jc,
9782
+ n27_usersTableNameIndex: Qc,
9783
+ n28_usersEmailConstrain: Yc,
9784
+ n29_increaseOtpStateLength: tl,
9785
+ n30_increaseTicketStateLength: rl,
9786
+ n31_branding: ol,
9787
+ n32_indexesAndNotNull: ll,
9788
+ n33_vendorIdInUniversalLoginSession: pl,
9789
+ n34_auth0ClientInUniversalLoginSession: _l,
9790
+ n35_increaseUniversalSessionStateLength: vl,
9791
+ n36_authenticationCodes: xl,
9792
+ n37_disableSignUps: Cl,
9793
+ n38_otpIpAddress: Sl,
9794
+ n39_increaseUserAgentLength: Zl,
9795
+ n40_userId: Pl,
9796
+ n41_hooks: Ml,
9797
+ n42_userIdIndexes: zl,
9798
+ n43_userIdIndexes: Vl,
9799
+ n44_codes: Jl,
9800
+ n45_hookProperties: Ql,
9801
+ n46_loginAuth0Client: Yl,
9802
+ n47_loginAuth0Client: tu,
9803
+ n48_saml: ru,
9804
+ n49_removeFields: ou,
9805
+ n50_authParamsNonce: lu,
9806
+ n51_connectionid: pu,
9807
+ n52_cert: _u,
9808
+ n53_codes_primary_key: vu,
9809
+ n54_cleanup_tables: xu,
9810
+ n55_logs_index: Cu,
9811
+ n56_application_fields: Su,
9812
+ n57_prompt_settings: Zu,
9813
+ n58_connection_client_id: Pu,
9814
+ n59_connection_options: Mu,
9815
+ n60_users_metadata: zu,
9816
+ n61_userLocales: Vu,
9817
+ n62_prompt: Ju,
9818
+ n63_connection_cleanup: Qu,
9819
+ n64_act_as: Yu,
9820
+ n65_code_verifier: th,
9821
+ n66_email_providers: rh,
9822
+ n67_drop_tickets: oh,
9823
+ n68_login_useragents: lh
9824
9824
  };
9825
- async function uh(t, e = !1) {
9825
+ async function hh(t, e = !1) {
9826
9826
  e && console.log("migrating...");
9827
- const n = new Ka(Ja), a = new Ia({
9827
+ const n = new Ja(Wa), a = new Za({
9828
9828
  db: t,
9829
9829
  provider: n
9830
9830
  }), { error: r, results: s } = await a.migrateToLatest();
@@ -9835,9 +9835,9 @@ async function uh(t, e = !1) {
9835
9835
  }), r)
9836
9836
  throw console.error("failed to migrate"), console.error(r), r;
9837
9837
  }
9838
- async function hh(t) {
9838
+ async function ph(t) {
9839
9839
  console.log("migrating...");
9840
- const e = new Ka(Ja), n = new Ia({
9840
+ const e = new Ja(Wa), n = new Za({
9841
9841
  db: t,
9842
9842
  provider: e
9843
9843
  }), { error: a, results: r } = await n.migrateDown();
@@ -9848,27 +9848,27 @@ async function hh(t) {
9848
9848
  }
9849
9849
  function mh(t) {
9850
9850
  return {
9851
- applications: yi(t),
9852
- branding: Fo(t),
9853
- clients: Eo(t),
9854
- codes: hi(t),
9855
- connections: Zo(t),
9856
- emailProviders: ud(t),
9857
- domains: Lo(t),
9858
- hooks: qo(t),
9859
- keys: Do(t),
9860
- logins: rd(t),
9861
- logs: Hs(t),
9862
- passwords: oi(t),
9863
- promptSettings: od(t),
9864
- users: Ls(t),
9865
- sessions: ai(t),
9866
- tenants: Js(t),
9867
- themes: Xo(t)
9851
+ applications: vi(t),
9852
+ branding: Vo(t),
9853
+ clients: $o(t),
9854
+ codes: pi(t),
9855
+ connections: Eo(t),
9856
+ emailProviders: hd(t),
9857
+ domains: zo(t),
9858
+ hooks: Qo(t),
9859
+ keys: Mo(t),
9860
+ logins: sd(t),
9861
+ logs: Ys(t),
9862
+ passwords: di(t),
9863
+ promptSettings: dd(t),
9864
+ users: zs(t),
9865
+ sessions: ri(t),
9866
+ tenants: Ws(t),
9867
+ themes: ed(t)
9868
9868
  };
9869
9869
  }
9870
9870
  export {
9871
9871
  mh as default,
9872
- hh as migrateDown,
9873
- uh as migrateToLatest
9872
+ ph as migrateDown,
9873
+ hh as migrateToLatest
9874
9874
  };