@blackglory/structures 0.6.4 → 0.6.7

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 (58) hide show
  1. package/README.md +35 -1
  2. package/dist/es2015/index.min.mjs +2 -2
  3. package/dist/es2015/index.min.mjs.map +1 -1
  4. package/dist/es2015/index.mjs +892 -384
  5. package/dist/es2015/index.mjs.map +1 -1
  6. package/dist/es2015/index.umd.js +892 -383
  7. package/dist/es2015/index.umd.js.map +1 -1
  8. package/dist/es2015/index.umd.min.js +2 -2
  9. package/dist/es2015/index.umd.min.js.map +1 -1
  10. package/dist/es2018/index.min.mjs +2 -2
  11. package/dist/es2018/index.min.mjs.map +1 -1
  12. package/dist/es2018/index.mjs +892 -384
  13. package/dist/es2018/index.mjs.map +1 -1
  14. package/dist/es2018/index.umd.js +892 -383
  15. package/dist/es2018/index.umd.js.map +1 -1
  16. package/dist/es2018/index.umd.min.js +2 -2
  17. package/dist/es2018/index.umd.min.js.map +1 -1
  18. package/lib/es2015/box.d.ts +1 -0
  19. package/lib/es2015/box.js +3 -0
  20. package/lib/es2015/box.js.map +1 -1
  21. package/lib/es2015/cons.js +6 -2
  22. package/lib/es2015/cons.js.map +1 -1
  23. package/lib/es2015/dynamic-typed-array.d.ts +23 -0
  24. package/lib/es2015/dynamic-typed-array.js +114 -0
  25. package/lib/es2015/dynamic-typed-array.js.map +1 -0
  26. package/lib/es2015/finite-state-machine.d.ts +1 -0
  27. package/lib/es2015/finite-state-machine.js +3 -0
  28. package/lib/es2015/finite-state-machine.js.map +1 -1
  29. package/lib/es2015/index.d.ts +1 -0
  30. package/lib/es2015/index.js +3 -0
  31. package/lib/es2015/index.js.map +1 -1
  32. package/lib/es2015/observable-finite-state-machine.d.ts +1 -0
  33. package/lib/es2015/observable-finite-state-machine.js +3 -0
  34. package/lib/es2015/observable-finite-state-machine.js.map +1 -1
  35. package/lib/es2015/sparse-set.d.ts +3 -2
  36. package/lib/es2015/sparse-set.js +3 -0
  37. package/lib/es2015/sparse-set.js.map +1 -1
  38. package/lib/es2018/box.d.ts +1 -0
  39. package/lib/es2018/box.js +3 -0
  40. package/lib/es2018/box.js.map +1 -1
  41. package/lib/es2018/cons.js +6 -2
  42. package/lib/es2018/cons.js.map +1 -1
  43. package/lib/es2018/dynamic-typed-array.d.ts +23 -0
  44. package/lib/es2018/dynamic-typed-array.js +114 -0
  45. package/lib/es2018/dynamic-typed-array.js.map +1 -0
  46. package/lib/es2018/finite-state-machine.d.ts +1 -0
  47. package/lib/es2018/finite-state-machine.js +3 -0
  48. package/lib/es2018/finite-state-machine.js.map +1 -1
  49. package/lib/es2018/index.d.ts +1 -0
  50. package/lib/es2018/index.js +3 -0
  51. package/lib/es2018/index.js.map +1 -1
  52. package/lib/es2018/observable-finite-state-machine.d.ts +1 -0
  53. package/lib/es2018/observable-finite-state-machine.js +3 -0
  54. package/lib/es2018/observable-finite-state-machine.js.map +1 -1
  55. package/lib/es2018/sparse-set.d.ts +3 -2
  56. package/lib/es2018/sparse-set.js +3 -0
  57. package/lib/es2018/sparse-set.js.map +1 -1
  58. package/package.json +3 -3
@@ -2,6 +2,9 @@ class Box {
2
2
  constructor(value) {
3
3
  this.value = value;
4
4
  }
5
+ get [Symbol.toStringTag]() {
6
+ return this.constructor.name;
7
+ }
5
8
  set(value) {
6
9
  this.value = value;
7
10
  }
@@ -10,10 +13,629 @@ class Box {
10
13
  }
11
14
  }
12
15
 
16
+ var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
17
+
18
+ var es2018$e = {};
19
+
20
+ var array$2 = {};
21
+
22
+ array$2.isntEmptyArray = array$2.isEmptyArray = array$2.isntArray = array$2.isArray = void 0;
23
+ function isArray$2(val) {
24
+ return Array.isArray(val);
25
+ }
26
+ array$2.isArray = isArray$2;
27
+ function isntArray$2(val) {
28
+ return !isArray$2(val);
29
+ }
30
+ array$2.isntArray = isntArray$2;
31
+ function isEmptyArray$2(val) {
32
+ return val.length === 0;
33
+ }
34
+ array$2.isEmptyArray = isEmptyArray$2;
35
+ function isntEmptyArray$2(val) {
36
+ return val.length !== 0;
37
+ }
38
+ array$2.isntEmptyArray = isntEmptyArray$2;
39
+
40
+ var asyncIterable$2 = {};
41
+
42
+ var _null$2 = {};
43
+
44
+ _null$2.isntNull = _null$2.isNull = void 0;
45
+ function isNull$2(val) {
46
+ return val === null;
47
+ }
48
+ _null$2.isNull = isNull$2;
49
+ function isntNull$2(val) {
50
+ return !isNull$2(val);
51
+ }
52
+ _null$2.isntNull = isntNull$2;
53
+
54
+ var _undefined$2 = {};
55
+
56
+ _undefined$2.isntUndefined = _undefined$2.isUndefined = void 0;
57
+ function isUndefined$2(val) {
58
+ return val === undefined;
59
+ }
60
+ _undefined$2.isUndefined = isUndefined$2;
61
+ function isntUndefined$2(val) {
62
+ return !isUndefined$2(val);
63
+ }
64
+ _undefined$2.isntUndefined = isntUndefined$2;
65
+
66
+ var _function$2 = {};
67
+
68
+ _function$2.isntFunction = _function$2.isFunction = void 0;
69
+ function isFunction$3(val) {
70
+ return typeof val === 'function';
71
+ }
72
+ _function$2.isFunction = isFunction$3;
73
+ function isntFunction$2(val) {
74
+ return !isFunction$3(val);
75
+ }
76
+ _function$2.isntFunction = isntFunction$2;
77
+
78
+ asyncIterable$2.isntAsyncIterable = asyncIterable$2.isAsyncIterable = void 0;
79
+ const null_1$7 = _null$2;
80
+ const undefined_1$6 = _undefined$2;
81
+ const function_1$5 = _function$2;
82
+ function isAsyncIterable$2(val) {
83
+ return (0, null_1$7.isntNull)(val)
84
+ && (0, undefined_1$6.isntUndefined)(val)
85
+ && (0, function_1$5.isFunction)(val[Symbol.asyncIterator]);
86
+ }
87
+ asyncIterable$2.isAsyncIterable = isAsyncIterable$2;
88
+ function isntAsyncIterable$2(val) {
89
+ return !isAsyncIterable$2(val);
90
+ }
91
+ asyncIterable$2.isntAsyncIterable = isntAsyncIterable$2;
92
+
93
+ var bigint$2 = {};
94
+
95
+ bigint$2.isntBigInt = bigint$2.isBigInt = void 0;
96
+ function isBigInt$2(val) {
97
+ return typeof val === 'bigint';
98
+ }
99
+ bigint$2.isBigInt = isBigInt$2;
100
+ function isntBigInt$2(val) {
101
+ return !isBigInt$2(val);
102
+ }
103
+ bigint$2.isntBigInt = isntBigInt$2;
104
+
105
+ var boolean$2 = {};
106
+
107
+ boolean$2.isntBoolean = boolean$2.isBoolean = void 0;
108
+ function isBoolean$2(val) {
109
+ return typeof val === 'boolean';
110
+ }
111
+ boolean$2.isBoolean = isBoolean$2;
112
+ function isntBoolean$2(val) {
113
+ return !isBoolean$2(val);
114
+ }
115
+ boolean$2.isntBoolean = isntBoolean$2;
116
+
117
+ var char$2 = {};
118
+
119
+ var string$2 = {};
120
+
121
+ string$2.isntString = string$2.isString = void 0;
122
+ function isString$2(val) {
123
+ return typeof val === 'string';
124
+ }
125
+ string$2.isString = isString$2;
126
+ function isntString$2(val) {
127
+ return !isString$2(val);
128
+ }
129
+ string$2.isntString = isntString$2;
130
+
131
+ char$2.isntChar = char$2.isChar = void 0;
132
+ const string_1$5 = string$2;
133
+ function isChar$2(val) {
134
+ return (0, string_1$5.isString)(val)
135
+ && val.length === 1;
136
+ }
137
+ char$2.isChar = isChar$2;
138
+ function isntChar$2(val) {
139
+ return !isChar$2(val);
140
+ }
141
+ char$2.isntChar = isntChar$2;
142
+
143
+ var date$2 = {};
144
+
145
+ date$2.isntDate = date$2.isDate = void 0;
146
+ function isDate$2(val) {
147
+ return val instanceof Date;
148
+ }
149
+ date$2.isDate = isDate$2;
150
+ function isntDate$2(val) {
151
+ return !isDate$2(val);
152
+ }
153
+ date$2.isntDate = isntDate$2;
154
+
155
+ var _enum$2 = {};
156
+
157
+ _enum$2.inEnum = void 0;
158
+ function inEnum$2(val, _enum) {
159
+ return Object.values(_enum).includes(val);
160
+ }
161
+ _enum$2.inEnum = inEnum$2;
162
+
163
+ var error$2 = {};
164
+
165
+ error$2.isntError = error$2.isError = void 0;
166
+ function isError$2(val) {
167
+ return val instanceof Error;
168
+ }
169
+ error$2.isError = isError$2;
170
+ function isntError$2(val) {
171
+ return !isError$2(val);
172
+ }
173
+ error$2.isntError = isntError$2;
174
+
175
+ var falsy$2 = {};
176
+
177
+ falsy$2.isntFalsy = falsy$2.isFalsy = void 0;
178
+ function isFalsy$2(val) {
179
+ return !val;
180
+ }
181
+ falsy$2.isFalsy = isFalsy$2;
182
+ function isntFalsy$2(val) {
183
+ return !isFalsy$2(val);
184
+ }
185
+ falsy$2.isntFalsy = isntFalsy$2;
186
+
187
+ var iterable$2 = {};
188
+
189
+ iterable$2.isntIterable = iterable$2.isIterable = void 0;
190
+ const null_1$6 = _null$2;
191
+ const undefined_1$5 = _undefined$2;
192
+ const function_1$4 = _function$2;
193
+ function isIterable$2(val) {
194
+ return (0, null_1$6.isntNull)(val)
195
+ && (0, undefined_1$5.isntUndefined)(val)
196
+ && (0, function_1$4.isFunction)(val[Symbol.iterator]);
197
+ }
198
+ iterable$2.isIterable = isIterable$2;
199
+ function isntIterable$2(val) {
200
+ return !isIterable$2(val);
201
+ }
202
+ iterable$2.isntIterable = isntIterable$2;
203
+
204
+ var json$2 = {};
205
+
206
+ var number$2 = {};
207
+
208
+ number$2.isntNaN = number$2.isNaN = number$2.isNegativeInfinity = number$2.isPositiveInfinity = number$2.isFinite = number$2.isntNumber = number$2.isNumber = void 0;
209
+ function isNumber$2(val) {
210
+ return typeof val === 'number';
211
+ }
212
+ number$2.isNumber = isNumber$2;
213
+ function isntNumber$2(val) {
214
+ return !isNumber$2(val);
215
+ }
216
+ number$2.isntNumber = isntNumber$2;
217
+ function isFinite$1(val) {
218
+ return Number.isFinite(val);
219
+ }
220
+ number$2.isFinite = isFinite$1;
221
+ function isPositiveInfinity$1(val) {
222
+ return val === Infinity;
223
+ }
224
+ number$2.isPositiveInfinity = isPositiveInfinity$1;
225
+ function isNegativeInfinity$1(val) {
226
+ return val === -Infinity;
227
+ }
228
+ number$2.isNegativeInfinity = isNegativeInfinity$1;
229
+ function isNaN$1(val) {
230
+ return Number.isNaN(val);
231
+ }
232
+ number$2.isNaN = isNaN$1;
233
+ function isntNaN$1(val) {
234
+ return !isNaN$1(val);
235
+ }
236
+ number$2.isntNaN = isntNaN$1;
237
+
238
+ var object$2 = {};
239
+
240
+ /** Detect free variable `global` from Node.js. */
241
+
242
+ var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
243
+
244
+ var _freeGlobal = freeGlobal$1;
245
+
246
+ var freeGlobal = _freeGlobal;
247
+
248
+ /** Detect free variable `self`. */
249
+ var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
250
+
251
+ /** Used as a reference to the global object. */
252
+ var root$1 = freeGlobal || freeSelf || Function('return this')();
253
+
254
+ var _root = root$1;
255
+
256
+ var root = _root;
257
+
258
+ /** Built-in value references. */
259
+ var Symbol$3 = root.Symbol;
260
+
261
+ var _Symbol = Symbol$3;
262
+
263
+ var Symbol$2 = _Symbol;
264
+
265
+ /** Used for built-in method references. */
266
+ var objectProto$3 = Object.prototype;
267
+
268
+ /** Used to check objects for own properties. */
269
+ var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
270
+
271
+ /**
272
+ * Used to resolve the
273
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
274
+ * of values.
275
+ */
276
+ var nativeObjectToString$1 = objectProto$3.toString;
277
+
278
+ /** Built-in value references. */
279
+ var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
280
+
281
+ /**
282
+ * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
283
+ *
284
+ * @private
285
+ * @param {*} value The value to query.
286
+ * @returns {string} Returns the raw `toStringTag`.
287
+ */
288
+ function getRawTag$1(value) {
289
+ var isOwn = hasOwnProperty$2.call(value, symToStringTag$1),
290
+ tag = value[symToStringTag$1];
291
+
292
+ try {
293
+ value[symToStringTag$1] = undefined;
294
+ var unmasked = true;
295
+ } catch (e) {}
296
+
297
+ var result = nativeObjectToString$1.call(value);
298
+ if (unmasked) {
299
+ if (isOwn) {
300
+ value[symToStringTag$1] = tag;
301
+ } else {
302
+ delete value[symToStringTag$1];
303
+ }
304
+ }
305
+ return result;
306
+ }
307
+
308
+ var _getRawTag = getRawTag$1;
309
+
310
+ /** Used for built-in method references. */
311
+
312
+ var objectProto$2 = Object.prototype;
313
+
314
+ /**
315
+ * Used to resolve the
316
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
317
+ * of values.
318
+ */
319
+ var nativeObjectToString = objectProto$2.toString;
320
+
321
+ /**
322
+ * Converts `value` to a string using `Object.prototype.toString`.
323
+ *
324
+ * @private
325
+ * @param {*} value The value to convert.
326
+ * @returns {string} Returns the converted string.
327
+ */
328
+ function objectToString$2(value) {
329
+ return nativeObjectToString.call(value);
330
+ }
331
+
332
+ var _objectToString = objectToString$2;
333
+
334
+ var Symbol$1 = _Symbol,
335
+ getRawTag = _getRawTag,
336
+ objectToString$1 = _objectToString;
337
+
338
+ /** `Object#toString` result references. */
339
+ var nullTag = '[object Null]',
340
+ undefinedTag = '[object Undefined]';
341
+
342
+ /** Built-in value references. */
343
+ var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
344
+
345
+ /**
346
+ * The base implementation of `getTag` without fallbacks for buggy environments.
347
+ *
348
+ * @private
349
+ * @param {*} value The value to query.
350
+ * @returns {string} Returns the `toStringTag`.
351
+ */
352
+ function baseGetTag$1(value) {
353
+ if (value == null) {
354
+ return value === undefined ? undefinedTag : nullTag;
355
+ }
356
+ return (symToStringTag && symToStringTag in Object(value))
357
+ ? getRawTag(value)
358
+ : objectToString$1(value);
359
+ }
360
+
361
+ var _baseGetTag = baseGetTag$1;
362
+
363
+ /**
364
+ * Creates a unary function that invokes `func` with its argument transformed.
365
+ *
366
+ * @private
367
+ * @param {Function} func The function to wrap.
368
+ * @param {Function} transform The argument transform.
369
+ * @returns {Function} Returns the new function.
370
+ */
371
+
372
+ function overArg$2(func, transform) {
373
+ return function(arg) {
374
+ return func(transform(arg));
375
+ };
376
+ }
377
+
378
+ var _overArg = overArg$2;
379
+
380
+ var overArg$1 = _overArg;
381
+
382
+ /** Built-in value references. */
383
+ var getPrototype$2 = overArg$1(Object.getPrototypeOf, Object);
384
+
385
+ var _getPrototype = getPrototype$2;
386
+
387
+ /**
388
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
389
+ * and has a `typeof` result of "object".
390
+ *
391
+ * @static
392
+ * @memberOf _
393
+ * @since 4.0.0
394
+ * @category Lang
395
+ * @param {*} value The value to check.
396
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
397
+ * @example
398
+ *
399
+ * _.isObjectLike({});
400
+ * // => true
401
+ *
402
+ * _.isObjectLike([1, 2, 3]);
403
+ * // => true
404
+ *
405
+ * _.isObjectLike(_.noop);
406
+ * // => false
407
+ *
408
+ * _.isObjectLike(null);
409
+ * // => false
410
+ */
411
+
412
+ function isObjectLike$2(value) {
413
+ return value != null && typeof value == 'object';
414
+ }
415
+
416
+ var isObjectLike_1 = isObjectLike$2;
417
+
418
+ var baseGetTag = _baseGetTag,
419
+ getPrototype$1 = _getPrototype,
420
+ isObjectLike$1 = isObjectLike_1;
421
+
422
+ /** `Object#toString` result references. */
423
+ var objectTag$1 = '[object Object]';
424
+
425
+ /** Used for built-in method references. */
426
+ var funcProto$1 = Function.prototype,
427
+ objectProto$1 = Object.prototype;
428
+
429
+ /** Used to resolve the decompiled source of functions. */
430
+ var funcToString$1 = funcProto$1.toString;
431
+
432
+ /** Used to check objects for own properties. */
433
+ var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
434
+
435
+ /** Used to infer the `Object` constructor. */
436
+ var objectCtorString$1 = funcToString$1.call(Object);
437
+
438
+ /**
439
+ * Checks if `value` is a plain object, that is, an object created by the
440
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
441
+ *
442
+ * @static
443
+ * @memberOf _
444
+ * @since 0.8.0
445
+ * @category Lang
446
+ * @param {*} value The value to check.
447
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
448
+ * @example
449
+ *
450
+ * function Foo() {
451
+ * this.a = 1;
452
+ * }
453
+ *
454
+ * _.isPlainObject(new Foo);
455
+ * // => false
456
+ *
457
+ * _.isPlainObject([1, 2, 3]);
458
+ * // => false
459
+ *
460
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
461
+ * // => true
462
+ *
463
+ * _.isPlainObject(Object.create(null));
464
+ * // => true
465
+ */
466
+ function isPlainObject$4(value) {
467
+ if (!isObjectLike$1(value) || baseGetTag(value) != objectTag$1) {
468
+ return false;
469
+ }
470
+ var proto = getPrototype$1(value);
471
+ if (proto === null) {
472
+ return true;
473
+ }
474
+ var Ctor = hasOwnProperty$1.call(proto, 'constructor') && proto.constructor;
475
+ return typeof Ctor == 'function' && Ctor instanceof Ctor &&
476
+ funcToString$1.call(Ctor) == objectCtorString$1;
477
+ }
478
+
479
+ var isPlainObject_1$2 = isPlainObject$4;
480
+
481
+ var __importDefault$2 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
482
+ return (mod && mod.__esModule) ? mod : { "default": mod };
483
+ };object$2.isntEmptyObject = object$2.isEmptyObject = object$2.isntPlainObject = object$2.isPlainObject = object$2.isntObject = object$2.isObject = void 0;
484
+ const isPlainObject_1$1 = __importDefault$2(isPlainObject_1$2);
485
+ function isObject$2(val) {
486
+ return val !== null
487
+ && typeof val === 'object';
488
+ }
489
+ object$2.isObject = isObject$2;
490
+ function isntObject$2(val) {
491
+ return !isObject$2(val);
492
+ }
493
+ object$2.isntObject = isntObject$2;
494
+ function isPlainObject$3(val) {
495
+ return (0, isPlainObject_1$1.default)(val);
496
+ }
497
+ object$2.isPlainObject = isPlainObject$3;
498
+ function isntPlainObject$2(val) {
499
+ return !isPlainObject$3(val);
500
+ }
501
+ object$2.isntPlainObject = isntPlainObject$2;
502
+ function isEmptyObject$2(val) {
503
+ return Object.keys(val).length === 0;
504
+ }
505
+ object$2.isEmptyObject = isEmptyObject$2;
506
+ function isntEmptyObject$2(val) {
507
+ return Object.keys(val).length !== 0;
508
+ }
509
+ object$2.isntEmptyObject = isntEmptyObject$2;
510
+
511
+ json$2.isntJsonable = json$2.isJsonable = json$2.isntJson = json$2.isJson = void 0;
512
+ const null_1$5 = _null$2;
513
+ const boolean_1$1 = boolean$2;
514
+ const string_1$4 = string$2;
515
+ const number_1$2 = number$2;
516
+ const array_1$2 = array$2;
517
+ const object_1$4 = object$2;
518
+ function isJson$2(val) {
519
+ return (0, null_1$5.isNull)(val)
520
+ || (0, boolean_1$1.isBoolean)(val)
521
+ || (0, string_1$4.isString)(val)
522
+ || (0, number_1$2.isNumber)(val)
523
+ || ((0, array_1$2.isArray)(val) && val.every(isJson$2))
524
+ || ((0, object_1$4.isPlainObject)(val) && Object.values(val).every(isJson$2));
525
+ }
526
+ json$2.isJson = isJson$2;
527
+ function isntJson$2(val) {
528
+ return !isJson$2(val);
529
+ }
530
+ json$2.isntJson = isntJson$2;
531
+ function isJsonable$1(val) {
532
+ try {
533
+ JSON.stringify(val);
534
+ return true;
535
+ }
536
+ catch (_a) {
537
+ return false;
538
+ }
539
+ }
540
+ json$2.isJsonable = isJsonable$1;
541
+ function isntJsonable$1(val) {
542
+ return !isntJsonable$1();
543
+ }
544
+ json$2.isntJsonable = isntJsonable$1;
545
+
546
+ var promise$1 = {};
547
+
548
+ promise$1.isPromiseLike = promise$1.isntPromiseLike = promise$1.isntPromise = promise$1.isPromise = void 0;
549
+ const object_1$3 = object$2;
550
+ const function_1$3 = _function$2;
551
+ function isPromise$1(val) {
552
+ return val instanceof Promise;
553
+ }
554
+ promise$1.isPromise = isPromise$1;
555
+ function isntPromise$1(val) {
556
+ return !isPromise$1(val);
557
+ }
558
+ promise$1.isntPromise = isntPromise$1;
559
+ function isntPromiseLike$1(val) {
560
+ return !isPromiseLike$1(val);
561
+ }
562
+ promise$1.isntPromiseLike = isntPromiseLike$1;
563
+ function isPromiseLike$1(val) {
564
+ return (0, object_1$3.isObject)(val)
565
+ && (0, function_1$3.isFunction)(val.then);
566
+ }
567
+ promise$1.isPromiseLike = isPromiseLike$1;
568
+
569
+ var url$2 = {};
570
+
571
+ url$2.isAbsoluteURL = void 0;
572
+ function isAbsoluteURL$2(str) {
573
+ try {
574
+ new URL(str);
575
+ return true;
576
+ }
577
+ catch (_a) {
578
+ return false;
579
+ }
580
+ }
581
+ url$2.isAbsoluteURL = isAbsoluteURL$2;
582
+
583
+ var regexp = {};
584
+
585
+ regexp.isntRegExp = regexp.isRegExp = void 0;
586
+ function isRegExp(val) {
587
+ return val instanceof RegExp;
588
+ }
589
+ regexp.isRegExp = isRegExp;
590
+ function isntRegExp(val) {
591
+ return !isRegExp(val);
592
+ }
593
+ regexp.isntRegExp = isntRegExp;
594
+
595
+ (function (exports) {
596
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
597
+ if (k2 === undefined) k2 = k;
598
+ var desc = Object.getOwnPropertyDescriptor(m, k);
599
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
600
+ desc = { enumerable: true, get: function() { return m[k]; } };
601
+ }
602
+ Object.defineProperty(o, k2, desc);
603
+ }) : (function(o, m, k, k2) {
604
+ if (k2 === undefined) k2 = k;
605
+ o[k2] = m[k];
606
+ }));
607
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
608
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
609
+ };__exportStar(array$2, exports);
610
+ __exportStar(asyncIterable$2, exports);
611
+ __exportStar(bigint$2, exports);
612
+ __exportStar(boolean$2, exports);
613
+ __exportStar(char$2, exports);
614
+ __exportStar(date$2, exports);
615
+ __exportStar(_enum$2, exports);
616
+ __exportStar(error$2, exports);
617
+ __exportStar(falsy$2, exports);
618
+ __exportStar(_function$2, exports);
619
+ __exportStar(iterable$2, exports);
620
+ __exportStar(json$2, exports);
621
+ __exportStar(_null$2, exports);
622
+ __exportStar(number$2, exports);
623
+ __exportStar(object$2, exports);
624
+ __exportStar(promise$1, exports);
625
+ __exportStar(string$2, exports);
626
+ __exportStar(_undefined$2, exports);
627
+ __exportStar(url$2, exports);
628
+ __exportStar(regexp, exports);
629
+
630
+ } (es2018$e));
631
+
13
632
  function convertConsToArray([value, next]) {
14
- if (next === null)
633
+ if (es2018$e.isNull(next)) {
15
634
  return [value];
16
- return [value, ...convertConsToArray(next)];
635
+ }
636
+ else {
637
+ return [value, ...convertConsToArray(next)];
638
+ }
17
639
  }
18
640
  function convertArrayToCons([value, ...next]) {
19
641
  return [value, next.length ? convertArrayToCons(next) : null];
@@ -147,8 +769,6 @@ class Queue {
147
769
  }
148
770
  }
149
771
 
150
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
151
-
152
772
  var es2018$d = {};
153
773
 
154
774
  var customError$2 = {};
@@ -494,7 +1114,7 @@ var object$1 = {};
494
1114
  */
495
1115
 
496
1116
  /** `Object#toString` result references. */
497
- var objectTag$1 = '[object Object]';
1117
+ var objectTag = '[object Object]';
498
1118
 
499
1119
  /**
500
1120
  * Checks if `value` is a host object in IE < 9.
@@ -523,34 +1143,34 @@ function isHostObject(value) {
523
1143
  * @param {Function} transform The argument transform.
524
1144
  * @returns {Function} Returns the new function.
525
1145
  */
526
- function overArg$2(func, transform) {
1146
+ function overArg(func, transform) {
527
1147
  return function(arg) {
528
1148
  return func(transform(arg));
529
1149
  };
530
1150
  }
531
1151
 
532
1152
  /** Used for built-in method references. */
533
- var funcProto$1 = Function.prototype,
534
- objectProto$3 = Object.prototype;
1153
+ var funcProto = Function.prototype,
1154
+ objectProto = Object.prototype;
535
1155
 
536
1156
  /** Used to resolve the decompiled source of functions. */
537
- var funcToString$1 = funcProto$1.toString;
1157
+ var funcToString = funcProto.toString;
538
1158
 
539
1159
  /** Used to check objects for own properties. */
540
- var hasOwnProperty$2 = objectProto$3.hasOwnProperty;
1160
+ var hasOwnProperty = objectProto.hasOwnProperty;
541
1161
 
542
1162
  /** Used to infer the `Object` constructor. */
543
- var objectCtorString$1 = funcToString$1.call(Object);
1163
+ var objectCtorString = funcToString.call(Object);
544
1164
 
545
1165
  /**
546
1166
  * Used to resolve the
547
1167
  * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
548
1168
  * of values.
549
1169
  */
550
- var objectToString$2 = objectProto$3.toString;
1170
+ var objectToString = objectProto.toString;
551
1171
 
552
1172
  /** Built-in value references. */
553
- var getPrototype$2 = overArg$2(Object.getPrototypeOf, Object);
1173
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
554
1174
 
555
1175
  /**
556
1176
  * Checks if `value` is object-like. A value is object-like if it's not `null`
@@ -576,7 +1196,7 @@ var getPrototype$2 = overArg$2(Object.getPrototypeOf, Object);
576
1196
  * _.isObjectLike(null);
577
1197
  * // => false
578
1198
  */
579
- function isObjectLike$2(value) {
1199
+ function isObjectLike(value) {
580
1200
  return !!value && typeof value == 'object';
581
1201
  }
582
1202
 
@@ -608,21 +1228,21 @@ function isObjectLike$2(value) {
608
1228
  * _.isPlainObject(Object.create(null));
609
1229
  * // => true
610
1230
  */
611
- function isPlainObject$3(value) {
612
- if (!isObjectLike$2(value) ||
613
- objectToString$2.call(value) != objectTag$1 || isHostObject(value)) {
1231
+ function isPlainObject$2(value) {
1232
+ if (!isObjectLike(value) ||
1233
+ objectToString.call(value) != objectTag || isHostObject(value)) {
614
1234
  return false;
615
1235
  }
616
- var proto = getPrototype$2(value);
1236
+ var proto = getPrototype(value);
617
1237
  if (proto === null) {
618
1238
  return true;
619
1239
  }
620
- var Ctor = hasOwnProperty$2.call(proto, 'constructor') && proto.constructor;
1240
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
621
1241
  return (typeof Ctor == 'function' &&
622
- Ctor instanceof Ctor && funcToString$1.call(Ctor) == objectCtorString$1);
1242
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
623
1243
  }
624
1244
 
625
- var lodash_isplainobject = isPlainObject$3;
1245
+ var lodash_isplainobject = isPlainObject$2;
626
1246
 
627
1247
  var __importDefault$1 = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
628
1248
  return (mod && mod.__esModule) ? mod : { "default": mod };
@@ -637,12 +1257,12 @@ function isntObject$1(val) {
637
1257
  return !isObject$1(val);
638
1258
  }
639
1259
  object$1.isntObject = isntObject$1;
640
- function isPlainObject$2(val) {
1260
+ function isPlainObject$1(val) {
641
1261
  return (0, lodash_isplainobject_1.default)(val);
642
1262
  }
643
- object$1.isPlainObject = isPlainObject$2;
1263
+ object$1.isPlainObject = isPlainObject$1;
644
1264
  function isntPlainObject$1(val) {
645
- return !isPlainObject$2(val);
1265
+ return !isPlainObject$1(val);
646
1266
  }
647
1267
  object$1.isntPlainObject = isntPlainObject$1;
648
1268
  function isEmptyObject$1(val) {
@@ -4797,387 +5417,146 @@ function isntBigInt(val) {
4797
5417
  return !isBigInt(val);
4798
5418
  }
4799
5419
  bigint.isntBigInt = isntBigInt;
4800
-
4801
- var boolean = {};
4802
-
4803
- boolean.isntBoolean = boolean.isBoolean = void 0;
4804
- function isBoolean(val) {
4805
- return typeof val === 'boolean';
4806
- }
4807
- boolean.isBoolean = isBoolean;
4808
- function isntBoolean(val) {
4809
- return !isBoolean(val);
4810
- }
4811
- boolean.isntBoolean = isntBoolean;
4812
-
4813
- var char = {};
4814
-
4815
- var string = {};
4816
-
4817
- string.isntString = string.isString = void 0;
4818
- function isString(val) {
4819
- return typeof val === 'string';
4820
- }
4821
- string.isString = isString;
4822
- function isntString(val) {
4823
- return !isString(val);
4824
- }
4825
- string.isntString = isntString;
4826
-
4827
- char.isntChar = char.isChar = void 0;
4828
- const string_1$1 = string;
4829
- function isChar(val) {
4830
- return (0, string_1$1.isString)(val)
4831
- && val.length === 1;
4832
- }
4833
- char.isChar = isChar;
4834
- function isntChar(val) {
4835
- return !isChar(val);
4836
- }
4837
- char.isntChar = isntChar;
4838
-
4839
- var date = {};
4840
-
4841
- date.isntDate = date.isDate = void 0;
4842
- function isDate(val) {
4843
- return val instanceof Date;
4844
- }
4845
- date.isDate = isDate;
4846
- function isntDate(val) {
4847
- return !isDate(val);
4848
- }
4849
- date.isntDate = isntDate;
4850
-
4851
- var _enum = {};
4852
-
4853
- _enum.inEnum = void 0;
4854
- function inEnum(val, _enum) {
4855
- return Object.values(_enum).includes(val);
4856
- }
4857
- _enum.inEnum = inEnum;
4858
-
4859
- var error = {};
4860
-
4861
- error.isntError = error.isError = void 0;
4862
- function isError(val) {
4863
- return val instanceof Error;
4864
- }
4865
- error.isError = isError;
4866
- function isntError(val) {
4867
- return !isError(val);
4868
- }
4869
- error.isntError = isntError;
4870
-
4871
- var falsy = {};
4872
-
4873
- falsy.isntFalsy = falsy.isFalsy = void 0;
4874
- function isFalsy(val) {
4875
- return !val;
4876
- }
4877
- falsy.isFalsy = isFalsy;
4878
- function isntFalsy(val) {
4879
- return !isFalsy(val);
4880
- }
4881
- falsy.isntFalsy = isntFalsy;
4882
-
4883
- var iterable = {};
4884
-
4885
- iterable.isntIterable = iterable.isIterable = void 0;
4886
- const null_1$1 = _null;
4887
- const undefined_1 = _undefined;
4888
- const function_1$1 = _function;
4889
- function isIterable(val) {
4890
- return (0, null_1$1.isntNull)(val)
4891
- && (0, undefined_1.isntUndefined)(val)
4892
- && (0, function_1$1.isFunction)(val[Symbol.iterator]);
4893
- }
4894
- iterable.isIterable = isIterable;
4895
- function isntIterable(val) {
4896
- return !isIterable(val);
4897
- }
4898
- iterable.isntIterable = isntIterable;
4899
-
4900
- var json = {};
4901
-
4902
- var number = {};
4903
-
4904
- number.isntNaN = number.isNaN = number.isNegativeInfinity = number.isPositiveInfinity = number.isFinite = number.isntNumber = number.isNumber = void 0;
4905
- function isNumber(val) {
4906
- return typeof val === 'number';
4907
- }
4908
- number.isNumber = isNumber;
4909
- function isntNumber(val) {
4910
- return !isNumber(val);
4911
- }
4912
- number.isntNumber = isntNumber;
4913
- function isFinite(val) {
4914
- return Number.isFinite(val);
4915
- }
4916
- number.isFinite = isFinite;
4917
- function isPositiveInfinity(val) {
4918
- return val === Infinity;
4919
- }
4920
- number.isPositiveInfinity = isPositiveInfinity;
4921
- function isNegativeInfinity(val) {
4922
- return val === -Infinity;
4923
- }
4924
- number.isNegativeInfinity = isNegativeInfinity;
4925
- function isNaN(val) {
4926
- return Number.isNaN(val);
4927
- }
4928
- number.isNaN = isNaN;
4929
- function isntNaN(val) {
4930
- return !isNaN(val);
4931
- }
4932
- number.isntNaN = isntNaN;
4933
-
4934
- var object = {};
4935
-
4936
- /** Detect free variable `global` from Node.js. */
4937
-
4938
- var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
4939
-
4940
- var _freeGlobal = freeGlobal$1;
4941
-
4942
- var freeGlobal = _freeGlobal;
4943
-
4944
- /** Detect free variable `self`. */
4945
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
4946
-
4947
- /** Used as a reference to the global object. */
4948
- var root$1 = freeGlobal || freeSelf || Function('return this')();
4949
-
4950
- var _root = root$1;
4951
-
4952
- var root = _root;
4953
-
4954
- /** Built-in value references. */
4955
- var Symbol$3 = root.Symbol;
4956
-
4957
- var _Symbol = Symbol$3;
4958
-
4959
- var Symbol$2 = _Symbol;
4960
-
4961
- /** Used for built-in method references. */
4962
- var objectProto$2 = Object.prototype;
4963
-
4964
- /** Used to check objects for own properties. */
4965
- var hasOwnProperty$1 = objectProto$2.hasOwnProperty;
4966
-
4967
- /**
4968
- * Used to resolve the
4969
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
4970
- * of values.
4971
- */
4972
- var nativeObjectToString$1 = objectProto$2.toString;
4973
-
4974
- /** Built-in value references. */
4975
- var symToStringTag$1 = Symbol$2 ? Symbol$2.toStringTag : undefined;
4976
-
4977
- /**
4978
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
4979
- *
4980
- * @private
4981
- * @param {*} value The value to query.
4982
- * @returns {string} Returns the raw `toStringTag`.
4983
- */
4984
- function getRawTag$1(value) {
4985
- var isOwn = hasOwnProperty$1.call(value, symToStringTag$1),
4986
- tag = value[symToStringTag$1];
4987
-
4988
- try {
4989
- value[symToStringTag$1] = undefined;
4990
- var unmasked = true;
4991
- } catch (e) {}
4992
-
4993
- var result = nativeObjectToString$1.call(value);
4994
- if (unmasked) {
4995
- if (isOwn) {
4996
- value[symToStringTag$1] = tag;
4997
- } else {
4998
- delete value[symToStringTag$1];
4999
- }
5000
- }
5001
- return result;
5002
- }
5003
-
5004
- var _getRawTag = getRawTag$1;
5005
-
5006
- /** Used for built-in method references. */
5007
-
5008
- var objectProto$1 = Object.prototype;
5009
-
5010
- /**
5011
- * Used to resolve the
5012
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
5013
- * of values.
5014
- */
5015
- var nativeObjectToString = objectProto$1.toString;
5016
-
5017
- /**
5018
- * Converts `value` to a string using `Object.prototype.toString`.
5019
- *
5020
- * @private
5021
- * @param {*} value The value to convert.
5022
- * @returns {string} Returns the converted string.
5023
- */
5024
- function objectToString$1(value) {
5025
- return nativeObjectToString.call(value);
5026
- }
5027
-
5028
- var _objectToString = objectToString$1;
5029
-
5030
- var Symbol$1 = _Symbol,
5031
- getRawTag = _getRawTag,
5032
- objectToString = _objectToString;
5033
-
5034
- /** `Object#toString` result references. */
5035
- var nullTag = '[object Null]',
5036
- undefinedTag = '[object Undefined]';
5037
-
5038
- /** Built-in value references. */
5039
- var symToStringTag = Symbol$1 ? Symbol$1.toStringTag : undefined;
5040
-
5041
- /**
5042
- * The base implementation of `getTag` without fallbacks for buggy environments.
5043
- *
5044
- * @private
5045
- * @param {*} value The value to query.
5046
- * @returns {string} Returns the `toStringTag`.
5047
- */
5048
- function baseGetTag$1(value) {
5049
- if (value == null) {
5050
- return value === undefined ? undefinedTag : nullTag;
5051
- }
5052
- return (symToStringTag && symToStringTag in Object(value))
5053
- ? getRawTag(value)
5054
- : objectToString(value);
5420
+
5421
+ var boolean = {};
5422
+
5423
+ boolean.isntBoolean = boolean.isBoolean = void 0;
5424
+ function isBoolean(val) {
5425
+ return typeof val === 'boolean';
5426
+ }
5427
+ boolean.isBoolean = isBoolean;
5428
+ function isntBoolean(val) {
5429
+ return !isBoolean(val);
5055
5430
  }
5431
+ boolean.isntBoolean = isntBoolean;
5056
5432
 
5057
- var _baseGetTag = baseGetTag$1;
5433
+ var char = {};
5058
5434
 
5059
- /**
5060
- * Creates a unary function that invokes `func` with its argument transformed.
5061
- *
5062
- * @private
5063
- * @param {Function} func The function to wrap.
5064
- * @param {Function} transform The argument transform.
5065
- * @returns {Function} Returns the new function.
5066
- */
5435
+ var string = {};
5067
5436
 
5068
- function overArg$1(func, transform) {
5069
- return function(arg) {
5070
- return func(transform(arg));
5071
- };
5437
+ string.isntString = string.isString = void 0;
5438
+ function isString(val) {
5439
+ return typeof val === 'string';
5072
5440
  }
5441
+ string.isString = isString;
5442
+ function isntString(val) {
5443
+ return !isString(val);
5444
+ }
5445
+ string.isntString = isntString;
5073
5446
 
5074
- var _overArg = overArg$1;
5075
-
5076
- var overArg = _overArg;
5447
+ char.isntChar = char.isChar = void 0;
5448
+ const string_1$1 = string;
5449
+ function isChar(val) {
5450
+ return (0, string_1$1.isString)(val)
5451
+ && val.length === 1;
5452
+ }
5453
+ char.isChar = isChar;
5454
+ function isntChar(val) {
5455
+ return !isChar(val);
5456
+ }
5457
+ char.isntChar = isntChar;
5077
5458
 
5078
- /** Built-in value references. */
5079
- var getPrototype$1 = overArg(Object.getPrototypeOf, Object);
5459
+ var date = {};
5080
5460
 
5081
- var _getPrototype = getPrototype$1;
5461
+ date.isntDate = date.isDate = void 0;
5462
+ function isDate(val) {
5463
+ return val instanceof Date;
5464
+ }
5465
+ date.isDate = isDate;
5466
+ function isntDate(val) {
5467
+ return !isDate(val);
5468
+ }
5469
+ date.isntDate = isntDate;
5082
5470
 
5083
- /**
5084
- * Checks if `value` is object-like. A value is object-like if it's not `null`
5085
- * and has a `typeof` result of "object".
5086
- *
5087
- * @static
5088
- * @memberOf _
5089
- * @since 4.0.0
5090
- * @category Lang
5091
- * @param {*} value The value to check.
5092
- * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
5093
- * @example
5094
- *
5095
- * _.isObjectLike({});
5096
- * // => true
5097
- *
5098
- * _.isObjectLike([1, 2, 3]);
5099
- * // => true
5100
- *
5101
- * _.isObjectLike(_.noop);
5102
- * // => false
5103
- *
5104
- * _.isObjectLike(null);
5105
- * // => false
5106
- */
5471
+ var _enum = {};
5107
5472
 
5108
- function isObjectLike$1(value) {
5109
- return value != null && typeof value == 'object';
5473
+ _enum.inEnum = void 0;
5474
+ function inEnum(val, _enum) {
5475
+ return Object.values(_enum).includes(val);
5110
5476
  }
5477
+ _enum.inEnum = inEnum;
5111
5478
 
5112
- var isObjectLike_1 = isObjectLike$1;
5479
+ var error = {};
5113
5480
 
5114
- var baseGetTag = _baseGetTag,
5115
- getPrototype = _getPrototype,
5116
- isObjectLike = isObjectLike_1;
5481
+ error.isntError = error.isError = void 0;
5482
+ function isError(val) {
5483
+ return val instanceof Error;
5484
+ }
5485
+ error.isError = isError;
5486
+ function isntError(val) {
5487
+ return !isError(val);
5488
+ }
5489
+ error.isntError = isntError;
5117
5490
 
5118
- /** `Object#toString` result references. */
5119
- var objectTag = '[object Object]';
5491
+ var falsy = {};
5120
5492
 
5121
- /** Used for built-in method references. */
5122
- var funcProto = Function.prototype,
5123
- objectProto = Object.prototype;
5493
+ falsy.isntFalsy = falsy.isFalsy = void 0;
5494
+ function isFalsy(val) {
5495
+ return !val;
5496
+ }
5497
+ falsy.isFalsy = isFalsy;
5498
+ function isntFalsy(val) {
5499
+ return !isFalsy(val);
5500
+ }
5501
+ falsy.isntFalsy = isntFalsy;
5124
5502
 
5125
- /** Used to resolve the decompiled source of functions. */
5126
- var funcToString = funcProto.toString;
5503
+ var iterable = {};
5127
5504
 
5128
- /** Used to check objects for own properties. */
5129
- var hasOwnProperty = objectProto.hasOwnProperty;
5505
+ iterable.isntIterable = iterable.isIterable = void 0;
5506
+ const null_1$1 = _null;
5507
+ const undefined_1 = _undefined;
5508
+ const function_1$1 = _function;
5509
+ function isIterable(val) {
5510
+ return (0, null_1$1.isntNull)(val)
5511
+ && (0, undefined_1.isntUndefined)(val)
5512
+ && (0, function_1$1.isFunction)(val[Symbol.iterator]);
5513
+ }
5514
+ iterable.isIterable = isIterable;
5515
+ function isntIterable(val) {
5516
+ return !isIterable(val);
5517
+ }
5518
+ iterable.isntIterable = isntIterable;
5130
5519
 
5131
- /** Used to infer the `Object` constructor. */
5132
- var objectCtorString = funcToString.call(Object);
5520
+ var json = {};
5133
5521
 
5134
- /**
5135
- * Checks if `value` is a plain object, that is, an object created by the
5136
- * `Object` constructor or one with a `[[Prototype]]` of `null`.
5137
- *
5138
- * @static
5139
- * @memberOf _
5140
- * @since 0.8.0
5141
- * @category Lang
5142
- * @param {*} value The value to check.
5143
- * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
5144
- * @example
5145
- *
5146
- * function Foo() {
5147
- * this.a = 1;
5148
- * }
5149
- *
5150
- * _.isPlainObject(new Foo);
5151
- * // => false
5152
- *
5153
- * _.isPlainObject([1, 2, 3]);
5154
- * // => false
5155
- *
5156
- * _.isPlainObject({ 'x': 0, 'y': 0 });
5157
- * // => true
5158
- *
5159
- * _.isPlainObject(Object.create(null));
5160
- * // => true
5161
- */
5162
- function isPlainObject$1(value) {
5163
- if (!isObjectLike(value) || baseGetTag(value) != objectTag) {
5164
- return false;
5165
- }
5166
- var proto = getPrototype(value);
5167
- if (proto === null) {
5168
- return true;
5169
- }
5170
- var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
5171
- return typeof Ctor == 'function' && Ctor instanceof Ctor &&
5172
- funcToString.call(Ctor) == objectCtorString;
5522
+ var number = {};
5523
+
5524
+ number.isntNaN = number.isNaN = number.isNegativeInfinity = number.isPositiveInfinity = number.isFinite = number.isntNumber = number.isNumber = void 0;
5525
+ function isNumber(val) {
5526
+ return typeof val === 'number';
5527
+ }
5528
+ number.isNumber = isNumber;
5529
+ function isntNumber(val) {
5530
+ return !isNumber(val);
5531
+ }
5532
+ number.isntNumber = isntNumber;
5533
+ function isFinite(val) {
5534
+ return Number.isFinite(val);
5535
+ }
5536
+ number.isFinite = isFinite;
5537
+ function isPositiveInfinity(val) {
5538
+ return val === Infinity;
5539
+ }
5540
+ number.isPositiveInfinity = isPositiveInfinity;
5541
+ function isNegativeInfinity(val) {
5542
+ return val === -Infinity;
5543
+ }
5544
+ number.isNegativeInfinity = isNegativeInfinity;
5545
+ function isNaN(val) {
5546
+ return Number.isNaN(val);
5547
+ }
5548
+ number.isNaN = isNaN;
5549
+ function isntNaN(val) {
5550
+ return !isNaN(val);
5173
5551
  }
5552
+ number.isntNaN = isntNaN;
5174
5553
 
5175
- var isPlainObject_1$1 = isPlainObject$1;
5554
+ var object = {};
5176
5555
 
5177
5556
  var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
5178
5557
  return (mod && mod.__esModule) ? mod : { "default": mod };
5179
5558
  };object.isntEmptyObject = object.isEmptyObject = object.isntPlainObject = object.isPlainObject = object.isntObject = object.isObject = void 0;
5180
- const isPlainObject_1 = __importDefault(isPlainObject_1$1);
5559
+ const isPlainObject_1 = __importDefault(isPlainObject_1$2);
5181
5560
  function isObject(val) {
5182
5561
  return val !== null
5183
5562
  && typeof val === 'object';
@@ -7563,7 +7942,7 @@ class TrieMap {
7563
7942
  function* dfs(node, paths) {
7564
7943
  for (const [path, childNode] of node.children) {
7565
7944
  const newPaths = [...paths, path];
7566
- if (es2018$2.isntUndefined(childNode.value)) {
7945
+ if (es2018$e.isntUndefined(childNode.value)) {
7567
7946
  yield [newPaths, childNode.value];
7568
7947
  }
7569
7948
  yield* dfs(childNode, newPaths);
@@ -7641,6 +8020,9 @@ class FiniteStateMachine {
7641
8020
  this.schema = schema;
7642
8021
  this._state = initialState;
7643
8022
  }
8023
+ get [Symbol.toStringTag]() {
8024
+ return this.constructor.name;
8025
+ }
7644
8026
  get state() {
7645
8027
  return this._state;
7646
8028
  }
@@ -9239,6 +9621,9 @@ class ObservableFiniteStateMachine extends FiniteStateMachine {
9239
9621
  super(...arguments);
9240
9622
  this.stateChanges = new Subject();
9241
9623
  }
9624
+ get [Symbol.toStringTag]() {
9625
+ return this.constructor.name;
9626
+ }
9242
9627
  observeStateChanges() {
9243
9628
  return this.stateChanges;
9244
9629
  }
@@ -9250,7 +9635,7 @@ class ObservableFiniteStateMachine extends FiniteStateMachine {
9250
9635
  super.send(event);
9251
9636
  const newState = this.state;
9252
9637
  this.stateChanges.next({ event, oldState, newState });
9253
- if (es2018$2.isEmptyObject(this.schema[newState])) {
9638
+ if (es2018$e.isEmptyObject(this.schema[newState])) {
9254
9639
  this.stateChanges.complete();
9255
9640
  }
9256
9641
  }
@@ -9261,6 +9646,9 @@ class SparseSet {
9261
9646
  this.values = [];
9262
9647
  this.valueToValueIndex = [];
9263
9648
  }
9649
+ get [Symbol.toStringTag]() {
9650
+ return this.constructor.name;
9651
+ }
9264
9652
  *[Symbol.iterator]() {
9265
9653
  for (const value of this.values) {
9266
9654
  yield value;
@@ -9268,7 +9656,7 @@ class SparseSet {
9268
9656
  }
9269
9657
  has(value) {
9270
9658
  // 跟一般的实现不同, 不需要访问values数组.
9271
- return es2018$2.isntUndefined(this.valueToValueIndex[value]);
9659
+ return es2018$e.isntUndefined(this.valueToValueIndex[value]);
9272
9660
  }
9273
9661
  add(value) {
9274
9662
  if (!this.has(value)) {
@@ -9291,5 +9679,125 @@ class SparseSet {
9291
9679
  }
9292
9680
  }
9293
9681
 
9294
- export { BadEventError, Box, Emitter, ExpirableMap, FiniteStateMachine, HashMap, HashSet, LRUMap, ObservableFiniteStateMachine, Queue, SparseSet, TLRUMap, TrieMap, convertArrayToCons, convertConsToArray };
9682
+ // 相关提案: https://github.com/tc39/proposal-resizablearraybuffer
9683
+ class DynamicTypedArray {
9684
+ constructor(typedArrayConstructor, { capacity = 0, growthFactor = 1.5 } = {}) {
9685
+ this.typedArrayConstructor = typedArrayConstructor;
9686
+ this._length = 0;
9687
+ es2018$d.assert(Number.isInteger(capacity), 'capacity must be an integer');
9688
+ es2018$d.assert(capacity >= 0, 'capacity must be greater than or equal to 0');
9689
+ es2018$d.assert(growthFactor > 1, 'growthFactory must be greater than or equal to 1');
9690
+ this.array = new typedArrayConstructor(capacity);
9691
+ this.growthFactor = growthFactor;
9692
+ }
9693
+ get internalTypedArray() {
9694
+ return this.array;
9695
+ }
9696
+ get [Symbol.toStringTag]() {
9697
+ return this.constructor.name;
9698
+ }
9699
+ /**
9700
+ * 数组当前的容量.
9701
+ */
9702
+ get capacity() {
9703
+ return this.array.length;
9704
+ }
9705
+ /**
9706
+ * 数组逻辑上的长度, 总是小于或等于capacity.
9707
+ */
9708
+ get length() {
9709
+ return this._length;
9710
+ }
9711
+ set(index, value) {
9712
+ if (index >= this.capacity) {
9713
+ const newCapacity = computeNewCapacity(this.capacity, index + 1, this.growthFactor);
9714
+ this.resize(newCapacity);
9715
+ }
9716
+ if (index >= this._length) {
9717
+ this._length = index + 1;
9718
+ }
9719
+ this.array[index] = value;
9720
+ }
9721
+ get(index) {
9722
+ return index < this._length
9723
+ ? this.array[index]
9724
+ : undefined;
9725
+ }
9726
+ push(...values) {
9727
+ const newLength = this._length + values.length;
9728
+ if (newLength > this.capacity) {
9729
+ const newCapacity = computeNewCapacity(this.capacity, newLength, this.growthFactor);
9730
+ this.resize(newCapacity);
9731
+ }
9732
+ for (const value of values) {
9733
+ this.array[this._length++] = value;
9734
+ }
9735
+ }
9736
+ pop() {
9737
+ if (this._length > 0) {
9738
+ const value = this.array[this._length - 1];
9739
+ this._length--;
9740
+ const newCapacity = computeNewCapacity(this.capacity, this.length, this.growthFactor);
9741
+ this.resize(newCapacity);
9742
+ return value;
9743
+ }
9744
+ else {
9745
+ return undefined;
9746
+ }
9747
+ }
9748
+ resize(newCapacity) {
9749
+ if (this.array.length === newCapacity) {
9750
+ return;
9751
+ }
9752
+ else if (this.array.length < newCapacity) {
9753
+ const newArray = new this.typedArrayConstructor(newCapacity);
9754
+ newArray.set(this.array);
9755
+ this.array = newArray;
9756
+ }
9757
+ else if (this.array.length > newCapacity) {
9758
+ const newArray = new this.typedArrayConstructor(newCapacity);
9759
+ // 不需要的部分将被舍弃.
9760
+ for (let i = newCapacity; i--;) {
9761
+ newArray[i] = this.array[i];
9762
+ }
9763
+ this.array = newArray;
9764
+ }
9765
+ }
9766
+ }
9767
+ function computeNewCapacity(oldCapacity, targetLength, growthFactor) {
9768
+ if (oldCapacity === targetLength) {
9769
+ return targetLength;
9770
+ }
9771
+ else if (oldCapacity < targetLength) {
9772
+ // 增加容量以适配targetLength
9773
+ let newCapacity = Math.max(oldCapacity, 1);
9774
+ while (newCapacity < targetLength) {
9775
+ newCapacity *= growthFactor;
9776
+ }
9777
+ return Math.floor(newCapacity);
9778
+ }
9779
+ else {
9780
+ // 尝试减少容量以适配targetLength
9781
+ // `targetLength = 0`是特殊情况,
9782
+ // 此时无论怎么将oldCapacity除以growthFactory几次, 都不可能得到比targetLength小的结果.
9783
+ if (targetLength === 0) {
9784
+ return 0;
9785
+ }
9786
+ else {
9787
+ let newCapacity = oldCapacity;
9788
+ while (true) {
9789
+ const temp = newCapacity / growthFactor;
9790
+ if (temp < targetLength) {
9791
+ break;
9792
+ }
9793
+ else {
9794
+ newCapacity = temp;
9795
+ }
9796
+ }
9797
+ return Math.floor(newCapacity);
9798
+ }
9799
+ }
9800
+ }
9801
+
9802
+ export { BadEventError, Box, DynamicTypedArray, Emitter, ExpirableMap, FiniteStateMachine, HashMap, HashSet, LRUMap, ObservableFiniteStateMachine, Queue, SparseSet, TLRUMap, TrieMap, convertArrayToCons, convertConsToArray };
9295
9803
  //# sourceMappingURL=index.mjs.map