@fluixi/utils 1.0.0-alpha.53

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 (354) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +73 -0
  3. package/dist/index.cjs +1 -0
  4. package/dist/index.d.ts +2 -0
  5. package/dist/index.d.ts.map +1 -0
  6. package/dist/index.js +1 -0
  7. package/dist/index.mjs +1 -0
  8. package/dist/lib/array/advanced.cjs +1 -0
  9. package/dist/lib/array/advanced.d.ts +1116 -0
  10. package/dist/lib/array/advanced.d.ts.map +1 -0
  11. package/dist/lib/array/advanced.js +2429 -0
  12. package/dist/lib/array/advanced.mjs +1 -0
  13. package/dist/lib/array/array.cjs +1 -0
  14. package/dist/lib/array/array.d.ts +6 -0
  15. package/dist/lib/array/array.d.ts.map +1 -0
  16. package/dist/lib/array/array.js +31 -0
  17. package/dist/lib/array/array.mjs +1 -0
  18. package/dist/lib/array/index.cjs +1 -0
  19. package/dist/lib/array/index.d.ts +4 -0
  20. package/dist/lib/array/index.d.ts.map +1 -0
  21. package/dist/lib/array/index.js +3 -0
  22. package/dist/lib/array/index.mjs +1 -0
  23. package/dist/lib/array/utils.cjs +1 -0
  24. package/dist/lib/array/utils.d.ts +100 -0
  25. package/dist/lib/array/utils.d.ts.map +1 -0
  26. package/dist/lib/array/utils.js +165 -0
  27. package/dist/lib/array/utils.mjs +1 -0
  28. package/dist/lib/color/color.cjs +1 -0
  29. package/dist/lib/color/color.d.ts +366 -0
  30. package/dist/lib/color/color.d.ts.map +1 -0
  31. package/dist/lib/color/color.js +722 -0
  32. package/dist/lib/color/color.mjs +1 -0
  33. package/dist/lib/color/constants.cjs +1 -0
  34. package/dist/lib/color/constants.d.ts +361 -0
  35. package/dist/lib/color/constants.d.ts.map +1 -0
  36. package/dist/lib/color/constants.js +358 -0
  37. package/dist/lib/color/constants.mjs +1 -0
  38. package/dist/lib/color/conversions.cjs +1 -0
  39. package/dist/lib/color/conversions.d.ts +166 -0
  40. package/dist/lib/color/conversions.d.ts.map +1 -0
  41. package/dist/lib/color/conversions.js +766 -0
  42. package/dist/lib/color/conversions.mjs +1 -0
  43. package/dist/lib/color/helpers.cjs +1 -0
  44. package/dist/lib/color/helpers.d.ts +75 -0
  45. package/dist/lib/color/helpers.d.ts.map +1 -0
  46. package/dist/lib/color/helpers.js +419 -0
  47. package/dist/lib/color/helpers.mjs +1 -0
  48. package/dist/lib/color/index.cjs +1 -0
  49. package/dist/lib/color/index.d.ts +12 -0
  50. package/dist/lib/color/index.d.ts.map +1 -0
  51. package/dist/lib/color/index.js +15 -0
  52. package/dist/lib/color/index.mjs +1 -0
  53. package/dist/lib/color/types.cjs +1 -0
  54. package/dist/lib/color/types.d.ts +179 -0
  55. package/dist/lib/color/types.d.ts.map +1 -0
  56. package/dist/lib/color/types.js +1 -0
  57. package/dist/lib/color/types.mjs +0 -0
  58. package/dist/lib/color/utils.cjs +1 -0
  59. package/dist/lib/color/utils.d.ts +199 -0
  60. package/dist/lib/color/utils.d.ts.map +1 -0
  61. package/dist/lib/color/utils.js +858 -0
  62. package/dist/lib/color/utils.mjs +1 -0
  63. package/dist/lib/compare/comparators.cjs +1 -0
  64. package/dist/lib/compare/comparators.d.ts +65 -0
  65. package/dist/lib/compare/comparators.d.ts.map +1 -0
  66. package/dist/lib/compare/comparators.js +210 -0
  67. package/dist/lib/compare/comparators.mjs +1 -0
  68. package/dist/lib/compare/index.cjs +1 -0
  69. package/dist/lib/compare/index.d.ts +2 -0
  70. package/dist/lib/compare/index.d.ts.map +1 -0
  71. package/dist/lib/compare/index.js +1 -0
  72. package/dist/lib/compare/index.mjs +1 -0
  73. package/dist/lib/crypto/hash.cjs +1 -0
  74. package/dist/lib/crypto/hash.d.ts +6 -0
  75. package/dist/lib/crypto/hash.d.ts.map +1 -0
  76. package/dist/lib/crypto/hash.js +53 -0
  77. package/dist/lib/crypto/hash.mjs +1 -0
  78. package/dist/lib/crypto/index.cjs +1 -0
  79. package/dist/lib/crypto/index.d.ts +2 -0
  80. package/dist/lib/crypto/index.d.ts.map +1 -0
  81. package/dist/lib/crypto/index.js +1 -0
  82. package/dist/lib/crypto/index.mjs +1 -0
  83. package/dist/lib/dom/events.cjs +1 -0
  84. package/dist/lib/dom/events.d.ts +159 -0
  85. package/dist/lib/dom/events.d.ts.map +1 -0
  86. package/dist/lib/dom/events.js +50 -0
  87. package/dist/lib/dom/events.mjs +1 -0
  88. package/dist/lib/dom/index.cjs +1 -0
  89. package/dist/lib/dom/index.d.ts +3 -0
  90. package/dist/lib/dom/index.d.ts.map +1 -0
  91. package/dist/lib/dom/index.js +2 -0
  92. package/dist/lib/dom/index.mjs +1 -0
  93. package/dist/lib/dom/utils.cjs +1 -0
  94. package/dist/lib/dom/utils.d.ts +6 -0
  95. package/dist/lib/dom/utils.d.ts.map +1 -0
  96. package/dist/lib/dom/utils.js +37 -0
  97. package/dist/lib/dom/utils.mjs +1 -0
  98. package/dist/lib/functions/functions.cjs +1 -0
  99. package/dist/lib/functions/functions.d.ts +329 -0
  100. package/dist/lib/functions/functions.d.ts.map +1 -0
  101. package/dist/lib/functions/functions.js +585 -0
  102. package/dist/lib/functions/functions.mjs +1 -0
  103. package/dist/lib/functions/index.cjs +1 -0
  104. package/dist/lib/functions/index.d.ts +3 -0
  105. package/dist/lib/functions/index.d.ts.map +1 -0
  106. package/dist/lib/functions/index.js +1 -0
  107. package/dist/lib/functions/index.mjs +1 -0
  108. package/dist/lib/functions/types.cjs +1 -0
  109. package/dist/lib/functions/types.d.ts +2 -0
  110. package/dist/lib/functions/types.d.ts.map +1 -0
  111. package/dist/lib/functions/types.js +1 -0
  112. package/dist/lib/functions/types.mjs +0 -0
  113. package/dist/lib/helpers.cjs +1 -0
  114. package/dist/lib/helpers.d.ts +13 -0
  115. package/dist/lib/helpers.d.ts.map +1 -0
  116. package/dist/lib/helpers.js +66 -0
  117. package/dist/lib/helpers.mjs +1 -0
  118. package/dist/lib/index.cjs +1 -0
  119. package/dist/lib/index.d.ts +6 -0
  120. package/dist/lib/index.d.ts.map +1 -0
  121. package/dist/lib/index.js +8 -0
  122. package/dist/lib/index.mjs +1 -0
  123. package/dist/lib/maths/constants.cjs +1 -0
  124. package/dist/lib/maths/constants.d.ts +84 -0
  125. package/dist/lib/maths/constants.d.ts.map +1 -0
  126. package/dist/lib/maths/constants.js +79 -0
  127. package/dist/lib/maths/constants.mjs +1 -0
  128. package/dist/lib/maths/fn/advanced.cjs +1 -0
  129. package/dist/lib/maths/fn/advanced.d.ts +149 -0
  130. package/dist/lib/maths/fn/advanced.d.ts.map +1 -0
  131. package/dist/lib/maths/fn/advanced.js +264 -0
  132. package/dist/lib/maths/fn/advanced.mjs +1 -0
  133. package/dist/lib/maths/fn/basic.cjs +1 -0
  134. package/dist/lib/maths/fn/basic.d.ts +182 -0
  135. package/dist/lib/maths/fn/basic.d.ts.map +1 -0
  136. package/dist/lib/maths/fn/basic.js +343 -0
  137. package/dist/lib/maths/fn/basic.mjs +1 -0
  138. package/dist/lib/maths/fn/complex.cjs +1 -0
  139. package/dist/lib/maths/fn/complex.d.ts +153 -0
  140. package/dist/lib/maths/fn/complex.d.ts.map +1 -0
  141. package/dist/lib/maths/fn/complex.js +383 -0
  142. package/dist/lib/maths/fn/complex.mjs +1 -0
  143. package/dist/lib/maths/fn/index.cjs +1 -0
  144. package/dist/lib/maths/fn/index.d.ts +10 -0
  145. package/dist/lib/maths/fn/index.d.ts.map +1 -0
  146. package/dist/lib/maths/fn/index.js +9 -0
  147. package/dist/lib/maths/fn/index.mjs +1 -0
  148. package/dist/lib/maths/fn/trigo.cjs +1 -0
  149. package/dist/lib/maths/fn/trigo.d.ts +147 -0
  150. package/dist/lib/maths/fn/trigo.d.ts.map +1 -0
  151. package/dist/lib/maths/fn/trigo.js +227 -0
  152. package/dist/lib/maths/fn/trigo.mjs +1 -0
  153. package/dist/lib/maths/fn/vector.cjs +1 -0
  154. package/dist/lib/maths/fn/vector.d.ts +512 -0
  155. package/dist/lib/maths/fn/vector.d.ts.map +1 -0
  156. package/dist/lib/maths/fn/vector.js +1136 -0
  157. package/dist/lib/maths/fn/vector.mjs +1 -0
  158. package/dist/lib/maths/formatter.cjs +1 -0
  159. package/dist/lib/maths/formatter.d.ts +35 -0
  160. package/dist/lib/maths/formatter.d.ts.map +1 -0
  161. package/dist/lib/maths/formatter.js +56 -0
  162. package/dist/lib/maths/formatter.mjs +1 -0
  163. package/dist/lib/maths/guards.cjs +1 -0
  164. package/dist/lib/maths/guards.d.ts +166 -0
  165. package/dist/lib/maths/guards.d.ts.map +1 -0
  166. package/dist/lib/maths/guards.js +315 -0
  167. package/dist/lib/maths/guards.mjs +1 -0
  168. package/dist/lib/maths/index.cjs +1 -0
  169. package/dist/lib/maths/index.d.ts +24 -0
  170. package/dist/lib/maths/index.d.ts.map +1 -0
  171. package/dist/lib/maths/index.js +29 -0
  172. package/dist/lib/maths/index.mjs +1 -0
  173. package/dist/lib/maths/parser.cjs +1 -0
  174. package/dist/lib/maths/parser.d.ts +20 -0
  175. package/dist/lib/maths/parser.d.ts.map +1 -0
  176. package/dist/lib/maths/parser.js +78 -0
  177. package/dist/lib/maths/parser.mjs +1 -0
  178. package/dist/lib/maths/random.cjs +1 -0
  179. package/dist/lib/maths/random.d.ts +27 -0
  180. package/dist/lib/maths/random.d.ts.map +1 -0
  181. package/dist/lib/maths/random.js +49 -0
  182. package/dist/lib/maths/random.mjs +1 -0
  183. package/dist/lib/maths/types/advanced.cjs +1 -0
  184. package/dist/lib/maths/types/advanced.d.ts +357 -0
  185. package/dist/lib/maths/types/advanced.d.ts.map +1 -0
  186. package/dist/lib/maths/types/advanced.js +5 -0
  187. package/dist/lib/maths/types/advanced.mjs +0 -0
  188. package/dist/lib/maths/types/basic.cjs +1 -0
  189. package/dist/lib/maths/types/basic.d.ts +95 -0
  190. package/dist/lib/maths/types/basic.d.ts.map +1 -0
  191. package/dist/lib/maths/types/basic.js +5 -0
  192. package/dist/lib/maths/types/basic.mjs +0 -0
  193. package/dist/lib/maths/types/index.cjs +1 -0
  194. package/dist/lib/maths/types/index.d.ts +4 -0
  195. package/dist/lib/maths/types/index.d.ts.map +1 -0
  196. package/dist/lib/maths/types/index.js +3 -0
  197. package/dist/lib/maths/types/index.mjs +0 -0
  198. package/dist/lib/maths/types/negative.cjs +1 -0
  199. package/dist/lib/maths/types/negative.d.ts +51 -0
  200. package/dist/lib/maths/types/negative.d.ts.map +1 -0
  201. package/dist/lib/maths/types/negative.js +5 -0
  202. package/dist/lib/maths/types/negative.mjs +0 -0
  203. package/dist/lib/maths/types/operations.cjs +1 -0
  204. package/dist/lib/maths/types/operations.d.ts +188 -0
  205. package/dist/lib/maths/types/operations.d.ts.map +1 -0
  206. package/dist/lib/maths/types/operations.js +6 -0
  207. package/dist/lib/maths/types/operations.mjs +0 -0
  208. package/dist/lib/object/clone.cjs +1 -0
  209. package/dist/lib/object/clone.d.ts +46 -0
  210. package/dist/lib/object/clone.d.ts.map +1 -0
  211. package/dist/lib/object/clone.js +104 -0
  212. package/dist/lib/object/clone.mjs +1 -0
  213. package/dist/lib/object/diff.cjs +1 -0
  214. package/dist/lib/object/diff.d.ts +203 -0
  215. package/dist/lib/object/diff.d.ts.map +1 -0
  216. package/dist/lib/object/diff.js +805 -0
  217. package/dist/lib/object/diff.mjs +1 -0
  218. package/dist/lib/object/getter-setter.cjs +1 -0
  219. package/dist/lib/object/getter-setter.d.ts +361 -0
  220. package/dist/lib/object/getter-setter.d.ts.map +1 -0
  221. package/dist/lib/object/getter-setter.js +1771 -0
  222. package/dist/lib/object/getter-setter.mjs +1 -0
  223. package/dist/lib/object/index.cjs +6 -0
  224. package/dist/lib/object/index.d.ts +13 -0
  225. package/dist/lib/object/index.d.ts.map +1 -0
  226. package/dist/lib/object/index.js +12 -0
  227. package/dist/lib/object/index.mjs +6 -0
  228. package/dist/lib/object/merge.cjs +1 -0
  229. package/dist/lib/object/merge.d.ts +93 -0
  230. package/dist/lib/object/merge.d.ts.map +1 -0
  231. package/dist/lib/object/merge.js +474 -0
  232. package/dist/lib/object/merge.mjs +1 -0
  233. package/dist/lib/object/object.cjs +1 -0
  234. package/dist/lib/object/object.d.ts +128 -0
  235. package/dist/lib/object/object.d.ts.map +1 -0
  236. package/dist/lib/object/object.js +432 -0
  237. package/dist/lib/object/object.mjs +1 -0
  238. package/dist/lib/object/omit.cjs +1 -0
  239. package/dist/lib/object/omit.d.ts +351 -0
  240. package/dist/lib/object/omit.d.ts.map +1 -0
  241. package/dist/lib/object/omit.js +656 -0
  242. package/dist/lib/object/omit.mjs +1 -0
  243. package/dist/lib/object/reconcile.cjs +1 -0
  244. package/dist/lib/object/reconcile.d.ts +7 -0
  245. package/dist/lib/object/reconcile.d.ts.map +1 -0
  246. package/dist/lib/object/reconcile.js +122 -0
  247. package/dist/lib/object/reconcile.mjs +1 -0
  248. package/dist/lib/object/selector.cjs +1 -0
  249. package/dist/lib/object/selector.d.ts +50 -0
  250. package/dist/lib/object/selector.d.ts.map +1 -0
  251. package/dist/lib/object/selector.js +371 -0
  252. package/dist/lib/object/selector.mjs +1 -0
  253. package/dist/lib/object/sort.cjs +1 -0
  254. package/dist/lib/object/sort.d.ts +149 -0
  255. package/dist/lib/object/sort.d.ts.map +1 -0
  256. package/dist/lib/object/sort.js +298 -0
  257. package/dist/lib/object/sort.mjs +1 -0
  258. package/dist/lib/object/transform.cjs +1 -0
  259. package/dist/lib/object/transform.d.ts +620 -0
  260. package/dist/lib/object/transform.d.ts.map +1 -0
  261. package/dist/lib/object/transform.js +1058 -0
  262. package/dist/lib/object/transform.mjs +1 -0
  263. package/dist/lib/object/types.cjs +1 -0
  264. package/dist/lib/object/types.d.ts +250 -0
  265. package/dist/lib/object/types.d.ts.map +1 -0
  266. package/dist/lib/object/types.js +1 -0
  267. package/dist/lib/object/types.mjs +0 -0
  268. package/dist/lib/object/utils.cjs +6 -0
  269. package/dist/lib/object/utils.d.ts +165 -0
  270. package/dist/lib/object/utils.d.ts.map +1 -0
  271. package/dist/lib/object/utils.js +444 -0
  272. package/dist/lib/object/utils.mjs +6 -0
  273. package/dist/lib/primitive/boolean/boolean.cjs +1 -0
  274. package/dist/lib/primitive/boolean/boolean.d.ts +276 -0
  275. package/dist/lib/primitive/boolean/boolean.d.ts.map +1 -0
  276. package/dist/lib/primitive/boolean/boolean.js +615 -0
  277. package/dist/lib/primitive/boolean/boolean.mjs +1 -0
  278. package/dist/lib/primitive/boolean/index.cjs +1 -0
  279. package/dist/lib/primitive/boolean/index.d.ts +3 -0
  280. package/dist/lib/primitive/boolean/index.d.ts.map +1 -0
  281. package/dist/lib/primitive/boolean/index.js +2 -0
  282. package/dist/lib/primitive/boolean/index.mjs +1 -0
  283. package/dist/lib/primitive/boolean/types.cjs +1 -0
  284. package/dist/lib/primitive/boolean/types.d.ts +14 -0
  285. package/dist/lib/primitive/boolean/types.d.ts.map +1 -0
  286. package/dist/lib/primitive/boolean/types.js +1 -0
  287. package/dist/lib/primitive/boolean/types.mjs +0 -0
  288. package/dist/lib/primitive/date/date.cjs +1 -0
  289. package/dist/lib/primitive/date/date.d.ts +641 -0
  290. package/dist/lib/primitive/date/date.d.ts.map +1 -0
  291. package/dist/lib/primitive/date/date.js +1998 -0
  292. package/dist/lib/primitive/date/date.mjs +1 -0
  293. package/dist/lib/primitive/date/index.cjs +1 -0
  294. package/dist/lib/primitive/date/index.d.ts +3 -0
  295. package/dist/lib/primitive/date/index.d.ts.map +1 -0
  296. package/dist/lib/primitive/date/index.js +2 -0
  297. package/dist/lib/primitive/date/index.mjs +1 -0
  298. package/dist/lib/primitive/date/types.cjs +1 -0
  299. package/dist/lib/primitive/date/types.d.ts +205 -0
  300. package/dist/lib/primitive/date/types.d.ts.map +1 -0
  301. package/dist/lib/primitive/date/types.js +7 -0
  302. package/dist/lib/primitive/date/types.mjs +0 -0
  303. package/dist/lib/primitive/index.cjs +5 -0
  304. package/dist/lib/primitive/index.d.ts +5 -0
  305. package/dist/lib/primitive/index.d.ts.map +1 -0
  306. package/dist/lib/primitive/index.js +4 -0
  307. package/dist/lib/primitive/index.mjs +5 -0
  308. package/dist/lib/primitive/string/index.cjs +5 -0
  309. package/dist/lib/primitive/string/index.d.ts +3 -0
  310. package/dist/lib/primitive/string/index.d.ts.map +1 -0
  311. package/dist/lib/primitive/string/index.js +2 -0
  312. package/dist/lib/primitive/string/index.mjs +5 -0
  313. package/dist/lib/primitive/string/parser-2.cjs +8 -0
  314. package/dist/lib/primitive/string/parser-2.d.ts +17 -0
  315. package/dist/lib/primitive/string/parser-2.d.ts.map +1 -0
  316. package/dist/lib/primitive/string/parser-2.js +656 -0
  317. package/dist/lib/primitive/string/parser-2.mjs +8 -0
  318. package/dist/lib/primitive/string/parser.cjs +3 -0
  319. package/dist/lib/primitive/string/parser.d.ts +9 -0
  320. package/dist/lib/primitive/string/parser.d.ts.map +1 -0
  321. package/dist/lib/primitive/string/parser.js +775 -0
  322. package/dist/lib/primitive/string/parser.mjs +3 -0
  323. package/dist/lib/primitive/string/string.cjs +5 -0
  324. package/dist/lib/primitive/string/string.d.ts +535 -0
  325. package/dist/lib/primitive/string/string.d.ts.map +1 -0
  326. package/dist/lib/primitive/string/string.js +1301 -0
  327. package/dist/lib/primitive/string/string.mjs +5 -0
  328. package/dist/lib/primitive/string/types.cjs +1 -0
  329. package/dist/lib/primitive/string/types.d.ts +318 -0
  330. package/dist/lib/primitive/string/types.d.ts.map +1 -0
  331. package/dist/lib/primitive/string/types.js +5 -0
  332. package/dist/lib/primitive/string/types.mjs +0 -0
  333. package/dist/lib/primitive/types.cjs +1 -0
  334. package/dist/lib/primitive/types.d.ts +27 -0
  335. package/dist/lib/primitive/types.d.ts.map +1 -0
  336. package/dist/lib/primitive/types.js +1 -0
  337. package/dist/lib/primitive/types.mjs +0 -0
  338. package/dist/lib/url/index.cjs +1 -0
  339. package/dist/lib/url/index.d.ts +3 -0
  340. package/dist/lib/url/index.d.ts.map +1 -0
  341. package/dist/lib/url/index.js +2 -0
  342. package/dist/lib/url/index.mjs +1 -0
  343. package/dist/lib/url/parser.cjs +1 -0
  344. package/dist/lib/url/parser.d.ts +216 -0
  345. package/dist/lib/url/parser.d.ts.map +1 -0
  346. package/dist/lib/url/parser.js +488 -0
  347. package/dist/lib/url/parser.mjs +1 -0
  348. package/dist/lib/url/types.cjs +1 -0
  349. package/dist/lib/url/types.d.ts +18 -0
  350. package/dist/lib/url/types.d.ts.map +1 -0
  351. package/dist/lib/url/types.js +1 -0
  352. package/dist/lib/url/types.mjs +0 -0
  353. package/dist/tsconfig.lib.tsbuildinfo +1 -0
  354. package/package.json +150 -0
@@ -0,0 +1,66 @@
1
+ import { isDate, } from '@fluixi/utils/primitive';
2
+ import { isClass, isObject } from '@fluixi/utils/object';
3
+ import { isArray } from '@fluixi/utils/array';
4
+ import { isFunction } from '@fluixi/utils/functions';
5
+ /** Check if value is null */
6
+ export function isNull(v) {
7
+ return v === null;
8
+ }
9
+ /** Check if value is undefined */
10
+ export function isUndefined(v) {
11
+ return v === undefined;
12
+ }
13
+ export const isUndefinedOrNull = (element) => {
14
+ if (typeof element === 'undefined' || element === null)
15
+ return true;
16
+ return false;
17
+ };
18
+ /** Check if value is primitive */
19
+ export function isPrimitive(v) {
20
+ const type = typeof v;
21
+ return (v === null ||
22
+ type === 'string' ||
23
+ type === 'number' ||
24
+ type === 'boolean' ||
25
+ type === 'symbol' ||
26
+ type === 'bigint' ||
27
+ type === 'undefined' ||
28
+ isDate(v));
29
+ }
30
+ export function isDefined(obj) {
31
+ return obj !== undefined && obj !== null;
32
+ }
33
+ export function getKind(obj) {
34
+ if (obj === null)
35
+ return 'null';
36
+ if (obj === undefined)
37
+ return 'undefined';
38
+ if (isDate(obj))
39
+ return 'date';
40
+ if (isClass(obj))
41
+ return 'class';
42
+ if (isFunction(obj))
43
+ return 'function';
44
+ if (isArray(obj))
45
+ return 'array';
46
+ if (isPrimitive(obj))
47
+ return 'primitive';
48
+ if (isObject(obj))
49
+ return 'object';
50
+ // fallback
51
+ return 'primitive';
52
+ }
53
+ export const generateUUID = () => {
54
+ return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
55
+ let r = (Math.random() * 16) | 0;
56
+ let v = c === 'x' ? r : (r & 0x3) | 0x8;
57
+ return v.toString(16);
58
+ });
59
+ };
60
+ export const generateID = () => {
61
+ return 'xxyxxxxxxy-4xx8'.replace(/[xy]/g, function (c) {
62
+ let r = (Math.random() * 16) | 0;
63
+ let v = c === 'x' ? r : (r & 0x3) | 0x8;
64
+ return v.toString(16);
65
+ });
66
+ };
@@ -0,0 +1 @@
1
+ import{isDate as r}from"@fluixi/utils/primitive";import{isClass as i,isObject as u}from"@fluixi/utils/object";import{isArray as x}from"@fluixi/utils/array";import{isFunction as o}from"@fluixi/utils/functions";function y(n){return n===null}function g(n){return n===void 0}var v=n=>typeof n>"u"||n===null;function f(n){let e=typeof n;return n===null||e==="string"||e==="number"||e==="boolean"||e==="symbol"||e==="bigint"||e==="undefined"||r(n)}function O(n){return n!=null}function b(n){return n===null?"null":n===void 0?"undefined":r(n)?"date":i(n)?"class":o(n)?"function":x(n)?"array":f(n)?"primitive":u(n)?"object":"primitive"}var T=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(n){let e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)}),U=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(n){let e=Math.random()*16|0;return(n==="x"?e:e&3|8).toString(16)});export{U as generateID,T as generateUUID,b as getKind,O as isDefined,y as isNull,f as isPrimitive,g as isUndefined,v as isUndefinedOrNull};
@@ -0,0 +1 @@
1
+ "use strict";var V=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var ce=Object.getOwnPropertyNames;var ye=Object.prototype.hasOwnProperty;var pe=(e,n)=>{for(var t in n)V(e,t,{get:n[t],enumerable:!0})},de=(e,n,t,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let i of ce(n))!ye.call(e,i)&&i!==t&&V(e,i,{get:()=>n[i],enumerable:!(r=le(n,i))||r.enumerable});return e};var Te=e=>de(V({},"__esModule",{value:!0}),e);var vr={};pe(vr,{aenu:()=>Ht,after:()=>Ar,applyByIndex:()=>pt,ary:()=>cr,at:()=>Me,avgBy:()=>Un,batch:()=>Et,batchProcess:()=>Nn,batchProcessParallel:()=>Bn,before:()=>gr,bifurcate:()=>_n,binarySearch:()=>Ct,bind:()=>fr,btoa:()=>Dt,cartesian:()=>Rn,chunk:()=>I,chunkBy:()=>Fn,compact:()=>on,compareWithHash:()=>Qt,compose:()=>se,countBy:()=>_e,createHash:()=>Jt,cumulativeSum:()=>at,curry:()=>ir,debounce:()=>ie,dedupeConsecutive:()=>nt,deepCloneArray:()=>hn,defer:()=>pr,delay:()=>dr,diff:()=>ut,difference:()=>Ze,differenceWith:()=>Yn,drop:()=>rn,dropWhile:()=>sn,ensureArray:()=>Q,enumerate:()=>yt,everyAsync:()=>Ot,fill:()=>xn,filterAsync:()=>St,filterCompact:()=>Pn,filterConsecutive:()=>Ft,findAllIndices:()=>In,findAsync:()=>wt,findIndex:()=>cn,findLastIndex:()=>yn,first:()=>Fe,flatMap:()=>gn,flatten:()=>ze,flattenArray:()=>Ve,flattenDeep:()=>_,flip:()=>lr,flow:()=>xr,flowRight:()=>hr,frequencies:()=>P,generate:()=>Jn,generateID:()=>Le,generateUUID:()=>Be,getKind:()=>Ne,groupArrayBy:()=>Ee,groupBy:()=>He,groupConsecutive:()=>et,hasDuplicates:()=>mt,hasSameElements:()=>Dn,hash:()=>C,hashStringPromise:()=>Zt,indexBy:()=>$t,insert:()=>wn,insertSorted:()=>Ut,interleave:()=>Hn,intersection:()=>Ge,isAddRemoveListenerTarget:()=>Lt,isArray:()=>Se,isArrayEqual:()=>qn,isArrayLike:()=>Ke,isArrayOfBoolean:()=>xe,isArrayOfNumber:()=>me,isArrayOfObject:()=>he,isArrayOfString:()=>Ae,isAsyncFunction:()=>Yt,isDOMEventTarget:()=>Wt,isDefined:()=>We,isDoubleArray:()=>we,isEmptyArray:()=>Oe,isEqual:()=>kn,isFunction:()=>re,isIterable:()=>B,isNodeEventEmitter:()=>Nt,isNonEmptyArray:()=>Pe,isNull:()=>$e,isObjectArray:()=>be,isOnOffTarget:()=>Bt,isPrimitive:()=>D,isPromise:()=>Xt,isReadonlyArray:()=>Ie,isSorted:()=>At,isStaticArray:()=>ve,isSubset:()=>X,isSuperset:()=>zn,isTypedArray:()=>Re,isUndefined:()=>Ce,isUndefinedOrNull:()=>Ue,keyBy:()=>Je,last:()=>ke,leastCommon:()=>Wn,mapAsync:()=>ht,mapAsyncParallel:()=>bt,mapWithContext:()=>jt,maxBy:()=>Cn,median:()=>Zn,memoize:()=>er,memoizeWithTTL:()=>Tr,mergeArraysByKey:()=>Mt,mergeByKey:()=>bn,minBy:()=>$n,mode:()=>Gn,mostCommon:()=>G,move:()=>Sn,negate:()=>sr,normalize:()=>st,omit:()=>Tn,once:()=>tr,overArgs:()=>or,pad:()=>ft,pairwise:()=>ct,partial:()=>ar,partialRight:()=>ur,partition:()=>Ye,percentile:()=>E,pick:()=>dn,pickMany:()=>xt,pipe:()=>oe,pluck:()=>pn,quartiles:()=>rt,range:()=>mn,rank:()=>tt,rearg:()=>rr,reduceAsync:()=>vt,reduceRight:()=>An,remove:()=>Kn,repeat:()=>Qn,replace:()=>On,retry:()=>br,reverseSegment:()=>gt,rotate:()=>vn,rotateLeft:()=>ee,rotateRight:()=>dt,sample:()=>fn,sampleSize:()=>ln,scan:()=>Y,segment:()=>It,selectByCount:()=>kt,shuffle:()=>J,slidingWindow:()=>Mn,someAsync:()=>Kt,sortBy:()=>Qe,splitDuplicates:()=>En,standardDeviation:()=>$,standardize:()=>ot,string_hash:()=>Gt,sumBy:()=>Z,swap:()=>Tt,take:()=>en,takeLast:()=>nn,takeWhile:()=>tn,throttle:()=>nr,toArray:()=>je,toArrayString:()=>ge,toObject:()=>ne,transpose:()=>Ln,trim:()=>lt,tryCatch:()=>mr,uena:()=>zt,unary:()=>yr,union:()=>Xe,unique:()=>j,unzip:()=>un,updateBy:()=>jn,updateQueryStringParameter:()=>_t,variance:()=>it,weightedAverage:()=>Pt,weightedSample:()=>Rt,windowObject:()=>qt,withTimeout:()=>Sr,without:()=>Xn,wrap:()=>Vn,zip:()=>an,zipWith:()=>Vt});module.exports=Te(vr);var ge=e=>{if(Array.isArray(e))return e;if(typeof e=="string")if(e.startsWith("[")&&e.endsWith("]"))try{return JSON.parse(e)}catch{return[]}else return[e];return[]};function Ae(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function me(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function xe(e){return Array.isArray(e)&&e.every(n=>typeof n=="boolean")}function he(e){return Array.isArray(e)&&e.every(n=>typeof n=="object")}var N=require("@fluixi/utils/object"),be=e=>Array.isArray(e)&&e.every(n=>(0,N.isObject)(n));function Se(e){return Array.isArray(e)}function ve(e){return Array.isArray(e)}function we(e){return Array.isArray(e)&&e.every(n=>Array.isArray(n)&&n.length===2)}function B(e){return e!=null&&typeof e[Symbol.iterator]=="function"}function Ke(e){return e!=null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&(e.length===0||e.length-1 in e)}function Oe(e){return Array.isArray(e)&&e.length===0}function Pe(e){return Array.isArray(e)&&e.length>0}function Re(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Ie(e){return Array.isArray(e)}function ke(e){return e.length>0?e[e.length-1]:void 0}function Fe(e){return e.length>0?e[0]:void 0}function je(e){return Array.isArray(e)?[...e]:B(e)?[...e]:Array.from(e)}function Ee(e,n){return e.reduce((t,r)=>{let i=n(r);return t[i]||(t[i]=[]),t[i].push(r),t},{})}function Ve(e){return e.flat()}function Me(e,n){let t=n<0?e.length+n:n;return e[t]}var m=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object";var S=(e,n,t,r)=>{if(t>r)return;if(n.length===0)return e;let i=n[0],s=n.slice(1);if(i.type==="descendant"){let a=S(e,s,t+1,r);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let o=[];for(let u=0;u<e.length;u++){let f=S(e[u],n,t+1,r);f!==void 0&&(o[u]=f)}return o.length>0?o:void 0}else{let o={};for(let u in e)if(e.hasOwnProperty(u)){let f=S(e[u],n,t+1,r);f!==void 0&&(o[u]=f)}return Object.keys(o).length>0?o:void 0}return}switch(i.type){case"property":if(m(e)&&i.value&&String(i.value)in e){let a=e[String(i.value)],o=S(a,s,t+1,r);if(o!==void 0)return{[String(i.value)]:o}}break;case"index":if(Array.isArray(e)){let a=i.value;if(a>=0&&a<e.length){let o=S(e[a],s,t+1,r);if(o!==void 0){let u=new Array(e.length).filter(f=>f!==void 0);return u[a]=o,u}}}else if(e&&typeof e=="object"){let a=String(i.value);if(a in e){let o=S(e[a],s,t+1,r);if(o!==void 0)return{[a]:o}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],o=!1;for(let u=0;u<e.length;u++){let f=S(e[u],s,t+1,r);f!==void 0&&(a[u]=f,o=!0)}return o?a:void 0}else{let a={},o=!1;for(let u in e)if(e.hasOwnProperty(u)){let f=S(e[u],s,t+1,r);f!==void 0&&(a[u]=f,o=!0)}return o?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,o]=i.value,u=Math.max(0,a),f=Math.min(e.length,o===1/0?e.length:o),y=[],T=!1;for(let p=u;p<f;p++){let b=S(e[p],s,t+1,r);b!==void 0&&(y[p]=b,T=!0)}return T?y:void 0}break;case"union":if(Array.isArray(e)){let a=i.value,o=[],u=!1;for(let f of a)if(f>=0&&f<e.length){let y=S(e[f],s,t+1,r);y!==void 0&&(o[f]=y,u=!0)}return u?o:void 0}break;case"filter":if(Array.isArray(e)){let a=i.value,o=[],u=!1;for(let f=0;f<e.length;f++)if(a(e[f])){let y=S(e[f],s,t+1,r);y!==void 0&&(o[f]=y,u=!0)}return u?o:void 0}break}};var K=(e,n)=>{if(e==null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e instanceof Map){let t=new Map;return e.forEach((r,i)=>{(!n||!n.some(s=>s.toString()===i.toString()))&&t.set(i,K(r))}),t}if(e instanceof Set){let t=new Set;return e.forEach(r=>{t.add(K(r))}),t}if(Array.isArray(e))return Array.from(e).map(t=>K(t));if(m(e)){let t={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(!n||!n.some(s=>s.toString()===i.toString()))&&(t[i]=K(e[i]));let r=Object.getOwnPropertySymbols(e);for(let i of r)(!n||!n.some(s=>s.toString()===i.toString()))&&(t[i]=K(e[i]));return t}return e};var M=require("@fluixi/utils/primitive"),F=require("@fluixi/utils/object"),L=require("@fluixi/utils/array"),q=require("@fluixi/utils/functions");function $e(e){return e===null}function Ce(e){return e===void 0}var Ue=e=>typeof e>"u"||e===null;function D(e){let n=typeof e;return e===null||n==="string"||n==="number"||n==="boolean"||n==="symbol"||n==="bigint"||n==="undefined"||(0,M.isDate)(e)}function We(e){return e!=null}function Ne(e){return e===null?"null":e===void 0?"undefined":(0,M.isDate)(e)?"date":(0,F.isClass)(e)?"class":(0,q.isFunction)(e)?"function":(0,L.isArray)(e)?"array":D(e)?"primitive":(0,F.isObject)(e)?"object":"primitive"}var Be=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)}),Le=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)});var R=(e,n={})=>{let{type:t="auto",throwOnError:r=!1}=n;if(!e||typeof e!="string")return[];let i=[],s="",a=!1,o=!1,u="",f="",y=0,p=t==="auto"?(l=>l.includes("..")?"descendant":l.includes("[?(")?"filter":l.includes("[:")||l.includes("[0:")?"slice":l.includes("[,")||l.includes("[0,1]")?"union":l.includes("[*]")||l.includes(".*.")?"wildcard":l.includes("[]")?"array-wildcard":l.includes("[")&&l.includes("]")?"bracket":"dot")(e):t,b=l=>{let c=l.trim();if(c==="*"||c==="")return{type:"wildcard",value:c===""?"[]":"*",raw:c===""?"[]":l};if(c==="[]")return{type:"wildcard",value:"[]",raw:l};if(/^-?\d+$/.test(c))return{type:"index",value:parseInt(c,10),raw:l};if(c.includes(":")){let g=c.split(":").map(O=>O.trim()),x=g[0]===""?0:parseInt(g[0],10),h=g[1]===""?1/0:parseInt(g[1],10);if(isNaN(x)||isNaN(h)){if(r)throw new Error(`Invalid slice notation: ${l}`);return{type:"wildcard",value:"*",raw:l}}return{type:"slice",value:[x,h],raw:l}}if(c.includes(",")){let g=c.split(",").map(x=>{let h=parseInt(x.trim(),10);return isNaN(h)?-1:h}).filter(x=>x>=0);if(g.length===0){if(r)throw new Error(`Invalid union notation: ${l}`);return{type:"wildcard",value:"*",raw:l}}return{type:"union",value:g,raw:l}}if(c.startsWith("?(")&&c.endsWith(")")){let g=c.slice(2,-1);try{return{type:"filter",value:qe(g),raw:l}}catch(x){if(r)throw x;return{type:"wildcard",value:"*",raw:l}}}return c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?{type:"property",value:c.slice(1,-1),raw:l}:{type:"property",value:c,raw:l}};for(let l=0;l<e.length;l++){let c=e[l],g=e[l+1];if((c==='"'||c==="'")&&!o){o=!0,u=c;continue}else if(c===u&&o){o=!1,u="",c==='"'||c==="'"||(a?f+=c:s+=c);continue}if(o){a?f+=c:s+=c;continue}if(c==="["&&!a){s&&(i.push({type:"property",value:s,raw:s}),s=""),a=!0,f="";continue}if(c==="]"&&a&&!o){a=!1;let h=b(f);i.push(h);continue}let x=i.length>0?i[i.length-1]:null;if(c==="."&&!a&&!o){if(g==="."){let h=e.split("..")[0];i.push({type:"property",value:h,raw:h}),i.push({type:"descendant",value:"..",raw:".."}),l++}else s&&(s==="*"?i.push({type:"wildcard",value:s,raw:s}):i.push({type:"property",value:s,raw:s}),s="");continue}if(a)f+=c;else if(x&&x.type!=="descendant")s+=c;else{let h=e.split(x?.raw)[1];h!==void 0?s=h:s+=c}}return s&&i.push({type:"property",value:s,raw:s}),i.map(l=>{if(l.type==="property"&&typeof l.value=="string"&&/^-?\d+$/.test(l.value)){let c=parseInt(l.value,10);if(!isNaN(c))return{...l,type:"index",value:c}}return l})},qe=e=>{let n=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(t,r)=>`item.${r}`).replace(/@/g,"item");try{return new Function("item",`return ${n}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}};var z=(e,n,t)=>{let r=R(n),i=e;for(let s=0;s<r.length;s++){let a=r[s],o=s===r.length-1;switch(a.type){case"property":if(o)i[String(a.value)]=t;else{if(!i[String(a.value)]){let f=r[s+1];i[String(a.value)]=f.type==="index"||f.type==="slice"||f.type==="union"||f.type==="wildcard"?[]:{}}i=i[String(a.value)]}break;case"index":Array.isArray(i)||(i=[]);let u=a.value;if(o){if(u>=i.length)for(let f=i.length;f<=u;f++)i.push(void 0);i[u]=t}else{if(!i[u]){let f=r[s+1];i[u]=f.type==="index"||f.type==="slice"||f.type==="union"||f.type==="wildcard"?[]:{}}i=i[u]}break;case"wildcard":if(Array.isArray(i))if(o)for(let f=0;f<i.length;f++)i[f]=t;else{let f=r[s+1];for(let y=0;y<i.length;y++)i[y]||(i[y]=f.type==="index"||f.type==="slice"||f.type==="union"||f.type==="wildcard"?[]:{});i.length>0&&(i=i[0])}break}}};function d(e,n,t={}){let{preserveStructure:r,multiple:i,throwOnError:s=!1,defaultValue:a,maxDepth:o=20}=t;if(!e||typeof e!="object")return a;if(!n)return e;if(Array.isArray(n))if(r){let y={};for(let T of n){let p=d(e,T,{...t,preserveStructure:!1});p!==void 0&&z(y,T,p)}return y}else return n.map(y=>d(e,y,{...t,preserveStructure:!1}));let u=R(n,{...t,throwOnError:s});if(u.length===0)return e;if(typeof r>"u"||r===!1){let y=De(e,n);return i===!1&&Array.isArray(y)?y[0]:y===void 0&&a!==void 0?a:y}let f=S(e,u,0,o);return f===void 0&&a!==void 0?a:f}function De(e,n,t={}){let{createMissing:r=!1,add:i=!1,debug:s=!1}=t,a=R(n),o=e,u=!1,f="",y=n;if(typeof o=="object"&&!Array.isArray(o)&&y.length>0&&o[y])return o=o[y],o;for(let T=0;T<a.length;T++){let p=a[T],b=a.length>1?T===a.length-1:!1;if(o===null&&!r)return;let l=a[T+1];switch(p.type){case"property":if(o&&typeof o=="object")if(Array.isArray(o)){if(typeof p.value=="number"){let c=p.value;if(r&&c>=o.length)for(let g=o.length;g<=c;g++)o.push(void 0);if(r&&(o[c]===null||o[c]===void 0)&&(!b||u)&&(l?o[c]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"?[]:{}:o[c]=null,u=!1),o=o[c],l){u=!0;continue}}else i?o.push({[String(p.value)]:null}):o=o.map(c=>c[String(p.value)]);if(l)continue;return H(o)}else{if(o[f]&&f.split(".").length>=2){o=o[f];continue}if(r&&(o[String(p.value)]===null||o[String(p.value)]===void 0)&&(!b||u)&&(l?o[String(p.value)]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"?[]:{}:o[String(p.value)]=null,u=!1,o=o[String(p.value)],l)){u=!0;continue}if(o?(!o[String(p.value)]&&r&&(o[String(p.value)]=null),o=o[String(p.value)]):o={[String(p.value)]:null},l)continue}else if(r)o={},o[String(p.value)]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"||t.type==="array"?[]:{},o=o[String(p.value)];else return;break;case"index":case"wildcard":if(Array.isArray(o)){if(p.type==="index"){let c=p.value;if(c<0){o=o[o.length-Math.abs(c)];continue}if(r&&(c>=o.length||o[c]==null||o[c]==null)&&!b){for(let g=o.length;g<=c;g++)o.push(void 0);l&&(o[c]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"?[]:{})}o=o[c]}else if(!b)continue}else if(r){let c=a[T+1];o=[];let g=p.value;for(let x=0;x<=g;x++)o.push(void 0);o[g]=c.type==="index"||c.type==="slice"||c.type==="union"||c.type==="wildcard"||t.type==="array"?[]:{},o=o[g]}else{if(p.type==="index"&&typeof o=="object"&&o&&o[String(p.value)]!==void 0){o=o[String(p.value)];continue}if(typeof o=="object"){o=Object.values(o);continue}return}break;default:return}}return H(o)}function H(e){return Array.isArray(e)?e.filter(n=>typeof n<"u"):e}function I(e,n){if(!Array.isArray(e)||n<1)return[];let t=[];for(let r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}function ze(e){return e.reduce((n,t)=>n.concat(t),[])}function _(e,n=1/0){return n<1?e.slice():e.reduce((t,r)=>(Array.isArray(r)?t.push(..._(r,n-1)):t.push(r),t),[])}function j(e,n){if(!Array.isArray(e))return[];if(!n)return[...new Set(e)];let t=new Set;return e.filter(r=>{let i=typeof n=="function"?n(r):m(r)?d(r,n):r;return t.has(i)?!1:(t.add(i),!0)})}function He(e,n){return Array.isArray(e)?e.reduce((t,r)=>{let i;return typeof n=="function"?i=String(n(r)):i=String(m(r)?d(r,n):r),t[i]||(t[i]=[]),t[i].push(r),t},{}):{}}function _e(e,n){return Array.isArray(e)?e.reduce((t,r)=>{let i;return typeof n=="function"?i=String(n(r)):n?i=String(m(r)?d(r,n):r):i=String(r),t[i]=(t[i]||0)+1,t},{}):{}}function Je(e,n,t){return Array.isArray(e)?e.reduce((r,i)=>{let s;typeof n=="function"?s=String(n(i)):s=String(m(i)?d(i,n):i);let a;return t?typeof t=="function"?a=t(i):a=d(i,t):a=i,r[s]=a,r},{}):{}}function Qe(e,n){if(!Array.isArray(e)||e.length===0)return[];let t=[...e],i=(Array.isArray(n)?n:[n]).map(s=>typeof s=="object"&&"key"in s?{key:s.key,dir:s.dir||"asc"}:{key:s,dir:"asc"});return t.sort((s,a)=>{for(let{key:o,dir:u}of i){let f=m(s)?d(s,o):s,y=m(a)?d(a,o):a;if(f===y)continue;let T=f<y?-1:1;return u==="asc"?T:-T}return 0}),t}function Ze(e,n,t){if(!Array.isArray(e))return[];if(!Array.isArray(n))return e;if(!t){let i=new Set(n);return e.filter(s=>!i.has(s))}let r=new Set(n.map(i=>m(i)?d(i,t):i));return e.filter(i=>{let s=m(i)?d(i,t):i;return!r.has(s)})}function Ge(e,n,t){if(!Array.isArray(e)||!Array.isArray(n))return[];if(!t){let i=new Set(n);return e.filter(s=>i.has(s))}let r=new Set(n.map(i=>m(i)?d(i,t):i));return e.filter(i=>{let s=m(i)?d(i,t):i;return r.has(s)})}function Xe(e,n,t){return!Array.isArray(e)&&!Array.isArray(n)?[]:Array.isArray(e)?Array.isArray(n)?j([...e,...n],t):j(e,t):j(n,t)}function Ye(e,n){return Array.isArray(e)?e.reduce((t,r,i)=>(t[n(r,i)?0:1].push(r),t),[[],[]]):[[],[]]}function en(e,n){return!Array.isArray(e)||n<=0?[]:e.slice(0,n)}function nn(e,n){return!Array.isArray(e)||n<=0?[]:e.slice(-n)}function tn(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length&&n(e[r],r);r++)t.push(e[r]);return t}function rn(e,n){return!Array.isArray(e)||n<=0?e?[...e]:[]:e.slice(n)}function sn(e,n){if(!Array.isArray(e))return[];let t=0;for(;t<e.length&&n(e[t],t);)t++;return e.slice(t)}function on(e){return Array.isArray(e)?e.filter(Boolean):[]}function an(...e){if(e.length===0)return[];let n=Math.max(...e.map(r=>Array.isArray(r)?r.length:0)),t=[];for(let r=0;r<n;r++){let i=[];for(let s of e)i.push(Array.isArray(s)?s[r]:void 0);t.push(i)}return t}function un(e){if(!Array.isArray(e)||e.length===0)return[];let n=Math.max(...e.map(r=>Array.isArray(r)?r.length:0)),t=[];for(let r=0;r<n;r++){let i=[];for(let s of e)Array.isArray(s)&&i.push(s[r]);t.push(i)}return t}function J(e){if(!Array.isArray(e))return[];let n=[...e];for(let t=n.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1));[n[t],n[r]]=[n[r],n[t]]}return n}function fn(e){if(!(!Array.isArray(e)||e.length===0))return e[Math.floor(Math.random()*e.length)]}function ln(e,n){return!Array.isArray(e)||n<=0?[]:J(e).slice(0,Math.min(n,e.length))}function cn(e,n,t=0){if(!Array.isArray(e))return-1;for(let r=t;r<e.length;r++)if(n(e[r],r))return r;return-1}function yn(e,n,t){if(!Array.isArray(e))return-1;let r=t!==void 0?t:e.length-1;for(let i=r;i>=0;i--)if(n(e[i],i))return i;return-1}function pn(e,n){return Array.isArray(e)?e.map(t=>d(t,n)):[]}function dn(e,n){return!Array.isArray(e)||!Array.isArray(n)?[]:e.map(t=>{let r={};for(let i of n)i in t&&(r[i]=t[i]);return r})}function Tn(e,n){return!Array.isArray(e)||!Array.isArray(n)?[]:e.map(t=>{let r={...t};for(let i of n)delete r[i];return r})}function gn(e,n){return Array.isArray(e)?e.reduce((t,r,i)=>{let s=n(r,i);return t.concat(s)},[]):[]}function An(e,n,t){if(!Array.isArray(e))return t;let r=t;for(let i=e.length-1;i>=0;i--)r=n(r,e[i],i);return r}function mn(e,n,t=1){if(t===0)return[];let r=[];if(t>0)for(let i=e;i<n;i+=t)r.push(i);else for(let i=e;i>n;i+=t)r.push(i);return r}function xn(e,n,t=0,r){if(!Array.isArray(e))return[];let i=[...e],s=r===void 0?i.length:r;for(let a=t;a<s&&a<i.length;a++)i[a]=n;return i}function hn(e){return Array.isArray(e)?K(e):[]}function bn(e,n,...t){let r,i;if(typeof n=="string")r=n,i=[e];else{let a=t[t.length-1];typeof a=="string"?(r=a,i=[e,n,...t.slice(0,-1).filter(Array.isArray)]):(r="id",i=[e,n,...t.filter(Array.isArray)])}if(i.length===0)return[];let s=new Map;for(let a of i)if(Array.isArray(a))for(let o of a){let u=m(o)?d(o,r):void 0;if(u!==void 0){let f=s.get(u);s.set(u,f?{...f,...o}:o)}}return Array.from(s.values())}function Sn(e,n,t){if(!Array.isArray(e)||n===t)return e?[...e]:[];let r=[...e],[i]=r.splice(n,1);return r.splice(t,0,i),r}function vn(e,n){if(!Array.isArray(e)||e.length===0||n===0)return e?[...e]:[];let t=e.length,r=(n%t+t)%t;return[...e.slice(-r),...e.slice(0,-r)]}function wn(e,n,...t){if(!Array.isArray(e))return t;let r=[...e];return r.splice(n,0,...t),r}function Kn(e,n,t=1){if(!Array.isArray(e))return[];let r=[...e];return r.splice(n,t),r}function On(e,n,t){if(!Array.isArray(e))return[];let r=[...e];return r[n]=t,r}function Pn(e,n){if(!Array.isArray(e))return[];let t=e.filter(r=>r!=null);return n?t.filter(n):t}function Rn(...e){return e.length===0?[[]]:e.length===1?e[0].map(n=>[n]):e.reduce((n,t)=>n.flatMap(r=>t.map(i=>[...r,i])),[[]])}function In(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length;r++)n(e[r],r)&&t.push(r);return t}function kn(e,n,t=!0){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(t&&m(e[r])&&m(n[r])){if(JSON.stringify(e[r])!==JSON.stringify(n[r]))return!1}else if(e[r]!==n[r])return!1;return!0}function Fn(e,n){if(!Array.isArray(e)||e.length===0)return[];let t=[],r=[e[0]],i=n(e[0],0);for(let s=1;s<e.length;s++){let a=n(e[s],s);a===i?r.push(e[s]):(t.push(r),r=[e[s]],i=a)}return t.push(r),t}function jn(e,n,t,r){if(!Array.isArray(e))return[];let i=typeof n=="function",s=i?t:r;return e.map(a=>{let o=!1;return i?o=n(a):o=(m(a)?d(a,n):a)===t,o?{...a,...s}:a})}function En(e,n){if(!Array.isArray(e))return{unique:[],duplicates:[]};let t=new Set,r=[],i=[];for(let s of e){let a=n&&m(s)?d(s,n):s;t.has(a)?i.push(s):(t.add(a),r.push(s))}return{unique:r,duplicates:i}}function Q(e){return Array.isArray(e)?e:e==null?[]:[e]}function Vn(e){return Q(e)}function Mn(e,n,t=1){if(!Array.isArray(e)||n<1||t<1)return[];let r=[];for(let i=0;i<=e.length-n;i+=t)r.push(e.slice(i,i+n));return r}function $n(e,n){if(!Array.isArray(e)||e.length===0)return;let t=e[0],r=typeof n=="function"?n(t):d(t,n);for(let i=1;i<e.length;i++){let s=e[i],a=typeof n=="function"?n(s):d(s,n);a<r&&(r=a,t=s)}return t}function Cn(e,n){if(!Array.isArray(e)||e.length===0)return;let t=e[0],r=typeof n=="function"?n(t):d(t,n);for(let i=1;i<e.length;i++){let s=e[i],a=typeof n=="function"?n(s):d(s,n);a>r&&(r=a,t=s)}return t}function Z(e,n){if(!Array.isArray(e)||e.length===0)return 0;let t=0;for(let r of e){let i=typeof n=="function"?n(r):d(r,n);typeof i=="number"&&!isNaN(i)&&(t+=i)}return t}function Un(e,n){return!Array.isArray(e)||e.length===0?0:Z(e,n)/e.length}function P(e){let n=new Map;if(!Array.isArray(e))return n;for(let t of e)n.set(t,(n.get(t)||0)+1);return n}function G(e,n=1){if(!Array.isArray(e)||e.length===0||n<1)return[];let t=P(e);return Array.from(t.entries()).sort((i,s)=>s[1]-i[1]).slice(0,n).map(([i])=>i)}function Wn(e,n=1){if(!Array.isArray(e)||e.length===0||n<1)return[];let t=P(e);return Array.from(t.entries()).sort((i,s)=>i[1]-s[1]).slice(0,n).map(([i])=>i)}async function Nn(e,n,t){if(!Array.isArray(e)||n<1)return;let r=I(e,n);for(let i=0;i<r.length;i++)await t(r[i],i)}async function Bn(e,n,t,r){if(!Array.isArray(e)||n<1||t<1)return;let i=I(e,n),s=I(i.map((a,o)=>({batch:a,index:o})),t);for(let a of s)await Promise.all(a.map(({batch:o,index:u})=>r(o,u)))}function Ln(e){if(!Array.isArray(e)||e.length===0)return[];let n=Math.max(...e.map(r=>r.length)),t=[];for(let r=0;r<n;r++){let i=[];for(let s=0;s<e.length;s++)r<e[s].length&&i.push(e[s][r]);t.push(i)}return t}function qn(e,n){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function Dn(e,n){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;let t=P(e),r=P(n);if(t.size!==r.size)return!1;for(let[i,s]of t)if(r.get(i)!==s)return!1;return!0}function X(e,n){if(!Array.isArray(e)||!Array.isArray(n))return!1;let t=new Set(n);return e.every(r=>t.has(r))}function zn(e,n){return X(n,e)}function Hn(...e){if(e.length===0)return[];let n=Math.max(...e.map(r=>r.length)),t=[];for(let r=0;r<n;r++)for(let i of e)r<i.length&&t.push(i[r]);return t}function _n(e,n){let t=[],r=[];if(!Array.isArray(e))return{pass:t,fail:r};for(let i=0;i<e.length;i++)n(e[i],i)?t.push(e[i]):r.push(e[i]);return{pass:t,fail:r}}function Jn(e,n){if(e<0)return[];let t=[];for(let r=0;r<e;r++)t.push(n(r));return t}function Qn(e,n){if(!Array.isArray(e)||n<0)return[];let t=[];for(let r=0;r<n;r++)t.push(...e);return t}function Zn(e){if(!Array.isArray(e)||e.length===0)return;let n=[...e].sort((r,i)=>r-i),t=Math.floor(n.length/2);return n.length%2===0?(n[t-1]+n[t])/2:n[t]}function Gn(e){let n=G(e,1);return n.length>0?n[0]:void 0}function Xn(e,...n){if(!Array.isArray(e))return[];let t=new Set(n);return e.filter(r=>!t.has(r))}function Yn(e,...n){if(!Array.isArray(e))return[];let t=new Set(n.flat());return e.filter(r=>!t.has(r))}function et(e){if(!Array.isArray(e)||e.length===0)return[];let n=[],t=[e[0]];for(let r=1;r<e.length;r++)e[r]===e[r-1]?t.push(e[r]):(n.push(t),t=[e[r]]);return n.push(t),n}function nt(e){if(!Array.isArray(e)||e.length===0)return[];let n=[e[0]];for(let t=1;t<e.length;t++)e[t]!==e[t-1]&&n.push(e[t]);return n}function tt(e,n="standard"){if(!Array.isArray(e)||e.length===0)return[];let t=e.map((i,s)=>({value:i,index:s}));t.sort((i,s)=>i.value-s.value);let r=new Array(e.length);if(n==="ordinal")for(let i=0;i<t.length;i++)r[t[i].index]=i+1;else if(n==="dense"){let i=1;r[t[0].index]=i;for(let s=1;s<t.length;s++)t[s].value!==t[s-1].value&&i++,r[t[s].index]=i}else{let i=0;for(;i<t.length;){let s=i;for(;s<t.length&&t[s].value===t[i].value;)s++;let a=i+1;for(let o=i;o<s;o++)r[t[o].index]=a;i=s}}return r}function E(e,n){if(!Array.isArray(e)||e.length===0||n<0||n>100)return;let t=[...e].sort((o,u)=>o-u),r=n/100*(t.length-1),i=Math.floor(r),s=Math.ceil(r),a=r-i;return i===s?t[i]:t[i]*(1-a)+t[s]*a}function rt(e){if(!Array.isArray(e)||e.length===0)return;let n=E(e,25),t=E(e,50),r=E(e,75);return{q1:n,q2:t,q3:r,iqr:r-n}}function $(e,n=!1){if(!Array.isArray(e)||e.length===0||n&&e.length===1)return;let t=e.reduce((s,a)=>s+a,0)/e.length,i=e.map(s=>Math.pow(s-t,2)).reduce((s,a)=>s+a,0)/(n?e.length-1:e.length);return Math.sqrt(i)}function it(e,n=!1){let t=$(e,n);return t!==void 0?Math.pow(t,2):void 0}function st(e){if(!Array.isArray(e)||e.length===0)return[];let n=Math.min(...e),r=Math.max(...e)-n;return r===0?e.map(()=>0):e.map(i=>(i-n)/r)}function ot(e){if(!Array.isArray(e)||e.length===0)return[];let n=e.reduce((r,i)=>r+i,0)/e.length,t=$(e);return t===void 0||t===0?e.map(()=>0):e.map(r=>(r-n)/t)}function Y(e,n,t){if(!Array.isArray(e))return[];let r=[],i=t;for(let s=0;s<e.length;s++)i=n(i,e[s],s),r.push(i);return r}function at(e){return Y(e,(n,t)=>n+t,0)}function ut(e){if(!Array.isArray(e)||e.length<2)return[];let n=[];for(let t=1;t<e.length;t++)n.push(e[t]-e[t-1]);return n}function ft(e,n,t,r="end"){if(!Array.isArray(e)||n<=e.length)return[...e];let i=new Array(n-e.length).fill(t);return r==="start"?[...i,...e]:[...e,...i]}function lt(e,n){if(!Array.isArray(e)||e.length===0)return[];let t=0,r=e.length-1;for(;t<=r&&n(e[t]);)t++;for(;r>=t&&n(e[r]);)r--;return e.slice(t,r+1)}function ct(e){if(!Array.isArray(e)||e.length<2)return[];let n=[];for(let t=0;t<e.length-1;t++)n.push([e[t],e[t+1]]);return n}function yt(e){return Array.isArray(e)?e.map((n,t)=>[t,n]):[]}function pt(e,n){return Array.isArray(e)?e.map((t,r)=>{let i=n[r%n.length];return i(t)}):[]}function ee(e,n=1){if(!Array.isArray(e)||e.length===0)return[];let t=e.length,r=(n%t+t)%t;return[...e.slice(r),...e.slice(0,r)]}function dt(e,n=1){return ee(e,-n)}function Tt(e,n,t){if(!Array.isArray(e)||n<0||t<0||n>=e.length||t>=e.length)return[...e];let r=[...e];return[r[n],r[t]]=[r[t],r[n]],r}function gt(e,n,t){if(!Array.isArray(e)||n<0||t>=e.length||n>=t)return[...e];let r=[...e],i=r.slice(n,t+1).reverse();return r.splice(n,t-n+1,...i),r}function At(e,n){if(!Array.isArray(e)||e.length<=1)return!0;let t=n||((r,i)=>r<i?-1:r>i?1:0);for(let r=1;r<e.length;r++)if(t(e[r-1],e[r])>0)return!1;return!0}function mt(e){return Array.isArray(e)?new Set(e).size!==e.length:!1}function xt(e,n){return Array.isArray(e)?e.map(t=>{let r={};for(let i of n)i in t&&(r[i]=t[i]);return r}):[]}function ne(e,n,t){if(!Array.isArray(e))return{};let r={};for(let i=0;i<e.length;i++){let s=n(e[i],i),a=t?t(e[i],i):e[i];r[s]=a}return r}async function ht(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length;r++)t.push(await n(e[r],r));return t}async function bt(e,n){return Array.isArray(e)?Promise.all(e.map((t,r)=>n(t,r))):[]}async function St(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length;r++)await n(e[r],r)&&t.push(e[r]);return t}async function vt(e,n,t){if(!Array.isArray(e))return t;let r=t;for(let i=0;i<e.length;i++)r=await n(r,e[i],i);return r}async function wt(e,n){if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(await n(e[t],t))return e[t]}}async function Kt(e,n){if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(await n(e[t],t))return!0;return!1}async function Ot(e,n){if(!Array.isArray(e))return!0;for(let t=0;t<e.length;t++)if(!await n(e[t],t))return!1;return!0}function Pt(e,n,t){if(!Array.isArray(e)||e.length===0)return 0;let r=0,i=0;for(let s of e){let a=typeof n=="function"?n(s):d(s,n),o=typeof t=="function"?t(s):d(s,t);typeof a=="number"&&typeof o=="number"&&(i+=a*o,r+=o)}return r===0?0:i/r}function Rt(e,n,t=1){if(!Array.isArray(e)||e.length===0||t<1)return[];let r=[],i=0;for(let a of e){let o=typeof n=="function"?n(a):d(a,n);i+=typeof o=="number"&&o>0?o:0,r.push(i)}if(i===0)return[];let s=[];for(let a=0;a<t;a++){let o=Math.random()*i,u=r.findIndex(f=>o<f);u!==-1&&s.push(e[u])}return s}function It(e,n){if(!Array.isArray(e)||!Array.isArray(n))return[];let t=[],r=0;for(let i of n){if(r>=e.length)break;t.push(e.slice(r,r+i)),r+=i}return t}function kt(e,n){if(!Array.isArray(e)||n<1)return[];let t=P(e),r=[];for(let i of e)t.get(i)===n&&r.push(i);return r}function Ft(e,n,t){if(!Array.isArray(e)||n<1)return[];let r=[],i=0,s=[];for(let a of e)t(a)?(i++,s.push(a),i>=n&&r.push(...s.splice(0,s.length-n+1))):(i=0,s.length=0);return i>=n&&r.push(...s),r}function jt(e,n,t){if(!Array.isArray(e))return[];let r=[],i=t;for(let s=0;s<e.length;s++){let{value:a,newContext:o}=n(e[s],i,s);r.push(a),i=o}return r}function Et(e,n){return I(e,n)}function Vt(e,n,t){if(!Array.isArray(e)||!Array.isArray(n))return[];let r=Math.min(e.length,n.length),i=[];for(let s=0;s<r;s++)i.push(t(e[s],n[s]));return i}function Mt(e,n,t="last"){if(!Array.isArray(e)||e.length===0)return[];let r=new Map;for(let s of e)if(Array.isArray(s))for(let a of s){let o=d(a,n);if(t==="first")r.has(o)||r.set(o,a);else if(t==="last")r.set(o,a);else if(t==="concat"){let u=r.get(o);Array.isArray(u)?u.push(a):u?r.set(o,[u,a]):r.set(o,a)}else if(typeof t=="function"){let u=r.get(o);u&&!Array.isArray(u)?r.set(o,t(u,a)):r.set(o,a)}}let i=[];for(let s of r.values())Array.isArray(s)&&t==="concat"?i.push(...s):Array.isArray(s)||i.push(s);return i}function $t(e,n){return ne(e,t=>String(d(t,n)))}function Ct(e,n,t){if(!Array.isArray(e)||e.length===0)return-1;let r=t||((a,o)=>a<o?-1:a>o?1:0),i=0,s=e.length-1;for(;i<=s;){let a=Math.floor((i+s)/2),o=r(e[a],n);if(o===0)return a;o<0?i=a+1:s=a-1}return-1}function Ut(e,n,t){if(!Array.isArray(e))return[n];let r=t||((a,o)=>a<o?-1:a>o?1:0),i=[...e],s=0;for(;s<i.length&&r(i[s],n)<0;)s++;return i.splice(s,0,n),i}function Wt(e){return e&&typeof e.addEventListener=="function"}function Nt(e){return e&&typeof e.addEventListener=="function"&&typeof e.removeEventListener=="function"}function Bt(e){return e&&typeof e.on=="function"&&typeof e.off=="function"}function Lt(e){return e&&typeof e.addListener=="function"&&typeof e.removeListener=="function"}function qt(){return typeof globalThis=="object"?globalThis:typeof window=="object"?window:typeof self=="object"?self:typeof global=="object"?global:null}function Dt(e){return Buffer.from(e).toString("base64")}function zt(e){return Buffer.from(e).toString("base64")}function Ht(e){return decodeURIComponent(Buffer.from(e,"base64").toString("utf-8"))}var _t=(e,n,t)=>{let r=t,i=new RegExp("([?&])"+n+"=.*?(&|$)","i"),s=e.includes("?")?"&":"?";n==="country"&&(r=JSON.parse(r).alpha_2),n==="phone"&&(r=r.trim().replace(/\s/g,""));let a=e.match(i);return typeof a<"u"&&a!==null?e.replace(i,"$1"+n+"="+r+"$2"):e+s+n+"="+r};var Jt=async(e,n="SHA-1")=>{if(typeof window>"u")return null;let{subtle:t}=window.globalThis.crypto,r=await t.generateKey({name:"HMAC",hash:n,length:256},!0,["sign","verify"]),s=new TextEncoder().encode(e),a=await t.sign({name:"HMAC"},r,s);return[...new Uint8Array(a)].map(u=>u.toString(16).padStart(2,"0")).join("")},C=async(e,n="SHA-256")=>{let r=new TextEncoder().encode(e),i=await crypto.subtle.digest(n,r);return Array.from(new Uint8Array(i)).map(o=>o.toString(16).padStart(2,"0")).join("")},Qt=async(e,n,t="SHA-256")=>{let r=await C(e,t),i=await C(n,t);return r===i};async function Zt(e,n="SHA-256"){let r=new TextEncoder().encode(e),i=await crypto.subtle.digest(n,r);return Array.from(new Uint8Array(i)).map(o=>o.toString(16).padStart(2,"0")).join("")}var Gt=e=>{let n=0;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);n=(n<<5)-n+r,n=n&n}return n.toString(16)};var te=require("@fluixi/utils/object");function re(e){return typeof e=="function"&&!(0,te.isClass)(e)}function Xt(e){return e instanceof Promise||!!e&&(typeof e=="object"||typeof e=="function")&&"then"in e}function Yt(e){return re(e)&&e.constructor.name==="AsyncFunction"}function er(e,n){let t=new Map,r=function(...i){let s=n?n(...i):JSON.stringify(i);if(t.has(s))return t.get(s);let a=e.apply(this,i);return t.set(s,a),a};return r.cache=t,r}function ie(e,n,t={}){let{leading:r=!1,trailing:i=!0,maxWait:s}=t,a,o,u,f=0,y,T,p;function b(A){let v=y,w=T;return y=T=void 0,f=A,p=e.apply(w,v),p}function l(A,v){return setTimeout(A,v)}function c(A){A!==void 0&&clearTimeout(A)}function g(A){return f=A,a=l(O,n),r?b(A):p}function x(A){let v=A-u,w=A-f,W=n-v;return s!==void 0?Math.min(W,s-w):W}function h(A){let v=A-u,w=A-f;return u===void 0||v>=n||v<0||s!==void 0&&w>=s}function O(){let A=Date.now();if(h(A)){U(A);return}a=l(O,x(A))}function U(A){return a=void 0,i&&y?b(A):(y=T=void 0,p)}function ae(){c(a),c(o),f=0,y=u=T=a=o=void 0}function ue(){return a===void 0?p:U(Date.now())}function fe(){return a!==void 0}function k(...A){let v=Date.now(),w=h(v);if(y=A,T=this,u=v,w){if(a===void 0)return g(u);if(s!==void 0)return a=l(O,n),b(u)}return a===void 0&&(a=l(O,n)),p}return k.cancel=ae,k.flush=ue,k.pending=fe,k}function nr(e,n,t={}){let{leading:r=!0,trailing:i=!0}=t;return ie(e,n,{leading:r,trailing:i,maxWait:n})}function tr(e){let n=!1,t,r=function(...i){return n||(n=!0,t=e.apply(this,i)),t};return Object.defineProperty(r,"called",{get(){return n}}),r}function rr(e,...n){return function(...t){let r=n.map(i=>t[i]);return e.apply(this,r)}}function ir(e,n=e.length){return function t(...r){return r.length>=n?e.apply(this,r):function(...i){return t.apply(this,[...r,...i])}}}function se(...e){return e.reduceRight((n,t)=>r=>t(n(r)),n=>n)}function oe(...e){return e.reduce((n,t)=>r=>t(n(r)),n=>n)}function sr(e){return function(...n){return!e.apply(this,n)}}function or(e,...n){return function(...t){let r=t.map((i,s)=>n[s]?n[s](i):i);return e.apply(this,r)}}function ar(e,...n){return function(...t){return e.apply(this,[...n,...t])}}function ur(e,...n){return function(...t){return e.apply(this,[...t,...n])}}function fr(e,n,...t){return function(...r){return e.apply(n,[...t,...r])}}function lr(e){return function(...n){return e.apply(this,n.reverse())}}function cr(e,n){return function(...t){return e.apply(this,t.slice(0,n))}}function yr(e){return function(n){return e.call(this,n)}}function pr(e,...n){return setTimeout(e,1,...n)}function dr(e,n,...t){return setTimeout(e,n,...t)}function Tr(e,n,t){let r=new Map,i=function(...s){let a=t?t(...s):JSON.stringify(s),o=Date.now(),u=r.get(a);if(u&&u.expires>o)return u.value;let f=e.apply(this,s);r.set(a,{value:f,expires:o+n});for(let[y,T]of r.entries())T.expires<=o&&r.delete(y);return f};return i.cache=r,i}function gr(e,n){let t,r=0;return function(...i){return++r<n&&(t=e.apply(this,i)),r>=n&&(e=void 0),t}}function Ar(e,n){let t=0;return function(...r){if(++t>=n)return e.apply(this,r)}}function mr(e,n){return function(...t){try{return e.apply(this,t)}catch(r){return n(r,...t)}}}function xr(...e){return oe(...e)}function hr(...e){return se(...e)}function br(e,n={}){let{retries:t=3,delay:r=1e3,backoff:i=2,onRetry:s}=n;return async function(...a){let o,u=r;for(let f=0;f<=t;f++)try{return await e.apply(this,a)}catch(y){o=y,f<t&&(s&&s(o,f+1),await new Promise(T=>setTimeout(T,u)),u*=i)}throw o}}function Sr(e,n,t){return async function(...r){return Promise.race([e.apply(this,r),new Promise((i,s)=>setTimeout(()=>{t&&t(),s(new Error(`Function timed out after ${n}ms`))},n))])}}
@@ -0,0 +1,6 @@
1
+ export * from './array/index.js';
2
+ export * from './dom/index.js';
3
+ export * from './crypto/index.js';
4
+ export * from './functions/index.js';
5
+ export * from './helpers.js';
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/lib/index.ts"],"names":[],"mappings":"AAAA,cAAc,kBAAkB,CAAC;AAEjC,cAAc,gBAAgB,CAAC;AAE/B,cAAc,mBAAmB,CAAC;AAElC,cAAc,sBAAsB,CAAC;AACrC,cAAc,cAAc,CAAC"}
@@ -0,0 +1,8 @@
1
+ export * from './array/index.js';
2
+ // export * from './object/index.js';
3
+ export * from './dom/index.js';
4
+ // export * from './primitive/index.js';
5
+ export * from './crypto/index.js';
6
+ // export * from './compare/index.js';
7
+ export * from './functions/index.js';
8
+ export * from './helpers.js';
@@ -0,0 +1 @@
1
+ var ye=e=>{if(Array.isArray(e))return e;if(typeof e=="string")if(e.startsWith("[")&&e.endsWith("]"))try{return JSON.parse(e)}catch{return[]}else return[e];return[]};function pe(e){return Array.isArray(e)&&e.every(n=>typeof n=="string")}function de(e){return Array.isArray(e)&&e.every(n=>typeof n=="number")}function Te(e){return Array.isArray(e)&&e.every(n=>typeof n=="boolean")}function ge(e){return Array.isArray(e)&&e.every(n=>typeof n=="object")}import{isObject as q}from"@fluixi/utils/object";var xe=e=>Array.isArray(e)&&e.every(n=>q(n));function he(e){return Array.isArray(e)}function be(e){return Array.isArray(e)}function Se(e){return Array.isArray(e)&&e.every(n=>Array.isArray(n)&&n.length===2)}function D(e){return e!=null&&typeof e[Symbol.iterator]=="function"}function ve(e){return e!=null&&typeof e=="object"&&"length"in e&&typeof e.length=="number"&&e.length>=0&&(e.length===0||e.length-1 in e)}function we(e){return Array.isArray(e)&&e.length===0}function Ke(e){return Array.isArray(e)&&e.length>0}function Oe(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Pe(e){return Array.isArray(e)}function Re(e){return e.length>0?e[e.length-1]:void 0}function Ie(e){return e.length>0?e[0]:void 0}function ke(e){return Array.isArray(e)?[...e]:D(e)?[...e]:Array.from(e)}function Fe(e,n){return e.reduce((t,r)=>{let i=n(r);return t[i]||(t[i]=[]),t[i].push(r),t},{})}function je(e){return e.flat()}function Ee(e,n){let t=n<0?e.length+n:n;return e[t]}var m=e=>e==null||Array.isArray(e)||typeof e=="function"||e instanceof Date||e instanceof RegExp||e instanceof Map||e instanceof Set||e instanceof Error?!1:typeof e=="object";var S=(e,n,t,r)=>{if(t>r)return;if(n.length===0)return e;let i=n[0],s=n.slice(1);if(i.type==="descendant"){let a=S(e,s,t+1,r);if(a!==void 0)return a;if(e&&typeof e=="object")if(Array.isArray(e)){let o=[];for(let u=0;u<e.length;u++){let f=S(e[u],n,t+1,r);f!==void 0&&(o[u]=f)}return o.length>0?o:void 0}else{let o={};for(let u in e)if(e.hasOwnProperty(u)){let f=S(e[u],n,t+1,r);f!==void 0&&(o[u]=f)}return Object.keys(o).length>0?o:void 0}return}switch(i.type){case"property":if(m(e)&&i.value&&String(i.value)in e){let a=e[String(i.value)],o=S(a,s,t+1,r);if(o!==void 0)return{[String(i.value)]:o}}break;case"index":if(Array.isArray(e)){let a=i.value;if(a>=0&&a<e.length){let o=S(e[a],s,t+1,r);if(o!==void 0){let u=new Array(e.length).filter(f=>f!==void 0);return u[a]=o,u}}}else if(e&&typeof e=="object"){let a=String(i.value);if(a in e){let o=S(e[a],s,t+1,r);if(o!==void 0)return{[a]:o}}}break;case"wildcard":if(e&&typeof e=="object")if(Array.isArray(e)){let a=[],o=!1;for(let u=0;u<e.length;u++){let f=S(e[u],s,t+1,r);f!==void 0&&(a[u]=f,o=!0)}return o?a:void 0}else{let a={},o=!1;for(let u in e)if(e.hasOwnProperty(u)){let f=S(e[u],s,t+1,r);f!==void 0&&(a[u]=f,o=!0)}return o?a:void 0}break;case"slice":if(Array.isArray(e)){let[a,o]=i.value,u=Math.max(0,a),f=Math.min(e.length,o===1/0?e.length:o),y=[],T=!1;for(let p=u;p<f;p++){let b=S(e[p],s,t+1,r);b!==void 0&&(y[p]=b,T=!0)}return T?y:void 0}break;case"union":if(Array.isArray(e)){let a=i.value,o=[],u=!1;for(let f of a)if(f>=0&&f<e.length){let y=S(e[f],s,t+1,r);y!==void 0&&(o[f]=y,u=!0)}return u?o:void 0}break;case"filter":if(Array.isArray(e)){let a=i.value,o=[],u=!1;for(let f=0;f<e.length;f++)if(a(e[f])){let y=S(e[f],s,t+1,r);y!==void 0&&(o[f]=y,u=!0)}return u?o:void 0}break}};var K=(e,n)=>{if(e==null||typeof e!="object")return e;if(e instanceof Date)return new Date(e.getTime());if(e instanceof RegExp)return new RegExp(e.source,e.flags);if(e instanceof Map){let t=new Map;return e.forEach((r,i)=>{(!n||!n.some(s=>s.toString()===i.toString()))&&t.set(i,K(r))}),t}if(e instanceof Set){let t=new Set;return e.forEach(r=>{t.add(K(r))}),t}if(Array.isArray(e))return Array.from(e).map(t=>K(t));if(m(e)){let t={};for(let i in e)Object.prototype.hasOwnProperty.call(e,i)&&(!n||!n.some(s=>s.toString()===i.toString()))&&(t[i]=K(e[i]));let r=Object.getOwnPropertySymbols(e);for(let i of r)(!n||!n.some(s=>s.toString()===i.toString()))&&(t[i]=K(e[i]));return t}return e};import{isDate as M}from"@fluixi/utils/primitive";import{isClass as z,isObject as H}from"@fluixi/utils/object";import{isArray as _}from"@fluixi/utils/array";import{isFunction as J}from"@fluixi/utils/functions";function ze(e){return e===null}function He(e){return e===void 0}var _e=e=>typeof e>"u"||e===null;function Q(e){let n=typeof e;return e===null||n==="string"||n==="number"||n==="boolean"||n==="symbol"||n==="bigint"||n==="undefined"||M(e)}function Je(e){return e!=null}function Qe(e){return e===null?"null":e===void 0?"undefined":M(e)?"date":z(e)?"class":J(e)?"function":_(e)?"array":Q(e)?"primitive":H(e)?"object":"primitive"}var Ze=()=>"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(e){let n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)}),Ge=()=>"xxyxxxxxxy-4xx8".replace(/[xy]/g,function(e){let n=Math.random()*16|0;return(e==="x"?n:n&3|8).toString(16)});var P=(e,n={})=>{let{type:t="auto",throwOnError:r=!1}=n;if(!e||typeof e!="string")return[];let i=[],s="",a=!1,o=!1,u="",f="",y=0,p=t==="auto"?(l=>l.includes("..")?"descendant":l.includes("[?(")?"filter":l.includes("[:")||l.includes("[0:")?"slice":l.includes("[,")||l.includes("[0,1]")?"union":l.includes("[*]")||l.includes(".*.")?"wildcard":l.includes("[]")?"array-wildcard":l.includes("[")&&l.includes("]")?"bracket":"dot")(e):t,b=l=>{let c=l.trim();if(c==="*"||c==="")return{type:"wildcard",value:c===""?"[]":"*",raw:c===""?"[]":l};if(c==="[]")return{type:"wildcard",value:"[]",raw:l};if(/^-?\d+$/.test(c))return{type:"index",value:parseInt(c,10),raw:l};if(c.includes(":")){let g=c.split(":").map(O=>O.trim()),x=g[0]===""?0:parseInt(g[0],10),h=g[1]===""?1/0:parseInt(g[1],10);if(isNaN(x)||isNaN(h)){if(r)throw new Error(`Invalid slice notation: ${l}`);return{type:"wildcard",value:"*",raw:l}}return{type:"slice",value:[x,h],raw:l}}if(c.includes(",")){let g=c.split(",").map(x=>{let h=parseInt(x.trim(),10);return isNaN(h)?-1:h}).filter(x=>x>=0);if(g.length===0){if(r)throw new Error(`Invalid union notation: ${l}`);return{type:"wildcard",value:"*",raw:l}}return{type:"union",value:g,raw:l}}if(c.startsWith("?(")&&c.endsWith(")")){let g=c.slice(2,-1);try{return{type:"filter",value:Z(g),raw:l}}catch(x){if(r)throw x;return{type:"wildcard",value:"*",raw:l}}}return c.startsWith('"')&&c.endsWith('"')||c.startsWith("'")&&c.endsWith("'")?{type:"property",value:c.slice(1,-1),raw:l}:{type:"property",value:c,raw:l}};for(let l=0;l<e.length;l++){let c=e[l],g=e[l+1];if((c==='"'||c==="'")&&!o){o=!0,u=c;continue}else if(c===u&&o){o=!1,u="",c==='"'||c==="'"||(a?f+=c:s+=c);continue}if(o){a?f+=c:s+=c;continue}if(c==="["&&!a){s&&(i.push({type:"property",value:s,raw:s}),s=""),a=!0,f="";continue}if(c==="]"&&a&&!o){a=!1;let h=b(f);i.push(h);continue}let x=i.length>0?i[i.length-1]:null;if(c==="."&&!a&&!o){if(g==="."){let h=e.split("..")[0];i.push({type:"property",value:h,raw:h}),i.push({type:"descendant",value:"..",raw:".."}),l++}else s&&(s==="*"?i.push({type:"wildcard",value:s,raw:s}):i.push({type:"property",value:s,raw:s}),s="");continue}if(a)f+=c;else if(x&&x.type!=="descendant")s+=c;else{let h=e.split(x?.raw)[1];h!==void 0?s=h:s+=c}}return s&&i.push({type:"property",value:s,raw:s}),i.map(l=>{if(l.type==="property"&&typeof l.value=="string"&&/^-?\d+$/.test(l.value)){let c=parseInt(l.value,10);if(!isNaN(c))return{...l,type:"index",value:c}}return l})},Z=e=>{let n=e.replace(/@\.([a-zA-Z_$][\w$]*)/g,(t,r)=>`item.${r}`).replace(/@/g,"item");try{return new Function("item",`return ${n}`)}catch{throw new Error(`Invalid filter expression: ${e}`)}};var $=(e,n,t)=>{let r=P(n),i=e;for(let s=0;s<r.length;s++){let a=r[s],o=s===r.length-1;switch(a.type){case"property":if(o)i[String(a.value)]=t;else{if(!i[String(a.value)]){let f=r[s+1];i[String(a.value)]=f.type==="index"||f.type==="slice"||f.type==="union"||f.type==="wildcard"?[]:{}}i=i[String(a.value)]}break;case"index":Array.isArray(i)||(i=[]);let u=a.value;if(o){if(u>=i.length)for(let f=i.length;f<=u;f++)i.push(void 0);i[u]=t}else{if(!i[u]){let f=r[s+1];i[u]=f.type==="index"||f.type==="slice"||f.type==="union"||f.type==="wildcard"?[]:{}}i=i[u]}break;case"wildcard":if(Array.isArray(i))if(o)for(let f=0;f<i.length;f++)i[f]=t;else{let f=r[s+1];for(let y=0;y<i.length;y++)i[y]||(i[y]=f.type==="index"||f.type==="slice"||f.type==="union"||f.type==="wildcard"?[]:{});i.length>0&&(i=i[0])}break}}};function d(e,n,t={}){let{preserveStructure:r,multiple:i,throwOnError:s=!1,defaultValue:a,maxDepth:o=20}=t;if(!e||typeof e!="object")return a;if(!n)return e;if(Array.isArray(n))if(r){let y={};for(let T of n){let p=d(e,T,{...t,preserveStructure:!1});p!==void 0&&$(y,T,p)}return y}else return n.map(y=>d(e,y,{...t,preserveStructure:!1}));let u=P(n,{...t,throwOnError:s});if(u.length===0)return e;if(typeof r>"u"||r===!1){let y=G(e,n);return i===!1&&Array.isArray(y)?y[0]:y===void 0&&a!==void 0?a:y}let f=S(e,u,0,o);return f===void 0&&a!==void 0?a:f}function G(e,n,t={}){let{createMissing:r=!1,add:i=!1,debug:s=!1}=t,a=P(n),o=e,u=!1,f="",y=n;if(typeof o=="object"&&!Array.isArray(o)&&y.length>0&&o[y])return o=o[y],o;for(let T=0;T<a.length;T++){let p=a[T],b=a.length>1?T===a.length-1:!1;if(o===null&&!r)return;let l=a[T+1];switch(p.type){case"property":if(o&&typeof o=="object")if(Array.isArray(o)){if(typeof p.value=="number"){let c=p.value;if(r&&c>=o.length)for(let g=o.length;g<=c;g++)o.push(void 0);if(r&&(o[c]===null||o[c]===void 0)&&(!b||u)&&(l?o[c]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"?[]:{}:o[c]=null,u=!1),o=o[c],l){u=!0;continue}}else i?o.push({[String(p.value)]:null}):o=o.map(c=>c[String(p.value)]);if(l)continue;return C(o)}else{if(o[f]&&f.split(".").length>=2){o=o[f];continue}if(r&&(o[String(p.value)]===null||o[String(p.value)]===void 0)&&(!b||u)&&(l?o[String(p.value)]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"?[]:{}:o[String(p.value)]=null,u=!1,o=o[String(p.value)],l)){u=!0;continue}if(o?(!o[String(p.value)]&&r&&(o[String(p.value)]=null),o=o[String(p.value)]):o={[String(p.value)]:null},l)continue}else if(r)o={},o[String(p.value)]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"||t.type==="array"?[]:{},o=o[String(p.value)];else return;break;case"index":case"wildcard":if(Array.isArray(o)){if(p.type==="index"){let c=p.value;if(c<0){o=o[o.length-Math.abs(c)];continue}if(r&&(c>=o.length||o[c]==null||o[c]==null)&&!b){for(let g=o.length;g<=c;g++)o.push(void 0);l&&(o[c]=l.type==="index"||l.type==="slice"||l.type==="union"||l.type==="wildcard"?[]:{})}o=o[c]}else if(!b)continue}else if(r){let c=a[T+1];o=[];let g=p.value;for(let x=0;x<=g;x++)o.push(void 0);o[g]=c.type==="index"||c.type==="slice"||c.type==="union"||c.type==="wildcard"||t.type==="array"?[]:{},o=o[g]}else{if(p.type==="index"&&typeof o=="object"&&o&&o[String(p.value)]!==void 0){o=o[String(p.value)];continue}if(typeof o=="object"){o=Object.values(o);continue}return}break;default:return}}return C(o)}function C(e){return Array.isArray(e)?e.filter(n=>typeof n<"u"):e}function k(e,n){if(!Array.isArray(e)||n<1)return[];let t=[];for(let r=0;r<e.length;r+=n)t.push(e.slice(r,r+n));return t}function pn(e){return e.reduce((n,t)=>n.concat(t),[])}function X(e,n=1/0){return n<1?e.slice():e.reduce((t,r)=>(Array.isArray(r)?t.push(...X(r,n-1)):t.push(r),t),[])}function F(e,n){if(!Array.isArray(e))return[];if(!n)return[...new Set(e)];let t=new Set;return e.filter(r=>{let i=typeof n=="function"?n(r):m(r)?d(r,n):r;return t.has(i)?!1:(t.add(i),!0)})}function dn(e,n){return Array.isArray(e)?e.reduce((t,r)=>{let i;return typeof n=="function"?i=String(n(r)):i=String(m(r)?d(r,n):r),t[i]||(t[i]=[]),t[i].push(r),t},{}):{}}function Tn(e,n){return Array.isArray(e)?e.reduce((t,r)=>{let i;return typeof n=="function"?i=String(n(r)):n?i=String(m(r)?d(r,n):r):i=String(r),t[i]=(t[i]||0)+1,t},{}):{}}function gn(e,n,t){return Array.isArray(e)?e.reduce((r,i)=>{let s;typeof n=="function"?s=String(n(i)):s=String(m(i)?d(i,n):i);let a;return t?typeof t=="function"?a=t(i):a=d(i,t):a=i,r[s]=a,r},{}):{}}function An(e,n){if(!Array.isArray(e)||e.length===0)return[];let t=[...e],i=(Array.isArray(n)?n:[n]).map(s=>typeof s=="object"&&"key"in s?{key:s.key,dir:s.dir||"asc"}:{key:s,dir:"asc"});return t.sort((s,a)=>{for(let{key:o,dir:u}of i){let f=m(s)?d(s,o):s,y=m(a)?d(a,o):a;if(f===y)continue;let T=f<y?-1:1;return u==="asc"?T:-T}return 0}),t}function mn(e,n,t){if(!Array.isArray(e))return[];if(!Array.isArray(n))return e;if(!t){let i=new Set(n);return e.filter(s=>!i.has(s))}let r=new Set(n.map(i=>m(i)?d(i,t):i));return e.filter(i=>{let s=m(i)?d(i,t):i;return!r.has(s)})}function xn(e,n,t){if(!Array.isArray(e)||!Array.isArray(n))return[];if(!t){let i=new Set(n);return e.filter(s=>i.has(s))}let r=new Set(n.map(i=>m(i)?d(i,t):i));return e.filter(i=>{let s=m(i)?d(i,t):i;return r.has(s)})}function hn(e,n,t){return!Array.isArray(e)&&!Array.isArray(n)?[]:Array.isArray(e)?Array.isArray(n)?F([...e,...n],t):F(e,t):F(n,t)}function bn(e,n){return Array.isArray(e)?e.reduce((t,r,i)=>(t[n(r,i)?0:1].push(r),t),[[],[]]):[[],[]]}function Sn(e,n){return!Array.isArray(e)||n<=0?[]:e.slice(0,n)}function vn(e,n){return!Array.isArray(e)||n<=0?[]:e.slice(-n)}function wn(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length&&n(e[r],r);r++)t.push(e[r]);return t}function Kn(e,n){return!Array.isArray(e)||n<=0?e?[...e]:[]:e.slice(n)}function On(e,n){if(!Array.isArray(e))return[];let t=0;for(;t<e.length&&n(e[t],t);)t++;return e.slice(t)}function Pn(e){return Array.isArray(e)?e.filter(Boolean):[]}function Rn(...e){if(e.length===0)return[];let n=Math.max(...e.map(r=>Array.isArray(r)?r.length:0)),t=[];for(let r=0;r<n;r++){let i=[];for(let s of e)i.push(Array.isArray(s)?s[r]:void 0);t.push(i)}return t}function In(e){if(!Array.isArray(e)||e.length===0)return[];let n=Math.max(...e.map(r=>Array.isArray(r)?r.length:0)),t=[];for(let r=0;r<n;r++){let i=[];for(let s of e)Array.isArray(s)&&i.push(s[r]);t.push(i)}return t}function Y(e){if(!Array.isArray(e))return[];let n=[...e];for(let t=n.length-1;t>0;t--){let r=Math.floor(Math.random()*(t+1));[n[t],n[r]]=[n[r],n[t]]}return n}function kn(e){if(!(!Array.isArray(e)||e.length===0))return e[Math.floor(Math.random()*e.length)]}function Fn(e,n){return!Array.isArray(e)||n<=0?[]:Y(e).slice(0,Math.min(n,e.length))}function jn(e,n,t=0){if(!Array.isArray(e))return-1;for(let r=t;r<e.length;r++)if(n(e[r],r))return r;return-1}function En(e,n,t){if(!Array.isArray(e))return-1;let r=t!==void 0?t:e.length-1;for(let i=r;i>=0;i--)if(n(e[i],i))return i;return-1}function Vn(e,n){return Array.isArray(e)?e.map(t=>d(t,n)):[]}function Mn(e,n){return!Array.isArray(e)||!Array.isArray(n)?[]:e.map(t=>{let r={};for(let i of n)i in t&&(r[i]=t[i]);return r})}function $n(e,n){return!Array.isArray(e)||!Array.isArray(n)?[]:e.map(t=>{let r={...t};for(let i of n)delete r[i];return r})}function Cn(e,n){return Array.isArray(e)?e.reduce((t,r,i)=>{let s=n(r,i);return t.concat(s)},[]):[]}function Un(e,n,t){if(!Array.isArray(e))return t;let r=t;for(let i=e.length-1;i>=0;i--)r=n(r,e[i],i);return r}function Wn(e,n,t=1){if(t===0)return[];let r=[];if(t>0)for(let i=e;i<n;i+=t)r.push(i);else for(let i=e;i>n;i+=t)r.push(i);return r}function Nn(e,n,t=0,r){if(!Array.isArray(e))return[];let i=[...e],s=r===void 0?i.length:r;for(let a=t;a<s&&a<i.length;a++)i[a]=n;return i}function Bn(e){return Array.isArray(e)?K(e):[]}function Ln(e,n,...t){let r,i;if(typeof n=="string")r=n,i=[e];else{let a=t[t.length-1];typeof a=="string"?(r=a,i=[e,n,...t.slice(0,-1).filter(Array.isArray)]):(r="id",i=[e,n,...t.filter(Array.isArray)])}if(i.length===0)return[];let s=new Map;for(let a of i)if(Array.isArray(a))for(let o of a){let u=m(o)?d(o,r):void 0;if(u!==void 0){let f=s.get(u);s.set(u,f?{...f,...o}:o)}}return Array.from(s.values())}function qn(e,n,t){if(!Array.isArray(e)||n===t)return e?[...e]:[];let r=[...e],[i]=r.splice(n,1);return r.splice(t,0,i),r}function Dn(e,n){if(!Array.isArray(e)||e.length===0||n===0)return e?[...e]:[];let t=e.length,r=(n%t+t)%t;return[...e.slice(-r),...e.slice(0,-r)]}function zn(e,n,...t){if(!Array.isArray(e))return t;let r=[...e];return r.splice(n,0,...t),r}function Hn(e,n,t=1){if(!Array.isArray(e))return[];let r=[...e];return r.splice(n,t),r}function _n(e,n,t){if(!Array.isArray(e))return[];let r=[...e];return r[n]=t,r}function Jn(e,n){if(!Array.isArray(e))return[];let t=e.filter(r=>r!=null);return n?t.filter(n):t}function Qn(...e){return e.length===0?[[]]:e.length===1?e[0].map(n=>[n]):e.reduce((n,t)=>n.flatMap(r=>t.map(i=>[...r,i])),[[]])}function Zn(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length;r++)n(e[r],r)&&t.push(r);return t}function Gn(e,n,t=!0){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let r=0;r<e.length;r++)if(t&&m(e[r])&&m(n[r])){if(JSON.stringify(e[r])!==JSON.stringify(n[r]))return!1}else if(e[r]!==n[r])return!1;return!0}function Xn(e,n){if(!Array.isArray(e)||e.length===0)return[];let t=[],r=[e[0]],i=n(e[0],0);for(let s=1;s<e.length;s++){let a=n(e[s],s);a===i?r.push(e[s]):(t.push(r),r=[e[s]],i=a)}return t.push(r),t}function Yn(e,n,t,r){if(!Array.isArray(e))return[];let i=typeof n=="function",s=i?t:r;return e.map(a=>{let o=!1;return i?o=n(a):o=(m(a)?d(a,n):a)===t,o?{...a,...s}:a})}function et(e,n){if(!Array.isArray(e))return{unique:[],duplicates:[]};let t=new Set,r=[],i=[];for(let s of e){let a=n&&m(s)?d(s,n):s;t.has(a)?i.push(s):(t.add(a),r.push(s))}return{unique:r,duplicates:i}}function ee(e){return Array.isArray(e)?e:e==null?[]:[e]}function nt(e){return ee(e)}function tt(e,n,t=1){if(!Array.isArray(e)||n<1||t<1)return[];let r=[];for(let i=0;i<=e.length-n;i+=t)r.push(e.slice(i,i+n));return r}function rt(e,n){if(!Array.isArray(e)||e.length===0)return;let t=e[0],r=typeof n=="function"?n(t):d(t,n);for(let i=1;i<e.length;i++){let s=e[i],a=typeof n=="function"?n(s):d(s,n);a<r&&(r=a,t=s)}return t}function it(e,n){if(!Array.isArray(e)||e.length===0)return;let t=e[0],r=typeof n=="function"?n(t):d(t,n);for(let i=1;i<e.length;i++){let s=e[i],a=typeof n=="function"?n(s):d(s,n);a>r&&(r=a,t=s)}return t}function ne(e,n){if(!Array.isArray(e)||e.length===0)return 0;let t=0;for(let r of e){let i=typeof n=="function"?n(r):d(r,n);typeof i=="number"&&!isNaN(i)&&(t+=i)}return t}function st(e,n){return!Array.isArray(e)||e.length===0?0:ne(e,n)/e.length}function R(e){let n=new Map;if(!Array.isArray(e))return n;for(let t of e)n.set(t,(n.get(t)||0)+1);return n}function te(e,n=1){if(!Array.isArray(e)||e.length===0||n<1)return[];let t=R(e);return Array.from(t.entries()).sort((i,s)=>s[1]-i[1]).slice(0,n).map(([i])=>i)}function ot(e,n=1){if(!Array.isArray(e)||e.length===0||n<1)return[];let t=R(e);return Array.from(t.entries()).sort((i,s)=>i[1]-s[1]).slice(0,n).map(([i])=>i)}async function at(e,n,t){if(!Array.isArray(e)||n<1)return;let r=k(e,n);for(let i=0;i<r.length;i++)await t(r[i],i)}async function ut(e,n,t,r){if(!Array.isArray(e)||n<1||t<1)return;let i=k(e,n),s=k(i.map((a,o)=>({batch:a,index:o})),t);for(let a of s)await Promise.all(a.map(({batch:o,index:u})=>r(o,u)))}function ft(e){if(!Array.isArray(e)||e.length===0)return[];let n=Math.max(...e.map(r=>r.length)),t=[];for(let r=0;r<n;r++){let i=[];for(let s=0;s<e.length;s++)r<e[s].length&&i.push(e[s][r]);t.push(i)}return t}function lt(e,n){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;for(let t=0;t<e.length;t++)if(e[t]!==n[t])return!1;return!0}function ct(e,n){if(!Array.isArray(e)||!Array.isArray(n)||e.length!==n.length)return!1;let t=R(e),r=R(n);if(t.size!==r.size)return!1;for(let[i,s]of t)if(r.get(i)!==s)return!1;return!0}function re(e,n){if(!Array.isArray(e)||!Array.isArray(n))return!1;let t=new Set(n);return e.every(r=>t.has(r))}function yt(e,n){return re(n,e)}function pt(...e){if(e.length===0)return[];let n=Math.max(...e.map(r=>r.length)),t=[];for(let r=0;r<n;r++)for(let i of e)r<i.length&&t.push(i[r]);return t}function dt(e,n){let t=[],r=[];if(!Array.isArray(e))return{pass:t,fail:r};for(let i=0;i<e.length;i++)n(e[i],i)?t.push(e[i]):r.push(e[i]);return{pass:t,fail:r}}function Tt(e,n){if(e<0)return[];let t=[];for(let r=0;r<e;r++)t.push(n(r));return t}function gt(e,n){if(!Array.isArray(e)||n<0)return[];let t=[];for(let r=0;r<n;r++)t.push(...e);return t}function At(e){if(!Array.isArray(e)||e.length===0)return;let n=[...e].sort((r,i)=>r-i),t=Math.floor(n.length/2);return n.length%2===0?(n[t-1]+n[t])/2:n[t]}function mt(e){let n=te(e,1);return n.length>0?n[0]:void 0}function xt(e,...n){if(!Array.isArray(e))return[];let t=new Set(n);return e.filter(r=>!t.has(r))}function ht(e,...n){if(!Array.isArray(e))return[];let t=new Set(n.flat());return e.filter(r=>!t.has(r))}function bt(e){if(!Array.isArray(e)||e.length===0)return[];let n=[],t=[e[0]];for(let r=1;r<e.length;r++)e[r]===e[r-1]?t.push(e[r]):(n.push(t),t=[e[r]]);return n.push(t),n}function St(e){if(!Array.isArray(e)||e.length===0)return[];let n=[e[0]];for(let t=1;t<e.length;t++)e[t]!==e[t-1]&&n.push(e[t]);return n}function vt(e,n="standard"){if(!Array.isArray(e)||e.length===0)return[];let t=e.map((i,s)=>({value:i,index:s}));t.sort((i,s)=>i.value-s.value);let r=new Array(e.length);if(n==="ordinal")for(let i=0;i<t.length;i++)r[t[i].index]=i+1;else if(n==="dense"){let i=1;r[t[0].index]=i;for(let s=1;s<t.length;s++)t[s].value!==t[s-1].value&&i++,r[t[s].index]=i}else{let i=0;for(;i<t.length;){let s=i;for(;s<t.length&&t[s].value===t[i].value;)s++;let a=i+1;for(let o=i;o<s;o++)r[t[o].index]=a;i=s}}return r}function j(e,n){if(!Array.isArray(e)||e.length===0||n<0||n>100)return;let t=[...e].sort((o,u)=>o-u),r=n/100*(t.length-1),i=Math.floor(r),s=Math.ceil(r),a=r-i;return i===s?t[i]:t[i]*(1-a)+t[s]*a}function wt(e){if(!Array.isArray(e)||e.length===0)return;let n=j(e,25),t=j(e,50),r=j(e,75);return{q1:n,q2:t,q3:r,iqr:r-n}}function U(e,n=!1){if(!Array.isArray(e)||e.length===0||n&&e.length===1)return;let t=e.reduce((s,a)=>s+a,0)/e.length,i=e.map(s=>Math.pow(s-t,2)).reduce((s,a)=>s+a,0)/(n?e.length-1:e.length);return Math.sqrt(i)}function Kt(e,n=!1){let t=U(e,n);return t!==void 0?Math.pow(t,2):void 0}function Ot(e){if(!Array.isArray(e)||e.length===0)return[];let n=Math.min(...e),r=Math.max(...e)-n;return r===0?e.map(()=>0):e.map(i=>(i-n)/r)}function Pt(e){if(!Array.isArray(e)||e.length===0)return[];let n=e.reduce((r,i)=>r+i,0)/e.length,t=U(e);return t===void 0||t===0?e.map(()=>0):e.map(r=>(r-n)/t)}function ie(e,n,t){if(!Array.isArray(e))return[];let r=[],i=t;for(let s=0;s<e.length;s++)i=n(i,e[s],s),r.push(i);return r}function Rt(e){return ie(e,(n,t)=>n+t,0)}function It(e){if(!Array.isArray(e)||e.length<2)return[];let n=[];for(let t=1;t<e.length;t++)n.push(e[t]-e[t-1]);return n}function kt(e,n,t,r="end"){if(!Array.isArray(e)||n<=e.length)return[...e];let i=new Array(n-e.length).fill(t);return r==="start"?[...i,...e]:[...e,...i]}function Ft(e,n){if(!Array.isArray(e)||e.length===0)return[];let t=0,r=e.length-1;for(;t<=r&&n(e[t]);)t++;for(;r>=t&&n(e[r]);)r--;return e.slice(t,r+1)}function jt(e){if(!Array.isArray(e)||e.length<2)return[];let n=[];for(let t=0;t<e.length-1;t++)n.push([e[t],e[t+1]]);return n}function Et(e){return Array.isArray(e)?e.map((n,t)=>[t,n]):[]}function Vt(e,n){return Array.isArray(e)?e.map((t,r)=>{let i=n[r%n.length];return i(t)}):[]}function se(e,n=1){if(!Array.isArray(e)||e.length===0)return[];let t=e.length,r=(n%t+t)%t;return[...e.slice(r),...e.slice(0,r)]}function Mt(e,n=1){return se(e,-n)}function $t(e,n,t){if(!Array.isArray(e)||n<0||t<0||n>=e.length||t>=e.length)return[...e];let r=[...e];return[r[n],r[t]]=[r[t],r[n]],r}function Ct(e,n,t){if(!Array.isArray(e)||n<0||t>=e.length||n>=t)return[...e];let r=[...e],i=r.slice(n,t+1).reverse();return r.splice(n,t-n+1,...i),r}function Ut(e,n){if(!Array.isArray(e)||e.length<=1)return!0;let t=n||((r,i)=>r<i?-1:r>i?1:0);for(let r=1;r<e.length;r++)if(t(e[r-1],e[r])>0)return!1;return!0}function Wt(e){return Array.isArray(e)?new Set(e).size!==e.length:!1}function Nt(e,n){return Array.isArray(e)?e.map(t=>{let r={};for(let i of n)i in t&&(r[i]=t[i]);return r}):[]}function oe(e,n,t){if(!Array.isArray(e))return{};let r={};for(let i=0;i<e.length;i++){let s=n(e[i],i),a=t?t(e[i],i):e[i];r[s]=a}return r}async function Bt(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length;r++)t.push(await n(e[r],r));return t}async function Lt(e,n){return Array.isArray(e)?Promise.all(e.map((t,r)=>n(t,r))):[]}async function qt(e,n){if(!Array.isArray(e))return[];let t=[];for(let r=0;r<e.length;r++)await n(e[r],r)&&t.push(e[r]);return t}async function Dt(e,n,t){if(!Array.isArray(e))return t;let r=t;for(let i=0;i<e.length;i++)r=await n(r,e[i],i);return r}async function zt(e,n){if(Array.isArray(e)){for(let t=0;t<e.length;t++)if(await n(e[t],t))return e[t]}}async function Ht(e,n){if(!Array.isArray(e))return!1;for(let t=0;t<e.length;t++)if(await n(e[t],t))return!0;return!1}async function _t(e,n){if(!Array.isArray(e))return!0;for(let t=0;t<e.length;t++)if(!await n(e[t],t))return!1;return!0}function Jt(e,n,t){if(!Array.isArray(e)||e.length===0)return 0;let r=0,i=0;for(let s of e){let a=typeof n=="function"?n(s):d(s,n),o=typeof t=="function"?t(s):d(s,t);typeof a=="number"&&typeof o=="number"&&(i+=a*o,r+=o)}return r===0?0:i/r}function Qt(e,n,t=1){if(!Array.isArray(e)||e.length===0||t<1)return[];let r=[],i=0;for(let a of e){let o=typeof n=="function"?n(a):d(a,n);i+=typeof o=="number"&&o>0?o:0,r.push(i)}if(i===0)return[];let s=[];for(let a=0;a<t;a++){let o=Math.random()*i,u=r.findIndex(f=>o<f);u!==-1&&s.push(e[u])}return s}function Zt(e,n){if(!Array.isArray(e)||!Array.isArray(n))return[];let t=[],r=0;for(let i of n){if(r>=e.length)break;t.push(e.slice(r,r+i)),r+=i}return t}function Gt(e,n){if(!Array.isArray(e)||n<1)return[];let t=R(e),r=[];for(let i of e)t.get(i)===n&&r.push(i);return r}function Xt(e,n,t){if(!Array.isArray(e)||n<1)return[];let r=[],i=0,s=[];for(let a of e)t(a)?(i++,s.push(a),i>=n&&r.push(...s.splice(0,s.length-n+1))):(i=0,s.length=0);return i>=n&&r.push(...s),r}function Yt(e,n,t){if(!Array.isArray(e))return[];let r=[],i=t;for(let s=0;s<e.length;s++){let{value:a,newContext:o}=n(e[s],i,s);r.push(a),i=o}return r}function er(e,n){return k(e,n)}function nr(e,n,t){if(!Array.isArray(e)||!Array.isArray(n))return[];let r=Math.min(e.length,n.length),i=[];for(let s=0;s<r;s++)i.push(t(e[s],n[s]));return i}function tr(e,n,t="last"){if(!Array.isArray(e)||e.length===0)return[];let r=new Map;for(let s of e)if(Array.isArray(s))for(let a of s){let o=d(a,n);if(t==="first")r.has(o)||r.set(o,a);else if(t==="last")r.set(o,a);else if(t==="concat"){let u=r.get(o);Array.isArray(u)?u.push(a):u?r.set(o,[u,a]):r.set(o,a)}else if(typeof t=="function"){let u=r.get(o);u&&!Array.isArray(u)?r.set(o,t(u,a)):r.set(o,a)}}let i=[];for(let s of r.values())Array.isArray(s)&&t==="concat"?i.push(...s):Array.isArray(s)||i.push(s);return i}function rr(e,n){return oe(e,t=>String(d(t,n)))}function ir(e,n,t){if(!Array.isArray(e)||e.length===0)return-1;let r=t||((a,o)=>a<o?-1:a>o?1:0),i=0,s=e.length-1;for(;i<=s;){let a=Math.floor((i+s)/2),o=r(e[a],n);if(o===0)return a;o<0?i=a+1:s=a-1}return-1}function sr(e,n,t){if(!Array.isArray(e))return[n];let r=t||((a,o)=>a<o?-1:a>o?1:0),i=[...e],s=0;for(;s<i.length&&r(i[s],n)<0;)s++;return i.splice(s,0,n),i}function ar(e){return e&&typeof e.addEventListener=="function"}function ur(e){return e&&typeof e.addEventListener=="function"&&typeof e.removeEventListener=="function"}function fr(e){return e&&typeof e.on=="function"&&typeof e.off=="function"}function lr(e){return e&&typeof e.addListener=="function"&&typeof e.removeListener=="function"}function yr(){return typeof globalThis=="object"?globalThis:typeof window=="object"?window:typeof self=="object"?self:typeof global=="object"?global:null}function pr(e){return Buffer.from(e).toString("base64")}function dr(e){return Buffer.from(e).toString("base64")}function Tr(e){return decodeURIComponent(Buffer.from(e,"base64").toString("utf-8"))}var gr=(e,n,t)=>{let r=t,i=new RegExp("([?&])"+n+"=.*?(&|$)","i"),s=e.includes("?")?"&":"?";n==="country"&&(r=JSON.parse(r).alpha_2),n==="phone"&&(r=r.trim().replace(/\s/g,""));let a=e.match(i);return typeof a<"u"&&a!==null?e.replace(i,"$1"+n+"="+r+"$2"):e+s+n+"="+r};var mr=async(e,n="SHA-1")=>{if(typeof window>"u")return null;let{subtle:t}=window.globalThis.crypto,r=await t.generateKey({name:"HMAC",hash:n,length:256},!0,["sign","verify"]),s=new TextEncoder().encode(e),a=await t.sign({name:"HMAC"},r,s);return[...new Uint8Array(a)].map(u=>u.toString(16).padStart(2,"0")).join("")},W=async(e,n="SHA-256")=>{let r=new TextEncoder().encode(e),i=await crypto.subtle.digest(n,r);return Array.from(new Uint8Array(i)).map(o=>o.toString(16).padStart(2,"0")).join("")},xr=async(e,n,t="SHA-256")=>{let r=await W(e,t),i=await W(n,t);return r===i};async function hr(e,n="SHA-256"){let r=new TextEncoder().encode(e),i=await crypto.subtle.digest(n,r);return Array.from(new Uint8Array(i)).map(o=>o.toString(16).padStart(2,"0")).join("")}var br=e=>{let n=0;for(let t=0;t<e.length;t++){let r=e.charCodeAt(t);n=(n<<5)-n+r,n=n&n}return n.toString(16)};import{isClass as ae}from"@fluixi/utils/object";function ue(e){return typeof e=="function"&&!ae(e)}function wr(e){return e instanceof Promise||!!e&&(typeof e=="object"||typeof e=="function")&&"then"in e}function Kr(e){return ue(e)&&e.constructor.name==="AsyncFunction"}function Or(e,n){let t=new Map,r=function(...i){let s=n?n(...i):JSON.stringify(i);if(t.has(s))return t.get(s);let a=e.apply(this,i);return t.set(s,a),a};return r.cache=t,r}function fe(e,n,t={}){let{leading:r=!1,trailing:i=!0,maxWait:s}=t,a,o,u,f=0,y,T,p;function b(A){let v=y,w=T;return y=T=void 0,f=A,p=e.apply(w,v),p}function l(A,v){return setTimeout(A,v)}function c(A){A!==void 0&&clearTimeout(A)}function g(A){return f=A,a=l(O,n),r?b(A):p}function x(A){let v=A-u,w=A-f,V=n-v;return s!==void 0?Math.min(V,s-w):V}function h(A){let v=A-u,w=A-f;return u===void 0||v>=n||v<0||s!==void 0&&w>=s}function O(){let A=Date.now();if(h(A)){E(A);return}a=l(O,x(A))}function E(A){return a=void 0,i&&y?b(A):(y=T=void 0,p)}function N(){c(a),c(o),f=0,y=u=T=a=o=void 0}function B(){return a===void 0?p:E(Date.now())}function L(){return a!==void 0}function I(...A){let v=Date.now(),w=h(v);if(y=A,T=this,u=v,w){if(a===void 0)return g(u);if(s!==void 0)return a=l(O,n),b(u)}return a===void 0&&(a=l(O,n)),p}return I.cancel=N,I.flush=B,I.pending=L,I}function Pr(e,n,t={}){let{leading:r=!0,trailing:i=!0}=t;return fe(e,n,{leading:r,trailing:i,maxWait:n})}function Rr(e){let n=!1,t,r=function(...i){return n||(n=!0,t=e.apply(this,i)),t};return Object.defineProperty(r,"called",{get(){return n}}),r}function Ir(e,...n){return function(...t){let r=n.map(i=>t[i]);return e.apply(this,r)}}function kr(e,n=e.length){return function t(...r){return r.length>=n?e.apply(this,r):function(...i){return t.apply(this,[...r,...i])}}}function le(...e){return e.reduceRight((n,t)=>r=>t(n(r)),n=>n)}function ce(...e){return e.reduce((n,t)=>r=>t(n(r)),n=>n)}function Fr(e){return function(...n){return!e.apply(this,n)}}function jr(e,...n){return function(...t){let r=t.map((i,s)=>n[s]?n[s](i):i);return e.apply(this,r)}}function Er(e,...n){return function(...t){return e.apply(this,[...n,...t])}}function Vr(e,...n){return function(...t){return e.apply(this,[...t,...n])}}function Mr(e,n,...t){return function(...r){return e.apply(n,[...t,...r])}}function $r(e){return function(...n){return e.apply(this,n.reverse())}}function Cr(e,n){return function(...t){return e.apply(this,t.slice(0,n))}}function Ur(e){return function(n){return e.call(this,n)}}function Wr(e,...n){return setTimeout(e,1,...n)}function Nr(e,n,...t){return setTimeout(e,n,...t)}function Br(e,n,t){let r=new Map,i=function(...s){let a=t?t(...s):JSON.stringify(s),o=Date.now(),u=r.get(a);if(u&&u.expires>o)return u.value;let f=e.apply(this,s);r.set(a,{value:f,expires:o+n});for(let[y,T]of r.entries())T.expires<=o&&r.delete(y);return f};return i.cache=r,i}function Lr(e,n){let t,r=0;return function(...i){return++r<n&&(t=e.apply(this,i)),r>=n&&(e=void 0),t}}function qr(e,n){let t=0;return function(...r){if(++t>=n)return e.apply(this,r)}}function Dr(e,n){return function(...t){try{return e.apply(this,t)}catch(r){return n(r,...t)}}}function zr(...e){return ce(...e)}function Hr(...e){return le(...e)}function _r(e,n={}){let{retries:t=3,delay:r=1e3,backoff:i=2,onRetry:s}=n;return async function(...a){let o,u=r;for(let f=0;f<=t;f++)try{return await e.apply(this,a)}catch(y){o=y,f<t&&(s&&s(o,f+1),await new Promise(T=>setTimeout(T,u)),u*=i)}throw o}}function Jr(e,n,t){return async function(...r){return Promise.race([e.apply(this,r),new Promise((i,s)=>setTimeout(()=>{t&&t(),s(new Error(`Function timed out after ${n}ms`))},n))])}}export{Tr as aenu,qr as after,Vt as applyByIndex,Cr as ary,Ee as at,st as avgBy,er as batch,at as batchProcess,ut as batchProcessParallel,Lr as before,dt as bifurcate,ir as binarySearch,Mr as bind,pr as btoa,Qn as cartesian,k as chunk,Xn as chunkBy,Pn as compact,xr as compareWithHash,le as compose,Tn as countBy,mr as createHash,Rt as cumulativeSum,kr as curry,fe as debounce,St as dedupeConsecutive,Bn as deepCloneArray,Wr as defer,Nr as delay,It as diff,mn as difference,ht as differenceWith,Kn as drop,On as dropWhile,ee as ensureArray,Et as enumerate,_t as everyAsync,Nn as fill,qt as filterAsync,Jn as filterCompact,Xt as filterConsecutive,Zn as findAllIndices,zt as findAsync,jn as findIndex,En as findLastIndex,Ie as first,Cn as flatMap,pn as flatten,je as flattenArray,X as flattenDeep,$r as flip,zr as flow,Hr as flowRight,R as frequencies,Tt as generate,Ge as generateID,Ze as generateUUID,Qe as getKind,Fe as groupArrayBy,dn as groupBy,bt as groupConsecutive,Wt as hasDuplicates,ct as hasSameElements,W as hash,hr as hashStringPromise,rr as indexBy,zn as insert,sr as insertSorted,pt as interleave,xn as intersection,lr as isAddRemoveListenerTarget,he as isArray,lt as isArrayEqual,ve as isArrayLike,Te as isArrayOfBoolean,de as isArrayOfNumber,ge as isArrayOfObject,pe as isArrayOfString,Kr as isAsyncFunction,ar as isDOMEventTarget,Je as isDefined,Se as isDoubleArray,we as isEmptyArray,Gn as isEqual,ue as isFunction,D as isIterable,ur as isNodeEventEmitter,Ke as isNonEmptyArray,ze as isNull,xe as isObjectArray,fr as isOnOffTarget,Q as isPrimitive,wr as isPromise,Pe as isReadonlyArray,Ut as isSorted,be as isStaticArray,re as isSubset,yt as isSuperset,Oe as isTypedArray,He as isUndefined,_e as isUndefinedOrNull,gn as keyBy,Re as last,ot as leastCommon,Bt as mapAsync,Lt as mapAsyncParallel,Yt as mapWithContext,it as maxBy,At as median,Or as memoize,Br as memoizeWithTTL,tr as mergeArraysByKey,Ln as mergeByKey,rt as minBy,mt as mode,te as mostCommon,qn as move,Fr as negate,Ot as normalize,$n as omit,Rr as once,jr as overArgs,kt as pad,jt as pairwise,Er as partial,Vr as partialRight,bn as partition,j as percentile,Mn as pick,Nt as pickMany,ce as pipe,Vn as pluck,wt as quartiles,Wn as range,vt as rank,Ir as rearg,Dt as reduceAsync,Un as reduceRight,Hn as remove,gt as repeat,_n as replace,_r as retry,Ct as reverseSegment,Dn as rotate,se as rotateLeft,Mt as rotateRight,kn as sample,Fn as sampleSize,ie as scan,Zt as segment,Gt as selectByCount,Y as shuffle,tt as slidingWindow,Ht as someAsync,An as sortBy,et as splitDuplicates,U as standardDeviation,Pt as standardize,br as string_hash,ne as sumBy,$t as swap,Sn as take,vn as takeLast,wn as takeWhile,Pr as throttle,ke as toArray,ye as toArrayString,oe as toObject,ft as transpose,Ft as trim,Dr as tryCatch,dr as uena,Ur as unary,hn as union,F as unique,In as unzip,Yn as updateBy,gr as updateQueryStringParameter,Kt as variance,Jt as weightedAverage,Qt as weightedSample,yr as windowObject,Jr as withTimeout,xt as without,nt as wrap,Rn as zip,nr as zipWith};
@@ -0,0 +1 @@
1
+ "use strict";var e=Object.defineProperty;var G=Object.getOwnPropertyDescriptor;var P=Object.getOwnPropertyNames;var b=Object.prototype.hasOwnProperty;var m=(s,t)=>{for(var c in t)e(s,c,{get:t[c],enumerable:!0})},u=(s,t,c,a)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of P(t))!b.call(s,o)&&o!==c&&e(s,o,{get:()=>t[o],enumerable:!(a=G(t,o))||a.enumerable});return s};var y=s=>u(e({},"__esModule",{value:!0}),s);var Q={};m(Q,{Constants:()=>O,DEGREES_IN_CIRCLE:()=>N,DEGREES_PER_RADIAN:()=>L,E:()=>r,GRADIANS_IN_CIRCLE:()=>D,LN10:()=>I,LN2:()=>R,LOG10E:()=>C,LOG2E:()=>_,PHI:()=>p,PI:()=>n,RADIANS_IN_CIRCLE:()=>A,RADIANS_PER_DEGREE:()=>S,SQRT1_2:()=>x,SQRT2:()=>E});module.exports=y(Q);var n=3.141592653589793,r=2.718281828459045,p=1.618033988749894,E=1.4142135623730951,x=.7071067811865476,R=.6931471805599453,I=2.302585092994046,_=1.4426950408889634,C=.4342944819032518,N=360,A=2*n,D=400,L=180/n,S=n/180,O={PI:n,E:r,PHI:p,SQRT2:E,SQRT1_2:x,LN2:R,LN10:I,LOG2E:_,LOG10E:C,DEGREES_IN_CIRCLE:N,RADIANS_IN_CIRCLE:A,GRADIANS_IN_CIRCLE:D,DEGREES_PER_RADIAN:L,RADIANS_PER_DEGREE:S};
@@ -0,0 +1,84 @@
1
+ /**
2
+ * Mathematical constants with precise typing.
3
+ * @module MathConstants
4
+ */
5
+ /**
6
+ * The ratio of a circle's circumference to its diameter.
7
+ */
8
+ export declare const PI: 3.141592653589793;
9
+ /**
10
+ * Euler's number, the base of natural logarithms.
11
+ */
12
+ export declare const E: 2.718281828459045;
13
+ /**
14
+ * The golden ratio, approximately 1.61803.
15
+ */
16
+ export declare const PHI: 1.618033988749894;
17
+ /**
18
+ * Square root of 2.
19
+ */
20
+ export declare const SQRT2: 1.4142135623730951;
21
+ /**
22
+ * Square root of 1/2.
23
+ */
24
+ export declare const SQRT1_2: 0.7071067811865476;
25
+ /**
26
+ * Natural logarithm of 2.
27
+ */
28
+ export declare const LN2: 0.6931471805599453;
29
+ /**
30
+ * Natural logarithm of 10.
31
+ */
32
+ export declare const LN10: 2.302585092994046;
33
+ /**
34
+ * Base-2 logarithm of E.
35
+ */
36
+ export declare const LOG2E: 1.4426950408889634;
37
+ /**
38
+ * Base-10 logarithm of E.
39
+ */
40
+ export declare const LOG10E: 0.4342944819032518;
41
+ /**
42
+ * Degrees in a circle.
43
+ */
44
+ export declare const DEGREES_IN_CIRCLE: 360;
45
+ /**
46
+ * Radians in a circle.
47
+ */
48
+ export declare const RADIANS_IN_CIRCLE: number;
49
+ /**
50
+ * Gradians in a circle.
51
+ */
52
+ export declare const GRADIANS_IN_CIRCLE: 400;
53
+ /**
54
+ * Degrees per radian.
55
+ */
56
+ export declare const DEGREES_PER_RADIAN: number;
57
+ /**
58
+ * Radians per degree.
59
+ */
60
+ export declare const RADIANS_PER_DEGREE: number;
61
+ /**
62
+ * Mathematical constants object for grouped access.
63
+ */
64
+ export declare const Constants: {
65
+ readonly PI: 3.141592653589793;
66
+ readonly E: 2.718281828459045;
67
+ readonly PHI: 1.618033988749894;
68
+ readonly SQRT2: 1.4142135623730951;
69
+ readonly SQRT1_2: 0.7071067811865476;
70
+ readonly LN2: 0.6931471805599453;
71
+ readonly LN10: 2.302585092994046;
72
+ readonly LOG2E: 1.4426950408889634;
73
+ readonly LOG10E: 0.4342944819032518;
74
+ readonly DEGREES_IN_CIRCLE: 360;
75
+ readonly RADIANS_IN_CIRCLE: number;
76
+ readonly GRADIANS_IN_CIRCLE: 400;
77
+ readonly DEGREES_PER_RADIAN: number;
78
+ readonly RADIANS_PER_DEGREE: number;
79
+ };
80
+ /**
81
+ * Type inference for mathematical constants.
82
+ */
83
+ export type MathConstants = typeof Constants;
84
+ //# sourceMappingURL=constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/lib/maths/constants.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,eAAO,MAAM,EAAE,EAAG,iBAA0B,CAAC;AAE7C;;GAEG;AACH,eAAO,MAAM,CAAC,EAAG,iBAA0B,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,GAAG,EAAG,iBAA0B,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,KAAK,EAAG,kBAA2B,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,OAAO,EAAG,kBAA2B,CAAC;AAEnD;;GAEG;AACH,eAAO,MAAM,GAAG,EAAG,kBAA2B,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,IAAI,EAAG,iBAA0B,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,KAAK,EAAG,kBAA2B,CAAC;AAEjD;;GAEG;AACH,eAAO,MAAM,MAAM,EAAG,kBAA2B,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAG,GAAY,CAAC;AAE9C;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAa,MAAM,CAAC;AAElD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAG,GAAY,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAe,MAAM,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,kBAAkB,EAAe,MAAM,CAAC;AAErD;;GAEG;AACH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;CAeZ,CAAC;AAEX;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,OAAO,SAAS,CAAC"}
@@ -0,0 +1,79 @@
1
+ /**
2
+ * Mathematical constants with precise typing.
3
+ * @module MathConstants
4
+ */
5
+ /**
6
+ * The ratio of a circle's circumference to its diameter.
7
+ */
8
+ export const PI = 3.141592653589793;
9
+ /**
10
+ * Euler's number, the base of natural logarithms.
11
+ */
12
+ export const E = 2.718281828459045;
13
+ /**
14
+ * The golden ratio, approximately 1.61803.
15
+ */
16
+ export const PHI = 1.618033988749894;
17
+ /**
18
+ * Square root of 2.
19
+ */
20
+ export const SQRT2 = 1.4142135623730951;
21
+ /**
22
+ * Square root of 1/2.
23
+ */
24
+ export const SQRT1_2 = 0.7071067811865476;
25
+ /**
26
+ * Natural logarithm of 2.
27
+ */
28
+ export const LN2 = 0.6931471805599453;
29
+ /**
30
+ * Natural logarithm of 10.
31
+ */
32
+ export const LN10 = 2.302585092994046;
33
+ /**
34
+ * Base-2 logarithm of E.
35
+ */
36
+ export const LOG2E = 1.4426950408889634;
37
+ /**
38
+ * Base-10 logarithm of E.
39
+ */
40
+ export const LOG10E = 0.4342944819032518;
41
+ /**
42
+ * Degrees in a circle.
43
+ */
44
+ export const DEGREES_IN_CIRCLE = 360;
45
+ /**
46
+ * Radians in a circle.
47
+ */
48
+ export const RADIANS_IN_CIRCLE = 2 * PI;
49
+ /**
50
+ * Gradians in a circle.
51
+ */
52
+ export const GRADIANS_IN_CIRCLE = 400;
53
+ /**
54
+ * Degrees per radian.
55
+ */
56
+ export const DEGREES_PER_RADIAN = 180 / PI;
57
+ /**
58
+ * Radians per degree.
59
+ */
60
+ export const RADIANS_PER_DEGREE = PI / 180;
61
+ /**
62
+ * Mathematical constants object for grouped access.
63
+ */
64
+ export const Constants = {
65
+ PI,
66
+ E,
67
+ PHI,
68
+ SQRT2,
69
+ SQRT1_2,
70
+ LN2,
71
+ LN10,
72
+ LOG2E,
73
+ LOG10E,
74
+ DEGREES_IN_CIRCLE,
75
+ RADIANS_IN_CIRCLE,
76
+ GRADIANS_IN_CIRCLE,
77
+ DEGREES_PER_RADIAN,
78
+ RADIANS_PER_DEGREE,
79
+ };
@@ -0,0 +1 @@
1
+ var t=3.141592653589793,s=2.718281828459045,o=1.618033988749894,n=1.4142135623730951,c=.7071067811865476,e=.6931471805599453,a=2.302585092994046,r=1.4426950408889634,p=.4342944819032518,E=360,x=2*t,R=400,I=180/t,_=t/180,C={PI:t,E:s,PHI:o,SQRT2:n,SQRT1_2:c,LN2:e,LN10:a,LOG2E:r,LOG10E:p,DEGREES_IN_CIRCLE:E,RADIANS_IN_CIRCLE:x,GRADIANS_IN_CIRCLE:R,DEGREES_PER_RADIAN:I,RADIANS_PER_DEGREE:_};export{C as Constants,E as DEGREES_IN_CIRCLE,I as DEGREES_PER_RADIAN,s as E,R as GRADIANS_IN_CIRCLE,a as LN10,e as LN2,p as LOG10E,r as LOG2E,o as PHI,t as PI,x as RADIANS_IN_CIRCLE,_ as RADIANS_PER_DEGREE,c as SQRT1_2,n as SQRT2};
@@ -0,0 +1 @@
1
+ "use strict";var c=Object.defineProperty;var d=Object.getOwnPropertyDescriptor;var p=Object.getOwnPropertyNames;var h=Object.prototype.hasOwnProperty;var l=(r,n)=>{for(var e in n)c(r,e,{get:n[e],enumerable:!0})},g=(r,n,e,t)=>{if(n&&typeof n=="object"||typeof n=="function")for(let o of p(n))!h.call(r,o)&&o!==e&&c(r,o,{get:()=>n[o],enumerable:!(t=d(n,o))||t.enumerable});return r};var x=r=>g(c({},"__esModule",{value:!0}),r);var I={};l(I,{addFractions:()=>R,cbrt:()=>T,evaluatePolynomial:()=>q,exp:()=>E,ln:()=>w,log:()=>N,log10:()=>y,log2:()=>F,multiplyFractions:()=>L,normalize:()=>z,nthRoot:()=>S,percentage:()=>j,range:()=>D,simplifyFraction:()=>a,solveQuadratic:()=>A,toBase:()=>k,toOrdinal:()=>C,truncateDecimals:()=>B,wrap:()=>G});module.exports=x(I);var s=(r,n=0,e="round")=>{if(e==="david")return M(r,n,e);if(!Number.isFinite(r))return r;if(n===0)return Math[e](r);if(n<0){let b=10**-n;return Math[e](r/b)*b}let t=10**n,o=Math.pow(2,-52),u=r*t,m=Math.sign(u)*o*Math.abs(u),i;switch(e){case"round":i=Math.round(u+m);break;case"ceil":i=Math.ceil(u-o);break;case"floor":i=Math.floor(u+o);break;case"trunc":i=u<0?Math.ceil(u):Math.floor(u);break;default:i=Math.round(u+m)}return i/t},M=(r,n=0,e="round")=>{let t=Math.abs(r),o=r<0?-1:1;if(n===0)return Math.round(t)*o;if(!Number.isFinite(t))return t*o;let u=10**n,m=t*u,i=Math.pow(2,-53),b=Math.sign(m)*i*Math.abs(m);return m+=b,Math.round(m)/u*o};function f(r,n){for(r=Math.abs(r),n=Math.abs(n);n!==0;){let e=n;n=r%n,r=e}return r}function w(r){if(r<=0)throw new Error("Natural logarithm is only defined for positive numbers");return Math.log(r)}function y(r){if(r<=0)throw new Error("Logarithm is only defined for positive numbers");return Math.log10(r)}function F(r){if(r<=0)throw new Error("Logarithm is only defined for positive numbers");return Math.log2(r)}function N(r,n){if(r<=0||n<=0)throw new Error("Logarithm is only defined for positive numbers and bases");return Math.log(r)/Math.log(n)}function E(r){return Math.exp(r)}function T(r){return Math.cbrt(r)}function S(r,n){if(n===0)throw new Error("Cannot calculate 0th root");if(r<0&&n%2===0)throw new Error("Cannot calculate even root of negative number");let e=1/n;return Math.sign(r)*Math.pow(Math.abs(r),e)}function A(r,n,e){if(r===0)return n===0?[]:[-e/n];let t=n*n-4*r*e;if(t<0)return[];if(t===0)return[-n/(2*r)];{let o=Math.sqrt(t);return[(-n-o)/(2*r),(-n+o)/(2*r)]}}function q(r,n){let e=0;for(let t=0;t<r.length;t++)e=e*n+r[t];return e}function a(r){let n=f(r.numerator,r.denominator);return{numerator:r.numerator/n,denominator:r.denominator/n}}function R(r,n){let e=r.numerator*n.denominator+n.numerator*r.denominator,t=r.denominator*n.denominator;return a({numerator:e,denominator:t})}function L(r,n){let e=r.numerator*n.numerator,t=r.denominator*n.denominator;return a({numerator:e,denominator:t})}var j=(r,n,e=2)=>{if(n===0)return 0;let t=r/n*100;return s(t,e)},k=(r,n,e=1)=>{if(n<2||n>36)throw new Error("Base must be between 2 and 36");return r.toString(n).padStart(e,"0")},C=r=>{let n=["th","st","nd","rd"],e=r%100;return r+(n[(e-20)%10]||n[e]||n[0])},D=(r,n,e=1)=>{let t=[];if(e===0)return t;if(e>0)for(let o=r;o<n;o+=e)t.push(o);else for(let o=r;o>n;o+=e)t.push(o);return t},B=(r,n)=>{if(!Number.isFinite(r))return r;let e=10**n;return Math.trunc(r*e)/e},z=(r,n,e)=>n===e?0:(r-n)/(e-n),G=(r,n,e)=>{let t=e-n;return((r-n)%t+t)%t+n};
@@ -0,0 +1,149 @@
1
+ /**
2
+ * Advanced mathematical operations.
3
+ * @module AdvancedMathFunctions
4
+ */
5
+ import type { Fraction } from '../types/advanced.js';
6
+ /**
7
+ * Calculates the natural logarithm of a number.
8
+ * @param value - The number
9
+ * @returns The natural logarithm
10
+ * @throws {Error} If value is not positive
11
+ */
12
+ export declare function ln(value: number): number;
13
+ /**
14
+ * Calculates the base-10 logarithm of a number.
15
+ * @param value - The number
16
+ * @returns The base-10 logarithm
17
+ * @throws {Error} If value is not positive
18
+ */
19
+ export declare function log10(value: number): number;
20
+ /**
21
+ * Calculates the base-2 logarithm of a number.
22
+ * @param value - The number
23
+ * @returns The base-2 logarithm
24
+ * @throws {Error} If value is not positive
25
+ */
26
+ export declare function log2(value: number): number;
27
+ /**
28
+ * Calculates the logarithm of a number with a custom base.
29
+ * @param value - The number
30
+ * @param base - The logarithm base
31
+ * @returns The logarithm with specified base
32
+ * @throws {Error} If value or base is not positive
33
+ */
34
+ export declare function log(value: number, base: number): number;
35
+ /**
36
+ * Calculates the exponential function e^x.
37
+ * @param x - The exponent
38
+ * @returns e raised to the power x
39
+ */
40
+ export declare function exp(x: number): number;
41
+ /**
42
+ * Calculates the cube root of a number.
43
+ * @param value - The number
44
+ * @returns The cube root
45
+ */
46
+ export declare function cbrt(value: number): number;
47
+ /**
48
+ * Calculates the nth root of a number.
49
+ * @param value - The number
50
+ * @param n - The root degree
51
+ * @returns The nth root
52
+ * @throws {Error} If n is 0 or value is negative for even n
53
+ */
54
+ export declare function nthRoot(value: number, n: number): number;
55
+ /**
56
+ * Solves a quadratic equation ax^2 + bx + c = 0.
57
+ * @param a - Coefficient of x^2
58
+ * @param b - Coefficient of x
59
+ * @param c - Constant term
60
+ * @returns Array of real roots (0, 1, or 2 roots)
61
+ */
62
+ export declare function solveQuadratic(a: number, b: number, c: number): number[];
63
+ /**
64
+ * Evaluates a polynomial at a given x value.
65
+ * @param coefficients - Polynomial coefficients from highest to lowest degree
66
+ * @param x - The value to evaluate at
67
+ * @returns The polynomial value at x
68
+ */
69
+ export declare function evaluatePolynomial(coefficients: number[], x: number): number;
70
+ /**
71
+ * Simplifies a fraction to its lowest terms.
72
+ * @param fraction - The fraction to simplify
73
+ * @returns The simplified fraction
74
+ */
75
+ export declare function simplifyFraction(fraction: Fraction): Fraction;
76
+ /**
77
+ * Adds two fractions.
78
+ * @param a - First fraction
79
+ * @param b - Second fraction
80
+ * @returns The sum as a simplified fraction
81
+ */
82
+ export declare function addFractions(a: Fraction, b: Fraction): Fraction;
83
+ /**
84
+ * Multiplies two fractions.
85
+ * @param a - First fraction
86
+ * @param b - Second fraction
87
+ * @returns The product as a simplified fraction
88
+ */
89
+ export declare function multiplyFractions(a: Fraction, b: Fraction): Fraction;
90
+ /**
91
+ * Calculates the percentage of a number.
92
+ * @param value - The number
93
+ * @param percentage - The percentage (e.g., 25 for 25%)
94
+ * @param precision - The number of decimal places
95
+ * @returns The percentage of the number
96
+ */
97
+ export declare const percentage: (value: number, total: number, precision?: number) => number;
98
+ /**
99
+ * Converts a number to a specified base (2-36)
100
+ *
101
+ * @param number - The number
102
+ */
103
+ export declare const toBase: (number: number, base: number, minLength?: number) => string;
104
+ /**
105
+ * Converts a number to ordinal string (1st, 2nd, 3rd, etc.)
106
+ *
107
+ * @param n - The number
108
+ */
109
+ export declare const toOrdinal: (n: number) => string;
110
+ /**
111
+ * Generates a sequence of numbers
112
+ *
113
+ * @param start - The starting number
114
+ * @param end - The ending number
115
+ * @param step - The step size
116
+ *
117
+ * @returns An array of numbers
118
+ */
119
+ export declare const range: (start: number, end: number, step?: number) => number[];
120
+ /**
121
+ * Limits the number of decimal places without rounding
122
+ *
123
+ * @param value - The number
124
+ * @param decimalPlaces - The number of decimal places
125
+ *
126
+ * @returns The truncated number
127
+ */
128
+ export declare const truncateDecimals: (value: number, decimalPlaces: number) => number;
129
+ /**
130
+ * Normalizes a value to a 0-1 range based on min/max
131
+ *
132
+ * @param value - The number
133
+ * @param min - The minimum value
134
+ * @param max - The maximum value
135
+ *
136
+ * @returns The normalized value
137
+ */
138
+ export declare const normalize: (value: number, min: number, max: number) => number;
139
+ /**
140
+ * Wraps a value within a range (like modulo for floats)
141
+ *
142
+ * @param value - The number
143
+ * @param min - The minimum value
144
+ * @param max - The maximum value
145
+ *
146
+ * @returns The wrapped value
147
+ */
148
+ export declare const wrap: (value: number, min: number, max: number) => number;
149
+ //# sourceMappingURL=advanced.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"advanced.d.ts","sourceRoot":"","sources":["../../../../src/lib/maths/fn/advanced.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAGrD;;;;;GAKG;AACH,wBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKxC;AAED;;;;;GAKG;AACH,wBAAgB,KAAK,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK3C;AAED;;;;;GAKG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK1C;AAED;;;;;;GAMG;AACH,wBAAgB,GAAG,CAAC,KAAK,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAKvD;AAED;;;;GAIG;AACH,wBAAgB,GAAG,CAAC,CAAC,EAAE,MAAM,GAAG,MAAM,CAErC;AAED;;;;GAIG;AACH,wBAAgB,IAAI,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAE1C;AAED;;;;;;GAMG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAWxD;AAED;;;;;;GAMG;AACH,wBAAgB,cAAc,CAAC,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAoBxE;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,YAAY,EAAE,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAM5E;AAED;;;;GAIG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,QAAQ,GAAG,QAAQ,CAM7D;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAI/D;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,EAAE,QAAQ,GAAG,QAAQ,CAIpE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,UAAU,GACrB,OAAO,MAAM,EACb,OAAO,MAAM,EACb,YAAW,MAAU,KACpB,MAIF,CAAC;AAGF;;;;GAIG;AACH,eAAO,MAAM,MAAM,GACjB,QAAQ,MAAM,EACd,MAAM,MAAM,EACZ,YAAW,MAAU,KACpB,MAOF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,SAAS,GAAI,GAAG,MAAM,KAAG,MAIrC,CAAC;AAGF;;;;;;;;GAQG;AACH,eAAO,MAAM,KAAK,GAChB,OAAO,MAAM,EACb,KAAK,MAAM,EACX,OAAM,MAAU,KACf,MAAM,EAgBR,CAAC;AAEF;;;;;;;GAOG;AACH,eAAO,MAAM,gBAAgB,GAC3B,OAAO,MAAM,EACb,eAAe,MAAM,KACpB,MAKF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,SAAS,GACpB,OAAO,MAAM,EACb,KAAK,MAAM,EACX,KAAK,MAAM,KACV,MAGF,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,IAAI,GAAI,OAAO,MAAM,EAAE,KAAK,MAAM,EAAE,KAAK,MAAM,KAAG,MAG9D,CAAC"}