extra-request 3.0.2 → 5.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
2
2
 
3
- var es2018$2 = {};
3
+ var es2018$7 = {};
4
4
 
5
5
  var fetch_browser = {};
6
6
 
@@ -32,11 +32,6 @@ var abortController_browser = {};
32
32
  abortController_browser.AbortController = void 0;
33
33
  abortController_browser.AbortController = globalThis.AbortController;
34
34
 
35
- var abortError_browser = {};
36
-
37
- abortError_browser.AbortError = void 0;
38
- abortError_browser.AbortError = globalThis.DOMException;
39
-
40
35
  var blob_browser = {};
41
36
 
42
37
  blob_browser.Blob = void 0;
@@ -63,303 +58,450 @@ __exportStar(request_browser, exports);
63
58
  __exportStar(response_browser, exports);
64
59
  __exportStar(formData_browser, exports);
65
60
  __exportStar(abortController_browser, exports);
66
- __exportStar(abortError_browser, exports);
67
61
  __exportStar(blob_browser, exports);
68
62
  __exportStar(eventSource_browser, exports);
69
63
 
70
- }(es2018$2));
64
+ }(es2018$7));
71
65
 
72
- var es2018$1 = {};
66
+ var es2018$6 = {};
73
67
 
74
- var array = {};
68
+ var array$1 = {};
75
69
 
76
- array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
77
- function isArray(val) {
70
+ array$1.isntEmptyArray = array$1.isEmptyArray = array$1.isntArray = array$1.isArray = void 0;
71
+ function isArray$1(val) {
78
72
  return Array.isArray(val);
79
73
  }
80
- array.isArray = isArray;
81
- function isntArray(val) {
82
- return !isArray(val);
74
+ array$1.isArray = isArray$1;
75
+ function isntArray$1(val) {
76
+ return !isArray$1(val);
83
77
  }
84
- array.isntArray = isntArray;
85
- function isEmptyArray(val) {
78
+ array$1.isntArray = isntArray$1;
79
+ function isEmptyArray$1(val) {
86
80
  return val.length === 0;
87
81
  }
88
- array.isEmptyArray = isEmptyArray;
89
- function isntEmptyArray(val) {
82
+ array$1.isEmptyArray = isEmptyArray$1;
83
+ function isntEmptyArray$1(val) {
90
84
  return val.length !== 0;
91
85
  }
92
- array.isntEmptyArray = isntEmptyArray;
86
+ array$1.isntEmptyArray = isntEmptyArray$1;
93
87
 
94
- var asyncIterable = {};
88
+ var asyncIterable$1 = {};
95
89
 
96
- var _null = {};
90
+ var _null$1 = {};
97
91
 
98
- _null.isntNull = _null.isNull = void 0;
99
- function isNull(val) {
92
+ _null$1.isntNull = _null$1.isNull = void 0;
93
+ function isNull$1(val) {
100
94
  return val === null;
101
95
  }
102
- _null.isNull = isNull;
103
- function isntNull(val) {
104
- return !isNull(val);
96
+ _null$1.isNull = isNull$1;
97
+ function isntNull$1(val) {
98
+ return !isNull$1(val);
105
99
  }
106
- _null.isntNull = isntNull;
100
+ _null$1.isntNull = isntNull$1;
107
101
 
108
- var _undefined = {};
102
+ var _undefined$1 = {};
109
103
 
110
- _undefined.isntUndefined = _undefined.isUndefined = void 0;
111
- function isUndefined(val) {
104
+ _undefined$1.isntUndefined = _undefined$1.isUndefined = void 0;
105
+ function isUndefined$1(val) {
112
106
  return val === undefined;
113
107
  }
114
- _undefined.isUndefined = isUndefined;
115
- function isntUndefined(val) {
116
- return !isUndefined(val);
108
+ _undefined$1.isUndefined = isUndefined$1;
109
+ function isntUndefined$1(val) {
110
+ return !isUndefined$1(val);
117
111
  }
118
- _undefined.isntUndefined = isntUndefined;
112
+ _undefined$1.isntUndefined = isntUndefined$1;
119
113
 
120
- asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
121
- const null_1$1 = _null;
122
- const undefined_1$2 = _undefined;
123
- function isAsyncIterable(val) {
124
- return (0, null_1$1.isntNull)(val)
125
- && (0, undefined_1$2.isntUndefined)(val)
114
+ asyncIterable$1.isntAsyncIterable = asyncIterable$1.isAsyncIterable = void 0;
115
+ const null_1$3 = _null$1;
116
+ const undefined_1$5 = _undefined$1;
117
+ function isAsyncIterable$1(val) {
118
+ return (0, null_1$3.isntNull)(val)
119
+ && (0, undefined_1$5.isntUndefined)(val)
126
120
  && typeof val[Symbol.asyncIterator] === 'function';
127
121
  }
128
- asyncIterable.isAsyncIterable = isAsyncIterable;
129
- function isntAsyncIterable(val) {
130
- return !isAsyncIterable(val);
122
+ asyncIterable$1.isAsyncIterable = isAsyncIterable$1;
123
+ function isntAsyncIterable$1(val) {
124
+ return !isAsyncIterable$1(val);
131
125
  }
132
- asyncIterable.isntAsyncIterable = isntAsyncIterable;
126
+ asyncIterable$1.isntAsyncIterable = isntAsyncIterable$1;
133
127
 
134
- var bigint = {};
128
+ var bigint$1 = {};
135
129
 
136
- bigint.isntBigInt = bigint.isBigInt = void 0;
137
- function isBigInt(val) {
130
+ bigint$1.isntBigInt = bigint$1.isBigInt = void 0;
131
+ function isBigInt$1(val) {
138
132
  return typeof val === 'bigint';
139
133
  }
140
- bigint.isBigInt = isBigInt;
141
- function isntBigInt(val) {
142
- return !isBigInt(val);
134
+ bigint$1.isBigInt = isBigInt$1;
135
+ function isntBigInt$1(val) {
136
+ return !isBigInt$1(val);
143
137
  }
144
- bigint.isntBigInt = isntBigInt;
138
+ bigint$1.isntBigInt = isntBigInt$1;
145
139
 
146
- var boolean = {};
140
+ var boolean$1 = {};
147
141
 
148
- boolean.isntBoolean = boolean.isBoolean = void 0;
149
- function isBoolean(val) {
142
+ boolean$1.isntBoolean = boolean$1.isBoolean = void 0;
143
+ function isBoolean$1(val) {
150
144
  return typeof val === 'boolean';
151
145
  }
152
- boolean.isBoolean = isBoolean;
153
- function isntBoolean(val) {
154
- return !isBoolean(val);
146
+ boolean$1.isBoolean = isBoolean$1;
147
+ function isntBoolean$1(val) {
148
+ return !isBoolean$1(val);
155
149
  }
156
- boolean.isntBoolean = isntBoolean;
150
+ boolean$1.isntBoolean = isntBoolean$1;
157
151
 
158
- var char = {};
152
+ var char$1 = {};
159
153
 
160
- var string = {};
154
+ var string$1 = {};
161
155
 
162
- string.isntString = string.isString = void 0;
163
- function isString(val) {
156
+ string$1.isntString = string$1.isString = void 0;
157
+ function isString$1(val) {
164
158
  return typeof val === 'string';
165
159
  }
166
- string.isString = isString;
167
- function isntString(val) {
168
- return !isString(val);
160
+ string$1.isString = isString$1;
161
+ function isntString$1(val) {
162
+ return !isString$1(val);
169
163
  }
170
- string.isntString = isntString;
164
+ string$1.isntString = isntString$1;
171
165
 
172
- char.isntChar = char.isChar = void 0;
173
- const string_1$1 = string;
174
- function isChar(val) {
175
- return (0, string_1$1.isString)(val)
166
+ char$1.isntChar = char$1.isChar = void 0;
167
+ const string_1$3 = string$1;
168
+ function isChar$1(val) {
169
+ return (0, string_1$3.isString)(val)
176
170
  && val.length === 1;
177
171
  }
178
- char.isChar = isChar;
179
- function isntChar(val) {
180
- return !isChar(val);
172
+ char$1.isChar = isChar$1;
173
+ function isntChar$1(val) {
174
+ return !isChar$1(val);
181
175
  }
182
- char.isntChar = isntChar;
176
+ char$1.isntChar = isntChar$1;
183
177
 
184
- var date = {};
178
+ var date$1 = {};
185
179
 
186
- date.isntDate = date.isDate = void 0;
187
- function isDate(val) {
180
+ date$1.isntDate = date$1.isDate = void 0;
181
+ function isDate$1(val) {
188
182
  return val instanceof Date;
189
183
  }
190
- date.isDate = isDate;
191
- function isntDate(val) {
192
- return !isDate(val);
184
+ date$1.isDate = isDate$1;
185
+ function isntDate$1(val) {
186
+ return !isDate$1(val);
193
187
  }
194
- date.isntDate = isntDate;
188
+ date$1.isntDate = isntDate$1;
195
189
 
196
- var _enum = {};
190
+ var _enum$1 = {};
197
191
 
198
- _enum.inEnum = void 0;
199
- function inEnum(val, _enum) {
192
+ _enum$1.inEnum = void 0;
193
+ function inEnum$1(val, _enum) {
200
194
  return Object.values(_enum).includes(val);
201
195
  }
202
- _enum.inEnum = inEnum;
196
+ _enum$1.inEnum = inEnum$1;
203
197
 
204
- var error = {};
198
+ var error$1 = {};
205
199
 
206
- error.isntError = error.isError = void 0;
207
- function isError(val) {
200
+ error$1.isntError = error$1.isError = void 0;
201
+ function isError$1(val) {
208
202
  return val instanceof Error;
209
203
  }
210
- error.isError = isError;
211
- function isntError(val) {
212
- return !isError(val);
204
+ error$1.isError = isError$1;
205
+ function isntError$1(val) {
206
+ return !isError$1(val);
213
207
  }
214
- error.isntError = isntError;
208
+ error$1.isntError = isntError$1;
215
209
 
216
- var falsy = {};
210
+ var falsy$1 = {};
217
211
 
218
- falsy.isntFalsy = falsy.isFalsy = void 0;
219
- function isFalsy(val) {
212
+ falsy$1.isntFalsy = falsy$1.isFalsy = void 0;
213
+ function isFalsy$1(val) {
220
214
  return !val;
221
215
  }
222
- falsy.isFalsy = isFalsy;
223
- function isntFalsy(val) {
224
- return !isFalsy(val);
216
+ falsy$1.isFalsy = isFalsy$1;
217
+ function isntFalsy$1(val) {
218
+ return !isFalsy$1(val);
225
219
  }
226
- falsy.isntFalsy = isntFalsy;
220
+ falsy$1.isntFalsy = isntFalsy$1;
227
221
 
228
- var _function = {};
222
+ var _function$1 = {};
229
223
 
230
- _function.isntFunction = _function.isFunction = void 0;
231
- function isFunction(val) {
224
+ _function$1.isntFunction = _function$1.isFunction = void 0;
225
+ function isFunction$1(val) {
232
226
  return typeof val === 'function';
233
227
  }
234
- _function.isFunction = isFunction;
235
- function isntFunction(val) {
236
- return !isFunction(val);
228
+ _function$1.isFunction = isFunction$1;
229
+ function isntFunction$1(val) {
230
+ return !isFunction$1(val);
237
231
  }
238
- _function.isntFunction = isntFunction;
232
+ _function$1.isntFunction = isntFunction$1;
239
233
 
240
- var iterable = {};
234
+ var iterable$1 = {};
241
235
 
242
- iterable.isntIterable = iterable.isIterable = void 0;
243
- const null_1 = _null;
244
- const undefined_1$1 = _undefined;
245
- function isIterable(val) {
246
- return (0, null_1.isntNull)(val)
247
- && (0, undefined_1$1.isntUndefined)(val)
236
+ iterable$1.isntIterable = iterable$1.isIterable = void 0;
237
+ const null_1$2 = _null$1;
238
+ const undefined_1$4 = _undefined$1;
239
+ function isIterable$1(val) {
240
+ return (0, null_1$2.isntNull)(val)
241
+ && (0, undefined_1$4.isntUndefined)(val)
248
242
  && typeof val[Symbol.iterator] === 'function';
249
243
  }
250
- iterable.isIterable = isIterable;
251
- function isntIterable(val) {
252
- return !isIterable(val);
244
+ iterable$1.isIterable = isIterable$1;
245
+ function isntIterable$1(val) {
246
+ return !isIterable$1(val);
253
247
  }
254
- iterable.isntIterable = isntIterable;
248
+ iterable$1.isntIterable = isntIterable$1;
255
249
 
256
- var jsonRpc = {};
250
+ var jsonRpc$1 = {};
257
251
 
258
- var object = {};
252
+ var object$1 = {};
259
253
 
260
- object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
261
- function isObject(val) {
262
- return val !== null && typeof val === 'object';
254
+ /**
255
+ * lodash (Custom Build) <https://lodash.com/>
256
+ * Build: `lodash modularize exports="npm" -o ./`
257
+ * Copyright jQuery Foundation and other contributors <https://jquery.org/>
258
+ * Released under MIT license <https://lodash.com/license>
259
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
260
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
261
+ */
262
+
263
+ /** `Object#toString` result references. */
264
+ var objectTag = '[object Object]';
265
+
266
+ /**
267
+ * Checks if `value` is a host object in IE < 9.
268
+ *
269
+ * @private
270
+ * @param {*} value The value to check.
271
+ * @returns {boolean} Returns `true` if `value` is a host object, else `false`.
272
+ */
273
+ function isHostObject(value) {
274
+ // Many host objects are `Object` objects that can coerce to strings
275
+ // despite having improperly defined `toString` methods.
276
+ var result = false;
277
+ if (value != null && typeof value.toString != 'function') {
278
+ try {
279
+ result = !!(value + '');
280
+ } catch (e) {}
281
+ }
282
+ return result;
263
283
  }
264
- object.isObject = isObject;
265
- function isntObject(val) {
266
- return !isObject(val);
284
+
285
+ /**
286
+ * Creates a unary function that invokes `func` with its argument transformed.
287
+ *
288
+ * @private
289
+ * @param {Function} func The function to wrap.
290
+ * @param {Function} transform The argument transform.
291
+ * @returns {Function} Returns the new function.
292
+ */
293
+ function overArg(func, transform) {
294
+ return function(arg) {
295
+ return func(transform(arg));
296
+ };
267
297
  }
268
- object.isntObject = isntObject;
269
- function isRecord(val) {
270
- return isObject(val);
298
+
299
+ /** Used for built-in method references. */
300
+ var funcProto = Function.prototype,
301
+ objectProto = Object.prototype;
302
+
303
+ /** Used to resolve the decompiled source of functions. */
304
+ var funcToString = funcProto.toString;
305
+
306
+ /** Used to check objects for own properties. */
307
+ var hasOwnProperty = objectProto.hasOwnProperty;
308
+
309
+ /** Used to infer the `Object` constructor. */
310
+ var objectCtorString = funcToString.call(Object);
311
+
312
+ /**
313
+ * Used to resolve the
314
+ * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
315
+ * of values.
316
+ */
317
+ var objectToString = objectProto.toString;
318
+
319
+ /** Built-in value references. */
320
+ var getPrototype = overArg(Object.getPrototypeOf, Object);
321
+
322
+ /**
323
+ * Checks if `value` is object-like. A value is object-like if it's not `null`
324
+ * and has a `typeof` result of "object".
325
+ *
326
+ * @static
327
+ * @memberOf _
328
+ * @since 4.0.0
329
+ * @category Lang
330
+ * @param {*} value The value to check.
331
+ * @returns {boolean} Returns `true` if `value` is object-like, else `false`.
332
+ * @example
333
+ *
334
+ * _.isObjectLike({});
335
+ * // => true
336
+ *
337
+ * _.isObjectLike([1, 2, 3]);
338
+ * // => true
339
+ *
340
+ * _.isObjectLike(_.noop);
341
+ * // => false
342
+ *
343
+ * _.isObjectLike(null);
344
+ * // => false
345
+ */
346
+ function isObjectLike(value) {
347
+ return !!value && typeof value == 'object';
271
348
  }
272
- object.isRecord = isRecord;
273
- function isEmptyObject(val) {
349
+
350
+ /**
351
+ * Checks if `value` is a plain object, that is, an object created by the
352
+ * `Object` constructor or one with a `[[Prototype]]` of `null`.
353
+ *
354
+ * @static
355
+ * @memberOf _
356
+ * @since 0.8.0
357
+ * @category Lang
358
+ * @param {*} value The value to check.
359
+ * @returns {boolean} Returns `true` if `value` is a plain object, else `false`.
360
+ * @example
361
+ *
362
+ * function Foo() {
363
+ * this.a = 1;
364
+ * }
365
+ *
366
+ * _.isPlainObject(new Foo);
367
+ * // => false
368
+ *
369
+ * _.isPlainObject([1, 2, 3]);
370
+ * // => false
371
+ *
372
+ * _.isPlainObject({ 'x': 0, 'y': 0 });
373
+ * // => true
374
+ *
375
+ * _.isPlainObject(Object.create(null));
376
+ * // => true
377
+ */
378
+ function isPlainObject$1(value) {
379
+ if (!isObjectLike(value) ||
380
+ objectToString.call(value) != objectTag || isHostObject(value)) {
381
+ return false;
382
+ }
383
+ var proto = getPrototype(value);
384
+ if (proto === null) {
385
+ return true;
386
+ }
387
+ var Ctor = hasOwnProperty.call(proto, 'constructor') && proto.constructor;
388
+ return (typeof Ctor == 'function' &&
389
+ Ctor instanceof Ctor && funcToString.call(Ctor) == objectCtorString);
390
+ }
391
+
392
+ var lodash_isplainobject = isPlainObject$1;
393
+
394
+ var __importDefault = (commonjsGlobal && commonjsGlobal.__importDefault) || function (mod) {
395
+ return (mod && mod.__esModule) ? mod : { "default": mod };
396
+ };object$1.isntEmptyObject = object$1.isEmptyObject = object$1.isntPlainObject = object$1.isPlainObject = object$1.isntObject = object$1.isObject = void 0;
397
+ const lodash_isplainobject_1 = __importDefault(lodash_isplainobject);
398
+ function isObject$1(val) {
399
+ return val !== null
400
+ && typeof val === 'object';
401
+ }
402
+ object$1.isObject = isObject$1;
403
+ function isntObject$1(val) {
404
+ return !isObject$1(val);
405
+ }
406
+ object$1.isntObject = isntObject$1;
407
+ function isPlainObject(val) {
408
+ return (0, lodash_isplainobject_1.default)(val);
409
+ }
410
+ object$1.isPlainObject = isPlainObject;
411
+ function isntPlainObject(val) {
412
+ return !isPlainObject(val);
413
+ }
414
+ object$1.isntPlainObject = isntPlainObject;
415
+ function isEmptyObject$1(val) {
274
416
  return Object.keys(val).length === 0;
275
417
  }
276
- object.isEmptyObject = isEmptyObject;
277
- function isntEmptyObject(val) {
418
+ object$1.isEmptyObject = isEmptyObject$1;
419
+ function isntEmptyObject$1(val) {
278
420
  return Object.keys(val).length !== 0;
279
421
  }
280
- object.isntEmptyObject = isntEmptyObject;
422
+ object$1.isntEmptyObject = isntEmptyObject$1;
281
423
 
282
- var number = {};
424
+ var number$1 = {};
283
425
 
284
- number.isntNumber = number.isNumber = void 0;
285
- function isNumber(val) {
426
+ number$1.isntNumber = number$1.isNumber = void 0;
427
+ function isNumber$1(val) {
286
428
  return typeof val === 'number';
287
429
  }
288
- number.isNumber = isNumber;
289
- function isntNumber(val) {
290
- return !isNumber(val);
291
- }
292
- number.isntNumber = isntNumber;
293
-
294
- jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
295
- const array_1 = array;
296
- const object_1 = object;
297
- const string_1 = string;
298
- const number_1 = number;
299
- const undefined_1 = _undefined;
300
- function isJsonRpcId(val) {
301
- return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
302
- }
303
- function isJsonRpcParams(val) {
304
- return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
305
- }
306
- function isJsonRpcNotification(val) {
307
- return (0, object_1.isRecord)(val)
308
- && (0, string_1.isString)(val.jsonrpc)
309
- && (0, string_1.isString)(val.method)
310
- && (0, undefined_1.isUndefined)(val.id)
311
- && isJsonRpcParams(val.params);
312
- }
313
- jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
314
- function isntJsonRpcNotification(val) {
315
- return !isJsonRpcNotification(val);
316
- }
317
- jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
318
- function isJsonRpcRequest(val) {
319
- return (0, object_1.isRecord)(val)
320
- && (0, string_1.isString)(val.jsonrpc)
321
- && (0, string_1.isString)(val.method)
322
- && isJsonRpcId(val.id)
323
- && isJsonRpcParams(val.params);
324
- }
325
- jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
326
- function isntJsonRpcRequest(val) {
327
- return !isJsonRpcRequest(val);
328
- }
329
- jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
330
- function isJsonRpcSuccess(val) {
331
- return (0, object_1.isRecord)(val)
332
- && (0, string_1.isString)(val.jsonrpc)
333
- && (0, string_1.isString)(val.id)
334
- && (0, undefined_1.isntUndefined)(val.result);
335
- }
336
- jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
337
- function isntJsonRpcSuccess(val) {
338
- return !isJsonRpcSuccess(val);
339
- }
340
- jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
341
- function isJsonRpcError(val) {
342
- return (0, object_1.isRecord)(val)
343
- && (0, string_1.isString)(val.jsonrpc)
344
- && isJsonRpcId(val.id)
345
- && isJsonRpcErrorObject(val.error);
346
- }
347
- jsonRpc.isJsonRpcError = isJsonRpcError;
348
- function isntJsonRpcError(val) {
349
- return !isJsonRpcError(val);
350
- }
351
- jsonRpc.isntJsonRpcError = isntJsonRpcError;
352
- function isJsonRpcErrorObject(val) {
353
- return (0, object_1.isRecord)(val)
354
- && (0, number_1.isNumber)(val.code)
355
- && (0, string_1.isString)(val.message)
356
- && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
357
- }
358
-
359
- var json$1 = {};
360
-
361
- json$1.isntJson = json$1.isJson = void 0;
362
- function isJson(val) {
430
+ number$1.isNumber = isNumber$1;
431
+ function isntNumber$1(val) {
432
+ return !isNumber$1(val);
433
+ }
434
+ number$1.isntNumber = isntNumber$1;
435
+
436
+ jsonRpc$1.isntJsonRpcError = jsonRpc$1.isJsonRpcError = jsonRpc$1.isntJsonRpcSuccess = jsonRpc$1.isJsonRpcSuccess = jsonRpc$1.isntJsonRpcRequest = jsonRpc$1.isJsonRpcRequest = jsonRpc$1.isntJsonRpcNotification = jsonRpc$1.isJsonRpcNotification = void 0;
437
+ const array_1$1 = array$1;
438
+ const object_1$1 = object$1;
439
+ const string_1$2 = string$1;
440
+ const number_1$1 = number$1;
441
+ const undefined_1$3 = _undefined$1;
442
+ function isJsonRpcId$1(val) {
443
+ return (0, string_1$2.isString)(val) || (0, number_1$1.isNumber)(val);
444
+ }
445
+ function isJsonRpcParams$1(val) {
446
+ return (0, array_1$1.isArray)(val) || (0, object_1$1.isObject)(val);
447
+ }
448
+ function isJsonRpcNotification$1(val) {
449
+ return (0, object_1$1.isPlainObject)(val)
450
+ && (0, string_1$2.isString)(val.jsonrpc)
451
+ && (0, string_1$2.isString)(val.method)
452
+ && (0, undefined_1$3.isUndefined)(val.id)
453
+ && isJsonRpcParams$1(val.params);
454
+ }
455
+ jsonRpc$1.isJsonRpcNotification = isJsonRpcNotification$1;
456
+ function isntJsonRpcNotification$1(val) {
457
+ return !isJsonRpcNotification$1(val);
458
+ }
459
+ jsonRpc$1.isntJsonRpcNotification = isntJsonRpcNotification$1;
460
+ function isJsonRpcRequest$1(val) {
461
+ return (0, object_1$1.isPlainObject)(val)
462
+ && (0, string_1$2.isString)(val.jsonrpc)
463
+ && (0, string_1$2.isString)(val.method)
464
+ && isJsonRpcId$1(val.id)
465
+ && isJsonRpcParams$1(val.params);
466
+ }
467
+ jsonRpc$1.isJsonRpcRequest = isJsonRpcRequest$1;
468
+ function isntJsonRpcRequest$1(val) {
469
+ return !isJsonRpcRequest$1(val);
470
+ }
471
+ jsonRpc$1.isntJsonRpcRequest = isntJsonRpcRequest$1;
472
+ function isJsonRpcSuccess$1(val) {
473
+ return (0, object_1$1.isPlainObject)(val)
474
+ && (0, string_1$2.isString)(val.jsonrpc)
475
+ && (0, string_1$2.isString)(val.id)
476
+ && 'result' in val;
477
+ }
478
+ jsonRpc$1.isJsonRpcSuccess = isJsonRpcSuccess$1;
479
+ function isntJsonRpcSuccess$1(val) {
480
+ return !isJsonRpcSuccess$1(val);
481
+ }
482
+ jsonRpc$1.isntJsonRpcSuccess = isntJsonRpcSuccess$1;
483
+ function isJsonRpcError$1(val) {
484
+ return (0, object_1$1.isPlainObject)(val)
485
+ && (0, string_1$2.isString)(val.jsonrpc)
486
+ && isJsonRpcId$1(val.id)
487
+ && isJsonRpcErrorObject$1(val.error);
488
+ }
489
+ jsonRpc$1.isJsonRpcError = isJsonRpcError$1;
490
+ function isntJsonRpcError$1(val) {
491
+ return !isJsonRpcError$1(val);
492
+ }
493
+ jsonRpc$1.isntJsonRpcError = isntJsonRpcError$1;
494
+ function isJsonRpcErrorObject$1(val) {
495
+ return (0, object_1$1.isPlainObject)(val)
496
+ && (0, number_1$1.isNumber)(val.code)
497
+ && (0, string_1$2.isString)(val.message)
498
+ && ((0, undefined_1$3.isUndefined)(val.data) || (0, object_1$1.isObject)(val.data));
499
+ }
500
+
501
+ var json$2 = {};
502
+
503
+ json$2.isntJson = json$2.isJson = void 0;
504
+ function isJson$1(val) {
363
505
  try {
364
506
  JSON.stringify(val);
365
507
  return true;
@@ -368,16 +510,16 @@ function isJson(val) {
368
510
  return false;
369
511
  }
370
512
  }
371
- json$1.isJson = isJson;
372
- function isntJson(val) {
373
- return !isntJson();
513
+ json$2.isJson = isJson$1;
514
+ function isntJson$1(val) {
515
+ return !isntJson$1();
374
516
  }
375
- json$1.isntJson = isntJson;
517
+ json$2.isntJson = isntJson$1;
376
518
 
377
- var url$1 = {};
519
+ var url$2 = {};
378
520
 
379
- url$1.isAbsoluteURL = void 0;
380
- function isAbsoluteURL(str) {
521
+ url$2.isAbsoluteURL = void 0;
522
+ function isAbsoluteURL$1(str) {
381
523
  try {
382
524
  new URL(str);
383
525
  return true;
@@ -386,7 +528,7 @@ function isAbsoluteURL(str) {
386
528
  return false;
387
529
  }
388
530
  }
389
- url$1.isAbsoluteURL = isAbsoluteURL;
531
+ url$2.isAbsoluteURL = isAbsoluteURL$1;
390
532
 
391
533
  (function (exports) {
392
534
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -398,27 +540,27 @@ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Obj
398
540
  }));
399
541
  var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
400
542
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
401
- };__exportStar(array, exports);
402
- __exportStar(asyncIterable, exports);
403
- __exportStar(bigint, exports);
404
- __exportStar(boolean, exports);
405
- __exportStar(char, exports);
406
- __exportStar(date, exports);
407
- __exportStar(_enum, exports);
408
- __exportStar(error, exports);
409
- __exportStar(falsy, exports);
410
- __exportStar(_function, exports);
411
- __exportStar(iterable, exports);
412
- __exportStar(jsonRpc, exports);
413
- __exportStar(json$1, exports);
414
- __exportStar(_null, exports);
415
- __exportStar(number, exports);
416
- __exportStar(object, exports);
417
- __exportStar(string, exports);
418
- __exportStar(_undefined, exports);
419
- __exportStar(url$1, exports);
420
-
421
- }(es2018$1));
543
+ };__exportStar(array$1, exports);
544
+ __exportStar(asyncIterable$1, exports);
545
+ __exportStar(bigint$1, exports);
546
+ __exportStar(boolean$1, exports);
547
+ __exportStar(char$1, exports);
548
+ __exportStar(date$1, exports);
549
+ __exportStar(_enum$1, exports);
550
+ __exportStar(error$1, exports);
551
+ __exportStar(falsy$1, exports);
552
+ __exportStar(_function$1, exports);
553
+ __exportStar(iterable$1, exports);
554
+ __exportStar(jsonRpc$1, exports);
555
+ __exportStar(json$2, exports);
556
+ __exportStar(_null$1, exports);
557
+ __exportStar(number$1, exports);
558
+ __exportStar(object$1, exports);
559
+ __exportStar(string$1, exports);
560
+ __exportStar(_undefined$1, exports);
561
+ __exportStar(url$2, exports);
562
+
563
+ }(es2018$6));
422
564
 
423
565
  function get(...transformers) {
424
566
  return request('GET', ...transformers);
@@ -439,12 +581,12 @@ function del(...transformers) {
439
581
  return request('DELETE', ...transformers);
440
582
  }
441
583
  function request(method, ...transformers) {
442
- const options = transformers.reduce((options, trans) => es2018$1.isFunction(trans) ? trans(options) : options, {
584
+ const options = transformers.reduce((options, trans) => es2018$6.isFunction(trans) ? trans(options) : options, {
443
585
  url: new URL('http://localhost'),
444
- headers: new es2018$2.Headers()
586
+ headers: new es2018$7.Headers()
445
587
  });
446
- const headers = new es2018$2.Headers(options.headers);
447
- return new es2018$2.Request(options.url.href, {
588
+ const headers = new es2018$7.Headers(options.headers);
589
+ return new es2018$7.Request(options.url.href, {
448
590
  method,
449
591
  headers,
450
592
  signal: options.signal,
@@ -453,7 +595,7 @@ function request(method, ...transformers) {
453
595
  });
454
596
  }
455
597
 
456
- function url(...urls) {
598
+ function url$1(...urls) {
457
599
  return (options) => {
458
600
  const url = new URL(urls.reduce((acc, cur) => new URL(cur, acc).href));
459
601
  return {
@@ -465,7 +607,7 @@ function url(...urls) {
465
607
 
466
608
  function text(payload) {
467
609
  return (options) => {
468
- const headers = new es2018$2.Headers(options.headers);
610
+ const headers = new es2018$7.Headers(options.headers);
469
611
  headers.set('Content-Type', 'application/x-www-form-urlencoded');
470
612
  return {
471
613
  ...options,
@@ -475,9 +617,9 @@ function text(payload) {
475
617
  };
476
618
  }
477
619
 
478
- function json(payload) {
620
+ function json$1(payload) {
479
621
  return (options) => {
480
- const headers = new es2018$2.Headers(options.headers);
622
+ const headers = new es2018$7.Headers(options.headers);
481
623
  headers.set('Content-Type', 'application/json');
482
624
  return {
483
625
  ...options,
@@ -500,38 +642,72 @@ License: MIT
500
642
  !function(e,t){module.exports=t();}(commonjsGlobal,function s(){var f="undefined"!=typeof self?self:"undefined"!=typeof window?window:void 0!==f?f:{};var n=!f.document&&!!f.postMessage,o=n&&/blob:/i.test((f.location||{}).protocol),a={},h=0,b={parse:function(e,t){var i=(t=t||{}).dynamicTyping||!1;M(i)&&(t.dynamicTypingFunction=i,i={});if(t.dynamicTyping=i,t.transform=!!M(t.transform)&&t.transform,t.worker&&b.WORKERS_SUPPORTED){var r=function(){if(!b.WORKERS_SUPPORTED)return !1;var e=(i=f.URL||f.webkitURL||null,r=s.toString(),b.BLOB_URL||(b.BLOB_URL=i.createObjectURL(new Blob(["(",r,")();"],{type:"text/javascript"})))),t=new f.Worker(e);var i,r;return t.onmessage=_,t.id=h++,a[t.id]=t}();return r.userStep=t.step,r.userChunk=t.chunk,r.userComplete=t.complete,r.userError=t.error,t.step=M(t.step),t.chunk=M(t.chunk),t.complete=M(t.complete),t.error=M(t.error),delete t.worker,void r.postMessage({input:e,config:t,workerId:r.id})}var n=null;b.NODE_STREAM_INPUT,"string"==typeof e?n=t.download?new l(t):new p(t):!0===e.readable&&M(e.read)&&M(e.on)?n=new g(t):(f.File&&e instanceof File||e instanceof Object)&&(n=new c(t));return n.stream(e)},unparse:function(e,t){var n=!1,_=!0,m=",",y="\r\n",s='"',a=s+s,i=!1,r=null,o=!1;!function(){if("object"!=typeof t)return;"string"!=typeof t.delimiter||b.BAD_DELIMITERS.filter(function(e){return -1!==t.delimiter.indexOf(e)}).length||(m=t.delimiter);("boolean"==typeof t.quotes||"function"==typeof t.quotes||Array.isArray(t.quotes))&&(n=t.quotes);"boolean"!=typeof t.skipEmptyLines&&"string"!=typeof t.skipEmptyLines||(i=t.skipEmptyLines);"string"==typeof t.newline&&(y=t.newline);"string"==typeof t.quoteChar&&(s=t.quoteChar);"boolean"==typeof t.header&&(_=t.header);if(Array.isArray(t.columns)){if(0===t.columns.length)throw new Error("Option columns is empty");r=t.columns;}void 0!==t.escapeChar&&(a=t.escapeChar+s);"boolean"==typeof t.escapeFormulae&&(o=t.escapeFormulae);}();var h=new RegExp(j(s),"g");"string"==typeof e&&(e=JSON.parse(e));if(Array.isArray(e)){if(!e.length||Array.isArray(e[0]))return u(null,e,i);if("object"==typeof e[0])return u(r||Object.keys(e[0]),e,i)}else if("object"==typeof e)return "string"==typeof e.data&&(e.data=JSON.parse(e.data)),Array.isArray(e.data)&&(e.fields||(e.fields=e.meta&&e.meta.fields),e.fields||(e.fields=Array.isArray(e.data[0])?e.fields:"object"==typeof e.data[0]?Object.keys(e.data[0]):[]),Array.isArray(e.data[0])||"object"==typeof e.data[0]||(e.data=[e.data])),u(e.fields||[],e.data||[],i);throw new Error("Unable to serialize unrecognized input");function u(e,t,i){var r="";"string"==typeof e&&(e=JSON.parse(e)),"string"==typeof t&&(t=JSON.parse(t));var n=Array.isArray(e)&&0<e.length,s=!Array.isArray(t[0]);if(n&&_){for(var a=0;a<e.length;a++)0<a&&(r+=m),r+=v(e[a],a);0<t.length&&(r+=y);}for(var o=0;o<t.length;o++){var h=n?e.length:t[o].length,u=!1,f=n?0===Object.keys(t[o]).length:0===t[o].length;if(i&&!n&&(u="greedy"===i?""===t[o].join("").trim():1===t[o].length&&0===t[o][0].length),"greedy"===i&&n){for(var d=[],l=0;l<h;l++){var c=s?e[l]:l;d.push(t[o][c]);}u=""===d.join("").trim();}if(!u){for(var p=0;p<h;p++){0<p&&!f&&(r+=m);var g=n&&s?e[p]:p;r+=v(t[o][g],p);}o<t.length-1&&(!i||0<h&&!f)&&(r+=y);}}return r}function v(e,t){if(null==e)return "";if(e.constructor===Date)return JSON.stringify(e).slice(1,25);!0===o&&"string"==typeof e&&null!==e.match(/^[=+\-@].*$/)&&(e="'"+e);var i=e.toString().replace(h,a),r="boolean"==typeof n&&n||"function"==typeof n&&n(e,t)||Array.isArray(n)&&n[t]||function(e,t){for(var i=0;i<t.length;i++)if(-1<e.indexOf(t[i]))return !0;return !1}(i,b.BAD_DELIMITERS)||-1<i.indexOf(m)||" "===i.charAt(0)||" "===i.charAt(i.length-1);return r?s+i+s:i}}};if(b.RECORD_SEP=String.fromCharCode(30),b.UNIT_SEP=String.fromCharCode(31),b.BYTE_ORDER_MARK="\ufeff",b.BAD_DELIMITERS=["\r","\n",'"',b.BYTE_ORDER_MARK],b.WORKERS_SUPPORTED=!n&&!!f.Worker,b.NODE_STREAM_INPUT=1,b.LocalChunkSize=10485760,b.RemoteChunkSize=5242880,b.DefaultDelimiter=",",b.Parser=E,b.ParserHandle=i,b.NetworkStreamer=l,b.FileStreamer=c,b.StringStreamer=p,b.ReadableStreamStreamer=g,f.jQuery){var d=f.jQuery;d.fn.parse=function(o){var i=o.config||{},h=[];return this.each(function(e){if(!("INPUT"===d(this).prop("tagName").toUpperCase()&&"file"===d(this).attr("type").toLowerCase()&&f.FileReader)||!this.files||0===this.files.length)return !0;for(var t=0;t<this.files.length;t++)h.push({file:this.files[t],inputElem:this,instanceConfig:d.extend({},i)});}),e(),this;function e(){if(0!==h.length){var e,t,i,r,n=h[0];if(M(o.before)){var s=o.before(n.file,n.inputElem);if("object"==typeof s){if("abort"===s.action)return e="AbortError",t=n.file,i=n.inputElem,r=s.reason,void(M(o.error)&&o.error({name:e},t,i,r));if("skip"===s.action)return void u();"object"==typeof s.config&&(n.instanceConfig=d.extend(n.instanceConfig,s.config));}else if("skip"===s)return void u()}var a=n.instanceConfig.complete;n.instanceConfig.complete=function(e){M(a)&&a(e,n.file,n.inputElem),u();},b.parse(n.file,n.instanceConfig);}else M(o.complete)&&o.complete();}function u(){h.splice(0,1),e();}};}function u(e){this._handle=null,this._finished=!1,this._completed=!1,this._halted=!1,this._input=null,this._baseIndex=0,this._partialLine="",this._rowCount=0,this._start=0,this._nextChunk=null,this.isFirstChunk=!0,this._completeResults={data:[],errors:[],meta:{}},function(e){var t=w(e);t.chunkSize=parseInt(t.chunkSize),e.step||e.chunk||(t.chunkSize=null);this._handle=new i(t),(this._handle.streamer=this)._config=t;}.call(this,e),this.parseChunk=function(e,t){if(this.isFirstChunk&&M(this._config.beforeFirstChunk)){var i=this._config.beforeFirstChunk(e);void 0!==i&&(e=i);}this.isFirstChunk=!1,this._halted=!1;var r=this._partialLine+e;this._partialLine="";var n=this._handle.parse(r,this._baseIndex,!this._finished);if(!this._handle.paused()&&!this._handle.aborted()){var s=n.meta.cursor;this._finished||(this._partialLine=r.substring(s-this._baseIndex),this._baseIndex=s),n&&n.data&&(this._rowCount+=n.data.length);var a=this._finished||this._config.preview&&this._rowCount>=this._config.preview;if(o)f.postMessage({results:n,workerId:b.WORKER_ID,finished:a});else if(M(this._config.chunk)&&!t){if(this._config.chunk(n,this._handle),this._handle.paused()||this._handle.aborted())return void(this._halted=!0);n=void 0,this._completeResults=void 0;}return this._config.step||this._config.chunk||(this._completeResults.data=this._completeResults.data.concat(n.data),this._completeResults.errors=this._completeResults.errors.concat(n.errors),this._completeResults.meta=n.meta),this._completed||!a||!M(this._config.complete)||n&&n.meta.aborted||(this._config.complete(this._completeResults,this._input),this._completed=!0),a||n&&n.meta.paused||this._nextChunk(),n}this._halted=!0;},this._sendError=function(e){M(this._config.error)?this._config.error(e):o&&this._config.error&&f.postMessage({workerId:b.WORKER_ID,error:e,finished:!1});};}function l(e){var r;(e=e||{}).chunkSize||(e.chunkSize=b.RemoteChunkSize),u.call(this,e),this._nextChunk=n?function(){this._readChunk(),this._chunkLoaded();}:function(){this._readChunk();},this.stream=function(e){this._input=e,this._nextChunk();},this._readChunk=function(){if(this._finished)this._chunkLoaded();else {if(r=new XMLHttpRequest,this._config.withCredentials&&(r.withCredentials=this._config.withCredentials),n||(r.onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)),r.open(this._config.downloadRequestBody?"POST":"GET",this._input,!n),this._config.downloadRequestHeaders){var e=this._config.downloadRequestHeaders;for(var t in e)r.setRequestHeader(t,e[t]);}if(this._config.chunkSize){var i=this._start+this._config.chunkSize-1;r.setRequestHeader("Range","bytes="+this._start+"-"+i);}try{r.send(this._config.downloadRequestBody);}catch(e){this._chunkError(e.message);}n&&0===r.status&&this._chunkError();}},this._chunkLoaded=function(){4===r.readyState&&(r.status<200||400<=r.status?this._chunkError():(this._start+=this._config.chunkSize?this._config.chunkSize:r.responseText.length,this._finished=!this._config.chunkSize||this._start>=function(e){var t=e.getResponseHeader("Content-Range");if(null===t)return -1;return parseInt(t.substring(t.lastIndexOf("/")+1))}(r),this.parseChunk(r.responseText)));},this._chunkError=function(e){var t=r.statusText||e;this._sendError(new Error(t));};}function c(e){var r,n;(e=e||{}).chunkSize||(e.chunkSize=b.LocalChunkSize),u.call(this,e);var s="undefined"!=typeof FileReader;this.stream=function(e){this._input=e,n=e.slice||e.webkitSlice||e.mozSlice,s?((r=new FileReader).onload=v(this._chunkLoaded,this),r.onerror=v(this._chunkError,this)):r=new FileReaderSync,this._nextChunk();},this._nextChunk=function(){this._finished||this._config.preview&&!(this._rowCount<this._config.preview)||this._readChunk();},this._readChunk=function(){var e=this._input;if(this._config.chunkSize){var t=Math.min(this._start+this._config.chunkSize,this._input.size);e=n.call(e,this._start,t);}var i=r.readAsText(e,this._config.encoding);s||this._chunkLoaded({target:{result:i}});},this._chunkLoaded=function(e){this._start+=this._config.chunkSize,this._finished=!this._config.chunkSize||this._start>=this._input.size,this.parseChunk(e.target.result);},this._chunkError=function(){this._sendError(r.error);};}function p(e){var i;u.call(this,e=e||{}),this.stream=function(e){return i=e,this._nextChunk()},this._nextChunk=function(){if(!this._finished){var e,t=this._config.chunkSize;return t?(e=i.substring(0,t),i=i.substring(t)):(e=i,i=""),this._finished=!i,this.parseChunk(e)}};}function g(e){u.call(this,e=e||{});var t=[],i=!0,r=!1;this.pause=function(){u.prototype.pause.apply(this,arguments),this._input.pause();},this.resume=function(){u.prototype.resume.apply(this,arguments),this._input.resume();},this.stream=function(e){this._input=e,this._input.on("data",this._streamData),this._input.on("end",this._streamEnd),this._input.on("error",this._streamError);},this._checkIsFinished=function(){r&&1===t.length&&(this._finished=!0);},this._nextChunk=function(){this._checkIsFinished(),t.length?this.parseChunk(t.shift()):i=!0;},this._streamData=v(function(e){try{t.push("string"==typeof e?e:e.toString(this._config.encoding)),i&&(i=!1,this._checkIsFinished(),this.parseChunk(t.shift()));}catch(e){this._streamError(e);}},this),this._streamError=v(function(e){this._streamCleanUp(),this._sendError(e);},this),this._streamEnd=v(function(){this._streamCleanUp(),r=!0,this._streamData("");},this),this._streamCleanUp=v(function(){this._input.removeListener("data",this._streamData),this._input.removeListener("end",this._streamEnd),this._input.removeListener("error",this._streamError);},this);}function i(m){var a,o,h,r=Math.pow(2,53),n=-r,s=/^\s*-?(\d+\.?|\.\d+|\d+\.\d+)([eE][-+]?\d+)?\s*$/,u=/^(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))|(\d{4}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d([+-][0-2]\d:[0-5]\d|Z))$/,t=this,i=0,f=0,d=!1,e=!1,l=[],c={data:[],errors:[],meta:{}};if(M(m.step)){var p=m.step;m.step=function(e){if(c=e,_())g();else {if(g(),0===c.data.length)return;i+=e.data.length,m.preview&&i>m.preview?o.abort():(c.data=c.data[0],p(c,t));}};}function y(e){return "greedy"===m.skipEmptyLines?""===e.join("").trim():1===e.length&&0===e[0].length}function g(){if(c&&h&&(k("Delimiter","UndetectableDelimiter","Unable to auto-detect delimiting character; defaulted to '"+b.DefaultDelimiter+"'"),h=!1),m.skipEmptyLines)for(var e=0;e<c.data.length;e++)y(c.data[e])&&c.data.splice(e--,1);return _()&&function(){if(!c)return;function e(e,t){M(m.transformHeader)&&(e=m.transformHeader(e,t)),l.push(e);}if(Array.isArray(c.data[0])){for(var t=0;_()&&t<c.data.length;t++)c.data[t].forEach(e);c.data.splice(0,1);}else c.data.forEach(e);}(),function(){if(!c||!m.header&&!m.dynamicTyping&&!m.transform)return c;function e(e,t){var i,r=m.header?{}:[];for(i=0;i<e.length;i++){var n=i,s=e[i];m.header&&(n=i>=l.length?"__parsed_extra":l[i]),m.transform&&(s=m.transform(s,n)),s=v(n,s),"__parsed_extra"===n?(r[n]=r[n]||[],r[n].push(s)):r[n]=s;}return m.header&&(i>l.length?k("FieldMismatch","TooManyFields","Too many fields: expected "+l.length+" fields but parsed "+i,f+t):i<l.length&&k("FieldMismatch","TooFewFields","Too few fields: expected "+l.length+" fields but parsed "+i,f+t)),r}var t=1;!c.data.length||Array.isArray(c.data[0])?(c.data=c.data.map(e),t=c.data.length):c.data=e(c.data,0);m.header&&c.meta&&(c.meta.fields=l);return f+=t,c}()}function _(){return m.header&&0===l.length}function v(e,t){return i=e,m.dynamicTypingFunction&&void 0===m.dynamicTyping[i]&&(m.dynamicTyping[i]=m.dynamicTypingFunction(i)),!0===(m.dynamicTyping[i]||m.dynamicTyping)?"true"===t||"TRUE"===t||"false"!==t&&"FALSE"!==t&&(function(e){if(s.test(e)){var t=parseFloat(e);if(n<t&&t<r)return !0}return !1}(t)?parseFloat(t):u.test(t)?new Date(t):""===t?null:t):t;var i;}function k(e,t,i,r){var n={type:e,code:t,message:i};void 0!==r&&(n.row=r),c.errors.push(n);}this.parse=function(e,t,i){var r=m.quoteChar||'"';if(m.newline||(m.newline=function(e,t){e=e.substring(0,1048576);var i=new RegExp(j(t)+"([^]*?)"+j(t),"gm"),r=(e=e.replace(i,"")).split("\r"),n=e.split("\n"),s=1<n.length&&n[0].length<r[0].length;if(1===r.length||s)return "\n";for(var a=0,o=0;o<r.length;o++)"\n"===r[o][0]&&a++;return a>=r.length/2?"\r\n":"\r"}(e,r)),h=!1,m.delimiter)M(m.delimiter)&&(m.delimiter=m.delimiter(e),c.meta.delimiter=m.delimiter);else {var n=function(e,t,i,r,n){var s,a,o,h;n=n||[",","\t","|",";",b.RECORD_SEP,b.UNIT_SEP];for(var u=0;u<n.length;u++){var f=n[u],d=0,l=0,c=0;o=void 0;for(var p=new E({comments:r,delimiter:f,newline:t,preview:10}).parse(e),g=0;g<p.data.length;g++)if(i&&y(p.data[g]))c++;else {var _=p.data[g].length;l+=_,void 0!==o?0<_&&(d+=Math.abs(_-o),o=_):o=_;}0<p.data.length&&(l/=p.data.length-c),(void 0===a||d<=a)&&(void 0===h||h<l)&&1.99<l&&(a=d,s=f,h=l);}return {successful:!!(m.delimiter=s),bestDelimiter:s}}(e,m.newline,m.skipEmptyLines,m.comments,m.delimitersToGuess);n.successful?m.delimiter=n.bestDelimiter:(h=!0,m.delimiter=b.DefaultDelimiter),c.meta.delimiter=m.delimiter;}var s=w(m);return m.preview&&m.header&&s.preview++,a=e,o=new E(s),c=o.parse(a,t,i),g(),d?{meta:{paused:!0}}:c||{meta:{paused:!1}}},this.paused=function(){return d},this.pause=function(){d=!0,o.abort(),a=M(m.chunk)?"":a.substring(o.getCharIndex());},this.resume=function(){t.streamer._halted?(d=!1,t.streamer.parseChunk(a,!0)):setTimeout(t.resume,3);},this.aborted=function(){return e},this.abort=function(){e=!0,o.abort(),c.meta.aborted=!0,M(m.complete)&&m.complete(c),a="";};}function j(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function E(e){var S,O=(e=e||{}).delimiter,x=e.newline,I=e.comments,T=e.step,D=e.preview,A=e.fastMode,L=S=void 0===e.quoteChar?'"':e.quoteChar;if(void 0!==e.escapeChar&&(L=e.escapeChar),("string"!=typeof O||-1<b.BAD_DELIMITERS.indexOf(O))&&(O=","),I===O)throw new Error("Comment character same as delimiter");!0===I?I="#":("string"!=typeof I||-1<b.BAD_DELIMITERS.indexOf(I))&&(I=!1),"\n"!==x&&"\r"!==x&&"\r\n"!==x&&(x="\n");var F=0,z=!1;this.parse=function(r,t,i){if("string"!=typeof r)throw new Error("Input must be a string");var n=r.length,e=O.length,s=x.length,a=I.length,o=M(T),h=[],u=[],f=[],d=F=0;if(!r)return C();if(A||!1!==A&&-1===r.indexOf(S)){for(var l=r.split(x),c=0;c<l.length;c++){if(f=l[c],F+=f.length,c!==l.length-1)F+=x.length;else if(i)return C();if(!I||f.substring(0,a)!==I){if(o){if(h=[],k(f.split(O)),R(),z)return C()}else k(f.split(O));if(D&&D<=c)return h=h.slice(0,D),C(!0)}}return C()}for(var p=r.indexOf(O,F),g=r.indexOf(x,F),_=new RegExp(j(L)+j(S),"g"),m=r.indexOf(S,F);;)if(r[F]!==S)if(I&&0===f.length&&r.substring(F,F+a)===I){if(-1===g)return C();F=g+s,g=r.indexOf(x,F),p=r.indexOf(O,F);}else if(-1!==p&&(p<g||-1===g))f.push(r.substring(F,p)),F=p+e,p=r.indexOf(O,F);else {if(-1===g)break;if(f.push(r.substring(F,g)),w(g+s),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0)}else for(m=F,F++;;){if(-1===(m=r.indexOf(S,m+1)))return i||u.push({type:"Quotes",code:"MissingQuotes",message:"Quoted field unterminated",row:h.length,index:F}),E();if(m===n-1)return E(r.substring(F,m).replace(_,S));if(S!==L||r[m+1]!==L){if(S===L||0===m||r[m-1]!==L){-1!==p&&p<m+1&&(p=r.indexOf(O,m+1)),-1!==g&&g<m+1&&(g=r.indexOf(x,m+1));var y=b(-1===g?p:Math.min(p,g));if(r[m+1+y]===O){f.push(r.substring(F,m).replace(_,S)),r[F=m+1+y+e]!==S&&(m=r.indexOf(S,F)),p=r.indexOf(O,F),g=r.indexOf(x,F);break}var v=b(g);if(r.substring(m+1+v,m+1+v+s)===x){if(f.push(r.substring(F,m).replace(_,S)),w(m+1+v+s),p=r.indexOf(O,F),m=r.indexOf(S,F),o&&(R(),z))return C();if(D&&h.length>=D)return C(!0);break}u.push({type:"Quotes",code:"InvalidQuotes",message:"Trailing quote on quoted field is malformed",row:h.length,index:F}),m++;}}else m++;}return E();function k(e){h.push(e),d=F;}function b(e){var t=0;if(-1!==e){var i=r.substring(m+1,e);i&&""===i.trim()&&(t=i.length);}return t}function E(e){return i||(void 0===e&&(e=r.substring(F)),f.push(e),F=n,k(f),o&&R()),C()}function w(e){F=e,k(f),f=[],g=r.indexOf(x,F);}function C(e){return {data:h,errors:u,meta:{delimiter:O,linebreak:x,aborted:z,truncated:!!e,cursor:d+(t||0)}}}function R(){T(C()),h=[],u=[];}},this.abort=function(){z=!0;},this.getCharIndex=function(){return F};}function _(e){var t=e.data,i=a[t.workerId],r=!1;if(t.error)i.userError(t.error,t.file);else if(t.results&&t.results.data){var n={abort:function(){r=!0,m(t.workerId,{data:[],errors:[],meta:{aborted:!0}});},pause:y,resume:y};if(M(i.userStep)){for(var s=0;s<t.results.data.length&&(i.userStep({data:t.results.data[s],errors:t.results.errors,meta:t.results.meta},n),!r);s++);delete t.results;}else M(i.userChunk)&&(i.userChunk(t.results,n,t.file),delete t.results);}t.finished&&!r&&m(t.workerId,t.results);}function m(e,t){var i=a[e];M(i.userComplete)&&i.userComplete(t),i.terminate(),delete a[e];}function y(){throw new Error("Not implemented.")}function w(e){if("object"!=typeof e||null===e)return e;var t=Array.isArray(e)?[]:{};for(var i in e)t[i]=w(e[i]);return t}function v(e,t){return function(){e.apply(t,arguments);}}function M(e){return "function"==typeof e}return o&&(f.onmessage=function(e){var t=e.data;void 0===b.WORKER_ID&&t&&(b.WORKER_ID=t.workerId);if("string"==typeof t.input)f.postMessage({workerId:b.WORKER_ID,results:b.parse(t.input,t.config),finished:!0});else if(f.File&&t.input instanceof File||t.input instanceof Object){var i=b.parse(t.input,t.config);i&&f.postMessage({workerId:b.WORKER_ID,results:i,finished:!0});}}),(l.prototype=Object.create(u.prototype)).constructor=l,(c.prototype=Object.create(u.prototype)).constructor=c,(p.prototype=Object.create(p.prototype)).constructor=p,(g.prototype=Object.create(u.prototype)).constructor=g,b});
501
643
  }(papaparse_min));
502
644
 
503
- var es2018 = {};
645
+ var es2018$5 = {};
646
+
647
+ var customError$1 = {};
648
+
649
+ var es2018$4 = {};
650
+
651
+ var middleware = {};
652
+
653
+ var chunkAsync$1 = {};
654
+
655
+ var es2018$3 = {};
656
+
657
+ var go$1 = {};
658
+
659
+ go$1.go = void 0;
660
+ function go(fn) {
661
+ return fn();
662
+ }
663
+ go$1.go = go;
664
+
665
+ (function (exports) {
666
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
667
+ if (k2 === undefined) k2 = k;
668
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
669
+ }) : (function(o, m, k, k2) {
670
+ if (k2 === undefined) k2 = k;
671
+ o[k2] = m[k];
672
+ }));
673
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
674
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
675
+ };__exportStar(go$1, exports);
676
+
677
+ }(es2018$3));
678
+
679
+ var es2018$2 = {};
504
680
 
505
681
  var customError = {};
506
682
 
507
683
  customError.CustomError = void 0;
508
- class CustomError extends Error {
684
+ class CustomError$1 extends Error {
509
685
  get name() {
510
686
  return this.constructor.name;
511
687
  }
512
688
  }
513
- customError.CustomError = CustomError;
689
+ customError.CustomError = CustomError$1;
514
690
 
515
691
  var expectedError = {};
516
692
 
517
693
  expectedError.ExpectedError = void 0;
518
- const custom_error_1$1 = customError;
519
- class ExpectedError extends custom_error_1$1.CustomError {
694
+ const custom_error_1$2 = customError;
695
+ class ExpectedError extends custom_error_1$2.CustomError {
520
696
  }
521
697
  expectedError.ExpectedError = ExpectedError;
522
698
 
523
- var assertionError = {};
699
+ var assertionError$1 = {};
524
700
 
525
- assertionError.AssertionError = void 0;
526
- const custom_error_1 = customError;
527
- class AssertionError extends custom_error_1.CustomError {
701
+ assertionError$1.AssertionError = void 0;
702
+ const custom_error_1$1 = customError;
703
+ class AssertionError$1 extends custom_error_1$1.CustomError {
528
704
  }
529
- assertionError.AssertionError = AssertionError;
705
+ assertionError$1.AssertionError = AssertionError$1;
530
706
 
531
- var normalize$1 = {};
707
+ var normalize$3 = {};
532
708
 
533
- normalize$1.normalize = void 0;
534
- function normalize(err) {
709
+ normalize$3.normalize = void 0;
710
+ function normalize$2(err) {
535
711
  var _a;
536
712
  return {
537
713
  name: err.name,
@@ -539,7 +715,7 @@ function normalize(err) {
539
715
  stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
540
716
  };
541
717
  }
542
- normalize$1.normalize = normalize;
718
+ normalize$3.normalize = normalize$2;
543
719
 
544
720
  var refute$1 = {};
545
721
 
@@ -551,15 +727,15 @@ function refute(condition, message) {
551
727
  }
552
728
  refute$1.refute = refute;
553
729
 
554
- var assert$1 = {};
730
+ var assert$3 = {};
555
731
 
556
- assert$1.assert = void 0;
557
- const assertion_error_1 = assertionError;
558
- function assert(condition, message) {
732
+ assert$3.assert = void 0;
733
+ const assertion_error_1$1 = assertionError$1;
734
+ function assert$2(condition, message) {
559
735
  if (!condition)
560
- throw new assertion_error_1.AssertionError(message);
736
+ throw new assertion_error_1$1.AssertionError(message);
561
737
  }
562
- assert$1.assert = assert;
738
+ assert$3.assert = assert$2;
563
739
 
564
740
  (function (exports) {
565
741
  var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
@@ -573,17 +749,2309 @@ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m
573
749
  for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
574
750
  };__exportStar(customError, exports);
575
751
  __exportStar(expectedError, exports);
576
- __exportStar(assertionError, exports);
577
- __exportStar(normalize$1, exports);
752
+ __exportStar(assertionError$1, exports);
753
+ __exportStar(normalize$3, exports);
578
754
  __exportStar(refute$1, exports);
579
- __exportStar(assert$1, exports);
755
+ __exportStar(assert$3, exports);
580
756
 
581
- }(es2018));
757
+ }(es2018$2));
758
+
759
+ chunkAsync$1.chunkAsync = void 0;
760
+ const go_1$f = es2018$3;
761
+ const errors_1$f = es2018$2;
762
+ function chunkAsync(iterable, size) {
763
+ (0, errors_1$f.assert)(Number.isInteger(size), 'The parameter size must be an integer');
764
+ (0, errors_1$f.assert)(size > 0, 'The parameter size must be greater than 0');
765
+ return (0, go_1$f.go)(async function* () {
766
+ let buffer = [];
767
+ for await (const element of iterable) {
768
+ buffer.push(element);
769
+ if (buffer.length >= size) {
770
+ yield buffer;
771
+ buffer = [];
772
+ }
773
+ }
774
+ if (buffer.length)
775
+ yield buffer;
776
+ });
777
+ }
778
+ chunkAsync$1.chunkAsync = chunkAsync;
779
+
780
+ var chunkByAsync$1 = {};
781
+
782
+ var es2018$1 = {};
783
+
784
+ var array = {};
785
+
786
+ array.isntEmptyArray = array.isEmptyArray = array.isntArray = array.isArray = void 0;
787
+ function isArray(val) {
788
+ return Array.isArray(val);
789
+ }
790
+ array.isArray = isArray;
791
+ function isntArray(val) {
792
+ return !isArray(val);
793
+ }
794
+ array.isntArray = isntArray;
795
+ function isEmptyArray(val) {
796
+ return val.length === 0;
797
+ }
798
+ array.isEmptyArray = isEmptyArray;
799
+ function isntEmptyArray(val) {
800
+ return val.length !== 0;
801
+ }
802
+ array.isntEmptyArray = isntEmptyArray;
803
+
804
+ var asyncIterable = {};
805
+
806
+ var _null = {};
807
+
808
+ _null.isntNull = _null.isNull = void 0;
809
+ function isNull(val) {
810
+ return val === null;
811
+ }
812
+ _null.isNull = isNull;
813
+ function isntNull(val) {
814
+ return !isNull(val);
815
+ }
816
+ _null.isntNull = isntNull;
817
+
818
+ var _undefined = {};
819
+
820
+ _undefined.isntUndefined = _undefined.isUndefined = void 0;
821
+ function isUndefined(val) {
822
+ return val === undefined;
823
+ }
824
+ _undefined.isUndefined = isUndefined;
825
+ function isntUndefined(val) {
826
+ return !isUndefined(val);
827
+ }
828
+ _undefined.isntUndefined = isntUndefined;
829
+
830
+ asyncIterable.isntAsyncIterable = asyncIterable.isAsyncIterable = void 0;
831
+ const null_1$1 = _null;
832
+ const undefined_1$2 = _undefined;
833
+ function isAsyncIterable(val) {
834
+ return (0, null_1$1.isntNull)(val)
835
+ && (0, undefined_1$2.isntUndefined)(val)
836
+ && typeof val[Symbol.asyncIterator] === 'function';
837
+ }
838
+ asyncIterable.isAsyncIterable = isAsyncIterable;
839
+ function isntAsyncIterable(val) {
840
+ return !isAsyncIterable(val);
841
+ }
842
+ asyncIterable.isntAsyncIterable = isntAsyncIterable;
843
+
844
+ var bigint = {};
845
+
846
+ bigint.isntBigInt = bigint.isBigInt = void 0;
847
+ function isBigInt(val) {
848
+ return typeof val === 'bigint';
849
+ }
850
+ bigint.isBigInt = isBigInt;
851
+ function isntBigInt(val) {
852
+ return !isBigInt(val);
853
+ }
854
+ bigint.isntBigInt = isntBigInt;
855
+
856
+ var boolean = {};
857
+
858
+ boolean.isntBoolean = boolean.isBoolean = void 0;
859
+ function isBoolean(val) {
860
+ return typeof val === 'boolean';
861
+ }
862
+ boolean.isBoolean = isBoolean;
863
+ function isntBoolean(val) {
864
+ return !isBoolean(val);
865
+ }
866
+ boolean.isntBoolean = isntBoolean;
867
+
868
+ var char = {};
869
+
870
+ var string = {};
871
+
872
+ string.isntString = string.isString = void 0;
873
+ function isString(val) {
874
+ return typeof val === 'string';
875
+ }
876
+ string.isString = isString;
877
+ function isntString(val) {
878
+ return !isString(val);
879
+ }
880
+ string.isntString = isntString;
881
+
882
+ char.isntChar = char.isChar = void 0;
883
+ const string_1$1 = string;
884
+ function isChar(val) {
885
+ return (0, string_1$1.isString)(val)
886
+ && val.length === 1;
887
+ }
888
+ char.isChar = isChar;
889
+ function isntChar(val) {
890
+ return !isChar(val);
891
+ }
892
+ char.isntChar = isntChar;
893
+
894
+ var date = {};
895
+
896
+ date.isntDate = date.isDate = void 0;
897
+ function isDate(val) {
898
+ return val instanceof Date;
899
+ }
900
+ date.isDate = isDate;
901
+ function isntDate(val) {
902
+ return !isDate(val);
903
+ }
904
+ date.isntDate = isntDate;
905
+
906
+ var _enum = {};
907
+
908
+ _enum.inEnum = void 0;
909
+ function inEnum(val, _enum) {
910
+ return Object.values(_enum).includes(val);
911
+ }
912
+ _enum.inEnum = inEnum;
913
+
914
+ var error = {};
915
+
916
+ error.isntError = error.isError = void 0;
917
+ function isError(val) {
918
+ return val instanceof Error;
919
+ }
920
+ error.isError = isError;
921
+ function isntError(val) {
922
+ return !isError(val);
923
+ }
924
+ error.isntError = isntError;
925
+
926
+ var falsy = {};
927
+
928
+ falsy.isntFalsy = falsy.isFalsy = void 0;
929
+ function isFalsy(val) {
930
+ return !val;
931
+ }
932
+ falsy.isFalsy = isFalsy;
933
+ function isntFalsy(val) {
934
+ return !isFalsy(val);
935
+ }
936
+ falsy.isntFalsy = isntFalsy;
937
+
938
+ var _function = {};
939
+
940
+ _function.isntFunction = _function.isFunction = void 0;
941
+ function isFunction(val) {
942
+ return typeof val === 'function';
943
+ }
944
+ _function.isFunction = isFunction;
945
+ function isntFunction(val) {
946
+ return !isFunction(val);
947
+ }
948
+ _function.isntFunction = isntFunction;
949
+
950
+ var iterable = {};
951
+
952
+ iterable.isntIterable = iterable.isIterable = void 0;
953
+ const null_1 = _null;
954
+ const undefined_1$1 = _undefined;
955
+ function isIterable(val) {
956
+ return (0, null_1.isntNull)(val)
957
+ && (0, undefined_1$1.isntUndefined)(val)
958
+ && typeof val[Symbol.iterator] === 'function';
959
+ }
960
+ iterable.isIterable = isIterable;
961
+ function isntIterable(val) {
962
+ return !isIterable(val);
963
+ }
964
+ iterable.isntIterable = isntIterable;
965
+
966
+ var jsonRpc = {};
967
+
968
+ var object = {};
969
+
970
+ object.isntEmptyObject = object.isEmptyObject = object.isRecord = object.isntObject = object.isObject = void 0;
971
+ function isObject(val) {
972
+ return val !== null && typeof val === 'object';
973
+ }
974
+ object.isObject = isObject;
975
+ function isntObject(val) {
976
+ return !isObject(val);
977
+ }
978
+ object.isntObject = isntObject;
979
+ function isRecord(val) {
980
+ return isObject(val);
981
+ }
982
+ object.isRecord = isRecord;
983
+ function isEmptyObject(val) {
984
+ return Object.keys(val).length === 0;
985
+ }
986
+ object.isEmptyObject = isEmptyObject;
987
+ function isntEmptyObject(val) {
988
+ return Object.keys(val).length !== 0;
989
+ }
990
+ object.isntEmptyObject = isntEmptyObject;
991
+
992
+ var number = {};
993
+
994
+ number.isntNumber = number.isNumber = void 0;
995
+ function isNumber(val) {
996
+ return typeof val === 'number';
997
+ }
998
+ number.isNumber = isNumber;
999
+ function isntNumber(val) {
1000
+ return !isNumber(val);
1001
+ }
1002
+ number.isntNumber = isntNumber;
1003
+
1004
+ jsonRpc.isntJsonRpcError = jsonRpc.isJsonRpcError = jsonRpc.isntJsonRpcSuccess = jsonRpc.isJsonRpcSuccess = jsonRpc.isntJsonRpcRequest = jsonRpc.isJsonRpcRequest = jsonRpc.isntJsonRpcNotification = jsonRpc.isJsonRpcNotification = void 0;
1005
+ const array_1 = array;
1006
+ const object_1 = object;
1007
+ const string_1 = string;
1008
+ const number_1 = number;
1009
+ const undefined_1 = _undefined;
1010
+ function isJsonRpcId(val) {
1011
+ return (0, string_1.isString)(val) || (0, number_1.isNumber)(val);
1012
+ }
1013
+ function isJsonRpcParams(val) {
1014
+ return (0, array_1.isArray)(val) || (0, object_1.isObject)(val);
1015
+ }
1016
+ function isJsonRpcNotification(val) {
1017
+ return (0, object_1.isRecord)(val)
1018
+ && (0, string_1.isString)(val.jsonrpc)
1019
+ && (0, string_1.isString)(val.method)
1020
+ && (0, undefined_1.isUndefined)(val.id)
1021
+ && isJsonRpcParams(val.params);
1022
+ }
1023
+ jsonRpc.isJsonRpcNotification = isJsonRpcNotification;
1024
+ function isntJsonRpcNotification(val) {
1025
+ return !isJsonRpcNotification(val);
1026
+ }
1027
+ jsonRpc.isntJsonRpcNotification = isntJsonRpcNotification;
1028
+ function isJsonRpcRequest(val) {
1029
+ return (0, object_1.isRecord)(val)
1030
+ && (0, string_1.isString)(val.jsonrpc)
1031
+ && (0, string_1.isString)(val.method)
1032
+ && isJsonRpcId(val.id)
1033
+ && isJsonRpcParams(val.params);
1034
+ }
1035
+ jsonRpc.isJsonRpcRequest = isJsonRpcRequest;
1036
+ function isntJsonRpcRequest(val) {
1037
+ return !isJsonRpcRequest(val);
1038
+ }
1039
+ jsonRpc.isntJsonRpcRequest = isntJsonRpcRequest;
1040
+ function isJsonRpcSuccess(val) {
1041
+ return (0, object_1.isRecord)(val)
1042
+ && (0, string_1.isString)(val.jsonrpc)
1043
+ && (0, string_1.isString)(val.id)
1044
+ && (0, undefined_1.isntUndefined)(val.result);
1045
+ }
1046
+ jsonRpc.isJsonRpcSuccess = isJsonRpcSuccess;
1047
+ function isntJsonRpcSuccess(val) {
1048
+ return !isJsonRpcSuccess(val);
1049
+ }
1050
+ jsonRpc.isntJsonRpcSuccess = isntJsonRpcSuccess;
1051
+ function isJsonRpcError(val) {
1052
+ return (0, object_1.isRecord)(val)
1053
+ && (0, string_1.isString)(val.jsonrpc)
1054
+ && isJsonRpcId(val.id)
1055
+ && isJsonRpcErrorObject(val.error);
1056
+ }
1057
+ jsonRpc.isJsonRpcError = isJsonRpcError;
1058
+ function isntJsonRpcError(val) {
1059
+ return !isJsonRpcError(val);
1060
+ }
1061
+ jsonRpc.isntJsonRpcError = isntJsonRpcError;
1062
+ function isJsonRpcErrorObject(val) {
1063
+ return (0, object_1.isRecord)(val)
1064
+ && (0, number_1.isNumber)(val.code)
1065
+ && (0, string_1.isString)(val.message)
1066
+ && ((0, undefined_1.isUndefined)(val.data) || (0, object_1.isObject)(val.data));
1067
+ }
1068
+
1069
+ var json = {};
1070
+
1071
+ json.isntJson = json.isJson = void 0;
1072
+ function isJson(val) {
1073
+ try {
1074
+ JSON.stringify(val);
1075
+ return true;
1076
+ }
1077
+ catch (_a) {
1078
+ return false;
1079
+ }
1080
+ }
1081
+ json.isJson = isJson;
1082
+ function isntJson(val) {
1083
+ return !isntJson();
1084
+ }
1085
+ json.isntJson = isntJson;
1086
+
1087
+ var url = {};
1088
+
1089
+ url.isAbsoluteURL = void 0;
1090
+ function isAbsoluteURL(str) {
1091
+ try {
1092
+ new URL(str);
1093
+ return true;
1094
+ }
1095
+ catch (_a) {
1096
+ return false;
1097
+ }
1098
+ }
1099
+ url.isAbsoluteURL = isAbsoluteURL;
1100
+
1101
+ (function (exports) {
1102
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
1103
+ if (k2 === undefined) k2 = k;
1104
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
1105
+ }) : (function(o, m, k, k2) {
1106
+ if (k2 === undefined) k2 = k;
1107
+ o[k2] = m[k];
1108
+ }));
1109
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
1110
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
1111
+ };__exportStar(array, exports);
1112
+ __exportStar(asyncIterable, exports);
1113
+ __exportStar(bigint, exports);
1114
+ __exportStar(boolean, exports);
1115
+ __exportStar(char, exports);
1116
+ __exportStar(date, exports);
1117
+ __exportStar(_enum, exports);
1118
+ __exportStar(error, exports);
1119
+ __exportStar(falsy, exports);
1120
+ __exportStar(_function, exports);
1121
+ __exportStar(iterable, exports);
1122
+ __exportStar(jsonRpc, exports);
1123
+ __exportStar(json, exports);
1124
+ __exportStar(_null, exports);
1125
+ __exportStar(number, exports);
1126
+ __exportStar(object, exports);
1127
+ __exportStar(string, exports);
1128
+ __exportStar(_undefined, exports);
1129
+ __exportStar(url, exports);
1130
+
1131
+ }(es2018$1));
1132
+
1133
+ chunkByAsync$1.chunkByAsync = void 0;
1134
+ const types_1$k = es2018$1;
1135
+ function chunkByAsync(iterable, predicate) {
1136
+ if ((0, types_1$k.isAsyncIterable)(iterable)) {
1137
+ return chunkByAsyncIterable(iterable);
1138
+ }
1139
+ else {
1140
+ return chunkByIterable(iterable);
1141
+ }
1142
+ async function* chunkByAsyncIterable(iterable) {
1143
+ let buffer = [];
1144
+ let index = 0;
1145
+ for await (const element of iterable) {
1146
+ buffer.push(element);
1147
+ if (await predicate(element, index)) {
1148
+ yield buffer;
1149
+ buffer = [];
1150
+ }
1151
+ index++;
1152
+ }
1153
+ if (buffer.length)
1154
+ yield buffer;
1155
+ }
1156
+ async function* chunkByIterable(iterable) {
1157
+ let buffer = [];
1158
+ let index = 0;
1159
+ for (const element of iterable) {
1160
+ buffer.push(element);
1161
+ if (await predicate(element, index)) {
1162
+ yield buffer;
1163
+ buffer = [];
1164
+ }
1165
+ index++;
1166
+ }
1167
+ if (buffer.length)
1168
+ yield buffer;
1169
+ }
1170
+ }
1171
+ chunkByAsync$1.chunkByAsync = chunkByAsync;
1172
+
1173
+ var chunkBy$1 = {};
1174
+
1175
+ chunkBy$1.chunkBy = void 0;
1176
+ function* chunkBy(iterable, predicate) {
1177
+ let buffer = [];
1178
+ let index = 0;
1179
+ for (const element of iterable) {
1180
+ buffer.push(element);
1181
+ if (predicate(element, index)) {
1182
+ yield buffer;
1183
+ buffer = [];
1184
+ }
1185
+ index++;
1186
+ }
1187
+ if (buffer.length)
1188
+ yield buffer;
1189
+ }
1190
+ chunkBy$1.chunkBy = chunkBy;
1191
+
1192
+ var chunk$1 = {};
1193
+
1194
+ chunk$1.chunk = void 0;
1195
+ const go_1$e = es2018$3;
1196
+ const errors_1$e = es2018$2;
1197
+ function chunk(iterable, size) {
1198
+ (0, errors_1$e.assert)(Number.isInteger(size), 'The parameter size must be an integer');
1199
+ (0, errors_1$e.assert)(size > 0, 'The parameter size must be greater than 0');
1200
+ return (0, go_1$e.go)(function* () {
1201
+ let buffer = [];
1202
+ for (const element of iterable) {
1203
+ buffer.push(element);
1204
+ if (buffer.length >= size) {
1205
+ yield buffer;
1206
+ buffer = [];
1207
+ }
1208
+ }
1209
+ if (buffer.length)
1210
+ yield buffer;
1211
+ });
1212
+ }
1213
+ chunk$1.chunk = chunk;
1214
+
1215
+ var concatAsync$1 = {};
1216
+
1217
+ concatAsync$1.concatAsync = void 0;
1218
+ const types_1$j = es2018$1;
1219
+ const go_1$d = es2018$3;
1220
+ function concatAsync(iterable, ...otherIterables) {
1221
+ return (0, go_1$d.go)(async function* () {
1222
+ for (const iter of [iterable, ...otherIterables]) {
1223
+ if ((0, types_1$j.isAsyncIterable)(iter)) {
1224
+ for await (const element of iter) {
1225
+ yield element;
1226
+ }
1227
+ }
1228
+ else {
1229
+ for (const element of iter) {
1230
+ yield element;
1231
+ }
1232
+ }
1233
+ }
1234
+ });
1235
+ }
1236
+ concatAsync$1.concatAsync = concatAsync;
1237
+
1238
+ var concat$1 = {};
1239
+
1240
+ concat$1.concat = void 0;
1241
+ const go_1$c = es2018$3;
1242
+ function concat(iterable, ...otherIterables) {
1243
+ return (0, go_1$c.go)(function* () {
1244
+ for (const iter of [iterable, ...otherIterables]) {
1245
+ yield* iter;
1246
+ }
1247
+ });
1248
+ }
1249
+ concat$1.concat = concat;
1250
+
1251
+ var dropAsync$1 = {};
1252
+
1253
+ var utils = {};
1254
+
1255
+ utils.copyIterable = utils.copyAsyncIterable = void 0;
1256
+ async function* copyAsyncIterable(iterable) {
1257
+ for await (const element of iterable) {
1258
+ yield element;
1259
+ }
1260
+ }
1261
+ utils.copyAsyncIterable = copyAsyncIterable;
1262
+ function* copyIterable(iterable) {
1263
+ for (const element of iterable) {
1264
+ yield element;
1265
+ }
1266
+ }
1267
+ utils.copyIterable = copyIterable;
1268
+
1269
+ dropAsync$1.dropAsync = void 0;
1270
+ const go_1$b = es2018$3;
1271
+ const utils_1$3 = utils;
1272
+ const errors_1$d = es2018$2;
1273
+ function dropAsync(iterable, count) {
1274
+ (0, errors_1$d.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1275
+ (0, errors_1$d.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1276
+ if (count === 0)
1277
+ return (0, utils_1$3.copyAsyncIterable)(iterable);
1278
+ return (0, go_1$b.go)(async function* () {
1279
+ var _a;
1280
+ const iterator = iterable[Symbol.asyncIterator]();
1281
+ let done;
1282
+ try {
1283
+ let value;
1284
+ while ({ value, done } = await iterator.next(), !done) {
1285
+ if (count <= 0)
1286
+ break;
1287
+ count--;
1288
+ }
1289
+ while (!done) {
1290
+ yield value;
1291
+ ({ value, done } = await iterator.next());
1292
+ }
1293
+ }
1294
+ finally {
1295
+ if (!done)
1296
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1297
+ }
1298
+ });
1299
+ }
1300
+ dropAsync$1.dropAsync = dropAsync;
1301
+
1302
+ var dropRightAsync$1 = {};
1303
+
1304
+ dropRightAsync$1.dropRightAsync = void 0;
1305
+ const go_1$a = es2018$3;
1306
+ const utils_1$2 = utils;
1307
+ const errors_1$c = es2018$2;
1308
+ function dropRightAsync(iterable, count) {
1309
+ (0, errors_1$c.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1310
+ (0, errors_1$c.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1311
+ if (count === 0)
1312
+ return (0, utils_1$2.copyAsyncIterable)(iterable);
1313
+ return (0, go_1$a.go)(async function* () {
1314
+ const arr = await toArrayAsync$2(iterable);
1315
+ const result = arr.slice(0, -count);
1316
+ for (const value of result) {
1317
+ yield value;
1318
+ }
1319
+ });
1320
+ }
1321
+ dropRightAsync$1.dropRightAsync = dropRightAsync;
1322
+ async function toArrayAsync$2(iterable) {
1323
+ const result = [];
1324
+ for await (const element of iterable) {
1325
+ result.push(element);
1326
+ }
1327
+ return result;
1328
+ }
1329
+
1330
+ var dropRight$1 = {};
1331
+
1332
+ dropRight$1.dropRight = void 0;
1333
+ const go_1$9 = es2018$3;
1334
+ const utils_1$1 = utils;
1335
+ const errors_1$b = es2018$2;
1336
+ function dropRight(iterable, count) {
1337
+ (0, errors_1$b.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1338
+ (0, errors_1$b.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1339
+ if (count === 0)
1340
+ return (0, utils_1$1.copyIterable)(iterable);
1341
+ return (0, go_1$9.go)(function* () {
1342
+ const arr = Array.from(iterable);
1343
+ yield* arr.slice(0, -count);
1344
+ });
1345
+ }
1346
+ dropRight$1.dropRight = dropRight;
1347
+
1348
+ var dropUntilAsync$1 = {};
1349
+
1350
+ dropUntilAsync$1.dropUntilAsync = void 0;
1351
+ const types_1$i = es2018$1;
1352
+ function dropUntilAsync(iterable, predicate) {
1353
+ if ((0, types_1$i.isAsyncIterable)(iterable)) {
1354
+ return dropUntilAsyncIterable(iterable);
1355
+ }
1356
+ else {
1357
+ return dropUntilIterable(iterable);
1358
+ }
1359
+ async function* dropUntilAsyncIterable(iterable) {
1360
+ var _a;
1361
+ const iterator = iterable[Symbol.asyncIterator]();
1362
+ let done;
1363
+ try {
1364
+ let index = 0;
1365
+ let value;
1366
+ while ({ value, done } = await iterator.next(), !done) {
1367
+ if (await predicate(value, index++))
1368
+ break;
1369
+ }
1370
+ while (!done) {
1371
+ yield value;
1372
+ ({ value, done } = await iterator.next());
1373
+ }
1374
+ }
1375
+ finally {
1376
+ if (!done)
1377
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1378
+ }
1379
+ }
1380
+ async function* dropUntilIterable(iterable) {
1381
+ var _a;
1382
+ const iterator = iterable[Symbol.iterator]();
1383
+ let done;
1384
+ try {
1385
+ let index = 0;
1386
+ let value;
1387
+ while ({ value, done } = iterator.next(), !done) {
1388
+ if (await predicate(value, index++))
1389
+ break;
1390
+ }
1391
+ while (!done) {
1392
+ yield value;
1393
+ ({ value, done } = iterator.next());
1394
+ }
1395
+ }
1396
+ finally {
1397
+ if (!done)
1398
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1399
+ }
1400
+ }
1401
+ }
1402
+ dropUntilAsync$1.dropUntilAsync = dropUntilAsync;
1403
+
1404
+ var dropUntil$1 = {};
1405
+
1406
+ dropUntil$1.dropUntil = void 0;
1407
+ function* dropUntil(iterable, predicate) {
1408
+ var _a;
1409
+ const iterator = iterable[Symbol.iterator]();
1410
+ let done;
1411
+ try {
1412
+ let index = 0;
1413
+ let value;
1414
+ while ({ value, done } = iterator.next(), !done) {
1415
+ if (predicate(value, index++))
1416
+ break;
1417
+ }
1418
+ while (!done) {
1419
+ yield value;
1420
+ ({ value, done } = iterator.next());
1421
+ }
1422
+ }
1423
+ finally {
1424
+ if (!done)
1425
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1426
+ }
1427
+ }
1428
+ dropUntil$1.dropUntil = dropUntil;
1429
+
1430
+ var drop$1 = {};
1431
+
1432
+ drop$1.drop = void 0;
1433
+ const go_1$8 = es2018$3;
1434
+ const utils_1 = utils;
1435
+ const errors_1$a = es2018$2;
1436
+ function drop(iterable, count) {
1437
+ (0, errors_1$a.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1438
+ (0, errors_1$a.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1439
+ if (count === 0)
1440
+ return (0, utils_1.copyIterable)(iterable);
1441
+ return (0, go_1$8.go)(function* () {
1442
+ var _a;
1443
+ const iterator = iterable[Symbol.iterator]();
1444
+ let done;
1445
+ try {
1446
+ let value;
1447
+ while ({ value, done } = iterator.next(), !done) {
1448
+ if (count <= 0)
1449
+ break;
1450
+ count--;
1451
+ }
1452
+ while (!done) {
1453
+ yield value;
1454
+ ({ value, done } = iterator.next());
1455
+ }
1456
+ }
1457
+ finally {
1458
+ if (!done)
1459
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1460
+ }
1461
+ });
1462
+ }
1463
+ drop$1.drop = drop;
1464
+
1465
+ var filterAsync$1 = {};
1466
+
1467
+ filterAsync$1.filterAsync = void 0;
1468
+ const types_1$h = es2018$1;
1469
+ function filterAsync(iterable, predicate) {
1470
+ if ((0, types_1$h.isAsyncIterable)(iterable)) {
1471
+ return filterAsyncIterable(iterable);
1472
+ }
1473
+ else {
1474
+ return filterIterable(iterable);
1475
+ }
1476
+ async function* filterAsyncIterable(iterable) {
1477
+ let index = 0;
1478
+ for await (const element of iterable) {
1479
+ if (await predicate(element, index))
1480
+ yield element;
1481
+ index++;
1482
+ }
1483
+ }
1484
+ async function* filterIterable(iterable) {
1485
+ let index = 0;
1486
+ for (const element of iterable) {
1487
+ if (await predicate(element, index))
1488
+ yield element;
1489
+ index++;
1490
+ }
1491
+ }
1492
+ }
1493
+ filterAsync$1.filterAsync = filterAsync;
1494
+
1495
+ var filter$1 = {};
1496
+
1497
+ filter$1.filter = void 0;
1498
+ function* filter(iterable, predicate) {
1499
+ let index = 0;
1500
+ for (const element of iterable) {
1501
+ if (predicate(element, index))
1502
+ yield element;
1503
+ index++;
1504
+ }
1505
+ }
1506
+ filter$1.filter = filter;
1507
+
1508
+ var flattenAsync$1 = {};
1509
+
1510
+ var flattenDeepAsync$1 = {};
1511
+
1512
+ var flattenByAsync$1 = {};
1513
+
1514
+ flattenByAsync$1.flattenByAsync = void 0;
1515
+ const types_1$g = es2018$1;
1516
+ function flattenByAsync(iterable, predicate) {
1517
+ if ((0, types_1$g.isAsyncIterable)(iterable)) {
1518
+ return flattenByAsyncIterable(iterable);
1519
+ }
1520
+ else {
1521
+ return flattenByIterable(iterable);
1522
+ }
1523
+ async function* flattenByAsyncIterable(iterable) {
1524
+ const level = 1;
1525
+ for await (const element of iterable) {
1526
+ if (isFiniteIterable$1(element) && await predicate(element, level)) {
1527
+ yield* flatten(element, level + 1);
1528
+ }
1529
+ else {
1530
+ yield element;
1531
+ }
1532
+ }
1533
+ }
1534
+ function flattenByIterable(iterable) {
1535
+ return flatten(iterable, 1);
1536
+ }
1537
+ async function* flatten(iterable, level) {
1538
+ for (const element of iterable) {
1539
+ if (isFiniteIterable$1(element) && await predicate(element, level)) {
1540
+ yield* flatten(element, level + 1);
1541
+ }
1542
+ else {
1543
+ yield element;
1544
+ }
1545
+ }
1546
+ }
1547
+ }
1548
+ flattenByAsync$1.flattenByAsync = flattenByAsync;
1549
+ function isFiniteIterable$1(val) {
1550
+ return (0, types_1$g.isIterable)(val) && (0, types_1$g.isntChar)(val);
1551
+ }
1552
+
1553
+ flattenDeepAsync$1.flattenDeepAsync = void 0;
1554
+ const flatten_by_async_1 = flattenByAsync$1;
1555
+ const errors_1$9 = es2018$2;
1556
+ function flattenDeepAsync(iterable, depth = Infinity) {
1557
+ (0, errors_1$9.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1558
+ (0, errors_1$9.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1559
+ return (0, flatten_by_async_1.flattenByAsync)(iterable, (_, level) => level <= depth);
1560
+ }
1561
+ flattenDeepAsync$1.flattenDeepAsync = flattenDeepAsync;
1562
+
1563
+ flattenAsync$1.flattenAsync = void 0;
1564
+ const flatten_deep_async_1 = flattenDeepAsync$1;
1565
+ function flattenAsync(iterable) {
1566
+ return (0, flatten_deep_async_1.flattenDeepAsync)(iterable, 1);
1567
+ }
1568
+ flattenAsync$1.flattenAsync = flattenAsync;
1569
+
1570
+ var flattenBy$1 = {};
1571
+
1572
+ flattenBy$1.flattenBy = void 0;
1573
+ const types_1$f = es2018$1;
1574
+ function flattenBy(iterable, predicate) {
1575
+ return flatten(iterable, 1);
1576
+ function* flatten(iterable, level) {
1577
+ for (const element of iterable) {
1578
+ if (isFiniteIterable(element) && predicate(element, level)) {
1579
+ yield* flatten(element, level + 1);
1580
+ }
1581
+ else {
1582
+ yield element;
1583
+ }
1584
+ }
1585
+ }
1586
+ }
1587
+ flattenBy$1.flattenBy = flattenBy;
1588
+ function isFiniteIterable(val) {
1589
+ return (0, types_1$f.isIterable)(val) && (0, types_1$f.isntChar)(val);
1590
+ }
1591
+
1592
+ var flattenDeep$1 = {};
1593
+
1594
+ flattenDeep$1.flattenDeep = void 0;
1595
+ const flatten_by_1 = flattenBy$1;
1596
+ const errors_1$8 = es2018$2;
1597
+ function flattenDeep(iterable, depth = Infinity) {
1598
+ (0, errors_1$8.assert)(depth === Infinity || Number.isInteger(depth), 'The parameter depth must be an integer');
1599
+ (0, errors_1$8.assert)(depth >= 0, 'The parameter depth must be greater than or equal to 0');
1600
+ return (0, flatten_by_1.flattenBy)(iterable, (_, level) => level <= depth);
1601
+ }
1602
+ flattenDeep$1.flattenDeep = flattenDeep;
1603
+
1604
+ var flatten$1 = {};
1605
+
1606
+ flatten$1.flatten = void 0;
1607
+ const flatten_deep_1 = flattenDeep$1;
1608
+ function flatten(iterable) {
1609
+ return (0, flatten_deep_1.flattenDeep)(iterable, 1);
1610
+ }
1611
+ flatten$1.flatten = flatten;
1612
+
1613
+ var mapAsync$1 = {};
1614
+
1615
+ mapAsync$1.mapAsync = void 0;
1616
+ const types_1$e = es2018$1;
1617
+ function mapAsync(iterable, fn) {
1618
+ if ((0, types_1$e.isAsyncIterable)(iterable)) {
1619
+ return mapAsyncIterable(iterable);
1620
+ }
1621
+ else {
1622
+ return mapIterable(iterable);
1623
+ }
1624
+ async function* mapAsyncIterable(iterable) {
1625
+ let index = 0;
1626
+ for await (const element of iterable) {
1627
+ yield await fn(element, index);
1628
+ index++;
1629
+ }
1630
+ }
1631
+ async function* mapIterable(iterable) {
1632
+ let index = 0;
1633
+ for (const element of iterable) {
1634
+ yield await fn(element, index);
1635
+ index++;
1636
+ }
1637
+ }
1638
+ }
1639
+ mapAsync$1.mapAsync = mapAsync;
1640
+
1641
+ var map$1 = {};
1642
+
1643
+ map$1.map = void 0;
1644
+ function* map(iterable, fn) {
1645
+ let index = 0;
1646
+ for (const element of iterable) {
1647
+ yield fn(element, index);
1648
+ index++;
1649
+ }
1650
+ }
1651
+ map$1.map = map;
1652
+
1653
+ var repeatAsync$1 = {};
1654
+
1655
+ repeatAsync$1.repeatAsync = void 0;
1656
+ const go_1$7 = es2018$3;
1657
+ const errors_1$7 = es2018$2;
1658
+ function repeatAsync(iterable, times) {
1659
+ (0, errors_1$7.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1660
+ (0, errors_1$7.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1661
+ if (times === Infinity)
1662
+ warnInfiniteLoop$1();
1663
+ return (0, go_1$7.go)(async function* () {
1664
+ const cache = [];
1665
+ if (times > 0) {
1666
+ for await (const element of iterable) {
1667
+ yield element;
1668
+ cache.push(element);
1669
+ }
1670
+ times--;
1671
+ }
1672
+ while (times > 0) {
1673
+ yield* cache;
1674
+ times--;
1675
+ }
1676
+ });
1677
+ }
1678
+ repeatAsync$1.repeatAsync = repeatAsync;
1679
+ function warnInfiniteLoop$1() {
1680
+ if (isProduction$1())
1681
+ return;
1682
+ console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1683
+ }
1684
+ function isProduction$1() {
1685
+ return process.env.NODE_ENV === 'production';
1686
+ }
1687
+
1688
+ var repeat$1 = {};
1689
+
1690
+ repeat$1.repeat = void 0;
1691
+ const go_1$6 = es2018$3;
1692
+ const errors_1$6 = es2018$2;
1693
+ function repeat(iterable, times) {
1694
+ (0, errors_1$6.assert)(times === Infinity || Number.isInteger(times), 'The parameter times must be an integer');
1695
+ (0, errors_1$6.assert)(times >= 0, 'The parameter times must be greater than or equal to 0');
1696
+ if (times === Infinity)
1697
+ warnInfiniteLoop();
1698
+ return (0, go_1$6.go)(function* () {
1699
+ const cache = [];
1700
+ if (times > 0) {
1701
+ for (const element of iterable) {
1702
+ yield element;
1703
+ cache.push(element);
1704
+ }
1705
+ times--;
1706
+ }
1707
+ while (times > 0) {
1708
+ yield* cache;
1709
+ times--;
1710
+ }
1711
+ });
1712
+ }
1713
+ repeat$1.repeat = repeat;
1714
+ function warnInfiniteLoop() {
1715
+ if (isProduction())
1716
+ return;
1717
+ console.warn('When iterable has no elements and times is Infinity, repeat() will be in dead loop');
1718
+ }
1719
+ function isProduction() {
1720
+ return process.env.NODE_ENV === 'production';
1721
+ }
1722
+
1723
+ var sliceAsync$1 = {};
1724
+
1725
+ sliceAsync$1.sliceAsync = void 0;
1726
+ const go_1$5 = es2018$3;
1727
+ const errors_1$5 = es2018$2;
1728
+ function sliceAsync(iterable, start, end = Infinity) {
1729
+ (0, errors_1$5.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1730
+ (0, errors_1$5.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1731
+ (0, errors_1$5.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1732
+ (0, errors_1$5.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1733
+ return (0, go_1$5.go)(async function* () {
1734
+ let index = 0;
1735
+ for await (const element of iterable) {
1736
+ if (index >= end)
1737
+ break;
1738
+ if (index >= start)
1739
+ yield element;
1740
+ index++;
1741
+ }
1742
+ });
1743
+ }
1744
+ sliceAsync$1.sliceAsync = sliceAsync;
1745
+
1746
+ var slice$1 = {};
1747
+
1748
+ slice$1.slice = void 0;
1749
+ const go_1$4 = es2018$3;
1750
+ const errors_1$4 = es2018$2;
1751
+ function slice(iterable, start, end = Infinity) {
1752
+ (0, errors_1$4.assert)(Number.isInteger(start), 'The parameter start must be an integer');
1753
+ (0, errors_1$4.assert)(start >= 0, 'The parameter start must be greater than or equal to 0');
1754
+ (0, errors_1$4.assert)(Number.isInteger(end), 'The parameter end must be an integer');
1755
+ (0, errors_1$4.assert)(end >= start, 'The parameter end must be greater than or equal to start');
1756
+ return (0, go_1$4.go)(function* () {
1757
+ let index = 0;
1758
+ for (const element of iterable) {
1759
+ if (index >= end)
1760
+ break;
1761
+ if (index >= start)
1762
+ yield element;
1763
+ index++;
1764
+ }
1765
+ });
1766
+ }
1767
+ slice$1.slice = slice;
1768
+
1769
+ var splitAsync$1 = {};
1770
+
1771
+ splitAsync$1.splitAsync = void 0;
1772
+ async function* splitAsync(iterable, separator) {
1773
+ let buffer = [];
1774
+ for await (const element of iterable) {
1775
+ if (element === separator) {
1776
+ yield buffer;
1777
+ buffer = [];
1778
+ }
1779
+ else {
1780
+ buffer.push(element);
1781
+ }
1782
+ }
1783
+ yield buffer;
1784
+ }
1785
+ splitAsync$1.splitAsync = splitAsync;
1786
+
1787
+ var splitByAsync$1 = {};
1788
+
1789
+ splitByAsync$1.splitByAsync = void 0;
1790
+ const types_1$d = es2018$1;
1791
+ function splitByAsync(iterable, predicate) {
1792
+ if ((0, types_1$d.isAsyncIterable)(iterable)) {
1793
+ return splitByAsyncIterable(iterable);
1794
+ }
1795
+ else {
1796
+ return splitByIterable(iterable);
1797
+ }
1798
+ async function* splitByIterable(iterable) {
1799
+ let buffer = [];
1800
+ let index = 0;
1801
+ for (const element of iterable) {
1802
+ if (await predicate(element, index)) {
1803
+ yield buffer;
1804
+ buffer = [];
1805
+ }
1806
+ else {
1807
+ buffer.push(element);
1808
+ }
1809
+ index++;
1810
+ }
1811
+ yield buffer;
1812
+ }
1813
+ async function* splitByAsyncIterable(iterable) {
1814
+ let buffer = [];
1815
+ let index = 0;
1816
+ for await (const element of iterable) {
1817
+ if (await predicate(element, index)) {
1818
+ yield buffer;
1819
+ buffer = [];
1820
+ }
1821
+ else {
1822
+ buffer.push(element);
1823
+ }
1824
+ index++;
1825
+ }
1826
+ yield buffer;
1827
+ }
1828
+ }
1829
+ splitByAsync$1.splitByAsync = splitByAsync;
1830
+
1831
+ var splitBy$1 = {};
1832
+
1833
+ splitBy$1.splitBy = void 0;
1834
+ function* splitBy(iterable, predicate) {
1835
+ let buffer = [];
1836
+ let index = 0;
1837
+ for (const element of iterable) {
1838
+ if (predicate(element, index)) {
1839
+ yield buffer;
1840
+ buffer = [];
1841
+ }
1842
+ else {
1843
+ buffer.push(element);
1844
+ }
1845
+ index++;
1846
+ }
1847
+ yield buffer;
1848
+ }
1849
+ splitBy$1.splitBy = splitBy;
1850
+
1851
+ var split$1 = {};
1852
+
1853
+ split$1.split = void 0;
1854
+ function* split(iterable, separator) {
1855
+ let buffer = [];
1856
+ for (const element of iterable) {
1857
+ if (element === separator) {
1858
+ yield buffer;
1859
+ buffer = [];
1860
+ }
1861
+ else {
1862
+ buffer.push(element);
1863
+ }
1864
+ }
1865
+ yield buffer;
1866
+ }
1867
+ split$1.split = split;
1868
+
1869
+ var takeAsync$1 = {};
1870
+
1871
+ takeAsync$1.takeAsync = void 0;
1872
+ const go_1$3 = es2018$3;
1873
+ const errors_1$3 = es2018$2;
1874
+ function takeAsync(iterable, count) {
1875
+ (0, errors_1$3.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1876
+ (0, errors_1$3.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1877
+ return (0, go_1$3.go)(async function* () {
1878
+ if (count === 0)
1879
+ return;
1880
+ for await (const element of iterable) {
1881
+ yield element;
1882
+ count--;
1883
+ if (count === 0)
1884
+ break;
1885
+ }
1886
+ });
1887
+ }
1888
+ takeAsync$1.takeAsync = takeAsync;
1889
+
1890
+ var takeRightAsync$1 = {};
1891
+
1892
+ takeRightAsync$1.takeRightAsync = void 0;
1893
+ const go_1$2 = es2018$3;
1894
+ const errors_1$2 = es2018$2;
1895
+ function takeRightAsync(iterable, count) {
1896
+ (0, errors_1$2.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1897
+ (0, errors_1$2.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1898
+ return (0, go_1$2.go)(async function* () {
1899
+ var _a;
1900
+ const iterator = iterable[Symbol.asyncIterator]();
1901
+ let done;
1902
+ try {
1903
+ const buffer = [];
1904
+ let value;
1905
+ while ({ value, done } = await iterator.next(), !done) {
1906
+ buffer.push(value);
1907
+ if (buffer.length > count)
1908
+ buffer.shift();
1909
+ }
1910
+ yield* buffer;
1911
+ }
1912
+ finally {
1913
+ if (!done)
1914
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
1915
+ }
1916
+ });
1917
+ }
1918
+ takeRightAsync$1.takeRightAsync = takeRightAsync;
1919
+
1920
+ var takeRight$1 = {};
1921
+
1922
+ takeRight$1.takeRight = void 0;
1923
+ const go_1$1 = es2018$3;
1924
+ const errors_1$1 = es2018$2;
1925
+ function takeRight(iterable, count) {
1926
+ (0, errors_1$1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
1927
+ (0, errors_1$1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
1928
+ return (0, go_1$1.go)(function* () {
1929
+ var _a;
1930
+ const iterator = iterable[Symbol.iterator]();
1931
+ let done;
1932
+ try {
1933
+ const buffer = [];
1934
+ let value;
1935
+ while ({ value, done } = iterator.next(), !done) {
1936
+ buffer.push(value);
1937
+ if (buffer.length > count)
1938
+ buffer.shift();
1939
+ }
1940
+ yield* buffer;
1941
+ }
1942
+ finally {
1943
+ if (!done)
1944
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
1945
+ }
1946
+ });
1947
+ }
1948
+ takeRight$1.takeRight = takeRight;
1949
+
1950
+ var takeUntilAsync$1 = {};
1951
+
1952
+ takeUntilAsync$1.takeUntilAsync = void 0;
1953
+ const types_1$c = es2018$1;
1954
+ function takeUntilAsync(iterable, predicate) {
1955
+ if ((0, types_1$c.isAsyncIterable)(iterable)) {
1956
+ return takeUntilAsyncIterable(iterable);
1957
+ }
1958
+ else {
1959
+ return takeUntilIterable(iterable);
1960
+ }
1961
+ async function* takeUntilAsyncIterable(iterable) {
1962
+ let index = 0;
1963
+ for await (const element of iterable) {
1964
+ if (await predicate(element, index))
1965
+ break;
1966
+ yield element;
1967
+ index++;
1968
+ }
1969
+ }
1970
+ async function* takeUntilIterable(iterable) {
1971
+ let index = 0;
1972
+ for (const element of iterable) {
1973
+ if (await predicate(element, index))
1974
+ break;
1975
+ yield element;
1976
+ index++;
1977
+ }
1978
+ }
1979
+ }
1980
+ takeUntilAsync$1.takeUntilAsync = takeUntilAsync;
1981
+
1982
+ var takeUntil$1 = {};
1983
+
1984
+ takeUntil$1.takeUntil = void 0;
1985
+ function* takeUntil(iterable, predicate) {
1986
+ let index = 0;
1987
+ for (const element of iterable) {
1988
+ if (predicate(element, index))
1989
+ break;
1990
+ yield element;
1991
+ index++;
1992
+ }
1993
+ }
1994
+ takeUntil$1.takeUntil = takeUntil;
1995
+
1996
+ var take$1 = {};
1997
+
1998
+ take$1.take = void 0;
1999
+ const go_1 = es2018$3;
2000
+ const errors_1 = es2018$2;
2001
+ function take(iterable, count) {
2002
+ (0, errors_1.assert)(Number.isInteger(count), 'The parameter count must be an integer');
2003
+ (0, errors_1.assert)(count >= 0, 'The parameter count must be greater than or equal to 0');
2004
+ return (0, go_1.go)(function* () {
2005
+ if (count === 0)
2006
+ return;
2007
+ for (const element of iterable) {
2008
+ yield element;
2009
+ count--;
2010
+ if (count === 0)
2011
+ break;
2012
+ }
2013
+ });
2014
+ }
2015
+ take$1.take = take;
2016
+
2017
+ var tapAsync$1 = {};
2018
+
2019
+ tapAsync$1.tapAsync = void 0;
2020
+ const types_1$b = es2018$1;
2021
+ function tapAsync(iterable, fn) {
2022
+ if ((0, types_1$b.isAsyncIterable)(iterable)) {
2023
+ return tapAsyncIterable(iterable);
2024
+ }
2025
+ else {
2026
+ return tapIterable(iterable);
2027
+ }
2028
+ async function* tapIterable(iterable) {
2029
+ let index = 0;
2030
+ for (const element of iterable) {
2031
+ await fn(element, index);
2032
+ yield element;
2033
+ index++;
2034
+ }
2035
+ }
2036
+ async function* tapAsyncIterable(iterable) {
2037
+ let index = 0;
2038
+ for await (const element of iterable) {
2039
+ await fn(element, index);
2040
+ yield element;
2041
+ index++;
2042
+ }
2043
+ }
2044
+ }
2045
+ tapAsync$1.tapAsync = tapAsync;
2046
+
2047
+ var tap$1 = {};
2048
+
2049
+ tap$1.tap = void 0;
2050
+ function* tap(iterable, fn) {
2051
+ let index = 0;
2052
+ for (const element of iterable) {
2053
+ fn(element, index);
2054
+ yield element;
2055
+ index++;
2056
+ }
2057
+ }
2058
+ tap$1.tap = tap;
2059
+
2060
+ var toAsyncIterable$1 = {};
2061
+
2062
+ toAsyncIterable$1.toAsyncIterable = void 0;
2063
+ async function* toAsyncIterable(iterable) {
2064
+ for (const value of iterable) {
2065
+ yield value;
2066
+ }
2067
+ }
2068
+ toAsyncIterable$1.toAsyncIterable = toAsyncIterable;
2069
+
2070
+ var transformAsync$1 = {};
2071
+
2072
+ transformAsync$1.transformAsync = void 0;
2073
+ async function* transformAsync(iterable, transformer) {
2074
+ yield* transformer(iterable);
2075
+ }
2076
+ transformAsync$1.transformAsync = transformAsync;
2077
+
2078
+ var transform$1 = {};
2079
+
2080
+ transform$1.transform = void 0;
2081
+ function* transform(iterable, transformer) {
2082
+ yield* transformer(iterable);
2083
+ }
2084
+ transform$1.transform = transform;
2085
+
2086
+ var uniqAsync$1 = {};
2087
+
2088
+ uniqAsync$1.uniqAsync = void 0;
2089
+ async function* uniqAsync(iterable) {
2090
+ const bucket = new Set();
2091
+ for await (const element of iterable) {
2092
+ if (!bucket.has(element)) {
2093
+ yield element;
2094
+ bucket.add(element);
2095
+ }
2096
+ }
2097
+ }
2098
+ uniqAsync$1.uniqAsync = uniqAsync;
2099
+
2100
+ var uniqByAsync$1 = {};
2101
+
2102
+ uniqByAsync$1.uniqByAsync = void 0;
2103
+ const types_1$a = es2018$1;
2104
+ function uniqByAsync(iterable, fn) {
2105
+ if ((0, types_1$a.isAsyncIterable)(iterable)) {
2106
+ return uniqByAsyncIterable(iterable);
2107
+ }
2108
+ else {
2109
+ return uniqByIterable(iterable);
2110
+ }
2111
+ async function* uniqByAsyncIterable(iterable) {
2112
+ const bucket = new Set();
2113
+ let index = 0;
2114
+ for await (const element of iterable) {
2115
+ const result = await fn(element, index);
2116
+ if (!bucket.has(result)) {
2117
+ yield element;
2118
+ bucket.add(result);
2119
+ }
2120
+ index++;
2121
+ }
2122
+ }
2123
+ async function* uniqByIterable(iterable) {
2124
+ const bucket = new Set();
2125
+ let index = 0;
2126
+ for (const element of iterable) {
2127
+ const result = await fn(element, index);
2128
+ if (!bucket.has(result)) {
2129
+ yield element;
2130
+ bucket.add(result);
2131
+ }
2132
+ index++;
2133
+ }
2134
+ }
2135
+ }
2136
+ uniqByAsync$1.uniqByAsync = uniqByAsync;
2137
+
2138
+ var uniqBy$1 = {};
2139
+
2140
+ uniqBy$1.uniqBy = void 0;
2141
+ function* uniqBy(iterable, fn) {
2142
+ const bucket = new Set();
2143
+ let index = 0;
2144
+ for (const element of iterable) {
2145
+ const result = fn(element, index);
2146
+ if (!bucket.has(result)) {
2147
+ yield element;
2148
+ bucket.add(result);
2149
+ }
2150
+ index++;
2151
+ }
2152
+ }
2153
+ uniqBy$1.uniqBy = uniqBy;
2154
+
2155
+ var uniq$1 = {};
2156
+
2157
+ uniq$1.uniq = void 0;
2158
+ function* uniq(iterable) {
2159
+ const bucket = new Set();
2160
+ for (const element of iterable) {
2161
+ if (!bucket.has(element)) {
2162
+ yield element;
2163
+ bucket.add(element);
2164
+ }
2165
+ }
2166
+ }
2167
+ uniq$1.uniq = uniq;
2168
+
2169
+ var zipAsync$1 = {};
2170
+
2171
+ zipAsync$1.zipAsync = void 0;
2172
+ const types_1$9 = es2018$1;
2173
+ var Kind;
2174
+ (function (Kind) {
2175
+ Kind[Kind["Sync"] = 0] = "Sync";
2176
+ Kind[Kind["Async"] = 1] = "Async";
2177
+ })(Kind || (Kind = {}));
2178
+ function zipAsync(iterable, ...otherIterables) {
2179
+ return zipWithSize$1(iterable, ...otherIterables);
2180
+ }
2181
+ zipAsync$1.zipAsync = zipAsync;
2182
+ async function* zipWithSize$1(...iterables) {
2183
+ var _a, _b, _c, _d;
2184
+ const length = iterables.length;
2185
+ const iterators = iterables.map(iterable => {
2186
+ if ((0, types_1$9.isAsyncIterable)(iterable)) {
2187
+ return [Kind.Async, iterable[Symbol.asyncIterator]()];
2188
+ }
2189
+ else {
2190
+ return [Kind.Sync, iterable[Symbol.iterator]()];
2191
+ }
2192
+ });
2193
+ const dones = iterators.map(() => false);
2194
+ try {
2195
+ while (true) {
2196
+ const result = new Array(length);
2197
+ for (let i = 0; i < length; i++) {
2198
+ const [kind, iterator] = iterators[i];
2199
+ let temp;
2200
+ if (kind === Kind.Async) {
2201
+ temp = await iterator.next();
2202
+ }
2203
+ else {
2204
+ temp = iterator.next();
2205
+ }
2206
+ if (temp.done) {
2207
+ dones[i] = true;
2208
+ return;
2209
+ }
2210
+ result[i] = temp.value;
2211
+ }
2212
+ yield result;
2213
+ }
2214
+ }
2215
+ finally {
2216
+ const undoneIterators = iterators.filter((_, i) => !dones[i]);
2217
+ for (const [kind, iterator] of undoneIterators) {
2218
+ if (kind === Kind.Async) {
2219
+ await ((_b = (_a = iterator).return) === null || _b === void 0 ? void 0 : _b.call(_a));
2220
+ }
2221
+ else {
2222
+ (_d = (_c = iterator).return) === null || _d === void 0 ? void 0 : _d.call(_c);
2223
+ }
2224
+ }
2225
+ }
2226
+ }
2227
+
2228
+ var zip$1 = {};
2229
+
2230
+ zip$1.zip = void 0;
2231
+ function zip(iterable, ...otherIterables) {
2232
+ return zipWithSize(iterable, ...otherIterables);
2233
+ }
2234
+ zip$1.zip = zip;
2235
+ function* zipWithSize(...iterables) {
2236
+ const length = iterables.length;
2237
+ const iterators = iterables.map(iterable => iterable[Symbol.iterator]());
2238
+ const dones = iterators.map(() => false);
2239
+ try {
2240
+ while (true) {
2241
+ const result = new Array(length);
2242
+ for (let i = 0; i < length; i++) {
2243
+ const { value, done } = iterators[i].next();
2244
+ if (done) {
2245
+ dones[i] = true;
2246
+ return;
2247
+ }
2248
+ result[i] = value;
2249
+ }
2250
+ yield result;
2251
+ }
2252
+ }
2253
+ finally {
2254
+ const undoneIterators = iterators.filter((_, i) => !dones[i]);
2255
+ undoneIterators.forEach(x => { var _a; return (_a = x.return) === null || _a === void 0 ? void 0 : _a.call(x); });
2256
+ }
2257
+ }
2258
+
2259
+ (function (exports) {
2260
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2261
+ if (k2 === undefined) k2 = k;
2262
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2263
+ }) : (function(o, m, k, k2) {
2264
+ if (k2 === undefined) k2 = k;
2265
+ o[k2] = m[k];
2266
+ }));
2267
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2268
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2269
+ };__exportStar(chunkAsync$1, exports);
2270
+ __exportStar(chunkByAsync$1, exports);
2271
+ __exportStar(chunkBy$1, exports);
2272
+ __exportStar(chunk$1, exports);
2273
+ __exportStar(concatAsync$1, exports);
2274
+ __exportStar(concat$1, exports);
2275
+ __exportStar(dropAsync$1, exports);
2276
+ __exportStar(dropRightAsync$1, exports);
2277
+ __exportStar(dropRight$1, exports);
2278
+ __exportStar(dropUntilAsync$1, exports);
2279
+ __exportStar(dropUntil$1, exports);
2280
+ __exportStar(drop$1, exports);
2281
+ __exportStar(filterAsync$1, exports);
2282
+ __exportStar(filter$1, exports);
2283
+ __exportStar(flattenAsync$1, exports);
2284
+ __exportStar(flattenByAsync$1, exports);
2285
+ __exportStar(flattenBy$1, exports);
2286
+ __exportStar(flattenDeepAsync$1, exports);
2287
+ __exportStar(flattenDeep$1, exports);
2288
+ __exportStar(flatten$1, exports);
2289
+ __exportStar(mapAsync$1, exports);
2290
+ __exportStar(map$1, exports);
2291
+ __exportStar(repeatAsync$1, exports);
2292
+ __exportStar(repeat$1, exports);
2293
+ __exportStar(sliceAsync$1, exports);
2294
+ __exportStar(slice$1, exports);
2295
+ __exportStar(splitAsync$1, exports);
2296
+ __exportStar(splitByAsync$1, exports);
2297
+ __exportStar(splitBy$1, exports);
2298
+ __exportStar(split$1, exports);
2299
+ __exportStar(takeAsync$1, exports);
2300
+ __exportStar(takeRightAsync$1, exports);
2301
+ __exportStar(takeRight$1, exports);
2302
+ __exportStar(takeUntilAsync$1, exports);
2303
+ __exportStar(takeUntil$1, exports);
2304
+ __exportStar(take$1, exports);
2305
+ __exportStar(tapAsync$1, exports);
2306
+ __exportStar(tap$1, exports);
2307
+ __exportStar(toAsyncIterable$1, exports);
2308
+ __exportStar(transformAsync$1, exports);
2309
+ __exportStar(transform$1, exports);
2310
+ __exportStar(uniqAsync$1, exports);
2311
+ __exportStar(uniqByAsync$1, exports);
2312
+ __exportStar(uniqBy$1, exports);
2313
+ __exportStar(uniq$1, exports);
2314
+ __exportStar(zipAsync$1, exports);
2315
+ __exportStar(zip$1, exports);
2316
+
2317
+ }(middleware));
2318
+
2319
+ var output = {};
2320
+
2321
+ var consume$1 = {};
2322
+
2323
+ consume$1.consume = void 0;
2324
+ function consume(iterable, consumer) {
2325
+ return consumer(iterable);
2326
+ }
2327
+ consume$1.consume = consume;
2328
+
2329
+ var eachAsync$1 = {};
2330
+
2331
+ eachAsync$1.eachAsync = void 0;
2332
+ const types_1$8 = es2018$1;
2333
+ function eachAsync(iterable, fn) {
2334
+ if ((0, types_1$8.isAsyncIterable)(iterable)) {
2335
+ return eachAsyncIterable(iterable);
2336
+ }
2337
+ else {
2338
+ return eachIterable(iterable);
2339
+ }
2340
+ async function eachAsyncIterable(iterable) {
2341
+ let index = 0;
2342
+ for await (const element of iterable) {
2343
+ await fn(element, index);
2344
+ index++;
2345
+ }
2346
+ }
2347
+ async function eachIterable(iterable) {
2348
+ let index = 0;
2349
+ for (const element of iterable) {
2350
+ await fn(element, index);
2351
+ index++;
2352
+ }
2353
+ }
2354
+ }
2355
+ eachAsync$1.eachAsync = eachAsync;
2356
+
2357
+ var each$1 = {};
2358
+
2359
+ each$1.each = void 0;
2360
+ function each(iterable, fn) {
2361
+ let index = 0;
2362
+ for (const element of iterable) {
2363
+ fn(element, index);
2364
+ index++;
2365
+ }
2366
+ }
2367
+ each$1.each = each;
2368
+
2369
+ var everyAsync$1 = {};
2370
+
2371
+ everyAsync$1.everyAsync = void 0;
2372
+ const types_1$7 = es2018$1;
2373
+ function everyAsync(iterable, predicate) {
2374
+ if ((0, types_1$7.isAsyncIterable)(iterable)) {
2375
+ return everyAsyncIterable(iterable);
2376
+ }
2377
+ else {
2378
+ return everyIterable(iterable);
2379
+ }
2380
+ async function everyIterable(iterable) {
2381
+ let index = 0;
2382
+ for (const element of iterable) {
2383
+ if (!await predicate(element, index))
2384
+ return false;
2385
+ index++;
2386
+ }
2387
+ return true;
2388
+ }
2389
+ async function everyAsyncIterable(iterable) {
2390
+ let index = 0;
2391
+ for await (const element of iterable) {
2392
+ if (!await predicate(element, index))
2393
+ return false;
2394
+ index++;
2395
+ }
2396
+ return true;
2397
+ }
2398
+ }
2399
+ everyAsync$1.everyAsync = everyAsync;
2400
+
2401
+ var every$1 = {};
2402
+
2403
+ every$1.every = void 0;
2404
+ function every(iterable, predicate) {
2405
+ let index = 0;
2406
+ for (const element of iterable) {
2407
+ if (!predicate(element, index))
2408
+ return false;
2409
+ index++;
2410
+ }
2411
+ return true;
2412
+ }
2413
+ every$1.every = every;
2414
+
2415
+ var findAsync$1 = {};
2416
+
2417
+ findAsync$1.findAsync = void 0;
2418
+ const types_1$6 = es2018$1;
2419
+ function findAsync(iterable, predicate) {
2420
+ if ((0, types_1$6.isAsyncIterable)(iterable)) {
2421
+ return findAsyncIterable(iterable);
2422
+ }
2423
+ else {
2424
+ return findIterable(iterable);
2425
+ }
2426
+ async function findIterable(iterable) {
2427
+ let index = 0;
2428
+ for (const element of iterable) {
2429
+ if (await predicate(element, index))
2430
+ return element;
2431
+ index++;
2432
+ }
2433
+ return undefined;
2434
+ }
2435
+ async function findAsyncIterable(iterable) {
2436
+ let index = 0;
2437
+ for await (const element of iterable) {
2438
+ if (await predicate(element, index))
2439
+ return element;
2440
+ index++;
2441
+ }
2442
+ return undefined;
2443
+ }
2444
+ }
2445
+ findAsync$1.findAsync = findAsync;
2446
+
2447
+ var find$1 = {};
2448
+
2449
+ find$1.find = void 0;
2450
+ function find(iterable, predicate) {
2451
+ let index = 0;
2452
+ for (const element of iterable) {
2453
+ if (predicate(element, index))
2454
+ return element;
2455
+ index++;
2456
+ }
2457
+ return undefined;
2458
+ }
2459
+ find$1.find = find;
2460
+
2461
+ var firstAsync$1 = {};
2462
+
2463
+ firstAsync$1.firstAsync = void 0;
2464
+ async function firstAsync(iterable) {
2465
+ for await (const element of iterable) {
2466
+ return element;
2467
+ }
2468
+ return undefined;
2469
+ }
2470
+ firstAsync$1.firstAsync = firstAsync;
2471
+
2472
+ var first$1 = {};
2473
+
2474
+ first$1.first = void 0;
2475
+ function first(iterable) {
2476
+ for (const element of iterable) {
2477
+ return element;
2478
+ }
2479
+ return undefined;
2480
+ }
2481
+ first$1.first = first;
2482
+
2483
+ var includesAsync$1 = {};
2484
+
2485
+ includesAsync$1.includesAsync = void 0;
2486
+ async function includesAsync(iterable, value) {
2487
+ for await (const element of iterable) {
2488
+ if (element === value)
2489
+ return true;
2490
+ }
2491
+ return false;
2492
+ }
2493
+ includesAsync$1.includesAsync = includesAsync;
2494
+
2495
+ var includes$1 = {};
2496
+
2497
+ includes$1.includes = void 0;
2498
+ function includes(iterable, value) {
2499
+ for (const element of iterable) {
2500
+ if (element === value)
2501
+ return true;
2502
+ }
2503
+ return false;
2504
+ }
2505
+ includes$1.includes = includes;
2506
+
2507
+ var matchAsync$1 = {};
2508
+
2509
+ matchAsync$1.matchAsync = void 0;
2510
+ async function matchAsync(iterable, sequence) {
2511
+ const sequenceLength = sequence.length;
2512
+ let matchCount = 0;
2513
+ for await (const element of iterable) {
2514
+ if (element === sequence[matchCount])
2515
+ matchCount++;
2516
+ if (matchCount === sequenceLength)
2517
+ return true;
2518
+ }
2519
+ return false;
2520
+ }
2521
+ matchAsync$1.matchAsync = matchAsync;
2522
+
2523
+ var match$1 = {};
2524
+
2525
+ match$1.match = void 0;
2526
+ function match(iterable, sequence) {
2527
+ const sequenceLength = sequence.length;
2528
+ let matchCount = 0;
2529
+ for (const element of iterable) {
2530
+ if (element === sequence[matchCount])
2531
+ matchCount++;
2532
+ if (matchCount === sequenceLength)
2533
+ return true;
2534
+ }
2535
+ return false;
2536
+ }
2537
+ match$1.match = match;
2538
+
2539
+ var reduceAsync$1 = {};
2540
+
2541
+ reduceAsync$1.reduceAsync = void 0;
2542
+ const types_1$5 = es2018$1;
2543
+ function reduceAsync(iterable, fn, initialValue) {
2544
+ if ((0, types_1$5.isUndefined)(initialValue)) {
2545
+ return reduceAsyncWithoutInitialValue(iterable, fn);
2546
+ }
2547
+ else {
2548
+ return reduceAsyncWithInitialValue(iterable, fn, initialValue);
2549
+ }
2550
+ }
2551
+ reduceAsync$1.reduceAsync = reduceAsync;
2552
+ function reduceAsyncWithInitialValue(iterable, fn, initialValue) {
2553
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2554
+ return reduceAsyncIterable(iterable);
2555
+ }
2556
+ else {
2557
+ return reduceIterable(iterable);
2558
+ }
2559
+ async function reduceIterable(iterable) {
2560
+ let result = initialValue, index = 0;
2561
+ for (const currentValue of iterable) {
2562
+ result = await fn(result, currentValue, index++);
2563
+ }
2564
+ return result;
2565
+ }
2566
+ async function reduceAsyncIterable(iterable) {
2567
+ let result = initialValue, index = 0;
2568
+ for await (const currentValue of iterable) {
2569
+ result = await fn(result, currentValue, index++);
2570
+ }
2571
+ return result;
2572
+ }
2573
+ }
2574
+ function reduceAsyncWithoutInitialValue(iterable, fn) {
2575
+ if ((0, types_1$5.isAsyncIterable)(iterable)) {
2576
+ return reduceAsyncIterable(iterable);
2577
+ }
2578
+ else {
2579
+ return reduceIterable(iterable);
2580
+ }
2581
+ async function reduceAsyncIterable(iterable) {
2582
+ var _a;
2583
+ const iterator = iterable[Symbol.asyncIterator]();
2584
+ let done;
2585
+ try {
2586
+ let result = await readInitialValue(iterator);
2587
+ let index = 1;
2588
+ let value;
2589
+ while ({ value, done } = await iterator.next(), !done) {
2590
+ result = await fn(result, value, index++);
2591
+ }
2592
+ return result;
2593
+ }
2594
+ finally {
2595
+ if (!done)
2596
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2597
+ }
2598
+ async function readInitialValue(iterator) {
2599
+ const result = await iterator.next();
2600
+ if (result.done) {
2601
+ done = true;
2602
+ throw new Error('Reduce of empty iterable with no initial value');
2603
+ }
2604
+ return result.value;
2605
+ }
2606
+ }
2607
+ async function reduceIterable(iterable) {
2608
+ var _a;
2609
+ const iterator = iterable[Symbol.iterator]();
2610
+ let done;
2611
+ try {
2612
+ let result = readInitialValue(iterator);
2613
+ let index = 1;
2614
+ let value;
2615
+ while ({ value, done } = iterator.next(), !done) {
2616
+ result = await fn(result, value, index++);
2617
+ }
2618
+ return result;
2619
+ }
2620
+ finally {
2621
+ if (!done)
2622
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2623
+ }
2624
+ function readInitialValue(iterator) {
2625
+ const result = iterator.next();
2626
+ if (result.done) {
2627
+ done = true;
2628
+ throw new Error('Reduce of empty iterable with no initial value');
2629
+ }
2630
+ return result.value;
2631
+ }
2632
+ }
2633
+ }
2634
+
2635
+ var reduce$1 = {};
2636
+
2637
+ reduce$1.reduce = void 0;
2638
+ const types_1$4 = es2018$1;
2639
+ function reduce(iterable, fn, initialValue) {
2640
+ if ((0, types_1$4.isUndefined)(initialValue)) {
2641
+ return reduceWithoutInitialValue(iterable, fn);
2642
+ }
2643
+ else {
2644
+ return reduceWithInitialValue(iterable, fn, initialValue);
2645
+ }
2646
+ }
2647
+ reduce$1.reduce = reduce;
2648
+ function reduceWithInitialValue(iterable, fn, initialValue) {
2649
+ let result = initialValue, index = 0;
2650
+ for (const currentValue of iterable) {
2651
+ result = fn(result, currentValue, index++);
2652
+ }
2653
+ return result;
2654
+ }
2655
+ function reduceWithoutInitialValue(iterable, fn) {
2656
+ var _a;
2657
+ const iterator = iterable[Symbol.iterator]();
2658
+ let done;
2659
+ try {
2660
+ let result = readInitialValue(iterator);
2661
+ let index = 1;
2662
+ let value;
2663
+ while ({ value, done } = iterator.next(), !done) {
2664
+ result = fn(result, value, index++);
2665
+ }
2666
+ return result;
2667
+ }
2668
+ finally {
2669
+ if (!done)
2670
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2671
+ }
2672
+ function readInitialValue(iterator) {
2673
+ const result = iterator.next();
2674
+ if (result.done) {
2675
+ done = true;
2676
+ throw new Error('Reduce of empty iterable with no initial value');
2677
+ }
2678
+ return result.value;
2679
+ }
2680
+ }
2681
+
2682
+ var someAsync$1 = {};
2683
+
2684
+ someAsync$1.someAsync = void 0;
2685
+ const types_1$3 = es2018$1;
2686
+ function someAsync(iterable, predicate) {
2687
+ if ((0, types_1$3.isAsyncIterable)(iterable)) {
2688
+ return someAsyncIterable(iterable);
2689
+ }
2690
+ else {
2691
+ return someIterable(iterable);
2692
+ }
2693
+ async function someIterable(iterable) {
2694
+ let index = 0;
2695
+ for (const element of iterable) {
2696
+ if (await predicate(element, index))
2697
+ return true;
2698
+ index++;
2699
+ }
2700
+ return false;
2701
+ }
2702
+ async function someAsyncIterable(iterable) {
2703
+ let index = 0;
2704
+ for await (const element of iterable) {
2705
+ if (await predicate(element, index))
2706
+ return true;
2707
+ index++;
2708
+ }
2709
+ return false;
2710
+ }
2711
+ }
2712
+ someAsync$1.someAsync = someAsync;
2713
+
2714
+ var some$1 = {};
2715
+
2716
+ some$1.some = void 0;
2717
+ function some(iterable, predicate) {
2718
+ let index = 0;
2719
+ for (const element of iterable) {
2720
+ if (predicate(element, index))
2721
+ return true;
2722
+ index++;
2723
+ }
2724
+ return false;
2725
+ }
2726
+ some$1.some = some;
2727
+
2728
+ var lastAsync$1 = {};
2729
+
2730
+ lastAsync$1.lastAsync = void 0;
2731
+ async function lastAsync(iterable) {
2732
+ var _a;
2733
+ const iterator = iterable[Symbol.asyncIterator]();
2734
+ let done;
2735
+ try {
2736
+ let value;
2737
+ let result;
2738
+ while ({ value, done } = await iterator.next(), !done) {
2739
+ result = value;
2740
+ }
2741
+ return result;
2742
+ }
2743
+ finally {
2744
+ if (!done)
2745
+ await ((_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator));
2746
+ }
2747
+ }
2748
+ lastAsync$1.lastAsync = lastAsync;
2749
+
2750
+ var last$1 = {};
2751
+
2752
+ last$1.last = void 0;
2753
+ function last(iterable) {
2754
+ var _a;
2755
+ const iterator = iterable[Symbol.iterator]();
2756
+ let done;
2757
+ try {
2758
+ let value;
2759
+ let result;
2760
+ while ({ value, done } = iterator.next(), !done) {
2761
+ result = value;
2762
+ }
2763
+ return result;
2764
+ }
2765
+ finally {
2766
+ if (!done)
2767
+ (_a = iterator.return) === null || _a === void 0 ? void 0 : _a.call(iterator);
2768
+ }
2769
+ }
2770
+ last$1.last = last;
2771
+
2772
+ var toArrayAsync$1 = {};
2773
+
2774
+ toArrayAsync$1.toArrayAsync = void 0;
2775
+ const consume_1$3 = consume$1;
2776
+ function toArrayAsync(iterable) {
2777
+ return (0, consume_1$3.consume)(iterable, async (iterable) => {
2778
+ const result = [];
2779
+ for await (const element of iterable) {
2780
+ result.push(element);
2781
+ }
2782
+ return result;
2783
+ });
2784
+ }
2785
+ toArrayAsync$1.toArrayAsync = toArrayAsync;
2786
+
2787
+ var toArray$1 = {};
2788
+
2789
+ toArray$1.toArray = void 0;
2790
+ const consume_1$2 = consume$1;
2791
+ function toArray(iterable) {
2792
+ return (0, consume_1$2.consume)(iterable, iterable => Array.from(iterable));
2793
+ }
2794
+ toArray$1.toArray = toArray;
2795
+
2796
+ var toSetAsync$1 = {};
2797
+
2798
+ toSetAsync$1.toSetAsync = void 0;
2799
+ const consume_1$1 = consume$1;
2800
+ function toSetAsync(iterable) {
2801
+ return (0, consume_1$1.consume)(iterable, async (iterable) => {
2802
+ const result = new Set();
2803
+ for await (const element of iterable) {
2804
+ result.add(element);
2805
+ }
2806
+ return result;
2807
+ });
2808
+ }
2809
+ toSetAsync$1.toSetAsync = toSetAsync;
2810
+
2811
+ var toSet$1 = {};
2812
+
2813
+ toSet$1.toSet = void 0;
2814
+ const consume_1 = consume$1;
2815
+ function toSet(iterable) {
2816
+ return (0, consume_1.consume)(iterable, iterable => new Set(iterable));
2817
+ }
2818
+ toSet$1.toSet = toSet;
2819
+
2820
+ (function (exports) {
2821
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2822
+ if (k2 === undefined) k2 = k;
2823
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2824
+ }) : (function(o, m, k, k2) {
2825
+ if (k2 === undefined) k2 = k;
2826
+ o[k2] = m[k];
2827
+ }));
2828
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2829
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2830
+ };__exportStar(consume$1, exports);
2831
+ __exportStar(eachAsync$1, exports);
2832
+ __exportStar(each$1, exports);
2833
+ __exportStar(everyAsync$1, exports);
2834
+ __exportStar(every$1, exports);
2835
+ __exportStar(findAsync$1, exports);
2836
+ __exportStar(find$1, exports);
2837
+ __exportStar(firstAsync$1, exports);
2838
+ __exportStar(first$1, exports);
2839
+ __exportStar(includesAsync$1, exports);
2840
+ __exportStar(includes$1, exports);
2841
+ __exportStar(matchAsync$1, exports);
2842
+ __exportStar(match$1, exports);
2843
+ __exportStar(reduceAsync$1, exports);
2844
+ __exportStar(reduce$1, exports);
2845
+ __exportStar(someAsync$1, exports);
2846
+ __exportStar(some$1, exports);
2847
+ __exportStar(lastAsync$1, exports);
2848
+ __exportStar(last$1, exports);
2849
+ __exportStar(toArrayAsync$1, exports);
2850
+ __exportStar(toArray$1, exports);
2851
+ __exportStar(toSetAsync$1, exports);
2852
+ __exportStar(toSet$1, exports);
2853
+
2854
+ }(output));
2855
+
2856
+ (function (exports) {
2857
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2858
+ if (k2 === undefined) k2 = k;
2859
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2860
+ }) : (function(o, m, k, k2) {
2861
+ if (k2 === undefined) k2 = k;
2862
+ o[k2] = m[k];
2863
+ }));
2864
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2865
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2866
+ };__exportStar(middleware, exports);
2867
+ __exportStar(output, exports);
2868
+
2869
+ }(es2018$4));
2870
+
2871
+ var getErrorNames$1 = {};
2872
+
2873
+ var traverseErrorPrototypeChain$1 = {};
2874
+
2875
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = void 0;
2876
+ function* traverseErrorPrototypeChain(err) {
2877
+ let current = err;
2878
+ while ((current = Object.getPrototypeOf(current))) {
2879
+ yield current;
2880
+ if (current === Error.prototype)
2881
+ break;
2882
+ }
2883
+ }
2884
+ traverseErrorPrototypeChain$1.traverseErrorPrototypeChain = traverseErrorPrototypeChain;
2885
+
2886
+ getErrorNames$1.getErrorNames = void 0;
2887
+ const types_1$2 = es2018$6;
2888
+ const traverse_error_prototype_chain_1 = traverseErrorPrototypeChain$1;
2889
+ function* getErrorNames(err) {
2890
+ var _a;
2891
+ if ((0, types_1$2.isError)(err)) {
2892
+ for (const prototype of (0, traverse_error_prototype_chain_1.traverseErrorPrototypeChain)(err)) {
2893
+ if ((_a = prototype.constructor) === null || _a === void 0 ? void 0 : _a.name) {
2894
+ yield prototype.constructor.name;
2895
+ }
2896
+ }
2897
+ }
2898
+ else {
2899
+ yield err.name;
2900
+ yield* err.ancestors;
2901
+ }
2902
+ }
2903
+ getErrorNames$1.getErrorNames = getErrorNames;
2904
+
2905
+ var serializableError = {};
2906
+
2907
+ serializableError.isSerializableError = void 0;
2908
+ const types_1$1 = es2018$6;
2909
+ function isSerializableError(val) {
2910
+ return (0, types_1$1.isObject)(val)
2911
+ && (0, types_1$1.isString)(val.name)
2912
+ && (0, types_1$1.isString)(val.message)
2913
+ && ((0, types_1$1.isString)(val.stack) || (0, types_1$1.isNull)(val.stack))
2914
+ && ((0, types_1$1.isArray)(val.ancestors) && val.ancestors.every(types_1$1.isString));
2915
+ }
2916
+ serializableError.isSerializableError = isSerializableError;
2917
+
2918
+ customError$1.CustomError = void 0;
2919
+ const iterable_operator_1$1 = es2018$4;
2920
+ const get_error_names_1$1 = getErrorNames$1;
2921
+ const types_1 = es2018$6;
2922
+ const serializable_error_1 = serializableError;
2923
+ class CustomError extends Error {
2924
+ get name() {
2925
+ var _a, _b;
2926
+ return (_b = (_a = (0, iterable_operator_1$1.first)((0, get_error_names_1$1.getErrorNames)(this))) !== null && _a !== void 0 ? _a : CustomError.name) !== null && _b !== void 0 ? _b : 'CustomError';
2927
+ }
2928
+ static [Symbol.hasInstance](instance) {
2929
+ var _a;
2930
+ if ((0, types_1.isError)(instance) || (0, serializable_error_1.isSerializableError)(instance)) {
2931
+ const reversedClassNames = [
2932
+ (_a = this.prototype.constructor.name) !== null && _a !== void 0 ? _a : this.name,
2933
+ ...(0, get_error_names_1$1.getErrorNames)(this.prototype)
2934
+ ].reverse();
2935
+ const reversedInstanceNames = (0, iterable_operator_1$1.toArray)((0, get_error_names_1$1.getErrorNames)(instance)).reverse();
2936
+ return reversedClassNames.every((x, i) => x === reversedInstanceNames[i]);
2937
+ }
2938
+ else {
2939
+ return false;
2940
+ }
2941
+ }
2942
+ }
2943
+ customError$1.CustomError = CustomError;
2944
+
2945
+ var assertionError = {};
2946
+
2947
+ assertionError.AssertionError = void 0;
2948
+ const custom_error_1 = customError$1;
2949
+ class AssertionError extends custom_error_1.CustomError {
2950
+ }
2951
+ assertionError.AssertionError = AssertionError;
2952
+
2953
+ var normalize$1 = {};
2954
+
2955
+ normalize$1.normalize = void 0;
2956
+ const get_error_names_1 = getErrorNames$1;
2957
+ const iterable_operator_1 = es2018$4;
2958
+ function normalize(err) {
2959
+ var _a;
2960
+ const [name, ...ancestors] = (0, iterable_operator_1.toArray)((0, get_error_names_1.getErrorNames)(err));
2961
+ return {
2962
+ name,
2963
+ ancestors,
2964
+ message: err.message,
2965
+ stack: (_a = err.stack) !== null && _a !== void 0 ? _a : null
2966
+ };
2967
+ }
2968
+ normalize$1.normalize = normalize;
2969
+
2970
+ var hydrate$1 = {};
2971
+
2972
+ var es2018 = {};
2973
+
2974
+ var pass$1 = {};
2975
+
2976
+ pass$1.pass = void 0;
2977
+ function pass() { }
2978
+ pass$1.pass = pass;
2979
+
2980
+ (function (exports) {
2981
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
2982
+ if (k2 === undefined) k2 = k;
2983
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
2984
+ }) : (function(o, m, k, k2) {
2985
+ if (k2 === undefined) k2 = k;
2986
+ o[k2] = m[k];
2987
+ }));
2988
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
2989
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
2990
+ };__exportStar(pass$1, exports);
2991
+
2992
+ }(es2018));
2993
+
2994
+ hydrate$1.hydrate = void 0;
2995
+ const pass_1 = es2018;
2996
+ function hydrate(err) {
2997
+ var _a;
2998
+ const errorNames = [err.name, ...err.ancestors]
2999
+ .slice(0, -1)
3000
+ .reverse();
3001
+ let errorConstructor = Error;
3002
+ for (const name of errorNames) {
3003
+ errorConstructor = createChildErrorConstructor(errorConstructor, name);
3004
+ }
3005
+ const result = new errorConstructor();
3006
+ result.name = err.name;
3007
+ result.message = err.message;
3008
+ result.stack = (_a = err.stack) !== null && _a !== void 0 ? _a : undefined;
3009
+ return result;
3010
+ }
3011
+ hydrate$1.hydrate = hydrate;
3012
+ function createChildErrorConstructor(parentErrorConstructor, name) {
3013
+ const constructor = function () { (0, pass_1.pass)(); };
3014
+ constructor.prototype = Object.create(parentErrorConstructor.prototype);
3015
+ constructor.prototype.constructor = constructor;
3016
+ Object.defineProperty(constructor, 'name', { value: name });
3017
+ return constructor;
3018
+ }
3019
+
3020
+ var assert$1 = {};
3021
+
3022
+ assert$1.assert = void 0;
3023
+ const assertion_error_1 = assertionError;
3024
+ function assert(condition, message) {
3025
+ if (!condition)
3026
+ throw new assertion_error_1.AssertionError(message);
3027
+ }
3028
+ assert$1.assert = assert;
3029
+
3030
+ (function (exports) {
3031
+ var __createBinding = (commonjsGlobal && commonjsGlobal.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3032
+ if (k2 === undefined) k2 = k;
3033
+ Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
3034
+ }) : (function(o, m, k, k2) {
3035
+ if (k2 === undefined) k2 = k;
3036
+ o[k2] = m[k];
3037
+ }));
3038
+ var __exportStar = (commonjsGlobal && commonjsGlobal.__exportStar) || function(m, exports) {
3039
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
3040
+ };__exportStar(customError$1, exports);
3041
+ __exportStar(assertionError, exports);
3042
+ __exportStar(serializableError, exports);
3043
+ __exportStar(normalize$1, exports);
3044
+ __exportStar(hydrate$1, exports);
3045
+ __exportStar(assert$1, exports);
3046
+ __exportStar(getErrorNames$1, exports);
3047
+ __exportStar(traverseErrorPrototypeChain$1, exports);
3048
+
3049
+ }(es2018$5));
582
3050
 
583
3051
  function csv(payload) {
584
- es2018.assert(payload.length > 0, 'payload must be a non-empty array');
3052
+ es2018$5.assert(payload.length > 0, 'payload must be a non-empty array');
585
3053
  return (options) => {
586
- const headers = new es2018$2.Headers(options.headers);
3054
+ const headers = new es2018$7.Headers(options.headers);
587
3055
  headers.set('Content-Type', 'text/csv');
588
3056
  return {
589
3057
  ...options,
@@ -608,7 +3076,7 @@ function signal(signal) {
608
3076
 
609
3077
  function header(name, value) {
610
3078
  return (options) => {
611
- const headers = new es2018$2.Headers(options.headers);
3079
+ const headers = new es2018$7.Headers(options.headers);
612
3080
  headers.set(name, value);
613
3081
  return {
614
3082
  ...options,
@@ -619,7 +3087,7 @@ function header(name, value) {
619
3087
 
620
3088
  function appendHeader(name, value) {
621
3089
  return (options) => {
622
- const headers = new es2018$2.Headers(options.headers);
3090
+ const headers = new es2018$7.Headers(options.headers);
623
3091
  headers.append(name, value);
624
3092
  return {
625
3093
  ...options,
@@ -630,7 +3098,7 @@ function appendHeader(name, value) {
630
3098
 
631
3099
  function headers(headers) {
632
3100
  return (options) => {
633
- const newHeaders = new es2018$2.Headers(options.headers);
3101
+ const newHeaders = new es2018$7.Headers(options.headers);
634
3102
  for (const [name, value] of Object.entries(headers)) {
635
3103
  newHeaders.set(name, value);
636
3104
  }
@@ -732,10 +3200,10 @@ function appendSearchParam(name, value) {
732
3200
 
733
3201
  function formDataField(name, value) {
734
3202
  return (options) => {
735
- const formData = options.payload instanceof es2018$2.FormData
3203
+ const formData = options.payload instanceof es2018$7.FormData
736
3204
  ? cloneFormData(options.payload)
737
- : new es2018$2.FormData();
738
- if (Array.isArray(value)) {
3205
+ : new es2018$7.FormData();
3206
+ if (es2018$6.isArray(value)) {
739
3207
  value.forEach(x => formData.append(name, x));
740
3208
  }
741
3209
  else {
@@ -748,7 +3216,7 @@ function formDataField(name, value) {
748
3216
  };
749
3217
  }
750
3218
  function cloneFormData(formData) {
751
- const result = new es2018$2.FormData();
3219
+ const result = new es2018$7.FormData();
752
3220
  for (const [name, value] of formData.entries()) {
753
3221
  result.append(name, value);
754
3222
  }
@@ -827,5 +3295,5 @@ function keepalive(val = true) {
827
3295
  };
828
3296
  }
829
3297
 
830
- export { accept, appendHeader, appendSearchParam, basicAuth, bearerAuth, csv, del, formDataField, get, head, header, headers, host, json, keepalive, patch, pathname, port, post, put, search, searchParam, searchParams, signal, text, url };
3298
+ export { accept, appendHeader, appendSearchParam, basicAuth, bearerAuth, csv, del, formDataField, get, head, header, headers, host, json$1 as json, keepalive, patch, pathname, port, post, put, search, searchParam, searchParams, signal, text, url$1 as url };
831
3299
  //# sourceMappingURL=index.mjs.map