@synnaxlabs/x 0.52.3 → 0.52.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/x.js CHANGED
@@ -1,6 +1,6 @@
1
- import k, { z as c } from "zod";
2
- const gn = (e) => k.union([
3
- k.union([k.null(), k.undefined()]).transform(() => []),
1
+ import L, { z as c } from "zod";
2
+ const gn = (e) => L.union([
3
+ L.union([L.null(), L.undefined()]).transform(() => []),
4
4
  e.array()
5
5
  ]), Vr = (e) => Array.isArray(e) ? e : e == null ? [] : [e], yn = (e, t) => {
6
6
  if (Array.isArray(t))
@@ -17,21 +17,21 @@ const gn = (e) => k.union([
17
17
  if (e == null) return [t];
18
18
  const n = e.findIndex((s) => s.key === t.key), r = [...e];
19
19
  return n === -1 ? r.push(t) : r[n] = t, r;
20
- }, zr = ((e, t) => {
20
+ }, Yr = ((e, t) => {
21
21
  if (e != null)
22
22
  return Array.isArray(t) ? e.filter((n) => !t.includes(n.key)) : e.filter((n) => n.key !== t);
23
23
  }), uu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
24
  __proto__: null,
25
25
  nullableZ: gn,
26
26
  remove: Wr,
27
- removeKeyed: zr,
27
+ removeKeyed: Yr,
28
28
  toArray: Vr,
29
29
  upsert: yn,
30
30
  upsertKeyed: mn
31
- }, Symbol.toStringTag, { value: "Module" })), Yr = (e) => {
31
+ }, Symbol.toStringTag, { value: "Module" })), zr = (e) => {
32
32
  const t = e.replace(/_[a-z]/g, (n) => n[1].toUpperCase());
33
33
  return t.length > 1 && t[0] === t[0].toUpperCase() && t[1] === t[1].toUpperCase() || t.length === 0 ? t : t[0].toLowerCase() + t.slice(1);
34
- }, Yt = (e) => {
34
+ }, zt = (e) => {
35
35
  const t = (n, r = oe) => {
36
36
  if (typeof n == "string") return e(n);
37
37
  if (Array.isArray(n)) return n.map((o) => t(o, r));
@@ -48,20 +48,20 @@ const gn = (e) => k.union([
48
48
  }), s);
49
49
  };
50
50
  return t;
51
- }, Ae = Yt(Yr), Gr = (e) => (
51
+ }, Ae = zt(zr), Gr = (e) => (
52
52
  // Don't convert the first character and don't convert a character that is after a
53
53
  // non-alphanumeric character
54
54
  e.replace(
55
55
  /([a-z0-9])([A-Z])/g,
56
56
  (t, n, r) => `${n}_${r.toLowerCase()}`
57
57
  )
58
- ), pn = Yt(Gr), bn = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1), Hr = [Number, String, Uint8Array], oe = {
58
+ ), pn = zt(Gr), bn = (e) => e.length === 0 ? e : e[0].toUpperCase() + e.slice(1), Hr = [Number, String, Uint8Array], oe = {
59
59
  recursive: !0,
60
60
  recursiveInArray: !0
61
61
  }, Dr = (e = oe) => (e.recursive == null ? e = oe : e.recursiveInArray ??= !1, e), rn = (e) => e != null && Array.isArray(e), ee = (e) => e != null && typeof e == "object" && !Array.isArray(e), sn = (e) => Hr.some((t) => e instanceof t), Jr = (e) => e.replace(/[\s_]+/g, "-").replace(
62
62
  /([a-z0-9])([A-Z])/g,
63
63
  (t, n, r) => `${n}-${r.toLowerCase()}`
64
- ).toLowerCase(), Xr = Yt(Jr), Kr = (e) => {
64
+ ).toLowerCase(), Xr = zt(Jr), Kr = (e) => {
65
65
  if (e.length === 0) return e;
66
66
  let t = e.replace(/[_-]/g, " ");
67
67
  return t = t.replace(
@@ -71,7 +71,7 @@ const gn = (e) => k.union([
71
71
  /([A-Z]+)([A-Z][a-z])/g,
72
72
  (n, r, s) => `${r} ${s}`
73
73
  ), t = t.replace(/\s+/g, " ").trim(), t = t.replace(/\b\w/g, (n) => n.toUpperCase()), t;
74
- }, Qr = Yt(Kr), lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, Qr = zt(Kr), lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
75
  __proto__: null,
76
76
  camelToSnake: pn,
77
77
  capitalize: bn,
@@ -264,7 +264,7 @@ const Ee = (e) => e != null && typeof e == "object" && "toString" in e, In = (e)
264
264
  }, cs = (e, t) => {
265
265
  const n = ce(e), r = ce(t);
266
266
  return Nn(n, r);
267
- }, as = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, vn = (e) => (t, n) => e(n, t), it = 0, z = -1, Y = 1, Mn = (e) => e < it, An = (e) => e > it, us = (e) => e >= it, En = (e) => e === it, ls = (e, t) => {
267
+ }, as = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, vn = (e) => (t, n) => e(n, t), it = 0, Y = -1, z = 1, Mn = (e) => e < it, An = (e) => e > it, us = (e) => e >= it, En = (e) => e === it, ls = (e, t) => {
268
268
  const n = /([a-zA-Z]+)|(\d+)/g, r = e.replace(/[\s_.-]+/g, "").match(n), s = t.replace(/[\s_.-]+/g, "").match(n);
269
269
  if (!r || !s) return 0;
270
270
  for (let i = 0; i < Math.min(r.length, s.length); i++) {
@@ -293,8 +293,8 @@ const Ee = (e) => e != null && typeof e == "object" && "toString" in e, In = (e)
293
293
  }, yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
294
294
  __proto__: null,
295
295
  EQUAL: it,
296
- GREATER_THAN: Y,
297
- LESS_THAN: z,
296
+ GREATER_THAN: z,
297
+ LESS_THAN: Y,
298
298
  insert: fs,
299
299
  isEqualTo: En,
300
300
  isGreaterThan: An,
@@ -337,10 +337,10 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
337
337
  }, Ts = (e) => {
338
338
  const t = 10 ** Math.floor(Math.log10(e));
339
339
  return Math.round(e / t) * t;
340
- }, Pn = lt((e, t) => e <= t ? e : t), Ft = (e) => typeof e == "bigint" ? !0 : Number.isInteger(e), $s = lt((e, t) => e >= t ? e : t), Rn = (e) => typeof e == "bigint" ? e < 0n ? -e : e : e < 0 ? -e : e, R = lt((e, t) => e * t), Et = lt((e, t) => e / t), kn = c.tuple([c.number(), c.number()]), Te = c.object({ width: c.number(), height: c.number() }), Us = c.object({
340
+ }, Pn = lt((e, t) => e <= t ? e : t), Ft = (e) => typeof e == "bigint" ? !0 : Number.isInteger(e), $s = lt((e, t) => e >= t ? e : t), Rn = (e) => typeof e == "bigint" ? e < 0n ? -e : e : e < 0 ? -e : e, R = lt((e, t) => e * t), Et = lt((e, t) => e / t), Ln = c.tuple([c.number(), c.number()]), Te = c.object({ width: c.number(), height: c.number() }), Us = c.object({
341
341
  signedWidth: c.number(),
342
342
  signedHeight: c.number()
343
- }), Ln = ["start", "center", "end"], ut = c.object({ x: c.number(), y: c.number() }), Zn = c.object({ clientX: c.number(), clientY: c.number() }), Gt = ["x", "y"], $e = c.enum(Gt), Ue = ["top", "right", "bottom", "left"], js = c.enum(Ue), Ht = ["left", "right"], je = c.enum(Ht), Dt = ["top", "bottom"], Ce = c.enum(Dt), Be = ["center"], ue = c.enum(Be), Cs = [...Ue, ...Be], Pe = c.enum(Cs), Bs = c.enum(Ln), _n = ["first", "last"], Ps = c.enum(_n), Rs = c.object({ lower: c.number(), upper: c.number() }), ks = c.enum([...$e.options, ...Pe.options]), Ls = c.union([$e, Pe, c.instanceof(String)]), b = (e, t, n) => {
343
+ }), kn = ["start", "center", "end"], ut = c.object({ x: c.number(), y: c.number() }), Zn = c.object({ clientX: c.number(), clientY: c.number() }), Gt = ["x", "y"], $e = c.enum(Gt), Ue = ["top", "right", "bottom", "left"], js = c.enum(Ue), Ht = ["left", "right"], je = c.enum(Ht), Dt = ["top", "bottom"], Ce = c.enum(Dt), Be = ["center"], ue = c.enum(Be), Cs = [...Ue, ...Be], Pe = c.enum(Cs), Bs = c.enum(kn), _n = ["first", "last"], Ps = c.enum(_n), Rs = c.object({ lower: c.number(), upper: c.number() }), Ls = c.enum([...$e.options, ...Pe.options]), ks = c.union([$e, Pe, c.instanceof(String)]), b = (e, t, n) => {
344
344
  const r = {};
345
345
  if (typeof t == "object" && (n = t, t = void 0), n = { makeValid: !0, ...n }, typeof e == "number" || typeof e == "bigint")
346
346
  t != null ? (r.lower = e, r.upper = t) : (r.lower = typeof e == "bigint" ? 0n : 0, r.upper = e);
@@ -358,7 +358,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
358
358
  }, qn = (e) => e.lower > e.upper ? { lower: e.upper, upper: e.lower } : e, le = (e, t) => {
359
359
  const n = b(e);
360
360
  return t < n.lower ? n.lower : t >= n.upper ? n.upper - (typeof n.upper == "number" ? 1 : 1n) : t;
361
- }, L = (e, t) => {
361
+ }, k = (e, t) => {
362
362
  const n = b(e);
363
363
  if (typeof t == "number" || typeof t == "bigint")
364
364
  return t >= n.lower && t < n.upper;
@@ -366,14 +366,14 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
366
366
  return r.lower >= n.lower && r.upper <= n.upper;
367
367
  }, Ws = (e, t) => {
368
368
  const n = b(e), r = b(t);
369
- return n.lower === r.lower ? !0 : r.upper === n.lower || r.lower === n.upper ? !1 : L(n, r.upper) || L(n, r.lower) || L(r, n.upper) || L(r, n.lower);
369
+ return n.lower === r.lower ? !0 : r.upper === n.lower || r.lower === n.upper ? !1 : k(n, r.upper) || k(n, r.lower) || k(r, n.upper) || k(r, n.lower);
370
370
  }, ft = (e) => {
371
371
  const t = b(e);
372
372
  return t.upper - t.lower;
373
- }, zs = (e) => {
373
+ }, Ys = (e) => {
374
374
  const t = b(e);
375
375
  return typeof t.lower == "bigint" ? t.lower === 0n && t.upper === 0n : t.lower === 0 && t.upper === 0;
376
- }, Ys = (e) => {
376
+ }, zs = (e) => {
377
377
  const t = ft(e);
378
378
  return typeof t == "number" ? t === 0 : t === 0n;
379
379
  }, Gs = (e) => {
@@ -392,10 +392,10 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
392
392
  const t = b(e), n = typeof t.lower == "bigint";
393
393
  return Array.from({ length: Number(ft(e)) }, (r, s) => n ? t.lower + BigInt(s) : t.lower + s);
394
394
  }, fe = (e, t) => {
395
- const n = e.map((i) => b(i)), r = n.findIndex((i) => L(i, t) || t < i.lower);
395
+ const n = e.map((i) => b(i)), r = n.findIndex((i) => k(i, t) || t < i.lower);
396
396
  if (r === -1) return { index: e.length, position: 0 };
397
397
  const s = n[r];
398
- return L(s, t) ? { index: r, position: Number(t - s.lower) } : { index: r, position: 0 };
398
+ return k(s, t) ? { index: r, position: Number(t - s.lower) } : { index: r, position: 0 };
399
399
  }, ne = {
400
400
  removeBefore: 0,
401
401
  removeAfter: 0,
@@ -471,12 +471,12 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
471
471
  buildInsertionPlan: Xs,
472
472
  clamp: le,
473
473
  construct: b,
474
- contains: L,
474
+ contains: k,
475
475
  distance: Wn,
476
476
  equals: Vs,
477
477
  findInsertPosition: fe,
478
478
  isFinite: Gs,
479
- isZero: zs,
479
+ isZero: Ys,
480
480
  linspace: Js,
481
481
  makeValid: qn,
482
482
  max: Fn,
@@ -484,14 +484,14 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
484
484
  min: Ds,
485
485
  overlapsWith: Ws,
486
486
  span: ft,
487
- spanIsZero: Ys,
487
+ spanIsZero: zs,
488
488
  traverse: Vn
489
- }, Symbol.toStringTag, { value: "Module" })), he = 2, de = 3, zn = 2, Ks = (e, t) => {
489
+ }, Symbol.toStringTag, { value: "Module" })), he = 2, de = 3, Yn = 2, Ks = (e, t) => {
490
490
  if (Number.isNaN(e) || !Number.isFinite(e)) return e;
491
491
  const n = ft(t);
492
492
  if (n == 0) return e;
493
493
  let r;
494
- n >= 1e3 ? r = he : n >= 1 ? r = de : r = Math.ceil(-Math.log10(n)) + zn;
494
+ n >= 1e3 ? r = he : n >= 1 ? r = de : r = Math.ceil(-Math.log10(n)) + Yn;
495
495
  const s = 10 ** r;
496
496
  return Math.round(e * s) / s;
497
497
  }, Qs = 5, ti = 1e-10, ei = (e, t) => {
@@ -506,7 +506,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
506
506
  }
507
507
  if (r) {
508
508
  let u;
509
- s >= 1e3 ? u = he : s >= 1 ? u = de : u = Math.ceil(-Math.log10(s)) + zn;
509
+ s >= 1e3 ? u = he : s >= 1 ? u = de : u = Math.ceil(-Math.log10(s)) + Yn;
510
510
  const l = 10 ** u;
511
511
  return Math.round(e * l) / l;
512
512
  }
@@ -551,11 +551,11 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
551
551
  roundToNearestMagnitude: Ts,
552
552
  smartRound: ei,
553
553
  sub: F
554
- }, Symbol.toStringTag, { value: "Module" })), Yn = ks, _ = (e) => Gt.includes(e) ? e : Dt.includes(e) ? "y" : "x", ni = (e) => _(e) === "x" ? "y" : "x", ri = (e) => _(e) === "x" ? "width" : "height", si = (e) => _(e) === "x" ? "left" : "top", ii = (e) => Yn.safeParse(e).success, oi = (e) => _(e) === "x" ? "signedWidth" : "signedHeight", ci = (e) => e === "center" ? !1 : _(e) === "x", ai = (e) => _(e) === "y", Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
554
+ }, Symbol.toStringTag, { value: "Module" })), zn = Ls, _ = (e) => Gt.includes(e) ? e : Dt.includes(e) ? "y" : "x", ni = (e) => _(e) === "x" ? "y" : "x", ri = (e) => _(e) === "x" ? "width" : "height", si = (e) => _(e) === "x" ? "left" : "top", ii = (e) => zn.safeParse(e).success, oi = (e) => _(e) === "x" ? "signedWidth" : "signedHeight", ci = (e) => e === "center" ? !1 : _(e) === "x", ai = (e) => _(e) === "y", Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
555
555
  __proto__: null,
556
556
  DIRECTIONS: Gt,
557
557
  construct: _,
558
- crude: Yn,
558
+ crude: zn,
559
559
  dimension: ri,
560
560
  direction: $e,
561
561
  isDirection: ii,
@@ -575,21 +575,21 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
575
575
  right: { clockwise: "top", counterclockwise: "bottom" },
576
576
  bottom: { clockwise: "right", counterclockwise: "left" },
577
577
  left: { clockwise: "bottom", counterclockwise: "top" }
578
- }, gi = Ls, nt = (e) => e instanceof String || !Gt.includes(e) ? e : e === "x" ? "left" : "top", yi = (e) => hi[nt(e)], mi = (e, t) => di[e][t], It = (e) => {
578
+ }, gi = ks, nt = (e) => e instanceof String || !Gt.includes(e) ? e : e === "x" ? "left" : "top", yi = (e) => hi[nt(e)], mi = (e, t) => di[e][t], It = (e) => {
579
579
  const t = nt(e);
580
580
  return t === "top" || t === "bottom" ? "y" : "x";
581
581
  }, pi = c.object({
582
582
  x: je.or(ue),
583
583
  y: Ce.or(ue)
584
- }), Re = c.object({ x: je, y: Ce }), ht = Object.freeze({ x: "left", y: "top" }), ke = Object.freeze({ x: "right", y: "top" }), Jt = Object.freeze({ x: "left", y: "bottom" }), Le = Object.freeze({ x: "right", y: "bottom" }), Ze = Object.freeze({ x: "center", y: "center" }), _e = Object.freeze({ x: "center", y: "top" }), qe = Object.freeze({ x: "center", y: "bottom" }), Fe = Object.freeze({ x: "right", y: "center" }), Ve = Object.freeze({ x: "left", y: "center" }), bi = Object.freeze([
584
+ }), Re = c.object({ x: je, y: Ce }), ht = Object.freeze({ x: "left", y: "top" }), Le = Object.freeze({ x: "right", y: "top" }), Jt = Object.freeze({ x: "left", y: "bottom" }), ke = Object.freeze({ x: "right", y: "bottom" }), Ze = Object.freeze({ x: "center", y: "center" }), _e = Object.freeze({ x: "center", y: "top" }), qe = Object.freeze({ x: "center", y: "bottom" }), Fe = Object.freeze({ x: "right", y: "center" }), Ve = Object.freeze({ x: "left", y: "center" }), bi = Object.freeze([
585
585
  Ve,
586
586
  Fe,
587
587
  _e,
588
588
  qe,
589
589
  ht,
590
- ke,
591
- Jt,
592
590
  Le,
591
+ Jt,
592
+ ke,
593
593
  Ze
594
594
  ]), We = (e, t) => e.x === t.x && e.y === t.y, wi = (e, t) => {
595
595
  if (typeof t == "object") {
@@ -609,7 +609,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
609
609
  __proto__: null,
610
610
  BOTTOM_CENTER: qe,
611
611
  BOTTOM_LEFT: Jt,
612
- BOTTOM_RIGHT: Le,
612
+ BOTTOM_RIGHT: ke,
613
613
  CENTER: Ze,
614
614
  CENTER_LEFT: Ve,
615
615
  CENTER_LOCATIONS: Be,
@@ -617,7 +617,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
617
617
  OUTER_LOCATIONS: Ue,
618
618
  TOP_CENTER: _e,
619
619
  TOP_LEFT: ht,
620
- TOP_RIGHT: ke,
620
+ TOP_RIGHT: Le,
621
621
  XY_LOCATIONS: bi,
622
622
  X_LOCATIONS: Ht,
623
623
  Y_LOCATIONS: Dt,
@@ -643,7 +643,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
643
643
  }, Symbol.toStringTag, { value: "Module" })), ge = c.union([
644
644
  c.number(),
645
645
  ut,
646
- kn,
646
+ Ln,
647
647
  Te,
648
648
  Us,
649
649
  Zn
@@ -656,7 +656,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
656
656
  }, V = Object.freeze({ x: 0, y: 0 }), Hn = Object.freeze({ x: 1, y: 1 }), Ni = Object.freeze({ x: 1 / 0, y: 1 / 0 }), vi = Object.freeze({ x: NaN, y: NaN }), Vt = (e, t, n = 0) => {
657
657
  const r = x(e), s = x(t);
658
658
  return n === 0 ? r.x === s.x && r.y === s.y : Math.abs(r.x - s.x) <= n && Math.abs(r.y - s.y) <= n;
659
- }, Mi = (e) => Vt(e, V), ze = (e, t, n) => {
659
+ }, Mi = (e) => Vt(e, V), Ye = (e, t, n) => {
660
660
  const r = x(e), s = x(t, n);
661
661
  return { x: r.x * s.x, y: r.y * s.y };
662
662
  }, Dn = (e, t) => {
@@ -716,7 +716,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
716
716
  return n === 0 ? { x: 0, y: 0 } : { x: t.x / n, y: t.y / n };
717
717
  }, Kn = (...e) => {
718
718
  const t = e.reduce((n, r) => Nt(n, r), V);
719
- return ze(t, 1 / e.length);
719
+ return Ye(t, 1 / e.length);
720
720
  }, Ci = (e, t) => {
721
721
  const n = [];
722
722
  for (let r = 0; r < e.length; r++) {
@@ -736,7 +736,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
736
736
  ), S = Math.sin(M / 2);
737
737
  S === 0 ? u = t : u = t / S, a = Xn(Kn(i, o));
738
738
  }
739
- n.push(ze(a, u));
739
+ n.push(Ye(a, u));
740
740
  }
741
741
  return n;
742
742
  }, Bi = (e) => {
@@ -777,7 +777,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
777
777
  reciprocal: Pi,
778
778
  rotate: Ri,
779
779
  round: ye,
780
- scale: ze,
780
+ scale: Ye,
781
781
  set: Ai,
782
782
  sub: gt,
783
783
  swap: Bi,
@@ -787,12 +787,12 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
787
787
  translation: Si,
788
788
  truncate: Wt,
789
789
  xy: ut
790
- }, Symbol.toStringTag, { value: "Module" })), Ut = c.union([c.number(), c.string()]), ki = c.object({
790
+ }, Symbol.toStringTag, { value: "Module" })), Ut = c.union([c.number(), c.string()]), Li = c.object({
791
791
  top: Ut,
792
792
  left: Ut,
793
793
  width: Ut,
794
794
  height: Ut
795
- }), Li = c.object({
795
+ }), ki = c.object({
796
796
  left: c.number(),
797
797
  top: c.number(),
798
798
  right: c.number(),
@@ -847,12 +847,12 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
847
847
  }), Wi = (e) => ({
848
848
  signedWidth: Xt(e),
849
849
  signedHeight: Kt(e)
850
- }), zi = (e) => ({
850
+ }), Yi = (e) => ({
851
851
  top: K(e),
852
852
  left: X(e),
853
853
  width: $(e),
854
854
  height: U(e)
855
- }), Ye = (e, t, n = !1) => {
855
+ }), ze = (e, t, n = !1) => {
856
856
  const r = _(t) === "y" ? Kt(e) : Xt(e);
857
857
  return n ? r : Math.abs(r);
858
858
  }, D = (e, t) => {
@@ -864,13 +864,13 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
864
864
  }, rt = (e, t) => {
865
865
  const n = N(e), r = Gn(n.root).includes(t) ? Math.min : Math.max;
866
866
  return Ht.includes(t) ? r(n.one.x, n.two.x) : r(n.one.y, n.two.y);
867
- }, Yi = (e) => sr(e) === 0, $ = (e) => Ye(e, "x"), U = (e) => Ye(e, "y"), Xt = (e) => {
867
+ }, zi = (e) => sr(e) === 0, $ = (e) => ze(e, "x"), U = (e) => ze(e, "y"), Xt = (e) => {
868
868
  const t = N(e);
869
869
  return t.two.x - t.one.x;
870
870
  }, Kt = (e) => {
871
871
  const t = N(e);
872
872
  return t.two.y - t.one.y;
873
- }, nr = (e) => D(e, ht), Gi = (e) => D(e, _e), Hi = (e) => D(e, ke), Di = (e) => D(e, Jt), Ji = (e) => D(e, qe), Xi = (e) => D(e, Le), Ki = (e) => D(e, Ve), Qi = (e) => D(e, Fe), tt = (e) => rt(e, "right"), et = (e) => rt(e, "bottom"), X = (e) => rt(e, "left"), K = (e) => rt(e, "top"), me = (e) => Nt(nr(e), {
873
+ }, nr = (e) => D(e, ht), Gi = (e) => D(e, _e), Hi = (e) => D(e, Le), Di = (e) => D(e, Jt), Ji = (e) => D(e, qe), Xi = (e) => D(e, ke), Ki = (e) => D(e, Ve), Qi = (e) => D(e, Fe), tt = (e) => rt(e, "right"), et = (e) => rt(e, "bottom"), X = (e) => rt(e, "left"), K = (e) => rt(e, "top"), me = (e) => Nt(nr(e), {
874
874
  x: Xt(e) / 2,
875
875
  y: Kt(e) / 2
876
876
  }), Ge = (e) => {
@@ -879,10 +879,10 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
879
879
  }, He = (e) => {
880
880
  const t = N(e);
881
881
  return t.root.y === "top" ? K(t) : et(t);
882
- }, to = (e) => ({ x: Ge(e), y: He(e) }), kt = (e) => {
882
+ }, to = (e) => ({ x: Ge(e), y: He(e) }), Lt = (e) => {
883
883
  const t = N(e);
884
884
  return { lower: t.one.x, upper: t.two.x };
885
- }, Lt = (e) => {
885
+ }, kt = (e) => {
886
886
  const t = N(e);
887
887
  return { lower: t.one.y, upper: t.two.y };
888
888
  }, eo = (e, t) => tr(e, t), no = (e, t) => {
@@ -930,7 +930,7 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
930
930
  DECIMAL: _i,
931
931
  ZERO: Qn,
932
932
  area: sr,
933
- areaIsZero: Yi,
933
+ areaIsZero: zi,
934
934
  aspect: so,
935
935
  bottom: et,
936
936
  bottomCenter: Ji,
@@ -944,11 +944,11 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
944
944
  constructWithAlternateRoot: ao,
945
945
  contains: Fi,
946
946
  copy: tr,
947
- css: zi,
948
- cssBox: ki,
949
- dim: Ye,
947
+ css: Yi,
948
+ cssBox: Li,
949
+ dim: ze,
950
950
  dims: er,
951
- domRect: Li,
951
+ domRect: ki,
952
952
  edgePoints: no,
953
953
  equals: Vi,
954
954
  height: U,
@@ -973,11 +973,11 @@ const $n = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", hs = `0123456
973
973
  truncate: co,
974
974
  width: $,
975
975
  x: Ge,
976
- xBounds: kt,
976
+ xBounds: Lt,
977
977
  xyLoc: D,
978
978
  y: He,
979
- yBounds: Lt
980
- }, Symbol.toStringTag, { value: "Module" })), ir = c.object({ signedWidth: c.number(), signedHeight: c.number() }), lo = c.union([Te, ir, ut, kn]), fo = { width: 0, height: 0 }, ho = { width: 1, height: 1 }, Z = (e, t) => typeof e == "number" ? { width: e, height: t ?? e } : Array.isArray(e) ? { width: e[0], height: e[1] } : "x" in e ? { width: e.x, height: e.y } : "signedWidth" in e ? { width: e.signedWidth, height: e.signedHeight } : { ...e }, go = (e, t) => {
979
+ yBounds: kt
980
+ }, Symbol.toStringTag, { value: "Module" })), ir = c.object({ signedWidth: c.number(), signedHeight: c.number() }), lo = c.union([Te, ir, ut, Ln]), fo = { width: 0, height: 0 }, ho = { width: 1, height: 1 }, Z = (e, t) => typeof e == "number" ? { width: e, height: t ?? e } : Array.isArray(e) ? { width: e[0], height: e[1] } : "x" in e ? { width: e.x, height: e.y } : "signedWidth" in e ? { width: e.signedWidth, height: e.signedHeight } : { ...e }, go = (e, t) => {
981
981
  if (t == null) return !1;
982
982
  const n = Z(e), r = Z(t);
983
983
  return n.width === r.width && n.height === r.height;
@@ -1183,17 +1183,17 @@ class P {
1183
1183
  const n = this.copy();
1184
1184
  if (rr(t)) {
1185
1185
  const r = this.currRoot;
1186
- return n.currRoot = t.root, r != null && !We(r, t.root) && (r.x !== t.root.x && (n.x = n.x.invert()), r.y !== t.root.y && (n.y = n.y.invert())), n.x = n.x.scale(kt(t)), n.y = n.y.scale(Lt(t)), n;
1186
+ return n.currRoot = t.root, r != null && !We(r, t.root) && (r.x !== t.root.x && (n.x = n.x.invert()), r.y !== t.root.y && (n.y = n.y.invert())), n.x = n.x.scale(Lt(t)), n.y = n.y.scale(kt(t)), n;
1187
1187
  }
1188
1188
  return n.x = n.x.scale(t.width), n.y = n.y.scale(t.height), n;
1189
1189
  }
1190
1190
  reBound(t) {
1191
1191
  const n = this.copy();
1192
- return n.x = this.x.reBound(kt(t)), n.y = this.y.reBound(Lt(t)), n;
1192
+ return n.x = this.x.reBound(Lt(t)), n.y = this.y.reBound(kt(t)), n;
1193
1193
  }
1194
1194
  clamp(t) {
1195
1195
  const n = this.copy();
1196
- return n.x = this.x.clamp(kt(t)), n.y = this.y.clamp(Lt(t)), n;
1196
+ return n.x = this.x.clamp(Lt(t)), n.y = this.y.clamp(kt(t)), n;
1197
1197
  }
1198
1198
  copy() {
1199
1199
  const t = new P();
@@ -1234,15 +1234,15 @@ const Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1234
1234
  transform: No
1235
1235
  }, Symbol.toStringTag, { value: "Module" })), Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1236
1236
  __proto__: null,
1237
- ALIGNMENTS: Ln,
1237
+ ALIGNMENTS: kn,
1238
1238
  ORDERS: _n,
1239
1239
  alignment: Bs,
1240
1240
  order: Ps
1241
1241
  }, Symbol.toStringTag, { value: "Module" })), or = ut.extend({
1242
1242
  root: Re,
1243
- units: k.object({
1244
- x: k.enum(["px", "decimal"]),
1245
- y: k.enum(["px", "decimal"])
1243
+ units: L.object({
1244
+ x: L.enum(["px", "decimal"]),
1245
+ y: L.enum(["px", "decimal"])
1246
1246
  })
1247
1247
  }), $o = or.partial({ root: !0, units: !0 }), Uo = (e) => {
1248
1248
  const t = {};
@@ -1528,42 +1528,82 @@ class d extends st {
1528
1528
  get nanoseconds() {
1529
1529
  return Number(this.valueOf());
1530
1530
  }
1531
- /** @returns the integer year that the timestamp corresponds to. */
1531
+ /** @returns the integer year that the timestamp corresponds to in UTC. */
1532
1532
  get year() {
1533
1533
  return this.date().getUTCFullYear();
1534
1534
  }
1535
+ /** @returns the integer year that the timestamp corresponds to in local time. */
1536
+ get localYear() {
1537
+ return this.date().getFullYear();
1538
+ }
1535
1539
  /**
1536
- * @returns a copy of the timestamp with the year changed.
1540
+ * @returns a copy of the timestamp with the year changed in UTC.
1537
1541
  * @param year the value to set the year to.
1538
1542
  */
1539
1543
  setYear(t) {
1540
1544
  const n = this.date();
1541
1545
  return n.setUTCFullYear(t), new d(n);
1542
1546
  }
1543
- /** @returns the integer month that the timestamp corresponds to with its year. */
1547
+ /**
1548
+ * @returns a copy of the timestamp with the year changed in local time.
1549
+ * @param year the value to set the year to.
1550
+ */
1551
+ setLocalYear(t) {
1552
+ const n = this.date();
1553
+ return n.setFullYear(t), new d(n);
1554
+ }
1555
+ /** @returns the integer month that the timestamp corresponds to within its year in
1556
+ * UTC. */
1544
1557
  get month() {
1545
1558
  return this.date().getUTCMonth();
1546
1559
  }
1560
+ /** @returns the integer month that the timestamp corresponds to within its year in
1561
+ * local time. */
1562
+ get localMonth() {
1563
+ return this.date().getMonth();
1564
+ }
1547
1565
  /**
1548
- * @returns a copy of the timestamp with the month changed.
1566
+ * @returns a copy of the timestamp with the month changed in UTC.
1549
1567
  * @param month the value to set the month to.
1550
1568
  */
1551
1569
  setMonth(t) {
1552
1570
  const n = this.date();
1553
1571
  return n.setUTCMonth(t), new d(n);
1554
1572
  }
1555
- /** @returns the integer day that the timestamp corresponds to within its month. */
1573
+ /**
1574
+ * @returns a copy of the timestamp with the month changed in local time.
1575
+ * @param month the value to set the month to.
1576
+ */
1577
+ setLocalMonth(t) {
1578
+ const n = this.date();
1579
+ return n.setMonth(t), new d(n);
1580
+ }
1581
+ /** @returns the integer day that the timestamp corresponds to within its month in
1582
+ * UTC. */
1556
1583
  get day() {
1557
1584
  return this.date().getUTCDate();
1558
1585
  }
1586
+ /** @returns the integer day that the timestamp corresponds to within its month in
1587
+ * local time. */
1588
+ get localDay() {
1589
+ return this.date().getDate();
1590
+ }
1559
1591
  /**
1560
- * @returns a copy of the timestamp with the day changed.
1592
+ * @returns a copy of the timestamp with the day changed in UTC.
1561
1593
  * @param day the value the set the day to.
1562
1594
  */
1563
1595
  setDay(t) {
1564
1596
  const n = this.date();
1565
1597
  return n.setUTCDate(t), new d(n);
1566
1598
  }
1599
+ /**
1600
+ * @returns a copy of the timestamp with the day changed in local time.
1601
+ * @param day the value to set the day to.
1602
+ */
1603
+ setLocalDay(t) {
1604
+ const n = this.date();
1605
+ return n.setDate(t), new d(n);
1606
+ }
1567
1607
  /**
1568
1608
  * @returns the integer hour that the timestamp corresponds to within its day.
1569
1609
  */
@@ -1571,7 +1611,8 @@ class d extends st {
1571
1611
  return this.date().getUTCHours();
1572
1612
  }
1573
1613
  /**
1574
- * @returns the integer hour that the timestamp corresponds to within its day in local time.
1614
+ * @returns the integer hour that the timestamp corresponds to within its day in local
1615
+ * time.
1575
1616
  */
1576
1617
  get localHour() {
1577
1618
  return this.date().getHours();
@@ -1592,48 +1633,92 @@ class d extends st {
1592
1633
  const n = this.date();
1593
1634
  return n.setUTCHours(t), new d(n);
1594
1635
  }
1595
- /** @returns the integer minute that the timestamp corresponds to within its hour. */
1636
+ /** @returns the integer minute that the timestamp corresponds to within its hour in
1637
+ * UTC. */
1596
1638
  get minute() {
1597
1639
  return this.date().getUTCMinutes();
1598
1640
  }
1641
+ /** @returns the integer minute that the timestamp corresponds to within its hour in
1642
+ * local time. */
1643
+ get localMinute() {
1644
+ return this.date().getMinutes();
1645
+ }
1599
1646
  /**
1600
- * @returns a copy of the timestamp with the minute changed.
1647
+ * @returns a copy of the timestamp with the minute changed in UTC.
1601
1648
  * @param minute the value to set the minute to.
1602
1649
  */
1603
1650
  setMinute(t) {
1604
1651
  const n = this.date();
1605
1652
  return n.setUTCMinutes(t), new d(n);
1606
1653
  }
1654
+ /**
1655
+ * @returns a copy of the timestamp with the minute changed in local time.
1656
+ * @param minute the value to set the minute to.
1657
+ */
1658
+ setLocalMinute(t) {
1659
+ const n = this.date();
1660
+ return n.setMinutes(t), new d(n);
1661
+ }
1607
1662
  /**
1608
1663
  * @returns the integer second that the timestamp corresponds to within its
1609
- * minute.
1664
+ * minute in UTC.
1610
1665
  */
1611
1666
  get second() {
1612
1667
  return this.date().getUTCSeconds();
1613
1668
  }
1614
1669
  /**
1615
- * @returns a copy of the timestamp with the second changed.
1670
+ * @returns the integer second that the timestamp corresponds to within its minute in
1671
+ * local time.
1672
+ */
1673
+ get localSecond() {
1674
+ return this.date().getSeconds();
1675
+ }
1676
+ /**
1677
+ * @returns a copy of the timestamp with the second changed in UTC.
1616
1678
  * @param second the value to set the second to.
1617
1679
  */
1618
1680
  setSecond(t) {
1619
1681
  const n = this.date();
1620
1682
  return n.setUTCSeconds(t), new d(n);
1621
1683
  }
1684
+ /**
1685
+ * @returns a copy of the timestamp with the second changed in local time.
1686
+ * @param second the value to set the second to.
1687
+ */
1688
+ setLocalSecond(t) {
1689
+ const n = this.date();
1690
+ return n.setSeconds(t), new d(n);
1691
+ }
1622
1692
  /**
1623
1693
  * @returns the integer millisecond that the timestamp corresponds to within its
1624
- * second.
1694
+ * second in UTC.
1625
1695
  */
1626
1696
  get millisecond() {
1627
1697
  return this.date().getUTCMilliseconds();
1628
1698
  }
1629
1699
  /**
1630
- * @returns a copy of the timestamp with the milliseconds changed.
1700
+ * @returns the integer millisecond that the timestamp corresponds to within its
1701
+ * second in local time.
1702
+ */
1703
+ get localMillisecond() {
1704
+ return this.date().getMilliseconds();
1705
+ }
1706
+ /**
1707
+ * @returns a copy of the timestamp with the milliseconds changed in UTC.
1631
1708
  * @param millisecond the value to set the millisecond to.
1632
1709
  */
1633
1710
  setMillisecond(t) {
1634
1711
  const n = this.date();
1635
1712
  return n.setUTCMilliseconds(t), new d(n);
1636
1713
  }
1714
+ /**
1715
+ * @returns a copy of the timestamp with the milliseconds changed in local time.
1716
+ * @param millisecond the value to set the millisecond to.
1717
+ */
1718
+ setLocalMillisecond(t) {
1719
+ const n = this.date();
1720
+ return n.setMilliseconds(t), new d(n);
1721
+ }
1637
1722
  /**
1638
1723
  * Returns a string representation of the TimeStamp.
1639
1724
  *
@@ -2916,9 +3001,9 @@ const Su = c.object({
2916
3001
  ]), ar = (e) => {
2917
3002
  const t = typeof e;
2918
3003
  return t === "string" || t === "number" || t === "boolean" || t === "bigint" || e instanceof d || e instanceof g || e instanceof Date;
2919
- }, Ro = (e, t, n, r = 0) => e.usesBigInt && !t.usesBigInt ? Number(n) - Number(r) : !e.usesBigInt && t.usesBigInt ? BigInt(n.valueOf()) - BigInt(r.valueOf()) : F(n, r), ko = "00000000-0000-0000-0000-000000000000", Lo = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
3004
+ }, Ro = (e, t, n, r = 0) => e.usesBigInt && !t.usesBigInt ? Number(n) - Number(r) : !e.usesBigInt && t.usesBigInt ? BigInt(n.valueOf()) - BigInt(r.valueOf()) : F(n, r), Lo = "00000000-0000-0000-0000-000000000000", ko = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
2920
3005
  function Zo(e) {
2921
- return typeof e == "string" && Lo.test(e);
3006
+ return typeof e == "string" && ko.test(e);
2922
3007
  }
2923
3008
  const E = [];
2924
3009
  for (let e = 0; e < 256; ++e)
@@ -2950,13 +3035,13 @@ function Wo(e, t, n) {
2950
3035
  throw new Error("Random bytes length must be >= 16");
2951
3036
  return r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, ur(r);
2952
3037
  }
2953
- function zo(e, t, n) {
3038
+ function Yo(e, t, n) {
2954
3039
  return cn.randomUUID && !e ? cn.randomUUID() : Wo(e);
2955
3040
  }
2956
- const Yo = () => zo(), De = (e, t) => _o(e, t), Go = ko, $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3041
+ const zo = () => Yo(), De = (e, t) => _o(e, t), Go = Lo, $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2957
3042
  __proto__: null,
2958
3043
  ZERO: Go,
2959
- create: Yo,
3044
+ create: zo,
2960
3045
  parse: De
2961
3046
  }, Symbol.toStringTag, { value: "Module" })), J = -1, pe = {
2962
3047
  [Symbol.iterator]: () => pe,
@@ -3841,7 +3926,7 @@ class Uu {
3841
3926
  }
3842
3927
  atAlignment(t, n) {
3843
3928
  for (const r of this.series)
3844
- if (L(r.alignmentBounds, t))
3929
+ if (k(r.alignmentBounds, t))
3845
3930
  return r.atAlignment(t, n);
3846
3931
  if (n) throw new Error(`[series] - no value at alignment ${t}`);
3847
3932
  }
@@ -3876,7 +3961,7 @@ class Uu {
3876
3961
  const o = this.series[i];
3877
3962
  if (t < o.alignment) break;
3878
3963
  if (t >= o.alignmentBounds.upper) r += o.length;
3879
- else if (L(o.alignmentBounds, t)) {
3964
+ else if (k(o.alignmentBounds, t)) {
3880
3965
  r += Math.ceil(
3881
3966
  Number(t - o.alignment) / Number(o.alignmentMultiple)
3882
3967
  );
@@ -3888,7 +3973,7 @@ class Uu {
3888
3973
  const o = this.series[i];
3889
3974
  if (n < o.alignment) break;
3890
3975
  if (n >= o.alignmentBounds.upper) s += o.length;
3891
- else if (L(o.alignmentBounds, n)) {
3976
+ else if (k(o.alignmentBounds, n)) {
3892
3977
  s += Math.ceil(
3893
3978
  Number(n - o.alignment) / Number(o.alignmentMultiple)
3894
3979
  );
@@ -3911,7 +3996,7 @@ class Uu {
3911
3996
  const i = this.series[s];
3912
3997
  if (t < i.alignment) break;
3913
3998
  if (t >= i.alignmentBounds.upper) r += i.length;
3914
- else if (L(i.alignmentBounds, t)) {
3999
+ else if (k(i.alignmentBounds, t)) {
3915
4000
  r += Number(t - i.alignment);
3916
4001
  break;
3917
4002
  }
@@ -4089,7 +4174,7 @@ const nc = c.object({
4089
4174
  }), Bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4090
4175
  __proto__: null,
4091
4176
  Z: rc
4092
- }, Symbol.toStringTag, { value: "Module" })), sc = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, zt = c.string().regex(sc), H = c.number().min(0).max(255), Xe = c.number().min(0).max(1), Qt = c.tuple([H, H, H, Xe]), ic = c.tuple([H, H, H]), oc = c.object({ rgba255: Qt }), cc = c.object({ r: H, g: H, b: H, a: Xe }), ac = c.number().min(0).max(360), uc = c.number().min(0).max(100), lc = c.number().min(0).max(100), gr = c.tuple([ac, uc, lc, Xe]), te = c.union([zt, ic, Qt, gr, oc, cc]), St = te.transform((e) => I(e)), fc = (e) => St.safeParse(e).success, hc = (e) => Qt.safeParse(e).success, dc = ((e) => {
4177
+ }, Symbol.toStringTag, { value: "Module" })), sc = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Yt = c.string().regex(sc), H = c.number().min(0).max(255), Xe = c.number().min(0).max(1), Qt = c.tuple([H, H, H, Xe]), ic = c.tuple([H, H, H]), oc = c.object({ rgba255: Qt }), cc = c.object({ r: H, g: H, b: H, a: Xe }), ac = c.number().min(0).max(360), uc = c.number().min(0).max(100), lc = c.number().min(0).max(100), gr = c.tuple([ac, uc, lc, Xe]), te = c.union([Yt, ic, Qt, gr, oc, cc]), St = te.transform((e) => I(e)), fc = (e) => St.safeParse(e).success, hc = (e) => Qt.safeParse(e).success, dc = ((e) => {
4093
4178
  if (e == null) return;
4094
4179
  const t = St.safeParse(e);
4095
4180
  if (t.success) return mr(t.data);
@@ -4142,7 +4227,7 @@ const nc = c.object({
4142
4227
  throw new Error("[Color.pickByContrast] - must provide at least one color");
4143
4228
  const n = I(e), [r] = t.sort((s, i) => we(n, i) - we(n, s));
4144
4229
  return I(r);
4145
- }, Ic = (e) => vt(e) < 0.5, Nc = (e) => vt(e) > 0.5, Zt = (e, t = 1) => (e = zt.parse(e), e = vc(e), [
4230
+ }, Ic = (e) => vt(e) < 0.5, Nc = (e) => vt(e) > 0.5, Zt = (e, t = 1) => (e = Yt.parse(e), e = vc(e), [
4146
4231
  Bt(e, 0),
4147
4232
  Bt(e, 2),
4148
4233
  Bt(e, 4),
@@ -4186,9 +4271,9 @@ const nc = c.object({
4186
4271
  if (t.startsWith("#")) {
4187
4272
  if (t.length === 4) {
4188
4273
  const n = t[1], r = t[2], s = t[3], i = `#${n}${n}${r}${r}${s}${s}`;
4189
- if (zt.safeParse(i).success) return Zt(i);
4274
+ if (Yt.safeParse(i).success) return Zt(i);
4190
4275
  }
4191
- return (t.length === 7 || t.length === 9) && zt.safeParse(t).success ? Zt(t) : void 0;
4276
+ return (t.length === 7 || t.length === 9) && Yt.safeParse(t).success ? Zt(t) : void 0;
4192
4277
  }
4193
4278
  if (t.startsWith("rgb")) {
4194
4279
  const n = t.match(
@@ -4335,7 +4420,7 @@ const nc = c.object({
4335
4420
  stateZ: Mt,
4336
4421
  subjectZ: Ir,
4337
4422
  transferZ: Rc
4338
- }, Symbol.toStringTag, { value: "Module" })), kc = (e) => {
4423
+ }, Symbol.toStringTag, { value: "Module" })), Lc = (e) => {
4339
4424
  switch (typeof e) {
4340
4425
  case "bigint":
4341
4426
  case "number":
@@ -4351,10 +4436,10 @@ const nc = c.object({
4351
4436
  case "object":
4352
4437
  return e == null ? "" : fn(JSON.stringify(e));
4353
4438
  }
4354
- }, Lc = /[",\n]/, fn = (e) => Lc.test(e) ? `"${e.replace(/"/g, '""')}"` : e, ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4439
+ }, kc = /[",\n]/, fn = (e) => kc.test(e) ? `"${e.replace(/"/g, '""')}"` : e, Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4355
4440
  __proto__: null,
4356
- formatValue: kc
4357
- }, Symbol.toStringTag, { value: "Module" })), Lu = (e, t) => {
4441
+ formatValue: Lc
4442
+ }, Symbol.toStringTag, { value: "Module" })), ku = (e, t) => {
4358
4443
  let n = null;
4359
4444
  return t === 0 ? e : (...s) => {
4360
4445
  n !== null && (clearTimeout(n), n = null), n = setTimeout(() => e(...s), t);
@@ -4511,7 +4596,7 @@ const nc = c.object({
4511
4596
  throw s instanceof TypeError ? new TypeError(`.${r}: ${s.message}`) : s;
4512
4597
  }
4513
4598
  return Ie(e, ...t);
4514
- }, zc = (e, t, n) => {
4599
+ }, Yc = (e, t, n) => {
4515
4600
  const r = (s, i, o) => {
4516
4601
  if (o.def?.type === "union")
4517
4602
  return o.def.options.reduce(
@@ -4541,7 +4626,7 @@ const nc = c.object({
4541
4626
  return s;
4542
4627
  };
4543
4628
  return r({ ...e }, t, n);
4544
- }, Yc = (e, t) => {
4629
+ }, zc = (e, t) => {
4545
4630
  const n = t.split(j);
4546
4631
  let r = e, s = 0;
4547
4632
  for (; s < n.length; ) {
@@ -4669,10 +4754,10 @@ const nc = c.object({
4669
4754
  getIndex: ot,
4670
4755
  has: Wc,
4671
4756
  override: Ie,
4672
- overrideValidItems: zc,
4757
+ overrideValidItems: Yc,
4673
4758
  partialEqual: Mr,
4674
4759
  pathsMatch: Vc,
4675
- remove: Yc,
4760
+ remove: zc,
4676
4761
  resolvePath: qc,
4677
4762
  set: Gc,
4678
4763
  transformPath: Ar
@@ -4795,9 +4880,9 @@ const oa = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
4795
4880
  MockAsync: sa,
4796
4881
  MockSync: ia,
4797
4882
  stringPairZ: oa
4798
- }, Symbol.toStringTag, { value: "Module" })), Tr = k.uuid(), $r = k.object({
4883
+ }, Symbol.toStringTag, { value: "Module" })), Tr = L.uuid(), $r = L.object({
4799
4884
  key: Tr,
4800
- name: k.string().min(1),
4885
+ name: L.string().min(1),
4801
4886
  color: St
4802
4887
  }), Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4803
4888
  __proto__: null,
@@ -4806,31 +4891,31 @@ const oa = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
4806
4891
  }, Symbol.toStringTag, { value: "Module" })), ca = new RegExp(
4807
4892
  "^(https?:\\/\\/)?((([a-zA-Z0-9][a-zA-Z0-9-]*\\.)+[a-zA-Z]{2,})|localhost|(\\d{1,3}\\.){3}\\d{1,3})(\\:\\d+)?(\\/[-a-zA-Z0-9@:%._\\+~#=]*)*(\\?[;&a-zA-Z0-9%_.,~+=-]*)?(#[-a-zA-Z0-9_]*)?$"
4808
4893
  // fragment identifier (optional)
4809
- ), aa = (e) => ca.test(e), zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4894
+ ), aa = (e) => ca.test(e), Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4810
4895
  __proto__: null,
4811
4896
  is: aa
4812
4897
  }, Symbol.toStringTag, { value: "Module" })), ua = (e, t, n) => {
4813
4898
  const r = e.get(t);
4814
4899
  return r === void 0 ? (e.set(t, n), n) : r;
4815
- }, Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4900
+ }, zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4816
4901
  __proto__: null,
4817
4902
  getOrSetDefault: ua
4818
4903
  }, Symbol.toStringTag, { value: "Module" })), Me = c.string().regex(/^\d+\.\d+\.\d+(-[0-9A-Za-z-]+(\.[0-9A-Za-z-]+)*)?$/), la = (e, t) => {
4819
4904
  const n = e.split("."), r = t.split("."), s = Math.max(n.length, r.length);
4820
4905
  for (let i = 0; i < s; i++) {
4821
4906
  const o = n[i], a = r[i];
4822
- if (o === void 0) return z;
4823
- if (a === void 0) return Y;
4907
+ if (o === void 0) return Y;
4908
+ if (a === void 0) return z;
4824
4909
  const u = /^\d+$/.test(o), l = /^\d+$/.test(a);
4825
- if (u && !l) return z;
4826
- if (!u && l) return Y;
4910
+ if (u && !l) return Y;
4911
+ if (!u && l) return z;
4827
4912
  if (u && l) {
4828
4913
  const h = parseInt(o), y = parseInt(a);
4829
- if (h < y) return z;
4830
- if (h > y) return Y;
4914
+ if (h < y) return Y;
4915
+ if (h > y) return z;
4831
4916
  } else {
4832
- if (o < a) return z;
4833
- if (o > a) return Y;
4917
+ if (o < a) return Y;
4918
+ if (o > a) return z;
4834
4919
  }
4835
4920
  }
4836
4921
  return it;
@@ -4838,18 +4923,18 @@ const oa = c.object({ key: c.string(), value: c.string() }), Vu = /* @__PURE__ *
4838
4923
  n.checkMajor ??= !0, n.checkMinor ??= !0, n.checkPatch ??= !0;
4839
4924
  const r = Me.parse(e), s = Me.parse(t), [i, o] = r.split("-"), [a, u] = s.split("-"), [l, h, y] = i.split(".").map(Number), [m, M, S] = a.split(".").map(Number);
4840
4925
  if (n.checkMajor) {
4841
- if (l < m) return z;
4842
- if (l > m) return Y;
4926
+ if (l < m) return Y;
4927
+ if (l > m) return z;
4843
4928
  }
4844
4929
  if (n.checkMinor) {
4845
- if (h < M) return z;
4846
- if (h > M) return Y;
4930
+ if (h < M) return Y;
4931
+ if (h > M) return z;
4847
4932
  }
4848
4933
  if (n.checkPatch) {
4849
- if (y < S) return z;
4850
- if (y > S) return Y;
4934
+ if (y < S) return Y;
4935
+ if (y > S) return z;
4851
4936
  }
4852
- return o === void 0 && u === void 0 ? it : o === void 0 ? Y : u === void 0 ? z : la(o, u);
4937
+ return o === void 0 && u === void 0 ? it : o === void 0 ? z : u === void 0 ? Y : la(o, u);
4853
4938
  }), fa = (e, t, n = {}) => En($t(e, t, n)), Ur = (e, t, n = {}) => An($t(e, t, n)), ha = (e, t, n = {}) => Mn($t(e, t, n)), da = ({
4854
4939
  name: e,
4855
4940
  migrate: t
@@ -5029,7 +5114,7 @@ const Sa = ((e = {}) => {
5029
5114
  }, Symbol.toStringTag, { value: "Module" })), Ua = (e) => Array.isArray(e) ? [...e] : typeof e == "object" && e !== null ? { ...e } : e, tl = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5030
5115
  __proto__: null,
5031
5116
  copy: Ua
5032
- }, Symbol.toStringTag, { value: "Module" })), kr = c.enum([
5117
+ }, Symbol.toStringTag, { value: "Module" })), Lr = c.enum([
5033
5118
  "success",
5034
5119
  "info",
5035
5120
  "warning",
@@ -5039,7 +5124,7 @@ const Sa = ((e = {}) => {
5039
5124
  ]), ja = (e) => c.object({
5040
5125
  key: c.string(),
5041
5126
  name: c.string().default(""),
5042
- variant: kr,
5127
+ variant: Lr,
5043
5128
  message: c.string(),
5044
5129
  description: c.string().optional(),
5045
5130
  time: d.z,
@@ -5050,13 +5135,13 @@ const Sa = ((e = {}) => {
5050
5135
  error: c.instanceof(Error)
5051
5136
  }), Ba = (e, t) => {
5052
5137
  if (!(e instanceof Error)) throw e;
5053
- return Lr({
5138
+ return kr({
5054
5139
  variant: "error",
5055
5140
  message: t ?? e.message,
5056
5141
  description: t != null ? e.message : void 0,
5057
5142
  details: { stack: e.stack ?? "", error: e }
5058
5143
  });
5059
- }, Lr = (e) => ({
5144
+ }, kr = (e) => ({
5060
5145
  key: Se(),
5061
5146
  time: d.now(),
5062
5147
  name: "",
@@ -5067,11 +5152,11 @@ const Sa = ((e = {}) => {
5067
5152
  }, Ra = (e, t = []) => {
5068
5153
  if (e != null)
5069
5154
  return Array.isArray(t) ? t.includes(e) ? void 0 : e : t === e ? void 0 : e;
5070
- }, ka = {
5155
+ }, La = {
5071
5156
  includeTimestamp: !1,
5072
5157
  includeName: !0
5073
- }, La = (e, t = {}) => {
5074
- const n = { ...ka, ...t }, r = [];
5158
+ }, ka = (e, t = {}) => {
5159
+ const n = { ...La, ...t }, r = [];
5075
5160
  let s = e.variant.toUpperCase();
5076
5161
  if (n.includeName && e.name.length > 0 && (s += ` [${e.name}]`), s += `: ${e.message}`, n.includeTimestamp && (s += ` (${e.time.toString("dateTime", "local")})`), r.push(s), e.description != null) {
5077
5162
  let i;
@@ -5099,14 +5184,14 @@ ${JSON.stringify(o, null, 2)}`);
5099
5184
  `);
5100
5185
  }, el = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
5101
5186
  __proto__: null,
5102
- create: Lr,
5187
+ create: kr,
5103
5188
  exceptionDetailsSchema: Ca,
5104
5189
  fromException: Ba,
5105
5190
  keepVariants: Pa,
5106
5191
  removeVariants: Ra,
5107
5192
  statusZ: ja,
5108
- toString: La,
5109
- variantZ: kr
5193
+ toString: ka,
5194
+ variantZ: Lr
5110
5195
  }, Symbol.toStringTag, { value: "Module" })), Za = (e, t) => {
5111
5196
  if (!t.has(e)) return e;
5112
5197
  let n = e, r = 1, s = e;
@@ -5144,7 +5229,7 @@ ${JSON.stringify(o, null, 2)}`);
5144
5229
  naturalLanguageJoin: qa,
5145
5230
  trimPrefix: Va
5146
5231
  }, Symbol.toStringTag, { value: "Module" })), Wa = new Error("request for lock canceled");
5147
- var za = function(e, t, n, r) {
5232
+ var Ya = function(e, t, n, r) {
5148
5233
  function s(i) {
5149
5234
  return i instanceof n ? i : new n(function(o) {
5150
5235
  o(i);
@@ -5171,7 +5256,7 @@ var za = function(e, t, n, r) {
5171
5256
  l((r = r.apply(e, t || [])).next());
5172
5257
  });
5173
5258
  };
5174
- class Ya {
5259
+ class za {
5175
5260
  constructor(t, n = Wa) {
5176
5261
  this._value = t, this._cancelError = n, this._queue = [], this._weightedWaiters = [];
5177
5262
  }
@@ -5184,7 +5269,7 @@ class Ya {
5184
5269
  });
5185
5270
  }
5186
5271
  runExclusive(t) {
5187
- return za(this, arguments, void 0, function* (n, r = 1, s = 0) {
5272
+ return Ya(this, arguments, void 0, function* (n, r = 1, s = 0) {
5188
5273
  const [i, o] = yield this.acquire(r, s);
5189
5274
  try {
5190
5275
  return yield n(i);
@@ -5291,7 +5376,7 @@ var Ha = function(e, t, n, r) {
5291
5376
  };
5292
5377
  class Da {
5293
5378
  constructor(t) {
5294
- this._semaphore = new Ya(1, t);
5379
+ this._semaphore = new za(1, t);
5295
5380
  }
5296
5381
  acquire() {
5297
5382
  return Ha(this, arguments, void 0, function* (t = 0) {
@@ -5416,7 +5501,7 @@ const ol = () => {
5416
5501
  e.handle({ data: s });
5417
5502
  };
5418
5503
  return e = new hn(n), t = new hn(r), [e, t];
5419
- }, ru = (e) => e.nullable().transform((t) => t === null ? void 0 : t).optional(), su = c.int().min(0).max(Cn), iu = (e) => k.array(e).or(e.transform((t) => [t])), ou = (e) => e._zod.def.output, Fr = (e) => Ar(e, (t, n, r) => {
5504
+ }, ru = (e) => e.nullable().transform((t) => t === null ? void 0 : t).optional(), su = c.int().min(0).max(Cn), iu = (e) => L.array(e).or(e.transform((t) => [t])), ou = (e) => e._zod.def.output, Fr = (e) => Ar(e, (t, n, r) => {
5420
5505
  const s = n === r.length - 1, i = !isNaN(parseInt(t)), o = !isNaN(parseInt(r[n + 1]));
5421
5506
  return i && (t = "element"), s || o ? t : [t, "shape"];
5422
5507
  }), dn = (e, t) => {
@@ -5463,8 +5548,8 @@ export {
5463
5548
  Ru as control,
5464
5549
  Ro as convertDataType,
5465
5550
  ol as createMockWorkers,
5466
- ku as csv,
5467
- Lu as debounce,
5551
+ Lu as csv,
5552
+ ku as debounce,
5468
5553
  _u as deep,
5469
5554
  qu as destructor,
5470
5555
  vu as dimensions,
@@ -5476,9 +5561,9 @@ export {
5476
5561
  ar as isTelemValue,
5477
5562
  Vu as kv,
5478
5563
  Wu as label,
5479
- zu as link,
5564
+ Yu as link,
5480
5565
  xu as location,
5481
- Yu as map,
5566
+ zu as map,
5482
5567
  wu as math,
5483
5568
  Gu as migrate,
5484
5569
  fu as narrow,