lakutata 2.0.65 → 2.0.67

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 (213) hide show
  1. package/com/cacher.cjs +1 -1
  2. package/com/cacher.d.ts +4 -4
  3. package/com/cacher.mjs +1 -1
  4. package/com/database.cjs +0 -2
  5. package/com/database.d.ts +4 -4
  6. package/com/database.mjs +0 -2
  7. package/com/docker.d.ts +5 -5
  8. package/com/entrypoint.cjs +3 -1
  9. package/com/entrypoint.d.ts +2 -2
  10. package/com/entrypoint.mjs +3 -1
  11. package/com/logger.d.ts +1 -1
  12. package/com/monitor.d.ts +2 -2
  13. package/decorator/asst.d.ts +1 -1
  14. package/decorator/ctrl.cjs +3 -1
  15. package/decorator/ctrl.d.ts +4 -4
  16. package/decorator/ctrl.mjs +3 -1
  17. package/decorator/di.d.ts +3 -3
  18. package/decorator/dto.d.ts +3 -3
  19. package/decorator/orm.cjs +86 -88
  20. package/decorator/orm.d.ts +51 -75
  21. package/decorator/orm.mjs +44 -46
  22. package/helper.cjs +24 -18
  23. package/helper.d.ts +129 -3
  24. package/helper.mjs +6 -2
  25. package/lakutata.cjs +3 -1
  26. package/lakutata.d.ts +10 -10
  27. package/lakutata.mjs +3 -1
  28. package/orm.cjs +1075 -112
  29. package/orm.d.ts +6 -6
  30. package/orm.mjs +1015 -17
  31. package/package.json +1 -1
  32. package/provider/database.cjs +0 -2
  33. package/provider/database.d.ts +4 -4
  34. package/provider/database.mjs +0 -2
  35. package/provider/passwordHash.d.ts +1 -1
  36. package/src/components/Database.cjs +0 -2
  37. package/src/components/Database.mjs +0 -2
  38. package/src/components/cacher/Cacher.cjs +1 -1
  39. package/src/components/cacher/Cacher.mjs +1 -1
  40. package/src/components/cacher/adapters/CreateFileCacheAdapter.cjs +1 -1
  41. package/src/components/cacher/adapters/CreateFileCacheAdapter.mjs +1 -1
  42. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.cjs +2 -2
  43. package/src/components/cacher/adapters/CreateMemcacheCacheAdapter.mjs +2 -2
  44. package/src/components/cacher/adapters/CreateMongoCacheAdapter.cjs +2 -2
  45. package/src/components/cacher/adapters/CreateMongoCacheAdapter.mjs +2 -2
  46. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.cjs +2 -2
  47. package/src/components/cacher/adapters/CreateMysqlCacheAdapter.mjs +2 -2
  48. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.cjs +2 -2
  49. package/src/components/cacher/adapters/CreatePostgresCacheAdapter.mjs +2 -2
  50. package/src/components/cacher/adapters/CreateRedisCacheAdapter.cjs +2 -2
  51. package/src/components/cacher/adapters/CreateRedisCacheAdapter.mjs +2 -2
  52. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.cjs +2 -2
  53. package/src/components/cacher/adapters/CreateSqliteCacheAdapter.mjs +2 -2
  54. package/src/components/entrypoint/Entrypoint.cjs +3 -1
  55. package/src/components/entrypoint/Entrypoint.mjs +3 -1
  56. package/src/decorators/ctrl/CLIAction.cjs +7 -5
  57. package/src/decorators/ctrl/CLIAction.mjs +3 -1
  58. package/src/decorators/ctrl/HTTPAction.cjs +8 -6
  59. package/src/decorators/ctrl/HTTPAction.mjs +3 -1
  60. package/src/decorators/ctrl/ServiceAction.cjs +3 -1
  61. package/src/decorators/ctrl/ServiceAction.mjs +7 -5
  62. package/src/decorators/ctrl/http/DELETE.cjs +3 -1
  63. package/src/decorators/ctrl/http/DELETE.mjs +3 -1
  64. package/src/decorators/ctrl/http/GET.cjs +3 -1
  65. package/src/decorators/ctrl/http/GET.mjs +3 -1
  66. package/src/decorators/ctrl/http/HEAD.cjs +3 -1
  67. package/src/decorators/ctrl/http/HEAD.mjs +3 -1
  68. package/src/decorators/ctrl/http/OPTIONS.cjs +3 -1
  69. package/src/decorators/ctrl/http/OPTIONS.mjs +3 -1
  70. package/src/decorators/ctrl/http/PATCH.cjs +3 -1
  71. package/src/decorators/ctrl/http/PATCH.mjs +3 -1
  72. package/src/decorators/ctrl/http/POST.cjs +3 -1
  73. package/src/decorators/ctrl/http/POST.mjs +3 -1
  74. package/src/decorators/ctrl/http/PUT.cjs +3 -1
  75. package/src/decorators/ctrl/http/PUT.mjs +3 -1
  76. package/src/decorators/orm/AfterInsert.cjs +27 -7
  77. package/src/decorators/orm/AfterInsert.mjs +28 -6
  78. package/src/decorators/orm/AfterLoad.cjs +27 -7
  79. package/src/decorators/orm/AfterLoad.mjs +28 -6
  80. package/src/decorators/orm/AfterRecover.cjs +27 -7
  81. package/src/decorators/orm/AfterRecover.mjs +28 -6
  82. package/src/decorators/orm/AfterRemove.cjs +27 -7
  83. package/src/decorators/orm/AfterRemove.mjs +28 -6
  84. package/src/decorators/orm/AfterSoftRemove.cjs +27 -7
  85. package/src/decorators/orm/AfterSoftRemove.mjs +28 -6
  86. package/src/decorators/orm/AfterUpdate.cjs +27 -7
  87. package/src/decorators/orm/AfterUpdate.mjs +28 -6
  88. package/src/decorators/orm/BeforeInsert.cjs +27 -7
  89. package/src/decorators/orm/BeforeInsert.mjs +28 -6
  90. package/src/decorators/orm/BeforeRecover.cjs +27 -7
  91. package/src/decorators/orm/BeforeRecover.mjs +28 -6
  92. package/src/decorators/orm/BeforeRemove.cjs +27 -7
  93. package/src/decorators/orm/BeforeRemove.mjs +28 -6
  94. package/src/decorators/orm/BeforeSoftRemove.cjs +27 -7
  95. package/src/decorators/orm/BeforeSoftRemove.mjs +28 -6
  96. package/src/decorators/orm/BeforeUpdate.cjs +27 -7
  97. package/src/decorators/orm/BeforeUpdate.mjs +28 -6
  98. package/src/decorators/orm/Check.cjs +30 -7
  99. package/src/decorators/orm/Check.mjs +31 -6
  100. package/src/decorators/orm/ChildEntity.cjs +30 -7
  101. package/src/decorators/orm/ChildEntity.mjs +31 -6
  102. package/src/decorators/orm/Column.cjs +62 -7
  103. package/src/decorators/orm/Column.mjs +63 -6
  104. package/src/decorators/orm/CreateDateColumn.cjs +26 -7
  105. package/src/decorators/orm/CreateDateColumn.mjs +27 -6
  106. package/src/decorators/orm/DeleteDateColumn.cjs +26 -7
  107. package/src/decorators/orm/DeleteDateColumn.mjs +27 -6
  108. package/src/decorators/orm/Entity.cjs +36 -7
  109. package/src/decorators/orm/Entity.mjs +37 -6
  110. package/src/decorators/orm/EventSubscriber.cjs +23 -7
  111. package/src/decorators/orm/EventSubscriber.mjs +24 -6
  112. package/src/decorators/orm/Exclusion.cjs +30 -7
  113. package/src/decorators/orm/Exclusion.mjs +31 -6
  114. package/src/decorators/orm/Generated.cjs +25 -7
  115. package/src/decorators/orm/Generated.mjs +26 -6
  116. package/src/decorators/orm/Index.cjs +42 -7
  117. package/src/decorators/orm/Index.mjs +43 -6
  118. package/src/decorators/orm/JoinColumn.cjs +30 -7
  119. package/src/decorators/orm/JoinColumn.mjs +31 -6
  120. package/src/decorators/orm/JoinTable.cjs +31 -7
  121. package/src/decorators/orm/JoinTable.mjs +32 -6
  122. package/src/decorators/orm/ManyToMany.cjs +43 -7
  123. package/src/decorators/orm/ManyToMany.mjs +44 -6
  124. package/src/decorators/orm/ManyToOne.cjs +43 -7
  125. package/src/decorators/orm/ManyToOne.mjs +44 -6
  126. package/src/decorators/orm/ObjectIdColumn.cjs +29 -7
  127. package/src/decorators/orm/ObjectIdColumn.mjs +30 -6
  128. package/src/decorators/orm/OneToMany.cjs +35 -7
  129. package/src/decorators/orm/OneToMany.mjs +36 -6
  130. package/src/decorators/orm/OneToOne.cjs +43 -7
  131. package/src/decorators/orm/OneToOne.mjs +44 -6
  132. package/src/decorators/orm/PrimaryColumn.cjs +50 -7
  133. package/src/decorators/orm/PrimaryColumn.mjs +51 -6
  134. package/src/decorators/orm/PrimaryGeneratedColumn.cjs +55 -7
  135. package/src/decorators/orm/PrimaryGeneratedColumn.mjs +56 -6
  136. package/src/decorators/orm/RelationId.cjs +27 -7
  137. package/src/decorators/orm/RelationId.mjs +28 -6
  138. package/src/decorators/orm/TableInheritance.cjs +27 -7
  139. package/src/decorators/orm/TableInheritance.mjs +28 -6
  140. package/src/decorators/orm/Tree.cjs +25 -7
  141. package/src/decorators/orm/Tree.mjs +26 -6
  142. package/src/decorators/orm/TreeChildren.cjs +32 -7
  143. package/src/decorators/orm/TreeChildren.mjs +33 -6
  144. package/src/decorators/orm/TreeLevelColumn.cjs +26 -7
  145. package/src/decorators/orm/TreeLevelColumn.mjs +27 -6
  146. package/src/decorators/orm/TreeParent.cjs +32 -7
  147. package/src/decorators/orm/TreeParent.mjs +33 -6
  148. package/src/decorators/orm/Unique.cjs +45 -7
  149. package/src/decorators/orm/Unique.mjs +46 -6
  150. package/src/decorators/orm/UpdateDateColumn.cjs +26 -7
  151. package/src/decorators/orm/UpdateDateColumn.mjs +27 -6
  152. package/src/decorators/orm/VersionColumn.cjs +26 -7
  153. package/src/decorators/orm/VersionColumn.mjs +27 -6
  154. package/src/decorators/orm/ViewColumn.cjs +26 -7
  155. package/src/decorators/orm/ViewColumn.mjs +27 -6
  156. package/src/decorators/orm/ViewEntity.cjs +35 -7
  157. package/src/decorators/orm/ViewEntity.mjs +36 -6
  158. package/src/decorators/orm/VirtualColumn.cjs +43 -7
  159. package/src/decorators/orm/VirtualColumn.mjs +44 -6
  160. package/src/lib/base/internal/ControllerEntrypoint.cjs +70 -610
  161. package/src/lib/base/internal/ControllerEntrypoint.mjs +87 -627
  162. package/src/lib/base/internal/StringifyPattern.cjs +1 -1
  163. package/src/lib/base/internal/StringifyPattern.mjs +1 -1
  164. package/src/lib/core/Application.cjs +3 -1
  165. package/src/lib/core/Application.mjs +3 -1
  166. package/src/lib/helpers/MD5.cjs +1 -1
  167. package/src/lib/helpers/MD5.mjs +1 -1
  168. package/src/lib/helpers/SHA1.cjs +1 -1
  169. package/src/lib/helpers/SHA1.mjs +1 -1
  170. package/src/lib/helpers/SHA256.cjs +1 -1
  171. package/src/lib/helpers/SHA256.mjs +1 -1
  172. package/src/lib/helpers/SortArray.cjs +1 -1
  173. package/src/lib/helpers/SortArray.mjs +1 -1
  174. package/src/lib/helpers/UUID.cjs +45 -0
  175. package/src/lib/helpers/UUID.mjs +39 -0
  176. package/src/providers/Database.cjs +0 -2
  177. package/src/providers/Database.mjs +0 -2
  178. package/vendor/Package.122.cjs +13223 -16706
  179. package/vendor/Package.122.mjs +13498 -16881
  180. package/vendor/Package.19.cjs +184 -195
  181. package/vendor/Package.19.mjs +176 -187
  182. package/vendor/Package.610.cjs +297 -113
  183. package/vendor/Package.610.mjs +285 -97
  184. package/vendor/Package.611.cjs +85 -103
  185. package/vendor/Package.611.mjs +80 -98
  186. package/vendor/Package.612.cjs +100 -121
  187. package/vendor/Package.612.mjs +97 -120
  188. package/vendor/Package.613.cjs +196 -0
  189. package/vendor/Package.613.mjs +180 -0
  190. package/vendor/Package.64.cjs +511 -134
  191. package/vendor/Package.64.mjs +491 -134
  192. package/vendor/Package.65.cjs +140 -4118
  193. package/vendor/Package.65.mjs +140 -4126
  194. package/vendor/Package.66.cjs +4142 -692
  195. package/vendor/Package.66.mjs +4151 -689
  196. package/vendor/Package.67.cjs +571 -535
  197. package/vendor/Package.67.mjs +586 -528
  198. package/vendor/Package.68.cjs +633 -96
  199. package/vendor/Package.68.mjs +619 -94
  200. package/vendor/Package.69.cjs +96 -294
  201. package/vendor/Package.69.mjs +95 -295
  202. package/vendor/TypeDef.internal.1.d.ts +1 -1
  203. package/vendor/TypeDef.internal.10.d.ts +1 -1
  204. package/vendor/TypeDef.internal.11.d.ts +2 -2
  205. package/vendor/TypeDef.internal.12.d.ts +2 -2
  206. package/vendor/TypeDef.internal.13.d.ts +6 -6
  207. package/vendor/TypeDef.internal.3.d.ts +3 -3
  208. package/vendor/TypeDef.internal.4.d.ts +181 -347
  209. package/vendor/TypeDef.internal.5.d.ts +2 -2
  210. package/vendor/TypeDef.internal.6.d.ts +2 -2
  211. package/vendor/TypeDef.internal.7.d.ts +1 -1
  212. package/vendor/TypeDef.internal.8.d.ts +1 -1
  213. package/vendor/TypeDef.internal.9.d.ts +1 -1
@@ -1,188 +1,565 @@
1
1
  "use strict";
2
2
 
3
- function e(e) {
4
- return typeof e === "object" && e !== null;
5
- }
3
+ const n = "ffffffff-ffff-ffff-ffff-ffffffffffff";
4
+
5
+ const t = "00000000-0000-0000-0000-000000000000";
6
6
 
7
- function n(n) {
8
- return e(n) && typeof n.length === "number";
7
+ const e = /^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;
8
+
9
+ function r(n) {
10
+ return typeof n === "string" && e.test(n);
9
11
  }
10
12
 
11
- function t(e) {
12
- if (Array.isArray(e)) {
13
- return e;
14
- } else if (e === undefined) {
15
- return [];
16
- } else if (n(e) || e instanceof Set) {
17
- return Array.from(e);
18
- } else {
19
- return [ e ];
13
+ function o(n) {
14
+ if (!r(n)) {
15
+ throw TypeError("Invalid UUID");
20
16
  }
17
+ let t;
18
+ return Uint8Array.of((t = parseInt(n.slice(0, 8), 16)) >>> 24, t >>> 16 & 255, t >>> 8 & 255, t & 255, (t = parseInt(n.slice(9, 13), 16)) >>> 8, t & 255, (t = parseInt(n.slice(14, 18), 16)) >>> 8, t & 255, (t = parseInt(n.slice(19, 23), 16)) >>> 8, t & 255, (t = parseInt(n.slice(24, 36), 16)) / 1099511627776 & 255, t / 4294967296 & 255, t >>> 24 & 255, t >>> 16 & 255, t >>> 8 & 255, t & 255);
21
19
  }
22
20
 
23
- function i(e) {
24
- return !isNaN(parseFloat(e));
21
+ const f = [];
22
+
23
+ for (let n = 0; n < 256; ++n) {
24
+ f.push((n + 256).toString(16).slice(1));
25
25
  }
26
26
 
27
- function r(e) {
28
- return !isNaN(parseFloat(e)) && isFinite(e);
27
+ function s(n, t = 0) {
28
+ return (f[n[t + 0]] + f[n[t + 1]] + f[n[t + 2]] + f[n[t + 3]] + "-" + f[n[t + 4]] + f[n[t + 5]] + "-" + f[n[t + 6]] + f[n[t + 7]] + "-" + f[n[t + 8]] + f[n[t + 9]] + "-" + f[n[t + 10]] + f[n[t + 11]] + f[n[t + 12]] + f[n[t + 13]] + f[n[t + 14]] + f[n[t + 15]]).toLowerCase();
29
29
  }
30
30
 
31
- function s(e) {
32
- return e !== null && typeof e === "object" && e.constructor === Object;
31
+ function c(n, t = 0) {
32
+ const e = s(n, t);
33
+ if (!r(e)) {
34
+ throw TypeError("Stringified UUID is invalid");
35
+ }
36
+ return e;
33
37
  }
34
38
 
35
- function u(e) {
36
- return f(e) && typeof e.length === "number";
39
+ let i;
40
+
41
+ const u = new Uint8Array(16);
42
+
43
+ function l() {
44
+ if (!i) {
45
+ if (typeof crypto === "undefined" || !crypto.getRandomValues) {
46
+ throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
47
+ }
48
+ i = crypto.getRandomValues.bind(crypto);
49
+ }
50
+ return i(u);
37
51
  }
38
52
 
39
- function f(e) {
40
- return typeof e === "object" && e !== null;
53
+ const a = {};
54
+
55
+ function d(n, t, e) {
56
+ let r;
57
+ const o = n?._v6 ?? false;
58
+ if (n) {
59
+ const t = Object.keys(n);
60
+ if (t.length === 1 && t[0] === "_v6") {
61
+ n = undefined;
62
+ }
63
+ }
64
+ if (n) {
65
+ r = y(n.random ?? n.rng?.() ?? l(), n.msecs, n.nsecs, n.clockseq, n.node, t, e);
66
+ } else {
67
+ const n = Date.now();
68
+ const f = l();
69
+ g(a, n, f);
70
+ r = y(f, a.msecs, a.nsecs, o ? undefined : a.clockseq, o ? undefined : a.node, t, e);
71
+ }
72
+ return t ?? s(r);
41
73
  }
42
74
 
43
- function o(e) {
44
- return typeof e !== "undefined";
75
+ function g(n, t, e) {
76
+ n.msecs ??= -Infinity;
77
+ n.nsecs ??= 0;
78
+ if (t === n.msecs) {
79
+ n.nsecs++;
80
+ if (n.nsecs >= 1e4) {
81
+ n.node = undefined;
82
+ n.nsecs = 0;
83
+ }
84
+ } else if (t > n.msecs) {
85
+ n.nsecs = 0;
86
+ } else if (t < n.msecs) {
87
+ n.node = undefined;
88
+ }
89
+ if (!n.node) {
90
+ n.node = e.slice(10, 16);
91
+ n.node[0] |= 1;
92
+ n.clockseq = (e[8] << 8 | e[9]) & 16383;
93
+ }
94
+ n.msecs = t;
95
+ return n;
96
+ }
97
+
98
+ function y(n, t, e, r, o, f, s = 0) {
99
+ if (n.length < 16) {
100
+ throw new Error("Random bytes length must be >= 16");
101
+ }
102
+ if (!f) {
103
+ f = new Uint8Array(16);
104
+ s = 0;
105
+ } else {
106
+ if (s < 0 || s + 16 > f.length) {
107
+ throw new RangeError(`UUID byte range ${s}:${s + 15} is out of buffer bounds`);
108
+ }
109
+ }
110
+ t ??= Date.now();
111
+ e ??= 0;
112
+ r ??= (n[8] << 8 | n[9]) & 16383;
113
+ o ??= n.slice(10, 16);
114
+ t += 122192928e5;
115
+ const c = ((t & 268435455) * 1e4 + e) % 4294967296;
116
+ f[s++] = c >>> 24 & 255;
117
+ f[s++] = c >>> 16 & 255;
118
+ f[s++] = c >>> 8 & 255;
119
+ f[s++] = c & 255;
120
+ const i = t / 4294967296 * 1e4 & 268435455;
121
+ f[s++] = i >>> 8 & 255;
122
+ f[s++] = i & 255;
123
+ f[s++] = i >>> 24 & 15 | 16;
124
+ f[s++] = i >>> 16 & 255;
125
+ f[s++] = r >>> 8 | 128;
126
+ f[s++] = r & 255;
127
+ for (let n = 0; n < 6; ++n) {
128
+ f[s++] = o[n];
129
+ }
130
+ return f;
45
131
  }
46
132
 
47
- function c(e) {
48
- return !o(e);
133
+ function p(n) {
134
+ const t = typeof n === "string" ? o(n) : n;
135
+ const e = h(t);
136
+ return typeof n === "string" ? s(e) : e;
49
137
  }
50
138
 
51
- function l(e) {
52
- return e === null;
139
+ function h(n) {
140
+ return Uint8Array.of((n[6] & 15) << 4 | n[7] >> 4 & 15, (n[7] & 15) << 4 | (n[4] & 240) >> 4, (n[4] & 15) << 4 | (n[5] & 240) >> 4, (n[5] & 15) << 4 | (n[0] & 240) >> 4, (n[0] & 15) << 4 | (n[1] & 240) >> 4, (n[1] & 15) << 4 | (n[2] & 240) >> 4, 96 | n[2] & 15, n[3], n[8], n[9], n[10], n[11], n[12], n[13], n[14], n[15]);
53
141
  }
54
142
 
55
- function a(e) {
56
- return o(e) && !l(e) && !Number.isNaN(e);
143
+ function U(n) {
144
+ const t = I(n);
145
+ const e = b(t, n.length * 8);
146
+ return w(e);
57
147
  }
58
148
 
59
- function d(e) {
60
- if (typeof e === "function") {
61
- return /^class /.test(Function.prototype.toString.call(e));
62
- } else {
63
- return false;
149
+ function w(n) {
150
+ const t = new Uint8Array(n.length * 4);
151
+ for (let e = 0; e < n.length * 4; e++) {
152
+ t[e] = n[e >> 2] >>> e % 4 * 8 & 255;
64
153
  }
154
+ return t;
65
155
  }
66
156
 
67
- function y(e) {
68
- if (e === null) return true;
69
- switch (typeof e) {
70
- case "string":
71
- case "number":
72
- case "symbol":
73
- case "undefined":
74
- case "boolean":
75
- return true;
157
+ function m(n) {
158
+ return (n + 64 >>> 9 << 4) + 14 + 1;
159
+ }
76
160
 
77
- default:
78
- return false;
161
+ function b(n, t) {
162
+ const e = new Uint32Array(m(t)).fill(0);
163
+ e.set(n);
164
+ e[t >> 5] |= 128 << t % 32;
165
+ e[e.length - 1] = t;
166
+ n = e;
167
+ let r = 1732584193;
168
+ let o = -271733879;
169
+ let f = -1732584194;
170
+ let s = 271733878;
171
+ for (let t = 0; t < n.length; t += 16) {
172
+ const e = r;
173
+ const c = o;
174
+ const i = f;
175
+ const u = s;
176
+ r = R(r, o, f, s, n[t], 7, -680876936);
177
+ s = R(s, r, o, f, n[t + 1], 12, -389564586);
178
+ f = R(f, s, r, o, n[t + 2], 17, 606105819);
179
+ o = R(o, f, s, r, n[t + 3], 22, -1044525330);
180
+ r = R(r, o, f, s, n[t + 4], 7, -176418897);
181
+ s = R(s, r, o, f, n[t + 5], 12, 1200080426);
182
+ f = R(f, s, r, o, n[t + 6], 17, -1473231341);
183
+ o = R(o, f, s, r, n[t + 7], 22, -45705983);
184
+ r = R(r, o, f, s, n[t + 8], 7, 1770035416);
185
+ s = R(s, r, o, f, n[t + 9], 12, -1958414417);
186
+ f = R(f, s, r, o, n[t + 10], 17, -42063);
187
+ o = R(o, f, s, r, n[t + 11], 22, -1990404162);
188
+ r = R(r, o, f, s, n[t + 12], 7, 1804603682);
189
+ s = R(s, r, o, f, n[t + 13], 12, -40341101);
190
+ f = R(f, s, r, o, n[t + 14], 17, -1502002290);
191
+ o = R(o, f, s, r, n[t + 15], 22, 1236535329);
192
+ r = x(r, o, f, s, n[t + 1], 5, -165796510);
193
+ s = x(s, r, o, f, n[t + 6], 9, -1069501632);
194
+ f = x(f, s, r, o, n[t + 11], 14, 643717713);
195
+ o = x(o, f, s, r, n[t], 20, -373897302);
196
+ r = x(r, o, f, s, n[t + 5], 5, -701558691);
197
+ s = x(s, r, o, f, n[t + 10], 9, 38016083);
198
+ f = x(f, s, r, o, n[t + 15], 14, -660478335);
199
+ o = x(o, f, s, r, n[t + 4], 20, -405537848);
200
+ r = x(r, o, f, s, n[t + 9], 5, 568446438);
201
+ s = x(s, r, o, f, n[t + 14], 9, -1019803690);
202
+ f = x(f, s, r, o, n[t + 3], 14, -187363961);
203
+ o = x(o, f, s, r, n[t + 8], 20, 1163531501);
204
+ r = x(r, o, f, s, n[t + 13], 5, -1444681467);
205
+ s = x(s, r, o, f, n[t + 2], 9, -51403784);
206
+ f = x(f, s, r, o, n[t + 7], 14, 1735328473);
207
+ o = x(o, f, s, r, n[t + 12], 20, -1926607734);
208
+ r = E(r, o, f, s, n[t + 5], 4, -378558);
209
+ s = E(s, r, o, f, n[t + 8], 11, -2022574463);
210
+ f = E(f, s, r, o, n[t + 11], 16, 1839030562);
211
+ o = E(o, f, s, r, n[t + 14], 23, -35309556);
212
+ r = E(r, o, f, s, n[t + 1], 4, -1530992060);
213
+ s = E(s, r, o, f, n[t + 4], 11, 1272893353);
214
+ f = E(f, s, r, o, n[t + 7], 16, -155497632);
215
+ o = E(o, f, s, r, n[t + 10], 23, -1094730640);
216
+ r = E(r, o, f, s, n[t + 13], 4, 681279174);
217
+ s = E(s, r, o, f, n[t], 11, -358537222);
218
+ f = E(f, s, r, o, n[t + 3], 16, -722521979);
219
+ o = E(o, f, s, r, n[t + 6], 23, 76029189);
220
+ r = E(r, o, f, s, n[t + 9], 4, -640364487);
221
+ s = E(s, r, o, f, n[t + 12], 11, -421815835);
222
+ f = E(f, s, r, o, n[t + 15], 16, 530742520);
223
+ o = E(o, f, s, r, n[t + 2], 23, -995338651);
224
+ r = q(r, o, f, s, n[t], 6, -198630844);
225
+ s = q(s, r, o, f, n[t + 7], 10, 1126891415);
226
+ f = q(f, s, r, o, n[t + 14], 15, -1416354905);
227
+ o = q(o, f, s, r, n[t + 5], 21, -57434055);
228
+ r = q(r, o, f, s, n[t + 12], 6, 1700485571);
229
+ s = q(s, r, o, f, n[t + 3], 10, -1894986606);
230
+ f = q(f, s, r, o, n[t + 10], 15, -1051523);
231
+ o = q(o, f, s, r, n[t + 1], 21, -2054922799);
232
+ r = q(r, o, f, s, n[t + 8], 6, 1873313359);
233
+ s = q(s, r, o, f, n[t + 15], 10, -30611744);
234
+ f = q(f, s, r, o, n[t + 6], 15, -1560198380);
235
+ o = q(o, f, s, r, n[t + 13], 21, 1309151649);
236
+ r = q(r, o, f, s, n[t + 4], 6, -145523070);
237
+ s = q(s, r, o, f, n[t + 11], 10, -1120210379);
238
+ f = q(f, s, r, o, n[t + 2], 15, 718787259);
239
+ o = q(o, f, s, r, n[t + 9], 21, -343485551);
240
+ r = A(r, e);
241
+ o = A(o, c);
242
+ f = A(f, i);
243
+ s = A(s, u);
79
244
  }
245
+ return Uint32Array.of(r, o, f, s);
80
246
  }
81
247
 
82
- function p(e) {
83
- if (e) {
84
- const n = o(Promise) && e instanceof Promise;
85
- const t = e.then && typeof e.then === "function";
86
- return !!(n || t);
87
- } else {
88
- return false;
248
+ function I(n) {
249
+ if (n.length === 0) {
250
+ return new Uint32Array;
89
251
  }
252
+ const t = new Uint32Array(m(n.length * 8)).fill(0);
253
+ for (let e = 0; e < n.length; e++) {
254
+ t[e >> 2] |= (n[e] & 255) << e % 4 * 8;
255
+ }
256
+ return t;
90
257
  }
91
258
 
92
- function b(e) {
93
- if (e === null || !o(e)) {
94
- return false;
95
- } else {
96
- return typeof e[Symbol.iterator] === "function" || typeof e[Symbol.asyncIterator] === "function";
97
- }
259
+ function A(n, t) {
260
+ const e = (n & 65535) + (t & 65535);
261
+ const r = (n >> 16) + (t >> 16) + (e >> 16);
262
+ return r << 16 | e & 65535;
263
+ }
264
+
265
+ function D(n, t) {
266
+ return n << t | n >>> 32 - t;
267
+ }
268
+
269
+ function v(n, t, e, r, o, f) {
270
+ return A(D(A(A(t, n), A(r, f)), o), e);
271
+ }
272
+
273
+ function R(n, t, e, r, o, f, s) {
274
+ return v(t & e | ~t & r, n, t, o, f, s);
275
+ }
276
+
277
+ function x(n, t, e, r, o, f, s) {
278
+ return v(t & r | e & ~r, n, t, o, f, s);
279
+ }
280
+
281
+ function E(n, t, e, r, o, f, s) {
282
+ return v(t ^ e ^ r, n, t, o, f, s);
283
+ }
284
+
285
+ function q(n, t, e, r, o, f, s) {
286
+ return v(e ^ (t | ~r), n, t, o, f, s);
98
287
  }
99
288
 
100
- function m(e) {
101
- return typeof e === "string";
289
+ function $(n) {
290
+ n = unescape(encodeURIComponent(n));
291
+ const t = new Uint8Array(n.length);
292
+ for (let e = 0; e < n.length; ++e) {
293
+ t[e] = n.charCodeAt(e);
294
+ }
295
+ return t;
102
296
  }
103
297
 
104
- function N(e) {
105
- return typeof e === "function";
298
+ const k = "6ba7b810-9dad-11d1-80b4-00c04fd430c8";
299
+
300
+ const M = "6ba7b811-9dad-11d1-80b4-00c04fd430c8";
301
+
302
+ function S(n, t, e, r, f, c) {
303
+ const i = typeof e === "string" ? $(e) : e;
304
+ const u = typeof r === "string" ? o(r) : r;
305
+ if (typeof r === "string") {
306
+ r = o(r);
307
+ }
308
+ if (r?.length !== 16) {
309
+ throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");
310
+ }
311
+ let l = new Uint8Array(16 + i.length);
312
+ l.set(u);
313
+ l.set(i, u.length);
314
+ l = t(l);
315
+ l[6] = l[6] & 15 | n;
316
+ l[8] = l[8] & 63 | 128;
317
+ if (f) {
318
+ c = c || 0;
319
+ for (let n = 0; n < 16; ++n) {
320
+ f[c + n] = l[n];
321
+ }
322
+ return f;
323
+ }
324
+ return s(l);
106
325
  }
107
326
 
108
- function D(e) {
109
- return typeof e === "function" && e.constructor.name === "AsyncFunction";
327
+ function L(n, t, e, r) {
328
+ return S(48, U, n, t, e, r);
110
329
  }
111
330
 
112
- const g = {
113
- isNumber: i,
114
- isFiniteNumber: r,
115
- isPlainObject: s,
116
- isArrayLike: u,
117
- isObject: f,
118
- isDefined: o,
119
- isUndefined: c,
120
- isNull: l,
121
- isDefinedValue: a,
122
- isClass: d,
123
- isPrimitive: y,
124
- isPromise: p,
125
- isIterable: b,
126
- isString: m,
127
- isFunction: N,
128
- isAsyncFunction: D
331
+ L.DNS = k;
332
+
333
+ L.URL = M;
334
+
335
+ const N = typeof crypto !== "undefined" && crypto.randomUUID && crypto.randomUUID.bind(crypto);
336
+
337
+ const T = {
338
+ randomUUID: N
129
339
  };
130
340
 
131
- function F(e, n = {}) {
132
- n = Object.assign({
133
- computed: {},
134
- customOrders: {},
135
- nullRank: 1,
136
- undefinedRank: 1
137
- }, n);
138
- e.sort(O(n));
139
- return e;
341
+ function C(n, t, e) {
342
+ n = n || {};
343
+ const r = n.random ?? n.rng?.() ?? l();
344
+ if (r.length < 16) {
345
+ throw new Error("Random bytes length must be >= 16");
346
+ }
347
+ r[6] = r[6] & 15 | 64;
348
+ r[8] = r[8] & 63 | 128;
349
+ if (t) {
350
+ e = e || 0;
351
+ if (e < 0 || e + 16 > t.length) {
352
+ throw new RangeError(`UUID byte range ${e}:${e + 15} is out of buffer bounds`);
353
+ }
354
+ for (let n = 0; n < 16; ++n) {
355
+ t[e + n] = r[n];
356
+ }
357
+ return t;
358
+ }
359
+ return s(r);
360
+ }
361
+
362
+ function V(n, t, e) {
363
+ if (T.randomUUID && !t && !n) {
364
+ return T.randomUUID();
365
+ }
366
+ return C(n, t, e);
367
+ }
368
+
369
+ function _(n, t, e, r) {
370
+ switch (n) {
371
+ case 0:
372
+ return t & e ^ ~t & r;
373
+
374
+ case 1:
375
+ return t ^ e ^ r;
376
+
377
+ case 2:
378
+ return t & e ^ t & r ^ e & r;
379
+
380
+ case 3:
381
+ return t ^ e ^ r;
382
+ }
140
383
  }
141
384
 
142
- function O(e = {}) {
143
- const n = t(e.by);
144
- const i = t(e.order);
145
- const {customOrders: r, computed: s} = e;
146
- return function t(u, f, o = 0) {
147
- const c = i[o] || "asc";
148
- if (!(c === "asc" || c === "desc" || r[c])) {
149
- return 0;
385
+ function j(n, t) {
386
+ return n << t | n >>> 32 - t;
387
+ }
388
+
389
+ function O(n) {
390
+ const t = [ 1518500249, 1859775393, 2400959708, 3395469782 ];
391
+ const e = [ 1732584193, 4023233417, 2562383102, 271733878, 3285377520 ];
392
+ const r = new Uint8Array(n.length + 1);
393
+ r.set(n);
394
+ r[n.length] = 128;
395
+ n = r;
396
+ const o = n.length / 4 + 2;
397
+ const f = Math.ceil(o / 16);
398
+ const s = new Array(f);
399
+ for (let t = 0; t < f; ++t) {
400
+ const e = new Uint32Array(16);
401
+ for (let r = 0; r < 16; ++r) {
402
+ e[r] = n[t * 64 + r * 4] << 24 | n[t * 64 + r * 4 + 1] << 16 | n[t * 64 + r * 4 + 2] << 8 | n[t * 64 + r * 4 + 3];
403
+ }
404
+ s[t] = e;
405
+ }
406
+ s[f - 1][14] = (n.length - 1) * 8 / Math.pow(2, 32);
407
+ s[f - 1][14] = Math.floor(s[f - 1][14]);
408
+ s[f - 1][15] = (n.length - 1) * 8 & 4294967295;
409
+ for (let n = 0; n < f; ++n) {
410
+ const r = new Uint32Array(80);
411
+ for (let t = 0; t < 16; ++t) {
412
+ r[t] = s[n][t];
413
+ }
414
+ for (let n = 16; n < 80; ++n) {
415
+ r[n] = j(r[n - 3] ^ r[n - 8] ^ r[n - 14] ^ r[n - 16], 1);
150
416
  }
151
- let l, a, d;
152
- if (n.length) {
153
- a = g.isDefined(u[n[o]]) ? u[n[o]] : s[n[o]] && s[n[o]](u);
154
- d = g.isDefined(f[n[o]]) ? f[n[o]] : s[n[o]] && s[n[o]](f);
155
- } else {
156
- a = u;
157
- d = f;
417
+ let o = e[0];
418
+ let f = e[1];
419
+ let c = e[2];
420
+ let i = e[3];
421
+ let u = e[4];
422
+ for (let n = 0; n < 80; ++n) {
423
+ const e = Math.floor(n / 20);
424
+ const s = j(o, 5) + _(e, f, c, i) + u + t[e] + r[n] >>> 0;
425
+ u = i;
426
+ i = c;
427
+ c = j(f, 30) >>> 0;
428
+ f = o;
429
+ o = s;
430
+ }
431
+ e[0] = e[0] + o >>> 0;
432
+ e[1] = e[1] + f >>> 0;
433
+ e[2] = e[2] + c >>> 0;
434
+ e[3] = e[3] + i >>> 0;
435
+ e[4] = e[4] + u >>> 0;
436
+ }
437
+ return Uint8Array.of(e[0] >> 24, e[0] >> 16, e[0] >> 8, e[0], e[1] >> 24, e[1] >> 16, e[1] >> 8, e[1], e[2] >> 24, e[2] >> 16, e[2] >> 8, e[2], e[3] >> 24, e[3] >> 16, e[3] >> 8, e[3], e[4] >> 24, e[4] >> 16, e[4] >> 8, e[4]);
438
+ }
439
+
440
+ function X(n, t, e, r) {
441
+ return S(80, O, n, t, e, r);
442
+ }
443
+
444
+ X.DNS = k;
445
+
446
+ X.URL = M;
447
+
448
+ function z(n, t, e) {
449
+ n ??= {};
450
+ e ??= 0;
451
+ let r = d({
452
+ ...n,
453
+ _v6: true
454
+ }, new Uint8Array(16));
455
+ r = p(r);
456
+ if (t) {
457
+ for (let n = 0; n < 16; n++) {
458
+ t[e + n] = r[n];
158
459
  }
159
- if (r && r[c]) {
160
- l = r[c].indexOf(a) - r[c].indexOf(d);
161
- } else if (a === d) {
162
- l = 0;
163
- } else if (g.isNull(a) && g.isUndefined(d)) {
164
- l = c === "asc" ? 1 : c === "desc" ? -1 : 0;
165
- } else if (g.isUndefined(a) && g.isNull(d)) {
166
- l = c === "asc" ? -1 : c === "desc" ? 1 : 0;
167
- } else if (g.isNull(a) && g.isDefinedValue(d)) {
168
- l = e.nullRank;
169
- } else if (g.isUndefined(a) && g.isDefinedValue(d)) {
170
- l = e.undefinedRank;
171
- } else if (g.isNull(d) && g.isDefinedValue(a)) {
172
- l = -e.nullRank;
173
- } else if (g.isUndefined(d) && g.isDefinedValue(a)) {
174
- l = -e.undefinedRank;
175
- } else {
176
- l = a < d ? -1 : a > d ? 1 : 0;
177
- if (c === "desc") {
178
- l = l * -1;
179
- }
460
+ return t;
461
+ }
462
+ return s(r);
463
+ }
464
+
465
+ function B(n) {
466
+ const t = typeof n === "string" ? o(n) : n;
467
+ const e = F(t);
468
+ return typeof n === "string" ? s(e) : e;
469
+ }
470
+
471
+ function F(n) {
472
+ return Uint8Array.of((n[3] & 15) << 4 | n[4] >> 4 & 15, (n[4] & 15) << 4 | (n[5] & 240) >> 4, (n[5] & 15) << 4 | n[6] & 15, n[7], (n[1] & 15) << 4 | (n[2] & 240) >> 4, (n[2] & 15) << 4 | (n[3] & 240) >> 4, 16 | (n[0] & 240) >> 4, (n[0] & 15) << 4 | (n[1] & 240) >> 4, n[8], n[9], n[10], n[11], n[12], n[13], n[14], n[15]);
473
+ }
474
+
475
+ const G = {};
476
+
477
+ function H(n, t, e) {
478
+ let r;
479
+ if (n) {
480
+ r = K(n.random ?? n.rng?.() ?? l(), n.msecs, n.seq, t, e);
481
+ } else {
482
+ const n = Date.now();
483
+ const o = l();
484
+ J(G, n, o);
485
+ r = K(o, G.msecs, G.seq, t, e);
486
+ }
487
+ return t ?? s(r);
488
+ }
489
+
490
+ function J(n, t, e) {
491
+ n.msecs ??= -Infinity;
492
+ n.seq ??= 0;
493
+ if (t > n.msecs) {
494
+ n.seq = e[6] << 23 | e[7] << 16 | e[8] << 8 | e[9];
495
+ n.msecs = t;
496
+ } else {
497
+ n.seq = n.seq + 1 | 0;
498
+ if (n.seq === 0) {
499
+ n.msecs++;
180
500
  }
181
- if (l === 0 && g.isDefined(n[o + 1])) {
182
- l = t(u, f, o + 1);
501
+ }
502
+ return n;
503
+ }
504
+
505
+ function K(n, t, e, r, o = 0) {
506
+ if (n.length < 16) {
507
+ throw new Error("Random bytes length must be >= 16");
508
+ }
509
+ if (!r) {
510
+ r = new Uint8Array(16);
511
+ o = 0;
512
+ } else {
513
+ if (o < 0 || o + 16 > r.length) {
514
+ throw new RangeError(`UUID byte range ${o}:${o + 15} is out of buffer bounds`);
183
515
  }
184
- return l;
185
- };
516
+ }
517
+ t ??= Date.now();
518
+ e ??= n[6] * 127 << 24 | n[7] << 16 | n[8] << 8 | n[9];
519
+ r[o++] = t / 1099511627776 & 255;
520
+ r[o++] = t / 4294967296 & 255;
521
+ r[o++] = t / 16777216 & 255;
522
+ r[o++] = t / 65536 & 255;
523
+ r[o++] = t / 256 & 255;
524
+ r[o++] = t & 255;
525
+ r[o++] = 112 | e >>> 28 & 15;
526
+ r[o++] = e >>> 20 & 255;
527
+ r[o++] = 128 | e >>> 14 & 63;
528
+ r[o++] = e >>> 6 & 255;
529
+ r[o++] = e << 2 & 255 | n[10] & 3;
530
+ r[o++] = n[11];
531
+ r[o++] = n[12];
532
+ r[o++] = n[13];
533
+ r[o++] = n[14];
534
+ r[o++] = n[15];
535
+ return r;
536
+ }
537
+
538
+ function P(n) {
539
+ if (!r(n)) {
540
+ throw TypeError("Invalid UUID");
541
+ }
542
+ return parseInt(n.slice(14, 15), 16);
186
543
  }
187
544
 
188
- exports.sortArray = F;
545
+ exports.MAX = n;
546
+
547
+ exports.NIL = t;
548
+
549
+ exports.parse = o;
550
+
551
+ exports.stringify = c;
552
+
553
+ exports.v1 = d;
554
+
555
+ exports.v3 = L;
556
+
557
+ exports.v4 = V;
558
+
559
+ exports.v5 = X;
560
+
561
+ exports.v6 = z;
562
+
563
+ exports.validate = r;
564
+
565
+ exports.version = P;