@synnaxlabs/x 0.42.3 → 0.43.0

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 (296) hide show
  1. package/.turbo/turbo-build.log +93 -105
  2. package/.vscode/settings.json +4 -6
  3. package/README.md +1 -7
  4. package/dist/array.cjs +1 -0
  5. package/dist/array.js +7 -0
  6. package/dist/base-B5lQIJKc.js +38 -0
  7. package/dist/base-CTq-lhpU.cjs +1 -0
  8. package/dist/binary.cjs +1 -1
  9. package/dist/binary.js +1 -1
  10. package/dist/bounds.cjs +1 -1
  11. package/dist/bounds.js +2 -2
  12. package/dist/box.cjs +1 -1
  13. package/dist/box.js +1 -1
  14. package/dist/caseconv.cjs +1 -1
  15. package/dist/caseconv.js +2 -2
  16. package/dist/change.cjs +1 -1
  17. package/dist/change.js +10 -2
  18. package/dist/compare.cjs +1 -1
  19. package/dist/compare.js +1 -1
  20. package/dist/deep.cjs +1 -1
  21. package/dist/deep.js +92 -79
  22. package/dist/dimensions.cjs +1 -1
  23. package/dist/dimensions.js +41 -2
  24. package/dist/direction.cjs +1 -1
  25. package/dist/direction.js +1 -1
  26. package/dist/index-4GlOgZuh.js +99 -0
  27. package/dist/{direction-C-b6XTeU.cjs → index-B58dnYRu.cjs} +1 -1
  28. package/dist/index-BMGaoK93.cjs +1 -0
  29. package/dist/index-BTet04Hd.cjs +6 -0
  30. package/dist/{scale-DfJe9755.js → index-BUa-NXAX.js} +46 -46
  31. package/dist/{xy-D_LqxaGt.js → index-C-qYOegc.js} +62 -62
  32. package/dist/index-C07SBJhr.js +128 -0
  33. package/dist/{bounds-Bn5_l4Z3.js → index-C9EdKeu1.js} +77 -76
  34. package/dist/index-CM8ZDZ6s.cjs +1 -0
  35. package/dist/index-CV2JaHfw.cjs +1 -0
  36. package/dist/index-CeBvOwG8.cjs +3 -0
  37. package/dist/index-ClrGyGDp.js +205 -0
  38. package/dist/index-CqQXXeCI.cjs +1 -0
  39. package/dist/{location-C3aeu046.js → index-D6V-8SKw.js} +26 -26
  40. package/dist/index-DBGAIs_7.js +2492 -0
  41. package/dist/index-DEdq2tza.cjs +1 -0
  42. package/dist/index-DKMnHBGR.cjs +1 -0
  43. package/dist/index-Dql5FMcH.js +47 -0
  44. package/dist/{direction-BL0PhD1k.js → index-DxU1zwsd.js} +1 -1
  45. package/dist/index-WwMnwoLy.cjs +1 -0
  46. package/dist/index.cjs +5 -3
  47. package/dist/index.js +5372 -650
  48. package/dist/kv.cjs +1 -1
  49. package/dist/kv.js +45 -2
  50. package/dist/location.cjs +1 -1
  51. package/dist/location.js +1 -1
  52. package/dist/position.cjs +1 -1
  53. package/dist/position.js +83 -2
  54. package/dist/record.cjs +1 -1
  55. package/dist/record.js +8 -10
  56. package/dist/runtime.cjs +1 -1
  57. package/dist/runtime.js +27 -2
  58. package/dist/scale.cjs +1 -1
  59. package/dist/scale.js +1 -1
  60. package/dist/schemas-55Usj0Fg.js +3998 -0
  61. package/dist/schemas-DbXuI2Qr.cjs +27 -0
  62. package/dist/spatial.cjs +1 -1
  63. package/dist/spatial.js +25 -18
  64. package/dist/src/array/index.d.ts +2 -0
  65. package/dist/src/array/index.d.ts.map +1 -0
  66. package/dist/src/array/toArray.d.ts +19 -0
  67. package/dist/src/array/toArray.d.ts.map +1 -0
  68. package/dist/src/array/toArray.spec.d.ts +2 -0
  69. package/dist/src/array/toArray.spec.d.ts.map +1 -0
  70. package/dist/src/binary/codec.d.ts +8 -16
  71. package/dist/src/binary/codec.d.ts.map +1 -1
  72. package/dist/src/breaker/breaker.d.ts +6 -6
  73. package/dist/src/breaker/breaker.d.ts.map +1 -1
  74. package/dist/src/caseconv/caseconv.d.ts +1 -1
  75. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  76. package/dist/src/change/change.d.ts +3 -3
  77. package/dist/src/change/change.d.ts.map +1 -1
  78. package/dist/src/color/color.d.ts +61 -37
  79. package/dist/src/color/color.d.ts.map +1 -1
  80. package/dist/src/color/external.d.ts +0 -1
  81. package/dist/src/color/external.d.ts.map +1 -1
  82. package/dist/src/color/gradient.d.ts +7 -7
  83. package/dist/src/color/gradient.d.ts.map +1 -1
  84. package/dist/src/color/palette.d.ts +10 -10
  85. package/dist/src/color/palette.d.ts.map +1 -1
  86. package/dist/src/compare/compare.d.ts +4 -4
  87. package/dist/src/compare/compare.d.ts.map +1 -1
  88. package/dist/src/control/control.d.ts +32 -32
  89. package/dist/src/control/control.d.ts.map +1 -1
  90. package/dist/src/debounce/debounce.d.ts +1 -1
  91. package/dist/src/debounce/debounce.d.ts.map +1 -1
  92. package/dist/src/deep/delete.d.ts +1 -1
  93. package/dist/src/deep/delete.d.ts.map +1 -1
  94. package/dist/src/deep/difference.d.ts.map +1 -1
  95. package/dist/src/deep/equal.d.ts +4 -4
  96. package/dist/src/deep/equal.d.ts.map +1 -1
  97. package/dist/src/deep/merge.d.ts +1 -1
  98. package/dist/src/deep/merge.d.ts.map +1 -1
  99. package/dist/src/errors/errors.d.ts +62 -36
  100. package/dist/src/errors/errors.d.ts.map +1 -1
  101. package/dist/src/index.d.ts +4 -1
  102. package/dist/src/index.d.ts.map +1 -1
  103. package/dist/src/instance/index.d.ts +2 -0
  104. package/dist/src/instance/index.d.ts.map +1 -0
  105. package/dist/src/instance/matcher.d.ts +79 -0
  106. package/dist/src/instance/matcher.d.ts.map +1 -0
  107. package/dist/src/instance/matcher.spec.d.ts +2 -0
  108. package/dist/src/instance/matcher.spec.d.ts.map +1 -0
  109. package/dist/src/jsonrpc/jsonrpc.d.ts +40 -9
  110. package/dist/src/jsonrpc/jsonrpc.d.ts.map +1 -1
  111. package/dist/src/kv/types.d.ts +2 -2
  112. package/dist/src/kv/types.d.ts.map +1 -1
  113. package/dist/src/migrate/migrate.d.ts +5 -5
  114. package/dist/src/migrate/migrate.d.ts.map +1 -1
  115. package/dist/src/notation/notation.d.ts +1 -1
  116. package/dist/src/notation/notation.d.ts.map +1 -1
  117. package/dist/src/primitive/index.d.ts +2 -0
  118. package/dist/src/primitive/index.d.ts.map +1 -0
  119. package/dist/src/primitive/primitive.d.ts +39 -0
  120. package/dist/src/primitive/primitive.d.ts.map +1 -0
  121. package/dist/src/primitive/primitive.spec.d.ts +2 -0
  122. package/dist/src/primitive/primitive.spec.d.ts.map +1 -0
  123. package/dist/src/record.d.ts +2 -2
  124. package/dist/src/record.d.ts.map +1 -1
  125. package/dist/src/renderable.d.ts +1 -1
  126. package/dist/src/renderable.d.ts.map +1 -1
  127. package/dist/src/replace.d.ts.map +1 -1
  128. package/dist/src/runtime/detect.d.ts.map +1 -1
  129. package/dist/src/runtime/os.d.ts +1 -1
  130. package/dist/src/runtime/os.d.ts.map +1 -1
  131. package/dist/src/spatial/base.d.ts +10 -10
  132. package/dist/src/spatial/base.d.ts.map +1 -1
  133. package/dist/src/spatial/bounds/bounds.d.ts +82 -16
  134. package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
  135. package/dist/src/spatial/box/box.d.ts +7 -7
  136. package/dist/src/spatial/box/box.d.ts.map +1 -1
  137. package/dist/src/spatial/dimensions/dimensions.d.ts +5 -5
  138. package/dist/src/spatial/dimensions/dimensions.d.ts.map +1 -1
  139. package/dist/src/spatial/direction/direction.d.ts +1 -1
  140. package/dist/src/spatial/location/location.d.ts +4 -4
  141. package/dist/src/spatial/location/location.d.ts.map +1 -1
  142. package/dist/src/spatial/scale/scale.d.ts +11 -11
  143. package/dist/src/spatial/scale/scale.d.ts.map +1 -1
  144. package/dist/src/spatial/xy/xy.d.ts +5 -5
  145. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  146. package/dist/src/status/index.d.ts +2 -0
  147. package/dist/src/status/index.d.ts.map +1 -0
  148. package/dist/src/status/types.d.ts +11 -0
  149. package/dist/src/status/types.d.ts.map +1 -0
  150. package/dist/src/sync/index.d.ts.map +1 -1
  151. package/dist/src/sync/mutex.d.ts +0 -1
  152. package/dist/src/sync/mutex.d.ts.map +1 -1
  153. package/dist/src/telem/gl.d.ts +1 -1
  154. package/dist/src/telem/gl.d.ts.map +1 -1
  155. package/dist/src/telem/series.d.ts +468 -62
  156. package/dist/src/telem/series.d.ts.map +1 -1
  157. package/dist/src/telem/telem.d.ts +243 -53
  158. package/dist/src/telem/telem.d.ts.map +1 -1
  159. package/dist/src/uuid/index.d.ts +2 -0
  160. package/dist/src/uuid/index.d.ts.map +1 -0
  161. package/dist/src/uuid/uuid.d.ts +35 -0
  162. package/dist/src/uuid/uuid.d.ts.map +1 -0
  163. package/dist/src/uuid/uuid.spec.d.ts +2 -0
  164. package/dist/src/uuid/uuid.spec.d.ts.map +1 -0
  165. package/dist/src/zod/external.d.ts +1 -1
  166. package/dist/src/zod/external.d.ts.map +1 -1
  167. package/dist/src/zod/nullToUndefined.d.ts +3 -0
  168. package/dist/src/zod/nullToUndefined.d.ts.map +1 -0
  169. package/dist/src/zod/nullToUndefined.spec.d.ts +2 -0
  170. package/dist/src/zod/nullToUndefined.spec.d.ts.map +1 -0
  171. package/dist/src/zod/util.d.ts +2 -2
  172. package/dist/src/zod/util.d.ts.map +1 -1
  173. package/dist/telem.cjs +1 -1
  174. package/dist/telem.js +1 -1
  175. package/dist/xy.cjs +1 -1
  176. package/dist/xy.js +1 -1
  177. package/dist/zod.cjs +1 -1
  178. package/dist/zod.js +19 -2
  179. package/eslint.config.js +1 -1
  180. package/package.json +17 -15
  181. package/src/{toArray.ts → array/index.ts} +1 -5
  182. package/src/array/toArray.spec.ts +56 -0
  183. package/src/array/toArray.ts +28 -0
  184. package/src/binary/codec.spec.ts +201 -278
  185. package/src/binary/codec.ts +20 -76
  186. package/src/breaker/breaker.ts +3 -3
  187. package/src/caseconv/caseconv.ts +6 -4
  188. package/src/change/change.ts +2 -2
  189. package/src/color/color.spec.ts +113 -2
  190. package/src/color/color.ts +89 -59
  191. package/src/color/external.ts +0 -1
  192. package/src/color/gradient.ts +20 -28
  193. package/src/color/palette.ts +1 -1
  194. package/src/compare/compare.ts +5 -5
  195. package/src/control/control.ts +22 -19
  196. package/src/debounce/debounce.ts +1 -1
  197. package/src/deep/delete.ts +5 -4
  198. package/src/deep/difference.ts +6 -2
  199. package/src/deep/equal.spec.ts +1 -1
  200. package/src/deep/equal.ts +5 -5
  201. package/src/deep/merge.spec.ts +13 -1
  202. package/src/deep/merge.ts +16 -7
  203. package/src/deep/path.ts +1 -1
  204. package/src/errors/errors.ts +65 -44
  205. package/src/index.ts +4 -1
  206. package/src/instance/index.ts +10 -0
  207. package/src/instance/matcher.spec.ts +78 -0
  208. package/src/instance/matcher.ts +98 -0
  209. package/src/jsonrpc/jsonrpc.spec.ts +2 -1
  210. package/src/jsonrpc/jsonrpc.ts +36 -7
  211. package/src/kv/types.ts +1 -1
  212. package/src/migrate/migrate.spec.ts +1 -1
  213. package/src/migrate/migrate.ts +7 -7
  214. package/src/notation/notation.ts +1 -1
  215. package/src/primitive/index.ts +10 -0
  216. package/src/primitive/primitive.spec.ts +126 -0
  217. package/src/primitive/primitive.ts +82 -0
  218. package/src/record.ts +3 -5
  219. package/src/renderable.ts +1 -1
  220. package/src/replace.ts +9 -0
  221. package/src/runtime/detect.ts +0 -2
  222. package/src/runtime/os.ts +1 -1
  223. package/src/spatial/base.ts +1 -1
  224. package/src/spatial/bounds/bounds.spec.ts +20 -0
  225. package/src/spatial/bounds/bounds.ts +101 -18
  226. package/src/spatial/box/box.ts +1 -1
  227. package/src/spatial/dimensions/dimensions.ts +3 -3
  228. package/src/spatial/location/location.ts +1 -1
  229. package/src/spatial/scale/scale.ts +1 -1
  230. package/src/spatial/xy/xy.ts +1 -1
  231. package/src/status/index.ts +10 -0
  232. package/src/status/types.ts +22 -0
  233. package/src/sync/index.ts +9 -0
  234. package/src/sync/mutex.ts +9 -4
  235. package/src/telem/gl.ts +1 -1
  236. package/src/telem/series.spec.ts +735 -68
  237. package/src/telem/series.ts +536 -195
  238. package/src/telem/telem.spec.ts +60 -7
  239. package/src/telem/telem.ts +287 -95
  240. package/src/uuid/index.ts +10 -0
  241. package/src/uuid/uuid.spec.ts +82 -0
  242. package/src/uuid/uuid.ts +48 -0
  243. package/src/zod/external.ts +1 -1
  244. package/src/zod/nullToUndefined.spec.ts +31 -0
  245. package/src/zod/nullToUndefined.ts +23 -0
  246. package/src/zod/util.spec.ts +1 -1
  247. package/src/zod/util.ts +6 -6
  248. package/tsconfig.json +1 -1
  249. package/tsconfig.tsbuildinfo +1 -1
  250. package/vite.config.ts +1 -1
  251. package/dist/base-BAM2mqCy.cjs +0 -1
  252. package/dist/base-DFq0vvGn.js +0 -38
  253. package/dist/bounds-BQo7rvs9.cjs +0 -1
  254. package/dist/box-0YrQibkB.cjs +0 -1
  255. package/dist/box-Cc8IzcNo.js +0 -205
  256. package/dist/change-C-YELKx6.cjs +0 -1
  257. package/dist/change-DLl6DccR.js +0 -12
  258. package/dist/dimensions-CRgergMS.js +0 -43
  259. package/dist/dimensions-D2QGoNXO.cjs +0 -1
  260. package/dist/external-BPgtxa8d.js +0 -29
  261. package/dist/external-C-dNgNQw.cjs +0 -1
  262. package/dist/external-C8TFju8Q.js +0 -29
  263. package/dist/external-DWQITF5_.cjs +0 -1
  264. package/dist/external-DqPrWKvU.js +0 -47
  265. package/dist/external-uXk0Avrg.cjs +0 -1
  266. package/dist/index-BywOGO8U.js +0 -1074
  267. package/dist/index-CYYjI7Uf.cjs +0 -1
  268. package/dist/index-C_6NXBlg.cjs +0 -3
  269. package/dist/index-Dd8DLyMx.cjs +0 -1
  270. package/dist/index-DizUWH6z.js +0 -47
  271. package/dist/index-QGplUHuy.js +0 -98
  272. package/dist/location-BGl5Ddds.cjs +0 -1
  273. package/dist/position-Cai5-wi1.cjs +0 -1
  274. package/dist/position-DIglP1l2.js +0 -85
  275. package/dist/scale-BtZINJ-A.cjs +0 -1
  276. package/dist/series-B9JERcqi.js +0 -1977
  277. package/dist/series-DqJ6f97G.cjs +0 -11
  278. package/dist/spatial-BSWPzMkK.js +0 -11
  279. package/dist/spatial-DGpZ2sO3.cjs +0 -1
  280. package/dist/src/color/transformColorsToHex.d.ts +0 -6
  281. package/dist/src/color/transformColorsToHex.d.ts.map +0 -1
  282. package/dist/src/primitive.d.ts +0 -9
  283. package/dist/src/primitive.d.ts.map +0 -1
  284. package/dist/src/toArray.d.ts +0 -3
  285. package/dist/src/toArray.d.ts.map +0 -1
  286. package/dist/src/zod/integer.d.ts +0 -10
  287. package/dist/src/zod/integer.d.ts.map +0 -1
  288. package/dist/src/zod/integer.spec.d.ts +0 -2
  289. package/dist/src/zod/integer.spec.d.ts.map +0 -1
  290. package/dist/toArray.cjs +0 -1
  291. package/dist/toArray.js +0 -5
  292. package/dist/xy-B7065J2S.cjs +0 -1
  293. package/src/color/transformColorsToHex.ts +0 -30
  294. package/src/primitive.ts +0 -46
  295. package/src/zod/integer.spec.ts +0 -148
  296. package/src/zod/integer.ts +0 -38
@@ -1,22 +1,23 @@
1
- import { j as b } from "./base-DFq0vvGn.js";
2
- const c = (e) => typeof e == "bigint" || e instanceof BigInt, v = (e, r) => c(e) ? e.valueOf() - BigInt(r.valueOf().valueOf()) : e.valueOf() - Number(r.valueOf()), B = (e, r) => c(e) ? e.valueOf() + BigInt(r.valueOf().valueOf()) : e + Number(r.valueOf()), C = (e, r, n = 1e-4) => Math.abs(e - r) < n, g = (e, r) => c(e) ? e === BigInt(r.valueOf().valueOf()) : e === Number(r.valueOf()), R = (e) => {
1
+ import { b } from "./base-B5lQIJKc.js";
2
+ const c = (e) => typeof e == "bigint" || e instanceof BigInt, v = (e, r) => c(e) ? e.valueOf() - BigInt(r.valueOf().valueOf()) : e.valueOf() - Number(r.valueOf()), B = (e, r) => c(e) ? e.valueOf() + BigInt(r.valueOf().valueOf()) : e + Number(r.valueOf()), q = (e, r, n = 1e-4) => Math.abs(e - r) < n, I = (e, r) => c(e) ? e === BigInt(r.valueOf().valueOf()) : e === Number(r.valueOf()), C = (e) => {
3
3
  const r = 10 ** Math.floor(Math.log10(e));
4
4
  return Math.round(e / r) * r;
5
- }, h = (e, r) => c(e) ? e.valueOf() < BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() < Number(r.valueOf()) ? e : Number(r.valueOf()), U = (e, r) => c(e) ? e.valueOf() > BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() > Number(r.valueOf()) ? e : Number(r.valueOf()), x = (e) => c(e) || e instanceof BigInt ? e.valueOf() < 0n ? -e : e : e.valueOf() < 0 ? -e : e, V = (e, r) => c(e) ? e.valueOf() * BigInt(r.valueOf()) : e.valueOf() * Number(r.valueOf()), W = (e, r) => c(e) ? e.valueOf() / BigInt(r.valueOf()) : e.valueOf() / Number(r.valueOf()), i = (e, r) => {
6
- const n = {};
7
- if (typeof e == "number" || typeof e == "bigint")
8
- r != null ? (n.lower = e, n.upper = r) : (n.lower = typeof e == "bigint" ? 0n : 0, n.upper = e);
5
+ }, h = (e, r) => c(e) ? e.valueOf() < BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() < Number(r.valueOf()) ? e : Number(r.valueOf()), R = (e, r) => c(e) ? e.valueOf() > BigInt(r.valueOf()) ? e : BigInt(r.valueOf()) : e.valueOf() > Number(r.valueOf()) ? e : Number(r.valueOf()), y = (e) => c(e) || e instanceof BigInt ? e.valueOf() < 0n ? -e : e : e.valueOf() < 0 ? -e : e, U = (e, r) => c(e) ? e.valueOf() * BigInt(r.valueOf()) : e.valueOf() * Number(r.valueOf()), W = (e, r) => c(e) ? e.valueOf() / BigInt(r.valueOf()) : e.valueOf() / Number(r.valueOf()), i = (e, r, n) => {
6
+ const t = {};
7
+ if (typeof r == "object" && (n = r, r = void 0), n = { makeValid: !0, ...n }, typeof e == "number" || typeof e == "bigint")
8
+ r != null ? (t.lower = e, t.upper = r) : (t.lower = typeof e == "bigint" ? 0n : 0, t.upper = e);
9
9
  else if (Array.isArray(e)) {
10
10
  if (e.length !== 2) throw new Error("bounds: expected array of length 2");
11
- [n.lower, n.upper] = e;
12
- } else return O(e);
13
- return O(n);
14
- }, y = Object.freeze({ lower: 0, upper: 0 }), N = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), _ = Object.freeze({ lower: 0, upper: 1 }), M = Object.freeze({ lower: -1, upper: 1 }), A = (e, r) => {
11
+ [t.lower, t.upper] = e;
12
+ } else
13
+ t.lower = e.lower, t.upper = e.upper;
14
+ return n != null && n.makeValid ? g(t) : t;
15
+ }, x = Object.freeze({ lower: 0, upper: 0 }), N = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), _ = Object.freeze({ lower: 0, upper: 1 }), M = Object.freeze({ lower: -1, upper: 1 }), A = (e, r) => {
15
16
  if (e == null && r == null) return !0;
16
17
  if (e == null || r == null) return !1;
17
18
  const n = i(e), t = i(r);
18
19
  return (n == null ? void 0 : n.lower) === (t == null ? void 0 : t.lower) && (n == null ? void 0 : n.upper) === (t == null ? void 0 : t.upper);
19
- }, O = (e) => e.lower > e.upper ? { lower: e.upper, upper: e.lower } : e, j = (e, r) => {
20
+ }, g = (e) => e.lower > e.upper ? { lower: e.upper, upper: e.lower } : e, j = (e, r) => {
20
21
  const n = i(e);
21
22
  return r < n.lower ? n.lower : r >= n.upper ? n.upper - (typeof n.upper == "number" ? 1 : 1n) : r;
22
23
  }, a = (e, r) => {
@@ -37,23 +38,23 @@ const c = (e) => typeof e == "bigint" || e instanceof BigInt, v = (e, r) => c(e)
37
38
  }, E = (e) => {
38
39
  const r = w(e);
39
40
  return typeof r == "number" ? r === 0 : r === 0n;
40
- }, D = (e) => {
41
+ }, k = (e) => {
41
42
  const r = i(e);
42
43
  return typeof r.lower == "bigint" ? !0 : Number.isFinite(r.lower) && Number.isFinite(r.upper);
43
- }, F = (e) => {
44
+ }, D = (e) => {
44
45
  const r = i(e);
45
46
  return (r.upper + r.lower) / 2;
46
- }, L = (e) => ({
47
+ }, F = (e) => ({
47
48
  lower: Math.min(...e.map((r) => i(r).lower)),
48
49
  upper: Math.max(...e.map((r) => i(r).upper))
49
- }), T = (e) => ({
50
+ }), L = (e) => ({
50
51
  lower: Math.max(...e.map((r) => i(r).lower)),
51
52
  upper: Math.min(...e.map((r) => i(r).upper))
52
- }), Z = (e) => {
53
+ }), T = (e) => {
53
54
  const r = i(e), n = typeof r.lower == "bigint";
54
55
  return Array.from({ length: Number(w(e)) }, (t, o) => n ? r.lower + BigInt(o) : r.lower + o);
55
- }, I = (e, r) => {
56
- const n = e.map((s) => i(s)), t = n.findIndex((s) => a(s, r) || r < s.lower);
56
+ }, O = (e, r) => {
57
+ const n = e.map((l) => i(l)), t = n.findIndex((l) => a(l, r) || r < l.lower);
57
58
  if (t === -1) return { index: e.length, position: 0 };
58
59
  const o = n[t];
59
60
  return a(o, r) ? { index: t, position: Number(r - o.lower) } : { index: t, position: 0 };
@@ -62,112 +63,112 @@ const c = (e) => typeof e == "bigint" || e instanceof BigInt, v = (e, r) => c(e)
62
63
  removeAfter: 0,
63
64
  insertInto: 0,
64
65
  deleteInBetween: 0
65
- }, S = (e, r) => {
66
+ }, Z = (e, r) => {
66
67
  const n = e.map((p) => i(p)), t = i(r);
67
68
  if (n.length === 0) return d;
68
- const o = I(n, t.lower), s = I(n, t.upper);
69
+ const o = O(n, t.lower), l = O(n, t.upper);
69
70
  if (o.index === e.length) return { ...d, insertInto: e.length };
70
- if (s.index === 0) return { ...d, removeAfter: s.position };
71
- if (o.index === s.index)
72
- return o.position !== 0 && s.position !== 0 ? null : {
73
- removeAfter: s.position,
71
+ if (l.index === 0) return { ...d, removeAfter: l.position };
72
+ if (o.index === l.index)
73
+ return o.position !== 0 && l.position !== 0 ? null : {
74
+ removeAfter: l.position,
74
75
  removeBefore: o.position,
75
76
  insertInto: o.index,
76
77
  deleteInBetween: 0
77
78
  };
78
- let u = s.index - o.index, f = o.index, l = v(Number(w(n[o.index])), o.position);
79
- return o.position !== 0 ? (u -= 1, f += 1) : l = 0, {
80
- removeBefore: l,
81
- removeAfter: s.position,
79
+ let u = l.index - o.index, f = o.index, s = v(Number(w(n[o.index])), o.position);
80
+ return o.position !== 0 ? (u -= 1, f += 1) : s = 0, {
81
+ removeBefore: s,
82
+ removeAfter: l.position,
82
83
  insertInto: f,
83
84
  deleteInBetween: u
84
85
  };
85
- }, $ = (e, r, n) => {
86
+ }, S = (e, r, n) => {
86
87
  const t = e.map((f) => i(f)), o = n > 0 ? 1 : n < 0 ? -1 : 0;
87
88
  if (o === 0) return r;
88
- let s = n, u = r;
89
- for (; g(s, 0) === !1; ) {
90
- const f = t.findIndex((l) => o > 0 ? u >= l.lower && u < l.upper : u > l.lower && u <= l.upper);
89
+ let l = n, u = r;
90
+ for (; I(l, 0) === !1; ) {
91
+ const f = t.findIndex((s) => o > 0 ? u >= s.lower && u < s.upper : u > s.lower && u <= s.upper);
91
92
  if (f !== -1) {
92
- const l = t[f];
93
+ const s = t[f];
93
94
  let p;
94
- if (o > 0 ? p = v(l.upper, u) : p = v(u, l.lower), p > 0) {
95
- const m = h(x(s), p);
95
+ if (o > 0 ? p = v(s.upper, u) : p = v(u, s.lower), p > 0) {
96
+ const m = h(y(l), p);
96
97
  if (u = B(
97
98
  u,
98
99
  o > 0 ? m : -m
99
- ), s = v(s, o > 0 ? m : -m), g(s, 0)) return u;
100
+ ), l = v(l, o > 0 ? m : -m), I(l, 0)) return u;
100
101
  continue;
101
102
  }
102
103
  }
103
104
  if (o > 0) {
104
- const l = t.filter((p) => p.lower > u);
105
- if (l.length > 0) u = l[0].lower;
105
+ const s = t.filter((p) => p.lower > u);
106
+ if (s.length > 0) u = s[0].lower;
106
107
  else return u;
107
108
  } else {
108
- const l = t.filter((p) => p.upper < u);
109
- if (l.length > 0)
110
- u = l[l.length - 1].upper;
109
+ const s = t.filter((p) => p.upper < u);
110
+ if (s.length > 0)
111
+ u = s[s.length - 1].upper;
111
112
  else return u;
112
113
  }
113
114
  }
114
115
  return u;
115
- }, k = (e, r, n) => {
116
+ }, V = (e, r, n) => {
116
117
  const t = e.map((u) => i(u));
117
118
  if (r === n) return typeof r == "bigint" ? 0n : 0;
118
119
  const o = r < n ? i([r, n]) : i([n, r]);
119
- let s = typeof r == "bigint" ? 0n : 0;
120
+ let l = typeof r == "bigint" ? 0n : 0;
120
121
  for (const u of t) {
121
- const f = u.lower > o.lower ? u.lower : o.lower, l = u.upper < o.upper ? u.upper : o.upper;
122
- if (f < l) {
123
- const p = l - f;
124
- s = s + p;
122
+ const f = u.lower > o.lower ? u.lower : o.lower, s = u.upper < o.upper ? u.upper : o.upper;
123
+ if (f < s) {
124
+ const p = s - f;
125
+ l = l + p;
125
126
  }
126
127
  }
127
- return s;
128
+ return l;
128
129
  }, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
129
130
  __proto__: null,
130
131
  CLIP: M,
131
132
  DECIMAL: _,
132
133
  INFINITE: N,
133
- ZERO: y,
134
+ ZERO: x,
134
135
  bounds: b,
135
- buildInsertionPlan: S,
136
+ buildInsertionPlan: Z,
136
137
  clamp: j,
137
138
  construct: i,
138
139
  contains: a,
139
- distance: k,
140
+ distance: V,
140
141
  equals: A,
141
- findInsertPosition: I,
142
- isFinite: D,
142
+ findInsertPosition: O,
143
+ isFinite: k,
143
144
  isZero: z,
144
- linspace: Z,
145
- makeValid: O,
146
- max: L,
147
- mean: F,
148
- min: T,
145
+ linspace: T,
146
+ makeValid: g,
147
+ max: F,
148
+ mean: D,
149
+ min: L,
149
150
  overlapsWith: P,
150
151
  span: w,
151
152
  spanIsZero: E,
152
- traverse: $
153
+ traverse: S
153
154
  }, Symbol.toStringTag, { value: "Module" }));
154
155
  export {
155
- j as a,
156
- G as b,
157
- i as c,
158
- a as d,
159
- L as e,
160
- k as f,
161
- x as g,
162
- B as h,
163
- C as i,
164
- W as j,
165
- g as k,
166
- U as l,
167
- V as m,
168
- h as n,
169
- v as o,
170
- R as r,
156
+ y as a,
157
+ B as b,
158
+ q as c,
159
+ W as d,
160
+ I as e,
161
+ h as f,
162
+ U as g,
163
+ v as h,
164
+ G as i,
165
+ i as j,
166
+ j as k,
167
+ a as l,
168
+ R as m,
169
+ F as n,
170
+ V as o,
171
+ C as r,
171
172
  w as s,
172
- $ as t
173
+ S as t
173
174
  };
@@ -0,0 +1 @@
1
+ "use strict";const M=require("./base-CTq-lhpU.cjs"),a=e=>typeof e=="bigint"||e instanceof BigInt,m=(e,r)=>a(e)?e.valueOf()-BigInt(r.valueOf().valueOf()):e.valueOf()-Number(r.valueOf()),g=(e,r)=>a(e)?e.valueOf()+BigInt(r.valueOf().valueOf()):e+Number(r.valueOf()),A=(e,r,n=1e-4)=>Math.abs(e-r)<n,O=(e,r)=>a(e)?e===BigInt(r.valueOf().valueOf()):e===Number(r.valueOf()),j=e=>{const r=10**Math.floor(Math.log10(e));return Math.round(e/r)*r},b=(e,r)=>a(e)?e.valueOf()<BigInt(r.valueOf())?e:BigInt(r.valueOf()):e.valueOf()<Number(r.valueOf())?e:Number(r.valueOf()),P=(e,r)=>a(e)?e.valueOf()>BigInt(r.valueOf())?e:BigInt(r.valueOf()):e.valueOf()>Number(r.valueOf())?e:Number(r.valueOf()),B=e=>a(e)||e instanceof BigInt?e.valueOf()<0n?-e:e:e.valueOf()<0?-e:e,T=(e,r)=>a(e)?e.valueOf()*BigInt(r.valueOf()):e.valueOf()*Number(r.valueOf()),z=(e,r)=>a(e)?e.valueOf()/BigInt(r.valueOf()):e.valueOf()/Number(r.valueOf()),i=(e,r,n)=>{const t={};if(typeof r=="object"&&(n=r,r=void 0),n={makeValid:!0,...n},typeof e=="number"||typeof e=="bigint")r!=null?(t.lower=e,t.upper=r):(t.lower=typeof e=="bigint"?0n:0,t.upper=e);else if(Array.isArray(e)){if(e.length!==2)throw new Error("bounds: expected array of length 2");[t.lower,t.upper]=e}else t.lower=e.lower,t.upper=e.upper;return n!=null&&n.makeValid?x(t):t},E=Object.freeze({lower:0,upper:0}),q=Object.freeze({lower:-1/0,upper:1/0}),D=Object.freeze({lower:0,upper:1}),F=Object.freeze({lower:-1,upper:1}),L=(e,r)=>{if(e==null&&r==null)return!0;if(e==null||r==null)return!1;const n=i(e),t=i(r);return(n==null?void 0:n.lower)===(t==null?void 0:t.lower)&&(n==null?void 0:n.upper)===(t==null?void 0:t.upper)},x=e=>e.lower>e.upper?{lower:e.upper,upper:e.lower}:e,y=(e,r)=>{const n=i(e);return r<n.lower?n.lower:r>=n.upper?n.upper-(typeof n.upper=="number"?1:1n):r},c=(e,r)=>{const n=i(e);if(typeof r=="number"||typeof r=="bigint")return r>=n.lower&&r<n.upper;const t=i(r);return t.lower>=n.lower&&t.upper<=n.upper},Z=(e,r)=>{const n=i(e),t=i(r);return n.lower===t.lower?!0:t.upper===n.lower||t.lower===n.upper?!1:c(n,t.upper)||c(n,t.lower)||c(t,n.upper)||c(t,n.lower)},v=e=>{const r=i(e);return r.upper-r.lower},k=e=>{const r=i(e);return typeof r.lower=="bigint"?r.lower===0n&&r.upper===0n:r.lower===0&&r.upper===0},S=e=>{const r=v(e);return typeof r=="number"?r===0:r===0n},V=e=>{const r=i(e);return typeof r.lower=="bigint"?!0:Number.isFinite(r.lower)&&Number.isFinite(r.upper)},$=e=>{const r=i(e);return(r.upper+r.lower)/2},h=e=>({lower:Math.min(...e.map(r=>i(r).lower)),upper:Math.max(...e.map(r=>i(r).upper))}),C=e=>({lower:Math.max(...e.map(r=>i(r).lower)),upper:Math.min(...e.map(r=>i(r).upper))}),R=e=>{const r=i(e),n=typeof r.lower=="bigint";return Array.from({length:Number(v(e))},(t,o)=>n?r.lower+BigInt(o):r.lower+o)},I=(e,r)=>{const n=e.map(l=>i(l)),t=n.findIndex(l=>c(l,r)||r<l.lower);if(t===-1)return{index:e.length,position:0};const o=n[t];return c(o,r)?{index:t,position:Number(r-o.lower)}:{index:t,position:0}},w={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},U=(e,r)=>{const n=e.map(p=>i(p)),t=i(r);if(n.length===0)return w;const o=I(n,t.lower),l=I(n,t.upper);if(o.index===e.length)return{...w,insertInto:e.length};if(l.index===0)return{...w,removeAfter:l.position};if(o.index===l.index)return o.position!==0&&l.position!==0?null:{removeAfter:l.position,removeBefore:o.position,insertInto:o.index,deleteInBetween:0};let u=l.index-o.index,f=o.index,s=m(Number(v(n[o.index])),o.position);return o.position!==0?(u-=1,f+=1):s=0,{removeBefore:s,removeAfter:l.position,insertInto:f,deleteInBetween:u}},N=(e,r,n)=>{const t=e.map(f=>i(f)),o=n>0?1:n<0?-1:0;if(o===0)return r;let l=n,u=r;for(;O(l,0)===!1;){const f=t.findIndex(s=>o>0?u>=s.lower&&u<s.upper:u>s.lower&&u<=s.upper);if(f!==-1){const s=t[f];let p;if(o>0?p=m(s.upper,u):p=m(u,s.lower),p>0){const d=b(B(l),p);if(u=g(u,o>0?d:-d),l=m(l,o>0?d:-d),O(l,0))return u;continue}}if(o>0){const s=t.filter(p=>p.lower>u);if(s.length>0)u=s[0].lower;else return u}else{const s=t.filter(p=>p.upper<u);if(s.length>0)u=s[s.length-1].upper;else return u}}return u},_=(e,r,n)=>{const t=e.map(u=>i(u));if(r===n)return typeof r=="bigint"?0n:0;const o=r<n?i([r,n]):i([n,r]);let l=typeof r=="bigint"?0n:0;for(const u of t){const f=u.lower>o.lower?u.lower:o.lower,s=u.upper<o.upper?u.upper:o.upper;if(f<s){const p=s-f;l=l+p}}return l},W=Object.freeze(Object.defineProperty({__proto__:null,CLIP:F,DECIMAL:D,INFINITE:q,ZERO:E,bounds:M.bounds,buildInsertionPlan:U,clamp:y,construct:i,contains:c,distance:_,equals:L,findInsertPosition:I,isFinite:V,isZero:k,linspace:R,makeValid:x,max:h,mean:$,min:C,overlapsWith:Z,span:v,spanIsZero:S,traverse:N},Symbol.toStringTag,{value:"Module"}));exports.abs=B;exports.add=g;exports.bounds=W;exports.clamp=y;exports.closeTo=A;exports.construct=i;exports.contains=c;exports.distance=_;exports.div=z;exports.equal=O;exports.max=P;exports.max$1=h;exports.min=b;exports.mult=T;exports.roundToNearestMagnitude=j;exports.span=v;exports.sub=m;exports.traverse=N;
@@ -0,0 +1 @@
1
+ "use strict";var A=Object.defineProperty;var E=(e,t,r)=>t in e?A(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r;var m=(e,t,r)=>E(e,typeof t!="symbol"?t+"":t,r);const h=require("./index-udOjA9d-.cjs");class b{constructor(t){m(this,"value");this.value=t}valueOf(){return this.value}toJSON(){return this.value}toString(){return this.value.toString()}}const g=e=>e!=null&&typeof e=="object"&&"toString"in e,y=e=>{if(g(e))return(e==null?void 0:e.toString().length)===0;switch(typeof e){case"string":return e.length===0;case"number":return e===0;case"bigint":return e===0n;case"boolean":return!e;case"undefined":return!0;case"object":return e==null;default:return!1}},q=Object.freeze(Object.defineProperty({__proto__:null,ValueExtension:b,isStringer:g,isZero:y},Symbol.toStringTag,{value:"Module"})),l=(e,t=!1)=>{const r=g(e)?"stringer":typeof e;let n;switch(r){case"string":n=(s,o)=>s.localeCompare(o);break;case"stringer":n=(s,o)=>s.toString().localeCompare(o.toString());break;case"number":n=(s,o)=>Number(s)-Number(o);break;case"bigint":n=(s,o)=>BigInt(s)-BigInt(o)>0n?1:-1;break;case"boolean":n=(s,o)=>Number(s)-Number(o);break;case"undefined":n=()=>0;break;default:return console.warn(`sortFunc: unknown type ${r}`),()=>-1}return t?N(n):n},P=(e,t,r)=>{const n=l(t[e],r);return(s,o)=>n(s[e],o[e])},w=(e,t)=>e.length!==t.length?e.length-t.length:e.every((r,n)=>r===t[n])?0:-1,f=(e,t)=>{if(e.length!==t.length)return e.length-t.length;if(e.length===0)return 0;const r=l(e[0]),n=[...e].sort(r),s=[...t].sort(r);return n.every((o,i)=>o===s[i])?0:-1},F=(e,t)=>{const r=h.unique$1(e),n=h.unique$1(t);return f(r,n)},j=(e,t)=>e===t?0:e==="first"&&t==="last"?1:-1,N=e=>(t,r)=>e(r,t),u=0,p=-1,d=1,S=e=>e<u,T=e=>e>u,L=e=>e>=u,_=e=>e===u,O=(e,t)=>{const r=/([a-zA-Z]+)|(\d+)/g,n=e.replace(/[\s_.-]+/g,"").match(r),s=t.replace(/[\s_.-]+/g,"").match(r);if(!n||!s)return 0;for(let o=0;o<Math.min(n.length,s.length);o++){const i=n[o],a=s[o];if(isNaN(Number(i))&&isNaN(Number(a))){const c=i.localeCompare(a);if(c!==0)return c}else if(!isNaN(Number(i))&&!isNaN(Number(a))){const c=Number(i)-Number(a);if(c!==0)return c}else return isNaN(Number(i))?-1:1}return n.length-s.length},k=Object.freeze(Object.defineProperty({__proto__:null,EQUAL:u,GREATER_THAN:d,LESS_THAN:p,isEqualTo:_,isGreaterThan:T,isGreaterThanEqual:L,isLessThan:S,newF:l,newFieldF:P,order:j,primitiveArrays:w,reverseF:N,stringsWithNumbers:O,uniqueUnorderedPrimitiveArrays:F,unorderedPrimitiveArrays:f},Symbol.toStringTag,{value:"Module"}));exports.EQUAL=u;exports.GREATER_THAN=d;exports.LESS_THAN=p;exports.ValueExtension=b;exports.compare=k;exports.isEqualTo=_;exports.isGreaterThan=T;exports.isLessThan=S;exports.newF=l;exports.primitive=q;
@@ -0,0 +1,3 @@
1
+ "use strict";var E=Object.defineProperty;var T=(o,e,t)=>e in o?E(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>T(o,typeof e!="symbol"?e+"":e,t);const p=require("./index-DKMnHBGR.cjs"),w=require("./identity.cjs");class f{constructor(){i(this,"contentType","application/json");i(this,"decoder");i(this,"encoder");this.decoder=new TextDecoder,this.encoder=new TextEncoder}encode(e){return this.encoder.encode(this.encodeString(e))}decode(e,t){return this.decodeString(this.decoder.decode(e),t)}decodeString(e,t){const n=JSON.parse(e),r=p.snakeToCamel(n);return t!=null?t.parse(r):r}encodeString(e){const t=p.camelToSnake(e);return JSON.stringify(t,(n,r)=>ArrayBuffer.isView(r)?Array.from(r):typeof r=="bigint"?r.toString():r)}}class S{constructor(){i(this,"contentType","text/csv")}encode(e){const t=this.encodeString(e);return new TextEncoder().encode(t)}decode(e,t){const n=new TextDecoder().decode(e);return this.decodeString(n,t)}encodeString(e){if(!Array.isArray(e)||e.length===0||!w.isObject(e[0]))throw new Error("Payload must be an array of objects");const t=Object.keys(e[0]),n=[t.join(",")];return e.forEach(r=>{const d=t.map(s=>JSON.stringify(r[s]??""));n.push(d.join(","))}),n.join(`
2
+ `)}decodeString(e,t){const[n,...r]=e.trim().split(`
3
+ `).map(c=>c.trim());if(n.length===0)return t!=null?t.parse({}):{};const d=n.split(",").map(c=>c.trim()),s={};return d.forEach(c=>{s[c]=[]}),r.forEach(c=>{const h=c.split(",").map(u=>u.trim());d.forEach((u,C)=>{const l=this.parseValue(h[C]);l!=null&&s[u].push(l)})}),t!=null?t.parse(s):s}parseValue(e){if(e==null||e.length===0)return null;const t=Number(e);return isNaN(t)?e.startsWith('"')&&e.endsWith('"')?e.slice(1,-1):e:t}}class g{constructor(){i(this,"contentType","text/plain")}encode(e){if(typeof e!="string")throw new Error("TextCodec.encode payload must be a string");return new TextEncoder().encode(e)}decode(e,t){const n=new TextDecoder().decode(e);return t!=null?t.parse(n):n}}const a=new f,O=new S,y=new g,m=[a],x=Object.freeze(Object.defineProperty({__proto__:null,CSVCodec:S,CSV_CODEC:O,ENCODERS:m,JSONCodec:f,JSON_CODEC:a,TEXT_CODEC:y,TextCodec:g},Symbol.toStringTag,{value:"Module"}));exports.JSON_CODEC=a;exports.codec=x;
@@ -0,0 +1,205 @@
1
+ import { c as b } from "./index-DxU1zwsd.js";
2
+ import { c as Z, T as C, B as H, x as q, a as v, b as z, d as F, e as G, f as D, C as X, g as Y } from "./index-D6V-8SKw.js";
3
+ import { Z as g, O as U, e as L, t as E, c as k, a as $ } from "./index-C-qYOegc.js";
4
+ import { u as J, n as p, s as K, o as M } from "./schemas-55Usj0Fg.js";
5
+ import { x as N, X as P, Y as Q } from "./base-B5lQIJKc.js";
6
+ const h = J([p(), K()]), V = M({
7
+ top: h,
8
+ left: h,
9
+ width: h,
10
+ height: h
11
+ }), tt = M({
12
+ left: p(),
13
+ top: p(),
14
+ right: p(),
15
+ bottom: p()
16
+ }), ot = M({
17
+ one: N,
18
+ two: N,
19
+ root: Z
20
+ }), W = { one: g, two: g, root: C }, nt = { one: g, two: U, root: H }, j = (t, o) => ({
21
+ one: t.one,
22
+ two: t.two,
23
+ root: o ?? t.root
24
+ }), c = (t, o, e = 0, n = 0, r) => {
25
+ const s = {
26
+ one: { ...g },
27
+ two: { ...g },
28
+ root: r ?? C
29
+ };
30
+ if (typeof t == "number") {
31
+ if (typeof o != "number")
32
+ throw new Error("Box constructor called with invalid arguments");
33
+ return s.one = { x: t, y: o }, s.two = { x: s.one.x + e, y: s.one.y + n }, s;
34
+ }
35
+ return "one" in t && "two" in t && "root" in t ? { ...t, root: r ?? t.root } : ("getBoundingClientRect" in t && (t = t.getBoundingClientRect()), "left" in t ? (s.one = { x: t.left, y: t.top }, s.two = { x: t.right, y: t.bottom }, s) : (s.one = t, o == null ? s.two = { x: s.one.x + e, y: s.one.y + n } : typeof o == "number" ? s.two = { x: s.one.x + o, y: s.one.y + e } : "width" in o ? s.two = {
36
+ x: s.one.x + o.width,
37
+ y: s.one.y + o.height
38
+ } : "signedWidth" in o ? s.two = {
39
+ x: s.one.x + o.signedWidth,
40
+ y: s.one.y + o.signedHeight
41
+ } : s.two = o, s));
42
+ }, et = (t, o, e) => {
43
+ const n = c(t);
44
+ if (typeof o == "string") {
45
+ if (e == null) throw new Error("Invalid arguments for resize");
46
+ const r = b(o);
47
+ return c(
48
+ n.one,
49
+ void 0,
50
+ r === "x" ? e : u(n),
51
+ r === "y" ? e : f(n),
52
+ n.root
53
+ );
54
+ }
55
+ return c(n.one, o, void 0, void 0, n.root);
56
+ }, st = (t, o, e = !0) => {
57
+ const n = c(t);
58
+ let r = (s, i) => s < i;
59
+ return e && (r = (s, i) => s <= i), "one" in o ? r(y(n), y(o)) && r(w(o), w(n)) && r(a(n), a(o)) && r(l(o), l(n)) : r(y(n), o.x) && r(o.x, w(n)) && r(a(n), o.y) && r(o.y, l(n));
60
+ }, rt = (t, o) => L(t.one, o.one) && L(t.two, o.two) && q(t.root, o.root), A = (t) => ({
61
+ width: u(t),
62
+ height: f(t)
63
+ }), ct = (t) => ({
64
+ signedWidth: _(t),
65
+ signedHeight: T(t)
66
+ }), it = (t) => ({
67
+ top: a(t),
68
+ left: y(t),
69
+ width: u(t),
70
+ height: f(t)
71
+ }), B = (t, o, e = !1) => {
72
+ const n = b(o) === "y" ? T(t) : _(t);
73
+ return e ? n : Math.abs(n);
74
+ }, x = (t, o) => {
75
+ const e = c(t);
76
+ return {
77
+ x: o.x === "center" ? O(e).x : d(e, o.x),
78
+ y: o.y === "center" ? O(e).y : d(e, o.y)
79
+ };
80
+ }, d = (t, o) => {
81
+ const e = c(t), n = v(e.root).includes(o) ? Math.min : Math.max;
82
+ return P.includes(o) ? n(e.one.x, e.two.x) : n(e.one.y, e.two.y);
83
+ }, xt = (t) => t.one.x === t.two.x && t.one.y === t.two.y, u = (t) => B(t, "x"), f = (t) => B(t, "y"), _ = (t) => {
84
+ const o = c(t);
85
+ return o.two.x - o.one.x;
86
+ }, T = (t) => {
87
+ const o = c(t);
88
+ return o.two.y - o.one.y;
89
+ }, S = (t) => x(t, C), yt = (t) => x(t, z), at = (t) => x(t, F), ut = (t) => x(t, H), ft = (t) => x(t, G), wt = (t) => x(t, D), lt = (t) => x(t, X), dt = (t) => x(t, Y), w = (t) => d(t, "right"), l = (t) => d(t, "bottom"), y = (t) => d(t, "left"), a = (t) => d(t, "top"), O = (t) => E(S(t), {
90
+ x: _(t) / 2,
91
+ y: T(t) / 2
92
+ }), R = (t) => {
93
+ const o = c(t);
94
+ return o.root.x === "left" ? y(o) : w(o);
95
+ }, I = (t) => {
96
+ const o = c(t);
97
+ return o.root.y === "top" ? a(o) : l(o);
98
+ }, mt = (t) => ({ x: R(t), y: I(t) }), pt = (t) => {
99
+ const o = c(t);
100
+ return { lower: o.one.x, upper: o.two.x };
101
+ }, gt = (t) => {
102
+ const o = c(t);
103
+ return { lower: o.one.y, upper: o.two.y };
104
+ }, ht = (t, o) => j(t, o), _t = (t, o) => {
105
+ const e = c(t), n = P.includes(o) ? "x" : Q.includes(o) ? "y" : null;
106
+ if (n === null) throw new Error(`Invalid location: ${o}`);
107
+ const r = o === "top" || o === "left" ? Math.min : Math.max, s = { ...e.one }, i = { ...e.two };
108
+ return s[n] = r(e.one[n], e.two[n]), i[n] = r(e.one[n], e.two[n]), [s, i];
109
+ }, Tt = (t, o) => {
110
+ const e = c(t), n = c(o), r = R(n) + (u(n) - u(e)) / 2, s = I(n) + (f(n) - f(e)) / 2;
111
+ return c({ x: r, y: s }, A(e));
112
+ }, Et = (t) => typeof t != "object" || t == null ? !1 : "one" in t && "two" in t && "root" in t, Ot = (t) => u(t) / f(t), bt = (t, o, e) => {
113
+ if (typeof o == "string") {
114
+ if (e == null) throw new Error("Undefined amount passed into box.translate");
115
+ const r = b(o);
116
+ o = k(r, e);
117
+ }
118
+ const n = c(t);
119
+ return c(
120
+ E(n.one, o),
121
+ E(n.two, o),
122
+ void 0,
123
+ void 0,
124
+ n.root
125
+ );
126
+ }, Ct = (t, o) => {
127
+ const e = Math.max(y(t), y(o)), n = Math.max(a(t), a(o)), r = Math.min(w(t), w(o)), s = Math.min(l(t), l(o));
128
+ return e > r || n > s ? W : c({ x: e, y: n }, { x: r, y: s }, void 0, void 0, t.root);
129
+ }, Mt = (t) => u(t) * f(t), Bt = (t, o) => {
130
+ const e = c(t);
131
+ return c(
132
+ $(e.one, o),
133
+ $(e.two, o),
134
+ void 0,
135
+ void 0,
136
+ e.root
137
+ );
138
+ }, Rt = (t, o, e, n, r, s) => {
139
+ const i = { x: t, y: o }, m = { x: t + e, y: o + n };
140
+ return r.x !== s.x && (r.x === "center" ? (i.x -= e / 2, m.x -= e / 2) : (i.x -= e, m.x -= e)), r.y !== s.y && (r.y === "center" ? (i.y -= n / 2, m.y -= n / 2) : (i.y -= n, m.y -= n)), c(i, m, void 0, void 0, s);
141
+ }, Pt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
142
+ __proto__: null,
143
+ DECIMAL: nt,
144
+ ZERO: W,
145
+ area: Mt,
146
+ areaIsZero: xt,
147
+ aspect: Ot,
148
+ bottom: l,
149
+ bottomCenter: ft,
150
+ bottomLeft: ut,
151
+ bottomRight: wt,
152
+ box: ot,
153
+ center: O,
154
+ centerLeft: lt,
155
+ centerRight: dt,
156
+ construct: c,
157
+ constructWithAlternateRoot: Rt,
158
+ contains: st,
159
+ copy: j,
160
+ css: it,
161
+ cssBox: V,
162
+ dim: B,
163
+ dims: A,
164
+ domRect: tt,
165
+ edgePoints: _t,
166
+ equals: rt,
167
+ height: f,
168
+ intersection: Ct,
169
+ isBox: Et,
170
+ left: y,
171
+ loc: d,
172
+ positionInCenter: Tt,
173
+ reRoot: ht,
174
+ resize: et,
175
+ right: w,
176
+ root: mt,
177
+ signedDims: ct,
178
+ signedHeight: T,
179
+ signedWidth: _,
180
+ top: a,
181
+ topCenter: yt,
182
+ topLeft: S,
183
+ topRight: at,
184
+ translate: bt,
185
+ truncate: Bt,
186
+ width: u,
187
+ x: R,
188
+ xBounds: pt,
189
+ xyLoc: x,
190
+ y: I,
191
+ yBounds: gt
192
+ }, Symbol.toStringTag, { value: "Module" }));
193
+ export {
194
+ Rt as a,
195
+ Pt as b,
196
+ c,
197
+ Mt as d,
198
+ Et as e,
199
+ pt as f,
200
+ f as h,
201
+ Ct as i,
202
+ u as w,
203
+ x,
204
+ gt as y
205
+ };
@@ -0,0 +1 @@
1
+ "use strict";const S=require("./index-DKMnHBGR.cjs"),o=require("./base-CTq-lhpU.cjs"),L=require("./schemas-DbXuI2Qr.cjs"),g=o.xLocation,h=o.yLocation,z=o.centerLocation,m={top:"bottom",right:"left",bottom:"top",left:"right",center:"center"},d={top:"left",right:"top",bottom:"right",left:"bottom",center:"center"},A=o.crudeLocation,s=t=>t instanceof String||!o.DIRECTIONS.includes(t)?t:t==="x"?"left":"top",b=t=>m[s(t)],M=t=>d[s(t)],i=t=>{const c=s(t);return c==="top"||c==="bottom"?"y":"x"},C=L.object({x:o.xLocation.or(o.centerLocation),y:o.yLocation.or(o.centerLocation)}),N=L.object({x:o.xLocation,y:o.yLocation}),y=Object.freeze({x:"left",y:"top"}),f=Object.freeze({x:"right",y:"top"}),x=Object.freeze({x:"left",y:"bottom"}),E=Object.freeze({x:"right",y:"bottom"}),O=Object.freeze({x:"center",y:"center"}),_=Object.freeze({x:"center",y:"top"}),a=Object.freeze({x:"center",y:"bottom"}),u=Object.freeze({x:"right",y:"center"}),l=Object.freeze({x:"left",y:"center"}),p=Object.freeze([l,u,_,a,y,f,x,E,O]),R=(t,c)=>t.x===c.x&&t.y===c.y,j=(t,c)=>{if(typeof c=="object"){let e=!0;return"x"in c&&(t.x===c.x||(e=!1)),"y"in c&&(t.y===c.y||(e=!1)),e}return t.x===c||t.y===c},I=t=>[t.x,t.y],T=t=>i(s(t))==="x",P=t=>i(s(t))==="y",X=t=>`${t.x}${S.capitalize(t.y)}`,Y=(t,c)=>{let e,n;if(typeof t=="object"&&"x"in t?(e=t.x,n=t.y):(e=s(t),n=s(c??t)),i(e)===i(n)&&e!=="center"&&n!=="center")throw new Error(`[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${n.toString()}`);const r={...O};return e==="center"?T(n)?[r.x,r.y]=[n,e]:[r.x,r.y]=[e,n]:n==="center"?T(e)?[r.x,r.y]=[e,n]:[r.x,r.y]=[n,e]:T(e)?[r.x,r.y]=[e,n]:[r.x,r.y]=[n,e],r},w=Object.freeze(Object.defineProperty({__proto__:null,BOTTOM_CENTER:a,BOTTOM_LEFT:x,BOTTOM_RIGHT:E,CENTER:O,CENTER_LEFT:l,CENTER_LOCATIONS:o.CENTER_LOCATIONS,CENTER_RIGHT:u,TOP_CENTER:_,TOP_LEFT:y,TOP_RIGHT:f,XY_LOCATIONS:p,X_LOCATIONS:o.X_LOCATIONS,Y_LOCATIONS:o.Y_LOCATIONS,center:z,construct:s,constructXY:Y,corner:N,crude:A,direction:i,isX:T,isY:P,location:o.location,outer:o.outerLocation,rotate90:M,swap:b,x:g,xy:C,xyCouple:I,xyEquals:R,xyMatches:j,xyToString:X,y:h},Symbol.toStringTag,{value:"Module"}));exports.BOTTOM_CENTER=a;exports.BOTTOM_LEFT=x;exports.BOTTOM_RIGHT=E;exports.CENTER=O;exports.CENTER_LEFT=l;exports.CENTER_RIGHT=u;exports.TOP_CENTER=_;exports.TOP_LEFT=y;exports.TOP_RIGHT=f;exports.XY_LOCATIONS=p;exports.corner=N;exports.location=w;exports.swap=b;exports.xy=C;exports.xyCouple=I;exports.xyEquals=R;exports.xyMatches=j;
@@ -1,6 +1,6 @@
1
- import { z as O } from "zod";
2
- import { c as m } from "./index-DizUWH6z.js";
3
- import { y as f, e as y, f as a, g, D as C, C as h, X as z, Y as L, l as S, h as d } from "./base-DFq0vvGn.js";
1
+ import { b as m } from "./index-Dql5FMcH.js";
2
+ import { y as f, e as y, f as a, g, D as C, C as L, X as h, Y as z, l as S, o as d } from "./base-B5lQIJKc.js";
3
+ import { o as O } from "./schemas-55Usj0Fg.js";
4
4
  const N = y, R = f, I = a, X = {
5
5
  top: "bottom",
6
6
  right: "left",
@@ -13,13 +13,13 @@ const N = y, R = f, I = a, X = {
13
13
  bottom: "right",
14
14
  left: "bottom",
15
15
  center: "center"
16
- }, A = g, r = (t) => t instanceof String || !C.includes(t) ? t : t === "x" ? "left" : "top", P = (t) => X[r(t)], k = (t) => Y[r(t)], s = (t) => {
17
- const o = r(t);
16
+ }, A = g, c = (t) => t instanceof String || !C.includes(t) ? t : t === "x" ? "left" : "top", P = (t) => X[c(t)], k = (t) => Y[c(t)], s = (t) => {
17
+ const o = c(t);
18
18
  return o === "top" || o === "bottom" ? "y" : "x";
19
- }, w = O.object({
19
+ }, w = O({
20
20
  x: y.or(a),
21
21
  y: f.or(a)
22
- }), M = O.object({ x: y, y: f }), T = Object.freeze({ x: "left", y: "top" }), b = Object.freeze({ x: "right", y: "top" }), l = Object.freeze({ x: "left", y: "bottom" }), u = Object.freeze({ x: "right", y: "bottom" }), x = Object.freeze({ x: "center", y: "center" }), p = Object.freeze({ x: "center", y: "top" }), _ = Object.freeze({ x: "center", y: "bottom" }), E = Object.freeze({ x: "right", y: "center" }), j = Object.freeze({ x: "left", y: "center" }), $ = Object.freeze([
22
+ }), M = O({ x: y, y: f }), T = Object.freeze({ x: "left", y: "top" }), b = Object.freeze({ x: "right", y: "top" }), l = Object.freeze({ x: "left", y: "bottom" }), u = Object.freeze({ x: "right", y: "bottom" }), x = Object.freeze({ x: "center", y: "center" }), p = Object.freeze({ x: "center", y: "top" }), _ = Object.freeze({ x: "center", y: "bottom" }), E = Object.freeze({ x: "right", y: "center" }), j = Object.freeze({ x: "left", y: "center" }), $ = Object.freeze([
23
23
  j,
24
24
  E,
25
25
  p,
@@ -35,14 +35,14 @@ const N = y, R = f, I = a, X = {
35
35
  return "x" in o && (t.x === o.x || (e = !1)), "y" in o && (t.y === o.y || (e = !1)), e;
36
36
  }
37
37
  return t.x === o || t.y === o;
38
- }, F = (t) => [t.x, t.y], i = (t) => s(r(t)) === "x", G = (t) => s(r(t)) === "y", H = (t) => `${t.x}${m(t.y)}`, q = (t, o) => {
38
+ }, F = (t) => [t.x, t.y], i = (t) => s(c(t)) === "x", G = (t) => s(c(t)) === "y", H = (t) => `${t.x}${m(t.y)}`, q = (t, o) => {
39
39
  let e, n;
40
- if (typeof t == "object" && "x" in t ? (e = t.x, n = t.y) : (e = r(t), n = r(o ?? t)), s(e) === s(n) && e !== "center" && n !== "center")
40
+ if (typeof t == "object" && "x" in t ? (e = t.x, n = t.y) : (e = c(t), n = c(o ?? t)), s(e) === s(n) && e !== "center" && n !== "center")
41
41
  throw new Error(
42
42
  `[XYLocation] - encountered two locations with the same direction: ${e.toString()} - ${n.toString()}`
43
43
  );
44
- const c = { ...x };
45
- return e === "center" ? i(n) ? [c.x, c.y] = [n, e] : [c.x, c.y] = [e, n] : n === "center" ? i(e) ? [c.x, c.y] = [e, n] : [c.x, c.y] = [n, e] : i(e) ? [c.x, c.y] = [e, n] : [c.x, c.y] = [n, e], c;
44
+ const r = { ...x };
45
+ return e === "center" ? i(n) ? [r.x, r.y] = [n, e] : [r.x, r.y] = [e, n] : n === "center" ? i(e) ? [r.x, r.y] = [e, n] : [r.x, r.y] = [n, e] : i(e) ? [r.x, r.y] = [e, n] : [r.x, r.y] = [n, e], r;
46
46
  }, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
47
47
  __proto__: null,
48
48
  BOTTOM_CENTER: _,
@@ -50,16 +50,16 @@ const N = y, R = f, I = a, X = {
50
50
  BOTTOM_RIGHT: u,
51
51
  CENTER: x,
52
52
  CENTER_LEFT: j,
53
- CENTER_LOCATIONS: h,
53
+ CENTER_LOCATIONS: L,
54
54
  CENTER_RIGHT: E,
55
55
  TOP_CENTER: p,
56
56
  TOP_LEFT: T,
57
57
  TOP_RIGHT: b,
58
58
  XY_LOCATIONS: $,
59
- X_LOCATIONS: z,
60
- Y_LOCATIONS: L,
59
+ X_LOCATIONS: h,
60
+ Y_LOCATIONS: z,
61
61
  center: I,
62
- construct: r,
62
+ construct: c,
63
63
  constructXY: q,
64
64
  corner: M,
65
65
  crude: A,
@@ -80,20 +80,20 @@ const N = y, R = f, I = a, X = {
80
80
  }, Symbol.toStringTag, { value: "Module" }));
81
81
  export {
82
82
  l as B,
83
- x as C,
83
+ j as C,
84
84
  T,
85
85
  $ as X,
86
- D as a,
87
- B as b,
86
+ F as a,
87
+ p as b,
88
88
  M as c,
89
- F as d,
90
- p as e,
91
- b as f,
92
- _ as g,
93
- u as h,
94
- j as i,
95
- E as j,
89
+ b as d,
90
+ _ as e,
91
+ u as f,
92
+ E as g,
93
+ w as h,
94
+ D as i,
95
+ x as j,
96
96
  K as l,
97
97
  P as s,
98
- w as x
98
+ B as x
99
99
  };