@bigbinary/neeto-commons-frontend 2.0.28 → 2.0.30

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.
package/utils.js CHANGED
@@ -26,42 +26,36 @@ function _arrayWithHoles(arr) {
26
26
  }
27
27
 
28
28
  function _iterableToArrayLimit(arr, i) {
29
- var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
30
-
31
- if (_i == null) return;
32
- var _arr = [];
33
- var _n = true;
34
- var _d = false;
35
-
36
- var _s, _e;
37
-
38
- try {
39
- for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
40
- _arr.push(_s.value);
41
-
42
- if (i && _arr.length === i) break;
43
- }
44
- } catch (err) {
45
- _d = true;
46
- _e = err;
47
- } finally {
29
+ var _i = null == arr ? null : "undefined" != typeof Symbol && arr[Symbol.iterator] || arr["@@iterator"];
30
+ if (null != _i) {
31
+ var _s,
32
+ _e,
33
+ _x,
34
+ _r,
35
+ _arr = [],
36
+ _n = !0,
37
+ _d = !1;
48
38
  try {
49
- if (!_n && _i["return"] != null) _i["return"]();
39
+ if (_x = (_i = _i.call(arr)).next, 0 === i) {
40
+ if (Object(_i) !== _i) return;
41
+ _n = !1;
42
+ } else for (; !(_n = (_s = _x.call(_i)).done) && (_arr.push(_s.value), _arr.length !== i); _n = !0);
43
+ } catch (err) {
44
+ _d = !0, _e = err;
50
45
  } finally {
51
- if (_d) throw _e;
46
+ try {
47
+ if (!_n && null != _i["return"] && (_r = _i["return"](), Object(_r) !== _r)) return;
48
+ } finally {
49
+ if (_d) throw _e;
50
+ }
52
51
  }
52
+ return _arr;
53
53
  }
54
-
55
- return _arr;
56
54
  }
57
55
 
58
56
  function _arrayLikeToArray(arr, len) {
59
57
  if (len == null || len > arr.length) len = arr.length;
60
-
61
- for (var i = 0, arr2 = new Array(len); i < len; i++) {
62
- arr2[i] = arr[i];
63
- }
64
-
58
+ for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i];
65
59
  return arr2;
66
60
  }
67
61
 
@@ -90,35 +84,57 @@ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
90
84
  reject(error);
91
85
  return;
92
86
  }
93
-
94
87
  if (info.done) {
95
88
  resolve(value);
96
89
  } else {
97
90
  Promise.resolve(value).then(_next, _throw);
98
91
  }
99
92
  }
100
-
101
93
  function _asyncToGenerator(fn) {
102
94
  return function () {
103
95
  var self = this,
104
- args = arguments;
96
+ args = arguments;
105
97
  return new Promise(function (resolve, reject) {
106
98
  var gen = fn.apply(self, args);
107
-
108
99
  function _next(value) {
109
100
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
110
101
  }
111
-
112
102
  function _throw(err) {
113
103
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
114
104
  }
115
-
116
105
  _next(undefined);
117
106
  });
118
107
  };
119
108
  }
120
109
 
110
+ function _typeof$1(obj) {
111
+ "@babel/helpers - typeof";
112
+
113
+ return _typeof$1 = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
114
+ return typeof obj;
115
+ } : function (obj) {
116
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
117
+ }, _typeof$1(obj);
118
+ }
119
+
120
+ function _toPrimitive(input, hint) {
121
+ if (_typeof$1(input) !== "object" || input === null) return input;
122
+ var prim = input[Symbol.toPrimitive];
123
+ if (prim !== undefined) {
124
+ var res = prim.call(input, hint || "default");
125
+ if (_typeof$1(res) !== "object") return res;
126
+ throw new TypeError("@@toPrimitive must return a primitive value.");
127
+ }
128
+ return (hint === "string" ? String : Number)(input);
129
+ }
130
+
131
+ function _toPropertyKey(arg) {
132
+ var key = _toPrimitive(arg, "string");
133
+ return _typeof$1(key) === "symbol" ? key : String(key);
134
+ }
135
+
121
136
  function _defineProperty(obj, key, value) {
137
+ key = _toPropertyKey(key);
122
138
  if (key in obj) {
123
139
  Object.defineProperty(obj, key, {
124
140
  value: value,
@@ -129,13 +145,12 @@ function _defineProperty(obj, key, value) {
129
145
  } else {
130
146
  obj[key] = value;
131
147
  }
132
-
133
148
  return obj;
134
149
  }
135
150
 
136
151
  var regeneratorRuntime$1 = {exports: {}};
137
152
 
138
- var _typeof$1 = {exports: {}};
153
+ var _typeof = {exports: {}};
139
154
 
140
155
  (function (module) {
141
156
  function _typeof(obj) {
@@ -147,27 +162,25 @@ var _typeof$1 = {exports: {}};
147
162
  return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
148
163
  }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
149
164
  }
150
-
151
165
  module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
152
- } (_typeof$1));
166
+ } (_typeof));
153
167
 
154
168
  (function (module) {
155
- var _typeof = _typeof$1.exports["default"];
156
-
169
+ var _typeof$1 = _typeof.exports["default"];
157
170
  function _regeneratorRuntime() {
158
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
159
-
160
171
  module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
161
172
  return exports;
162
173
  }, module.exports.__esModule = true, module.exports["default"] = module.exports;
163
174
  var exports = {},
164
- Op = Object.prototype,
165
- hasOwn = Op.hasOwnProperty,
166
- $Symbol = "function" == typeof Symbol ? Symbol : {},
167
- iteratorSymbol = $Symbol.iterator || "@@iterator",
168
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
169
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
170
-
175
+ Op = Object.prototype,
176
+ hasOwn = Op.hasOwnProperty,
177
+ defineProperty = Object.defineProperty || function (obj, key, desc) {
178
+ obj[key] = desc.value;
179
+ },
180
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
181
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
182
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
183
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
171
184
  function define(obj, key, value) {
172
185
  return Object.defineProperty(obj, key, {
173
186
  value: value,
@@ -176,7 +189,6 @@ var _typeof$1 = {exports: {}};
176
189
  writable: !0
177
190
  }), obj[key];
178
191
  }
179
-
180
192
  try {
181
193
  define({}, "");
182
194
  } catch (err) {
@@ -184,54 +196,14 @@ var _typeof$1 = {exports: {}};
184
196
  return obj[key] = value;
185
197
  };
186
198
  }
187
-
188
199
  function wrap(innerFn, outerFn, self, tryLocsList) {
189
200
  var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
190
- generator = Object.create(protoGenerator.prototype),
191
- context = new Context(tryLocsList || []);
192
- return generator._invoke = function (innerFn, self, context) {
193
- var state = "suspendedStart";
194
- return function (method, arg) {
195
- if ("executing" === state) throw new Error("Generator is already running");
196
-
197
- if ("completed" === state) {
198
- if ("throw" === method) throw arg;
199
- return doneResult();
200
- }
201
-
202
- for (context.method = method, context.arg = arg;;) {
203
- var delegate = context.delegate;
204
-
205
- if (delegate) {
206
- var delegateResult = maybeInvokeDelegate(delegate, context);
207
-
208
- if (delegateResult) {
209
- if (delegateResult === ContinueSentinel) continue;
210
- return delegateResult;
211
- }
212
- }
213
-
214
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
215
- if ("suspendedStart" === state) throw state = "completed", context.arg;
216
- context.dispatchException(context.arg);
217
- } else "return" === context.method && context.abrupt("return", context.arg);
218
- state = "executing";
219
- var record = tryCatch(innerFn, self, context);
220
-
221
- if ("normal" === record.type) {
222
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
223
- return {
224
- value: record.arg,
225
- done: context.done
226
- };
227
- }
228
-
229
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
230
- }
231
- };
232
- }(innerFn, self, context), generator;
201
+ generator = Object.create(protoGenerator.prototype),
202
+ context = new Context(tryLocsList || []);
203
+ return defineProperty(generator, "_invoke", {
204
+ value: makeInvokeMethod(innerFn, self, context)
205
+ }), generator;
233
206
  }
234
-
235
207
  function tryCatch(fn, obj, arg) {
236
208
  try {
237
209
  return {
@@ -245,25 +217,19 @@ var _typeof$1 = {exports: {}};
245
217
  };
246
218
  }
247
219
  }
248
-
249
220
  exports.wrap = wrap;
250
221
  var ContinueSentinel = {};
251
-
252
222
  function Generator() {}
253
-
254
223
  function GeneratorFunction() {}
255
-
256
224
  function GeneratorFunctionPrototype() {}
257
-
258
225
  var IteratorPrototype = {};
259
226
  define(IteratorPrototype, iteratorSymbol, function () {
260
227
  return this;
261
228
  });
262
229
  var getProto = Object.getPrototypeOf,
263
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
230
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
264
231
  NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
265
232
  var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
266
-
267
233
  function defineIteratorMethods(prototype) {
268
234
  ["next", "throw", "return"].forEach(function (method) {
269
235
  define(prototype, method, function (arg) {
@@ -271,15 +237,13 @@ var _typeof$1 = {exports: {}};
271
237
  });
272
238
  });
273
239
  }
274
-
275
240
  function AsyncIterator(generator, PromiseImpl) {
276
241
  function invoke(method, arg, resolve, reject) {
277
242
  var record = tryCatch(generator[method], generator, arg);
278
-
279
243
  if ("throw" !== record.type) {
280
244
  var result = record.arg,
281
- value = result.value;
282
- return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
245
+ value = result.value;
246
+ return value && "object" == _typeof$1(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
283
247
  invoke("next", value, resolve, reject);
284
248
  }, function (err) {
285
249
  invoke("throw", err, resolve, reject);
@@ -289,92 +253,109 @@ var _typeof$1 = {exports: {}};
289
253
  return invoke("throw", error, resolve, reject);
290
254
  });
291
255
  }
292
-
293
256
  reject(record.arg);
294
257
  }
295
-
296
258
  var previousPromise;
297
-
298
- this._invoke = function (method, arg) {
299
- function callInvokeWithMethodAndArg() {
300
- return new PromiseImpl(function (resolve, reject) {
301
- invoke(method, arg, resolve, reject);
302
- });
259
+ defineProperty(this, "_invoke", {
260
+ value: function value(method, arg) {
261
+ function callInvokeWithMethodAndArg() {
262
+ return new PromiseImpl(function (resolve, reject) {
263
+ invoke(method, arg, resolve, reject);
264
+ });
265
+ }
266
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
267
+ }
268
+ });
269
+ }
270
+ function makeInvokeMethod(innerFn, self, context) {
271
+ var state = "suspendedStart";
272
+ return function (method, arg) {
273
+ if ("executing" === state) throw new Error("Generator is already running");
274
+ if ("completed" === state) {
275
+ if ("throw" === method) throw arg;
276
+ return doneResult();
277
+ }
278
+ for (context.method = method, context.arg = arg;;) {
279
+ var delegate = context.delegate;
280
+ if (delegate) {
281
+ var delegateResult = maybeInvokeDelegate(delegate, context);
282
+ if (delegateResult) {
283
+ if (delegateResult === ContinueSentinel) continue;
284
+ return delegateResult;
285
+ }
286
+ }
287
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
288
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
289
+ context.dispatchException(context.arg);
290
+ } else "return" === context.method && context.abrupt("return", context.arg);
291
+ state = "executing";
292
+ var record = tryCatch(innerFn, self, context);
293
+ if ("normal" === record.type) {
294
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
295
+ return {
296
+ value: record.arg,
297
+ done: context.done
298
+ };
299
+ }
300
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
303
301
  }
304
-
305
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
306
302
  };
307
303
  }
308
-
309
304
  function maybeInvokeDelegate(delegate, context) {
310
- var method = delegate.iterator[context.method];
311
-
312
- if (undefined === method) {
313
- if (context.delegate = null, "throw" === context.method) {
314
- if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
315
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
316
- }
317
-
318
- return ContinueSentinel;
319
- }
320
-
305
+ var methodName = context.method,
306
+ method = delegate.iterator[methodName];
307
+ 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;
321
308
  var record = tryCatch(method, delegate.iterator, context.arg);
322
309
  if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
323
310
  var info = record.arg;
324
311
  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);
325
312
  }
326
-
327
313
  function pushTryEntry(locs) {
328
314
  var entry = {
329
315
  tryLoc: locs[0]
330
316
  };
331
317
  1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
332
318
  }
333
-
334
319
  function resetTryEntry(entry) {
335
320
  var record = entry.completion || {};
336
321
  record.type = "normal", delete record.arg, entry.completion = record;
337
322
  }
338
-
339
323
  function Context(tryLocsList) {
340
324
  this.tryEntries = [{
341
325
  tryLoc: "root"
342
326
  }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
343
327
  }
344
-
345
328
  function values(iterable) {
346
329
  if (iterable) {
347
330
  var iteratorMethod = iterable[iteratorSymbol];
348
331
  if (iteratorMethod) return iteratorMethod.call(iterable);
349
332
  if ("function" == typeof iterable.next) return iterable;
350
-
351
333
  if (!isNaN(iterable.length)) {
352
334
  var i = -1,
353
- next = function next() {
354
- for (; ++i < iterable.length;) {
355
- if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
356
- }
357
-
358
- return next.value = undefined, next.done = !0, next;
359
- };
360
-
335
+ next = function next() {
336
+ for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
337
+ return next.value = undefined, next.done = !0, next;
338
+ };
361
339
  return next.next = next;
362
340
  }
363
341
  }
364
-
365
342
  return {
366
343
  next: doneResult
367
344
  };
368
345
  }
369
-
370
346
  function doneResult() {
371
347
  return {
372
348
  value: undefined,
373
349
  done: !0
374
350
  };
375
351
  }
376
-
377
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
352
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, defineProperty(Gp, "constructor", {
353
+ value: GeneratorFunctionPrototype,
354
+ configurable: !0
355
+ }), defineProperty(GeneratorFunctionPrototype, "constructor", {
356
+ value: GeneratorFunction,
357
+ configurable: !0
358
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
378
359
  var ctor = "function" == typeof genFun && genFun.constructor;
379
360
  return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
380
361
  }, exports.mark = function (genFun) {
@@ -395,27 +376,21 @@ var _typeof$1 = {exports: {}};
395
376
  return this;
396
377
  }), define(Gp, "toString", function () {
397
378
  return "[object Generator]";
398
- }), exports.keys = function (object) {
399
- var keys = [];
400
-
401
- for (var key in object) {
402
- keys.push(key);
403
- }
404
-
379
+ }), exports.keys = function (val) {
380
+ var object = Object(val),
381
+ keys = [];
382
+ for (var key in object) keys.push(key);
405
383
  return keys.reverse(), function next() {
406
384
  for (; keys.length;) {
407
385
  var key = keys.pop();
408
386
  if (key in object) return next.value = key, next.done = !1, next;
409
387
  }
410
-
411
388
  return next.done = !0, next;
412
389
  };
413
390
  }, exports.values = values, Context.prototype = {
414
391
  constructor: Context,
415
392
  reset: function reset(skipTempReset) {
416
- 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) {
417
- "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
418
- }
393
+ 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);
419
394
  },
420
395
  stop: function stop() {
421
396
  this.done = !0;
@@ -426,20 +401,16 @@ var _typeof$1 = {exports: {}};
426
401
  dispatchException: function dispatchException(exception) {
427
402
  if (this.done) throw exception;
428
403
  var context = this;
429
-
430
404
  function handle(loc, caught) {
431
405
  return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
432
406
  }
433
-
434
407
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
435
408
  var entry = this.tryEntries[i],
436
- record = entry.completion;
409
+ record = entry.completion;
437
410
  if ("root" === entry.tryLoc) return handle("end");
438
-
439
411
  if (entry.tryLoc <= this.prev) {
440
412
  var hasCatch = hasOwn.call(entry, "catchLoc"),
441
- hasFinally = hasOwn.call(entry, "finallyLoc");
442
-
413
+ hasFinally = hasOwn.call(entry, "finallyLoc");
443
414
  if (hasCatch && hasFinally) {
444
415
  if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
445
416
  if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
@@ -455,13 +426,11 @@ var _typeof$1 = {exports: {}};
455
426
  abrupt: function abrupt(type, arg) {
456
427
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
457
428
  var entry = this.tryEntries[i];
458
-
459
429
  if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
460
430
  var finallyEntry = entry;
461
431
  break;
462
432
  }
463
433
  }
464
-
465
434
  finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
466
435
  var record = finallyEntry ? finallyEntry.completion : {};
467
436
  return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
@@ -479,19 +448,15 @@ var _typeof$1 = {exports: {}};
479
448
  "catch": function _catch(tryLoc) {
480
449
  for (var i = this.tryEntries.length - 1; i >= 0; --i) {
481
450
  var entry = this.tryEntries[i];
482
-
483
451
  if (entry.tryLoc === tryLoc) {
484
452
  var record = entry.completion;
485
-
486
453
  if ("throw" === record.type) {
487
454
  var thrown = record.arg;
488
455
  resetTryEntry(entry);
489
456
  }
490
-
491
457
  return thrown;
492
458
  }
493
459
  }
494
-
495
460
  throw new Error("illegal catch attempt");
496
461
  },
497
462
  delegateYield: function delegateYield(iterable, resultName, nextLoc) {
@@ -503,7 +468,6 @@ var _typeof$1 = {exports: {}};
503
468
  }
504
469
  }, exports;
505
470
  }
506
-
507
471
  module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
508
472
  } (regeneratorRuntime$1));
509
473
 
@@ -528,12 +492,11 @@ try {
528
492
  * @param {T} func
529
493
  * @returns {T}
530
494
  */
531
-
532
495
  var nullSafe = function nullSafe(func) {
533
- return (// @ts-ignore
496
+ return (
497
+ // @ts-ignore
534
498
  curryN(func.length, function () {
535
499
  var _ref;
536
-
537
500
  var dataArg = (_ref = func.length - 1, _ref < 0 || arguments.length <= _ref ? undefined : arguments[_ref]);
538
501
  return isNil(dataArg) ? dataArg : func.apply(void 0, arguments);
539
502
  })
@@ -542,7 +505,6 @@ var nullSafe = function nullSafe(func) {
542
505
  var getRandomInt = function getRandomInt() {
543
506
  var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.MAX_SAFE_INTEGER;
544
507
  var b = arguments.length > 1 ? arguments[1] : undefined;
545
-
546
508
  if (b) {
547
509
  a = Math.ceil(a);
548
510
  b = Math.floor(b);
@@ -550,20 +512,9 @@ var getRandomInt = function getRandomInt() {
550
512
  b = a;
551
513
  a = 0;
552
514
  }
553
-
554
515
  return Math.floor(Math.random() * (b - a) + a);
555
516
  };
556
517
 
557
- function _typeof(obj) {
558
- "@babel/helpers - typeof";
559
-
560
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
561
- return typeof obj;
562
- } : function (obj) {
563
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
564
- }, _typeof(obj);
565
- }
566
-
567
518
  var slugify = function slugify(string) {
568
519
  return string.toString().toLowerCase().replace(/\s+/g, "-") // Replace spaces with -
569
520
  .replace(/&/g, "-and-") // Replace & with 'and'
@@ -599,24 +550,20 @@ nullSafe(capitalize);
599
550
 
600
551
  var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
601
552
  var objectPreProcessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
602
-
603
553
  if (objectPreProcessor && typeof objectPreProcessor === "function") {
604
554
  object = objectPreProcessor(object);
605
555
  }
606
-
607
556
  if (Array.isArray(object)) {
608
557
  return object.map(function (obj) {
609
558
  return transformObjectDeep(obj, keyValueTransformer, objectPreProcessor);
610
559
  });
611
- } else if (object === null || _typeof(object) !== "object") {
560
+ } else if (object === null || _typeof$1(object) !== "object") {
612
561
  return object;
613
562
  }
614
-
615
563
  return Object.fromEntries(Object.entries(object).map(function (_ref3) {
616
564
  var _ref4 = _slicedToArray(_ref3, 2),
617
- key = _ref4[0],
618
- value = _ref4[1];
619
-
565
+ key = _ref4[0],
566
+ value = _ref4[1];
620
567
  return keyValueTransformer(key, transformObjectDeep(value, keyValueTransformer, objectPreProcessor));
621
568
  }));
622
569
  };
@@ -630,15 +577,13 @@ var preprocessForSerialization = function preprocessForSerialization(object) {
630
577
  var filterNonNull = function filterNonNull(object) {
631
578
  return Object.fromEntries(Object.entries(object).filter(function (_ref5) {
632
579
  var _ref6 = _slicedToArray(_ref5, 2),
633
- v = _ref6[1];
634
-
580
+ v = _ref6[1];
635
581
  return !isNil(v);
636
582
  }).map(function (_ref7) {
637
583
  var _ref8 = _slicedToArray(_ref7, 2),
638
- k = _ref8[0],
639
- v = _ref8[1];
640
-
641
- return [k, _typeof(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
584
+ k = _ref8[0],
585
+ v = _ref8[1];
586
+ return [k, _typeof$1(v) === "object" && !Array.isArray(v) ? filterNonNull(v) : v];
642
587
  }));
643
588
  };
644
589
  nullSafe(filterNonNull);
@@ -817,6 +762,8 @@ var INTRINSICS = {
817
762
  '%AsyncIteratorPrototype%': needsEval,
818
763
  '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
819
764
  '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
765
+ '%BigInt64Array%': typeof BigInt64Array === 'undefined' ? undefined$1 : BigInt64Array,
766
+ '%BigUint64Array%': typeof BigUint64Array === 'undefined' ? undefined$1 : BigUint64Array,
820
767
  '%Boolean%': Boolean,
821
768
  '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
822
769
  '%Date%': Date,
@@ -872,6 +819,14 @@ var INTRINSICS = {
872
819
  '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
873
820
  };
874
821
 
822
+ try {
823
+ null.error; // eslint-disable-line no-unused-expressions
824
+ } catch (e) {
825
+ // https://github.com/tc39/proposal-shadowrealm/pull/384#issuecomment-1364264229
826
+ var errorProto = getProto(getProto(e));
827
+ INTRINSICS['%Error.prototype%'] = errorProto;
828
+ }
829
+
875
830
  var doEval = function doEval(name) {
876
831
  var value;
877
832
  if (name === '%AsyncFunction%') {
@@ -1359,16 +1314,20 @@ var objectInspect = function inspect_(obj, options, depth, seen) {
1359
1314
  }
1360
1315
  if (isMap(obj)) {
1361
1316
  var mapParts = [];
1362
- mapForEach.call(obj, function (value, key) {
1363
- mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1364
- });
1317
+ if (mapForEach) {
1318
+ mapForEach.call(obj, function (value, key) {
1319
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1320
+ });
1321
+ }
1365
1322
  return collectionOf('Map', mapSize.call(obj), mapParts, indent);
1366
1323
  }
1367
1324
  if (isSet(obj)) {
1368
1325
  var setParts = [];
1369
- setForEach.call(obj, function (value) {
1370
- setParts.push(inspect(value, obj));
1371
- });
1326
+ if (setForEach) {
1327
+ setForEach.call(obj, function (value) {
1328
+ setParts.push(inspect(value, obj));
1329
+ });
1330
+ }
1372
1331
  return collectionOf('Set', setSize.call(obj), setParts, indent);
1373
1332
  }
1374
1333
  if (isWeakMap(obj)) {
@@ -2662,7 +2621,6 @@ var lib = {
2662
2621
  };
2663
2622
 
2664
2623
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2665
-
2666
2624
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
2667
2625
  var withEventTargetValue = /*#__PURE__*/curry(function (func, event) {
2668
2626
  return func(event.target.value);
@@ -2688,62 +2646,51 @@ var simulateApiCall = function simulateApiCall(result, error) {
2688
2646
  var copyToClipboard = /*#__PURE__*/function () {
2689
2647
  var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(text) {
2690
2648
  var _ref2,
2691
- _ref2$showToastr,
2692
- showToastr,
2693
- _ref2$message,
2694
- message,
2695
- textArea,
2696
- _args = arguments;
2697
-
2649
+ _ref2$showToastr,
2650
+ showToastr,
2651
+ _ref2$message,
2652
+ message,
2653
+ textArea,
2654
+ _args = arguments;
2698
2655
  return regenerator.wrap(function _callee$(_context) {
2699
- while (1) {
2700
- switch (_context.prev = _context.next) {
2701
- case 0:
2702
- _ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref2$showToastr = _ref2.showToastr, showToastr = _ref2$showToastr === void 0 ? true : _ref2$showToastr, _ref2$message = _ref2.message, message = _ref2$message === void 0 ? i18next.t("neetoCommons.toastr.success.copiedToClipboard") : _ref2$message;
2703
- _context.prev = 1;
2704
-
2705
- if (!(navigator.clipboard && window.isSecureContext)) {
2706
- _context.next = 7;
2707
- break;
2708
- }
2709
-
2710
- _context.next = 5;
2711
- return navigator.clipboard.writeText(text);
2712
-
2713
- case 5:
2714
- _context.next = 17;
2656
+ while (1) switch (_context.prev = _context.next) {
2657
+ case 0:
2658
+ _ref2 = _args.length > 1 && _args[1] !== undefined ? _args[1] : {}, _ref2$showToastr = _ref2.showToastr, showToastr = _ref2$showToastr === void 0 ? true : _ref2$showToastr, _ref2$message = _ref2.message, message = _ref2$message === void 0 ? i18next.t("neetoCommons.toastr.success.copiedToClipboard") : _ref2$message;
2659
+ _context.prev = 1;
2660
+ if (!(navigator.clipboard && window.isSecureContext)) {
2661
+ _context.next = 7;
2715
2662
  break;
2716
-
2717
- case 7:
2718
- textArea = document.createElement("textarea");
2719
- textArea.value = text;
2720
- textArea.style.top = "0";
2721
- textArea.style.left = "0";
2722
- textArea.style.position = "fixed";
2723
- document.body.appendChild(textArea);
2724
- textArea.focus();
2725
- textArea.select();
2726
- document.execCommand("copy");
2727
- document.body.removeChild(textArea);
2728
-
2729
- case 17:
2730
- showToastr && Toastr.success(message);
2731
- _context.next = 23;
2732
- break;
2733
-
2734
- case 20:
2735
- _context.prev = 20;
2736
- _context.t0 = _context["catch"](1);
2737
- Toastr.error(_context.t0);
2738
-
2739
- case 23:
2740
- case "end":
2741
- return _context.stop();
2742
- }
2663
+ }
2664
+ _context.next = 5;
2665
+ return navigator.clipboard.writeText(text);
2666
+ case 5:
2667
+ _context.next = 17;
2668
+ break;
2669
+ case 7:
2670
+ textArea = document.createElement("textarea");
2671
+ textArea.value = text;
2672
+ textArea.style.top = "0";
2673
+ textArea.style.left = "0";
2674
+ textArea.style.position = "fixed";
2675
+ document.body.appendChild(textArea);
2676
+ textArea.focus();
2677
+ textArea.select();
2678
+ document.execCommand("copy");
2679
+ document.body.removeChild(textArea);
2680
+ case 17:
2681
+ showToastr && Toastr.success(message);
2682
+ _context.next = 23;
2683
+ break;
2684
+ case 20:
2685
+ _context.prev = 20;
2686
+ _context.t0 = _context["catch"](1);
2687
+ Toastr.error(_context.t0);
2688
+ case 23:
2689
+ case "end":
2690
+ return _context.stop();
2743
2691
  }
2744
2692
  }, _callee, null, [[1, 20]]);
2745
2693
  }));
2746
-
2747
2694
  return function copyToClipboard(_x) {
2748
2695
  return _ref.apply(this, arguments);
2749
2696
  };
@@ -2752,9 +2699,8 @@ var buildUrl = function buildUrl(route, params) {
2752
2699
  var placeHolders = [];
2753
2700
  toPairs(params).forEach(function (_ref3) {
2754
2701
  var _ref4 = _slicedToArray(_ref3, 2),
2755
- key = _ref4[0],
2756
- value = _ref4[1];
2757
-
2702
+ key = _ref4[0],
2703
+ value = _ref4[1];
2758
2704
  if (route.includes(":".concat(key))) {
2759
2705
  placeHolders.push(key);
2760
2706
  route = route.replace(":".concat(key), encodeURIComponent(value));
@@ -2765,7 +2711,6 @@ var buildUrl = function buildUrl(route, params) {
2765
2711
  };
2766
2712
  var toLocale = function toLocale(number) {
2767
2713
  var _window$globalProps, _window$globalProps$u;
2768
-
2769
2714
  var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : undefined;
2770
2715
  return Number(number).toLocaleString(((_window$globalProps = window.globalProps) === null || _window$globalProps === void 0 ? void 0 : (_window$globalProps$u = _window$globalProps.user) === null || _window$globalProps$u === void 0 ? void 0 : _window$globalProps$u.locale) || navigator.language || navigator.languages[0], options);
2771
2716
  };
@@ -2779,7 +2724,6 @@ var joinHyphenCase = function joinHyphenCase() {
2779
2724
  for (var _len = arguments.length, args = new Array(_len), _key = 0; _key < _len; _key++) {
2780
2725
  args[_key] = arguments[_key];
2781
2726
  }
2782
-
2783
2727
  return args.join(" ").replace(/\s+/g, "-").toLowerCase();
2784
2728
  };
2785
2729