@leofcoin/chain 1.7.71 → 1.7.73

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,4 @@
1
- import { g as getDefaultExportFromCjs, c as commonjsGlobal, j as inherits_browserExports, r as require$$3 } from './identity-CQ_ieRiz-CTM-_kGF.js';
1
+ import { g as getDefaultExportFromCjs, h as commonjsGlobal, j as inherits_browserExports, r as require$$3 } from './identity--VAIVSMm-DTWL357I.js';
2
2
  import require$$0 from 'events';
3
3
 
4
4
  var browser$2 = {exports: {}};
@@ -34,7 +34,7 @@ function requireMs () {
34
34
  * @api public
35
35
  */
36
36
 
37
- ms = function(val, options) {
37
+ ms = function (val, options) {
38
38
  options = options || {};
39
39
  var type = typeof val;
40
40
  if (type === 'string' && val.length > 0) {
@@ -341,24 +341,62 @@ function setup(env) {
341
341
  createDebug.names = [];
342
342
  createDebug.skips = [];
343
343
 
344
- let i;
345
- const split = (typeof namespaces === 'string' ? namespaces : '').split(/[\s,]+/);
346
- const len = split.length;
344
+ const split = (typeof namespaces === 'string' ? namespaces : '')
345
+ .trim()
346
+ .replace(/\s+/g, ',')
347
+ .split(',')
348
+ .filter(Boolean);
347
349
 
348
- for (i = 0; i < len; i++) {
349
- if (!split[i]) {
350
- // ignore empty strings
351
- continue;
350
+ for (const ns of split) {
351
+ if (ns[0] === '-') {
352
+ createDebug.skips.push(ns.slice(1));
353
+ } else {
354
+ createDebug.names.push(ns);
352
355
  }
356
+ }
357
+ }
353
358
 
354
- namespaces = split[i].replace(/\*/g, '.*?');
355
-
356
- if (namespaces[0] === '-') {
357
- createDebug.skips.push(new RegExp('^' + namespaces.slice(1) + '$'));
359
+ /**
360
+ * Checks if the given string matches a namespace template, honoring
361
+ * asterisks as wildcards.
362
+ *
363
+ * @param {String} search
364
+ * @param {String} template
365
+ * @return {Boolean}
366
+ */
367
+ function matchesTemplate(search, template) {
368
+ let searchIndex = 0;
369
+ let templateIndex = 0;
370
+ let starIndex = -1;
371
+ let matchIndex = 0;
372
+
373
+ while (searchIndex < search.length) {
374
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === '*')) {
375
+ // Match character or proceed with wildcard
376
+ if (template[templateIndex] === '*') {
377
+ starIndex = templateIndex;
378
+ matchIndex = searchIndex;
379
+ templateIndex++; // Skip the '*'
380
+ } else {
381
+ searchIndex++;
382
+ templateIndex++;
383
+ }
384
+ } else if (starIndex !== -1) { // eslint-disable-line no-negated-condition
385
+ // Backtrack to the last '*' and try to match more characters
386
+ templateIndex = starIndex + 1;
387
+ matchIndex++;
388
+ searchIndex = matchIndex;
358
389
  } else {
359
- createDebug.names.push(new RegExp('^' + namespaces + '$'));
390
+ return false; // No match
360
391
  }
361
392
  }
393
+
394
+ // Handle trailing '*' in template
395
+ while (templateIndex < template.length && template[templateIndex] === '*') {
396
+ templateIndex++;
397
+ }
398
+
399
+ return templateIndex === template.length;
362
400
  }
363
401
 
364
402
  /**
@@ -369,8 +407,8 @@ function setup(env) {
369
407
  */
370
408
  function disable() {
371
409
  const namespaces = [
372
- ...createDebug.names.map(toNamespace),
373
- ...createDebug.skips.map(toNamespace).map(namespace => '-' + namespace)
410
+ ...createDebug.names,
411
+ ...createDebug.skips.map(namespace => '-' + namespace)
374
412
  ].join(',');
375
413
  createDebug.enable('');
376
414
  return namespaces;
@@ -384,21 +422,14 @@ function setup(env) {
384
422
  * @api public
385
423
  */
386
424
  function enabled(name) {
387
- if (name[name.length - 1] === '*') {
388
- return true;
389
- }
390
-
391
- let i;
392
- let len;
393
-
394
- for (i = 0, len = createDebug.skips.length; i < len; i++) {
395
- if (createDebug.skips[i].test(name)) {
425
+ for (const skip of createDebug.skips) {
426
+ if (matchesTemplate(name, skip)) {
396
427
  return false;
397
428
  }
398
429
  }
399
430
 
400
- for (i = 0, len = createDebug.names.length; i < len; i++) {
401
- if (createDebug.names[i].test(name)) {
431
+ for (const ns of createDebug.names) {
432
+ if (matchesTemplate(name, ns)) {
402
433
  return true;
403
434
  }
404
435
  }
@@ -406,19 +437,6 @@ function setup(env) {
406
437
  return false;
407
438
  }
408
439
 
409
- /**
410
- * Convert regexp to namespace
411
- *
412
- * @param {RegExp} regxep
413
- * @return {String} namespace
414
- * @api private
415
- */
416
- function toNamespace(regexp) {
417
- return regexp.toString()
418
- .substring(2, regexp.toString().length - 2)
419
- .replace(/\.\*\?$/, '*');
420
- }
421
-
422
440
  /**
423
441
  * Coerce `val`.
424
442
  *
@@ -576,14 +594,17 @@ var common = setup;
576
594
  return false;
577
595
  }
578
596
 
597
+ let m;
598
+
579
599
  // Is webkit? http://stackoverflow.com/a/16459606/376773
580
600
  // document is undefined in react-native: https://github.com/facebook/react-native/pull/1632
601
+ // eslint-disable-next-line no-return-assign
581
602
  return (typeof document !== 'undefined' && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance) ||
582
603
  // Is firebug? http://stackoverflow.com/a/398120/376773
583
604
  (typeof window !== 'undefined' && window.console && (window.console.firebug || (window.console.exception && window.console.table))) ||
584
605
  // Is firefox >= v31?
585
606
  // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
586
- (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/) && parseInt(RegExp.$1, 10) >= 31) ||
607
+ (typeof navigator !== 'undefined' && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31) ||
587
608
  // Double check webkit in userAgent just in case we are in a worker
588
609
  (typeof navigator !== 'undefined' && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/));
589
610
  }
@@ -667,7 +688,7 @@ var common = setup;
667
688
  function load() {
668
689
  let r;
669
690
  try {
670
- r = exports.storage.getItem('debug');
691
+ r = exports.storage.getItem('debug') || exports.storage.getItem('DEBUG') ;
671
692
  } catch (error) {
672
693
  // Swallow
673
694
  // XXX (@Qix-) should we be logging these?
@@ -1,4 +1,4 @@
1
- import { M as MultiWallet, h as encrypt, d as base58$1 } from './identity-CQ_ieRiz-CTM-_kGF.js';
1
+ import { M as MultiWallet, f as encrypt, c as base58$1 } from './identity--VAIVSMm-DTWL357I.js';
2
2
 
3
3
  /**
4
4
  * @params {String} network
@@ -1,5 +1,5 @@
1
- import { F as FormatInterface } from './node-browser-DcYcGvEF.js';
2
- import './identity-CQ_ieRiz-CTM-_kGF.js';
1
+ import { F as FormatInterface } from './node-browser-BvxzAdLe.js';
2
+ import './identity--VAIVSMm-DTWL357I.js';
3
3
  import './index-DUfUgiQY.js';
4
4
 
5
5
  var proto$b = {