@vinicunca/perkakas 0.4.1 → 0.4.3

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 (626) hide show
  1. package/dist/index.cjs +2375 -0
  2. package/dist/index.d.cts +4603 -0
  3. package/dist/index.d.mts +4603 -0
  4. package/dist/index.d.ts +4603 -0
  5. package/dist/index.mjs +2231 -0
  6. package/package.json +17 -7
  7. package/dist/commonjs/aria/index.js +0 -17
  8. package/dist/commonjs/aria/key-codes.js +0 -25
  9. package/dist/commonjs/array/all-pass.js +0 -11
  10. package/dist/commonjs/array/any-pass.js +0 -11
  11. package/dist/commonjs/array/chunk.js +0 -17
  12. package/dist/commonjs/array/concat.js +0 -11
  13. package/dist/commonjs/array/difference-with.js +0 -21
  14. package/dist/commonjs/array/drop-first-by.js +0 -26
  15. package/dist/commonjs/array/drop-last-while.js +0 -16
  16. package/dist/commonjs/array/drop-last.js +0 -15
  17. package/dist/commonjs/array/drop-while.js +0 -16
  18. package/dist/commonjs/array/drop.js +0 -25
  19. package/dist/commonjs/array/filter.js +0 -28
  20. package/dist/commonjs/array/find-index.js +0 -33
  21. package/dist/commonjs/array/find-last-index.js +0 -24
  22. package/dist/commonjs/array/find-last.js +0 -24
  23. package/dist/commonjs/array/find.js +0 -26
  24. package/dist/commonjs/array/first-by.js +0 -22
  25. package/dist/commonjs/array/first.js +0 -20
  26. package/dist/commonjs/array/flat-map-to-obj.js +0 -26
  27. package/dist/commonjs/array/flat-map.js +0 -23
  28. package/dist/commonjs/array/flatten-deep.js +0 -38
  29. package/dist/commonjs/array/flatten.js +0 -20
  30. package/dist/commonjs/array/for-each.js +0 -36
  31. package/dist/commonjs/array/group-by.js +0 -33
  32. package/dist/commonjs/array/has-at-least.js +0 -11
  33. package/dist/commonjs/array/index-by.js +0 -37
  34. package/dist/commonjs/array/index.js +0 -81
  35. package/dist/commonjs/array/intersection-with.js +0 -21
  36. package/dist/commonjs/array/join.js +0 -11
  37. package/dist/commonjs/array/last.js +0 -11
  38. package/dist/commonjs/array/length.js +0 -11
  39. package/dist/commonjs/array/map-to-obj.js +0 -24
  40. package/dist/commonjs/array/map.js +0 -31
  41. package/dist/commonjs/array/max-by.js +0 -28
  42. package/dist/commonjs/array/mean-by.js +0 -26
  43. package/dist/commonjs/array/merge-all.js +0 -11
  44. package/dist/commonjs/array/min-by.js +0 -28
  45. package/dist/commonjs/array/nth-by.js +0 -12
  46. package/dist/commonjs/array/only.js +0 -11
  47. package/dist/commonjs/array/partition.js +0 -24
  48. package/dist/commonjs/array/range.js +0 -15
  49. package/dist/commonjs/array/rank-by.js +0 -17
  50. package/dist/commonjs/array/reduce.js +0 -19
  51. package/dist/commonjs/array/reject.js +0 -28
  52. package/dist/commonjs/array/reverse.js +0 -11
  53. package/dist/commonjs/array/sample.js +0 -34
  54. package/dist/commonjs/array/shuffle.js +0 -18
  55. package/dist/commonjs/array/sort-by.js +0 -14
  56. package/dist/commonjs/array/sort.js +0 -16
  57. package/dist/commonjs/array/sorted-index-by.js +0 -19
  58. package/dist/commonjs/array/sorted-index-with.js +0 -15
  59. package/dist/commonjs/array/sorted-index.js +0 -12
  60. package/dist/commonjs/array/sorted-last-index-by.js +0 -19
  61. package/dist/commonjs/array/sorted-last-index.js +0 -12
  62. package/dist/commonjs/array/splice.js +0 -13
  63. package/dist/commonjs/array/split-at.js +0 -13
  64. package/dist/commonjs/array/split-when.js +0 -17
  65. package/dist/commonjs/array/sum-by.js +0 -24
  66. package/dist/commonjs/array/swap-indices.js +0 -34
  67. package/dist/commonjs/array/take-first-by.js +0 -24
  68. package/dist/commonjs/array/take-while.js +0 -18
  69. package/dist/commonjs/array/take.js +0 -25
  70. package/dist/commonjs/array/uniq-by.js +0 -23
  71. package/dist/commonjs/array/uniq-with.js +0 -23
  72. package/dist/commonjs/array/uniq.js +0 -25
  73. package/dist/commonjs/array/zip-obj.js +0 -16
  74. package/dist/commonjs/array/zip-with.js +0 -23
  75. package/dist/commonjs/array/zip.js +0 -19
  76. package/dist/commonjs/function/conditional.js +0 -34
  77. package/dist/commonjs/function/create-pipe.js +0 -8
  78. package/dist/commonjs/function/debounce.js +0 -88
  79. package/dist/commonjs/function/identity.js +0 -7
  80. package/dist/commonjs/function/index.js +0 -26
  81. package/dist/commonjs/function/noop.js +0 -7
  82. package/dist/commonjs/function/once.js +0 -15
  83. package/dist/commonjs/function/pipe.js +0 -100
  84. package/dist/commonjs/function/purry.js +0 -19
  85. package/dist/commonjs/function/sleep.js +0 -9
  86. package/dist/commonjs/function/times.js +0 -18
  87. package/dist/commonjs/guard/has-sub-object.js +0 -20
  88. package/dist/commonjs/guard/index.js +0 -35
  89. package/dist/commonjs/guard/is-array.js +0 -7
  90. package/dist/commonjs/guard/is-boolean.js +0 -7
  91. package/dist/commonjs/guard/is-date.js +0 -7
  92. package/dist/commonjs/guard/is-deep-equal.js +0 -55
  93. package/dist/commonjs/guard/is-defined.js +0 -13
  94. package/dist/commonjs/guard/is-empty.js +0 -19
  95. package/dist/commonjs/guard/is-error.js +0 -7
  96. package/dist/commonjs/guard/is-function.js +0 -7
  97. package/dist/commonjs/guard/is-included-in.js +0 -11
  98. package/dist/commonjs/guard/is-nil.js +0 -7
  99. package/dist/commonjs/guard/is-non-null.js +0 -7
  100. package/dist/commonjs/guard/is-not.js +0 -7
  101. package/dist/commonjs/guard/is-number.js +0 -7
  102. package/dist/commonjs/guard/is-object.js +0 -11
  103. package/dist/commonjs/guard/is-promise.js +0 -7
  104. package/dist/commonjs/guard/is-string.js +0 -7
  105. package/dist/commonjs/guard/is-symbol.js +0 -7
  106. package/dist/commonjs/guard/is-truthy.js +0 -7
  107. package/dist/commonjs/index.js +0 -26
  108. package/dist/commonjs/number/add.js +0 -11
  109. package/dist/commonjs/number/ceil.js +0 -9
  110. package/dist/commonjs/number/clamp.js +0 -17
  111. package/dist/commonjs/number/divide.js +0 -11
  112. package/dist/commonjs/number/floor.js +0 -9
  113. package/dist/commonjs/number/index.js +0 -24
  114. package/dist/commonjs/number/multiply.js +0 -11
  115. package/dist/commonjs/number/round.js +0 -9
  116. package/dist/commonjs/number/subtract.js +0 -11
  117. package/dist/commonjs/object/add-prop.js +0 -14
  118. package/dist/commonjs/object/clone.js +0 -49
  119. package/dist/commonjs/object/for-each-obj.js +0 -30
  120. package/dist/commonjs/object/from-keys.js +0 -15
  121. package/dist/commonjs/object/from-pairs.js +0 -18
  122. package/dist/commonjs/object/index.js +0 -39
  123. package/dist/commonjs/object/invert.js +0 -17
  124. package/dist/commonjs/object/keys.js +0 -11
  125. package/dist/commonjs/object/map-keys.js +0 -16
  126. package/dist/commonjs/object/map-values.js +0 -16
  127. package/dist/commonjs/object/merge-deep.js +0 -31
  128. package/dist/commonjs/object/merge.js +0 -11
  129. package/dist/commonjs/object/omit-by.js +0 -22
  130. package/dist/commonjs/object/omit.js +0 -25
  131. package/dist/commonjs/object/path-or.js +0 -18
  132. package/dist/commonjs/object/pick-by.js +0 -22
  133. package/dist/commonjs/object/pick.js +0 -17
  134. package/dist/commonjs/object/prop.js +0 -7
  135. package/dist/commonjs/object/set-path.js +0 -25
  136. package/dist/commonjs/object/set.js +0 -14
  137. package/dist/commonjs/object/swap-props.js +0 -16
  138. package/dist/commonjs/object/to-pairs.js +0 -11
  139. package/dist/commonjs/object/values.js +0 -7
  140. package/dist/commonjs/string/cases-types.js +0 -2
  141. package/dist/commonjs/string/cases.js +0 -107
  142. package/dist/commonjs/string/human-readable-file-size.js +0 -16
  143. package/dist/commonjs/string/index.js +0 -21
  144. package/dist/commonjs/string/random-string.js +0 -16
  145. package/dist/commonjs/string/slugify.js +0 -13
  146. package/dist/commonjs/string/string-to-path.js +0 -18
  147. package/dist/commonjs/type/index.js +0 -17
  148. package/dist/commonjs/type/type.js +0 -13
  149. package/dist/commonjs/utils/binary-search-cutoff-index.js +0 -19
  150. package/dist/commonjs/utils/heap.js +0 -43
  151. package/dist/commonjs/utils/narrow.js +0 -2
  152. package/dist/commonjs/utils/paths.js +0 -2
  153. package/dist/commonjs/utils/purry-on.js +0 -10
  154. package/dist/commonjs/utils/purry-order-rules.js +0 -66
  155. package/dist/commonjs/utils/quick-select.js +0 -31
  156. package/dist/commonjs/utils/reduce-lazy.js +0 -21
  157. package/dist/commonjs/utils/swap-in-place.js +0 -7
  158. package/dist/commonjs/utils/to-lazy-indexed.js +0 -7
  159. package/dist/commonjs/utils/to-single.js +0 -7
  160. package/dist/commonjs/utils/types.js +0 -2
  161. package/dist/commonjs/utils/with-precision.js +0 -23
  162. package/dist/es/aria/index.js +0 -1
  163. package/dist/es/aria/key-codes.js +0 -22
  164. package/dist/es/array/all-pass.js +0 -7
  165. package/dist/es/array/any-pass.js +0 -7
  166. package/dist/es/array/chunk.js +0 -13
  167. package/dist/es/array/concat.js +0 -7
  168. package/dist/es/array/difference-with.js +0 -17
  169. package/dist/es/array/drop-first-by.js +0 -22
  170. package/dist/es/array/drop-last-while.js +0 -12
  171. package/dist/es/array/drop-last.js +0 -11
  172. package/dist/es/array/drop-while.js +0 -12
  173. package/dist/es/array/drop.js +0 -21
  174. package/dist/es/array/filter.js +0 -24
  175. package/dist/es/array/find-index.js +0 -29
  176. package/dist/es/array/find-last-index.js +0 -20
  177. package/dist/es/array/find-last.js +0 -20
  178. package/dist/es/array/find.js +0 -22
  179. package/dist/es/array/first-by.js +0 -18
  180. package/dist/es/array/first.js +0 -16
  181. package/dist/es/array/flat-map-to-obj.js +0 -22
  182. package/dist/es/array/flat-map.js +0 -19
  183. package/dist/es/array/flatten-deep.js +0 -34
  184. package/dist/es/array/flatten.js +0 -16
  185. package/dist/es/array/for-each.js +0 -32
  186. package/dist/es/array/group-by.js +0 -29
  187. package/dist/es/array/has-at-least.js +0 -7
  188. package/dist/es/array/index-by.js +0 -33
  189. package/dist/es/array/index.js +0 -65
  190. package/dist/es/array/intersection-with.js +0 -17
  191. package/dist/es/array/join.js +0 -7
  192. package/dist/es/array/last.js +0 -7
  193. package/dist/es/array/length.js +0 -7
  194. package/dist/es/array/map-to-obj.js +0 -20
  195. package/dist/es/array/map.js +0 -27
  196. package/dist/es/array/max-by.js +0 -24
  197. package/dist/es/array/mean-by.js +0 -22
  198. package/dist/es/array/merge-all.js +0 -7
  199. package/dist/es/array/min-by.js +0 -24
  200. package/dist/es/array/nth-by.js +0 -8
  201. package/dist/es/array/only.js +0 -7
  202. package/dist/es/array/partition.js +0 -20
  203. package/dist/es/array/range.js +0 -11
  204. package/dist/es/array/rank-by.js +0 -13
  205. package/dist/es/array/reduce.js +0 -15
  206. package/dist/es/array/reject.js +0 -24
  207. package/dist/es/array/reverse.js +0 -7
  208. package/dist/es/array/sample.js +0 -30
  209. package/dist/es/array/shuffle.js +0 -14
  210. package/dist/es/array/sort-by.js +0 -10
  211. package/dist/es/array/sort.js +0 -12
  212. package/dist/es/array/sorted-index-by.js +0 -15
  213. package/dist/es/array/sorted-index-with.js +0 -11
  214. package/dist/es/array/sorted-index.js +0 -8
  215. package/dist/es/array/sorted-last-index-by.js +0 -15
  216. package/dist/es/array/sorted-last-index.js +0 -8
  217. package/dist/es/array/splice.js +0 -9
  218. package/dist/es/array/split-at.js +0 -9
  219. package/dist/es/array/split-when.js +0 -13
  220. package/dist/es/array/sum-by.js +0 -20
  221. package/dist/es/array/swap-indices.js +0 -30
  222. package/dist/es/array/take-first-by.js +0 -20
  223. package/dist/es/array/take-while.js +0 -14
  224. package/dist/es/array/take.js +0 -21
  225. package/dist/es/array/uniq-by.js +0 -19
  226. package/dist/es/array/uniq-with.js +0 -19
  227. package/dist/es/array/uniq.js +0 -21
  228. package/dist/es/array/zip-obj.js +0 -12
  229. package/dist/es/array/zip-with.js +0 -19
  230. package/dist/es/array/zip.js +0 -15
  231. package/dist/es/function/conditional.js +0 -30
  232. package/dist/es/function/create-pipe.js +0 -4
  233. package/dist/es/function/debounce.js +0 -84
  234. package/dist/es/function/identity.js +0 -3
  235. package/dist/es/function/index.js +0 -10
  236. package/dist/es/function/noop.js +0 -3
  237. package/dist/es/function/once.js +0 -11
  238. package/dist/es/function/pipe.js +0 -96
  239. package/dist/es/function/purry.js +0 -15
  240. package/dist/es/function/sleep.js +0 -5
  241. package/dist/es/function/times.js +0 -14
  242. package/dist/es/guard/has-sub-object.js +0 -16
  243. package/dist/es/guard/index.js +0 -19
  244. package/dist/es/guard/is-array.js +0 -3
  245. package/dist/es/guard/is-boolean.js +0 -3
  246. package/dist/es/guard/is-date.js +0 -3
  247. package/dist/es/guard/is-deep-equal.js +0 -51
  248. package/dist/es/guard/is-defined.js +0 -9
  249. package/dist/es/guard/is-empty.js +0 -15
  250. package/dist/es/guard/is-error.js +0 -3
  251. package/dist/es/guard/is-function.js +0 -3
  252. package/dist/es/guard/is-included-in.js +0 -7
  253. package/dist/es/guard/is-nil.js +0 -3
  254. package/dist/es/guard/is-non-null.js +0 -3
  255. package/dist/es/guard/is-not.js +0 -3
  256. package/dist/es/guard/is-number.js +0 -3
  257. package/dist/es/guard/is-object.js +0 -7
  258. package/dist/es/guard/is-promise.js +0 -3
  259. package/dist/es/guard/is-string.js +0 -3
  260. package/dist/es/guard/is-symbol.js +0 -3
  261. package/dist/es/guard/is-truthy.js +0 -3
  262. package/dist/es/index.js +0 -9
  263. package/dist/es/number/add.js +0 -7
  264. package/dist/es/number/ceil.js +0 -5
  265. package/dist/es/number/clamp.js +0 -13
  266. package/dist/es/number/divide.js +0 -7
  267. package/dist/es/number/floor.js +0 -5
  268. package/dist/es/number/index.js +0 -8
  269. package/dist/es/number/multiply.js +0 -7
  270. package/dist/es/number/round.js +0 -5
  271. package/dist/es/number/subtract.js +0 -7
  272. package/dist/es/object/add-prop.js +0 -10
  273. package/dist/es/object/clone.js +0 -45
  274. package/dist/es/object/for-each-obj.js +0 -26
  275. package/dist/es/object/from-keys.js +0 -11
  276. package/dist/es/object/from-pairs.js +0 -14
  277. package/dist/es/object/index.js +0 -23
  278. package/dist/es/object/invert.js +0 -13
  279. package/dist/es/object/keys.js +0 -7
  280. package/dist/es/object/map-keys.js +0 -12
  281. package/dist/es/object/map-values.js +0 -12
  282. package/dist/es/object/merge-deep.js +0 -27
  283. package/dist/es/object/merge.js +0 -7
  284. package/dist/es/object/omit-by.js +0 -18
  285. package/dist/es/object/omit.js +0 -21
  286. package/dist/es/object/path-or.js +0 -14
  287. package/dist/es/object/pick-by.js +0 -18
  288. package/dist/es/object/pick.js +0 -13
  289. package/dist/es/object/prop.js +0 -3
  290. package/dist/es/object/set-path.js +0 -20
  291. package/dist/es/object/set.js +0 -10
  292. package/dist/es/object/swap-props.js +0 -12
  293. package/dist/es/object/to-pairs.js +0 -7
  294. package/dist/es/object/values.js +0 -3
  295. package/dist/es/string/cases-types.js +0 -1
  296. package/dist/es/string/cases.js +0 -93
  297. package/dist/es/string/human-readable-file-size.js +0 -12
  298. package/dist/es/string/index.js +0 -5
  299. package/dist/es/string/random-string.js +0 -12
  300. package/dist/es/string/slugify.js +0 -9
  301. package/dist/es/string/string-to-path.js +0 -14
  302. package/dist/es/type/index.js +0 -1
  303. package/dist/es/type/type.js +0 -9
  304. package/dist/es/utils/binary-search-cutoff-index.js +0 -15
  305. package/dist/es/utils/heap.js +0 -38
  306. package/dist/es/utils/narrow.js +0 -1
  307. package/dist/es/utils/paths.js +0 -1
  308. package/dist/es/utils/purry-on.js +0 -6
  309. package/dist/es/utils/purry-order-rules.js +0 -61
  310. package/dist/es/utils/quick-select.js +0 -27
  311. package/dist/es/utils/reduce-lazy.js +0 -17
  312. package/dist/es/utils/swap-in-place.js +0 -3
  313. package/dist/es/utils/to-lazy-indexed.js +0 -3
  314. package/dist/es/utils/to-single.js +0 -3
  315. package/dist/es/utils/types.js +0 -1
  316. package/dist/es/utils/with-precision.js +0 -19
  317. package/dist/types/aria/index.d.ts +0 -2
  318. package/dist/types/aria/index.d.ts.map +0 -1
  319. package/dist/types/aria/key-codes.d.ts +0 -26
  320. package/dist/types/aria/key-codes.d.ts.map +0 -1
  321. package/dist/types/array/all-pass.d.ts +0 -32
  322. package/dist/types/array/all-pass.d.ts.map +0 -1
  323. package/dist/types/array/any-pass.d.ts +0 -32
  324. package/dist/types/array/any-pass.d.ts.map +0 -1
  325. package/dist/types/array/chunk.d.ts +0 -29
  326. package/dist/types/array/chunk.d.ts.map +0 -1
  327. package/dist/types/array/concat.d.ts +0 -24
  328. package/dist/types/array/concat.d.ts.map +0 -1
  329. package/dist/types/array/difference-with.d.ts +0 -48
  330. package/dist/types/array/difference-with.d.ts.map +0 -1
  331. package/dist/types/array/drop-first-by.d.ts +0 -38
  332. package/dist/types/array/drop-first-by.d.ts.map +0 -1
  333. package/dist/types/array/drop-last-while.d.ts +0 -30
  334. package/dist/types/array/drop-last-while.d.ts.map +0 -1
  335. package/dist/types/array/drop-last.d.ts +0 -26
  336. package/dist/types/array/drop-last.d.ts.map +0 -1
  337. package/dist/types/array/drop-while.d.ts +0 -33
  338. package/dist/types/array/drop-while.d.ts.map +0 -1
  339. package/dist/types/array/drop.d.ts +0 -32
  340. package/dist/types/array/drop.d.ts.map +0 -1
  341. package/dist/types/array/filter.d.ts +0 -63
  342. package/dist/types/array/filter.d.ts.map +0 -1
  343. package/dist/types/array/find-index.d.ts +0 -54
  344. package/dist/types/array/find-index.d.ts.map +0 -1
  345. package/dist/types/array/find-last-index.d.ts +0 -45
  346. package/dist/types/array/find-last-index.d.ts.map +0 -1
  347. package/dist/types/array/find-last.d.ts +0 -45
  348. package/dist/types/array/find-last.d.ts.map +0 -1
  349. package/dist/types/array/find.d.ts +0 -52
  350. package/dist/types/array/find.d.ts.map +0 -1
  351. package/dist/types/array/first-by.d.ts +0 -56
  352. package/dist/types/array/first-by.d.ts.map +0 -1
  353. package/dist/types/array/first.d.ts +0 -32
  354. package/dist/types/array/first.d.ts.map +0 -1
  355. package/dist/types/array/flat-map-to-obj.d.ts +0 -50
  356. package/dist/types/array/flat-map-to-obj.d.ts.map +0 -1
  357. package/dist/types/array/flat-map.d.ts +0 -32
  358. package/dist/types/array/flat-map.d.ts.map +0 -1
  359. package/dist/types/array/flatten-deep.d.ts +0 -37
  360. package/dist/types/array/flatten-deep.d.ts.map +0 -1
  361. package/dist/types/array/flatten.d.ts +0 -39
  362. package/dist/types/array/flatten.d.ts.map +0 -1
  363. package/dist/types/array/for-each.d.ts +0 -57
  364. package/dist/types/array/for-each.d.ts.map +0 -1
  365. package/dist/types/array/group-by.d.ts +0 -37
  366. package/dist/types/array/group-by.d.ts.map +0 -1
  367. package/dist/types/array/has-at-least.d.ts +0 -46
  368. package/dist/types/array/has-at-least.d.ts.map +0 -1
  369. package/dist/types/array/index-by.d.ts +0 -52
  370. package/dist/types/array/index-by.d.ts.map +0 -1
  371. package/dist/types/array/index.d.ts +0 -66
  372. package/dist/types/array/index.d.ts.map +0 -1
  373. package/dist/types/array/intersection-with.d.ts +0 -54
  374. package/dist/types/array/intersection-with.d.ts.map +0 -1
  375. package/dist/types/array/join.d.ts +0 -45
  376. package/dist/types/array/join.d.ts.map +0 -1
  377. package/dist/types/array/last.d.ts +0 -34
  378. package/dist/types/array/last.d.ts.map +0 -1
  379. package/dist/types/array/length.d.ts +0 -15
  380. package/dist/types/array/length.d.ts.map +0 -1
  381. package/dist/types/array/map-to-obj.d.ts +0 -42
  382. package/dist/types/array/map-to-obj.d.ts.map +0 -1
  383. package/dist/types/array/map.d.ts +0 -62
  384. package/dist/types/array/map.d.ts.map +0 -1
  385. package/dist/types/array/max-by.d.ts +0 -39
  386. package/dist/types/array/max-by.d.ts.map +0 -1
  387. package/dist/types/array/mean-by.d.ts +0 -39
  388. package/dist/types/array/mean-by.d.ts.map +0 -1
  389. package/dist/types/array/merge-all.d.ts +0 -16
  390. package/dist/types/array/merge-all.d.ts.map +0 -1
  391. package/dist/types/array/min-by.d.ts +0 -39
  392. package/dist/types/array/min-by.d.ts.map +0 -1
  393. package/dist/types/array/nth-by.d.ts +0 -44
  394. package/dist/types/array/nth-by.d.ts.map +0 -1
  395. package/dist/types/array/only.d.ts +0 -37
  396. package/dist/types/array/only.d.ts.map +0 -1
  397. package/dist/types/array/partition.d.ts +0 -60
  398. package/dist/types/array/partition.d.ts.map +0 -1
  399. package/dist/types/array/range.d.ts +0 -22
  400. package/dist/types/array/range.d.ts.map +0 -1
  401. package/dist/types/array/rank-by.d.ts +0 -40
  402. package/dist/types/array/rank-by.d.ts.map +0 -1
  403. package/dist/types/array/reduce.d.ts +0 -37
  404. package/dist/types/array/reduce.d.ts.map +0 -1
  405. package/dist/types/array/reject.d.ts +0 -42
  406. package/dist/types/array/reject.d.ts.map +0 -1
  407. package/dist/types/array/reverse.d.ts +0 -27
  408. package/dist/types/array/reverse.d.ts.map +0 -1
  409. package/dist/types/array/sample.d.ts +0 -54
  410. package/dist/types/array/sample.d.ts.map +0 -1
  411. package/dist/types/array/shuffle.d.ts +0 -22
  412. package/dist/types/array/shuffle.d.ts.map +0 -1
  413. package/dist/types/array/sort-by.d.ts +0 -98
  414. package/dist/types/array/sort-by.d.ts.map +0 -1
  415. package/dist/types/array/sort.d.ts +0 -52
  416. package/dist/types/array/sort.d.ts.map +0 -1
  417. package/dist/types/array/sorted-index-by.d.ts +0 -62
  418. package/dist/types/array/sorted-index-by.d.ts.map +0 -1
  419. package/dist/types/array/sorted-index-with.d.ts +0 -64
  420. package/dist/types/array/sorted-index-with.d.ts.map +0 -1
  421. package/dist/types/array/sorted-index.d.ts +0 -46
  422. package/dist/types/array/sorted-index.d.ts.map +0 -1
  423. package/dist/types/array/sorted-last-index-by.d.ts +0 -62
  424. package/dist/types/array/sorted-last-index-by.d.ts.map +0 -1
  425. package/dist/types/array/sorted-last-index.d.ts +0 -46
  426. package/dist/types/array/sorted-last-index.d.ts.map +0 -1
  427. package/dist/types/array/splice.d.ts +0 -32
  428. package/dist/types/array/splice.d.ts.map +0 -1
  429. package/dist/types/array/split-at.d.ts +0 -28
  430. package/dist/types/array/split-at.d.ts.map +0 -1
  431. package/dist/types/array/split-when.d.ts +0 -24
  432. package/dist/types/array/split-when.d.ts.map +0 -1
  433. package/dist/types/array/sum-by.d.ts +0 -39
  434. package/dist/types/array/sum-by.d.ts.map +0 -1
  435. package/dist/types/array/swap-indices.d.ts +0 -68
  436. package/dist/types/array/swap-indices.d.ts.map +0 -1
  437. package/dist/types/array/take-first-by.d.ts +0 -42
  438. package/dist/types/array/take-first-by.d.ts.map +0 -1
  439. package/dist/types/array/take-while.d.ts +0 -24
  440. package/dist/types/array/take-while.d.ts.map +0 -1
  441. package/dist/types/array/take.d.ts +0 -30
  442. package/dist/types/array/take.d.ts.map +0 -1
  443. package/dist/types/array/uniq-by.d.ts +0 -22
  444. package/dist/types/array/uniq-by.d.ts.map +0 -1
  445. package/dist/types/array/uniq-with.d.ts +0 -44
  446. package/dist/types/array/uniq-with.d.ts.map +0 -1
  447. package/dist/types/array/uniq.d.ts +0 -35
  448. package/dist/types/array/uniq.d.ts.map +0 -1
  449. package/dist/types/array/zip-obj.d.ts +0 -26
  450. package/dist/types/array/zip-obj.d.ts.map +0 -1
  451. package/dist/types/array/zip-with.d.ts +0 -42
  452. package/dist/types/array/zip-with.d.ts.map +0 -1
  453. package/dist/types/array/zip.d.ts +0 -52
  454. package/dist/types/array/zip.d.ts.map +0 -1
  455. package/dist/types/function/conditional.d.ts +0 -107
  456. package/dist/types/function/conditional.d.ts.map +0 -1
  457. package/dist/types/function/create-pipe.d.ts +0 -19
  458. package/dist/types/function/create-pipe.d.ts.map +0 -1
  459. package/dist/types/function/debounce.d.ts +0 -92
  460. package/dist/types/function/debounce.d.ts.map +0 -1
  461. package/dist/types/function/identity.d.ts +0 -10
  462. package/dist/types/function/identity.d.ts.map +0 -1
  463. package/dist/types/function/index.d.ts +0 -11
  464. package/dist/types/function/index.d.ts.map +0 -1
  465. package/dist/types/function/noop.d.ts +0 -10
  466. package/dist/types/function/noop.d.ts.map +0 -1
  467. package/dist/types/function/once.d.ts +0 -13
  468. package/dist/types/function/once.d.ts.map +0 -1
  469. package/dist/types/function/pipe.d.ts +0 -53
  470. package/dist/types/function/pipe.d.ts.map +0 -1
  471. package/dist/types/function/purry.d.ts +0 -48
  472. package/dist/types/function/purry.d.ts.map +0 -1
  473. package/dist/types/function/sleep.d.ts +0 -12
  474. package/dist/types/function/sleep.d.ts.map +0 -1
  475. package/dist/types/function/times.d.ts +0 -28
  476. package/dist/types/function/times.d.ts.map +0 -1
  477. package/dist/types/guard/has-sub-object.d.ts +0 -35
  478. package/dist/types/guard/has-sub-object.d.ts.map +0 -1
  479. package/dist/types/guard/index.d.ts +0 -20
  480. package/dist/types/guard/index.d.ts.map +0 -1
  481. package/dist/types/guard/is-array.d.ts +0 -15
  482. package/dist/types/guard/is-array.d.ts.map +0 -1
  483. package/dist/types/guard/is-boolean.d.ts +0 -15
  484. package/dist/types/guard/is-boolean.d.ts.map +0 -1
  485. package/dist/types/guard/is-date.d.ts +0 -13
  486. package/dist/types/guard/is-date.d.ts.map +0 -1
  487. package/dist/types/guard/is-deep-equal.d.ts +0 -50
  488. package/dist/types/guard/is-deep-equal.d.ts.map +0 -1
  489. package/dist/types/guard/is-defined.d.ts +0 -22
  490. package/dist/types/guard/is-defined.d.ts.map +0 -1
  491. package/dist/types/guard/is-empty.d.ts +0 -30
  492. package/dist/types/guard/is-empty.d.ts.map +0 -1
  493. package/dist/types/guard/is-error.d.ts +0 -15
  494. package/dist/types/guard/is-error.d.ts.map +0 -1
  495. package/dist/types/guard/is-function.d.ts +0 -15
  496. package/dist/types/guard/is-function.d.ts.map +0 -1
  497. package/dist/types/guard/is-included-in.d.ts +0 -54
  498. package/dist/types/guard/is-included-in.d.ts.map +0 -1
  499. package/dist/types/guard/is-nil.d.ts +0 -14
  500. package/dist/types/guard/is-nil.d.ts.map +0 -1
  501. package/dist/types/guard/is-non-null.d.ts +0 -15
  502. package/dist/types/guard/is-non-null.d.ts.map +0 -1
  503. package/dist/types/guard/is-not.d.ts +0 -15
  504. package/dist/types/guard/is-not.d.ts.map +0 -1
  505. package/dist/types/guard/is-number.d.ts +0 -14
  506. package/dist/types/guard/is-number.d.ts.map +0 -1
  507. package/dist/types/guard/is-object.d.ts +0 -28
  508. package/dist/types/guard/is-object.d.ts.map +0 -1
  509. package/dist/types/guard/is-promise.d.ts +0 -14
  510. package/dist/types/guard/is-promise.d.ts.map +0 -1
  511. package/dist/types/guard/is-string.d.ts +0 -14
  512. package/dist/types/guard/is-string.d.ts.map +0 -1
  513. package/dist/types/guard/is-symbol.d.ts +0 -14
  514. package/dist/types/guard/is-symbol.d.ts.map +0 -1
  515. package/dist/types/guard/is-truthy.d.ts +0 -17
  516. package/dist/types/guard/is-truthy.d.ts.map +0 -1
  517. package/dist/types/index.d.ts +0 -10
  518. package/dist/types/index.d.ts.map +0 -1
  519. package/dist/types/number/add.d.ts +0 -28
  520. package/dist/types/number/add.d.ts.map +0 -1
  521. package/dist/types/number/ceil.d.ts +0 -36
  522. package/dist/types/number/ceil.d.ts.map +0 -1
  523. package/dist/types/number/clamp.d.ts +0 -37
  524. package/dist/types/number/clamp.d.ts.map +0 -1
  525. package/dist/types/number/divide.d.ts +0 -26
  526. package/dist/types/number/divide.d.ts.map +0 -1
  527. package/dist/types/number/floor.d.ts +0 -36
  528. package/dist/types/number/floor.d.ts.map +0 -1
  529. package/dist/types/number/index.d.ts +0 -9
  530. package/dist/types/number/index.d.ts.map +0 -1
  531. package/dist/types/number/multiply.d.ts +0 -28
  532. package/dist/types/number/multiply.d.ts.map +0 -1
  533. package/dist/types/number/round.d.ts +0 -36
  534. package/dist/types/number/round.d.ts.map +0 -1
  535. package/dist/types/number/subtract.d.ts +0 -30
  536. package/dist/types/number/subtract.d.ts.map +0 -1
  537. package/dist/types/object/add-prop.d.ts +0 -30
  538. package/dist/types/object/add-prop.d.ts.map +0 -1
  539. package/dist/types/object/clone.d.ts +0 -10
  540. package/dist/types/object/clone.d.ts.map +0 -1
  541. package/dist/types/object/for-each-obj.d.ts +0 -44
  542. package/dist/types/object/for-each-obj.d.ts.map +0 -1
  543. package/dist/types/object/from-keys.d.ts +0 -42
  544. package/dist/types/object/from-keys.d.ts.map +0 -1
  545. package/dist/types/object/from-pairs.d.ts +0 -47
  546. package/dist/types/object/from-pairs.d.ts.map +0 -1
  547. package/dist/types/object/index.d.ts +0 -24
  548. package/dist/types/object/index.d.ts.map +0 -1
  549. package/dist/types/object/invert.d.ts +0 -30
  550. package/dist/types/object/invert.d.ts.map +0 -1
  551. package/dist/types/object/keys.d.ts +0 -39
  552. package/dist/types/object/keys.d.ts.map +0 -1
  553. package/dist/types/object/map-keys.d.ts +0 -24
  554. package/dist/types/object/map-keys.d.ts.map +0 -1
  555. package/dist/types/object/map-values.d.ts +0 -25
  556. package/dist/types/object/map-values.d.ts.map +0 -1
  557. package/dist/types/object/merge-deep.d.ts +0 -32
  558. package/dist/types/object/merge-deep.d.ts.map +0 -1
  559. package/dist/types/object/merge.d.ts +0 -52
  560. package/dist/types/object/merge.d.ts.map +0 -1
  561. package/dist/types/object/omit-by.d.ts +0 -22
  562. package/dist/types/object/omit-by.d.ts.map +0 -1
  563. package/dist/types/object/omit.d.ts +0 -24
  564. package/dist/types/object/omit.d.ts.map +0 -1
  565. package/dist/types/object/path-or.d.ts +0 -78
  566. package/dist/types/object/path-or.d.ts.map +0 -1
  567. package/dist/types/object/pick-by.d.ts +0 -24
  568. package/dist/types/object/pick-by.d.ts.map +0 -1
  569. package/dist/types/object/pick.d.ts +0 -22
  570. package/dist/types/object/pick.d.ts.map +0 -1
  571. package/dist/types/object/prop.d.ts +0 -11
  572. package/dist/types/object/prop.d.ts.map +0 -1
  573. package/dist/types/object/set-path.d.ts +0 -31
  574. package/dist/types/object/set-path.d.ts.map +0 -1
  575. package/dist/types/object/set.d.ts +0 -26
  576. package/dist/types/object/set.d.ts.map +0 -1
  577. package/dist/types/object/swap-props.d.ts +0 -44
  578. package/dist/types/object/swap-props.d.ts.map +0 -1
  579. package/dist/types/object/to-pairs.d.ts +0 -33
  580. package/dist/types/object/to-pairs.d.ts.map +0 -1
  581. package/dist/types/object/values.d.ts +0 -21
  582. package/dist/types/object/values.d.ts.map +0 -1
  583. package/dist/types/string/cases-types.d.ts +0 -36
  584. package/dist/types/string/cases-types.d.ts.map +0 -1
  585. package/dist/types/string/cases.d.ts +0 -22
  586. package/dist/types/string/cases.d.ts.map +0 -1
  587. package/dist/types/string/human-readable-file-size.d.ts +0 -13
  588. package/dist/types/string/human-readable-file-size.d.ts.map +0 -1
  589. package/dist/types/string/index.d.ts +0 -6
  590. package/dist/types/string/index.d.ts.map +0 -1
  591. package/dist/types/string/random-string.d.ts +0 -15
  592. package/dist/types/string/random-string.d.ts.map +0 -1
  593. package/dist/types/string/slugify.d.ts +0 -12
  594. package/dist/types/string/slugify.d.ts.map +0 -1
  595. package/dist/types/string/string-to-path.d.ts +0 -11
  596. package/dist/types/string/string-to-path.d.ts.map +0 -1
  597. package/dist/types/type/index.d.ts +0 -2
  598. package/dist/types/type/index.d.ts.map +0 -1
  599. package/dist/types/type/type.d.ts +0 -19
  600. package/dist/types/type/type.d.ts.map +0 -1
  601. package/dist/types/utils/binary-search-cutoff-index.d.ts +0 -2
  602. package/dist/types/utils/binary-search-cutoff-index.d.ts.map +0 -1
  603. package/dist/types/utils/heap.d.ts +0 -24
  604. package/dist/types/utils/heap.d.ts.map +0 -1
  605. package/dist/types/utils/narrow.d.ts +0 -52
  606. package/dist/types/utils/narrow.d.ts.map +0 -1
  607. package/dist/types/utils/paths.d.ts +0 -9
  608. package/dist/types/utils/paths.d.ts.map +0 -1
  609. package/dist/types/utils/purry-on.d.ts +0 -7
  610. package/dist/types/utils/purry-on.d.ts.map +0 -1
  611. package/dist/types/utils/purry-order-rules.d.ts +0 -52
  612. package/dist/types/utils/purry-order-rules.d.ts.map +0 -1
  613. package/dist/types/utils/quick-select.d.ts +0 -18
  614. package/dist/types/utils/quick-select.d.ts.map +0 -1
  615. package/dist/types/utils/reduce-lazy.d.ts +0 -3
  616. package/dist/types/utils/reduce-lazy.d.ts.map +0 -1
  617. package/dist/types/utils/swap-in-place.d.ts +0 -5
  618. package/dist/types/utils/swap-in-place.d.ts.map +0 -1
  619. package/dist/types/utils/to-lazy-indexed.d.ts +0 -4
  620. package/dist/types/utils/to-lazy-indexed.d.ts.map +0 -1
  621. package/dist/types/utils/to-single.d.ts +0 -6
  622. package/dist/types/utils/to-single.d.ts.map +0 -1
  623. package/dist/types/utils/types.d.ts +0 -32
  624. package/dist/types/utils/types.d.ts.map +0 -1
  625. package/dist/types/utils/with-precision.d.ts +0 -2
  626. package/dist/types/utils/with-precision.d.ts.map +0 -1
package/dist/index.cjs ADDED
@@ -0,0 +1,2375 @@
1
+ 'use strict';
2
+
3
+ const KEY_CODES = {
4
+ ALT: "Alt",
5
+ ARROW_DOWN: "ArrowDown",
6
+ ARROW_LEFT: "ArrowLeft",
7
+ ARROW_RIGHT: "ArrowRight",
8
+ ARROW_UP: "ArrowUp",
9
+ AT: "@",
10
+ BACKSPACE: "Backspace",
11
+ CTRL: "Control",
12
+ DELETE: "Delete",
13
+ END: "End",
14
+ ENTER: "Enter",
15
+ ESC: "Escape",
16
+ HOME: "Home",
17
+ KEY_F: "KEY_F",
18
+ META: "Meta",
19
+ PAGE_DOWN: "PageDown",
20
+ PAGE_UP: "PageUp",
21
+ SHIFT: "Shift",
22
+ SPACE: "Space",
23
+ TAB: "Tab"
24
+ };
25
+
26
+ function purry(fn, args, lazyFactory) {
27
+ const callArgs = Array.from(args);
28
+ const diff = fn.length - args.length;
29
+ if (diff === 0) {
30
+ return fn(...callArgs);
31
+ }
32
+ if (diff === 1) {
33
+ const ret = (data) => fn(data, ...callArgs);
34
+ const lazy = lazyFactory ?? fn.lazy;
35
+ return lazy === void 0 ? ret : Object.assign(ret, { lazy, lazyArgs: args });
36
+ }
37
+ throw new Error("Wrong number of arguments");
38
+ }
39
+
40
+ function allPass(...args) {
41
+ return purry(allPass_, args);
42
+ }
43
+ function allPass_(data, fns) {
44
+ return fns.every((fn) => fn(data));
45
+ }
46
+
47
+ function anyPass(...args) {
48
+ return purry(anyPass_, args);
49
+ }
50
+ function anyPass_(data, fns) {
51
+ return fns.some((fn) => fn(data));
52
+ }
53
+
54
+ function chunk(...args) {
55
+ return purry(chunk_, args);
56
+ }
57
+ function chunk_(array, size) {
58
+ const ret = Array.from({
59
+ length: Math.ceil(array.length / size)
60
+ });
61
+ for (let index = 0; index < ret.length; index++) {
62
+ ret[index] = array.slice(index * size, (index + 1) * size);
63
+ }
64
+ return ret;
65
+ }
66
+
67
+ function concat(...args) {
68
+ return purry(concat_, args);
69
+ }
70
+ function concat_(arr1, arr2) {
71
+ return arr1.concat(arr2);
72
+ }
73
+
74
+ function reduceLazy(array, lazy, isIndexed = false) {
75
+ const out = [];
76
+ for (let index = 0; index < array.length; index++) {
77
+ const item = array[index];
78
+ const result = isIndexed ? lazy(item, index, array) : lazy(item);
79
+ if (result.hasMany === true) {
80
+ out.push(...result.next);
81
+ } else if (result.hasNext) {
82
+ out.push(result.next);
83
+ }
84
+ if (result.done) {
85
+ break;
86
+ }
87
+ }
88
+ return out;
89
+ }
90
+
91
+ function differenceWith(...args) {
92
+ return purry(differenceWith_, args, differenceWith.lazy);
93
+ }
94
+ function differenceWith_(array, other, isEquals) {
95
+ const lazy = differenceWith.lazy(other, isEquals);
96
+ return reduceLazy(array, lazy);
97
+ }
98
+ ((differenceWith2) => {
99
+ function lazy(other, isEquals) {
100
+ return (value) => other.every((otherValue) => !isEquals(value, otherValue)) ? { done: false, hasNext: true, next: value } : { done: false, hasNext: false };
101
+ }
102
+ differenceWith2.lazy = lazy;
103
+ })(differenceWith || (differenceWith = {}));
104
+
105
+ function dropLast(...args) {
106
+ return purry(dropLast_, args);
107
+ }
108
+ function dropLast_(array, n) {
109
+ const copy = array.slice();
110
+ if (n > 0) {
111
+ copy.splice(-n);
112
+ }
113
+ return copy;
114
+ }
115
+
116
+ function drop(...args) {
117
+ return purry(drop_, args, drop.lazy);
118
+ }
119
+ function drop_(array, n) {
120
+ return reduceLazy(array, drop.lazy(n));
121
+ }
122
+ ((drop2) => {
123
+ function lazy(n) {
124
+ let left = n;
125
+ return (value) => {
126
+ if (left > 0) {
127
+ left -= 1;
128
+ return { done: false, hasNext: false };
129
+ }
130
+ return { done: false, hasNext: true, next: value };
131
+ };
132
+ }
133
+ drop2.lazy = lazy;
134
+ })(drop || (drop = {}));
135
+
136
+ function hasAtLeast(...args) {
137
+ return purry(hasAtLeastImplementation, args);
138
+ }
139
+ function hasAtLeastImplementation(data, minimum) {
140
+ return data.length >= minimum;
141
+ }
142
+
143
+ function swapInPlace(data, i, j) {
144
+ [data[i], data[j]] = [data[j], data[i]];
145
+ }
146
+
147
+ function heapify(heap, compareFn) {
148
+ for (let i = Math.floor(heap.length / 2) - 1; i >= 0; i--) {
149
+ heapSiftDown(heap, i, compareFn);
150
+ }
151
+ }
152
+ function heapMaybeInsert(heap, compareFn, item) {
153
+ if (!hasAtLeast(heap, 1)) {
154
+ return;
155
+ }
156
+ const [head] = heap;
157
+ if (compareFn(item, head) >= 0) {
158
+ return;
159
+ }
160
+ heap[0] = item;
161
+ heapSiftDown(heap, 0, compareFn);
162
+ return head;
163
+ }
164
+ function heapSiftDown(heap, index, compareFn) {
165
+ let currentIndex = index;
166
+ while (currentIndex * 2 + 1 < heap.length) {
167
+ const firstChildIndex = currentIndex * 2 + 1;
168
+ let swapIndex = compareFn(heap[currentIndex], heap[firstChildIndex]) < 0 ? firstChildIndex : currentIndex;
169
+ const secondChildIndex = firstChildIndex + 1;
170
+ if (secondChildIndex < heap.length && compareFn(heap[swapIndex], heap[secondChildIndex]) < 0) {
171
+ swapIndex = secondChildIndex;
172
+ }
173
+ if (swapIndex === currentIndex) {
174
+ return;
175
+ }
176
+ swapInPlace(heap, currentIndex, swapIndex);
177
+ currentIndex = swapIndex;
178
+ }
179
+ }
180
+
181
+ const COMPARATORS = {
182
+ asc: (x, y) => x > y,
183
+ desc: (x, y) => x < y
184
+ };
185
+ function purryOrderRules(func, inputArgs) {
186
+ const [dataOrRule, ...rules] = Array.isArray(inputArgs) ? inputArgs : Array.from(inputArgs);
187
+ if (!isOrderRule(dataOrRule)) {
188
+ const compareFn2 = orderRuleComparer(...rules);
189
+ return func(dataOrRule, compareFn2);
190
+ }
191
+ const compareFn = orderRuleComparer(dataOrRule, ...rules);
192
+ return (data) => func(data, compareFn);
193
+ }
194
+ function purryOrderRulesWithArgument(func, inputArgs) {
195
+ const [first, second, ...rest] = Array.from(inputArgs);
196
+ let arg;
197
+ let argRemoved;
198
+ if (isOrderRule(second)) {
199
+ arg = first;
200
+ argRemoved = [second, ...rest];
201
+ } else {
202
+ arg = second;
203
+ argRemoved = [first, ...rest];
204
+ }
205
+ return purryOrderRules((...args) => func(...args, arg), argRemoved);
206
+ }
207
+ function orderRuleComparer(primaryRule, secondaryRule, ...otherRules) {
208
+ const projector = typeof primaryRule === "function" ? primaryRule : primaryRule[0];
209
+ const direction = typeof primaryRule === "function" ? "asc" : primaryRule[1];
210
+ const { [direction]: comparator } = COMPARATORS;
211
+ const nextComparer = secondaryRule === void 0 ? void 0 : orderRuleComparer(secondaryRule, ...otherRules);
212
+ return (a, b) => {
213
+ const projectedA = projector(a);
214
+ const projectedB = projector(b);
215
+ if (comparator(projectedA, projectedB)) {
216
+ return 1;
217
+ }
218
+ if (comparator(projectedB, projectedA)) {
219
+ return -1;
220
+ }
221
+ return nextComparer?.(a, b) ?? 0;
222
+ };
223
+ }
224
+ function isOrderRule(x) {
225
+ if (isProjection(x)) {
226
+ return true;
227
+ }
228
+ if (typeof x !== "object" || !Array.isArray(x)) {
229
+ return false;
230
+ }
231
+ const [maybeProjection, maybeDirection, ...rest] = x;
232
+ return isProjection(maybeProjection) && maybeDirection in COMPARATORS && rest.length === 0;
233
+ }
234
+ function isProjection(x) {
235
+ return typeof x === "function" && x.length === 1;
236
+ }
237
+
238
+ function dropFirstBy(...args) {
239
+ return purryOrderRulesWithArgument(dropFirstByImplementation, args);
240
+ }
241
+ function dropFirstByImplementation(data, compareFn, n) {
242
+ if (n >= data.length) {
243
+ return [];
244
+ }
245
+ if (n <= 0) {
246
+ return data.slice();
247
+ }
248
+ const heap = data.slice(0, n);
249
+ heapify(heap, compareFn);
250
+ const out = [];
251
+ const rest = data.slice(n);
252
+ for (const item of rest) {
253
+ const previousHead = heapMaybeInsert(heap, compareFn, item);
254
+ out.push(previousHead ?? item);
255
+ }
256
+ return out;
257
+ }
258
+
259
+ function dropLastWhile(...args) {
260
+ return purry(dropLastWhile_, args);
261
+ }
262
+ function dropLastWhile_(data, predicate) {
263
+ for (let i = data.length - 1; i >= 0; i--) {
264
+ if (!predicate(data[i])) {
265
+ return data.slice(0, i + 1);
266
+ }
267
+ }
268
+ return [];
269
+ }
270
+
271
+ function dropWhile(...args) {
272
+ return purry(dropWhile_, args);
273
+ }
274
+ function dropWhile_(data, predicate) {
275
+ for (let i = 0; i < data.length; i++) {
276
+ if (!predicate(data[i])) {
277
+ return data.slice(i);
278
+ }
279
+ }
280
+ return [];
281
+ }
282
+
283
+ function toLazyIndexed(fn) {
284
+ return Object.assign(fn, { indexed: true });
285
+ }
286
+
287
+ function filter(...args) {
288
+ return purry(filter_(false), args, filter.lazy);
289
+ }
290
+ function filter_(indexed) {
291
+ return (array, fn) => {
292
+ return reduceLazy(
293
+ array,
294
+ indexed ? filter.lazyIndexed(fn) : filter.lazy(fn),
295
+ indexed
296
+ );
297
+ };
298
+ }
299
+ function lazy_$6(indexed) {
300
+ return (fn) => (value, index, array) => (indexed ? fn(value, index, array) : fn(value)) ? { done: false, hasNext: true, next: value } : { done: false, hasNext: false };
301
+ }
302
+ ((filter2) => {
303
+ function indexed(...args) {
304
+ return purry(filter_(true), args, filter2.lazyIndexed);
305
+ }
306
+ filter2.indexed = indexed;
307
+ filter2.lazy = lazy_$6(false);
308
+ filter2.lazyIndexed = toLazyIndexed(lazy_$6(true));
309
+ })(filter || (filter = {}));
310
+
311
+ function toSingle(fn) {
312
+ return Object.assign(fn, { single: true });
313
+ }
314
+
315
+ function findIndex(...args) {
316
+ return purry(findIndex_(false), args, findIndex.lazy);
317
+ }
318
+ function findIndex_(indexed) {
319
+ return (array, fn) => array.findIndex((item, index, input) => indexed ? fn(item, index, input) : fn(item));
320
+ }
321
+ function lazy_$5(indexed) {
322
+ return (fn) => {
323
+ let actualIndex = 0;
324
+ return (value, index, array) => {
325
+ if (indexed ? fn(value, index, array) : fn(value)) {
326
+ return { done: true, hasNext: true, next: actualIndex };
327
+ }
328
+ actualIndex += 1;
329
+ return { done: false, hasNext: false };
330
+ };
331
+ };
332
+ }
333
+ ((findIndex2) => {
334
+ function indexed(...args) {
335
+ return purry(findIndex_(true), args, findIndex2.lazyIndexed);
336
+ }
337
+ findIndex2.indexed = indexed;
338
+ findIndex2.lazy = toSingle(lazy_$5(false));
339
+ findIndex2.lazyIndexed = toSingle(toLazyIndexed(lazy_$5(true)));
340
+ })(findIndex || (findIndex = {}));
341
+
342
+ function findLastIndex(...args) {
343
+ return purry(findLastIndex_(false), args);
344
+ }
345
+ function findLastIndex_(indexed) {
346
+ return (array, fn) => {
347
+ for (let i = array.length - 1; i >= 0; i--) {
348
+ if (indexed ? fn(array[i], i, array) : fn(array[i])) {
349
+ return i;
350
+ }
351
+ }
352
+ return -1;
353
+ };
354
+ }
355
+ ((findLastIndex2) => {
356
+ function indexed(...args) {
357
+ return purry(findLastIndex_(true), args);
358
+ }
359
+ findLastIndex2.indexed = indexed;
360
+ })(findLastIndex || (findLastIndex = {}));
361
+
362
+ function findLast(...args) {
363
+ return purry(findLast_(false), args);
364
+ }
365
+ function findLast_(indexed) {
366
+ return (array, fn) => {
367
+ for (let i = array.length - 1; i >= 0; i--) {
368
+ if (indexed ? fn(array[i], i, array) : fn(array[i])) {
369
+ return array[i];
370
+ }
371
+ }
372
+ return void 0;
373
+ };
374
+ }
375
+ ((findLast2) => {
376
+ function indexed(...args) {
377
+ return purry(findLast_(true), args);
378
+ }
379
+ findLast2.indexed = indexed;
380
+ })(findLast || (findLast = {}));
381
+
382
+ function find(...args) {
383
+ return purry(find_(false), args, find.lazy);
384
+ }
385
+ function find_(indexed) {
386
+ return (array, fn) => array.find((item, index, input) => indexed ? fn(item, index, input) : fn(item));
387
+ }
388
+ function lazy_$4(indexed) {
389
+ return (fn) => (value, index, array) => (indexed ? fn(value, index, array) : fn(value)) ? { done: true, hasNext: true, next: value } : { done: false, hasNext: false };
390
+ }
391
+ ((find2) => {
392
+ function indexed(...args) {
393
+ return purry(find_(true), args, find2.lazyIndexed);
394
+ }
395
+ find2.indexed = indexed;
396
+ find2.lazy = toSingle(lazy_$4(false));
397
+ find2.lazyIndexed = toSingle(toLazyIndexed(lazy_$4(true)));
398
+ })(find || (find = {}));
399
+
400
+ function first(...args) {
401
+ return purry(first_, args, first.lazy);
402
+ }
403
+ function first_([item]) {
404
+ return item;
405
+ }
406
+ ((first2) => {
407
+ function lazy() {
408
+ return (value) => ({ done: true, hasNext: true, next: value });
409
+ }
410
+ first2.lazy = lazy;
411
+ ((lazy2) => {
412
+ lazy2.single = true;
413
+ })(lazy = first2.lazy || (first2.lazy = {}));
414
+ })(first || (first = {}));
415
+
416
+ function firstBy(...args) {
417
+ return purryOrderRules(firstByImplementation, args);
418
+ }
419
+ function firstByImplementation(data, compareFn) {
420
+ if (!hasAtLeast(data, 2)) {
421
+ return data[0];
422
+ }
423
+ let [currentFirst] = data;
424
+ const [, ...rest] = data;
425
+ for (const item of rest) {
426
+ if (compareFn(item, currentFirst) < 0) {
427
+ currentFirst = item;
428
+ }
429
+ }
430
+ return currentFirst;
431
+ }
432
+
433
+ function flatMapToObj(...args) {
434
+ return purry(flatMapToObj_(false), args);
435
+ }
436
+ function flatMapToObj_(indexed) {
437
+ return (array, fn) => {
438
+ const out = {};
439
+ for (const [index, element] of array.entries()) {
440
+ const items = indexed ? fn(element, index, array) : fn(element);
441
+ for (const [key, value] of items) {
442
+ out[key] = value;
443
+ }
444
+ }
445
+ return out;
446
+ };
447
+ }
448
+ ((flatMapToObj2) => {
449
+ function indexed(...args) {
450
+ return purry(flatMapToObj_(true), args);
451
+ }
452
+ flatMapToObj2.indexed = indexed;
453
+ })(flatMapToObj || (flatMapToObj = {}));
454
+
455
+ function flatten(...args) {
456
+ return purry(flatten_, args, flatten.lazy);
457
+ }
458
+ function flatten_(items) {
459
+ return reduceLazy(items, flatten.lazy());
460
+ }
461
+ ((flatten2) => {
462
+ function lazy() {
463
+ return (item) => (
464
+ // @ts-expect-error [ts2322] - We need to make LazyMany better so it accommodate the typing here...
465
+ Array.isArray(item) ? { done: false, hasMany: true, hasNext: true, next: item } : { done: false, hasNext: true, next: item }
466
+ );
467
+ }
468
+ flatten2.lazy = lazy;
469
+ })(flatten || (flatten = {}));
470
+
471
+ function flatMap(...args) {
472
+ return purry(flatMap_, args, flatMap.lazy);
473
+ }
474
+ function flatMap_(array, fn) {
475
+ return flatten(array.map((item) => fn(item)));
476
+ }
477
+ ((flatMap2) => {
478
+ function lazy(fn) {
479
+ return (value) => {
480
+ const next = fn(value);
481
+ return Array.isArray(next) ? { done: false, hasMany: true, hasNext: true, next } : { done: false, hasNext: true, next };
482
+ };
483
+ }
484
+ flatMap2.lazy = lazy;
485
+ })(flatMap || (flatMap = {}));
486
+
487
+ function flattenDeep(...args) {
488
+ return purry(flattenDeep_, args, flattenDeep.lazy);
489
+ }
490
+ function flattenDeep_(items) {
491
+ return reduceLazy(items, flattenDeep.lazy());
492
+ }
493
+ function flattenDeepValue_(value) {
494
+ if (!Array.isArray(value)) {
495
+ return value;
496
+ }
497
+ const ret = [];
498
+ for (const item of value) {
499
+ if (Array.isArray(item)) {
500
+ ret.push(...flattenDeep(item));
501
+ } else {
502
+ ret.push(item);
503
+ }
504
+ }
505
+ return ret;
506
+ }
507
+ ((flattenDeep2) => {
508
+ function lazy() {
509
+ return (value) => {
510
+ const next = flattenDeepValue_(value);
511
+ return Array.isArray(next) ? { done: false, hasMany: true, hasNext: true, next } : { done: false, hasNext: true, next };
512
+ };
513
+ }
514
+ flattenDeep2.lazy = lazy;
515
+ })(flattenDeep || (flattenDeep = {}));
516
+
517
+ function forEach(...args) {
518
+ return purry(forEach_(false), args, forEach.lazy);
519
+ }
520
+ function forEach_(indexed) {
521
+ return (array, fn) => reduceLazy(
522
+ array,
523
+ indexed ? forEach.lazyIndexed(fn) : forEach.lazy(fn),
524
+ indexed
525
+ );
526
+ }
527
+ function lazy_$3(indexed) {
528
+ return (fn) => (value, index, array) => {
529
+ if (indexed) {
530
+ fn(value, index, array);
531
+ } else {
532
+ fn(value);
533
+ }
534
+ return {
535
+ done: false,
536
+ hasNext: true,
537
+ next: value
538
+ };
539
+ };
540
+ }
541
+ ((forEach2) => {
542
+ function indexed(...args) {
543
+ return purry(forEach_(true), args, forEach2.lazyIndexed);
544
+ }
545
+ forEach2.indexed = indexed;
546
+ forEach2.lazy = lazy_$3(false);
547
+ forEach2.lazyIndexed = toLazyIndexed(lazy_$3(true));
548
+ })(forEach || (forEach = {}));
549
+
550
+ function groupBy(...args) {
551
+ return purry(groupBy_(false), args);
552
+ }
553
+ function groupBy_(indexed) {
554
+ return (array, fn) => {
555
+ const ret = {};
556
+ for (const [index, item] of array.entries()) {
557
+ const key = indexed ? fn(item, index, array) : fn(item);
558
+ if (key !== void 0) {
559
+ const actualKey = String(key);
560
+ let items = ret[actualKey];
561
+ if (items === void 0) {
562
+ items = [];
563
+ ret[actualKey] = items;
564
+ }
565
+ items.push(item);
566
+ }
567
+ }
568
+ return ret;
569
+ };
570
+ }
571
+ ((groupBy2) => {
572
+ function indexed(...args) {
573
+ return purry(groupBy_(true), args);
574
+ }
575
+ groupBy2.indexed = indexed;
576
+ groupBy2.strict = groupBy2;
577
+ })(groupBy || (groupBy = {}));
578
+
579
+ function indexBy(...args) {
580
+ return purry(indexBy_(false), args);
581
+ }
582
+ function indexBy_(indexed) {
583
+ return (array, fn) => {
584
+ const out = {};
585
+ for (const [index, item] of array.entries()) {
586
+ const value = indexed ? fn(item, index, array) : fn(item);
587
+ const key = String(value);
588
+ out[key] = item;
589
+ }
590
+ return out;
591
+ };
592
+ }
593
+ function indexByStrict(...args) {
594
+ return purry(indexByStrict_, args);
595
+ }
596
+ function indexByStrict_(array, fn) {
597
+ const out = {};
598
+ for (const item of array) {
599
+ const key = fn(item);
600
+ out[key] = item;
601
+ }
602
+ return out;
603
+ }
604
+ ((indexBy2) => {
605
+ function indexed(...args) {
606
+ return purry(indexBy_(true), args);
607
+ }
608
+ indexBy2.indexed = indexed;
609
+ indexBy2.strict = indexByStrict;
610
+ })(indexBy || (indexBy = {}));
611
+
612
+ function intersectionWith(...args) {
613
+ return purry(intersectionWith_, args, intersectionWith.lazy);
614
+ }
615
+ function intersectionWith_(array, other, comparator) {
616
+ const lazy = intersectionWith.lazy(other, comparator);
617
+ return reduceLazy(array, lazy);
618
+ }
619
+ ((intersectionWith2) => {
620
+ function lazy(other, comparator) {
621
+ return (value) => other.some((otherValue) => comparator(value, otherValue)) ? { done: false, hasNext: true, next: value } : { done: false, hasNext: false };
622
+ }
623
+ intersectionWith2.lazy = lazy;
624
+ })(intersectionWith || (intersectionWith = {}));
625
+
626
+ function join(...args) {
627
+ return purry(joinImplementation, args);
628
+ }
629
+ function joinImplementation(data, glue) {
630
+ return data.join(glue);
631
+ }
632
+
633
+ function last(...args) {
634
+ return purry(last_, args);
635
+ }
636
+ function last_(array) {
637
+ return array[array.length - 1];
638
+ }
639
+
640
+ function length(...args) {
641
+ return purry(length_, args);
642
+ }
643
+ function length_(items) {
644
+ return "length" in items ? items.length : Array.from(items).length;
645
+ }
646
+
647
+ function map(...args) {
648
+ return purry(map_(false), args, map.lazy);
649
+ }
650
+ function map_(indexed) {
651
+ return (array, fn) => {
652
+ return reduceLazy(
653
+ array,
654
+ indexed ? map.lazyIndexed(fn) : map.lazy(fn),
655
+ indexed
656
+ );
657
+ };
658
+ }
659
+ function lazy_$2(indexed) {
660
+ return (fn) => (value, index, array) => ({
661
+ done: false,
662
+ hasNext: true,
663
+ next: indexed ? fn(value, index, array) : fn(value)
664
+ });
665
+ }
666
+ ((map2) => {
667
+ function indexed(...args) {
668
+ return purry(map_(true), args, map2.lazyIndexed);
669
+ }
670
+ map2.indexed = indexed;
671
+ map2.lazy = lazy_$2(false);
672
+ map2.lazyIndexed = toLazyIndexed(lazy_$2(true));
673
+ map2.strict = map2;
674
+ })(map || (map = {}));
675
+
676
+ function mapToObj(...args) {
677
+ return purry(mapToObj_(false), args);
678
+ }
679
+ function mapToObj_(indexed) {
680
+ return (array, fn) => {
681
+ const out = {};
682
+ for (const [index, element] of array.entries()) {
683
+ const [key, value] = indexed ? fn(element, index, array) : fn(element);
684
+ out[key] = value;
685
+ }
686
+ return out;
687
+ };
688
+ }
689
+ ((mapToObj2) => {
690
+ function indexed(...args) {
691
+ return purry(mapToObj_(true), args);
692
+ }
693
+ mapToObj2.indexed = indexed;
694
+ })(mapToObj || (mapToObj = {}));
695
+
696
+ function maxBy_(indexed) {
697
+ return (array, fn) => {
698
+ let ret;
699
+ let retMax;
700
+ for (const [index, item] of array.entries()) {
701
+ const max = indexed ? fn(item, index, array) : fn(item);
702
+ if (retMax === void 0 || max > retMax) {
703
+ ret = item;
704
+ retMax = max;
705
+ }
706
+ }
707
+ return ret;
708
+ };
709
+ }
710
+ function maxBy(...args) {
711
+ return purry(maxBy_(false), args);
712
+ }
713
+ ((maxBy2) => {
714
+ function indexed(...args) {
715
+ return purry(maxBy_(true), args);
716
+ }
717
+ maxBy2.indexed = indexed;
718
+ })(maxBy || (maxBy = {}));
719
+
720
+ function meanBy_(indexed) {
721
+ return (array, fn) => {
722
+ if (array.length === 0) {
723
+ return Number.NaN;
724
+ }
725
+ let sum = 0;
726
+ for (const [index, item] of array.entries()) {
727
+ sum += indexed ? fn(item, index, array) : fn(item);
728
+ }
729
+ return sum / array.length;
730
+ };
731
+ }
732
+ function meanBy(...args) {
733
+ return purry(meanBy_(false), args);
734
+ }
735
+ ((meanBy2) => {
736
+ function indexed(...args) {
737
+ return purry(meanBy_(true), args);
738
+ }
739
+ meanBy2.indexed = indexed;
740
+ })(meanBy || (meanBy = {}));
741
+
742
+ function mergeAll(items) {
743
+ let out = {};
744
+ for (const item of items) {
745
+ out = { ...out, ...item };
746
+ }
747
+ return out;
748
+ }
749
+
750
+ function minBy_(indexed) {
751
+ return (array, fn) => {
752
+ let ret;
753
+ let retMin;
754
+ for (const [index, item] of array.entries()) {
755
+ const min = indexed ? fn(item, index, array) : fn(item);
756
+ if (retMin === void 0 || min < retMin) {
757
+ ret = item;
758
+ retMin = min;
759
+ }
760
+ }
761
+ return ret;
762
+ };
763
+ }
764
+ function minBy(...args) {
765
+ return purry(minBy_(false), args);
766
+ }
767
+ ((minBy2) => {
768
+ function indexed(...args) {
769
+ return purry(minBy_(true), args);
770
+ }
771
+ minBy2.indexed = indexed;
772
+ })(minBy || (minBy = {}));
773
+
774
+ function quickSelect(data, index, compareFn) {
775
+ return index < 0 || index >= data.length ? void 0 : quickSelectImplementation(
776
+ // We need to clone the array because quickSelect mutates it in-place.
777
+ data.slice(),
778
+ 0,
779
+ data.length - 1,
780
+ index,
781
+ compareFn
782
+ );
783
+ }
784
+ function quickSelectImplementation(data, left, right, index, compareFn) {
785
+ if (left === right) {
786
+ return data[left];
787
+ }
788
+ const pivotIndex = partition$1(data, left, right, compareFn);
789
+ return index === pivotIndex ? data[index] : quickSelectImplementation(
790
+ data,
791
+ // We continue by recursing into the partition where index would be
792
+ index < pivotIndex ? left : pivotIndex + 1,
793
+ index < pivotIndex ? pivotIndex - 1 : right,
794
+ index,
795
+ compareFn
796
+ );
797
+ }
798
+ function partition$1(data, left, right, compareFn) {
799
+ const pivot = data[right];
800
+ let i = left;
801
+ for (let j = left; j < right; j++) {
802
+ if (compareFn(data[j], pivot) < 0) {
803
+ swapInPlace(data, i, j);
804
+ i += 1;
805
+ }
806
+ }
807
+ swapInPlace(data, i, right);
808
+ return i;
809
+ }
810
+
811
+ function nthBy(...args) {
812
+ return purryOrderRulesWithArgument(nthByImplementation, args);
813
+ }
814
+ function nthByImplementation(data, compareFn, index) {
815
+ return quickSelect(
816
+ data,
817
+ // Allow negative indices gracefully
818
+ index >= 0 ? index : data.length + index,
819
+ compareFn
820
+ );
821
+ }
822
+
823
+ function only(...args) {
824
+ return purry(only_, args);
825
+ }
826
+ function only_(array) {
827
+ return array.length === 1 ? array[0] : void 0;
828
+ }
829
+
830
+ function partition(...args) {
831
+ return purry(partition_(false), args);
832
+ }
833
+ function partition_(indexed) {
834
+ return (array, fn) => {
835
+ const ret = [[], []];
836
+ for (const [index, item] of array.entries()) {
837
+ const matches = indexed ? fn(item, index, array) : fn(item);
838
+ ret[matches ? 0 : 1].push(item);
839
+ }
840
+ return ret;
841
+ };
842
+ }
843
+ ((partition2) => {
844
+ function indexed(...args) {
845
+ return purry(partition_(true), args);
846
+ }
847
+ partition2.indexed = indexed;
848
+ })(partition || (partition = {}));
849
+
850
+ function range(...args) {
851
+ return purry(range_, args);
852
+ }
853
+ function range_(start, end) {
854
+ const ret = [];
855
+ for (let i = start; i < end; i++) {
856
+ ret.push(i);
857
+ }
858
+ return ret;
859
+ }
860
+
861
+ function rankBy(...args) {
862
+ return purryOrderRulesWithArgument(rankByImplementation, args);
863
+ }
864
+ function rankByImplementation(data, compareFn, targetItem) {
865
+ let rank = 0;
866
+ for (const item of data) {
867
+ if (compareFn(targetItem, item) > 0) {
868
+ rank += 1;
869
+ }
870
+ }
871
+ return rank;
872
+ }
873
+
874
+ function reduce(...args) {
875
+ return purry(reduce_(false), args);
876
+ }
877
+ function reduce_(indexed) {
878
+ return (items, fn, initialValue) => {
879
+ return items.reduce(
880
+ (acc, item, index) => indexed ? fn(acc, item, index, items) : fn(acc, item),
881
+ initialValue
882
+ );
883
+ };
884
+ }
885
+ ((reduce2) => {
886
+ function indexed(...args) {
887
+ return purry(reduce_(true), args);
888
+ }
889
+ reduce2.indexed = indexed;
890
+ })(reduce || (reduce = {}));
891
+
892
+ function reject(...args) {
893
+ return purry(reject_(false), args, reject.lazy);
894
+ }
895
+ function reject_(indexed) {
896
+ return (array, fn) => {
897
+ return reduceLazy(
898
+ array,
899
+ indexed ? reject.lazyIndexed(fn) : reject.lazy(fn),
900
+ indexed
901
+ );
902
+ };
903
+ }
904
+ function lazy_$1(indexed) {
905
+ return (fn) => (item, index, data) => (indexed ? fn(item, index, data) : fn(item)) ? { done: false, hasNext: false } : { done: false, hasNext: true, next: item };
906
+ }
907
+ ((reject2) => {
908
+ function indexed(...args) {
909
+ return purry(reject_(true), args, reject2.lazyIndexed);
910
+ }
911
+ reject2.indexed = indexed;
912
+ reject2.lazy = lazy_$1(false);
913
+ reject2.lazyIndexed = toLazyIndexed(lazy_$1(true));
914
+ })(reject || (reject = {}));
915
+
916
+ function reverse(...args) {
917
+ return purry(reverse_, args);
918
+ }
919
+ function reverse_(array) {
920
+ return array.slice().reverse();
921
+ }
922
+
923
+ function sample(...args) {
924
+ return purry(sampleImplementation, args);
925
+ }
926
+ function sampleImplementation(data, sampleSize) {
927
+ if (sampleSize < 0) {
928
+ throw new RangeError(`sampleSize must cannot be negative: ${sampleSize}`);
929
+ }
930
+ if (!Number.isInteger(sampleSize)) {
931
+ throw new TypeError(`sampleSize must be an integer: ${sampleSize}`);
932
+ }
933
+ if (sampleSize >= data.length) {
934
+ return data.slice();
935
+ }
936
+ if (sampleSize === 0) {
937
+ return [];
938
+ }
939
+ const actualSampleSize = Math.min(sampleSize, data.length - sampleSize);
940
+ const sampleIndices = /* @__PURE__ */ new Set();
941
+ while (sampleIndices.size < actualSampleSize) {
942
+ const randomIndex = Math.floor(Math.random() * data.length);
943
+ sampleIndices.add(randomIndex);
944
+ }
945
+ if (sampleSize === actualSampleSize) {
946
+ return Array.from(sampleIndices).sort((a, b) => a - b).map((index) => data[index]);
947
+ }
948
+ return data.filter((_, index) => !sampleIndices.has(index));
949
+ }
950
+
951
+ function shuffle(...args) {
952
+ return purry(shuffle_, args);
953
+ }
954
+ function shuffle_(items) {
955
+ const result = items.slice();
956
+ for (let index = 0; index < items.length; index++) {
957
+ const rand = index + Math.floor(Math.random() * (items.length - index));
958
+ const value = result[rand];
959
+ result[rand] = result[index];
960
+ result[index] = value;
961
+ }
962
+ return result;
963
+ }
964
+
965
+ function sort(...args) {
966
+ return purry(sort_, args);
967
+ }
968
+ function sort_(items, cmp) {
969
+ const ret = items.slice();
970
+ ret.sort(cmp);
971
+ return ret;
972
+ }
973
+ ((sort2) => {
974
+ sort2.strict = sort2;
975
+ })(sort || (sort = {}));
976
+
977
+ function sortBy(...args) {
978
+ return purryOrderRules(_sortBy, args);
979
+ }
980
+ function _sortBy(data, compareFn) {
981
+ return data.slice().sort(compareFn);
982
+ }
983
+ ((sortBy2) => {
984
+ sortBy2.strict = sortBy2;
985
+ })(sortBy || (sortBy = {}));
986
+
987
+ function binarySearchCutoffIndex(array, predicate) {
988
+ let lowIndex = 0;
989
+ let highIndex = array.length;
990
+ while (lowIndex < highIndex) {
991
+ const pivotIndex = lowIndex + highIndex >>> 1;
992
+ const pivot = array[pivotIndex];
993
+ if (predicate(pivot, pivotIndex)) {
994
+ lowIndex = pivotIndex + 1;
995
+ } else {
996
+ highIndex = pivotIndex;
997
+ }
998
+ }
999
+ return highIndex;
1000
+ }
1001
+
1002
+ function sortedIndex(...args) {
1003
+ return purry(sortedIndexImplementation, args);
1004
+ }
1005
+ function sortedIndexImplementation(array, item) {
1006
+ return binarySearchCutoffIndex(array, (pivot) => pivot < item);
1007
+ }
1008
+
1009
+ function sortedIndexWith(...args) {
1010
+ return purry(binarySearchCutoffIndex, args);
1011
+ }
1012
+ ((sortedIndexWith2) => {
1013
+ function indexed(...args) {
1014
+ return purry(binarySearchCutoffIndex, args);
1015
+ }
1016
+ sortedIndexWith2.indexed = indexed;
1017
+ })(sortedIndexWith || (sortedIndexWith = {}));
1018
+
1019
+ function sortedIndexBy(...args) {
1020
+ return purry(sortedIndexByImplementation, args);
1021
+ }
1022
+ ((sortedIndexBy2) => {
1023
+ function indexed(...args) {
1024
+ return purry(sortedIndexByImplementation, args);
1025
+ }
1026
+ sortedIndexBy2.indexed = indexed;
1027
+ })(sortedIndexBy || (sortedIndexBy = {}));
1028
+ function sortedIndexByImplementation(array, item, valueFunction) {
1029
+ const value = valueFunction(item);
1030
+ return binarySearchCutoffIndex(
1031
+ array,
1032
+ (pivot, index) => valueFunction(pivot, index) < value
1033
+ );
1034
+ }
1035
+
1036
+ function sortedLastIndex(...args) {
1037
+ return purry(sortedLastIndexImplementation, args);
1038
+ }
1039
+ function sortedLastIndexImplementation(array, item) {
1040
+ return binarySearchCutoffIndex(
1041
+ array,
1042
+ // The only difference between the regular implementation and the "last"
1043
+ // variation is that we consider the pivot with equality too, so that we
1044
+ // skip all equal values in addition to the lower ones.
1045
+ (pivot) => pivot <= item
1046
+ );
1047
+ }
1048
+
1049
+ function splice(...args) {
1050
+ return purry(splice_, args);
1051
+ }
1052
+ function splice_(items, start, deleteCount, replacement) {
1053
+ const result = items.slice();
1054
+ result.splice(start, deleteCount, ...replacement);
1055
+ return result;
1056
+ }
1057
+
1058
+ function splitAt(...args) {
1059
+ return purry(splitAt_, args);
1060
+ }
1061
+ function splitAt_(array, index) {
1062
+ const copy = array.slice();
1063
+ const tail = copy.splice(index);
1064
+ return [copy, tail];
1065
+ }
1066
+
1067
+ function splitWhen(...args) {
1068
+ return purry(splitWhen_, args);
1069
+ }
1070
+ function splitWhen_(array, fn) {
1071
+ for (const [index, item] of array.entries()) {
1072
+ if (fn(item)) {
1073
+ return splitAt(array, index);
1074
+ }
1075
+ }
1076
+ return [array.slice(), []];
1077
+ }
1078
+
1079
+ function sumBy_(indexed) {
1080
+ return (array, fn) => {
1081
+ let sum = 0;
1082
+ for (const [index, item] of array.entries()) {
1083
+ const summand = indexed ? fn(item, index, array) : fn(item);
1084
+ sum += summand;
1085
+ }
1086
+ return sum;
1087
+ };
1088
+ }
1089
+ function sumBy(...args) {
1090
+ return purry(sumBy_(false), args);
1091
+ }
1092
+ ((sumBy2) => {
1093
+ function indexed(...args) {
1094
+ return purry(sumBy_(true), args);
1095
+ }
1096
+ sumBy2.indexed = indexed;
1097
+ })(sumBy || (sumBy = {}));
1098
+
1099
+ function swapIndices(...args) {
1100
+ return purry(swapIndices_, args);
1101
+ }
1102
+ function swapIndices_(item, index1, index2) {
1103
+ return typeof item === "string" ? swapString_(item, index1, index2) : swapArray_(item, index1, index2);
1104
+ }
1105
+ function swapArray_(item, index1, index2) {
1106
+ const result = item.slice();
1107
+ if (Number.isNaN(index1) || Number.isNaN(index2)) {
1108
+ return result;
1109
+ }
1110
+ const positiveIndexA = index1 < 0 ? item.length + index1 : index1;
1111
+ const positiveIndexB = index2 < 0 ? item.length + index2 : index2;
1112
+ if (positiveIndexA < 0 || positiveIndexA > item.length) {
1113
+ return result;
1114
+ }
1115
+ if (positiveIndexB < 0 || positiveIndexB > item.length) {
1116
+ return result;
1117
+ }
1118
+ result[positiveIndexA] = item[positiveIndexB];
1119
+ result[positiveIndexB] = item[positiveIndexA];
1120
+ return result;
1121
+ }
1122
+ function swapString_(item, index1, index2) {
1123
+ const result = swapArray_(item.split(""), index1, index2);
1124
+ return result.join("");
1125
+ }
1126
+
1127
+ function take(...args) {
1128
+ return purry(take_, args, take.lazy);
1129
+ }
1130
+ function take_(array, n) {
1131
+ return reduceLazy(array, take.lazy(n));
1132
+ }
1133
+ ((take2) => {
1134
+ function lazy(n) {
1135
+ if (n <= 0) {
1136
+ return () => ({ done: true, hasNext: false });
1137
+ }
1138
+ let remaining = n;
1139
+ return (value) => {
1140
+ remaining -= 1;
1141
+ return { done: remaining <= 0, hasNext: true, next: value };
1142
+ };
1143
+ }
1144
+ take2.lazy = lazy;
1145
+ })(take || (take = {}));
1146
+
1147
+ function takeFirstBy(...args) {
1148
+ return purryOrderRulesWithArgument(takeFirstByImplementation, args);
1149
+ }
1150
+ function takeFirstByImplementation(data, compareFn, n) {
1151
+ if (n <= 0) {
1152
+ return [];
1153
+ }
1154
+ if (n >= data.length) {
1155
+ return data.slice();
1156
+ }
1157
+ const heap = data.slice(0, n);
1158
+ heapify(heap, compareFn);
1159
+ const rest = data.slice(n);
1160
+ for (const item of rest) {
1161
+ heapMaybeInsert(heap, compareFn, item);
1162
+ }
1163
+ return heap;
1164
+ }
1165
+
1166
+ function takeWhile(...args) {
1167
+ return purry(takeWhile_, args);
1168
+ }
1169
+ function takeWhile_(array, fn) {
1170
+ const ret = [];
1171
+ for (const item of array) {
1172
+ if (!fn(item)) {
1173
+ break;
1174
+ }
1175
+ ret.push(item);
1176
+ }
1177
+ return ret;
1178
+ }
1179
+
1180
+ function uniq(...args) {
1181
+ return purry(uniq_, args, uniq.lazy);
1182
+ }
1183
+ function uniq_(array) {
1184
+ return reduceLazy(array, uniq.lazy());
1185
+ }
1186
+ ((uniq2) => {
1187
+ function lazy() {
1188
+ const set = /* @__PURE__ */ new Set();
1189
+ return (value) => {
1190
+ if (set.has(value)) {
1191
+ return { done: false, hasNext: false };
1192
+ }
1193
+ set.add(value);
1194
+ return { done: false, hasNext: true, next: value };
1195
+ };
1196
+ }
1197
+ uniq2.lazy = lazy;
1198
+ })(uniq || (uniq = {}));
1199
+
1200
+ function uniqBy(...args) {
1201
+ return purry(uniqBy_, args, lazyUniqBy);
1202
+ }
1203
+ function uniqBy_(array, transformer) {
1204
+ return reduceLazy(array, lazyUniqBy(transformer));
1205
+ }
1206
+ function lazyUniqBy(transformer) {
1207
+ const set = /* @__PURE__ */ new Set();
1208
+ return (value) => {
1209
+ const appliedItem = transformer(value);
1210
+ if (set.has(appliedItem)) {
1211
+ return { done: false, hasNext: false };
1212
+ }
1213
+ set.add(appliedItem);
1214
+ return { done: false, hasNext: true, next: value };
1215
+ };
1216
+ }
1217
+
1218
+ function uniqWith(...args) {
1219
+ return purry(uniqWith_, args, uniqWith.lazy);
1220
+ }
1221
+ function uniqWith_(array, isEquals) {
1222
+ const lazy = uniqWith.lazy(isEquals);
1223
+ return reduceLazy(array, lazy, true);
1224
+ }
1225
+ function lazy_(isEquals) {
1226
+ return (value, index, array) => array !== void 0 && array.findIndex((otherValue) => isEquals(value, otherValue)) === index ? { done: false, hasNext: true, next: value } : { done: false, hasNext: false };
1227
+ }
1228
+ ((uniqWith2) => {
1229
+ uniqWith2.lazy = toLazyIndexed(lazy_);
1230
+ })(uniqWith || (uniqWith = {}));
1231
+
1232
+ function zip(...args) {
1233
+ return purry(zip_, args);
1234
+ }
1235
+ function zip_(first, second) {
1236
+ const resultLength = first.length > second.length ? second.length : first.length;
1237
+ const result = [];
1238
+ for (let i = 0; i < resultLength; i++) {
1239
+ result.push([first[i], second[i]]);
1240
+ }
1241
+ return result;
1242
+ }
1243
+ ((zip2) => {
1244
+ zip2.strict = zip2;
1245
+ })(zip || (zip = {}));
1246
+
1247
+ function zipObj(...args) {
1248
+ return purry(zipObj_, args);
1249
+ }
1250
+ function zipObj_(first, second) {
1251
+ const resultLength = first.length > second.length ? second.length : first.length;
1252
+ const result = {};
1253
+ for (let i = 0; i < resultLength; i++) {
1254
+ result[first[i]] = second[i];
1255
+ }
1256
+ return result;
1257
+ }
1258
+
1259
+ function zipWith(arg0, arg1, arg2) {
1260
+ if (typeof arg0 === "function") {
1261
+ return arg1 === void 0 ? (f, s) => zipWith_(f, s, arg0) : (f) => zipWith_(f, arg1, arg0);
1262
+ }
1263
+ if (arg1 === void 0 || arg2 === void 0) {
1264
+ throw new Error("zipWith: Missing arguments in dataFirst function call");
1265
+ }
1266
+ return zipWith_(arg0, arg1, arg2);
1267
+ }
1268
+ function zipWith_(first, second, fn) {
1269
+ const resultLength = first.length > second.length ? second.length : first.length;
1270
+ const result = [];
1271
+ for (let i = 0; i < resultLength; i++) {
1272
+ result.push(fn(first[i], second[i]));
1273
+ }
1274
+ return result;
1275
+ }
1276
+
1277
+ function purryOn(isArg, implementation, args) {
1278
+ const callArgs = Array.from(args);
1279
+ return isArg(args[0]) ? (data) => implementation(data, ...callArgs) : implementation(...callArgs);
1280
+ }
1281
+
1282
+ function conditional(...args) {
1283
+ return purryOn(isCase, conditionalImplementation, args);
1284
+ }
1285
+ function conditionalImplementation(data, ...cases) {
1286
+ for (const [when, then] of cases) {
1287
+ if (when(data)) {
1288
+ return then(data);
1289
+ }
1290
+ }
1291
+ throw new Error("conditional: data failed for all cases");
1292
+ }
1293
+ function isCase(maybeCase) {
1294
+ if (!Array.isArray(maybeCase)) {
1295
+ return false;
1296
+ }
1297
+ const [when, then, ...rest] = maybeCase;
1298
+ return typeof when === "function" && when.length <= 1 && typeof then === "function" && then.length <= 1 && rest.length === 0;
1299
+ }
1300
+ const trivialDefaultCase = () => void 0;
1301
+ ((conditional2) => {
1302
+ function defaultCase(then = trivialDefaultCase) {
1303
+ return [() => true, then];
1304
+ }
1305
+ conditional2.defaultCase = defaultCase;
1306
+ })(conditional || (conditional = {}));
1307
+
1308
+ function pipe(input, ...operations) {
1309
+ let output = input;
1310
+ const lazyOperations = operations.map((op) => "lazy" in op ? prepareLazyOperation(op) : void 0);
1311
+ let operationIndex = 0;
1312
+ while (operationIndex < operations.length) {
1313
+ const lazyOperation = lazyOperations[operationIndex];
1314
+ if (lazyOperation === void 0 || !isIterable(output)) {
1315
+ const operation = operations[operationIndex];
1316
+ output = operation(output);
1317
+ operationIndex += 1;
1318
+ continue;
1319
+ }
1320
+ const lazySequence = [];
1321
+ for (let index = operationIndex; index < operations.length; index++) {
1322
+ const lazyOp = lazyOperations[index];
1323
+ if (lazyOp === void 0) {
1324
+ break;
1325
+ }
1326
+ lazySequence.push(lazyOp);
1327
+ if (lazyOp.isSingle) {
1328
+ break;
1329
+ }
1330
+ }
1331
+ const accumulator = [];
1332
+ const iterator = output[Symbol.iterator]();
1333
+ while (true) {
1334
+ const result = iterator.next();
1335
+ if (result.done ?? false) {
1336
+ break;
1337
+ }
1338
+ const shouldExitEarly = processItem_(
1339
+ result.value,
1340
+ accumulator,
1341
+ lazySequence
1342
+ );
1343
+ if (shouldExitEarly) {
1344
+ break;
1345
+ }
1346
+ }
1347
+ const { isSingle } = lazySequence[lazySequence.length - 1];
1348
+ output = isSingle ? accumulator[0] : accumulator;
1349
+ operationIndex += lazySequence.length;
1350
+ }
1351
+ return output;
1352
+ }
1353
+ function processItem_(item, accumulator, lazySequence) {
1354
+ if (lazySequence.length === 0) {
1355
+ accumulator.push(item);
1356
+ return false;
1357
+ }
1358
+ let currentItem = item;
1359
+ let lazyResult = { done: false, hasNext: false };
1360
+ let isDone = false;
1361
+ for (const [operationsIndex, lazyFn] of lazySequence.entries()) {
1362
+ const { index, isIndexed, items } = lazyFn;
1363
+ items.push(currentItem);
1364
+ lazyResult = isIndexed ? lazyFn(currentItem, index, items) : lazyFn(currentItem);
1365
+ lazyFn.index += 1;
1366
+ if (lazyResult.hasNext) {
1367
+ if (lazyResult.hasMany ?? false) {
1368
+ for (const subItem of lazyResult.next) {
1369
+ const subResult = processItem_(
1370
+ subItem,
1371
+ accumulator,
1372
+ lazySequence.slice(operationsIndex + 1)
1373
+ );
1374
+ if (subResult) {
1375
+ return true;
1376
+ }
1377
+ }
1378
+ return false;
1379
+ }
1380
+ currentItem = lazyResult.next;
1381
+ }
1382
+ if (!lazyResult.hasNext) {
1383
+ break;
1384
+ }
1385
+ if (lazyResult.done) {
1386
+ isDone = true;
1387
+ }
1388
+ }
1389
+ if (lazyResult.hasNext) {
1390
+ accumulator.push(currentItem);
1391
+ }
1392
+ return isDone;
1393
+ }
1394
+ function prepareLazyOperation(op) {
1395
+ const { lazy, lazyArgs } = op;
1396
+ const fn = lazy(...lazyArgs ?? []);
1397
+ return Object.assign(fn, {
1398
+ index: 0,
1399
+ isIndexed: lazy.indexed,
1400
+ isSingle: lazy.single,
1401
+ items: []
1402
+ });
1403
+ }
1404
+ function isIterable(something) {
1405
+ return typeof something === "string" || typeof something === "object" && something !== null && Symbol.iterator in something;
1406
+ }
1407
+
1408
+ function createPipe(...operations) {
1409
+ return (value) => pipe(
1410
+ value,
1411
+ ...operations
1412
+ );
1413
+ }
1414
+
1415
+ function identity(value) {
1416
+ return value;
1417
+ }
1418
+
1419
+ function noop() {
1420
+ return void 0;
1421
+ }
1422
+
1423
+ function once(fn) {
1424
+ let called = false;
1425
+ let ret;
1426
+ return () => {
1427
+ if (!called) {
1428
+ ret = fn();
1429
+ called = true;
1430
+ }
1431
+ return ret;
1432
+ };
1433
+ }
1434
+
1435
+ function debounce(func, {
1436
+ maxWaitMs,
1437
+ timing = "trailing",
1438
+ waitMs
1439
+ }) {
1440
+ if (maxWaitMs !== void 0 && waitMs !== void 0 && maxWaitMs < waitMs) {
1441
+ throw new Error(
1442
+ `debounce: maxWaitMs (${maxWaitMs}) cannot be less than waitMs (${waitMs})`
1443
+ );
1444
+ }
1445
+ let coolDownTimeoutId;
1446
+ let maxWaitTimeoutId;
1447
+ let latestCallArgs;
1448
+ let result;
1449
+ function handleDebouncedCall(args) {
1450
+ latestCallArgs = args;
1451
+ if (maxWaitMs !== void 0 && maxWaitTimeoutId === void 0) {
1452
+ maxWaitTimeoutId = setTimeout(handleInvoke, maxWaitMs);
1453
+ }
1454
+ }
1455
+ function handleInvoke() {
1456
+ if (latestCallArgs === void 0) {
1457
+ return;
1458
+ }
1459
+ if (maxWaitTimeoutId !== void 0) {
1460
+ const timeoutId = maxWaitTimeoutId;
1461
+ maxWaitTimeoutId = void 0;
1462
+ clearTimeout(timeoutId);
1463
+ }
1464
+ const args = latestCallArgs;
1465
+ latestCallArgs = void 0;
1466
+ result = func(...args);
1467
+ }
1468
+ function handleCoolDownEnd() {
1469
+ if (coolDownTimeoutId === void 0) {
1470
+ return;
1471
+ }
1472
+ const timeoutId = coolDownTimeoutId;
1473
+ coolDownTimeoutId = void 0;
1474
+ clearTimeout(timeoutId);
1475
+ if (latestCallArgs !== void 0) {
1476
+ handleInvoke();
1477
+ }
1478
+ }
1479
+ return {
1480
+ get cachedValue() {
1481
+ return result;
1482
+ },
1483
+ call: (...args) => {
1484
+ if (coolDownTimeoutId === void 0) {
1485
+ if (timing === "trailing") {
1486
+ handleDebouncedCall(args);
1487
+ } else {
1488
+ result = func(...args);
1489
+ }
1490
+ } else {
1491
+ if (timing !== "leading") {
1492
+ handleDebouncedCall(args);
1493
+ }
1494
+ const timeoutId = coolDownTimeoutId;
1495
+ coolDownTimeoutId = void 0;
1496
+ clearTimeout(timeoutId);
1497
+ }
1498
+ coolDownTimeoutId = setTimeout(
1499
+ handleCoolDownEnd,
1500
+ // If waitMs is not defined but maxWaitMs *is* it means the user is only
1501
+ // interested in the leaky-bucket nature of the debouncer which is
1502
+ // achieved by setting waitMs === maxWaitMs. If both are not defined we
1503
+ // default to 0 which would wait until the end of the execution frame.
1504
+ waitMs ?? maxWaitMs ?? 0
1505
+ );
1506
+ return result;
1507
+ },
1508
+ cancel: () => {
1509
+ if (coolDownTimeoutId !== void 0) {
1510
+ const timeoutId = coolDownTimeoutId;
1511
+ coolDownTimeoutId = void 0;
1512
+ clearTimeout(timeoutId);
1513
+ }
1514
+ if (maxWaitTimeoutId !== void 0) {
1515
+ const timeoutId = maxWaitTimeoutId;
1516
+ maxWaitTimeoutId = void 0;
1517
+ clearTimeout(timeoutId);
1518
+ }
1519
+ latestCallArgs = void 0;
1520
+ },
1521
+ flush: () => {
1522
+ handleCoolDownEnd();
1523
+ return result;
1524
+ },
1525
+ get isPending() {
1526
+ return coolDownTimeoutId !== void 0;
1527
+ }
1528
+ };
1529
+ }
1530
+
1531
+ function sleep(timeout) {
1532
+ return new Promise((resolve) => {
1533
+ setTimeout(resolve, timeout);
1534
+ });
1535
+ }
1536
+
1537
+ function times(...args) {
1538
+ return purry(times_, args);
1539
+ }
1540
+ function times_(count, fn) {
1541
+ if (count < 0) {
1542
+ throw new RangeError("n must be a non-negative number");
1543
+ }
1544
+ const res = [];
1545
+ for (let i = 0; i < count; i++) {
1546
+ res.push(fn(i));
1547
+ }
1548
+ return res;
1549
+ }
1550
+
1551
+ function isDeepEqual(...args) {
1552
+ return purry(isDeepEqualImplementation, args);
1553
+ }
1554
+ function isDeepEqualImplementation(data, other) {
1555
+ if (data === other) {
1556
+ return true;
1557
+ }
1558
+ if (typeof data === "number" && typeof other === "number") {
1559
+ return data !== data && other !== other;
1560
+ }
1561
+ if (typeof data !== "object" || typeof other !== "object") {
1562
+ return false;
1563
+ }
1564
+ if (data === null || other === null) {
1565
+ return false;
1566
+ }
1567
+ if (Object.getPrototypeOf(data) !== Object.getPrototypeOf(other)) {
1568
+ return false;
1569
+ }
1570
+ if (Array.isArray(data)) {
1571
+ if (data.length !== other.length) {
1572
+ return false;
1573
+ }
1574
+ for (let i = 0; i < data.length; i++) {
1575
+ if (!isDeepEqualImplementation(
1576
+ data[i],
1577
+ other[i]
1578
+ )) {
1579
+ return false;
1580
+ }
1581
+ }
1582
+ return true;
1583
+ }
1584
+ if (data instanceof Date) {
1585
+ return data.getTime() === other.getTime();
1586
+ }
1587
+ if (data instanceof RegExp) {
1588
+ return data.toString() === other.toString();
1589
+ }
1590
+ const keys = Object.keys(data);
1591
+ if (keys.length !== Object.keys(other).length) {
1592
+ return false;
1593
+ }
1594
+ for (const key of keys) {
1595
+ if (!Object.prototype.hasOwnProperty.call(other, key)) {
1596
+ return false;
1597
+ }
1598
+ if (!isDeepEqualImplementation(data[key], other[key])) {
1599
+ return false;
1600
+ }
1601
+ }
1602
+ return true;
1603
+ }
1604
+
1605
+ function hasSubObject(...args) {
1606
+ return purry(_hasSubObject, args);
1607
+ }
1608
+ function _hasSubObject(data, subObject) {
1609
+ for (const key of Object.keys(subObject)) {
1610
+ if (!Object.prototype.hasOwnProperty.call(data, key)) {
1611
+ return false;
1612
+ }
1613
+ if (!isDeepEqual(subObject[key], data[key])) {
1614
+ return false;
1615
+ }
1616
+ }
1617
+ return true;
1618
+ }
1619
+
1620
+ function isArray(data) {
1621
+ return Array.isArray(data);
1622
+ }
1623
+
1624
+ function isBoolean(data) {
1625
+ return typeof data === "boolean";
1626
+ }
1627
+
1628
+ function isDate(data) {
1629
+ return data instanceof Date;
1630
+ }
1631
+
1632
+ function isDefined(data) {
1633
+ return data !== void 0 && data !== null;
1634
+ }
1635
+ ((isDefined2) => {
1636
+ function strict(data) {
1637
+ return data !== void 0;
1638
+ }
1639
+ isDefined2.strict = strict;
1640
+ })(isDefined || (isDefined = {}));
1641
+
1642
+ function isObject(data) {
1643
+ if (typeof data !== "object" || data === null) {
1644
+ return false;
1645
+ }
1646
+ const proto = Object.getPrototypeOf(data);
1647
+ return proto === null || proto === Object.prototype;
1648
+ }
1649
+
1650
+ function isString(data) {
1651
+ return typeof data === "string";
1652
+ }
1653
+
1654
+ function isEmpty(data) {
1655
+ if (data === void 0) {
1656
+ return true;
1657
+ }
1658
+ if (isArray(data) || isString(data)) {
1659
+ return data.length === 0;
1660
+ }
1661
+ if (isObject(data)) {
1662
+ return Object.keys(data).length === 0;
1663
+ }
1664
+ return false;
1665
+ }
1666
+
1667
+ function isError(data) {
1668
+ return data instanceof Error;
1669
+ }
1670
+
1671
+ function isFunction(data) {
1672
+ return typeof data === "function";
1673
+ }
1674
+
1675
+ function isIncludedIn(dataOrContainer, container) {
1676
+ if (container === void 0) {
1677
+ const asSet = new Set(dataOrContainer);
1678
+ return (data) => asSet.has(data);
1679
+ }
1680
+ return container.includes(dataOrContainer);
1681
+ }
1682
+
1683
+ function isNil(data) {
1684
+ return data === null || data === void 0;
1685
+ }
1686
+
1687
+ function isNonNull(data) {
1688
+ return data !== null;
1689
+ }
1690
+
1691
+ function isNot(predicate) {
1692
+ return (data) => !predicate(data);
1693
+ }
1694
+
1695
+ function isNumber(data) {
1696
+ return typeof data === "number" && !Number.isNaN(data);
1697
+ }
1698
+
1699
+ function isPromise(data) {
1700
+ return data instanceof Promise;
1701
+ }
1702
+
1703
+ function isSymbol(data) {
1704
+ return typeof data === "symbol";
1705
+ }
1706
+
1707
+ function isTruthy(data) {
1708
+ return !!data;
1709
+ }
1710
+
1711
+ function add(...args) {
1712
+ return purry(add_, args);
1713
+ }
1714
+ function add_(value, addend) {
1715
+ return value + addend;
1716
+ }
1717
+
1718
+ const MAX_PRECISION = 15;
1719
+ function withPrecision(roundingFn) {
1720
+ return (value, precision) => {
1721
+ if (precision === 0) {
1722
+ return roundingFn(value);
1723
+ }
1724
+ if (!Number.isInteger(precision)) {
1725
+ throw new TypeError(`precision must be an integer: ${precision}`);
1726
+ }
1727
+ if (precision > MAX_PRECISION || precision < -MAX_PRECISION) {
1728
+ throw new RangeError(`precision must be between ${-MAX_PRECISION} and ${MAX_PRECISION}`);
1729
+ }
1730
+ if (Number.isNaN(value) || !Number.isFinite(value)) {
1731
+ return roundingFn(value);
1732
+ }
1733
+ const multiplier = 10 ** precision;
1734
+ return roundingFn(value * multiplier) / multiplier;
1735
+ };
1736
+ }
1737
+
1738
+ function ceil(...args) {
1739
+ return purry(withPrecision(Math.ceil), args);
1740
+ }
1741
+
1742
+ function clamp(...args) {
1743
+ return purry(clamp_, args);
1744
+ }
1745
+ function clamp_(value, { max, min }) {
1746
+ if (min !== void 0 && value < min) {
1747
+ return min;
1748
+ }
1749
+ if (max !== void 0 && value > max) {
1750
+ return max;
1751
+ }
1752
+ return value;
1753
+ }
1754
+
1755
+ function divide(...args) {
1756
+ return purry(divide_, args);
1757
+ }
1758
+ function divide_(value, divisor) {
1759
+ return value / divisor;
1760
+ }
1761
+
1762
+ function floor(...args) {
1763
+ return purry(withPrecision(Math.floor), args);
1764
+ }
1765
+
1766
+ function multiply(...args) {
1767
+ return purry(multiply_, args);
1768
+ }
1769
+ function multiply_(value, multiplicand) {
1770
+ return value * multiplicand;
1771
+ }
1772
+
1773
+ function round(...args) {
1774
+ return purry(withPrecision(Math.round), args);
1775
+ }
1776
+
1777
+ function subtract(...args) {
1778
+ return purry(subtract_, args);
1779
+ }
1780
+ function subtract_(value, subtrahend) {
1781
+ return value - subtrahend;
1782
+ }
1783
+
1784
+ function addProp(...args) {
1785
+ return purry(addProp_, args);
1786
+ }
1787
+ function addProp_(obj, prop, value) {
1788
+ return {
1789
+ ...obj,
1790
+ [prop]: value
1791
+ };
1792
+ }
1793
+
1794
+ function type(val) {
1795
+ if (val === null) {
1796
+ return "Null";
1797
+ }
1798
+ if (val === void 0) {
1799
+ return "Undefined";
1800
+ }
1801
+ return Object.prototype.toString.call(val).slice(8, -1);
1802
+ }
1803
+
1804
+ function cloneRegExp_(pattern) {
1805
+ return new RegExp(
1806
+ pattern.source,
1807
+ (pattern.global ? "g" : "") + (pattern.ignoreCase ? "i" : "") + (pattern.multiline ? "m" : "") + (pattern.sticky ? "y" : "") + (pattern.unicode ? "u" : "")
1808
+ );
1809
+ }
1810
+ function clone_(value, refFrom, refTo, deep) {
1811
+ function copy(copiedValue) {
1812
+ const len = refFrom.length;
1813
+ let idx = 0;
1814
+ while (idx < len) {
1815
+ if (value === refFrom[idx]) {
1816
+ return refTo[idx];
1817
+ }
1818
+ idx += 1;
1819
+ }
1820
+ refFrom[idx + 1] = value;
1821
+ refTo[idx + 1] = copiedValue;
1822
+ for (const key in value) {
1823
+ copiedValue[key] = deep ? clone_(value[key], refFrom, refTo, true) : value[key];
1824
+ }
1825
+ return copiedValue;
1826
+ }
1827
+ switch (type(value)) {
1828
+ case "Object":
1829
+ return copy({});
1830
+ case "Array":
1831
+ return copy([]);
1832
+ case "Date":
1833
+ return new Date(value.valueOf());
1834
+ case "RegExp":
1835
+ return cloneRegExp_(value);
1836
+ default:
1837
+ return value;
1838
+ }
1839
+ }
1840
+ function clone(value) {
1841
+ return value != null && typeof value.clone === "function" ? value.clone() : clone_(value, [], [], true);
1842
+ }
1843
+
1844
+ function forEachObj(...args) {
1845
+ return purry(forEachObj_(false), args);
1846
+ }
1847
+ function forEachObj_(indexed) {
1848
+ return (data, fn) => {
1849
+ for (const key in data) {
1850
+ if (Object.prototype.hasOwnProperty.call(data, key)) {
1851
+ const { [key]: val } = data;
1852
+ if (indexed) {
1853
+ fn(val, key, data);
1854
+ } else {
1855
+ fn(val);
1856
+ }
1857
+ }
1858
+ }
1859
+ return data;
1860
+ };
1861
+ }
1862
+ ((forEachObj2) => {
1863
+ function indexed(...args) {
1864
+ return purry(forEachObj_(true), args);
1865
+ }
1866
+ forEachObj2.indexed = indexed;
1867
+ })(forEachObj || (forEachObj = {}));
1868
+
1869
+ function fromKeys(...args) {
1870
+ return purry(fromKeysImplementation, args);
1871
+ }
1872
+ function fromKeysImplementation(data, mapper) {
1873
+ const result = {};
1874
+ for (const key of data) {
1875
+ result[key] = mapper(key);
1876
+ }
1877
+ return result;
1878
+ }
1879
+
1880
+ function fromPairs(...args) {
1881
+ return purry(fromPairsImplementation, args);
1882
+ }
1883
+ function fromPairsImplementation(entries) {
1884
+ const out = {};
1885
+ for (const [key, value] of entries) {
1886
+ out[key] = value;
1887
+ }
1888
+ return out;
1889
+ }
1890
+ ((fromPairs2) => {
1891
+ fromPairs2.strict = fromPairs2;
1892
+ })(fromPairs || (fromPairs = {}));
1893
+
1894
+ function invert(...args) {
1895
+ return purry(invert_, args);
1896
+ }
1897
+ function invert_(object) {
1898
+ const result = {};
1899
+ for (const key in object) {
1900
+ if (Object.prototype.hasOwnProperty.call(object, key)) {
1901
+ result[object[key]] = key;
1902
+ }
1903
+ }
1904
+ return result;
1905
+ }
1906
+
1907
+ function keys(...args) {
1908
+ return purry(Object.keys, args);
1909
+ }
1910
+ ((keys2) => {
1911
+ keys2.strict = keys2;
1912
+ })(keys || (keys = {}));
1913
+
1914
+ function toPairs(...args) {
1915
+ return purry(Object.entries, args);
1916
+ }
1917
+ ((toPairs2) => {
1918
+ toPairs2.strict = toPairs2;
1919
+ })(toPairs || (toPairs = {}));
1920
+
1921
+ function mapKeys(...args) {
1922
+ return purry(mapKeys_, args);
1923
+ }
1924
+ function mapKeys_(data, fn) {
1925
+ const out = {};
1926
+ for (const [key, value] of toPairs.strict(data)) {
1927
+ out[fn(key, value)] = value;
1928
+ }
1929
+ return out;
1930
+ }
1931
+
1932
+ function mapValues(...args) {
1933
+ return purry(mapValues_, args);
1934
+ }
1935
+ function mapValues_(data, fn) {
1936
+ const out = {};
1937
+ for (const [key, value] of toPairs.strict(data)) {
1938
+ out[key] = fn(value, key);
1939
+ }
1940
+ return out;
1941
+ }
1942
+
1943
+ function merge(...args) {
1944
+ return purry(merge_, args);
1945
+ }
1946
+ function merge_(data, source) {
1947
+ return { ...data, ...source };
1948
+ }
1949
+
1950
+ function mergeDeep(...args) {
1951
+ return purry(mergeDeepImplementation, args);
1952
+ }
1953
+ function mergeDeepImplementation(destination, source) {
1954
+ const output = { ...destination, ...source };
1955
+ for (const key in source) {
1956
+ if (!(key in destination)) {
1957
+ continue;
1958
+ }
1959
+ const { [key]: destinationValue } = destination;
1960
+ if (!isRecord(destinationValue)) {
1961
+ continue;
1962
+ }
1963
+ const { [key]: sourceValue } = source;
1964
+ if (!isRecord(sourceValue)) {
1965
+ continue;
1966
+ }
1967
+ output[key] = mergeDeepImplementation(destinationValue, sourceValue);
1968
+ }
1969
+ return output;
1970
+ }
1971
+ function isRecord(object) {
1972
+ return typeof object === "object" && object !== null && Object.getPrototypeOf(object) === Object.prototype;
1973
+ }
1974
+
1975
+ function omit(...args) {
1976
+ return purry(omit_, args);
1977
+ }
1978
+ function omit_(data, propNames) {
1979
+ if (!hasAtLeast(propNames, 1)) {
1980
+ return { ...data };
1981
+ }
1982
+ if (!hasAtLeast(propNames, 2)) {
1983
+ const [propName] = propNames;
1984
+ const { [propName]: omitted, ...remaining } = data;
1985
+ return remaining;
1986
+ }
1987
+ if (!propNames.some((propName) => propName in data)) {
1988
+ return { ...data };
1989
+ }
1990
+ const asSet = new Set(propNames);
1991
+ return fromPairs(
1992
+ Object.entries(data).filter(([key]) => !asSet.has(key))
1993
+ );
1994
+ }
1995
+
1996
+ function omitBy(...args) {
1997
+ return purry(omitBy_, args);
1998
+ }
1999
+ function omitBy_(object, fn) {
2000
+ if (object === void 0 || object === null) {
2001
+ return object;
2002
+ }
2003
+ const out = {};
2004
+ for (const key of keys.strict(object)) {
2005
+ const k = key;
2006
+ if (!fn(object[k], k)) {
2007
+ out[k] = object[k];
2008
+ }
2009
+ }
2010
+ return out;
2011
+ }
2012
+
2013
+ function pathOr(...args) {
2014
+ return purry(pathOr_, args);
2015
+ }
2016
+ function pathOr_(data, path, defaultValue) {
2017
+ let current = data;
2018
+ for (const prop of path) {
2019
+ if (current === null || current === void 0) {
2020
+ break;
2021
+ }
2022
+ current = current[prop];
2023
+ }
2024
+ return current ?? defaultValue;
2025
+ }
2026
+
2027
+ function pick(...args) {
2028
+ return purry(pick_, args);
2029
+ }
2030
+ function pick_(object, names) {
2031
+ const out = {};
2032
+ for (const name of names) {
2033
+ if (name in object) {
2034
+ out[name] = object[name];
2035
+ }
2036
+ }
2037
+ return out;
2038
+ }
2039
+
2040
+ function pickBy(...args) {
2041
+ return purry(pickBy_, args);
2042
+ }
2043
+ function pickBy_(data, fn) {
2044
+ if (data === null || data === void 0) {
2045
+ return {};
2046
+ }
2047
+ const out = {};
2048
+ for (const key of keys.strict(data)) {
2049
+ const k = key;
2050
+ if (fn(data[k], k)) {
2051
+ out[k] = data[k];
2052
+ }
2053
+ }
2054
+ return out;
2055
+ }
2056
+
2057
+ function prop(propName) {
2058
+ return ({ [propName]: value }) => value;
2059
+ }
2060
+
2061
+ function set(...args) {
2062
+ return purry(set_, args);
2063
+ }
2064
+ function set_(obj, prop, value) {
2065
+ return {
2066
+ ...obj,
2067
+ [prop]: value
2068
+ };
2069
+ }
2070
+
2071
+ function setPath(...args) {
2072
+ return purry(setPath_, args);
2073
+ }
2074
+ function setPath_(data, path, value) {
2075
+ const [current, ...rest] = path;
2076
+ if (current === void 0) {
2077
+ return value;
2078
+ }
2079
+ if (Array.isArray(data)) {
2080
+ return data.map((item, index) => index === current ? setPath_(item, rest, value) : item);
2081
+ }
2082
+ if (data === null || data === void 0) {
2083
+ throw new Error("Path doesn't exist in object!");
2084
+ }
2085
+ return {
2086
+ ...data,
2087
+ [current]: setPath_(
2088
+ data[current],
2089
+ rest,
2090
+ value
2091
+ )
2092
+ };
2093
+ }
2094
+
2095
+ function swapProps(...args) {
2096
+ return purry(swapProps_, args);
2097
+ }
2098
+ function swapProps_(obj, key1, key2) {
2099
+ const { [key1]: value1, [key2]: value2 } = obj;
2100
+ return {
2101
+ ...obj,
2102
+ [key1]: value2,
2103
+ [key2]: value1
2104
+ };
2105
+ }
2106
+
2107
+ function values(source) {
2108
+ return Object.values(source);
2109
+ }
2110
+
2111
+ const RE_NUMBER_CHAR = /\d/;
2112
+ const STR_SPLITTERS = ["-", "_", "/", "."];
2113
+ function isUppercase(char = "") {
2114
+ if (RE_NUMBER_CHAR.test(char)) {
2115
+ return void 0;
2116
+ }
2117
+ return char !== char.toLowerCase();
2118
+ }
2119
+ function splitByCase(str, separators) {
2120
+ const splitters = separators ?? STR_SPLITTERS;
2121
+ const parts = [];
2122
+ if (!str || !isString(str)) {
2123
+ return parts;
2124
+ }
2125
+ let buff = "";
2126
+ let previousUpper;
2127
+ let previousSplitter;
2128
+ for (const char of str) {
2129
+ const isSplitter = splitters.includes(char);
2130
+ if (isSplitter === true) {
2131
+ parts.push(buff);
2132
+ buff = "";
2133
+ previousUpper = void 0;
2134
+ continue;
2135
+ }
2136
+ const isUpper = isUppercase(char);
2137
+ if (previousSplitter === false) {
2138
+ if (previousUpper === false && isUpper === true) {
2139
+ parts.push(buff);
2140
+ buff = char;
2141
+ previousUpper = isUpper;
2142
+ continue;
2143
+ }
2144
+ if (previousUpper === true && isUpper === false && buff.length > 1) {
2145
+ const lastChar = buff.at(-1);
2146
+ parts.push(buff.slice(0, Math.max(0, buff.length - 1)));
2147
+ buff = lastChar + char;
2148
+ previousUpper = isUpper;
2149
+ continue;
2150
+ }
2151
+ }
2152
+ buff += char;
2153
+ previousUpper = isUpper;
2154
+ previousSplitter = isSplitter;
2155
+ }
2156
+ parts.push(buff);
2157
+ return parts;
2158
+ }
2159
+ function toUpperFirst(str) {
2160
+ return str ? str[0]?.toUpperCase() + str.slice(1) : "";
2161
+ }
2162
+ function toLowerFirst(str) {
2163
+ return str ? str[0]?.toLowerCase() + str.slice(1) : "";
2164
+ }
2165
+ function toPascalCase(str, opts) {
2166
+ return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => toUpperFirst(opts?.normalize ? p.toLowerCase() : p)).join("") : "";
2167
+ }
2168
+ function toCamelCase(str, opts) {
2169
+ return toLowerFirst(toPascalCase(str || "", opts));
2170
+ }
2171
+ function toKebabCase(str, joiner) {
2172
+ return str ? (Array.isArray(str) ? str : splitByCase(str)).map((p) => p.toLowerCase()).join(joiner ?? "-") : "";
2173
+ }
2174
+ function toSnakeCase(str) {
2175
+ return toKebabCase(str || "", "_");
2176
+ }
2177
+ function toFlatCase(str) {
2178
+ return toKebabCase(str || "", "");
2179
+ }
2180
+ function toTrainCase(str, opts) {
2181
+ return (Array.isArray(str) ? str : splitByCase(str)).filter(Boolean).map((p) => toUpperFirst(opts?.normalize ? p.toLowerCase() : p)).join("-");
2182
+ }
2183
+ const titleCaseExceptions = /^(a|an|and|as|at|but|by|for|if|in|is|nor|of|on|or|the|to|with)$/i;
2184
+ function toTitleCase(str, opts) {
2185
+ return (Array.isArray(str) ? str : splitByCase(str)).filter(Boolean).map((p) => titleCaseExceptions.test(p) ? p.toLowerCase() : toUpperFirst(opts?.normalize ? p.toLowerCase() : p)).join(" ");
2186
+ }
2187
+
2188
+ function humanReadableFileSize(bytes, base = 1e3) {
2189
+ if (bytes < base) {
2190
+ return `${bytes} B`;
2191
+ }
2192
+ const prefix = base === 1024 ? ["Ki", "Mi", "Gi"] : ["k", "M", "G"];
2193
+ let unit = -1;
2194
+ while (Math.abs(bytes) >= base && unit < prefix.length - 1) {
2195
+ bytes /= base;
2196
+ ++unit;
2197
+ }
2198
+ return `${bytes.toFixed(1)} ${prefix[unit]}B`;
2199
+ }
2200
+
2201
+ const ALPHABET = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
2202
+ function randomString(...args) {
2203
+ return purry(randomStringImplementation, args);
2204
+ }
2205
+ function randomStringImplementation(length) {
2206
+ return times(length, randomChar).join("");
2207
+ }
2208
+ function randomChar() {
2209
+ return ALPHABET[Math.floor(Math.random() * ALPHABET.length)];
2210
+ }
2211
+
2212
+ function slugify(str) {
2213
+ return str.normalize("NFD").replace(/[\u0300-\u036F]/g, "").toLowerCase().replace(/[^a-z0-9]/g, " ").trim().replace(/\s+/g, "-");
2214
+ }
2215
+
2216
+ function stringToPath(path) {
2217
+ return stringToPath_(path);
2218
+ }
2219
+ function stringToPath_(path) {
2220
+ if (path.length === 0) {
2221
+ return [];
2222
+ }
2223
+ const match = /^\[(.+?)\](.*)$/u.exec(path) ?? /^\.?([^.[\]]+)(.*)$/u.exec(path);
2224
+ if (match !== null) {
2225
+ const [, key, rest] = match;
2226
+ return [key, ...stringToPath_(rest)];
2227
+ }
2228
+ return [path];
2229
+ }
2230
+
2231
+ const isBrowser = typeof window !== "undefined";
2232
+
2233
+ exports.KEY_CODES = KEY_CODES;
2234
+ exports.add = add;
2235
+ exports.addProp = addProp;
2236
+ exports.allPass = allPass;
2237
+ exports.anyPass = anyPass;
2238
+ exports.ceil = ceil;
2239
+ exports.chunk = chunk;
2240
+ exports.clamp = clamp;
2241
+ exports.clone = clone;
2242
+ exports.concat = concat;
2243
+ exports.conditional = conditional;
2244
+ exports.createPipe = createPipe;
2245
+ exports.debounce = debounce;
2246
+ exports.differenceWith = differenceWith;
2247
+ exports.divide = divide;
2248
+ exports.drop = drop;
2249
+ exports.dropFirstBy = dropFirstBy;
2250
+ exports.dropLast = dropLast;
2251
+ exports.dropLastWhile = dropLastWhile;
2252
+ exports.dropWhile = dropWhile;
2253
+ exports.filter = filter;
2254
+ exports.find = find;
2255
+ exports.findIndex = findIndex;
2256
+ exports.findLast = findLast;
2257
+ exports.findLastIndex = findLastIndex;
2258
+ exports.first = first;
2259
+ exports.firstBy = firstBy;
2260
+ exports.flatMap = flatMap;
2261
+ exports.flatMapToObj = flatMapToObj;
2262
+ exports.flatten = flatten;
2263
+ exports.flattenDeep = flattenDeep;
2264
+ exports.floor = floor;
2265
+ exports.forEach = forEach;
2266
+ exports.forEachObj = forEachObj;
2267
+ exports.fromKeys = fromKeys;
2268
+ exports.fromPairs = fromPairs;
2269
+ exports.groupBy = groupBy;
2270
+ exports.hasAtLeast = hasAtLeast;
2271
+ exports.hasSubObject = hasSubObject;
2272
+ exports.humanReadableFileSize = humanReadableFileSize;
2273
+ exports.identity = identity;
2274
+ exports.indexBy = indexBy;
2275
+ exports.intersectionWith = intersectionWith;
2276
+ exports.invert = invert;
2277
+ exports.isArray = isArray;
2278
+ exports.isBoolean = isBoolean;
2279
+ exports.isBrowser = isBrowser;
2280
+ exports.isDate = isDate;
2281
+ exports.isDeepEqual = isDeepEqual;
2282
+ exports.isDefined = isDefined;
2283
+ exports.isEmpty = isEmpty;
2284
+ exports.isError = isError;
2285
+ exports.isFunction = isFunction;
2286
+ exports.isIncludedIn = isIncludedIn;
2287
+ exports.isNil = isNil;
2288
+ exports.isNonNull = isNonNull;
2289
+ exports.isNot = isNot;
2290
+ exports.isNumber = isNumber;
2291
+ exports.isObject = isObject;
2292
+ exports.isPromise = isPromise;
2293
+ exports.isString = isString;
2294
+ exports.isSymbol = isSymbol;
2295
+ exports.isTruthy = isTruthy;
2296
+ exports.isUppercase = isUppercase;
2297
+ exports.join = join;
2298
+ exports.keys = keys;
2299
+ exports.last = last;
2300
+ exports.length = length;
2301
+ exports.map = map;
2302
+ exports.mapKeys = mapKeys;
2303
+ exports.mapToObj = mapToObj;
2304
+ exports.mapValues = mapValues;
2305
+ exports.maxBy = maxBy;
2306
+ exports.meanBy = meanBy;
2307
+ exports.merge = merge;
2308
+ exports.mergeAll = mergeAll;
2309
+ exports.mergeDeep = mergeDeep;
2310
+ exports.minBy = minBy;
2311
+ exports.multiply = multiply;
2312
+ exports.noop = noop;
2313
+ exports.nthBy = nthBy;
2314
+ exports.omit = omit;
2315
+ exports.omitBy = omitBy;
2316
+ exports.once = once;
2317
+ exports.only = only;
2318
+ exports.partition = partition;
2319
+ exports.pathOr = pathOr;
2320
+ exports.pick = pick;
2321
+ exports.pickBy = pickBy;
2322
+ exports.pipe = pipe;
2323
+ exports.prop = prop;
2324
+ exports.purry = purry;
2325
+ exports.randomString = randomString;
2326
+ exports.range = range;
2327
+ exports.rankBy = rankBy;
2328
+ exports.reduce = reduce;
2329
+ exports.reject = reject;
2330
+ exports.reverse = reverse;
2331
+ exports.round = round;
2332
+ exports.sample = sample;
2333
+ exports.set = set;
2334
+ exports.setPath = setPath;
2335
+ exports.setPath_ = setPath_;
2336
+ exports.shuffle = shuffle;
2337
+ exports.sleep = sleep;
2338
+ exports.slugify = slugify;
2339
+ exports.sort = sort;
2340
+ exports.sortBy = sortBy;
2341
+ exports.sortedIndex = sortedIndex;
2342
+ exports.sortedIndexBy = sortedIndexBy;
2343
+ exports.sortedIndexWith = sortedIndexWith;
2344
+ exports.sortedLastIndex = sortedLastIndex;
2345
+ exports.splice = splice;
2346
+ exports.splitAt = splitAt;
2347
+ exports.splitByCase = splitByCase;
2348
+ exports.splitWhen = splitWhen;
2349
+ exports.stringToPath = stringToPath;
2350
+ exports.subtract = subtract;
2351
+ exports.sumBy = sumBy;
2352
+ exports.swapIndices = swapIndices;
2353
+ exports.swapProps = swapProps;
2354
+ exports.take = take;
2355
+ exports.takeFirstBy = takeFirstBy;
2356
+ exports.takeWhile = takeWhile;
2357
+ exports.times = times;
2358
+ exports.toCamelCase = toCamelCase;
2359
+ exports.toFlatCase = toFlatCase;
2360
+ exports.toKebabCase = toKebabCase;
2361
+ exports.toLowerFirst = toLowerFirst;
2362
+ exports.toPairs = toPairs;
2363
+ exports.toPascalCase = toPascalCase;
2364
+ exports.toSnakeCase = toSnakeCase;
2365
+ exports.toTitleCase = toTitleCase;
2366
+ exports.toTrainCase = toTrainCase;
2367
+ exports.toUpperFirst = toUpperFirst;
2368
+ exports.type = type;
2369
+ exports.uniq = uniq;
2370
+ exports.uniqBy = uniqBy;
2371
+ exports.uniqWith = uniqWith;
2372
+ exports.values = values;
2373
+ exports.zip = zip;
2374
+ exports.zipObj = zipObj;
2375
+ exports.zipWith = zipWith;