@synnaxlabs/pluto 0.46.2 → 0.46.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/dist/{Toggle-Djy3iEFS.js → Toggle-BvHOvpZl.js} +1 -1
  2. package/dist/{Toggle-D7uuc8BY.cjs → Toggle-YrCaaWoP.cjs} +1 -1
  3. package/dist/{Video-Com7iIjJ.js → Video-B3mUCF7w.js} +1 -1
  4. package/dist/{Video-BgaQjOlJ.cjs → Video-PX9PWa1_.cjs} +1 -1
  5. package/dist/button.cjs +1 -1
  6. package/dist/button.js +1 -1
  7. package/dist/color.cjs +1 -1
  8. package/dist/color.js +1 -1
  9. package/dist/css-BJh3xDSW.cjs +8 -0
  10. package/dist/{css-qKD7ZG81.js → css-C24hS2UX.js} +903 -875
  11. package/dist/css.cjs +1 -1
  12. package/dist/css.js +2 -2
  13. package/dist/dialog.cjs +1 -1
  14. package/dist/dialog.js +1 -1
  15. package/dist/ether.cjs +1 -1
  16. package/dist/ether.js +6 -6
  17. package/dist/{external-CfY-kR5_.js → external-1ucYXJx8.js} +2 -2
  18. package/dist/{external-CwtqVaYf.js → external-BN2wbDrK.js} +3 -3
  19. package/dist/{external-Bfddv9ir.cjs → external-BwkIuXvQ.cjs} +1 -1
  20. package/dist/{external-CG-WeHt1.js → external-C-ExavVe.js} +3 -3
  21. package/dist/{external-C0szVQZ4.js → external-CC9QgzfY.js} +3 -3
  22. package/dist/{external-BwAIT4Et.js → external-Cg3K8ETl.js} +4 -4
  23. package/dist/{external-Bp0LGk7L.cjs → external-ChJFeBx4.cjs} +1 -1
  24. package/dist/{external-BwzXukg6.js → external-ChfziUeG.js} +2 -2
  25. package/dist/{external-fThC1Pt0.js → external-Ck9vwLNn.js} +3 -3
  26. package/dist/{external-iLU86byd.cjs → external-Clg5_LVL.cjs} +1 -1
  27. package/dist/{external-BatQDwpn.cjs → external-CtPQhs2L.cjs} +1 -1
  28. package/dist/{external-R1DnhHJ8.cjs → external-D-7LQcc1.cjs} +1 -1
  29. package/dist/{external-ok-onqCX.cjs → external-D7ez6YFA.cjs} +1 -1
  30. package/dist/{external-CtIn5ns5.js → external-DSC98ftR.js} +3 -3
  31. package/dist/{external-JI_JLXE9.cjs → external-DcJjrD1A.cjs} +2 -2
  32. package/dist/{external-qAqWNZPd.cjs → external-DfxokOST.cjs} +1 -1
  33. package/dist/{external-DPsERPGZ.js → external-Dia3MCeO.js} +3 -3
  34. package/dist/external-Dxu0KYI_.cjs +1 -0
  35. package/dist/{external-BH7AW9vg.cjs → external-NOoRXXaT.cjs} +1 -1
  36. package/dist/{external-B_BNwXoG.js → external-RDyCOmKR.js} +21 -21
  37. package/dist/{external-BXAiwKcS.js → external-S4v-IR_C.js} +3 -3
  38. package/dist/{external-CaehDJtX.cjs → external-VIR_Vvod.cjs} +1 -1
  39. package/dist/{external-BqSq3_g3.js → external-mtaOrZVh.js} +2 -2
  40. package/dist/{external-DZ9ZLLOd.cjs → external-orHcg1KY.cjs} +1 -1
  41. package/dist/{external-CM-K5NTq.js → external-ree9J7kb.js} +1 -1
  42. package/dist/{external-DLIuO7_6.cjs → external-s4B9EjQm.cjs} +1 -1
  43. package/dist/flex.cjs +1 -1
  44. package/dist/flex.js +1 -1
  45. package/dist/{fontString-BpD7ezh8.cjs → fontString-BMITZjR-.cjs} +1 -1
  46. package/dist/{fontString-CpT1noV1.js → fontString-CNdpxtJg.js} +2 -2
  47. package/dist/header.cjs +1 -1
  48. package/dist/header.js +1 -1
  49. package/dist/index.cjs +12 -12
  50. package/dist/index.js +4689 -4692
  51. package/dist/input.cjs +1 -1
  52. package/dist/input.js +1 -1
  53. package/dist/list.cjs +1 -1
  54. package/dist/list.js +1 -1
  55. package/dist/{main-DCwBsS0F.js → main-9Dw_ngUE.js} +3 -3
  56. package/dist/{main-20msMsI6.cjs → main-rewFivKu.cjs} +30 -30
  57. package/dist/menu.cjs +1 -1
  58. package/dist/menu.js +1 -1
  59. package/dist/{provider-B-VPfAGa.js → provider-BMcIM58p.js} +3 -3
  60. package/dist/{provider-D295Uocj.cjs → provider-CedWF-id.cjs} +3 -3
  61. package/dist/{provider-qIzR8Puy.js → provider-DXuSQEu0.js} +2816 -2791
  62. package/dist/provider-DshN-WBB.cjs +83 -0
  63. package/dist/src/ontology/queries.d.ts +3 -10
  64. package/dist/src/ontology/queries.d.ts.map +1 -1
  65. package/dist/src/schematic/symbol/queries.d.ts +1 -3
  66. package/dist/src/schematic/symbol/queries.d.ts.map +1 -1
  67. package/dist/tabs.cjs +1 -1
  68. package/dist/tabs.js +1 -1
  69. package/dist/text.cjs +1 -1
  70. package/dist/text.js +2 -2
  71. package/dist/theming.cjs +1 -1
  72. package/dist/theming.js +2 -2
  73. package/dist/tree.cjs +1 -1
  74. package/dist/tree.js +1 -1
  75. package/dist/triggers.cjs +1 -1
  76. package/dist/triggers.js +1 -1
  77. package/dist/{units-WtYBE1br.js → units-BfWwpiDe.js} +1 -1
  78. package/dist/units-DOj-2MGY.cjs +1 -0
  79. package/dist/video.cjs +1 -1
  80. package/dist/video.js +1 -1
  81. package/package.json +5 -5
  82. package/dist/css-DA2F4zE4.cjs +0 -8
  83. package/dist/external-BaO1j7U1.cjs +0 -1
  84. package/dist/provider-DVqod4rl.cjs +0 -83
  85. package/dist/units-CLbZ5ejs.cjs +0 -1
@@ -1,34 +1,34 @@
1
1
  import O, { z as a } from "zod";
2
- const or = (t) => O.union([
2
+ const lr = (t) => O.union([
3
3
  O.union([O.null(), O.undefined()]).transform(() => []),
4
4
  t.array()
5
- ]), Sn = (t) => Array.isArray(t) ? t : t == null ? [] : [t], ur = (t, e) => {
5
+ ]), Mn = (t) => Array.isArray(t) ? t : t == null ? [] : [t], cr = (t, e) => {
6
6
  if (Array.isArray(e))
7
- return e.reduce((s, i) => ur(s, i), t ?? []);
7
+ return e.reduce((s, i) => cr(s, i), t ?? []);
8
8
  if (t == null) return [e];
9
9
  const r = t.findIndex((s) => s == e), n = [...t];
10
10
  return r === -1 ? n.push(e) : n[r] = e, n;
11
- }, Nn = ((t, e) => {
11
+ }, An = ((t, e) => {
12
12
  if (t != null)
13
13
  return Array.isArray(e) ? t.filter((r) => !e.includes(r)) : t.filter((r) => r != e);
14
- }), lr = (t, e) => {
14
+ }), hr = (t, e) => {
15
15
  if (Array.isArray(e))
16
- return e.reduce((s, i) => lr(s, i), t ?? []);
16
+ return e.reduce((s, i) => hr(s, i), t ?? []);
17
17
  if (t == null) return [e];
18
18
  const r = t.findIndex((s) => s.key === e.key), n = [...t];
19
19
  return r === -1 ? n.push(e) : n[r] = e, n;
20
- }, In = ((t, e) => {
20
+ }, En = ((t, e) => {
21
21
  if (t != null)
22
22
  return Array.isArray(e) ? t.filter((r) => !e.includes(r.key)) : t.filter((r) => r.key !== e);
23
- }), pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
23
+ }), bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
24
24
  __proto__: null,
25
- nullableZ: or,
26
- remove: Nn,
27
- removeKeyed: In,
28
- toArray: Sn,
29
- upsert: ur,
30
- upsertKeyed: lr
31
- }, Symbol.toStringTag, { value: "Module" })), Mn = (t) => {
25
+ nullableZ: lr,
26
+ remove: An,
27
+ removeKeyed: En,
28
+ toArray: Mn,
29
+ upsert: cr,
30
+ upsertKeyed: hr
31
+ }, Symbol.toStringTag, { value: "Module" })), Un = (t) => {
32
32
  const e = t.replace(/_[a-z]/g, (r) => r[1].toUpperCase());
33
33
  return e.length > 1 && e[0] === e[0].toUpperCase() && e[1] === e[1].toUpperCase() || e.length === 0 ? e : e[0].toLowerCase() + e.slice(1);
34
34
  }, Ye = (t) => {
@@ -36,32 +36,32 @@ const or = (t) => O.union([
36
36
  if (typeof r == "string") return t(r);
37
37
  if (Array.isArray(r)) return r.map((o) => e(o, n));
38
38
  if (!rt(r)) return r;
39
- n = Un(n);
39
+ n = Cn(n);
40
40
  const s = {}, i = r;
41
41
  return "toJSON" in i && typeof i.toJSON == "function" ? e(i.toJSON(), n) : (Object.keys(i).forEach((o) => {
42
- let h = i[o];
42
+ let l = i[o];
43
43
  const f = t(o);
44
- n.recursive && (rt(h) ? Qt(h) || (h = e(h, n)) : n.recursiveInArray && Kt(h) && (h = [...h].map((l) => {
45
- let d = l;
46
- return rt(l) ? Qt(d) || (d = e(l, n)) : Kt(l) && (d = e({ key: l }, n).key), d;
47
- }))), s[f] = h;
44
+ n.recursive && (rt(l) ? er(l) || (l = e(l, n)) : n.recursiveInArray && _t(l) && (l = [...l].map((c) => {
45
+ let d = c;
46
+ return rt(c) ? er(d) || (d = e(c, n)) : _t(c) && (d = e({ key: c }, n).key), d;
47
+ }))), s[f] = l;
48
48
  }), s);
49
49
  };
50
50
  return e;
51
- }, St = Ye(Mn), An = (t) => (
51
+ }, It = Ye(Un), Bn = (t) => (
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
  t.replace(
55
55
  /([a-z0-9])([A-Z])/g,
56
56
  (e, r, n) => `${r}_${n.toLowerCase()}`
57
57
  )
58
- ), cr = Ye(An), hr = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), En = [Number, String, Uint8Array], lt = {
58
+ ), fr = Ye(Bn), dr = (t) => t.length === 0 ? t : t[0].toUpperCase() + t.slice(1), jn = [Number, String, Uint8Array], lt = {
59
59
  recursive: !0,
60
60
  recursiveInArray: !0
61
- }, Un = (t = lt) => (t.recursive == null ? t = lt : t.recursiveInArray ??= !1, t), Kt = (t) => t != null && Array.isArray(t), rt = (t) => t != null && typeof t == "object" && !Array.isArray(t), Qt = (t) => En.some((e) => t instanceof e), Bn = (t) => t.replace(/[\s_]+/g, "-").replace(
61
+ }, Cn = (t = lt) => (t.recursive == null ? t = lt : t.recursiveInArray ??= !1, t), _t = (t) => t != null && Array.isArray(t), rt = (t) => t != null && typeof t == "object" && !Array.isArray(t), er = (t) => jn.some((e) => t instanceof e), Rn = (t) => t.replace(/[\s_]+/g, "-").replace(
62
62
  /([a-z0-9])([A-Z])/g,
63
63
  (e, r, n) => `${r}-${n.toLowerCase()}`
64
- ).toLowerCase(), jn = Ye(Bn), Cn = (t) => {
64
+ ).toLowerCase(), Ln = Ye(Rn), Dn = (t) => {
65
65
  if (t.length === 0) return t;
66
66
  let e = t.replace(/[_-]/g, " ");
67
67
  return e = e.replace(
@@ -71,15 +71,15 @@ const or = (t) => O.union([
71
71
  /([A-Z]+)([A-Z][a-z])/g,
72
72
  (r, n, s) => `${n} ${s}`
73
73
  ), e = e.replace(/\s+/g, " ").trim(), e = e.replace(/\b\w/g, (r) => r.toUpperCase()), e;
74
- }, Rn = Ye(Cn), mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
74
+ }, Pn = Ye(Dn), wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
75
75
  __proto__: null,
76
- camelToSnake: cr,
77
- capitalize: hr,
78
- snakeToCamel: St,
79
- toKebab: jn,
80
- toProperNoun: Rn
76
+ camelToSnake: fr,
77
+ capitalize: dr,
78
+ snakeToCamel: It,
79
+ toKebab: Ln,
80
+ toProperNoun: Pn
81
81
  }, Symbol.toStringTag, { value: "Module" }));
82
- let Ln = class {
82
+ let kn = class {
83
83
  contentType = "application/json";
84
84
  decoder;
85
85
  encoder;
@@ -93,15 +93,15 @@ let Ln = class {
93
93
  return this.decodeString(this.decoder.decode(e), r);
94
94
  }
95
95
  decodeString(e, r) {
96
- const n = JSON.parse(e), s = St(n);
96
+ const n = JSON.parse(e), s = It(n);
97
97
  return r != null ? r.parse(s) : s;
98
98
  }
99
99
  encodeString(e) {
100
- const r = cr(e);
100
+ const r = fr(e);
101
101
  return JSON.stringify(r, (n, s) => ArrayBuffer.isView(s) ? Array.from(s) : typeof s == "bigint" ? s.toString() : s);
102
102
  }
103
103
  };
104
- const ct = new Ln(), ht = (t) => [...new Set(t)], Dn = (t, e, r = !0) => {
104
+ const ct = new kn(), ht = (t) => [...new Set(t)], qn = (t, e, r = !0) => {
105
105
  const n = /* @__PURE__ */ new Map();
106
106
  return t.forEach((s) => {
107
107
  const i = e(s);
@@ -111,9 +111,9 @@ const ct = new Ln(), ht = (t) => [...new Set(t)], Dn = (t, e, r = !0) => {
111
111
  }
112
112
  n.set(i, s);
113
113
  }), Array.from(n.values());
114
- }, bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
114
+ }, Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
115
115
  __proto__: null,
116
- by: Dn,
116
+ by: qn,
117
117
  unique: ht
118
118
  }, Symbol.toStringTag, { value: "Module" })), B = (t) => t != null && typeof t == "object" && "value" in t;
119
119
  let re = class {
@@ -136,8 +136,8 @@ let re = class {
136
136
  return this.value.toString();
137
137
  }
138
138
  };
139
- const Nt = (t) => t != null && typeof t == "object" && "toString" in t, fr = (t) => {
140
- if (Nt(t)) return t?.toString().length === 0;
139
+ const Mt = (t) => t != null && typeof t == "object" && "toString" in t, gr = (t) => {
140
+ if (Mt(t)) return t?.toString().length === 0;
141
141
  switch (typeof t) {
142
142
  case "string":
143
143
  return t.length === 0;
@@ -154,15 +154,15 @@ const Nt = (t) => t != null && typeof t == "object" && "toString" in t, fr = (t)
154
154
  default:
155
155
  return !1;
156
156
  }
157
- }, Pn = (t) => !fr(t), $u = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
157
+ }, zn = (t) => !gr(t), Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
158
158
  __proto__: null,
159
159
  ValueExtension: re,
160
160
  isCrudeValueExtension: B,
161
- isNonZero: Pn,
162
- isStringer: Nt,
163
- isZero: fr
161
+ isNonZero: zn,
162
+ isStringer: Mt,
163
+ isZero: gr
164
164
  }, Symbol.toStringTag, { value: "Module" })), We = (t, e = !1) => {
165
- const r = Nt(t) ? "stringer" : typeof t;
165
+ const r = Mt(t) ? "stringer" : typeof t;
166
166
  let n;
167
167
  switch (r) {
168
168
  case "string":
@@ -186,69 +186,69 @@ const Nt = (t) => t != null && typeof t == "object" && "toString" in t, fr = (t)
186
186
  default:
187
187
  return console.warn(`sortFunc: unknown type ${r}`), () => -1;
188
188
  }
189
- return e ? gr(n) : n;
190
- }, kn = (t, e, r) => {
189
+ return e ? mr(n) : n;
190
+ }, Zn = (t, e, r) => {
191
191
  const n = We(e[t], r);
192
192
  return (s, i) => n(s[t], i[t]);
193
- }, qn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, dr = (t, e) => {
193
+ }, Fn = (t, e) => t.length !== e.length ? t.length - e.length : t.every((r, n) => r === e[n]) ? 0 : -1, pr = (t, e) => {
194
194
  if (t.length !== e.length) return t.length - e.length;
195
195
  if (t.length === 0) return 0;
196
196
  const r = We(t[0]), n = [...t].sort(r), s = [...e].sort(r);
197
197
  return n.every((i, o) => i === s[o]) ? 0 : -1;
198
- }, zn = (t, e) => {
198
+ }, Yn = (t, e) => {
199
199
  const r = ht(t), n = ht(e);
200
- return dr(r, n);
201
- }, Zn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, gr = (t) => (e, r) => t(r, e), ae = 0, Ue = -1, Be = 1, pr = (t) => t < ae, mr = (t) => t > ae, Fn = (t) => t >= ae, yr = (t) => t === ae, Yn = (t, e) => {
200
+ return pr(r, n);
201
+ }, Wn = (t, e) => t === e ? 0 : t === "first" && e === "last" ? 1 : -1, mr = (t) => (e, r) => t(r, e), ae = 0, Ue = -1, Be = 1, yr = (t) => t < ae, br = (t) => t > ae, Vn = (t) => t >= ae, wr = (t) => t === ae, Gn = (t, e) => {
202
202
  const r = /([a-zA-Z]+)|(\d+)/g, n = t.replace(/[\s_.-]+/g, "").match(r), s = e.replace(/[\s_.-]+/g, "").match(r);
203
203
  if (!n || !s) return 0;
204
204
  for (let i = 0; i < Math.min(n.length, s.length); i++) {
205
- const o = n[i], h = s[i];
206
- if (isNaN(Number(o)) && isNaN(Number(h))) {
207
- const f = o.localeCompare(h);
205
+ const o = n[i], l = s[i];
206
+ if (isNaN(Number(o)) && isNaN(Number(l))) {
207
+ const f = o.localeCompare(l);
208
208
  if (f !== 0) return f;
209
- } else if (!isNaN(Number(o)) && !isNaN(Number(h))) {
210
- const f = Number(o) - Number(h);
209
+ } else if (!isNaN(Number(o)) && !isNaN(Number(l))) {
210
+ const f = Number(o) - Number(l);
211
211
  if (f !== 0) return f;
212
212
  } else return isNaN(Number(o)) ? -1 : 1;
213
213
  }
214
214
  return n.length - s.length;
215
- }, Ou = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
215
+ }, xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
216
216
  __proto__: null,
217
217
  EQUAL: ae,
218
218
  GREATER_THAN: Be,
219
219
  LESS_THAN: Ue,
220
- isEqualTo: yr,
221
- isGreaterThan: mr,
222
- isGreaterThanEqual: Fn,
223
- isLessThan: pr,
220
+ isEqualTo: wr,
221
+ isGreaterThan: br,
222
+ isGreaterThanEqual: Vn,
223
+ isLessThan: yr,
224
224
  newF: We,
225
- newFieldF: kn,
226
- order: Zn,
227
- primitiveArrays: qn,
228
- reverseF: gr,
229
- stringsWithNumbers: Yn,
230
- uniqueUnorderedPrimitiveArrays: zn,
231
- unorderedPrimitiveArrays: dr
225
+ newFieldF: Zn,
226
+ order: Wn,
227
+ primitiveArrays: Fn,
228
+ reverseF: mr,
229
+ stringsWithNumbers: Gn,
230
+ uniqueUnorderedPrimitiveArrays: Yn,
231
+ unorderedPrimitiveArrays: pr
232
232
  }, Symbol.toStringTag, { value: "Module" })), Ve = a.tuple([a.number(), a.number()]);
233
233
  a.tuple([a.bigint(), a.bigint()]);
234
- const It = a.object({ width: a.number(), height: a.number() }), Wn = a.object({
234
+ const At = a.object({ width: a.number(), height: a.number() }), Hn = a.object({
235
235
  signedWidth: a.number(),
236
236
  signedHeight: a.number()
237
- }), Vn = ["width", "height"];
238
- a.enum(Vn);
239
- const Gn = ["start", "center", "end"], Hn = ["signedWidth", "signedHeight"];
240
- a.enum(Hn);
241
- const ye = a.object({ x: a.number(), y: a.number() }), br = a.object({ clientX: a.number(), clientY: a.number() }), Ge = ["x", "y"], Mt = a.enum(Ge), At = ["top", "right", "bottom", "left"], Xn = a.enum(At), He = ["left", "right"], Et = a.enum(He), Xe = ["top", "bottom"], Ut = a.enum(Xe), Bt = ["center"], ft = a.enum(Bt), Jn = [...At, ...Bt], jt = a.enum(Jn);
242
- a.enum(Gn);
243
- const Kn = ["first", "last"];
237
+ }), Xn = ["width", "height"];
238
+ a.enum(Xn);
239
+ const Jn = ["start", "center", "end"], Kn = ["signedWidth", "signedHeight"];
244
240
  a.enum(Kn);
245
- const wr = a.object({ lower: a.number(), upper: a.number() }), Qn = a.object({ lower: a.bigint(), upper: a.bigint() });
246
- a.union([wr, Ve]);
247
- a.union([Qn, Ve]);
248
- const _n = a.enum([...Mt.options, ...jt.options]);
241
+ const be = a.object({ x: a.number(), y: a.number() }), $r = a.object({ clientX: a.number(), clientY: a.number() }), Ge = ["x", "y"], Et = a.enum(Ge), Ut = ["top", "right", "bottom", "left"], Qn = a.enum(Ut), He = ["left", "right"], Bt = a.enum(He), Xe = ["top", "bottom"], jt = a.enum(Xe), Ct = ["center"], ft = a.enum(Ct), _n = [...Ut, ...Ct], Rt = a.enum(_n);
242
+ a.enum(Jn);
243
+ const es = ["first", "last"];
244
+ a.enum(es);
245
+ const Or = a.object({ lower: a.number(), upper: a.number() }), ts = a.object({ lower: a.bigint(), upper: a.bigint() });
246
+ a.union([Or, Ve]);
247
+ a.union([ts, Ve]);
248
+ const rs = a.enum([...Et.options, ...Rt.options]);
249
249
  a.enum(["x", "left", "right"]);
250
250
  a.enum(["y", "top", "bottom"]);
251
- const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
251
+ const ns = a.union([Et, Rt, a.instanceof(String)]), oe = (t) => (e, r) => {
252
252
  if (typeof e == "bigint") {
253
253
  if (ke(r))
254
254
  return t(e, BigInt(r));
@@ -256,13 +256,13 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
256
256
  return typeof n == "number" ? BigInt(Math.round(n)) : n;
257
257
  }
258
258
  return t(Number(e), Number(r));
259
- }, Z = oe((t, e) => t - e), ue = oe((t, e) => t + e), ts = (t, e, r = 1e-4) => Math.abs(t - e) < r, dt = (t, e) => {
259
+ }, Z = oe((t, e) => t - e), ue = oe((t, e) => t + e), ss = (t, e, r = 1e-4) => Math.abs(t - e) < r, dt = (t, e) => {
260
260
  const r = typeof t == "bigint", n = typeof e == "bigint";
261
261
  return r && n ? t === e : r && ke(e) ? t === BigInt(e) : n && ke(t) ? e === BigInt(t) : t === e;
262
- }, rs = (t) => {
262
+ }, is = (t) => {
263
263
  const e = 10 ** Math.floor(Math.log10(t));
264
264
  return Math.round(t / e) * e;
265
- }, $r = oe((t, e) => t <= e ? t : e), ke = (t) => typeof t == "bigint" ? !0 : Number.isInteger(t), ns = oe((t, e) => t >= e ? t : e), Or = (t) => typeof t == "bigint" ? t < 0n ? -t : t : t < 0 ? -t : t, R = oe((t, e) => t * e), ve = oe((t, e) => t / e), b = (t, e, r) => {
265
+ }, vr = oe((t, e) => t <= e ? t : e), ke = (t) => typeof t == "bigint" ? !0 : Number.isInteger(t), as = oe((t, e) => t >= e ? t : e), Tr = (t) => typeof t == "bigint" ? t < 0n ? -t : t : t < 0 ? -t : t, R = oe((t, e) => t * e), Te = oe((t, e) => t / e), b = (t, e, r) => {
266
266
  const n = {};
267
267
  if (typeof e == "object" && (r = e, e = void 0), r = { makeValid: !0, ...r }, typeof t == "number" || typeof t == "bigint")
268
268
  e != null ? (n.lower = t, n.upper = e) : (n.lower = typeof t == "bigint" ? 0n : 0, n.upper = t);
@@ -271,13 +271,13 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
271
271
  [n.lower, n.upper] = t;
272
272
  } else
273
273
  n.lower = t.lower, n.upper = t.upper;
274
- return r?.makeValid ? vr(n) : n;
275
- }, ss = Object.freeze({ lower: 0, upper: 0 }), is = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), as = Object.freeze({ lower: 0, upper: 1 }), os = Object.freeze({ lower: -1, upper: 1 }), us = (t, e) => {
274
+ return r?.makeValid ? xr(n) : n;
275
+ }, os = Object.freeze({ lower: 0, upper: 0 }), us = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), ls = Object.freeze({ lower: 0, upper: 1 }), cs = Object.freeze({ lower: -1, upper: 1 }), hs = (t, e) => {
276
276
  if (t == null && e == null) return !0;
277
277
  if (t == null || e == null) return !1;
278
278
  const r = b(t), n = b(e);
279
279
  return r?.lower === n?.lower && r?.upper === n?.upper;
280
- }, vr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, gt = (t, e) => {
280
+ }, xr = (t) => t.lower > t.upper ? { lower: t.upper, upper: t.lower } : t, gt = (t, e) => {
281
281
  const r = b(t);
282
282
  return e < r.lower ? r.lower : e >= r.upper ? r.upper - (typeof r.upper == "number" ? 1 : 1n) : e;
283
283
  }, L = (t, e) => {
@@ -286,33 +286,33 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
286
286
  return e >= r.lower && e < r.upper;
287
287
  const n = b(e);
288
288
  return n.lower >= r.lower && n.upper <= r.upper;
289
- }, ls = (t, e) => {
289
+ }, fs = (t, e) => {
290
290
  const r = b(t), n = b(e);
291
291
  return r.lower === n.lower ? !0 : n.upper === r.lower || n.lower === r.upper ? !1 : L(r, n.upper) || L(r, n.lower) || L(n, r.upper) || L(n, r.lower);
292
- }, Te = (t) => {
292
+ }, le = (t) => {
293
293
  const e = b(t);
294
294
  return e.upper - e.lower;
295
- }, cs = (t) => {
295
+ }, ds = (t) => {
296
296
  const e = b(t);
297
297
  return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
298
- }, hs = (t) => {
299
- const e = Te(t);
298
+ }, gs = (t) => {
299
+ const e = le(t);
300
300
  return typeof e == "number" ? e === 0 : e === 0n;
301
- }, fs = (t) => {
301
+ }, ps = (t) => {
302
302
  const e = b(t);
303
303
  return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
304
- }, ds = (t) => {
304
+ }, ms = (t) => {
305
305
  const e = b(t);
306
306
  return (e.upper + e.lower) / 2;
307
- }, Tr = (t) => ({
307
+ }, Sr = (t) => ({
308
308
  lower: Math.min(...t.map((e) => b(e).lower)),
309
309
  upper: Math.max(...t.map((e) => b(e).upper))
310
- }), gs = (t) => ({
310
+ }), ys = (t) => ({
311
311
  lower: Math.max(...t.map((e) => b(e).lower)),
312
312
  upper: Math.min(...t.map((e) => b(e).upper))
313
- }), ps = (t) => {
313
+ }), bs = (t) => {
314
314
  const e = b(t), r = typeof e.lower == "bigint";
315
- return Array.from({ length: Number(Te(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
315
+ return Array.from({ length: Number(le(t)) }, (n, s) => r ? e.lower + BigInt(s) : e.lower + s);
316
316
  }, pt = (t, e) => {
317
317
  const r = t.map((i) => b(i)), n = r.findIndex((i) => L(i, e) || e < i.lower);
318
318
  if (n === -1) return { index: t.length, position: 0 };
@@ -323,8 +323,8 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
323
323
  removeAfter: 0,
324
324
  insertInto: 0,
325
325
  deleteInBetween: 0
326
- }, ms = (t, e) => {
327
- const r = t.map((l) => b(l)), n = b(e);
326
+ }, ws = (t, e) => {
327
+ const r = t.map((c) => b(c)), n = b(e);
328
328
  if (r.length === 0) return nt;
329
329
  const s = pt(r, n.lower), i = pt(r, n.upper);
330
330
  if (s.index === t.length) return { ...nt, insertInto: t.length };
@@ -336,24 +336,24 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
336
336
  insertInto: s.index,
337
337
  deleteInBetween: 0
338
338
  };
339
- let o = i.index - s.index, h = s.index, f = Z(Number(Te(r[s.index])), s.position);
340
- return s.position !== 0 ? (o -= 1, h += 1) : f = 0, {
339
+ let o = i.index - s.index, l = s.index, f = Z(Number(le(r[s.index])), s.position);
340
+ return s.position !== 0 ? (o -= 1, l += 1) : f = 0, {
341
341
  removeBefore: f,
342
342
  removeAfter: i.position,
343
- insertInto: h,
343
+ insertInto: l,
344
344
  deleteInBetween: o
345
345
  };
346
- }, xr = (t, e, r) => {
347
- const n = t.map((h) => b(h)), s = r > 0 ? 1 : r < 0 ? -1 : 0;
346
+ }, Nr = (t, e, r) => {
347
+ const n = t.map((l) => b(l)), s = r > 0 ? 1 : r < 0 ? -1 : 0;
348
348
  if (s === 0) return e;
349
349
  let i = r, o = e;
350
350
  for (; dt(i, 0) === !1; ) {
351
- const h = n.findIndex((f) => s > 0 ? o >= f.lower && o < f.upper : o > f.lower && o <= f.upper);
352
- if (h !== -1) {
353
- const f = n[h];
354
- let l;
355
- if (s > 0 ? l = Z(f.upper, o) : l = Z(o, f.lower), l > 0) {
356
- const d = $r(Or(i), l);
351
+ const l = n.findIndex((f) => s > 0 ? o >= f.lower && o < f.upper : o > f.lower && o <= f.upper);
352
+ if (l !== -1) {
353
+ const f = n[l];
354
+ let c;
355
+ if (s > 0 ? c = Z(f.upper, o) : c = Z(o, f.lower), c > 0) {
356
+ const d = vr(Tr(i), c);
357
357
  if (o = ue(
358
358
  o,
359
359
  s > 0 ? d : -d
@@ -362,174 +362,174 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
362
362
  }
363
363
  }
364
364
  if (s > 0) {
365
- const f = n.filter((l) => l.lower > o);
365
+ const f = n.filter((c) => c.lower > o);
366
366
  if (f.length > 0) o = f[0].lower;
367
367
  else return o;
368
368
  } else {
369
- const f = n.filter((l) => l.upper < o);
369
+ const f = n.filter((c) => c.upper < o);
370
370
  if (f.length > 0)
371
371
  o = f[f.length - 1].upper;
372
372
  else return o;
373
373
  }
374
374
  }
375
375
  return o;
376
- }, Sr = (t, e, r) => {
376
+ }, Ir = (t, e, r) => {
377
377
  const n = t.map((o) => b(o));
378
378
  if (e === r) return typeof e == "bigint" ? 0n : 0;
379
379
  const s = e < r ? b([e, r]) : b([r, e]);
380
380
  let i = typeof e == "bigint" ? 0n : 0;
381
381
  for (const o of n) {
382
- const h = o.lower > s.lower ? o.lower : s.lower, f = o.upper < s.upper ? o.upper : s.upper;
383
- if (h < f) {
384
- const l = f - h;
385
- i = i + l;
382
+ const l = o.lower > s.lower ? o.lower : s.lower, f = o.upper < s.upper ? o.upper : s.upper;
383
+ if (l < f) {
384
+ const c = f - l;
385
+ i = i + c;
386
386
  }
387
387
  }
388
388
  return i;
389
- }, vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
389
+ }, Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
390
390
  __proto__: null,
391
- CLIP: os,
392
- DECIMAL: as,
393
- INFINITE: is,
394
- ZERO: ss,
395
- bounds: wr,
396
- buildInsertionPlan: ms,
391
+ CLIP: cs,
392
+ DECIMAL: ls,
393
+ INFINITE: us,
394
+ ZERO: os,
395
+ bounds: Or,
396
+ buildInsertionPlan: ws,
397
397
  clamp: gt,
398
398
  construct: b,
399
399
  contains: L,
400
- distance: Sr,
401
- equals: us,
400
+ distance: Ir,
401
+ equals: hs,
402
402
  findInsertPosition: pt,
403
- isFinite: fs,
404
- isZero: cs,
405
- linspace: ps,
406
- makeValid: vr,
407
- max: Tr,
408
- mean: ds,
409
- min: gs,
410
- overlapsWith: ls,
411
- span: Te,
412
- spanIsZero: hs,
413
- traverse: xr
414
- }, Symbol.toStringTag, { value: "Module" })), Nr = _n, z = (t) => Ge.includes(t) ? t : Xe.includes(t) ? "y" : "x", ys = (t) => z(t) === "x" ? "y" : "x", bs = (t) => z(t) === "x" ? "width" : "height", ws = (t) => z(t) === "x" ? "left" : "top", $s = (t) => Nr.safeParse(t).success, Os = (t) => z(t) === "x" ? "signedWidth" : "signedHeight", vs = (t) => t === "center" ? !1 : z(t) === "x", Ts = (t) => z(t) === "y", xs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
403
+ isFinite: ps,
404
+ isZero: ds,
405
+ linspace: bs,
406
+ makeValid: xr,
407
+ max: Sr,
408
+ mean: ms,
409
+ min: ys,
410
+ overlapsWith: fs,
411
+ span: le,
412
+ spanIsZero: gs,
413
+ traverse: Nr
414
+ }, Symbol.toStringTag, { value: "Module" })), Mr = rs, z = (t) => Ge.includes(t) ? t : Xe.includes(t) ? "y" : "x", $s = (t) => z(t) === "x" ? "y" : "x", Os = (t) => z(t) === "x" ? "width" : "height", vs = (t) => z(t) === "x" ? "left" : "top", Ts = (t) => Mr.safeParse(t).success, xs = (t) => z(t) === "x" ? "signedWidth" : "signedHeight", Ss = (t) => t === "center" ? !1 : z(t) === "x", Ns = (t) => z(t) === "y", Is = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
415
415
  __proto__: null,
416
416
  DIRECTIONS: Ge,
417
417
  construct: z,
418
- crude: Nr,
419
- dimension: bs,
420
- direction: Mt,
421
- isDirection: $s,
422
- isX: vs,
423
- isY: Ts,
424
- location: ws,
425
- signedDimension: Os,
426
- swap: ys
427
- }, Symbol.toStringTag, { value: "Module" })), Ss = Et, Ns = Ut, Is = ft, Ms = {
418
+ crude: Mr,
419
+ dimension: Os,
420
+ direction: Et,
421
+ isDirection: Ts,
422
+ isX: Ss,
423
+ isY: Ns,
424
+ location: vs,
425
+ signedDimension: xs,
426
+ swap: $s
427
+ }, Symbol.toStringTag, { value: "Module" })), Ms = Bt, As = jt, Es = ft, Us = {
428
428
  top: "bottom",
429
429
  right: "left",
430
430
  bottom: "top",
431
431
  left: "right",
432
432
  center: "center"
433
- }, As = {
433
+ }, Bs = {
434
434
  top: "left",
435
435
  right: "top",
436
436
  bottom: "right",
437
437
  left: "bottom",
438
438
  center: "center"
439
- }, Es = es, H = (t) => t instanceof String || !Ge.includes(t) ? t : t === "x" ? "left" : "top", Us = (t) => Ms[H(t)], Bs = (t) => As[H(t)], be = (t) => {
439
+ }, js = ns, H = (t) => t instanceof String || !Ge.includes(t) ? t : t === "x" ? "left" : "top", Cs = (t) => Us[H(t)], Rs = (t) => Bs[H(t)], we = (t) => {
440
440
  const e = H(t);
441
441
  return e === "top" || e === "bottom" ? "y" : "x";
442
- }, js = a.object({
443
- x: Et.or(ft),
444
- y: Ut.or(ft)
445
- }), Ir = a.object({ x: Et, y: Ut }), xe = Object.freeze({ x: "left", y: "top" }), Ct = Object.freeze({ x: "right", y: "top" }), Je = Object.freeze({ x: "left", y: "bottom" }), Rt = Object.freeze({ x: "right", y: "bottom" }), Lt = Object.freeze({ x: "center", y: "center" }), Dt = Object.freeze({ x: "center", y: "top" }), Pt = Object.freeze({ x: "center", y: "bottom" }), kt = Object.freeze({ x: "right", y: "center" }), qt = Object.freeze({ x: "left", y: "center" }), Cs = Object.freeze([
446
- qt,
442
+ }, Ls = a.object({
443
+ x: Bt.or(ft),
444
+ y: jt.or(ft)
445
+ }), Ar = a.object({ x: Bt, y: jt }), xe = Object.freeze({ x: "left", y: "top" }), Lt = Object.freeze({ x: "right", y: "top" }), Je = Object.freeze({ x: "left", y: "bottom" }), Dt = Object.freeze({ x: "right", y: "bottom" }), Pt = Object.freeze({ x: "center", y: "center" }), kt = Object.freeze({ x: "center", y: "top" }), qt = Object.freeze({ x: "center", y: "bottom" }), zt = Object.freeze({ x: "right", y: "center" }), Zt = Object.freeze({ x: "left", y: "center" }), Ds = Object.freeze([
446
+ Zt,
447
+ zt,
447
448
  kt,
448
- Dt,
449
- Pt,
449
+ qt,
450
450
  xe,
451
- Ct,
451
+ Lt,
452
452
  Je,
453
- Rt,
454
- Lt
455
- ]), zt = (t, e) => t.x === e.x && t.y === e.y, Rs = (t, e) => {
453
+ Dt,
454
+ Pt
455
+ ]), Ft = (t, e) => t.x === e.x && t.y === e.y, Ps = (t, e) => {
456
456
  if (typeof e == "object") {
457
457
  let r = !0;
458
458
  return "x" in e && (t.x === e.x || (r = !1)), "y" in e && (t.y === e.y || (r = !1)), r;
459
459
  }
460
460
  return t.x === e || t.y === e;
461
- }, Mr = (t) => [t.x, t.y], je = (t) => be(H(t)) === "x", Ls = (t) => be(H(t)) === "y", Ds = (t) => `${t.x}${hr(t.y)}`, Ps = (t, e) => {
461
+ }, Er = (t) => [t.x, t.y], je = (t) => we(H(t)) === "x", ks = (t) => we(H(t)) === "y", qs = (t) => `${t.x}${dr(t.y)}`, zs = (t, e) => {
462
462
  let r, n;
463
- if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = H(t), n = H(e ?? t)), be(r) === be(n) && r !== "center" && n !== "center")
463
+ if (typeof t == "object" && "x" in t ? (r = t.x, n = t.y) : (r = H(t), n = H(e ?? t)), we(r) === we(n) && r !== "center" && n !== "center")
464
464
  throw new Error(
465
465
  `[XYLocation] - encountered two locations with the same direction: ${r.toString()} - ${n.toString()}`
466
466
  );
467
- const s = { ...Lt };
467
+ const s = { ...Pt };
468
468
  return r === "center" ? je(n) ? [s.x, s.y] = [n, r] : [s.x, s.y] = [r, n] : n === "center" ? je(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r] : je(r) ? [s.x, s.y] = [r, n] : [s.x, s.y] = [n, r], s;
469
- }, ks = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
469
+ }, Zs = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
470
470
  __proto__: null,
471
- BOTTOM_CENTER: Pt,
471
+ BOTTOM_CENTER: qt,
472
472
  BOTTOM_LEFT: Je,
473
- BOTTOM_RIGHT: Rt,
474
- CENTER: Lt,
475
- CENTER_LEFT: qt,
476
- CENTER_LOCATIONS: Bt,
477
- CENTER_RIGHT: kt,
478
- OUTER_LOCATIONS: At,
479
- TOP_CENTER: Dt,
473
+ BOTTOM_RIGHT: Dt,
474
+ CENTER: Pt,
475
+ CENTER_LEFT: Zt,
476
+ CENTER_LOCATIONS: Ct,
477
+ CENTER_RIGHT: zt,
478
+ OUTER_LOCATIONS: Ut,
479
+ TOP_CENTER: kt,
480
480
  TOP_LEFT: xe,
481
- TOP_RIGHT: Ct,
482
- XY_LOCATIONS: Cs,
481
+ TOP_RIGHT: Lt,
482
+ XY_LOCATIONS: Ds,
483
483
  X_LOCATIONS: He,
484
484
  Y_LOCATIONS: Xe,
485
- center: Is,
485
+ center: Es,
486
486
  construct: H,
487
- constructXY: Ps,
488
- corner: Ir,
489
- crude: Es,
490
- direction: be,
487
+ constructXY: zs,
488
+ corner: Ar,
489
+ crude: js,
490
+ direction: we,
491
491
  isX: je,
492
- isY: Ls,
493
- location: jt,
494
- outer: Xn,
495
- rotate90: Bs,
496
- swap: Us,
497
- x: Ss,
498
- xy: js,
499
- xyCouple: Mr,
500
- xyEquals: zt,
501
- xyMatches: Rs,
502
- xyToString: Ds,
503
- y: Ns
492
+ isY: ks,
493
+ location: Rt,
494
+ outer: Qn,
495
+ rotate90: Rs,
496
+ swap: Cs,
497
+ x: Ms,
498
+ xy: Ls,
499
+ xyCouple: Er,
500
+ xyEquals: Ft,
501
+ xyMatches: Ps,
502
+ xyToString: qs,
503
+ y: As
504
504
  }, Symbol.toStringTag, { value: "Module" })), mt = a.union([
505
505
  a.number(),
506
- ye,
506
+ be,
507
507
  Ve,
508
- It,
509
- Wn,
510
- br
508
+ At,
509
+ Hn,
510
+ $r
511
511
  ]), v = (t, e) => {
512
512
  if (typeof t == "string") {
513
513
  if (e === void 0) throw new Error("The y coordinate must be given.");
514
514
  return t === "x" ? { x: e, y: 0 } : { x: 0, y: e };
515
515
  }
516
516
  return typeof t == "number" ? { x: t, y: e ?? t } : Array.isArray(t) ? { x: t[0], y: t[1] } : "signedWidth" in t ? { x: t.signedWidth, y: t.signedHeight } : "clientX" in t ? { x: t.clientX, y: t.clientY } : "width" in t ? { x: t.width, y: t.height } : { x: t.x, y: t.y };
517
- }, q = Object.freeze({ x: 0, y: 0 }), Ar = Object.freeze({ x: 1, y: 1 }), qs = Object.freeze({ x: 1 / 0, y: 1 / 0 }), zs = Object.freeze({ x: NaN, y: NaN }), qe = (t, e, r = 0) => {
517
+ }, q = Object.freeze({ x: 0, y: 0 }), Ur = Object.freeze({ x: 1, y: 1 }), Fs = Object.freeze({ x: 1 / 0, y: 1 / 0 }), Ys = Object.freeze({ x: NaN, y: NaN }), qe = (t, e, r = 0) => {
518
518
  const n = v(t), s = v(e);
519
519
  return r === 0 ? n.x === s.x && n.y === s.y : Math.abs(n.x - s.x) <= r && Math.abs(n.y - s.y) <= r;
520
- }, Zs = (t) => qe(t, q), Zt = (t, e, r) => {
520
+ }, Ws = (t) => qe(t, q), Yt = (t, e, r) => {
521
521
  const n = v(t), s = v(e, r);
522
522
  return { x: n.x * s.x, y: n.y * s.y };
523
- }, Er = (t, e) => {
523
+ }, Br = (t, e) => {
524
524
  const r = v(t);
525
525
  return { x: r.x + e, y: r.y };
526
- }, Ur = (t, e) => {
526
+ }, jr = (t, e) => {
527
527
  const r = v(t);
528
528
  return { x: r.x, y: r.y + e };
529
- }, we = (t, e, r, ...n) => {
529
+ }, $e = (t, e, r, ...n) => {
530
530
  if (typeof e == "string") {
531
531
  if (typeof r != "number") throw new Error("The value must be a number.");
532
- return e === "x" ? Er(t, r) : Ur(t, r);
532
+ return e === "x" ? Br(t, r) : jr(t, r);
533
533
  }
534
534
  if (typeof e == "object" && "x" in e && typeof e.x == "string") {
535
535
  const s = v(r), i = v(t);
@@ -539,25 +539,25 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
539
539
  const o = v(i);
540
540
  return { x: s.x + o.x, y: s.y + o.y };
541
541
  }, q);
542
- }, Fs = (t, e, r) => {
542
+ }, Vs = (t, e, r) => {
543
543
  const n = v(t);
544
544
  return e === "x" ? { x: r, y: n.y } : { x: n.x, y: r };
545
- }, Ys = (t, e) => {
545
+ }, Gs = (t, e) => {
546
546
  const r = v(t), n = v(e);
547
547
  return Math.sqrt((r.x - n.x) ** 2 + (r.y - n.y) ** 2);
548
- }, Ws = (t, e) => {
548
+ }, Hs = (t, e) => {
549
549
  const r = v(t), n = v(e);
550
550
  return { x: n.x - r.x, y: n.y - r.y };
551
- }, Vs = (t) => {
551
+ }, Xs = (t) => {
552
552
  const e = v(t);
553
553
  return Number.isNaN(e.x) || Number.isNaN(e.y);
554
- }, Gs = (t) => {
554
+ }, Js = (t) => {
555
555
  const e = v(t);
556
556
  return Number.isFinite(e.x) && Number.isFinite(e.y);
557
- }, Hs = (t) => {
557
+ }, Ks = (t) => {
558
558
  const e = v(t);
559
559
  return [e.x, e.y];
560
- }, Xs = (t) => {
560
+ }, Qs = (t) => {
561
561
  const e = v(t);
562
562
  return { left: e.x, top: e.y };
563
563
  }, yt = (t, e = 0) => {
@@ -566,96 +566,96 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
566
566
  x: Number(r.x.toFixed(e)),
567
567
  y: Number(r.y.toFixed(e))
568
568
  };
569
- }, ce = (t, e) => {
569
+ }, he = (t, e) => {
570
570
  const r = v(t), n = v(e);
571
571
  return { x: r.x - n.x, y: r.y - n.y };
572
- }, he = (t) => {
572
+ }, fe = (t) => {
573
573
  const e = v(t), r = Math.hypot(e.x, e.y);
574
574
  return r === 0 ? { x: 0, y: 0 } : { x: -e.y / r, y: e.x / r };
575
- }, Br = (t) => {
575
+ }, Cr = (t) => {
576
576
  const e = v(t), r = Math.hypot(e.x, e.y);
577
577
  return r === 0 ? { x: 0, y: 0 } : { x: e.x / r, y: e.y / r };
578
- }, jr = (...t) => {
579
- const e = t.reduce((r, n) => we(r, n), q);
580
- return Zt(e, 1 / t.length);
581
- }, Js = (t, e) => {
578
+ }, Rr = (...t) => {
579
+ const e = t.reduce((r, n) => $e(r, n), q);
580
+ return Yt(e, 1 / t.length);
581
+ }, _s = (t, e) => {
582
582
  const r = [];
583
583
  for (let n = 0; n < t.length; n++) {
584
584
  const s = t[n];
585
- let i, o, h, f;
585
+ let i, o, l, f;
586
586
  if (n === 0) {
587
- const l = t[n + 1], d = ce(l, s);
588
- o = he(d), h = o, f = e;
587
+ const c = t[n + 1], d = he(c, s);
588
+ o = fe(d), l = o, f = e;
589
589
  } else if (n === t.length - 1) {
590
- const l = t[n - 1], d = ce(s, l);
591
- i = he(d), h = i, f = e;
590
+ const c = t[n - 1], d = he(s, c);
591
+ i = fe(d), l = i, f = e;
592
592
  } else {
593
- const l = t[n - 1], d = t[n + 1], m = ce(s, l), p = ce(d, s);
594
- i = he(m), o = he(p);
593
+ const c = t[n - 1], d = t[n + 1], m = he(s, c), p = he(d, s);
594
+ i = fe(m), o = fe(p);
595
595
  const A = Math.acos(
596
596
  (m.x * p.x + m.y * p.y) / (Math.hypot(m.x, m.y) * Math.hypot(p.x, p.y))
597
597
  ), U = Math.sin(A / 2);
598
- U === 0 ? f = e : f = e / U, h = Br(jr(i, o));
598
+ U === 0 ? f = e : f = e / U, l = Cr(Rr(i, o));
599
599
  }
600
- r.push(Zt(h, f));
600
+ r.push(Yt(l, f));
601
601
  }
602
602
  return r;
603
- }, Ks = (t) => {
603
+ }, ei = (t) => {
604
604
  const e = v(t);
605
605
  return { x: e.y, y: e.x };
606
606
  }, bt = (t) => {
607
607
  const e = v(t);
608
608
  return { x: Math.round(e.x), y: Math.round(e.y) };
609
- }, Qs = (t) => {
609
+ }, ti = (t) => {
610
610
  const e = v(t);
611
611
  return { x: 1 / e.x, y: 1 / e.y };
612
- }, Tu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
612
+ }, Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
613
613
  __proto__: null,
614
- INFINITY: qs,
615
- NAN: zs,
616
- ONE: Ar,
614
+ INFINITY: Fs,
615
+ NAN: Ys,
616
+ ONE: Ur,
617
617
  ZERO: q,
618
- average: jr,
619
- calculateMiters: Js,
620
- clientXY: br,
618
+ average: Rr,
619
+ calculateMiters: _s,
620
+ clientXY: $r,
621
621
  construct: v,
622
- couple: Hs,
622
+ couple: Ks,
623
623
  crudeZ: mt,
624
- css: Xs,
625
- distance: Ys,
624
+ css: Qs,
625
+ distance: Gs,
626
626
  equals: qe,
627
- isFinite: Gs,
628
- isNan: Vs,
629
- isZero: Zs,
630
- normal: he,
631
- normalize: Br,
632
- reciprocal: Qs,
627
+ isFinite: Js,
628
+ isNan: Xs,
629
+ isZero: Ws,
630
+ normal: fe,
631
+ normalize: Cr,
632
+ reciprocal: ti,
633
633
  round: bt,
634
- scale: Zt,
635
- set: Fs,
636
- sub: ce,
637
- swap: Ks,
638
- translate: we,
639
- translateX: Er,
640
- translateY: Ur,
641
- translation: Ws,
634
+ scale: Yt,
635
+ set: Vs,
636
+ sub: he,
637
+ swap: ei,
638
+ translate: $e,
639
+ translateX: Br,
640
+ translateY: jr,
641
+ translation: Hs,
642
642
  truncate: yt,
643
- xy: ye
644
- }, Symbol.toStringTag, { value: "Module" })), Ne = a.union([a.number(), a.string()]), _s = a.object({
643
+ xy: be
644
+ }, Symbol.toStringTag, { value: "Module" })), Ne = a.union([a.number(), a.string()]), ri = a.object({
645
645
  top: Ne,
646
646
  left: Ne,
647
647
  width: Ne,
648
648
  height: Ne
649
- }), ei = a.object({
649
+ }), ni = a.object({
650
650
  left: a.number(),
651
651
  top: a.number(),
652
652
  right: a.number(),
653
653
  bottom: a.number()
654
- }), ti = a.object({
655
- one: ye,
656
- two: ye,
657
- root: Ir
658
- }), Cr = { one: q, two: q, root: xe }, ri = { one: q, two: Ar, root: Je }, Rr = (t, e) => ({
654
+ }), si = a.object({
655
+ one: be,
656
+ two: be,
657
+ root: Ar
658
+ }), Lr = { one: q, two: q, root: xe }, ii = { one: q, two: Ur, root: Je }, Dr = (t, e) => ({
659
659
  one: t.one,
660
660
  two: t.two,
661
661
  root: e ?? t.root
@@ -677,7 +677,7 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
677
677
  x: i.one.x + e.signedWidth,
678
678
  y: i.one.y + e.signedHeight
679
679
  } : i.two = e, i));
680
- }, ni = (t, e, r) => {
680
+ }, ai = (t, e, r) => {
681
681
  const n = x(t);
682
682
  if (typeof e == "string") {
683
683
  if (r == null) throw new Error("Invalid arguments for resize");
@@ -691,22 +691,22 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
691
691
  );
692
692
  }
693
693
  return x(n.one, e, void 0, void 0, n.root);
694
- }, si = (t, e, r = !0) => {
694
+ }, oi = (t, e, r = !0) => {
695
695
  const n = x(t);
696
696
  let s = (i, o) => i < o;
697
697
  return r && (s = (i, o) => i <= o), "one" in e ? s(V(n), V(e)) && s(_(e), _(n)) && s(G(n), G(e)) && s(ee(e), ee(n)) : s(V(n), e.x) && s(e.x, _(n)) && s(G(n), e.y) && s(e.y, ee(n));
698
- }, ii = (t, e) => qe(t.one, e.one) && qe(t.two, e.two) && zt(t.root, e.root), Lr = (t) => ({
698
+ }, ui = (t, e) => qe(t.one, e.one) && qe(t.two, e.two) && Ft(t.root, e.root), Pr = (t) => ({
699
699
  width: X(t),
700
700
  height: J(t)
701
- }), ai = (t) => ({
701
+ }), li = (t) => ({
702
702
  signedWidth: Ke(t),
703
703
  signedHeight: Qe(t)
704
- }), oi = (t) => ({
704
+ }), ci = (t) => ({
705
705
  top: G(t),
706
706
  left: V(t),
707
707
  width: X(t),
708
708
  height: J(t)
709
- }), Ft = (t, e, r = !1) => {
709
+ }), Wt = (t, e, r = !1) => {
710
710
  const n = z(e) === "y" ? Qe(t) : Ke(t);
711
711
  return r ? n : Math.abs(n);
712
712
  }, F = (t, e) => {
@@ -716,38 +716,38 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
716
716
  y: e.y === "center" ? wt(r).y : te(r, e.y)
717
717
  };
718
718
  }, te = (t, e) => {
719
- const r = x(t), n = Mr(r.root).includes(e) ? Math.min : Math.max;
719
+ const r = x(t), n = Er(r.root).includes(e) ? Math.min : Math.max;
720
720
  return He.includes(e) ? n(r.one.x, r.two.x) : n(r.one.y, r.two.y);
721
- }, ui = (t) => kr(t) === 0, X = (t) => Ft(t, "x"), J = (t) => Ft(t, "y"), Ke = (t) => {
721
+ }, hi = (t) => zr(t) === 0, X = (t) => Wt(t, "x"), J = (t) => Wt(t, "y"), Ke = (t) => {
722
722
  const e = x(t);
723
723
  return e.two.x - e.one.x;
724
724
  }, Qe = (t) => {
725
725
  const e = x(t);
726
726
  return e.two.y - e.one.y;
727
- }, Dr = (t) => F(t, xe), li = (t) => F(t, Dt), ci = (t) => F(t, Ct), hi = (t) => F(t, Je), fi = (t) => F(t, Pt), di = (t) => F(t, Rt), gi = (t) => F(t, qt), pi = (t) => F(t, kt), _ = (t) => te(t, "right"), ee = (t) => te(t, "bottom"), V = (t) => te(t, "left"), G = (t) => te(t, "top"), wt = (t) => we(Dr(t), {
727
+ }, kr = (t) => F(t, xe), fi = (t) => F(t, kt), di = (t) => F(t, Lt), gi = (t) => F(t, Je), pi = (t) => F(t, qt), mi = (t) => F(t, Dt), yi = (t) => F(t, Zt), bi = (t) => F(t, zt), _ = (t) => te(t, "right"), ee = (t) => te(t, "bottom"), V = (t) => te(t, "left"), G = (t) => te(t, "top"), wt = (t) => $e(kr(t), {
728
728
  x: Ke(t) / 2,
729
729
  y: Qe(t) / 2
730
- }), Yt = (t) => {
730
+ }), Vt = (t) => {
731
731
  const e = x(t);
732
732
  return e.root.x === "left" ? V(e) : _(e);
733
- }, Wt = (t) => {
733
+ }, Gt = (t) => {
734
734
  const e = x(t);
735
735
  return e.root.y === "top" ? G(e) : ee(e);
736
- }, mi = (t) => ({ x: Yt(t), y: Wt(t) }), Ce = (t) => {
736
+ }, wi = (t) => ({ x: Vt(t), y: Gt(t) }), Ce = (t) => {
737
737
  const e = x(t);
738
738
  return { lower: e.one.x, upper: e.two.x };
739
739
  }, Re = (t) => {
740
740
  const e = x(t);
741
741
  return { lower: e.one.y, upper: e.two.y };
742
- }, yi = (t, e) => Rr(t, e), bi = (t, e) => {
742
+ }, $i = (t, e) => Dr(t, e), Oi = (t, e) => {
743
743
  const r = x(t), n = He.includes(e) ? "x" : Xe.includes(e) ? "y" : null;
744
744
  if (n === null) throw new Error(`Invalid location: ${e}`);
745
745
  const s = e === "top" || e === "left" ? Math.min : Math.max, i = { ...r.one }, o = { ...r.two };
746
746
  return i[n] = s(r.one[n], r.two[n]), o[n] = s(r.one[n], r.two[n]), [i, o];
747
- }, wi = (t, e) => {
748
- const r = x(t), n = x(e), s = Yt(n) + (X(n) - X(r)) / 2, i = Wt(n) + (J(n) - J(r)) / 2;
749
- return x({ x: s, y: i }, Lr(r));
750
- }, Pr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, $i = (t) => X(t) / J(t), Oi = (t, e, r) => {
747
+ }, vi = (t, e) => {
748
+ const r = x(t), n = x(e), s = Vt(n) + (X(n) - X(r)) / 2, i = Gt(n) + (J(n) - J(r)) / 2;
749
+ return x({ x: s, y: i }, Pr(r));
750
+ }, qr = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, Ti = (t) => X(t) / J(t), xi = (t, e, r) => {
751
751
  if (typeof e == "string") {
752
752
  if (r == null) throw new Error("Undefined amount passed into box.translate");
753
753
  const s = z(e);
@@ -755,16 +755,16 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
755
755
  }
756
756
  const n = x(t);
757
757
  return x(
758
- we(n.one, e),
759
- we(n.two, e),
758
+ $e(n.one, e),
759
+ $e(n.two, e),
760
760
  void 0,
761
761
  void 0,
762
762
  n.root
763
763
  );
764
- }, vi = (t, e) => {
764
+ }, Si = (t, e) => {
765
765
  const r = Math.max(V(t), V(e)), n = Math.max(G(t), G(e)), s = Math.min(_(t), _(e)), i = Math.min(ee(t), ee(e));
766
- return r > s || n > i ? Cr : x({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
767
- }, kr = (t) => X(t) * J(t), Ti = (t, e) => {
766
+ return r > s || n > i ? Lr : x({ x: r, y: n }, { x: s, y: i }, void 0, void 0, t.root);
767
+ }, zr = (t) => X(t) * J(t), Ni = (t, e) => {
768
768
  const r = x(t);
769
769
  return x(
770
770
  yt(r.one, e),
@@ -773,121 +773,121 @@ const es = a.union([Mt, jt, a.instanceof(String)]), oe = (t) => (e, r) => {
773
773
  void 0,
774
774
  r.root
775
775
  );
776
- }, xi = (t, e, r, n, s, i) => {
777
- const o = { x: t, y: e }, h = { x: t + r, y: e + n };
778
- return s.x !== i.x && (s.x === "center" ? (o.x -= r / 2, h.x -= r / 2) : (o.x -= r, h.x -= r)), s.y !== i.y && (s.y === "center" ? (o.y -= n / 2, h.y -= n / 2) : (o.y -= n, h.y -= n)), x(o, h, void 0, void 0, i);
779
- }, Si = (t) => {
776
+ }, Ii = (t, e, r, n, s, i) => {
777
+ const o = { x: t, y: e }, l = { x: t + r, y: e + n };
778
+ return s.x !== i.x && (s.x === "center" ? (o.x -= r / 2, l.x -= r / 2) : (o.x -= r, l.x -= r)), s.y !== i.y && (s.y === "center" ? (o.y -= n / 2, l.y -= n / 2) : (o.y -= n, l.y -= n)), x(o, l, void 0, void 0, i);
779
+ }, Mi = (t) => {
780
780
  const e = x(t);
781
781
  return x(bt(e.one), bt(e.two), void 0, void 0, e.root);
782
- }, xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
782
+ }, Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
783
783
  __proto__: null,
784
- DECIMAL: ri,
785
- ZERO: Cr,
786
- area: kr,
787
- areaIsZero: ui,
788
- aspect: $i,
784
+ DECIMAL: ii,
785
+ ZERO: Lr,
786
+ area: zr,
787
+ areaIsZero: hi,
788
+ aspect: Ti,
789
789
  bottom: ee,
790
- bottomCenter: fi,
791
- bottomLeft: hi,
792
- bottomRight: di,
793
- box: ti,
790
+ bottomCenter: pi,
791
+ bottomLeft: gi,
792
+ bottomRight: mi,
793
+ box: si,
794
794
  center: wt,
795
- centerLeft: gi,
796
- centerRight: pi,
795
+ centerLeft: yi,
796
+ centerRight: bi,
797
797
  construct: x,
798
- constructWithAlternateRoot: xi,
799
- contains: si,
800
- copy: Rr,
801
- css: oi,
802
- cssBox: _s,
803
- dim: Ft,
804
- dims: Lr,
805
- domRect: ei,
806
- edgePoints: bi,
807
- equals: ii,
798
+ constructWithAlternateRoot: Ii,
799
+ contains: oi,
800
+ copy: Dr,
801
+ css: ci,
802
+ cssBox: ri,
803
+ dim: Wt,
804
+ dims: Pr,
805
+ domRect: ni,
806
+ edgePoints: Oi,
807
+ equals: ui,
808
808
  height: J,
809
- intersection: vi,
810
- isBox: Pr,
809
+ intersection: Si,
810
+ isBox: qr,
811
811
  left: V,
812
812
  loc: te,
813
- positionInCenter: wi,
814
- reRoot: yi,
815
- resize: ni,
813
+ positionInCenter: vi,
814
+ reRoot: $i,
815
+ resize: ai,
816
816
  right: _,
817
- root: mi,
818
- round: Si,
819
- signedDims: ai,
817
+ root: wi,
818
+ round: Mi,
819
+ signedDims: li,
820
820
  signedHeight: Qe,
821
821
  signedWidth: Ke,
822
822
  top: G,
823
- topCenter: li,
824
- topLeft: Dr,
825
- topRight: ci,
826
- translate: Oi,
827
- truncate: Ti,
823
+ topCenter: fi,
824
+ topLeft: kr,
825
+ topRight: di,
826
+ translate: xi,
827
+ truncate: Ni,
828
828
  width: X,
829
- x: Yt,
829
+ x: Vt,
830
830
  xBounds: Ce,
831
831
  xyLoc: F,
832
- y: Wt,
832
+ y: Gt,
833
833
  yBounds: Re
834
- }, Symbol.toStringTag, { value: "Module" })), qr = a.object({ signedWidth: a.number(), signedHeight: a.number() }), Ni = a.union([It, qr, ye, Ve]), Ii = { width: 0, height: 0 }, Mi = { width: 1, height: 1 }, D = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, Ai = (t, e) => {
834
+ }, Symbol.toStringTag, { value: "Module" })), Zr = a.object({ signedWidth: a.number(), signedHeight: a.number() }), Ai = a.union([At, Zr, be, Ve]), Ei = { width: 0, height: 0 }, Ui = { width: 1, height: 1 }, D = (t, e) => typeof t == "number" ? { width: t, height: e ?? t } : Array.isArray(t) ? { width: t[0], height: t[1] } : "x" in t ? { width: t.x, height: t.y } : "signedWidth" in t ? { width: t.signedWidth, height: t.signedHeight } : { ...t }, Bi = (t, e) => {
835
835
  if (e == null) return !1;
836
836
  const r = D(t), n = D(e);
837
837
  return r.width === n.width && r.height === n.height;
838
- }, Ei = (t) => {
838
+ }, ji = (t) => {
839
839
  const e = D(t);
840
840
  return { width: e.height, height: e.width };
841
- }, Ui = (t) => {
841
+ }, Ci = (t) => {
842
842
  const e = D(t);
843
843
  return `0 0 ${e.width} ${e.height}`;
844
- }, Bi = (t) => {
844
+ }, Ri = (t) => {
845
845
  const e = D(t);
846
846
  return [e.width, e.height];
847
- }, ji = (t) => ({
847
+ }, Li = (t) => ({
848
848
  width: Math.max(...t.map((e) => D(e).width)),
849
849
  height: Math.max(...t.map((e) => D(e).height))
850
- }), Ci = (t) => ({
850
+ }), Di = (t) => ({
851
851
  width: Math.min(...t.map((e) => D(e).width)),
852
852
  height: Math.min(...t.map((e) => D(e).height))
853
- }), Ri = (t, e) => {
853
+ }), Pi = (t, e) => {
854
854
  const r = D(t);
855
855
  return { width: r.width * e, height: r.height * e };
856
- }, Su = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
856
+ }, Mu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
857
857
  __proto__: null,
858
- DECIMAL: Mi,
859
- ZERO: Ii,
858
+ DECIMAL: Ui,
859
+ ZERO: Ei,
860
860
  construct: D,
861
- couple: Bi,
862
- crude: Ni,
863
- dimensions: It,
864
- equals: Ai,
865
- max: ji,
866
- min: Ci,
867
- scale: Ri,
868
- signed: qr,
869
- svgViewBox: Ui,
870
- swap: Ei
871
- }, Symbol.toStringTag, { value: "Module" })), Li = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, Di = a.object({ offset: mt, scale: mt }), Pi = a.object({ offset: a.number(), scale: a.number() }), ki = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
861
+ couple: Ri,
862
+ crude: Ai,
863
+ dimensions: At,
864
+ equals: Bi,
865
+ max: Li,
866
+ min: Di,
867
+ scale: Pi,
868
+ signed: Zr,
869
+ svgViewBox: Ci,
870
+ swap: ji
871
+ }, Symbol.toStringTag, { value: "Module" })), ki = (t, e, r) => e !== void 0 && t < e ? e : r !== void 0 && t > r ? r : t, qi = a.object({ offset: mt, scale: mt }), zi = a.object({ offset: a.number(), scale: a.number() }), Zi = (t) => (e, r, n, s) => r === "dimension" ? [e, n] : [
872
872
  e,
873
873
  s ? n - t : n + t
874
- ], qi = (t) => (e, r, n, s) => [
874
+ ], Fi = (t) => (e, r, n, s) => [
875
875
  e,
876
876
  s ? n / t : n * t
877
- ], zi = (t) => (e, r, n) => {
877
+ ], Yi = (t) => (e, r, n) => {
878
878
  if (e === null) return [t, n];
879
- const { lower: s, upper: i } = e, { lower: o, upper: h } = t, f = i - s, l = h - o;
880
- if (r === "dimension") return [t, n * (l / f)];
881
- const d = (n - s) * (l / f) + o;
879
+ const { lower: s, upper: i } = e, { lower: o, upper: l } = t, f = i - s, c = l - o;
880
+ if (r === "dimension") return [t, n * (c / f)];
881
+ const d = (n - s) * (c / f) + o;
882
882
  return [t, d];
883
- }, Zi = (t) => (e, r, n) => [t, n], Fi = () => (t, e, r) => {
883
+ }, Wi = (t) => (e, r, n) => [t, n], Vi = () => (t, e, r) => {
884
884
  if (t === null) throw new Error("cannot invert without bounds");
885
885
  if (e === "dimension") return [t, r];
886
886
  const { lower: n, upper: s } = t;
887
887
  return [t, s - (r - n)];
888
- }, Yi = (t) => (e, r, n) => {
888
+ }, Gi = (t) => (e, r, n) => {
889
889
  const { lower: s, upper: i } = t;
890
- return n = Li(n, s, i), [e, n];
890
+ return n = ki(n, s, i), [e, n];
891
891
  };
892
892
  let $t = class se {
893
893
  ops = [];
@@ -923,7 +923,7 @@ let $t = class se {
923
923
  * @param value - The amount to translate by.
924
924
  */
925
925
  translate(e) {
926
- const r = this.new(), n = ki(e);
926
+ const r = this.new(), n = Zi(e);
927
927
  return n.type = "translate", r.ops.push(n), r;
928
928
  }
929
929
  /**
@@ -933,23 +933,23 @@ let $t = class se {
933
933
  * @param value - The amount to magnify by.
934
934
  */
935
935
  magnify(e) {
936
- const r = this.new(), n = qi(e);
936
+ const r = this.new(), n = Fi(e);
937
937
  return n.type = "magnify", r.ops.push(n), r;
938
938
  }
939
939
  scale(e, r) {
940
- const n = b(e, r), s = this.new(), i = zi(n);
940
+ const n = b(e, r), s = this.new(), i = Yi(n);
941
941
  return i.type = "scale", s.ops.push(i), s;
942
942
  }
943
943
  clamp(e, r) {
944
- const n = b(e, r), s = this.new(), i = Yi(n);
944
+ const n = b(e, r), s = this.new(), i = Gi(n);
945
945
  return i.type = "clamp", s.ops.push(i), s;
946
946
  }
947
947
  reBound(e, r) {
948
- const n = b(e, r), s = this.new(), i = Zi(n);
948
+ const n = b(e, r), s = this.new(), i = Wi(n);
949
949
  return i.type = "re-bound", s.ops.push(i), s;
950
950
  }
951
951
  invert() {
952
- const e = Fi();
952
+ const e = Vi();
953
953
  e.type = "invert";
954
954
  const r = this.new();
955
955
  return r.ops.push(e), r;
@@ -975,9 +975,9 @@ let $t = class se {
975
975
  e.ops.reverse();
976
976
  const r = [];
977
977
  return e.ops.forEach((n, s) => {
978
- if (n.type === "scale" || r.some(([o, h]) => s >= o && s <= h))
978
+ if (n.type === "scale" || r.some(([o, l]) => s >= o && s <= l))
979
979
  return;
980
- const i = e.ops.findIndex((o, h) => o.type === "scale" && h > s);
980
+ const i = e.ops.findIndex((o, l) => o.type === "scale" && l > s);
981
981
  i !== -1 && r.push([s, i]);
982
982
  }), r.forEach(([n, s]) => {
983
983
  const i = e.ops.slice(n, s);
@@ -988,7 +988,7 @@ let $t = class se {
988
988
  return { scale: this.dim(1), offset: this.pos(0) };
989
989
  }
990
990
  static IDENTITY = new se();
991
- }, Wi = class P {
991
+ }, Hi = class P {
992
992
  x;
993
993
  y;
994
994
  currRoot;
@@ -1034,9 +1034,9 @@ let $t = class se {
1034
1034
  }
1035
1035
  scale(e) {
1036
1036
  const r = this.copy();
1037
- if (Pr(e)) {
1037
+ if (qr(e)) {
1038
1038
  const n = this.currRoot;
1039
- return r.currRoot = e.root, n != null && !zt(n, e.root) && (n.x !== e.root.x && (r.x = r.x.invert()), n.y !== e.root.y && (r.y = r.y.invert())), r.x = r.x.scale(Ce(e)), r.y = r.y.scale(Re(e)), r;
1039
+ return r.currRoot = e.root, n != null && !Ft(n, e.root) && (n.x !== e.root.x && (r.x = r.x.invert()), n.y !== e.root.y && (r.y = r.y.invert())), r.x = r.x.scale(Ce(e)), r.y = r.y.scale(Re(e)), r;
1040
1040
  }
1041
1041
  return r.x = r.x.scale(e.width), r.y = r.y.scale(e.height), r;
1042
1042
  }
@@ -1079,43 +1079,43 @@ let $t = class se {
1079
1079
  }
1080
1080
  static IDENTITY = new P();
1081
1081
  };
1082
- const Nu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1082
+ const Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1083
1083
  __proto__: null,
1084
1084
  Scale: $t,
1085
- XY: Wi,
1086
- crudeXYTransform: Di,
1087
- transform: Pi
1085
+ XY: Hi,
1086
+ crudeXYTransform: qi,
1087
+ transform: zi
1088
1088
  }, Symbol.toStringTag, { value: "Module" }));
1089
- let zr = (t, e = 21) => (r = e) => {
1089
+ let Fr = (t, e = 21) => (r = e) => {
1090
1090
  let n = "", s = r | 0;
1091
1091
  for (; s--; )
1092
1092
  n += t[Math.random() * t.length | 0];
1093
1093
  return n;
1094
1094
  };
1095
- const Zr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Vi = `0123456789${Zr}`, Fr = 11, Gi = zr(Zr, 1), Hi = zr(Vi, Fr - 1), Vt = () => `${Gi()}${Hi()}`, Iu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1095
+ const Yr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz", Xi = `0123456789${Yr}`, Wr = 11, Ji = Fr(Yr, 1), Ki = Fr(Xi, Wr - 1), Ht = () => `${Ji()}${Ki()}`, Eu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
1096
1096
  __proto__: null,
1097
- LENGTH: Fr,
1098
- create: Vt
1099
- }, Symbol.toStringTag, { value: "Module" })), Xi = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, Ji = 2 ** 8 - 1, Ki = 2 ** 16 - 1, Qi = 2 ** 32 - 1, _i = 2n ** 64n - 1n, ea = 2 ** 64 - 1, ta = -128, ra = 2 ** 7 - 1, na = -32768, sa = 2 ** 15 - 1, ia = -2147483648, aa = 2 ** 31 - 1, oa = -(2n ** 63n), ze = 2n ** 63n - 1n, ua = -9223372036854776e3, Yr = 2 ** 63 - 1, la = a.enum(["static", "dynamic"]), _t = 365, Ie = 30, ca = a.union([
1097
+ LENGTH: Wr,
1098
+ create: Ht
1099
+ }, Symbol.toStringTag, { value: "Module" })), Qi = (t, e) => (r) => r instanceof e || typeof r == "object" && r !== null && "discriminator" in r && r.discriminator === t, _i = 2 ** 8 - 1, ea = 2 ** 16 - 1, ta = 2 ** 32 - 1, ra = 2n ** 64n - 1n, na = 2 ** 64 - 1, sa = -128, ia = 2 ** 7 - 1, aa = -32768, oa = 2 ** 15 - 1, ua = -2147483648, la = 2 ** 31 - 1, ca = -(2n ** 63n), ze = 2n ** 63n - 1n, ha = -9223372036854776e3, Vr = 2 ** 63 - 1, fa = a.enum(["static", "dynamic"]), tr = 365, Ie = 30, da = a.union([
1100
1100
  a.tuple([a.int()]),
1101
1101
  a.tuple([a.int(), a.int().min(1).max(12)]),
1102
1102
  a.tuple([a.int(), a.int().min(1).max(12), a.int().min(1).max(31)])
1103
- ]), Wr = (t, e) => {
1103
+ ]), Gr = (t, e) => {
1104
1104
  const r = new $(e);
1105
1105
  if (![
1106
- c.DAY,
1107
- c.HOUR,
1108
- c.MINUTE,
1109
- c.SECOND,
1110
- c.MILLISECOND,
1111
- c.MICROSECOND,
1112
- c.NANOSECOND
1106
+ h.DAY,
1107
+ h.HOUR,
1108
+ h.MINUTE,
1109
+ h.SECOND,
1110
+ h.MILLISECOND,
1111
+ h.MICROSECOND,
1112
+ h.NANOSECOND
1113
1113
  ].some((s) => s.equals(r)))
1114
1114
  throw new Error(
1115
1115
  "Invalid argument for remainder. Must be an even TimeSpan or Timestamp"
1116
1116
  );
1117
1117
  const n = t.valueOf() % r.valueOf();
1118
- return t instanceof $ ? new $(n) : new c(n);
1118
+ return t instanceof $ ? new $(n) : new h(n);
1119
1119
  };
1120
1120
  let $ = class g extends re {
1121
1121
  constructor(e, r = "UTC") {
@@ -1127,7 +1127,7 @@ let $ = class g extends re {
1127
1127
  else if (Array.isArray(e)) super(g.parseDate(e));
1128
1128
  else {
1129
1129
  let n = 0n;
1130
- e instanceof Number && (e = e.valueOf()), r === "local" && (n = g.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e === Yr ? e = ze : e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = g.MAX : e = g.MIN)), B(e) && (e = e.value), super(BigInt(e.valueOf()) + n);
1130
+ e instanceof Number && (e = e.valueOf()), r === "local" && (n = g.utcOffset.valueOf()), typeof e == "number" && (isFinite(e) ? e === Vr ? e = ze : e = Math.trunc(e) : (isNaN(e) && (e = 0), e === 1 / 0 ? e = g.MAX : e = g.MIN)), B(e) && (e = e.value), super(BigInt(e.valueOf()) + n);
1131
1131
  }
1132
1132
  }
1133
1133
  static parseDate([e = 1970, r = 1, n = 1]) {
@@ -1143,9 +1143,9 @@ let $ = class g extends re {
1143
1143
  }
1144
1144
  static parseTimeString(e, r = "UTC") {
1145
1145
  const [n, s, i] = e.split(":");
1146
- let o = "00", h = "00";
1147
- i != null && ([o, h] = i.split("."));
1148
- let f = g.hours(parseInt(n ?? "00")).add(g.minutes(parseInt(s ?? "00"))).add(g.seconds(parseInt(o ?? "00"))).add(g.milliseconds(parseInt(h ?? "00")));
1146
+ let o = "00", l = "00";
1147
+ i != null && ([o, l] = i.split("."));
1148
+ let f = g.hours(parseInt(n ?? "00")).add(g.minutes(parseInt(s ?? "00"))).add(g.seconds(parseInt(o ?? "00"))).add(g.milliseconds(parseInt(l ?? "00")));
1149
1149
  return r === "local" && (f = f.add(g.utcOffset)), f.valueOf();
1150
1150
  }
1151
1151
  static parseDateTimeString(e, r = "UTC") {
@@ -1170,7 +1170,7 @@ let $ = class g extends re {
1170
1170
  }
1171
1171
  /** @returns The UTC offset for the time zone of the machine. */
1172
1172
  static get utcOffset() {
1173
- return new c(
1173
+ return new h(
1174
1174
  BigInt((/* @__PURE__ */ new Date()).getTimezoneOffset()) * g.MINUTE.valueOf()
1175
1175
  );
1176
1176
  }
@@ -1282,7 +1282,7 @@ let $ = class g extends re {
1282
1282
  * TimeSpan.
1283
1283
  */
1284
1284
  add(e) {
1285
- return new g(ue(this.valueOf(), new c(e).valueOf()));
1285
+ return new g(ue(this.valueOf(), new h(e).valueOf()));
1286
1286
  }
1287
1287
  /**
1288
1288
  * Subtracts a TimeSpan from the TimeStamp.
@@ -1292,35 +1292,35 @@ let $ = class g extends re {
1292
1292
  * TimeSpan.
1293
1293
  */
1294
1294
  sub(e) {
1295
- return new g(Z(this.valueOf(), new c(e).valueOf()));
1295
+ return new g(Z(this.valueOf(), new h(e).valueOf()));
1296
1296
  }
1297
1297
  /**
1298
1298
  * @returns the floating point number of hours since the unix epoch to the timestamp
1299
1299
  * value.
1300
1300
  */
1301
1301
  get hours() {
1302
- return Number(this.valueOf()) / Number(c.HOUR.valueOf());
1302
+ return Number(this.valueOf()) / Number(h.HOUR.valueOf());
1303
1303
  }
1304
1304
  /**
1305
1305
  * @returns the floating point number of minutes since the unix epoch to the timestamp
1306
1306
  * value.
1307
1307
  */
1308
1308
  get minutes() {
1309
- return Number(this.valueOf()) / Number(c.MINUTE.valueOf());
1309
+ return Number(this.valueOf()) / Number(h.MINUTE.valueOf());
1310
1310
  }
1311
1311
  /**
1312
1312
  * @returns the floating point number of days since the unix epoch to the timestamp
1313
1313
  * value.
1314
1314
  */
1315
1315
  get days() {
1316
- return Number(this.valueOf()) / Number(c.DAY.valueOf());
1316
+ return Number(this.valueOf()) / Number(h.DAY.valueOf());
1317
1317
  }
1318
1318
  /**
1319
1319
  * @returns the floating point number of seconds since the unix epoch to the timestamp
1320
1320
  * value.
1321
1321
  */
1322
1322
  get seconds() {
1323
- return Number(this.valueOf()) / Number(c.SECOND.valueOf());
1323
+ return Number(this.valueOf()) / Number(h.SECOND.valueOf());
1324
1324
  }
1325
1325
  /** @returns the floating point number of milliseconds since the unix epoch. */
1326
1326
  get milliseconds() {
@@ -1483,11 +1483,11 @@ let $ = class g extends re {
1483
1483
  * @example TimeStamp.now().remainder(TimeStamp.DAY) // => TimeStamp representing the current day
1484
1484
  */
1485
1485
  remainder(e) {
1486
- return Wr(this, e);
1486
+ return Gr(this, e);
1487
1487
  }
1488
1488
  /** @returns true if the day portion TimeStamp is today, false otherwise. */
1489
1489
  get isToday() {
1490
- return this.truncate(c.DAY).equals(g.now().truncate(c.DAY));
1490
+ return this.truncate(h.DAY).equals(g.now().truncate(h.DAY));
1491
1491
  }
1492
1492
  /**
1493
1493
  * Truncates the TimeStamp to the nearest multiple of the given span.
@@ -1595,8 +1595,8 @@ let $ = class g extends re {
1595
1595
  a.number().transform((e) => new g(e)),
1596
1596
  a.bigint().transform((e) => new g(e)),
1597
1597
  a.date().transform((e) => new g(e)),
1598
- a.custom((e) => e instanceof c).transform((e) => new g(e)),
1599
- ca.transform((e) => new g(e))
1598
+ a.custom((e) => e instanceof h).transform((e) => new g(e)),
1599
+ da.transform((e) => new g(e))
1600
1600
  ]);
1601
1601
  /**
1602
1602
  * Sorts two timestamps.
@@ -1610,7 +1610,7 @@ let $ = class g extends re {
1610
1610
  return Number(e.valueOf() - r.valueOf());
1611
1611
  }
1612
1612
  };
1613
- class c extends re {
1613
+ class h extends re {
1614
1614
  constructor(e) {
1615
1615
  typeof e == "number" && (e = Math.trunc(e.valueOf())), B(e) && (e = e.value), super(BigInt(e.valueOf()));
1616
1616
  }
@@ -1621,7 +1621,7 @@ class c extends re {
1621
1621
  * @returns A TimeSpan representing the given number of seconds.
1622
1622
  */
1623
1623
  static fromSeconds(e) {
1624
- return e instanceof c ? e : e instanceof st ? e.period : e instanceof $ ? new c(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? c.seconds(e) : new c(e));
1624
+ return e instanceof h ? e : e instanceof st ? e.period : e instanceof $ ? new h(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? h.seconds(e) : new h(e));
1625
1625
  }
1626
1626
  /**
1627
1627
  * Creates a TimeSpan representing the given number of milliseconds.
@@ -1630,7 +1630,7 @@ class c extends re {
1630
1630
  * @returns A TimeSpan representing the given number of milliseconds.
1631
1631
  */
1632
1632
  static fromMilliseconds(e) {
1633
- return e instanceof c ? e : e instanceof st ? e.period : e instanceof $ ? new c(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? c.milliseconds(e) : new c(e));
1633
+ return e instanceof h ? e : e instanceof st ? e.period : e instanceof $ ? new h(e) : (B(e) && (e = e.value), ["number", "bigint"].includes(typeof e) ? h.milliseconds(e) : new h(e));
1634
1634
  }
1635
1635
  /**
1636
1636
  * @returns the primitive value of the TimeSpan. Overrides standard JS valueOf()
@@ -1646,7 +1646,7 @@ class c extends re {
1646
1646
  * @returns True if the TimeSpan is less than the other TimeSpan, false otherwise.
1647
1647
  */
1648
1648
  lessThan(e) {
1649
- return this.valueOf() < new c(e).valueOf();
1649
+ return this.valueOf() < new h(e).valueOf();
1650
1650
  }
1651
1651
  /**
1652
1652
  * Checks if the TimeSpan is greater than another TimeSpan.
@@ -1655,7 +1655,7 @@ class c extends re {
1655
1655
  * @returns True if the TimeSpan is greater than the other TimeSpan, false otherwise.
1656
1656
  */
1657
1657
  greaterThan(e) {
1658
- return this.valueOf() > new c(e).valueOf();
1658
+ return this.valueOf() > new h(e).valueOf();
1659
1659
  }
1660
1660
  /**
1661
1661
  * Checks if the TimeSpan is less than or equal to another TimeSpan.
@@ -1664,7 +1664,7 @@ class c extends re {
1664
1664
  * @returns True if the TimeSpan is less than or equal to the other TimeSpan, false otherwise.
1665
1665
  */
1666
1666
  lessThanOrEqual(e) {
1667
- return this.valueOf() <= new c(e).valueOf();
1667
+ return this.valueOf() <= new h(e).valueOf();
1668
1668
  }
1669
1669
  /**
1670
1670
  * Checks if the TimeSpan is greater than or equal to another TimeSpan.
@@ -1673,7 +1673,7 @@ class c extends re {
1673
1673
  * @returns True if the TimeSpan is greater than or equal to the other TimeSpan, false otherwise.
1674
1674
  */
1675
1675
  greaterThanOrEqual(e) {
1676
- return this.valueOf() >= new c(e).valueOf();
1676
+ return this.valueOf() >= new h(e).valueOf();
1677
1677
  }
1678
1678
  /**
1679
1679
  * Calculates the remainder of the TimeSpan when divided by another TimeSpan.
@@ -1682,7 +1682,7 @@ class c extends re {
1682
1682
  * @returns A new TimeSpan representing the remainder.
1683
1683
  */
1684
1684
  remainder(e) {
1685
- return Wr(this, e);
1685
+ return Gr(this, e);
1686
1686
  }
1687
1687
  /**
1688
1688
  * Truncates the TimeSpan to the nearest multiple of the given span.
@@ -1691,7 +1691,7 @@ class c extends re {
1691
1691
  * @returns A new TimeSpan that is truncated to the nearest multiple of the given span.
1692
1692
  */
1693
1693
  truncate(e) {
1694
- return new c(
1694
+ return new h(
1695
1695
  BigInt(Math.trunc(Number(this.valueOf() / e.valueOf()))) * e.valueOf()
1696
1696
  );
1697
1697
  }
@@ -1705,20 +1705,20 @@ class c extends re {
1705
1705
  */
1706
1706
  toString(e = "full") {
1707
1707
  if (e === "semantic") return this.toSemanticString();
1708
- const r = this.truncate(c.DAY), n = this.truncate(c.HOUR), s = this.truncate(c.MINUTE), i = this.truncate(c.SECOND), o = this.truncate(c.MILLISECOND), h = this.truncate(c.MICROSECOND), f = this.truncate(c.NANOSECOND), l = r, d = n.sub(r), m = s.sub(n), p = i.sub(s), A = o.sub(i), U = h.sub(o), C = f.sub(h);
1708
+ const r = this.truncate(h.DAY), n = this.truncate(h.HOUR), s = this.truncate(h.MINUTE), i = this.truncate(h.SECOND), o = this.truncate(h.MILLISECOND), l = this.truncate(h.MICROSECOND), f = this.truncate(h.NANOSECOND), c = r, d = n.sub(r), m = s.sub(n), p = i.sub(s), A = o.sub(i), U = l.sub(o), C = f.sub(l);
1709
1709
  let w = "";
1710
- return l.isZero || (w += `${l.days}d `), d.isZero || (w += `${d.hours}h `), m.isZero || (w += `${m.minutes}m `), p.isZero || (w += `${p.seconds}s `), A.isZero || (w += `${A.milliseconds}ms `), U.isZero || (w += `${U.microseconds}µs `), C.isZero || (w += `${C.nanoseconds}ns`), w.trim();
1710
+ return c.isZero || (w += `${c.days}d `), d.isZero || (w += `${d.hours}h `), m.isZero || (w += `${m.minutes}m `), p.isZero || (w += `${p.seconds}s `), A.isZero || (w += `${A.milliseconds}ms `), U.isZero || (w += `${U.microseconds}µs `), C.isZero || (w += `${C.nanoseconds}ns`), w.trim();
1711
1711
  }
1712
1712
  toSemanticString() {
1713
- const e = this.valueOf() < 0n ? -this.valueOf() : this.valueOf(), r = new c(e), n = this.valueOf() < 0n;
1713
+ const e = this.valueOf() < 0n ? -this.valueOf() : this.valueOf(), r = new h(e), n = this.valueOf() < 0n;
1714
1714
  if (r.valueOf() === 0n) return "0s";
1715
- if (r.lessThan(c.SECOND)) return "< 1s";
1716
- const s = r.days, i = r.hours, o = r.minutes, h = r.seconds, f = Math.floor(s / _t), l = Math.floor(s / Ie), d = Math.floor(s / 7), m = Math.floor(s), p = Math.floor(i), A = Math.floor(o), U = Math.floor(h), C = n ? "-" : "";
1715
+ if (r.lessThan(h.SECOND)) return "< 1s";
1716
+ const s = r.days, i = r.hours, o = r.minutes, l = r.seconds, f = Math.floor(s / tr), c = Math.floor(s / Ie), d = Math.floor(s / 7), m = Math.floor(s), p = Math.floor(i), A = Math.floor(o), U = Math.floor(l), C = n ? "-" : "";
1717
1717
  if (f >= 1) {
1718
1718
  let w = `${f}y`;
1719
1719
  if (f < 2) {
1720
1720
  const N = Math.floor(
1721
- s % _t / Ie
1721
+ s % tr / Ie
1722
1722
  );
1723
1723
  N > 0 && (w += ` ${N}mo`);
1724
1724
  }
@@ -1729,9 +1729,9 @@ class c extends re {
1729
1729
  const N = Math.floor(s % 7), K = Math.floor(i - d * 7 * 24);
1730
1730
  return d < 2 && (N > 0 ? w += ` ${N}d` : K > 0 && K < 24 && (w += ` ${K}h`)), C + w;
1731
1731
  }
1732
- if (l >= 1) {
1733
- let w = `${l}mo`;
1734
- if (l < 3) {
1732
+ if (c >= 1) {
1733
+ let w = `${c}mo`;
1734
+ if (c < 3) {
1735
1735
  const N = Math.floor(s % Ie);
1736
1736
  N > 0 && (w += ` ${N}d`);
1737
1737
  }
@@ -1758,7 +1758,7 @@ class c extends re {
1758
1758
  if (A >= 1) {
1759
1759
  let w = `${A}m`;
1760
1760
  if (A < 5) {
1761
- const N = Math.floor(h - A * 60);
1761
+ const N = Math.floor(l - A * 60);
1762
1762
  N > 0 && (w += ` ${N}s`);
1763
1763
  }
1764
1764
  return C + w;
@@ -1772,7 +1772,7 @@ class c extends re {
1772
1772
  * @returns A new TimeSpan that is this TimeSpan multiplied by the provided value.
1773
1773
  */
1774
1774
  mult(e) {
1775
- return new c(R(this.valueOf(), e));
1775
+ return new h(R(this.valueOf(), e));
1776
1776
  }
1777
1777
  /**
1778
1778
  * Divides the TimeSpan by a scalar value.
@@ -1781,31 +1781,31 @@ class c extends re {
1781
1781
  * @returns A new TimeSpan that is this TimeSpan divided by the provided value.
1782
1782
  */
1783
1783
  div(e) {
1784
- return new c(ve(this.valueOf(), e));
1784
+ return new h(Te(this.valueOf(), e));
1785
1785
  }
1786
1786
  /** @returns the decimal number of days in the TimeSpan. */
1787
1787
  get days() {
1788
- return Number(this.valueOf()) / Number(c.DAY.valueOf());
1788
+ return Number(this.valueOf()) / Number(h.DAY.valueOf());
1789
1789
  }
1790
1790
  /** @returns the decimal number of hours in the TimeSpan. */
1791
1791
  get hours() {
1792
- return Number(this.valueOf()) / Number(c.HOUR.valueOf());
1792
+ return Number(this.valueOf()) / Number(h.HOUR.valueOf());
1793
1793
  }
1794
1794
  /** @returns the decimal number of minutes in the TimeSpan. */
1795
1795
  get minutes() {
1796
- return Number(this.valueOf()) / Number(c.MINUTE.valueOf());
1796
+ return Number(this.valueOf()) / Number(h.MINUTE.valueOf());
1797
1797
  }
1798
1798
  /** @returns The number of seconds in the TimeSpan. */
1799
1799
  get seconds() {
1800
- return Number(this.valueOf()) / Number(c.SECOND.valueOf());
1800
+ return Number(this.valueOf()) / Number(h.SECOND.valueOf());
1801
1801
  }
1802
1802
  /** @returns The number of milliseconds in the TimeSpan. */
1803
1803
  get milliseconds() {
1804
- return Number(this.valueOf()) / Number(c.MILLISECOND.valueOf());
1804
+ return Number(this.valueOf()) / Number(h.MILLISECOND.valueOf());
1805
1805
  }
1806
1806
  /** @returns The number of microseconds in the TimeSpan. */
1807
1807
  get microseconds() {
1808
- return Number(this.valueOf()) / Number(c.MICROSECOND.valueOf());
1808
+ return Number(this.valueOf()) / Number(h.MICROSECOND.valueOf());
1809
1809
  }
1810
1810
  /** @returns The number of nanoseconds in the TimeSpan. */
1811
1811
  get nanoseconds() {
@@ -1825,7 +1825,7 @@ class c extends re {
1825
1825
  * @returns True if the TimeSpans are equal, false otherwise.
1826
1826
  */
1827
1827
  equals(e) {
1828
- return this.valueOf() === new c(e).valueOf();
1828
+ return this.valueOf() === new h(e).valueOf();
1829
1829
  }
1830
1830
  /**
1831
1831
  * Adds a TimeSpan to the TimeSpan.
@@ -1833,7 +1833,7 @@ class c extends re {
1833
1833
  * @returns A new TimeSpan representing the sum of the two TimeSpans.
1834
1834
  */
1835
1835
  add(e) {
1836
- return new c(this.valueOf() + new c(e).valueOf());
1836
+ return new h(this.valueOf() + new h(e).valueOf());
1837
1837
  }
1838
1838
  /**
1839
1839
  * Creates a TimeSpan representing the duration between the two timestamps.
@@ -1841,7 +1841,7 @@ class c extends re {
1841
1841
  * @param other
1842
1842
  */
1843
1843
  sub(e) {
1844
- return new c(this.valueOf() - new c(e).valueOf());
1844
+ return new h(this.valueOf() - new h(e).valueOf());
1845
1845
  }
1846
1846
  /**
1847
1847
  * Creates a TimeSpan representing the given number of nanoseconds.
@@ -1850,10 +1850,10 @@ class c extends re {
1850
1850
  * @returns A TimeSpan representing the given number of nanoseconds.
1851
1851
  */
1852
1852
  static nanoseconds(e = 1) {
1853
- return new c(e);
1853
+ return new h(e);
1854
1854
  }
1855
1855
  /** A nanosecond. */
1856
- static NANOSECOND = c.nanoseconds(1);
1856
+ static NANOSECOND = h.nanoseconds(1);
1857
1857
  /**
1858
1858
  * Creates a TimeSpan representing the given number of microseconds.
1859
1859
  *
@@ -1861,10 +1861,10 @@ class c extends re {
1861
1861
  * @returns A TimeSpan representing the given number of microseconds.
1862
1862
  */
1863
1863
  static microseconds(e = 1) {
1864
- return c.nanoseconds(R(e, 1e3));
1864
+ return h.nanoseconds(R(e, 1e3));
1865
1865
  }
1866
1866
  /** A microsecond. */
1867
- static MICROSECOND = c.microseconds(1);
1867
+ static MICROSECOND = h.microseconds(1);
1868
1868
  /**
1869
1869
  * Creates a TimeSpan representing the given number of milliseconds.
1870
1870
  *
@@ -1872,10 +1872,10 @@ class c extends re {
1872
1872
  * @returns A TimeSpan representing the given number of milliseconds.
1873
1873
  */
1874
1874
  static milliseconds(e = 1) {
1875
- return c.microseconds(R(e, 1e3));
1875
+ return h.microseconds(R(e, 1e3));
1876
1876
  }
1877
1877
  /** A millisecond. */
1878
- static MILLISECOND = c.milliseconds(1);
1878
+ static MILLISECOND = h.milliseconds(1);
1879
1879
  /**
1880
1880
  * Creates a TimeSpan representing the given number of seconds.
1881
1881
  *
@@ -1883,10 +1883,10 @@ class c extends re {
1883
1883
  * @returns A TimeSpan representing the given number of seconds.
1884
1884
  */
1885
1885
  static seconds(e = 1) {
1886
- return c.milliseconds(R(e, 1e3));
1886
+ return h.milliseconds(R(e, 1e3));
1887
1887
  }
1888
1888
  /** A second. */
1889
- static SECOND = c.seconds(1);
1889
+ static SECOND = h.seconds(1);
1890
1890
  /**
1891
1891
  * Creates a TimeSpan representing the given number of minutes.
1892
1892
  *
@@ -1894,10 +1894,10 @@ class c extends re {
1894
1894
  * @returns A TimeSpan representing the given number of minutes.
1895
1895
  */
1896
1896
  static minutes(e = 1) {
1897
- return c.seconds(R(e, 60));
1897
+ return h.seconds(R(e, 60));
1898
1898
  }
1899
1899
  /** A minute. */
1900
- static MINUTE = c.minutes(1);
1900
+ static MINUTE = h.minutes(1);
1901
1901
  /**
1902
1902
  * Creates a TimeSpan representing the given number of hours.
1903
1903
  *
@@ -1905,10 +1905,10 @@ class c extends re {
1905
1905
  * @returns A TimeSpan representing the given number of hours.
1906
1906
  */
1907
1907
  static hours(e) {
1908
- return c.minutes(R(e, 60));
1908
+ return h.minutes(R(e, 60));
1909
1909
  }
1910
1910
  /** Represents an hour. */
1911
- static HOUR = c.hours(1);
1911
+ static HOUR = h.hours(1);
1912
1912
  /**
1913
1913
  * Creates a TimeSpan representing the given number of days.
1914
1914
  *
@@ -1916,25 +1916,25 @@ class c extends re {
1916
1916
  * @returns A TimeSpan representing the given number of days.
1917
1917
  */
1918
1918
  static days(e) {
1919
- return c.hours(R(e, 24));
1919
+ return h.hours(R(e, 24));
1920
1920
  }
1921
1921
  /** Represents a day. */
1922
- static DAY = c.days(1);
1922
+ static DAY = h.days(1);
1923
1923
  /** The maximum possible value for a TimeSpan. */
1924
- static MAX = new c(ze);
1924
+ static MAX = new h(ze);
1925
1925
  /** The minimum possible value for a TimeSpan. */
1926
- static MIN = new c(0);
1926
+ static MIN = new h(0);
1927
1927
  /** The zero value for a TimeSpan. */
1928
- static ZERO = new c(0);
1928
+ static ZERO = new h(0);
1929
1929
  /** A zod schema for validating and transforming time spans */
1930
1930
  static z = a.union([
1931
- a.object({ value: a.bigint() }).transform((e) => new c(e.value)),
1932
- a.string().transform((e) => new c(BigInt(e))),
1933
- a.number().transform((e) => new c(e)),
1934
- a.bigint().transform((e) => new c(e)),
1935
- a.instanceof(c),
1936
- a.instanceof($).transform((e) => new c(e)),
1937
- a.custom((e) => e instanceof st).transform((e) => new c(e))
1931
+ a.object({ value: a.bigint() }).transform((e) => new h(e.value)),
1932
+ a.string().transform((e) => new h(BigInt(e))),
1933
+ a.number().transform((e) => new h(e)),
1934
+ a.bigint().transform((e) => new h(e)),
1935
+ a.instanceof(h),
1936
+ a.instanceof($).transform((e) => new h(e)),
1937
+ a.custom((e) => e instanceof st).transform((e) => new h(e))
1938
1938
  ]);
1939
1939
  }
1940
1940
  let st = class j extends re {
@@ -1955,7 +1955,7 @@ let st = class j extends re {
1955
1955
  * @returns A TimeSpan representing the period of the Rate.
1956
1956
  */
1957
1957
  get period() {
1958
- return c.seconds(1 / this.valueOf());
1958
+ return h.seconds(1 / this.valueOf());
1959
1959
  }
1960
1960
  /**
1961
1961
  * Calculates the number of samples in the given TimeSpan at this rate.
@@ -1964,7 +1964,7 @@ let st = class j extends re {
1964
1964
  * @returns The number of samples in the given TimeSpan at this rate.
1965
1965
  */
1966
1966
  sampleCount(e) {
1967
- return new c(e).seconds * this.valueOf();
1967
+ return new h(e).seconds * this.valueOf();
1968
1968
  }
1969
1969
  /**
1970
1970
  * Calculates the number of bytes in the given TimeSpan at this rate.
@@ -1983,7 +1983,7 @@ let st = class j extends re {
1983
1983
  * @returns A TimeSpan that corresponds to the given number of samples.
1984
1984
  */
1985
1985
  span(e) {
1986
- return c.seconds(e / this.valueOf());
1986
+ return h.seconds(e / this.valueOf());
1987
1987
  }
1988
1988
  /**
1989
1989
  * Calculates a TimeSpan given the number of bytes at this rate.
@@ -2029,7 +2029,7 @@ let st = class j extends re {
2029
2029
  * @returns A new Rate representing this Rate divided by the value.
2030
2030
  */
2031
2031
  div(e) {
2032
- return new j(ve(this.valueOf(), e));
2032
+ return new j(Te(this.valueOf(), e));
2033
2033
  }
2034
2034
  /**
2035
2035
  * Creates a Rate representing the given number of Hz.
@@ -2117,7 +2117,7 @@ let st = class j extends re {
2117
2117
  * @returns A new Density representing this Density divided by the value.
2118
2118
  */
2119
2119
  div(e) {
2120
- return new E(ve(this.valueOf(), e));
2120
+ return new E(Te(this.valueOf(), e));
2121
2121
  }
2122
2122
  /** Unknown/Invalid Density. */
2123
2123
  static UNKNOWN = new E(0);
@@ -2166,7 +2166,7 @@ let st = class j extends re {
2166
2166
  }
2167
2167
  /** @returns The TimeSpan occupied by the TimeRange. */
2168
2168
  get span() {
2169
- return new c(this.end.valueOf() - this.start.valueOf());
2169
+ return new h(this.end.valueOf() - this.start.valueOf());
2170
2170
  }
2171
2171
  /**
2172
2172
  * Checks if the timestamp is valid i.e. the start is before the end.
@@ -2218,7 +2218,7 @@ let st = class j extends re {
2218
2218
  * @param other - The TimeRange to compare to.
2219
2219
  * @returns True if the TimeRange is equal to the given TimeRange.
2220
2220
  */
2221
- equals(e, r = c.ZERO) {
2221
+ equals(e, r = h.ZERO) {
2222
2222
  if (r.isZero)
2223
2223
  return this.start.equals(e.start) && this.end.equals(e.end);
2224
2224
  let n = this.start.sub(e.start).valueOf(), s = this.end.sub(e.end).valueOf();
@@ -2251,13 +2251,13 @@ let st = class j extends re {
2251
2251
  * checking for overlap.
2252
2252
  * @returns True if the two TimeRanges overlap, false otherwise.
2253
2253
  */
2254
- overlapsWith(e, r = c.ZERO) {
2254
+ overlapsWith(e, r = h.ZERO) {
2255
2255
  e = e.makeValid();
2256
2256
  const n = this.makeValid();
2257
2257
  if (this.equals(e)) return !0;
2258
2258
  if (e.end.equals(n.start) || n.end.equals(e.start)) return !1;
2259
2259
  const s = $.max(n.start, e.start), i = $.min(n.end, e.end);
2260
- return i.before(s) ? !1 : new c(i.sub(s)).greaterThanOrEqual(r);
2260
+ return i.before(s) ? !1 : new h(i.sub(s)).greaterThanOrEqual(r);
2261
2261
  }
2262
2262
  contains(e) {
2263
2263
  return e instanceof k ? this.contains(e.start) && this.contains(e.end) : this.start.beforeEq(e) && this.end.after(e);
@@ -2594,7 +2594,7 @@ let st = class j extends re {
2594
2594
  * @returns A new Size representing this Size divided by the value.
2595
2595
  */
2596
2596
  div(e) {
2597
- return new y(ve(this.valueOf(), e));
2597
+ return new y(Te(this.valueOf(), e));
2598
2598
  }
2599
2599
  /** @returns a new Size representing the truncated value of the Size. */
2600
2600
  truncate(e) {
@@ -2624,9 +2624,9 @@ let st = class j extends re {
2624
2624
  }
2625
2625
  /** @returns a nicely formatted string representation of the Size. */
2626
2626
  toString() {
2627
- const e = this.truncate(y.TERABYTE), r = this.truncate(y.GIGABYTE), n = this.truncate(y.MEGABYTE), s = this.truncate(y.KILOBYTE), i = this.truncate(y.BYTE), o = e, h = r.sub(e), f = n.sub(r), l = s.sub(n), d = i.sub(s);
2627
+ const e = this.truncate(y.TERABYTE), r = this.truncate(y.GIGABYTE), n = this.truncate(y.MEGABYTE), s = this.truncate(y.KILOBYTE), i = this.truncate(y.BYTE), o = e, l = r.sub(e), f = n.sub(r), c = s.sub(n), d = i.sub(s);
2628
2628
  let m = "";
2629
- return o.isZero || (m += `${o.terabytes}TB `), h.isZero || (m += `${h.gigabytes}GB `), f.isZero || (m += `${f.megabytes}MB `), l.isZero || (m += `${l.kilobytes}KB `), (!d.isZero || m === "") && (m += `${d.valueOf()}B`), m.trim();
2629
+ return o.isZero || (m += `${o.terabytes}TB `), l.isZero || (m += `${l.gigabytes}GB `), f.isZero || (m += `${f.megabytes}MB `), c.isZero || (m += `${c.kilobytes}KB `), (!d.isZero || m === "") && (m += `${d.valueOf()}B`), m.trim();
2630
2630
  }
2631
2631
  /**
2632
2632
  * Creates a Size from the given number of bytes.
@@ -2699,7 +2699,7 @@ a.object({
2699
2699
  start: a.number(),
2700
2700
  end: a.number()
2701
2701
  });
2702
- const Mu = a.union([
2702
+ const Uu = a.union([
2703
2703
  a.instanceof(Uint8Array),
2704
2704
  a.instanceof(Uint16Array),
2705
2705
  a.instanceof(Uint32Array),
@@ -2710,65 +2710,65 @@ const Mu = a.union([
2710
2710
  a.instanceof(Int16Array),
2711
2711
  a.instanceof(Int32Array),
2712
2712
  a.instanceof(BigInt64Array)
2713
- ]), Vr = (t) => {
2713
+ ]), Hr = (t) => {
2714
2714
  const e = typeof t;
2715
- return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof $ || t instanceof c || t instanceof Date;
2716
- }, ha = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : Le(r, -n), Le = (t, e) => e == 0 ? t : t == 0 ? e : typeof t == "bigint" && typeof e == "bigint" || typeof t == "number" && typeof e == "number" ? t + e : Number(t) + Number(e), fa = "00000000-0000-0000-0000-000000000000", da = /^(?:[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;
2717
- function ga(t) {
2718
- return typeof t == "string" && da.test(t);
2715
+ return e === "string" || e === "number" || e === "boolean" || e === "bigint" || t instanceof $ || t instanceof h || t instanceof Date;
2716
+ }, ga = (t, e, r, n = 0) => t.usesBigInt && !e.usesBigInt ? Number(r) - Number(n) : !t.usesBigInt && e.usesBigInt ? BigInt(r.valueOf()) - BigInt(n.valueOf()) : Le(r, -n), Le = (t, e) => e == 0 ? t : t == 0 ? e : typeof t == "bigint" && typeof e == "bigint" || typeof t == "number" && typeof e == "number" ? t + e : Number(t) + Number(e), pa = "00000000-0000-0000-0000-000000000000", ma = /^(?:[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;
2717
+ function ya(t) {
2718
+ return typeof t == "string" && ma.test(t);
2719
2719
  }
2720
2720
  const I = [];
2721
2721
  for (let t = 0; t < 256; ++t)
2722
2722
  I.push((t + 256).toString(16).slice(1));
2723
- function Gr(t, e = 0) {
2723
+ function Xr(t, e = 0) {
2724
2724
  return (I[t[e + 0]] + I[t[e + 1]] + I[t[e + 2]] + I[t[e + 3]] + "-" + I[t[e + 4]] + I[t[e + 5]] + "-" + I[t[e + 6]] + I[t[e + 7]] + "-" + I[t[e + 8]] + I[t[e + 9]] + "-" + I[t[e + 10]] + I[t[e + 11]] + I[t[e + 12]] + I[t[e + 13]] + I[t[e + 14]] + I[t[e + 15]]).toLowerCase();
2725
2725
  }
2726
- function pa(t, e = 0) {
2727
- const r = Gr(t, e);
2728
- if (!ga(r))
2726
+ function ba(t, e = 0) {
2727
+ const r = Xr(t, e);
2728
+ if (!ya(r))
2729
2729
  throw TypeError("Stringified UUID is invalid");
2730
2730
  return r;
2731
2731
  }
2732
2732
  let it;
2733
- const ma = new Uint8Array(16);
2734
- function ya() {
2733
+ const wa = new Uint8Array(16);
2734
+ function $a() {
2735
2735
  if (!it) {
2736
2736
  if (typeof crypto > "u" || !crypto.getRandomValues)
2737
2737
  throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
2738
2738
  it = crypto.getRandomValues.bind(crypto);
2739
2739
  }
2740
- return it(ma);
2740
+ return it(wa);
2741
2741
  }
2742
- const ba = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), er = { randomUUID: ba };
2743
- function wa(t, e, r) {
2742
+ const Oa = typeof crypto < "u" && crypto.randomUUID && crypto.randomUUID.bind(crypto), rr = { randomUUID: Oa };
2743
+ function va(t, e, r) {
2744
2744
  t = t || {};
2745
- const n = t.random ?? t.rng?.() ?? ya();
2745
+ const n = t.random ?? t.rng?.() ?? $a();
2746
2746
  if (n.length < 16)
2747
2747
  throw new Error("Random bytes length must be >= 16");
2748
- return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Gr(n);
2748
+ return n[6] = n[6] & 15 | 64, n[8] = n[8] & 63 | 128, Xr(n);
2749
2749
  }
2750
- function $a(t, e, r) {
2751
- return er.randomUUID && !t ? er.randomUUID() : wa(t);
2750
+ function Ta(t, e, r) {
2751
+ return rr.randomUUID && !t ? rr.randomUUID() : va(t);
2752
2752
  }
2753
- const Oa = () => $a(), Gt = (t, e) => pa(t, e), va = fa, Au = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2753
+ const xa = () => Ta(), Xt = (t, e) => ba(t, e), Sa = pa, Bu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
2754
2754
  __proto__: null,
2755
- ZERO: va,
2756
- create: Oa,
2757
- parse: Gt
2755
+ ZERO: Sa,
2756
+ create: xa,
2757
+ parse: Xt
2758
2758
  }, Symbol.toStringTag, { value: "Module" })), Y = -1, Ot = {
2759
2759
  [Symbol.iterator]: () => Ot,
2760
2760
  next: () => ({ done: !0, value: void 0 })
2761
- }, Ta = a.string().transform(
2761
+ }, Na = a.string().transform(
2762
2762
  (t) => new Uint8Array(
2763
2763
  atob(t).split("").map((e) => e.charCodeAt(0))
2764
2764
  ).buffer
2765
- ), xa = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), vt = 10, Hr = (t, e) => {
2765
+ ), Ia = a.union([a.null(), a.undefined()]).transform(() => new Uint8Array().buffer), vt = 10, Jr = (t, e) => {
2766
2766
  if (t === "number" && !e.isNumeric)
2767
2767
  throw new Error(`cannot convert series of type ${e.toString()} to number`);
2768
2768
  if (t === "bigint" && !e.usesBigInt)
2769
2769
  throw new Error(`cannot convert series of type ${e.toString()} to bigint`);
2770
- }, Xr = "sy_x_telem_series";
2771
- let Jr = class W {
2770
+ }, Kr = "sy_x_telem_series";
2771
+ let Qr = class W {
2772
2772
  /**
2773
2773
  * A unique identifier for the series. If specified by the user, it is their
2774
2774
  * responsibility to ensure that it is unique. If not specified, a new ID will be
@@ -2779,7 +2779,7 @@ let Jr = class W {
2779
2779
  * A discriminator used for identifying instances of the series class even
2780
2780
  * when bundlers mangle the class name.
2781
2781
  */
2782
- discriminator = Xr;
2782
+ discriminator = Kr;
2783
2783
  /** The data type of the series. */
2784
2784
  dataType;
2785
2785
  /**
@@ -2828,12 +2828,12 @@ let Jr = class W {
2828
2828
  dataType: S.z,
2829
2829
  alignment: a.coerce.bigint().optional(),
2830
2830
  data: a.union([
2831
- Ta,
2832
- xa,
2831
+ Na,
2832
+ Ia,
2833
2833
  a.instanceof(ArrayBuffer),
2834
2834
  a.instanceof(Uint8Array)
2835
2835
  ]),
2836
- glBufferUsage: la.optional().default("static").optional()
2836
+ glBufferUsage: fa.optional().default("static").optional()
2837
2837
  });
2838
2838
  /**
2839
2839
  * A zod schema that validates and constructs a series from it's crude
@@ -2914,37 +2914,37 @@ let Jr = class W {
2914
2914
  * @throws Error if data type cannot be inferred from input
2915
2915
  */
2916
2916
  constructor(e) {
2917
- Sa(e) && (e = { data: e }), e.data ??= [];
2917
+ Ma(e) && (e = { data: e }), e.data ??= [];
2918
2918
  const {
2919
2919
  dataType: r,
2920
2920
  timeRange: n,
2921
2921
  sampleOffset: s = 0,
2922
2922
  glBufferUsage: i = "static",
2923
2923
  alignment: o = 0n,
2924
- alignmentMultiple: h = 1n,
2925
- key: f = Vt(),
2926
- data: l
2924
+ alignmentMultiple: l = 1n,
2925
+ key: f = Ht(),
2926
+ data: c
2927
2927
  } = e;
2928
- if (Kr(l)) {
2929
- const p = l;
2928
+ if (_r(c)) {
2929
+ const p = c;
2930
2930
  this.key = p.key, this.dataType = p.dataType, this.sampleOffset = p.sampleOffset, this.gl = p.gl, this._data = p._data, this.timeRange = p.timeRange, this.alignment = p.alignment, this.alignmentMultiple = p.alignmentMultiple, this.cachedMin = p.cachedMin, this.cachedMax = p.cachedMax, this.writePos = p.writePos, this._refCount = p._refCount, this.cachedLength = p.cachedLength;
2931
2931
  return;
2932
2932
  }
2933
- const d = Vr(l), m = Array.isArray(l);
2933
+ const d = Hr(c), m = Array.isArray(c);
2934
2934
  if (r != null) this.dataType = new S(r);
2935
2935
  else {
2936
- if (l instanceof ArrayBuffer)
2936
+ if (c instanceof ArrayBuffer)
2937
2937
  throw new Error(
2938
2938
  "cannot infer data type from an ArrayBuffer instance when constructing a Series. Please provide a data type."
2939
2939
  );
2940
2940
  if (m || d) {
2941
- let p = l;
2941
+ let p = c;
2942
2942
  if (!d) {
2943
- if (l.length === 0)
2943
+ if (c.length === 0)
2944
2944
  throw new Error(
2945
2945
  "cannot infer data type from a zero length JS array when constructing a Series. Please provide a data type."
2946
2946
  );
2947
- p = l[0];
2947
+ p = c[0];
2948
2948
  }
2949
2949
  if (typeof p == "string") this.dataType = S.STRING;
2950
2950
  else if (typeof p == "number") this.dataType = S.FLOAT64;
@@ -2957,15 +2957,15 @@ let Jr = class W {
2957
2957
  throw new Error(
2958
2958
  `cannot infer data type of ${typeof p} when constructing a Series from a JS array`
2959
2959
  );
2960
- } else this.dataType = new S(l);
2960
+ } else this.dataType = new S(c);
2961
2961
  }
2962
- if (!m && !d) this._data = l;
2963
- else if (m && l.length === 0)
2962
+ if (!m && !d) this._data = c;
2963
+ else if (m && c.length === 0)
2964
2964
  this._data = new this.dataType.Array([]).buffer;
2965
2965
  else {
2966
- let p = d ? [l] : l;
2966
+ let p = d ? [c] : c;
2967
2967
  const A = p[0];
2968
- (A instanceof $ || A instanceof Date || A instanceof c) && (p = p.map((U) => new $(U).valueOf())), this.dataType.equals(S.STRING) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(`${p.join(`
2968
+ (A instanceof $ || A instanceof Date || A instanceof h) && (p = p.map((U) => new $(U).valueOf())), this.dataType.equals(S.STRING) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(`${p.join(`
2969
2969
  `)}
2970
2970
  `).buffer) : this.dataType.equals(S.JSON) ? (this.cachedLength = p.length, this._data = new TextEncoder().encode(
2971
2971
  `${p.map((U) => ct.encodeString(U)).join(`
@@ -2977,7 +2977,7 @@ let Jr = class W {
2977
2977
  p.map(Number)
2978
2978
  ).buffer : this._data = new this.dataType.Array(p).buffer;
2979
2979
  }
2980
- this.key = f, this.alignment = o, this.alignmentMultiple = h, this.sampleOffset = s ?? 0, this.timeRange = n ?? Q.ZERO, this.gl = {
2980
+ this.key = f, this.alignment = o, this.alignmentMultiple = l, this.sampleOffset = s ?? 0, this.timeRange = n ?? Q.ZERO, this.gl = {
2981
2981
  control: null,
2982
2982
  buffer: null,
2983
2983
  prevBuffer: 0,
@@ -3141,7 +3141,7 @@ let Jr = class W {
3141
3141
  if (this.dataType.equals(e)) return this;
3142
3142
  const n = new e.Array(this.length);
3143
3143
  for (let s = 0; s < this.length; s++)
3144
- n[s] = ha(this.dataType, e, this.data[s], r);
3144
+ n[s] = ga(this.dataType, e, this.data[s], r);
3145
3145
  return new W({
3146
3146
  data: n.buffer,
3147
3147
  dataType: e,
@@ -3229,7 +3229,7 @@ let Jr = class W {
3229
3229
  }
3230
3230
  atUUID(e, r) {
3231
3231
  e < 0 && (e = this.length + e);
3232
- const n = Gt(
3232
+ const n = Xt(
3233
3233
  new Uint8Array(this.buffer, e * this.dataType.density.valueOf())
3234
3234
  );
3235
3235
  if (n == null) {
@@ -3258,7 +3258,7 @@ let Jr = class W {
3258
3258
  }
3259
3259
  }
3260
3260
  const i = this.data.slice(n, s);
3261
- return this.dataType.equals(S.STRING) ? new TextDecoder().decode(i) : St(JSON.parse(new TextDecoder().decode(i)));
3261
+ return this.dataType.equals(S.STRING) ? new TextDecoder().decode(i) : It(JSON.parse(new TextDecoder().decode(i)));
3262
3262
  }
3263
3263
  /**
3264
3264
  * @returns the index of the first sample that is greater than or equal to the given value.
@@ -3299,7 +3299,7 @@ let Jr = class W {
3299
3299
  ), this.gl.prevBuffer = Y;
3300
3300
  }
3301
3301
  as(e) {
3302
- return Hr(e, this.dataType), this;
3302
+ return Jr(e, this.dataType), this;
3303
3303
  }
3304
3304
  /** @returns a digest containing information about the series. */
3305
3305
  get digest() {
@@ -3308,8 +3308,8 @@ let Jr = class W {
3308
3308
  dataType: this.dataType.toString(),
3309
3309
  sampleOffset: this.sampleOffset,
3310
3310
  alignment: {
3311
- lower: rr(this.alignmentBounds.lower),
3312
- upper: rr(this.alignmentBounds.upper),
3311
+ lower: sr(this.alignmentBounds.lower),
3312
+ upper: sr(this.alignmentBounds.upper),
3313
3313
  multiple: this.alignmentMultiple
3314
3314
  },
3315
3315
  timeRange: this.timeRange.toString(),
@@ -3347,10 +3347,10 @@ let Jr = class W {
3347
3347
  }
3348
3348
  [Symbol.iterator]() {
3349
3349
  if (this.dataType.isVariable) {
3350
- const e = new Na(this);
3351
- return this.dataType.equals(S.JSON) ? new Ia(e) : e;
3350
+ const e = new Aa(this);
3351
+ return this.dataType.equals(S.JSON) ? new Ea(e) : e;
3352
3352
  }
3353
- return this.dataType.equals(S.UUID) ? new Ma(this) : new Aa(this);
3353
+ return this.dataType.equals(S.UUID) ? new Ua(this) : new Ba(this);
3354
3354
  }
3355
3355
  /**
3356
3356
  * Returns a slice of the series from start to end.
@@ -3377,7 +3377,7 @@ let Jr = class W {
3377
3377
  * @returns An iterator over the specified range.
3378
3378
  */
3379
3379
  subIterator(e, r) {
3380
- return new tr(this, e, r ?? this.length);
3380
+ return new nr(this, e, r ?? this.length);
3381
3381
  }
3382
3382
  /**
3383
3383
  * Returns an iterator over a portion of the series based on alignment.
@@ -3391,7 +3391,7 @@ let Jr = class W {
3391
3391
  ), s = Math.ceil(
3392
3392
  Number(r - this.alignment) / Number(this.alignmentMultiple)
3393
3393
  );
3394
- return new tr(this, n, s);
3394
+ return new nr(this, n, s);
3395
3395
  }
3396
3396
  subBytes(e, r) {
3397
3397
  if (e >= 0 && (r == null || r >= this.byteLength.valueOf())) return this;
@@ -3450,8 +3450,8 @@ let Jr = class W {
3450
3450
  return e += "])", e;
3451
3451
  }
3452
3452
  };
3453
- const Sa = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Jr ? !0 : Vr(t), Kr = Xi(Xr, Jr);
3454
- let tr = class {
3453
+ const Ma = (t) => t == null ? !1 : Array.isArray(t) || t instanceof ArrayBuffer || ArrayBuffer.isView(t) && !(t instanceof DataView) || t instanceof Qr ? !0 : Hr(t), _r = Qi(Kr, Qr);
3454
+ let nr = class {
3455
3455
  series;
3456
3456
  end;
3457
3457
  index;
@@ -3463,7 +3463,7 @@ let tr = class {
3463
3463
  next() {
3464
3464
  return this.index >= this.end ? { done: !0, value: void 0 } : { done: !1, value: this.series.at(this.index++, !0) };
3465
3465
  }
3466
- }, Na = class {
3466
+ }, Aa = class {
3467
3467
  series;
3468
3468
  index;
3469
3469
  decoder;
@@ -3480,7 +3480,7 @@ let tr = class {
3480
3480
  const n = this.index;
3481
3481
  return e === n ? { done: !0, value: void 0 } : (this.index++, { done: !1, value: this.decoder.decode(this.series.buffer.slice(e, n)) });
3482
3482
  }
3483
- }, Ia = class Qr {
3483
+ }, Ea = class en {
3484
3484
  wrapped;
3485
3485
  static schema = a.record(a.string(), a.unknown());
3486
3486
  constructor(e) {
@@ -3490,10 +3490,10 @@ let tr = class {
3490
3490
  const e = this.wrapped.next();
3491
3491
  return e.done === !0 ? { done: !0, value: void 0 } : {
3492
3492
  done: !1,
3493
- value: ct.decodeString(e.value, Qr.schema)
3493
+ value: ct.decodeString(e.value, en.schema)
3494
3494
  };
3495
3495
  }
3496
- }, Ma = class {
3496
+ }, Ua = class {
3497
3497
  series;
3498
3498
  index;
3499
3499
  data;
@@ -3505,11 +3505,11 @@ let tr = class {
3505
3505
  }
3506
3506
  next() {
3507
3507
  if (this.index >= this.series.length) return { done: !0, value: void 0 };
3508
- const e = Gt(this.data, this.index * this.density);
3508
+ const e = Xt(this.data, this.index * this.density);
3509
3509
  return this.index++, { done: !1, value: e };
3510
3510
  }
3511
3511
  };
3512
- class Aa {
3512
+ class Ba {
3513
3513
  series;
3514
3514
  index;
3515
3515
  constructor(e) {
@@ -3522,7 +3522,7 @@ class Aa {
3522
3522
  };
3523
3523
  }
3524
3524
  }
3525
- class ju {
3525
+ class Lu {
3526
3526
  /** The array of series in this collection */
3527
3527
  series;
3528
3528
  /**
@@ -3575,7 +3575,7 @@ class ju {
3575
3575
  this.series = e;
3576
3576
  }
3577
3577
  as(e) {
3578
- return Hr(e, this.dataType), this;
3578
+ return Jr(e, this.dataType), this;
3579
3579
  }
3580
3580
  /**
3581
3581
  * Returns the data type of the series in this collection. If the collection is empty,
@@ -3617,7 +3617,7 @@ class ju {
3617
3617
  const r = () => new Error(
3618
3618
  `cannot push a ${e.dataType.toString()} series to a ${this.dataType.toString()} multi-series`
3619
3619
  ), n = e.dataType.equals(this.dataType);
3620
- if (Kr(e)) {
3620
+ if (_r(e)) {
3621
3621
  if (this.series.length !== 0 && !n) throw r();
3622
3622
  this.series.push(e);
3623
3623
  } else {
@@ -3723,7 +3723,7 @@ class ju {
3723
3723
  * Returns the bounds containing the minimum and maximum values across all series.
3724
3724
  */
3725
3725
  get bounds() {
3726
- return Tr(this.series.map((e) => e.bounds));
3726
+ return Sr(this.series.map((e) => e.bounds));
3727
3727
  }
3728
3728
  /**
3729
3729
  * Returns the sum of the byte lengths of all series.
@@ -3750,7 +3750,7 @@ class ju {
3750
3750
  */
3751
3751
  traverseAlignment(e, r) {
3752
3752
  const n = this.series.map((s) => s.alignmentBounds);
3753
- return xr(n, e, r);
3753
+ return Nr(n, e, r);
3754
3754
  }
3755
3755
  /**
3756
3756
  * Acquires a reference to the WebGL buffer for all series.
@@ -3773,7 +3773,7 @@ class ju {
3773
3773
  */
3774
3774
  distance(e, r) {
3775
3775
  const n = this.series.map((s) => s.alignmentBounds);
3776
- return Sr(n, e, r);
3776
+ return Ir(n, e, r);
3777
3777
  }
3778
3778
  /**
3779
3779
  * Parses a JSON multi-series into an array of values using the provided zod schema.
@@ -3796,7 +3796,7 @@ class ju {
3796
3796
  next() {
3797
3797
  return { done: !0, value: void 0 };
3798
3798
  }
3799
- } : new Ea(this.series);
3799
+ } : new ja(this.series);
3800
3800
  }
3801
3801
  /**
3802
3802
  * Returns an array of the values in the multi-series as strings.
@@ -3807,7 +3807,7 @@ class ju {
3807
3807
  return this.series.flatMap((e) => e.toStrings());
3808
3808
  }
3809
3809
  }
3810
- let Ea = class {
3810
+ let ja = class {
3811
3811
  series;
3812
3812
  seriesIndex;
3813
3813
  internal;
@@ -3821,7 +3821,8 @@ let Ea = class {
3821
3821
  [Symbol.iterator]() {
3822
3822
  return this;
3823
3823
  }
3824
- }, at = class {
3824
+ };
3825
+ class at {
3825
3826
  series;
3826
3827
  index;
3827
3828
  end;
@@ -3834,33 +3835,33 @@ let Ea = class {
3834
3835
  [Symbol.iterator]() {
3835
3836
  return this;
3836
3837
  }
3837
- };
3838
- const rr = (t) => {
3838
+ }
3839
+ const sr = (t) => {
3839
3840
  const e = t >> 32n, r = t & 0xffffffffn;
3840
3841
  return { domain: e, sample: r };
3841
3842
  };
3842
3843
  a.object({ key: a.string(), value: a.string() });
3843
- const Ua = a.record(
3844
+ const Ca = a.record(
3844
3845
  a.union([a.number(), a.string(), a.symbol()]),
3845
3846
  a.unknown()
3846
- ), Ht = (t) => Object.entries(t), Ba = (t, e) => Object.fromEntries(Ht(t).map(([r, n]) => [r, e(n, r)])), ja = (t) => Object.fromEntries(Ht(t).filter(([e, r]) => r !== void 0)), Ca = (t, ...e) => {
3847
+ ), Jt = (t) => Object.entries(t), Ra = (t, e) => Object.fromEntries(Jt(t).map(([r, n]) => [r, e(n, r)])), La = (t) => Object.fromEntries(Jt(t).filter(([e, r]) => r !== void 0)), Da = (t, ...e) => {
3847
3848
  const r = { ...t };
3848
3849
  for (const n of e) delete r[n];
3849
3850
  return r;
3850
- }, Lu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3851
+ }, Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3851
3852
  __proto__: null,
3852
- entries: Ht,
3853
- map: Ba,
3854
- omit: Ca,
3855
- purgeUndefined: ja,
3856
- unknownZ: Ua
3857
- }, Symbol.toStringTag, { value: "Module" })), _r = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Ra = _r(), en = ["macOS", "Windows", "Linux"], La = ["macos", "windows", "linux"], Da = {
3853
+ entries: Jt,
3854
+ map: Ra,
3855
+ omit: Da,
3856
+ purgeUndefined: La,
3857
+ unknownZ: Ca
3858
+ }, Symbol.toStringTag, { value: "Module" })), tn = () => typeof process < "u" && process.versions != null && process.versions.node != null ? "node" : typeof window > "u" || window.document === void 0 ? "webworker" : "browser", Pa = tn(), rn = ["macOS", "Windows", "Linux"], ka = ["macos", "windows", "linux"], qa = {
3858
3859
  macos: "macOS",
3859
3860
  windows: "Windows",
3860
3861
  linux: "Linux"
3861
- }, Pa = a.enum(en).or(
3862
- a.enum(La).transform((t) => Da[t])
3863
- ), ka = () => {
3862
+ }, za = a.enum(rn).or(
3863
+ a.enum(ka).transform((t) => qa[t])
3864
+ ), Za = () => {
3864
3865
  if (typeof window > "u") return;
3865
3866
  const t = window.navigator.userAgent.toLowerCase();
3866
3867
  if (t.includes("mac")) return "macOS";
@@ -3868,17 +3869,17 @@ const Ua = a.record(
3868
3869
  if (t.includes("linux")) return "Linux";
3869
3870
  };
3870
3871
  let ot;
3871
- const qa = ((t = {}) => {
3872
+ const Fa = ((t = {}) => {
3872
3873
  const { force: e, default: r } = t;
3873
- return e ?? ot ?? (ot = ka(), ot ?? r);
3874
- }), Du = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3874
+ return e ?? ot ?? (ot = Za(), ot ?? r);
3875
+ }), ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3875
3876
  __proto__: null,
3876
- OPERATING_SYSTEMS: en,
3877
- RUNTIME: Ra,
3878
- detect: _r,
3879
- getOS: qa,
3880
- osZ: Pa
3881
- }, Symbol.toStringTag, { value: "Module" })), za = (...t) => t.map(tn).join(""), tn = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), Za = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3877
+ OPERATING_SYSTEMS: rn,
3878
+ RUNTIME: Pa,
3879
+ detect: tn,
3880
+ getOS: Fa,
3881
+ osZ: za
3882
+ }, Symbol.toStringTag, { value: "Module" })), Ya = (...t) => t.map(nn).join(""), nn = (t) => (t.endsWith("/") || (t += "/"), t.startsWith("/") && (t = t.slice(1)), t), Wa = (t) => t.endsWith("/") ? t.slice(0, -1) : t;
3882
3883
  class De {
3883
3884
  protocol;
3884
3885
  host;
@@ -3891,7 +3892,7 @@ class De {
3891
3892
  * @param pathPrefix - A path prefix to use for all requests. Defaults to "".
3892
3893
  */
3893
3894
  constructor({ host: e, port: r, protocol: n = "", pathPrefix: s = "" }) {
3894
- this.protocol = n, this.host = e, this.port = r, this.path = tn(s);
3895
+ this.protocol = n, this.host = e, this.port = r, this.path = nn(s);
3895
3896
  }
3896
3897
  /**
3897
3898
  * Replaces creates a new URL with the specified properties replaced.
@@ -3914,64 +3915,91 @@ class De {
3914
3915
  child(e) {
3915
3916
  return new De({
3916
3917
  ...this,
3917
- pathPrefix: za(this.path, e)
3918
+ pathPrefix: Ya(this.path, e)
3918
3919
  });
3919
3920
  }
3920
3921
  /** @returns a string representation of the url */
3921
3922
  toString() {
3922
- return Za(
3923
+ return Wa(
3923
3924
  `${this.protocol}://${this.host}:${this.port}/${this.path}`
3924
3925
  );
3925
3926
  }
3926
3927
  static UNKNOWN = new De({ host: "unknown", port: 0 });
3927
3928
  }
3928
- const Fa = 2, Ya = 3, Wa = 2, Va = (t, e) => {
3929
+ const Tt = 2, xt = 3, sn = 2, Va = (t, e) => {
3929
3930
  if (Number.isNaN(t) || !Number.isFinite(t)) return t;
3930
- const r = Te(e);
3931
+ const r = le(e);
3931
3932
  if (r == 0) return t;
3932
3933
  let n;
3933
- r >= 1e3 ? n = Fa : r >= 1 ? n = Ya : n = Math.ceil(-Math.log10(r)) + Wa;
3934
+ r >= 1e3 ? n = Tt : r >= 1 ? n = xt : n = Math.ceil(-Math.log10(r)) + sn;
3934
3935
  const s = 10 ** n;
3935
3936
  return Math.round(t * s) / s;
3936
- }, Pu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3937
+ }, Ga = 5, Ha = 1e-10, Xa = (t, e) => {
3938
+ if (Number.isNaN(t) || !Number.isFinite(t)) return t;
3939
+ const r = Math.abs(t);
3940
+ if (r === 0) return 0;
3941
+ let n = !1, s = 0;
3942
+ if (e != null) {
3943
+ s = le(e);
3944
+ const l = s / r;
3945
+ n = s > 0 && l > Ha;
3946
+ }
3947
+ if (n) {
3948
+ let l;
3949
+ s >= 1e3 ? l = Tt : s >= 1 ? l = xt : l = Math.ceil(-Math.log10(s)) + sn;
3950
+ const f = 10 ** l;
3951
+ return Math.round(t * f) / f;
3952
+ }
3953
+ if (r >= 1e3) {
3954
+ const l = 10 ** Tt;
3955
+ return Math.round(t * l) / l;
3956
+ }
3957
+ if (r >= 1) {
3958
+ const l = 10 ** xt;
3959
+ return Math.round(t * l) / l;
3960
+ }
3961
+ const i = Math.floor(Math.log10(r)), o = 10 ** (Ga - i - 1);
3962
+ return Math.round(t * o) / o;
3963
+ }, qu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
3937
3964
  __proto__: null,
3938
- MAX_INT16: sa,
3939
- MAX_INT32: aa,
3965
+ MAX_INT16: oa,
3966
+ MAX_INT32: la,
3940
3967
  MAX_INT64: ze,
3941
- MAX_INT64_NUMBER: Yr,
3942
- MAX_INT8: ra,
3943
- MAX_UINT16: Ki,
3944
- MAX_UINT32: Qi,
3945
- MAX_UINT64: _i,
3946
- MAX_UINT64_NUMBER: ea,
3947
- MAX_UINT8: Ji,
3948
- MIN_INT16: na,
3949
- MIN_INT32: ia,
3950
- MIN_INT64: oa,
3951
- MIN_INT64_NUMBER: ua,
3952
- MIN_INT8: ta,
3953
- abs: Or,
3968
+ MAX_INT64_NUMBER: Vr,
3969
+ MAX_INT8: ia,
3970
+ MAX_UINT16: ea,
3971
+ MAX_UINT32: ta,
3972
+ MAX_UINT64: ra,
3973
+ MAX_UINT64_NUMBER: na,
3974
+ MAX_UINT8: _i,
3975
+ MIN_INT16: aa,
3976
+ MIN_INT32: ua,
3977
+ MIN_INT64: ca,
3978
+ MIN_INT64_NUMBER: ha,
3979
+ MIN_INT8: sa,
3980
+ abs: Tr,
3954
3981
  add: ue,
3955
- closeTo: ts,
3956
- div: ve,
3982
+ closeTo: ss,
3983
+ div: Te,
3957
3984
  equal: dt,
3958
3985
  isInteger: ke,
3959
- max: ns,
3960
- min: $r,
3986
+ max: as,
3987
+ min: vr,
3961
3988
  mult: R,
3962
3989
  roundBySpan: Va,
3963
- roundToNearestMagnitude: rs,
3990
+ roundToNearestMagnitude: is,
3991
+ smartRound: Xa,
3964
3992
  sub: Z
3965
3993
  }, Symbol.toStringTag, { value: "Module" }));
3966
3994
  a.object({
3967
- baseInterval: c.z.optional(),
3995
+ baseInterval: h.z.optional(),
3968
3996
  maxRetries: a.number().optional(),
3969
3997
  scale: a.number().optional()
3970
3998
  });
3971
- const Ga = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ga), ie = a.number().min(0).max(255), rn = a.number().min(0).max(1), _e = a.tuple([ie, ie, ie, rn]), Ha = a.tuple([ie, ie, ie]), Xa = a.object({ rgba255: _e }), Ja = a.number().min(0).max(360), Ka = a.number().min(0).max(100), Qa = a.number().min(0).max(100), nn = a.tuple([Ja, Ka, Qa, rn]), et = a.union([Fe, Ha, _e, nn, Xa]), tt = et.transform((t) => T(t)), _a = (t) => tt.safeParse(t).success, eo = (t) => _e.safeParse(t).success, to = ((t) => {
3999
+ const Ja = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ja), ie = a.number().min(0).max(255), an = a.number().min(0).max(1), _e = a.tuple([ie, ie, ie, an]), Ka = a.tuple([ie, ie, ie]), Qa = a.object({ rgba255: _e }), _a = a.number().min(0).max(360), eo = a.number().min(0).max(100), to = a.number().min(0).max(100), on = a.tuple([_a, eo, to, an]), et = a.union([Fe, Ka, _e, on, Qa]), tt = et.transform((t) => T(t)), ro = (t) => tt.safeParse(t).success, no = (t) => _e.safeParse(t).success, so = ((t) => {
3972
4000
  if (t == null) return;
3973
4001
  const e = tt.safeParse(t);
3974
- if (e.success) return an(e.data);
4002
+ if (e.success) return ln(e.data);
3975
4003
  if (typeof t == "string") return t;
3976
4004
  throw e.error;
3977
4005
  }), T = (t, e = 1) => {
@@ -3982,51 +4010,51 @@ const Ga = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ga), ie = a.n
3982
4010
  return t.length === 3 ? [...t, e] : t;
3983
4011
  }
3984
4012
  return t.rgba255;
3985
- }, sn = (t, e) => {
4013
+ }, un = (t, e) => {
3986
4014
  if (t == null || e == null) return t == e;
3987
4015
  const r = T(t), n = T(e);
3988
4016
  return r.every((s, i) => s === n[i]);
3989
- }, ro = ((t) => {
4017
+ }, io = ((t) => {
3990
4018
  if (t == null) return;
3991
4019
  const [e, r, n, s] = T(t);
3992
4020
  return `#${Me(e)}${Me(r)}${Me(n)}${s === 1 ? "" : Me(s * 255)}`;
3993
- }), an = (t) => {
4021
+ }), ln = (t) => {
3994
4022
  const [e, r, n, s] = T(t);
3995
4023
  return `rgba(${e}, ${r}, ${n}, ${s})`;
3996
- }, no = (t) => `rgb(${on(t)})`, on = (t) => {
4024
+ }, ao = (t) => `rgb(${cn(t)})`, cn = (t) => {
3997
4025
  const [e, r, n] = T(t);
3998
4026
  return `${e}, ${r}, ${n}`;
3999
- }, so = (t) => [...Xt(t), me(t)], Xt = (t) => [
4000
- de(t) / 255,
4027
+ }, oo = (t) => [...Kt(t), ye(t)], Kt = (t) => [
4001
4028
  ge(t) / 255,
4002
- pe(t) / 255
4003
- ], de = (t) => T(t)[0], ge = (t) => T(t)[1], pe = (t) => T(t)[2], me = (t) => T(t)[3], io = (t) => sn(Jt, t), ao = (t) => mo(T(t)), oo = (t, e) => {
4029
+ pe(t) / 255,
4030
+ me(t) / 255
4031
+ ], ge = (t) => T(t)[0], pe = (t) => T(t)[1], me = (t) => T(t)[2], ye = (t) => T(t)[3], uo = (t) => un(Qt, t), lo = (t) => wo(T(t)), co = (t, e) => {
4004
4032
  const [r, n, s] = T(t);
4005
4033
  if (e > 100)
4006
4034
  throw new Error(`Color opacity must be between 0 and 100, got ${e}`);
4007
4035
  return e > 1 && (e /= 100), [r, n, s, e];
4008
- }, $e = (t) => {
4009
- const [e, r, n] = Xt(t).map(
4036
+ }, Oe = (t) => {
4037
+ const [e, r, n] = Kt(t).map(
4010
4038
  (s) => s <= 0.03928 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4
4011
4039
  );
4012
4040
  return Number((0.2126 * e + 0.7152 * r + 0.0722 * n).toFixed(3));
4013
- }, uo = (t) => {
4014
- const [e, r, n] = Xt(t);
4041
+ }, ho = (t) => {
4042
+ const [e, r, n] = Kt(t);
4015
4043
  return 1 - (Math.max(e, r, n) - Math.min(e, r, n));
4016
- }, Tt = (t, e) => {
4017
- const r = T(t), n = T(e), s = $e(r), i = $e(n);
4044
+ }, St = (t, e) => {
4045
+ const r = T(t), n = T(e), s = Oe(r), i = Oe(n);
4018
4046
  return (Math.max(s, i) + 0.5) / (Math.min(s, i) + 0.5);
4019
- }, lo = (t, ...e) => {
4047
+ }, fo = (t, ...e) => {
4020
4048
  if (e.length === 0)
4021
4049
  throw new Error("[Color.pickByContrast] - must provide at least one color");
4022
- const r = T(t), [n] = e.sort((s, i) => Tt(r, i) - Tt(r, s));
4050
+ const r = T(t), [n] = e.sort((s, i) => St(r, i) - St(r, s));
4023
4051
  return T(n);
4024
- }, co = (t) => $e(t) < 0.5, ho = (t) => $e(t) > 0.5, Pe = (t, e = 1) => (t = Fe.parse(t), t = fo(t), [
4052
+ }, go = (t) => Oe(t) < 0.5, po = (t) => Oe(t) > 0.5, Pe = (t, e = 1) => (t = Fe.parse(t), t = mo(t), [
4025
4053
  Ae(t, 0),
4026
4054
  Ae(t, 2),
4027
4055
  Ae(t, 4),
4028
4056
  t.length === 8 ? Ae(t, 6) / 255 : e
4029
- ]), Jt = [0, 0, 0, 0], Me = (t) => Math.floor(t).toString(16).padStart(2, "0"), Ae = (t, e) => parseInt(t.slice(e, e + 2), 16), fo = (t) => t.startsWith("#") ? t.slice(1) : t, nr = {
4057
+ ]), Qt = [0, 0, 0, 0], Me = (t) => Math.floor(t).toString(16).padStart(2, "0"), Ae = (t, e) => parseInt(t.slice(e, e + 2), 16), mo = (t) => t.startsWith("#") ? t.slice(1) : t, ir = {
4030
4058
  black: "#000000",
4031
4059
  white: "#ffffff",
4032
4060
  red: "#ff0000",
@@ -4058,7 +4086,7 @@ const Ga = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ga), ie = a.n
4058
4086
  khaki: "#f0e68c",
4059
4087
  crimson: "#dc143c",
4060
4088
  transparent: "transparent"
4061
- }, go = (t) => {
4089
+ }, yo = (t) => {
4062
4090
  if (!t) return;
4063
4091
  const e = t.trim().toLowerCase();
4064
4092
  if (!(e === "transparent" || e === "none")) {
@@ -4078,42 +4106,42 @@ const Ga = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ga), ie = a.n
4078
4106
  return [parseInt(n), parseInt(s), parseInt(i), o ? parseFloat(o) : 1];
4079
4107
  }
4080
4108
  }
4081
- if (nr[e]) return Pe(nr[e]);
4109
+ if (ir[e]) return Pe(ir[e]);
4082
4110
  }
4083
- }, po = (t) => {
4084
- t = nn.parse(t);
4111
+ }, bo = (t) => {
4112
+ t = on.parse(t);
4085
4113
  let [e, r, n] = t;
4086
4114
  const s = t[3];
4087
4115
  e /= 360, r /= 100, n /= 100;
4088
- let i, o, h;
4116
+ let i, o, l;
4089
4117
  if (r === 0)
4090
- i = o = h = n;
4118
+ i = o = l = n;
4091
4119
  else {
4092
- const f = n < 0.5 ? n * (1 + r) : n + r - n * r, l = 2 * n - f;
4093
- i = ut(l, f, e + 1 / 3), o = ut(l, f, e), h = ut(l, f, e - 1 / 3);
4120
+ const f = n < 0.5 ? n * (1 + r) : n + r - n * r, c = 2 * n - f;
4121
+ i = ut(c, f, e + 1 / 3), o = ut(c, f, e), l = ut(c, f, e - 1 / 3);
4094
4122
  }
4095
- return [Math.round(i * 255), Math.round(o * 255), Math.round(h * 255), s];
4096
- }, ut = (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t), mo = (t) => {
4123
+ return [Math.round(i * 255), Math.round(o * 255), Math.round(l * 255), s];
4124
+ }, ut = (t, e, r) => (r < 0 && (r += 1), r > 1 && (r -= 1), r < 1 / 6 ? t + (e - t) * 6 * r : r < 1 / 2 ? e : r < 2 / 3 ? t + (e - t) * (2 / 3 - r) * 6 : t), wo = (t) => {
4097
4125
  t = _e.parse(t);
4098
4126
  let [e, r, n] = t;
4099
4127
  const s = t[3];
4100
4128
  e /= 255, r /= 255, n /= 255;
4101
4129
  const i = Math.max(e, r, n), o = Math.min(e, r, n);
4102
- let h, f, l = (i + o) / 2;
4130
+ let l, f, c = (i + o) / 2;
4103
4131
  if (i === o)
4104
- h = f = 0;
4132
+ l = f = 0;
4105
4133
  else {
4106
4134
  const d = i - o;
4107
- f = l > 0.5 ? d / (2 - i - o) : d / (i + o), i === e ? h = (r - n) / d + (r < n ? 6 : 0) : i === r ? h = (n - e) / d + 2 : h = (e - r) / d + 4, h /= 6;
4135
+ f = c > 0.5 ? d / (2 - i - o) : d / (i + o), i === e ? l = (r - n) / d + (r < n ? 6 : 0) : i === r ? l = (n - e) / d + 2 : l = (e - r) / d + 4, l /= 6;
4108
4136
  }
4109
- return h *= 360, f *= 100, l *= 100, [Math.round(h), Math.round(f), Math.round(l), s];
4110
- }, yo = T("#000000"), bo = T("#ffffff"), un = a.object({
4137
+ return l *= 360, f *= 100, c *= 100, [Math.round(l), Math.round(f), Math.round(c), s];
4138
+ }, $o = T("#000000"), Oo = T("#ffffff"), hn = a.object({
4111
4139
  key: a.string(),
4112
4140
  color: et,
4113
4141
  position: a.number(),
4114
4142
  switched: a.boolean().optional()
4115
- }), wo = a.array(un), $o = (t, e) => {
4116
- if (t.length === 0) return Jt;
4143
+ }), vo = a.array(hn), To = (t, e) => {
4144
+ if (t.length === 0) return Qt;
4117
4145
  if (t = t.slice().sort((r, n) => r.position - n.position), e <= t[0].position) return T(t[0].color);
4118
4146
  if (e >= t[t.length - 1].position)
4119
4147
  return T(t[t.length - 1].color);
@@ -4122,163 +4150,163 @@ const Ga = /^#?([0-9a-f]{6}|[0-9a-f]{8})$/i, Fe = a.string().regex(Ga), ie = a.n
4122
4150
  if (e < n.position || e > s.position) continue;
4123
4151
  if (e === n.position) return T(n.color);
4124
4152
  if (e === s.position) return T(s.color);
4125
- const i = (e - n.position) / (s.position - n.position), o = T(n.color), h = T(s.color), f = Math.round(
4126
- de(o) + i * (de(h) - de(o))
4127
- ), l = Math.round(
4128
- ge(o) + i * (ge(h) - ge(o))
4153
+ const i = (e - n.position) / (s.position - n.position), o = T(n.color), l = T(s.color), f = Math.round(
4154
+ ge(o) + i * (ge(l) - ge(o))
4155
+ ), c = Math.round(
4156
+ pe(o) + i * (pe(l) - pe(o))
4129
4157
  ), d = Math.round(
4130
- pe(o) + i * (pe(h) - pe(o))
4131
- ), m = me(o) + i * (me(h) - me(o));
4132
- return T([f, l, d, m]);
4158
+ me(o) + i * (me(l) - me(o))
4159
+ ), m = ye(o) + i * (ye(l) - ye(o));
4160
+ return T([f, c, d, m]);
4133
4161
  }
4134
4162
  return T(t[t.length - 1].color);
4135
- }, Oo = a.object({
4163
+ }, xo = a.object({
4136
4164
  key: a.string(),
4137
4165
  name: a.string(),
4138
4166
  color: tt
4139
- }), vo = a.object({
4167
+ }), So = a.object({
4140
4168
  key: a.string(),
4141
4169
  name: a.string(),
4142
- swatches: a.array(Oo)
4143
- }), To = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4170
+ swatches: a.array(xo)
4171
+ }), No = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4144
4172
  __proto__: null,
4145
- BLACK: yo,
4146
- WHITE: bo,
4147
- ZERO: Jt,
4148
- aValue: me,
4149
- bValue: pe,
4173
+ BLACK: $o,
4174
+ WHITE: Oo,
4175
+ ZERO: Qt,
4176
+ aValue: ye,
4177
+ bValue: me,
4150
4178
  colorZ: tt,
4151
4179
  construct: T,
4152
- contrast: Tt,
4180
+ contrast: St,
4153
4181
  crudeZ: et,
4154
- cssString: to,
4155
- equals: sn,
4156
- fromCSS: go,
4157
- fromGradient: $o,
4158
- fromHSLA: po,
4159
- gValue: ge,
4160
- gradientZ: wo,
4161
- grayness: uo,
4162
- hex: ro,
4163
- hsla: ao,
4164
- isColor: eo,
4165
- isCrude: _a,
4166
- isDark: co,
4167
- isLight: ho,
4168
- isZero: io,
4169
- luminance: $e,
4170
- paletteZ: vo,
4171
- pickByContrast: lo,
4172
- rValue: de,
4173
- rgbCSS: no,
4174
- rgbString: on,
4175
- rgba1: so,
4176
- rgbaCSS: an,
4177
- setAlpha: oo,
4178
- stopZ: un
4179
- }, Symbol.toStringTag, { value: "Module" })), ln = a.int().min(0).max(255), cn = 255, hn = 0, xo = {
4180
- lower: hn,
4181
- upper: cn + 1
4182
- }, fn = a.object({
4182
+ cssString: so,
4183
+ equals: un,
4184
+ fromCSS: yo,
4185
+ fromGradient: To,
4186
+ fromHSLA: bo,
4187
+ gValue: pe,
4188
+ gradientZ: vo,
4189
+ grayness: ho,
4190
+ hex: io,
4191
+ hsla: lo,
4192
+ isColor: no,
4193
+ isCrude: ro,
4194
+ isDark: go,
4195
+ isLight: po,
4196
+ isZero: uo,
4197
+ luminance: Oe,
4198
+ paletteZ: So,
4199
+ pickByContrast: fo,
4200
+ rValue: ge,
4201
+ rgbCSS: ao,
4202
+ rgbString: cn,
4203
+ rgba1: oo,
4204
+ rgbaCSS: ln,
4205
+ setAlpha: co,
4206
+ stopZ: hn
4207
+ }, Symbol.toStringTag, { value: "Module" })), fn = a.int().min(0).max(255), dn = 255, gn = 0, Io = {
4208
+ lower: gn,
4209
+ upper: dn + 1
4210
+ }, pn = a.object({
4183
4211
  name: a.string(),
4184
4212
  key: a.string()
4185
- }), Oe = (t) => a.object({
4186
- subject: fn,
4213
+ }), ve = (t) => a.object({
4214
+ subject: pn,
4187
4215
  resource: t,
4188
- authority: ln
4189
- }), So = (...t) => (e) => e.filter((r) => {
4216
+ authority: fn
4217
+ }), Mo = (...t) => (e) => e.filter((r) => {
4190
4218
  let n = !1;
4191
4219
  return r.to != null && (n = t.includes(r.to.resource)), r.from != null && !n && (n = t.includes(r.from.resource)), n;
4192
- }), dn = (t) => a.object({
4193
- from: Oe(t),
4220
+ }), mn = (t) => a.object({
4221
+ from: ve(t),
4194
4222
  to: a.null()
4195
- }), gn = (t) => a.object({
4223
+ }), yn = (t) => a.object({
4196
4224
  from: a.null(),
4197
- to: Oe(t)
4198
- }), No = (t) => a.union([
4199
- dn(t),
4200
- gn(t),
4225
+ to: ve(t)
4226
+ }), Ao = (t) => a.union([
4227
+ mn(t),
4228
+ yn(t),
4201
4229
  a.object({
4202
- from: Oe(t),
4203
- to: Oe(t)
4230
+ from: ve(t),
4231
+ to: ve(t)
4204
4232
  })
4205
- ]), ku = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4233
+ ]), zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4206
4234
  __proto__: null,
4207
- ABSOLUTE_AUTHORITY: cn,
4208
- AUTHORITY_BOUNDS: xo,
4209
- ZERO_AUTHORITY: hn,
4210
- acquireZ: gn,
4211
- authorityZ: ln,
4212
- filterTransfersByChannelKey: So,
4213
- releaseZ: dn,
4214
- stateZ: Oe,
4215
- subjectZ: fn,
4216
- transferZ: No
4217
- }, Symbol.toStringTag, { value: "Module" })), Io = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Mo = (t, e) => {
4235
+ ABSOLUTE_AUTHORITY: dn,
4236
+ AUTHORITY_BOUNDS: Io,
4237
+ ZERO_AUTHORITY: gn,
4238
+ acquireZ: yn,
4239
+ authorityZ: fn,
4240
+ filterTransfersByChannelKey: Mo,
4241
+ releaseZ: mn,
4242
+ stateZ: ve,
4243
+ subjectZ: pn,
4244
+ transferZ: Ao
4245
+ }, Symbol.toStringTag, { value: "Module" })), Eo = (t) => Object.getOwnPropertySymbols(globalThis).includes(t), Uo = (t, e) => {
4218
4246
  const r = Symbol.for(t);
4219
- if (!Io(r)) {
4247
+ if (!Eo(r)) {
4220
4248
  const n = e();
4221
4249
  Object.defineProperty(globalThis, r, { value: n });
4222
4250
  }
4223
4251
  return () => globalThis[r];
4224
- }, pn = "sy_x_error", Ao = (t) => (e) => e != null && typeof e == "object" && "type" in e && typeof e.type == "string" ? e.type.startsWith(t) : e instanceof Error ? e.message.startsWith(t) : typeof e != "string" ? !1 : e.startsWith(t), mn = (t) => class fe extends Error {
4225
- static discriminator = pn;
4226
- discriminator = fe.discriminator;
4252
+ }, bn = "sy_x_error", Bo = (t) => (e) => e != null && typeof e == "object" && "type" in e && typeof e.type == "string" ? e.type.startsWith(t) : e instanceof Error ? e.message.startsWith(t) : typeof e != "string" ? !1 : e.startsWith(t), wn = (t) => class de extends Error {
4253
+ static discriminator = bn;
4254
+ discriminator = de.discriminator;
4227
4255
  static TYPE = t;
4228
- type = fe.TYPE;
4229
- static matches = Ao(t);
4230
- matches = fe.matches;
4256
+ type = de.TYPE;
4257
+ static matches = Bo(t);
4258
+ matches = de.matches;
4231
4259
  constructor(r, n) {
4232
- super(r, n), this.name = fe.TYPE;
4260
+ super(r, n), this.name = de.TYPE;
4233
4261
  }
4234
4262
  static sub(r) {
4235
- return mn(`${t}.${r}`);
4263
+ return wn(`${t}.${r}`);
4236
4264
  }
4237
- }, Eo = (t) => {
4265
+ }, jo = (t) => {
4238
4266
  if (t == null || typeof t != "object") return !1;
4239
4267
  const e = t;
4240
- if (e.discriminator !== pn) return !1;
4268
+ if (e.discriminator !== bn) return !1;
4241
4269
  if (!("type" in e))
4242
4270
  throw new Error(
4243
4271
  `X Error is missing its type property: ${JSON.stringify(e)}`
4244
4272
  );
4245
4273
  return !0;
4246
- }, le = "unknown", sr = "nil";
4247
- class Uo {
4274
+ }, ce = "unknown", ar = "nil";
4275
+ class Co {
4248
4276
  providers = [];
4249
4277
  register(e) {
4250
4278
  this.providers.push(e);
4251
4279
  }
4252
4280
  encode(e) {
4253
- if (e == null) return { type: sr, data: "" };
4254
- if (Eo(e))
4281
+ if (e == null) return { type: ar, data: "" };
4282
+ if (jo(e))
4255
4283
  for (const r of this.providers) {
4256
4284
  const n = r.encode(e);
4257
4285
  if (n != null) return n;
4258
4286
  }
4259
- if (e instanceof Error) return { type: le, data: e.message };
4260
- if (typeof e == "string") return { type: le, data: e };
4287
+ if (e instanceof Error) return { type: ce, data: e.message };
4288
+ if (typeof e == "string") return { type: ce, data: e };
4261
4289
  try {
4262
- return { type: le, data: JSON.stringify(e) };
4290
+ return { type: ce, data: JSON.stringify(e) };
4263
4291
  } catch {
4264
- return { type: le, data: "unable to encode error information" };
4292
+ return { type: ce, data: "unable to encode error information" };
4265
4293
  }
4266
4294
  }
4267
4295
  decode(e) {
4268
- if (e == null || e.type === sr) return null;
4269
- if (e.type === le) return new ir(e.data);
4296
+ if (e == null || e.type === ar) return null;
4297
+ if (e.type === ce) return new or(e.data);
4270
4298
  for (const r of this.providers) {
4271
4299
  const n = r.decode(e);
4272
4300
  if (n != null) return n;
4273
4301
  }
4274
- return new ir(e.data);
4302
+ return new or(e.data);
4275
4303
  }
4276
4304
  }
4277
- Mo("synnax-error-registry", () => new Uo());
4278
- class ir extends mn("unknown") {
4305
+ Uo("synnax-error-registry", () => new Co());
4306
+ class or extends wn("unknown") {
4279
4307
  }
4280
4308
  a.object({ type: a.string(), data: a.string() });
4281
- const qu = () => new Promise((t) => setTimeout(t, 0)), Bo = O.object({
4309
+ const Zu = () => new Promise((t) => setTimeout(t, 0)), Ro = O.object({
4282
4310
  jsonrpc: O.literal("2.0"),
4283
4311
  method: O.string(),
4284
4312
  // params should be z.union([z.record(z.string(), z.json()),
@@ -4286,12 +4314,12 @@ const qu = () => new Promise((t) => setTimeout(t, 0)), Bo = O.object({
4286
4314
  // definition of params then in the JSON-RPC spec.
4287
4315
  params: O.any().optional(),
4288
4316
  id: O.union([O.string(), O.number(), O.null()]).optional()
4289
- }), yn = O.object({
4317
+ }), $n = O.object({
4290
4318
  jsonrpc: O.literal("2.0"),
4291
4319
  id: O.union([O.string(), O.number(), O.null()])
4292
- }), jo = yn.extend({
4320
+ }), Lo = $n.extend({
4293
4321
  result: O.json()
4294
- }), Co = yn.extend({
4322
+ }), Do = $n.extend({
4295
4323
  error: O.object({
4296
4324
  code: O.number().int(),
4297
4325
  // This should be z.string(), but the VSCode JSON RPC implementation uses a looser
@@ -4299,35 +4327,35 @@ const qu = () => new Promise((t) => setTimeout(t, 0)), Bo = O.object({
4299
4327
  message: O.string().optional(),
4300
4328
  data: O.json().optional()
4301
4329
  })
4302
- }), Ro = O.union([jo, Co]);
4303
- O.union([Bo, Ro]);
4304
- const Lo = O.uuid(), Do = O.object({
4305
- key: Lo,
4330
+ }), Po = O.union([Lo, Do]);
4331
+ O.union([Ro, Po]);
4332
+ const ko = O.uuid(), qo = O.object({
4333
+ key: ko,
4306
4334
  name: O.string().min(1),
4307
4335
  color: O.string()
4308
- }), Po = (t, e, r) => {
4336
+ }), zo = (t, e, r) => {
4309
4337
  const n = t.get(e);
4310
4338
  return n === void 0 ? (t.set(e, r), r) : n;
4311
- }, zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4339
+ }, Fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4312
4340
  __proto__: null,
4313
- getOrSetDefault: Po
4314
- }, Symbol.toStringTag, { value: "Module" })), xt = a.string().regex(/^\d+\.\d+\.\d+$/), Se = ((t, e, r = {}) => {
4341
+ getOrSetDefault: zo
4342
+ }, Symbol.toStringTag, { value: "Module" })), Nt = a.string().regex(/^\d+\.\d+\.\d+$/), Se = ((t, e, r = {}) => {
4315
4343
  r.checkMajor ??= !0, r.checkMinor ??= !0, r.checkPatch ??= !0;
4316
- const n = xt.parse(t), s = xt.parse(e), [i, o, h] = n.split(".").map(Number), [f, l, d] = s.split(".").map(Number);
4344
+ const n = Nt.parse(t), s = Nt.parse(e), [i, o, l] = n.split(".").map(Number), [f, c, d] = s.split(".").map(Number);
4317
4345
  if (r.checkMajor) {
4318
4346
  if (i < f) return Ue;
4319
4347
  if (i > f) return Be;
4320
4348
  }
4321
4349
  if (r.checkMinor) {
4322
- if (o < l) return Ue;
4323
- if (o > l) return Be;
4350
+ if (o < c) return Ue;
4351
+ if (o > c) return Be;
4324
4352
  }
4325
4353
  if (r.checkPatch) {
4326
- if (h < d) return Ue;
4327
- if (h > d) return Be;
4354
+ if (l < d) return Ue;
4355
+ if (l > d) return Be;
4328
4356
  }
4329
4357
  return ae;
4330
- }), ko = (t, e, r = {}) => yr(Se(t, e, r)), bn = (t, e, r = {}) => mr(Se(t, e, r)), qo = (t, e, r = {}) => pr(Se(t, e, r)), zo = ({
4358
+ }), Zo = (t, e, r = {}) => wr(Se(t, e, r)), On = (t, e, r = {}) => br(Se(t, e, r)), Fo = (t, e, r = {}) => yr(Se(t, e, r)), Yo = ({
4331
4359
  name: t,
4332
4360
  migrate: e
4333
4361
  }) => (r) => {
@@ -4337,7 +4365,7 @@ const Lo = O.uuid(), Do = O.object({
4337
4365
  } catch (n) {
4338
4366
  throw console.log(`${t} failed to migrate from ${r.version}`), console.error(n), n;
4339
4367
  }
4340
- }, Zo = ({
4368
+ }, Wo = ({
4341
4369
  name: t,
4342
4370
  migrations: e,
4343
4371
  targetSchema: r,
@@ -4346,59 +4374,59 @@ const Lo = O.uuid(), Do = O.object({
4346
4374
  }) => {
4347
4375
  const i = Object.keys(e).sort(Se).pop();
4348
4376
  if (i == null)
4349
- return (l) => {
4350
- if (l.version ??= n, l.version !== s.version)
4377
+ return (c) => {
4378
+ if (c.version ??= n, c.version !== s.version)
4351
4379
  return console.log(
4352
- `${t} version ${l.version} is newer than latest version of ${s.version}.
4380
+ `${t} version ${c.version} is newer than latest version of ${s.version}.
4353
4381
  Returning default instead.
4354
4382
  `
4355
4383
  ), s;
4356
4384
  try {
4357
- return r != null ? r.parse(l) : l;
4385
+ return r != null ? r.parse(c) : c;
4358
4386
  } catch (d) {
4359
4387
  return console.log(`${t} failed to parse default. Exiting with default`), console.error(d), s;
4360
4388
  }
4361
4389
  };
4362
4390
  const o = Object.keys(e).length;
4363
- let h = !1;
4364
- const f = (l) => {
4391
+ let l = !1;
4392
+ const f = (c) => {
4365
4393
  try {
4366
- if (o === 0 || bn(l.version, i))
4367
- return console.log(h ? `${t} ${l.version} now up to date` : `${t} version ${l.version} is up to date with target version ${s.version}`), l;
4368
- const d = l.version, m = e[d], p = m(l);
4369
- return h = !0, f(p);
4394
+ if (o === 0 || On(c.version, i))
4395
+ return console.log(l ? `${t} ${c.version} now up to date` : `${t} version ${c.version} is up to date with target version ${s.version}`), c;
4396
+ const d = c.version, m = e[d], p = m(c);
4397
+ return l = !0, f(p);
4370
4398
  } catch (d) {
4371
4399
  return console.log(
4372
- `${t} failed to migrate from ${l.version} to ${i}`
4400
+ `${t} failed to migrate from ${c.version} to ${i}`
4373
4401
  ), console.error(d), s;
4374
4402
  }
4375
4403
  };
4376
- return (l) => {
4404
+ return (c) => {
4377
4405
  try {
4378
- if (l.version == null)
4406
+ if (c.version == null)
4379
4407
  if (n != null)
4380
4408
  console.log(
4381
4409
  `${t} version is null. Setting version to default of ${n}`
4382
- ), l.version = n;
4410
+ ), c.version = n;
4383
4411
  else
4384
4412
  return console.log(
4385
4413
  `${t} version is null and no default version set. Exiting with default`
4386
4414
  ), s;
4387
- return f(l);
4415
+ return f(c);
4388
4416
  } catch (d) {
4389
4417
  return console.log(`${t} failed to parse final result. Exiting with default`), console.error(d), s;
4390
4418
  }
4391
4419
  };
4392
- }, Zu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4420
+ }, Yu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4393
4421
  __proto__: null,
4394
4422
  compareSemVer: Se,
4395
- createMigration: zo,
4396
- migrator: Zo,
4397
- semVerNewer: bn,
4398
- semVerOlder: qo,
4399
- semVerZ: xt,
4400
- versionsEqual: ko
4401
- }, Symbol.toStringTag, { value: "Module" })), wn = ["standard", "scientific", "engineering"], Fo = a.enum(wn), Yo = (t, e, r) => {
4423
+ createMigration: Yo,
4424
+ migrator: Wo,
4425
+ semVerNewer: On,
4426
+ semVerOlder: Fo,
4427
+ semVerZ: Nt,
4428
+ versionsEqual: Zo
4429
+ }, Symbol.toStringTag, { value: "Module" })), vn = ["standard", "scientific", "engineering"], Vo = a.enum(vn), Go = (t, e, r) => {
4402
4430
  if (Number.isNaN(t)) return "NaN";
4403
4431
  if (t === 1 / 0) return "∞";
4404
4432
  if (t === -1 / 0) return "-∞";
@@ -4407,32 +4435,32 @@ const Lo = O.uuid(), Do = O.object({
4407
4435
  return e === 0 ? "0ᴇ0" : `0.${"0".repeat(e)}ᴇ0`;
4408
4436
  let n;
4409
4437
  return r === "scientific" ? n = Math.floor(Math.log10(Math.abs(t))) : n = Math.floor(Math.log10(Math.abs(t)) / 3) * 3, `${(t / 10 ** n).toFixed(e)}ᴇ${n}`;
4410
- }, Fu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4438
+ }, Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4411
4439
  __proto__: null,
4412
- NOTATIONS: wn,
4413
- notationZ: Fo,
4414
- stringifyNumber: Yo
4415
- }, Symbol.toStringTag, { value: "Module" })), Yu = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, $n = a.enum([
4440
+ NOTATIONS: vn,
4441
+ notationZ: Vo,
4442
+ stringifyNumber: Go
4443
+ }, Symbol.toStringTag, { value: "Module" })), Vu = (t) => Array.isArray(t) ? [...t] : typeof t == "object" && t !== null ? { ...t } : t, Tn = a.enum([
4416
4444
  "success",
4417
4445
  "info",
4418
4446
  "warning",
4419
4447
  "error",
4420
4448
  "loading",
4421
4449
  "disabled"
4422
- ]), Wo = (t) => a.object({
4450
+ ]), Ho = (t) => a.object({
4423
4451
  key: a.string(),
4424
4452
  name: a.string().default(""),
4425
- variant: $n,
4453
+ variant: Tn,
4426
4454
  message: a.string(),
4427
4455
  description: a.string().optional(),
4428
4456
  time: $.z,
4429
- labels: or(Do).optional(),
4457
+ labels: lr(qo).optional(),
4430
4458
  details: t ?? a.unknown().optional()
4431
- }), Vo = a.object({
4459
+ }), Xo = a.object({
4432
4460
  stack: a.string()
4433
- }), Go = (t, e) => {
4461
+ }), Jo = (t, e) => {
4434
4462
  if (!(t instanceof Error)) throw t;
4435
- return On({
4463
+ return xn({
4436
4464
  variant: "error",
4437
4465
  message: e ?? t.message,
4438
4466
  description: e != null ? t.message : void 0,
@@ -4440,37 +4468,37 @@ const Lo = O.uuid(), Do = O.object({
4440
4468
  stack: t.stack ?? ""
4441
4469
  }
4442
4470
  });
4443
- }, On = (t) => ({
4444
- key: Vt(),
4471
+ }, xn = (t) => ({
4472
+ key: Ht(),
4445
4473
  time: $.now(),
4446
4474
  name: "",
4447
4475
  ...t
4448
- }), Ho = (t, e = []) => {
4476
+ }), Ko = (t, e = []) => {
4449
4477
  if (t != null)
4450
4478
  return Array.isArray(e) ? e.includes(t) ? t : void 0 : e === t ? t : void 0;
4451
- }, Xo = (t, e = []) => {
4479
+ }, Qo = (t, e = []) => {
4452
4480
  if (t != null)
4453
4481
  return Array.isArray(e) ? e.includes(t) ? void 0 : t : e === t ? void 0 : t;
4454
- }, Wu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4482
+ }, Gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4455
4483
  __proto__: null,
4456
- create: On,
4457
- exceptionDetailsSchema: Vo,
4458
- fromException: Go,
4459
- keepVariants: Ho,
4460
- removeVariants: Xo,
4461
- statusZ: Wo,
4462
- variantZ: $n
4463
- }, Symbol.toStringTag, { value: "Module" })), Jo = (t, e = "") => {
4484
+ create: xn,
4485
+ exceptionDetailsSchema: Xo,
4486
+ fromException: Jo,
4487
+ keepVariants: Ko,
4488
+ removeVariants: Qo,
4489
+ statusZ: Ho,
4490
+ variantZ: Tn
4491
+ }, Symbol.toStringTag, { value: "Module" })), _o = (t, e = "") => {
4464
4492
  if (typeof t == "string") return t;
4465
4493
  const r = t.length;
4466
4494
  return r === 0 ? e : r === 1 ? t[0] : r === 2 ? `${t[0]} and ${t[1]}` : `${t.slice(0, -1).join(", ")}, and ${t[r - 1]}`;
4467
- }, Ko = (t) => {
4495
+ }, eu = (t) => {
4468
4496
  const e = t.split(" "), r = /* @__PURE__ */ new Set(), n = e.map((o) => o.charAt(0).toLowerCase()).join("");
4469
4497
  r.add(n.replace(/-/g, "_")), r.add(n.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_"));
4470
4498
  const s = /\d+/g;
4471
- t.match(s) && e.forEach((o, h) => {
4499
+ t.match(s) && e.forEach((o, l) => {
4472
4500
  if (s.test(o)) {
4473
- const f = e.map((l, d) => d !== h ? l.charAt(0).toLowerCase() : l).join("");
4501
+ const f = e.map((c, d) => d !== l ? c.charAt(0).toLowerCase() : c).join("");
4474
4502
  r.add(f.replace(/-/g, "_")), r.add(
4475
4503
  f.replace(/(.)(.)/g, "$1_$2").replace(/-/g, "_")
4476
4504
  );
@@ -4482,54 +4510,54 @@ const Lo = O.uuid(), Do = O.object({
4482
4510
  return r.add(i.join("").replace(/-/g, "_")), r.add(i.join("_").replace(/-/g, "_")), Array.from(r).filter(
4483
4511
  (o) => o.length >= 2 && o.length <= 12 && !/^\d/.test(o)
4484
4512
  );
4485
- }, Qo = (t, e) => t.startsWith(e) ? t.slice(e.length) : t, _o = (t) => t.length === 0 ? t : t[t.length - 1] === "y" ? `${t.slice(0, -1)}ies` : t[t.length - 1] === "s" || t[t.length - 1] === "x" || t[t.length - 1] === "z" || t.endsWith("ch") || t.endsWith("sh") ? `${t}es` : `${t}s`, Vu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4513
+ }, tu = (t, e) => t.startsWith(e) ? t.slice(e.length) : t, ru = (t) => t.length === 0 ? t : t[t.length - 1] === "y" ? `${t.slice(0, -1)}ies` : t[t.length - 1] === "s" || t[t.length - 1] === "x" || t[t.length - 1] === "z" || t.endsWith("ch") || t.endsWith("sh") ? `${t}es` : `${t}s`, Hu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4486
4514
  __proto__: null,
4487
- createShortIdentifiers: Ko,
4488
- naturalLanguageJoin: Jo,
4489
- pluralName: _o,
4490
- trimPrefix: Qo
4491
- }, Symbol.toStringTag, { value: "Module" })), eu = new Error("request for lock canceled");
4492
- var tu = function(t, e, r, n) {
4515
+ createShortIdentifiers: eu,
4516
+ naturalLanguageJoin: _o,
4517
+ pluralName: ru,
4518
+ trimPrefix: tu
4519
+ }, Symbol.toStringTag, { value: "Module" })), nu = new Error("request for lock canceled");
4520
+ var su = function(t, e, r, n) {
4493
4521
  function s(i) {
4494
4522
  return i instanceof r ? i : new r(function(o) {
4495
4523
  o(i);
4496
4524
  });
4497
4525
  }
4498
4526
  return new (r || (r = Promise))(function(i, o) {
4499
- function h(d) {
4527
+ function l(d) {
4500
4528
  try {
4501
- l(n.next(d));
4529
+ c(n.next(d));
4502
4530
  } catch (m) {
4503
4531
  o(m);
4504
4532
  }
4505
4533
  }
4506
4534
  function f(d) {
4507
4535
  try {
4508
- l(n.throw(d));
4536
+ c(n.throw(d));
4509
4537
  } catch (m) {
4510
4538
  o(m);
4511
4539
  }
4512
4540
  }
4513
- function l(d) {
4514
- d.done ? i(d.value) : s(d.value).then(h, f);
4541
+ function c(d) {
4542
+ d.done ? i(d.value) : s(d.value).then(l, f);
4515
4543
  }
4516
- l((n = n.apply(t, e || [])).next());
4544
+ c((n = n.apply(t, e || [])).next());
4517
4545
  });
4518
4546
  };
4519
- class ru {
4520
- constructor(e, r = eu) {
4547
+ class iu {
4548
+ constructor(e, r = nu) {
4521
4549
  this._value = e, this._cancelError = r, this._queue = [], this._weightedWaiters = [];
4522
4550
  }
4523
4551
  acquire(e = 1, r = 0) {
4524
4552
  if (e <= 0)
4525
4553
  throw new Error(`invalid weight ${e}: must be positive`);
4526
4554
  return new Promise((n, s) => {
4527
- const i = { resolve: n, reject: s, weight: e, priority: r }, o = vn(this._queue, (h) => r <= h.priority);
4555
+ const i = { resolve: n, reject: s, weight: e, priority: r }, o = Sn(this._queue, (l) => r <= l.priority);
4528
4556
  o === -1 && e <= this._value ? this._dispatchItem(i) : this._queue.splice(o + 1, 0, i);
4529
4557
  });
4530
4558
  }
4531
4559
  runExclusive(e) {
4532
- return tu(this, arguments, void 0, function* (r, n = 1, s = 0) {
4560
+ return su(this, arguments, void 0, function* (r, n = 1, s = 0) {
4533
4561
  const [i, o] = yield this.acquire(n, s);
4534
4562
  try {
4535
4563
  return yield r(i);
@@ -4542,7 +4570,7 @@ class ru {
4542
4570
  if (e <= 0)
4543
4571
  throw new Error(`invalid weight ${e}: must be positive`);
4544
4572
  return this._couldLockImmediately(e, r) ? Promise.resolve() : new Promise((n) => {
4545
- this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), nu(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4573
+ this._weightedWaiters[e - 1] || (this._weightedWaiters[e - 1] = []), au(this._weightedWaiters[e - 1], { resolve: n, priority: r });
4546
4574
  });
4547
4575
  }
4548
4576
  isLocked() {
@@ -4597,49 +4625,49 @@ class ru {
4597
4625
  return (this._queue.length === 0 || this._queue[0].priority < r) && e <= this._value;
4598
4626
  }
4599
4627
  }
4600
- function nu(t, e) {
4601
- const r = vn(t, (n) => e.priority <= n.priority);
4628
+ function au(t, e) {
4629
+ const r = Sn(t, (n) => e.priority <= n.priority);
4602
4630
  t.splice(r + 1, 0, e);
4603
4631
  }
4604
- function vn(t, e) {
4632
+ function Sn(t, e) {
4605
4633
  for (let r = t.length - 1; r >= 0; r--)
4606
4634
  if (e(t[r]))
4607
4635
  return r;
4608
4636
  return -1;
4609
4637
  }
4610
- var su = function(t, e, r, n) {
4638
+ var ou = function(t, e, r, n) {
4611
4639
  function s(i) {
4612
4640
  return i instanceof r ? i : new r(function(o) {
4613
4641
  o(i);
4614
4642
  });
4615
4643
  }
4616
4644
  return new (r || (r = Promise))(function(i, o) {
4617
- function h(d) {
4645
+ function l(d) {
4618
4646
  try {
4619
- l(n.next(d));
4647
+ c(n.next(d));
4620
4648
  } catch (m) {
4621
4649
  o(m);
4622
4650
  }
4623
4651
  }
4624
4652
  function f(d) {
4625
4653
  try {
4626
- l(n.throw(d));
4654
+ c(n.throw(d));
4627
4655
  } catch (m) {
4628
4656
  o(m);
4629
4657
  }
4630
4658
  }
4631
- function l(d) {
4632
- d.done ? i(d.value) : s(d.value).then(h, f);
4659
+ function c(d) {
4660
+ d.done ? i(d.value) : s(d.value).then(l, f);
4633
4661
  }
4634
- l((n = n.apply(t, e || [])).next());
4662
+ c((n = n.apply(t, e || [])).next());
4635
4663
  });
4636
4664
  };
4637
- class iu {
4665
+ class uu {
4638
4666
  constructor(e) {
4639
- this._semaphore = new ru(1, e);
4667
+ this._semaphore = new iu(1, e);
4640
4668
  }
4641
4669
  acquire() {
4642
- return su(this, arguments, void 0, function* (e = 0) {
4670
+ return ou(this, arguments, void 0, function* (e = 0) {
4643
4671
  const [, r] = yield this._semaphore.acquire(1, e);
4644
4672
  return r;
4645
4673
  });
@@ -4660,34 +4688,34 @@ class iu {
4660
4688
  return this._semaphore.cancel();
4661
4689
  }
4662
4690
  }
4663
- class Tn extends iu {
4691
+ class Nn extends uu {
4664
4692
  constructor(e) {
4665
4693
  super(), Object.assign(this, e);
4666
4694
  }
4667
4695
  }
4668
- const au = (t) => new Tn(t), Gu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4696
+ const lu = (t) => new Nn(t), Xu = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
4669
4697
  __proto__: null,
4670
- mutex: Tn,
4671
- newMutex: au
4698
+ mutex: Nn,
4699
+ newMutex: lu
4672
4700
  }, Symbol.toStringTag, { value: "Module" }));
4673
- function xn(t) {
4701
+ function In(t) {
4674
4702
  var e, r, n = "";
4675
4703
  if (typeof t == "string" || typeof t == "number") n += t;
4676
4704
  else if (typeof t == "object") if (Array.isArray(t)) {
4677
4705
  var s = t.length;
4678
- for (e = 0; e < s; e++) t[e] && (r = xn(t[e])) && (n && (n += " "), n += r);
4706
+ for (e = 0; e < s; e++) t[e] && (r = In(t[e])) && (n && (n += " "), n += r);
4679
4707
  } else for (r in t) t[r] && (n && (n += " "), n += r);
4680
4708
  return n;
4681
4709
  }
4682
- function ou() {
4683
- for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = xn(t)) && (n && (n += " "), n += e);
4710
+ function cu() {
4711
+ for (var t, e, r = 0, n = "", s = arguments.length; r < s; r++) (t = arguments[r]) && (e = In(t)) && (n && (n += " "), n += e);
4684
4712
  return n;
4685
4713
  }
4686
- const uu = ou, ne = "-", ar = "__", Ee = "--", lu = (t) => {
4687
- const e = (...r) => uu(...r);
4688
- return e.B = (...r) => t + ne + r.join(ne), e.E = (r) => t + ar + r, e.M = (...r) => t + Ee + r.join("-"), e.BM = (r, ...n) => e.B(r) + Ee + n.join("-"), e.BE = (r, ...n) => e.B(r) + ar + n.join(ne), e.BEM = (r, n, ...s) => e.BE(r, n) + Ee + s.join(ne), e.var = (...r) => Ee + t + ne + r.join(ne), e;
4714
+ const hu = cu, ne = "-", ur = "__", Ee = "--", fu = (t) => {
4715
+ const e = (...r) => hu(...r);
4716
+ return e.B = (...r) => t + ne + r.join(ne), e.E = (r) => t + ur + r, e.M = (...r) => t + Ee + r.join("-"), e.BM = (r, ...n) => e.B(r) + Ee + n.join("-"), e.BE = (r, ...n) => e.B(r) + ur + n.join(ne), e.BEM = (r, n, ...s) => e.BE(r, n) + Ee + s.join(ne), e.var = (...r) => Ee + t + ne + r.join(ne), e;
4689
4717
  };
4690
- class cu {
4718
+ class du {
4691
4719
  rows = [];
4692
4720
  columns = [];
4693
4721
  prefix;
@@ -4716,57 +4744,57 @@ class cu {
4716
4744
  };
4717
4745
  }
4718
4746
  }
4719
- const hu = (t, e) => Object.entries(e).forEach(
4747
+ const gu = (t, e) => Object.entries(e).forEach(
4720
4748
  ([r, n]) => n != null && t.style.setProperty(r, `${n}`)
4721
- ), fu = (t, e) => Array.from(t.style).forEach((r) => {
4749
+ ), pu = (t, e) => Array.from(t.style).forEach((r) => {
4722
4750
  r.startsWith(e) && t.style.removeProperty(r);
4723
- }), du = (t) => {
4724
- const e = lu(t);
4725
- return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", ks.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", xs.construct(r)), e.sharp = (r) => r !== !1 && e.M("sharp"), e.rounded = (r) => r !== !1 && e.M("rounded"), e.bordered = (r) => typeof r == "boolean" ? r && e.M("bordered") : r != null ? e.M(`bordered-${r.toString()}`) : e.M("bordered"), e.selected = (r) => r && e.M("selected"), e.altColor = (r) => r && e.M("alt-color"), e.editable = (r) => r && e.M("editable"), e.noSelect = e.M("no-select"), e.applyVars = hu, e.removeVars = fu, e.newGridBuilder = (r) => new cu(r), e.dropRegion = (r) => r && e.B("haul-drop-region"), e.px = (r) => `${r}px`, e.inheritDims = (r = !0) => r && e.M("inherit-dims"), e.shade = ((r) => r != null && e.M(`shade-${r}`)), e.colorVar = (r) => {
4751
+ }), mu = (t) => {
4752
+ const e = fu(t);
4753
+ return e.visible = (r) => e.M(r ? "visible" : "hidden"), e.expanded = (r) => e.M(r ? "expanded" : "collapsed"), e.loc = (r) => e.M("location", Zs.construct(r)), e.disabled = (r) => r === !0 && e.M("disabled"), e.align = (r) => e.M(r), e.dir = (r) => r != null && e.M("direction", Is.construct(r)), e.sharp = (r) => r !== !1 && e.M("sharp"), e.rounded = (r) => r !== !1 && e.M("rounded"), e.bordered = (r) => typeof r == "boolean" ? r && e.M("bordered") : r != null ? e.M(`bordered-${r.toString()}`) : e.M("bordered"), e.selected = (r) => r && e.M("selected"), e.altColor = (r) => r && e.M("alt-color"), e.editable = (r) => r && e.M("editable"), e.noSelect = e.M("no-select"), e.applyVars = gu, e.removeVars = pu, e.newGridBuilder = (r) => new du(r), e.dropRegion = (r) => r && e.B("haul-drop-region"), e.px = (r) => `${r}px`, e.inheritDims = (r = !0) => r && e.M("inherit-dims"), e.shade = ((r) => r != null && e.M(`shade-${r}`)), e.colorVar = (r) => {
4726
4754
  if (!(r == null || r === !1))
4727
- return typeof r == "number" ? `var(--${t}-gray-l${r})` : To.cssString(r);
4755
+ return typeof r == "number" ? `var(--${t}-gray-l${r})` : No.cssString(r);
4728
4756
  }, e.levelSizeVar = (r) => `var(--${t}-${r}-size)`, e.level = (r) => e.M(`level-${r}`), e;
4729
- }, Hu = du("pluto");
4757
+ }, Ju = mu("pluto");
4730
4758
  export {
4731
- ku as A,
4759
+ qu as A,
4732
4760
  Yu as B,
4733
- Hu as C,
4734
- Iu as D,
4735
- Vu as F,
4736
- vu as H,
4737
- ks as K,
4738
- Pu as N,
4739
- ju as O,
4740
- Tu as Q,
4741
- Li as R,
4742
- Du as S,
4743
- mu as U,
4744
- Wu as V,
4745
- Zu as W,
4761
+ Ju as C,
4762
+ Eu as D,
4763
+ Wu as F,
4764
+ Hu as G,
4765
+ Vu as H,
4766
+ Xu as J,
4767
+ Zs as K,
4768
+ Lu as O,
4769
+ Nu as Q,
4770
+ No as R,
4771
+ ku as S,
4772
+ Zu as U,
4746
4773
  Gu as X,
4747
- Su as _,
4748
- pu as a,
4749
- Nu as b,
4750
- bu as c,
4751
- c as d,
4752
- $u as e,
4753
- S as f,
4754
- Mu as g,
4755
- Ze as h,
4756
- Ou as i,
4757
- xu as j,
4758
- To as k,
4759
- qu as l,
4774
+ zu as Z,
4775
+ Mu as _,
4776
+ bu as a,
4777
+ Au as b,
4778
+ Ou as c,
4779
+ Su as d,
4780
+ h as e,
4781
+ Tu as f,
4782
+ S as g,
4783
+ Uu as h,
4784
+ Ze as i,
4785
+ Iu as j,
4786
+ xu as k,
4787
+ ki as l,
4760
4788
  Q as m,
4761
- lu as n,
4762
- ou as o,
4763
- xs as p,
4764
- Lu as q,
4789
+ fu as n,
4790
+ cu as o,
4791
+ Is as p,
4792
+ Pu as q,
4765
4793
  $ as r,
4766
- zu as s,
4767
- Au as t,
4768
- M as u,
4794
+ wu as s,
4795
+ Fu as t,
4796
+ Bu as u,
4769
4797
  st as v,
4770
- Jr as x,
4771
- Fu as z
4798
+ M as w,
4799
+ Qr as x
4772
4800
  };