@bigbinary/neeto-commons-frontend 0.0.1 → 0.0.2

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.cjs.js ADDED
@@ -0,0 +1,2781 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var axios = require('axios');
6
+ var ramda = require('ramda');
7
+ var i18next = require('i18next');
8
+ var dayjs = require('dayjs');
9
+ var relativeTime = require('dayjs/plugin/relativeTime');
10
+ var updateLocale = require('dayjs/plugin/updateLocale');
11
+
12
+ function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
13
+
14
+ var axios__default = /*#__PURE__*/_interopDefaultLegacy(axios);
15
+ var i18next__default = /*#__PURE__*/_interopDefaultLegacy(i18next);
16
+ var dayjs__default = /*#__PURE__*/_interopDefaultLegacy(dayjs);
17
+ var relativeTime__default = /*#__PURE__*/_interopDefaultLegacy(relativeTime);
18
+ var updateLocale__default = /*#__PURE__*/_interopDefaultLegacy(updateLocale);
19
+
20
+ var HEADERS_KEYS = {
21
+ xAuthEmail: "X-Auth-Email",
22
+ xAuthToken: "X-Auth-Token",
23
+ xCsrfToken: "X-CSRF-TOKEN"
24
+ };
25
+
26
+ var resetAuthTokens = function resetAuthTokens() {
27
+ ramda.values(HEADERS_KEYS).forEach(function (header) {
28
+ delete axios__default["default"].defaults.headers[header];
29
+ });
30
+ };
31
+
32
+ function _arrayWithHoles(arr) {
33
+ if (Array.isArray(arr)) return arr;
34
+ }
35
+
36
+ function _iterableToArrayLimit(arr, i) {
37
+ var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"];
38
+
39
+ if (_i == null) return;
40
+ var _arr = [];
41
+ var _n = true;
42
+ var _d = false;
43
+
44
+ var _s, _e;
45
+
46
+ try {
47
+ for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) {
48
+ _arr.push(_s.value);
49
+
50
+ if (i && _arr.length === i) break;
51
+ }
52
+ } catch (err) {
53
+ _d = true;
54
+ _e = err;
55
+ } finally {
56
+ try {
57
+ if (!_n && _i["return"] != null) _i["return"]();
58
+ } finally {
59
+ if (_d) throw _e;
60
+ }
61
+ }
62
+
63
+ return _arr;
64
+ }
65
+
66
+ function _arrayLikeToArray(arr, len) {
67
+ if (len == null || len > arr.length) len = arr.length;
68
+
69
+ for (var i = 0, arr2 = new Array(len); i < len; i++) {
70
+ arr2[i] = arr[i];
71
+ }
72
+
73
+ return arr2;
74
+ }
75
+
76
+ function _unsupportedIterableToArray(o, minLen) {
77
+ if (!o) return;
78
+ if (typeof o === "string") return _arrayLikeToArray(o, minLen);
79
+ var n = Object.prototype.toString.call(o).slice(8, -1);
80
+ if (n === "Object" && o.constructor) n = o.constructor.name;
81
+ if (n === "Map" || n === "Set") return Array.from(o);
82
+ if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen);
83
+ }
84
+
85
+ function _nonIterableRest() {
86
+ throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");
87
+ }
88
+
89
+ function _slicedToArray(arr, i) {
90
+ return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
91
+ }
92
+
93
+ function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
94
+ try {
95
+ var info = gen[key](arg);
96
+ var value = info.value;
97
+ } catch (error) {
98
+ reject(error);
99
+ return;
100
+ }
101
+
102
+ if (info.done) {
103
+ resolve(value);
104
+ } else {
105
+ Promise.resolve(value).then(_next, _throw);
106
+ }
107
+ }
108
+
109
+ function _asyncToGenerator(fn) {
110
+ return function () {
111
+ var self = this,
112
+ args = arguments;
113
+ return new Promise(function (resolve, reject) {
114
+ var gen = fn.apply(self, args);
115
+
116
+ function _next(value) {
117
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
118
+ }
119
+
120
+ function _throw(err) {
121
+ asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
122
+ }
123
+
124
+ _next(undefined);
125
+ });
126
+ };
127
+ }
128
+
129
+ function _defineProperty(obj, key, value) {
130
+ if (key in obj) {
131
+ Object.defineProperty(obj, key, {
132
+ value: value,
133
+ enumerable: true,
134
+ configurable: true,
135
+ writable: true
136
+ });
137
+ } else {
138
+ obj[key] = value;
139
+ }
140
+
141
+ return obj;
142
+ }
143
+
144
+ function getAugmentedNamespace(n) {
145
+ var f = n.default;
146
+ if (typeof f == "function") {
147
+ var a = function () {
148
+ return f.apply(this, arguments);
149
+ };
150
+ a.prototype = f.prototype;
151
+ } else a = {};
152
+ Object.defineProperty(a, '__esModule', {value: true});
153
+ Object.keys(n).forEach(function (k) {
154
+ var d = Object.getOwnPropertyDescriptor(n, k);
155
+ Object.defineProperty(a, k, d.get ? d : {
156
+ enumerable: true,
157
+ get: function () {
158
+ return n[k];
159
+ }
160
+ });
161
+ });
162
+ return a;
163
+ }
164
+
165
+ var regeneratorRuntime$1 = {exports: {}};
166
+
167
+ var _typeof$1 = {exports: {}};
168
+
169
+ (function (module) {
170
+ function _typeof(obj) {
171
+ "@babel/helpers - typeof";
172
+
173
+ return (module.exports = _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
174
+ return typeof obj;
175
+ } : function (obj) {
176
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
177
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports), _typeof(obj);
178
+ }
179
+
180
+ module.exports = _typeof, module.exports.__esModule = true, module.exports["default"] = module.exports;
181
+ } (_typeof$1));
182
+
183
+ (function (module) {
184
+ var _typeof = _typeof$1.exports["default"];
185
+
186
+ function _regeneratorRuntime() {
187
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
188
+
189
+ module.exports = _regeneratorRuntime = function _regeneratorRuntime() {
190
+ return exports;
191
+ }, module.exports.__esModule = true, module.exports["default"] = module.exports;
192
+ var exports = {},
193
+ Op = Object.prototype,
194
+ hasOwn = Op.hasOwnProperty,
195
+ $Symbol = "function" == typeof Symbol ? Symbol : {},
196
+ iteratorSymbol = $Symbol.iterator || "@@iterator",
197
+ asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
198
+ toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
199
+
200
+ function define(obj, key, value) {
201
+ return Object.defineProperty(obj, key, {
202
+ value: value,
203
+ enumerable: !0,
204
+ configurable: !0,
205
+ writable: !0
206
+ }), obj[key];
207
+ }
208
+
209
+ try {
210
+ define({}, "");
211
+ } catch (err) {
212
+ define = function define(obj, key, value) {
213
+ return obj[key] = value;
214
+ };
215
+ }
216
+
217
+ function wrap(innerFn, outerFn, self, tryLocsList) {
218
+ var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
219
+ generator = Object.create(protoGenerator.prototype),
220
+ context = new Context(tryLocsList || []);
221
+ return generator._invoke = function (innerFn, self, context) {
222
+ var state = "suspendedStart";
223
+ return function (method, arg) {
224
+ if ("executing" === state) throw new Error("Generator is already running");
225
+
226
+ if ("completed" === state) {
227
+ if ("throw" === method) throw arg;
228
+ return doneResult();
229
+ }
230
+
231
+ for (context.method = method, context.arg = arg;;) {
232
+ var delegate = context.delegate;
233
+
234
+ if (delegate) {
235
+ var delegateResult = maybeInvokeDelegate(delegate, context);
236
+
237
+ if (delegateResult) {
238
+ if (delegateResult === ContinueSentinel) continue;
239
+ return delegateResult;
240
+ }
241
+ }
242
+
243
+ if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
244
+ if ("suspendedStart" === state) throw state = "completed", context.arg;
245
+ context.dispatchException(context.arg);
246
+ } else "return" === context.method && context.abrupt("return", context.arg);
247
+ state = "executing";
248
+ var record = tryCatch(innerFn, self, context);
249
+
250
+ if ("normal" === record.type) {
251
+ if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
252
+ return {
253
+ value: record.arg,
254
+ done: context.done
255
+ };
256
+ }
257
+
258
+ "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
259
+ }
260
+ };
261
+ }(innerFn, self, context), generator;
262
+ }
263
+
264
+ function tryCatch(fn, obj, arg) {
265
+ try {
266
+ return {
267
+ type: "normal",
268
+ arg: fn.call(obj, arg)
269
+ };
270
+ } catch (err) {
271
+ return {
272
+ type: "throw",
273
+ arg: err
274
+ };
275
+ }
276
+ }
277
+
278
+ exports.wrap = wrap;
279
+ var ContinueSentinel = {};
280
+
281
+ function Generator() {}
282
+
283
+ function GeneratorFunction() {}
284
+
285
+ function GeneratorFunctionPrototype() {}
286
+
287
+ var IteratorPrototype = {};
288
+ define(IteratorPrototype, iteratorSymbol, function () {
289
+ return this;
290
+ });
291
+ var getProto = Object.getPrototypeOf,
292
+ NativeIteratorPrototype = getProto && getProto(getProto(values([])));
293
+ NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
294
+ var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
295
+
296
+ function defineIteratorMethods(prototype) {
297
+ ["next", "throw", "return"].forEach(function (method) {
298
+ define(prototype, method, function (arg) {
299
+ return this._invoke(method, arg);
300
+ });
301
+ });
302
+ }
303
+
304
+ function AsyncIterator(generator, PromiseImpl) {
305
+ function invoke(method, arg, resolve, reject) {
306
+ var record = tryCatch(generator[method], generator, arg);
307
+
308
+ if ("throw" !== record.type) {
309
+ var result = record.arg,
310
+ value = result.value;
311
+ return value && "object" == _typeof(value) && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
312
+ invoke("next", value, resolve, reject);
313
+ }, function (err) {
314
+ invoke("throw", err, resolve, reject);
315
+ }) : PromiseImpl.resolve(value).then(function (unwrapped) {
316
+ result.value = unwrapped, resolve(result);
317
+ }, function (error) {
318
+ return invoke("throw", error, resolve, reject);
319
+ });
320
+ }
321
+
322
+ reject(record.arg);
323
+ }
324
+
325
+ var previousPromise;
326
+
327
+ this._invoke = function (method, arg) {
328
+ function callInvokeWithMethodAndArg() {
329
+ return new PromiseImpl(function (resolve, reject) {
330
+ invoke(method, arg, resolve, reject);
331
+ });
332
+ }
333
+
334
+ return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
335
+ };
336
+ }
337
+
338
+ function maybeInvokeDelegate(delegate, context) {
339
+ var method = delegate.iterator[context.method];
340
+
341
+ if (undefined === method) {
342
+ if (context.delegate = null, "throw" === context.method) {
343
+ if (delegate.iterator["return"] && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
344
+ context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
345
+ }
346
+
347
+ return ContinueSentinel;
348
+ }
349
+
350
+ var record = tryCatch(method, delegate.iterator, context.arg);
351
+ if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
352
+ var info = record.arg;
353
+ 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);
354
+ }
355
+
356
+ function pushTryEntry(locs) {
357
+ var entry = {
358
+ tryLoc: locs[0]
359
+ };
360
+ 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
361
+ }
362
+
363
+ function resetTryEntry(entry) {
364
+ var record = entry.completion || {};
365
+ record.type = "normal", delete record.arg, entry.completion = record;
366
+ }
367
+
368
+ function Context(tryLocsList) {
369
+ this.tryEntries = [{
370
+ tryLoc: "root"
371
+ }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
372
+ }
373
+
374
+ function values(iterable) {
375
+ if (iterable) {
376
+ var iteratorMethod = iterable[iteratorSymbol];
377
+ if (iteratorMethod) return iteratorMethod.call(iterable);
378
+ if ("function" == typeof iterable.next) return iterable;
379
+
380
+ if (!isNaN(iterable.length)) {
381
+ var i = -1,
382
+ next = function next() {
383
+ for (; ++i < iterable.length;) {
384
+ if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
385
+ }
386
+
387
+ return next.value = undefined, next.done = !0, next;
388
+ };
389
+
390
+ return next.next = next;
391
+ }
392
+ }
393
+
394
+ return {
395
+ next: doneResult
396
+ };
397
+ }
398
+
399
+ function doneResult() {
400
+ return {
401
+ value: undefined,
402
+ done: !0
403
+ };
404
+ }
405
+
406
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
407
+ var ctor = "function" == typeof genFun && genFun.constructor;
408
+ return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
409
+ }, exports.mark = function (genFun) {
410
+ return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
411
+ }, exports.awrap = function (arg) {
412
+ return {
413
+ __await: arg
414
+ };
415
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
416
+ return this;
417
+ }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
418
+ void 0 === PromiseImpl && (PromiseImpl = Promise);
419
+ var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
420
+ return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
421
+ return result.done ? result.value : iter.next();
422
+ });
423
+ }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
424
+ return this;
425
+ }), define(Gp, "toString", function () {
426
+ return "[object Generator]";
427
+ }), exports.keys = function (object) {
428
+ var keys = [];
429
+
430
+ for (var key in object) {
431
+ keys.push(key);
432
+ }
433
+
434
+ return keys.reverse(), function next() {
435
+ for (; keys.length;) {
436
+ var key = keys.pop();
437
+ if (key in object) return next.value = key, next.done = !1, next;
438
+ }
439
+
440
+ return next.done = !0, next;
441
+ };
442
+ }, exports.values = values, Context.prototype = {
443
+ constructor: Context,
444
+ reset: function reset(skipTempReset) {
445
+ 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) {
446
+ "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
447
+ }
448
+ },
449
+ stop: function stop() {
450
+ this.done = !0;
451
+ var rootRecord = this.tryEntries[0].completion;
452
+ if ("throw" === rootRecord.type) throw rootRecord.arg;
453
+ return this.rval;
454
+ },
455
+ dispatchException: function dispatchException(exception) {
456
+ if (this.done) throw exception;
457
+ var context = this;
458
+
459
+ function handle(loc, caught) {
460
+ return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
461
+ }
462
+
463
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
464
+ var entry = this.tryEntries[i],
465
+ record = entry.completion;
466
+ if ("root" === entry.tryLoc) return handle("end");
467
+
468
+ if (entry.tryLoc <= this.prev) {
469
+ var hasCatch = hasOwn.call(entry, "catchLoc"),
470
+ hasFinally = hasOwn.call(entry, "finallyLoc");
471
+
472
+ if (hasCatch && hasFinally) {
473
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
474
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
475
+ } else if (hasCatch) {
476
+ if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
477
+ } else {
478
+ if (!hasFinally) throw new Error("try statement without catch or finally");
479
+ if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
480
+ }
481
+ }
482
+ }
483
+ },
484
+ abrupt: function abrupt(type, arg) {
485
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
486
+ var entry = this.tryEntries[i];
487
+
488
+ if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
489
+ var finallyEntry = entry;
490
+ break;
491
+ }
492
+ }
493
+
494
+ finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
495
+ var record = finallyEntry ? finallyEntry.completion : {};
496
+ return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
497
+ },
498
+ complete: function complete(record, afterLoc) {
499
+ if ("throw" === record.type) throw record.arg;
500
+ 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;
501
+ },
502
+ finish: function finish(finallyLoc) {
503
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
504
+ var entry = this.tryEntries[i];
505
+ if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
506
+ }
507
+ },
508
+ "catch": function _catch(tryLoc) {
509
+ for (var i = this.tryEntries.length - 1; i >= 0; --i) {
510
+ var entry = this.tryEntries[i];
511
+
512
+ if (entry.tryLoc === tryLoc) {
513
+ var record = entry.completion;
514
+
515
+ if ("throw" === record.type) {
516
+ var thrown = record.arg;
517
+ resetTryEntry(entry);
518
+ }
519
+
520
+ return thrown;
521
+ }
522
+ }
523
+
524
+ throw new Error("illegal catch attempt");
525
+ },
526
+ delegateYield: function delegateYield(iterable, resultName, nextLoc) {
527
+ return this.delegate = {
528
+ iterator: values(iterable),
529
+ resultName: resultName,
530
+ nextLoc: nextLoc
531
+ }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
532
+ }
533
+ }, exports;
534
+ }
535
+
536
+ module.exports = _regeneratorRuntime, module.exports.__esModule = true, module.exports["default"] = module.exports;
537
+ } (regeneratorRuntime$1));
538
+
539
+ // TODO(Babel 8): Remove this file.
540
+
541
+ var runtime = regeneratorRuntime$1.exports();
542
+ var regenerator = runtime;
543
+
544
+ // Copied from https://github.com/facebook/regenerator/blob/main/packages/runtime/runtime.js#L736=
545
+ try {
546
+ regeneratorRuntime = runtime;
547
+ } catch (accidentalStrictMode) {
548
+ if (typeof globalThis === "object") {
549
+ globalThis.regeneratorRuntime = runtime;
550
+ } else {
551
+ Function("r", "regeneratorRuntime = r")(runtime);
552
+ }
553
+ }
554
+
555
+ var getRandomInt = function getRandomInt() {
556
+ var a = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : Number.MAX_SAFE_INTEGER;
557
+ var b = arguments.length > 1 ? arguments[1] : undefined;
558
+
559
+ if (b) {
560
+ a = Math.ceil(a);
561
+ b = Math.floor(b);
562
+ } else {
563
+ b = a;
564
+ a = 0;
565
+ }
566
+
567
+ return Math.floor(Math.random() * (b - a) + a);
568
+ };
569
+
570
+ function _typeof(obj) {
571
+ "@babel/helpers - typeof";
572
+
573
+ return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
574
+ return typeof obj;
575
+ } : function (obj) {
576
+ return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
577
+ }, _typeof(obj);
578
+ }
579
+
580
+ var transformObjectDeep = function transformObjectDeep(object, keyValueTransformer) {
581
+ var objectPreProcessor = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : undefined;
582
+
583
+ if (objectPreProcessor && typeof objectPreProcessor === "function") {
584
+ object = objectPreProcessor(object);
585
+ }
586
+
587
+ if (Array.isArray(object)) {
588
+ return object.map(function (obj) {
589
+ return transformObjectDeep(obj, keyValueTransformer, objectPreProcessor);
590
+ });
591
+ } else if (object === null || _typeof(object) !== "object") {
592
+ return object;
593
+ }
594
+
595
+ return Object.fromEntries(Object.entries(object).map(function (_ref3) {
596
+ var _ref4 = _slicedToArray(_ref3, 2),
597
+ key = _ref4[0],
598
+ value = _ref4[1];
599
+
600
+ return keyValueTransformer(key, transformObjectDeep(value, keyValueTransformer, objectPreProcessor));
601
+ }));
602
+ };
603
+ var preprocessForSerialization = function preprocessForSerialization(object) {
604
+ return transformObjectDeep(object, function (key, value) {
605
+ return [key, value];
606
+ }, function (object) {
607
+ return typeof (object === null || object === void 0 ? void 0 : object.toJSON) === "function" ? object.toJSON() : object;
608
+ });
609
+ };
610
+
611
+ /* eslint complexity: [2, 18], max-statements: [2, 33] */
612
+ var shams = function hasSymbols() {
613
+ if (typeof Symbol !== 'function' || typeof Object.getOwnPropertySymbols !== 'function') { return false; }
614
+ if (typeof Symbol.iterator === 'symbol') { return true; }
615
+
616
+ var obj = {};
617
+ var sym = Symbol('test');
618
+ var symObj = Object(sym);
619
+ if (typeof sym === 'string') { return false; }
620
+
621
+ if (Object.prototype.toString.call(sym) !== '[object Symbol]') { return false; }
622
+ if (Object.prototype.toString.call(symObj) !== '[object Symbol]') { return false; }
623
+
624
+ // temp disabled per https://github.com/ljharb/object.assign/issues/17
625
+ // if (sym instanceof Symbol) { return false; }
626
+ // temp disabled per https://github.com/WebReflection/get-own-property-symbols/issues/4
627
+ // if (!(symObj instanceof Symbol)) { return false; }
628
+
629
+ // if (typeof Symbol.prototype.toString !== 'function') { return false; }
630
+ // if (String(sym) !== Symbol.prototype.toString.call(sym)) { return false; }
631
+
632
+ var symVal = 42;
633
+ obj[sym] = symVal;
634
+ for (sym in obj) { return false; } // eslint-disable-line no-restricted-syntax, no-unreachable-loop
635
+ if (typeof Object.keys === 'function' && Object.keys(obj).length !== 0) { return false; }
636
+
637
+ if (typeof Object.getOwnPropertyNames === 'function' && Object.getOwnPropertyNames(obj).length !== 0) { return false; }
638
+
639
+ var syms = Object.getOwnPropertySymbols(obj);
640
+ if (syms.length !== 1 || syms[0] !== sym) { return false; }
641
+
642
+ if (!Object.prototype.propertyIsEnumerable.call(obj, sym)) { return false; }
643
+
644
+ if (typeof Object.getOwnPropertyDescriptor === 'function') {
645
+ var descriptor = Object.getOwnPropertyDescriptor(obj, sym);
646
+ if (descriptor.value !== symVal || descriptor.enumerable !== true) { return false; }
647
+ }
648
+
649
+ return true;
650
+ };
651
+
652
+ var origSymbol = typeof Symbol !== 'undefined' && Symbol;
653
+ var hasSymbolSham = shams;
654
+
655
+ var hasSymbols$1 = function hasNativeSymbols() {
656
+ if (typeof origSymbol !== 'function') { return false; }
657
+ if (typeof Symbol !== 'function') { return false; }
658
+ if (typeof origSymbol('foo') !== 'symbol') { return false; }
659
+ if (typeof Symbol('bar') !== 'symbol') { return false; }
660
+
661
+ return hasSymbolSham();
662
+ };
663
+
664
+ /* eslint no-invalid-this: 1 */
665
+
666
+ var ERROR_MESSAGE = 'Function.prototype.bind called on incompatible ';
667
+ var slice = Array.prototype.slice;
668
+ var toStr$1 = Object.prototype.toString;
669
+ var funcType = '[object Function]';
670
+
671
+ var implementation$1 = function bind(that) {
672
+ var target = this;
673
+ if (typeof target !== 'function' || toStr$1.call(target) !== funcType) {
674
+ throw new TypeError(ERROR_MESSAGE + target);
675
+ }
676
+ var args = slice.call(arguments, 1);
677
+
678
+ var bound;
679
+ var binder = function () {
680
+ if (this instanceof bound) {
681
+ var result = target.apply(
682
+ this,
683
+ args.concat(slice.call(arguments))
684
+ );
685
+ if (Object(result) === result) {
686
+ return result;
687
+ }
688
+ return this;
689
+ } else {
690
+ return target.apply(
691
+ that,
692
+ args.concat(slice.call(arguments))
693
+ );
694
+ }
695
+ };
696
+
697
+ var boundLength = Math.max(0, target.length - args.length);
698
+ var boundArgs = [];
699
+ for (var i = 0; i < boundLength; i++) {
700
+ boundArgs.push('$' + i);
701
+ }
702
+
703
+ bound = Function('binder', 'return function (' + boundArgs.join(',') + '){ return binder.apply(this,arguments); }')(binder);
704
+
705
+ if (target.prototype) {
706
+ var Empty = function Empty() {};
707
+ Empty.prototype = target.prototype;
708
+ bound.prototype = new Empty();
709
+ Empty.prototype = null;
710
+ }
711
+
712
+ return bound;
713
+ };
714
+
715
+ var implementation = implementation$1;
716
+
717
+ var functionBind = Function.prototype.bind || implementation;
718
+
719
+ var bind$1 = functionBind;
720
+
721
+ var src = bind$1.call(Function.call, Object.prototype.hasOwnProperty);
722
+
723
+ var undefined$1;
724
+
725
+ var $SyntaxError = SyntaxError;
726
+ var $Function = Function;
727
+ var $TypeError$1 = TypeError;
728
+
729
+ // eslint-disable-next-line consistent-return
730
+ var getEvalledConstructor = function (expressionSyntax) {
731
+ try {
732
+ return $Function('"use strict"; return (' + expressionSyntax + ').constructor;')();
733
+ } catch (e) {}
734
+ };
735
+
736
+ var $gOPD = Object.getOwnPropertyDescriptor;
737
+ if ($gOPD) {
738
+ try {
739
+ $gOPD({}, '');
740
+ } catch (e) {
741
+ $gOPD = null; // this is IE 8, which has a broken gOPD
742
+ }
743
+ }
744
+
745
+ var throwTypeError = function () {
746
+ throw new $TypeError$1();
747
+ };
748
+ var ThrowTypeError = $gOPD
749
+ ? (function () {
750
+ try {
751
+ // eslint-disable-next-line no-unused-expressions, no-caller, no-restricted-properties
752
+ arguments.callee; // IE 8 does not throw here
753
+ return throwTypeError;
754
+ } catch (calleeThrows) {
755
+ try {
756
+ // IE 8 throws on Object.getOwnPropertyDescriptor(arguments, '')
757
+ return $gOPD(arguments, 'callee').get;
758
+ } catch (gOPDthrows) {
759
+ return throwTypeError;
760
+ }
761
+ }
762
+ }())
763
+ : throwTypeError;
764
+
765
+ var hasSymbols = hasSymbols$1();
766
+
767
+ var getProto = Object.getPrototypeOf || function (x) { return x.__proto__; }; // eslint-disable-line no-proto
768
+
769
+ var needsEval = {};
770
+
771
+ var TypedArray = typeof Uint8Array === 'undefined' ? undefined$1 : getProto(Uint8Array);
772
+
773
+ var INTRINSICS = {
774
+ '%AggregateError%': typeof AggregateError === 'undefined' ? undefined$1 : AggregateError,
775
+ '%Array%': Array,
776
+ '%ArrayBuffer%': typeof ArrayBuffer === 'undefined' ? undefined$1 : ArrayBuffer,
777
+ '%ArrayIteratorPrototype%': hasSymbols ? getProto([][Symbol.iterator]()) : undefined$1,
778
+ '%AsyncFromSyncIteratorPrototype%': undefined$1,
779
+ '%AsyncFunction%': needsEval,
780
+ '%AsyncGenerator%': needsEval,
781
+ '%AsyncGeneratorFunction%': needsEval,
782
+ '%AsyncIteratorPrototype%': needsEval,
783
+ '%Atomics%': typeof Atomics === 'undefined' ? undefined$1 : Atomics,
784
+ '%BigInt%': typeof BigInt === 'undefined' ? undefined$1 : BigInt,
785
+ '%Boolean%': Boolean,
786
+ '%DataView%': typeof DataView === 'undefined' ? undefined$1 : DataView,
787
+ '%Date%': Date,
788
+ '%decodeURI%': decodeURI,
789
+ '%decodeURIComponent%': decodeURIComponent,
790
+ '%encodeURI%': encodeURI,
791
+ '%encodeURIComponent%': encodeURIComponent,
792
+ '%Error%': Error,
793
+ '%eval%': eval, // eslint-disable-line no-eval
794
+ '%EvalError%': EvalError,
795
+ '%Float32Array%': typeof Float32Array === 'undefined' ? undefined$1 : Float32Array,
796
+ '%Float64Array%': typeof Float64Array === 'undefined' ? undefined$1 : Float64Array,
797
+ '%FinalizationRegistry%': typeof FinalizationRegistry === 'undefined' ? undefined$1 : FinalizationRegistry,
798
+ '%Function%': $Function,
799
+ '%GeneratorFunction%': needsEval,
800
+ '%Int8Array%': typeof Int8Array === 'undefined' ? undefined$1 : Int8Array,
801
+ '%Int16Array%': typeof Int16Array === 'undefined' ? undefined$1 : Int16Array,
802
+ '%Int32Array%': typeof Int32Array === 'undefined' ? undefined$1 : Int32Array,
803
+ '%isFinite%': isFinite,
804
+ '%isNaN%': isNaN,
805
+ '%IteratorPrototype%': hasSymbols ? getProto(getProto([][Symbol.iterator]())) : undefined$1,
806
+ '%JSON%': typeof JSON === 'object' ? JSON : undefined$1,
807
+ '%Map%': typeof Map === 'undefined' ? undefined$1 : Map,
808
+ '%MapIteratorPrototype%': typeof Map === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Map()[Symbol.iterator]()),
809
+ '%Math%': Math,
810
+ '%Number%': Number,
811
+ '%Object%': Object,
812
+ '%parseFloat%': parseFloat,
813
+ '%parseInt%': parseInt,
814
+ '%Promise%': typeof Promise === 'undefined' ? undefined$1 : Promise,
815
+ '%Proxy%': typeof Proxy === 'undefined' ? undefined$1 : Proxy,
816
+ '%RangeError%': RangeError,
817
+ '%ReferenceError%': ReferenceError,
818
+ '%Reflect%': typeof Reflect === 'undefined' ? undefined$1 : Reflect,
819
+ '%RegExp%': RegExp,
820
+ '%Set%': typeof Set === 'undefined' ? undefined$1 : Set,
821
+ '%SetIteratorPrototype%': typeof Set === 'undefined' || !hasSymbols ? undefined$1 : getProto(new Set()[Symbol.iterator]()),
822
+ '%SharedArrayBuffer%': typeof SharedArrayBuffer === 'undefined' ? undefined$1 : SharedArrayBuffer,
823
+ '%String%': String,
824
+ '%StringIteratorPrototype%': hasSymbols ? getProto(''[Symbol.iterator]()) : undefined$1,
825
+ '%Symbol%': hasSymbols ? Symbol : undefined$1,
826
+ '%SyntaxError%': $SyntaxError,
827
+ '%ThrowTypeError%': ThrowTypeError,
828
+ '%TypedArray%': TypedArray,
829
+ '%TypeError%': $TypeError$1,
830
+ '%Uint8Array%': typeof Uint8Array === 'undefined' ? undefined$1 : Uint8Array,
831
+ '%Uint8ClampedArray%': typeof Uint8ClampedArray === 'undefined' ? undefined$1 : Uint8ClampedArray,
832
+ '%Uint16Array%': typeof Uint16Array === 'undefined' ? undefined$1 : Uint16Array,
833
+ '%Uint32Array%': typeof Uint32Array === 'undefined' ? undefined$1 : Uint32Array,
834
+ '%URIError%': URIError,
835
+ '%WeakMap%': typeof WeakMap === 'undefined' ? undefined$1 : WeakMap,
836
+ '%WeakRef%': typeof WeakRef === 'undefined' ? undefined$1 : WeakRef,
837
+ '%WeakSet%': typeof WeakSet === 'undefined' ? undefined$1 : WeakSet
838
+ };
839
+
840
+ var doEval = function doEval(name) {
841
+ var value;
842
+ if (name === '%AsyncFunction%') {
843
+ value = getEvalledConstructor('async function () {}');
844
+ } else if (name === '%GeneratorFunction%') {
845
+ value = getEvalledConstructor('function* () {}');
846
+ } else if (name === '%AsyncGeneratorFunction%') {
847
+ value = getEvalledConstructor('async function* () {}');
848
+ } else if (name === '%AsyncGenerator%') {
849
+ var fn = doEval('%AsyncGeneratorFunction%');
850
+ if (fn) {
851
+ value = fn.prototype;
852
+ }
853
+ } else if (name === '%AsyncIteratorPrototype%') {
854
+ var gen = doEval('%AsyncGenerator%');
855
+ if (gen) {
856
+ value = getProto(gen.prototype);
857
+ }
858
+ }
859
+
860
+ INTRINSICS[name] = value;
861
+
862
+ return value;
863
+ };
864
+
865
+ var LEGACY_ALIASES = {
866
+ '%ArrayBufferPrototype%': ['ArrayBuffer', 'prototype'],
867
+ '%ArrayPrototype%': ['Array', 'prototype'],
868
+ '%ArrayProto_entries%': ['Array', 'prototype', 'entries'],
869
+ '%ArrayProto_forEach%': ['Array', 'prototype', 'forEach'],
870
+ '%ArrayProto_keys%': ['Array', 'prototype', 'keys'],
871
+ '%ArrayProto_values%': ['Array', 'prototype', 'values'],
872
+ '%AsyncFunctionPrototype%': ['AsyncFunction', 'prototype'],
873
+ '%AsyncGenerator%': ['AsyncGeneratorFunction', 'prototype'],
874
+ '%AsyncGeneratorPrototype%': ['AsyncGeneratorFunction', 'prototype', 'prototype'],
875
+ '%BooleanPrototype%': ['Boolean', 'prototype'],
876
+ '%DataViewPrototype%': ['DataView', 'prototype'],
877
+ '%DatePrototype%': ['Date', 'prototype'],
878
+ '%ErrorPrototype%': ['Error', 'prototype'],
879
+ '%EvalErrorPrototype%': ['EvalError', 'prototype'],
880
+ '%Float32ArrayPrototype%': ['Float32Array', 'prototype'],
881
+ '%Float64ArrayPrototype%': ['Float64Array', 'prototype'],
882
+ '%FunctionPrototype%': ['Function', 'prototype'],
883
+ '%Generator%': ['GeneratorFunction', 'prototype'],
884
+ '%GeneratorPrototype%': ['GeneratorFunction', 'prototype', 'prototype'],
885
+ '%Int8ArrayPrototype%': ['Int8Array', 'prototype'],
886
+ '%Int16ArrayPrototype%': ['Int16Array', 'prototype'],
887
+ '%Int32ArrayPrototype%': ['Int32Array', 'prototype'],
888
+ '%JSONParse%': ['JSON', 'parse'],
889
+ '%JSONStringify%': ['JSON', 'stringify'],
890
+ '%MapPrototype%': ['Map', 'prototype'],
891
+ '%NumberPrototype%': ['Number', 'prototype'],
892
+ '%ObjectPrototype%': ['Object', 'prototype'],
893
+ '%ObjProto_toString%': ['Object', 'prototype', 'toString'],
894
+ '%ObjProto_valueOf%': ['Object', 'prototype', 'valueOf'],
895
+ '%PromisePrototype%': ['Promise', 'prototype'],
896
+ '%PromiseProto_then%': ['Promise', 'prototype', 'then'],
897
+ '%Promise_all%': ['Promise', 'all'],
898
+ '%Promise_reject%': ['Promise', 'reject'],
899
+ '%Promise_resolve%': ['Promise', 'resolve'],
900
+ '%RangeErrorPrototype%': ['RangeError', 'prototype'],
901
+ '%ReferenceErrorPrototype%': ['ReferenceError', 'prototype'],
902
+ '%RegExpPrototype%': ['RegExp', 'prototype'],
903
+ '%SetPrototype%': ['Set', 'prototype'],
904
+ '%SharedArrayBufferPrototype%': ['SharedArrayBuffer', 'prototype'],
905
+ '%StringPrototype%': ['String', 'prototype'],
906
+ '%SymbolPrototype%': ['Symbol', 'prototype'],
907
+ '%SyntaxErrorPrototype%': ['SyntaxError', 'prototype'],
908
+ '%TypedArrayPrototype%': ['TypedArray', 'prototype'],
909
+ '%TypeErrorPrototype%': ['TypeError', 'prototype'],
910
+ '%Uint8ArrayPrototype%': ['Uint8Array', 'prototype'],
911
+ '%Uint8ClampedArrayPrototype%': ['Uint8ClampedArray', 'prototype'],
912
+ '%Uint16ArrayPrototype%': ['Uint16Array', 'prototype'],
913
+ '%Uint32ArrayPrototype%': ['Uint32Array', 'prototype'],
914
+ '%URIErrorPrototype%': ['URIError', 'prototype'],
915
+ '%WeakMapPrototype%': ['WeakMap', 'prototype'],
916
+ '%WeakSetPrototype%': ['WeakSet', 'prototype']
917
+ };
918
+
919
+ var bind = functionBind;
920
+ var hasOwn$1 = src;
921
+ var $concat$1 = bind.call(Function.call, Array.prototype.concat);
922
+ var $spliceApply = bind.call(Function.apply, Array.prototype.splice);
923
+ var $replace$1 = bind.call(Function.call, String.prototype.replace);
924
+ var $strSlice = bind.call(Function.call, String.prototype.slice);
925
+
926
+ /* adapted from https://github.com/lodash/lodash/blob/4.17.15/dist/lodash.js#L6735-L6744 */
927
+ var rePropName = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g;
928
+ var reEscapeChar = /\\(\\)?/g; /** Used to match backslashes in property paths. */
929
+ var stringToPath = function stringToPath(string) {
930
+ var first = $strSlice(string, 0, 1);
931
+ var last = $strSlice(string, -1);
932
+ if (first === '%' && last !== '%') {
933
+ throw new $SyntaxError('invalid intrinsic syntax, expected closing `%`');
934
+ } else if (last === '%' && first !== '%') {
935
+ throw new $SyntaxError('invalid intrinsic syntax, expected opening `%`');
936
+ }
937
+ var result = [];
938
+ $replace$1(string, rePropName, function (match, number, quote, subString) {
939
+ result[result.length] = quote ? $replace$1(subString, reEscapeChar, '$1') : number || match;
940
+ });
941
+ return result;
942
+ };
943
+ /* end adaptation */
944
+
945
+ var getBaseIntrinsic = function getBaseIntrinsic(name, allowMissing) {
946
+ var intrinsicName = name;
947
+ var alias;
948
+ if (hasOwn$1(LEGACY_ALIASES, intrinsicName)) {
949
+ alias = LEGACY_ALIASES[intrinsicName];
950
+ intrinsicName = '%' + alias[0] + '%';
951
+ }
952
+
953
+ if (hasOwn$1(INTRINSICS, intrinsicName)) {
954
+ var value = INTRINSICS[intrinsicName];
955
+ if (value === needsEval) {
956
+ value = doEval(intrinsicName);
957
+ }
958
+ if (typeof value === 'undefined' && !allowMissing) {
959
+ throw new $TypeError$1('intrinsic ' + name + ' exists, but is not available. Please file an issue!');
960
+ }
961
+
962
+ return {
963
+ alias: alias,
964
+ name: intrinsicName,
965
+ value: value
966
+ };
967
+ }
968
+
969
+ throw new $SyntaxError('intrinsic ' + name + ' does not exist!');
970
+ };
971
+
972
+ var getIntrinsic = function GetIntrinsic(name, allowMissing) {
973
+ if (typeof name !== 'string' || name.length === 0) {
974
+ throw new $TypeError$1('intrinsic name must be a non-empty string');
975
+ }
976
+ if (arguments.length > 1 && typeof allowMissing !== 'boolean') {
977
+ throw new $TypeError$1('"allowMissing" argument must be a boolean');
978
+ }
979
+
980
+ var parts = stringToPath(name);
981
+ var intrinsicBaseName = parts.length > 0 ? parts[0] : '';
982
+
983
+ var intrinsic = getBaseIntrinsic('%' + intrinsicBaseName + '%', allowMissing);
984
+ var intrinsicRealName = intrinsic.name;
985
+ var value = intrinsic.value;
986
+ var skipFurtherCaching = false;
987
+
988
+ var alias = intrinsic.alias;
989
+ if (alias) {
990
+ intrinsicBaseName = alias[0];
991
+ $spliceApply(parts, $concat$1([0, 1], alias));
992
+ }
993
+
994
+ for (var i = 1, isOwn = true; i < parts.length; i += 1) {
995
+ var part = parts[i];
996
+ var first = $strSlice(part, 0, 1);
997
+ var last = $strSlice(part, -1);
998
+ if (
999
+ (
1000
+ (first === '"' || first === "'" || first === '`')
1001
+ || (last === '"' || last === "'" || last === '`')
1002
+ )
1003
+ && first !== last
1004
+ ) {
1005
+ throw new $SyntaxError('property names with quotes must have matching quotes');
1006
+ }
1007
+ if (part === 'constructor' || !isOwn) {
1008
+ skipFurtherCaching = true;
1009
+ }
1010
+
1011
+ intrinsicBaseName += '.' + part;
1012
+ intrinsicRealName = '%' + intrinsicBaseName + '%';
1013
+
1014
+ if (hasOwn$1(INTRINSICS, intrinsicRealName)) {
1015
+ value = INTRINSICS[intrinsicRealName];
1016
+ } else if (value != null) {
1017
+ if (!(part in value)) {
1018
+ if (!allowMissing) {
1019
+ throw new $TypeError$1('base intrinsic for ' + name + ' exists, but the property is not available.');
1020
+ }
1021
+ return void undefined$1;
1022
+ }
1023
+ if ($gOPD && (i + 1) >= parts.length) {
1024
+ var desc = $gOPD(value, part);
1025
+ isOwn = !!desc;
1026
+
1027
+ // By convention, when a data property is converted to an accessor
1028
+ // property to emulate a data property that does not suffer from
1029
+ // the override mistake, that accessor's getter is marked with
1030
+ // an `originalValue` property. Here, when we detect this, we
1031
+ // uphold the illusion by pretending to see that original data
1032
+ // property, i.e., returning the value rather than the getter
1033
+ // itself.
1034
+ if (isOwn && 'get' in desc && !('originalValue' in desc.get)) {
1035
+ value = desc.get;
1036
+ } else {
1037
+ value = value[part];
1038
+ }
1039
+ } else {
1040
+ isOwn = hasOwn$1(value, part);
1041
+ value = value[part];
1042
+ }
1043
+
1044
+ if (isOwn && !skipFurtherCaching) {
1045
+ INTRINSICS[intrinsicRealName] = value;
1046
+ }
1047
+ }
1048
+ }
1049
+ return value;
1050
+ };
1051
+
1052
+ var callBind$1 = {exports: {}};
1053
+
1054
+ (function (module) {
1055
+
1056
+ var bind = functionBind;
1057
+ var GetIntrinsic = getIntrinsic;
1058
+
1059
+ var $apply = GetIntrinsic('%Function.prototype.apply%');
1060
+ var $call = GetIntrinsic('%Function.prototype.call%');
1061
+ var $reflectApply = GetIntrinsic('%Reflect.apply%', true) || bind.call($call, $apply);
1062
+
1063
+ var $gOPD = GetIntrinsic('%Object.getOwnPropertyDescriptor%', true);
1064
+ var $defineProperty = GetIntrinsic('%Object.defineProperty%', true);
1065
+ var $max = GetIntrinsic('%Math.max%');
1066
+
1067
+ if ($defineProperty) {
1068
+ try {
1069
+ $defineProperty({}, 'a', { value: 1 });
1070
+ } catch (e) {
1071
+ // IE 8 has a broken defineProperty
1072
+ $defineProperty = null;
1073
+ }
1074
+ }
1075
+
1076
+ module.exports = function callBind(originalFunction) {
1077
+ var func = $reflectApply(bind, $call, arguments);
1078
+ if ($gOPD && $defineProperty) {
1079
+ var desc = $gOPD(func, 'length');
1080
+ if (desc.configurable) {
1081
+ // original length, plus the receiver, minus any additional arguments (after the receiver)
1082
+ $defineProperty(
1083
+ func,
1084
+ 'length',
1085
+ { value: 1 + $max(0, originalFunction.length - (arguments.length - 1)) }
1086
+ );
1087
+ }
1088
+ }
1089
+ return func;
1090
+ };
1091
+
1092
+ var applyBind = function applyBind() {
1093
+ return $reflectApply(bind, $apply, arguments);
1094
+ };
1095
+
1096
+ if ($defineProperty) {
1097
+ $defineProperty(module.exports, 'apply', { value: applyBind });
1098
+ } else {
1099
+ module.exports.apply = applyBind;
1100
+ }
1101
+ } (callBind$1));
1102
+
1103
+ var GetIntrinsic$1 = getIntrinsic;
1104
+
1105
+ var callBind = callBind$1.exports;
1106
+
1107
+ var $indexOf = callBind(GetIntrinsic$1('String.prototype.indexOf'));
1108
+
1109
+ var callBound$1 = function callBoundIntrinsic(name, allowMissing) {
1110
+ var intrinsic = GetIntrinsic$1(name, !!allowMissing);
1111
+ if (typeof intrinsic === 'function' && $indexOf(name, '.prototype.') > -1) {
1112
+ return callBind(intrinsic);
1113
+ }
1114
+ return intrinsic;
1115
+ };
1116
+
1117
+ var _nodeResolve_empty = {};
1118
+
1119
+ var _nodeResolve_empty$1 = /*#__PURE__*/Object.freeze({
1120
+ __proto__: null,
1121
+ 'default': _nodeResolve_empty
1122
+ });
1123
+
1124
+ var require$$0 = /*@__PURE__*/getAugmentedNamespace(_nodeResolve_empty$1);
1125
+
1126
+ var hasMap = typeof Map === 'function' && Map.prototype;
1127
+ var mapSizeDescriptor = Object.getOwnPropertyDescriptor && hasMap ? Object.getOwnPropertyDescriptor(Map.prototype, 'size') : null;
1128
+ var mapSize = hasMap && mapSizeDescriptor && typeof mapSizeDescriptor.get === 'function' ? mapSizeDescriptor.get : null;
1129
+ var mapForEach = hasMap && Map.prototype.forEach;
1130
+ var hasSet = typeof Set === 'function' && Set.prototype;
1131
+ var setSizeDescriptor = Object.getOwnPropertyDescriptor && hasSet ? Object.getOwnPropertyDescriptor(Set.prototype, 'size') : null;
1132
+ var setSize = hasSet && setSizeDescriptor && typeof setSizeDescriptor.get === 'function' ? setSizeDescriptor.get : null;
1133
+ var setForEach = hasSet && Set.prototype.forEach;
1134
+ var hasWeakMap = typeof WeakMap === 'function' && WeakMap.prototype;
1135
+ var weakMapHas = hasWeakMap ? WeakMap.prototype.has : null;
1136
+ var hasWeakSet = typeof WeakSet === 'function' && WeakSet.prototype;
1137
+ var weakSetHas = hasWeakSet ? WeakSet.prototype.has : null;
1138
+ var hasWeakRef = typeof WeakRef === 'function' && WeakRef.prototype;
1139
+ var weakRefDeref = hasWeakRef ? WeakRef.prototype.deref : null;
1140
+ var booleanValueOf = Boolean.prototype.valueOf;
1141
+ var objectToString = Object.prototype.toString;
1142
+ var functionToString = Function.prototype.toString;
1143
+ var $match = String.prototype.match;
1144
+ var $slice = String.prototype.slice;
1145
+ var $replace = String.prototype.replace;
1146
+ var $toUpperCase = String.prototype.toUpperCase;
1147
+ var $toLowerCase = String.prototype.toLowerCase;
1148
+ var $test = RegExp.prototype.test;
1149
+ var $concat = Array.prototype.concat;
1150
+ var $join = Array.prototype.join;
1151
+ var $arrSlice = Array.prototype.slice;
1152
+ var $floor = Math.floor;
1153
+ var bigIntValueOf = typeof BigInt === 'function' ? BigInt.prototype.valueOf : null;
1154
+ var gOPS = Object.getOwnPropertySymbols;
1155
+ var symToString = typeof Symbol === 'function' && typeof Symbol.iterator === 'symbol' ? Symbol.prototype.toString : null;
1156
+ var hasShammedSymbols = typeof Symbol === 'function' && typeof Symbol.iterator === 'object';
1157
+ // ie, `has-tostringtag/shams
1158
+ var toStringTag = typeof Symbol === 'function' && Symbol.toStringTag && (typeof Symbol.toStringTag === hasShammedSymbols ? 'object' : 'symbol')
1159
+ ? Symbol.toStringTag
1160
+ : null;
1161
+ var isEnumerable = Object.prototype.propertyIsEnumerable;
1162
+
1163
+ var gPO = (typeof Reflect === 'function' ? Reflect.getPrototypeOf : Object.getPrototypeOf) || (
1164
+ [].__proto__ === Array.prototype // eslint-disable-line no-proto
1165
+ ? function (O) {
1166
+ return O.__proto__; // eslint-disable-line no-proto
1167
+ }
1168
+ : null
1169
+ );
1170
+
1171
+ function addNumericSeparator(num, str) {
1172
+ if (
1173
+ num === Infinity
1174
+ || num === -Infinity
1175
+ || num !== num
1176
+ || (num && num > -1000 && num < 1000)
1177
+ || $test.call(/e/, str)
1178
+ ) {
1179
+ return str;
1180
+ }
1181
+ var sepRegex = /[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;
1182
+ if (typeof num === 'number') {
1183
+ var int = num < 0 ? -$floor(-num) : $floor(num); // trunc(num)
1184
+ if (int !== num) {
1185
+ var intStr = String(int);
1186
+ var dec = $slice.call(str, intStr.length + 1);
1187
+ return $replace.call(intStr, sepRegex, '$&_') + '.' + $replace.call($replace.call(dec, /([0-9]{3})/g, '$&_'), /_$/, '');
1188
+ }
1189
+ }
1190
+ return $replace.call(str, sepRegex, '$&_');
1191
+ }
1192
+
1193
+ var inspectCustom = require$$0.custom;
1194
+ var inspectSymbol = inspectCustom && isSymbol(inspectCustom) ? inspectCustom : null;
1195
+
1196
+ var objectInspect = function inspect_(obj, options, depth, seen) {
1197
+ var opts = options || {};
1198
+
1199
+ if (has$3(opts, 'quoteStyle') && (opts.quoteStyle !== 'single' && opts.quoteStyle !== 'double')) {
1200
+ throw new TypeError('option "quoteStyle" must be "single" or "double"');
1201
+ }
1202
+ if (
1203
+ has$3(opts, 'maxStringLength') && (typeof opts.maxStringLength === 'number'
1204
+ ? opts.maxStringLength < 0 && opts.maxStringLength !== Infinity
1205
+ : opts.maxStringLength !== null
1206
+ )
1207
+ ) {
1208
+ throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');
1209
+ }
1210
+ var customInspect = has$3(opts, 'customInspect') ? opts.customInspect : true;
1211
+ if (typeof customInspect !== 'boolean' && customInspect !== 'symbol') {
1212
+ throw new TypeError('option "customInspect", if provided, must be `true`, `false`, or `\'symbol\'`');
1213
+ }
1214
+
1215
+ if (
1216
+ has$3(opts, 'indent')
1217
+ && opts.indent !== null
1218
+ && opts.indent !== '\t'
1219
+ && !(parseInt(opts.indent, 10) === opts.indent && opts.indent > 0)
1220
+ ) {
1221
+ throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');
1222
+ }
1223
+ if (has$3(opts, 'numericSeparator') && typeof opts.numericSeparator !== 'boolean') {
1224
+ throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');
1225
+ }
1226
+ var numericSeparator = opts.numericSeparator;
1227
+
1228
+ if (typeof obj === 'undefined') {
1229
+ return 'undefined';
1230
+ }
1231
+ if (obj === null) {
1232
+ return 'null';
1233
+ }
1234
+ if (typeof obj === 'boolean') {
1235
+ return obj ? 'true' : 'false';
1236
+ }
1237
+
1238
+ if (typeof obj === 'string') {
1239
+ return inspectString(obj, opts);
1240
+ }
1241
+ if (typeof obj === 'number') {
1242
+ if (obj === 0) {
1243
+ return Infinity / obj > 0 ? '0' : '-0';
1244
+ }
1245
+ var str = String(obj);
1246
+ return numericSeparator ? addNumericSeparator(obj, str) : str;
1247
+ }
1248
+ if (typeof obj === 'bigint') {
1249
+ var bigIntStr = String(obj) + 'n';
1250
+ return numericSeparator ? addNumericSeparator(obj, bigIntStr) : bigIntStr;
1251
+ }
1252
+
1253
+ var maxDepth = typeof opts.depth === 'undefined' ? 5 : opts.depth;
1254
+ if (typeof depth === 'undefined') { depth = 0; }
1255
+ if (depth >= maxDepth && maxDepth > 0 && typeof obj === 'object') {
1256
+ return isArray$3(obj) ? '[Array]' : '[Object]';
1257
+ }
1258
+
1259
+ var indent = getIndent(opts, depth);
1260
+
1261
+ if (typeof seen === 'undefined') {
1262
+ seen = [];
1263
+ } else if (indexOf(seen, obj) >= 0) {
1264
+ return '[Circular]';
1265
+ }
1266
+
1267
+ function inspect(value, from, noIndent) {
1268
+ if (from) {
1269
+ seen = $arrSlice.call(seen);
1270
+ seen.push(from);
1271
+ }
1272
+ if (noIndent) {
1273
+ var newOpts = {
1274
+ depth: opts.depth
1275
+ };
1276
+ if (has$3(opts, 'quoteStyle')) {
1277
+ newOpts.quoteStyle = opts.quoteStyle;
1278
+ }
1279
+ return inspect_(value, newOpts, depth + 1, seen);
1280
+ }
1281
+ return inspect_(value, opts, depth + 1, seen);
1282
+ }
1283
+
1284
+ if (typeof obj === 'function') {
1285
+ var name = nameOf(obj);
1286
+ var keys = arrObjKeys(obj, inspect);
1287
+ return '[Function' + (name ? ': ' + name : ' (anonymous)') + ']' + (keys.length > 0 ? ' { ' + $join.call(keys, ', ') + ' }' : '');
1288
+ }
1289
+ if (isSymbol(obj)) {
1290
+ var symString = hasShammedSymbols ? $replace.call(String(obj), /^(Symbol\(.*\))_[^)]*$/, '$1') : symToString.call(obj);
1291
+ return typeof obj === 'object' && !hasShammedSymbols ? markBoxed(symString) : symString;
1292
+ }
1293
+ if (isElement(obj)) {
1294
+ var s = '<' + $toLowerCase.call(String(obj.nodeName));
1295
+ var attrs = obj.attributes || [];
1296
+ for (var i = 0; i < attrs.length; i++) {
1297
+ s += ' ' + attrs[i].name + '=' + wrapQuotes(quote(attrs[i].value), 'double', opts);
1298
+ }
1299
+ s += '>';
1300
+ if (obj.childNodes && obj.childNodes.length) { s += '...'; }
1301
+ s += '</' + $toLowerCase.call(String(obj.nodeName)) + '>';
1302
+ return s;
1303
+ }
1304
+ if (isArray$3(obj)) {
1305
+ if (obj.length === 0) { return '[]'; }
1306
+ var xs = arrObjKeys(obj, inspect);
1307
+ if (indent && !singleLineValues(xs)) {
1308
+ return '[' + indentedJoin(xs, indent) + ']';
1309
+ }
1310
+ return '[ ' + $join.call(xs, ', ') + ' ]';
1311
+ }
1312
+ if (isError(obj)) {
1313
+ var parts = arrObjKeys(obj, inspect);
1314
+ if ('cause' in obj && !isEnumerable.call(obj, 'cause')) {
1315
+ return '{ [' + String(obj) + '] ' + $join.call($concat.call('[cause]: ' + inspect(obj.cause), parts), ', ') + ' }';
1316
+ }
1317
+ if (parts.length === 0) { return '[' + String(obj) + ']'; }
1318
+ return '{ [' + String(obj) + '] ' + $join.call(parts, ', ') + ' }';
1319
+ }
1320
+ if (typeof obj === 'object' && customInspect) {
1321
+ if (inspectSymbol && typeof obj[inspectSymbol] === 'function') {
1322
+ return obj[inspectSymbol]();
1323
+ } else if (customInspect !== 'symbol' && typeof obj.inspect === 'function') {
1324
+ return obj.inspect();
1325
+ }
1326
+ }
1327
+ if (isMap(obj)) {
1328
+ var mapParts = [];
1329
+ mapForEach.call(obj, function (value, key) {
1330
+ mapParts.push(inspect(key, obj, true) + ' => ' + inspect(value, obj));
1331
+ });
1332
+ return collectionOf('Map', mapSize.call(obj), mapParts, indent);
1333
+ }
1334
+ if (isSet(obj)) {
1335
+ var setParts = [];
1336
+ setForEach.call(obj, function (value) {
1337
+ setParts.push(inspect(value, obj));
1338
+ });
1339
+ return collectionOf('Set', setSize.call(obj), setParts, indent);
1340
+ }
1341
+ if (isWeakMap(obj)) {
1342
+ return weakCollectionOf('WeakMap');
1343
+ }
1344
+ if (isWeakSet(obj)) {
1345
+ return weakCollectionOf('WeakSet');
1346
+ }
1347
+ if (isWeakRef(obj)) {
1348
+ return weakCollectionOf('WeakRef');
1349
+ }
1350
+ if (isNumber(obj)) {
1351
+ return markBoxed(inspect(Number(obj)));
1352
+ }
1353
+ if (isBigInt(obj)) {
1354
+ return markBoxed(inspect(bigIntValueOf.call(obj)));
1355
+ }
1356
+ if (isBoolean(obj)) {
1357
+ return markBoxed(booleanValueOf.call(obj));
1358
+ }
1359
+ if (isString(obj)) {
1360
+ return markBoxed(inspect(String(obj)));
1361
+ }
1362
+ if (!isDate(obj) && !isRegExp$1(obj)) {
1363
+ var ys = arrObjKeys(obj, inspect);
1364
+ var isPlainObject = gPO ? gPO(obj) === Object.prototype : obj instanceof Object || obj.constructor === Object;
1365
+ var protoTag = obj instanceof Object ? '' : 'null prototype';
1366
+ var stringTag = !isPlainObject && toStringTag && Object(obj) === obj && toStringTag in obj ? $slice.call(toStr(obj), 8, -1) : protoTag ? 'Object' : '';
1367
+ var constructorTag = isPlainObject || typeof obj.constructor !== 'function' ? '' : obj.constructor.name ? obj.constructor.name + ' ' : '';
1368
+ var tag = constructorTag + (stringTag || protoTag ? '[' + $join.call($concat.call([], stringTag || [], protoTag || []), ': ') + '] ' : '');
1369
+ if (ys.length === 0) { return tag + '{}'; }
1370
+ if (indent) {
1371
+ return tag + '{' + indentedJoin(ys, indent) + '}';
1372
+ }
1373
+ return tag + '{ ' + $join.call(ys, ', ') + ' }';
1374
+ }
1375
+ return String(obj);
1376
+ };
1377
+
1378
+ function wrapQuotes(s, defaultStyle, opts) {
1379
+ var quoteChar = (opts.quoteStyle || defaultStyle) === 'double' ? '"' : "'";
1380
+ return quoteChar + s + quoteChar;
1381
+ }
1382
+
1383
+ function quote(s) {
1384
+ return $replace.call(String(s), /"/g, '&quot;');
1385
+ }
1386
+
1387
+ function isArray$3(obj) { return toStr(obj) === '[object Array]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1388
+ function isDate(obj) { return toStr(obj) === '[object Date]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1389
+ function isRegExp$1(obj) { return toStr(obj) === '[object RegExp]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1390
+ function isError(obj) { return toStr(obj) === '[object Error]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1391
+ function isString(obj) { return toStr(obj) === '[object String]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1392
+ function isNumber(obj) { return toStr(obj) === '[object Number]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1393
+ function isBoolean(obj) { return toStr(obj) === '[object Boolean]' && (!toStringTag || !(typeof obj === 'object' && toStringTag in obj)); }
1394
+
1395
+ // Symbol and BigInt do have Symbol.toStringTag by spec, so that can't be used to eliminate false positives
1396
+ function isSymbol(obj) {
1397
+ if (hasShammedSymbols) {
1398
+ return obj && typeof obj === 'object' && obj instanceof Symbol;
1399
+ }
1400
+ if (typeof obj === 'symbol') {
1401
+ return true;
1402
+ }
1403
+ if (!obj || typeof obj !== 'object' || !symToString) {
1404
+ return false;
1405
+ }
1406
+ try {
1407
+ symToString.call(obj);
1408
+ return true;
1409
+ } catch (e) {}
1410
+ return false;
1411
+ }
1412
+
1413
+ function isBigInt(obj) {
1414
+ if (!obj || typeof obj !== 'object' || !bigIntValueOf) {
1415
+ return false;
1416
+ }
1417
+ try {
1418
+ bigIntValueOf.call(obj);
1419
+ return true;
1420
+ } catch (e) {}
1421
+ return false;
1422
+ }
1423
+
1424
+ var hasOwn = Object.prototype.hasOwnProperty || function (key) { return key in this; };
1425
+ function has$3(obj, key) {
1426
+ return hasOwn.call(obj, key);
1427
+ }
1428
+
1429
+ function toStr(obj) {
1430
+ return objectToString.call(obj);
1431
+ }
1432
+
1433
+ function nameOf(f) {
1434
+ if (f.name) { return f.name; }
1435
+ var m = $match.call(functionToString.call(f), /^function\s*([\w$]+)/);
1436
+ if (m) { return m[1]; }
1437
+ return null;
1438
+ }
1439
+
1440
+ function indexOf(xs, x) {
1441
+ if (xs.indexOf) { return xs.indexOf(x); }
1442
+ for (var i = 0, l = xs.length; i < l; i++) {
1443
+ if (xs[i] === x) { return i; }
1444
+ }
1445
+ return -1;
1446
+ }
1447
+
1448
+ function isMap(x) {
1449
+ if (!mapSize || !x || typeof x !== 'object') {
1450
+ return false;
1451
+ }
1452
+ try {
1453
+ mapSize.call(x);
1454
+ try {
1455
+ setSize.call(x);
1456
+ } catch (s) {
1457
+ return true;
1458
+ }
1459
+ return x instanceof Map; // core-js workaround, pre-v2.5.0
1460
+ } catch (e) {}
1461
+ return false;
1462
+ }
1463
+
1464
+ function isWeakMap(x) {
1465
+ if (!weakMapHas || !x || typeof x !== 'object') {
1466
+ return false;
1467
+ }
1468
+ try {
1469
+ weakMapHas.call(x, weakMapHas);
1470
+ try {
1471
+ weakSetHas.call(x, weakSetHas);
1472
+ } catch (s) {
1473
+ return true;
1474
+ }
1475
+ return x instanceof WeakMap; // core-js workaround, pre-v2.5.0
1476
+ } catch (e) {}
1477
+ return false;
1478
+ }
1479
+
1480
+ function isWeakRef(x) {
1481
+ if (!weakRefDeref || !x || typeof x !== 'object') {
1482
+ return false;
1483
+ }
1484
+ try {
1485
+ weakRefDeref.call(x);
1486
+ return true;
1487
+ } catch (e) {}
1488
+ return false;
1489
+ }
1490
+
1491
+ function isSet(x) {
1492
+ if (!setSize || !x || typeof x !== 'object') {
1493
+ return false;
1494
+ }
1495
+ try {
1496
+ setSize.call(x);
1497
+ try {
1498
+ mapSize.call(x);
1499
+ } catch (m) {
1500
+ return true;
1501
+ }
1502
+ return x instanceof Set; // core-js workaround, pre-v2.5.0
1503
+ } catch (e) {}
1504
+ return false;
1505
+ }
1506
+
1507
+ function isWeakSet(x) {
1508
+ if (!weakSetHas || !x || typeof x !== 'object') {
1509
+ return false;
1510
+ }
1511
+ try {
1512
+ weakSetHas.call(x, weakSetHas);
1513
+ try {
1514
+ weakMapHas.call(x, weakMapHas);
1515
+ } catch (s) {
1516
+ return true;
1517
+ }
1518
+ return x instanceof WeakSet; // core-js workaround, pre-v2.5.0
1519
+ } catch (e) {}
1520
+ return false;
1521
+ }
1522
+
1523
+ function isElement(x) {
1524
+ if (!x || typeof x !== 'object') { return false; }
1525
+ if (typeof HTMLElement !== 'undefined' && x instanceof HTMLElement) {
1526
+ return true;
1527
+ }
1528
+ return typeof x.nodeName === 'string' && typeof x.getAttribute === 'function';
1529
+ }
1530
+
1531
+ function inspectString(str, opts) {
1532
+ if (str.length > opts.maxStringLength) {
1533
+ var remaining = str.length - opts.maxStringLength;
1534
+ var trailer = '... ' + remaining + ' more character' + (remaining > 1 ? 's' : '');
1535
+ return inspectString($slice.call(str, 0, opts.maxStringLength), opts) + trailer;
1536
+ }
1537
+ // eslint-disable-next-line no-control-regex
1538
+ var s = $replace.call($replace.call(str, /(['\\])/g, '\\$1'), /[\x00-\x1f]/g, lowbyte);
1539
+ return wrapQuotes(s, 'single', opts);
1540
+ }
1541
+
1542
+ function lowbyte(c) {
1543
+ var n = c.charCodeAt(0);
1544
+ var x = {
1545
+ 8: 'b',
1546
+ 9: 't',
1547
+ 10: 'n',
1548
+ 12: 'f',
1549
+ 13: 'r'
1550
+ }[n];
1551
+ if (x) { return '\\' + x; }
1552
+ return '\\x' + (n < 0x10 ? '0' : '') + $toUpperCase.call(n.toString(16));
1553
+ }
1554
+
1555
+ function markBoxed(str) {
1556
+ return 'Object(' + str + ')';
1557
+ }
1558
+
1559
+ function weakCollectionOf(type) {
1560
+ return type + ' { ? }';
1561
+ }
1562
+
1563
+ function collectionOf(type, size, entries, indent) {
1564
+ var joinedEntries = indent ? indentedJoin(entries, indent) : $join.call(entries, ', ');
1565
+ return type + ' (' + size + ') {' + joinedEntries + '}';
1566
+ }
1567
+
1568
+ function singleLineValues(xs) {
1569
+ for (var i = 0; i < xs.length; i++) {
1570
+ if (indexOf(xs[i], '\n') >= 0) {
1571
+ return false;
1572
+ }
1573
+ }
1574
+ return true;
1575
+ }
1576
+
1577
+ function getIndent(opts, depth) {
1578
+ var baseIndent;
1579
+ if (opts.indent === '\t') {
1580
+ baseIndent = '\t';
1581
+ } else if (typeof opts.indent === 'number' && opts.indent > 0) {
1582
+ baseIndent = $join.call(Array(opts.indent + 1), ' ');
1583
+ } else {
1584
+ return null;
1585
+ }
1586
+ return {
1587
+ base: baseIndent,
1588
+ prev: $join.call(Array(depth + 1), baseIndent)
1589
+ };
1590
+ }
1591
+
1592
+ function indentedJoin(xs, indent) {
1593
+ if (xs.length === 0) { return ''; }
1594
+ var lineJoiner = '\n' + indent.prev + indent.base;
1595
+ return lineJoiner + $join.call(xs, ',' + lineJoiner) + '\n' + indent.prev;
1596
+ }
1597
+
1598
+ function arrObjKeys(obj, inspect) {
1599
+ var isArr = isArray$3(obj);
1600
+ var xs = [];
1601
+ if (isArr) {
1602
+ xs.length = obj.length;
1603
+ for (var i = 0; i < obj.length; i++) {
1604
+ xs[i] = has$3(obj, i) ? inspect(obj[i], obj) : '';
1605
+ }
1606
+ }
1607
+ var syms = typeof gOPS === 'function' ? gOPS(obj) : [];
1608
+ var symMap;
1609
+ if (hasShammedSymbols) {
1610
+ symMap = {};
1611
+ for (var k = 0; k < syms.length; k++) {
1612
+ symMap['$' + syms[k]] = syms[k];
1613
+ }
1614
+ }
1615
+
1616
+ for (var key in obj) { // eslint-disable-line no-restricted-syntax
1617
+ if (!has$3(obj, key)) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1618
+ if (isArr && String(Number(key)) === key && key < obj.length) { continue; } // eslint-disable-line no-restricted-syntax, no-continue
1619
+ if (hasShammedSymbols && symMap['$' + key] instanceof Symbol) {
1620
+ // this is to prevent shammed Symbols, which are stored as strings, from being included in the string key section
1621
+ continue; // eslint-disable-line no-restricted-syntax, no-continue
1622
+ } else if ($test.call(/[^\w$]/, key)) {
1623
+ xs.push(inspect(key, obj) + ': ' + inspect(obj[key], obj));
1624
+ } else {
1625
+ xs.push(key + ': ' + inspect(obj[key], obj));
1626
+ }
1627
+ }
1628
+ if (typeof gOPS === 'function') {
1629
+ for (var j = 0; j < syms.length; j++) {
1630
+ if (isEnumerable.call(obj, syms[j])) {
1631
+ xs.push('[' + inspect(syms[j]) + ']: ' + inspect(obj[syms[j]], obj));
1632
+ }
1633
+ }
1634
+ }
1635
+ return xs;
1636
+ }
1637
+
1638
+ var GetIntrinsic = getIntrinsic;
1639
+ var callBound = callBound$1;
1640
+ var inspect = objectInspect;
1641
+
1642
+ var $TypeError = GetIntrinsic('%TypeError%');
1643
+ var $WeakMap = GetIntrinsic('%WeakMap%', true);
1644
+ var $Map = GetIntrinsic('%Map%', true);
1645
+
1646
+ var $weakMapGet = callBound('WeakMap.prototype.get', true);
1647
+ var $weakMapSet = callBound('WeakMap.prototype.set', true);
1648
+ var $weakMapHas = callBound('WeakMap.prototype.has', true);
1649
+ var $mapGet = callBound('Map.prototype.get', true);
1650
+ var $mapSet = callBound('Map.prototype.set', true);
1651
+ var $mapHas = callBound('Map.prototype.has', true);
1652
+
1653
+ /*
1654
+ * This function traverses the list returning the node corresponding to the
1655
+ * given key.
1656
+ *
1657
+ * That node is also moved to the head of the list, so that if it's accessed
1658
+ * again we don't need to traverse the whole list. By doing so, all the recently
1659
+ * used nodes can be accessed relatively quickly.
1660
+ */
1661
+ var listGetNode = function (list, key) { // eslint-disable-line consistent-return
1662
+ for (var prev = list, curr; (curr = prev.next) !== null; prev = curr) {
1663
+ if (curr.key === key) {
1664
+ prev.next = curr.next;
1665
+ curr.next = list.next;
1666
+ list.next = curr; // eslint-disable-line no-param-reassign
1667
+ return curr;
1668
+ }
1669
+ }
1670
+ };
1671
+
1672
+ var listGet = function (objects, key) {
1673
+ var node = listGetNode(objects, key);
1674
+ return node && node.value;
1675
+ };
1676
+ var listSet = function (objects, key, value) {
1677
+ var node = listGetNode(objects, key);
1678
+ if (node) {
1679
+ node.value = value;
1680
+ } else {
1681
+ // Prepend the new node to the beginning of the list
1682
+ objects.next = { // eslint-disable-line no-param-reassign
1683
+ key: key,
1684
+ next: objects.next,
1685
+ value: value
1686
+ };
1687
+ }
1688
+ };
1689
+ var listHas = function (objects, key) {
1690
+ return !!listGetNode(objects, key);
1691
+ };
1692
+
1693
+ var sideChannel = function getSideChannel() {
1694
+ var $wm;
1695
+ var $m;
1696
+ var $o;
1697
+ var channel = {
1698
+ assert: function (key) {
1699
+ if (!channel.has(key)) {
1700
+ throw new $TypeError('Side channel does not contain ' + inspect(key));
1701
+ }
1702
+ },
1703
+ get: function (key) { // eslint-disable-line consistent-return
1704
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1705
+ if ($wm) {
1706
+ return $weakMapGet($wm, key);
1707
+ }
1708
+ } else if ($Map) {
1709
+ if ($m) {
1710
+ return $mapGet($m, key);
1711
+ }
1712
+ } else {
1713
+ if ($o) { // eslint-disable-line no-lonely-if
1714
+ return listGet($o, key);
1715
+ }
1716
+ }
1717
+ },
1718
+ has: function (key) {
1719
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1720
+ if ($wm) {
1721
+ return $weakMapHas($wm, key);
1722
+ }
1723
+ } else if ($Map) {
1724
+ if ($m) {
1725
+ return $mapHas($m, key);
1726
+ }
1727
+ } else {
1728
+ if ($o) { // eslint-disable-line no-lonely-if
1729
+ return listHas($o, key);
1730
+ }
1731
+ }
1732
+ return false;
1733
+ },
1734
+ set: function (key, value) {
1735
+ if ($WeakMap && key && (typeof key === 'object' || typeof key === 'function')) {
1736
+ if (!$wm) {
1737
+ $wm = new $WeakMap();
1738
+ }
1739
+ $weakMapSet($wm, key, value);
1740
+ } else if ($Map) {
1741
+ if (!$m) {
1742
+ $m = new $Map();
1743
+ }
1744
+ $mapSet($m, key, value);
1745
+ } else {
1746
+ if (!$o) {
1747
+ /*
1748
+ * Initialize the linked list as an empty node, so that we don't have
1749
+ * to special-case handling of the first node: we can always refer to
1750
+ * it as (previous node).next, instead of something like (list).head
1751
+ */
1752
+ $o = { key: {}, next: null };
1753
+ }
1754
+ listSet($o, key, value);
1755
+ }
1756
+ }
1757
+ };
1758
+ return channel;
1759
+ };
1760
+
1761
+ var replace = String.prototype.replace;
1762
+ var percentTwenties = /%20/g;
1763
+
1764
+ var Format = {
1765
+ RFC1738: 'RFC1738',
1766
+ RFC3986: 'RFC3986'
1767
+ };
1768
+
1769
+ var formats$3 = {
1770
+ 'default': Format.RFC3986,
1771
+ formatters: {
1772
+ RFC1738: function (value) {
1773
+ return replace.call(value, percentTwenties, '+');
1774
+ },
1775
+ RFC3986: function (value) {
1776
+ return String(value);
1777
+ }
1778
+ },
1779
+ RFC1738: Format.RFC1738,
1780
+ RFC3986: Format.RFC3986
1781
+ };
1782
+
1783
+ var formats$2 = formats$3;
1784
+
1785
+ var has$2 = Object.prototype.hasOwnProperty;
1786
+ var isArray$2 = Array.isArray;
1787
+
1788
+ var hexTable = (function () {
1789
+ var array = [];
1790
+ for (var i = 0; i < 256; ++i) {
1791
+ array.push('%' + ((i < 16 ? '0' : '') + i.toString(16)).toUpperCase());
1792
+ }
1793
+
1794
+ return array;
1795
+ }());
1796
+
1797
+ var compactQueue = function compactQueue(queue) {
1798
+ while (queue.length > 1) {
1799
+ var item = queue.pop();
1800
+ var obj = item.obj[item.prop];
1801
+
1802
+ if (isArray$2(obj)) {
1803
+ var compacted = [];
1804
+
1805
+ for (var j = 0; j < obj.length; ++j) {
1806
+ if (typeof obj[j] !== 'undefined') {
1807
+ compacted.push(obj[j]);
1808
+ }
1809
+ }
1810
+
1811
+ item.obj[item.prop] = compacted;
1812
+ }
1813
+ }
1814
+ };
1815
+
1816
+ var arrayToObject = function arrayToObject(source, options) {
1817
+ var obj = options && options.plainObjects ? Object.create(null) : {};
1818
+ for (var i = 0; i < source.length; ++i) {
1819
+ if (typeof source[i] !== 'undefined') {
1820
+ obj[i] = source[i];
1821
+ }
1822
+ }
1823
+
1824
+ return obj;
1825
+ };
1826
+
1827
+ var merge = function merge(target, source, options) {
1828
+ /* eslint no-param-reassign: 0 */
1829
+ if (!source) {
1830
+ return target;
1831
+ }
1832
+
1833
+ if (typeof source !== 'object') {
1834
+ if (isArray$2(target)) {
1835
+ target.push(source);
1836
+ } else if (target && typeof target === 'object') {
1837
+ if ((options && (options.plainObjects || options.allowPrototypes)) || !has$2.call(Object.prototype, source)) {
1838
+ target[source] = true;
1839
+ }
1840
+ } else {
1841
+ return [target, source];
1842
+ }
1843
+
1844
+ return target;
1845
+ }
1846
+
1847
+ if (!target || typeof target !== 'object') {
1848
+ return [target].concat(source);
1849
+ }
1850
+
1851
+ var mergeTarget = target;
1852
+ if (isArray$2(target) && !isArray$2(source)) {
1853
+ mergeTarget = arrayToObject(target, options);
1854
+ }
1855
+
1856
+ if (isArray$2(target) && isArray$2(source)) {
1857
+ source.forEach(function (item, i) {
1858
+ if (has$2.call(target, i)) {
1859
+ var targetItem = target[i];
1860
+ if (targetItem && typeof targetItem === 'object' && item && typeof item === 'object') {
1861
+ target[i] = merge(targetItem, item, options);
1862
+ } else {
1863
+ target.push(item);
1864
+ }
1865
+ } else {
1866
+ target[i] = item;
1867
+ }
1868
+ });
1869
+ return target;
1870
+ }
1871
+
1872
+ return Object.keys(source).reduce(function (acc, key) {
1873
+ var value = source[key];
1874
+
1875
+ if (has$2.call(acc, key)) {
1876
+ acc[key] = merge(acc[key], value, options);
1877
+ } else {
1878
+ acc[key] = value;
1879
+ }
1880
+ return acc;
1881
+ }, mergeTarget);
1882
+ };
1883
+
1884
+ var assign = function assignSingleSource(target, source) {
1885
+ return Object.keys(source).reduce(function (acc, key) {
1886
+ acc[key] = source[key];
1887
+ return acc;
1888
+ }, target);
1889
+ };
1890
+
1891
+ var decode = function (str, decoder, charset) {
1892
+ var strWithoutPlus = str.replace(/\+/g, ' ');
1893
+ if (charset === 'iso-8859-1') {
1894
+ // unescape never throws, no try...catch needed:
1895
+ return strWithoutPlus.replace(/%[0-9a-f]{2}/gi, unescape);
1896
+ }
1897
+ // utf-8
1898
+ try {
1899
+ return decodeURIComponent(strWithoutPlus);
1900
+ } catch (e) {
1901
+ return strWithoutPlus;
1902
+ }
1903
+ };
1904
+
1905
+ var encode = function encode(str, defaultEncoder, charset, kind, format) {
1906
+ // This code was originally written by Brian White (mscdex) for the io.js core querystring library.
1907
+ // It has been adapted here for stricter adherence to RFC 3986
1908
+ if (str.length === 0) {
1909
+ return str;
1910
+ }
1911
+
1912
+ var string = str;
1913
+ if (typeof str === 'symbol') {
1914
+ string = Symbol.prototype.toString.call(str);
1915
+ } else if (typeof str !== 'string') {
1916
+ string = String(str);
1917
+ }
1918
+
1919
+ if (charset === 'iso-8859-1') {
1920
+ return escape(string).replace(/%u[0-9a-f]{4}/gi, function ($0) {
1921
+ return '%26%23' + parseInt($0.slice(2), 16) + '%3B';
1922
+ });
1923
+ }
1924
+
1925
+ var out = '';
1926
+ for (var i = 0; i < string.length; ++i) {
1927
+ var c = string.charCodeAt(i);
1928
+
1929
+ if (
1930
+ c === 0x2D // -
1931
+ || c === 0x2E // .
1932
+ || c === 0x5F // _
1933
+ || c === 0x7E // ~
1934
+ || (c >= 0x30 && c <= 0x39) // 0-9
1935
+ || (c >= 0x41 && c <= 0x5A) // a-z
1936
+ || (c >= 0x61 && c <= 0x7A) // A-Z
1937
+ || (format === formats$2.RFC1738 && (c === 0x28 || c === 0x29)) // ( )
1938
+ ) {
1939
+ out += string.charAt(i);
1940
+ continue;
1941
+ }
1942
+
1943
+ if (c < 0x80) {
1944
+ out = out + hexTable[c];
1945
+ continue;
1946
+ }
1947
+
1948
+ if (c < 0x800) {
1949
+ out = out + (hexTable[0xC0 | (c >> 6)] + hexTable[0x80 | (c & 0x3F)]);
1950
+ continue;
1951
+ }
1952
+
1953
+ if (c < 0xD800 || c >= 0xE000) {
1954
+ out = out + (hexTable[0xE0 | (c >> 12)] + hexTable[0x80 | ((c >> 6) & 0x3F)] + hexTable[0x80 | (c & 0x3F)]);
1955
+ continue;
1956
+ }
1957
+
1958
+ i += 1;
1959
+ c = 0x10000 + (((c & 0x3FF) << 10) | (string.charCodeAt(i) & 0x3FF));
1960
+ /* eslint operator-linebreak: [2, "before"] */
1961
+ out += hexTable[0xF0 | (c >> 18)]
1962
+ + hexTable[0x80 | ((c >> 12) & 0x3F)]
1963
+ + hexTable[0x80 | ((c >> 6) & 0x3F)]
1964
+ + hexTable[0x80 | (c & 0x3F)];
1965
+ }
1966
+
1967
+ return out;
1968
+ };
1969
+
1970
+ var compact = function compact(value) {
1971
+ var queue = [{ obj: { o: value }, prop: 'o' }];
1972
+ var refs = [];
1973
+
1974
+ for (var i = 0; i < queue.length; ++i) {
1975
+ var item = queue[i];
1976
+ var obj = item.obj[item.prop];
1977
+
1978
+ var keys = Object.keys(obj);
1979
+ for (var j = 0; j < keys.length; ++j) {
1980
+ var key = keys[j];
1981
+ var val = obj[key];
1982
+ if (typeof val === 'object' && val !== null && refs.indexOf(val) === -1) {
1983
+ queue.push({ obj: obj, prop: key });
1984
+ refs.push(val);
1985
+ }
1986
+ }
1987
+ }
1988
+
1989
+ compactQueue(queue);
1990
+
1991
+ return value;
1992
+ };
1993
+
1994
+ var isRegExp = function isRegExp(obj) {
1995
+ return Object.prototype.toString.call(obj) === '[object RegExp]';
1996
+ };
1997
+
1998
+ var isBuffer = function isBuffer(obj) {
1999
+ if (!obj || typeof obj !== 'object') {
2000
+ return false;
2001
+ }
2002
+
2003
+ return !!(obj.constructor && obj.constructor.isBuffer && obj.constructor.isBuffer(obj));
2004
+ };
2005
+
2006
+ var combine = function combine(a, b) {
2007
+ return [].concat(a, b);
2008
+ };
2009
+
2010
+ var maybeMap = function maybeMap(val, fn) {
2011
+ if (isArray$2(val)) {
2012
+ var mapped = [];
2013
+ for (var i = 0; i < val.length; i += 1) {
2014
+ mapped.push(fn(val[i]));
2015
+ }
2016
+ return mapped;
2017
+ }
2018
+ return fn(val);
2019
+ };
2020
+
2021
+ var utils$2 = {
2022
+ arrayToObject: arrayToObject,
2023
+ assign: assign,
2024
+ combine: combine,
2025
+ compact: compact,
2026
+ decode: decode,
2027
+ encode: encode,
2028
+ isBuffer: isBuffer,
2029
+ isRegExp: isRegExp,
2030
+ maybeMap: maybeMap,
2031
+ merge: merge
2032
+ };
2033
+
2034
+ var getSideChannel = sideChannel;
2035
+ var utils$1 = utils$2;
2036
+ var formats$1 = formats$3;
2037
+ var has$1 = Object.prototype.hasOwnProperty;
2038
+
2039
+ var arrayPrefixGenerators = {
2040
+ brackets: function brackets(prefix) {
2041
+ return prefix + '[]';
2042
+ },
2043
+ comma: 'comma',
2044
+ indices: function indices(prefix, key) {
2045
+ return prefix + '[' + key + ']';
2046
+ },
2047
+ repeat: function repeat(prefix) {
2048
+ return prefix;
2049
+ }
2050
+ };
2051
+
2052
+ var isArray$1 = Array.isArray;
2053
+ var split = String.prototype.split;
2054
+ var push = Array.prototype.push;
2055
+ var pushToArray = function (arr, valueOrArray) {
2056
+ push.apply(arr, isArray$1(valueOrArray) ? valueOrArray : [valueOrArray]);
2057
+ };
2058
+
2059
+ var toISO = Date.prototype.toISOString;
2060
+
2061
+ var defaultFormat = formats$1['default'];
2062
+ var defaults$1 = {
2063
+ addQueryPrefix: false,
2064
+ allowDots: false,
2065
+ charset: 'utf-8',
2066
+ charsetSentinel: false,
2067
+ delimiter: '&',
2068
+ encode: true,
2069
+ encoder: utils$1.encode,
2070
+ encodeValuesOnly: false,
2071
+ format: defaultFormat,
2072
+ formatter: formats$1.formatters[defaultFormat],
2073
+ // deprecated
2074
+ indices: false,
2075
+ serializeDate: function serializeDate(date) {
2076
+ return toISO.call(date);
2077
+ },
2078
+ skipNulls: false,
2079
+ strictNullHandling: false
2080
+ };
2081
+
2082
+ var isNonNullishPrimitive = function isNonNullishPrimitive(v) {
2083
+ return typeof v === 'string'
2084
+ || typeof v === 'number'
2085
+ || typeof v === 'boolean'
2086
+ || typeof v === 'symbol'
2087
+ || typeof v === 'bigint';
2088
+ };
2089
+
2090
+ var sentinel = {};
2091
+
2092
+ var stringify$1 = function stringify(
2093
+ object,
2094
+ prefix,
2095
+ generateArrayPrefix,
2096
+ commaRoundTrip,
2097
+ strictNullHandling,
2098
+ skipNulls,
2099
+ encoder,
2100
+ filter,
2101
+ sort,
2102
+ allowDots,
2103
+ serializeDate,
2104
+ format,
2105
+ formatter,
2106
+ encodeValuesOnly,
2107
+ charset,
2108
+ sideChannel
2109
+ ) {
2110
+ var obj = object;
2111
+
2112
+ var tmpSc = sideChannel;
2113
+ var step = 0;
2114
+ var findFlag = false;
2115
+ while ((tmpSc = tmpSc.get(sentinel)) !== void undefined && !findFlag) {
2116
+ // Where object last appeared in the ref tree
2117
+ var pos = tmpSc.get(object);
2118
+ step += 1;
2119
+ if (typeof pos !== 'undefined') {
2120
+ if (pos === step) {
2121
+ throw new RangeError('Cyclic object value');
2122
+ } else {
2123
+ findFlag = true; // Break while
2124
+ }
2125
+ }
2126
+ if (typeof tmpSc.get(sentinel) === 'undefined') {
2127
+ step = 0;
2128
+ }
2129
+ }
2130
+
2131
+ if (typeof filter === 'function') {
2132
+ obj = filter(prefix, obj);
2133
+ } else if (obj instanceof Date) {
2134
+ obj = serializeDate(obj);
2135
+ } else if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2136
+ obj = utils$1.maybeMap(obj, function (value) {
2137
+ if (value instanceof Date) {
2138
+ return serializeDate(value);
2139
+ }
2140
+ return value;
2141
+ });
2142
+ }
2143
+
2144
+ if (obj === null) {
2145
+ if (strictNullHandling) {
2146
+ return encoder && !encodeValuesOnly ? encoder(prefix, defaults$1.encoder, charset, 'key', format) : prefix;
2147
+ }
2148
+
2149
+ obj = '';
2150
+ }
2151
+
2152
+ if (isNonNullishPrimitive(obj) || utils$1.isBuffer(obj)) {
2153
+ if (encoder) {
2154
+ var keyValue = encodeValuesOnly ? prefix : encoder(prefix, defaults$1.encoder, charset, 'key', format);
2155
+ if (generateArrayPrefix === 'comma' && encodeValuesOnly) {
2156
+ var valuesArray = split.call(String(obj), ',');
2157
+ var valuesJoined = '';
2158
+ for (var i = 0; i < valuesArray.length; ++i) {
2159
+ valuesJoined += (i === 0 ? '' : ',') + formatter(encoder(valuesArray[i], defaults$1.encoder, charset, 'value', format));
2160
+ }
2161
+ return [formatter(keyValue) + (commaRoundTrip && isArray$1(obj) && valuesArray.length === 1 ? '[]' : '') + '=' + valuesJoined];
2162
+ }
2163
+ return [formatter(keyValue) + '=' + formatter(encoder(obj, defaults$1.encoder, charset, 'value', format))];
2164
+ }
2165
+ return [formatter(prefix) + '=' + formatter(String(obj))];
2166
+ }
2167
+
2168
+ var values = [];
2169
+
2170
+ if (typeof obj === 'undefined') {
2171
+ return values;
2172
+ }
2173
+
2174
+ var objKeys;
2175
+ if (generateArrayPrefix === 'comma' && isArray$1(obj)) {
2176
+ // we need to join elements in
2177
+ objKeys = [{ value: obj.length > 0 ? obj.join(',') || null : void undefined }];
2178
+ } else if (isArray$1(filter)) {
2179
+ objKeys = filter;
2180
+ } else {
2181
+ var keys = Object.keys(obj);
2182
+ objKeys = sort ? keys.sort(sort) : keys;
2183
+ }
2184
+
2185
+ var adjustedPrefix = commaRoundTrip && isArray$1(obj) && obj.length === 1 ? prefix + '[]' : prefix;
2186
+
2187
+ for (var j = 0; j < objKeys.length; ++j) {
2188
+ var key = objKeys[j];
2189
+ var value = typeof key === 'object' && typeof key.value !== 'undefined' ? key.value : obj[key];
2190
+
2191
+ if (skipNulls && value === null) {
2192
+ continue;
2193
+ }
2194
+
2195
+ var keyPrefix = isArray$1(obj)
2196
+ ? typeof generateArrayPrefix === 'function' ? generateArrayPrefix(adjustedPrefix, key) : adjustedPrefix
2197
+ : adjustedPrefix + (allowDots ? '.' + key : '[' + key + ']');
2198
+
2199
+ sideChannel.set(object, step);
2200
+ var valueSideChannel = getSideChannel();
2201
+ valueSideChannel.set(sentinel, sideChannel);
2202
+ pushToArray(values, stringify(
2203
+ value,
2204
+ keyPrefix,
2205
+ generateArrayPrefix,
2206
+ commaRoundTrip,
2207
+ strictNullHandling,
2208
+ skipNulls,
2209
+ encoder,
2210
+ filter,
2211
+ sort,
2212
+ allowDots,
2213
+ serializeDate,
2214
+ format,
2215
+ formatter,
2216
+ encodeValuesOnly,
2217
+ charset,
2218
+ valueSideChannel
2219
+ ));
2220
+ }
2221
+
2222
+ return values;
2223
+ };
2224
+
2225
+ var normalizeStringifyOptions = function normalizeStringifyOptions(opts) {
2226
+ if (!opts) {
2227
+ return defaults$1;
2228
+ }
2229
+
2230
+ if (opts.encoder !== null && typeof opts.encoder !== 'undefined' && typeof opts.encoder !== 'function') {
2231
+ throw new TypeError('Encoder has to be a function.');
2232
+ }
2233
+
2234
+ var charset = opts.charset || defaults$1.charset;
2235
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2236
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2237
+ }
2238
+
2239
+ var format = formats$1['default'];
2240
+ if (typeof opts.format !== 'undefined') {
2241
+ if (!has$1.call(formats$1.formatters, opts.format)) {
2242
+ throw new TypeError('Unknown format option provided.');
2243
+ }
2244
+ format = opts.format;
2245
+ }
2246
+ var formatter = formats$1.formatters[format];
2247
+
2248
+ var filter = defaults$1.filter;
2249
+ if (typeof opts.filter === 'function' || isArray$1(opts.filter)) {
2250
+ filter = opts.filter;
2251
+ }
2252
+
2253
+ return {
2254
+ addQueryPrefix: typeof opts.addQueryPrefix === 'boolean' ? opts.addQueryPrefix : defaults$1.addQueryPrefix,
2255
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults$1.allowDots : !!opts.allowDots,
2256
+ charset: charset,
2257
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults$1.charsetSentinel,
2258
+ delimiter: typeof opts.delimiter === 'undefined' ? defaults$1.delimiter : opts.delimiter,
2259
+ encode: typeof opts.encode === 'boolean' ? opts.encode : defaults$1.encode,
2260
+ encoder: typeof opts.encoder === 'function' ? opts.encoder : defaults$1.encoder,
2261
+ encodeValuesOnly: typeof opts.encodeValuesOnly === 'boolean' ? opts.encodeValuesOnly : defaults$1.encodeValuesOnly,
2262
+ filter: filter,
2263
+ format: format,
2264
+ formatter: formatter,
2265
+ serializeDate: typeof opts.serializeDate === 'function' ? opts.serializeDate : defaults$1.serializeDate,
2266
+ skipNulls: typeof opts.skipNulls === 'boolean' ? opts.skipNulls : defaults$1.skipNulls,
2267
+ sort: typeof opts.sort === 'function' ? opts.sort : null,
2268
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults$1.strictNullHandling
2269
+ };
2270
+ };
2271
+
2272
+ var stringify_1 = function (object, opts) {
2273
+ var obj = object;
2274
+ var options = normalizeStringifyOptions(opts);
2275
+
2276
+ var objKeys;
2277
+ var filter;
2278
+
2279
+ if (typeof options.filter === 'function') {
2280
+ filter = options.filter;
2281
+ obj = filter('', obj);
2282
+ } else if (isArray$1(options.filter)) {
2283
+ filter = options.filter;
2284
+ objKeys = filter;
2285
+ }
2286
+
2287
+ var keys = [];
2288
+
2289
+ if (typeof obj !== 'object' || obj === null) {
2290
+ return '';
2291
+ }
2292
+
2293
+ var arrayFormat;
2294
+ if (opts && opts.arrayFormat in arrayPrefixGenerators) {
2295
+ arrayFormat = opts.arrayFormat;
2296
+ } else if (opts && 'indices' in opts) {
2297
+ arrayFormat = opts.indices ? 'indices' : 'repeat';
2298
+ } else {
2299
+ arrayFormat = 'indices';
2300
+ }
2301
+
2302
+ var generateArrayPrefix = arrayPrefixGenerators[arrayFormat];
2303
+ if (opts && 'commaRoundTrip' in opts && typeof opts.commaRoundTrip !== 'boolean') {
2304
+ throw new TypeError('`commaRoundTrip` must be a boolean, or absent');
2305
+ }
2306
+ var commaRoundTrip = generateArrayPrefix === 'comma' && opts && opts.commaRoundTrip;
2307
+
2308
+ if (!objKeys) {
2309
+ objKeys = Object.keys(obj);
2310
+ }
2311
+
2312
+ if (options.sort) {
2313
+ objKeys.sort(options.sort);
2314
+ }
2315
+
2316
+ var sideChannel = getSideChannel();
2317
+ for (var i = 0; i < objKeys.length; ++i) {
2318
+ var key = objKeys[i];
2319
+
2320
+ if (options.skipNulls && obj[key] === null) {
2321
+ continue;
2322
+ }
2323
+ pushToArray(keys, stringify$1(
2324
+ obj[key],
2325
+ key,
2326
+ generateArrayPrefix,
2327
+ commaRoundTrip,
2328
+ options.strictNullHandling,
2329
+ options.skipNulls,
2330
+ options.encode ? options.encoder : null,
2331
+ options.filter,
2332
+ options.sort,
2333
+ options.allowDots,
2334
+ options.serializeDate,
2335
+ options.format,
2336
+ options.formatter,
2337
+ options.encodeValuesOnly,
2338
+ options.charset,
2339
+ sideChannel
2340
+ ));
2341
+ }
2342
+
2343
+ var joined = keys.join(options.delimiter);
2344
+ var prefix = options.addQueryPrefix === true ? '?' : '';
2345
+
2346
+ if (options.charsetSentinel) {
2347
+ if (options.charset === 'iso-8859-1') {
2348
+ // encodeURIComponent('&#10003;'), the "numeric entity" representation of a checkmark
2349
+ prefix += 'utf8=%26%2310003%3B&';
2350
+ } else {
2351
+ // encodeURIComponent('✓')
2352
+ prefix += 'utf8=%E2%9C%93&';
2353
+ }
2354
+ }
2355
+
2356
+ return joined.length > 0 ? prefix + joined : '';
2357
+ };
2358
+
2359
+ var utils = utils$2;
2360
+
2361
+ var has = Object.prototype.hasOwnProperty;
2362
+ var isArray = Array.isArray;
2363
+
2364
+ var defaults = {
2365
+ allowDots: false,
2366
+ allowPrototypes: false,
2367
+ allowSparse: false,
2368
+ arrayLimit: 20,
2369
+ charset: 'utf-8',
2370
+ charsetSentinel: false,
2371
+ comma: false,
2372
+ decoder: utils.decode,
2373
+ delimiter: '&',
2374
+ depth: 5,
2375
+ ignoreQueryPrefix: false,
2376
+ interpretNumericEntities: false,
2377
+ parameterLimit: 1000,
2378
+ parseArrays: true,
2379
+ plainObjects: false,
2380
+ strictNullHandling: false
2381
+ };
2382
+
2383
+ var interpretNumericEntities = function (str) {
2384
+ return str.replace(/&#(\d+);/g, function ($0, numberStr) {
2385
+ return String.fromCharCode(parseInt(numberStr, 10));
2386
+ });
2387
+ };
2388
+
2389
+ var parseArrayValue = function (val, options) {
2390
+ if (val && typeof val === 'string' && options.comma && val.indexOf(',') > -1) {
2391
+ return val.split(',');
2392
+ }
2393
+
2394
+ return val;
2395
+ };
2396
+
2397
+ // This is what browsers will submit when the ✓ character occurs in an
2398
+ // application/x-www-form-urlencoded body and the encoding of the page containing
2399
+ // the form is iso-8859-1, or when the submitted form has an accept-charset
2400
+ // attribute of iso-8859-1. Presumably also with other charsets that do not contain
2401
+ // the ✓ character, such as us-ascii.
2402
+ var isoSentinel = 'utf8=%26%2310003%3B'; // encodeURIComponent('&#10003;')
2403
+
2404
+ // These are the percent-encoded utf-8 octets representing a checkmark, indicating that the request actually is utf-8 encoded.
2405
+ var charsetSentinel = 'utf8=%E2%9C%93'; // encodeURIComponent('✓')
2406
+
2407
+ var parseValues = function parseQueryStringValues(str, options) {
2408
+ var obj = {};
2409
+ var cleanStr = options.ignoreQueryPrefix ? str.replace(/^\?/, '') : str;
2410
+ var limit = options.parameterLimit === Infinity ? undefined : options.parameterLimit;
2411
+ var parts = cleanStr.split(options.delimiter, limit);
2412
+ var skipIndex = -1; // Keep track of where the utf8 sentinel was found
2413
+ var i;
2414
+
2415
+ var charset = options.charset;
2416
+ if (options.charsetSentinel) {
2417
+ for (i = 0; i < parts.length; ++i) {
2418
+ if (parts[i].indexOf('utf8=') === 0) {
2419
+ if (parts[i] === charsetSentinel) {
2420
+ charset = 'utf-8';
2421
+ } else if (parts[i] === isoSentinel) {
2422
+ charset = 'iso-8859-1';
2423
+ }
2424
+ skipIndex = i;
2425
+ i = parts.length; // The eslint settings do not allow break;
2426
+ }
2427
+ }
2428
+ }
2429
+
2430
+ for (i = 0; i < parts.length; ++i) {
2431
+ if (i === skipIndex) {
2432
+ continue;
2433
+ }
2434
+ var part = parts[i];
2435
+
2436
+ var bracketEqualsPos = part.indexOf(']=');
2437
+ var pos = bracketEqualsPos === -1 ? part.indexOf('=') : bracketEqualsPos + 1;
2438
+
2439
+ var key, val;
2440
+ if (pos === -1) {
2441
+ key = options.decoder(part, defaults.decoder, charset, 'key');
2442
+ val = options.strictNullHandling ? null : '';
2443
+ } else {
2444
+ key = options.decoder(part.slice(0, pos), defaults.decoder, charset, 'key');
2445
+ val = utils.maybeMap(
2446
+ parseArrayValue(part.slice(pos + 1), options),
2447
+ function (encodedVal) {
2448
+ return options.decoder(encodedVal, defaults.decoder, charset, 'value');
2449
+ }
2450
+ );
2451
+ }
2452
+
2453
+ if (val && options.interpretNumericEntities && charset === 'iso-8859-1') {
2454
+ val = interpretNumericEntities(val);
2455
+ }
2456
+
2457
+ if (part.indexOf('[]=') > -1) {
2458
+ val = isArray(val) ? [val] : val;
2459
+ }
2460
+
2461
+ if (has.call(obj, key)) {
2462
+ obj[key] = utils.combine(obj[key], val);
2463
+ } else {
2464
+ obj[key] = val;
2465
+ }
2466
+ }
2467
+
2468
+ return obj;
2469
+ };
2470
+
2471
+ var parseObject = function (chain, val, options, valuesParsed) {
2472
+ var leaf = valuesParsed ? val : parseArrayValue(val, options);
2473
+
2474
+ for (var i = chain.length - 1; i >= 0; --i) {
2475
+ var obj;
2476
+ var root = chain[i];
2477
+
2478
+ if (root === '[]' && options.parseArrays) {
2479
+ obj = [].concat(leaf);
2480
+ } else {
2481
+ obj = options.plainObjects ? Object.create(null) : {};
2482
+ var cleanRoot = root.charAt(0) === '[' && root.charAt(root.length - 1) === ']' ? root.slice(1, -1) : root;
2483
+ var index = parseInt(cleanRoot, 10);
2484
+ if (!options.parseArrays && cleanRoot === '') {
2485
+ obj = { 0: leaf };
2486
+ } else if (
2487
+ !isNaN(index)
2488
+ && root !== cleanRoot
2489
+ && String(index) === cleanRoot
2490
+ && index >= 0
2491
+ && (options.parseArrays && index <= options.arrayLimit)
2492
+ ) {
2493
+ obj = [];
2494
+ obj[index] = leaf;
2495
+ } else if (cleanRoot !== '__proto__') {
2496
+ obj[cleanRoot] = leaf;
2497
+ }
2498
+ }
2499
+
2500
+ leaf = obj;
2501
+ }
2502
+
2503
+ return leaf;
2504
+ };
2505
+
2506
+ var parseKeys = function parseQueryStringKeys(givenKey, val, options, valuesParsed) {
2507
+ if (!givenKey) {
2508
+ return;
2509
+ }
2510
+
2511
+ // Transform dot notation to bracket notation
2512
+ var key = options.allowDots ? givenKey.replace(/\.([^.[]+)/g, '[$1]') : givenKey;
2513
+
2514
+ // The regex chunks
2515
+
2516
+ var brackets = /(\[[^[\]]*])/;
2517
+ var child = /(\[[^[\]]*])/g;
2518
+
2519
+ // Get the parent
2520
+
2521
+ var segment = options.depth > 0 && brackets.exec(key);
2522
+ var parent = segment ? key.slice(0, segment.index) : key;
2523
+
2524
+ // Stash the parent if it exists
2525
+
2526
+ var keys = [];
2527
+ if (parent) {
2528
+ // If we aren't using plain objects, optionally prefix keys that would overwrite object prototype properties
2529
+ if (!options.plainObjects && has.call(Object.prototype, parent)) {
2530
+ if (!options.allowPrototypes) {
2531
+ return;
2532
+ }
2533
+ }
2534
+
2535
+ keys.push(parent);
2536
+ }
2537
+
2538
+ // Loop through children appending to the array until we hit depth
2539
+
2540
+ var i = 0;
2541
+ while (options.depth > 0 && (segment = child.exec(key)) !== null && i < options.depth) {
2542
+ i += 1;
2543
+ if (!options.plainObjects && has.call(Object.prototype, segment[1].slice(1, -1))) {
2544
+ if (!options.allowPrototypes) {
2545
+ return;
2546
+ }
2547
+ }
2548
+ keys.push(segment[1]);
2549
+ }
2550
+
2551
+ // If there's a remainder, just add whatever is left
2552
+
2553
+ if (segment) {
2554
+ keys.push('[' + key.slice(segment.index) + ']');
2555
+ }
2556
+
2557
+ return parseObject(keys, val, options, valuesParsed);
2558
+ };
2559
+
2560
+ var normalizeParseOptions = function normalizeParseOptions(opts) {
2561
+ if (!opts) {
2562
+ return defaults;
2563
+ }
2564
+
2565
+ if (opts.decoder !== null && opts.decoder !== undefined && typeof opts.decoder !== 'function') {
2566
+ throw new TypeError('Decoder has to be a function.');
2567
+ }
2568
+
2569
+ if (typeof opts.charset !== 'undefined' && opts.charset !== 'utf-8' && opts.charset !== 'iso-8859-1') {
2570
+ throw new TypeError('The charset option must be either utf-8, iso-8859-1, or undefined');
2571
+ }
2572
+ var charset = typeof opts.charset === 'undefined' ? defaults.charset : opts.charset;
2573
+
2574
+ return {
2575
+ allowDots: typeof opts.allowDots === 'undefined' ? defaults.allowDots : !!opts.allowDots,
2576
+ allowPrototypes: typeof opts.allowPrototypes === 'boolean' ? opts.allowPrototypes : defaults.allowPrototypes,
2577
+ allowSparse: typeof opts.allowSparse === 'boolean' ? opts.allowSparse : defaults.allowSparse,
2578
+ arrayLimit: typeof opts.arrayLimit === 'number' ? opts.arrayLimit : defaults.arrayLimit,
2579
+ charset: charset,
2580
+ charsetSentinel: typeof opts.charsetSentinel === 'boolean' ? opts.charsetSentinel : defaults.charsetSentinel,
2581
+ comma: typeof opts.comma === 'boolean' ? opts.comma : defaults.comma,
2582
+ decoder: typeof opts.decoder === 'function' ? opts.decoder : defaults.decoder,
2583
+ delimiter: typeof opts.delimiter === 'string' || utils.isRegExp(opts.delimiter) ? opts.delimiter : defaults.delimiter,
2584
+ // eslint-disable-next-line no-implicit-coercion, no-extra-parens
2585
+ depth: (typeof opts.depth === 'number' || opts.depth === false) ? +opts.depth : defaults.depth,
2586
+ ignoreQueryPrefix: opts.ignoreQueryPrefix === true,
2587
+ interpretNumericEntities: typeof opts.interpretNumericEntities === 'boolean' ? opts.interpretNumericEntities : defaults.interpretNumericEntities,
2588
+ parameterLimit: typeof opts.parameterLimit === 'number' ? opts.parameterLimit : defaults.parameterLimit,
2589
+ parseArrays: opts.parseArrays !== false,
2590
+ plainObjects: typeof opts.plainObjects === 'boolean' ? opts.plainObjects : defaults.plainObjects,
2591
+ strictNullHandling: typeof opts.strictNullHandling === 'boolean' ? opts.strictNullHandling : defaults.strictNullHandling
2592
+ };
2593
+ };
2594
+
2595
+ var parse$1 = function (str, opts) {
2596
+ var options = normalizeParseOptions(opts);
2597
+
2598
+ if (str === '' || str === null || typeof str === 'undefined') {
2599
+ return options.plainObjects ? Object.create(null) : {};
2600
+ }
2601
+
2602
+ var tempObj = typeof str === 'string' ? parseValues(str, options) : str;
2603
+ var obj = options.plainObjects ? Object.create(null) : {};
2604
+
2605
+ // Iterate over the keys and setup the new object
2606
+
2607
+ var keys = Object.keys(tempObj);
2608
+ for (var i = 0; i < keys.length; ++i) {
2609
+ var key = keys[i];
2610
+ var newObj = parseKeys(key, tempObj[key], options, typeof str === 'string');
2611
+ obj = utils.merge(obj, newObj, options);
2612
+ }
2613
+
2614
+ if (options.allowSparse === true) {
2615
+ return obj;
2616
+ }
2617
+
2618
+ return utils.compact(obj);
2619
+ };
2620
+
2621
+ var stringify = stringify_1;
2622
+ var parse = parse$1;
2623
+ var formats = formats$3;
2624
+
2625
+ var lib = {
2626
+ formats: formats,
2627
+ parse: parse,
2628
+ stringify: stringify
2629
+ };
2630
+
2631
+ 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; }
2632
+
2633
+ 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; }
2634
+ var withEventTargetValue = /*#__PURE__*/ramda.curry(function (func, event) {
2635
+ return func(event.target.value);
2636
+ });
2637
+ var getSubdomain = function getSubdomain() {
2638
+ var host = window.location.host;
2639
+ var parts = host.split(".");
2640
+ return parts.length >= 3 ? parts[0] : "";
2641
+ };
2642
+ var simulateApiCall = function simulateApiCall(result, error) {
2643
+ var errorProbability = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : 0.1;
2644
+ var delay = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : getRandomInt(350, 1000);
2645
+ return new Promise(function (resolve, reject) {
2646
+ return setTimeout(function () {
2647
+ var defaultErrorObj = {
2648
+ success: false,
2649
+ notice: i18next__default["default"].t("neetoCommons.notice.errorOccurred")
2650
+ };
2651
+ Math.random() < errorProbability ? reject(_objectSpread(_objectSpread({}, defaultErrorObj), error)) : resolve(result);
2652
+ }, delay);
2653
+ });
2654
+ };
2655
+ var copyToClipboard = /*#__PURE__*/function () {
2656
+ var _ref = _asyncToGenerator( /*#__PURE__*/regenerator.mark(function _callee(text) {
2657
+ var _ref2,
2658
+ _ref2$showToastr,
2659
+ showToastr,
2660
+ _ref2$message,
2661
+ message,
2662
+ _require,
2663
+ Toastr,
2664
+ textArea,
2665
+ _args = arguments;
2666
+
2667
+ return regenerator.wrap(function _callee$(_context) {
2668
+ while (1) {
2669
+ switch (_context.prev = _context.next) {
2670
+ case 0:
2671
+ _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__default["default"].t("neetoCommons.toastr.success.copiedToClipboard") : _ref2$message;
2672
+
2673
+ /*
2674
+ This is a workaround to prevent the jest tests from failing. Once the issue in neetoUI
2675
+ https://github.com/bigbinary/neeto-ui/issues/1175 is resolved, this import can be moved to the top of the file.
2676
+ */
2677
+ _require = require("@bigbinary/neetoui"), Toastr = _require.Toastr;
2678
+ _context.prev = 2;
2679
+
2680
+ if (!(navigator.clipboard && window.isSecureContext)) {
2681
+ _context.next = 8;
2682
+ break;
2683
+ }
2684
+
2685
+ _context.next = 6;
2686
+ return navigator.clipboard.writeText(text);
2687
+
2688
+ case 6:
2689
+ _context.next = 18;
2690
+ break;
2691
+
2692
+ case 8:
2693
+ textArea = document.createElement("textarea");
2694
+ textArea.value = text;
2695
+ textArea.style.top = "0";
2696
+ textArea.style.left = "0";
2697
+ textArea.style.position = "fixed";
2698
+ document.body.appendChild(textArea);
2699
+ textArea.focus();
2700
+ textArea.select();
2701
+ document.execCommand("copy");
2702
+ document.body.removeChild(textArea);
2703
+
2704
+ case 18:
2705
+ showToastr && Toastr.success(message);
2706
+ _context.next = 24;
2707
+ break;
2708
+
2709
+ case 21:
2710
+ _context.prev = 21;
2711
+ _context.t0 = _context["catch"](2);
2712
+ Toastr.error(_context.t0);
2713
+
2714
+ case 24:
2715
+ case "end":
2716
+ return _context.stop();
2717
+ }
2718
+ }
2719
+ }, _callee, null, [[2, 21]]);
2720
+ }));
2721
+
2722
+ return function copyToClipboard(_x) {
2723
+ return _ref.apply(this, arguments);
2724
+ };
2725
+ }();
2726
+ var buildUrl = function buildUrl(route, params) {
2727
+ var placeHolders = [];
2728
+ ramda.toPairs(params).forEach(function (_ref3) {
2729
+ var _ref4 = _slicedToArray(_ref3, 2),
2730
+ key = _ref4[0],
2731
+ value = _ref4[1];
2732
+
2733
+ if (route.includes(":".concat(key))) {
2734
+ placeHolders.push(key);
2735
+ route = route.replace(":".concat(key), encodeURIComponent(value));
2736
+ }
2737
+ });
2738
+ var queryParams = ramda.pipe(ramda.omit(placeHolders), preprocessForSerialization, lib.stringify)(params);
2739
+ return ramda.isEmpty(queryParams) ? route : "".concat(route, "?").concat(queryParams);
2740
+ };
2741
+
2742
+ dayjs__default["default"].extend(relativeTime__default["default"]);
2743
+ dayjs__default["default"].extend(updateLocale__default["default"]);
2744
+ var timeFormat = {
2745
+ fromNow: function fromNow(time) {
2746
+ return dayjs__default["default"](time).fromNow();
2747
+ },
2748
+ time: function time(_time) {
2749
+ return dayjs__default["default"](_time).format("h:mm A");
2750
+ },
2751
+ date: function date(time) {
2752
+ return dayjs__default["default"](time).format("MMM D, YYYY");
2753
+ },
2754
+ dateWeek: function dateWeek(time) {
2755
+ return dayjs__default["default"](time).format("MMM D, YYYY ddd");
2756
+ },
2757
+ dateWeekWithoutYear: function dateWeekWithoutYear(time) {
2758
+ return dayjs__default["default"](time).format("MMM D, ddd");
2759
+ },
2760
+ dateTime: function dateTime(time) {
2761
+ return dayjs__default["default"](time).format("MMM D, YYYY h:mm A");
2762
+ },
2763
+ dateWeekTime: function dateWeekTime(time) {
2764
+ return dayjs__default["default"](time).format("MMM D, YYYY ddd h:mm A");
2765
+ },
2766
+ extended: function extended(time) {
2767
+ var dateTime = dayjs__default["default"](time).format("dddd MMMM D, YYYY h:mm A");
2768
+ var fromNow = dayjs__default["default"](time).fromNow();
2769
+ return "".concat(dateTime, " (").concat(fromNow, ")");
2770
+ }
2771
+ };
2772
+ var dateFormat = timeFormat;
2773
+
2774
+ exports.buildUrl = buildUrl;
2775
+ exports.copyToClipboard = copyToClipboard;
2776
+ exports.dateFormat = dateFormat;
2777
+ exports.getSubdomain = getSubdomain;
2778
+ exports.resetAuthTokens = resetAuthTokens;
2779
+ exports.simulateApiCall = simulateApiCall;
2780
+ exports.timeFormat = timeFormat;
2781
+ exports.withEventTargetValue = withEventTargetValue;