@gearbox-protocol/deploy-tools 4.1.0 → 4.1.1-next.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/dist/index.mjs +756 -2315
- package/package.json +4 -4
package/dist/index.mjs
CHANGED
|
@@ -137917,7 +137917,7 @@ var require_httpRequests = __commonJS({
|
|
|
137917
137917
|
HttpMethod2["Get"] = "get";
|
|
137918
137918
|
HttpMethod2["Post"] = "post";
|
|
137919
137919
|
HttpMethod2["Delete"] = "delete";
|
|
137920
|
-
})(HttpMethod
|
|
137920
|
+
})(HttpMethod || (exports2.HttpMethod = HttpMethod = {}));
|
|
137921
137921
|
async function sendRequest({ url: url2, method, body }) {
|
|
137922
137922
|
const response = await (0, node_fetch_1.default)(url2, {
|
|
137923
137923
|
method,
|
|
@@ -171247,9 +171247,9 @@ var require_lru_cache = __commonJS({
|
|
|
171247
171247
|
}
|
|
171248
171248
|
});
|
|
171249
171249
|
|
|
171250
|
-
// ../../node_modules
|
|
171250
|
+
// ../../node_modules/semver/internal/parse-options.js
|
|
171251
171251
|
var require_parse_options = __commonJS({
|
|
171252
|
-
"../../node_modules
|
|
171252
|
+
"../../node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
171253
171253
|
var looseOption = Object.freeze({ loose: true });
|
|
171254
171254
|
var emptyOpts = Object.freeze({});
|
|
171255
171255
|
var parseOptions = (options) => {
|
|
@@ -171265,9 +171265,9 @@ var require_parse_options = __commonJS({
|
|
|
171265
171265
|
}
|
|
171266
171266
|
});
|
|
171267
171267
|
|
|
171268
|
-
// ../../node_modules
|
|
171268
|
+
// ../../node_modules/semver/internal/constants.js
|
|
171269
171269
|
var require_constants7 = __commonJS({
|
|
171270
|
-
"../../node_modules
|
|
171270
|
+
"../../node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
171271
171271
|
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
171272
171272
|
var MAX_LENGTH = 256;
|
|
171273
171273
|
var MAX_SAFE_INTEGER3 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
@@ -171296,18 +171296,18 @@ var require_constants7 = __commonJS({
|
|
|
171296
171296
|
}
|
|
171297
171297
|
});
|
|
171298
171298
|
|
|
171299
|
-
// ../../node_modules
|
|
171299
|
+
// ../../node_modules/semver/internal/debug.js
|
|
171300
171300
|
var require_debug2 = __commonJS({
|
|
171301
|
-
"../../node_modules
|
|
171301
|
+
"../../node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
171302
171302
|
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
171303
171303
|
};
|
|
171304
171304
|
module2.exports = debug;
|
|
171305
171305
|
}
|
|
171306
171306
|
});
|
|
171307
171307
|
|
|
171308
|
-
// ../../node_modules
|
|
171308
|
+
// ../../node_modules/semver/internal/re.js
|
|
171309
171309
|
var require_re = __commonJS({
|
|
171310
|
-
"../../node_modules
|
|
171310
|
+
"../../node_modules/semver/internal/re.js"(exports2, module2) {
|
|
171311
171311
|
var {
|
|
171312
171312
|
MAX_SAFE_COMPONENT_LENGTH,
|
|
171313
171313
|
MAX_SAFE_BUILD_LENGTH,
|
|
@@ -171363,8 +171363,11 @@ var require_re = __commonJS({
|
|
|
171363
171363
|
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
171364
171364
|
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
171365
171365
|
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
171366
|
-
createToken("
|
|
171366
|
+
createToken("COERCEPLAIN", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?`);
|
|
171367
|
+
createToken("COERCE", `${src[t.COERCEPLAIN]}(?:$|[^\\d])`);
|
|
171368
|
+
createToken("COERCEFULL", src[t.COERCEPLAIN] + `(?:${src[t.PRERELEASE]})?(?:${src[t.BUILD]})?(?:$|[^\\d])`);
|
|
171367
171369
|
createToken("COERCERTL", src[t.COERCE], true);
|
|
171370
|
+
createToken("COERCERTLFULL", src[t.COERCEFULL], true);
|
|
171368
171371
|
createToken("LONETILDE", "(?:~>?)");
|
|
171369
171372
|
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
171370
171373
|
exports2.tildeTrimReplace = "$1~";
|
|
@@ -171387,9 +171390,9 @@ var require_re = __commonJS({
|
|
|
171387
171390
|
}
|
|
171388
171391
|
});
|
|
171389
171392
|
|
|
171390
|
-
// ../../node_modules
|
|
171393
|
+
// ../../node_modules/semver/internal/identifiers.js
|
|
171391
171394
|
var require_identifiers = __commonJS({
|
|
171392
|
-
"../../node_modules
|
|
171395
|
+
"../../node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
171393
171396
|
var numeric = /^[0-9]+$/;
|
|
171394
171397
|
var compareIdentifiers = (a, b3) => {
|
|
171395
171398
|
const anum = numeric.test(a);
|
|
@@ -171408,9 +171411,9 @@ var require_identifiers = __commonJS({
|
|
|
171408
171411
|
}
|
|
171409
171412
|
});
|
|
171410
171413
|
|
|
171411
|
-
// ../../node_modules
|
|
171414
|
+
// ../../node_modules/semver/classes/semver.js
|
|
171412
171415
|
var require_semver = __commonJS({
|
|
171413
|
-
"../../node_modules
|
|
171416
|
+
"../../node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
171414
171417
|
var debug = require_debug2();
|
|
171415
171418
|
var { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER3 } = require_constants7();
|
|
171416
171419
|
var { safeRe: re, t } = require_re();
|
|
@@ -171650,72 +171653,72 @@ var require_semver = __commonJS({
|
|
|
171650
171653
|
}
|
|
171651
171654
|
});
|
|
171652
171655
|
|
|
171653
|
-
// ../../node_modules
|
|
171656
|
+
// ../../node_modules/semver/functions/compare.js
|
|
171654
171657
|
var require_compare = __commonJS({
|
|
171655
|
-
"../../node_modules
|
|
171658
|
+
"../../node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
171656
171659
|
var SemVer = require_semver();
|
|
171657
171660
|
var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
|
|
171658
171661
|
module2.exports = compare;
|
|
171659
171662
|
}
|
|
171660
171663
|
});
|
|
171661
171664
|
|
|
171662
|
-
// ../../node_modules
|
|
171665
|
+
// ../../node_modules/semver/functions/eq.js
|
|
171663
171666
|
var require_eq = __commonJS({
|
|
171664
|
-
"../../node_modules
|
|
171667
|
+
"../../node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
171665
171668
|
var compare = require_compare();
|
|
171666
171669
|
var eq2 = (a, b3, loose) => compare(a, b3, loose) === 0;
|
|
171667
171670
|
module2.exports = eq2;
|
|
171668
171671
|
}
|
|
171669
171672
|
});
|
|
171670
171673
|
|
|
171671
|
-
// ../../node_modules
|
|
171674
|
+
// ../../node_modules/semver/functions/neq.js
|
|
171672
171675
|
var require_neq = __commonJS({
|
|
171673
|
-
"../../node_modules
|
|
171676
|
+
"../../node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
171674
171677
|
var compare = require_compare();
|
|
171675
171678
|
var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
|
|
171676
171679
|
module2.exports = neq;
|
|
171677
171680
|
}
|
|
171678
171681
|
});
|
|
171679
171682
|
|
|
171680
|
-
// ../../node_modules
|
|
171683
|
+
// ../../node_modules/semver/functions/gt.js
|
|
171681
171684
|
var require_gt = __commonJS({
|
|
171682
|
-
"../../node_modules
|
|
171685
|
+
"../../node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
171683
171686
|
var compare = require_compare();
|
|
171684
171687
|
var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
|
|
171685
171688
|
module2.exports = gt;
|
|
171686
171689
|
}
|
|
171687
171690
|
});
|
|
171688
171691
|
|
|
171689
|
-
// ../../node_modules
|
|
171692
|
+
// ../../node_modules/semver/functions/gte.js
|
|
171690
171693
|
var require_gte = __commonJS({
|
|
171691
|
-
"../../node_modules
|
|
171694
|
+
"../../node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
171692
171695
|
var compare = require_compare();
|
|
171693
171696
|
var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
|
|
171694
171697
|
module2.exports = gte;
|
|
171695
171698
|
}
|
|
171696
171699
|
});
|
|
171697
171700
|
|
|
171698
|
-
// ../../node_modules
|
|
171701
|
+
// ../../node_modules/semver/functions/lt.js
|
|
171699
171702
|
var require_lt = __commonJS({
|
|
171700
|
-
"../../node_modules
|
|
171703
|
+
"../../node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
171701
171704
|
var compare = require_compare();
|
|
171702
171705
|
var lt = (a, b3, loose) => compare(a, b3, loose) < 0;
|
|
171703
171706
|
module2.exports = lt;
|
|
171704
171707
|
}
|
|
171705
171708
|
});
|
|
171706
171709
|
|
|
171707
|
-
// ../../node_modules
|
|
171710
|
+
// ../../node_modules/semver/functions/lte.js
|
|
171708
171711
|
var require_lte = __commonJS({
|
|
171709
|
-
"../../node_modules
|
|
171712
|
+
"../../node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
171710
171713
|
var compare = require_compare();
|
|
171711
171714
|
var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
|
|
171712
171715
|
module2.exports = lte;
|
|
171713
171716
|
}
|
|
171714
171717
|
});
|
|
171715
171718
|
|
|
171716
|
-
// ../../node_modules
|
|
171719
|
+
// ../../node_modules/semver/functions/cmp.js
|
|
171717
171720
|
var require_cmp = __commonJS({
|
|
171718
|
-
"../../node_modules
|
|
171721
|
+
"../../node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
171719
171722
|
var eq2 = require_eq();
|
|
171720
171723
|
var neq = require_neq();
|
|
171721
171724
|
var gt = require_gt();
|
|
@@ -171762,9 +171765,9 @@ var require_cmp = __commonJS({
|
|
|
171762
171765
|
}
|
|
171763
171766
|
});
|
|
171764
171767
|
|
|
171765
|
-
// ../../node_modules
|
|
171768
|
+
// ../../node_modules/semver/classes/comparator.js
|
|
171766
171769
|
var require_comparator = __commonJS({
|
|
171767
|
-
"../../node_modules
|
|
171770
|
+
"../../node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
171768
171771
|
var ANY = Symbol("SemVer ANY");
|
|
171769
171772
|
var Comparator = class _Comparator {
|
|
171770
171773
|
static get ANY() {
|
|
@@ -171874,9 +171877,9 @@ var require_comparator = __commonJS({
|
|
|
171874
171877
|
}
|
|
171875
171878
|
});
|
|
171876
171879
|
|
|
171877
|
-
// ../../node_modules
|
|
171880
|
+
// ../../node_modules/semver/classes/range.js
|
|
171878
171881
|
var require_range = __commonJS({
|
|
171879
|
-
"../../node_modules
|
|
171882
|
+
"../../node_modules/semver/classes/range.js"(exports2, module2) {
|
|
171880
171883
|
var Range = class _Range {
|
|
171881
171884
|
constructor(range2, options) {
|
|
171882
171885
|
options = parseOptions(options);
|
|
@@ -172231,9 +172234,9 @@ var require_range = __commonJS({
|
|
|
172231
172234
|
}
|
|
172232
172235
|
});
|
|
172233
172236
|
|
|
172234
|
-
// ../../node_modules
|
|
172237
|
+
// ../../node_modules/semver/functions/satisfies.js
|
|
172235
172238
|
var require_satisfies = __commonJS({
|
|
172236
|
-
"../../node_modules
|
|
172239
|
+
"../../node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
172237
172240
|
var Range = require_range();
|
|
172238
172241
|
var satisfies = (version4, range2, options) => {
|
|
172239
172242
|
try {
|
|
@@ -179423,1006 +179426,6 @@ var require_gnosis_safe4 = __commonJS({
|
|
|
179423
179426
|
}
|
|
179424
179427
|
});
|
|
179425
179428
|
|
|
179426
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/parse-options.js
|
|
179427
|
-
var require_parse_options2 = __commonJS({
|
|
179428
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
179429
|
-
var looseOption = Object.freeze({ loose: true });
|
|
179430
|
-
var emptyOpts = Object.freeze({});
|
|
179431
|
-
var parseOptions = (options) => {
|
|
179432
|
-
if (!options) {
|
|
179433
|
-
return emptyOpts;
|
|
179434
|
-
}
|
|
179435
|
-
if (typeof options !== "object") {
|
|
179436
|
-
return looseOption;
|
|
179437
|
-
}
|
|
179438
|
-
return options;
|
|
179439
|
-
};
|
|
179440
|
-
module2.exports = parseOptions;
|
|
179441
|
-
}
|
|
179442
|
-
});
|
|
179443
|
-
|
|
179444
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/constants.js
|
|
179445
|
-
var require_constants8 = __commonJS({
|
|
179446
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
179447
|
-
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
179448
|
-
var MAX_LENGTH = 256;
|
|
179449
|
-
var MAX_SAFE_INTEGER3 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
179450
|
-
9007199254740991;
|
|
179451
|
-
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
179452
|
-
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
179453
|
-
var RELEASE_TYPES = [
|
|
179454
|
-
"major",
|
|
179455
|
-
"premajor",
|
|
179456
|
-
"minor",
|
|
179457
|
-
"preminor",
|
|
179458
|
-
"patch",
|
|
179459
|
-
"prepatch",
|
|
179460
|
-
"prerelease"
|
|
179461
|
-
];
|
|
179462
|
-
module2.exports = {
|
|
179463
|
-
MAX_LENGTH,
|
|
179464
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
179465
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
179466
|
-
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER3,
|
|
179467
|
-
RELEASE_TYPES,
|
|
179468
|
-
SEMVER_SPEC_VERSION,
|
|
179469
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
179470
|
-
FLAG_LOOSE: 2
|
|
179471
|
-
};
|
|
179472
|
-
}
|
|
179473
|
-
});
|
|
179474
|
-
|
|
179475
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/debug.js
|
|
179476
|
-
var require_debug3 = __commonJS({
|
|
179477
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
179478
|
-
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
179479
|
-
};
|
|
179480
|
-
module2.exports = debug;
|
|
179481
|
-
}
|
|
179482
|
-
});
|
|
179483
|
-
|
|
179484
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/re.js
|
|
179485
|
-
var require_re2 = __commonJS({
|
|
179486
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/re.js"(exports2, module2) {
|
|
179487
|
-
var {
|
|
179488
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
179489
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
179490
|
-
MAX_LENGTH
|
|
179491
|
-
} = require_constants8();
|
|
179492
|
-
var debug = require_debug3();
|
|
179493
|
-
exports2 = module2.exports = {};
|
|
179494
|
-
var re = exports2.re = [];
|
|
179495
|
-
var safeRe = exports2.safeRe = [];
|
|
179496
|
-
var src = exports2.src = [];
|
|
179497
|
-
var t = exports2.t = {};
|
|
179498
|
-
var R = 0;
|
|
179499
|
-
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
179500
|
-
var safeRegexReplacements = [
|
|
179501
|
-
["\\s", 1],
|
|
179502
|
-
["\\d", MAX_LENGTH],
|
|
179503
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
179504
|
-
];
|
|
179505
|
-
var makeSafeRegex = (value) => {
|
|
179506
|
-
for (const [token, max] of safeRegexReplacements) {
|
|
179507
|
-
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
179508
|
-
}
|
|
179509
|
-
return value;
|
|
179510
|
-
};
|
|
179511
|
-
var createToken = (name, value, isGlobal) => {
|
|
179512
|
-
const safe = makeSafeRegex(value);
|
|
179513
|
-
const index = R++;
|
|
179514
|
-
debug(name, index, value);
|
|
179515
|
-
t[name] = index;
|
|
179516
|
-
src[index] = value;
|
|
179517
|
-
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
179518
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
179519
|
-
};
|
|
179520
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
179521
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
179522
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
179523
|
-
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
179524
|
-
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
179525
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
179526
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
179527
|
-
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
179528
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
179529
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
179530
|
-
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
179531
|
-
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
179532
|
-
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
179533
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
179534
|
-
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
179535
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
179536
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
179537
|
-
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
179538
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
179539
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
179540
|
-
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
179541
|
-
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
179542
|
-
createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
|
|
179543
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
179544
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
179545
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
179546
|
-
exports2.tildeTrimReplace = "$1~";
|
|
179547
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
179548
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
179549
|
-
createToken("LONECARET", "(?:\\^)");
|
|
179550
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
179551
|
-
exports2.caretTrimReplace = "$1^";
|
|
179552
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
179553
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
179554
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
179555
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
179556
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
179557
|
-
exports2.comparatorTrimReplace = "$1$2$3";
|
|
179558
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
179559
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
179560
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
179561
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
179562
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
179563
|
-
}
|
|
179564
|
-
});
|
|
179565
|
-
|
|
179566
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/identifiers.js
|
|
179567
|
-
var require_identifiers2 = __commonJS({
|
|
179568
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
179569
|
-
var numeric = /^[0-9]+$/;
|
|
179570
|
-
var compareIdentifiers = (a, b3) => {
|
|
179571
|
-
const anum = numeric.test(a);
|
|
179572
|
-
const bnum = numeric.test(b3);
|
|
179573
|
-
if (anum && bnum) {
|
|
179574
|
-
a = +a;
|
|
179575
|
-
b3 = +b3;
|
|
179576
|
-
}
|
|
179577
|
-
return a === b3 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b3 ? -1 : 1;
|
|
179578
|
-
};
|
|
179579
|
-
var rcompareIdentifiers = (a, b3) => compareIdentifiers(b3, a);
|
|
179580
|
-
module2.exports = {
|
|
179581
|
-
compareIdentifiers,
|
|
179582
|
-
rcompareIdentifiers
|
|
179583
|
-
};
|
|
179584
|
-
}
|
|
179585
|
-
});
|
|
179586
|
-
|
|
179587
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/classes/semver.js
|
|
179588
|
-
var require_semver2 = __commonJS({
|
|
179589
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
179590
|
-
var debug = require_debug3();
|
|
179591
|
-
var { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER3 } = require_constants8();
|
|
179592
|
-
var { safeRe: re, t } = require_re2();
|
|
179593
|
-
var parseOptions = require_parse_options2();
|
|
179594
|
-
var { compareIdentifiers } = require_identifiers2();
|
|
179595
|
-
var SemVer = class _SemVer {
|
|
179596
|
-
constructor(version4, options) {
|
|
179597
|
-
options = parseOptions(options);
|
|
179598
|
-
if (version4 instanceof _SemVer) {
|
|
179599
|
-
if (version4.loose === !!options.loose && version4.includePrerelease === !!options.includePrerelease) {
|
|
179600
|
-
return version4;
|
|
179601
|
-
} else {
|
|
179602
|
-
version4 = version4.version;
|
|
179603
|
-
}
|
|
179604
|
-
} else if (typeof version4 !== "string") {
|
|
179605
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version4}".`);
|
|
179606
|
-
}
|
|
179607
|
-
if (version4.length > MAX_LENGTH) {
|
|
179608
|
-
throw new TypeError(
|
|
179609
|
-
`version is longer than ${MAX_LENGTH} characters`
|
|
179610
|
-
);
|
|
179611
|
-
}
|
|
179612
|
-
debug("SemVer", version4, options);
|
|
179613
|
-
this.options = options;
|
|
179614
|
-
this.loose = !!options.loose;
|
|
179615
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
179616
|
-
const m = version4.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
179617
|
-
if (!m) {
|
|
179618
|
-
throw new TypeError(`Invalid Version: ${version4}`);
|
|
179619
|
-
}
|
|
179620
|
-
this.raw = version4;
|
|
179621
|
-
this.major = +m[1];
|
|
179622
|
-
this.minor = +m[2];
|
|
179623
|
-
this.patch = +m[3];
|
|
179624
|
-
if (this.major > MAX_SAFE_INTEGER3 || this.major < 0) {
|
|
179625
|
-
throw new TypeError("Invalid major version");
|
|
179626
|
-
}
|
|
179627
|
-
if (this.minor > MAX_SAFE_INTEGER3 || this.minor < 0) {
|
|
179628
|
-
throw new TypeError("Invalid minor version");
|
|
179629
|
-
}
|
|
179630
|
-
if (this.patch > MAX_SAFE_INTEGER3 || this.patch < 0) {
|
|
179631
|
-
throw new TypeError("Invalid patch version");
|
|
179632
|
-
}
|
|
179633
|
-
if (!m[4]) {
|
|
179634
|
-
this.prerelease = [];
|
|
179635
|
-
} else {
|
|
179636
|
-
this.prerelease = m[4].split(".").map((id3) => {
|
|
179637
|
-
if (/^[0-9]+$/.test(id3)) {
|
|
179638
|
-
const num = +id3;
|
|
179639
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER3) {
|
|
179640
|
-
return num;
|
|
179641
|
-
}
|
|
179642
|
-
}
|
|
179643
|
-
return id3;
|
|
179644
|
-
});
|
|
179645
|
-
}
|
|
179646
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
179647
|
-
this.format();
|
|
179648
|
-
}
|
|
179649
|
-
format() {
|
|
179650
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
179651
|
-
if (this.prerelease.length) {
|
|
179652
|
-
this.version += `-${this.prerelease.join(".")}`;
|
|
179653
|
-
}
|
|
179654
|
-
return this.version;
|
|
179655
|
-
}
|
|
179656
|
-
toString() {
|
|
179657
|
-
return this.version;
|
|
179658
|
-
}
|
|
179659
|
-
compare(other) {
|
|
179660
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
179661
|
-
if (!(other instanceof _SemVer)) {
|
|
179662
|
-
if (typeof other === "string" && other === this.version) {
|
|
179663
|
-
return 0;
|
|
179664
|
-
}
|
|
179665
|
-
other = new _SemVer(other, this.options);
|
|
179666
|
-
}
|
|
179667
|
-
if (other.version === this.version) {
|
|
179668
|
-
return 0;
|
|
179669
|
-
}
|
|
179670
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
179671
|
-
}
|
|
179672
|
-
compareMain(other) {
|
|
179673
|
-
if (!(other instanceof _SemVer)) {
|
|
179674
|
-
other = new _SemVer(other, this.options);
|
|
179675
|
-
}
|
|
179676
|
-
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
179677
|
-
}
|
|
179678
|
-
comparePre(other) {
|
|
179679
|
-
if (!(other instanceof _SemVer)) {
|
|
179680
|
-
other = new _SemVer(other, this.options);
|
|
179681
|
-
}
|
|
179682
|
-
if (this.prerelease.length && !other.prerelease.length) {
|
|
179683
|
-
return -1;
|
|
179684
|
-
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
179685
|
-
return 1;
|
|
179686
|
-
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
179687
|
-
return 0;
|
|
179688
|
-
}
|
|
179689
|
-
let i = 0;
|
|
179690
|
-
do {
|
|
179691
|
-
const a = this.prerelease[i];
|
|
179692
|
-
const b3 = other.prerelease[i];
|
|
179693
|
-
debug("prerelease compare", i, a, b3);
|
|
179694
|
-
if (a === void 0 && b3 === void 0) {
|
|
179695
|
-
return 0;
|
|
179696
|
-
} else if (b3 === void 0) {
|
|
179697
|
-
return 1;
|
|
179698
|
-
} else if (a === void 0) {
|
|
179699
|
-
return -1;
|
|
179700
|
-
} else if (a === b3) {
|
|
179701
|
-
continue;
|
|
179702
|
-
} else {
|
|
179703
|
-
return compareIdentifiers(a, b3);
|
|
179704
|
-
}
|
|
179705
|
-
} while (++i);
|
|
179706
|
-
}
|
|
179707
|
-
compareBuild(other) {
|
|
179708
|
-
if (!(other instanceof _SemVer)) {
|
|
179709
|
-
other = new _SemVer(other, this.options);
|
|
179710
|
-
}
|
|
179711
|
-
let i = 0;
|
|
179712
|
-
do {
|
|
179713
|
-
const a = this.build[i];
|
|
179714
|
-
const b3 = other.build[i];
|
|
179715
|
-
debug("prerelease compare", i, a, b3);
|
|
179716
|
-
if (a === void 0 && b3 === void 0) {
|
|
179717
|
-
return 0;
|
|
179718
|
-
} else if (b3 === void 0) {
|
|
179719
|
-
return 1;
|
|
179720
|
-
} else if (a === void 0) {
|
|
179721
|
-
return -1;
|
|
179722
|
-
} else if (a === b3) {
|
|
179723
|
-
continue;
|
|
179724
|
-
} else {
|
|
179725
|
-
return compareIdentifiers(a, b3);
|
|
179726
|
-
}
|
|
179727
|
-
} while (++i);
|
|
179728
|
-
}
|
|
179729
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
179730
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
179731
|
-
inc(release, identifier, identifierBase) {
|
|
179732
|
-
switch (release) {
|
|
179733
|
-
case "premajor":
|
|
179734
|
-
this.prerelease.length = 0;
|
|
179735
|
-
this.patch = 0;
|
|
179736
|
-
this.minor = 0;
|
|
179737
|
-
this.major++;
|
|
179738
|
-
this.inc("pre", identifier, identifierBase);
|
|
179739
|
-
break;
|
|
179740
|
-
case "preminor":
|
|
179741
|
-
this.prerelease.length = 0;
|
|
179742
|
-
this.patch = 0;
|
|
179743
|
-
this.minor++;
|
|
179744
|
-
this.inc("pre", identifier, identifierBase);
|
|
179745
|
-
break;
|
|
179746
|
-
case "prepatch":
|
|
179747
|
-
this.prerelease.length = 0;
|
|
179748
|
-
this.inc("patch", identifier, identifierBase);
|
|
179749
|
-
this.inc("pre", identifier, identifierBase);
|
|
179750
|
-
break;
|
|
179751
|
-
case "prerelease":
|
|
179752
|
-
if (this.prerelease.length === 0) {
|
|
179753
|
-
this.inc("patch", identifier, identifierBase);
|
|
179754
|
-
}
|
|
179755
|
-
this.inc("pre", identifier, identifierBase);
|
|
179756
|
-
break;
|
|
179757
|
-
case "major":
|
|
179758
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
179759
|
-
this.major++;
|
|
179760
|
-
}
|
|
179761
|
-
this.minor = 0;
|
|
179762
|
-
this.patch = 0;
|
|
179763
|
-
this.prerelease = [];
|
|
179764
|
-
break;
|
|
179765
|
-
case "minor":
|
|
179766
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
179767
|
-
this.minor++;
|
|
179768
|
-
}
|
|
179769
|
-
this.patch = 0;
|
|
179770
|
-
this.prerelease = [];
|
|
179771
|
-
break;
|
|
179772
|
-
case "patch":
|
|
179773
|
-
if (this.prerelease.length === 0) {
|
|
179774
|
-
this.patch++;
|
|
179775
|
-
}
|
|
179776
|
-
this.prerelease = [];
|
|
179777
|
-
break;
|
|
179778
|
-
case "pre": {
|
|
179779
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
179780
|
-
if (!identifier && identifierBase === false) {
|
|
179781
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
179782
|
-
}
|
|
179783
|
-
if (this.prerelease.length === 0) {
|
|
179784
|
-
this.prerelease = [base];
|
|
179785
|
-
} else {
|
|
179786
|
-
let i = this.prerelease.length;
|
|
179787
|
-
while (--i >= 0) {
|
|
179788
|
-
if (typeof this.prerelease[i] === "number") {
|
|
179789
|
-
this.prerelease[i]++;
|
|
179790
|
-
i = -2;
|
|
179791
|
-
}
|
|
179792
|
-
}
|
|
179793
|
-
if (i === -1) {
|
|
179794
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
179795
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
179796
|
-
}
|
|
179797
|
-
this.prerelease.push(base);
|
|
179798
|
-
}
|
|
179799
|
-
}
|
|
179800
|
-
if (identifier) {
|
|
179801
|
-
let prerelease = [identifier, base];
|
|
179802
|
-
if (identifierBase === false) {
|
|
179803
|
-
prerelease = [identifier];
|
|
179804
|
-
}
|
|
179805
|
-
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
179806
|
-
if (isNaN(this.prerelease[1])) {
|
|
179807
|
-
this.prerelease = prerelease;
|
|
179808
|
-
}
|
|
179809
|
-
} else {
|
|
179810
|
-
this.prerelease = prerelease;
|
|
179811
|
-
}
|
|
179812
|
-
}
|
|
179813
|
-
break;
|
|
179814
|
-
}
|
|
179815
|
-
default:
|
|
179816
|
-
throw new Error(`invalid increment argument: ${release}`);
|
|
179817
|
-
}
|
|
179818
|
-
this.raw = this.format();
|
|
179819
|
-
if (this.build.length) {
|
|
179820
|
-
this.raw += `+${this.build.join(".")}`;
|
|
179821
|
-
}
|
|
179822
|
-
return this;
|
|
179823
|
-
}
|
|
179824
|
-
};
|
|
179825
|
-
module2.exports = SemVer;
|
|
179826
|
-
}
|
|
179827
|
-
});
|
|
179828
|
-
|
|
179829
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/compare.js
|
|
179830
|
-
var require_compare2 = __commonJS({
|
|
179831
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
179832
|
-
var SemVer = require_semver2();
|
|
179833
|
-
var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
|
|
179834
|
-
module2.exports = compare;
|
|
179835
|
-
}
|
|
179836
|
-
});
|
|
179837
|
-
|
|
179838
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/eq.js
|
|
179839
|
-
var require_eq2 = __commonJS({
|
|
179840
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
179841
|
-
var compare = require_compare2();
|
|
179842
|
-
var eq2 = (a, b3, loose) => compare(a, b3, loose) === 0;
|
|
179843
|
-
module2.exports = eq2;
|
|
179844
|
-
}
|
|
179845
|
-
});
|
|
179846
|
-
|
|
179847
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/neq.js
|
|
179848
|
-
var require_neq2 = __commonJS({
|
|
179849
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
179850
|
-
var compare = require_compare2();
|
|
179851
|
-
var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
|
|
179852
|
-
module2.exports = neq;
|
|
179853
|
-
}
|
|
179854
|
-
});
|
|
179855
|
-
|
|
179856
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/gt.js
|
|
179857
|
-
var require_gt2 = __commonJS({
|
|
179858
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
179859
|
-
var compare = require_compare2();
|
|
179860
|
-
var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
|
|
179861
|
-
module2.exports = gt;
|
|
179862
|
-
}
|
|
179863
|
-
});
|
|
179864
|
-
|
|
179865
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/gte.js
|
|
179866
|
-
var require_gte2 = __commonJS({
|
|
179867
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
179868
|
-
var compare = require_compare2();
|
|
179869
|
-
var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
|
|
179870
|
-
module2.exports = gte;
|
|
179871
|
-
}
|
|
179872
|
-
});
|
|
179873
|
-
|
|
179874
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/lt.js
|
|
179875
|
-
var require_lt2 = __commonJS({
|
|
179876
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
179877
|
-
var compare = require_compare2();
|
|
179878
|
-
var lt = (a, b3, loose) => compare(a, b3, loose) < 0;
|
|
179879
|
-
module2.exports = lt;
|
|
179880
|
-
}
|
|
179881
|
-
});
|
|
179882
|
-
|
|
179883
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/lte.js
|
|
179884
|
-
var require_lte2 = __commonJS({
|
|
179885
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
179886
|
-
var compare = require_compare2();
|
|
179887
|
-
var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
|
|
179888
|
-
module2.exports = lte;
|
|
179889
|
-
}
|
|
179890
|
-
});
|
|
179891
|
-
|
|
179892
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/cmp.js
|
|
179893
|
-
var require_cmp2 = __commonJS({
|
|
179894
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
179895
|
-
var eq2 = require_eq2();
|
|
179896
|
-
var neq = require_neq2();
|
|
179897
|
-
var gt = require_gt2();
|
|
179898
|
-
var gte = require_gte2();
|
|
179899
|
-
var lt = require_lt2();
|
|
179900
|
-
var lte = require_lte2();
|
|
179901
|
-
var cmp = (a, op, b3, loose) => {
|
|
179902
|
-
switch (op) {
|
|
179903
|
-
case "===":
|
|
179904
|
-
if (typeof a === "object") {
|
|
179905
|
-
a = a.version;
|
|
179906
|
-
}
|
|
179907
|
-
if (typeof b3 === "object") {
|
|
179908
|
-
b3 = b3.version;
|
|
179909
|
-
}
|
|
179910
|
-
return a === b3;
|
|
179911
|
-
case "!==":
|
|
179912
|
-
if (typeof a === "object") {
|
|
179913
|
-
a = a.version;
|
|
179914
|
-
}
|
|
179915
|
-
if (typeof b3 === "object") {
|
|
179916
|
-
b3 = b3.version;
|
|
179917
|
-
}
|
|
179918
|
-
return a !== b3;
|
|
179919
|
-
case "":
|
|
179920
|
-
case "=":
|
|
179921
|
-
case "==":
|
|
179922
|
-
return eq2(a, b3, loose);
|
|
179923
|
-
case "!=":
|
|
179924
|
-
return neq(a, b3, loose);
|
|
179925
|
-
case ">":
|
|
179926
|
-
return gt(a, b3, loose);
|
|
179927
|
-
case ">=":
|
|
179928
|
-
return gte(a, b3, loose);
|
|
179929
|
-
case "<":
|
|
179930
|
-
return lt(a, b3, loose);
|
|
179931
|
-
case "<=":
|
|
179932
|
-
return lte(a, b3, loose);
|
|
179933
|
-
default:
|
|
179934
|
-
throw new TypeError(`Invalid operator: ${op}`);
|
|
179935
|
-
}
|
|
179936
|
-
};
|
|
179937
|
-
module2.exports = cmp;
|
|
179938
|
-
}
|
|
179939
|
-
});
|
|
179940
|
-
|
|
179941
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/classes/comparator.js
|
|
179942
|
-
var require_comparator2 = __commonJS({
|
|
179943
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
179944
|
-
var ANY = Symbol("SemVer ANY");
|
|
179945
|
-
var Comparator = class _Comparator {
|
|
179946
|
-
static get ANY() {
|
|
179947
|
-
return ANY;
|
|
179948
|
-
}
|
|
179949
|
-
constructor(comp, options) {
|
|
179950
|
-
options = parseOptions(options);
|
|
179951
|
-
if (comp instanceof _Comparator) {
|
|
179952
|
-
if (comp.loose === !!options.loose) {
|
|
179953
|
-
return comp;
|
|
179954
|
-
} else {
|
|
179955
|
-
comp = comp.value;
|
|
179956
|
-
}
|
|
179957
|
-
}
|
|
179958
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
179959
|
-
debug("comparator", comp, options);
|
|
179960
|
-
this.options = options;
|
|
179961
|
-
this.loose = !!options.loose;
|
|
179962
|
-
this.parse(comp);
|
|
179963
|
-
if (this.semver === ANY) {
|
|
179964
|
-
this.value = "";
|
|
179965
|
-
} else {
|
|
179966
|
-
this.value = this.operator + this.semver.version;
|
|
179967
|
-
}
|
|
179968
|
-
debug("comp", this);
|
|
179969
|
-
}
|
|
179970
|
-
parse(comp) {
|
|
179971
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
179972
|
-
const m = comp.match(r);
|
|
179973
|
-
if (!m) {
|
|
179974
|
-
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
179975
|
-
}
|
|
179976
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
179977
|
-
if (this.operator === "=") {
|
|
179978
|
-
this.operator = "";
|
|
179979
|
-
}
|
|
179980
|
-
if (!m[2]) {
|
|
179981
|
-
this.semver = ANY;
|
|
179982
|
-
} else {
|
|
179983
|
-
this.semver = new SemVer(m[2], this.options.loose);
|
|
179984
|
-
}
|
|
179985
|
-
}
|
|
179986
|
-
toString() {
|
|
179987
|
-
return this.value;
|
|
179988
|
-
}
|
|
179989
|
-
test(version4) {
|
|
179990
|
-
debug("Comparator.test", version4, this.options.loose);
|
|
179991
|
-
if (this.semver === ANY || version4 === ANY) {
|
|
179992
|
-
return true;
|
|
179993
|
-
}
|
|
179994
|
-
if (typeof version4 === "string") {
|
|
179995
|
-
try {
|
|
179996
|
-
version4 = new SemVer(version4, this.options);
|
|
179997
|
-
} catch (er) {
|
|
179998
|
-
return false;
|
|
179999
|
-
}
|
|
180000
|
-
}
|
|
180001
|
-
return cmp(version4, this.operator, this.semver, this.options);
|
|
180002
|
-
}
|
|
180003
|
-
intersects(comp, options) {
|
|
180004
|
-
if (!(comp instanceof _Comparator)) {
|
|
180005
|
-
throw new TypeError("a Comparator is required");
|
|
180006
|
-
}
|
|
180007
|
-
if (this.operator === "") {
|
|
180008
|
-
if (this.value === "") {
|
|
180009
|
-
return true;
|
|
180010
|
-
}
|
|
180011
|
-
return new Range(comp.value, options).test(this.value);
|
|
180012
|
-
} else if (comp.operator === "") {
|
|
180013
|
-
if (comp.value === "") {
|
|
180014
|
-
return true;
|
|
180015
|
-
}
|
|
180016
|
-
return new Range(this.value, options).test(comp.semver);
|
|
180017
|
-
}
|
|
180018
|
-
options = parseOptions(options);
|
|
180019
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
180020
|
-
return false;
|
|
180021
|
-
}
|
|
180022
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
180023
|
-
return false;
|
|
180024
|
-
}
|
|
180025
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
180026
|
-
return true;
|
|
180027
|
-
}
|
|
180028
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
180029
|
-
return true;
|
|
180030
|
-
}
|
|
180031
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
180032
|
-
return true;
|
|
180033
|
-
}
|
|
180034
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
180035
|
-
return true;
|
|
180036
|
-
}
|
|
180037
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
180038
|
-
return true;
|
|
180039
|
-
}
|
|
180040
|
-
return false;
|
|
180041
|
-
}
|
|
180042
|
-
};
|
|
180043
|
-
module2.exports = Comparator;
|
|
180044
|
-
var parseOptions = require_parse_options2();
|
|
180045
|
-
var { safeRe: re, t } = require_re2();
|
|
180046
|
-
var cmp = require_cmp2();
|
|
180047
|
-
var debug = require_debug3();
|
|
180048
|
-
var SemVer = require_semver2();
|
|
180049
|
-
var Range = require_range2();
|
|
180050
|
-
}
|
|
180051
|
-
});
|
|
180052
|
-
|
|
180053
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/classes/range.js
|
|
180054
|
-
var require_range2 = __commonJS({
|
|
180055
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
180056
|
-
var Range = class _Range {
|
|
180057
|
-
constructor(range2, options) {
|
|
180058
|
-
options = parseOptions(options);
|
|
180059
|
-
if (range2 instanceof _Range) {
|
|
180060
|
-
if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) {
|
|
180061
|
-
return range2;
|
|
180062
|
-
} else {
|
|
180063
|
-
return new _Range(range2.raw, options);
|
|
180064
|
-
}
|
|
180065
|
-
}
|
|
180066
|
-
if (range2 instanceof Comparator) {
|
|
180067
|
-
this.raw = range2.value;
|
|
180068
|
-
this.set = [[range2]];
|
|
180069
|
-
this.format();
|
|
180070
|
-
return this;
|
|
180071
|
-
}
|
|
180072
|
-
this.options = options;
|
|
180073
|
-
this.loose = !!options.loose;
|
|
180074
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
180075
|
-
this.raw = range2.trim().split(/\s+/).join(" ");
|
|
180076
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
180077
|
-
if (!this.set.length) {
|
|
180078
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
180079
|
-
}
|
|
180080
|
-
if (this.set.length > 1) {
|
|
180081
|
-
const first = this.set[0];
|
|
180082
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
180083
|
-
if (this.set.length === 0) {
|
|
180084
|
-
this.set = [first];
|
|
180085
|
-
} else if (this.set.length > 1) {
|
|
180086
|
-
for (const c of this.set) {
|
|
180087
|
-
if (c.length === 1 && isAny(c[0])) {
|
|
180088
|
-
this.set = [c];
|
|
180089
|
-
break;
|
|
180090
|
-
}
|
|
180091
|
-
}
|
|
180092
|
-
}
|
|
180093
|
-
}
|
|
180094
|
-
this.format();
|
|
180095
|
-
}
|
|
180096
|
-
format() {
|
|
180097
|
-
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
|
|
180098
|
-
return this.range;
|
|
180099
|
-
}
|
|
180100
|
-
toString() {
|
|
180101
|
-
return this.range;
|
|
180102
|
-
}
|
|
180103
|
-
parseRange(range2) {
|
|
180104
|
-
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
180105
|
-
const memoKey = memoOpts + ":" + range2;
|
|
180106
|
-
const cached = cache.get(memoKey);
|
|
180107
|
-
if (cached) {
|
|
180108
|
-
return cached;
|
|
180109
|
-
}
|
|
180110
|
-
const loose = this.options.loose;
|
|
180111
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
180112
|
-
range2 = range2.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
180113
|
-
debug("hyphen replace", range2);
|
|
180114
|
-
range2 = range2.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
180115
|
-
debug("comparator trim", range2);
|
|
180116
|
-
range2 = range2.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
180117
|
-
debug("tilde trim", range2);
|
|
180118
|
-
range2 = range2.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
180119
|
-
debug("caret trim", range2);
|
|
180120
|
-
let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
180121
|
-
if (loose) {
|
|
180122
|
-
rangeList = rangeList.filter((comp) => {
|
|
180123
|
-
debug("loose invalid filter", comp, this.options);
|
|
180124
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
180125
|
-
});
|
|
180126
|
-
}
|
|
180127
|
-
debug("range list", rangeList);
|
|
180128
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
180129
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
180130
|
-
for (const comp of comparators) {
|
|
180131
|
-
if (isNullSet(comp)) {
|
|
180132
|
-
return [comp];
|
|
180133
|
-
}
|
|
180134
|
-
rangeMap.set(comp.value, comp);
|
|
180135
|
-
}
|
|
180136
|
-
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
180137
|
-
rangeMap.delete("");
|
|
180138
|
-
}
|
|
180139
|
-
const result = [...rangeMap.values()];
|
|
180140
|
-
cache.set(memoKey, result);
|
|
180141
|
-
return result;
|
|
180142
|
-
}
|
|
180143
|
-
intersects(range2, options) {
|
|
180144
|
-
if (!(range2 instanceof _Range)) {
|
|
180145
|
-
throw new TypeError("a Range is required");
|
|
180146
|
-
}
|
|
180147
|
-
return this.set.some((thisComparators) => {
|
|
180148
|
-
return isSatisfiable(thisComparators, options) && range2.set.some((rangeComparators) => {
|
|
180149
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
180150
|
-
return rangeComparators.every((rangeComparator) => {
|
|
180151
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
180152
|
-
});
|
|
180153
|
-
});
|
|
180154
|
-
});
|
|
180155
|
-
});
|
|
180156
|
-
}
|
|
180157
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
180158
|
-
test(version4) {
|
|
180159
|
-
if (!version4) {
|
|
180160
|
-
return false;
|
|
180161
|
-
}
|
|
180162
|
-
if (typeof version4 === "string") {
|
|
180163
|
-
try {
|
|
180164
|
-
version4 = new SemVer(version4, this.options);
|
|
180165
|
-
} catch (er) {
|
|
180166
|
-
return false;
|
|
180167
|
-
}
|
|
180168
|
-
}
|
|
180169
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
180170
|
-
if (testSet(this.set[i], version4, this.options)) {
|
|
180171
|
-
return true;
|
|
180172
|
-
}
|
|
180173
|
-
}
|
|
180174
|
-
return false;
|
|
180175
|
-
}
|
|
180176
|
-
};
|
|
180177
|
-
module2.exports = Range;
|
|
180178
|
-
var LRU = require_lru_cache();
|
|
180179
|
-
var cache = new LRU({ max: 1e3 });
|
|
180180
|
-
var parseOptions = require_parse_options2();
|
|
180181
|
-
var Comparator = require_comparator2();
|
|
180182
|
-
var debug = require_debug3();
|
|
180183
|
-
var SemVer = require_semver2();
|
|
180184
|
-
var {
|
|
180185
|
-
safeRe: re,
|
|
180186
|
-
t,
|
|
180187
|
-
comparatorTrimReplace,
|
|
180188
|
-
tildeTrimReplace,
|
|
180189
|
-
caretTrimReplace
|
|
180190
|
-
} = require_re2();
|
|
180191
|
-
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants8();
|
|
180192
|
-
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
180193
|
-
var isAny = (c) => c.value === "";
|
|
180194
|
-
var isSatisfiable = (comparators, options) => {
|
|
180195
|
-
let result = true;
|
|
180196
|
-
const remainingComparators = comparators.slice();
|
|
180197
|
-
let testComparator = remainingComparators.pop();
|
|
180198
|
-
while (result && remainingComparators.length) {
|
|
180199
|
-
result = remainingComparators.every((otherComparator) => {
|
|
180200
|
-
return testComparator.intersects(otherComparator, options);
|
|
180201
|
-
});
|
|
180202
|
-
testComparator = remainingComparators.pop();
|
|
180203
|
-
}
|
|
180204
|
-
return result;
|
|
180205
|
-
};
|
|
180206
|
-
var parseComparator = (comp, options) => {
|
|
180207
|
-
debug("comp", comp, options);
|
|
180208
|
-
comp = replaceCarets(comp, options);
|
|
180209
|
-
debug("caret", comp);
|
|
180210
|
-
comp = replaceTildes(comp, options);
|
|
180211
|
-
debug("tildes", comp);
|
|
180212
|
-
comp = replaceXRanges(comp, options);
|
|
180213
|
-
debug("xrange", comp);
|
|
180214
|
-
comp = replaceStars(comp, options);
|
|
180215
|
-
debug("stars", comp);
|
|
180216
|
-
return comp;
|
|
180217
|
-
};
|
|
180218
|
-
var isX = (id3) => !id3 || id3.toLowerCase() === "x" || id3 === "*";
|
|
180219
|
-
var replaceTildes = (comp, options) => {
|
|
180220
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
180221
|
-
};
|
|
180222
|
-
var replaceTilde = (comp, options) => {
|
|
180223
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
180224
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
180225
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
180226
|
-
let ret;
|
|
180227
|
-
if (isX(M)) {
|
|
180228
|
-
ret = "";
|
|
180229
|
-
} else if (isX(m)) {
|
|
180230
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
180231
|
-
} else if (isX(p)) {
|
|
180232
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
180233
|
-
} else if (pr) {
|
|
180234
|
-
debug("replaceTilde pr", pr);
|
|
180235
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
180236
|
-
} else {
|
|
180237
|
-
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
180238
|
-
}
|
|
180239
|
-
debug("tilde return", ret);
|
|
180240
|
-
return ret;
|
|
180241
|
-
});
|
|
180242
|
-
};
|
|
180243
|
-
var replaceCarets = (comp, options) => {
|
|
180244
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
180245
|
-
};
|
|
180246
|
-
var replaceCaret = (comp, options) => {
|
|
180247
|
-
debug("caret", comp, options);
|
|
180248
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
180249
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
180250
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
180251
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
180252
|
-
let ret;
|
|
180253
|
-
if (isX(M)) {
|
|
180254
|
-
ret = "";
|
|
180255
|
-
} else if (isX(m)) {
|
|
180256
|
-
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
180257
|
-
} else if (isX(p)) {
|
|
180258
|
-
if (M === "0") {
|
|
180259
|
-
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
180260
|
-
} else {
|
|
180261
|
-
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
180262
|
-
}
|
|
180263
|
-
} else if (pr) {
|
|
180264
|
-
debug("replaceCaret pr", pr);
|
|
180265
|
-
if (M === "0") {
|
|
180266
|
-
if (m === "0") {
|
|
180267
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
180268
|
-
} else {
|
|
180269
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
180270
|
-
}
|
|
180271
|
-
} else {
|
|
180272
|
-
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
180273
|
-
}
|
|
180274
|
-
} else {
|
|
180275
|
-
debug("no pr");
|
|
180276
|
-
if (M === "0") {
|
|
180277
|
-
if (m === "0") {
|
|
180278
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
180279
|
-
} else {
|
|
180280
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
180281
|
-
}
|
|
180282
|
-
} else {
|
|
180283
|
-
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
180284
|
-
}
|
|
180285
|
-
}
|
|
180286
|
-
debug("caret return", ret);
|
|
180287
|
-
return ret;
|
|
180288
|
-
});
|
|
180289
|
-
};
|
|
180290
|
-
var replaceXRanges = (comp, options) => {
|
|
180291
|
-
debug("replaceXRanges", comp, options);
|
|
180292
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
180293
|
-
};
|
|
180294
|
-
var replaceXRange = (comp, options) => {
|
|
180295
|
-
comp = comp.trim();
|
|
180296
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
180297
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
180298
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
180299
|
-
const xM = isX(M);
|
|
180300
|
-
const xm = xM || isX(m);
|
|
180301
|
-
const xp = xm || isX(p);
|
|
180302
|
-
const anyX = xp;
|
|
180303
|
-
if (gtlt === "=" && anyX) {
|
|
180304
|
-
gtlt = "";
|
|
180305
|
-
}
|
|
180306
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
180307
|
-
if (xM) {
|
|
180308
|
-
if (gtlt === ">" || gtlt === "<") {
|
|
180309
|
-
ret = "<0.0.0-0";
|
|
180310
|
-
} else {
|
|
180311
|
-
ret = "*";
|
|
180312
|
-
}
|
|
180313
|
-
} else if (gtlt && anyX) {
|
|
180314
|
-
if (xm) {
|
|
180315
|
-
m = 0;
|
|
180316
|
-
}
|
|
180317
|
-
p = 0;
|
|
180318
|
-
if (gtlt === ">") {
|
|
180319
|
-
gtlt = ">=";
|
|
180320
|
-
if (xm) {
|
|
180321
|
-
M = +M + 1;
|
|
180322
|
-
m = 0;
|
|
180323
|
-
p = 0;
|
|
180324
|
-
} else {
|
|
180325
|
-
m = +m + 1;
|
|
180326
|
-
p = 0;
|
|
180327
|
-
}
|
|
180328
|
-
} else if (gtlt === "<=") {
|
|
180329
|
-
gtlt = "<";
|
|
180330
|
-
if (xm) {
|
|
180331
|
-
M = +M + 1;
|
|
180332
|
-
} else {
|
|
180333
|
-
m = +m + 1;
|
|
180334
|
-
}
|
|
180335
|
-
}
|
|
180336
|
-
if (gtlt === "<") {
|
|
180337
|
-
pr = "-0";
|
|
180338
|
-
}
|
|
180339
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
180340
|
-
} else if (xm) {
|
|
180341
|
-
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
180342
|
-
} else if (xp) {
|
|
180343
|
-
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
180344
|
-
}
|
|
180345
|
-
debug("xRange return", ret);
|
|
180346
|
-
return ret;
|
|
180347
|
-
});
|
|
180348
|
-
};
|
|
180349
|
-
var replaceStars = (comp, options) => {
|
|
180350
|
-
debug("replaceStars", comp, options);
|
|
180351
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
180352
|
-
};
|
|
180353
|
-
var replaceGTE0 = (comp, options) => {
|
|
180354
|
-
debug("replaceGTE0", comp, options);
|
|
180355
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
180356
|
-
};
|
|
180357
|
-
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
|
|
180358
|
-
if (isX(fM)) {
|
|
180359
|
-
from = "";
|
|
180360
|
-
} else if (isX(fm)) {
|
|
180361
|
-
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
180362
|
-
} else if (isX(fp)) {
|
|
180363
|
-
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
180364
|
-
} else if (fpr) {
|
|
180365
|
-
from = `>=${from}`;
|
|
180366
|
-
} else {
|
|
180367
|
-
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
180368
|
-
}
|
|
180369
|
-
if (isX(tM)) {
|
|
180370
|
-
to = "";
|
|
180371
|
-
} else if (isX(tm)) {
|
|
180372
|
-
to = `<${+tM + 1}.0.0-0`;
|
|
180373
|
-
} else if (isX(tp)) {
|
|
180374
|
-
to = `<${tM}.${+tm + 1}.0-0`;
|
|
180375
|
-
} else if (tpr) {
|
|
180376
|
-
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
180377
|
-
} else if (incPr) {
|
|
180378
|
-
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
180379
|
-
} else {
|
|
180380
|
-
to = `<=${to}`;
|
|
180381
|
-
}
|
|
180382
|
-
return `${from} ${to}`.trim();
|
|
180383
|
-
};
|
|
180384
|
-
var testSet = (set, version4, options) => {
|
|
180385
|
-
for (let i = 0; i < set.length; i++) {
|
|
180386
|
-
if (!set[i].test(version4)) {
|
|
180387
|
-
return false;
|
|
180388
|
-
}
|
|
180389
|
-
}
|
|
180390
|
-
if (version4.prerelease.length && !options.includePrerelease) {
|
|
180391
|
-
for (let i = 0; i < set.length; i++) {
|
|
180392
|
-
debug(set[i].semver);
|
|
180393
|
-
if (set[i].semver === Comparator.ANY) {
|
|
180394
|
-
continue;
|
|
180395
|
-
}
|
|
180396
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
180397
|
-
const allowed = set[i].semver;
|
|
180398
|
-
if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) {
|
|
180399
|
-
return true;
|
|
180400
|
-
}
|
|
180401
|
-
}
|
|
180402
|
-
}
|
|
180403
|
-
return false;
|
|
180404
|
-
}
|
|
180405
|
-
return true;
|
|
180406
|
-
};
|
|
180407
|
-
}
|
|
180408
|
-
});
|
|
180409
|
-
|
|
180410
|
-
// ../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/satisfies.js
|
|
180411
|
-
var require_satisfies2 = __commonJS({
|
|
180412
|
-
"../../node_modules/@safe-global/safe-deployments/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
180413
|
-
var Range = require_range2();
|
|
180414
|
-
var satisfies = (version4, range2, options) => {
|
|
180415
|
-
try {
|
|
180416
|
-
range2 = new Range(range2, options);
|
|
180417
|
-
} catch (er) {
|
|
180418
|
-
return false;
|
|
180419
|
-
}
|
|
180420
|
-
return range2.test(version4);
|
|
180421
|
-
};
|
|
180422
|
-
module2.exports = satisfies;
|
|
180423
|
-
}
|
|
180424
|
-
});
|
|
180425
|
-
|
|
180426
179429
|
// ../../node_modules/@safe-global/safe-deployments/dist/utils.js
|
|
180427
179430
|
var require_utils13 = __commonJS({
|
|
180428
179431
|
"../../node_modules/@safe-global/safe-deployments/dist/utils.js"(exports2) {
|
|
@@ -180432,7 +179435,7 @@ var require_utils13 = __commonJS({
|
|
|
180432
179435
|
};
|
|
180433
179436
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
180434
179437
|
exports2.findDeployment = void 0;
|
|
180435
|
-
var satisfies_1 = __importDefault2(
|
|
179438
|
+
var satisfies_1 = __importDefault2(require_satisfies());
|
|
180436
179439
|
var DEFAULT_FILTER = { released: true };
|
|
180437
179440
|
var findDeployment = (criteria = DEFAULT_FILTER, deployments) => {
|
|
180438
179441
|
const criteriaWithDefaults = Object.assign(Object.assign({}, DEFAULT_FILTER), criteria);
|
|
@@ -184394,40 +183397,43 @@ var require_utils14 = __commonJS({
|
|
|
184394
183397
|
]);
|
|
184395
183398
|
}
|
|
184396
183399
|
exports2.encodeSetupCallData = encodeSetupCallData;
|
|
184397
|
-
var memoizedGetProxyFactoryContract = (0, memoized_1.createMemoizedFunction)(safeDeploymentContracts_1.getProxyFactoryContract);
|
|
184398
|
-
var
|
|
184399
|
-
var memoizedGetProxyCreationCode = (0, memoized_1.createMemoizedFunction)(async ({ ethAdapter, safeVersion, customContracts }) => {
|
|
183400
|
+
var memoizedGetProxyFactoryContract = (0, memoized_1.createMemoizedFunction)(({ ethAdapter, safeVersion, customContracts }) => (0, safeDeploymentContracts_1.getProxyFactoryContract)({ ethAdapter, safeVersion, customContracts }));
|
|
183401
|
+
var memoizedGetProxyCreationCode = (0, memoized_1.createMemoizedFunction)(async ({ ethAdapter, safeVersion, customContracts, chainId }) => {
|
|
184400
183402
|
const safeProxyFactoryContract = await memoizedGetProxyFactoryContract({
|
|
184401
183403
|
ethAdapter,
|
|
184402
183404
|
safeVersion,
|
|
184403
|
-
customContracts
|
|
183405
|
+
customContracts,
|
|
183406
|
+
chainId
|
|
184404
183407
|
});
|
|
184405
183408
|
return safeProxyFactoryContract.proxyCreationCode();
|
|
184406
183409
|
});
|
|
183410
|
+
var memoizedGetSafeContract = (0, memoized_1.createMemoizedFunction)(({ ethAdapter, safeVersion, isL1SafeSingleton, customContracts }) => (0, safeDeploymentContracts_1.getSafeContract)({ ethAdapter, safeVersion, isL1SafeSingleton, customContracts }));
|
|
184407
183411
|
function getChainSpecificDefaultSaltNonce(chainId) {
|
|
184408
183412
|
return `0x${Buffer.from((0, sha3_1.keccak_256)(exports2.PREDETERMINED_SALT_NONCE + chainId)).toString("hex")}`;
|
|
184409
183413
|
}
|
|
184410
183414
|
exports2.getChainSpecificDefaultSaltNonce = getChainSpecificDefaultSaltNonce;
|
|
184411
|
-
async function predictSafeAddress({ ethAdapter, safeAccountConfig, safeDeploymentConfig = {}, isL1SafeSingleton = false, customContracts }) {
|
|
183415
|
+
async function predictSafeAddress({ ethAdapter, chainId, safeAccountConfig, safeDeploymentConfig = {}, isL1SafeSingleton = false, customContracts }) {
|
|
184412
183416
|
(0, exports2.validateSafeAccountConfig)(safeAccountConfig);
|
|
184413
183417
|
(0, exports2.validateSafeDeploymentConfig)(safeDeploymentConfig);
|
|
184414
|
-
const chainId = await ethAdapter.getChainId();
|
|
184415
183418
|
const { safeVersion = config_1.DEFAULT_SAFE_VERSION, saltNonce = getChainSpecificDefaultSaltNonce(chainId) } = safeDeploymentConfig;
|
|
184416
183419
|
const safeProxyFactoryContract = await memoizedGetProxyFactoryContract({
|
|
184417
183420
|
ethAdapter,
|
|
184418
183421
|
safeVersion,
|
|
184419
|
-
customContracts
|
|
183422
|
+
customContracts,
|
|
183423
|
+
chainId: chainId.toString()
|
|
184420
183424
|
});
|
|
184421
183425
|
const proxyCreationCode = await memoizedGetProxyCreationCode({
|
|
184422
183426
|
ethAdapter,
|
|
184423
183427
|
safeVersion,
|
|
184424
|
-
customContracts
|
|
183428
|
+
customContracts,
|
|
183429
|
+
chainId: chainId.toString()
|
|
184425
183430
|
});
|
|
184426
183431
|
const safeContract = await memoizedGetSafeContract({
|
|
184427
183432
|
ethAdapter,
|
|
184428
183433
|
safeVersion,
|
|
184429
183434
|
isL1SafeSingleton,
|
|
184430
|
-
customContracts
|
|
183435
|
+
customContracts,
|
|
183436
|
+
chainId: chainId.toString()
|
|
184431
183437
|
});
|
|
184432
183438
|
const initializer = await encodeSetupCallData({
|
|
184433
183439
|
ethAdapter,
|
|
@@ -193055,7 +192061,7 @@ var require_secp256k16 = __commonJS({
|
|
|
193055
192061
|
});
|
|
193056
192062
|
|
|
193057
192063
|
// ../../node_modules/@ethereumjs/util/dist/constants.js
|
|
193058
|
-
var
|
|
192064
|
+
var require_constants8 = __commonJS({
|
|
193059
192065
|
"../../node_modules/@ethereumjs/util/dist/constants.js"(exports2) {
|
|
193060
192066
|
"use strict";
|
|
193061
192067
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -193775,7 +192781,7 @@ var require_account2 = __commonJS({
|
|
|
193775
192781
|
var secp256k1_1 = require_secp256k16();
|
|
193776
192782
|
var utils_1 = require_utils16();
|
|
193777
192783
|
var bytes_1 = require_bytes5();
|
|
193778
|
-
var constants_1 =
|
|
192784
|
+
var constants_1 = require_constants8();
|
|
193779
192785
|
var helpers_1 = require_helpers2();
|
|
193780
192786
|
var internal_1 = require_internal2();
|
|
193781
192787
|
var _0n8 = BigInt(0);
|
|
@@ -194264,7 +193270,7 @@ var require_signature5 = __commonJS({
|
|
|
194264
193270
|
var keccak_1 = require_keccak6();
|
|
194265
193271
|
var secp256k1_1 = require_secp256k16();
|
|
194266
193272
|
var bytes_1 = require_bytes5();
|
|
194267
|
-
var constants_1 =
|
|
193273
|
+
var constants_1 = require_constants8();
|
|
194268
193274
|
var helpers_1 = require_helpers2();
|
|
194269
193275
|
function ecsign(msgHash, privateKey, chainId) {
|
|
194270
193276
|
const sig = secp256k1_1.secp256k1.sign(msgHash, privateKey);
|
|
@@ -194922,7 +193928,7 @@ var require_dist7 = __commonJS({
|
|
|
194922
193928
|
};
|
|
194923
193929
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
194924
193930
|
exports2.toAscii = exports2.stripHexPrefix = exports2.padToEven = exports2.isHexString = exports2.isHexPrefixed = exports2.getKeys = exports2.getBinarySize = exports2.fromUtf8 = exports2.fromAscii = exports2.arrayContainsArray = void 0;
|
|
194925
|
-
__exportStar2(
|
|
193931
|
+
__exportStar2(require_constants8(), exports2);
|
|
194926
193932
|
__exportStar2(require_units2(), exports2);
|
|
194927
193933
|
__exportStar2(require_account2(), exports2);
|
|
194928
193934
|
__exportStar2(require_address9(), exports2);
|
|
@@ -195855,9 +194861,11 @@ var require_config2 = __commonJS({
|
|
|
195855
194861
|
{ chainId: 61n, shortName: "etc" },
|
|
195856
194862
|
{ chainId: 63n, shortName: "metc" },
|
|
195857
194863
|
{ chainId: 69n, shortName: "okov" },
|
|
194864
|
+
{ chainId: 71n, shortName: "cfxtest" },
|
|
195858
194865
|
{ chainId: 81n, shortName: "joc" },
|
|
195859
194866
|
{ chainId: 82n, shortName: "meter" },
|
|
195860
194867
|
{ chainId: 83n, shortName: "meter-test" },
|
|
194868
|
+
{ chainId: 88n, shortName: "tomo" },
|
|
195861
194869
|
{ chainId: 97n, shortName: "bnbt" },
|
|
195862
194870
|
{ chainId: 100n, shortName: "gno" },
|
|
195863
194871
|
{ chainId: 106n, shortName: "vlx" },
|
|
@@ -195868,8 +194876,11 @@ var require_config2 = __commonJS({
|
|
|
195868
194876
|
{ chainId: 137n, shortName: "matic" },
|
|
195869
194877
|
{ chainId: 148n, shortName: "shimmerevm-mainnet" },
|
|
195870
194878
|
{ chainId: 155n, shortName: "tenet-testnet" },
|
|
194879
|
+
{ chainId: 169n, shortName: "manta" },
|
|
194880
|
+
{ chainId: 204n, shortName: "opbnb" },
|
|
195871
194881
|
{ chainId: 246n, shortName: "ewt" },
|
|
195872
194882
|
{ chainId: 250n, shortName: "ftm" },
|
|
194883
|
+
{ chainId: 255n, shortName: "kroma" },
|
|
195873
194884
|
{ chainId: 280n, shortName: "zksync-goerli" },
|
|
195874
194885
|
{ chainId: 288n, shortName: "boba" },
|
|
195875
194886
|
{ chainId: 291n, shortName: "orderly" },
|
|
@@ -195880,6 +194891,7 @@ var require_config2 = __commonJS({
|
|
|
195880
194891
|
{ chainId: 336n, shortName: "sdn" },
|
|
195881
194892
|
{ chainId: 338n, shortName: "tcro" },
|
|
195882
194893
|
{ chainId: 420n, shortName: "ogor" },
|
|
194894
|
+
{ chainId: 424n, shortName: "PNG" },
|
|
195883
194895
|
{ chainId: 570n, shortName: "sys-rollux" },
|
|
195884
194896
|
{ chainId: 588n, shortName: "metis-stardust" },
|
|
195885
194897
|
{ chainId: 592n, shortName: "astr" },
|
|
@@ -195889,6 +194901,7 @@ var require_config2 = __commonJS({
|
|
|
195889
194901
|
{ chainId: 787n, shortName: "aca" },
|
|
195890
194902
|
{ chainId: 1001n, shortName: "baobab" },
|
|
195891
194903
|
{ chainId: 1008n, shortName: "eun" },
|
|
194904
|
+
{ chainId: 1030n, shortName: "cfx" },
|
|
195892
194905
|
{ chainId: 1088n, shortName: "metis-andromeda" },
|
|
195893
194906
|
{ chainId: 1101n, shortName: "zkevm" },
|
|
195894
194907
|
{ chainId: 1111n, shortName: "wemix" },
|
|
@@ -195903,6 +194916,7 @@ var require_config2 = __commonJS({
|
|
|
195903
194916
|
{ chainId: 1294n, shortName: "bobabeam" },
|
|
195904
194917
|
{ chainId: 1442n, shortName: "testnet-zkEVM-mango" },
|
|
195905
194918
|
{ chainId: 1559n, shortName: "tenet" },
|
|
194919
|
+
{ chainId: 1663n, shortName: "Gobi" },
|
|
195906
194920
|
{ chainId: 1807n, shortName: "rana" },
|
|
195907
194921
|
{ chainId: 1890n, shortName: "lightlink_phoenix" },
|
|
195908
194922
|
{ chainId: 1891n, shortName: "lightlink_pegasus" },
|
|
@@ -195915,8 +194929,10 @@ var require_config2 = __commonJS({
|
|
|
195915
194929
|
{ chainId: 2021n, shortName: "edg" },
|
|
195916
194930
|
{ chainId: 2221n, shortName: "tkava" },
|
|
195917
194931
|
{ chainId: 2222n, shortName: "kava" },
|
|
194932
|
+
{ chainId: 2358n, shortName: "kroma-sepolia" },
|
|
195918
194933
|
{ chainId: 3737n, shortName: "csb" },
|
|
195919
194934
|
{ chainId: 4002n, shortName: "tftm" },
|
|
194935
|
+
{ chainId: 4337n, shortName: "beam" },
|
|
195920
194936
|
{ chainId: 4460n, shortName: "orderlyl2" },
|
|
195921
194937
|
{ chainId: 4689n, shortName: "iotex-mainnet" },
|
|
195922
194938
|
{ chainId: 4918n, shortName: "txvm" },
|
|
@@ -195926,8 +194942,11 @@ var require_config2 = __commonJS({
|
|
|
195926
194942
|
{ chainId: 5700n, shortName: "tsys" },
|
|
195927
194943
|
{ chainId: 6102n, shortName: "cascadia" },
|
|
195928
194944
|
{ chainId: 7001n, shortName: "zetachain-athens" },
|
|
194945
|
+
{ chainId: 7332n, shortName: "EON" },
|
|
195929
194946
|
{ chainId: 7341n, shortName: "shyft" },
|
|
195930
194947
|
{ chainId: 7700n, shortName: "canto" },
|
|
194948
|
+
{ chainId: 8192n, shortName: "tqf" },
|
|
194949
|
+
{ chainId: 8194n, shortName: "ttqf" },
|
|
195931
194950
|
{ chainId: 8217n, shortName: "cypress" },
|
|
195932
194951
|
{ chainId: 8453n, shortName: "base" },
|
|
195933
194952
|
{ chainId: 9000n, shortName: "evmos-testnet" },
|
|
@@ -195937,13 +194956,16 @@ var require_config2 = __commonJS({
|
|
|
195937
194956
|
{ chainId: 10001n, shortName: "smartbchtest" },
|
|
195938
194957
|
{ chainId: 10081n, shortName: "joct" },
|
|
195939
194958
|
{ chainId: 10200n, shortName: "chi" },
|
|
194959
|
+
{ chainId: 10243n, shortName: "aa" },
|
|
195940
194960
|
{ chainId: 11235n, shortName: "islm" },
|
|
195941
194961
|
{ chainId: 11437n, shortName: "shyftt" },
|
|
195942
194962
|
{ chainId: 11891n, shortName: "Arianee" },
|
|
195943
194963
|
{ chainId: 12357n, shortName: "rei-testnet" },
|
|
194964
|
+
{ chainId: 13337n, shortName: "beam-testnet" },
|
|
195944
194965
|
{ chainId: 17000n, shortName: "holesky" },
|
|
195945
194966
|
{ chainId: 23294n, shortName: "sapphire" },
|
|
195946
194967
|
{ chainId: 23295n, shortName: "sapphire-testnet" },
|
|
194968
|
+
{ chainId: 34443n, shortName: "mode" },
|
|
195947
194969
|
{ chainId: 42161n, shortName: "arb1" },
|
|
195948
194970
|
{ chainId: 42170n, shortName: "arb-nova" },
|
|
195949
194971
|
{ chainId: 42220n, shortName: "celo" },
|
|
@@ -195956,13 +194978,15 @@ var require_config2 = __commonJS({
|
|
|
195956
194978
|
{ chainId: 54211n, shortName: "islmt" },
|
|
195957
194979
|
{ chainId: 56288n, shortName: "boba-bnb" },
|
|
195958
194980
|
{ chainId: 57000n, shortName: "tsys-rollux" },
|
|
194981
|
+
{ chainId: 58008n, shortName: "sepPNG" },
|
|
195959
194982
|
{ chainId: 59140n, shortName: "linea-testnet" },
|
|
195960
194983
|
{ chainId: 59144n, shortName: "linea" },
|
|
195961
194984
|
{ chainId: 71401n, shortName: "gw-testnet-v1" },
|
|
195962
194985
|
{ chainId: 71402n, shortName: "gw-mainnet-v1" },
|
|
195963
194986
|
{ chainId: 73799n, shortName: "vt" },
|
|
195964
194987
|
{ chainId: 80001n, shortName: "maticmum" },
|
|
195965
|
-
{ chainId: 84531n, shortName: "
|
|
194988
|
+
{ chainId: 84531n, shortName: "basegor" },
|
|
194989
|
+
{ chainId: 84532n, shortName: "basesep" },
|
|
195966
194990
|
{ chainId: 200101n, shortName: "milktada" },
|
|
195967
194991
|
{ chainId: 200202n, shortName: "milktalgo" },
|
|
195968
194992
|
{ chainId: 333999n, shortName: "olympus" },
|
|
@@ -195975,8 +194999,10 @@ var require_config2 = __commonJS({
|
|
|
195975
194999
|
{ chainId: 622277n, shortName: "rth" },
|
|
195976
195000
|
{ chainId: 7777777n, shortName: "zora" },
|
|
195977
195001
|
{ chainId: 11155111n, shortName: "sep" },
|
|
195002
|
+
{ chainId: 222000222n, shortName: "kanazawa" },
|
|
195978
195003
|
{ chainId: 245022926n, shortName: "neonevm-devnet" },
|
|
195979
195004
|
{ chainId: 245022934n, shortName: "neonevm-mainnet" },
|
|
195005
|
+
{ chainId: 333000333n, shortName: "meld" },
|
|
195980
195006
|
{ chainId: 1313161554n, shortName: "aurora" },
|
|
195981
195007
|
{ chainId: 1313161555n, shortName: "aurora-testnet" },
|
|
195982
195008
|
{ chainId: 1666600000n, shortName: "hmy-s0" },
|
|
@@ -196053,7 +195079,8 @@ var require_eip_712 = __commonJS({
|
|
|
196053
195079
|
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
196054
195080
|
};
|
|
196055
195081
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
196056
|
-
exports2.generateTypedData = exports2.getEip712MessageTypes = exports2.EIP712_DOMAIN = exports2.EIP712_DOMAIN_BEFORE_V130 = void 0;
|
|
195082
|
+
exports2.generateTypedData = exports2.hashSafeMessage = exports2.hashTypedData = exports2.getEip712MessageTypes = exports2.getEip712TxTypes = exports2.EIP712_DOMAIN = exports2.EIP712_DOMAIN_BEFORE_V130 = void 0;
|
|
195083
|
+
var ethers_1 = require_lib228();
|
|
196057
195084
|
var satisfies_1 = __importDefault2(require_satisfies());
|
|
196058
195085
|
var EQ_OR_GT_1_3_0 = ">=1.3.0";
|
|
196059
195086
|
exports2.EIP712_DOMAIN_BEFORE_V130 = [
|
|
@@ -196072,7 +195099,7 @@ var require_eip_712 = __commonJS({
|
|
|
196072
195099
|
name: "verifyingContract"
|
|
196073
195100
|
}
|
|
196074
195101
|
];
|
|
196075
|
-
function
|
|
195102
|
+
function getEip712TxTypes(safeVersion) {
|
|
196076
195103
|
const eip712WithChainId = (0, satisfies_1.default)(safeVersion, EQ_OR_GT_1_3_0);
|
|
196077
195104
|
return {
|
|
196078
195105
|
EIP712Domain: eip712WithChainId ? exports2.EIP712_DOMAIN : exports2.EIP712_DOMAIN_BEFORE_V130,
|
|
@@ -196090,24 +195117,59 @@ var require_eip_712 = __commonJS({
|
|
|
196090
195117
|
]
|
|
196091
195118
|
};
|
|
196092
195119
|
}
|
|
196093
|
-
exports2.
|
|
196094
|
-
function
|
|
195120
|
+
exports2.getEip712TxTypes = getEip712TxTypes;
|
|
195121
|
+
function getEip712MessageTypes(safeVersion) {
|
|
196095
195122
|
const eip712WithChainId = (0, satisfies_1.default)(safeVersion, EQ_OR_GT_1_3_0);
|
|
196096
|
-
|
|
196097
|
-
|
|
196098
|
-
|
|
196099
|
-
verifyingContract: safeAddress
|
|
196100
|
-
},
|
|
196101
|
-
primaryType: "SafeTx",
|
|
196102
|
-
message: {
|
|
196103
|
-
...safeTransactionData,
|
|
196104
|
-
value: safeTransactionData.value,
|
|
196105
|
-
safeTxGas: safeTransactionData.safeTxGas,
|
|
196106
|
-
baseGas: safeTransactionData.baseGas,
|
|
196107
|
-
gasPrice: safeTransactionData.gasPrice,
|
|
196108
|
-
nonce: safeTransactionData.nonce
|
|
196109
|
-
}
|
|
195123
|
+
return {
|
|
195124
|
+
EIP712Domain: eip712WithChainId ? exports2.EIP712_DOMAIN : exports2.EIP712_DOMAIN_BEFORE_V130,
|
|
195125
|
+
SafeMessage: [{ type: "bytes", name: "message" }]
|
|
196110
195126
|
};
|
|
195127
|
+
}
|
|
195128
|
+
exports2.getEip712MessageTypes = getEip712MessageTypes;
|
|
195129
|
+
var hashTypedData = (typedData) => {
|
|
195130
|
+
const { EIP712Domain: _, ...types2 } = typedData.types;
|
|
195131
|
+
return ethers_1.ethers.TypedDataEncoder.hash(typedData.domain, types2, typedData.message);
|
|
195132
|
+
};
|
|
195133
|
+
exports2.hashTypedData = hashTypedData;
|
|
195134
|
+
var hashMessage2 = (message) => {
|
|
195135
|
+
return ethers_1.ethers.hashMessage(message);
|
|
195136
|
+
};
|
|
195137
|
+
var hashSafeMessage = (message) => {
|
|
195138
|
+
return typeof message === "string" ? hashMessage2(message) : (0, exports2.hashTypedData)(message);
|
|
195139
|
+
};
|
|
195140
|
+
exports2.hashSafeMessage = hashSafeMessage;
|
|
195141
|
+
function generateTypedData({ safeAddress, safeVersion, chainId, data }) {
|
|
195142
|
+
const isSafeTransactionDataType = data.hasOwnProperty("to");
|
|
195143
|
+
const eip712WithChainId = (0, satisfies_1.default)(safeVersion, EQ_OR_GT_1_3_0);
|
|
195144
|
+
let typedData;
|
|
195145
|
+
if (isSafeTransactionDataType) {
|
|
195146
|
+
const txData = data;
|
|
195147
|
+
typedData = {
|
|
195148
|
+
types: getEip712TxTypes(safeVersion),
|
|
195149
|
+
domain: {
|
|
195150
|
+
verifyingContract: safeAddress
|
|
195151
|
+
},
|
|
195152
|
+
primaryType: "SafeTx",
|
|
195153
|
+
message: {
|
|
195154
|
+
...txData,
|
|
195155
|
+
value: txData.value,
|
|
195156
|
+
safeTxGas: txData.safeTxGas,
|
|
195157
|
+
baseGas: txData.baseGas,
|
|
195158
|
+
gasPrice: txData.gasPrice,
|
|
195159
|
+
nonce: txData.nonce
|
|
195160
|
+
}
|
|
195161
|
+
};
|
|
195162
|
+
} else {
|
|
195163
|
+
const message = data;
|
|
195164
|
+
typedData = {
|
|
195165
|
+
types: getEip712MessageTypes(safeVersion),
|
|
195166
|
+
domain: {
|
|
195167
|
+
verifyingContract: safeAddress
|
|
195168
|
+
},
|
|
195169
|
+
primaryType: "SafeMessage",
|
|
195170
|
+
message: { message: (0, exports2.hashSafeMessage)(message) }
|
|
195171
|
+
};
|
|
195172
|
+
}
|
|
196111
195173
|
if (eip712WithChainId) {
|
|
196112
195174
|
typedData.domain.chainId = chainId.toString();
|
|
196113
195175
|
}
|
|
@@ -196134,7 +195196,7 @@ var require_safeVersions = __commonJS({
|
|
|
196134
195196
|
SAFE_FEATURES2["SAFE_FALLBACK_HANDLER"] = "SAFE_FALLBACK_HANDLER";
|
|
196135
195197
|
SAFE_FEATURES2["ETH_SIGN"] = "ETH_SIGN";
|
|
196136
195198
|
SAFE_FEATURES2["ACCOUNT_ABSTRACTION"] = "ACCOUNT_ABSTRACTION";
|
|
196137
|
-
})(SAFE_FEATURES
|
|
195199
|
+
})(SAFE_FEATURES || (exports2.SAFE_FEATURES = SAFE_FEATURES = {}));
|
|
196138
195200
|
var SAFE_FEATURES_BY_VERSION = {
|
|
196139
195201
|
[SAFE_FEATURES.SAFE_TX_GAS_OPTIONAL]: ">=1.3.0",
|
|
196140
195202
|
[SAFE_FEATURES.SAFE_TX_GUARDS]: ">=1.3.0",
|
|
@@ -196166,16 +195228,20 @@ var require_SafeSignature = __commonJS({
|
|
|
196166
195228
|
* @param signature - The Safe signature
|
|
196167
195229
|
* @returns The Safe signature instance
|
|
196168
195230
|
*/
|
|
196169
|
-
constructor(signer, signature) {
|
|
195231
|
+
constructor(signer, signature, isContractSignature = false) {
|
|
196170
195232
|
this.signer = signer;
|
|
196171
195233
|
this.data = signature;
|
|
195234
|
+
this.isContractSignature = isContractSignature;
|
|
196172
195235
|
}
|
|
196173
195236
|
/**
|
|
196174
195237
|
* Returns the static part of the Safe signature.
|
|
196175
195238
|
*
|
|
196176
195239
|
* @returns The static part of the Safe signature
|
|
196177
195240
|
*/
|
|
196178
|
-
staticPart() {
|
|
195241
|
+
staticPart(dynamicOffset) {
|
|
195242
|
+
if (this.isContractSignature) {
|
|
195243
|
+
return `${this.signer.slice(2).padStart(64, "0")}${dynamicOffset || ""}00`;
|
|
195244
|
+
}
|
|
196179
195245
|
return this.data;
|
|
196180
195246
|
}
|
|
196181
195247
|
/**
|
|
@@ -196184,6 +195250,10 @@ var require_SafeSignature = __commonJS({
|
|
|
196184
195250
|
* @returns The dynamic part of the Safe signature
|
|
196185
195251
|
*/
|
|
196186
195252
|
dynamicPart() {
|
|
195253
|
+
if (this.isContractSignature) {
|
|
195254
|
+
const dynamicPartLength = (this.data.slice(2).length / 2).toString(16).padStart(64, "0");
|
|
195255
|
+
return `${dynamicPartLength}${this.data.slice(2)}`;
|
|
195256
|
+
}
|
|
196187
195257
|
return "";
|
|
196188
195258
|
}
|
|
196189
195259
|
};
|
|
@@ -196191,15 +195261,39 @@ var require_SafeSignature = __commonJS({
|
|
|
196191
195261
|
}
|
|
196192
195262
|
});
|
|
196193
195263
|
|
|
195264
|
+
// ../../node_modules/@safe-global/protocol-kit/dist/src/types/index.js
|
|
195265
|
+
var require_types14 = __commonJS({
|
|
195266
|
+
"../../node_modules/@safe-global/protocol-kit/dist/src/types/index.js"(exports2) {
|
|
195267
|
+
"use strict";
|
|
195268
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
195269
|
+
exports2.SigningMethod = void 0;
|
|
195270
|
+
var SigningMethod;
|
|
195271
|
+
(function(SigningMethod2) {
|
|
195272
|
+
SigningMethod2["ETH_SIGN"] = "eth_sign";
|
|
195273
|
+
SigningMethod2["ETH_SIGN_TYPED_DATA"] = "eth_signTypedData";
|
|
195274
|
+
SigningMethod2["ETH_SIGN_TYPED_DATA_V3"] = "eth_signTypedData_v3";
|
|
195275
|
+
SigningMethod2["ETH_SIGN_TYPED_DATA_V4"] = "eth_signTypedData_v4";
|
|
195276
|
+
SigningMethod2["SAFE_SIGNATURE"] = "safe_sign";
|
|
195277
|
+
})(SigningMethod || (exports2.SigningMethod = SigningMethod = {}));
|
|
195278
|
+
}
|
|
195279
|
+
});
|
|
195280
|
+
|
|
196194
195281
|
// ../../node_modules/@safe-global/protocol-kit/dist/src/utils/signatures/utils.js
|
|
196195
195282
|
var require_utils19 = __commonJS({
|
|
196196
195283
|
"../../node_modules/@safe-global/protocol-kit/dist/src/utils/signatures/utils.js"(exports2) {
|
|
196197
195284
|
"use strict";
|
|
195285
|
+
var __importDefault2 = exports2 && exports2.__importDefault || function(mod2) {
|
|
195286
|
+
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
195287
|
+
};
|
|
196198
195288
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
196199
|
-
exports2.generateEIP712Signature = exports2.generateSignature = exports2.adjustVInSignature = exports2.isTxHashSignedWithPrefix = exports2.generatePreValidatedSignature = void 0;
|
|
195289
|
+
exports2.calculateSafeMessageHash = exports2.calculateSafeTransactionHash = exports2.preimageSafeMessageHash = exports2.preimageSafeTransactionHash = exports2.buildSignatureBytes = exports2.buildContractSignature = exports2.generateEIP712Signature = exports2.generateSignature = exports2.adjustVInSignature = exports2.isTxHashSignedWithPrefix = exports2.generatePreValidatedSignature = void 0;
|
|
195290
|
+
var ethers_1 = require_lib228();
|
|
196200
195291
|
var ethereumjs_util_1 = require_dist4();
|
|
195292
|
+
var satisfies_1 = __importDefault2(require_satisfies());
|
|
196201
195293
|
var address_1 = require_address8();
|
|
196202
195294
|
var SafeSignature_1 = require_SafeSignature();
|
|
195295
|
+
var eip_712_1 = require_eip_712();
|
|
195296
|
+
var types_1 = require_types14();
|
|
196203
195297
|
function generatePreValidatedSignature(ownerAddress) {
|
|
196204
195298
|
const signature = "0x000000000000000000000000" + ownerAddress.slice(2) + "000000000000000000000000000000000000000000000000000000000000000001";
|
|
196205
195299
|
return new SafeSignature_1.EthSafeSignature(ownerAddress, signature);
|
|
@@ -196229,7 +195323,7 @@ var require_utils19 = __commonJS({
|
|
|
196229
195323
|
if (!ETHEREUM_V_VALUES.includes(signatureV)) {
|
|
196230
195324
|
throw new Error("Invalid signature");
|
|
196231
195325
|
}
|
|
196232
|
-
if (signingMethod ===
|
|
195326
|
+
if (signingMethod === types_1.SigningMethod.ETH_SIGN) {
|
|
196233
195327
|
if (signatureV < MIN_VALID_V_VALUE_FOR_SAFE_ECDSA) {
|
|
196234
195328
|
signatureV += MIN_VALID_V_VALUE_FOR_SAFE_ECDSA;
|
|
196235
195329
|
}
|
|
@@ -196239,7 +195333,7 @@ var require_utils19 = __commonJS({
|
|
|
196239
195333
|
signatureV += 4;
|
|
196240
195334
|
}
|
|
196241
195335
|
}
|
|
196242
|
-
if (signingMethod ===
|
|
195336
|
+
if (signingMethod === types_1.SigningMethod.ETH_SIGN_TYPED_DATA) {
|
|
196243
195337
|
if (signatureV < MIN_VALID_V_VALUE_FOR_SAFE_ECDSA) {
|
|
196244
195338
|
signatureV += MIN_VALID_V_VALUE_FOR_SAFE_ECDSA;
|
|
196245
195339
|
}
|
|
@@ -196254,20 +195348,67 @@ var require_utils19 = __commonJS({
|
|
|
196254
195348
|
throw new Error("EthAdapter must be initialized with a signer to use this method");
|
|
196255
195349
|
}
|
|
196256
195350
|
let signature = await ethAdapter.signMessage(hash2);
|
|
196257
|
-
signature = (0, exports2.adjustVInSignature)(
|
|
195351
|
+
signature = (0, exports2.adjustVInSignature)(types_1.SigningMethod.ETH_SIGN, signature, hash2, signerAddress);
|
|
196258
195352
|
return new SafeSignature_1.EthSafeSignature(signerAddress, signature);
|
|
196259
195353
|
}
|
|
196260
195354
|
exports2.generateSignature = generateSignature;
|
|
196261
|
-
async function generateEIP712Signature(ethAdapter,
|
|
195355
|
+
async function generateEIP712Signature(ethAdapter, safeEIP712Args, methodVersion) {
|
|
196262
195356
|
const signerAddress = await ethAdapter.getSignerAddress();
|
|
196263
195357
|
if (!signerAddress) {
|
|
196264
195358
|
throw new Error("EthAdapter must be initialized with a signer to use this method");
|
|
196265
195359
|
}
|
|
196266
|
-
let signature = await ethAdapter.signTypedData(
|
|
196267
|
-
signature = (0, exports2.adjustVInSignature)(
|
|
195360
|
+
let signature = await ethAdapter.signTypedData(safeEIP712Args, methodVersion);
|
|
195361
|
+
signature = (0, exports2.adjustVInSignature)(types_1.SigningMethod.ETH_SIGN_TYPED_DATA, signature);
|
|
196268
195362
|
return new SafeSignature_1.EthSafeSignature(signerAddress, signature);
|
|
196269
195363
|
}
|
|
196270
195364
|
exports2.generateEIP712Signature = generateEIP712Signature;
|
|
195365
|
+
var buildContractSignature = async (signatures, signerSafeAddress) => {
|
|
195366
|
+
const contractSignature = new SafeSignature_1.EthSafeSignature(signerSafeAddress, (0, exports2.buildSignatureBytes)(signatures), true);
|
|
195367
|
+
return contractSignature;
|
|
195368
|
+
};
|
|
195369
|
+
exports2.buildContractSignature = buildContractSignature;
|
|
195370
|
+
var buildSignatureBytes = (signatures) => {
|
|
195371
|
+
const SIGNATURE_LENGTH_BYTES = 65;
|
|
195372
|
+
signatures.sort((left, right) => left.signer.toLowerCase().localeCompare(right.signer.toLowerCase()));
|
|
195373
|
+
let signatureBytes = "0x";
|
|
195374
|
+
let dynamicBytes = "";
|
|
195375
|
+
for (const signature of signatures) {
|
|
195376
|
+
if (signature.isContractSignature) {
|
|
195377
|
+
const dynamicPartPosition = (signatures.length * SIGNATURE_LENGTH_BYTES + dynamicBytes.length / 2).toString(16).padStart(64, "0");
|
|
195378
|
+
signatureBytes += signature.staticPart(dynamicPartPosition);
|
|
195379
|
+
dynamicBytes += signature.dynamicPart();
|
|
195380
|
+
} else {
|
|
195381
|
+
signatureBytes += signature.data.slice(2);
|
|
195382
|
+
}
|
|
195383
|
+
}
|
|
195384
|
+
return signatureBytes + dynamicBytes;
|
|
195385
|
+
};
|
|
195386
|
+
exports2.buildSignatureBytes = buildSignatureBytes;
|
|
195387
|
+
var preimageSafeTransactionHash = (safeAddress, safeTx, safeVersion, chainId) => {
|
|
195388
|
+
const safeTxTypes = (0, eip_712_1.getEip712TxTypes)(safeVersion);
|
|
195389
|
+
return ethers_1.ethers.TypedDataEncoder.encode({ verifyingContract: safeAddress, chainId }, { SafeTx: safeTxTypes.SafeTx }, safeTx);
|
|
195390
|
+
};
|
|
195391
|
+
exports2.preimageSafeTransactionHash = preimageSafeTransactionHash;
|
|
195392
|
+
var preimageSafeMessageHash = (safeAddress, message, safeVersion, chainId) => {
|
|
195393
|
+
const safeMessageTypes = (0, eip_712_1.getEip712MessageTypes)(safeVersion);
|
|
195394
|
+
return ethers_1.ethers.TypedDataEncoder.encode({ verifyingContract: safeAddress, chainId }, { SafeMessage: safeMessageTypes.SafeMessage }, { message });
|
|
195395
|
+
};
|
|
195396
|
+
exports2.preimageSafeMessageHash = preimageSafeMessageHash;
|
|
195397
|
+
var EQ_OR_GT_1_3_0 = ">=1.3.0";
|
|
195398
|
+
var calculateSafeTransactionHash = (safeAddress, safeTx, safeVersion, chainId) => {
|
|
195399
|
+
const safeTxTypes = (0, eip_712_1.getEip712TxTypes)(safeVersion);
|
|
195400
|
+
const domain = { verifyingContract: safeAddress };
|
|
195401
|
+
if ((0, satisfies_1.default)(safeVersion, EQ_OR_GT_1_3_0)) {
|
|
195402
|
+
domain.chainId = chainId;
|
|
195403
|
+
}
|
|
195404
|
+
return ethers_1.ethers.TypedDataEncoder.hash(domain, { SafeTx: safeTxTypes.SafeTx }, safeTx);
|
|
195405
|
+
};
|
|
195406
|
+
exports2.calculateSafeTransactionHash = calculateSafeTransactionHash;
|
|
195407
|
+
var calculateSafeMessageHash = (safeAddress, message, safeVersion, chainId) => {
|
|
195408
|
+
const safeMessageTypes = (0, eip_712_1.getEip712MessageTypes)(safeVersion);
|
|
195409
|
+
return ethers_1.ethers.TypedDataEncoder.hash({ verifyingContract: safeAddress, chainId }, { SafeMessage: safeMessageTypes.SafeMessage }, { message });
|
|
195410
|
+
};
|
|
195411
|
+
exports2.calculateSafeMessageHash = calculateSafeMessageHash;
|
|
196271
195412
|
}
|
|
196272
195413
|
});
|
|
196273
195414
|
|
|
@@ -196613,27 +195754,20 @@ var require_SafeTransaction = __commonJS({
|
|
|
196613
195754
|
"../../node_modules/@safe-global/protocol-kit/dist/src/utils/transactions/SafeTransaction.js"(exports2) {
|
|
196614
195755
|
"use strict";
|
|
196615
195756
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
195757
|
+
var signatures_1 = require_signatures();
|
|
196616
195758
|
var EthSafeTransaction = class {
|
|
196617
195759
|
constructor(data) {
|
|
196618
195760
|
this.signatures = /* @__PURE__ */ new Map();
|
|
196619
195761
|
this.data = data;
|
|
196620
195762
|
}
|
|
195763
|
+
getSignature(signer) {
|
|
195764
|
+
return this.signatures.get(signer.toLowerCase());
|
|
195765
|
+
}
|
|
196621
195766
|
addSignature(signature) {
|
|
196622
195767
|
this.signatures.set(signature.signer.toLowerCase(), signature);
|
|
196623
195768
|
}
|
|
196624
195769
|
encodedSignatures() {
|
|
196625
|
-
|
|
196626
|
-
const baseOffset = signers.length * 65;
|
|
196627
|
-
let staticParts = "";
|
|
196628
|
-
let dynamicParts = "";
|
|
196629
|
-
signers.forEach((signerAddress) => {
|
|
196630
|
-
const signature = this.signatures.get(signerAddress);
|
|
196631
|
-
staticParts += signature?.staticPart(
|
|
196632
|
-
/*baseOffset + dynamicParts.length / 2*/
|
|
196633
|
-
).slice(2);
|
|
196634
|
-
dynamicParts += signature?.dynamicPart();
|
|
196635
|
-
});
|
|
196636
|
-
return "0x" + staticParts + dynamicParts;
|
|
195770
|
+
return (0, signatures_1.buildSignatureBytes)(Array.from(this.signatures.values()));
|
|
196637
195771
|
}
|
|
196638
195772
|
};
|
|
196639
195773
|
exports2.default = EthSafeTransaction;
|
|
@@ -196641,7 +195775,7 @@ var require_SafeTransaction = __commonJS({
|
|
|
196641
195775
|
});
|
|
196642
195776
|
|
|
196643
195777
|
// ../../node_modules/@safe-global/protocol-kit/dist/src/utils/transactions/types.js
|
|
196644
|
-
var
|
|
195778
|
+
var require_types15 = __commonJS({
|
|
196645
195779
|
"../../node_modules/@safe-global/protocol-kit/dist/src/utils/transactions/types.js"(exports2) {
|
|
196646
195780
|
"use strict";
|
|
196647
195781
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -196788,7 +195922,7 @@ var require_transactions = __commonJS({
|
|
|
196788
195922
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
196789
195923
|
__exportStar2(require_gas(), exports2);
|
|
196790
195924
|
__exportStar2(require_SafeTransaction(), exports2);
|
|
196791
|
-
__exportStar2(
|
|
195925
|
+
__exportStar2(require_types15(), exports2);
|
|
196792
195926
|
__exportStar2(require_utils20(), exports2);
|
|
196793
195927
|
}
|
|
196794
195928
|
});
|
|
@@ -197218,6 +196352,31 @@ var require_ownerManager = __commonJS({
|
|
|
197218
196352
|
}
|
|
197219
196353
|
});
|
|
197220
196354
|
|
|
196355
|
+
// ../../node_modules/@safe-global/protocol-kit/dist/src/utils/messages/SafeMessage.js
|
|
196356
|
+
var require_SafeMessage = __commonJS({
|
|
196357
|
+
"../../node_modules/@safe-global/protocol-kit/dist/src/utils/messages/SafeMessage.js"(exports2) {
|
|
196358
|
+
"use strict";
|
|
196359
|
+
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
196360
|
+
var signatures_1 = require_signatures();
|
|
196361
|
+
var EthSafeMessage = class {
|
|
196362
|
+
constructor(data) {
|
|
196363
|
+
this.signatures = /* @__PURE__ */ new Map();
|
|
196364
|
+
this.data = data;
|
|
196365
|
+
}
|
|
196366
|
+
getSignature(signer) {
|
|
196367
|
+
return this.signatures.get(signer.toLowerCase());
|
|
196368
|
+
}
|
|
196369
|
+
addSignature(signature) {
|
|
196370
|
+
this.signatures.set(signature.signer.toLowerCase(), signature);
|
|
196371
|
+
}
|
|
196372
|
+
encodedSignatures() {
|
|
196373
|
+
return (0, signatures_1.buildSignatureBytes)(Array.from(this.signatures.values()));
|
|
196374
|
+
}
|
|
196375
|
+
};
|
|
196376
|
+
exports2.default = EthSafeMessage;
|
|
196377
|
+
}
|
|
196378
|
+
});
|
|
196379
|
+
|
|
197221
196380
|
// ../../node_modules/@safe-global/protocol-kit/dist/src/Safe.js
|
|
197222
196381
|
var require_Safe = __commonJS({
|
|
197223
196382
|
"../../node_modules/@safe-global/protocol-kit/dist/src/Safe.js"(exports2) {
|
|
@@ -197248,6 +196407,8 @@ var require_Safe = __commonJS({
|
|
|
197248
196407
|
var _Safe_moduleManager;
|
|
197249
196408
|
var _Safe_guardManager;
|
|
197250
196409
|
var _Safe_fallbackHandlerManager;
|
|
196410
|
+
var _Safe_MAGIC_VALUE;
|
|
196411
|
+
var _Safe_MAGIC_VALUE_BYTES;
|
|
197251
196412
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
197252
196413
|
var safe_core_sdk_types_1 = require_src3();
|
|
197253
196414
|
var utils_1 = require_utils14();
|
|
@@ -197257,12 +196418,16 @@ var require_Safe = __commonJS({
|
|
|
197257
196418
|
var guardManager_1 = __importDefault2(require_guardManager());
|
|
197258
196419
|
var moduleManager_1 = __importDefault2(require_moduleManager());
|
|
197259
196420
|
var ownerManager_1 = __importDefault2(require_ownerManager());
|
|
196421
|
+
var types_1 = require_types14();
|
|
197260
196422
|
var utils_2 = require_utils21();
|
|
197261
|
-
var utils_3 = require_utils19();
|
|
197262
196423
|
var SafeTransaction_1 = __importDefault2(require_SafeTransaction());
|
|
197263
|
-
var
|
|
197264
|
-
var
|
|
196424
|
+
var utils_3 = require_utils20();
|
|
196425
|
+
var types_2 = require_types12();
|
|
197265
196426
|
var safeDeploymentContracts_1 = require_safeDeploymentContracts();
|
|
196427
|
+
var SafeMessage_1 = __importDefault2(require_SafeMessage());
|
|
196428
|
+
var satisfies_1 = __importDefault2(require_satisfies());
|
|
196429
|
+
var EQ_OR_GT_1_4_1 = ">=1.4.1";
|
|
196430
|
+
var EQ_OR_GT_1_3_0 = ">=1.3.0";
|
|
197266
196431
|
var Safe = class _Safe {
|
|
197267
196432
|
constructor() {
|
|
197268
196433
|
_Safe_predictedSafe.set(this, void 0);
|
|
@@ -197272,6 +196437,56 @@ var require_Safe = __commonJS({
|
|
|
197272
196437
|
_Safe_moduleManager.set(this, void 0);
|
|
197273
196438
|
_Safe_guardManager.set(this, void 0);
|
|
197274
196439
|
_Safe_fallbackHandlerManager.set(this, void 0);
|
|
196440
|
+
_Safe_MAGIC_VALUE.set(this, "0x1626ba7e");
|
|
196441
|
+
_Safe_MAGIC_VALUE_BYTES.set(
|
|
196442
|
+
this,
|
|
196443
|
+
"0x20c13b0b"
|
|
196444
|
+
/**
|
|
196445
|
+
* Creates an instance of the Safe Core SDK.
|
|
196446
|
+
* @param config - Ethers Safe configuration
|
|
196447
|
+
* @returns The Safe Core SDK instance
|
|
196448
|
+
* @throws "The SDK must be initialized with a safeAddress or a predictedSafe"
|
|
196449
|
+
* @throws "SafeProxy contract is not deployed on the current network"
|
|
196450
|
+
* @throws "MultiSend contract is not deployed on the current network"
|
|
196451
|
+
* @throws "MultiSendCallOnly contract is not deployed on the current network"
|
|
196452
|
+
*/
|
|
196453
|
+
);
|
|
196454
|
+
this.getSafeMessageHash = async (messageHash) => {
|
|
196455
|
+
const safeAddress = await this.getAddress();
|
|
196456
|
+
const safeVersion = await this.getContractVersion();
|
|
196457
|
+
const chainId = await this.getChainId();
|
|
196458
|
+
return (0, utils_2.calculateSafeMessageHash)(safeAddress, messageHash, safeVersion, chainId);
|
|
196459
|
+
};
|
|
196460
|
+
this.isValidSignature = async (messageHash, signature = "0x") => {
|
|
196461
|
+
const safeAddress = await this.getAddress();
|
|
196462
|
+
const fallbackHandler = await this.getFallbackHandlerContract();
|
|
196463
|
+
const signatureToCheck = signature && Array.isArray(signature) ? (0, utils_2.buildSignatureBytes)(signature) : signature;
|
|
196464
|
+
const data = fallbackHandler.encode("isValidSignature(bytes32,bytes)", [
|
|
196465
|
+
messageHash,
|
|
196466
|
+
signatureToCheck
|
|
196467
|
+
]);
|
|
196468
|
+
const bytesData = fallbackHandler.encode("isValidSignature(bytes,bytes)", [
|
|
196469
|
+
messageHash,
|
|
196470
|
+
signatureToCheck
|
|
196471
|
+
]);
|
|
196472
|
+
try {
|
|
196473
|
+
const isValidSignatureResponse = await Promise.all([
|
|
196474
|
+
__classPrivateFieldGet2(this, _Safe_ethAdapter, "f").call({
|
|
196475
|
+
from: safeAddress,
|
|
196476
|
+
to: safeAddress,
|
|
196477
|
+
data
|
|
196478
|
+
}),
|
|
196479
|
+
__classPrivateFieldGet2(this, _Safe_ethAdapter, "f").call({
|
|
196480
|
+
from: safeAddress,
|
|
196481
|
+
to: safeAddress,
|
|
196482
|
+
data: bytesData
|
|
196483
|
+
})
|
|
196484
|
+
]);
|
|
196485
|
+
return !!isValidSignatureResponse.length && (isValidSignatureResponse[0].slice(0, 10).toLowerCase() === __classPrivateFieldGet2(this, _Safe_MAGIC_VALUE, "f") || isValidSignatureResponse[1].slice(0, 10).toLowerCase() === __classPrivateFieldGet2(this, _Safe_MAGIC_VALUE_BYTES, "f"));
|
|
196486
|
+
} catch (error) {
|
|
196487
|
+
return false;
|
|
196488
|
+
}
|
|
196489
|
+
};
|
|
197275
196490
|
}
|
|
197276
196491
|
/**
|
|
197277
196492
|
* Creates an instance of the Safe Core SDK.
|
|
@@ -197298,7 +196513,7 @@ var require_Safe = __commonJS({
|
|
|
197298
196513
|
async init(config) {
|
|
197299
196514
|
const { ethAdapter, isL1SafeSingleton, contractNetworks } = config;
|
|
197300
196515
|
__classPrivateFieldSet2(this, _Safe_ethAdapter, ethAdapter, "f");
|
|
197301
|
-
if ((0,
|
|
196516
|
+
if ((0, types_2.isSafeConfigWithPredictedSafe)(config)) {
|
|
197302
196517
|
__classPrivateFieldSet2(this, _Safe_predictedSafe, config.predictedSafe, "f");
|
|
197303
196518
|
__classPrivateFieldSet2(this, _Safe_contractManager, await contractManager_1.default.create({
|
|
197304
196519
|
ethAdapter: __classPrivateFieldGet2(this, _Safe_ethAdapter, "f"),
|
|
@@ -197371,6 +196586,7 @@ var require_Safe = __commonJS({
|
|
|
197371
196586
|
const chainId = await __classPrivateFieldGet2(this, _Safe_ethAdapter, "f").getChainId();
|
|
197372
196587
|
return (0, utils_1.predictSafeAddress)({
|
|
197373
196588
|
ethAdapter: __classPrivateFieldGet2(this, _Safe_ethAdapter, "f"),
|
|
196589
|
+
chainId,
|
|
197374
196590
|
customContracts: __classPrivateFieldGet2(this, _Safe_contractManager, "f").contractNetworks?.[chainId.toString()],
|
|
197375
196591
|
...__classPrivateFieldGet2(this, _Safe_predictedSafe, "f")
|
|
197376
196592
|
});
|
|
@@ -197549,7 +196765,7 @@ var require_Safe = __commonJS({
|
|
|
197549
196765
|
let newTransaction;
|
|
197550
196766
|
if (transactions.length > 1) {
|
|
197551
196767
|
const multiSendContract = onlyCalls ? __classPrivateFieldGet2(this, _Safe_contractManager, "f").multiSendCallOnlyContract : __classPrivateFieldGet2(this, _Safe_contractManager, "f").multiSendContract;
|
|
197552
|
-
const multiSendData = (0,
|
|
196768
|
+
const multiSendData = (0, utils_3.encodeMultiSendData)(transactions.map(utils_3.standardizeMetaTransactionData));
|
|
197553
196769
|
const multiSendTransaction = {
|
|
197554
196770
|
...options,
|
|
197555
196771
|
to: await multiSendContract.getAddress(),
|
|
@@ -197562,7 +196778,7 @@ var require_Safe = __commonJS({
|
|
|
197562
196778
|
newTransaction = { ...options, ...transactions[0] };
|
|
197563
196779
|
}
|
|
197564
196780
|
if (__classPrivateFieldGet2(this, _Safe_predictedSafe, "f")) {
|
|
197565
|
-
return new SafeTransaction_1.default(await (0,
|
|
196781
|
+
return new SafeTransaction_1.default(await (0, utils_3.standardizeSafeTransactionData)({
|
|
197566
196782
|
predictedSafe: __classPrivateFieldGet2(this, _Safe_predictedSafe, "f"),
|
|
197567
196783
|
ethAdapter: __classPrivateFieldGet2(this, _Safe_ethAdapter, "f"),
|
|
197568
196784
|
tx: newTransaction,
|
|
@@ -197572,7 +196788,7 @@ var require_Safe = __commonJS({
|
|
|
197572
196788
|
if (!__classPrivateFieldGet2(this, _Safe_contractManager, "f").safeContract) {
|
|
197573
196789
|
throw new Error("Safe is not deployed");
|
|
197574
196790
|
}
|
|
197575
|
-
return new SafeTransaction_1.default(await (0,
|
|
196791
|
+
return new SafeTransaction_1.default(await (0, utils_3.standardizeSafeTransactionData)({
|
|
197576
196792
|
safeContract: __classPrivateFieldGet2(this, _Safe_contractManager, "f").safeContract,
|
|
197577
196793
|
ethAdapter: __classPrivateFieldGet2(this, _Safe_ethAdapter, "f"),
|
|
197578
196794
|
tx: newTransaction,
|
|
@@ -197624,15 +196840,13 @@ var require_Safe = __commonJS({
|
|
|
197624
196840
|
* Returns the transaction hash of a Safe transaction.
|
|
197625
196841
|
*
|
|
197626
196842
|
* @param safeTransaction - The Safe transaction
|
|
197627
|
-
* @returns The
|
|
196843
|
+
* @returns The hash of the Safe transaction
|
|
197628
196844
|
*/
|
|
197629
196845
|
async getTransactionHash(safeTransaction) {
|
|
197630
|
-
|
|
197631
|
-
|
|
197632
|
-
|
|
197633
|
-
|
|
197634
|
-
const txHash = await __classPrivateFieldGet2(this, _Safe_contractManager, "f").safeContract.getTransactionHash(safeTransactionData);
|
|
197635
|
-
return txHash;
|
|
196846
|
+
const safeAddress = await this.getAddress();
|
|
196847
|
+
const safeVersion = await this.getContractVersion();
|
|
196848
|
+
const chainId = await this.getChainId();
|
|
196849
|
+
return (0, utils_2.calculateSafeTransactionHash)(safeAddress, safeTransaction.data, safeVersion, chainId);
|
|
197636
196850
|
}
|
|
197637
196851
|
/**
|
|
197638
196852
|
* Signs a hash using the current signer account.
|
|
@@ -197640,34 +196854,101 @@ var require_Safe = __commonJS({
|
|
|
197640
196854
|
* @param hash - The hash to sign
|
|
197641
196855
|
* @returns The Safe signature
|
|
197642
196856
|
*/
|
|
197643
|
-
async
|
|
197644
|
-
|
|
196857
|
+
async signHash(hash2) {
|
|
196858
|
+
const signature = await (0, utils_2.generateSignature)(__classPrivateFieldGet2(this, _Safe_ethAdapter, "f"), hash2);
|
|
196859
|
+
return signature;
|
|
196860
|
+
}
|
|
196861
|
+
/**
|
|
196862
|
+
* Returns a Safe message ready to be signed by the owners.
|
|
196863
|
+
*
|
|
196864
|
+
* @param message - The message
|
|
196865
|
+
* @returns The Safe message
|
|
196866
|
+
*/
|
|
196867
|
+
createMessage(message) {
|
|
196868
|
+
return new SafeMessage_1.default(message);
|
|
196869
|
+
}
|
|
196870
|
+
/**
|
|
196871
|
+
* Returns the Safe message with a new signature
|
|
196872
|
+
*
|
|
196873
|
+
* @param message The message to be signed
|
|
196874
|
+
* @param signingMethod The signature type
|
|
196875
|
+
* @param preimageSafeAddress If the preimage is required, the address of the Safe that will be used to calculate the preimage.
|
|
196876
|
+
* This field is mandatory for 1.4.1 contract versions Because the safe uses the old EIP-1271 interface which uses `bytes` instead of `bytes32` for the message
|
|
196877
|
+
* we need to use the pre-image of the message to calculate the message hash
|
|
196878
|
+
* https://github.com/safe-global/safe-contracts/blob/192c7dc67290940fcbc75165522bb86a37187069/test/core/Safe.Signatures.spec.ts#L229-L233
|
|
196879
|
+
* @returns The signed Safe message
|
|
196880
|
+
*/
|
|
196881
|
+
async signMessage(message, signingMethod = types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
|
|
196882
|
+
const owners = await this.getOwners();
|
|
196883
|
+
const signerAddress = await __classPrivateFieldGet2(this, _Safe_ethAdapter, "f").getSignerAddress();
|
|
196884
|
+
if (!signerAddress) {
|
|
196885
|
+
throw new Error("EthAdapter must be initialized with a signer to use this method");
|
|
196886
|
+
}
|
|
196887
|
+
const addressIsOwner = owners.some((owner) => signerAddress && (0, utils_2.sameString)(owner, signerAddress));
|
|
196888
|
+
if (!addressIsOwner) {
|
|
196889
|
+
throw new Error("Messages can only be signed by Safe owners");
|
|
196890
|
+
}
|
|
196891
|
+
const safeVersion = await this.getContractVersion();
|
|
196892
|
+
if (signingMethod === types_1.SigningMethod.SAFE_SIGNATURE && (0, satisfies_1.default)(safeVersion, EQ_OR_GT_1_4_1) && !preimageSafeAddress) {
|
|
196893
|
+
throw new Error("The parent Safe account address is mandatory for contract signatures");
|
|
196894
|
+
}
|
|
196895
|
+
let signature;
|
|
196896
|
+
if (signingMethod === types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
|
|
196897
|
+
signature = await this.signTypedData(message, "v4");
|
|
196898
|
+
} else if (signingMethod === types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
|
|
196899
|
+
signature = await this.signTypedData(message, "v3");
|
|
196900
|
+
} else if (signingMethod === types_1.SigningMethod.ETH_SIGN_TYPED_DATA) {
|
|
196901
|
+
signature = await this.signTypedData(message, void 0);
|
|
196902
|
+
} else {
|
|
196903
|
+
const chainId = await this.getChainId();
|
|
196904
|
+
if (!(0, utils_2.hasSafeFeature)(utils_2.SAFE_FEATURES.ETH_SIGN, safeVersion)) {
|
|
196905
|
+
throw new Error("eth_sign is only supported by Safes >= v1.1.0");
|
|
196906
|
+
}
|
|
196907
|
+
let safeMessageHash;
|
|
196908
|
+
if (signingMethod === types_1.SigningMethod.SAFE_SIGNATURE && preimageSafeAddress && (0, satisfies_1.default)(safeVersion, EQ_OR_GT_1_4_1)) {
|
|
196909
|
+
const messageHashData = (0, utils_2.preimageSafeMessageHash)(preimageSafeAddress, (0, utils_2.hashSafeMessage)(message.data), safeVersion, chainId);
|
|
196910
|
+
safeMessageHash = await this.getSafeMessageHash(messageHashData);
|
|
196911
|
+
} else {
|
|
196912
|
+
safeMessageHash = await this.getSafeMessageHash((0, utils_2.hashSafeMessage)(message.data));
|
|
196913
|
+
}
|
|
196914
|
+
signature = await this.signHash(safeMessageHash);
|
|
196915
|
+
}
|
|
196916
|
+
const signedSafeMessage = this.createMessage(message.data);
|
|
196917
|
+
message.signatures.forEach((signature2) => {
|
|
196918
|
+
signedSafeMessage.addSignature(signature2);
|
|
196919
|
+
});
|
|
196920
|
+
signedSafeMessage.addSignature(signature);
|
|
196921
|
+
return signedSafeMessage;
|
|
197645
196922
|
}
|
|
197646
196923
|
/**
|
|
197647
196924
|
* Signs a transaction according to the EIP-712 using the current signer account.
|
|
197648
196925
|
*
|
|
197649
|
-
* @param
|
|
196926
|
+
* @param eip712Data - The Safe Transaction or message hash to be signed
|
|
197650
196927
|
* @param methodVersion - EIP-712 version. Optional
|
|
197651
196928
|
* @returns The Safe signature
|
|
197652
196929
|
*/
|
|
197653
|
-
async signTypedData(
|
|
197654
|
-
const
|
|
196930
|
+
async signTypedData(eip712Data, methodVersion) {
|
|
196931
|
+
const safeEIP712Args = {
|
|
197655
196932
|
safeAddress: await this.getAddress(),
|
|
197656
196933
|
safeVersion: await this.getContractVersion(),
|
|
197657
196934
|
chainId: await this.getEthAdapter().getChainId(),
|
|
197658
|
-
|
|
196935
|
+
data: eip712Data.data
|
|
197659
196936
|
};
|
|
197660
|
-
return (0,
|
|
196937
|
+
return (0, utils_2.generateEIP712Signature)(__classPrivateFieldGet2(this, _Safe_ethAdapter, "f"), safeEIP712Args, methodVersion);
|
|
197661
196938
|
}
|
|
197662
196939
|
/**
|
|
197663
196940
|
* Adds the signature of the current signer to the Safe transaction object.
|
|
197664
196941
|
*
|
|
197665
196942
|
* @param safeTransaction - The Safe transaction to be signed
|
|
197666
196943
|
* @param signingMethod - Method followed to sign a transaction. Optional. Default value is "eth_sign"
|
|
196944
|
+
* @param preimageSafeAddress - If the preimage is required, the address of the Safe that will be used to calculate the preimage
|
|
196945
|
+
* This field is mandatory for 1.3.0 and 1.4.1 contract versions Because the safe uses the old EIP-1271 interface which uses `bytes` instead of `bytes32` for the message
|
|
196946
|
+
* we need to use the pre-image of the message to calculate the message hash
|
|
196947
|
+
* https://github.com/safe-global/safe-contracts/blob/192c7dc67290940fcbc75165522bb86a37187069/test/core/Safe.Signatures.spec.ts#L229-L233
|
|
197667
196948
|
* @returns The signed Safe transaction
|
|
197668
196949
|
* @throws "Transactions can only be signed by Safe owners"
|
|
197669
196950
|
*/
|
|
197670
|
-
async signTransaction(safeTransaction, signingMethod =
|
|
196951
|
+
async signTransaction(safeTransaction, signingMethod = types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V4, preimageSafeAddress) {
|
|
197671
196952
|
const transaction = (0, utils_2.isSafeMultisigTransactionResponse)(safeTransaction) ? await this.toSafeTransactionType(safeTransaction) : safeTransaction;
|
|
197672
196953
|
const owners = await this.getOwners();
|
|
197673
196954
|
const signerAddress = await __classPrivateFieldGet2(this, _Safe_ethAdapter, "f").getSignerAddress();
|
|
@@ -197678,20 +196959,31 @@ var require_Safe = __commonJS({
|
|
|
197678
196959
|
if (!addressIsOwner) {
|
|
197679
196960
|
throw new Error("Transactions can only be signed by Safe owners");
|
|
197680
196961
|
}
|
|
196962
|
+
const safeVersion = await this.getContractVersion();
|
|
196963
|
+
if (signingMethod === types_1.SigningMethod.SAFE_SIGNATURE && (0, satisfies_1.default)(safeVersion, EQ_OR_GT_1_3_0) && !preimageSafeAddress) {
|
|
196964
|
+
throw new Error("The parent Safe account address is mandatory for contract signatures");
|
|
196965
|
+
}
|
|
197681
196966
|
let signature;
|
|
197682
|
-
if (signingMethod ===
|
|
196967
|
+
if (signingMethod === types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V4) {
|
|
197683
196968
|
signature = await this.signTypedData(transaction, "v4");
|
|
197684
|
-
} else if (signingMethod ===
|
|
196969
|
+
} else if (signingMethod === types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V3) {
|
|
197685
196970
|
signature = await this.signTypedData(transaction, "v3");
|
|
197686
|
-
} else if (signingMethod ===
|
|
197687
|
-
signature = await this.signTypedData(transaction);
|
|
196971
|
+
} else if (signingMethod === types_1.SigningMethod.ETH_SIGN_TYPED_DATA) {
|
|
196972
|
+
signature = await this.signTypedData(transaction, void 0);
|
|
197688
196973
|
} else {
|
|
197689
|
-
const
|
|
197690
|
-
|
|
196974
|
+
const safeVersion2 = await this.getContractVersion();
|
|
196975
|
+
const chainId = await this.getChainId();
|
|
196976
|
+
if (!(0, utils_2.hasSafeFeature)(utils_2.SAFE_FEATURES.ETH_SIGN, safeVersion2)) {
|
|
197691
196977
|
throw new Error("eth_sign is only supported by Safes >= v1.1.0");
|
|
197692
196978
|
}
|
|
197693
|
-
|
|
197694
|
-
|
|
196979
|
+
let txHash;
|
|
196980
|
+
if (signingMethod === types_1.SigningMethod.SAFE_SIGNATURE && (0, satisfies_1.default)(safeVersion2, EQ_OR_GT_1_3_0) && preimageSafeAddress) {
|
|
196981
|
+
const txHashData = (0, utils_2.preimageSafeTransactionHash)(preimageSafeAddress, safeTransaction.data, safeVersion2, chainId);
|
|
196982
|
+
txHash = await this.getSafeMessageHash(txHashData);
|
|
196983
|
+
} else {
|
|
196984
|
+
txHash = await this.getTransactionHash(transaction);
|
|
196985
|
+
}
|
|
196986
|
+
signature = await this.signHash(txHash);
|
|
197695
196987
|
}
|
|
197696
196988
|
const signedSafeTransaction = await this.copyTransaction(transaction);
|
|
197697
196989
|
signedSafeTransaction.addSignature(signature);
|
|
@@ -198010,7 +197302,7 @@ var require_Safe = __commonJS({
|
|
|
198010
197302
|
const txHash = await this.getTransactionHash(signedSafeTransaction);
|
|
198011
197303
|
const ownersWhoApprovedTx = await this.getOwnersWhoApprovedTx(txHash);
|
|
198012
197304
|
for (const owner of ownersWhoApprovedTx) {
|
|
198013
|
-
signedSafeTransaction.addSignature((0,
|
|
197305
|
+
signedSafeTransaction.addSignature((0, utils_2.generatePreValidatedSignature)(owner));
|
|
198014
197306
|
}
|
|
198015
197307
|
const owners = await this.getOwners();
|
|
198016
197308
|
const signerAddress = await __classPrivateFieldGet2(this, _Safe_ethAdapter, "f").getSignerAddress();
|
|
@@ -198018,7 +197310,7 @@ var require_Safe = __commonJS({
|
|
|
198018
197310
|
throw new Error("EthAdapter must be initialized with a signer to use this method");
|
|
198019
197311
|
}
|
|
198020
197312
|
if (owners.includes(signerAddress)) {
|
|
198021
|
-
signedSafeTransaction.addSignature((0,
|
|
197313
|
+
signedSafeTransaction.addSignature((0, utils_2.generatePreValidatedSignature)(signerAddress));
|
|
198022
197314
|
}
|
|
198023
197315
|
const isTxValid = await __classPrivateFieldGet2(this, _Safe_contractManager, "f").safeContract.isValidTransaction(signedSafeTransaction, {
|
|
198024
197316
|
from: signerAddress,
|
|
@@ -198045,13 +197337,13 @@ var require_Safe = __commonJS({
|
|
|
198045
197337
|
const txHash = await this.getTransactionHash(signedSafeTransaction);
|
|
198046
197338
|
const ownersWhoApprovedTx = await this.getOwnersWhoApprovedTx(txHash);
|
|
198047
197339
|
for (const owner of ownersWhoApprovedTx) {
|
|
198048
|
-
signedSafeTransaction.addSignature((0,
|
|
197340
|
+
signedSafeTransaction.addSignature((0, utils_2.generatePreValidatedSignature)(owner));
|
|
198049
197341
|
}
|
|
198050
197342
|
const owners = await this.getOwners();
|
|
198051
197343
|
const threshold = await this.getThreshold();
|
|
198052
197344
|
const signerAddress = await __classPrivateFieldGet2(this, _Safe_ethAdapter, "f").getSignerAddress();
|
|
198053
197345
|
if (threshold > signedSafeTransaction.signatures.size && signerAddress && owners.includes(signerAddress)) {
|
|
198054
|
-
signedSafeTransaction.addSignature((0,
|
|
197346
|
+
signedSafeTransaction.addSignature((0, utils_2.generatePreValidatedSignature)(signerAddress));
|
|
198055
197347
|
}
|
|
198056
197348
|
if (threshold > signedSafeTransaction.signatures.size) {
|
|
198057
197349
|
const signaturesMissing = threshold - signedSafeTransaction.signatures.size;
|
|
@@ -198185,12 +197477,14 @@ var require_Safe = __commonJS({
|
|
|
198185
197477
|
const saltNonce = customSaltNonce || safeDeploymentConfig?.saltNonce || (0, utils_1.getChainSpecificDefaultSaltNonce)(chainId);
|
|
198186
197478
|
const safeDeployTransactionData = {
|
|
198187
197479
|
...transactionOptions,
|
|
197480
|
+
// optional transaction options like from, gasLimit, gasPrice...
|
|
198188
197481
|
to: await safeProxyFactoryContract.getAddress(),
|
|
198189
197482
|
value: "0",
|
|
198190
197483
|
// we use the createProxyWithNonce method to create the Safe in a deterministic address, see: https://github.com/safe-global/safe-contracts/blob/main/contracts/proxies/SafeProxyFactory.sol#L52
|
|
198191
197484
|
data: safeProxyFactoryContract.encode("createProxyWithNonce", [
|
|
198192
197485
|
await safeSingletonContract.getAddress(),
|
|
198193
197486
|
initializer,
|
|
197487
|
+
// call to the setup method to set the threshold & owners of the new Safe
|
|
198194
197488
|
saltNonce
|
|
198195
197489
|
])
|
|
198196
197490
|
};
|
|
@@ -198215,19 +197509,38 @@ var require_Safe = __commonJS({
|
|
|
198215
197509
|
customContracts: __classPrivateFieldGet2(this, _Safe_contractManager, "f").contractNetworks?.[chainId.toString()]
|
|
198216
197510
|
});
|
|
198217
197511
|
const batchData = multiSendCallOnlyContract.encode("multiSend", [
|
|
198218
|
-
(0,
|
|
197512
|
+
(0, utils_3.encodeMultiSendData)(transactions)
|
|
198219
197513
|
// encoded transactions
|
|
198220
197514
|
]);
|
|
198221
197515
|
const transactionBatch = {
|
|
198222
197516
|
...transactionOptions,
|
|
197517
|
+
// optional transaction options like from, gasLimit, gasPrice...
|
|
198223
197518
|
to: await multiSendCallOnlyContract.getAddress(),
|
|
198224
197519
|
value: "0",
|
|
198225
197520
|
data: batchData
|
|
198226
197521
|
};
|
|
198227
197522
|
return transactionBatch;
|
|
198228
197523
|
}
|
|
197524
|
+
/**
|
|
197525
|
+
* Get the fallback handler contract
|
|
197526
|
+
*
|
|
197527
|
+
* @returns The fallback Handler contract
|
|
197528
|
+
*/
|
|
197529
|
+
async getFallbackHandlerContract() {
|
|
197530
|
+
if (!__classPrivateFieldGet2(this, _Safe_contractManager, "f").safeContract) {
|
|
197531
|
+
throw new Error("Safe is not deployed");
|
|
197532
|
+
}
|
|
197533
|
+
const safeVersion = await __classPrivateFieldGet2(this, _Safe_contractManager, "f").safeContract.getVersion() ?? config_1.DEFAULT_SAFE_VERSION;
|
|
197534
|
+
const chainId = await __classPrivateFieldGet2(this, _Safe_ethAdapter, "f").getChainId();
|
|
197535
|
+
const compatibilityFallbackHandlerContract = await (0, safeDeploymentContracts_1.getCompatibilityFallbackHandlerContract)({
|
|
197536
|
+
ethAdapter: __classPrivateFieldGet2(this, _Safe_ethAdapter, "f"),
|
|
197537
|
+
safeVersion,
|
|
197538
|
+
customContracts: __classPrivateFieldGet2(this, _Safe_contractManager, "f").contractNetworks?.[chainId.toString()]
|
|
197539
|
+
});
|
|
197540
|
+
return compatibilityFallbackHandlerContract;
|
|
197541
|
+
}
|
|
198229
197542
|
};
|
|
198230
|
-
_Safe_predictedSafe = /* @__PURE__ */ new WeakMap(), _Safe_ethAdapter = /* @__PURE__ */ new WeakMap(), _Safe_contractManager = /* @__PURE__ */ new WeakMap(), _Safe_ownerManager = /* @__PURE__ */ new WeakMap(), _Safe_moduleManager = /* @__PURE__ */ new WeakMap(), _Safe_guardManager = /* @__PURE__ */ new WeakMap(), _Safe_fallbackHandlerManager = /* @__PURE__ */ new WeakMap();
|
|
197543
|
+
_Safe_predictedSafe = /* @__PURE__ */ new WeakMap(), _Safe_ethAdapter = /* @__PURE__ */ new WeakMap(), _Safe_contractManager = /* @__PURE__ */ new WeakMap(), _Safe_ownerManager = /* @__PURE__ */ new WeakMap(), _Safe_moduleManager = /* @__PURE__ */ new WeakMap(), _Safe_guardManager = /* @__PURE__ */ new WeakMap(), _Safe_fallbackHandlerManager = /* @__PURE__ */ new WeakMap(), _Safe_MAGIC_VALUE = /* @__PURE__ */ new WeakMap(), _Safe_MAGIC_VALUE_BYTES = /* @__PURE__ */ new WeakMap();
|
|
198231
197544
|
exports2.default = Safe;
|
|
198232
197545
|
}
|
|
198233
197546
|
});
|
|
@@ -205404,7 +204717,7 @@ var require_MultiSendCallOnlyContract_V1_4_1_Ethers = __commonJS({
|
|
|
205404
204717
|
});
|
|
205405
204718
|
|
|
205406
204719
|
// ../../node_modules/@safe-global/protocol-kit/dist/src/adapters/ethers/utils/constants.js
|
|
205407
|
-
var
|
|
204720
|
+
var require_constants9 = __commonJS({
|
|
205408
204721
|
"../../node_modules/@safe-global/protocol-kit/dist/src/adapters/ethers/utils/constants.js"(exports2) {
|
|
205409
204722
|
"use strict";
|
|
205410
204723
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -205521,7 +204834,7 @@ var require_SafeContract_V1_0_0_Ethers = __commonJS({
|
|
|
205521
204834
|
};
|
|
205522
204835
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
205523
204836
|
var utils_1 = require_utils22();
|
|
205524
|
-
var constants_1 =
|
|
204837
|
+
var constants_1 = require_constants9();
|
|
205525
204838
|
var SafeContractEthers_1 = __importDefault2(require_SafeContractEthers());
|
|
205526
204839
|
var SafeContract_V1_0_0_Ethers = class extends SafeContractEthers_1.default {
|
|
205527
204840
|
constructor(contract) {
|
|
@@ -205560,7 +204873,7 @@ var require_SafeContract_V1_1_1_Ethers = __commonJS({
|
|
|
205560
204873
|
};
|
|
205561
204874
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
205562
204875
|
var utils_1 = require_utils22();
|
|
205563
|
-
var constants_1 =
|
|
204876
|
+
var constants_1 = require_constants9();
|
|
205564
204877
|
var SafeContractEthers_1 = __importDefault2(require_SafeContractEthers());
|
|
205565
204878
|
var SafeContract_V1_1_1_Ethers = class extends SafeContractEthers_1.default {
|
|
205566
204879
|
constructor(contract) {
|
|
@@ -205599,7 +204912,7 @@ var require_SafeContract_V1_2_0_Ethers = __commonJS({
|
|
|
205599
204912
|
};
|
|
205600
204913
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
205601
204914
|
var utils_1 = require_utils22();
|
|
205602
|
-
var constants_1 =
|
|
204915
|
+
var constants_1 = require_constants9();
|
|
205603
204916
|
var SafeContractEthers_1 = __importDefault2(require_SafeContractEthers());
|
|
205604
204917
|
var SafeContract_V1_2_0_Ethers = class extends SafeContractEthers_1.default {
|
|
205605
204918
|
constructor(contract) {
|
|
@@ -205636,7 +204949,7 @@ var require_SafeContract_V1_3_0_Ethers = __commonJS({
|
|
|
205636
204949
|
};
|
|
205637
204950
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
205638
204951
|
var utils_1 = require_utils22();
|
|
205639
|
-
var constants_1 =
|
|
204952
|
+
var constants_1 = require_constants9();
|
|
205640
204953
|
var SafeContractEthers_1 = __importDefault2(require_SafeContractEthers());
|
|
205641
204954
|
var SafeContract_V1_3_0_Ethers = class extends SafeContractEthers_1.default {
|
|
205642
204955
|
constructor(contract) {
|
|
@@ -205674,7 +204987,7 @@ var require_SafeContract_V1_4_1_Ethers = __commonJS({
|
|
|
205674
204987
|
};
|
|
205675
204988
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
205676
204989
|
var utils_1 = require_utils22();
|
|
205677
|
-
var constants_1 =
|
|
204990
|
+
var constants_1 = require_constants9();
|
|
205678
204991
|
var SafeContractEthers_1 = __importDefault2(require_SafeContractEthers());
|
|
205679
204992
|
var SafeContract_V1_4_1_Ethers = class extends SafeContractEthers_1.default {
|
|
205680
204993
|
constructor(contract) {
|
|
@@ -206327,13 +205640,13 @@ var require_EthersAdapter = __commonJS({
|
|
|
206327
205640
|
const messageArray = __classPrivateFieldGet2(this, _EthersAdapter_ethers, "f").getBytes(message);
|
|
206328
205641
|
return __classPrivateFieldGet2(this, _EthersAdapter_signer, "f").signMessage(messageArray);
|
|
206329
205642
|
}
|
|
206330
|
-
async signTypedData(
|
|
205643
|
+
async signTypedData(safeEIP712Args) {
|
|
206331
205644
|
if (!__classPrivateFieldGet2(this, _EthersAdapter_signer, "f")) {
|
|
206332
205645
|
throw new Error("EthAdapter must be initialized with a signer to use this method");
|
|
206333
205646
|
}
|
|
206334
205647
|
if ((0, utils_2.isTypedDataSigner)(__classPrivateFieldGet2(this, _EthersAdapter_signer, "f"))) {
|
|
206335
|
-
const typedData = (0, utils_1.generateTypedData)(
|
|
206336
|
-
const signature = await __classPrivateFieldGet2(this, _EthersAdapter_signer, "f").signTypedData(typedData.domain, { SafeTx: typedData.types.SafeTx }, typedData.message);
|
|
205648
|
+
const typedData = (0, utils_1.generateTypedData)(safeEIP712Args);
|
|
205649
|
+
const signature = await __classPrivateFieldGet2(this, _EthersAdapter_signer, "f").signTypedData(typedData.domain, typedData.primaryType === "SafeMessage" ? { SafeMessage: typedData.types.SafeMessage } : { SafeTx: typedData.types.SafeTx }, typedData.message);
|
|
206337
205650
|
return signature;
|
|
206338
205651
|
}
|
|
206339
205652
|
throw new Error("The current signer does not implement EIP-712 to sign typed data");
|
|
@@ -206671,7 +205984,7 @@ var require_MultiSendCallOnlyContract_V1_4_1_Web3 = __commonJS({
|
|
|
206671
205984
|
});
|
|
206672
205985
|
|
|
206673
205986
|
// ../../node_modules/@safe-global/protocol-kit/dist/src/adapters/web3/utils/constants.js
|
|
206674
|
-
var
|
|
205987
|
+
var require_constants10 = __commonJS({
|
|
206675
205988
|
"../../node_modules/@safe-global/protocol-kit/dist/src/adapters/web3/utils/constants.js"(exports2) {
|
|
206676
205989
|
"use strict";
|
|
206677
205990
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -206787,7 +206100,7 @@ var require_SafeContract_V1_0_0_Web3 = __commonJS({
|
|
|
206787
206100
|
};
|
|
206788
206101
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
206789
206102
|
var utils_1 = require_utils23();
|
|
206790
|
-
var constants_1 =
|
|
206103
|
+
var constants_1 = require_constants10();
|
|
206791
206104
|
var SafeContractWeb3_1 = __importDefault2(require_SafeContractWeb3());
|
|
206792
206105
|
var SafeContract_V1_0_0_Web3 = class extends SafeContractWeb3_1.default {
|
|
206793
206106
|
constructor(contract) {
|
|
@@ -206826,7 +206139,7 @@ var require_SafeContract_V1_1_1_Web3 = __commonJS({
|
|
|
206826
206139
|
};
|
|
206827
206140
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
206828
206141
|
var utils_1 = require_utils23();
|
|
206829
|
-
var constants_1 =
|
|
206142
|
+
var constants_1 = require_constants10();
|
|
206830
206143
|
var SafeContractWeb3_1 = __importDefault2(require_SafeContractWeb3());
|
|
206831
206144
|
var SafeContract_V1_1_1_Web3 = class extends SafeContractWeb3_1.default {
|
|
206832
206145
|
constructor(contract) {
|
|
@@ -206865,7 +206178,7 @@ var require_SafeContract_V1_2_0_Web3 = __commonJS({
|
|
|
206865
206178
|
};
|
|
206866
206179
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
206867
206180
|
var utils_1 = require_utils23();
|
|
206868
|
-
var constants_1 =
|
|
206181
|
+
var constants_1 = require_constants10();
|
|
206869
206182
|
var SafeContractWeb3_1 = __importDefault2(require_SafeContractWeb3());
|
|
206870
206183
|
var SafeContract_V1_2_0_Web3 = class extends SafeContractWeb3_1.default {
|
|
206871
206184
|
constructor(contract) {
|
|
@@ -206902,7 +206215,7 @@ var require_SafeContract_V1_3_0_Web3 = __commonJS({
|
|
|
206902
206215
|
};
|
|
206903
206216
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
206904
206217
|
var utils_1 = require_utils23();
|
|
206905
|
-
var constants_1 =
|
|
206218
|
+
var constants_1 = require_constants10();
|
|
206906
206219
|
var SafeContractWeb3_1 = __importDefault2(require_SafeContractWeb3());
|
|
206907
206220
|
var SafeContract_V1_3_0_Web3 = class extends SafeContractWeb3_1.default {
|
|
206908
206221
|
constructor(contract) {
|
|
@@ -206940,7 +206253,7 @@ var require_SafeContract_V1_4_1_Web3 = __commonJS({
|
|
|
206940
206253
|
};
|
|
206941
206254
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
206942
206255
|
var utils_1 = require_utils23();
|
|
206943
|
-
var constants_1 =
|
|
206256
|
+
var constants_1 = require_constants10();
|
|
206944
206257
|
var SafeContractWeb3_1 = __importDefault2(require_SafeContractWeb3());
|
|
206945
206258
|
var SafeContract_V1_4_1_Web3 = class extends SafeContractWeb3_1.default {
|
|
206946
206259
|
constructor(contract) {
|
|
@@ -207392,6 +206705,7 @@ var require_Web3Adapter = __commonJS({
|
|
|
207392
206705
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
207393
206706
|
var utils_1 = require_utils21();
|
|
207394
206707
|
var contractInstancesWeb3_1 = require_contractInstancesWeb3();
|
|
206708
|
+
var types_1 = require_types14();
|
|
207395
206709
|
var Web3Adapter = class {
|
|
207396
206710
|
constructor({ web3, signerAddress }) {
|
|
207397
206711
|
_Web3Adapter_web3.set(this, void 0);
|
|
@@ -207523,16 +206837,16 @@ var require_Web3Adapter = __commonJS({
|
|
|
207523
206837
|
}
|
|
207524
206838
|
return __classPrivateFieldGet2(this, _Web3Adapter_web3, "f").eth.sign(message, __classPrivateFieldGet2(this, _Web3Adapter_signerAddress, "f"));
|
|
207525
206839
|
}
|
|
207526
|
-
async signTypedData(
|
|
206840
|
+
async signTypedData(safeEIP712Args, methodVersion) {
|
|
207527
206841
|
if (!__classPrivateFieldGet2(this, _Web3Adapter_signerAddress, "f")) {
|
|
207528
206842
|
throw new Error("This method requires a signer");
|
|
207529
206843
|
}
|
|
207530
|
-
const typedData = (0, utils_1.generateTypedData)(
|
|
207531
|
-
let method =
|
|
206844
|
+
const typedData = (0, utils_1.generateTypedData)(safeEIP712Args);
|
|
206845
|
+
let method = types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V3;
|
|
207532
206846
|
if (methodVersion === "v4") {
|
|
207533
|
-
method =
|
|
206847
|
+
method = types_1.SigningMethod.ETH_SIGN_TYPED_DATA_V4;
|
|
207534
206848
|
} else if (!methodVersion) {
|
|
207535
|
-
method =
|
|
206849
|
+
method = types_1.SigningMethod.ETH_SIGN_TYPED_DATA;
|
|
207536
206850
|
}
|
|
207537
206851
|
const jsonTypedData = JSON.stringify(typedData);
|
|
207538
206852
|
const signedTypedData = {
|
|
@@ -207691,6 +207005,7 @@ var require_safeFactory = __commonJS({
|
|
|
207691
207005
|
};
|
|
207692
207006
|
return (0, utils_1.predictSafeAddress)({
|
|
207693
207007
|
ethAdapter: __classPrivateFieldGet2(this, _SafeFactory_ethAdapter, "f"),
|
|
207008
|
+
chainId,
|
|
207694
207009
|
safeAccountConfig,
|
|
207695
207010
|
safeDeploymentConfig,
|
|
207696
207011
|
isL1SafeSingleton: __classPrivateFieldGet2(this, _SafeFactory_isL1SafeSingleton, "f"),
|
|
@@ -207804,7 +207119,8 @@ var require_src7 = __commonJS({
|
|
|
207804
207119
|
return mod2 && mod2.__esModule ? mod2 : { "default": mod2 };
|
|
207805
207120
|
};
|
|
207806
207121
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
207807
|
-
exports2.validateEip3770Address = exports2.standardizeSafeTransactionData = exports2.predictSafeAddress = exports2.isGasTokenCompatibleWithHandlePayment = exports2.getSignMessageLibContract = exports2.getSafeContract = exports2.getProxyFactoryContract = exports2.getMultiSendContract = exports2.getMultiSendCallOnlyContract = exports2.getERC20Decimals = exports2.getCreateCallContract = exports2.getCompatibilityFallbackHandlerContract = exports2.encodeSetupCallData = exports2.encodeMultiSendData = exports2.encodeCreateProxyWithNonce = exports2.Web3Adapter = exports2.SignMessageLibWeb3Contract = exports2.SignMessageLibEthersContract = exports2.SafeProxyFactoryWeb3Contract = exports2.SafeProxyFactoryEthersContract = exports2.SafeFactory = exports2.SafeContractWeb3 = exports2.SafeContractEthers = exports2.PREDETERMINED_SALT_NONCE = exports2.MultiSendWeb3Contract = exports2.MultiSendEthersContract = exports2.MultiSendCallOnlyWeb3Contract = exports2.MultiSendCallOnlyEthersContract = exports2.EthersAdapter = exports2.EthSafeSignature = exports2.DEFAULT_SAFE_VERSION = exports2.createERC20TokenTransferTransaction = exports2.CreateCallWeb3Contract = exports2.CreateCallEthersContract = exports2.ContractManager = exports2.estimateSafeDeploymentGas = exports2.estimateSafeTxGas = exports2.estimateTxGas = exports2.estimateTxBaseGas = void 0;
|
|
207122
|
+
exports2.hashSafeMessage = exports2.getEip712MessageTypes = exports2.getEip712TxTypes = exports2.preimageSafeMessageHash = exports2.preimageSafeTransactionHash = exports2.buildSignatureBytes = exports2.buildContractSignature = exports2.generateEIP712Signature = exports2.generateSignature = exports2.validateEthereumAddress = exports2.validateEip3770Address = exports2.standardizeSafeTransactionData = exports2.predictSafeAddress = exports2.isGasTokenCompatibleWithHandlePayment = exports2.getSignMessageLibContract = exports2.getSafeContract = exports2.getProxyFactoryContract = exports2.getMultiSendContract = exports2.getMultiSendCallOnlyContract = exports2.getERC20Decimals = exports2.getCreateCallContract = exports2.getCompatibilityFallbackHandlerContract = exports2.encodeSetupCallData = exports2.encodeMultiSendData = exports2.encodeCreateProxyWithNonce = exports2.Web3Adapter = exports2.SigningMethod = exports2.SignMessageLibWeb3Contract = exports2.SignMessageLibEthersContract = exports2.SafeProxyFactoryWeb3Contract = exports2.SafeProxyFactoryEthersContract = exports2.SafeFactory = exports2.SafeContractWeb3 = exports2.SafeContractEthers = exports2.PREDETERMINED_SALT_NONCE = exports2.MultiSendWeb3Contract = exports2.MultiSendEthersContract = exports2.MultiSendCallOnlyWeb3Contract = exports2.MultiSendCallOnlyEthersContract = exports2.EthersAdapter = exports2.EthSafeSignature = exports2.DEFAULT_SAFE_VERSION = exports2.createERC20TokenTransferTransaction = exports2.CreateCallWeb3Contract = exports2.CreateCallEthersContract = exports2.ContractManager = exports2.estimateSafeDeploymentGas = exports2.estimateSafeTxGas = exports2.estimateTxGas = exports2.estimateTxBaseGas = void 0;
|
|
207123
|
+
exports2.generateTypedData = void 0;
|
|
207808
207124
|
var Safe_1 = __importDefault2(require_Safe());
|
|
207809
207125
|
var ethers_1 = require_ethers3();
|
|
207810
207126
|
Object.defineProperty(exports2, "CreateCallEthersContract", { enumerable: true, get: function() {
|
|
@@ -207893,6 +207209,10 @@ var require_src7 = __commonJS({
|
|
|
207893
207209
|
exports2.ContractManager = contractManager_1.default;
|
|
207894
207210
|
var safeFactory_1 = __importDefault2(require_safeFactory());
|
|
207895
207211
|
exports2.SafeFactory = safeFactory_1.default;
|
|
207212
|
+
var types_1 = require_types14();
|
|
207213
|
+
Object.defineProperty(exports2, "SigningMethod", { enumerable: true, get: function() {
|
|
207214
|
+
return types_1.SigningMethod;
|
|
207215
|
+
} });
|
|
207896
207216
|
var utils_2 = require_utils21();
|
|
207897
207217
|
Object.defineProperty(exports2, "EthSafeSignature", { enumerable: true, get: function() {
|
|
207898
207218
|
return utils_2.EthSafeSignature;
|
|
@@ -207909,6 +207229,9 @@ var require_src7 = __commonJS({
|
|
|
207909
207229
|
Object.defineProperty(exports2, "estimateSafeDeploymentGas", { enumerable: true, get: function() {
|
|
207910
207230
|
return utils_2.estimateSafeDeploymentGas;
|
|
207911
207231
|
} });
|
|
207232
|
+
Object.defineProperty(exports2, "validateEthereumAddress", { enumerable: true, get: function() {
|
|
207233
|
+
return utils_2.validateEthereumAddress;
|
|
207234
|
+
} });
|
|
207912
207235
|
Object.defineProperty(exports2, "validateEip3770Address", { enumerable: true, get: function() {
|
|
207913
207236
|
return utils_2.validateEip3770Address;
|
|
207914
207237
|
} });
|
|
@@ -207929,6 +207252,38 @@ var require_src7 = __commonJS({
|
|
|
207929
207252
|
Object.defineProperty(exports2, "createERC20TokenTransferTransaction", { enumerable: true, get: function() {
|
|
207930
207253
|
return erc_20_1.createERC20TokenTransferTransaction;
|
|
207931
207254
|
} });
|
|
207255
|
+
var utils_4 = require_utils19();
|
|
207256
|
+
Object.defineProperty(exports2, "generateSignature", { enumerable: true, get: function() {
|
|
207257
|
+
return utils_4.generateSignature;
|
|
207258
|
+
} });
|
|
207259
|
+
Object.defineProperty(exports2, "generateEIP712Signature", { enumerable: true, get: function() {
|
|
207260
|
+
return utils_4.generateEIP712Signature;
|
|
207261
|
+
} });
|
|
207262
|
+
Object.defineProperty(exports2, "buildContractSignature", { enumerable: true, get: function() {
|
|
207263
|
+
return utils_4.buildContractSignature;
|
|
207264
|
+
} });
|
|
207265
|
+
Object.defineProperty(exports2, "buildSignatureBytes", { enumerable: true, get: function() {
|
|
207266
|
+
return utils_4.buildSignatureBytes;
|
|
207267
|
+
} });
|
|
207268
|
+
Object.defineProperty(exports2, "preimageSafeTransactionHash", { enumerable: true, get: function() {
|
|
207269
|
+
return utils_4.preimageSafeTransactionHash;
|
|
207270
|
+
} });
|
|
207271
|
+
Object.defineProperty(exports2, "preimageSafeMessageHash", { enumerable: true, get: function() {
|
|
207272
|
+
return utils_4.preimageSafeMessageHash;
|
|
207273
|
+
} });
|
|
207274
|
+
var eip_712_1 = require_eip_712();
|
|
207275
|
+
Object.defineProperty(exports2, "getEip712TxTypes", { enumerable: true, get: function() {
|
|
207276
|
+
return eip_712_1.getEip712TxTypes;
|
|
207277
|
+
} });
|
|
207278
|
+
Object.defineProperty(exports2, "getEip712MessageTypes", { enumerable: true, get: function() {
|
|
207279
|
+
return eip_712_1.getEip712MessageTypes;
|
|
207280
|
+
} });
|
|
207281
|
+
Object.defineProperty(exports2, "hashSafeMessage", { enumerable: true, get: function() {
|
|
207282
|
+
return eip_712_1.hashSafeMessage;
|
|
207283
|
+
} });
|
|
207284
|
+
Object.defineProperty(exports2, "generateTypedData", { enumerable: true, get: function() {
|
|
207285
|
+
return eip_712_1.generateTypedData;
|
|
207286
|
+
} });
|
|
207932
207287
|
exports2.default = Safe_1.default;
|
|
207933
207288
|
}
|
|
207934
207289
|
});
|
|
@@ -207980,6 +207335,7 @@ var require_SafeApiKit = __commonJS({
|
|
|
207980
207335
|
var _SafeApiKit_instances;
|
|
207981
207336
|
var _SafeApiKit_chainId;
|
|
207982
207337
|
var _SafeApiKit_txServiceBaseUrl;
|
|
207338
|
+
var _SafeApiKit_isValidAddress;
|
|
207983
207339
|
var _SafeApiKit_getEip3770Address;
|
|
207984
207340
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
207985
207341
|
var httpRequests_1 = require_httpRequests();
|
|
@@ -208490,8 +207846,87 @@ var require_SafeApiKit = __commonJS({
|
|
|
208490
207846
|
method: httpRequests_1.HttpMethod.Get
|
|
208491
207847
|
});
|
|
208492
207848
|
}
|
|
207849
|
+
/**
|
|
207850
|
+
* Get a message by its safe message hash
|
|
207851
|
+
* @param messageHash The Safe message hash
|
|
207852
|
+
* @returns The message
|
|
207853
|
+
*/
|
|
207854
|
+
async getMessage(messageHash) {
|
|
207855
|
+
if (!messageHash) {
|
|
207856
|
+
throw new Error("Invalid messageHash");
|
|
207857
|
+
}
|
|
207858
|
+
return (0, httpRequests_1.sendRequest)({
|
|
207859
|
+
url: `${__classPrivateFieldGet2(this, _SafeApiKit_txServiceBaseUrl, "f")}/v1/messages/${messageHash}/`,
|
|
207860
|
+
method: httpRequests_1.HttpMethod.Get
|
|
207861
|
+
});
|
|
207862
|
+
}
|
|
207863
|
+
/**
|
|
207864
|
+
* Get the list of messages associated to a Safe account
|
|
207865
|
+
* @param safeAddress The safe address
|
|
207866
|
+
* @param options The options to filter the list of messages
|
|
207867
|
+
* @returns The paginated list of messages
|
|
207868
|
+
*/
|
|
207869
|
+
async getMessages(safeAddress, { ordering, limit, offset } = {}) {
|
|
207870
|
+
if (!__classPrivateFieldGet2(this, _SafeApiKit_instances, "m", _SafeApiKit_isValidAddress).call(this, safeAddress)) {
|
|
207871
|
+
throw new Error("Invalid safeAddress");
|
|
207872
|
+
}
|
|
207873
|
+
const url2 = new URL(`${__classPrivateFieldGet2(this, _SafeApiKit_txServiceBaseUrl, "f")}/v1/safes/${safeAddress}/messages/`);
|
|
207874
|
+
if (ordering) {
|
|
207875
|
+
url2.searchParams.set("ordering", ordering);
|
|
207876
|
+
}
|
|
207877
|
+
if (limit) {
|
|
207878
|
+
url2.searchParams.set("limit", limit);
|
|
207879
|
+
}
|
|
207880
|
+
if (offset) {
|
|
207881
|
+
url2.searchParams.set("offset", offset);
|
|
207882
|
+
}
|
|
207883
|
+
return (0, httpRequests_1.sendRequest)({
|
|
207884
|
+
url: url2.toString(),
|
|
207885
|
+
method: httpRequests_1.HttpMethod.Get
|
|
207886
|
+
});
|
|
207887
|
+
}
|
|
207888
|
+
/**
|
|
207889
|
+
* Creates a new message with an initial signature
|
|
207890
|
+
* Add more signatures from other owners using addMessageSignature()
|
|
207891
|
+
* @param safeAddress The safe address
|
|
207892
|
+
* @param options The raw message to add, signature and safeAppId if any
|
|
207893
|
+
*/
|
|
207894
|
+
async addMessage(safeAddress, addMessageProps) {
|
|
207895
|
+
if (!__classPrivateFieldGet2(this, _SafeApiKit_instances, "m", _SafeApiKit_isValidAddress).call(this, safeAddress)) {
|
|
207896
|
+
throw new Error("Invalid safeAddress");
|
|
207897
|
+
}
|
|
207898
|
+
return (0, httpRequests_1.sendRequest)({
|
|
207899
|
+
url: `${__classPrivateFieldGet2(this, _SafeApiKit_txServiceBaseUrl, "f")}/v1/safes/${safeAddress}/messages/`,
|
|
207900
|
+
method: httpRequests_1.HttpMethod.Post,
|
|
207901
|
+
body: addMessageProps
|
|
207902
|
+
});
|
|
207903
|
+
}
|
|
207904
|
+
/**
|
|
207905
|
+
* Add a signature to an existing message
|
|
207906
|
+
* @param messageHash The safe message hash
|
|
207907
|
+
* @param signature The signature
|
|
207908
|
+
*/
|
|
207909
|
+
async addMessageSignature(messageHash, signature) {
|
|
207910
|
+
if (!messageHash || !signature) {
|
|
207911
|
+
throw new Error("Invalid messageHash or signature");
|
|
207912
|
+
}
|
|
207913
|
+
return (0, httpRequests_1.sendRequest)({
|
|
207914
|
+
url: `${__classPrivateFieldGet2(this, _SafeApiKit_txServiceBaseUrl, "f")}/v1/messages/${messageHash}/signatures/`,
|
|
207915
|
+
method: httpRequests_1.HttpMethod.Post,
|
|
207916
|
+
body: {
|
|
207917
|
+
signature
|
|
207918
|
+
}
|
|
207919
|
+
});
|
|
207920
|
+
}
|
|
208493
207921
|
};
|
|
208494
|
-
_SafeApiKit_chainId = /* @__PURE__ */ new WeakMap(), _SafeApiKit_txServiceBaseUrl = /* @__PURE__ */ new WeakMap(), _SafeApiKit_instances = /* @__PURE__ */ new WeakSet(),
|
|
207922
|
+
_SafeApiKit_chainId = /* @__PURE__ */ new WeakMap(), _SafeApiKit_txServiceBaseUrl = /* @__PURE__ */ new WeakMap(), _SafeApiKit_instances = /* @__PURE__ */ new WeakSet(), _SafeApiKit_isValidAddress = function _SafeApiKit_isValidAddress2(address) {
|
|
207923
|
+
try {
|
|
207924
|
+
(0, protocol_kit_1.validateEthereumAddress)(address);
|
|
207925
|
+
return true;
|
|
207926
|
+
} catch {
|
|
207927
|
+
return false;
|
|
207928
|
+
}
|
|
207929
|
+
}, _SafeApiKit_getEip3770Address = function _SafeApiKit_getEip3770Address2(fullAddress) {
|
|
208495
207930
|
return (0, protocol_kit_1.validateEip3770Address)(fullAddress, __classPrivateFieldGet2(this, _SafeApiKit_chainId, "f"));
|
|
208496
207931
|
};
|
|
208497
207932
|
exports2.default = SafeApiKit2;
|
|
@@ -208850,413 +208285,10 @@ var require_logger = __commonJS({
|
|
|
208850
208285
|
}
|
|
208851
208286
|
});
|
|
208852
208287
|
|
|
208853
|
-
// ../../node_modules
|
|
208854
|
-
var require_constants12 = __commonJS({
|
|
208855
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/constants.js"(exports2, module2) {
|
|
208856
|
-
var SEMVER_SPEC_VERSION = "2.0.0";
|
|
208857
|
-
var MAX_LENGTH = 256;
|
|
208858
|
-
var MAX_SAFE_INTEGER3 = Number.MAX_SAFE_INTEGER || /* istanbul ignore next */
|
|
208859
|
-
9007199254740991;
|
|
208860
|
-
var MAX_SAFE_COMPONENT_LENGTH = 16;
|
|
208861
|
-
var MAX_SAFE_BUILD_LENGTH = MAX_LENGTH - 6;
|
|
208862
|
-
var RELEASE_TYPES = [
|
|
208863
|
-
"major",
|
|
208864
|
-
"premajor",
|
|
208865
|
-
"minor",
|
|
208866
|
-
"preminor",
|
|
208867
|
-
"patch",
|
|
208868
|
-
"prepatch",
|
|
208869
|
-
"prerelease"
|
|
208870
|
-
];
|
|
208871
|
-
module2.exports = {
|
|
208872
|
-
MAX_LENGTH,
|
|
208873
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
208874
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
208875
|
-
MAX_SAFE_INTEGER: MAX_SAFE_INTEGER3,
|
|
208876
|
-
RELEASE_TYPES,
|
|
208877
|
-
SEMVER_SPEC_VERSION,
|
|
208878
|
-
FLAG_INCLUDE_PRERELEASE: 1,
|
|
208879
|
-
FLAG_LOOSE: 2
|
|
208880
|
-
};
|
|
208881
|
-
}
|
|
208882
|
-
});
|
|
208883
|
-
|
|
208884
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/debug.js
|
|
208885
|
-
var require_debug4 = __commonJS({
|
|
208886
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/debug.js"(exports2, module2) {
|
|
208887
|
-
var debug = typeof process === "object" && process.env && process.env.NODE_DEBUG && /\bsemver\b/i.test(process.env.NODE_DEBUG) ? (...args) => console.error("SEMVER", ...args) : () => {
|
|
208888
|
-
};
|
|
208889
|
-
module2.exports = debug;
|
|
208890
|
-
}
|
|
208891
|
-
});
|
|
208892
|
-
|
|
208893
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/re.js
|
|
208894
|
-
var require_re3 = __commonJS({
|
|
208895
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/re.js"(exports2, module2) {
|
|
208896
|
-
var {
|
|
208897
|
-
MAX_SAFE_COMPONENT_LENGTH,
|
|
208898
|
-
MAX_SAFE_BUILD_LENGTH,
|
|
208899
|
-
MAX_LENGTH
|
|
208900
|
-
} = require_constants12();
|
|
208901
|
-
var debug = require_debug4();
|
|
208902
|
-
exports2 = module2.exports = {};
|
|
208903
|
-
var re = exports2.re = [];
|
|
208904
|
-
var safeRe = exports2.safeRe = [];
|
|
208905
|
-
var src = exports2.src = [];
|
|
208906
|
-
var t = exports2.t = {};
|
|
208907
|
-
var R = 0;
|
|
208908
|
-
var LETTERDASHNUMBER = "[a-zA-Z0-9-]";
|
|
208909
|
-
var safeRegexReplacements = [
|
|
208910
|
-
["\\s", 1],
|
|
208911
|
-
["\\d", MAX_LENGTH],
|
|
208912
|
-
[LETTERDASHNUMBER, MAX_SAFE_BUILD_LENGTH]
|
|
208913
|
-
];
|
|
208914
|
-
var makeSafeRegex = (value) => {
|
|
208915
|
-
for (const [token, max] of safeRegexReplacements) {
|
|
208916
|
-
value = value.split(`${token}*`).join(`${token}{0,${max}}`).split(`${token}+`).join(`${token}{1,${max}}`);
|
|
208917
|
-
}
|
|
208918
|
-
return value;
|
|
208919
|
-
};
|
|
208920
|
-
var createToken = (name, value, isGlobal) => {
|
|
208921
|
-
const safe = makeSafeRegex(value);
|
|
208922
|
-
const index = R++;
|
|
208923
|
-
debug(name, index, value);
|
|
208924
|
-
t[name] = index;
|
|
208925
|
-
src[index] = value;
|
|
208926
|
-
re[index] = new RegExp(value, isGlobal ? "g" : void 0);
|
|
208927
|
-
safeRe[index] = new RegExp(safe, isGlobal ? "g" : void 0);
|
|
208928
|
-
};
|
|
208929
|
-
createToken("NUMERICIDENTIFIER", "0|[1-9]\\d*");
|
|
208930
|
-
createToken("NUMERICIDENTIFIERLOOSE", "\\d+");
|
|
208931
|
-
createToken("NONNUMERICIDENTIFIER", `\\d*[a-zA-Z-]${LETTERDASHNUMBER}*`);
|
|
208932
|
-
createToken("MAINVERSION", `(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})\\.(${src[t.NUMERICIDENTIFIER]})`);
|
|
208933
|
-
createToken("MAINVERSIONLOOSE", `(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})\\.(${src[t.NUMERICIDENTIFIERLOOSE]})`);
|
|
208934
|
-
createToken("PRERELEASEIDENTIFIER", `(?:${src[t.NUMERICIDENTIFIER]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
208935
|
-
createToken("PRERELEASEIDENTIFIERLOOSE", `(?:${src[t.NUMERICIDENTIFIERLOOSE]}|${src[t.NONNUMERICIDENTIFIER]})`);
|
|
208936
|
-
createToken("PRERELEASE", `(?:-(${src[t.PRERELEASEIDENTIFIER]}(?:\\.${src[t.PRERELEASEIDENTIFIER]})*))`);
|
|
208937
|
-
createToken("PRERELEASELOOSE", `(?:-?(${src[t.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${src[t.PRERELEASEIDENTIFIERLOOSE]})*))`);
|
|
208938
|
-
createToken("BUILDIDENTIFIER", `${LETTERDASHNUMBER}+`);
|
|
208939
|
-
createToken("BUILD", `(?:\\+(${src[t.BUILDIDENTIFIER]}(?:\\.${src[t.BUILDIDENTIFIER]})*))`);
|
|
208940
|
-
createToken("FULLPLAIN", `v?${src[t.MAINVERSION]}${src[t.PRERELEASE]}?${src[t.BUILD]}?`);
|
|
208941
|
-
createToken("FULL", `^${src[t.FULLPLAIN]}$`);
|
|
208942
|
-
createToken("LOOSEPLAIN", `[v=\\s]*${src[t.MAINVERSIONLOOSE]}${src[t.PRERELEASELOOSE]}?${src[t.BUILD]}?`);
|
|
208943
|
-
createToken("LOOSE", `^${src[t.LOOSEPLAIN]}$`);
|
|
208944
|
-
createToken("GTLT", "((?:<|>)?=?)");
|
|
208945
|
-
createToken("XRANGEIDENTIFIERLOOSE", `${src[t.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);
|
|
208946
|
-
createToken("XRANGEIDENTIFIER", `${src[t.NUMERICIDENTIFIER]}|x|X|\\*`);
|
|
208947
|
-
createToken("XRANGEPLAIN", `[v=\\s]*(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:\\.(${src[t.XRANGEIDENTIFIER]})(?:${src[t.PRERELEASE]})?${src[t.BUILD]}?)?)?`);
|
|
208948
|
-
createToken("XRANGEPLAINLOOSE", `[v=\\s]*(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:\\.(${src[t.XRANGEIDENTIFIERLOOSE]})(?:${src[t.PRERELEASELOOSE]})?${src[t.BUILD]}?)?)?`);
|
|
208949
|
-
createToken("XRANGE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAIN]}$`);
|
|
208950
|
-
createToken("XRANGELOOSE", `^${src[t.GTLT]}\\s*${src[t.XRANGEPLAINLOOSE]}$`);
|
|
208951
|
-
createToken("COERCE", `${"(^|[^\\d])(\\d{1,"}${MAX_SAFE_COMPONENT_LENGTH}})(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:\\.(\\d{1,${MAX_SAFE_COMPONENT_LENGTH}}))?(?:$|[^\\d])`);
|
|
208952
|
-
createToken("COERCERTL", src[t.COERCE], true);
|
|
208953
|
-
createToken("LONETILDE", "(?:~>?)");
|
|
208954
|
-
createToken("TILDETRIM", `(\\s*)${src[t.LONETILDE]}\\s+`, true);
|
|
208955
|
-
exports2.tildeTrimReplace = "$1~";
|
|
208956
|
-
createToken("TILDE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAIN]}$`);
|
|
208957
|
-
createToken("TILDELOOSE", `^${src[t.LONETILDE]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
208958
|
-
createToken("LONECARET", "(?:\\^)");
|
|
208959
|
-
createToken("CARETTRIM", `(\\s*)${src[t.LONECARET]}\\s+`, true);
|
|
208960
|
-
exports2.caretTrimReplace = "$1^";
|
|
208961
|
-
createToken("CARET", `^${src[t.LONECARET]}${src[t.XRANGEPLAIN]}$`);
|
|
208962
|
-
createToken("CARETLOOSE", `^${src[t.LONECARET]}${src[t.XRANGEPLAINLOOSE]}$`);
|
|
208963
|
-
createToken("COMPARATORLOOSE", `^${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]})$|^$`);
|
|
208964
|
-
createToken("COMPARATOR", `^${src[t.GTLT]}\\s*(${src[t.FULLPLAIN]})$|^$`);
|
|
208965
|
-
createToken("COMPARATORTRIM", `(\\s*)${src[t.GTLT]}\\s*(${src[t.LOOSEPLAIN]}|${src[t.XRANGEPLAIN]})`, true);
|
|
208966
|
-
exports2.comparatorTrimReplace = "$1$2$3";
|
|
208967
|
-
createToken("HYPHENRANGE", `^\\s*(${src[t.XRANGEPLAIN]})\\s+-\\s+(${src[t.XRANGEPLAIN]})\\s*$`);
|
|
208968
|
-
createToken("HYPHENRANGELOOSE", `^\\s*(${src[t.XRANGEPLAINLOOSE]})\\s+-\\s+(${src[t.XRANGEPLAINLOOSE]})\\s*$`);
|
|
208969
|
-
createToken("STAR", "(<|>)?=?\\s*\\*");
|
|
208970
|
-
createToken("GTE0", "^\\s*>=\\s*0\\.0\\.0\\s*$");
|
|
208971
|
-
createToken("GTE0PRE", "^\\s*>=\\s*0\\.0\\.0-0\\s*$");
|
|
208972
|
-
}
|
|
208973
|
-
});
|
|
208974
|
-
|
|
208975
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/parse-options.js
|
|
208976
|
-
var require_parse_options3 = __commonJS({
|
|
208977
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/parse-options.js"(exports2, module2) {
|
|
208978
|
-
var looseOption = Object.freeze({ loose: true });
|
|
208979
|
-
var emptyOpts = Object.freeze({});
|
|
208980
|
-
var parseOptions = (options) => {
|
|
208981
|
-
if (!options) {
|
|
208982
|
-
return emptyOpts;
|
|
208983
|
-
}
|
|
208984
|
-
if (typeof options !== "object") {
|
|
208985
|
-
return looseOption;
|
|
208986
|
-
}
|
|
208987
|
-
return options;
|
|
208988
|
-
};
|
|
208989
|
-
module2.exports = parseOptions;
|
|
208990
|
-
}
|
|
208991
|
-
});
|
|
208992
|
-
|
|
208993
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/identifiers.js
|
|
208994
|
-
var require_identifiers3 = __commonJS({
|
|
208995
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/internal/identifiers.js"(exports2, module2) {
|
|
208996
|
-
var numeric = /^[0-9]+$/;
|
|
208997
|
-
var compareIdentifiers = (a, b3) => {
|
|
208998
|
-
const anum = numeric.test(a);
|
|
208999
|
-
const bnum = numeric.test(b3);
|
|
209000
|
-
if (anum && bnum) {
|
|
209001
|
-
a = +a;
|
|
209002
|
-
b3 = +b3;
|
|
209003
|
-
}
|
|
209004
|
-
return a === b3 ? 0 : anum && !bnum ? -1 : bnum && !anum ? 1 : a < b3 ? -1 : 1;
|
|
209005
|
-
};
|
|
209006
|
-
var rcompareIdentifiers = (a, b3) => compareIdentifiers(b3, a);
|
|
209007
|
-
module2.exports = {
|
|
209008
|
-
compareIdentifiers,
|
|
209009
|
-
rcompareIdentifiers
|
|
209010
|
-
};
|
|
209011
|
-
}
|
|
209012
|
-
});
|
|
209013
|
-
|
|
209014
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/classes/semver.js
|
|
209015
|
-
var require_semver3 = __commonJS({
|
|
209016
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/classes/semver.js"(exports2, module2) {
|
|
209017
|
-
var debug = require_debug4();
|
|
209018
|
-
var { MAX_LENGTH, MAX_SAFE_INTEGER: MAX_SAFE_INTEGER3 } = require_constants12();
|
|
209019
|
-
var { safeRe: re, t } = require_re3();
|
|
209020
|
-
var parseOptions = require_parse_options3();
|
|
209021
|
-
var { compareIdentifiers } = require_identifiers3();
|
|
209022
|
-
var SemVer = class _SemVer {
|
|
209023
|
-
constructor(version4, options) {
|
|
209024
|
-
options = parseOptions(options);
|
|
209025
|
-
if (version4 instanceof _SemVer) {
|
|
209026
|
-
if (version4.loose === !!options.loose && version4.includePrerelease === !!options.includePrerelease) {
|
|
209027
|
-
return version4;
|
|
209028
|
-
} else {
|
|
209029
|
-
version4 = version4.version;
|
|
209030
|
-
}
|
|
209031
|
-
} else if (typeof version4 !== "string") {
|
|
209032
|
-
throw new TypeError(`Invalid version. Must be a string. Got type "${typeof version4}".`);
|
|
209033
|
-
}
|
|
209034
|
-
if (version4.length > MAX_LENGTH) {
|
|
209035
|
-
throw new TypeError(
|
|
209036
|
-
`version is longer than ${MAX_LENGTH} characters`
|
|
209037
|
-
);
|
|
209038
|
-
}
|
|
209039
|
-
debug("SemVer", version4, options);
|
|
209040
|
-
this.options = options;
|
|
209041
|
-
this.loose = !!options.loose;
|
|
209042
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
209043
|
-
const m = version4.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
|
|
209044
|
-
if (!m) {
|
|
209045
|
-
throw new TypeError(`Invalid Version: ${version4}`);
|
|
209046
|
-
}
|
|
209047
|
-
this.raw = version4;
|
|
209048
|
-
this.major = +m[1];
|
|
209049
|
-
this.minor = +m[2];
|
|
209050
|
-
this.patch = +m[3];
|
|
209051
|
-
if (this.major > MAX_SAFE_INTEGER3 || this.major < 0) {
|
|
209052
|
-
throw new TypeError("Invalid major version");
|
|
209053
|
-
}
|
|
209054
|
-
if (this.minor > MAX_SAFE_INTEGER3 || this.minor < 0) {
|
|
209055
|
-
throw new TypeError("Invalid minor version");
|
|
209056
|
-
}
|
|
209057
|
-
if (this.patch > MAX_SAFE_INTEGER3 || this.patch < 0) {
|
|
209058
|
-
throw new TypeError("Invalid patch version");
|
|
209059
|
-
}
|
|
209060
|
-
if (!m[4]) {
|
|
209061
|
-
this.prerelease = [];
|
|
209062
|
-
} else {
|
|
209063
|
-
this.prerelease = m[4].split(".").map((id3) => {
|
|
209064
|
-
if (/^[0-9]+$/.test(id3)) {
|
|
209065
|
-
const num = +id3;
|
|
209066
|
-
if (num >= 0 && num < MAX_SAFE_INTEGER3) {
|
|
209067
|
-
return num;
|
|
209068
|
-
}
|
|
209069
|
-
}
|
|
209070
|
-
return id3;
|
|
209071
|
-
});
|
|
209072
|
-
}
|
|
209073
|
-
this.build = m[5] ? m[5].split(".") : [];
|
|
209074
|
-
this.format();
|
|
209075
|
-
}
|
|
209076
|
-
format() {
|
|
209077
|
-
this.version = `${this.major}.${this.minor}.${this.patch}`;
|
|
209078
|
-
if (this.prerelease.length) {
|
|
209079
|
-
this.version += `-${this.prerelease.join(".")}`;
|
|
209080
|
-
}
|
|
209081
|
-
return this.version;
|
|
209082
|
-
}
|
|
209083
|
-
toString() {
|
|
209084
|
-
return this.version;
|
|
209085
|
-
}
|
|
209086
|
-
compare(other) {
|
|
209087
|
-
debug("SemVer.compare", this.version, this.options, other);
|
|
209088
|
-
if (!(other instanceof _SemVer)) {
|
|
209089
|
-
if (typeof other === "string" && other === this.version) {
|
|
209090
|
-
return 0;
|
|
209091
|
-
}
|
|
209092
|
-
other = new _SemVer(other, this.options);
|
|
209093
|
-
}
|
|
209094
|
-
if (other.version === this.version) {
|
|
209095
|
-
return 0;
|
|
209096
|
-
}
|
|
209097
|
-
return this.compareMain(other) || this.comparePre(other);
|
|
209098
|
-
}
|
|
209099
|
-
compareMain(other) {
|
|
209100
|
-
if (!(other instanceof _SemVer)) {
|
|
209101
|
-
other = new _SemVer(other, this.options);
|
|
209102
|
-
}
|
|
209103
|
-
return compareIdentifiers(this.major, other.major) || compareIdentifiers(this.minor, other.minor) || compareIdentifiers(this.patch, other.patch);
|
|
209104
|
-
}
|
|
209105
|
-
comparePre(other) {
|
|
209106
|
-
if (!(other instanceof _SemVer)) {
|
|
209107
|
-
other = new _SemVer(other, this.options);
|
|
209108
|
-
}
|
|
209109
|
-
if (this.prerelease.length && !other.prerelease.length) {
|
|
209110
|
-
return -1;
|
|
209111
|
-
} else if (!this.prerelease.length && other.prerelease.length) {
|
|
209112
|
-
return 1;
|
|
209113
|
-
} else if (!this.prerelease.length && !other.prerelease.length) {
|
|
209114
|
-
return 0;
|
|
209115
|
-
}
|
|
209116
|
-
let i = 0;
|
|
209117
|
-
do {
|
|
209118
|
-
const a = this.prerelease[i];
|
|
209119
|
-
const b3 = other.prerelease[i];
|
|
209120
|
-
debug("prerelease compare", i, a, b3);
|
|
209121
|
-
if (a === void 0 && b3 === void 0) {
|
|
209122
|
-
return 0;
|
|
209123
|
-
} else if (b3 === void 0) {
|
|
209124
|
-
return 1;
|
|
209125
|
-
} else if (a === void 0) {
|
|
209126
|
-
return -1;
|
|
209127
|
-
} else if (a === b3) {
|
|
209128
|
-
continue;
|
|
209129
|
-
} else {
|
|
209130
|
-
return compareIdentifiers(a, b3);
|
|
209131
|
-
}
|
|
209132
|
-
} while (++i);
|
|
209133
|
-
}
|
|
209134
|
-
compareBuild(other) {
|
|
209135
|
-
if (!(other instanceof _SemVer)) {
|
|
209136
|
-
other = new _SemVer(other, this.options);
|
|
209137
|
-
}
|
|
209138
|
-
let i = 0;
|
|
209139
|
-
do {
|
|
209140
|
-
const a = this.build[i];
|
|
209141
|
-
const b3 = other.build[i];
|
|
209142
|
-
debug("prerelease compare", i, a, b3);
|
|
209143
|
-
if (a === void 0 && b3 === void 0) {
|
|
209144
|
-
return 0;
|
|
209145
|
-
} else if (b3 === void 0) {
|
|
209146
|
-
return 1;
|
|
209147
|
-
} else if (a === void 0) {
|
|
209148
|
-
return -1;
|
|
209149
|
-
} else if (a === b3) {
|
|
209150
|
-
continue;
|
|
209151
|
-
} else {
|
|
209152
|
-
return compareIdentifiers(a, b3);
|
|
209153
|
-
}
|
|
209154
|
-
} while (++i);
|
|
209155
|
-
}
|
|
209156
|
-
// preminor will bump the version up to the next minor release, and immediately
|
|
209157
|
-
// down to pre-release. premajor and prepatch work the same way.
|
|
209158
|
-
inc(release, identifier, identifierBase) {
|
|
209159
|
-
switch (release) {
|
|
209160
|
-
case "premajor":
|
|
209161
|
-
this.prerelease.length = 0;
|
|
209162
|
-
this.patch = 0;
|
|
209163
|
-
this.minor = 0;
|
|
209164
|
-
this.major++;
|
|
209165
|
-
this.inc("pre", identifier, identifierBase);
|
|
209166
|
-
break;
|
|
209167
|
-
case "preminor":
|
|
209168
|
-
this.prerelease.length = 0;
|
|
209169
|
-
this.patch = 0;
|
|
209170
|
-
this.minor++;
|
|
209171
|
-
this.inc("pre", identifier, identifierBase);
|
|
209172
|
-
break;
|
|
209173
|
-
case "prepatch":
|
|
209174
|
-
this.prerelease.length = 0;
|
|
209175
|
-
this.inc("patch", identifier, identifierBase);
|
|
209176
|
-
this.inc("pre", identifier, identifierBase);
|
|
209177
|
-
break;
|
|
209178
|
-
case "prerelease":
|
|
209179
|
-
if (this.prerelease.length === 0) {
|
|
209180
|
-
this.inc("patch", identifier, identifierBase);
|
|
209181
|
-
}
|
|
209182
|
-
this.inc("pre", identifier, identifierBase);
|
|
209183
|
-
break;
|
|
209184
|
-
case "major":
|
|
209185
|
-
if (this.minor !== 0 || this.patch !== 0 || this.prerelease.length === 0) {
|
|
209186
|
-
this.major++;
|
|
209187
|
-
}
|
|
209188
|
-
this.minor = 0;
|
|
209189
|
-
this.patch = 0;
|
|
209190
|
-
this.prerelease = [];
|
|
209191
|
-
break;
|
|
209192
|
-
case "minor":
|
|
209193
|
-
if (this.patch !== 0 || this.prerelease.length === 0) {
|
|
209194
|
-
this.minor++;
|
|
209195
|
-
}
|
|
209196
|
-
this.patch = 0;
|
|
209197
|
-
this.prerelease = [];
|
|
209198
|
-
break;
|
|
209199
|
-
case "patch":
|
|
209200
|
-
if (this.prerelease.length === 0) {
|
|
209201
|
-
this.patch++;
|
|
209202
|
-
}
|
|
209203
|
-
this.prerelease = [];
|
|
209204
|
-
break;
|
|
209205
|
-
case "pre": {
|
|
209206
|
-
const base = Number(identifierBase) ? 1 : 0;
|
|
209207
|
-
if (!identifier && identifierBase === false) {
|
|
209208
|
-
throw new Error("invalid increment argument: identifier is empty");
|
|
209209
|
-
}
|
|
209210
|
-
if (this.prerelease.length === 0) {
|
|
209211
|
-
this.prerelease = [base];
|
|
209212
|
-
} else {
|
|
209213
|
-
let i = this.prerelease.length;
|
|
209214
|
-
while (--i >= 0) {
|
|
209215
|
-
if (typeof this.prerelease[i] === "number") {
|
|
209216
|
-
this.prerelease[i]++;
|
|
209217
|
-
i = -2;
|
|
209218
|
-
}
|
|
209219
|
-
}
|
|
209220
|
-
if (i === -1) {
|
|
209221
|
-
if (identifier === this.prerelease.join(".") && identifierBase === false) {
|
|
209222
|
-
throw new Error("invalid increment argument: identifier already exists");
|
|
209223
|
-
}
|
|
209224
|
-
this.prerelease.push(base);
|
|
209225
|
-
}
|
|
209226
|
-
}
|
|
209227
|
-
if (identifier) {
|
|
209228
|
-
let prerelease = [identifier, base];
|
|
209229
|
-
if (identifierBase === false) {
|
|
209230
|
-
prerelease = [identifier];
|
|
209231
|
-
}
|
|
209232
|
-
if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
|
|
209233
|
-
if (isNaN(this.prerelease[1])) {
|
|
209234
|
-
this.prerelease = prerelease;
|
|
209235
|
-
}
|
|
209236
|
-
} else {
|
|
209237
|
-
this.prerelease = prerelease;
|
|
209238
|
-
}
|
|
209239
|
-
}
|
|
209240
|
-
break;
|
|
209241
|
-
}
|
|
209242
|
-
default:
|
|
209243
|
-
throw new Error(`invalid increment argument: ${release}`);
|
|
209244
|
-
}
|
|
209245
|
-
this.raw = this.format();
|
|
209246
|
-
if (this.build.length) {
|
|
209247
|
-
this.raw += `+${this.build.join(".")}`;
|
|
209248
|
-
}
|
|
209249
|
-
return this;
|
|
209250
|
-
}
|
|
209251
|
-
};
|
|
209252
|
-
module2.exports = SemVer;
|
|
209253
|
-
}
|
|
209254
|
-
});
|
|
209255
|
-
|
|
209256
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/parse.js
|
|
208288
|
+
// ../../node_modules/semver/functions/parse.js
|
|
209257
208289
|
var require_parse = __commonJS({
|
|
209258
|
-
"../../node_modules
|
|
209259
|
-
var SemVer =
|
|
208290
|
+
"../../node_modules/semver/functions/parse.js"(exports2, module2) {
|
|
208291
|
+
var SemVer = require_semver();
|
|
209260
208292
|
var parse2 = (version4, options, throwErrors = false) => {
|
|
209261
208293
|
if (version4 instanceof SemVer) {
|
|
209262
208294
|
return version4;
|
|
@@ -209274,9 +208306,9 @@ var require_parse = __commonJS({
|
|
|
209274
208306
|
}
|
|
209275
208307
|
});
|
|
209276
208308
|
|
|
209277
|
-
// ../../node_modules
|
|
208309
|
+
// ../../node_modules/semver/functions/valid.js
|
|
209278
208310
|
var require_valid = __commonJS({
|
|
209279
|
-
"../../node_modules
|
|
208311
|
+
"../../node_modules/semver/functions/valid.js"(exports2, module2) {
|
|
209280
208312
|
var parse2 = require_parse();
|
|
209281
208313
|
var valid = (version4, options) => {
|
|
209282
208314
|
const v = parse2(version4, options);
|
|
@@ -209286,9 +208318,9 @@ var require_valid = __commonJS({
|
|
|
209286
208318
|
}
|
|
209287
208319
|
});
|
|
209288
208320
|
|
|
209289
|
-
// ../../node_modules
|
|
208321
|
+
// ../../node_modules/semver/functions/clean.js
|
|
209290
208322
|
var require_clean = __commonJS({
|
|
209291
|
-
"../../node_modules
|
|
208323
|
+
"../../node_modules/semver/functions/clean.js"(exports2, module2) {
|
|
209292
208324
|
var parse2 = require_parse();
|
|
209293
208325
|
var clean = (version4, options) => {
|
|
209294
208326
|
const s = parse2(version4.trim().replace(/^[=v]+/, ""), options);
|
|
@@ -209298,10 +208330,10 @@ var require_clean = __commonJS({
|
|
|
209298
208330
|
}
|
|
209299
208331
|
});
|
|
209300
208332
|
|
|
209301
|
-
// ../../node_modules
|
|
208333
|
+
// ../../node_modules/semver/functions/inc.js
|
|
209302
208334
|
var require_inc = __commonJS({
|
|
209303
|
-
"../../node_modules
|
|
209304
|
-
var SemVer =
|
|
208335
|
+
"../../node_modules/semver/functions/inc.js"(exports2, module2) {
|
|
208336
|
+
var SemVer = require_semver();
|
|
209305
208337
|
var inc = (version4, release, options, identifier, identifierBase) => {
|
|
209306
208338
|
if (typeof options === "string") {
|
|
209307
208339
|
identifierBase = identifier;
|
|
@@ -209321,9 +208353,9 @@ var require_inc = __commonJS({
|
|
|
209321
208353
|
}
|
|
209322
208354
|
});
|
|
209323
208355
|
|
|
209324
|
-
// ../../node_modules
|
|
208356
|
+
// ../../node_modules/semver/functions/diff.js
|
|
209325
208357
|
var require_diff = __commonJS({
|
|
209326
|
-
"../../node_modules
|
|
208358
|
+
"../../node_modules/semver/functions/diff.js"(exports2, module2) {
|
|
209327
208359
|
var parse2 = require_parse();
|
|
209328
208360
|
var diff = (version1, version22) => {
|
|
209329
208361
|
const v1 = parse2(version1, null, true);
|
|
@@ -209365,36 +208397,36 @@ var require_diff = __commonJS({
|
|
|
209365
208397
|
}
|
|
209366
208398
|
});
|
|
209367
208399
|
|
|
209368
|
-
// ../../node_modules
|
|
208400
|
+
// ../../node_modules/semver/functions/major.js
|
|
209369
208401
|
var require_major = __commonJS({
|
|
209370
|
-
"../../node_modules
|
|
209371
|
-
var SemVer =
|
|
208402
|
+
"../../node_modules/semver/functions/major.js"(exports2, module2) {
|
|
208403
|
+
var SemVer = require_semver();
|
|
209372
208404
|
var major2 = (a, loose) => new SemVer(a, loose).major;
|
|
209373
208405
|
module2.exports = major2;
|
|
209374
208406
|
}
|
|
209375
208407
|
});
|
|
209376
208408
|
|
|
209377
|
-
// ../../node_modules
|
|
208409
|
+
// ../../node_modules/semver/functions/minor.js
|
|
209378
208410
|
var require_minor = __commonJS({
|
|
209379
|
-
"../../node_modules
|
|
209380
|
-
var SemVer =
|
|
208411
|
+
"../../node_modules/semver/functions/minor.js"(exports2, module2) {
|
|
208412
|
+
var SemVer = require_semver();
|
|
209381
208413
|
var minor = (a, loose) => new SemVer(a, loose).minor;
|
|
209382
208414
|
module2.exports = minor;
|
|
209383
208415
|
}
|
|
209384
208416
|
});
|
|
209385
208417
|
|
|
209386
|
-
// ../../node_modules
|
|
208418
|
+
// ../../node_modules/semver/functions/patch.js
|
|
209387
208419
|
var require_patch = __commonJS({
|
|
209388
|
-
"../../node_modules
|
|
209389
|
-
var SemVer =
|
|
208420
|
+
"../../node_modules/semver/functions/patch.js"(exports2, module2) {
|
|
208421
|
+
var SemVer = require_semver();
|
|
209390
208422
|
var patch = (a, loose) => new SemVer(a, loose).patch;
|
|
209391
208423
|
module2.exports = patch;
|
|
209392
208424
|
}
|
|
209393
208425
|
});
|
|
209394
208426
|
|
|
209395
|
-
// ../../node_modules
|
|
208427
|
+
// ../../node_modules/semver/functions/prerelease.js
|
|
209396
208428
|
var require_prerelease = __commonJS({
|
|
209397
|
-
"../../node_modules
|
|
208429
|
+
"../../node_modules/semver/functions/prerelease.js"(exports2, module2) {
|
|
209398
208430
|
var parse2 = require_parse();
|
|
209399
208431
|
var prerelease = (version4, options) => {
|
|
209400
208432
|
const parsed = parse2(version4, options);
|
|
@@ -209404,37 +208436,28 @@ var require_prerelease = __commonJS({
|
|
|
209404
208436
|
}
|
|
209405
208437
|
});
|
|
209406
208438
|
|
|
209407
|
-
// ../../node_modules
|
|
209408
|
-
var require_compare3 = __commonJS({
|
|
209409
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/compare.js"(exports2, module2) {
|
|
209410
|
-
var SemVer = require_semver3();
|
|
209411
|
-
var compare = (a, b3, loose) => new SemVer(a, loose).compare(new SemVer(b3, loose));
|
|
209412
|
-
module2.exports = compare;
|
|
209413
|
-
}
|
|
209414
|
-
});
|
|
209415
|
-
|
|
209416
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/rcompare.js
|
|
208439
|
+
// ../../node_modules/semver/functions/rcompare.js
|
|
209417
208440
|
var require_rcompare = __commonJS({
|
|
209418
|
-
"../../node_modules
|
|
209419
|
-
var compare =
|
|
208441
|
+
"../../node_modules/semver/functions/rcompare.js"(exports2, module2) {
|
|
208442
|
+
var compare = require_compare();
|
|
209420
208443
|
var rcompare = (a, b3, loose) => compare(b3, a, loose);
|
|
209421
208444
|
module2.exports = rcompare;
|
|
209422
208445
|
}
|
|
209423
208446
|
});
|
|
209424
208447
|
|
|
209425
|
-
// ../../node_modules
|
|
208448
|
+
// ../../node_modules/semver/functions/compare-loose.js
|
|
209426
208449
|
var require_compare_loose = __commonJS({
|
|
209427
|
-
"../../node_modules
|
|
209428
|
-
var compare =
|
|
208450
|
+
"../../node_modules/semver/functions/compare-loose.js"(exports2, module2) {
|
|
208451
|
+
var compare = require_compare();
|
|
209429
208452
|
var compareLoose = (a, b3) => compare(a, b3, true);
|
|
209430
208453
|
module2.exports = compareLoose;
|
|
209431
208454
|
}
|
|
209432
208455
|
});
|
|
209433
208456
|
|
|
209434
|
-
// ../../node_modules
|
|
208457
|
+
// ../../node_modules/semver/functions/compare-build.js
|
|
209435
208458
|
var require_compare_build = __commonJS({
|
|
209436
|
-
"../../node_modules
|
|
209437
|
-
var SemVer =
|
|
208459
|
+
"../../node_modules/semver/functions/compare-build.js"(exports2, module2) {
|
|
208460
|
+
var SemVer = require_semver();
|
|
209438
208461
|
var compareBuild = (a, b3, loose) => {
|
|
209439
208462
|
const versionA = new SemVer(a, loose);
|
|
209440
208463
|
const versionB = new SemVer(b3, loose);
|
|
@@ -209444,133 +208467,30 @@ var require_compare_build = __commonJS({
|
|
|
209444
208467
|
}
|
|
209445
208468
|
});
|
|
209446
208469
|
|
|
209447
|
-
// ../../node_modules
|
|
208470
|
+
// ../../node_modules/semver/functions/sort.js
|
|
209448
208471
|
var require_sort = __commonJS({
|
|
209449
|
-
"../../node_modules
|
|
208472
|
+
"../../node_modules/semver/functions/sort.js"(exports2, module2) {
|
|
209450
208473
|
var compareBuild = require_compare_build();
|
|
209451
208474
|
var sort = (list, loose) => list.sort((a, b3) => compareBuild(a, b3, loose));
|
|
209452
208475
|
module2.exports = sort;
|
|
209453
208476
|
}
|
|
209454
208477
|
});
|
|
209455
208478
|
|
|
209456
|
-
// ../../node_modules
|
|
208479
|
+
// ../../node_modules/semver/functions/rsort.js
|
|
209457
208480
|
var require_rsort = __commonJS({
|
|
209458
|
-
"../../node_modules
|
|
208481
|
+
"../../node_modules/semver/functions/rsort.js"(exports2, module2) {
|
|
209459
208482
|
var compareBuild = require_compare_build();
|
|
209460
208483
|
var rsort = (list, loose) => list.sort((a, b3) => compareBuild(b3, a, loose));
|
|
209461
208484
|
module2.exports = rsort;
|
|
209462
208485
|
}
|
|
209463
208486
|
});
|
|
209464
208487
|
|
|
209465
|
-
// ../../node_modules
|
|
209466
|
-
var require_gt3 = __commonJS({
|
|
209467
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/gt.js"(exports2, module2) {
|
|
209468
|
-
var compare = require_compare3();
|
|
209469
|
-
var gt = (a, b3, loose) => compare(a, b3, loose) > 0;
|
|
209470
|
-
module2.exports = gt;
|
|
209471
|
-
}
|
|
209472
|
-
});
|
|
209473
|
-
|
|
209474
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/lt.js
|
|
209475
|
-
var require_lt3 = __commonJS({
|
|
209476
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/lt.js"(exports2, module2) {
|
|
209477
|
-
var compare = require_compare3();
|
|
209478
|
-
var lt = (a, b3, loose) => compare(a, b3, loose) < 0;
|
|
209479
|
-
module2.exports = lt;
|
|
209480
|
-
}
|
|
209481
|
-
});
|
|
209482
|
-
|
|
209483
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/eq.js
|
|
209484
|
-
var require_eq3 = __commonJS({
|
|
209485
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/eq.js"(exports2, module2) {
|
|
209486
|
-
var compare = require_compare3();
|
|
209487
|
-
var eq2 = (a, b3, loose) => compare(a, b3, loose) === 0;
|
|
209488
|
-
module2.exports = eq2;
|
|
209489
|
-
}
|
|
209490
|
-
});
|
|
209491
|
-
|
|
209492
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/neq.js
|
|
209493
|
-
var require_neq3 = __commonJS({
|
|
209494
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/neq.js"(exports2, module2) {
|
|
209495
|
-
var compare = require_compare3();
|
|
209496
|
-
var neq = (a, b3, loose) => compare(a, b3, loose) !== 0;
|
|
209497
|
-
module2.exports = neq;
|
|
209498
|
-
}
|
|
209499
|
-
});
|
|
209500
|
-
|
|
209501
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/gte.js
|
|
209502
|
-
var require_gte3 = __commonJS({
|
|
209503
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/gte.js"(exports2, module2) {
|
|
209504
|
-
var compare = require_compare3();
|
|
209505
|
-
var gte = (a, b3, loose) => compare(a, b3, loose) >= 0;
|
|
209506
|
-
module2.exports = gte;
|
|
209507
|
-
}
|
|
209508
|
-
});
|
|
209509
|
-
|
|
209510
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/lte.js
|
|
209511
|
-
var require_lte3 = __commonJS({
|
|
209512
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/lte.js"(exports2, module2) {
|
|
209513
|
-
var compare = require_compare3();
|
|
209514
|
-
var lte = (a, b3, loose) => compare(a, b3, loose) <= 0;
|
|
209515
|
-
module2.exports = lte;
|
|
209516
|
-
}
|
|
209517
|
-
});
|
|
209518
|
-
|
|
209519
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/cmp.js
|
|
209520
|
-
var require_cmp3 = __commonJS({
|
|
209521
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/cmp.js"(exports2, module2) {
|
|
209522
|
-
var eq2 = require_eq3();
|
|
209523
|
-
var neq = require_neq3();
|
|
209524
|
-
var gt = require_gt3();
|
|
209525
|
-
var gte = require_gte3();
|
|
209526
|
-
var lt = require_lt3();
|
|
209527
|
-
var lte = require_lte3();
|
|
209528
|
-
var cmp = (a, op, b3, loose) => {
|
|
209529
|
-
switch (op) {
|
|
209530
|
-
case "===":
|
|
209531
|
-
if (typeof a === "object") {
|
|
209532
|
-
a = a.version;
|
|
209533
|
-
}
|
|
209534
|
-
if (typeof b3 === "object") {
|
|
209535
|
-
b3 = b3.version;
|
|
209536
|
-
}
|
|
209537
|
-
return a === b3;
|
|
209538
|
-
case "!==":
|
|
209539
|
-
if (typeof a === "object") {
|
|
209540
|
-
a = a.version;
|
|
209541
|
-
}
|
|
209542
|
-
if (typeof b3 === "object") {
|
|
209543
|
-
b3 = b3.version;
|
|
209544
|
-
}
|
|
209545
|
-
return a !== b3;
|
|
209546
|
-
case "":
|
|
209547
|
-
case "=":
|
|
209548
|
-
case "==":
|
|
209549
|
-
return eq2(a, b3, loose);
|
|
209550
|
-
case "!=":
|
|
209551
|
-
return neq(a, b3, loose);
|
|
209552
|
-
case ">":
|
|
209553
|
-
return gt(a, b3, loose);
|
|
209554
|
-
case ">=":
|
|
209555
|
-
return gte(a, b3, loose);
|
|
209556
|
-
case "<":
|
|
209557
|
-
return lt(a, b3, loose);
|
|
209558
|
-
case "<=":
|
|
209559
|
-
return lte(a, b3, loose);
|
|
209560
|
-
default:
|
|
209561
|
-
throw new TypeError(`Invalid operator: ${op}`);
|
|
209562
|
-
}
|
|
209563
|
-
};
|
|
209564
|
-
module2.exports = cmp;
|
|
209565
|
-
}
|
|
209566
|
-
});
|
|
209567
|
-
|
|
209568
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/coerce.js
|
|
208488
|
+
// ../../node_modules/semver/functions/coerce.js
|
|
209569
208489
|
var require_coerce = __commonJS({
|
|
209570
|
-
"../../node_modules
|
|
209571
|
-
var SemVer =
|
|
208490
|
+
"../../node_modules/semver/functions/coerce.js"(exports2, module2) {
|
|
208491
|
+
var SemVer = require_semver();
|
|
209572
208492
|
var parse2 = require_parse();
|
|
209573
|
-
var { safeRe: re, t } =
|
|
208493
|
+
var { safeRe: re, t } = require_re();
|
|
209574
208494
|
var coerce = (version4, options) => {
|
|
209575
208495
|
if (version4 instanceof SemVer) {
|
|
209576
208496
|
return version4;
|
|
@@ -209584,525 +208504,46 @@ var require_coerce = __commonJS({
|
|
|
209584
208504
|
options = options || {};
|
|
209585
208505
|
let match = null;
|
|
209586
208506
|
if (!options.rtl) {
|
|
209587
|
-
match = version4.match(re[t.COERCE]);
|
|
208507
|
+
match = version4.match(options.includePrerelease ? re[t.COERCEFULL] : re[t.COERCE]);
|
|
209588
208508
|
} else {
|
|
208509
|
+
const coerceRtlRegex = options.includePrerelease ? re[t.COERCERTLFULL] : re[t.COERCERTL];
|
|
209589
208510
|
let next;
|
|
209590
|
-
while ((next =
|
|
208511
|
+
while ((next = coerceRtlRegex.exec(version4)) && (!match || match.index + match[0].length !== version4.length)) {
|
|
209591
208512
|
if (!match || next.index + next[0].length !== match.index + match[0].length) {
|
|
209592
208513
|
match = next;
|
|
209593
208514
|
}
|
|
209594
|
-
|
|
208515
|
+
coerceRtlRegex.lastIndex = next.index + next[1].length + next[2].length;
|
|
209595
208516
|
}
|
|
209596
|
-
|
|
208517
|
+
coerceRtlRegex.lastIndex = -1;
|
|
209597
208518
|
}
|
|
209598
208519
|
if (match === null) {
|
|
209599
208520
|
return null;
|
|
209600
208521
|
}
|
|
209601
|
-
|
|
208522
|
+
const major2 = match[2];
|
|
208523
|
+
const minor = match[3] || "0";
|
|
208524
|
+
const patch = match[4] || "0";
|
|
208525
|
+
const prerelease = options.includePrerelease && match[5] ? `-${match[5]}` : "";
|
|
208526
|
+
const build = options.includePrerelease && match[6] ? `+${match[6]}` : "";
|
|
208527
|
+
return parse2(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
|
|
209602
208528
|
};
|
|
209603
208529
|
module2.exports = coerce;
|
|
209604
208530
|
}
|
|
209605
208531
|
});
|
|
209606
208532
|
|
|
209607
|
-
// ../../node_modules
|
|
209608
|
-
var require_range3 = __commonJS({
|
|
209609
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/classes/range.js"(exports2, module2) {
|
|
209610
|
-
var Range = class _Range {
|
|
209611
|
-
constructor(range2, options) {
|
|
209612
|
-
options = parseOptions(options);
|
|
209613
|
-
if (range2 instanceof _Range) {
|
|
209614
|
-
if (range2.loose === !!options.loose && range2.includePrerelease === !!options.includePrerelease) {
|
|
209615
|
-
return range2;
|
|
209616
|
-
} else {
|
|
209617
|
-
return new _Range(range2.raw, options);
|
|
209618
|
-
}
|
|
209619
|
-
}
|
|
209620
|
-
if (range2 instanceof Comparator) {
|
|
209621
|
-
this.raw = range2.value;
|
|
209622
|
-
this.set = [[range2]];
|
|
209623
|
-
this.format();
|
|
209624
|
-
return this;
|
|
209625
|
-
}
|
|
209626
|
-
this.options = options;
|
|
209627
|
-
this.loose = !!options.loose;
|
|
209628
|
-
this.includePrerelease = !!options.includePrerelease;
|
|
209629
|
-
this.raw = range2.trim().split(/\s+/).join(" ");
|
|
209630
|
-
this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c) => c.length);
|
|
209631
|
-
if (!this.set.length) {
|
|
209632
|
-
throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
|
|
209633
|
-
}
|
|
209634
|
-
if (this.set.length > 1) {
|
|
209635
|
-
const first = this.set[0];
|
|
209636
|
-
this.set = this.set.filter((c) => !isNullSet(c[0]));
|
|
209637
|
-
if (this.set.length === 0) {
|
|
209638
|
-
this.set = [first];
|
|
209639
|
-
} else if (this.set.length > 1) {
|
|
209640
|
-
for (const c of this.set) {
|
|
209641
|
-
if (c.length === 1 && isAny(c[0])) {
|
|
209642
|
-
this.set = [c];
|
|
209643
|
-
break;
|
|
209644
|
-
}
|
|
209645
|
-
}
|
|
209646
|
-
}
|
|
209647
|
-
}
|
|
209648
|
-
this.format();
|
|
209649
|
-
}
|
|
209650
|
-
format() {
|
|
209651
|
-
this.range = this.set.map((comps) => comps.join(" ").trim()).join("||").trim();
|
|
209652
|
-
return this.range;
|
|
209653
|
-
}
|
|
209654
|
-
toString() {
|
|
209655
|
-
return this.range;
|
|
209656
|
-
}
|
|
209657
|
-
parseRange(range2) {
|
|
209658
|
-
const memoOpts = (this.options.includePrerelease && FLAG_INCLUDE_PRERELEASE) | (this.options.loose && FLAG_LOOSE);
|
|
209659
|
-
const memoKey = memoOpts + ":" + range2;
|
|
209660
|
-
const cached = cache.get(memoKey);
|
|
209661
|
-
if (cached) {
|
|
209662
|
-
return cached;
|
|
209663
|
-
}
|
|
209664
|
-
const loose = this.options.loose;
|
|
209665
|
-
const hr = loose ? re[t.HYPHENRANGELOOSE] : re[t.HYPHENRANGE];
|
|
209666
|
-
range2 = range2.replace(hr, hyphenReplace(this.options.includePrerelease));
|
|
209667
|
-
debug("hyphen replace", range2);
|
|
209668
|
-
range2 = range2.replace(re[t.COMPARATORTRIM], comparatorTrimReplace);
|
|
209669
|
-
debug("comparator trim", range2);
|
|
209670
|
-
range2 = range2.replace(re[t.TILDETRIM], tildeTrimReplace);
|
|
209671
|
-
debug("tilde trim", range2);
|
|
209672
|
-
range2 = range2.replace(re[t.CARETTRIM], caretTrimReplace);
|
|
209673
|
-
debug("caret trim", range2);
|
|
209674
|
-
let rangeList = range2.split(" ").map((comp) => parseComparator(comp, this.options)).join(" ").split(/\s+/).map((comp) => replaceGTE0(comp, this.options));
|
|
209675
|
-
if (loose) {
|
|
209676
|
-
rangeList = rangeList.filter((comp) => {
|
|
209677
|
-
debug("loose invalid filter", comp, this.options);
|
|
209678
|
-
return !!comp.match(re[t.COMPARATORLOOSE]);
|
|
209679
|
-
});
|
|
209680
|
-
}
|
|
209681
|
-
debug("range list", rangeList);
|
|
209682
|
-
const rangeMap = /* @__PURE__ */ new Map();
|
|
209683
|
-
const comparators = rangeList.map((comp) => new Comparator(comp, this.options));
|
|
209684
|
-
for (const comp of comparators) {
|
|
209685
|
-
if (isNullSet(comp)) {
|
|
209686
|
-
return [comp];
|
|
209687
|
-
}
|
|
209688
|
-
rangeMap.set(comp.value, comp);
|
|
209689
|
-
}
|
|
209690
|
-
if (rangeMap.size > 1 && rangeMap.has("")) {
|
|
209691
|
-
rangeMap.delete("");
|
|
209692
|
-
}
|
|
209693
|
-
const result = [...rangeMap.values()];
|
|
209694
|
-
cache.set(memoKey, result);
|
|
209695
|
-
return result;
|
|
209696
|
-
}
|
|
209697
|
-
intersects(range2, options) {
|
|
209698
|
-
if (!(range2 instanceof _Range)) {
|
|
209699
|
-
throw new TypeError("a Range is required");
|
|
209700
|
-
}
|
|
209701
|
-
return this.set.some((thisComparators) => {
|
|
209702
|
-
return isSatisfiable(thisComparators, options) && range2.set.some((rangeComparators) => {
|
|
209703
|
-
return isSatisfiable(rangeComparators, options) && thisComparators.every((thisComparator) => {
|
|
209704
|
-
return rangeComparators.every((rangeComparator) => {
|
|
209705
|
-
return thisComparator.intersects(rangeComparator, options);
|
|
209706
|
-
});
|
|
209707
|
-
});
|
|
209708
|
-
});
|
|
209709
|
-
});
|
|
209710
|
-
}
|
|
209711
|
-
// if ANY of the sets match ALL of its comparators, then pass
|
|
209712
|
-
test(version4) {
|
|
209713
|
-
if (!version4) {
|
|
209714
|
-
return false;
|
|
209715
|
-
}
|
|
209716
|
-
if (typeof version4 === "string") {
|
|
209717
|
-
try {
|
|
209718
|
-
version4 = new SemVer(version4, this.options);
|
|
209719
|
-
} catch (er) {
|
|
209720
|
-
return false;
|
|
209721
|
-
}
|
|
209722
|
-
}
|
|
209723
|
-
for (let i = 0; i < this.set.length; i++) {
|
|
209724
|
-
if (testSet(this.set[i], version4, this.options)) {
|
|
209725
|
-
return true;
|
|
209726
|
-
}
|
|
209727
|
-
}
|
|
209728
|
-
return false;
|
|
209729
|
-
}
|
|
209730
|
-
};
|
|
209731
|
-
module2.exports = Range;
|
|
209732
|
-
var LRU = require_lru_cache();
|
|
209733
|
-
var cache = new LRU({ max: 1e3 });
|
|
209734
|
-
var parseOptions = require_parse_options3();
|
|
209735
|
-
var Comparator = require_comparator3();
|
|
209736
|
-
var debug = require_debug4();
|
|
209737
|
-
var SemVer = require_semver3();
|
|
209738
|
-
var {
|
|
209739
|
-
safeRe: re,
|
|
209740
|
-
t,
|
|
209741
|
-
comparatorTrimReplace,
|
|
209742
|
-
tildeTrimReplace,
|
|
209743
|
-
caretTrimReplace
|
|
209744
|
-
} = require_re3();
|
|
209745
|
-
var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants12();
|
|
209746
|
-
var isNullSet = (c) => c.value === "<0.0.0-0";
|
|
209747
|
-
var isAny = (c) => c.value === "";
|
|
209748
|
-
var isSatisfiable = (comparators, options) => {
|
|
209749
|
-
let result = true;
|
|
209750
|
-
const remainingComparators = comparators.slice();
|
|
209751
|
-
let testComparator = remainingComparators.pop();
|
|
209752
|
-
while (result && remainingComparators.length) {
|
|
209753
|
-
result = remainingComparators.every((otherComparator) => {
|
|
209754
|
-
return testComparator.intersects(otherComparator, options);
|
|
209755
|
-
});
|
|
209756
|
-
testComparator = remainingComparators.pop();
|
|
209757
|
-
}
|
|
209758
|
-
return result;
|
|
209759
|
-
};
|
|
209760
|
-
var parseComparator = (comp, options) => {
|
|
209761
|
-
debug("comp", comp, options);
|
|
209762
|
-
comp = replaceCarets(comp, options);
|
|
209763
|
-
debug("caret", comp);
|
|
209764
|
-
comp = replaceTildes(comp, options);
|
|
209765
|
-
debug("tildes", comp);
|
|
209766
|
-
comp = replaceXRanges(comp, options);
|
|
209767
|
-
debug("xrange", comp);
|
|
209768
|
-
comp = replaceStars(comp, options);
|
|
209769
|
-
debug("stars", comp);
|
|
209770
|
-
return comp;
|
|
209771
|
-
};
|
|
209772
|
-
var isX = (id3) => !id3 || id3.toLowerCase() === "x" || id3 === "*";
|
|
209773
|
-
var replaceTildes = (comp, options) => {
|
|
209774
|
-
return comp.trim().split(/\s+/).map((c) => replaceTilde(c, options)).join(" ");
|
|
209775
|
-
};
|
|
209776
|
-
var replaceTilde = (comp, options) => {
|
|
209777
|
-
const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
|
|
209778
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
209779
|
-
debug("tilde", comp, _, M, m, p, pr);
|
|
209780
|
-
let ret;
|
|
209781
|
-
if (isX(M)) {
|
|
209782
|
-
ret = "";
|
|
209783
|
-
} else if (isX(m)) {
|
|
209784
|
-
ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
|
|
209785
|
-
} else if (isX(p)) {
|
|
209786
|
-
ret = `>=${M}.${m}.0 <${M}.${+m + 1}.0-0`;
|
|
209787
|
-
} else if (pr) {
|
|
209788
|
-
debug("replaceTilde pr", pr);
|
|
209789
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
209790
|
-
} else {
|
|
209791
|
-
ret = `>=${M}.${m}.${p} <${M}.${+m + 1}.0-0`;
|
|
209792
|
-
}
|
|
209793
|
-
debug("tilde return", ret);
|
|
209794
|
-
return ret;
|
|
209795
|
-
});
|
|
209796
|
-
};
|
|
209797
|
-
var replaceCarets = (comp, options) => {
|
|
209798
|
-
return comp.trim().split(/\s+/).map((c) => replaceCaret(c, options)).join(" ");
|
|
209799
|
-
};
|
|
209800
|
-
var replaceCaret = (comp, options) => {
|
|
209801
|
-
debug("caret", comp, options);
|
|
209802
|
-
const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
|
|
209803
|
-
const z = options.includePrerelease ? "-0" : "";
|
|
209804
|
-
return comp.replace(r, (_, M, m, p, pr) => {
|
|
209805
|
-
debug("caret", comp, _, M, m, p, pr);
|
|
209806
|
-
let ret;
|
|
209807
|
-
if (isX(M)) {
|
|
209808
|
-
ret = "";
|
|
209809
|
-
} else if (isX(m)) {
|
|
209810
|
-
ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
|
|
209811
|
-
} else if (isX(p)) {
|
|
209812
|
-
if (M === "0") {
|
|
209813
|
-
ret = `>=${M}.${m}.0${z} <${M}.${+m + 1}.0-0`;
|
|
209814
|
-
} else {
|
|
209815
|
-
ret = `>=${M}.${m}.0${z} <${+M + 1}.0.0-0`;
|
|
209816
|
-
}
|
|
209817
|
-
} else if (pr) {
|
|
209818
|
-
debug("replaceCaret pr", pr);
|
|
209819
|
-
if (M === "0") {
|
|
209820
|
-
if (m === "0") {
|
|
209821
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${m}.${+p + 1}-0`;
|
|
209822
|
-
} else {
|
|
209823
|
-
ret = `>=${M}.${m}.${p}-${pr} <${M}.${+m + 1}.0-0`;
|
|
209824
|
-
}
|
|
209825
|
-
} else {
|
|
209826
|
-
ret = `>=${M}.${m}.${p}-${pr} <${+M + 1}.0.0-0`;
|
|
209827
|
-
}
|
|
209828
|
-
} else {
|
|
209829
|
-
debug("no pr");
|
|
209830
|
-
if (M === "0") {
|
|
209831
|
-
if (m === "0") {
|
|
209832
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${m}.${+p + 1}-0`;
|
|
209833
|
-
} else {
|
|
209834
|
-
ret = `>=${M}.${m}.${p}${z} <${M}.${+m + 1}.0-0`;
|
|
209835
|
-
}
|
|
209836
|
-
} else {
|
|
209837
|
-
ret = `>=${M}.${m}.${p} <${+M + 1}.0.0-0`;
|
|
209838
|
-
}
|
|
209839
|
-
}
|
|
209840
|
-
debug("caret return", ret);
|
|
209841
|
-
return ret;
|
|
209842
|
-
});
|
|
209843
|
-
};
|
|
209844
|
-
var replaceXRanges = (comp, options) => {
|
|
209845
|
-
debug("replaceXRanges", comp, options);
|
|
209846
|
-
return comp.split(/\s+/).map((c) => replaceXRange(c, options)).join(" ");
|
|
209847
|
-
};
|
|
209848
|
-
var replaceXRange = (comp, options) => {
|
|
209849
|
-
comp = comp.trim();
|
|
209850
|
-
const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
|
|
209851
|
-
return comp.replace(r, (ret, gtlt, M, m, p, pr) => {
|
|
209852
|
-
debug("xRange", comp, ret, gtlt, M, m, p, pr);
|
|
209853
|
-
const xM = isX(M);
|
|
209854
|
-
const xm = xM || isX(m);
|
|
209855
|
-
const xp = xm || isX(p);
|
|
209856
|
-
const anyX = xp;
|
|
209857
|
-
if (gtlt === "=" && anyX) {
|
|
209858
|
-
gtlt = "";
|
|
209859
|
-
}
|
|
209860
|
-
pr = options.includePrerelease ? "-0" : "";
|
|
209861
|
-
if (xM) {
|
|
209862
|
-
if (gtlt === ">" || gtlt === "<") {
|
|
209863
|
-
ret = "<0.0.0-0";
|
|
209864
|
-
} else {
|
|
209865
|
-
ret = "*";
|
|
209866
|
-
}
|
|
209867
|
-
} else if (gtlt && anyX) {
|
|
209868
|
-
if (xm) {
|
|
209869
|
-
m = 0;
|
|
209870
|
-
}
|
|
209871
|
-
p = 0;
|
|
209872
|
-
if (gtlt === ">") {
|
|
209873
|
-
gtlt = ">=";
|
|
209874
|
-
if (xm) {
|
|
209875
|
-
M = +M + 1;
|
|
209876
|
-
m = 0;
|
|
209877
|
-
p = 0;
|
|
209878
|
-
} else {
|
|
209879
|
-
m = +m + 1;
|
|
209880
|
-
p = 0;
|
|
209881
|
-
}
|
|
209882
|
-
} else if (gtlt === "<=") {
|
|
209883
|
-
gtlt = "<";
|
|
209884
|
-
if (xm) {
|
|
209885
|
-
M = +M + 1;
|
|
209886
|
-
} else {
|
|
209887
|
-
m = +m + 1;
|
|
209888
|
-
}
|
|
209889
|
-
}
|
|
209890
|
-
if (gtlt === "<") {
|
|
209891
|
-
pr = "-0";
|
|
209892
|
-
}
|
|
209893
|
-
ret = `${gtlt + M}.${m}.${p}${pr}`;
|
|
209894
|
-
} else if (xm) {
|
|
209895
|
-
ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
|
|
209896
|
-
} else if (xp) {
|
|
209897
|
-
ret = `>=${M}.${m}.0${pr} <${M}.${+m + 1}.0-0`;
|
|
209898
|
-
}
|
|
209899
|
-
debug("xRange return", ret);
|
|
209900
|
-
return ret;
|
|
209901
|
-
});
|
|
209902
|
-
};
|
|
209903
|
-
var replaceStars = (comp, options) => {
|
|
209904
|
-
debug("replaceStars", comp, options);
|
|
209905
|
-
return comp.trim().replace(re[t.STAR], "");
|
|
209906
|
-
};
|
|
209907
|
-
var replaceGTE0 = (comp, options) => {
|
|
209908
|
-
debug("replaceGTE0", comp, options);
|
|
209909
|
-
return comp.trim().replace(re[options.includePrerelease ? t.GTE0PRE : t.GTE0], "");
|
|
209910
|
-
};
|
|
209911
|
-
var hyphenReplace = (incPr) => ($0, from, fM, fm, fp, fpr, fb, to, tM, tm, tp, tpr, tb) => {
|
|
209912
|
-
if (isX(fM)) {
|
|
209913
|
-
from = "";
|
|
209914
|
-
} else if (isX(fm)) {
|
|
209915
|
-
from = `>=${fM}.0.0${incPr ? "-0" : ""}`;
|
|
209916
|
-
} else if (isX(fp)) {
|
|
209917
|
-
from = `>=${fM}.${fm}.0${incPr ? "-0" : ""}`;
|
|
209918
|
-
} else if (fpr) {
|
|
209919
|
-
from = `>=${from}`;
|
|
209920
|
-
} else {
|
|
209921
|
-
from = `>=${from}${incPr ? "-0" : ""}`;
|
|
209922
|
-
}
|
|
209923
|
-
if (isX(tM)) {
|
|
209924
|
-
to = "";
|
|
209925
|
-
} else if (isX(tm)) {
|
|
209926
|
-
to = `<${+tM + 1}.0.0-0`;
|
|
209927
|
-
} else if (isX(tp)) {
|
|
209928
|
-
to = `<${tM}.${+tm + 1}.0-0`;
|
|
209929
|
-
} else if (tpr) {
|
|
209930
|
-
to = `<=${tM}.${tm}.${tp}-${tpr}`;
|
|
209931
|
-
} else if (incPr) {
|
|
209932
|
-
to = `<${tM}.${tm}.${+tp + 1}-0`;
|
|
209933
|
-
} else {
|
|
209934
|
-
to = `<=${to}`;
|
|
209935
|
-
}
|
|
209936
|
-
return `${from} ${to}`.trim();
|
|
209937
|
-
};
|
|
209938
|
-
var testSet = (set, version4, options) => {
|
|
209939
|
-
for (let i = 0; i < set.length; i++) {
|
|
209940
|
-
if (!set[i].test(version4)) {
|
|
209941
|
-
return false;
|
|
209942
|
-
}
|
|
209943
|
-
}
|
|
209944
|
-
if (version4.prerelease.length && !options.includePrerelease) {
|
|
209945
|
-
for (let i = 0; i < set.length; i++) {
|
|
209946
|
-
debug(set[i].semver);
|
|
209947
|
-
if (set[i].semver === Comparator.ANY) {
|
|
209948
|
-
continue;
|
|
209949
|
-
}
|
|
209950
|
-
if (set[i].semver.prerelease.length > 0) {
|
|
209951
|
-
const allowed = set[i].semver;
|
|
209952
|
-
if (allowed.major === version4.major && allowed.minor === version4.minor && allowed.patch === version4.patch) {
|
|
209953
|
-
return true;
|
|
209954
|
-
}
|
|
209955
|
-
}
|
|
209956
|
-
}
|
|
209957
|
-
return false;
|
|
209958
|
-
}
|
|
209959
|
-
return true;
|
|
209960
|
-
};
|
|
209961
|
-
}
|
|
209962
|
-
});
|
|
209963
|
-
|
|
209964
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/classes/comparator.js
|
|
209965
|
-
var require_comparator3 = __commonJS({
|
|
209966
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/classes/comparator.js"(exports2, module2) {
|
|
209967
|
-
var ANY = Symbol("SemVer ANY");
|
|
209968
|
-
var Comparator = class _Comparator {
|
|
209969
|
-
static get ANY() {
|
|
209970
|
-
return ANY;
|
|
209971
|
-
}
|
|
209972
|
-
constructor(comp, options) {
|
|
209973
|
-
options = parseOptions(options);
|
|
209974
|
-
if (comp instanceof _Comparator) {
|
|
209975
|
-
if (comp.loose === !!options.loose) {
|
|
209976
|
-
return comp;
|
|
209977
|
-
} else {
|
|
209978
|
-
comp = comp.value;
|
|
209979
|
-
}
|
|
209980
|
-
}
|
|
209981
|
-
comp = comp.trim().split(/\s+/).join(" ");
|
|
209982
|
-
debug("comparator", comp, options);
|
|
209983
|
-
this.options = options;
|
|
209984
|
-
this.loose = !!options.loose;
|
|
209985
|
-
this.parse(comp);
|
|
209986
|
-
if (this.semver === ANY) {
|
|
209987
|
-
this.value = "";
|
|
209988
|
-
} else {
|
|
209989
|
-
this.value = this.operator + this.semver.version;
|
|
209990
|
-
}
|
|
209991
|
-
debug("comp", this);
|
|
209992
|
-
}
|
|
209993
|
-
parse(comp) {
|
|
209994
|
-
const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
|
|
209995
|
-
const m = comp.match(r);
|
|
209996
|
-
if (!m) {
|
|
209997
|
-
throw new TypeError(`Invalid comparator: ${comp}`);
|
|
209998
|
-
}
|
|
209999
|
-
this.operator = m[1] !== void 0 ? m[1] : "";
|
|
210000
|
-
if (this.operator === "=") {
|
|
210001
|
-
this.operator = "";
|
|
210002
|
-
}
|
|
210003
|
-
if (!m[2]) {
|
|
210004
|
-
this.semver = ANY;
|
|
210005
|
-
} else {
|
|
210006
|
-
this.semver = new SemVer(m[2], this.options.loose);
|
|
210007
|
-
}
|
|
210008
|
-
}
|
|
210009
|
-
toString() {
|
|
210010
|
-
return this.value;
|
|
210011
|
-
}
|
|
210012
|
-
test(version4) {
|
|
210013
|
-
debug("Comparator.test", version4, this.options.loose);
|
|
210014
|
-
if (this.semver === ANY || version4 === ANY) {
|
|
210015
|
-
return true;
|
|
210016
|
-
}
|
|
210017
|
-
if (typeof version4 === "string") {
|
|
210018
|
-
try {
|
|
210019
|
-
version4 = new SemVer(version4, this.options);
|
|
210020
|
-
} catch (er) {
|
|
210021
|
-
return false;
|
|
210022
|
-
}
|
|
210023
|
-
}
|
|
210024
|
-
return cmp(version4, this.operator, this.semver, this.options);
|
|
210025
|
-
}
|
|
210026
|
-
intersects(comp, options) {
|
|
210027
|
-
if (!(comp instanceof _Comparator)) {
|
|
210028
|
-
throw new TypeError("a Comparator is required");
|
|
210029
|
-
}
|
|
210030
|
-
if (this.operator === "") {
|
|
210031
|
-
if (this.value === "") {
|
|
210032
|
-
return true;
|
|
210033
|
-
}
|
|
210034
|
-
return new Range(comp.value, options).test(this.value);
|
|
210035
|
-
} else if (comp.operator === "") {
|
|
210036
|
-
if (comp.value === "") {
|
|
210037
|
-
return true;
|
|
210038
|
-
}
|
|
210039
|
-
return new Range(this.value, options).test(comp.semver);
|
|
210040
|
-
}
|
|
210041
|
-
options = parseOptions(options);
|
|
210042
|
-
if (options.includePrerelease && (this.value === "<0.0.0-0" || comp.value === "<0.0.0-0")) {
|
|
210043
|
-
return false;
|
|
210044
|
-
}
|
|
210045
|
-
if (!options.includePrerelease && (this.value.startsWith("<0.0.0") || comp.value.startsWith("<0.0.0"))) {
|
|
210046
|
-
return false;
|
|
210047
|
-
}
|
|
210048
|
-
if (this.operator.startsWith(">") && comp.operator.startsWith(">")) {
|
|
210049
|
-
return true;
|
|
210050
|
-
}
|
|
210051
|
-
if (this.operator.startsWith("<") && comp.operator.startsWith("<")) {
|
|
210052
|
-
return true;
|
|
210053
|
-
}
|
|
210054
|
-
if (this.semver.version === comp.semver.version && this.operator.includes("=") && comp.operator.includes("=")) {
|
|
210055
|
-
return true;
|
|
210056
|
-
}
|
|
210057
|
-
if (cmp(this.semver, "<", comp.semver, options) && this.operator.startsWith(">") && comp.operator.startsWith("<")) {
|
|
210058
|
-
return true;
|
|
210059
|
-
}
|
|
210060
|
-
if (cmp(this.semver, ">", comp.semver, options) && this.operator.startsWith("<") && comp.operator.startsWith(">")) {
|
|
210061
|
-
return true;
|
|
210062
|
-
}
|
|
210063
|
-
return false;
|
|
210064
|
-
}
|
|
210065
|
-
};
|
|
210066
|
-
module2.exports = Comparator;
|
|
210067
|
-
var parseOptions = require_parse_options3();
|
|
210068
|
-
var { safeRe: re, t } = require_re3();
|
|
210069
|
-
var cmp = require_cmp3();
|
|
210070
|
-
var debug = require_debug4();
|
|
210071
|
-
var SemVer = require_semver3();
|
|
210072
|
-
var Range = require_range3();
|
|
210073
|
-
}
|
|
210074
|
-
});
|
|
210075
|
-
|
|
210076
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/satisfies.js
|
|
210077
|
-
var require_satisfies3 = __commonJS({
|
|
210078
|
-
"../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/functions/satisfies.js"(exports2, module2) {
|
|
210079
|
-
var Range = require_range3();
|
|
210080
|
-
var satisfies = (version4, range2, options) => {
|
|
210081
|
-
try {
|
|
210082
|
-
range2 = new Range(range2, options);
|
|
210083
|
-
} catch (er) {
|
|
210084
|
-
return false;
|
|
210085
|
-
}
|
|
210086
|
-
return range2.test(version4);
|
|
210087
|
-
};
|
|
210088
|
-
module2.exports = satisfies;
|
|
210089
|
-
}
|
|
210090
|
-
});
|
|
210091
|
-
|
|
210092
|
-
// ../../node_modules/@ethereum-sourcify/lib-sourcify/node_modules/semver/ranges/to-comparators.js
|
|
208533
|
+
// ../../node_modules/semver/ranges/to-comparators.js
|
|
210093
208534
|
var require_to_comparators = __commonJS({
|
|
210094
|
-
"../../node_modules
|
|
210095
|
-
var Range =
|
|
208535
|
+
"../../node_modules/semver/ranges/to-comparators.js"(exports2, module2) {
|
|
208536
|
+
var Range = require_range();
|
|
210096
208537
|
var toComparators = (range2, options) => new Range(range2, options).set.map((comp) => comp.map((c) => c.value).join(" ").trim().split(" "));
|
|
210097
208538
|
module2.exports = toComparators;
|
|
210098
208539
|
}
|
|
210099
208540
|
});
|
|
210100
208541
|
|
|
210101
|
-
// ../../node_modules
|
|
208542
|
+
// ../../node_modules/semver/ranges/max-satisfying.js
|
|
210102
208543
|
var require_max_satisfying = __commonJS({
|
|
210103
|
-
"../../node_modules
|
|
210104
|
-
var SemVer =
|
|
210105
|
-
var Range =
|
|
208544
|
+
"../../node_modules/semver/ranges/max-satisfying.js"(exports2, module2) {
|
|
208545
|
+
var SemVer = require_semver();
|
|
208546
|
+
var Range = require_range();
|
|
210106
208547
|
var maxSatisfying = (versions, range2, options) => {
|
|
210107
208548
|
let max = null;
|
|
210108
208549
|
let maxSV = null;
|
|
@@ -210126,11 +208567,11 @@ var require_max_satisfying = __commonJS({
|
|
|
210126
208567
|
}
|
|
210127
208568
|
});
|
|
210128
208569
|
|
|
210129
|
-
// ../../node_modules
|
|
208570
|
+
// ../../node_modules/semver/ranges/min-satisfying.js
|
|
210130
208571
|
var require_min_satisfying = __commonJS({
|
|
210131
|
-
"../../node_modules
|
|
210132
|
-
var SemVer =
|
|
210133
|
-
var Range =
|
|
208572
|
+
"../../node_modules/semver/ranges/min-satisfying.js"(exports2, module2) {
|
|
208573
|
+
var SemVer = require_semver();
|
|
208574
|
+
var Range = require_range();
|
|
210134
208575
|
var minSatisfying = (versions, range2, options) => {
|
|
210135
208576
|
let min = null;
|
|
210136
208577
|
let minSV = null;
|
|
@@ -210154,12 +208595,12 @@ var require_min_satisfying = __commonJS({
|
|
|
210154
208595
|
}
|
|
210155
208596
|
});
|
|
210156
208597
|
|
|
210157
|
-
// ../../node_modules
|
|
208598
|
+
// ../../node_modules/semver/ranges/min-version.js
|
|
210158
208599
|
var require_min_version = __commonJS({
|
|
210159
|
-
"../../node_modules
|
|
210160
|
-
var SemVer =
|
|
210161
|
-
var Range =
|
|
210162
|
-
var gt =
|
|
208600
|
+
"../../node_modules/semver/ranges/min-version.js"(exports2, module2) {
|
|
208601
|
+
var SemVer = require_semver();
|
|
208602
|
+
var Range = require_range();
|
|
208603
|
+
var gt = require_gt();
|
|
210163
208604
|
var minVersion = (range2, loose) => {
|
|
210164
208605
|
range2 = new Range(range2, loose);
|
|
210165
208606
|
let minver = new SemVer("0.0.0");
|
|
@@ -210210,10 +208651,10 @@ var require_min_version = __commonJS({
|
|
|
210210
208651
|
}
|
|
210211
208652
|
});
|
|
210212
208653
|
|
|
210213
|
-
// ../../node_modules
|
|
208654
|
+
// ../../node_modules/semver/ranges/valid.js
|
|
210214
208655
|
var require_valid2 = __commonJS({
|
|
210215
|
-
"../../node_modules
|
|
210216
|
-
var Range =
|
|
208656
|
+
"../../node_modules/semver/ranges/valid.js"(exports2, module2) {
|
|
208657
|
+
var Range = require_range();
|
|
210217
208658
|
var validRange = (range2, options) => {
|
|
210218
208659
|
try {
|
|
210219
208660
|
return new Range(range2, options).range || "*";
|
|
@@ -210225,18 +208666,18 @@ var require_valid2 = __commonJS({
|
|
|
210225
208666
|
}
|
|
210226
208667
|
});
|
|
210227
208668
|
|
|
210228
|
-
// ../../node_modules
|
|
208669
|
+
// ../../node_modules/semver/ranges/outside.js
|
|
210229
208670
|
var require_outside = __commonJS({
|
|
210230
|
-
"../../node_modules
|
|
210231
|
-
var SemVer =
|
|
210232
|
-
var Comparator =
|
|
208671
|
+
"../../node_modules/semver/ranges/outside.js"(exports2, module2) {
|
|
208672
|
+
var SemVer = require_semver();
|
|
208673
|
+
var Comparator = require_comparator();
|
|
210233
208674
|
var { ANY } = Comparator;
|
|
210234
|
-
var Range =
|
|
210235
|
-
var satisfies =
|
|
210236
|
-
var gt =
|
|
210237
|
-
var lt =
|
|
210238
|
-
var lte =
|
|
210239
|
-
var gte =
|
|
208675
|
+
var Range = require_range();
|
|
208676
|
+
var satisfies = require_satisfies();
|
|
208677
|
+
var gt = require_gt();
|
|
208678
|
+
var lt = require_lt();
|
|
208679
|
+
var lte = require_lte();
|
|
208680
|
+
var gte = require_gte();
|
|
210240
208681
|
var outside = (version4, range2, hilo, options) => {
|
|
210241
208682
|
version4 = new SemVer(version4, options);
|
|
210242
208683
|
range2 = new Range(range2, options);
|
|
@@ -210293,28 +208734,28 @@ var require_outside = __commonJS({
|
|
|
210293
208734
|
}
|
|
210294
208735
|
});
|
|
210295
208736
|
|
|
210296
|
-
// ../../node_modules
|
|
208737
|
+
// ../../node_modules/semver/ranges/gtr.js
|
|
210297
208738
|
var require_gtr = __commonJS({
|
|
210298
|
-
"../../node_modules
|
|
208739
|
+
"../../node_modules/semver/ranges/gtr.js"(exports2, module2) {
|
|
210299
208740
|
var outside = require_outside();
|
|
210300
208741
|
var gtr = (version4, range2, options) => outside(version4, range2, ">", options);
|
|
210301
208742
|
module2.exports = gtr;
|
|
210302
208743
|
}
|
|
210303
208744
|
});
|
|
210304
208745
|
|
|
210305
|
-
// ../../node_modules
|
|
208746
|
+
// ../../node_modules/semver/ranges/ltr.js
|
|
210306
208747
|
var require_ltr = __commonJS({
|
|
210307
|
-
"../../node_modules
|
|
208748
|
+
"../../node_modules/semver/ranges/ltr.js"(exports2, module2) {
|
|
210308
208749
|
var outside = require_outside();
|
|
210309
208750
|
var ltr = (version4, range2, options) => outside(version4, range2, "<", options);
|
|
210310
208751
|
module2.exports = ltr;
|
|
210311
208752
|
}
|
|
210312
208753
|
});
|
|
210313
208754
|
|
|
210314
|
-
// ../../node_modules
|
|
208755
|
+
// ../../node_modules/semver/ranges/intersects.js
|
|
210315
208756
|
var require_intersects = __commonJS({
|
|
210316
|
-
"../../node_modules
|
|
210317
|
-
var Range =
|
|
208757
|
+
"../../node_modules/semver/ranges/intersects.js"(exports2, module2) {
|
|
208758
|
+
var Range = require_range();
|
|
210318
208759
|
var intersects = (r1, r2, options) => {
|
|
210319
208760
|
r1 = new Range(r1, options);
|
|
210320
208761
|
r2 = new Range(r2, options);
|
|
@@ -210324,11 +208765,11 @@ var require_intersects = __commonJS({
|
|
|
210324
208765
|
}
|
|
210325
208766
|
});
|
|
210326
208767
|
|
|
210327
|
-
// ../../node_modules
|
|
208768
|
+
// ../../node_modules/semver/ranges/simplify.js
|
|
210328
208769
|
var require_simplify = __commonJS({
|
|
210329
|
-
"../../node_modules
|
|
210330
|
-
var satisfies =
|
|
210331
|
-
var compare =
|
|
208770
|
+
"../../node_modules/semver/ranges/simplify.js"(exports2, module2) {
|
|
208771
|
+
var satisfies = require_satisfies();
|
|
208772
|
+
var compare = require_compare();
|
|
210332
208773
|
module2.exports = (versions, range2, options) => {
|
|
210333
208774
|
const set = [];
|
|
210334
208775
|
let first = null;
|
|
@@ -210373,14 +208814,14 @@ var require_simplify = __commonJS({
|
|
|
210373
208814
|
}
|
|
210374
208815
|
});
|
|
210375
208816
|
|
|
210376
|
-
// ../../node_modules
|
|
208817
|
+
// ../../node_modules/semver/ranges/subset.js
|
|
210377
208818
|
var require_subset = __commonJS({
|
|
210378
|
-
"../../node_modules
|
|
210379
|
-
var Range =
|
|
210380
|
-
var Comparator =
|
|
208819
|
+
"../../node_modules/semver/ranges/subset.js"(exports2, module2) {
|
|
208820
|
+
var Range = require_range();
|
|
208821
|
+
var Comparator = require_comparator();
|
|
210381
208822
|
var { ANY } = Comparator;
|
|
210382
|
-
var satisfies =
|
|
210383
|
-
var compare =
|
|
208823
|
+
var satisfies = require_satisfies();
|
|
208824
|
+
var compare = require_compare();
|
|
210384
208825
|
var subset = (sub, dom, options = {}) => {
|
|
210385
208826
|
if (sub === dom) {
|
|
210386
208827
|
return true;
|
|
@@ -210535,13 +208976,13 @@ var require_subset = __commonJS({
|
|
|
210535
208976
|
}
|
|
210536
208977
|
});
|
|
210537
208978
|
|
|
210538
|
-
// ../../node_modules
|
|
210539
|
-
var
|
|
210540
|
-
"../../node_modules
|
|
210541
|
-
var internalRe =
|
|
210542
|
-
var constants =
|
|
210543
|
-
var SemVer =
|
|
210544
|
-
var identifiers =
|
|
208979
|
+
// ../../node_modules/semver/index.js
|
|
208980
|
+
var require_semver2 = __commonJS({
|
|
208981
|
+
"../../node_modules/semver/index.js"(exports2, module2) {
|
|
208982
|
+
var internalRe = require_re();
|
|
208983
|
+
var constants = require_constants7();
|
|
208984
|
+
var SemVer = require_semver();
|
|
208985
|
+
var identifiers = require_identifiers();
|
|
210545
208986
|
var parse2 = require_parse();
|
|
210546
208987
|
var valid = require_valid();
|
|
210547
208988
|
var clean = require_clean();
|
|
@@ -210551,23 +208992,23 @@ var require_semver4 = __commonJS({
|
|
|
210551
208992
|
var minor = require_minor();
|
|
210552
208993
|
var patch = require_patch();
|
|
210553
208994
|
var prerelease = require_prerelease();
|
|
210554
|
-
var compare =
|
|
208995
|
+
var compare = require_compare();
|
|
210555
208996
|
var rcompare = require_rcompare();
|
|
210556
208997
|
var compareLoose = require_compare_loose();
|
|
210557
208998
|
var compareBuild = require_compare_build();
|
|
210558
208999
|
var sort = require_sort();
|
|
210559
209000
|
var rsort = require_rsort();
|
|
210560
|
-
var gt =
|
|
210561
|
-
var lt =
|
|
210562
|
-
var eq2 =
|
|
210563
|
-
var neq =
|
|
210564
|
-
var gte =
|
|
210565
|
-
var lte =
|
|
210566
|
-
var cmp =
|
|
209001
|
+
var gt = require_gt();
|
|
209002
|
+
var lt = require_lt();
|
|
209003
|
+
var eq2 = require_eq();
|
|
209004
|
+
var neq = require_neq();
|
|
209005
|
+
var gte = require_gte();
|
|
209006
|
+
var lte = require_lte();
|
|
209007
|
+
var cmp = require_cmp();
|
|
210567
209008
|
var coerce = require_coerce();
|
|
210568
|
-
var Comparator =
|
|
210569
|
-
var Range =
|
|
210570
|
-
var satisfies =
|
|
209009
|
+
var Comparator = require_comparator();
|
|
209010
|
+
var Range = require_range();
|
|
209011
|
+
var satisfies = require_satisfies();
|
|
210571
209012
|
var toComparators = require_to_comparators();
|
|
210572
209013
|
var maxSatisfying = require_max_satisfying();
|
|
210573
209014
|
var minSatisfying = require_min_satisfying();
|
|
@@ -211639,7 +210080,7 @@ var require_translate = __commonJS({
|
|
|
211639
210080
|
});
|
|
211640
210081
|
|
|
211641
210082
|
// ../../node_modules/solc/node_modules/semver/semver.js
|
|
211642
|
-
var
|
|
210083
|
+
var require_semver3 = __commonJS({
|
|
211643
210084
|
"../../node_modules/solc/node_modules/semver/semver.js"(exports2, module2) {
|
|
211644
210085
|
exports2 = module2.exports = SemVer;
|
|
211645
210086
|
var debug;
|
|
@@ -212750,7 +211191,7 @@ var require_core = __commonJS({
|
|
|
212750
211191
|
exports2.setupCore = void 0;
|
|
212751
211192
|
var helpers_1 = require_helpers4();
|
|
212752
211193
|
var translate_1 = __importDefault2(require_translate());
|
|
212753
|
-
var semver = __importStar2(
|
|
211194
|
+
var semver = __importStar2(require_semver3());
|
|
212754
211195
|
var helpers_2 = require_helpers3();
|
|
212755
211196
|
function setupCore(solJson) {
|
|
212756
211197
|
const core = {
|
|
@@ -215802,7 +214243,7 @@ var require_solidityCompiler = __commonJS({
|
|
|
215802
214243
|
var utils_1 = require_utils24();
|
|
215803
214244
|
var http_status_codes_1 = require_cjs();
|
|
215804
214245
|
var logger_1 = require_logger();
|
|
215805
|
-
var semver_1 = __importDefault2(
|
|
214246
|
+
var semver_1 = __importDefault2(require_semver2());
|
|
215806
214247
|
var worker_threads_1 = __require("worker_threads");
|
|
215807
214248
|
var solc = require_solc();
|
|
215808
214249
|
var HOST_SOLC_REPO = " https://binaries.soliditylang.org/";
|
|
@@ -217078,7 +215519,7 @@ var require_CheckedContract = __commonJS({
|
|
|
217078
215519
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
217079
215520
|
exports2.findContractPathFromContractName = exports2.getIpfsGateway = exports2.isEmpty = exports2.getGithubUrl = exports2.performFetch = exports2.CheckedContract = void 0;
|
|
217080
215521
|
var ethers_1 = require_lib228();
|
|
217081
|
-
var semver_1 = __importDefault2(
|
|
215522
|
+
var semver_1 = __importDefault2(require_semver2());
|
|
217082
215523
|
var solidityCompiler_1 = require_solidityCompiler();
|
|
217083
215524
|
var utils_1 = require_utils24();
|
|
217084
215525
|
var validation_1 = require_validation3();
|
|
@@ -225384,7 +223825,7 @@ var require_inflate = __commonJS({
|
|
|
225384
223825
|
});
|
|
225385
223826
|
|
|
225386
223827
|
// ../../node_modules/pako/lib/zlib/constants.js
|
|
225387
|
-
var
|
|
223828
|
+
var require_constants11 = __commonJS({
|
|
225388
223829
|
"../../node_modules/pako/lib/zlib/constants.js"(exports2, module2) {
|
|
225389
223830
|
"use strict";
|
|
225390
223831
|
module2.exports = {
|
|
@@ -225457,7 +223898,7 @@ var require_inflate2 = __commonJS({
|
|
|
225457
223898
|
var zlib_inflate = require_inflate();
|
|
225458
223899
|
var utils = require_common4();
|
|
225459
223900
|
var strings = require_strings15();
|
|
225460
|
-
var c =
|
|
223901
|
+
var c = require_constants11();
|
|
225461
223902
|
var msg = require_messages();
|
|
225462
223903
|
var ZStream = require_zstream();
|
|
225463
223904
|
var GZheader = require_gzheader();
|
|
@@ -225632,7 +224073,7 @@ var require_pako = __commonJS({
|
|
|
225632
224073
|
var assign = require_common4().assign;
|
|
225633
224074
|
var deflate = require_deflate2();
|
|
225634
224075
|
var inflate = require_inflate2();
|
|
225635
|
-
var constants =
|
|
224076
|
+
var constants = require_constants11();
|
|
225636
224077
|
var pako = {};
|
|
225637
224078
|
assign(pako, deflate, inflate, constants);
|
|
225638
224079
|
module2.exports = pako;
|
|
@@ -232968,10 +231409,10 @@ var require_verification = __commonJS({
|
|
|
232968
231409
|
var ethers_1 = require_lib228();
|
|
232969
231410
|
var bytes_1 = require_lib224();
|
|
232970
231411
|
var bignumber_1 = require_lib236();
|
|
232971
|
-
var satisfies_1 = __importDefault2(
|
|
231412
|
+
var satisfies_1 = __importDefault2(require_satisfies());
|
|
232972
231413
|
var abi_1 = require_lib245();
|
|
232973
231414
|
var logger_1 = require_logger();
|
|
232974
|
-
var semver_1 =
|
|
231415
|
+
var semver_1 = require_semver2();
|
|
232975
231416
|
async function verifyDeployed(checkedContract, sourcifyChain, address, creatorTxHash, forceEmscripten = false) {
|
|
232976
231417
|
var _a, _b, _c;
|
|
232977
231418
|
const match = {
|
|
@@ -233376,7 +231817,7 @@ var require_SourcifyChain = __commonJS({
|
|
|
233376
231817
|
});
|
|
233377
231818
|
|
|
233378
231819
|
// ../../node_modules/@ethereum-sourcify/lib-sourcify/build/main/lib/types.js
|
|
233379
|
-
var
|
|
231820
|
+
var require_types16 = __commonJS({
|
|
233380
231821
|
"../../node_modules/@ethereum-sourcify/lib-sourcify/build/main/lib/types.js"(exports2) {
|
|
233381
231822
|
"use strict";
|
|
233382
231823
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
@@ -233427,7 +231868,7 @@ var require_main2 = __commonJS({
|
|
|
233427
231868
|
Object.defineProperty(exports2, "SourcifyChain", { enumerable: true, get: function() {
|
|
233428
231869
|
return __importDefault2(SourcifyChain_1).default;
|
|
233429
231870
|
} });
|
|
233430
|
-
__exportStar2(
|
|
231871
|
+
__exportStar2(require_types16(), exports2);
|
|
233431
231872
|
__exportStar2(require_solidityCompiler(), exports2);
|
|
233432
231873
|
exports2.setLibSourcifyLogger = logger_1.setLogger;
|
|
233433
231874
|
exports2.setLibSourcifyLoggerLevel = logger_1.setLevel;
|
|
@@ -234408,7 +232849,7 @@ var require_compareDesc = __commonJS({
|
|
|
234408
232849
|
});
|
|
234409
232850
|
|
|
234410
232851
|
// ../../node_modules/date-fns/constants/index.js
|
|
234411
|
-
var
|
|
232852
|
+
var require_constants12 = __commonJS({
|
|
234412
232853
|
"../../node_modules/date-fns/constants/index.js"(exports2) {
|
|
234413
232854
|
"use strict";
|
|
234414
232855
|
Object.defineProperty(exports2, "__esModule", {
|
|
@@ -234464,7 +232905,7 @@ var require_daysToWeeks = __commonJS({
|
|
|
234464
232905
|
});
|
|
234465
232906
|
exports2.default = daysToWeeks;
|
|
234466
232907
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
234467
|
-
var _index2 =
|
|
232908
|
+
var _index2 = require_constants12();
|
|
234468
232909
|
function daysToWeeks(days) {
|
|
234469
232910
|
(0, _index.default)(1, arguments);
|
|
234470
232911
|
var weeks = days / _index2.daysInWeek;
|
|
@@ -234823,7 +233264,7 @@ var require_differenceInHours = __commonJS({
|
|
|
234823
233264
|
value: true
|
|
234824
233265
|
});
|
|
234825
233266
|
exports2.default = differenceInHours;
|
|
234826
|
-
var _index =
|
|
233267
|
+
var _index = require_constants12();
|
|
234827
233268
|
var _index2 = _interopRequireDefault(require_differenceInMilliseconds());
|
|
234828
233269
|
var _index3 = _interopRequireDefault(require_requiredArgs());
|
|
234829
233270
|
var _index4 = require_roundingMethods();
|
|
@@ -234895,7 +233336,7 @@ var require_differenceInMinutes = __commonJS({
|
|
|
234895
233336
|
value: true
|
|
234896
233337
|
});
|
|
234897
233338
|
exports2.default = differenceInMinutes;
|
|
234898
|
-
var _index =
|
|
233339
|
+
var _index = require_constants12();
|
|
234899
233340
|
var _index2 = _interopRequireDefault(require_differenceInMilliseconds());
|
|
234900
233341
|
var _index3 = _interopRequireDefault(require_requiredArgs());
|
|
234901
233342
|
var _index4 = require_roundingMethods();
|
|
@@ -238974,7 +237415,7 @@ var require_hoursToMilliseconds = __commonJS({
|
|
|
238974
237415
|
});
|
|
238975
237416
|
exports2.default = hoursToMilliseconds;
|
|
238976
237417
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
238977
|
-
var _index2 =
|
|
237418
|
+
var _index2 = require_constants12();
|
|
238978
237419
|
function hoursToMilliseconds(hours) {
|
|
238979
237420
|
(0, _index.default)(1, arguments);
|
|
238980
237421
|
return Math.floor(hours * _index2.millisecondsInHour);
|
|
@@ -238993,7 +237434,7 @@ var require_hoursToMinutes = __commonJS({
|
|
|
238993
237434
|
});
|
|
238994
237435
|
exports2.default = hoursToMinutes;
|
|
238995
237436
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
238996
|
-
var _index2 =
|
|
237437
|
+
var _index2 = require_constants12();
|
|
238997
237438
|
function hoursToMinutes(hours) {
|
|
238998
237439
|
(0, _index.default)(1, arguments);
|
|
238999
237440
|
return Math.floor(hours * _index2.minutesInHour);
|
|
@@ -239012,7 +237453,7 @@ var require_hoursToSeconds = __commonJS({
|
|
|
239012
237453
|
});
|
|
239013
237454
|
exports2.default = hoursToSeconds;
|
|
239014
237455
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
239015
|
-
var _index2 =
|
|
237456
|
+
var _index2 = require_constants12();
|
|
239016
237457
|
function hoursToSeconds(hours) {
|
|
239017
237458
|
(0, _index.default)(1, arguments);
|
|
239018
237459
|
return Math.floor(hours * _index2.secondsInHour);
|
|
@@ -239114,7 +237555,7 @@ var require_intlFormatDistance = __commonJS({
|
|
|
239114
237555
|
value: true
|
|
239115
237556
|
});
|
|
239116
237557
|
exports2.default = intlFormatDistance;
|
|
239117
|
-
var _index =
|
|
237558
|
+
var _index = require_constants12();
|
|
239118
237559
|
var _index2 = _interopRequireDefault(require_differenceInCalendarDays());
|
|
239119
237560
|
var _index3 = _interopRequireDefault(require_differenceInCalendarMonths());
|
|
239120
237561
|
var _index4 = _interopRequireDefault(require_differenceInCalendarQuarters());
|
|
@@ -239856,7 +238297,7 @@ var require_EraParser = __commonJS({
|
|
|
239856
238297
|
});
|
|
239857
238298
|
|
|
239858
238299
|
// ../../node_modules/date-fns/parse/_lib/constants.js
|
|
239859
|
-
var
|
|
238300
|
+
var require_constants13 = __commonJS({
|
|
239860
238301
|
"../../node_modules/date-fns/parse/_lib/constants.js"(exports2) {
|
|
239861
238302
|
"use strict";
|
|
239862
238303
|
Object.defineProperty(exports2, "__esModule", {
|
|
@@ -239930,8 +238371,8 @@ var require_utils27 = __commonJS({
|
|
|
239930
238371
|
exports2.parseNDigitsSigned = parseNDigitsSigned;
|
|
239931
238372
|
exports2.parseNumericPattern = parseNumericPattern;
|
|
239932
238373
|
exports2.parseTimezonePattern = parseTimezonePattern;
|
|
239933
|
-
var _index =
|
|
239934
|
-
var _constants =
|
|
238374
|
+
var _index = require_constants12();
|
|
238375
|
+
var _constants = require_constants13();
|
|
239935
238376
|
function mapValue(parseFnResult, mapFn) {
|
|
239936
238377
|
if (!parseFnResult) {
|
|
239937
238378
|
return parseFnResult;
|
|
@@ -240498,7 +238939,7 @@ var require_MonthParser = __commonJS({
|
|
|
240498
238939
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
240499
238940
|
var _utils = require_utils27();
|
|
240500
238941
|
var _Parser2 = require_Parser();
|
|
240501
|
-
var _constants =
|
|
238942
|
+
var _constants = require_constants13();
|
|
240502
238943
|
var MonthParser = /* @__PURE__ */ function(_Parser) {
|
|
240503
238944
|
(0, _inherits2.default)(MonthParser2, _Parser);
|
|
240504
238945
|
var _super = (0, _createSuper2.default)(MonthParser2);
|
|
@@ -240590,7 +239031,7 @@ var require_StandAloneMonthParser = __commonJS({
|
|
|
240590
239031
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
240591
239032
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
240592
239033
|
var _Parser2 = require_Parser();
|
|
240593
|
-
var _constants =
|
|
239034
|
+
var _constants = require_constants13();
|
|
240594
239035
|
var _utils = require_utils27();
|
|
240595
239036
|
var StandAloneMonthParser = /* @__PURE__ */ function(_Parser) {
|
|
240596
239037
|
(0, _inherits2.default)(StandAloneMonthParser2, _Parser);
|
|
@@ -240708,7 +239149,7 @@ var require_LocalWeekParser = __commonJS({
|
|
|
240708
239149
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
240709
239150
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
240710
239151
|
var _Parser2 = require_Parser();
|
|
240711
|
-
var _constants =
|
|
239152
|
+
var _constants = require_constants13();
|
|
240712
239153
|
var _utils = require_utils27();
|
|
240713
239154
|
var _index = _interopRequireDefault(require_setUTCWeek());
|
|
240714
239155
|
var _index2 = _interopRequireDefault(require_startOfUTCWeek());
|
|
@@ -240798,7 +239239,7 @@ var require_ISOWeekParser = __commonJS({
|
|
|
240798
239239
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
240799
239240
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
240800
239241
|
var _Parser2 = require_Parser();
|
|
240801
|
-
var _constants =
|
|
239242
|
+
var _constants = require_constants13();
|
|
240802
239243
|
var _utils = require_utils27();
|
|
240803
239244
|
var _index = _interopRequireDefault(require_setUTCISOWeek());
|
|
240804
239245
|
var _index2 = _interopRequireDefault(require_startOfUTCISOWeek());
|
|
@@ -240864,7 +239305,7 @@ var require_DateParser = __commonJS({
|
|
|
240864
239305
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
240865
239306
|
var _utils = require_utils27();
|
|
240866
239307
|
var _Parser2 = require_Parser();
|
|
240867
|
-
var _constants =
|
|
239308
|
+
var _constants = require_constants13();
|
|
240868
239309
|
var DAYS_IN_MONTH = [31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
240869
239310
|
var DAYS_IN_MONTH_LEAP_YEAR = [31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31];
|
|
240870
239311
|
var DateParser = /* @__PURE__ */ function(_Parser) {
|
|
@@ -240938,7 +239379,7 @@ var require_DayOfYearParser = __commonJS({
|
|
|
240938
239379
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
240939
239380
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
240940
239381
|
var _Parser2 = require_Parser();
|
|
240941
|
-
var _constants =
|
|
239382
|
+
var _constants = require_constants13();
|
|
240942
239383
|
var _utils = require_utils27();
|
|
240943
239384
|
var DayOfYearParser = /* @__PURE__ */ function(_Parser) {
|
|
240944
239385
|
(0, _inherits2.default)(DayOfYearParser2, _Parser);
|
|
@@ -241727,7 +240168,7 @@ var require_Hour1to12Parser = __commonJS({
|
|
|
241727
240168
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
241728
240169
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
241729
240170
|
var _Parser2 = require_Parser();
|
|
241730
|
-
var _constants =
|
|
240171
|
+
var _constants = require_constants13();
|
|
241731
240172
|
var _utils = require_utils27();
|
|
241732
240173
|
var Hour1to12Parser = /* @__PURE__ */ function(_Parser) {
|
|
241733
240174
|
(0, _inherits2.default)(Hour1to12Parser2, _Parser);
|
|
@@ -241798,7 +240239,7 @@ var require_Hour0to23Parser = __commonJS({
|
|
|
241798
240239
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
241799
240240
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
241800
240241
|
var _Parser2 = require_Parser();
|
|
241801
|
-
var _constants =
|
|
240242
|
+
var _constants = require_constants13();
|
|
241802
240243
|
var _utils = require_utils27();
|
|
241803
240244
|
var Hour0to23Parser = /* @__PURE__ */ function(_Parser) {
|
|
241804
240245
|
(0, _inherits2.default)(Hour0to23Parser2, _Parser);
|
|
@@ -241862,7 +240303,7 @@ var require_Hour0To11Parser = __commonJS({
|
|
|
241862
240303
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
241863
240304
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
241864
240305
|
var _Parser2 = require_Parser();
|
|
241865
|
-
var _constants =
|
|
240306
|
+
var _constants = require_constants13();
|
|
241866
240307
|
var _utils = require_utils27();
|
|
241867
240308
|
var Hour0To11Parser = /* @__PURE__ */ function(_Parser) {
|
|
241868
240309
|
(0, _inherits2.default)(Hour0To11Parser2, _Parser);
|
|
@@ -241931,7 +240372,7 @@ var require_Hour1To24Parser = __commonJS({
|
|
|
241931
240372
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
241932
240373
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
241933
240374
|
var _Parser2 = require_Parser();
|
|
241934
|
-
var _constants =
|
|
240375
|
+
var _constants = require_constants13();
|
|
241935
240376
|
var _utils = require_utils27();
|
|
241936
240377
|
var Hour1To24Parser = /* @__PURE__ */ function(_Parser) {
|
|
241937
240378
|
(0, _inherits2.default)(Hour1To24Parser2, _Parser);
|
|
@@ -241996,7 +240437,7 @@ var require_MinuteParser = __commonJS({
|
|
|
241996
240437
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
241997
240438
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
241998
240439
|
var _Parser2 = require_Parser();
|
|
241999
|
-
var _constants =
|
|
240440
|
+
var _constants = require_constants13();
|
|
242000
240441
|
var _utils = require_utils27();
|
|
242001
240442
|
var MinuteParser = /* @__PURE__ */ function(_Parser) {
|
|
242002
240443
|
(0, _inherits2.default)(MinuteParser2, _Parser);
|
|
@@ -242060,7 +240501,7 @@ var require_SecondParser = __commonJS({
|
|
|
242060
240501
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
242061
240502
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
242062
240503
|
var _Parser2 = require_Parser();
|
|
242063
|
-
var _constants =
|
|
240504
|
+
var _constants = require_constants13();
|
|
242064
240505
|
var _utils = require_utils27();
|
|
242065
240506
|
var SecondParser = /* @__PURE__ */ function(_Parser) {
|
|
242066
240507
|
(0, _inherits2.default)(SecondParser2, _Parser);
|
|
@@ -242176,7 +240617,7 @@ var require_ISOTimezoneWithZParser = __commonJS({
|
|
|
242176
240617
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
242177
240618
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
242178
240619
|
var _Parser2 = require_Parser();
|
|
242179
|
-
var _constants =
|
|
240620
|
+
var _constants = require_constants13();
|
|
242180
240621
|
var _utils = require_utils27();
|
|
242181
240622
|
var ISOTimezoneWithZParser = /* @__PURE__ */ function(_Parser) {
|
|
242182
240623
|
(0, _inherits2.default)(ISOTimezoneWithZParser2, _Parser);
|
|
@@ -242240,7 +240681,7 @@ var require_ISOTimezoneParser = __commonJS({
|
|
|
242240
240681
|
var _createSuper2 = _interopRequireDefault(require_createSuper());
|
|
242241
240682
|
var _defineProperty2 = _interopRequireDefault(require_defineProperty());
|
|
242242
240683
|
var _Parser2 = require_Parser();
|
|
242243
|
-
var _constants =
|
|
240684
|
+
var _constants = require_constants13();
|
|
242244
240685
|
var _utils = require_utils27();
|
|
242245
240686
|
var ISOTimezoneParser = /* @__PURE__ */ function(_Parser) {
|
|
242246
240687
|
(0, _inherits2.default)(ISOTimezoneParser2, _Parser);
|
|
@@ -243509,7 +241950,7 @@ var require_millisecondsToHours = __commonJS({
|
|
|
243509
241950
|
});
|
|
243510
241951
|
exports2.default = millisecondsToHours;
|
|
243511
241952
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243512
|
-
var _index2 =
|
|
241953
|
+
var _index2 = require_constants12();
|
|
243513
241954
|
function millisecondsToHours(milliseconds) {
|
|
243514
241955
|
(0, _index.default)(1, arguments);
|
|
243515
241956
|
var hours = milliseconds / _index2.millisecondsInHour;
|
|
@@ -243529,7 +241970,7 @@ var require_millisecondsToMinutes = __commonJS({
|
|
|
243529
241970
|
});
|
|
243530
241971
|
exports2.default = millisecondsToMinutes;
|
|
243531
241972
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243532
|
-
var _index2 =
|
|
241973
|
+
var _index2 = require_constants12();
|
|
243533
241974
|
function millisecondsToMinutes(milliseconds) {
|
|
243534
241975
|
(0, _index.default)(1, arguments);
|
|
243535
241976
|
var minutes = milliseconds / _index2.millisecondsInMinute;
|
|
@@ -243549,7 +241990,7 @@ var require_millisecondsToSeconds = __commonJS({
|
|
|
243549
241990
|
});
|
|
243550
241991
|
exports2.default = millisecondsToSeconds;
|
|
243551
241992
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243552
|
-
var _index2 =
|
|
241993
|
+
var _index2 = require_constants12();
|
|
243553
241994
|
function millisecondsToSeconds(milliseconds) {
|
|
243554
241995
|
(0, _index.default)(1, arguments);
|
|
243555
241996
|
var seconds = milliseconds / _index2.millisecondsInSecond;
|
|
@@ -243569,7 +242010,7 @@ var require_minutesToHours = __commonJS({
|
|
|
243569
242010
|
});
|
|
243570
242011
|
exports2.default = minutesToHours;
|
|
243571
242012
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243572
|
-
var _index2 =
|
|
242013
|
+
var _index2 = require_constants12();
|
|
243573
242014
|
function minutesToHours(minutes) {
|
|
243574
242015
|
(0, _index.default)(1, arguments);
|
|
243575
242016
|
var hours = minutes / _index2.minutesInHour;
|
|
@@ -243589,7 +242030,7 @@ var require_minutesToMilliseconds = __commonJS({
|
|
|
243589
242030
|
});
|
|
243590
242031
|
exports2.default = minutesToMilliseconds;
|
|
243591
242032
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243592
|
-
var _index2 =
|
|
242033
|
+
var _index2 = require_constants12();
|
|
243593
242034
|
function minutesToMilliseconds(minutes) {
|
|
243594
242035
|
(0, _index.default)(1, arguments);
|
|
243595
242036
|
return Math.floor(minutes * _index2.millisecondsInMinute);
|
|
@@ -243608,7 +242049,7 @@ var require_minutesToSeconds = __commonJS({
|
|
|
243608
242049
|
});
|
|
243609
242050
|
exports2.default = minutesToSeconds;
|
|
243610
242051
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243611
|
-
var _index2 =
|
|
242052
|
+
var _index2 = require_constants12();
|
|
243612
242053
|
function minutesToSeconds(minutes) {
|
|
243613
242054
|
(0, _index.default)(1, arguments);
|
|
243614
242055
|
return Math.floor(minutes * _index2.secondsInMinute);
|
|
@@ -243627,7 +242068,7 @@ var require_monthsToQuarters = __commonJS({
|
|
|
243627
242068
|
});
|
|
243628
242069
|
exports2.default = monthsToQuarters;
|
|
243629
242070
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243630
|
-
var _index2 =
|
|
242071
|
+
var _index2 = require_constants12();
|
|
243631
242072
|
function monthsToQuarters(months) {
|
|
243632
242073
|
(0, _index.default)(1, arguments);
|
|
243633
242074
|
var quarters = months / _index2.monthsInQuarter;
|
|
@@ -243647,7 +242088,7 @@ var require_monthsToYears = __commonJS({
|
|
|
243647
242088
|
});
|
|
243648
242089
|
exports2.default = monthsToYears;
|
|
243649
242090
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
243650
|
-
var _index2 =
|
|
242091
|
+
var _index2 = require_constants12();
|
|
243651
242092
|
function monthsToYears(months) {
|
|
243652
242093
|
(0, _index.default)(1, arguments);
|
|
243653
242094
|
var years = months / _index2.monthsInYear;
|
|
@@ -243822,7 +242263,7 @@ var require_parseISO = __commonJS({
|
|
|
243822
242263
|
value: true
|
|
243823
242264
|
});
|
|
243824
242265
|
exports2.default = parseISO;
|
|
243825
|
-
var _index =
|
|
242266
|
+
var _index = require_constants12();
|
|
243826
242267
|
var _index2 = _interopRequireDefault(require_requiredArgs());
|
|
243827
242268
|
var _index3 = _interopRequireDefault(require_toInteger());
|
|
243828
242269
|
function parseISO(argument, options) {
|
|
@@ -244202,7 +242643,7 @@ var require_quartersToMonths = __commonJS({
|
|
|
244202
242643
|
});
|
|
244203
242644
|
exports2.default = quartersToMonths;
|
|
244204
242645
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
244205
|
-
var _index2 =
|
|
242646
|
+
var _index2 = require_constants12();
|
|
244206
242647
|
function quartersToMonths(quarters) {
|
|
244207
242648
|
(0, _index.default)(1, arguments);
|
|
244208
242649
|
return Math.floor(quarters * _index2.monthsInQuarter);
|
|
@@ -244221,7 +242662,7 @@ var require_quartersToYears = __commonJS({
|
|
|
244221
242662
|
});
|
|
244222
242663
|
exports2.default = quartersToYears;
|
|
244223
242664
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
244224
|
-
var _index2 =
|
|
242665
|
+
var _index2 = require_constants12();
|
|
244225
242666
|
function quartersToYears(quarters) {
|
|
244226
242667
|
(0, _index.default)(1, arguments);
|
|
244227
242668
|
var years = quarters / _index2.quartersInYear;
|
|
@@ -244275,7 +242716,7 @@ var require_secondsToHours = __commonJS({
|
|
|
244275
242716
|
});
|
|
244276
242717
|
exports2.default = secondsToHours;
|
|
244277
242718
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
244278
|
-
var _index2 =
|
|
242719
|
+
var _index2 = require_constants12();
|
|
244279
242720
|
function secondsToHours(seconds) {
|
|
244280
242721
|
(0, _index.default)(1, arguments);
|
|
244281
242722
|
var hours = seconds / _index2.secondsInHour;
|
|
@@ -244295,7 +242736,7 @@ var require_secondsToMilliseconds = __commonJS({
|
|
|
244295
242736
|
});
|
|
244296
242737
|
exports2.default = secondsToMilliseconds;
|
|
244297
242738
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
244298
|
-
var _index2 =
|
|
242739
|
+
var _index2 = require_constants12();
|
|
244299
242740
|
function secondsToMilliseconds(seconds) {
|
|
244300
242741
|
(0, _index.default)(1, arguments);
|
|
244301
242742
|
return seconds * _index2.millisecondsInSecond;
|
|
@@ -244314,7 +242755,7 @@ var require_secondsToMinutes = __commonJS({
|
|
|
244314
242755
|
});
|
|
244315
242756
|
exports2.default = secondsToMinutes;
|
|
244316
242757
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
244317
|
-
var _index2 =
|
|
242758
|
+
var _index2 = require_constants12();
|
|
244318
242759
|
function secondsToMinutes(seconds) {
|
|
244319
242760
|
(0, _index.default)(1, arguments);
|
|
244320
242761
|
var minutes = seconds / _index2.secondsInMinute;
|
|
@@ -245076,7 +243517,7 @@ var require_weeksToDays = __commonJS({
|
|
|
245076
243517
|
});
|
|
245077
243518
|
exports2.default = weeksToDays;
|
|
245078
243519
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
245079
|
-
var _index2 =
|
|
243520
|
+
var _index2 = require_constants12();
|
|
245080
243521
|
function weeksToDays(weeks) {
|
|
245081
243522
|
(0, _index.default)(1, arguments);
|
|
245082
243523
|
return Math.floor(weeks * _index2.daysInWeek);
|
|
@@ -245095,7 +243536,7 @@ var require_yearsToMonths = __commonJS({
|
|
|
245095
243536
|
});
|
|
245096
243537
|
exports2.default = yearsToMonths;
|
|
245097
243538
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
245098
|
-
var _index2 =
|
|
243539
|
+
var _index2 = require_constants12();
|
|
245099
243540
|
function yearsToMonths(years) {
|
|
245100
243541
|
(0, _index.default)(1, arguments);
|
|
245101
243542
|
return Math.floor(years * _index2.monthsInYear);
|
|
@@ -245114,7 +243555,7 @@ var require_yearsToQuarters = __commonJS({
|
|
|
245114
243555
|
});
|
|
245115
243556
|
exports2.default = yearsToQuarters;
|
|
245116
243557
|
var _index = _interopRequireDefault(require_requiredArgs());
|
|
245117
|
-
var _index2 =
|
|
243558
|
+
var _index2 = require_constants12();
|
|
245118
243559
|
function yearsToQuarters(years) {
|
|
245119
243560
|
(0, _index.default)(1, arguments);
|
|
245120
243561
|
return Math.floor(years * _index2.quartersInYear);
|
|
@@ -247045,7 +245486,7 @@ var require_date_fns = __commonJS({
|
|
|
247045
245486
|
var _index237 = _interopRequireDefault(require_weeksToDays());
|
|
247046
245487
|
var _index238 = _interopRequireDefault(require_yearsToMonths());
|
|
247047
245488
|
var _index239 = _interopRequireDefault(require_yearsToQuarters());
|
|
247048
|
-
var _index240 =
|
|
245489
|
+
var _index240 = require_constants12();
|
|
247049
245490
|
Object.keys(_index240).forEach(function(key) {
|
|
247050
245491
|
if (key === "default" || key === "__esModule")
|
|
247051
245492
|
return;
|
|
@@ -328599,7 +327040,7 @@ function zeroLT() {
|
|
|
328599
327040
|
}
|
|
328600
327041
|
|
|
328601
327042
|
// package.json
|
|
328602
|
-
var version3 = "
|
|
327043
|
+
var version3 = "0.0.0";
|
|
328603
327044
|
|
|
328604
327045
|
// src/index.ts
|
|
328605
327046
|
var program2 = new Command();
|