@0xsquid/react-hooks 8.3.1-embed-tanstack-build.0 → 8.3.1-embed-tanstack-build.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/dist/browser-BpOc5ZYm.js +728 -0
  2. package/dist/browser-BpOc5ZYm.js.map +1 -0
  3. package/dist/browser-C2k8mMWG.js +731 -0
  4. package/dist/browser-C2k8mMWG.js.map +1 -0
  5. package/dist/clsx.m-5lBZSkly.js +13 -0
  6. package/dist/clsx.m-5lBZSkly.js.map +1 -0
  7. package/dist/clsx.m-C1RYtb0y.js +10 -0
  8. package/dist/clsx.m-C1RYtb0y.js.map +1 -0
  9. package/dist/{index-DOoP75Yp.js → index-CBdXaMut.js} +5491 -1006
  10. package/dist/index-CBdXaMut.js.map +1 -0
  11. package/dist/{index-D3LtAuC9.js → index-CHFbvaAT.js} +5462 -987
  12. package/dist/index-CHFbvaAT.js.map +1 -0
  13. package/dist/index-CJc-nZ2s.js +20967 -0
  14. package/dist/index-CJc-nZ2s.js.map +1 -0
  15. package/dist/index-CQhbmLAK.js +20945 -0
  16. package/dist/index-CQhbmLAK.js.map +1 -0
  17. package/dist/index-Dehij_6h.js +4628 -0
  18. package/dist/index-Dehij_6h.js.map +1 -0
  19. package/dist/index-T4Aq984K.js +4630 -0
  20. package/dist/index-T4Aq984K.js.map +1 -0
  21. package/dist/{index.es-C4uVlA0B.js → index.es-CJQ994zu.js} +4 -4
  22. package/dist/{index.es-C4uVlA0B.js.map → index.es-CJQ994zu.js.map} +1 -1
  23. package/dist/{index.es-C5DLFXAX.js → index.es-Db1itMBd.js} +4 -4
  24. package/dist/{index.es-C5DLFXAX.js.map → index.es-Db1itMBd.js.map} +1 -1
  25. package/dist/index.esm.js +3 -3
  26. package/dist/index.js +3 -3
  27. package/dist/metamask-sdk-BD7Q6BkI.js +6353 -0
  28. package/dist/metamask-sdk-BD7Q6BkI.js.map +1 -0
  29. package/dist/metamask-sdk-DFVIZ2SC.js +6359 -0
  30. package/dist/metamask-sdk-DFVIZ2SC.js.map +1 -0
  31. package/dist/{secretService-CY6elBY4.js → secretService-BEHJHJzr.js} +4 -4
  32. package/dist/{secretService-CY6elBY4.js.map → secretService-BEHJHJzr.js.map} +1 -1
  33. package/dist/{secretService-BwFxfXV7.js → secretService-C_xxV54S.js} +4 -4
  34. package/dist/{secretService-BwFxfXV7.js.map → secretService-C_xxV54S.js.map} +1 -1
  35. package/dist/{stellarService.client-2CVAOoJl.js → stellarService.client-DKE1A5qx.js} +4 -4
  36. package/dist/{stellarService.client-2CVAOoJl.js.map → stellarService.client-DKE1A5qx.js.map} +1 -1
  37. package/dist/{stellarService.client-OMPy5fjH.js → stellarService.client-DKe-JCHP.js} +4 -4
  38. package/dist/{stellarService.client-OMPy5fjH.js.map → stellarService.client-DKe-JCHP.js.map} +1 -1
  39. package/package.json +1 -1
  40. package/dist/index-D3LtAuC9.js.map +0 -1
  41. package/dist/index-DOoP75Yp.js.map +0 -1
@@ -0,0 +1,728 @@
1
+ import { g as getDefaultExportFromCjs } from './index-CHFbvaAT.js';
2
+
3
+ var browser = {exports: {}};
4
+
5
+ /**
6
+ * Helpers.
7
+ */
8
+
9
+ var ms;
10
+ var hasRequiredMs;
11
+
12
+ function requireMs () {
13
+ if (hasRequiredMs) return ms;
14
+ hasRequiredMs = 1;
15
+ var s = 1000;
16
+ var m = s * 60;
17
+ var h = m * 60;
18
+ var d = h * 24;
19
+ var w = d * 7;
20
+ var y = d * 365.25;
21
+
22
+ /**
23
+ * Parse or format the given `val`.
24
+ *
25
+ * Options:
26
+ *
27
+ * - `long` verbose formatting [false]
28
+ *
29
+ * @param {String|Number} val
30
+ * @param {Object} [options]
31
+ * @throws {Error} throw an error if val is not a non-empty string or a number
32
+ * @return {String|Number}
33
+ * @api public
34
+ */
35
+
36
+ ms = function (val, options) {
37
+ options = options || {};
38
+ var type = typeof val;
39
+ if (type === 'string' && val.length > 0) {
40
+ return parse(val);
41
+ } else if (type === 'number' && isFinite(val)) {
42
+ return options.long ? fmtLong(val) : fmtShort(val);
43
+ }
44
+ throw new Error(
45
+ 'val is not a non-empty string or a valid number. val=' +
46
+ JSON.stringify(val)
47
+ );
48
+ };
49
+
50
+ /**
51
+ * Parse the given `str` and return milliseconds.
52
+ *
53
+ * @param {String} str
54
+ * @return {Number}
55
+ * @api private
56
+ */
57
+
58
+ function parse(str) {
59
+ str = String(str);
60
+ if (str.length > 100) {
61
+ return;
62
+ }
63
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
64
+ str
65
+ );
66
+ if (!match) {
67
+ return;
68
+ }
69
+ var n = parseFloat(match[1]);
70
+ var type = (match[2] || 'ms').toLowerCase();
71
+ switch (type) {
72
+ case 'years':
73
+ case 'year':
74
+ case 'yrs':
75
+ case 'yr':
76
+ case 'y':
77
+ return n * y;
78
+ case 'weeks':
79
+ case 'week':
80
+ case 'w':
81
+ return n * w;
82
+ case 'days':
83
+ case 'day':
84
+ case 'd':
85
+ return n * d;
86
+ case 'hours':
87
+ case 'hour':
88
+ case 'hrs':
89
+ case 'hr':
90
+ case 'h':
91
+ return n * h;
92
+ case 'minutes':
93
+ case 'minute':
94
+ case 'mins':
95
+ case 'min':
96
+ case 'm':
97
+ return n * m;
98
+ case 'seconds':
99
+ case 'second':
100
+ case 'secs':
101
+ case 'sec':
102
+ case 's':
103
+ return n * s;
104
+ case 'milliseconds':
105
+ case 'millisecond':
106
+ case 'msecs':
107
+ case 'msec':
108
+ case 'ms':
109
+ return n;
110
+ default:
111
+ return undefined;
112
+ }
113
+ }
114
+
115
+ /**
116
+ * Short format for `ms`.
117
+ *
118
+ * @param {Number} ms
119
+ * @return {String}
120
+ * @api private
121
+ */
122
+
123
+ function fmtShort(ms) {
124
+ var msAbs = Math.abs(ms);
125
+ if (msAbs >= d) {
126
+ return Math.round(ms / d) + 'd';
127
+ }
128
+ if (msAbs >= h) {
129
+ return Math.round(ms / h) + 'h';
130
+ }
131
+ if (msAbs >= m) {
132
+ return Math.round(ms / m) + 'm';
133
+ }
134
+ if (msAbs >= s) {
135
+ return Math.round(ms / s) + 's';
136
+ }
137
+ return ms + 'ms';
138
+ }
139
+
140
+ /**
141
+ * Long format for `ms`.
142
+ *
143
+ * @param {Number} ms
144
+ * @return {String}
145
+ * @api private
146
+ */
147
+
148
+ function fmtLong(ms) {
149
+ var msAbs = Math.abs(ms);
150
+ if (msAbs >= d) {
151
+ return plural(ms, msAbs, d, 'day');
152
+ }
153
+ if (msAbs >= h) {
154
+ return plural(ms, msAbs, h, 'hour');
155
+ }
156
+ if (msAbs >= m) {
157
+ return plural(ms, msAbs, m, 'minute');
158
+ }
159
+ if (msAbs >= s) {
160
+ return plural(ms, msAbs, s, 'second');
161
+ }
162
+ return ms + ' ms';
163
+ }
164
+
165
+ /**
166
+ * Pluralization helper.
167
+ */
168
+
169
+ function plural(ms, msAbs, n, name) {
170
+ var isPlural = msAbs >= n * 1.5;
171
+ return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');
172
+ }
173
+ return ms;
174
+ }
175
+
176
+ /**
177
+ * This is the common logic for both the Node.js and web browser
178
+ * implementations of `debug()`.
179
+ */
180
+
181
+ function setup(env) {
182
+ createDebug.debug = createDebug;
183
+ createDebug.default = createDebug;
184
+ createDebug.coerce = coerce;
185
+ createDebug.disable = disable;
186
+ createDebug.enable = enable;
187
+ createDebug.enabled = enabled;
188
+ createDebug.humanize = requireMs();
189
+ createDebug.destroy = destroy;
190
+
191
+ Object.keys(env).forEach(key => {
192
+ createDebug[key] = env[key];
193
+ });
194
+
195
+ /**
196
+ * The currently active debug mode names, and names to skip.
197
+ */
198
+
199
+ createDebug.names = [];
200
+ createDebug.skips = [];
201
+
202
+ /**
203
+ * Map of special "%n" handling functions, for the debug "format" argument.
204
+ *
205
+ * Valid key names are a single, lower or upper-case letter, i.e. "n" and "N".
206
+ */
207
+ createDebug.formatters = {};
208
+
209
+ /**
210
+ * Selects a color for a debug namespace
211
+ * @param {String} namespace The namespace string for the debug instance to be colored
212
+ * @return {Number|String} An ANSI color code for the given namespace
213
+ * @api private
214
+ */
215
+ function selectColor(namespace) {
216
+ let hash = 0;
217
+
218
+ for (let i = 0; i < namespace.length; i++) {
219
+ hash = ((hash << 5) - hash) + namespace.charCodeAt(i);
220
+ hash |= 0; // Convert to 32bit integer
221
+ }
222
+
223
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
224
+ }
225
+ createDebug.selectColor = selectColor;
226
+
227
+ /**
228
+ * Create a debugger with the given `namespace`.
229
+ *
230
+ * @param {String} namespace
231
+ * @return {Function}
232
+ * @api public
233
+ */
234
+ function createDebug(namespace) {
235
+ let prevTime;
236
+ let enableOverride = null;
237
+ let namespacesCache;
238
+ let enabledCache;
239
+
240
+ function debug(...args) {
241
+ // Disabled?
242
+ if (!debug.enabled) {
243
+ return;
244
+ }
245
+
246
+ const self = debug;
247
+
248
+ // Set `diff` timestamp
249
+ const curr = Number(new Date());
250
+ const ms = curr - (prevTime || curr);
251
+ self.diff = ms;
252
+ self.prev = prevTime;
253
+ self.curr = curr;
254
+ prevTime = curr;
255
+
256
+ args[0] = createDebug.coerce(args[0]);
257
+
258
+ if (typeof args[0] !== 'string') {
259
+ // Anything else let's inspect with %O
260
+ args.unshift('%O');
261
+ }
262
+
263
+ // Apply any `formatters` transformations
264
+ let index = 0;
265
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format) => {
266
+ // If we encounter an escaped % then don't increase the array index
267
+ if (match === '%%') {
268
+ return '%';
269
+ }
270
+ index++;
271
+ const formatter = createDebug.formatters[format];
272
+ if (typeof formatter === 'function') {
273
+ const val = args[index];
274
+ match = formatter.call(self, val);
275
+
276
+ // Now we need to remove `args[index]` since it's inlined in the `format`
277
+ args.splice(index, 1);
278
+ index--;
279
+ }
280
+ return match;
281
+ });
282
+
283
+ // Apply env-specific formatting (colors, etc.)
284
+ createDebug.formatArgs.call(self, args);
285
+
286
+ const logFn = self.log || createDebug.log;
287
+ logFn.apply(self, args);
288
+ }
289
+
290
+ debug.namespace = namespace;
291
+ debug.useColors = createDebug.useColors();
292
+ debug.color = createDebug.selectColor(namespace);
293
+ debug.extend = extend;
294
+ debug.destroy = createDebug.destroy; // XXX Temporary. Will be removed in the next major release.
295
+
296
+ Object.defineProperty(debug, 'enabled', {
297
+ enumerable: true,
298
+ configurable: false,
299
+ get: () => {
300
+ if (enableOverride !== null) {
301
+ return enableOverride;
302
+ }
303
+ if (namespacesCache !== createDebug.namespaces) {
304
+ namespacesCache = createDebug.namespaces;
305
+ enabledCache = createDebug.enabled(namespace);
306
+ }
307
+
308
+ return enabledCache;
309
+ },
310
+ set: v => {
311
+ enableOverride = v;
312
+ }
313
+ });
314
+
315
+ // Env-specific initialization logic for debug instances
316
+ if (typeof createDebug.init === 'function') {
317
+ createDebug.init(debug);
318
+ }
319
+
320
+ return debug;
321
+ }
322
+
323
+ function extend(namespace, delimiter) {
324
+ const newDebug = createDebug(this.namespace + (typeof delimiter === 'undefined' ? ':' : delimiter) + namespace);
325
+ newDebug.log = this.log;
326
+ return newDebug;
327
+ }
328
+
329
+ /**
330
+ * Enables a debug mode by namespaces. This can include modes
331
+ * separated by a colon and wildcards.
332
+ *
333
+ * @param {String} namespaces
334
+ * @api public
335
+ */
336
+ function enable(namespaces) {
337
+ createDebug.save(namespaces);
338
+ createDebug.namespaces = namespaces;
339
+
340
+ createDebug.names = [];
341
+ createDebug.skips = [];
342
+
343
+ let i;
344
+ const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
345
+ const len = split.length;
346
+
347
+ for (i = 0; i < len; i++) {
348
+ if (!split[i]) {
349
+ // ignore empty strings
350
+ continue;
351
+ }
352
+
353
+ namespaces = split[i].replace(/\*/g, '.*?');
354
+
355
+ if (namespaces[0] === '-') {
356
+ createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
357
+ } else {
358
+ createDebug.names.push(new RegExp('^' + namespaces + '$'));
359
+ }
360
+ }
361
+ }
362
+
363
+ /**
364
+ * Disable debug output.
365
+ *
366
+ * @return {String} namespaces
367
+ * @api public
368
+ */
369
+ function disable() {
370
+ const namespaces = [
371
+ ...createDebug.names.map(toNamespace),
372
+ ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
373
+ ].join(',');
374
+ createDebug.enable('');
375
+ return namespaces;
376
+ }
377
+
378
+ /**
379
+ * Returns true if the given mode name is enabled, false otherwise.
380
+ *
381
+ * @param {String} name
382
+ * @return {Boolean}
383
+ * @api public
384
+ */
385
+ function enabled(name) {
386
+ if (name[name.length - 1] === '*') {
387
+ return true;
388
+ }
389
+
390
+ let i;
391
+ let len;
392
+
393
+ for (i = 0, len = createDebug.skips.length; i < len; i++) {
394
+ if (createDebug.skips[i].test(name)) {
395
+ return false;
396
+ }
397
+ }
398
+
399
+ for (i = 0, len = createDebug.names.length; i < len; i++) {
400
+ if (createDebug.names[i].test(name)) {
401
+ return true;
402
+ }
403
+ }
404
+
405
+ return false;
406
+ }
407
+
408
+ /**
409
+ * Convert regexp to namespace
410
+ *
411
+ * @param {RegExp} regxep
412
+ * @return {String} namespace
413
+ * @api private
414
+ */
415
+ function toNamespace(regexp) {
416
+ return regexp.toString()
417
+ .substring(2, regexp.toString().length - 2)
418
+ .replace(/\.\*\?$/, '*');
419
+ }
420
+
421
+ /**
422
+ * Coerce `val`.
423
+ *
424
+ * @param {Mixed} val
425
+ * @return {Mixed}
426
+ * @api private
427
+ */
428
+ function coerce(val) {
429
+ if (val instanceof Error) {
430
+ return val.stack || val.message;
431
+ }
432
+ return val;
433
+ }
434
+
435
+ /**
436
+ * XXX DO NOT USE. This is a temporary stub function.
437
+ * XXX It WILL be removed in the next major release.
438
+ */
439
+ function destroy() {
440
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
441
+ }
442
+
443
+ createDebug.enable(createDebug.load());
444
+
445
+ return createDebug;
446
+ }
447
+
448
+ var common = setup;
449
+
450
+ /* eslint-env browser */
451
+
452
+ (function (module, exports) {
453
+ /**
454
+ * This is the web browser implementation of `debug()`.
455
+ */
456
+
457
+ exports.formatArgs = formatArgs;
458
+ exports.save = save;
459
+ exports.load = load;
460
+ exports.useColors = useColors;
461
+ exports.storage = localstorage();
462
+ exports.destroy = (() => {
463
+ let warned = false;
464
+
465
+ return () => {
466
+ if (!warned) {
467
+ warned = true;
468
+ console.warn('Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.');
469
+ }
470
+ };
471
+ })();
472
+
473
+ /**
474
+ * Colors.
475
+ */
476
+
477
+ exports.colors = [
478
+ '#0000CC',
479
+ '#0000FF',
480
+ '#0033CC',
481
+ '#0033FF',
482
+ '#0066CC',
483
+ '#0066FF',
484
+ '#0099CC',
485
+ '#0099FF',
486
+ '#00CC00',
487
+ '#00CC33',
488
+ '#00CC66',
489
+ '#00CC99',
490
+ '#00CCCC',
491
+ '#00CCFF',
492
+ '#3300CC',
493
+ '#3300FF',
494
+ '#3333CC',
495
+ '#3333FF',
496
+ '#3366CC',
497
+ '#3366FF',
498
+ '#3399CC',
499
+ '#3399FF',
500
+ '#33CC00',
501
+ '#33CC33',
502
+ '#33CC66',
503
+ '#33CC99',
504
+ '#33CCCC',
505
+ '#33CCFF',
506
+ '#6600CC',
507
+ '#6600FF',
508
+ '#6633CC',
509
+ '#6633FF',
510
+ '#66CC00',
511
+ '#66CC33',
512
+ '#9900CC',
513
+ '#9900FF',
514
+ '#9933CC',
515
+ '#9933FF',
516
+ '#99CC00',
517
+ '#99CC33',
518
+ '#CC0000',
519
+ '#CC0033',
520
+ '#CC0066',
521
+ '#CC0099',
522
+ '#CC00CC',
523
+ '#CC00FF',
524
+ '#CC3300',
525
+ '#CC3333',
526
+ '#CC3366',
527
+ '#CC3399',
528
+ '#CC33CC',
529
+ '#CC33FF',
530
+ '#CC6600',
531
+ '#CC6633',
532
+ '#CC9900',
533
+ '#CC9933',
534
+ '#CCCC00',
535
+ '#CCCC33',
536
+ '#FF0000',
537
+ '#FF0033',
538
+ '#FF0066',
539
+ '#FF0099',
540
+ '#FF00CC',
541
+ '#FF00FF',
542
+ '#FF3300',
543
+ '#FF3333',
544
+ '#FF3366',
545
+ '#FF3399',
546
+ '#FF33CC',
547
+ '#FF33FF',
548
+ '#FF6600',
549
+ '#FF6633',
550
+ '#FF9900',
551
+ '#FF9933',
552
+ '#FFCC00',
553
+ '#FFCC33'
554
+ ];
555
+
556
+ /**
557
+ * Currently only WebKit-based Web Inspectors, Firefox >= v31,
558
+ * and the Firebug extension (any Firefox version) are known
559
+ * to support "%c" CSS customizations.
560
+ *
561
+ * TODO: add a `localStorage` variable to explicitly enable/disable colors
562
+ */
563
+
564
+ // eslint-disable-next-line complexity
565
+ function useColors() {
566
+ // NB: In an Electron preload script, document will be defined but not fully
567
+ // initialized. Since we know we're in Chrome, we'll just detect this case
568
+ // explicitly
569
+ if (typeof window !== 'undefined' && window.process && (window.process.type === 'renderer' || window.process.__nwjs)) {
570
+ return true;
571
+ }
572
+
573
+ // Internet Explorer and Edge do not support colors.
574
+ if (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
575
+ return false;
576
+ }
577
+
578
+ let m;
579
+
580
+ // Is webkit? http://stackoverflow.com/a/16459606/376773
581
+ // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
582
+ return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
583
+ // Is firebug? http://stackoverflow.com/a/398120/376773
584
+ (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
585
+ // Is firefox >= v31?
586
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
587
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
588
+ // Double check webkit in userAgent just in case we are in a worker
589
+ (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
590
+ }
591
+
592
+ /**
593
+ * Colorize log arguments if enabled.
594
+ *
595
+ * @api public
596
+ */
597
+
598
+ function formatArgs(args) {
599
+ args[0] = (this.useColors ? '%c' : '') +
600
+ this.namespace +
601
+ (this.useColors ? ' %c' : ' ') +
602
+ args[0] +
603
+ (this.useColors ? '%c ' : ' ') +
604
+ '+' + module.exports.humanize(this.diff);
605
+
606
+ if (!this.useColors) {
607
+ return;
608
+ }
609
+
610
+ const c = 'color: ' + this.color;
611
+ args.splice(1, 0, c, 'color: inherit');
612
+
613
+ // The final "%c" is somewhat tricky, because there could be other
614
+ // arguments passed either before or after the %c, so we need to
615
+ // figure out the correct index to insert the CSS into
616
+ let index = 0;
617
+ let lastC = 0;
618
+ args[0].replace(/%[a-zA-Z%]/g, match => {
619
+ if (match === '%%') {
620
+ return;
621
+ }
622
+ index++;
623
+ if (match === '%c') {
624
+ // We only are interested in the *last* %c
625
+ // (the user may have provided their own)
626
+ lastC = index;
627
+ }
628
+ });
629
+
630
+ args.splice(lastC, 0, c);
631
+ }
632
+
633
+ /**
634
+ * Invokes `console.debug()` when available.
635
+ * No-op when `console.debug` is not a "function".
636
+ * If `console.debug` is not available, falls back
637
+ * to `console.log`.
638
+ *
639
+ * @api public
640
+ */
641
+ exports.log = console.debug || console.log || (() => {});
642
+
643
+ /**
644
+ * Save `namespaces`.
645
+ *
646
+ * @param {String} namespaces
647
+ * @api private
648
+ */
649
+ function save(namespaces) {
650
+ try {
651
+ if (namespaces) {
652
+ exports.storage.setItem('debug', namespaces);
653
+ } else {
654
+ exports.storage.removeItem('debug');
655
+ }
656
+ } catch (error) {
657
+ // Swallow
658
+ // XXX (@Qix-) should we be logging these?
659
+ }
660
+ }
661
+
662
+ /**
663
+ * Load `namespaces`.
664
+ *
665
+ * @return {String} returns the previously persisted debug modes
666
+ * @api private
667
+ */
668
+ function load() {
669
+ let r;
670
+ try {
671
+ r = exports.storage.getItem('debug');
672
+ } catch (error) {
673
+ // Swallow
674
+ // XXX (@Qix-) should we be logging these?
675
+ }
676
+
677
+ // If debug isn't set in LS, and we're in Electron, try to load $DEBUG
678
+ if (!r && typeof process !== 'undefined' && 'env' in process) {
679
+ r = process.env.DEBUG;
680
+ }
681
+
682
+ return r;
683
+ }
684
+
685
+ /**
686
+ * Localstorage attempts to return the localstorage.
687
+ *
688
+ * This is necessary because safari throws
689
+ * when a user disables cookies/localstorage
690
+ * and you attempt to access it.
691
+ *
692
+ * @return {LocalStorage}
693
+ * @api private
694
+ */
695
+
696
+ function localstorage() {
697
+ try {
698
+ // TVMLKit (Apple TV JS Runtime) does not have a window object, just localStorage in the global context
699
+ // The Browser also has localStorage in the global context.
700
+ return localStorage;
701
+ } catch (error) {
702
+ // Swallow
703
+ // XXX (@Qix-) should we be logging these?
704
+ }
705
+ }
706
+
707
+ module.exports = common(exports);
708
+
709
+ const {formatters} = module.exports;
710
+
711
+ /**
712
+ * Map %j to `JSON.stringify()`, since no Web Inspectors do that by default.
713
+ */
714
+
715
+ formatters.j = function (v) {
716
+ try {
717
+ return JSON.stringify(v);
718
+ } catch (error) {
719
+ return '[UnexpectedJSONParseError]: ' + error.message;
720
+ }
721
+ };
722
+ } (browser, browser.exports));
723
+
724
+ var browserExports = browser.exports;
725
+ var t = /*@__PURE__*/getDefaultExportFromCjs(browserExports);
726
+
727
+ export { browserExports as b, t };
728
+ //# sourceMappingURL=browser-BpOc5ZYm.js.map