@synnaxlabs/x 0.24.1 → 0.25.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 (161) hide show
  1. package/.turbo/turbo-build.log +40 -41
  2. package/dist/binary.cjs +3 -3
  3. package/dist/binary.js +35 -35
  4. package/dist/bounds-CpboA0q6.js +127 -0
  5. package/dist/bounds-ZZc1c-_Z.cjs +1 -0
  6. package/dist/bounds.cjs +1 -1
  7. package/dist/bounds.js +1 -1
  8. package/dist/{box-m3dlc1kR.cjs → box-BcFruCBW.cjs} +1 -1
  9. package/dist/{box-C92jYSNY.js → box-DC5oviHL.js} +5 -8
  10. package/dist/box.cjs +1 -1
  11. package/dist/box.js +1 -1
  12. package/dist/caseconv.cjs +1 -1
  13. package/dist/caseconv.js +1 -1
  14. package/dist/compare.cjs +1 -1
  15. package/dist/compare.js +1 -1
  16. package/dist/deep.cjs +1 -1
  17. package/dist/deep.js +35 -51
  18. package/dist/{dimensions-BAuHfd-b.js → dimensions-D-1PnJVI.js} +1 -2
  19. package/dist/dimensions.js +1 -1
  20. package/dist/{external-DI9122wF.js → external-CO221aaF.js} +4 -8
  21. package/dist/index-2SfxIaaU.cjs +1 -0
  22. package/dist/index-CQk9JICS.js +41 -0
  23. package/dist/{index-BhEWuRmo.cjs → index-CvHP07Bs.cjs} +1 -1
  24. package/dist/{index-IGDDLWef.js → index-DCwgKLH_.js} +7 -13
  25. package/dist/index.cjs +2 -2
  26. package/dist/index.js +135 -120
  27. package/dist/{location-CfP9TAnW.js → location-D4yS2DfR.js} +1 -1
  28. package/dist/{location-c3g6WKs-.cjs → location-wMqTcQ0n.cjs} +1 -1
  29. package/dist/location.cjs +1 -1
  30. package/dist/location.js +1 -1
  31. package/dist/observe.cjs +1 -1
  32. package/dist/observe.js +2 -3
  33. package/dist/path-Coj1BKMh.cjs +1 -0
  34. package/dist/path-DH9iaDDf.js +58 -0
  35. package/dist/{position-BBnkwGX1.cjs → position-DolPXOLe.cjs} +1 -1
  36. package/dist/{position-B_aphAR0.js → position-DvsYXRzE.js} +4 -6
  37. package/dist/position.cjs +1 -1
  38. package/dist/position.js +1 -1
  39. package/dist/runtime.js +1 -1
  40. package/dist/{scale-CgtgqlYU.js → scale-6y6-BcVI.js} +42 -40
  41. package/dist/scale-D_uVU2Fw.cjs +1 -0
  42. package/dist/scale.cjs +1 -1
  43. package/dist/scale.js +1 -1
  44. package/dist/search.js +1 -2
  45. package/dist/{series-w7kOJP17.js → series-B3wKdjpi.js} +118 -141
  46. package/dist/series-PoUlr-RX.cjs +11 -0
  47. package/dist/spatial.cjs +1 -1
  48. package/dist/spatial.js +7 -7
  49. package/dist/src/binary/encoder.d.ts.map +1 -1
  50. package/dist/src/caseconv/caseconv.d.ts +41 -4
  51. package/dist/src/caseconv/caseconv.d.ts.map +1 -1
  52. package/dist/src/caseconv/caseconv.spec.d.ts +2 -0
  53. package/dist/src/caseconv/caseconv.spec.d.ts.map +1 -0
  54. package/dist/src/change/change.d.ts.map +1 -1
  55. package/dist/src/clamp/clamp.d.ts +3 -1
  56. package/dist/src/clamp/clamp.d.ts.map +1 -1
  57. package/dist/src/compare/compare.d.ts +1 -1
  58. package/dist/src/compare/compare.d.ts.map +1 -1
  59. package/dist/src/control/control.d.ts.map +1 -1
  60. package/dist/src/debounce/debounce.d.ts.map +1 -1
  61. package/dist/src/deep/copy.d.ts.map +1 -1
  62. package/dist/src/deep/delete.d.ts.map +1 -1
  63. package/dist/src/deep/difference.d.ts.map +1 -1
  64. package/dist/src/deep/equal.d.ts +8 -2
  65. package/dist/src/deep/equal.d.ts.map +1 -1
  66. package/dist/src/deep/merge.d.ts +1 -1
  67. package/dist/src/deep/merge.d.ts.map +1 -1
  68. package/dist/src/deep/path.d.ts +1 -3
  69. package/dist/src/deep/path.d.ts.map +1 -1
  70. package/dist/src/errors/errors.d.ts +12 -0
  71. package/dist/src/errors/errors.d.ts.map +1 -0
  72. package/dist/src/errors/index.d.ts +2 -0
  73. package/dist/src/errors/index.d.ts.map +1 -0
  74. package/dist/src/id/id.d.ts +4 -0
  75. package/dist/src/id/id.d.ts.map +1 -0
  76. package/dist/src/id/index.d.ts +2 -0
  77. package/dist/src/id/index.d.ts.map +1 -0
  78. package/dist/src/identity.d.ts.map +1 -1
  79. package/dist/src/index.d.ts +2 -0
  80. package/dist/src/index.d.ts.map +1 -1
  81. package/dist/src/math/math.d.ts.map +1 -1
  82. package/dist/src/migrate/migrate.d.ts +3 -3
  83. package/dist/src/migrate/migrate.d.ts.map +1 -1
  84. package/dist/src/mock/MockGLBufferController.d.ts +1 -1
  85. package/dist/src/numeric/index.d.ts +2 -0
  86. package/dist/src/numeric/index.d.ts.map +1 -0
  87. package/dist/src/numeric/numeric.d.ts +3 -0
  88. package/dist/src/numeric/numeric.d.ts.map +1 -0
  89. package/dist/src/record.d.ts +1 -1
  90. package/dist/src/record.d.ts.map +1 -1
  91. package/dist/src/runtime/os.d.ts.map +1 -1
  92. package/dist/src/search.d.ts +1 -1
  93. package/dist/src/search.d.ts.map +1 -1
  94. package/dist/src/shallowCopy.d.ts.map +1 -1
  95. package/dist/src/spatial/bounds/bounds.d.ts +19 -17
  96. package/dist/src/spatial/bounds/bounds.d.ts.map +1 -1
  97. package/dist/src/spatial/box/box.d.ts +1 -14
  98. package/dist/src/spatial/box/box.d.ts.map +1 -1
  99. package/dist/src/spatial/dimensions/dimensions.d.ts +1 -1
  100. package/dist/src/spatial/direction/direction.d.ts +1 -1
  101. package/dist/src/spatial/direction/direction.d.ts.map +1 -1
  102. package/dist/src/spatial/location/location.d.ts +3 -3
  103. package/dist/src/spatial/location/location.d.ts.map +1 -1
  104. package/dist/src/spatial/position/position.d.ts +2 -2
  105. package/dist/src/spatial/position/position.d.ts.map +1 -1
  106. package/dist/src/spatial/scale/scale.d.ts +27 -23
  107. package/dist/src/spatial/scale/scale.d.ts.map +1 -1
  108. package/dist/src/spatial/xy/xy.d.ts +1 -1
  109. package/dist/src/spatial/xy/xy.d.ts.map +1 -1
  110. package/dist/src/telem/series.d.ts +3 -3
  111. package/dist/src/telem/series.d.ts.map +1 -1
  112. package/dist/src/telem/telem.d.ts +2 -2
  113. package/dist/src/telem/telem.d.ts.map +1 -1
  114. package/dist/src/toArray.d.ts.map +1 -1
  115. package/dist/src/unique.d.ts.map +1 -1
  116. package/dist/src/url/url.d.ts.map +1 -1
  117. package/dist/src/zodutil/zodutil.d.ts +1 -1
  118. package/dist/telem.cjs +1 -1
  119. package/dist/telem.js +1 -1
  120. package/dist/url.cjs +1 -1
  121. package/dist/url.js +1 -1
  122. package/dist/worker.cjs +1 -1
  123. package/dist/worker.js +1 -1
  124. package/dist/{xy-D1ZbIqpT.js → xy-CrgPnICw.js} +1 -2
  125. package/dist/xy.js +1 -1
  126. package/dist/zodutil.cjs +1 -1
  127. package/dist/zodutil.js +2 -3
  128. package/package.json +7 -7
  129. package/src/binary/encoder.spec.ts +1 -1
  130. package/src/binary/encoder.ts +4 -2
  131. package/src/caseconv/caseconv.spec.ts +121 -0
  132. package/src/caseconv/caseconv.ts +114 -14
  133. package/src/clamp/clamp.ts +5 -3
  134. package/src/compare/compare.ts +2 -2
  135. package/src/deep/delete.spec.ts +38 -1
  136. package/src/deep/delete.ts +1 -2
  137. package/src/deep/path.ts +0 -7
  138. package/src/errors/errors.ts +17 -0
  139. package/src/errors/index.ts +1 -0
  140. package/src/id/id.ts +14 -0
  141. package/src/id/index.ts +10 -0
  142. package/src/index.ts +2 -0
  143. package/src/numeric/index.ts +1 -0
  144. package/src/numeric/numeric.ts +6 -0
  145. package/src/record.ts +1 -1
  146. package/src/spatial/bounds/bounds.spec.ts +47 -0
  147. package/src/spatial/bounds/bounds.ts +36 -20
  148. package/src/spatial/scale/scale.spec.ts +5 -5
  149. package/src/spatial/scale/scale.ts +75 -59
  150. package/src/telem/series.ts +9 -6
  151. package/src/telem/telem.spec.ts +24 -1
  152. package/src/telem/telem.ts +1 -1
  153. package/tsconfig.tsbuildinfo +1 -1
  154. package/dist/bounds-Bh_QBZZK.cjs +0 -1
  155. package/dist/bounds-Dmn-hd_-.js +0 -129
  156. package/dist/index-BpCPHf78.cjs +0 -1
  157. package/dist/index-BwkQTA-j.js +0 -360
  158. package/dist/path-BO4pyGZf.cjs +0 -1
  159. package/dist/path-nTHmt_4i.js +0 -65
  160. package/dist/scale-C8axypQ2.cjs +0 -1
  161. package/dist/series-Cgjkfl5S.cjs +0 -11
@@ -1,16 +1,15 @@
1
1
 
2
- > @synnaxlabs/x@0.24.1 build /home/runner/work/synnax/synnax/x/ts
2
+ > @synnaxlabs/x@0.25.0 build /home/runner/work/synnax/synnax/x/ts
3
3
  > tsc --noEmit && vite build
4
4
 
5
5
   Synnax - Production mode
6
- vite v5.2.11 building for production...
6
+ vite v5.3.3 building for production...
7
7
  transforming...
8
- [plugin:vite:resolve] [plugin vite:resolve] Module "crypto" has been externalized for browser compatibility, imported by "/home/runner/work/synnax/synnax/node_modules/.pnpm/nanoid@3.0.0/node_modules/nanoid/index.js". See https://vitejs.dev/guide/troubleshooting.html#module-externalized-for-browser-compatibility for more details.
9
- ✓ 132 modules transformed.
8
+ ✓ 81 modules transformed.
10
9
  Generated an empty chunk: "destructor".
11
10
  rendering chunks...
12
- 
13
- [vite:dts] Start generate declaration files...
11
+
12
+ [vite:dts] Start generate declaration files...
14
13
  computing gzip size...
15
14
  dist/destructor.js  0.00 kB │ gzip: 0.02 kB
16
15
  dist/unique.js  0.06 kB │ gzip: 0.08 kB
@@ -30,7 +29,7 @@ computing gzip size...
30
29
  dist/toArray.js  0.15 kB │ gzip: 0.12 kB
31
30
  dist/kv.js  0.17 kB │ gzip: 0.15 kB
32
31
  dist/record.js  0.20 kB │ gzip: 0.17 kB
33
- dist/search.js  0.27 kB │ gzip: 0.20 kB
32
+ dist/search.js  0.26 kB │ gzip: 0.19 kB
34
33
  dist/spatial-DozyssiN.js  0.28 kB │ gzip: 0.23 kB
35
34
  dist/change-DLl6DccR.js  0.30 kB │ gzip: 0.23 kB
36
35
  dist/debounce.js  0.36 kB │ gzip: 0.18 kB
@@ -38,27 +37,27 @@ computing gzip size...
38
37
  dist/spatial.js  0.58 kB │ gzip: 0.28 kB
39
38
  dist/direction-CScbfCdT.js  0.65 kB │ gzip: 0.37 kB
40
39
  dist/zodutil.js  0.68 kB │ gzip: 0.43 kB
41
- dist/external-DI9122wF.js  0.87 kB │ gzip: 0.51 kB
42
- dist/observe.js  1.13 kB │ gzip: 0.47 kB
40
+ dist/external-CO221aaF.js  0.86 kB │ gzip: 0.51 kB
41
+ dist/observe.js  1.12 kB │ gzip: 0.47 kB
43
42
  dist/worker.js  1.17 kB │ gzip: 0.53 kB
44
43
  dist/base-DnZzEvvz.js  1.21 kB │ gzip: 0.51 kB
45
- dist/dimensions-BAuHfd-b.js  1.50 kB │ gzip: 0.66 kB
46
- dist/path-nTHmt_4i.js  1.50 kB │ gzip: 0.62 kB
44
+ dist/path-DH9iaDDf.js  1.36 kB │ gzip: 0.55 kB
45
+ dist/dimensions-D-1PnJVI.js  1.49 kB │ gzip: 0.66 kB
46
+ dist/index-CQk9JICS.js  1.67 kB │ gzip: 0.80 kB
47
47
  dist/url.js  1.98 kB │ gzip: 0.87 kB
48
- dist/position-B_aphAR0.js  2.25 kB │ gzip: 1.07 kB
49
- dist/xy-D1ZbIqpT.js  2.61 kB │ gzip: 1.05 kB
50
- dist/index-IGDDLWef.js  2.71 kB │ gzip: 1.05 kB
51
- dist/location-CfP9TAnW.js  2.80 kB │ gzip: 1.16 kB
52
- dist/binary.js  2.96 kB │ gzip: 1.11 kB
53
- dist/deep.js  3.35 kB │ gzip: 1.30 kB
54
- dist/bounds-Dmn-hd_-.js  4.52 kB │ gzip: 1.55 kB
55
- dist/scale-CgtgqlYU.js  5.66 kB │ gzip: 1.77 kB
56
- dist/index.js  5.84 kB │ gzip: 2.30 kB
57
- dist/box-C92jYSNY.js  6.13 kB │ gzip: 2.16 kB
58
- dist/index-BwkQTA-j.js 12.69 kB │ gzip: 2.25 kB
59
- dist/series-w7kOJP17.js 53.98 kB gzip: 12.12 kB
60
- [vite:dts] Declaration files built in 3553ms.
61
- 
48
+ dist/position-DvsYXRzE.js  2.25 kB │ gzip: 1.06 kB
49
+ dist/xy-CrgPnICw.js  2.61 kB │ gzip: 1.05 kB
50
+ dist/index-DCwgKLH_.js  2.67 kB │ gzip: 1.05 kB
51
+ dist/location-D4yS2DfR.js  2.80 kB │ gzip: 1.16 kB
52
+ dist/binary.js  2.97 kB │ gzip: 1.12 kB
53
+ dist/deep.js  3.23 kB │ gzip: 1.27 kB
54
+ dist/bounds-CpboA0q6.js  4.87 kB │ gzip: 1.63 kB
55
+ dist/scale-6y6-BcVI.js  5.64 kB │ gzip: 1.77 kB
56
+ dist/box-DC5oviHL.js  6.11 kB │ gzip: 2.17 kB
57
+ dist/index.js  6.36 kB │ gzip: 2.48 kB
58
+ dist/series-B3wKdjpi.js 54.03 kB │ gzip: 12.23 kB
59
+ [vite:dts] Declaration files built in 3655ms.
60
+
62
61
  Generated an empty chunk: "destructor".
63
62
  dist/destructor.cjs  0.01 kB │ gzip: 0.03 kB
64
63
  dist/unique.cjs  0.13 kB │ gzip: 0.14 kB
@@ -84,25 +83,25 @@ Generated an empty chunk: "destructor".
84
83
  dist/debounce.cjs  0.33 kB │ gzip: 0.22 kB
85
84
  dist/direction-DZbN47uL.cjs  0.53 kB │ gzip: 0.34 kB
86
85
  dist/telem.cjs  0.54 kB │ gzip: 0.27 kB
87
- dist/zodutil.cjs  0.59 kB │ gzip: 0.39 kB
86
+ dist/zodutil.cjs  0.59 kB │ gzip: 0.38 kB
88
87
  dist/spatial.cjs  0.63 kB │ gzip: 0.33 kB
89
88
  dist/external-B-DoBvh7.cjs  0.68 kB │ gzip: 0.45 kB
90
- dist/observe.cjs  0.88 kB │ gzip: 0.42 kB
91
- dist/worker.cjs  0.95 kB │ gzip: 0.49 kB
89
+ dist/observe.cjs  0.88 kB │ gzip: 0.41 kB
90
+ dist/worker.cjs  0.94 kB │ gzip: 0.49 kB
91
+ dist/path-Coj1BKMh.cjs  1.04 kB │ gzip: 0.51 kB
92
92
  dist/url.cjs  1.10 kB │ gzip: 0.60 kB
93
93
  dist/dimensions-zMcb9pMk.cjs  1.17 kB │ gzip: 0.58 kB
94
- dist/path-BO4pyGZf.cjs  1.17 kB │ gzip: 0.58 kB
94
+ dist/index-2SfxIaaU.cjs  1.32 kB │ gzip: 0.71 kB
95
95
  dist/base-B48bPNx5.cjs  1.38 kB │ gzip: 0.57 kB
96
- dist/position-BBnkwGX1.cjs  1.71 kB │ gzip: 0.94 kB
96
+ dist/position-DolPXOLe.cjs  1.71 kB │ gzip: 0.94 kB
97
97
  dist/xy-cP-FXJtR.cjs  2.00 kB │ gzip: 0.96 kB
98
- dist/index-BhEWuRmo.cjs  2.01 kB │ gzip: 0.94 kB
99
- dist/binary.cjs  2.35 kB │ gzip: 1.01 kB
100
- dist/location-c3g6WKs-.cjs  2.37 kB │ gzip: 1.04 kB
101
- dist/deep.cjs  2.43 kB │ gzip: 1.10 kB
102
- dist/bounds-Bh_QBZZK.cjs  3.42 kB │ gzip: 1.37 kB
103
- dist/scale-C8axypQ2.cjs  4.24 kB │ gzip: 1.56 kB
104
- dist/box-m3dlc1kR.cjs  4.73 kB │ gzip: 1.94 kB
105
- dist/index.cjs  4.96 kB │ gzip: 2.01 kB
106
- dist/index-BpCPHf78.cjs 10.14 kB │ gzip: 2.03 kB
107
- dist/series-Cgjkfl5S.cjs 29.66 kB gzip: 8.16 kB
108
- ✓ built in 4.14s
98
+ dist/index-CvHP07Bs.cjs  2.01 kB │ gzip: 0.94 kB
99
+ dist/binary.cjs  2.37 kB │ gzip: 1.02 kB
100
+ dist/location-wMqTcQ0n.cjs  2.37 kB │ gzip: 1.04 kB
101
+ dist/deep.cjs  2.39 kB │ gzip: 1.08 kB
102
+ dist/bounds-ZZc1c-_Z.cjs  3.72 kB │ gzip: 1.44 kB
103
+ dist/scale-D_uVU2Fw.cjs  4.22 kB │ gzip: 1.56 kB
104
+ dist/box-BcFruCBW.cjs  4.73 kB │ gzip: 1.94 kB
105
+ dist/index.cjs  5.31 kB │ gzip: 2.11 kB
106
+ dist/series-PoUlr-RX.cjs 29.84 kB │ gzip: 8.25 kB
107
+ ✓ built in 4.18s
package/dist/binary.cjs CHANGED
@@ -1,3 +1,3 @@
1
- "use strict";var E=Object.defineProperty;var T=(n,e,t)=>e in n?E(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t;var i=(n,e,t)=>(T(n,typeof e!="symbol"?e+"":e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./index-BpCPHf78.cjs"),f=require("./identity.cjs");class p{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)).buffer}decode(e,t){return this.decodeString(this.decoder.decode(e),t)}decodeString(e,t){const r=a.toCamel(JSON.parse(e));return t!=null?t.parse(r):r}encodeString(e){return JSON.stringify(a.toSnake(e),(t,r)=>ArrayBuffer.isView(r)?Array.from(r):f.isObject(r)&&"encode_value"in r?typeof r.value=="bigint"?r.value.toString():r.value:typeof r=="bigint"?r.toString():r)}static registerCustomType(){}}class g{constructor(){i(this,"contentType","text/csv")}encode(e){const t=this.encodeString(e);return new TextEncoder().encode(t).buffer}decode(e,t){const r=new TextDecoder().decode(e);return this.decodeString(r,t)}encodeString(e){if(!Array.isArray(e)||e.length===0||!f.isObject(e[0]))throw new Error("Payload must be an array of objects");const t=Object.keys(e[0]),r=[t.join(",")];return e.forEach(d=>{const s=t.map(c=>JSON.stringify(d[c]??""));r.push(s.join(","))}),r.join(`
2
- `)}decodeString(e,t){const[r,...d]=e.trim().split(`
3
- `).map(o=>o.trim());if(r.length===0)return t!=null?t.parse({}):{};const s=r.split(",").map(o=>o.trim()),c={};return s.forEach(o=>{c[o]=[]}),d.forEach(o=>{const h=o.split(",").map(u=>u.trim());s.forEach((u,b)=>{const l=this.parseValue(h[b]);l!=null&&c[u].push(l)})}),t!=null?t.parse(c):c}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}static registerCustomType(){}}class S{constructor(){i(this,"contentType","text/plain")}encode(e){return new TextEncoder().encode(e).buffer}decode(e,t){const r=new TextDecoder().decode(e);return t!=null?t.parse(r):r}}const y=new p,w=new g,m=new S,O=[y],j=Object.freeze(Object.defineProperty({__proto__:null,CSVEncoderDecoder:g,CSV_ECD:w,ENCODERS:O,JSONEncoderDecoder:p,JSON_ECD:y,TEXT_ECD:m,TextEncoderDecoder:S},Symbol.toStringTag,{value:"Module"}));exports.binary=j;
1
+ "use strict";var b=Object.defineProperty;var E=(o,e,t)=>e in o?b(o,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):o[e]=t;var i=(o,e,t)=>E(o,typeof e!="symbol"?e+"":e,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("./index-2SfxIaaU.cjs"),f=require("./identity.cjs");class p{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)).buffer}decode(e,t){return this.decodeString(this.decoder.decode(e),t)}decodeString(e,t){const n=JSON.parse(e),r=l.snakeToCamel(n);return t!=null?t.parse(r):r}encodeString(e){const t=l.camelToSnake(e);return JSON.stringify(t,(n,r)=>ArrayBuffer.isView(r)?Array.from(r):f.isObject(r)&&"encode_value"in r?typeof r.value=="bigint"?r.value.toString():r.value:typeof r=="bigint"?r.toString():r)}static registerCustomType(){}}class g{constructor(){i(this,"contentType","text/csv")}encode(e){const t=this.encodeString(e);return new TextEncoder().encode(t).buffer}decode(e,t){const n=new TextDecoder().decode(e);return this.decodeString(n,t)}encodeString(e){if(!Array.isArray(e)||e.length===0||!f.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,T)=>{const a=this.parseValue(h[T]);a!=null&&s[u].push(a)})}),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}static registerCustomType(){}}class S{constructor(){i(this,"contentType","text/plain")}encode(e){return new TextEncoder().encode(e).buffer}decode(e,t){const n=new TextDecoder().decode(e);return t!=null?t.parse(n):n}}const y=new p,m=new g,w=new S,O=[y],j=Object.freeze(Object.defineProperty({__proto__:null,CSVEncoderDecoder:g,CSV_ECD:m,ENCODERS:O,JSONEncoderDecoder:p,JSON_ECD:y,TEXT_ECD:w,TextEncoderDecoder:S},Symbol.toStringTag,{value:"Module"}));exports.binary=j;
package/dist/binary.js CHANGED
@@ -1,13 +1,13 @@
1
- var y = Object.defineProperty;
2
- var m = (n, e, r) => e in n ? y(n, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : n[e] = r;
3
- var s = (n, e, r) => (m(n, typeof e != "symbol" ? e + "" : e, r), r);
4
- import { t as T, d as b } from "./index-BwkQTA-j.js";
1
+ var T = Object.defineProperty;
2
+ var m = (o, e, r) => e in o ? T(o, e, { enumerable: !0, configurable: !0, writable: !0, value: r }) : o[e] = r;
3
+ var i = (o, e, r) => m(o, typeof e != "symbol" ? e + "" : e, r);
4
+ import { s as y, b } from "./index-CQk9JICS.js";
5
5
  import { isObject as l } from "./identity.js";
6
6
  class f {
7
7
  constructor() {
8
- s(this, "contentType", "application/json");
9
- s(this, "decoder");
10
- s(this, "encoder");
8
+ i(this, "contentType", "application/json");
9
+ i(this, "decoder");
10
+ i(this, "encoder");
11
11
  this.decoder = new TextDecoder(), this.encoder = new TextEncoder();
12
12
  }
13
13
  encode(e) {
@@ -17,56 +17,56 @@ class f {
17
17
  return this.decodeString(this.decoder.decode(e), r);
18
18
  }
19
19
  decodeString(e, r) {
20
- const t = T(JSON.parse(e));
20
+ const n = JSON.parse(e), t = y(n);
21
21
  return r != null ? r.parse(t) : t;
22
22
  }
23
23
  encodeString(e) {
24
- return JSON.stringify(b(e), (r, t) => ArrayBuffer.isView(t) ? Array.from(t) : l(t) && "encode_value" in t ? typeof t.value == "bigint" ? t.value.toString() : t.value : typeof t == "bigint" ? t.toString() : t);
24
+ const r = b(e);
25
+ return JSON.stringify(r, (n, t) => ArrayBuffer.isView(t) ? Array.from(t) : l(t) && "encode_value" in t ? typeof t.value == "bigint" ? t.value.toString() : t.value : typeof t == "bigint" ? t.toString() : t);
25
26
  }
26
27
  static registerCustomType() {
27
28
  }
28
29
  }
29
30
  class p {
30
31
  constructor() {
31
- s(this, "contentType", "text/csv");
32
+ i(this, "contentType", "text/csv");
32
33
  }
33
34
  encode(e) {
34
35
  const r = this.encodeString(e);
35
36
  return new TextEncoder().encode(r).buffer;
36
37
  }
37
38
  decode(e, r) {
38
- const t = new TextDecoder().decode(e);
39
- return this.decodeString(t, r);
39
+ const n = new TextDecoder().decode(e);
40
+ return this.decodeString(n, r);
40
41
  }
41
42
  encodeString(e) {
42
43
  if (!Array.isArray(e) || e.length === 0 || !l(e[0]))
43
44
  throw new Error("Payload must be an array of objects");
44
- const r = Object.keys(e[0]), t = [r.join(",")];
45
- return e.forEach((d) => {
46
- const i = r.map((c) => JSON.stringify(d[c] ?? ""));
47
- t.push(i.join(","));
48
- }), t.join(`
45
+ const r = Object.keys(e[0]), n = [r.join(",")];
46
+ return e.forEach((t) => {
47
+ const d = r.map((s) => JSON.stringify(t[s] ?? ""));
48
+ n.push(d.join(","));
49
+ }), n.join(`
49
50
  `);
50
51
  }
51
52
  decodeString(e, r) {
52
- const [t, ...d] = e.trim().split(`
53
- `).map((o) => o.trim());
54
- if (t.length === 0)
53
+ const [n, ...t] = e.trim().split(`
54
+ `).map((c) => c.trim());
55
+ if (n.length === 0)
55
56
  return r != null ? r.parse({}) : {};
56
- const i = t.split(",").map((o) => o.trim()), c = {};
57
- return i.forEach((o) => {
58
- c[o] = [];
59
- }), d.forEach((o) => {
60
- const h = o.split(",").map((u) => u.trim());
61
- i.forEach((u, E) => {
57
+ const d = n.split(",").map((c) => c.trim()), s = {};
58
+ return d.forEach((c) => {
59
+ s[c] = [];
60
+ }), t.forEach((c) => {
61
+ const h = c.split(",").map((u) => u.trim());
62
+ d.forEach((u, E) => {
62
63
  const a = this.parseValue(h[E]);
63
- a != null && c[u].push(a);
64
+ a != null && s[u].push(a);
64
65
  });
65
- }), r != null ? r.parse(c) : c;
66
+ }), r != null ? r.parse(s) : s;
66
67
  }
67
68
  parseValue(e) {
68
- if (e == null || e.length === 0)
69
- return null;
69
+ if (e == null || e.length === 0) return null;
70
70
  const r = Number(e);
71
71
  return isNaN(r) ? e.startsWith('"') && e.endsWith('"') ? e.slice(1, -1) : e : r;
72
72
  }
@@ -75,21 +75,21 @@ class p {
75
75
  }
76
76
  class g {
77
77
  constructor() {
78
- s(this, "contentType", "text/plain");
78
+ i(this, "contentType", "text/plain");
79
79
  }
80
80
  encode(e) {
81
81
  return new TextEncoder().encode(e).buffer;
82
82
  }
83
83
  decode(e, r) {
84
- const t = new TextDecoder().decode(e);
85
- return r != null ? r.parse(t) : t;
84
+ const n = new TextDecoder().decode(e);
85
+ return r != null ? r.parse(n) : n;
86
86
  }
87
87
  }
88
- const S = new f(), w = new p(), x = new g(), D = [S], N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
88
+ const S = new f(), w = new p(), x = new g(), C = [S], N = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
89
89
  __proto__: null,
90
90
  CSVEncoderDecoder: p,
91
91
  CSV_ECD: w,
92
- ENCODERS: D,
92
+ ENCODERS: C,
93
93
  JSONEncoderDecoder: f,
94
94
  JSON_ECD: S,
95
95
  TEXT_ECD: x,
@@ -0,0 +1,127 @@
1
+ import { j as g } from "./base-DnZzEvvz.js";
2
+ const m = (r, e) => typeof r == "bigint" ? r - BigInt(e) : r - Number(e), b = (r, e) => typeof r == "bigint" ? r + BigInt(e) : r + Number(e), h = (r, e, n = 1e-4) => Math.abs(r - e) < n, _ = (r) => {
3
+ const e = Math.pow(10, Math.floor(Math.log10(r)));
4
+ return Math.round(r / e) * e;
5
+ }, C = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
6
+ __proto__: null,
7
+ add: b,
8
+ closeTo: h,
9
+ roundToNearestMagnitude: _,
10
+ sub: m
11
+ }, Symbol.toStringTag, { value: "Module" })), o = (r, e) => {
12
+ const n = {};
13
+ if (typeof r == "number" || typeof r == "bigint")
14
+ e != null ? (n.lower = r, n.upper = e) : (n.lower = typeof r == "bigint" ? 0n : 0, n.upper = r);
15
+ else if (Array.isArray(r)) {
16
+ if (r.length !== 2) throw new Error("bounds: expected array of length 2");
17
+ [n.lower, n.upper] = r;
18
+ } else return f(r);
19
+ return f(n);
20
+ }, x = Object.freeze({ lower: 0, upper: 0 }), M = Object.freeze({ lower: -1 / 0, upper: 1 / 0 }), B = Object.freeze({ lower: 0, upper: 1 }), v = Object.freeze({ lower: -1, upper: 1 }), N = (r, e) => {
21
+ if (r == null && e == null) return !0;
22
+ if (r == null || e == null) return !1;
23
+ const n = o(r), t = o(e);
24
+ 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);
25
+ }, f = (r) => r.lower > r.upper ? { lower: r.upper, upper: r.lower } : r, A = (r, e) => {
26
+ const n = o(r);
27
+ return e < n.lower ? n.lower : e >= n.upper ? n.upper - (typeof n.upper == "number" ? 1 : 1n) : e;
28
+ }, s = (r, e) => {
29
+ const n = o(r);
30
+ if (typeof e == "number" || typeof e == "bigint")
31
+ return e >= n.lower && e < n.upper;
32
+ const t = o(e);
33
+ return t.lower >= n.lower && t.upper <= n.upper;
34
+ }, O = (r, e) => {
35
+ const n = o(r), t = o(e);
36
+ return n.lower === t.lower ? !0 : t.upper === n.lower || t.lower === n.upper ? !1 : s(n, t.upper) || s(n, t.lower) || s(t, n.upper) || s(t, n.lower);
37
+ }, u = (r) => {
38
+ const e = o(r);
39
+ return e.upper - e.lower;
40
+ }, j = (r) => {
41
+ const e = o(r);
42
+ return typeof e.lower == "bigint" ? e.lower === 0n && e.upper === 0n : e.lower === 0 && e.upper === 0;
43
+ }, z = (r) => {
44
+ const e = u(r);
45
+ return typeof e == "number" ? e === 0 : e === 0n;
46
+ }, P = (r) => {
47
+ const e = o(r);
48
+ return typeof e.lower == "bigint" ? !0 : Number.isFinite(e.lower) && Number.isFinite(e.upper);
49
+ }, E = (r) => ({
50
+ lower: Math.min(...r.map((e) => o(e).lower)),
51
+ upper: Math.max(...r.map((e) => o(e).upper))
52
+ }), T = (r) => ({
53
+ lower: Math.max(...r.map((e) => o(e).lower)),
54
+ upper: Math.min(...r.map((e) => o(e).upper))
55
+ }), F = (r) => {
56
+ const e = o(r), n = typeof e.lower == "bigint";
57
+ return Array.from({ length: Number(u(r)) }, (t, p) => n ? e.lower + BigInt(p) : e.lower + p);
58
+ }, w = (r, e) => {
59
+ const n = r.map((i) => o(i)), t = n.findIndex(
60
+ (i, l) => s(i, e) || e < n[l].lower
61
+ );
62
+ if (t === -1) return { index: r.length, position: 0 };
63
+ const p = n[t];
64
+ return s(p, e) ? { index: t, position: Number(e - p.lower) } : { index: t, position: 0 };
65
+ }, c = {
66
+ removeBefore: 0,
67
+ removeAfter: 0,
68
+ insertInto: 0,
69
+ deleteInBetween: 0
70
+ }, I = (r, e) => {
71
+ const n = r.map((y) => o(y)), t = o(e);
72
+ if (n.length === 0) return c;
73
+ const p = w(n, t.lower), i = w(n, t.upper);
74
+ if (p.index === r.length) return { ...c, insertInto: r.length };
75
+ if (i.index === 0) return { ...c, removeAfter: i.position };
76
+ if (p.index === i.index)
77
+ return p.position !== 0 && i.position !== 0 ? null : {
78
+ removeAfter: i.position,
79
+ removeBefore: p.position,
80
+ insertInto: p.index,
81
+ deleteInBetween: 0
82
+ };
83
+ let l = i.index - p.index, a = p.index, d = m(Number(u(n[p.index])), p.position);
84
+ return p.position !== 0 ? (l -= 1, a += 1) : d = 0, {
85
+ removeBefore: d,
86
+ removeAfter: i.position,
87
+ insertInto: a,
88
+ deleteInBetween: l
89
+ };
90
+ }, S = (r, e) => {
91
+ const n = I(r, e), t = r.map((i) => o(i));
92
+ if (n == null) return t;
93
+ const p = o(e);
94
+ return p.lower = b(p.lower, n.removeBefore), p.upper = m(p.upper, n.removeAfter), t.splice(n.insertInto, n.deleteInBetween, p), t;
95
+ }, Z = (r, e) => {
96
+ const n = o(r), t = o(e);
97
+ return n.upper <= t.lower || n.lower >= t.upper ? 0 : n.lower >= t.lower && n.upper <= t.upper ? 1 : n.lower <= t.lower && n.upper >= t.upper ? u(t) / u(n) : n.lower <= t.lower ? (n.upper - t.lower) / u(n) : (t.upper - n.lower) / u(n);
98
+ }, R = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
99
+ __proto__: null,
100
+ CLIP: v,
101
+ DECIMAL: B,
102
+ INFINITE: M,
103
+ ZERO: x,
104
+ bounds: g,
105
+ buildInsertionPlan: I,
106
+ clamp: A,
107
+ construct: o,
108
+ contains: s,
109
+ equals: N,
110
+ exposure: Z,
111
+ findInsertPosition: w,
112
+ insert: S,
113
+ isFinite: P,
114
+ isZero: j,
115
+ linspace: F,
116
+ makeValid: f,
117
+ max: E,
118
+ min: T,
119
+ overlapsWith: O,
120
+ span: u,
121
+ spanIsZero: z
122
+ }, Symbol.toStringTag, { value: "Module" }));
123
+ export {
124
+ R as b,
125
+ o as c,
126
+ C as m
127
+ };
@@ -0,0 +1 @@
1
+ "use strict";const g=require("./base-B48bPNx5.cjs"),m=(r,e)=>typeof r=="bigint"?r-BigInt(e):r-Number(e),b=(r,e)=>typeof r=="bigint"?r+BigInt(e):r+Number(e),h=(r,e,n=1e-4)=>Math.abs(r-e)<n,_=r=>{const e=Math.pow(10,Math.floor(Math.log10(r)));return Math.round(r/e)*e},x=Object.freeze(Object.defineProperty({__proto__:null,add:b,closeTo:h,roundToNearestMagnitude:_,sub:m},Symbol.toStringTag,{value:"Module"})),o=(r,e)=>{const n={};if(typeof r=="number"||typeof r=="bigint")e!=null?(n.lower=r,n.upper=e):(n.lower=typeof r=="bigint"?0n:0,n.upper=r);else if(Array.isArray(r)){if(r.length!==2)throw new Error("bounds: expected array of length 2");[n.lower,n.upper]=r}else return f(r);return f(n)},M=Object.freeze({lower:0,upper:0}),B=Object.freeze({lower:-1/0,upper:1/0}),v=Object.freeze({lower:0,upper:1}),N=Object.freeze({lower:-1,upper:1}),A=(r,e)=>{if(r==null&&e==null)return!0;if(r==null||e==null)return!1;const n=o(r),t=o(e);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)},f=r=>r.lower>r.upper?{lower:r.upper,upper:r.lower}:r,O=(r,e)=>{const n=o(r);return e<n.lower?n.lower:e>=n.upper?n.upper-(typeof n.upper=="number"?1:1n):e},s=(r,e)=>{const n=o(r);if(typeof e=="number"||typeof e=="bigint")return e>=n.lower&&e<n.upper;const t=o(e);return t.lower>=n.lower&&t.upper<=n.upper},j=(r,e)=>{const n=o(r),t=o(e);return n.lower===t.lower?!0:t.upper===n.lower||t.lower===n.upper?!1:s(n,t.upper)||s(n,t.lower)||s(t,n.upper)||s(t,n.lower)},i=r=>{const e=o(r);return e.upper-e.lower},z=r=>{const e=o(r);return typeof e.lower=="bigint"?e.lower===0n&&e.upper===0n:e.lower===0&&e.upper===0},P=r=>{const e=i(r);return typeof e=="number"?e===0:e===0n},E=r=>{const e=o(r);return typeof e.lower=="bigint"?!0:Number.isFinite(e.lower)&&Number.isFinite(e.upper)},T=r=>({lower:Math.min(...r.map(e=>o(e).lower)),upper:Math.max(...r.map(e=>o(e).upper))}),F=r=>({lower:Math.max(...r.map(e=>o(e).lower)),upper:Math.min(...r.map(e=>o(e).upper))}),S=r=>{const e=o(r),n=typeof e.lower=="bigint";return Array.from({length:Number(i(r))},(t,p)=>n?e.lower+BigInt(p):e.lower+p)},w=(r,e)=>{const n=r.map(u=>o(u)),t=n.findIndex((u,l)=>s(u,e)||e<n[l].lower);if(t===-1)return{index:r.length,position:0};const p=n[t];return s(p,e)?{index:t,position:Number(e-p.lower)}:{index:t,position:0}},c={removeBefore:0,removeAfter:0,insertInto:0,deleteInBetween:0},I=(r,e)=>{const n=r.map(y=>o(y)),t=o(e);if(n.length===0)return c;const p=w(n,t.lower),u=w(n,t.upper);if(p.index===r.length)return{...c,insertInto:r.length};if(u.index===0)return{...c,removeAfter:u.position};if(p.index===u.index)return p.position!==0&&u.position!==0?null:{removeAfter:u.position,removeBefore:p.position,insertInto:p.index,deleteInBetween:0};let l=u.index-p.index,d=p.index,a=m(Number(i(n[p.index])),p.position);return p.position!==0?(l-=1,d+=1):a=0,{removeBefore:a,removeAfter:u.position,insertInto:d,deleteInBetween:l}},Z=(r,e)=>{const n=I(r,e),t=r.map(u=>o(u));if(n==null)return t;const p=o(e);return p.lower=b(p.lower,n.removeBefore),p.upper=m(p.upper,n.removeAfter),t.splice(n.insertInto,n.deleteInBetween,p),t},L=(r,e)=>{const n=o(r),t=o(e);return n.upper<=t.lower||n.lower>=t.upper?0:n.lower>=t.lower&&n.upper<=t.upper?1:n.lower<=t.lower&&n.upper>=t.upper?i(t)/i(n):n.lower<=t.lower?(n.upper-t.lower)/i(n):(t.upper-n.lower)/i(n)},q=Object.freeze(Object.defineProperty({__proto__:null,CLIP:N,DECIMAL:v,INFINITE:B,ZERO:M,bounds:g.bounds,buildInsertionPlan:I,clamp:O,construct:o,contains:s,equals:A,exposure:L,findInsertPosition:w,insert:Z,isFinite:E,isZero:z,linspace:S,makeValid:f,max:T,min:F,overlapsWith:j,span:i,spanIsZero:P},Symbol.toStringTag,{value:"Module"}));exports.bounds=q;exports.construct=o;exports.math=x;
package/dist/bounds.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-Bh_QBZZK.cjs");exports.bounds=e.bounds;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./bounds-ZZc1c-_Z.cjs");exports.bounds=e.bounds;
package/dist/bounds.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as r } from "./bounds-Dmn-hd_-.js";
1
+ import { b as r } from "./bounds-CpboA0q6.js";
2
2
  export {
3
3
  r as bounds
4
4
  };
@@ -1 +1 @@
1
- "use strict";const y=require("zod"),z=require("./direction-DZbN47uL.cjs"),u=require("./location-c3g6WKs-.cjs"),i=require("./xy-cP-FXJtR.cjs"),m=require("./base-B48bPNx5.cjs"),O=y.z.union([y.z.number(),y.z.string()]);y.z.object({top:O,left:O,width:O,height:O});y.z.object({left:y.z.number(),top:y.z.number(),right:y.z.number(),bottom:y.z.number()});const H=y.z.object({one:m.xy,two:m.xy,root:u.corner}),I={one:i.ZERO,two:i.ZERO,root:u.TOP_LEFT},S={one:i.ZERO,two:i.ONE,root:u.BOTTOM_LEFT},q=(t,o)=>({one:t.one,two:t.two,root:o??t.root}),c=(t,o,e=0,n=0,s)=>{const r={one:{...i.ZERO},two:{...i.ZERO},root:s??u.TOP_LEFT};if(typeof t=="number"){if(typeof o!="number")throw new Error("Box constructor called with invalid arguments");return r.one={x:t,y:o},r.two={x:r.one.x+e,y:r.one.y+n},r}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(r.one={x:t.left,y:t.top},r.two={x:t.right,y:t.bottom},r):(r.one=t,o==null?r.two={x:r.one.x+e,y:r.one.y+n}:typeof o=="number"?r.two={x:r.one.x+o,y:r.one.y+e}:"width"in o?r.two={x:r.one.x+o.width,y:r.one.y+o.height}:"signedWidth"in o?r.two={x:r.one.x+o.signedWidth,y:r.one.y+o.signedHeight}:r.two=o,r))},N=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=z.construct(o);return c(n.one,void 0,s==="x"?e:l(n),s==="y"?e:w(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},v=(t,o,e=!0)=>{const n=c(t);let s=(r,x)=>r<x;return e&&(s=(r,x)=>r<=x),"one"in o?s(d(n),d(o))&&s(f(o),f(n))&&s(a(n),a(o))&&s(h(o),h(n)):s(d(n),o.x)&&s(o.x,f(n))&&s(a(n),o.y)&&s(o.y,h(n))},D=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&u.xyEquals(t.root,o.root),R=t=>({width:l(t),height:w(t)}),G=t=>({signedWidth:b(t),signedHeight:T(t)}),X=t=>({top:a(t),left:d(t),width:l(t),height:w(t)}),M=(t,o,e=!1)=>{const n=z.construct(o)==="y"?T(t):b(t);return e?n:Math.abs(n)},_=(t,o)=>{const e=c(t);return{x:o.x==="center"?E(e).x:g(e,o.x),y:o.y==="center"?E(e).y:g(e,o.y)}},g=(t,o)=>{const e=c(t),n=u.xyCouple(e.root).includes(o)?Math.min:Math.max;return m.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.y)},$=t=>t.one.x===t.two.x&&t.one.y===t.two.y,l=t=>M(t,"x"),w=t=>M(t,"y"),b=t=>{const o=c(t);return o.two.x-o.one.x},T=t=>{const o=c(t);return o.two.y-o.one.y},C=t=>_(t,u.TOP_LEFT),U=t=>_(t,u.TOP_RIGHT),Y=t=>_(t,u.BOTTOM_LEFT),k=t=>_(t,u.BOTTOM_RIGHT),f=t=>g(t,"right"),h=t=>g(t,"bottom"),d=t=>g(t,"left"),a=t=>g(t,"top"),E=t=>i.translate(C(t),{x:b(t)/2,y:T(t)/2}),L=t=>{const o=c(t);return o.root.x==="left"?d(o):f(o)},B=t=>{const o=c(t);return o.root.y==="top"?a(o):h(o)},J=t=>({x:L(t),y:B(t)}),P=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},Z=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},K=(t,o)=>q(t,o),Q=(t,o)=>{const e=c(t),n=m.X_LOCATIONS.includes(o)?"x":m.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${u.location}`);const s=o==="top"||o==="left"?Math.min:Math.max,r={...e.one},x={...e.two};return r[n]=s(e.one[n],e.two[n]),x[n]=s(e.one[n],e.two[n]),[r,x]},V=(t,o)=>{const e=c(t),n=c(o),s=L(n)+(l(n)-l(e))/2,r=B(n)+(w(n)-w(e))/2;return c({x:s,y:r},R(e))},j=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,tt=t=>l(t)/w(t),ot=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=z.construct(o);o=i.construct(s,e)}const n=c(t);return c(i.translate(n.one,o),i.translate(n.two,o),void 0,void 0,n.root)},A=(t,o)=>{const e=Math.max(d(t),d(o)),n=Math.max(a(t),a(o)),s=Math.min(f(t),f(o)),r=Math.min(h(t),h(o));return e>s||n>r?I:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},W=t=>l(t)*w(t),nt=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},F=(t,o,e,n,s,r)=>{const x={x:t,y:o},p={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,p.x-=e/2):(x.x-=e,p.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,p.y-=n/2):(x.y-=n,p.y-=n)),c(x,p,void 0,void 0,r)},et=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:S,ZERO:I,area:W,areaIsZero:$,aspect:tt,bottom:h,bottomLeft:Y,bottomRight:k,box:H,center:E,construct:c,constructWithAlternateRoot:F,contains:v,copy:q,css:X,dim:M,dims:R,edgePoints:Q,equals:D,height:w,intersection:A,isBox:j,left:d,loc:g,positionInCenter:V,reRoot:K,resize:N,right:f,root:J,signedDims:G,signedHeight:T,signedWidth:b,top:a,topLeft:C,topRight:U,translate:ot,truncate:nt,width:l,x:L,xBounds:P,xyLoc:_,y:B,yBounds:Z},Symbol.toStringTag,{value:"Module"}));exports.area=W;exports.box=et;exports.construct=c;exports.constructWithAlternateRoot=F;exports.height=w;exports.intersection=A;exports.isBox=j;exports.width=l;exports.xBounds=P;exports.xyLoc=_;exports.yBounds=Z;
1
+ "use strict";const y=require("zod"),z=require("./direction-DZbN47uL.cjs"),u=require("./location-wMqTcQ0n.cjs"),i=require("./xy-cP-FXJtR.cjs"),m=require("./base-B48bPNx5.cjs"),O=y.z.union([y.z.number(),y.z.string()]);y.z.object({top:O,left:O,width:O,height:O});y.z.object({left:y.z.number(),top:y.z.number(),right:y.z.number(),bottom:y.z.number()});const H=y.z.object({one:m.xy,two:m.xy,root:u.corner}),I={one:i.ZERO,two:i.ZERO,root:u.TOP_LEFT},S={one:i.ZERO,two:i.ONE,root:u.BOTTOM_LEFT},q=(t,o)=>({one:t.one,two:t.two,root:o??t.root}),c=(t,o,e=0,n=0,s)=>{const r={one:{...i.ZERO},two:{...i.ZERO},root:s??u.TOP_LEFT};if(typeof t=="number"){if(typeof o!="number")throw new Error("Box constructor called with invalid arguments");return r.one={x:t,y:o},r.two={x:r.one.x+e,y:r.one.y+n},r}return"one"in t&&"two"in t&&"root"in t?{...t,root:s??t.root}:("getBoundingClientRect"in t&&(t=t.getBoundingClientRect()),"left"in t?(r.one={x:t.left,y:t.top},r.two={x:t.right,y:t.bottom},r):(r.one=t,o==null?r.two={x:r.one.x+e,y:r.one.y+n}:typeof o=="number"?r.two={x:r.one.x+o,y:r.one.y+e}:"width"in o?r.two={x:r.one.x+o.width,y:r.one.y+o.height}:"signedWidth"in o?r.two={x:r.one.x+o.signedWidth,y:r.one.y+o.signedHeight}:r.two=o,r))},N=(t,o,e)=>{const n=c(t);if(typeof o=="string"){if(e==null)throw new Error("Invalid arguments for resize");const s=z.construct(o);return c(n.one,void 0,s==="x"?e:l(n),s==="y"?e:w(n),n.root)}return c(n.one,o,void 0,void 0,n.root)},v=(t,o,e=!0)=>{const n=c(t);let s=(r,x)=>r<x;return e&&(s=(r,x)=>r<=x),"one"in o?s(d(n),d(o))&&s(f(o),f(n))&&s(a(n),a(o))&&s(h(o),h(n)):s(d(n),o.x)&&s(o.x,f(n))&&s(a(n),o.y)&&s(o.y,h(n))},D=(t,o)=>i.equals(t.one,o.one)&&i.equals(t.two,o.two)&&u.xyEquals(t.root,o.root),R=t=>({width:l(t),height:w(t)}),G=t=>({signedWidth:b(t),signedHeight:T(t)}),X=t=>({top:a(t),left:d(t),width:l(t),height:w(t)}),M=(t,o,e=!1)=>{const n=z.construct(o)==="y"?T(t):b(t);return e?n:Math.abs(n)},_=(t,o)=>{const e=c(t);return{x:o.x==="center"?E(e).x:g(e,o.x),y:o.y==="center"?E(e).y:g(e,o.y)}},g=(t,o)=>{const e=c(t),n=u.xyCouple(e.root).includes(o)?Math.min:Math.max;return m.X_LOCATIONS.includes(o)?n(e.one.x,e.two.x):n(e.one.y,e.two.y)},$=t=>t.one.x===t.two.x&&t.one.y===t.two.y,l=t=>M(t,"x"),w=t=>M(t,"y"),b=t=>{const o=c(t);return o.two.x-o.one.x},T=t=>{const o=c(t);return o.two.y-o.one.y},C=t=>_(t,u.TOP_LEFT),U=t=>_(t,u.TOP_RIGHT),Y=t=>_(t,u.BOTTOM_LEFT),k=t=>_(t,u.BOTTOM_RIGHT),f=t=>g(t,"right"),h=t=>g(t,"bottom"),d=t=>g(t,"left"),a=t=>g(t,"top"),E=t=>i.translate(C(t),{x:b(t)/2,y:T(t)/2}),L=t=>{const o=c(t);return o.root.x==="left"?d(o):f(o)},B=t=>{const o=c(t);return o.root.y==="top"?a(o):h(o)},J=t=>({x:L(t),y:B(t)}),P=t=>{const o=c(t);return{lower:o.one.x,upper:o.two.x}},Z=t=>{const o=c(t);return{lower:o.one.y,upper:o.two.y}},K=(t,o)=>q(t,o),Q=(t,o)=>{const e=c(t),n=m.X_LOCATIONS.includes(o)?"x":m.Y_LOCATIONS.includes(o)?"y":null;if(n===null)throw new Error(`Invalid location: ${u.location}`);const s=o==="top"||o==="left"?Math.min:Math.max,r={...e.one},x={...e.two};return r[n]=s(e.one[n],e.two[n]),x[n]=s(e.one[n],e.two[n]),[r,x]},V=(t,o)=>{const e=c(t),n=c(o),s=L(n)+(l(n)-l(e))/2,r=B(n)+(w(n)-w(e))/2;return c({x:s,y:r},R(e))},j=t=>typeof t!="object"||t==null?!1:"one"in t&&"two"in t&&"root"in t,tt=t=>l(t)/w(t),ot=(t,o,e)=>{if(typeof o=="string"){if(e==null)throw new Error("Undefined amount passed into box.translate");const s=z.construct(o);o=i.construct(s,e)}const n=c(t);return c(i.translate(n.one,o),i.translate(n.two,o),void 0,void 0,n.root)},A=(t,o)=>{const e=Math.max(d(t),d(o)),n=Math.max(a(t),a(o)),s=Math.min(f(t),f(o)),r=Math.min(h(t),h(o));return e>s||n>r?I:c({x:e,y:n},{x:s,y:r},void 0,void 0,t.root)},W=t=>l(t)*w(t),nt=(t,o)=>{const e=c(t);return c(i.truncate(e.one,o),i.truncate(e.two,o),void 0,void 0,e.root)},F=(t,o,e,n,s,r)=>{const x={x:t,y:o},p={x:t+e,y:o+n};return s.x!==r.x&&(s.x==="center"?(x.x-=e/2,p.x-=e/2):(x.x-=e,p.x-=e)),s.y!==r.y&&(s.y==="center"?(x.y-=n/2,p.y-=n/2):(x.y-=n,p.y-=n)),c(x,p,void 0,void 0,r)},et=Object.freeze(Object.defineProperty({__proto__:null,DECIMAL:S,ZERO:I,area:W,areaIsZero:$,aspect:tt,bottom:h,bottomLeft:Y,bottomRight:k,box:H,center:E,construct:c,constructWithAlternateRoot:F,contains:v,copy:q,css:X,dim:M,dims:R,edgePoints:Q,equals:D,height:w,intersection:A,isBox:j,left:d,loc:g,positionInCenter:V,reRoot:K,resize:N,right:f,root:J,signedDims:G,signedHeight:T,signedWidth:b,top:a,topLeft:C,topRight:U,translate:ot,truncate:nt,width:l,x:L,xBounds:P,xyLoc:_,y:B,yBounds:Z},Symbol.toStringTag,{value:"Module"}));exports.area=W;exports.box=et;exports.construct=c;exports.constructWithAlternateRoot=F;exports.height=w;exports.intersection=A;exports.isBox=j;exports.width=l;exports.xBounds=P;exports.xyLoc=_;exports.yBounds=Z;
@@ -1,7 +1,7 @@
1
1
  import { z as x } from "zod";
2
2
  import { c as M } from "./direction-CScbfCdT.js";
3
- import { c as S, T as E, B as H, b as Z, d as q, e as v, f as N, l as D } from "./location-CfP9TAnW.js";
4
- import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-D1ZbIqpT.js";
3
+ import { c as S, T as E, B as H, b as Z, d as q, e as v, f as N, l as D } from "./location-D4yS2DfR.js";
4
+ import { Z as p, O as F, e as $, t as O, c as G, a as C } from "./xy-CrgPnICw.js";
5
5
  import { x as j, X as P, Y as X } from "./base-DnZzEvvz.js";
6
6
  const h = x.union([x.number(), x.string()]);
7
7
  x.object({
@@ -45,8 +45,7 @@ const Y = x.object({
45
45
  }, k = (o, t, e) => {
46
46
  const n = c(o);
47
47
  if (typeof t == "string") {
48
- if (e == null)
49
- throw new Error("Invalid arguments for resize");
48
+ if (e == null) throw new Error("Invalid arguments for resize");
50
49
  const s = M(t);
51
50
  return c(
52
51
  n.one,
@@ -107,8 +106,7 @@ const Y = x.object({
107
106
  return { lower: t.one.y, upper: t.two.y };
108
107
  }, io = (o, t) => z(o, t), xo = (o, t) => {
109
108
  const e = c(o), n = P.includes(t) ? "x" : X.includes(t) ? "y" : null;
110
- if (n === null)
111
- throw new Error(`Invalid location: ${D}`);
109
+ if (n === null) throw new Error(`Invalid location: ${D}`);
112
110
  const s = t === "top" || t === "left" ? Math.min : Math.max, r = { ...e.one }, i = { ...e.two };
113
111
  return r[n] = s(e.one[n], e.two[n]), i[n] = s(e.one[n], e.two[n]), [r, i];
114
112
  }, yo = (o, t) => {
@@ -116,8 +114,7 @@ const Y = x.object({
116
114
  return c({ x: s, y: r }, A(e));
117
115
  }, ao = (o) => typeof o != "object" || o == null ? !1 : "one" in o && "two" in o && "root" in o, uo = (o) => u(o) / l(o), lo = (o, t, e) => {
118
116
  if (typeof t == "string") {
119
- if (e == null)
120
- throw new Error("Undefined amount passed into box.translate");
117
+ if (e == null) throw new Error("Undefined amount passed into box.translate");
121
118
  const s = M(t);
122
119
  t = G(s, e);
123
120
  }
package/dist/box.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-m3dlc1kR.cjs");exports.box=e.box;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./box-BcFruCBW.cjs");exports.box=e.box;
package/dist/box.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as r } from "./box-C92jYSNY.js";
1
+ import { b as r } from "./box-DC5oviHL.js";
2
2
  export {
3
3
  r as box
4
4
  };
package/dist/caseconv.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BpCPHf78.cjs");exports.caseconv=e.caseconv;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-2SfxIaaU.cjs");exports.caseconv=e.caseconv;
package/dist/caseconv.js CHANGED
@@ -1,4 +1,4 @@
1
- import { b as c } from "./index-BwkQTA-j.js";
1
+ import { a as c } from "./index-CQk9JICS.js";
2
2
  export {
3
3
  c as caseconv
4
4
  };
package/dist/compare.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-BhEWuRmo.cjs");exports.compare=e.compare;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./index-CvHP07Bs.cjs");exports.compare=e.compare;
package/dist/compare.js CHANGED
@@ -1,4 +1,4 @@
1
- import { c as a } from "./index-IGDDLWef.js";
1
+ import { c as a } from "./index-DCwgKLH_.js";
2
2
  export {
3
3
  a as compare
4
4
  };
package/dist/deep.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("./identity.cjs"),c=require("./path-BO4pyGZf.cjs"),g=t=>JSON.parse(JSON.stringify(t)),j=(t,...n)=>(n.forEach(i=>{let r=t;const f=i.split(".");f.forEach((s,e)=>{e===f.length-1?delete r[s]:r=r[s]})}),t),d=(t,n,i="")=>{const r={},f=(s,e,o)=>{if(typeof s!=typeof e||s===null||e===null){r[o]=[s,e];return}if(typeof s=="object"&&typeof e=="object")if(Array.isArray(s)&&Array.isArray(e)){if(s.length!==e.length){r[o]=[s,e];return}for(let l=0;l<s.length;l++)f(s[l],e[l],`${o}[${l}]`)}else new Set([...Object.keys(s),...Object.keys(e)]).forEach(y=>{f(s[y],e[y],o!==""?`${o}.${y}`:y)});else s!==e&&(r[o]=[s,e])};return f(t,n,i),r},p=(t,n)=>{const i=Array.isArray(t),r=Array.isArray(n);if(i!==r)return!1;if(i&&r){const e=t,o=n;if(e.length!==o.length)return!1;for(let l=0;l<e.length;l++)if(!p(e[l],o[l]))return!1;return!0}if(t==null||n==null||typeof t!="object"||typeof n!="object")return t===n;if("equals"in t)return t.equals(n);const f=Object.keys(t),s=Object.keys(n);if(f.length!==s.length)return!1;for(const e of f){const o=t[e],l=n[e];if(typeof o=="object"&&typeof l=="object"){if(!p(o,l))return!1}else if(o!==l)return!1}return!0},h=(t,n)=>{if(typeof t!="object"||t==null)return t===n;const i=Object.keys(t),r=Object.keys(n);if(r.length>i.length)return!1;for(const f of r){const s=t[f],e=n[f];if(typeof s=="object"&&typeof e=="object"){if(!h(s,e))return!1}else if(s!==e)return!1}return!0},u=(t,...n)=>{if(n.length===0)return t;const i=n.shift();if(a.isObject(t)&&a.isObject(i))for(const r in i)try{a.isObject(i[r])?(r in t||Object.assign(t,{[r]:{}}),u(t[r],i[r])):Object.assign(t,{[r]:i[r]})}catch(f){throw f instanceof TypeError?new TypeError(`.${r}: ${f.message}`):f}return u(t,...n)},A=(t,n,i)=>{const r=(f,s,e)=>{for(const o in s){const l=s[o];if(e!=null&&e.shape[o]){const y=e.shape[o].safeParse(l);y.success&&(f[o]=y.data)}else typeof l=="object"&&!Array.isArray(l)&&l!==null&&e&&e.shape&&e.shape[o]&&(f[o]||(f[o]={}),r(f[o],l,e.shape[o]))}return f};return r({...t},n,i)},O=Object.freeze(Object.defineProperty({__proto__:null,copy:g,deleteD:j,difference:d,element:c.element,equal:p,get:c.get,has:c.has,join:c.join,override:u,overrideValidItems:A,partialEqual:h,pathToCamel:c.pathToCamel,pathToSnake:c.pathToSnake,pathsMatch:c.pathsMatch,set:c.set,transformPath:c.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("./identity.cjs"),y=require("./path-Coj1BKMh.cjs"),j=t=>JSON.parse(JSON.stringify(t)),h=(t,...n)=>(n.forEach(l=>{let r=t;const f=l.split(".");f.forEach((s,e)=>{e===f.length-1?delete r[s]:s in r&&(r=r[s])})}),t),d=(t,n,l="")=>{const r={},f=(s,e,o)=>{if(typeof s!=typeof e||s===null||e===null){r[o]=[s,e];return}if(typeof s=="object"&&typeof e=="object")if(Array.isArray(s)&&Array.isArray(e)){if(s.length!==e.length){r[o]=[s,e];return}for(let i=0;i<s.length;i++)f(s[i],e[i],`${o}[${i}]`)}else new Set([...Object.keys(s),...Object.keys(e)]).forEach(c=>{f(s[c],e[c],o!==""?`${o}.${c}`:c)});else s!==e&&(r[o]=[s,e])};return f(t,n,l),r},p=(t,n)=>{const l=Array.isArray(t),r=Array.isArray(n);if(l!==r)return!1;if(l&&r){const e=t,o=n;if(e.length!==o.length)return!1;for(let i=0;i<e.length;i++)if(!p(e[i],o[i]))return!1;return!0}if(t==null||n==null||typeof t!="object"||typeof n!="object")return t===n;if("equals"in t)return t.equals(n);const f=Object.keys(t),s=Object.keys(n);if(f.length!==s.length)return!1;for(const e of f){const o=t[e],i=n[e];if(typeof o=="object"&&typeof i=="object"){if(!p(o,i))return!1}else if(o!==i)return!1}return!0},g=(t,n)=>{if(typeof t!="object"||t==null)return t===n;const l=Object.keys(t),r=Object.keys(n);if(r.length>l.length)return!1;for(const f of r){const s=t[f],e=n[f];if(typeof s=="object"&&typeof e=="object"){if(!g(s,e))return!1}else if(s!==e)return!1}return!0},a=(t,...n)=>{if(n.length===0)return t;const l=n.shift();if(u.isObject(t)&&u.isObject(l))for(const r in l)try{u.isObject(l[r])?(r in t||Object.assign(t,{[r]:{}}),a(t[r],l[r])):Object.assign(t,{[r]:l[r]})}catch(f){throw f instanceof TypeError?new TypeError(`.${r}: ${f.message}`):f}return a(t,...n)},A=(t,n,l)=>{const r=(f,s,e)=>{for(const o in s){const i=s[o];if(e!=null&&e.shape[o]){const c=e.shape[o].safeParse(i);c.success&&(f[o]=c.data)}else typeof i=="object"&&!Array.isArray(i)&&i!==null&&e&&e.shape&&e.shape[o]&&(f[o]||(f[o]={}),r(f[o],i,e.shape[o]))}return f};return r({...t},n,l)},O=Object.freeze(Object.defineProperty({__proto__:null,copy:j,deleteD:h,difference:d,element:y.element,equal:p,get:y.get,has:y.has,join:y.join,override:a,overrideValidItems:A,partialEqual:g,pathsMatch:y.pathsMatch,set:y.set,transformPath:y.transformPath},Symbol.toStringTag,{value:"Module"}));exports.deep=O;