@synnaxlabs/x 0.42.1 → 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.
- package/.turbo/turbo-build.log +93 -105
- package/.vscode/settings.json +4 -6
- package/README.md +1 -7
- package/dist/array.cjs +1 -0
- package/dist/array.js +7 -0
- package/dist/base-B5lQIJKc.js +38 -0
- package/dist/base-CTq-lhpU.cjs +1 -0
- package/dist/binary.cjs +1 -1
- package/dist/binary.js +1 -1
- package/dist/bounds.cjs +1 -1
- package/dist/bounds.js +2 -2
- package/dist/box.cjs +1 -1
- package/dist/box.js +1 -1
- package/dist/caseconv.cjs +1 -1
- package/dist/caseconv.js +2 -2
- package/dist/change.cjs +1 -1
- package/dist/change.js +10 -2
- package/dist/compare.cjs +1 -1
- package/dist/compare.js +1 -1
- package/dist/deep.cjs +1 -1
- package/dist/deep.js +92 -79
- package/dist/dimensions.cjs +1 -1
- package/dist/dimensions.js +41 -2
- package/dist/direction.cjs +1 -1
- package/dist/direction.js +1 -1
- package/dist/index-4GlOgZuh.js +99 -0
- package/dist/{direction-C-b6XTeU.cjs → index-B58dnYRu.cjs} +1 -1
- package/dist/index-BMGaoK93.cjs +1 -0
- package/dist/index-BTet04Hd.cjs +6 -0
- package/dist/{scale-DfJe9755.js → index-BUa-NXAX.js} +46 -46
- package/dist/{xy-D_LqxaGt.js → index-C-qYOegc.js} +62 -62
- package/dist/index-C07SBJhr.js +128 -0
- package/dist/{bounds-Bn5_l4Z3.js → index-C9EdKeu1.js} +77 -76
- package/dist/index-CM8ZDZ6s.cjs +1 -0
- package/dist/index-CV2JaHfw.cjs +1 -0
- package/dist/index-CeBvOwG8.cjs +3 -0
- package/dist/index-ClrGyGDp.js +205 -0
- package/dist/index-CqQXXeCI.cjs +1 -0
- package/dist/{location-C3aeu046.js → index-D6V-8SKw.js} +26 -26
- package/dist/index-DBGAIs_7.js +2492 -0
- package/dist/index-DEdq2tza.cjs +1 -0
- package/dist/index-DKMnHBGR.cjs +1 -0
- package/dist/index-Dql5FMcH.js +47 -0
- package/dist/{direction-BL0PhD1k.js → index-DxU1zwsd.js} +1 -1
- package/dist/index-WwMnwoLy.cjs +1 -0
- package/dist/index.cjs +5 -3
- package/dist/index.js +5372 -649
- package/dist/kv.cjs +1 -1
- package/dist/kv.js +45 -2
- package/dist/location.cjs +1 -1
- package/dist/location.js +1 -1
- package/dist/position.cjs +1 -1
- package/dist/position.js +83 -2
- package/dist/record.cjs +1 -1
- package/dist/record.js +8 -10
- package/dist/runtime.cjs +1 -1
- package/dist/runtime.js +27 -2
- package/dist/scale.cjs +1 -1
- package/dist/scale.js +1 -1
- package/dist/schemas-55Usj0Fg.js +3998 -0
- package/dist/schemas-DbXuI2Qr.cjs +27 -0
- package/dist/spatial.cjs +1 -1
- package/dist/spatial.js +25 -18
- package/dist/src/array/index.d.ts +2 -0
- package/dist/src/array/index.d.ts.map +1 -0
- package/dist/src/array/toArray.d.ts +19 -0
- package/dist/src/array/toArray.d.ts.map +1 -0
- package/dist/src/array/toArray.spec.d.ts +2 -0
- package/dist/src/array/toArray.spec.d.ts.map +1 -0
- package/dist/src/binary/codec.d.ts +8 -16
- package/dist/src/binary/codec.d.ts.map +1 -1
- package/dist/src/breaker/breaker.d.ts +6 -6
- package/dist/src/breaker/breaker.d.ts.map +1 -1
- package/dist/src/caseconv/caseconv.d.ts +1 -1
- package/dist/src/caseconv/caseconv.d.ts.map +1 -1
- package/dist/src/change/change.d.ts +3 -3
- package/dist/src/change/change.d.ts.map +1 -1
- package/dist/src/color/color.d.ts +63 -28
- package/dist/src/color/color.d.ts.map +1 -1
- package/dist/src/color/external.d.ts +0 -1
- package/dist/src/color/external.d.ts.map +1 -1
- package/dist/src/color/gradient.d.ts +9 -5
- package/dist/src/color/gradient.d.ts.map +1 -1
- package/dist/src/color/palette.d.ts +14 -6
- package/dist/src/color/palette.d.ts.map +1 -1
- package/dist/src/compare/compare.d.ts +4 -4
- package/dist/src/compare/compare.d.ts.map +1 -1
- package/dist/src/control/control.d.ts +32 -32
- package/dist/src/control/control.d.ts.map +1 -1
- package/dist/src/debounce/debounce.d.ts +1 -1
- package/dist/src/debounce/debounce.d.ts.map +1 -1
- package/dist/src/deep/delete.d.ts +1 -1
- package/dist/src/deep/delete.d.ts.map +1 -1
- package/dist/src/deep/difference.d.ts.map +1 -1
- package/dist/src/deep/equal.d.ts +4 -4
- package/dist/src/deep/equal.d.ts.map +1 -1
- package/dist/src/deep/merge.d.ts +1 -1
- package/dist/src/deep/merge.d.ts.map +1 -1
- package/dist/src/errors/errors.d.ts +62 -36
- package/dist/src/errors/errors.d.ts.map +1 -1
- package/dist/src/index.d.ts +4 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/instance/index.d.ts +2 -0
- package/dist/src/instance/index.d.ts.map +1 -0
- package/dist/src/instance/matcher.d.ts +79 -0
- package/dist/src/instance/matcher.d.ts.map +1 -0
- package/dist/src/instance/matcher.spec.d.ts +2 -0
- package/dist/src/instance/matcher.spec.d.ts.map +1 -0
- package/dist/src/jsonrpc/jsonrpc.d.ts +40 -9
- package/dist/src/jsonrpc/jsonrpc.d.ts.map +1 -1
- package/dist/src/kv/types.d.ts +2 -2
- package/dist/src/kv/types.d.ts.map +1 -1
- package/dist/src/migrate/migrate.d.ts +5 -5
- package/dist/src/migrate/migrate.d.ts.map +1 -1
- package/dist/src/notation/notation.d.ts +1 -1
- package/dist/src/notation/notation.d.ts.map +1 -1
- package/dist/src/primitive/index.d.ts +2 -0
- package/dist/src/primitive/index.d.ts.map +1 -0
- package/dist/src/primitive/primitive.d.ts +39 -0
- package/dist/src/primitive/primitive.d.ts.map +1 -0
- package/dist/src/primitive/primitive.spec.d.ts +2 -0
- package/dist/src/primitive/primitive.spec.d.ts.map +1 -0
- package/dist/src/record.d.ts +2 -2
- package/dist/src/record.d.ts.map +1 -1
- package/dist/src/renderable.d.ts +1 -1
- package/dist/src/renderable.d.ts.map +1 -1
- package/dist/src/replace.d.ts.map +1 -1
- package/dist/src/runtime/detect.d.ts.map +1 -1
- package/dist/src/runtime/os.d.ts +1 -1
- package/dist/src/runtime/os.d.ts.map +1 -1
- package/dist/src/spatial/base.d.ts +10 -10
- package/dist/src/spatial/base.d.ts.map +1 -1
- package/dist/src/spatial/bounds/bounds.d.ts +82 -16
- package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
- package/dist/src/spatial/box/box.d.ts +7 -7
- package/dist/src/spatial/box/box.d.ts.map +1 -1
- package/dist/src/spatial/dimensions/dimensions.d.ts +5 -5
- package/dist/src/spatial/dimensions/dimensions.d.ts.map +1 -1
- package/dist/src/spatial/direction/direction.d.ts +1 -1
- package/dist/src/spatial/location/location.d.ts +4 -4
- package/dist/src/spatial/location/location.d.ts.map +1 -1
- package/dist/src/spatial/scale/scale.d.ts +11 -11
- package/dist/src/spatial/scale/scale.d.ts.map +1 -1
- package/dist/src/spatial/xy/xy.d.ts +5 -5
- package/dist/src/spatial/xy/xy.d.ts.map +1 -1
- package/dist/src/status/index.d.ts +2 -0
- package/dist/src/status/index.d.ts.map +1 -0
- package/dist/src/status/types.d.ts +11 -0
- package/dist/src/status/types.d.ts.map +1 -0
- package/dist/src/sync/index.d.ts.map +1 -1
- package/dist/src/sync/mutex.d.ts +0 -1
- package/dist/src/sync/mutex.d.ts.map +1 -1
- package/dist/src/telem/gl.d.ts +1 -1
- package/dist/src/telem/gl.d.ts.map +1 -1
- package/dist/src/telem/series.d.ts +468 -62
- package/dist/src/telem/series.d.ts.map +1 -1
- package/dist/src/telem/telem.d.ts +243 -53
- package/dist/src/telem/telem.d.ts.map +1 -1
- package/dist/src/uuid/index.d.ts +2 -0
- package/dist/src/uuid/index.d.ts.map +1 -0
- package/dist/src/uuid/uuid.d.ts +35 -0
- package/dist/src/uuid/uuid.d.ts.map +1 -0
- package/dist/src/uuid/uuid.spec.d.ts +2 -0
- package/dist/src/uuid/uuid.spec.d.ts.map +1 -0
- package/dist/src/zod/external.d.ts +1 -1
- package/dist/src/zod/external.d.ts.map +1 -1
- package/dist/src/zod/nullToUndefined.d.ts +3 -0
- package/dist/src/zod/nullToUndefined.d.ts.map +1 -0
- package/dist/src/zod/nullToUndefined.spec.d.ts +2 -0
- package/dist/src/zod/nullToUndefined.spec.d.ts.map +1 -0
- package/dist/src/zod/util.d.ts +2 -2
- package/dist/src/zod/util.d.ts.map +1 -1
- package/dist/telem.cjs +1 -1
- package/dist/telem.js +1 -1
- package/dist/xy.cjs +1 -1
- package/dist/xy.js +1 -1
- package/dist/zod.cjs +1 -1
- package/dist/zod.js +19 -2
- package/eslint.config.js +1 -1
- package/package.json +16 -14
- package/src/{toArray.ts → array/index.ts} +1 -5
- package/src/array/toArray.spec.ts +56 -0
- package/src/array/toArray.ts +28 -0
- package/src/binary/codec.spec.ts +201 -278
- package/src/binary/codec.ts +20 -76
- package/src/breaker/breaker.ts +3 -3
- package/src/caseconv/caseconv.ts +6 -4
- package/src/change/change.ts +2 -2
- package/src/color/color.spec.ts +121 -2
- package/src/color/color.ts +90 -54
- package/src/color/external.ts +0 -1
- package/src/color/gradient.ts +20 -28
- package/src/color/palette.ts +1 -1
- package/src/compare/compare.ts +5 -5
- package/src/control/control.ts +22 -19
- package/src/debounce/debounce.ts +1 -1
- package/src/deep/delete.ts +5 -4
- package/src/deep/difference.ts +6 -2
- package/src/deep/equal.spec.ts +1 -1
- package/src/deep/equal.ts +5 -5
- package/src/deep/merge.spec.ts +13 -1
- package/src/deep/merge.ts +16 -7
- package/src/deep/path.ts +1 -1
- package/src/errors/errors.ts +65 -44
- package/src/index.ts +4 -1
- package/src/instance/index.ts +10 -0
- package/src/instance/matcher.spec.ts +78 -0
- package/src/instance/matcher.ts +98 -0
- package/src/jsonrpc/jsonrpc.spec.ts +2 -1
- package/src/jsonrpc/jsonrpc.ts +36 -7
- package/src/kv/types.ts +1 -1
- package/src/migrate/migrate.spec.ts +1 -1
- package/src/migrate/migrate.ts +7 -7
- package/src/notation/notation.ts +1 -1
- package/src/primitive/index.ts +10 -0
- package/src/primitive/primitive.spec.ts +126 -0
- package/src/primitive/primitive.ts +82 -0
- package/src/record.ts +3 -5
- package/src/renderable.ts +1 -1
- package/src/replace.ts +9 -0
- package/src/runtime/detect.ts +0 -2
- package/src/runtime/os.ts +1 -1
- package/src/spatial/base.ts +1 -1
- package/src/spatial/bounds/bounds.spec.ts +20 -0
- package/src/spatial/bounds/bounds.ts +101 -18
- package/src/spatial/box/box.ts +1 -1
- package/src/spatial/dimensions/dimensions.ts +3 -3
- package/src/spatial/location/location.ts +1 -1
- package/src/spatial/scale/scale.ts +1 -1
- package/src/spatial/xy/xy.ts +1 -1
- package/src/status/index.ts +10 -0
- package/src/status/types.ts +22 -0
- package/src/sync/index.ts +9 -0
- package/src/sync/mutex.ts +9 -4
- package/src/telem/gl.ts +1 -1
- package/src/telem/series.spec.ts +735 -68
- package/src/telem/series.ts +536 -195
- package/src/telem/telem.spec.ts +60 -7
- package/src/telem/telem.ts +287 -95
- package/src/uuid/index.ts +10 -0
- package/src/uuid/uuid.spec.ts +82 -0
- package/src/uuid/uuid.ts +48 -0
- package/src/zod/external.ts +1 -1
- package/src/zod/nullToUndefined.spec.ts +31 -0
- package/src/zod/nullToUndefined.ts +23 -0
- package/src/zod/util.spec.ts +1 -1
- package/src/zod/util.ts +6 -6
- package/tsconfig.json +1 -1
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.ts +1 -1
- package/dist/base-BAM2mqCy.cjs +0 -1
- package/dist/base-DFq0vvGn.js +0 -38
- package/dist/bounds-BQo7rvs9.cjs +0 -1
- package/dist/box-0YrQibkB.cjs +0 -1
- package/dist/box-Cc8IzcNo.js +0 -205
- package/dist/change-C-YELKx6.cjs +0 -1
- package/dist/change-DLl6DccR.js +0 -12
- package/dist/dimensions-CRgergMS.js +0 -43
- package/dist/dimensions-D2QGoNXO.cjs +0 -1
- package/dist/external-BPgtxa8d.js +0 -29
- package/dist/external-C-dNgNQw.cjs +0 -1
- package/dist/external-C8TFju8Q.js +0 -29
- package/dist/external-DWQITF5_.cjs +0 -1
- package/dist/external-DqPrWKvU.js +0 -47
- package/dist/external-uXk0Avrg.cjs +0 -1
- package/dist/index-BywOGO8U.js +0 -1074
- package/dist/index-CYYjI7Uf.cjs +0 -1
- package/dist/index-C_6NXBlg.cjs +0 -3
- package/dist/index-Dd8DLyMx.cjs +0 -1
- package/dist/index-DizUWH6z.js +0 -47
- package/dist/index-QGplUHuy.js +0 -98
- package/dist/location-BGl5Ddds.cjs +0 -1
- package/dist/position-Cai5-wi1.cjs +0 -1
- package/dist/position-DIglP1l2.js +0 -85
- package/dist/scale-BtZINJ-A.cjs +0 -1
- package/dist/series-B9JERcqi.js +0 -1977
- package/dist/series-DqJ6f97G.cjs +0 -11
- package/dist/spatial-BSWPzMkK.js +0 -11
- package/dist/spatial-DGpZ2sO3.cjs +0 -1
- package/dist/src/color/transformColorsToHex.d.ts +0 -6
- package/dist/src/color/transformColorsToHex.d.ts.map +0 -1
- package/dist/src/primitive.d.ts +0 -9
- package/dist/src/primitive.d.ts.map +0 -1
- package/dist/src/toArray.d.ts +0 -3
- package/dist/src/toArray.d.ts.map +0 -1
- package/dist/src/zod/integer.d.ts +0 -10
- package/dist/src/zod/integer.d.ts.map +0 -1
- package/dist/src/zod/integer.spec.d.ts +0 -2
- package/dist/src/zod/integer.spec.d.ts.map +0 -1
- package/dist/toArray.cjs +0 -1
- package/dist/toArray.js +0 -5
- package/dist/xy-B7065J2S.cjs +0 -1
- package/src/color/transformColorsToHex.ts +0 -30
- package/src/primitive.ts +0 -46
- package/src/zod/integer.spec.ts +0 -148
- package/src/zod/integer.ts +0 -38
|
@@ -1,32 +1,32 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var i = (n, t, e) =>
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import {
|
|
7
|
-
import { b as
|
|
8
|
-
import {
|
|
9
|
-
const
|
|
1
|
+
var R = Object.defineProperty;
|
|
2
|
+
var T = (n, t, e) => t in n ? R(n, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : n[t] = e;
|
|
3
|
+
var i = (n, t, e) => T(n, typeof t != "symbol" ? t + "" : t, e);
|
|
4
|
+
import { j as y } from "./index-C9EdKeu1.js";
|
|
5
|
+
import { e as E, f as h, y as x, c as I } from "./index-ClrGyGDp.js";
|
|
6
|
+
import { x as j } from "./index-D6V-8SKw.js";
|
|
7
|
+
import { b as w, c as Y } from "./index-C-qYOegc.js";
|
|
8
|
+
import { o as v, n as g } from "./schemas-55Usj0Fg.js";
|
|
9
|
+
const D = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n, L = v({ offset: w, scale: w }), M = v({ offset: g(), scale: g() }), N = (n) => (t, e, s, r) => e === "dimension" ? [t, s] : [
|
|
10
10
|
t,
|
|
11
11
|
r ? s - n : s + n
|
|
12
|
-
],
|
|
12
|
+
], O = (n) => (t, e, s, r) => [
|
|
13
13
|
t,
|
|
14
14
|
r ? s / n : s * n
|
|
15
|
-
],
|
|
15
|
+
], U = (n) => (t, e, s) => {
|
|
16
16
|
if (t === null) return [n, s];
|
|
17
|
-
const { lower: r, upper: o } = t, { lower:
|
|
18
|
-
if (e === "dimension") return [n, s * (
|
|
19
|
-
const
|
|
20
|
-
return [n,
|
|
21
|
-
},
|
|
17
|
+
const { lower: r, upper: o } = t, { lower: u, upper: p } = n, d = o - r, m = p - u;
|
|
18
|
+
if (e === "dimension") return [n, s * (m / d)];
|
|
19
|
+
const B = (s - r) * (m / d) + u;
|
|
20
|
+
return [n, B];
|
|
21
|
+
}, X = (n) => (t, e, s) => [n, s], $ = () => (n, t, e) => {
|
|
22
22
|
if (n === null) throw new Error("cannot invert without bounds");
|
|
23
23
|
if (t === "dimension") return [n, e];
|
|
24
24
|
const { lower: s, upper: r } = n;
|
|
25
25
|
return [n, r - (e - s)];
|
|
26
|
-
},
|
|
26
|
+
}, q = (n) => (t, e, s) => {
|
|
27
27
|
const { lower: r, upper: o } = n;
|
|
28
|
-
return s =
|
|
29
|
-
},
|
|
28
|
+
return s = D(s, r, o), [t, s];
|
|
29
|
+
}, a = class a {
|
|
30
30
|
constructor() {
|
|
31
31
|
i(this, "ops", []);
|
|
32
32
|
i(this, "currBounds", null);
|
|
@@ -40,7 +40,7 @@ const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n
|
|
|
40
40
|
* @param value - The amount to translate by.
|
|
41
41
|
*/
|
|
42
42
|
static translate(t) {
|
|
43
|
-
return new
|
|
43
|
+
return new a().translate(t);
|
|
44
44
|
}
|
|
45
45
|
/**
|
|
46
46
|
* @returns a new scale with a magnification as its first operation. Any number provided
|
|
@@ -48,10 +48,10 @@ const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n
|
|
|
48
48
|
* @param value - The amount to translate by.
|
|
49
49
|
*/
|
|
50
50
|
static magnify(t) {
|
|
51
|
-
return new
|
|
51
|
+
return new a().magnify(t);
|
|
52
52
|
}
|
|
53
53
|
static scale(t, e) {
|
|
54
|
-
return new
|
|
54
|
+
return new a().scale(t, e);
|
|
55
55
|
}
|
|
56
56
|
/**
|
|
57
57
|
* @returns a copy of the scale with a translation as its next operation. Any
|
|
@@ -60,7 +60,7 @@ const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n
|
|
|
60
60
|
* @param value - The amount to translate by.
|
|
61
61
|
*/
|
|
62
62
|
translate(t) {
|
|
63
|
-
const e = this.new(), s =
|
|
63
|
+
const e = this.new(), s = N(t);
|
|
64
64
|
return s.type = "translate", e.ops.push(s), e;
|
|
65
65
|
}
|
|
66
66
|
/**
|
|
@@ -70,23 +70,23 @@ const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n
|
|
|
70
70
|
* @param value - The amount to magnify by.
|
|
71
71
|
*/
|
|
72
72
|
magnify(t) {
|
|
73
|
-
const e = this.new(), s =
|
|
73
|
+
const e = this.new(), s = O(t);
|
|
74
74
|
return s.type = "magnify", e.ops.push(s), e;
|
|
75
75
|
}
|
|
76
76
|
scale(t, e) {
|
|
77
|
-
const s =
|
|
77
|
+
const s = y(t, e), r = this.new(), o = U(s);
|
|
78
78
|
return o.type = "scale", r.ops.push(o), r;
|
|
79
79
|
}
|
|
80
80
|
clamp(t, e) {
|
|
81
|
-
const s =
|
|
81
|
+
const s = y(t, e), r = this.new(), o = q(s);
|
|
82
82
|
return o.type = "clamp", r.ops.push(o), r;
|
|
83
83
|
}
|
|
84
84
|
reBound(t, e) {
|
|
85
|
-
const s =
|
|
85
|
+
const s = y(t, e), r = this.new(), o = X(s);
|
|
86
86
|
return o.type = "re-bound", r.ops.push(o), r;
|
|
87
87
|
}
|
|
88
88
|
invert() {
|
|
89
|
-
const t =
|
|
89
|
+
const t = $();
|
|
90
90
|
t.type = "invert";
|
|
91
91
|
const e = this.new();
|
|
92
92
|
return e.ops.push(t), e;
|
|
@@ -98,7 +98,7 @@ const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n
|
|
|
98
98
|
return this.exec("dimension", t);
|
|
99
99
|
}
|
|
100
100
|
new() {
|
|
101
|
-
const t = new
|
|
101
|
+
const t = new a();
|
|
102
102
|
return t.ops = this.ops.slice(), t.reversed = this.reversed, t;
|
|
103
103
|
}
|
|
104
104
|
exec(t, e) {
|
|
@@ -112,9 +112,9 @@ const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n
|
|
|
112
112
|
t.ops.reverse();
|
|
113
113
|
const e = [];
|
|
114
114
|
return t.ops.forEach((s, r) => {
|
|
115
|
-
if (s.type === "scale" || e.some(([
|
|
115
|
+
if (s.type === "scale" || e.some(([u, p]) => r >= u && r <= p))
|
|
116
116
|
return;
|
|
117
|
-
const o = t.ops.findIndex((
|
|
117
|
+
const o = t.ops.findIndex((u, p) => u.type === "scale" && p > r);
|
|
118
118
|
o !== -1 && e.push([r, o]);
|
|
119
119
|
}), e.forEach(([s, r]) => {
|
|
120
120
|
const o = t.ops.slice(s, r);
|
|
@@ -125,8 +125,8 @@ const Y = (n, t, e) => t !== void 0 && n < t ? t : e !== void 0 && n > e ? e : n
|
|
|
125
125
|
return { scale: this.dim(1), offset: this.pos(0) };
|
|
126
126
|
}
|
|
127
127
|
};
|
|
128
|
-
i(
|
|
129
|
-
let l =
|
|
128
|
+
i(a, "IDENTITY", new a());
|
|
129
|
+
let l = a;
|
|
130
130
|
const c = class c {
|
|
131
131
|
constructor(t = new l(), e = new l(), s = null) {
|
|
132
132
|
i(this, "x");
|
|
@@ -156,7 +156,7 @@ const c = class c {
|
|
|
156
156
|
return new c().reBound(t);
|
|
157
157
|
}
|
|
158
158
|
translate(t, e) {
|
|
159
|
-
const s =
|
|
159
|
+
const s = Y(t, e), r = this.copy();
|
|
160
160
|
return r.x = this.x.translate(s.x), r.y = this.y.translate(s.y), r;
|
|
161
161
|
}
|
|
162
162
|
translateX(t) {
|
|
@@ -173,19 +173,19 @@ const c = class c {
|
|
|
173
173
|
}
|
|
174
174
|
scale(t) {
|
|
175
175
|
const e = this.copy();
|
|
176
|
-
if (
|
|
176
|
+
if (E(t)) {
|
|
177
177
|
const s = this.currRoot;
|
|
178
|
-
return e.currRoot = t.root, s != null && !
|
|
178
|
+
return e.currRoot = t.root, s != null && !j(s, t.root) && (s.x !== t.root.x && (e.x = e.x.invert()), s.y !== t.root.y && (e.y = e.y.invert())), e.x = e.x.scale(h(t)), e.y = e.y.scale(x(t)), e;
|
|
179
179
|
}
|
|
180
180
|
return e.x = e.x.scale(t.width), e.y = e.y.scale(t.height), e;
|
|
181
181
|
}
|
|
182
182
|
reBound(t) {
|
|
183
183
|
const e = this.copy();
|
|
184
|
-
return e.x = this.x.reBound(
|
|
184
|
+
return e.x = this.x.reBound(h(t)), e.y = this.y.reBound(x(t)), e;
|
|
185
185
|
}
|
|
186
186
|
clamp(t) {
|
|
187
187
|
const e = this.copy();
|
|
188
|
-
return e.x = this.x.clamp(
|
|
188
|
+
return e.x = this.x.clamp(h(t)), e.y = this.y.clamp(x(t)), e;
|
|
189
189
|
}
|
|
190
190
|
copy() {
|
|
191
191
|
const t = new c();
|
|
@@ -202,7 +202,7 @@ const c = class c {
|
|
|
202
202
|
return { x: this.x.dim(t.x), y: this.y.dim(t.y) };
|
|
203
203
|
}
|
|
204
204
|
box(t) {
|
|
205
|
-
return
|
|
205
|
+
return I(
|
|
206
206
|
this.pos(t.one),
|
|
207
207
|
this.pos(t.two),
|
|
208
208
|
0,
|
|
@@ -218,15 +218,15 @@ const c = class c {
|
|
|
218
218
|
}
|
|
219
219
|
};
|
|
220
220
|
i(c, "IDENTITY", new c());
|
|
221
|
-
let
|
|
222
|
-
const
|
|
221
|
+
let f = c;
|
|
222
|
+
const A = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
223
223
|
__proto__: null,
|
|
224
224
|
Scale: l,
|
|
225
|
-
XY:
|
|
226
|
-
crudeXYTransform:
|
|
227
|
-
transform:
|
|
225
|
+
XY: f,
|
|
226
|
+
crudeXYTransform: L,
|
|
227
|
+
transform: M
|
|
228
228
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
229
229
|
export {
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
D as c,
|
|
231
|
+
A as s
|
|
232
232
|
};
|
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
const
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { x as h, n as v, d as w, s as I, h as p } from "./base-B5lQIJKc.js";
|
|
2
|
+
import { u as A, n as X } from "./schemas-55Usj0Fg.js";
|
|
3
|
+
const Y = A([
|
|
4
|
+
X(),
|
|
5
|
+
h,
|
|
6
|
+
v,
|
|
6
7
|
w,
|
|
7
8
|
I,
|
|
8
|
-
|
|
9
|
-
M
|
|
9
|
+
p
|
|
10
10
|
]), s = (t, n) => {
|
|
11
11
|
if (typeof t == "string") {
|
|
12
12
|
if (n === void 0) throw new Error("The y coordinate must be given.");
|
|
13
13
|
return t === "x" ? { x: n, y: 0 } : { x: 0, y: n };
|
|
14
14
|
}
|
|
15
15
|
return typeof t == "number" ? { x: t, y: n ?? 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 };
|
|
16
|
-
}, N = Object.freeze({ x: 0, y: 0 }),
|
|
16
|
+
}, N = Object.freeze({ x: 0, y: 0 }), Z = Object.freeze({ x: 1, y: 1 }), E = Object.freeze({ x: 1 / 0, y: 1 / 0 }), T = Object.freeze({ x: NaN, y: NaN }), M = (t, n, e = 0) => {
|
|
17
17
|
const r = s(t), o = s(n);
|
|
18
18
|
return e === 0 ? r.x === o.x && r.y === o.y : Math.abs(r.x - o.x) <= e && Math.abs(r.y - o.y) <= e;
|
|
19
|
-
},
|
|
19
|
+
}, q = (t) => M(t, N), d = (t, n, e) => {
|
|
20
20
|
const r = s(t), o = s(n, e);
|
|
21
21
|
return { x: r.x * o.x, y: r.y * o.y };
|
|
22
|
-
},
|
|
22
|
+
}, O = (t, n) => {
|
|
23
23
|
const e = s(t);
|
|
24
24
|
return { x: e.x + n, y: e.y };
|
|
25
|
-
},
|
|
25
|
+
}, P = (t, n) => {
|
|
26
26
|
const e = s(t);
|
|
27
27
|
return { x: e.x, y: e.y + n };
|
|
28
|
-
},
|
|
29
|
-
const c = s(
|
|
28
|
+
}, _ = (t, n, e, ...r) => typeof n == "string" && typeof e == "number" ? n === "x" ? O(t, e) : P(t, e) : [t, n, e ?? N, ...r].reduce((o, y) => {
|
|
29
|
+
const c = s(y);
|
|
30
30
|
return { x: o.x + c.x, y: o.y + c.y };
|
|
31
|
-
}, N),
|
|
31
|
+
}, N), H = (t, n, e) => {
|
|
32
32
|
const r = s(t);
|
|
33
33
|
return n === "x" ? { x: e, y: r.y } : { x: r.x, y: e };
|
|
34
|
-
},
|
|
34
|
+
}, S = (t, n) => {
|
|
35
35
|
const e = s(t), r = s(n);
|
|
36
36
|
return Math.sqrt((e.x - r.x) ** 2 + (e.y - r.y) ** 2);
|
|
37
|
-
},
|
|
37
|
+
}, W = (t, n) => {
|
|
38
38
|
const e = s(t), r = s(n);
|
|
39
39
|
return { x: r.x - e.x, y: r.y - e.y };
|
|
40
|
-
},
|
|
40
|
+
}, C = (t) => {
|
|
41
41
|
const n = s(t);
|
|
42
42
|
return Number.isNaN(n.x) || Number.isNaN(n.y);
|
|
43
|
-
},
|
|
43
|
+
}, D = (t) => {
|
|
44
44
|
const n = s(t);
|
|
45
45
|
return Number.isFinite(n.x) && Number.isFinite(n.y);
|
|
46
|
-
},
|
|
46
|
+
}, L = (t) => {
|
|
47
47
|
const n = s(t);
|
|
48
48
|
return [n.x, n.y];
|
|
49
|
-
},
|
|
49
|
+
}, R = (t) => {
|
|
50
50
|
const n = s(t);
|
|
51
51
|
return { left: n.x, top: n.y };
|
|
52
|
-
},
|
|
52
|
+
}, $ = (t, n = 0) => {
|
|
53
53
|
const e = s(t);
|
|
54
54
|
return { x: Number(e.x.toFixed(n)), y: Number(e.y.toFixed(n)) };
|
|
55
55
|
}, f = (t, n) => {
|
|
@@ -61,72 +61,72 @@ const X = h.union([
|
|
|
61
61
|
}, j = (t) => {
|
|
62
62
|
const n = s(t), e = Math.hypot(n.x, n.y);
|
|
63
63
|
return e === 0 ? { x: 0, y: 0 } : { x: n.x / e, y: n.y / e };
|
|
64
|
-
},
|
|
65
|
-
const n = t.reduce((e, r) =>
|
|
64
|
+
}, z = (...t) => {
|
|
65
|
+
const n = t.reduce((e, r) => _(e, r), N);
|
|
66
66
|
return d(n, 1 / t.length);
|
|
67
|
-
},
|
|
67
|
+
}, k = (t, n) => {
|
|
68
68
|
const e = [];
|
|
69
69
|
for (let r = 0; r < t.length; r++) {
|
|
70
70
|
const o = t[r];
|
|
71
|
-
let
|
|
71
|
+
let y, c, b, i;
|
|
72
72
|
if (r === 0) {
|
|
73
73
|
const x = t[r + 1], u = f(x, o);
|
|
74
|
-
c = m(u), b = c,
|
|
74
|
+
c = m(u), b = c, i = n;
|
|
75
75
|
} else if (r === t.length - 1) {
|
|
76
76
|
const x = t[r - 1], u = f(o, x);
|
|
77
|
-
|
|
77
|
+
y = m(u), b = y, i = n;
|
|
78
78
|
} else {
|
|
79
79
|
const x = t[r - 1], u = t[r + 1], a = f(o, x), l = f(u, o);
|
|
80
|
-
|
|
81
|
-
const
|
|
80
|
+
y = m(a), c = m(l);
|
|
81
|
+
const F = Math.acos(
|
|
82
82
|
(a.x * l.x + a.y * l.y) / (Math.hypot(a.x, a.y) * Math.hypot(l.x, l.y))
|
|
83
|
-
), g = Math.sin(
|
|
84
|
-
g === 0 ?
|
|
83
|
+
), g = Math.sin(F / 2);
|
|
84
|
+
g === 0 ? i = n : i = n / g, b = j(z(y, c));
|
|
85
85
|
}
|
|
86
|
-
e.push(d(b,
|
|
86
|
+
e.push(d(b, i));
|
|
87
87
|
}
|
|
88
88
|
return e;
|
|
89
|
-
},
|
|
89
|
+
}, B = (t) => {
|
|
90
90
|
const n = s(t);
|
|
91
91
|
return { x: n.y, y: n.x };
|
|
92
|
-
},
|
|
92
|
+
}, K = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
93
93
|
__proto__: null,
|
|
94
|
-
INFINITY:
|
|
95
|
-
NAN:
|
|
96
|
-
ONE:
|
|
94
|
+
INFINITY: E,
|
|
95
|
+
NAN: T,
|
|
96
|
+
ONE: Z,
|
|
97
97
|
ZERO: N,
|
|
98
|
-
average:
|
|
99
|
-
calculateMiters:
|
|
100
|
-
clientXY:
|
|
98
|
+
average: z,
|
|
99
|
+
calculateMiters: k,
|
|
100
|
+
clientXY: p,
|
|
101
101
|
construct: s,
|
|
102
|
-
couple:
|
|
103
|
-
crudeZ:
|
|
104
|
-
css:
|
|
105
|
-
distance:
|
|
106
|
-
equals:
|
|
107
|
-
isFinite:
|
|
108
|
-
isNan:
|
|
109
|
-
isZero:
|
|
102
|
+
couple: L,
|
|
103
|
+
crudeZ: Y,
|
|
104
|
+
css: R,
|
|
105
|
+
distance: S,
|
|
106
|
+
equals: M,
|
|
107
|
+
isFinite: D,
|
|
108
|
+
isNan: C,
|
|
109
|
+
isZero: q,
|
|
110
110
|
normal: m,
|
|
111
111
|
normalize: j,
|
|
112
112
|
scale: d,
|
|
113
|
-
set:
|
|
113
|
+
set: H,
|
|
114
114
|
sub: f,
|
|
115
|
-
swap:
|
|
116
|
-
translate:
|
|
117
|
-
translateX:
|
|
118
|
-
translateY:
|
|
119
|
-
translation:
|
|
120
|
-
truncate:
|
|
121
|
-
xy:
|
|
115
|
+
swap: B,
|
|
116
|
+
translate: _,
|
|
117
|
+
translateX: O,
|
|
118
|
+
translateY: P,
|
|
119
|
+
translation: W,
|
|
120
|
+
truncate: $,
|
|
121
|
+
xy: h
|
|
122
122
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
123
123
|
export {
|
|
124
|
-
|
|
124
|
+
Z as O,
|
|
125
125
|
N as Z,
|
|
126
|
-
|
|
127
|
-
|
|
126
|
+
$ as a,
|
|
127
|
+
Y as b,
|
|
128
128
|
s as c,
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
129
|
+
M as e,
|
|
130
|
+
_ as t,
|
|
131
|
+
K as x
|
|
132
132
|
};
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
var N = Object.defineProperty;
|
|
2
|
+
var p = (e, t, r) => t in e ? N(e, t, { enumerable: !0, configurable: !0, writable: !0, value: r }) : e[t] = r;
|
|
3
|
+
var m = (e, t, r) => p(e, typeof t != "symbol" ? t + "" : t, r);
|
|
4
|
+
import { a as b } from "./index-D4NCYiQB.js";
|
|
5
|
+
class d {
|
|
6
|
+
constructor(t) {
|
|
7
|
+
/** The underlying primitive value */
|
|
8
|
+
m(this, "value");
|
|
9
|
+
this.value = t;
|
|
10
|
+
}
|
|
11
|
+
/** Overrides the JS default valueOf() function to return the primitive value. */
|
|
12
|
+
valueOf() {
|
|
13
|
+
return this.value;
|
|
14
|
+
}
|
|
15
|
+
/** toJSON ensures that only the primitive value gets encoded during JSON
|
|
16
|
+
* stringification. */
|
|
17
|
+
toJSON() {
|
|
18
|
+
return this.value;
|
|
19
|
+
}
|
|
20
|
+
/** @returns a string representation of the item. */
|
|
21
|
+
toString() {
|
|
22
|
+
return this.value.toString();
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
const l = (e) => e != null && typeof e == "object" && "toString" in e, S = (e) => {
|
|
26
|
+
if (l(e)) return (e == null ? void 0 : e.toString().length) === 0;
|
|
27
|
+
switch (typeof e) {
|
|
28
|
+
case "string":
|
|
29
|
+
return e.length === 0;
|
|
30
|
+
case "number":
|
|
31
|
+
return e === 0;
|
|
32
|
+
case "bigint":
|
|
33
|
+
return e === 0n;
|
|
34
|
+
case "boolean":
|
|
35
|
+
return !e;
|
|
36
|
+
case "undefined":
|
|
37
|
+
return !0;
|
|
38
|
+
case "object":
|
|
39
|
+
return e == null;
|
|
40
|
+
default:
|
|
41
|
+
return !1;
|
|
42
|
+
}
|
|
43
|
+
}, G = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
44
|
+
__proto__: null,
|
|
45
|
+
ValueExtension: d,
|
|
46
|
+
isStringer: l,
|
|
47
|
+
isZero: S
|
|
48
|
+
}, Symbol.toStringTag, { value: "Module" })), g = (e, t = !1) => {
|
|
49
|
+
const r = l(e) ? "stringer" : typeof e;
|
|
50
|
+
let n;
|
|
51
|
+
switch (r) {
|
|
52
|
+
case "string":
|
|
53
|
+
n = (s, o) => s.localeCompare(o);
|
|
54
|
+
break;
|
|
55
|
+
case "stringer":
|
|
56
|
+
n = (s, o) => s.toString().localeCompare(o.toString());
|
|
57
|
+
break;
|
|
58
|
+
case "number":
|
|
59
|
+
n = (s, o) => Number(s) - Number(o);
|
|
60
|
+
break;
|
|
61
|
+
case "bigint":
|
|
62
|
+
n = (s, o) => BigInt(s) - BigInt(o) > 0n ? 1 : -1;
|
|
63
|
+
break;
|
|
64
|
+
case "boolean":
|
|
65
|
+
n = (s, o) => Number(s) - Number(o);
|
|
66
|
+
break;
|
|
67
|
+
case "undefined":
|
|
68
|
+
n = () => 0;
|
|
69
|
+
break;
|
|
70
|
+
default:
|
|
71
|
+
return console.warn(`sortFunc: unknown type ${r}`), () => -1;
|
|
72
|
+
}
|
|
73
|
+
return t ? h(n) : n;
|
|
74
|
+
}, _ = (e, t, r) => {
|
|
75
|
+
const n = g(t[e], r);
|
|
76
|
+
return (s, o) => n(s[e], o[e]);
|
|
77
|
+
}, y = (e, t) => e.length !== t.length ? e.length - t.length : e.every((r, n) => r === t[n]) ? 0 : -1, f = (e, t) => {
|
|
78
|
+
if (e.length !== t.length) return e.length - t.length;
|
|
79
|
+
if (e.length === 0) return 0;
|
|
80
|
+
const r = g(e[0]), n = [...e].sort(r), s = [...t].sort(r);
|
|
81
|
+
return n.every((o, i) => o === s[i]) ? 0 : -1;
|
|
82
|
+
}, A = (e, t) => {
|
|
83
|
+
const r = b(e), n = b(t);
|
|
84
|
+
return f(r, n);
|
|
85
|
+
}, T = (e, t) => e === t ? 0 : e === "first" && t === "last" ? 1 : -1, h = (e) => (t, r) => e(r, t), c = 0, E = -1, P = 1, j = (e) => e < c, q = (e) => e > c, w = (e) => e >= c, F = (e) => e === c, O = (e, t) => {
|
|
86
|
+
const r = /([a-zA-Z]+)|(\d+)/g, n = e.replace(/[\s_.-]+/g, "").match(r), s = t.replace(/[\s_.-]+/g, "").match(r);
|
|
87
|
+
if (!n || !s) return 0;
|
|
88
|
+
for (let o = 0; o < Math.min(n.length, s.length); o++) {
|
|
89
|
+
const i = n[o], u = s[o];
|
|
90
|
+
if (isNaN(Number(i)) && isNaN(Number(u))) {
|
|
91
|
+
const a = i.localeCompare(u);
|
|
92
|
+
if (a !== 0) return a;
|
|
93
|
+
} else if (!isNaN(Number(i)) && !isNaN(Number(u))) {
|
|
94
|
+
const a = Number(i) - Number(u);
|
|
95
|
+
if (a !== 0) return a;
|
|
96
|
+
} else return isNaN(Number(i)) ? -1 : 1;
|
|
97
|
+
}
|
|
98
|
+
return n.length - s.length;
|
|
99
|
+
}, L = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
100
|
+
__proto__: null,
|
|
101
|
+
EQUAL: c,
|
|
102
|
+
GREATER_THAN: P,
|
|
103
|
+
LESS_THAN: E,
|
|
104
|
+
isEqualTo: F,
|
|
105
|
+
isGreaterThan: q,
|
|
106
|
+
isGreaterThanEqual: w,
|
|
107
|
+
isLessThan: j,
|
|
108
|
+
newF: g,
|
|
109
|
+
newFieldF: _,
|
|
110
|
+
order: T,
|
|
111
|
+
primitiveArrays: y,
|
|
112
|
+
reverseF: h,
|
|
113
|
+
stringsWithNumbers: O,
|
|
114
|
+
uniqueUnorderedPrimitiveArrays: A,
|
|
115
|
+
unorderedPrimitiveArrays: f
|
|
116
|
+
}, Symbol.toStringTag, { value: "Module" }));
|
|
117
|
+
export {
|
|
118
|
+
c as E,
|
|
119
|
+
P as G,
|
|
120
|
+
E as L,
|
|
121
|
+
d as V,
|
|
122
|
+
q as a,
|
|
123
|
+
j as b,
|
|
124
|
+
L as c,
|
|
125
|
+
F as i,
|
|
126
|
+
g as n,
|
|
127
|
+
G as p
|
|
128
|
+
};
|