typeson-registry 2.0.0 → 4.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.
Files changed (80) hide show
  1. package/dist/index.js +90 -74
  2. package/dist/index.js.map +1 -1
  3. package/dist/index.min.js +1 -1
  4. package/dist/index.min.js.map +1 -1
  5. package/dist/index.umd.js +1017 -854
  6. package/dist/index.umd.js.map +1 -1
  7. package/dist/index.umd.min.js +1 -1
  8. package/dist/index.umd.min.js.map +1 -1
  9. package/dist/presets/array-nonindex-keys.umd.js.map +1 -1
  10. package/dist/presets/builtin.umd.js +1 -1
  11. package/dist/presets/builtin.umd.js.map +1 -1
  12. package/dist/presets/postmessage.umd.js +1 -1
  13. package/dist/presets/postmessage.umd.js.map +1 -1
  14. package/dist/presets/socketio.umd.js +1 -1
  15. package/dist/presets/socketio.umd.js.map +1 -1
  16. package/dist/presets/sparse-undefined.umd.js.map +1 -1
  17. package/dist/presets/special-numbers.umd.js.map +1 -1
  18. package/dist/presets/structured-cloning-throwing.umd.js +1 -1
  19. package/dist/presets/structured-cloning-throwing.umd.js.map +1 -1
  20. package/dist/presets/structured-cloning.umd.js +1 -1
  21. package/dist/presets/structured-cloning.umd.js.map +1 -1
  22. package/dist/presets/undef.umd.js +1 -1
  23. package/dist/presets/undef.umd.js.map +1 -1
  24. package/dist/presets/universal.umd.js +1 -1
  25. package/dist/presets/universal.umd.js.map +1 -1
  26. package/dist/types/arraybuffer.umd.js +1 -1
  27. package/dist/types/arraybuffer.umd.js.map +1 -1
  28. package/dist/types/bigint-object.umd.js +1 -1
  29. package/dist/types/bigint-object.umd.js.map +1 -1
  30. package/dist/types/bigint.umd.js +1 -1
  31. package/dist/types/bigint.umd.js.map +1 -1
  32. package/dist/types/blob.umd.js +1 -1
  33. package/dist/types/blob.umd.js.map +1 -1
  34. package/dist/types/cloneable.umd.js.map +1 -1
  35. package/dist/types/cryptokey.umd.js +1 -1
  36. package/dist/types/cryptokey.umd.js.map +1 -1
  37. package/dist/types/dataview.umd.js +1 -1
  38. package/dist/types/dataview.umd.js.map +1 -1
  39. package/dist/types/date.umd.js +1 -1
  40. package/dist/types/date.umd.js.map +1 -1
  41. package/dist/types/error.umd.js +1 -1
  42. package/dist/types/error.umd.js.map +1 -1
  43. package/dist/types/errors.umd.js +1 -1
  44. package/dist/types/errors.umd.js.map +1 -1
  45. package/dist/types/file.umd.js +1 -1
  46. package/dist/types/file.umd.js.map +1 -1
  47. package/dist/types/filelist.umd.js +1 -1
  48. package/dist/types/filelist.umd.js.map +1 -1
  49. package/dist/types/imagebitmap.umd.js +1 -1
  50. package/dist/types/imagebitmap.umd.js.map +1 -1
  51. package/dist/types/imagedata.umd.js +1 -1
  52. package/dist/types/imagedata.umd.js.map +1 -1
  53. package/dist/types/infinity.umd.js.map +1 -1
  54. package/dist/types/intl-types.umd.js +1 -1
  55. package/dist/types/intl-types.umd.js.map +1 -1
  56. package/dist/types/map.umd.js +1 -1
  57. package/dist/types/map.umd.js.map +1 -1
  58. package/dist/types/nan.umd.js.map +1 -1
  59. package/dist/types/negative-infinity.umd.js.map +1 -1
  60. package/dist/types/nonbuiltin-ignore.umd.js +1 -1
  61. package/dist/types/nonbuiltin-ignore.umd.js.map +1 -1
  62. package/dist/types/primitive-objects.umd.js +1 -1
  63. package/dist/types/primitive-objects.umd.js.map +1 -1
  64. package/dist/types/regexp.umd.js +1 -1
  65. package/dist/types/regexp.umd.js.map +1 -1
  66. package/dist/types/resurrectable.umd.js.map +1 -1
  67. package/dist/types/set.umd.js +1 -1
  68. package/dist/types/set.umd.js.map +1 -1
  69. package/dist/types/typed-arrays-socketio.umd.js +1 -1
  70. package/dist/types/typed-arrays-socketio.umd.js.map +1 -1
  71. package/dist/types/typed-arrays.umd.js +1 -1
  72. package/dist/types/typed-arrays.umd.js.map +1 -1
  73. package/dist/types/undef.umd.js +1 -1
  74. package/dist/types/undef.umd.js.map +1 -1
  75. package/dist/types/user-object.umd.js +1 -1
  76. package/dist/types/user-object.umd.js.map +1 -1
  77. package/package.json +32 -33
  78. package/polyfills/createObjectURL.js +3 -3
  79. package/polyfills/createObjectURL.umd.js +1 -1
  80. package/polyfills/createObjectURL.umd.js.map +1 -1
package/dist/index.umd.js CHANGED
@@ -6,17 +6,14 @@
6
6
 
7
7
  function ownKeys$1(object, enumerableOnly) {
8
8
  var keys = Object.keys(object);
9
-
10
9
  if (Object.getOwnPropertySymbols) {
11
10
  var symbols = Object.getOwnPropertySymbols(object);
12
11
  enumerableOnly && (symbols = symbols.filter(function (sym) {
13
12
  return Object.getOwnPropertyDescriptor(object, sym).enumerable;
14
13
  })), keys.push.apply(keys, symbols);
15
14
  }
16
-
17
15
  return keys;
18
16
  }
19
-
20
17
  function _objectSpread2$1(target) {
21
18
  for (var i = 1; i < arguments.length; i++) {
22
19
  var source = null != arguments[i] ? arguments[i] : {};
@@ -26,10 +23,309 @@
26
23
  Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key));
27
24
  });
28
25
  }
29
-
30
26
  return target;
31
27
  }
32
-
28
+ function _regeneratorRuntime() {
29
+ _regeneratorRuntime = function () {
30
+ return exports;
31
+ };
32
+ var exports = {},
33
+ Op = Object.prototype,
34
+ hasOwn = Op.hasOwnProperty,
35
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
36
+ obj[key] = desc.value;
37
+ },
38
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
39
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
40
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
41
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
42
+ function define(obj, key, value) {
43
+ return Object.defineProperty(obj, key, {
44
+ value: value,
45
+ enumerable: !0,
46
+ configurable: !0,
47
+ writable: !0
48
+ }), obj[key];
49
+ }
50
+ try {
51
+ define({}, "");
52
+ } catch (err) {
53
+ define = function (obj, key, value) {
54
+ return obj[key] = value;
55
+ };
56
+ }
57
+ function wrap(innerFn, outerFn, self, tryLocsList) {
58
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
59
+ generator = Object.create(protoGenerator.prototype),
60
+ context = new Context(tryLocsList || []);
61
+ return defineProperty(generator, "_invoke", {
62
+ value: makeInvokeMethod(innerFn, self, context)
63
+ }), generator;
64
+ }
65
+ function tryCatch(fn, obj, arg) {
66
+ try {
67
+ return {
68
+ type: "normal",
69
+ arg: fn.call(obj, arg)
70
+ };
71
+ } catch (err) {
72
+ return {
73
+ type: "throw",
74
+ arg: err
75
+ };
76
+ }
77
+ }
78
+ exports.wrap = wrap;
79
+ var ContinueSentinel = {};
80
+ function Generator() {}
81
+ function GeneratorFunction() {}
82
+ function GeneratorFunctionPrototype() {}
83
+ var IteratorPrototype = {};
84
+ define(IteratorPrototype, iteratorSymbol, function () {
85
+ return this;
86
+ });
87
+ var getProto = Object.getPrototypeOf,
88
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
89
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
90
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
91
+ function defineIteratorMethods(prototype) {
92
+ ["next", "throw", "return"].forEach(function (method) {
93
+ define(prototype, method, function (arg) {
94
+ return this._invoke(method, arg);
95
+ });
96
+ });
97
+ }
98
+ function AsyncIterator(generator, PromiseImpl) {
99
+ function invoke(method, arg, resolve, reject) {
100
+ var record = tryCatch(generator[method], generator, arg);
101
+ if ("throw" !== record.type) {
102
+ var result = record.arg,
103
+ value = result.value;
104
+ return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
105
+ invoke("next", value, resolve, reject);
106
+ }, function (err) {
107
+ invoke("throw", err, resolve, reject);
108
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
109
+ result.value = unwrapped, resolve(result);
110
+ }, function (error) {
111
+ return invoke("throw", error, resolve, reject);
112
+ });
113
+ }
114
+ reject(record.arg);
115
+ }
116
+ var previousPromise;
117
+ defineProperty(this, "_invoke", {
118
+ value: function (method, arg) {
119
+ function callInvokeWithMethodAndArg() {
120
+ return new PromiseImpl(function (resolve, reject) {
121
+ invoke(method, arg, resolve, reject);
122
+ });
123
+ }
124
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
125
+ }
126
+ });
127
+ }
128
+ function makeInvokeMethod(innerFn, self, context) {
129
+ var state = "suspendedStart";
130
+ return function (method, arg) {
131
+ if ("executing" === state) throw new Error("Generator is already running");
132
+ if ("completed" === state) {
133
+ if ("throw" === method) throw arg;
134
+ return doneResult();
135
+ }
136
+ for (context.method = method, context.arg = arg;;) {
137
+ var delegate = context.delegate;
138
+ if (delegate) {
139
+ var delegateResult = maybeInvokeDelegate(delegate, context);
140
+ if (delegateResult) {
141
+ if (delegateResult === ContinueSentinel) continue;
142
+ return delegateResult;
143
+ }
144
+ }
145
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
146
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
147
+ context.dispatchException(context.arg);
148
+ } else "return" === context.method && context.abrupt("return", context.arg);
149
+ state = "executing";
150
+ var record = tryCatch(innerFn, self, context);
151
+ if ("normal" === record.type) {
152
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
153
+ return {
154
+ value: record.arg,
155
+ done: context.done
156
+ };
157
+ }
158
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
159
+ }
160
+ };
161
+ }
162
+ function maybeInvokeDelegate(delegate, context) {
163
+ var methodName = context.method,
164
+ method = delegate.iterator[methodName];
165
+ if (undefined === method) return context.delegate = null, "throw" === methodName && delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method) || "return" !== methodName && (context.method = "throw", context.arg = new TypeError("The iterator does not provide a '" + methodName + "' method")), ContinueSentinel;
166
+ var record = tryCatch(method, delegate.iterator, context.arg);
167
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
168
+ var info = record.arg;
169
+ return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
170
+ }
171
+ function pushTryEntry(locs) {
172
+ var entry = {
173
+ tryLoc: locs[0]
174
+ };
175
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
176
+ }
177
+ function resetTryEntry(entry) {
178
+ var record = entry.completion || {};
179
+ record.type = "normal", delete record.arg, entry.completion = record;
180
+ }
181
+ function Context(tryLocsList) {
182
+ this.tryEntries = [{
183
+ tryLoc: "root"
184
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
185
+ }
186
+ function values(iterable) {
187
+ if (iterable) {
188
+ var iteratorMethod = iterable[iteratorSymbol];
189
+ if (iteratorMethod) return iteratorMethod.call(iterable);
190
+ if ("function" == typeof iterable.next) return iterable;
191
+ if (!isNaN(iterable.length)) {
192
+ var i = -1,
193
+ next = function next() {
194
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
195
+ return next.value = undefined, next.done = !0, next;
196
+ };
197
+ return next.next = next;
198
+ }
199
+ }
200
+ return {
201
+ next: doneResult
202
+ };
203
+ }
204
+ function doneResult() {
205
+ return {
206
+ value: undefined,
207
+ done: !0
208
+ };
209
+ }
210
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
211
+ value: GeneratorFunctionPrototype,
212
+ configurable: !0
213
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
214
+ value: GeneratorFunction,
215
+ configurable: !0
216
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
217
+ var ctor = "function" == typeof genFun && genFun.constructor;
218
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
219
+ }, exports.mark = function (genFun) {
220
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
221
+ }, exports.awrap = function (arg) {
222
+ return {
223
+ __await: arg
224
+ };
225
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
226
+ return this;
227
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
228
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
229
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
230
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
231
+ return result.done ? result.value : iter.next();
232
+ });
233
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
234
+ return this;
235
+ }), define(Gp, "toString", function () {
236
+ return "[object Generator]";
237
+ }), exports.keys = function (val) {
238
+ var object = Object(val),
239
+ keys = [];
240
+ for (var key in object) keys.push(key);
241
+ return keys.reverse(), function next() {
242
+ for (; keys.length;) {
243
+ var key = keys.pop();
244
+ if (key in object) return next.value = key, next.done = !1, next;
245
+ }
246
+ return next.done = !0, next;
247
+ };
248
+ }, exports.values = values, Context.prototype = {
249
+ constructor: Context,
250
+ reset: function (skipTempReset) {
251
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
252
+ },
253
+ stop: function () {
254
+ this.done = !0;
255
+ var rootRecord = this.tryEntries[0].completion;
256
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
257
+ return this.rval;
258
+ },
259
+ dispatchException: function (exception) {
260
+ if (this.done) throw exception;
261
+ var context = this;
262
+ function handle(loc, caught) {
263
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
264
+ }
265
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
266
+ var entry = this.tryEntries[i],
267
+ record = entry.completion;
268
+ if ("root" === entry.tryLoc) return handle("end");
269
+ if (entry.tryLoc <= this.prev) {
270
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
271
+ hasFinally = hasOwn.call(entry, "finallyLoc");
272
+ if (hasCatch && hasFinally) {
273
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
274
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
275
+ } else if (hasCatch) {
276
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
277
+ } else {
278
+ if (!hasFinally) throw new Error("try statement without catch or finally");
279
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
280
+ }
281
+ }
282
+ }
283
+ },
284
+ abrupt: function (type, arg) {
285
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
286
+ var entry = this.tryEntries[i];
287
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
288
+ var finallyEntry = entry;
289
+ break;
290
+ }
291
+ }
292
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
293
+ var record = finallyEntry ? finallyEntry.completion : {};
294
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
295
+ },
296
+ complete: function (record, afterLoc) {
297
+ if ("throw" === record.type) throw record.arg;
298
+ return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
299
+ },
300
+ finish: function (finallyLoc) {
301
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
302
+ var entry = this.tryEntries[i];
303
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
304
+ }
305
+ },
306
+ catch: function (tryLoc) {
307
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
308
+ var entry = this.tryEntries[i];
309
+ if (entry.tryLoc === tryLoc) {
310
+ var record = entry.completion;
311
+ if ("throw" === record.type) {
312
+ var thrown = record.arg;
313
+ resetTryEntry(entry);
314
+ }
315
+ return thrown;
316
+ }
317
+ }
318
+ throw new Error("illegal catch attempt");
319
+ },
320
+ delegateYield: function (iterable, resultName, nextLoc) {
321
+ return this.delegate = {
322
+ iterator: values(iterable),
323
+ resultName: resultName,
324
+ nextLoc: nextLoc
325
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
326
+ }
327
+ }, exports;
328
+ }
33
329
  function _typeof$1(obj) {
34
330
  "@babel/helpers - typeof";
35
331
 
@@ -39,7 +335,6 @@
39
335
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
40
336
  }, _typeof$1(obj);
41
337
  }
42
-
43
338
  function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
44
339
  try {
45
340
  var info = gen[key](arg);
@@ -48,50 +343,42 @@
48
343
  reject(error);
49
344
  return;
50
345
  }
51
-
52
346
  if (info.done) {
53
347
  resolve(value);
54
348
  } else {
55
349
  Promise.resolve(value).then(_next, _throw);
56
350
  }
57
351
  }
58
-
59
352
  function _asyncToGenerator(fn) {
60
353
  return function () {
61
354
  var self = this,
62
- args = arguments;
355
+ args = arguments;
63
356
  return new Promise(function (resolve, reject) {
64
357
  var gen = fn.apply(self, args);
65
-
66
358
  function _next(value) {
67
359
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
68
360
  }
69
-
70
361
  function _throw(err) {
71
362
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
72
363
  }
73
-
74
364
  _next(undefined);
75
365
  });
76
366
  };
77
367
  }
78
-
79
368
  function _classCallCheck$1(instance, Constructor) {
80
369
  if (!(instance instanceof Constructor)) {
81
370
  throw new TypeError("Cannot call a class as a function");
82
371
  }
83
372
  }
84
-
85
373
  function _defineProperties$1(target, props) {
86
374
  for (var i = 0; i < props.length; i++) {
87
375
  var descriptor = props[i];
88
376
  descriptor.enumerable = descriptor.enumerable || false;
89
377
  descriptor.configurable = true;
90
378
  if ("value" in descriptor) descriptor.writable = true;
91
- Object.defineProperty(target, descriptor.key, descriptor);
379
+ Object.defineProperty(target, _toPropertyKey$1(descriptor.key), descriptor);
92
380
  }
93
381
  }
94
-
95
382
  function _createClass$1(Constructor, protoProps, staticProps) {
96
383
  if (protoProps) _defineProperties$1(Constructor.prototype, protoProps);
97
384
  if (staticProps) _defineProperties$1(Constructor, staticProps);
@@ -100,8 +387,8 @@
100
387
  });
101
388
  return Constructor;
102
389
  }
103
-
104
390
  function _defineProperty$1(obj, key, value) {
391
+ key = _toPropertyKey$1(key);
105
392
  if (key in obj) {
106
393
  Object.defineProperty(obj, key, {
107
394
  value: value,
@@ -112,22 +399,17 @@
112
399
  } else {
113
400
  obj[key] = value;
114
401
  }
115
-
116
402
  return obj;
117
403
  }
118
-
119
404
  function _toConsumableArray$1(arr) {
120
405
  return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray$1(arr) || _nonIterableSpread();
121
406
  }
122
-
123
407
  function _arrayWithoutHoles(arr) {
124
408
  if (Array.isArray(arr)) return _arrayLikeToArray$1(arr);
125
409
  }
126
-
127
410
  function _iterableToArray(iter) {
128
411
  if (typeof Symbol !== "undefined" && iter[Symbol.iterator] != null || iter["@@iterator"] != null) return Array.from(iter);
129
412
  }
130
-
131
413
  function _unsupportedIterableToArray$1(o, minLen) {
132
414
  if (!o) return;
133
415
  if (typeof o === "string") return _arrayLikeToArray$1(o, minLen);
@@ -136,32 +418,39 @@
136
418
  if (n === "Map" || n === "Set") return Array.from(o);
137
419
  if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray$1(o, minLen);
138
420
  }
139
-
140
421
  function _arrayLikeToArray$1(arr, len) {
141
422
  if (len == null || len > arr.length) len = arr.length;
142
-
143
423
  for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
144
-
145
424
  return arr2;
146
425
  }
147
-
148
426
  function _nonIterableSpread() {
149
427
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
150
428
  }
429
+ function _toPrimitive(input, hint) {
430
+ if (typeof input !== "object" || input === null) return input;
431
+ var prim = input[Symbol.toPrimitive];
432
+ if (prim !== undefined) {
433
+ var res = prim.call(input, hint || "default");
434
+ if (typeof res !== "object") return res;
435
+ throw new TypeError("@@toPrimitive must return a primitive value.");
436
+ }
437
+ return (hint === "string" ? String : Number)(input);
438
+ }
439
+ function _toPropertyKey$1(arg) {
440
+ var key = _toPrimitive(arg, "string");
441
+ return typeof key === "symbol" ? key : String(key);
442
+ }
151
443
 
152
444
  function ownKeys(e, t) {
153
445
  var r = Object.keys(e);
154
-
155
446
  if (Object.getOwnPropertySymbols) {
156
447
  var n = Object.getOwnPropertySymbols(e);
157
448
  t && (n = n.filter(function (t) {
158
449
  return Object.getOwnPropertyDescriptor(e, t).enumerable;
159
450
  })), r.push.apply(r, n);
160
451
  }
161
-
162
452
  return r;
163
453
  }
164
-
165
454
  function _objectSpread2(e) {
166
455
  for (var t = 1; t < arguments.length; t++) {
167
456
  var r = null != arguments[t] ? arguments[t] : {};
@@ -171,76 +460,70 @@
171
460
  Object.defineProperty(e, t, Object.getOwnPropertyDescriptor(r, t));
172
461
  });
173
462
  }
174
-
175
463
  return e;
176
464
  }
177
-
178
465
  function _typeof(e) {
179
- return (_typeof = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
466
+ return _typeof = "function" == typeof Symbol && "symbol" == _typeof$1(Symbol.iterator) ? function (e) {
180
467
  return _typeof$1(e);
181
468
  } : function (e) {
182
469
  return e && "function" == typeof Symbol && e.constructor === Symbol && e !== Symbol.prototype ? "symbol" : _typeof$1(e);
183
- })(e);
470
+ }, _typeof(e);
184
471
  }
185
-
186
472
  function _classCallCheck(e, t) {
187
473
  if (!(e instanceof t)) throw new TypeError("Cannot call a class as a function");
188
474
  }
189
-
190
475
  function _defineProperties(e, t) {
191
476
  for (var r = 0; r < t.length; r++) {
192
477
  var n = t[r];
193
- n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, n.key, n);
478
+ n.enumerable = n.enumerable || !1, n.configurable = !0, "value" in n && (n.writable = !0), Object.defineProperty(e, _toPropertyKey(n.key), n);
194
479
  }
195
480
  }
196
-
197
481
  function _createClass(e, t, r) {
198
482
  return t && _defineProperties(e.prototype, t), r && _defineProperties(e, r), Object.defineProperty(e, "prototype", {
199
483
  writable: !1
200
484
  }), e;
201
485
  }
202
-
203
486
  function _defineProperty(e, t, r) {
204
- return t in e ? Object.defineProperty(e, t, {
487
+ return (t = _toPropertyKey(t)) in e ? Object.defineProperty(e, t, {
205
488
  value: r,
206
489
  enumerable: !0,
207
490
  configurable: !0,
208
491
  writable: !0
209
492
  }) : e[t] = r, e;
210
493
  }
211
-
212
494
  function _slicedToArray(e, t) {
213
495
  return function _arrayWithHoles(e) {
214
496
  if (Array.isArray(e)) return e;
215
497
  }(e) || function _iterableToArrayLimit(e, t) {
216
498
  var r = null == e ? null : "undefined" != typeof Symbol && e[Symbol.iterator] || e["@@iterator"];
217
- if (null == r) return;
218
- var n,
499
+ if (null != r) {
500
+ var n,
501
+ o,
219
502
  a,
220
- o = [],
221
- i = !0,
222
- c = !1;
223
-
224
- try {
225
- for (r = r.call(e); !(i = (n = r.next()).done) && (o.push(n.value), !t || o.length !== t); i = !0) {
226
- ;
227
- }
228
- } catch (e) {
229
- c = !0, a = e;
230
- } finally {
503
+ i,
504
+ c = [],
505
+ s = !0,
506
+ u = !1;
231
507
  try {
232
- i || null == r["return"] || r["return"]();
508
+ if (a = (r = r.call(e)).next, 0 === t) {
509
+ if (Object(r) !== r) return;
510
+ s = !1;
511
+ } else for (; !(s = (n = a.call(r)).done) && (c.push(n.value), c.length !== t); s = !0);
512
+ } catch (e) {
513
+ u = !0, o = e;
233
514
  } finally {
234
- if (c) throw a;
515
+ try {
516
+ if (!s && null != r["return"] && (i = r["return"](), Object(i) !== i)) return;
517
+ } finally {
518
+ if (u) throw o;
519
+ }
235
520
  }
521
+ return c;
236
522
  }
237
-
238
- return o;
239
523
  }(e, t) || _unsupportedIterableToArray(e, t) || function _nonIterableRest() {
240
524
  throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
241
525
  }();
242
526
  }
243
-
244
527
  function _toConsumableArray(e) {
245
528
  return function _arrayWithoutHoles(e) {
246
529
  if (Array.isArray(e)) return _arrayLikeToArray(e);
@@ -250,7 +533,6 @@
250
533
  throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
251
534
  }();
252
535
  }
253
-
254
536
  function _unsupportedIterableToArray(e, t) {
255
537
  if (e) {
256
538
  if ("string" == typeof e) return _arrayLikeToArray(e, t);
@@ -258,29 +540,35 @@
258
540
  return "Object" === r && e.constructor && (r = e.constructor.name), "Map" === r || "Set" === r ? Array.from(e) : "Arguments" === r || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r) ? _arrayLikeToArray(e, t) : void 0;
259
541
  }
260
542
  }
261
-
262
543
  function _arrayLikeToArray(e, t) {
263
544
  (null == t || t > e.length) && (t = e.length);
264
-
265
- for (var r = 0, n = new Array(t); r < t; r++) {
266
- n[r] = e[r];
267
- }
268
-
545
+ for (var r = 0, n = new Array(t); r < t; r++) n[r] = e[r];
269
546
  return n;
270
547
  }
271
-
548
+ function _toPropertyKey(e) {
549
+ var t = function _toPrimitive(e, t) {
550
+ if ("object" != _typeof$1(e) || null === e) return e;
551
+ var r = e[Symbol.toPrimitive];
552
+ if (void 0 !== r) {
553
+ var n = r.call(e, t || "default");
554
+ if ("object" != _typeof$1(n)) return n;
555
+ throw new TypeError("@@toPrimitive must return a primitive value.");
556
+ }
557
+ return ("string" === t ? String : Number)(e);
558
+ }(e, "string");
559
+ return "symbol" == _typeof$1(t) ? t : String(t);
560
+ }
272
561
  var e = _createClass(function TypesonPromise(e) {
273
562
  _classCallCheck(this, TypesonPromise), this.p = new Promise(e);
274
563
  });
275
-
276
564
  e.__typeson__type__ = "TypesonPromise", "undefined" != typeof Symbol && (e.prototype[Symbol.toStringTag] = "TypesonPromise"), e.prototype.then = function (t, r) {
277
565
  var n = this;
278
- return new e(function (e, a) {
566
+ return new e(function (e, o) {
279
567
  n.p.then(function (r) {
280
568
  e(t ? t(r) : r);
281
569
  })["catch"](function (e) {
282
570
  return r ? r(e) : Promise.reject(e);
283
- }).then(e, a);
571
+ }).then(e, o);
284
572
  });
285
573
  }, e.prototype["catch"] = function (e) {
286
574
  return this.then(null, e);
@@ -302,85 +590,66 @@
302
590
  };
303
591
  });
304
592
  var t = {}.toString,
305
- r = {}.hasOwnProperty,
306
- n = Object.getPrototypeOf,
307
- a = r.toString;
308
-
593
+ r = {}.hasOwnProperty,
594
+ n = Object.getPrototypeOf,
595
+ o = r.toString;
309
596
  function isThenable(e, t) {
310
597
  return isObject(e) && "function" == typeof e.then && (!t || "function" == typeof e["catch"]);
311
598
  }
312
-
313
599
  function toStringTag(e) {
314
600
  return t.call(e).slice(8, -1);
315
601
  }
316
-
317
602
  function hasConstructorOf(e, t) {
318
603
  if (!e || "object" !== _typeof(e)) return !1;
319
- var o = n(e);
320
- if (!o) return null === t;
321
- var i = r.call(o, "constructor") && o.constructor;
322
- return "function" != typeof i ? null === t : t === i || null !== t && a.call(i) === a.call(t) || "function" == typeof t && "string" == typeof i.__typeson__type__ && i.__typeson__type__ === t.__typeson__type__;
604
+ var a = n(e);
605
+ if (!a) return null === t;
606
+ var i = r.call(a, "constructor") && a.constructor;
607
+ return "function" != typeof i ? null === t : t === i || null !== t && o.call(i) === o.call(t) || "function" == typeof t && "string" == typeof i.__typeson__type__ && i.__typeson__type__ === t.__typeson__type__;
323
608
  }
324
-
325
609
  function isPlainObject(e) {
326
610
  return !(!e || "Object" !== toStringTag(e)) && (!n(e) || hasConstructorOf(e, Object));
327
611
  }
328
-
329
612
  function isUserObject(e) {
330
613
  if (!e || "Object" !== toStringTag(e)) return !1;
331
614
  var t = n(e);
332
615
  return !t || hasConstructorOf(e, Object) || isUserObject(t);
333
616
  }
334
-
335
617
  function isObject(e) {
336
618
  return e && "object" === _typeof(e);
337
619
  }
338
-
339
620
  function escapeKeyPathComponent(e) {
340
- return e.replace(/~/g, "~0").replace(/\./g, "~1");
621
+ return e.replace(/''/g, "''''").replace(/^$/, "''").replace(/~/g, "~0").replace(/\./g, "~1");
341
622
  }
342
-
343
623
  function unescapeKeyPathComponent(e) {
344
- return e.replace(/~1/g, ".").replace(/~0/g, "~");
624
+ return e.replace(/~1/g, ".").replace(/~0/g, "~").replace(/^''$/, "").replace(/''''/g, "''");
345
625
  }
346
-
347
626
  function getByKeyPath(e, t) {
348
627
  if ("" === t) return e;
349
628
  var r = t.indexOf(".");
350
-
351
629
  if (r > -1) {
352
630
  var n = e[unescapeKeyPathComponent(t.slice(0, r))];
353
631
  return void 0 === n ? void 0 : getByKeyPath(n, t.slice(r + 1));
354
632
  }
355
-
356
633
  return e[unescapeKeyPathComponent(t)];
357
634
  }
358
-
359
635
  function setAtKeyPath(e, t, r) {
360
636
  if ("" === t) return r;
361
637
  var n = t.indexOf(".");
362
638
  return n > -1 ? setAtKeyPath(e[unescapeKeyPathComponent(t.slice(0, n))], t.slice(n + 1), r) : (e[unescapeKeyPathComponent(t)] = r, e);
363
639
  }
364
-
365
640
  function getJSONType(e) {
366
641
  return null === e ? "null" : Array.isArray(e) ? "array" : _typeof(e);
367
642
  }
368
-
369
643
  function _await(e, t, r) {
370
644
  return r ? t ? t(e) : e : (e && e.then || (e = Promise.resolve(e)), t ? e.then(t) : e);
371
645
  }
372
-
373
- var o = Object.keys,
374
- i$1 = Array.isArray,
375
- c = {}.hasOwnProperty,
376
- s = ["type", "replaced", "iterateIn", "iterateUnsetNumeric"];
377
-
646
+ var a = Object.keys,
647
+ i$1 = Array.isArray,
648
+ c = {}.hasOwnProperty,
649
+ s = ["type", "replaced", "iterateIn", "iterateUnsetNumeric"];
378
650
  function _async(e) {
379
651
  return function () {
380
- for (var t = [], r = 0; r < arguments.length; r++) {
381
- t[r] = arguments[r];
382
- }
383
-
652
+ for (var t = [], r = 0; r < arguments.length; r++) t[r] = arguments[r];
384
653
  try {
385
654
  return Promise.resolve(e.apply(this, t));
386
655
  } catch (e) {
@@ -388,533 +657,475 @@
388
657
  }
389
658
  };
390
659
  }
391
-
392
660
  function nestedPathsFirst(e, t) {
393
661
  if ("" === e.keypath) return -1;
394
662
  var r = e.keypath.match(/\./g) || 0,
395
- n = t.keypath.match(/\./g) || 0;
663
+ n = t.keypath.match(/\./g) || 0;
396
664
  return r && (r = r.length), n && (n = n.length), r > n ? -1 : r < n ? 1 : e.keypath < t.keypath ? -1 : e.keypath > t.keypath;
397
665
  }
398
-
399
666
  var u = function () {
400
- function Typeson(e) {
401
- _classCallCheck(this, Typeson), this.options = e, this.plainObjectReplacers = [], this.nonplainObjectReplacers = [], this.revivers = {}, this.types = {};
402
- }
403
-
404
- return _createClass(Typeson, [{
405
- key: "stringify",
406
- value: function stringify(e, t, r, n) {
407
- n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
408
- stringification: !0
409
- });
410
- var a = this.encapsulate(e, null, n);
411
- return i$1(a) ? JSON.stringify(a[0], t, r) : a.then(function (e) {
412
- return JSON.stringify(e, t, r);
413
- });
414
- }
415
- }, {
416
- key: "stringifySync",
417
- value: function stringifySync(e, t, r, n) {
418
- return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
419
- throwOnBadSyncType: !0
420
- }, n), {}, {
421
- sync: !0
422
- }));
423
- }
424
- }, {
425
- key: "stringifyAsync",
426
- value: function stringifyAsync(e, t, r, n) {
427
- return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
428
- throwOnBadSyncType: !0
429
- }, n), {}, {
430
- sync: !1
431
- }));
432
- }
433
- }, {
434
- key: "parse",
435
- value: function parse(e, t, r) {
436
- return r = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), r), {}, {
437
- parse: !0
438
- }), this.revive(JSON.parse(e, t), r);
439
- }
440
- }, {
441
- key: "parseSync",
442
- value: function parseSync(e, t, r) {
443
- return this.parse(e, t, _objectSpread2(_objectSpread2({
444
- throwOnBadSyncType: !0
445
- }, r), {}, {
446
- sync: !0
447
- }));
448
- }
449
- }, {
450
- key: "parseAsync",
451
- value: function parseAsync(e, t, r) {
452
- return this.parse(e, t, _objectSpread2(_objectSpread2({
453
- throwOnBadSyncType: !0
454
- }, r), {}, {
455
- sync: !1
456
- }));
457
- }
458
- }, {
459
- key: "specialTypeNames",
460
- value: function specialTypeNames(e, t) {
461
- var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
462
- return r.returnTypeNames = !0, this.encapsulate(e, t, r);
667
+ function Typeson(e) {
668
+ _classCallCheck(this, Typeson), this.options = e, this.plainObjectReplacers = [], this.nonplainObjectReplacers = [], this.revivers = {}, this.types = {};
463
669
  }
464
- }, {
465
- key: "rootTypeName",
466
- value: function rootTypeName(e, t) {
467
- var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
468
- return r.iterateNone = !0, this.encapsulate(e, t, r);
469
- }
470
- }, {
471
- key: "encapsulate",
472
- value: function encapsulate(t, r, n) {
473
- var a = _async(function (t, r) {
474
- return _await(Promise.all(r.map(function (e) {
475
- return e[1].p;
476
- })), function (n) {
477
- return _await(Promise.all(n.map(_async(function (n) {
478
- var o = !1,
479
- i = [],
480
- c = _slicedToArray(r.splice(0, 1), 1),
481
- s = _slicedToArray(c[0], 7),
482
- u = s[0],
483
- p = s[2],
484
- y = s[3],
485
- l = s[4],
486
- f = s[5],
487
- h = s[6],
488
- v = _encapsulate(u, n, p, y, i, !0, h),
489
- d = hasConstructorOf(v, e);
490
-
491
- return function _invoke(e, t) {
492
- var r = e();
493
- return r && r.then ? r.then(t) : t(r);
494
- }(function () {
495
- if (u && d) return _await(v.p, function (e) {
496
- l[f] = e;
497
- var r = a(t, i);
498
- return o = !0, r;
670
+ return _createClass(Typeson, [{
671
+ key: "stringify",
672
+ value: function stringify(e, t, r, n) {
673
+ n = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), n), {}, {
674
+ stringification: !0
675
+ });
676
+ var o = this.encapsulate(e, null, n);
677
+ return i$1(o) ? JSON.stringify(o[0], t, r) : o.then(function (e) {
678
+ return JSON.stringify(e, t, r);
679
+ });
680
+ }
681
+ }, {
682
+ key: "stringifySync",
683
+ value: function stringifySync(e, t, r, n) {
684
+ return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
685
+ throwOnBadSyncType: !0
686
+ }, n), {}, {
687
+ sync: !0
688
+ }));
689
+ }
690
+ }, {
691
+ key: "stringifyAsync",
692
+ value: function stringifyAsync(e, t, r, n) {
693
+ return this.stringify(e, t, r, _objectSpread2(_objectSpread2({
694
+ throwOnBadSyncType: !0
695
+ }, n), {}, {
696
+ sync: !1
697
+ }));
698
+ }
699
+ }, {
700
+ key: "parse",
701
+ value: function parse(e, t, r) {
702
+ return r = _objectSpread2(_objectSpread2(_objectSpread2({}, this.options), r), {}, {
703
+ parse: !0
704
+ }), this.revive(JSON.parse(e, t), r);
705
+ }
706
+ }, {
707
+ key: "parseSync",
708
+ value: function parseSync(e, t, r) {
709
+ return this.parse(e, t, _objectSpread2(_objectSpread2({
710
+ throwOnBadSyncType: !0
711
+ }, r), {}, {
712
+ sync: !0
713
+ }));
714
+ }
715
+ }, {
716
+ key: "parseAsync",
717
+ value: function parseAsync(e, t, r) {
718
+ return this.parse(e, t, _objectSpread2(_objectSpread2({
719
+ throwOnBadSyncType: !0
720
+ }, r), {}, {
721
+ sync: !1
722
+ }));
723
+ }
724
+ }, {
725
+ key: "specialTypeNames",
726
+ value: function specialTypeNames(e, t) {
727
+ var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
728
+ return r.returnTypeNames = !0, this.encapsulate(e, t, r);
729
+ }
730
+ }, {
731
+ key: "rootTypeName",
732
+ value: function rootTypeName(e, t) {
733
+ var r = arguments.length > 2 && void 0 !== arguments[2] ? arguments[2] : {};
734
+ return r.iterateNone = !0, this.encapsulate(e, t, r);
735
+ }
736
+ }, {
737
+ key: "encapsulate",
738
+ value: function encapsulate(t, r, n) {
739
+ var o = _async(function (t, r) {
740
+ return _await(Promise.all(r.map(function (e) {
741
+ return e[1].p;
742
+ })), function (n) {
743
+ return _await(Promise.all(n.map(_async(function (n) {
744
+ var a = !1,
745
+ i = [],
746
+ c = _slicedToArray(r.splice(0, 1), 1),
747
+ s = _slicedToArray(c[0], 7),
748
+ u = s[0],
749
+ p = s[2],
750
+ l = s[3],
751
+ y = s[4],
752
+ f = s[5],
753
+ h = s[6],
754
+ v = _encapsulate(u, n, p, l, i, !0, h),
755
+ b = hasConstructorOf(v, e);
756
+ return function _invoke(e, t) {
757
+ var r = e();
758
+ return r && r.then ? r.then(t) : t(r);
759
+ }(function () {
760
+ if (u && b) return _await(v.p, function (e) {
761
+ y[f] = e;
762
+ var r = o(t, i);
763
+ return a = !0, r;
764
+ });
765
+ }, function (e) {
766
+ return a ? e : (u ? y[f] = v : t = b ? v.p : v, o(t, i));
767
+ });
768
+ }))), function () {
769
+ return t;
499
770
  });
500
- }, function (e) {
501
- return o ? e : (u ? l[f] = v : t = d ? v.p : v, a(t, i));
502
771
  });
503
- }))), function () {
504
- return t;
505
- });
506
- });
507
- }),
772
+ }),
508
773
  u = (n = _objectSpread2(_objectSpread2({
509
- sync: !0
510
- }, this.options), n)).sync,
774
+ sync: !0
775
+ }, this.options), n)).sync,
511
776
  p = this,
512
- y = {},
513
- l = [],
777
+ l = {},
778
+ y = [],
514
779
  f = [],
515
780
  h = [],
516
781
  v = !("cyclic" in n) || n.cyclic,
517
- d = n.encapsulateObserver,
518
- b = _encapsulate("", t, v, r || {}, h);
519
-
520
- function finish(e) {
521
- var t = Object.values(y);
522
- if (n.iterateNone) return t.length ? t[0] : getJSONType(e);
523
-
524
- if (t.length) {
525
- if (n.returnTypeNames) return _toConsumableArray(new Set(t));
526
- e && isPlainObject(e) && !c.call(e, "$types") ? e.$types = y : e = {
782
+ b = n.encapsulateObserver,
783
+ d = _encapsulate("", t, v, r || {}, h);
784
+ function finish(e) {
785
+ var t = Object.values(l);
786
+ if (n.iterateNone) return t.length ? t[0] : getJSONType(e);
787
+ if (t.length) {
788
+ if (n.returnTypeNames) return _toConsumableArray(new Set(t));
789
+ e && isPlainObject(e) && !c.call(e, "$types") ? e.$types = l : e = {
790
+ $: e,
791
+ $types: {
792
+ $: l
793
+ }
794
+ };
795
+ } else isObject(e) && c.call(e, "$types") && (e = {
527
796
  $: e,
528
- $types: {
529
- $: y
530
- }
531
- };
532
- } else isObject(e) && c.call(e, "$types") && (e = {
533
- $: e,
534
- $types: !0
535
- });
536
-
537
- return !n.returnTypeNames && e;
538
- }
539
-
540
- function _adaptBuiltinStateObjectProperties(e, t, r) {
541
- Object.assign(e, t);
542
- var n = s.map(function (t) {
543
- var r = e[t];
544
- return delete e[t], r;
545
- });
546
- r(), s.forEach(function (t, r) {
547
- e[t] = n[r];
548
- });
549
- }
550
-
551
- function _encapsulate(t, r, a, s, u, h, v) {
552
- var b,
797
+ $types: !0
798
+ });
799
+ return !n.returnTypeNames && e;
800
+ }
801
+ function _adaptBuiltinStateObjectProperties(e, t, r) {
802
+ Object.assign(e, t);
803
+ var n = s.map(function (t) {
804
+ var r = e[t];
805
+ return delete e[t], r;
806
+ });
807
+ r(), s.forEach(function (t, r) {
808
+ e[t] = n[r];
809
+ });
810
+ }
811
+ function _encapsulate(t, r, o, s, u, h, v) {
812
+ var d,
553
813
  _ = {},
554
814
  O = _typeof(r),
555
- j = d ? function (n) {
556
- var o = v || s.type || getJSONType(r);
557
- d(Object.assign(n || _, {
558
- keypath: t,
559
- value: r,
560
- cyclic: a,
561
- stateObj: s,
562
- promisesData: u,
563
- resolvingTypesonPromise: h,
564
- awaitingTypesonPromise: hasConstructorOf(r, e)
565
- }, {
566
- type: o
567
- }));
568
- } : null;
569
-
570
- if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY ? (b = s.replaced ? r : replace(t, r, s, u, !1, h, j)) !== r && (_ = {
571
- replaced: b
572
- }) : b = r, j && j(), b;
573
- if (null === r) return j && j(), r;
574
-
575
- if (a && !s.iterateIn && !s.iterateUnsetNumeric && r && "object" === _typeof(r)) {
576
- var m = l.indexOf(r);
577
- if (!(m < 0)) return y[t] = "#", j && j({
578
- cyclicKeypath: f[m]
579
- }), "#" + f[m];
580
- !0 === a && (l.push(r), f.push(t));
581
- }
582
-
583
- var S,
584
- g = isPlainObject(r),
815
+ j = b ? function (n) {
816
+ var a = v || s.type || getJSONType(r);
817
+ b(Object.assign(n || _, {
818
+ keypath: t,
819
+ value: r,
820
+ cyclic: o,
821
+ stateObj: s,
822
+ promisesData: u,
823
+ resolvingTypesonPromise: h,
824
+ awaitingTypesonPromise: hasConstructorOf(r, e)
825
+ }, {
826
+ type: a
827
+ }));
828
+ } : null;
829
+ if (["string", "boolean", "number", "undefined"].includes(O)) return void 0 === r || Number.isNaN(r) || r === Number.NEGATIVE_INFINITY || r === Number.POSITIVE_INFINITY ? (d = s.replaced ? r : replace(t, r, s, u, !1, h, j)) !== r && (_ = {
830
+ replaced: d
831
+ }) : d = r, j && j(), d;
832
+ if (null === r) return j && j(), r;
833
+ if (o && !s.iterateIn && !s.iterateUnsetNumeric && r && "object" === _typeof(r)) {
834
+ var m = y.indexOf(r);
835
+ if (!(m < 0)) return l[t] = "#", j && j({
836
+ cyclicKeypath: f[m]
837
+ }), "#" + f[m];
838
+ !0 === o && (y.push(r), f.push(t));
839
+ }
840
+ var g,
841
+ S = isPlainObject(r),
585
842
  P = i$1(r),
586
- T = (g || P) && (!p.plainObjectReplacers.length || s.replaced) || s.iterateIn ? r : replace(t, r, s, u, g || P, null, j);
587
- if (T !== r ? (b = T, _ = {
588
- replaced: T
589
- }) : "" === t && hasConstructorOf(r, e) ? (u.push([t, r, a, s, void 0, void 0, s.type]), b = r) : P && "object" !== s.iterateIn || "array" === s.iterateIn ? (S = new Array(r.length), _ = {
590
- clone: S
591
- }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !g && "object" !== s.iterateIn ? b = r : (S = {}, s.addLength && (S.length = r.length), _ = {
592
- clone: S
593
- }), j && j(), n.iterateNone) return S || b;
594
- if (!S) return b;
595
-
596
- if (s.iterateIn) {
597
- var w = function _loop(n) {
598
- var o = {
599
- ownKeys: c.call(r, n)
843
+ T = (S || P) && (!p.plainObjectReplacers.length || s.replaced) || s.iterateIn ? r : replace(t, r, s, u, S || P, null, j);
844
+ if (T !== r ? (d = T, _ = {
845
+ replaced: T
846
+ }) : "" === t && hasConstructorOf(r, e) ? (u.push([t, r, o, s, void 0, void 0, s.type]), d = r) : P && "object" !== s.iterateIn || "array" === s.iterateIn ? (g = new Array(r.length), _ = {
847
+ clone: g
848
+ }) : (["function", "symbol"].includes(_typeof(r)) || "toJSON" in r || hasConstructorOf(r, e) || hasConstructorOf(r, Promise) || hasConstructorOf(r, ArrayBuffer)) && !S && "object" !== s.iterateIn ? d = r : (g = {}, s.addLength && (g.length = r.length), _ = {
849
+ clone: g
850
+ }), j && j(), n.iterateNone) return g || d;
851
+ if (!g) return d;
852
+ if (s.iterateIn) {
853
+ var w = function _loop(n) {
854
+ var a = {
855
+ ownKeys: c.call(r, n)
856
+ };
857
+ _adaptBuiltinStateObjectProperties(s, a, function () {
858
+ var a = t + (t ? "." : "") + escapeKeyPathComponent(n),
859
+ i = _encapsulate(a, r[n], Boolean(o), s, u, h);
860
+ hasConstructorOf(i, e) ? u.push([a, i, Boolean(o), s, g, n, s.type]) : void 0 !== i && (g[n] = i);
861
+ });
600
862
  };
601
-
602
- _adaptBuiltinStateObjectProperties(s, o, function () {
603
- var o = t + (t ? "." : "") + escapeKeyPathComponent(n),
604
- i = _encapsulate(o, r[n], Boolean(a), s, u, h);
605
-
606
- hasConstructorOf(i, e) ? u.push([o, i, Boolean(a), s, S, n, s.type]) : void 0 !== i && (S[n] = i);
863
+ for (var A in r) w(A);
864
+ j && j({
865
+ endIterateIn: !0,
866
+ end: !0
607
867
  });
608
- };
609
-
610
- for (var A in r) {
611
- w(A);
612
- }
613
-
614
- j && j({
615
- endIterateIn: !0,
868
+ } else a(r).forEach(function (n) {
869
+ var a = t + (t ? "." : "") + escapeKeyPathComponent(n);
870
+ _adaptBuiltinStateObjectProperties(s, {
871
+ ownKeys: !0
872
+ }, function () {
873
+ var t = _encapsulate(a, r[n], Boolean(o), s, u, h);
874
+ hasConstructorOf(t, e) ? u.push([a, t, Boolean(o), s, g, n, s.type]) : void 0 !== t && (g[n] = t);
875
+ });
876
+ }), j && j({
877
+ endIterateOwn: !0,
616
878
  end: !0
617
879
  });
618
- } else o(r).forEach(function (n) {
619
- var o = t + (t ? "." : "") + escapeKeyPathComponent(n);
620
-
621
- _adaptBuiltinStateObjectProperties(s, {
622
- ownKeys: !0
623
- }, function () {
624
- var t = _encapsulate(o, r[n], Boolean(a), s, u, h);
625
-
626
- hasConstructorOf(t, e) ? u.push([o, t, Boolean(a), s, S, n, s.type]) : void 0 !== t && (S[n] = t);
627
- });
628
- }), j && j({
629
- endIterateOwn: !0,
630
- end: !0
631
- });
632
-
633
- if (s.iterateUnsetNumeric) {
634
- for (var C = r.length, k = function _loop2(n) {
635
- if (!(n in r)) {
636
- var o = t + (t ? "." : "") + n;
637
-
638
- _adaptBuiltinStateObjectProperties(s, {
639
- ownKeys: !1
640
- }, function () {
641
- var t = _encapsulate(o, void 0, Boolean(a), s, u, h);
642
-
643
- hasConstructorOf(t, e) ? u.push([o, t, Boolean(a), s, S, n, s.type]) : void 0 !== t && (S[n] = t);
644
- });
645
- }
646
- }, N = 0; N < C; N++) {
647
- k(N);
880
+ if (s.iterateUnsetNumeric) {
881
+ for (var C = r.length, k = function _loop2(n) {
882
+ if (!(n in r)) {
883
+ var a = t + (t ? "." : "") + n;
884
+ _adaptBuiltinStateObjectProperties(s, {
885
+ ownKeys: !1
886
+ }, function () {
887
+ var t = _encapsulate(a, void 0, Boolean(o), s, u, h);
888
+ hasConstructorOf(t, e) ? u.push([a, t, Boolean(o), s, g, n, s.type]) : void 0 !== t && (g[n] = t);
889
+ });
890
+ }
891
+ }, N = 0; N < C; N++) k(N);
892
+ j && j({
893
+ endIterateUnsetNumeric: !0,
894
+ end: !0
895
+ });
648
896
  }
649
-
650
- j && j({
651
- endIterateUnsetNumeric: !0,
652
- end: !0
653
- });
897
+ return g;
654
898
  }
655
-
656
- return S;
657
- }
658
-
659
- function replace(e, t, r, n, a, o, i) {
660
- for (var c = a ? p.plainObjectReplacers : p.nonplainObjectReplacers, s = c.length; s--;) {
661
- var l = c[s];
662
-
663
- if (l.test(t, r)) {
664
- var f = l.type;
665
-
666
- if (p.revivers[f]) {
667
- var h = y[e];
668
- y[e] = h ? [f].concat(h) : f;
899
+ function replace(e, t, r, n, o, a, i) {
900
+ for (var c = o ? p.plainObjectReplacers : p.nonplainObjectReplacers, s = c.length; s--;) {
901
+ var y = c[s];
902
+ if (y.test(t, r)) {
903
+ var f = y.type;
904
+ if (p.revivers[f]) {
905
+ var h = l[e];
906
+ l[e] = h ? [f].concat(h) : f;
907
+ }
908
+ return Object.assign(r, {
909
+ type: f,
910
+ replaced: !0
911
+ }), !u && y.replaceAsync || y.replace ? (i && i({
912
+ replacing: !0
913
+ }), _encapsulate(e, y[u || !y.replaceAsync ? "replace" : "replaceAsync"](t, r), v && "readonly", r, n, a, f)) : (i && i({
914
+ typeDetected: !0
915
+ }), _encapsulate(e, t, v && "readonly", r, n, a, f));
669
916
  }
670
-
671
- return Object.assign(r, {
672
- type: f,
673
- replaced: !0
674
- }), !u && l.replaceAsync || l.replace ? (i && i({
675
- replacing: !0
676
- }), _encapsulate(e, l[u || !l.replaceAsync ? "replace" : "replaceAsync"](t, r), v && "readonly", r, n, o, f)) : (i && i({
677
- typeDetected: !0
678
- }), _encapsulate(e, t, v && "readonly", r, n, o, f));
679
917
  }
918
+ return t;
680
919
  }
681
-
682
- return t;
920
+ return h.length ? u && n.throwOnBadSyncType ? function () {
921
+ throw new TypeError("Sync method requested but async result obtained");
922
+ }() : Promise.resolve(o(d, h)).then(finish) : !u && n.throwOnBadSyncType ? function () {
923
+ throw new TypeError("Async method requested but sync result obtained");
924
+ }() : n.stringification && u ? [finish(d)] : u ? finish(d) : Promise.resolve(finish(d));
683
925
  }
684
-
685
- return h.length ? u && n.throwOnBadSyncType ? function () {
686
- throw new TypeError("Sync method requested but async result obtained");
687
- }() : Promise.resolve(a(b, h)).then(finish) : !u && n.throwOnBadSyncType ? function () {
688
- throw new TypeError("Async method requested but sync result obtained");
689
- }() : n.stringification && u ? [finish(b)] : u ? finish(b) : Promise.resolve(finish(b));
690
- }
691
- }, {
692
- key: "encapsulateSync",
693
- value: function encapsulateSync(e, t, r) {
694
- return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
695
- throwOnBadSyncType: !0
696
- }, r), {}, {
697
- sync: !0
698
- }));
699
- }
700
- }, {
701
- key: "encapsulateAsync",
702
- value: function encapsulateAsync(e, t, r) {
703
- return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
704
- throwOnBadSyncType: !0
705
- }, r), {}, {
706
- sync: !1
707
- }));
708
- }
709
- }, {
710
- key: "revive",
711
- value: function revive(t, r) {
712
- var n = t && t.$types;
713
- if (!n) return t;
714
- if (!0 === n) return t.$;
715
-
716
- var a = (r = _objectSpread2(_objectSpread2({
717
- sync: !0
718
- }, this.options), r)).sync,
926
+ }, {
927
+ key: "encapsulateSync",
928
+ value: function encapsulateSync(e, t, r) {
929
+ return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
930
+ throwOnBadSyncType: !0
931
+ }, r), {}, {
932
+ sync: !0
933
+ }));
934
+ }
935
+ }, {
936
+ key: "encapsulateAsync",
937
+ value: function encapsulateAsync(e, t, r) {
938
+ return this.encapsulate(e, t, _objectSpread2(_objectSpread2({
939
+ throwOnBadSyncType: !0
940
+ }, r), {}, {
941
+ sync: !1
942
+ }));
943
+ }
944
+ }, {
945
+ key: "revive",
946
+ value: function revive(t, r) {
947
+ var n = t && t.$types;
948
+ if (!n) return t;
949
+ if (!0 === n) return t.$;
950
+ var o = (r = _objectSpread2(_objectSpread2({
951
+ sync: !0
952
+ }, this.options), r)).sync,
719
953
  c = [],
720
954
  s = {},
721
955
  u = !0;
722
-
723
- n.$ && isPlainObject(n.$) && (t = t.$, n = n.$, u = !1);
724
- var y = this;
725
-
726
- function executeReviver(e, t) {
727
- var r = _slicedToArray(y.revivers[e] || [], 1)[0];
728
-
729
- if (!r) throw new Error("Unregistered type: " + e);
730
- return a && !("revive" in r) ? t : r[a && r.revive ? "revive" : !a && r.reviveAsync ? "reviveAsync" : "revive"](t, s);
731
- }
732
-
733
- var l = [];
734
-
735
- function checkUndefined(e) {
736
- return hasConstructorOf(e, p) ? void 0 : e;
737
- }
738
-
739
- var f,
956
+ n.$ && isPlainObject(n.$) && (t = t.$, n = n.$, u = !1);
957
+ var l = this;
958
+ function executeReviver(e, t) {
959
+ var r = _slicedToArray(l.revivers[e] || [], 1)[0];
960
+ if (!r) throw new Error("Unregistered type: " + e);
961
+ return o && !("revive" in r) ? t : r[o && r.revive ? "revive" : !o && r.reviveAsync ? "reviveAsync" : "revive"](t, s);
962
+ }
963
+ var y = [];
964
+ function checkUndefined(e) {
965
+ return hasConstructorOf(e, p) ? void 0 : e;
966
+ }
967
+ var f,
740
968
  h = function revivePlainObjects() {
741
- var r = [];
742
- if (Object.entries(n).forEach(function (e) {
743
- var t = _slicedToArray(e, 2),
744
- a = t[0],
745
- o = t[1];
746
-
747
- "#" !== o && [].concat(o).forEach(function (e) {
748
- _slicedToArray(y.revivers[e] || [null, {}], 2)[1].plain && (r.push({
749
- keypath: a,
750
- type: e
751
- }), delete n[a]);
752
- });
753
- }), r.length) return r.sort(nestedPathsFirst).reduce(function reducer(r, n) {
754
- var a = n.keypath,
755
- o = n.type;
756
- if (isThenable(r)) return r.then(function (e) {
757
- return reducer(e, {
758
- keypath: a,
759
- type: o
760
- });
761
- });
762
- var i = getByKeyPath(t, a);
763
- if (hasConstructorOf(i = executeReviver(o, i), e)) return i.then(function (e) {
764
- var r = setAtKeyPath(t, a, e);
765
- r === e && (t = r);
766
- });
767
- var c = setAtKeyPath(t, a, i);
768
- c === i && (t = c);
769
- }, void 0);
770
- }();
771
-
772
- return hasConstructorOf(h, e) ? f = h.then(function () {
773
- return t;
774
- }) : (f = function _revive(t, r, a, s, y) {
775
- if (!u || "$types" !== t) {
776
- var f = n[t],
969
+ var r = [];
970
+ if (Object.entries(n).forEach(function (e) {
971
+ var t = _slicedToArray(e, 2),
972
+ o = t[0],
973
+ a = t[1];
974
+ "#" !== a && [].concat(a).forEach(function (e) {
975
+ _slicedToArray(l.revivers[e] || [null, {}], 2)[1].plain && (r.push({
976
+ keypath: o,
977
+ type: e
978
+ }), delete n[o]);
979
+ });
980
+ }), r.length) return r.sort(nestedPathsFirst).reduce(function reducer(r, n) {
981
+ var o = n.keypath,
982
+ a = n.type;
983
+ if (isThenable(r)) return r.then(function (e) {
984
+ return reducer(e, {
985
+ keypath: o,
986
+ type: a
987
+ });
988
+ });
989
+ var i = getByKeyPath(t, o);
990
+ if (hasConstructorOf(i = executeReviver(a, i), e)) return i.then(function (e) {
991
+ var r = setAtKeyPath(t, o, e);
992
+ r === e && (t = r);
993
+ });
994
+ var c = setAtKeyPath(t, o, i);
995
+ c === i && (t = c);
996
+ }, void 0);
997
+ }();
998
+ return hasConstructorOf(h, e) ? f = h.then(function () {
999
+ return t;
1000
+ }) : (f = function _revive(t, r, o, s, l) {
1001
+ if (!u || "$types" !== t) {
1002
+ var f = n[t],
777
1003
  h = i$1(r);
778
-
779
- if (h || isPlainObject(r)) {
780
- var v = h ? new Array(r.length) : {};
781
-
782
- for (o(r).forEach(function (n) {
783
- var o = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], a || v, v, n),
1004
+ if (h || isPlainObject(r)) {
1005
+ var v = h ? new Array(r.length) : {};
1006
+ for (a(r).forEach(function (n) {
1007
+ var a = _revive(t + (t ? "." : "") + escapeKeyPathComponent(n), r[n], o || v, v, n),
784
1008
  i = function set(e) {
785
- return hasConstructorOf(e, p) ? v[n] = void 0 : void 0 !== e && (v[n] = e), e;
786
- };
787
-
788
- hasConstructorOf(o, e) ? l.push(o.then(function (e) {
789
- return i(e);
790
- })) : i(o);
791
- }), r = v; c.length;) {
792
- var d = _slicedToArray(c[0], 4),
793
- b = d[0],
794
- _ = d[1],
795
- O = d[2],
796
- j = d[3],
797
- m = getByKeyPath(b, _);
798
-
799
- if (void 0 === m) break;
800
- O[j] = m, c.splice(0, 1);
1009
+ return hasConstructorOf(e, p) ? v[n] = void 0 : void 0 !== e && (v[n] = e), e;
1010
+ };
1011
+ hasConstructorOf(a, e) ? y.push(a.then(function (e) {
1012
+ return i(e);
1013
+ })) : i(a);
1014
+ }), r = v; c.length;) {
1015
+ var b = _slicedToArray(c[0], 4),
1016
+ d = b[0],
1017
+ _ = b[1],
1018
+ O = b[2],
1019
+ j = b[3],
1020
+ m = getByKeyPath(d, _);
1021
+ if (void 0 === m) break;
1022
+ O[j] = m, c.splice(0, 1);
1023
+ }
801
1024
  }
1025
+ if (!f) return r;
1026
+ if ("#" === f) {
1027
+ var g = getByKeyPath(o, r.slice(1));
1028
+ return void 0 === g && c.push([o, r.slice(1), s, l]), g;
1029
+ }
1030
+ return [].concat(f).reduce(function reducer(t, r) {
1031
+ return hasConstructorOf(t, e) ? t.then(function (e) {
1032
+ return reducer(e, r);
1033
+ }) : executeReviver(r, t);
1034
+ }, r);
802
1035
  }
803
-
804
- if (!f) return r;
805
-
806
- if ("#" === f) {
807
- var S = getByKeyPath(a, r.slice(1));
808
- return void 0 === S && c.push([a, r.slice(1), s, y]), S;
809
- }
810
-
811
- return [].concat(f).reduce(function reducer(t, r) {
812
- return hasConstructorOf(t, e) ? t.then(function (e) {
813
- return reducer(e, r);
814
- }) : executeReviver(r, t);
815
- }, r);
816
- }
817
- }("", t, null), l.length && (f = e.resolve(f).then(function (t) {
818
- return e.all([t].concat(l));
819
- }).then(function (e) {
820
- return _slicedToArray(e, 1)[0];
821
- }))), isThenable(f) ? a && r.throwOnBadSyncType ? function () {
822
- throw new TypeError("Sync method requested but async result obtained");
823
- }() : hasConstructorOf(f, e) ? f.p.then(checkUndefined) : f : !a && r.throwOnBadSyncType ? function () {
824
- throw new TypeError("Async method requested but sync result obtained");
825
- }() : a ? checkUndefined(f) : Promise.resolve(checkUndefined(f));
826
- }
827
- }, {
828
- key: "reviveSync",
829
- value: function reviveSync(e, t) {
830
- return this.revive(e, _objectSpread2(_objectSpread2({
831
- throwOnBadSyncType: !0
832
- }, t), {}, {
833
- sync: !0
834
- }));
835
- }
836
- }, {
837
- key: "reviveAsync",
838
- value: function reviveAsync(e, t) {
839
- return this.revive(e, _objectSpread2(_objectSpread2({
840
- throwOnBadSyncType: !0
841
- }, t), {}, {
842
- sync: !1
843
- }));
844
- }
845
- }, {
846
- key: "register",
847
- value: function register(e, t) {
848
- var r = this;
849
- t = t || {};
850
-
851
- var n = function R(e) {
852
- i$1(e) ? e.forEach(function (e) {
853
- return R(e);
854
- }) : e && o(e).forEach(function (n) {
855
- if ("#" === n) throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");
856
- if (y.includes(n)) throw new TypeError("Plain JSON object types are reserved as type names");
857
- var a = e[n],
858
- o = a && a.testPlainObjects ? r.plainObjectReplacers : r.nonplainObjectReplacers,
859
- c = o.filter(function (e) {
860
- return e.type === n;
861
- });
862
-
863
- if (c.length && (o.splice(o.indexOf(c[0]), 1), delete r.revivers[n], delete r.types[n]), "function" == typeof a) {
864
- var s = a;
865
- a = {
866
- test: function test(e) {
867
- return e && e.constructor === s;
868
- },
869
- replace: function replace(e) {
870
- return _objectSpread2({}, e);
871
- },
872
- revive: function revive(e) {
873
- return Object.assign(Object.create(s.prototype), e);
1036
+ }("", t, null), y.length && (f = e.resolve(f).then(function (t) {
1037
+ return e.all([t].concat(y));
1038
+ }).then(function (e) {
1039
+ return _slicedToArray(e, 1)[0];
1040
+ }))), isThenable(f) ? o && r.throwOnBadSyncType ? function () {
1041
+ throw new TypeError("Sync method requested but async result obtained");
1042
+ }() : hasConstructorOf(f, e) ? f.p.then(checkUndefined) : f : !o && r.throwOnBadSyncType ? function () {
1043
+ throw new TypeError("Async method requested but sync result obtained");
1044
+ }() : o ? checkUndefined(f) : Promise.resolve(checkUndefined(f));
1045
+ }
1046
+ }, {
1047
+ key: "reviveSync",
1048
+ value: function reviveSync(e, t) {
1049
+ return this.revive(e, _objectSpread2(_objectSpread2({
1050
+ throwOnBadSyncType: !0
1051
+ }, t), {}, {
1052
+ sync: !0
1053
+ }));
1054
+ }
1055
+ }, {
1056
+ key: "reviveAsync",
1057
+ value: function reviveAsync(e, t) {
1058
+ return this.revive(e, _objectSpread2(_objectSpread2({
1059
+ throwOnBadSyncType: !0
1060
+ }, t), {}, {
1061
+ sync: !1
1062
+ }));
1063
+ }
1064
+ }, {
1065
+ key: "register",
1066
+ value: function register(e, t) {
1067
+ var r = this;
1068
+ t = t || {};
1069
+ var n = function R(e) {
1070
+ i$1(e) ? e.forEach(function (e) {
1071
+ return R(e);
1072
+ }) : e && a(e).forEach(function (n) {
1073
+ if ("#" === n) throw new TypeError("# cannot be used as a type name as it is reserved for cyclic objects");
1074
+ if (l.includes(n)) throw new TypeError("Plain JSON object types are reserved as type names");
1075
+ var o = e[n],
1076
+ a = o && o.testPlainObjects ? r.plainObjectReplacers : r.nonplainObjectReplacers,
1077
+ c = a.filter(function (e) {
1078
+ return e.type === n;
1079
+ });
1080
+ if (c.length && (a.splice(a.indexOf(c[0]), 1), delete r.revivers[n], delete r.types[n]), "function" == typeof o) {
1081
+ var s = o;
1082
+ o = {
1083
+ test: function test(e) {
1084
+ return e && e.constructor === s;
1085
+ },
1086
+ replace: function replace(e) {
1087
+ return _objectSpread2({}, e);
1088
+ },
1089
+ revive: function revive(e) {
1090
+ return Object.assign(Object.create(s.prototype), e);
1091
+ }
1092
+ };
1093
+ } else if (i$1(o)) {
1094
+ var u = _slicedToArray(o, 3);
1095
+ o = {
1096
+ test: u[0],
1097
+ replace: u[1],
1098
+ revive: u[2]
1099
+ };
1100
+ }
1101
+ if (o && o.test) {
1102
+ var p = {
1103
+ type: n,
1104
+ test: o.test.bind(o)
1105
+ };
1106
+ o.replace && (p.replace = o.replace.bind(o)), o.replaceAsync && (p.replaceAsync = o.replaceAsync.bind(o));
1107
+ var y = "number" == typeof t.fallback ? t.fallback : t.fallback ? 0 : Number.POSITIVE_INFINITY;
1108
+ if (o.testPlainObjects ? r.plainObjectReplacers.splice(y, 0, p) : r.nonplainObjectReplacers.splice(y, 0, p), o.revive || o.reviveAsync) {
1109
+ var f = {};
1110
+ o.revive && (f.revive = o.revive.bind(o)), o.reviveAsync && (f.reviveAsync = o.reviveAsync.bind(o)), r.revivers[n] = [f, {
1111
+ plain: o.testPlainObjects
1112
+ }];
874
1113
  }
875
- };
876
- } else if (i$1(a)) {
877
- var u = _slicedToArray(a, 3);
878
-
879
- a = {
880
- test: u[0],
881
- replace: u[1],
882
- revive: u[2]
883
- };
884
- }
885
-
886
- if (a && a.test) {
887
- var p = {
888
- type: n,
889
- test: a.test.bind(a)
890
- };
891
- a.replace && (p.replace = a.replace.bind(a)), a.replaceAsync && (p.replaceAsync = a.replaceAsync.bind(a));
892
- var l = "number" == typeof t.fallback ? t.fallback : t.fallback ? 0 : Number.POSITIVE_INFINITY;
893
-
894
- if (a.testPlainObjects ? r.plainObjectReplacers.splice(l, 0, p) : r.nonplainObjectReplacers.splice(l, 0, p), a.revive || a.reviveAsync) {
895
- var f = {};
896
- a.revive && (f.revive = a.revive.bind(a)), a.reviveAsync && (f.reviveAsync = a.reviveAsync.bind(a)), r.revivers[n] = [f, {
897
- plain: a.testPlainObjects
898
- }];
1114
+ r.types[n] = o;
899
1115
  }
900
-
901
- r.types[n] = a;
902
- }
903
- });
904
- };
905
-
906
- return [].concat(e).forEach(function (e) {
907
- return n(e);
908
- }), this;
909
- }
910
- }]), Typeson;
911
- }(),
912
- p = _createClass(function Undefined() {
913
- _classCallCheck(this, Undefined);
914
- });
915
-
1116
+ });
1117
+ };
1118
+ return [].concat(e).forEach(function (e) {
1119
+ return n(e);
1120
+ }), this;
1121
+ }
1122
+ }]), Typeson;
1123
+ }(),
1124
+ p = _createClass(function Undefined() {
1125
+ _classCallCheck(this, Undefined);
1126
+ });
916
1127
  p.__typeson__type__ = "TypesonUndefined";
917
- var y = ["null", "boolean", "number", "string", "array", "object"];
1128
+ var l = ["null", "boolean", "number", "string", "array", "object"];
918
1129
 
919
1130
  /*
920
1131
  * base64-arraybuffer
@@ -926,7 +1137,6 @@
926
1137
  var chars = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/'; // Use a lookup table to find the index.
927
1138
 
928
1139
  var lookup = new Uint8Array(256);
929
-
930
1140
  for (var i = 0; i < chars.length; i++) {
931
1141
  lookup[chars.codePointAt(i)] = i;
932
1142
  }
@@ -937,30 +1147,27 @@
937
1147
  * @returns {string}
938
1148
  */
939
1149
 
940
-
941
1150
  var encode = function encode(arraybuffer, byteOffset, lngth) {
942
1151
  if (lngth === null || lngth === undefined) {
943
1152
  lngth = arraybuffer.byteLength; // Needed for Safari
944
1153
  }
945
1154
 
946
- var bytes = new Uint8Array(arraybuffer, byteOffset || 0, // Default needed for Safari
1155
+ var bytes = new Uint8Array(arraybuffer, byteOffset || 0,
1156
+ // Default needed for Safari
947
1157
  lngth);
948
1158
  var len = bytes.length;
949
1159
  var base64 = '';
950
-
951
1160
  for (var _i = 0; _i < len; _i += 3) {
952
1161
  base64 += chars[bytes[_i] >> 2];
953
1162
  base64 += chars[(bytes[_i] & 3) << 4 | bytes[_i + 1] >> 4];
954
1163
  base64 += chars[(bytes[_i + 1] & 15) << 2 | bytes[_i + 2] >> 6];
955
1164
  base64 += chars[bytes[_i + 2] & 63];
956
1165
  }
957
-
958
1166
  if (len % 3 === 2) {
959
1167
  base64 = base64.slice(0, -1) + '=';
960
1168
  } else if (len % 3 === 1) {
961
1169
  base64 = base64.slice(0, -2) + '==';
962
1170
  }
963
-
964
1171
  return base64;
965
1172
  };
966
1173
  /**
@@ -968,24 +1175,19 @@
968
1175
  * @returns {ArrayBuffer}
969
1176
  */
970
1177
 
971
-
972
1178
  var decode = function decode(base64) {
973
1179
  var len = base64.length;
974
1180
  var bufferLength = base64.length * 0.75;
975
1181
  var p = 0;
976
1182
  var encoded1, encoded2, encoded3, encoded4;
977
-
978
1183
  if (base64[base64.length - 1] === '=') {
979
1184
  bufferLength--;
980
-
981
1185
  if (base64[base64.length - 2] === '=') {
982
1186
  bufferLength--;
983
1187
  }
984
1188
  }
985
-
986
1189
  var arraybuffer = new ArrayBuffer(bufferLength),
987
- bytes = new Uint8Array(arraybuffer);
988
-
1190
+ bytes = new Uint8Array(arraybuffer);
989
1191
  for (var _i2 = 0; _i2 < len; _i2 += 4) {
990
1192
  encoded1 = lookup[base64.codePointAt(_i2)];
991
1193
  encoded2 = lookup[base64.codePointAt(_i2 + 1)];
@@ -995,7 +1197,6 @@
995
1197
  bytes[p++] = (encoded2 & 15) << 4 | encoded3 >> 2;
996
1198
  bytes[p++] = (encoded3 & 3) << 6 | encoded4 & 63;
997
1199
  }
998
-
999
1200
  return arraybuffer;
1000
1201
  };
1001
1202
 
@@ -1008,15 +1209,12 @@
1008
1209
  if (!stateObj.buffers) {
1009
1210
  stateObj.buffers = [];
1010
1211
  }
1011
-
1012
1212
  var index = stateObj.buffers.indexOf(b);
1013
-
1014
1213
  if (index > -1) {
1015
1214
  return {
1016
1215
  index: index
1017
1216
  };
1018
1217
  }
1019
-
1020
1218
  stateObj.buffers.push(b);
1021
1219
  return encode(b);
1022
1220
  },
@@ -1024,27 +1222,24 @@
1024
1222
  if (!stateObj.buffers) {
1025
1223
  stateObj.buffers = [];
1026
1224
  }
1027
-
1028
1225
  if (_typeof$1(b64) === 'object') {
1029
1226
  return stateObj.buffers[b64.index];
1030
1227
  }
1031
-
1032
1228
  var buffer = decode(b64);
1033
1229
  stateObj.buffers.push(buffer);
1034
1230
  return buffer;
1035
1231
  }
1036
1232
  }
1037
1233
  };
1038
- // See also typed-arrays!
1234
+
1235
+ // See also typed-arrays!
1039
1236
 
1040
1237
  var bigintObject = {
1041
1238
  bigintObject: {
1042
1239
  test: function test(x) {
1043
1240
  return _typeof$1(x) === 'object' && hasConstructorOf(x, BigInt);
1044
1241
  },
1045
- replace: function replace(n) {
1046
- return String(n);
1047
- },
1242
+ replace: String,
1048
1243
  revive: function revive(s) {
1049
1244
  // Filed this to avoid error: https://github.com/eslint/eslint/issues/11810
1050
1245
  // eslint-disable-next-line no-new-object
@@ -1054,17 +1249,14 @@
1054
1249
  };
1055
1250
 
1056
1251
  /* globals BigInt */
1252
+
1057
1253
  var bigint = {
1058
1254
  bigint: {
1059
1255
  test: function test(x) {
1060
1256
  return typeof x === 'bigint';
1061
1257
  },
1062
- replace: function replace(n) {
1063
- return String(n);
1064
- },
1065
- revive: function revive(s) {
1066
- return BigInt(s);
1067
- }
1258
+ replace: String,
1259
+ revive: BigInt
1068
1260
  }
1069
1261
  };
1070
1262
 
@@ -1073,13 +1265,12 @@
1073
1265
  * @param {ArrayBuffer} buf
1074
1266
  * @returns {Uint8Array}
1075
1267
  */
1268
+
1076
1269
  /**
1077
1270
  *
1078
1271
  * @param {string} str
1079
1272
  * @returns {ArrayBuffer}
1080
1273
  */
1081
-
1082
-
1083
1274
  function string2arraybuffer(str) {
1084
1275
  /*
1085
1276
  // UTF-8 approaches
@@ -1116,7 +1307,6 @@
1116
1307
  }
1117
1308
  return utf8;
1118
1309
  */
1119
-
1120
1310
  /*
1121
1311
  // Working UTF-16 options (equivalents)
1122
1312
  const buf = new ArrayBuffer(str.length * 2); // 2 bytes for each char
@@ -1126,8 +1316,8 @@
1126
1316
  }
1127
1317
  return buf;
1128
1318
  */
1129
- var array = new Uint8Array(str.length);
1130
1319
 
1320
+ var array = new Uint8Array(str.length);
1131
1321
  for (var i = 0; i < str.length; i++) {
1132
1322
  // eslint-disable-next-line max-len -- Long
1133
1323
  // eslint-disable-next-line unicorn/prefer-code-point -- Iterating char. codes
@@ -1148,15 +1338,13 @@
1148
1338
  var req = new XMLHttpRequest();
1149
1339
  req.overrideMimeType('text/plain; charset=x-user-defined');
1150
1340
  req.open('GET', URL.createObjectURL(b), false); // Sync
1341
+ req.send();
1151
1342
 
1152
- req.send(); // Seems not feasible to accurately simulate
1153
-
1343
+ // Seems not feasible to accurately simulate
1154
1344
  /* c8 ignore next 3 */
1155
-
1156
1345
  if (req.status !== 200 && req.status !== 0) {
1157
1346
  throw new Error('Bad Blob access: ' + req.status);
1158
1347
  }
1159
-
1160
1348
  return {
1161
1349
  type: b.type,
1162
1350
  stringContents: req.responseText
@@ -1164,7 +1352,7 @@
1164
1352
  },
1165
1353
  revive: function revive(_ref) {
1166
1354
  var type = _ref.type,
1167
- stringContents = _ref.stringContents;
1355
+ stringContents = _ref.stringContents;
1168
1356
  return new Blob([string2arraybuffer(stringContents)], {
1169
1357
  type: type
1170
1358
  });
@@ -1183,10 +1371,9 @@
1183
1371
  type: b.type,
1184
1372
  stringContents: reader.result
1185
1373
  });
1186
- }); // Seems not feasible to accurately simulate
1187
-
1374
+ });
1375
+ // Seems not feasible to accurately simulate
1188
1376
  /* c8 ignore next 3 */
1189
-
1190
1377
  reader.addEventListener('error', function () {
1191
1378
  reject(reader.error);
1192
1379
  });
@@ -1197,6 +1384,7 @@
1197
1384
  };
1198
1385
 
1199
1386
  /* globals performance */
1387
+
1200
1388
  // The `performance` global is optional
1201
1389
 
1202
1390
  /**
@@ -1208,10 +1396,9 @@
1208
1396
  */
1209
1397
  function generateUUID() {
1210
1398
  // Adapted from original: public domain/MIT: http://stackoverflow.com/a/8809472/271577
1211
-
1212
1399
  /* c8 ignore next */
1213
- var d = Date.now() + ( // use high-precision timer if available
1214
-
1400
+ var d = Date.now() + (
1401
+ // use high-precision timer if available
1215
1402
  /* c8 ignore next 4 */
1216
1403
  typeof performance !== 'undefined' && typeof performance.now === 'function' ? performance.now() : 0);
1217
1404
  return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {
@@ -1240,7 +1427,7 @@
1240
1427
  },
1241
1428
  revive: function revive(_ref) {
1242
1429
  var uuid = _ref.uuid,
1243
- encapsulated = _ref.encapsulated;
1430
+ encapsulated = _ref.encapsulated;
1244
1431
  return cloneableObjectsByUUID[uuid][Symbol["for"]('cloneRevive')](encapsulated);
1245
1432
  }
1246
1433
  }
@@ -1253,42 +1440,35 @@
1253
1440
  },
1254
1441
  replaceAsync: function replaceAsync(key) {
1255
1442
  return new e( /*#__PURE__*/function () {
1256
- var _ref = _asyncToGenerator( /*#__PURE__*/regeneratorRuntime.mark(function _callee(resolve, reject) {
1443
+ var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(resolve, reject) {
1257
1444
  var jwk;
1258
- return regeneratorRuntime.wrap(function _callee$(_context) {
1259
- while (1) {
1260
- switch (_context.prev = _context.next) {
1261
- case 0:
1262
- _context.prev = 0;
1263
- _context.next = 3;
1264
- return crypto.subtle.exportKey('jwk', key);
1265
-
1266
- case 3:
1267
- jwk = _context.sent;
1268
- _context.next = 10;
1269
- break;
1270
-
1271
- case 6:
1272
- _context.prev = 6;
1273
- _context.t0 = _context["catch"](0);
1274
- reject(_context.t0);
1275
- return _context.abrupt("return");
1276
-
1277
- case 10:
1278
- resolve({
1279
- jwk: jwk,
1280
- algorithm: key.algorithm,
1281
- usages: key.usages
1282
- });
1283
-
1284
- case 11:
1285
- case "end":
1286
- return _context.stop();
1287
- }
1445
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
1446
+ while (1) switch (_context.prev = _context.next) {
1447
+ case 0:
1448
+ _context.prev = 0;
1449
+ _context.next = 3;
1450
+ return crypto.subtle.exportKey('jwk', key);
1451
+ case 3:
1452
+ jwk = _context.sent;
1453
+ _context.next = 10;
1454
+ break;
1455
+ case 6:
1456
+ _context.prev = 6;
1457
+ _context.t0 = _context["catch"](0);
1458
+ reject(_context.t0);
1459
+ return _context.abrupt("return");
1460
+ case 10:
1461
+ resolve({
1462
+ jwk: jwk,
1463
+ algorithm: key.algorithm,
1464
+ usages: key.usages
1465
+ });
1466
+ case 11:
1467
+ case "end":
1468
+ return _context.stop();
1288
1469
  }
1289
1470
  }, _callee, null, [[0, 6]]);
1290
1471
  }));
1291
-
1292
1472
  return function (_x, _x2) {
1293
1473
  return _ref.apply(this, arguments);
1294
1474
  };
@@ -1296,8 +1476,8 @@
1296
1476
  },
1297
1477
  revive: function revive(_ref2) {
1298
1478
  var jwk = _ref2.jwk,
1299
- algorithm = _ref2.algorithm,
1300
- usages = _ref2.usages;
1479
+ algorithm = _ref2.algorithm,
1480
+ usages = _ref2.usages;
1301
1481
  return crypto.subtle.importKey('jwk', jwk, algorithm, true, usages);
1302
1482
  }
1303
1483
  }
@@ -1310,15 +1490,12 @@
1310
1490
  },
1311
1491
  replace: function replace(_ref, stateObj) {
1312
1492
  var buffer = _ref.buffer,
1313
- byteOffset = _ref.byteOffset,
1314
- byteLength = _ref.byteLength;
1315
-
1493
+ byteOffset = _ref.byteOffset,
1494
+ byteLength = _ref.byteLength;
1316
1495
  if (!stateObj.buffers) {
1317
1496
  stateObj.buffers = [];
1318
1497
  }
1319
-
1320
1498
  var index = stateObj.buffers.indexOf(buffer);
1321
-
1322
1499
  if (index > -1) {
1323
1500
  return {
1324
1501
  index: index,
@@ -1326,7 +1503,6 @@
1326
1503
  byteLength: byteLength
1327
1504
  };
1328
1505
  }
1329
-
1330
1506
  stateObj.buffers.push(buffer);
1331
1507
  return {
1332
1508
  encoded: encode(buffer),
@@ -1338,20 +1514,17 @@
1338
1514
  if (!stateObj.buffers) {
1339
1515
  stateObj.buffers = [];
1340
1516
  }
1341
-
1342
1517
  var byteOffset = b64Obj.byteOffset,
1343
- byteLength = b64Obj.byteLength,
1344
- encoded = b64Obj.encoded,
1345
- index = b64Obj.index;
1518
+ byteLength = b64Obj.byteLength,
1519
+ encoded = b64Obj.encoded,
1520
+ index = b64Obj.index;
1346
1521
  var buffer;
1347
-
1348
1522
  if ('index' in b64Obj) {
1349
1523
  buffer = stateObj.buffers[index];
1350
1524
  } else {
1351
1525
  buffer = decode(encoded);
1352
1526
  stateObj.buffers.push(buffer);
1353
1527
  }
1354
-
1355
1528
  return new DataView(buffer, byteOffset, byteLength);
1356
1529
  }
1357
1530
  }
@@ -1364,18 +1537,15 @@
1364
1537
  },
1365
1538
  replace: function replace(dt) {
1366
1539
  var time = dt.getTime();
1367
-
1368
1540
  if (Number.isNaN(time)) {
1369
1541
  return 'NaN';
1370
1542
  }
1371
-
1372
1543
  return time;
1373
1544
  },
1374
1545
  revive: function revive(time) {
1375
1546
  if (time === 'NaN') {
1376
1547
  return new Date(Number.NaN);
1377
1548
  }
1378
-
1379
1549
  return new Date(time);
1380
1550
  }
1381
1551
  }
@@ -1388,7 +1558,7 @@
1388
1558
  },
1389
1559
  replace: function replace(_ref) {
1390
1560
  var name = _ref.name,
1391
- message = _ref.message;
1561
+ message = _ref.message;
1392
1562
  return {
1393
1563
  name: name,
1394
1564
  message: message
@@ -1396,39 +1566,47 @@
1396
1566
  },
1397
1567
  revive: function revive(_ref2) {
1398
1568
  var name = _ref2.name,
1399
- message = _ref2.message;
1569
+ message = _ref2.message;
1400
1570
  var e = new Error(message);
1401
1571
  e.name = name;
1402
1572
  return e;
1403
1573
  }
1404
1574
  }
1405
- }; // See also errors.js that may be registered after having registered this type.
1406
-
1407
- /* eslint-env browser, node */
1408
- /* c8 ignore next */
1575
+ };
1409
1576
 
1410
- var _global$2 = typeof self === 'undefined' ? global : self;
1577
+ /* globals InternalError */
1578
+ var errors = {};
1411
1579
 
1412
- var errors = {}; // Comprises all built-in errors.
1580
+ // JS standard
1581
+ [TypeError, RangeError, SyntaxError, ReferenceError, EvalError, URIError].forEach(function (error) {
1582
+ return create$2(error);
1583
+ });
1413
1584
 
1414
- ['TypeError', 'RangeError', 'SyntaxError', 'ReferenceError', 'EvalError', 'URIError', 'InternalError' // non-standard
1415
- ].forEach(function (errName) {
1416
- var Cnstrctr = _global$2[errName];
1585
+ /* c8 ignore next 2 */
1586
+ // @ts-ignore Non-standard
1587
+ typeof InternalError === 'function' && create$2(InternalError);
1417
1588
 
1418
- if (Cnstrctr) {
1419
- errors[errName.toLowerCase()] = {
1420
- test: function test(x) {
1421
- return hasConstructorOf(x, Cnstrctr);
1422
- },
1423
- replace: function replace(e) {
1424
- return e.message;
1425
- },
1426
- revive: function revive(message) {
1427
- return new Cnstrctr(message);
1428
- }
1429
- };
1430
- }
1431
- });
1589
+ /**
1590
+ * Comprises all built-in errors.
1591
+ * @param {
1592
+ * TypeError|RangeError|SyntaxError|ReferenceError|EvalError|URIError|
1593
+ * InternalError
1594
+ * } Ctor
1595
+ * @returns {void}
1596
+ */
1597
+ function create$2(Ctor) {
1598
+ errors[Ctor.name.toLowerCase()] = {
1599
+ test: function test(x) {
1600
+ return hasConstructorOf(x, Ctor);
1601
+ },
1602
+ replace: function replace(e) {
1603
+ return e.message;
1604
+ },
1605
+ revive: function revive(message) {
1606
+ return new Ctor(message);
1607
+ }
1608
+ };
1609
+ }
1432
1610
 
1433
1611
  /* globals XMLHttpRequest, File, FileReader */
1434
1612
  var file = {
@@ -1441,15 +1619,13 @@
1441
1619
  var req = new XMLHttpRequest();
1442
1620
  req.overrideMimeType('text/plain; charset=x-user-defined');
1443
1621
  req.open('GET', URL.createObjectURL(f), false); // Sync
1622
+ req.send();
1444
1623
 
1445
- req.send(); // Seems not feasible to accurately simulate
1446
-
1624
+ // Seems not feasible to accurately simulate
1447
1625
  /* c8 ignore next 3 */
1448
-
1449
1626
  if (req.status !== 200 && req.status !== 0) {
1450
1627
  throw new Error('Bad File access: ' + req.status);
1451
1628
  }
1452
-
1453
1629
  return {
1454
1630
  type: f.type,
1455
1631
  stringContents: req.responseText,
@@ -1459,9 +1635,9 @@
1459
1635
  },
1460
1636
  revive: function revive(_ref) {
1461
1637
  var name = _ref.name,
1462
- type = _ref.type,
1463
- stringContents = _ref.stringContents,
1464
- lastModified = _ref.lastModified;
1638
+ type = _ref.type,
1639
+ stringContents = _ref.stringContents,
1640
+ lastModified = _ref.lastModified;
1465
1641
  return new File([string2arraybuffer(stringContents)], name, {
1466
1642
  type: type,
1467
1643
  lastModified: lastModified
@@ -1483,10 +1659,9 @@
1483
1659
  name: f.name,
1484
1660
  lastModified: f.lastModified
1485
1661
  });
1486
- }); // Seems not feasible to accurately simulate
1487
-
1662
+ });
1663
+ // Seems not feasible to accurately simulate
1488
1664
  /* c8 ignore next 3 */
1489
-
1490
1665
  reader.addEventListener('error', function () {
1491
1666
  reject(reader.error);
1492
1667
  });
@@ -1504,11 +1679,9 @@
1504
1679
  },
1505
1680
  replace: function replace(fl) {
1506
1681
  var arr = [];
1507
-
1508
1682
  for (var i = 0; i < fl.length; i++) {
1509
1683
  arr[i] = fl.item(i);
1510
1684
  }
1511
-
1512
1685
  return arr;
1513
1686
  },
1514
1687
  revive: function revive(o) {
@@ -1521,7 +1694,6 @@
1521
1694
  */
1522
1695
  function FileList() {
1523
1696
  _classCallCheck$1(this, FileList);
1524
-
1525
1697
  // eslint-disable-next-line prefer-rest-params
1526
1698
  this._files = arguments[0];
1527
1699
  this.length = this._files.length;
@@ -1530,19 +1702,15 @@
1530
1702
  * @param {Integer} index
1531
1703
  * @returns {File}
1532
1704
  */
1533
-
1534
-
1535
1705
  _createClass$1(FileList, [{
1536
1706
  key: "item",
1537
1707
  value: function item(index) {
1538
1708
  return this._files[index];
1539
1709
  }
1540
1710
  /* eslint-disable class-methods-use-this */
1541
-
1542
1711
  /**
1543
1712
  * @returns {"FileList"}
1544
1713
  */
1545
-
1546
1714
  }, {
1547
1715
  key: _Symbol$toStringTag,
1548
1716
  get: function get() {
@@ -1550,10 +1718,8 @@
1550
1718
  return 'FileList';
1551
1719
  }
1552
1720
  }]);
1553
-
1554
1721
  return FileList;
1555
1722
  }(Symbol.toStringTag);
1556
-
1557
1723
  return new FileList(o);
1558
1724
  }
1559
1725
  }
@@ -1563,20 +1729,21 @@
1563
1729
  var imagebitmap = {
1564
1730
  imagebitmap: {
1565
1731
  test: function test(x) {
1566
- return toStringTag(x) === 'ImageBitmap' || // In Node, our polyfill sets the dataset on a canvas
1732
+ return toStringTag(x) === 'ImageBitmap' ||
1733
+ // In Node, our polyfill sets the dataset on a canvas
1567
1734
  // element as JSDom no longer allows overriding toStringTag
1568
1735
  x && x.dataset && x.dataset.toStringTag === 'ImageBitmap';
1569
1736
  },
1570
1737
  replace: function replace(bm) {
1571
1738
  var canvas = document.createElement('canvas');
1572
1739
  var ctx = canvas.getContext('2d');
1573
- ctx.drawImage(bm, 0, 0); // Although `width` and `height` are part of `ImageBitMap`,
1740
+ ctx.drawImage(bm, 0, 0);
1741
+ // Although `width` and `height` are part of `ImageBitMap`,
1574
1742
  // these will be auto-created for us when reviving with the
1575
1743
  // data URL (and they are not settable even if they weren't)
1576
1744
  // return {
1577
1745
  // width: bm.width, height: bm.height, dataURL: canvas.toDataURL()
1578
1746
  // };
1579
-
1580
1747
  return canvas.toDataURL();
1581
1748
  },
1582
1749
  revive: function revive(o) {
@@ -1591,26 +1758,25 @@
1591
1758
  */
1592
1759
  var canvas = document.createElement('canvas');
1593
1760
  var ctx = canvas.getContext('2d');
1594
- var img = document.createElement('img'); // The onload is needed by some browsers per http://stackoverflow.com/a/4776378/271577
1595
-
1761
+ var img = document.createElement('img');
1762
+ // The onload is needed by some browsers per http://stackoverflow.com/a/4776378/271577
1596
1763
  img.addEventListener('load', function () {
1597
1764
  ctx.drawImage(img, 0, 0);
1598
1765
  });
1599
- img.src = o; // Works in contexts allowing an `ImageBitmap` (We might use
1766
+ img.src = o;
1767
+ // Works in contexts allowing an `ImageBitmap` (We might use
1600
1768
  // `OffscreenCanvas.transferToBitmap` when supported)
1601
-
1602
1769
  return canvas;
1603
1770
  },
1604
1771
  reviveAsync: function reviveAsync(o) {
1605
1772
  var canvas = document.createElement('canvas');
1606
1773
  var ctx = canvas.getContext('2d');
1607
- var img = document.createElement('img'); // The onload is needed by some browsers per http://stackoverflow.com/a/4776378/271577
1608
-
1774
+ var img = document.createElement('img');
1775
+ // The onload is needed by some browsers per http://stackoverflow.com/a/4776378/271577
1609
1776
  img.addEventListener('load', function () {
1610
1777
  ctx.drawImage(img, 0, 0);
1611
1778
  });
1612
1779
  img.src = o; // o.dataURL;
1613
-
1614
1780
  return createImageBitmap(canvas); // Returns a promise
1615
1781
  }
1616
1782
  }
@@ -1733,12 +1899,14 @@
1733
1899
  var nonbuiltinIgnore = {
1734
1900
  nonbuiltinIgnore: {
1735
1901
  test: function test(x) {
1736
- return x && _typeof$1(x) === 'object' && !Array.isArray(x) && !['Object', // `Proxy` and `Reflect`, two other built-in objects, will also
1902
+ return x && _typeof$1(x) === 'object' && !Array.isArray(x) && !['Object',
1903
+ // `Proxy` and `Reflect`, two other built-in objects, will also
1737
1904
  // have a `toStringTag` of `Object`; we don't want built-in
1738
1905
  // function objects, however
1739
1906
  'Boolean', 'Number', 'String', 'Error', 'RegExp', 'Math', 'Date', 'Map', 'Set', 'JSON', 'ArrayBuffer', 'SharedArrayBuffer', 'DataView', 'Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array', 'Promise', 'String Iterator', 'Array Iterator', 'Map Iterator', 'Set Iterator', 'WeakMap', 'WeakSet', 'Atomics', 'Module'].includes(toStringTag(x));
1740
1907
  },
1741
- replace: function replace(rexp) {// Not in use
1908
+ replace: function replace(rexp) {
1909
+ // Not in use
1742
1910
  }
1743
1911
  }
1744
1912
  };
@@ -1749,23 +1917,18 @@
1749
1917
  test: function test(x) {
1750
1918
  return toStringTag(x) === 'String' && _typeof$1(x) === 'object';
1751
1919
  },
1752
- replace: function replace(s) {
1753
- return String(s);
1754
- },
1920
+ replace: String,
1755
1921
  // convert to primitive string
1756
1922
  revive: function revive(s) {
1757
1923
  return new String(s);
1758
1924
  } // Revive to an objectified string
1759
-
1760
1925
  },
1761
1926
  // Boolean Object (not primitive boolean which need no type spec)
1762
1927
  BooleanObject: {
1763
1928
  test: function test(x) {
1764
1929
  return toStringTag(x) === 'Boolean' && _typeof$1(x) === 'object';
1765
1930
  },
1766
- replace: function replace(b) {
1767
- return Boolean(b);
1768
- },
1931
+ replace: Boolean,
1769
1932
  // convert to primitive boolean
1770
1933
  revive: function revive(b) {
1771
1934
  // Revive to an objectified Boolean
@@ -1777,14 +1940,11 @@
1777
1940
  test: function test(x) {
1778
1941
  return toStringTag(x) === 'Number' && _typeof$1(x) === 'object';
1779
1942
  },
1780
- replace: function replace(n) {
1781
- return Number(n);
1782
- },
1943
+ replace: Number,
1783
1944
  // convert to primitive number
1784
1945
  revive: function revive(n) {
1785
1946
  return new Number(n);
1786
1947
  } // Revive to an objectified number
1787
-
1788
1948
  }
1789
1949
  };
1790
1950
 
@@ -1801,7 +1961,7 @@
1801
1961
  },
1802
1962
  revive: function revive(_ref) {
1803
1963
  var source = _ref.source,
1804
- flags = _ref.flags;
1964
+ flags = _ref.flags;
1805
1965
  return new RegExp(source, flags);
1806
1966
  }
1807
1967
  }
@@ -1839,27 +1999,26 @@
1839
1999
  };
1840
2000
 
1841
2001
  /* eslint-env browser, node */
1842
- /* c8 ignore next */
1843
-
1844
- var _global$1 = typeof self === 'undefined' ? global : self; // Support all kinds of typed arrays (views of ArrayBuffers)
1845
-
1846
2002
 
2003
+ // Support all kinds of typed arrays (views of ArrayBuffers)
1847
2004
  var typedArraysSocketIO = {};
1848
- ['Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array'].forEach(function (typeName) {
1849
- var arrType = typeName;
1850
- var TypedArray = _global$1[typeName];
1851
- /* c8 ignore next 3 */
1852
-
1853
- if (!TypedArray) {
1854
- return;
1855
- }
1856
2005
 
2006
+ /**
2007
+ * @param {
2008
+ * Int8Array|Uint8Array|Uint8ClampedArray|Int16Array|Uint16Array|Int32Array|
2009
+ * Uint32Array|Float32Array|Float64Array
2010
+ * } TypedArray
2011
+ * @returns {void}
2012
+ */
2013
+ function create$1(TypedArray) {
2014
+ var typeName = TypedArray.name;
1857
2015
  typedArraysSocketIO[typeName.toLowerCase()] = {
1858
2016
  test: function test(x) {
1859
- return toStringTag(x) === arrType;
2017
+ return toStringTag(x) === typeName;
1860
2018
  },
1861
2019
  replace: function replace(a) {
1862
- return (a.byteOffset === 0 && a.byteLength === a.buffer.byteLength ? a // socket.io supports streaming ArrayBuffers.
2020
+ return (a.byteOffset === 0 && a.byteLength === a.buffer.byteLength ? a
2021
+ // socket.io supports streaming ArrayBuffers.
1863
2022
  // If we have a typed array representing a portion
1864
2023
  // of the buffer, we need to clone
1865
2024
  // the buffer before leaving it to socket.io.
@@ -1875,38 +2034,40 @@
1875
2034
  return toStringTag(buf) === 'ArrayBuffer' ? new TypedArray(buf) : buf;
1876
2035
  }
1877
2036
  };
1878
- });
1879
-
1880
- /* eslint-env browser, node */
1881
- /* c8 ignore next */
2037
+ }
2038
+ if (typeof Int8Array === 'function') {
2039
+ // Those constructors are added in ES6 as a group.
2040
+ // If we have Int8Array, we can assume the rest also exists.
1882
2041
 
1883
- var _global = typeof self === 'undefined' ? global : self;
2042
+ [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].forEach(function (TypedArray) {
2043
+ return create$1(TypedArray);
2044
+ });
2045
+ }
1884
2046
 
2047
+ /* eslint-env browser, node */
1885
2048
  var typedArrays = {};
1886
- ['Int8Array', 'Uint8Array', 'Uint8ClampedArray', 'Int16Array', 'Uint16Array', 'Int32Array', 'Uint32Array', 'Float32Array', 'Float64Array'].forEach(function (typeName) {
1887
- var arrType = typeName;
1888
- var TypedArray = _global[arrType];
1889
- /* c8 ignore next 3 */
1890
-
1891
- if (!TypedArray) {
1892
- return;
1893
- }
1894
2049
 
2050
+ /**
2051
+ * @param {
2052
+ * Int8Array|Uint8Array|Uint8ClampedArray|Int16Array|Uint16Array|Int32Array|
2053
+ * Uint32Array|Float32Array|Float64Array
2054
+ * } TypedArray
2055
+ * @returns {void}
2056
+ */
2057
+ function create(TypedArray) {
2058
+ var typeName = TypedArray.name;
1895
2059
  typedArrays[typeName.toLowerCase()] = {
1896
2060
  test: function test(x) {
1897
- return toStringTag(x) === arrType;
2061
+ return toStringTag(x) === typeName;
1898
2062
  },
1899
2063
  replace: function replace(_ref, stateObj) {
1900
2064
  var buffer = _ref.buffer,
1901
- byteOffset = _ref.byteOffset,
1902
- l = _ref.length;
1903
-
2065
+ byteOffset = _ref.byteOffset,
2066
+ l = _ref.length;
1904
2067
  if (!stateObj.buffers) {
1905
2068
  stateObj.buffers = [];
1906
2069
  }
1907
-
1908
2070
  var index = stateObj.buffers.indexOf(buffer);
1909
-
1910
2071
  if (index > -1) {
1911
2072
  return {
1912
2073
  index: index,
@@ -1914,7 +2075,6 @@
1914
2075
  length: l
1915
2076
  };
1916
2077
  }
1917
-
1918
2078
  stateObj.buffers.push(buffer);
1919
2079
  return {
1920
2080
  encoded: encode(buffer),
@@ -1926,24 +2086,28 @@
1926
2086
  if (!stateObj.buffers) {
1927
2087
  stateObj.buffers = [];
1928
2088
  }
1929
-
1930
2089
  var byteOffset = b64Obj.byteOffset,
1931
- len = b64Obj.length,
1932
- encoded = b64Obj.encoded,
1933
- index = b64Obj.index;
2090
+ len = b64Obj.length,
2091
+ encoded = b64Obj.encoded,
2092
+ index = b64Obj.index;
1934
2093
  var buffer;
1935
-
1936
2094
  if ('index' in b64Obj) {
1937
2095
  buffer = stateObj.buffers[index];
1938
2096
  } else {
1939
2097
  buffer = decode(encoded);
1940
2098
  stateObj.buffers.push(buffer);
1941
2099
  }
1942
-
1943
2100
  return new TypedArray(buffer, byteOffset, len);
1944
2101
  }
1945
2102
  };
1946
- });
2103
+ }
2104
+ if (typeof Int8Array === 'function') {
2105
+ // Those constructors are added in ES6 as a group.
2106
+ // If we have Int8Array, we can assume the rest also exists.
2107
+ [Int8Array, Uint8Array, Uint8ClampedArray, Int16Array, Uint16Array, Int32Array, Uint32Array, Float32Array, Float64Array].forEach(function (TypedArray) {
2108
+ return create(TypedArray);
2109
+ });
2110
+ }
1947
2111
 
1948
2112
  // This does not preserve `undefined` in sparse arrays; see the `undef`
1949
2113
  var undef$1 = {
@@ -1981,7 +2145,8 @@
1981
2145
  testPlainObjects: true,
1982
2146
  test: function test(x, stateObj) {
1983
2147
  if (Array.isArray(x)) {
1984
- if ( // By avoiding serializing arrays into objects which
2148
+ if (
2149
+ // By avoiding serializing arrays into objects which
1985
2150
  // have only positive-integer keys, we reduce
1986
2151
  // size and improve revival performance; arrays with
1987
2152
  // non-index keys will be larger however
@@ -1998,10 +2163,8 @@
1998
2163
  stateObj.iterateIn = 'object';
1999
2164
  stateObj.addLength = true;
2000
2165
  }
2001
-
2002
2166
  return true;
2003
2167
  }
2004
-
2005
2168
  return false;
2006
2169
  },
2007
2170
  replace: function replace(a, stateObj) {
@@ -2013,12 +2176,11 @@
2013
2176
  if (Array.isArray(o)) {
2014
2177
  return o;
2015
2178
  }
2016
-
2017
- var arr = []; // No map here as may be a sparse array (including
2179
+ var arr = [];
2180
+ // No map here as may be a sparse array (including
2018
2181
  // with `length` set)
2019
2182
  // Todo: Reenable when Node `engines` >= 7
2020
2183
  // Object.entries(o).forEach(([key, val]) => {
2021
-
2022
2184
  Object.keys(o).forEach(function (key) {
2023
2185
  var val = o[key];
2024
2186
  arr[key] = val;
@@ -2037,7 +2199,6 @@
2037
2199
  revive: function revive(s) {
2038
2200
  return undefined;
2039
2201
  } // Will avoid adding anything
2040
-
2041
2202
  }
2042
2203
  }];
2043
2204
 
@@ -2058,22 +2219,17 @@
2058
2219
 
2059
2220
  Symbols are similarly not included.
2060
2221
  */
2061
- var expObj$1 = [undef$1, // ES5
2062
- arrayNonindexKeys, primitiveObjects, specialNumbers, date, error, errors, regexp].concat( // ES2015 (ES6)
2063
-
2064
- /* c8 ignore next */
2065
- typeof Map === 'function' ? map : [],
2066
- /* c8 ignore next */
2067
- typeof Set === 'function' ? set : [],
2068
- /* c8 ignore next */
2069
- typeof ArrayBuffer === 'function' ? arraybuffer : [],
2070
- /* c8 ignore next */
2071
- typeof Uint8Array === 'function' ? typedArrays : [],
2072
- /* c8 ignore next */
2073
- typeof DataView === 'function' ? dataview : [],
2074
- /* c8 ignore next */
2075
- typeof Intl !== 'undefined' ? intlTypes : [],
2222
+ var expObj$1 = [undef$1,
2223
+ // ES5
2224
+ arrayNonindexKeys, primitiveObjects, specialNumbers, date, error, errors, regexp].concat(
2225
+ // ES2015 (ES6)
2076
2226
  /* c8 ignore next */
2227
+ typeof Map === 'function' ? map : [], /* c8 ignore next */
2228
+ typeof Set === 'function' ? set : [], /* c8 ignore next */
2229
+ typeof ArrayBuffer === 'function' ? arraybuffer : [], /* c8 ignore next */
2230
+ typeof Uint8Array === 'function' ? typedArrays : [], /* c8 ignore next */
2231
+ typeof DataView === 'function' ? dataview : [], /* c8 ignore next */
2232
+ typeof Intl !== 'undefined' ? intlTypes : [], /* c8 ignore next */
2077
2233
  typeof BigInt !== 'undefined' ? [bigint, bigintObject] : []);
2078
2234
 
2079
2235
  /*
@@ -2093,10 +2249,12 @@
2093
2249
  */
2094
2250
  var postmessage = [error, errors];
2095
2251
 
2096
- var socketio = [expObj$1, // Leave ArrayBuffer as is, and let socket.io stream it instead.
2252
+ var socketio = [expObj$1,
2253
+ // Leave ArrayBuffer as is, and let socket.io stream it instead.
2097
2254
  {
2098
2255
  arraybuffer: null
2099
- }, // Encapsulate TypedArrays in ArrayBuffers instead of base64 strings.
2256
+ },
2257
+ // Encapsulate TypedArrays in ArrayBuffers instead of base64 strings.
2100
2258
  typedArraysSocketIO];
2101
2259
 
2102
2260
  var sparseUndefined = [{
@@ -2121,34 +2279,31 @@
2121
2279
  revive: function revive(s) {
2122
2280
  return undefined;
2123
2281
  } // Will avoid adding anything
2124
-
2125
2282
  }
2126
2283
  }];
2127
2284
 
2128
2285
  /* This preset includes types for the Structured Cloning Algorithm. */
2129
- var expObj = [// Todo: Might also register synchronous `ImageBitmap` and
2286
+ var expObj = [
2287
+ // Todo: Might also register synchronous `ImageBitmap` and
2130
2288
  // `Blob`/`File`/`FileList`?
2131
2289
  // ES5
2132
- userObject, // Processed last (non-builtin)
2133
- undef$1, arrayNonindexKeys, primitiveObjects, specialNumbers, date, regexp, // Non-built-ins
2134
- imagedata, imagebitmap, // Async return
2135
- file, filelist, blob].concat( // ES2015 (ES6)
2136
-
2137
- /* c8 ignore next */
2138
- typeof Map === 'function' ? map : [],
2139
- /* c8 ignore next */
2140
- typeof Set === 'function' ? set : [],
2141
- /* c8 ignore next */
2142
- typeof ArrayBuffer === 'function' ? arraybuffer : [],
2143
- /* c8 ignore next */
2144
- typeof Uint8Array === 'function' ? typedArrays : [],
2145
- /* c8 ignore next */
2146
- typeof DataView === 'function' ? dataview : [],
2147
- /* c8 ignore next */
2148
- typeof Intl !== 'undefined' ? intlTypes : [],
2149
- /* c8 ignore next */
2150
- typeof crypto !== 'undefined' ? cryptokey : [],
2290
+ userObject,
2291
+ // Processed last (non-builtin)
2292
+
2293
+ undef$1, arrayNonindexKeys, primitiveObjects, specialNumbers, date, regexp,
2294
+ // Non-built-ins
2295
+ imagedata, imagebitmap,
2296
+ // Async return
2297
+ file, filelist, blob].concat(
2298
+ // ES2015 (ES6)
2151
2299
  /* c8 ignore next */
2300
+ typeof Map === 'function' ? map : [], /* c8 ignore next */
2301
+ typeof Set === 'function' ? set : [], /* c8 ignore next */
2302
+ typeof ArrayBuffer === 'function' ? arraybuffer : [], /* c8 ignore next */
2303
+ typeof Uint8Array === 'function' ? typedArrays : [], /* c8 ignore next */
2304
+ typeof DataView === 'function' ? dataview : [], /* c8 ignore next */
2305
+ typeof Intl !== 'undefined' ? intlTypes : [], /* c8 ignore next */
2306
+ typeof crypto !== 'undefined' ? cryptokey : [], /* c8 ignore next */
2152
2307
  typeof BigInt !== 'undefined' ? [bigint, bigintObject] : []);
2153
2308
 
2154
2309
  var structuredCloningThrowing = expObj.concat({
@@ -2175,34 +2330,43 @@
2175
2330
  // Note: There is no apparent way for us to detect a `Proxy` and
2176
2331
  // reject (Chrome at least is not rejecting anyways)
2177
2332
  var stringTag = {}.toString.call(val).slice(8, -1);
2178
-
2179
- if ([// Symbol's `toStringTag` is only "Symbol" for its initial
2333
+ if ([
2334
+ // Symbol's `toStringTag` is only "Symbol" for its initial
2180
2335
  // value, so we check `typeof`
2181
- 'symbol', // All functions including bound function exotic objects
2182
- 'function'].includes(_typeof$1(val)) || [// A non-array exotic object
2183
- 'Arguments', // A non-array exotic object
2184
- 'Module', // `Error` and other errors have the [[ErrorData]] internal
2336
+ 'symbol',
2337
+ // All functions including bound function exotic objects
2338
+ 'function'].includes(_typeof$1(val)) || [
2339
+ // A non-array exotic object
2340
+ 'Arguments',
2341
+ // A non-array exotic object
2342
+ 'Module',
2343
+ // `Error` and other errors have the [[ErrorData]] internal
2185
2344
  // slot and give "Error"
2186
- 'Error', // Promise instances have an extra slot ([[PromiseState]])
2345
+ 'Error',
2346
+ // Promise instances have an extra slot ([[PromiseState]])
2187
2347
  // but not throwing in Chrome `postMessage`
2188
- 'Promise', // WeakMap instances have an extra slot ([[WeakMapData]])
2348
+ 'Promise',
2349
+ // WeakMap instances have an extra slot ([[WeakMapData]])
2189
2350
  // but not throwing in Chrome `postMessage`
2190
- 'WeakMap', // WeakSet instances have an extra slot ([[WeakSetData]])
2351
+ 'WeakMap',
2352
+ // WeakSet instances have an extra slot ([[WeakSetData]])
2191
2353
  // but not throwing in Chrome `postMessage`
2192
- 'WeakSet', // HTML-SPECIFIC
2193
- 'Event', // Also in Node `worker_threads` (currently experimental)
2354
+ 'WeakSet',
2355
+ // HTML-SPECIFIC
2356
+ 'Event',
2357
+ // Also in Node `worker_threads` (currently experimental)
2194
2358
  'MessageChannel'].includes(stringTag) ||
2195
2359
  /*
2196
2360
  // isClosed is no longer documented
2197
2361
  ((stringTag === 'Blob' || stringTag === 'File') &&
2198
2362
  val.isClosed) ||
2199
2363
  */
2200
- val && _typeof$1(val) === 'object' && // Duck-type DOM node objects (non-array exotic?
2364
+ val && _typeof$1(val) === 'object' &&
2365
+ // Duck-type DOM node objects (non-array exotic?
2201
2366
  // objects which cannot be cloned by the SCA)
2202
2367
  typeof val.nodeType === 'number' && typeof val.insertBefore === 'function') {
2203
2368
  throw new DOMException('The object cannot be cloned.', 'DataCloneError');
2204
2369
  }
2205
-
2206
2370
  return false;
2207
2371
  }
2208
2372
  }
@@ -2210,11 +2374,12 @@
2210
2374
 
2211
2375
  var undef = [sparseUndefined, undef$1];
2212
2376
 
2213
- var universal = [expObj$1 // TODO: Add types that are de-facto universal even though not
2377
+ var universal = [expObj$1
2378
+ // TODO: Add types that are de-facto universal even though not
2214
2379
  // built-in into ecmasript standard.
2215
2380
  ];
2216
2381
 
2217
- exports.JSON_TYPES = y;
2382
+ exports.JSON_TYPES = l;
2218
2383
  exports.Typeson = u;
2219
2384
  exports.TypesonPromise = e;
2220
2385
  exports.Undefined = p;
@@ -2268,7 +2433,5 @@
2268
2433
  exports.universal = universal;
2269
2434
  exports.userObject = userObject;
2270
2435
 
2271
- Object.defineProperty(exports, '__esModule', { value: true });
2272
-
2273
2436
  }));
2274
2437
  //# sourceMappingURL=index.umd.js.map