@fragment-dev/cli 2026.7.28 → 2026.7.29-10
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/README.md +1 -1
- package/dist/{chunk-QNGMAK7L.js → chunk-2QWHNS46.js} +3 -3
- package/dist/{chunk-KT3DLGYI.js → chunk-2XS2VMK6.js} +2 -2
- package/dist/{chunk-BCAGXHAX.js → chunk-36LLZEQA.js} +25 -25
- package/dist/{chunk-BWBPSOBV.js → chunk-5E26VJ6H.js} +17 -3
- package/dist/{chunk-IZBMLZIC.js → chunk-5JLMMFER.js} +1 -1
- package/dist/{chunk-OBI2YPSX.js → chunk-5MYHGKCZ.js} +2 -2
- package/dist/{chunk-BC2OJSPA.js → chunk-5R2QMQ47.js} +1 -1
- package/dist/{chunk-BGUC74YK.js → chunk-6GVJKV2D.js} +3 -3
- package/dist/{chunk-U7FUVHZJ.js → chunk-6OFYGM5P.js} +3 -3
- package/dist/{chunk-O7AE4SQS.js → chunk-6SMC73UW.js} +9 -9
- package/dist/{chunk-VNAUU3EA.js → chunk-7BXLVF5J.js} +7 -7
- package/dist/{chunk-44NHT3V7.js → chunk-A3NOUNWR.js} +3 -3
- package/dist/{chunk-BBRYUDAI.js → chunk-A5OWXD3R.js} +48 -10
- package/dist/{chunk-XK2D2Z44.js → chunk-B7FCVEVL.js} +7 -7
- package/dist/{chunk-NAO73VDE.js → chunk-DQXXJ3VR.js} +3 -3
- package/dist/{chunk-624X4WQX.js → chunk-G2KT73T3.js} +1 -1
- package/dist/{chunk-4CEBCA46.js → chunk-ILQ4ZK7X.js} +1 -1
- package/dist/{chunk-OAJCTIWT.js → chunk-IXX2EVIM.js} +3 -3
- package/dist/{chunk-LLGNTKT5.js → chunk-IYYWZCZE.js} +3 -3
- package/dist/{chunk-SH5YJD4P.js → chunk-JFF37Z5K.js} +1 -1
- package/dist/{chunk-VUVWR4BG.js → chunk-K5RBCJWQ.js} +2 -2
- package/dist/{chunk-KFAA2PA4.js → chunk-KAGCPC3G.js} +808 -3
- package/dist/{chunk-5KUA4RJK.js → chunk-KIDRAGHV.js} +3 -3
- package/dist/{chunk-5MQSQSME.js → chunk-MBT3GWIT.js} +2 -2
- package/dist/{chunk-CNRBK46D.js → chunk-O6GAEJNO.js} +2 -2
- package/dist/{chunk-EVBIJLID.js → chunk-OWLAAUNJ.js} +1 -1
- package/dist/{chunk-4MZBCWZQ.js → chunk-Q2D66AQY.js} +3 -3
- package/dist/{chunk-3OHJCZZM.js → chunk-REGEMVTK.js} +4 -4
- package/dist/{chunk-PIHY2GFS.js → chunk-TOXMGEU7.js} +2 -2
- package/dist/{chunk-7TNXITUF.js → chunk-U4NSRDRN.js} +4 -4
- package/dist/{chunk-4E6Y3PSS.js → chunk-U6M2LHJL.js} +3 -3
- package/dist/{chunk-QXLR4WSD.js → chunk-VDAFWOKB.js} +5 -5
- package/dist/{chunk-FOAOX2DT.js → chunk-VKV3NPQ2.js} +2 -2
- package/dist/{chunk-3BWYGCTW.js → chunk-VRVDFHQI.js} +3 -3
- package/dist/{chunk-27IQNS3A.js → chunk-W2V2ILHS.js} +2118 -355
- package/dist/{chunk-THBZ6XSN.js → chunk-WTSTKV54.js} +3 -3
- package/dist/{chunk-ZMFGVGZP.js → chunk-X5KIPJRF.js} +1 -1
- package/dist/{chunk-BMOEYXRT.js → chunk-X5UKW2HL.js} +3 -3
- package/dist/commands/add-ledger-entry.js +5 -5
- package/dist/commands/api-client/create.js +4 -4
- package/dist/commands/create-custom-link.js +5 -5
- package/dist/commands/create-ledger.js +5 -5
- package/dist/commands/delete-custom-txs.js +5 -5
- package/dist/commands/delete-ledger.js +5 -5
- package/dist/commands/delete-schema.js +5 -5
- package/dist/commands/gen-graphql.js +10 -10
- package/dist/commands/get-schema.js +6 -6
- package/dist/commands/init.js +4 -4
- package/dist/commands/login.js +5 -5
- package/dist/commands/migrate-ledger-entry.js +5 -5
- package/dist/commands/query/ledgerAccounts.js +5 -5
- package/dist/commands/query/ledgers.js +5 -5
- package/dist/commands/query/schema.js +5 -5
- package/dist/commands/query/schemas.js +5 -5
- package/dist/commands/reverse-ledger-entry.js +5 -5
- package/dist/commands/start.js +4 -4
- package/dist/commands/store-schema.js +5 -5
- package/dist/commands/token.js +5 -5
- package/dist/commands/update-ledger-account.js +5 -5
- package/dist/commands/update.js +5 -5
- package/dist/commands/verify-schema.js +9 -9
- package/dist/commands/version.js +4 -4
- package/dist/commands/workspace.js +5 -5
- package/dist/commands.js +38 -38
- package/dist/graphql.js +5 -5
- package/dist/index.js +38 -38
- package/dist/lib/authenticatedCommand.js +4 -4
- package/dist/lib/baseCommand.js +3 -3
- package/dist/lib/errors.js +2 -2
- package/dist/utils/formatValidationErrors.js +3 -3
- package/dist/utils/schemaValidation.js +6 -6
- package/dist/utils.js +2 -2
- package/oclif.manifest.json +2 -2
- package/package.json +1 -1
|
@@ -4,7 +4,7 @@ import {
|
|
|
4
4
|
} from "./chunk-34NLRFFT.js";
|
|
5
5
|
import {
|
|
6
6
|
parseJSON
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-6SMC73UW.js";
|
|
8
8
|
import {
|
|
9
9
|
require_graphql
|
|
10
10
|
} from "./chunk-QF5EN33L.js";
|
|
@@ -13,10 +13,10 @@ import {
|
|
|
13
13
|
getFragmentCliVersion
|
|
14
14
|
} from "./chunk-DYLKAHKE.js";
|
|
15
15
|
import {
|
|
16
|
-
|
|
16
|
+
require_color_name,
|
|
17
17
|
require_has_flag,
|
|
18
18
|
require_source
|
|
19
|
-
} from "./chunk-
|
|
19
|
+
} from "./chunk-B7FCVEVL.js";
|
|
20
20
|
import {
|
|
21
21
|
attemptToCacheToken,
|
|
22
22
|
getToken,
|
|
@@ -4288,6 +4288,811 @@ var require_string_width = __commonJS({
|
|
|
4288
4288
|
}
|
|
4289
4289
|
});
|
|
4290
4290
|
|
|
4291
|
+
// ../../node_modules/@oclif/core/node_modules/color-convert/conversions.js
|
|
4292
|
+
var require_conversions = __commonJS({
|
|
4293
|
+
"../../node_modules/@oclif/core/node_modules/color-convert/conversions.js"(exports, module) {
|
|
4294
|
+
init_cjs_shims();
|
|
4295
|
+
var cssKeywords = require_color_name();
|
|
4296
|
+
var reverseKeywords = {};
|
|
4297
|
+
for (const key of Object.keys(cssKeywords)) {
|
|
4298
|
+
reverseKeywords[cssKeywords[key]] = key;
|
|
4299
|
+
}
|
|
4300
|
+
var convert = {
|
|
4301
|
+
rgb: { channels: 3, labels: "rgb" },
|
|
4302
|
+
hsl: { channels: 3, labels: "hsl" },
|
|
4303
|
+
hsv: { channels: 3, labels: "hsv" },
|
|
4304
|
+
hwb: { channels: 3, labels: "hwb" },
|
|
4305
|
+
cmyk: { channels: 4, labels: "cmyk" },
|
|
4306
|
+
xyz: { channels: 3, labels: "xyz" },
|
|
4307
|
+
lab: { channels: 3, labels: "lab" },
|
|
4308
|
+
lch: { channels: 3, labels: "lch" },
|
|
4309
|
+
hex: { channels: 1, labels: ["hex"] },
|
|
4310
|
+
keyword: { channels: 1, labels: ["keyword"] },
|
|
4311
|
+
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
4312
|
+
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
4313
|
+
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
4314
|
+
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
4315
|
+
gray: { channels: 1, labels: ["gray"] }
|
|
4316
|
+
};
|
|
4317
|
+
module.exports = convert;
|
|
4318
|
+
for (const model of Object.keys(convert)) {
|
|
4319
|
+
if (!("channels" in convert[model])) {
|
|
4320
|
+
throw new Error("missing channels property: " + model);
|
|
4321
|
+
}
|
|
4322
|
+
if (!("labels" in convert[model])) {
|
|
4323
|
+
throw new Error("missing channel labels property: " + model);
|
|
4324
|
+
}
|
|
4325
|
+
if (convert[model].labels.length !== convert[model].channels) {
|
|
4326
|
+
throw new Error("channel and label counts mismatch: " + model);
|
|
4327
|
+
}
|
|
4328
|
+
const { channels, labels } = convert[model];
|
|
4329
|
+
delete convert[model].channels;
|
|
4330
|
+
delete convert[model].labels;
|
|
4331
|
+
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
4332
|
+
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
4333
|
+
}
|
|
4334
|
+
convert.rgb.hsl = function(rgb) {
|
|
4335
|
+
const r = rgb[0] / 255;
|
|
4336
|
+
const g = rgb[1] / 255;
|
|
4337
|
+
const b = rgb[2] / 255;
|
|
4338
|
+
const min = Math.min(r, g, b);
|
|
4339
|
+
const max = Math.max(r, g, b);
|
|
4340
|
+
const delta = max - min;
|
|
4341
|
+
let h;
|
|
4342
|
+
let s;
|
|
4343
|
+
if (max === min) {
|
|
4344
|
+
h = 0;
|
|
4345
|
+
} else if (r === max) {
|
|
4346
|
+
h = (g - b) / delta;
|
|
4347
|
+
} else if (g === max) {
|
|
4348
|
+
h = 2 + (b - r) / delta;
|
|
4349
|
+
} else if (b === max) {
|
|
4350
|
+
h = 4 + (r - g) / delta;
|
|
4351
|
+
}
|
|
4352
|
+
h = Math.min(h * 60, 360);
|
|
4353
|
+
if (h < 0) {
|
|
4354
|
+
h += 360;
|
|
4355
|
+
}
|
|
4356
|
+
const l = (min + max) / 2;
|
|
4357
|
+
if (max === min) {
|
|
4358
|
+
s = 0;
|
|
4359
|
+
} else if (l <= 0.5) {
|
|
4360
|
+
s = delta / (max + min);
|
|
4361
|
+
} else {
|
|
4362
|
+
s = delta / (2 - max - min);
|
|
4363
|
+
}
|
|
4364
|
+
return [h, s * 100, l * 100];
|
|
4365
|
+
};
|
|
4366
|
+
convert.rgb.hsv = function(rgb) {
|
|
4367
|
+
let rdif;
|
|
4368
|
+
let gdif;
|
|
4369
|
+
let bdif;
|
|
4370
|
+
let h;
|
|
4371
|
+
let s;
|
|
4372
|
+
const r = rgb[0] / 255;
|
|
4373
|
+
const g = rgb[1] / 255;
|
|
4374
|
+
const b = rgb[2] / 255;
|
|
4375
|
+
const v = Math.max(r, g, b);
|
|
4376
|
+
const diff = v - Math.min(r, g, b);
|
|
4377
|
+
const diffc = function(c) {
|
|
4378
|
+
return (v - c) / 6 / diff + 1 / 2;
|
|
4379
|
+
};
|
|
4380
|
+
if (diff === 0) {
|
|
4381
|
+
h = 0;
|
|
4382
|
+
s = 0;
|
|
4383
|
+
} else {
|
|
4384
|
+
s = diff / v;
|
|
4385
|
+
rdif = diffc(r);
|
|
4386
|
+
gdif = diffc(g);
|
|
4387
|
+
bdif = diffc(b);
|
|
4388
|
+
if (r === v) {
|
|
4389
|
+
h = bdif - gdif;
|
|
4390
|
+
} else if (g === v) {
|
|
4391
|
+
h = 1 / 3 + rdif - bdif;
|
|
4392
|
+
} else if (b === v) {
|
|
4393
|
+
h = 2 / 3 + gdif - rdif;
|
|
4394
|
+
}
|
|
4395
|
+
if (h < 0) {
|
|
4396
|
+
h += 1;
|
|
4397
|
+
} else if (h > 1) {
|
|
4398
|
+
h -= 1;
|
|
4399
|
+
}
|
|
4400
|
+
}
|
|
4401
|
+
return [
|
|
4402
|
+
h * 360,
|
|
4403
|
+
s * 100,
|
|
4404
|
+
v * 100
|
|
4405
|
+
];
|
|
4406
|
+
};
|
|
4407
|
+
convert.rgb.hwb = function(rgb) {
|
|
4408
|
+
const r = rgb[0];
|
|
4409
|
+
const g = rgb[1];
|
|
4410
|
+
let b = rgb[2];
|
|
4411
|
+
const h = convert.rgb.hsl(rgb)[0];
|
|
4412
|
+
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
4413
|
+
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
4414
|
+
return [h, w * 100, b * 100];
|
|
4415
|
+
};
|
|
4416
|
+
convert.rgb.cmyk = function(rgb) {
|
|
4417
|
+
const r = rgb[0] / 255;
|
|
4418
|
+
const g = rgb[1] / 255;
|
|
4419
|
+
const b = rgb[2] / 255;
|
|
4420
|
+
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
4421
|
+
const c = (1 - r - k) / (1 - k) || 0;
|
|
4422
|
+
const m = (1 - g - k) / (1 - k) || 0;
|
|
4423
|
+
const y = (1 - b - k) / (1 - k) || 0;
|
|
4424
|
+
return [c * 100, m * 100, y * 100, k * 100];
|
|
4425
|
+
};
|
|
4426
|
+
function comparativeDistance(x, y) {
|
|
4427
|
+
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
4428
|
+
}
|
|
4429
|
+
convert.rgb.keyword = function(rgb) {
|
|
4430
|
+
const reversed = reverseKeywords[rgb];
|
|
4431
|
+
if (reversed) {
|
|
4432
|
+
return reversed;
|
|
4433
|
+
}
|
|
4434
|
+
let currentClosestDistance = Infinity;
|
|
4435
|
+
let currentClosestKeyword;
|
|
4436
|
+
for (const keyword of Object.keys(cssKeywords)) {
|
|
4437
|
+
const value = cssKeywords[keyword];
|
|
4438
|
+
const distance = comparativeDistance(rgb, value);
|
|
4439
|
+
if (distance < currentClosestDistance) {
|
|
4440
|
+
currentClosestDistance = distance;
|
|
4441
|
+
currentClosestKeyword = keyword;
|
|
4442
|
+
}
|
|
4443
|
+
}
|
|
4444
|
+
return currentClosestKeyword;
|
|
4445
|
+
};
|
|
4446
|
+
convert.keyword.rgb = function(keyword) {
|
|
4447
|
+
return cssKeywords[keyword];
|
|
4448
|
+
};
|
|
4449
|
+
convert.rgb.xyz = function(rgb) {
|
|
4450
|
+
let r = rgb[0] / 255;
|
|
4451
|
+
let g = rgb[1] / 255;
|
|
4452
|
+
let b = rgb[2] / 255;
|
|
4453
|
+
r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
4454
|
+
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
4455
|
+
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
4456
|
+
const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
4457
|
+
const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
4458
|
+
const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
4459
|
+
return [x * 100, y * 100, z * 100];
|
|
4460
|
+
};
|
|
4461
|
+
convert.rgb.lab = function(rgb) {
|
|
4462
|
+
const xyz = convert.rgb.xyz(rgb);
|
|
4463
|
+
let x = xyz[0];
|
|
4464
|
+
let y = xyz[1];
|
|
4465
|
+
let z = xyz[2];
|
|
4466
|
+
x /= 95.047;
|
|
4467
|
+
y /= 100;
|
|
4468
|
+
z /= 108.883;
|
|
4469
|
+
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
4470
|
+
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
4471
|
+
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
4472
|
+
const l = 116 * y - 16;
|
|
4473
|
+
const a = 500 * (x - y);
|
|
4474
|
+
const b = 200 * (y - z);
|
|
4475
|
+
return [l, a, b];
|
|
4476
|
+
};
|
|
4477
|
+
convert.hsl.rgb = function(hsl) {
|
|
4478
|
+
const h = hsl[0] / 360;
|
|
4479
|
+
const s = hsl[1] / 100;
|
|
4480
|
+
const l = hsl[2] / 100;
|
|
4481
|
+
let t2;
|
|
4482
|
+
let t3;
|
|
4483
|
+
let val;
|
|
4484
|
+
if (s === 0) {
|
|
4485
|
+
val = l * 255;
|
|
4486
|
+
return [val, val, val];
|
|
4487
|
+
}
|
|
4488
|
+
if (l < 0.5) {
|
|
4489
|
+
t2 = l * (1 + s);
|
|
4490
|
+
} else {
|
|
4491
|
+
t2 = l + s - l * s;
|
|
4492
|
+
}
|
|
4493
|
+
const t1 = 2 * l - t2;
|
|
4494
|
+
const rgb = [0, 0, 0];
|
|
4495
|
+
for (let i = 0; i < 3; i++) {
|
|
4496
|
+
t3 = h + 1 / 3 * -(i - 1);
|
|
4497
|
+
if (t3 < 0) {
|
|
4498
|
+
t3++;
|
|
4499
|
+
}
|
|
4500
|
+
if (t3 > 1) {
|
|
4501
|
+
t3--;
|
|
4502
|
+
}
|
|
4503
|
+
if (6 * t3 < 1) {
|
|
4504
|
+
val = t1 + (t2 - t1) * 6 * t3;
|
|
4505
|
+
} else if (2 * t3 < 1) {
|
|
4506
|
+
val = t2;
|
|
4507
|
+
} else if (3 * t3 < 2) {
|
|
4508
|
+
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
4509
|
+
} else {
|
|
4510
|
+
val = t1;
|
|
4511
|
+
}
|
|
4512
|
+
rgb[i] = val * 255;
|
|
4513
|
+
}
|
|
4514
|
+
return rgb;
|
|
4515
|
+
};
|
|
4516
|
+
convert.hsl.hsv = function(hsl) {
|
|
4517
|
+
const h = hsl[0];
|
|
4518
|
+
let s = hsl[1] / 100;
|
|
4519
|
+
let l = hsl[2] / 100;
|
|
4520
|
+
let smin = s;
|
|
4521
|
+
const lmin = Math.max(l, 0.01);
|
|
4522
|
+
l *= 2;
|
|
4523
|
+
s *= l <= 1 ? l : 2 - l;
|
|
4524
|
+
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
4525
|
+
const v = (l + s) / 2;
|
|
4526
|
+
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
4527
|
+
return [h, sv * 100, v * 100];
|
|
4528
|
+
};
|
|
4529
|
+
convert.hsv.rgb = function(hsv) {
|
|
4530
|
+
const h = hsv[0] / 60;
|
|
4531
|
+
const s = hsv[1] / 100;
|
|
4532
|
+
let v = hsv[2] / 100;
|
|
4533
|
+
const hi = Math.floor(h) % 6;
|
|
4534
|
+
const f2 = h - Math.floor(h);
|
|
4535
|
+
const p = 255 * v * (1 - s);
|
|
4536
|
+
const q = 255 * v * (1 - s * f2);
|
|
4537
|
+
const t = 255 * v * (1 - s * (1 - f2));
|
|
4538
|
+
v *= 255;
|
|
4539
|
+
switch (hi) {
|
|
4540
|
+
case 0:
|
|
4541
|
+
return [v, t, p];
|
|
4542
|
+
case 1:
|
|
4543
|
+
return [q, v, p];
|
|
4544
|
+
case 2:
|
|
4545
|
+
return [p, v, t];
|
|
4546
|
+
case 3:
|
|
4547
|
+
return [p, q, v];
|
|
4548
|
+
case 4:
|
|
4549
|
+
return [t, p, v];
|
|
4550
|
+
case 5:
|
|
4551
|
+
return [v, p, q];
|
|
4552
|
+
}
|
|
4553
|
+
};
|
|
4554
|
+
convert.hsv.hsl = function(hsv) {
|
|
4555
|
+
const h = hsv[0];
|
|
4556
|
+
const s = hsv[1] / 100;
|
|
4557
|
+
const v = hsv[2] / 100;
|
|
4558
|
+
const vmin = Math.max(v, 0.01);
|
|
4559
|
+
let sl;
|
|
4560
|
+
let l;
|
|
4561
|
+
l = (2 - s) * v;
|
|
4562
|
+
const lmin = (2 - s) * vmin;
|
|
4563
|
+
sl = s * vmin;
|
|
4564
|
+
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
4565
|
+
sl = sl || 0;
|
|
4566
|
+
l /= 2;
|
|
4567
|
+
return [h, sl * 100, l * 100];
|
|
4568
|
+
};
|
|
4569
|
+
convert.hwb.rgb = function(hwb) {
|
|
4570
|
+
const h = hwb[0] / 360;
|
|
4571
|
+
let wh = hwb[1] / 100;
|
|
4572
|
+
let bl = hwb[2] / 100;
|
|
4573
|
+
const ratio = wh + bl;
|
|
4574
|
+
let f2;
|
|
4575
|
+
if (ratio > 1) {
|
|
4576
|
+
wh /= ratio;
|
|
4577
|
+
bl /= ratio;
|
|
4578
|
+
}
|
|
4579
|
+
const i = Math.floor(6 * h);
|
|
4580
|
+
const v = 1 - bl;
|
|
4581
|
+
f2 = 6 * h - i;
|
|
4582
|
+
if ((i & 1) !== 0) {
|
|
4583
|
+
f2 = 1 - f2;
|
|
4584
|
+
}
|
|
4585
|
+
const n = wh + f2 * (v - wh);
|
|
4586
|
+
let r;
|
|
4587
|
+
let g;
|
|
4588
|
+
let b;
|
|
4589
|
+
switch (i) {
|
|
4590
|
+
default:
|
|
4591
|
+
case 6:
|
|
4592
|
+
case 0:
|
|
4593
|
+
r = v;
|
|
4594
|
+
g = n;
|
|
4595
|
+
b = wh;
|
|
4596
|
+
break;
|
|
4597
|
+
case 1:
|
|
4598
|
+
r = n;
|
|
4599
|
+
g = v;
|
|
4600
|
+
b = wh;
|
|
4601
|
+
break;
|
|
4602
|
+
case 2:
|
|
4603
|
+
r = wh;
|
|
4604
|
+
g = v;
|
|
4605
|
+
b = n;
|
|
4606
|
+
break;
|
|
4607
|
+
case 3:
|
|
4608
|
+
r = wh;
|
|
4609
|
+
g = n;
|
|
4610
|
+
b = v;
|
|
4611
|
+
break;
|
|
4612
|
+
case 4:
|
|
4613
|
+
r = n;
|
|
4614
|
+
g = wh;
|
|
4615
|
+
b = v;
|
|
4616
|
+
break;
|
|
4617
|
+
case 5:
|
|
4618
|
+
r = v;
|
|
4619
|
+
g = wh;
|
|
4620
|
+
b = n;
|
|
4621
|
+
break;
|
|
4622
|
+
}
|
|
4623
|
+
return [r * 255, g * 255, b * 255];
|
|
4624
|
+
};
|
|
4625
|
+
convert.cmyk.rgb = function(cmyk) {
|
|
4626
|
+
const c = cmyk[0] / 100;
|
|
4627
|
+
const m = cmyk[1] / 100;
|
|
4628
|
+
const y = cmyk[2] / 100;
|
|
4629
|
+
const k = cmyk[3] / 100;
|
|
4630
|
+
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
4631
|
+
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
4632
|
+
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
4633
|
+
return [r * 255, g * 255, b * 255];
|
|
4634
|
+
};
|
|
4635
|
+
convert.xyz.rgb = function(xyz) {
|
|
4636
|
+
const x = xyz[0] / 100;
|
|
4637
|
+
const y = xyz[1] / 100;
|
|
4638
|
+
const z = xyz[2] / 100;
|
|
4639
|
+
let r;
|
|
4640
|
+
let g;
|
|
4641
|
+
let b;
|
|
4642
|
+
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
|
4643
|
+
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
|
4644
|
+
b = x * 0.0557 + y * -0.204 + z * 1.057;
|
|
4645
|
+
r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
|
|
4646
|
+
g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
|
4647
|
+
b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
|
4648
|
+
r = Math.min(Math.max(0, r), 1);
|
|
4649
|
+
g = Math.min(Math.max(0, g), 1);
|
|
4650
|
+
b = Math.min(Math.max(0, b), 1);
|
|
4651
|
+
return [r * 255, g * 255, b * 255];
|
|
4652
|
+
};
|
|
4653
|
+
convert.xyz.lab = function(xyz) {
|
|
4654
|
+
let x = xyz[0];
|
|
4655
|
+
let y = xyz[1];
|
|
4656
|
+
let z = xyz[2];
|
|
4657
|
+
x /= 95.047;
|
|
4658
|
+
y /= 100;
|
|
4659
|
+
z /= 108.883;
|
|
4660
|
+
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
4661
|
+
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
4662
|
+
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
4663
|
+
const l = 116 * y - 16;
|
|
4664
|
+
const a = 500 * (x - y);
|
|
4665
|
+
const b = 200 * (y - z);
|
|
4666
|
+
return [l, a, b];
|
|
4667
|
+
};
|
|
4668
|
+
convert.lab.xyz = function(lab) {
|
|
4669
|
+
const l = lab[0];
|
|
4670
|
+
const a = lab[1];
|
|
4671
|
+
const b = lab[2];
|
|
4672
|
+
let x;
|
|
4673
|
+
let y;
|
|
4674
|
+
let z;
|
|
4675
|
+
y = (l + 16) / 116;
|
|
4676
|
+
x = a / 500 + y;
|
|
4677
|
+
z = y - b / 200;
|
|
4678
|
+
const y2 = y ** 3;
|
|
4679
|
+
const x2 = x ** 3;
|
|
4680
|
+
const z2 = z ** 3;
|
|
4681
|
+
y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
|
|
4682
|
+
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
|
|
4683
|
+
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
|
4684
|
+
x *= 95.047;
|
|
4685
|
+
y *= 100;
|
|
4686
|
+
z *= 108.883;
|
|
4687
|
+
return [x, y, z];
|
|
4688
|
+
};
|
|
4689
|
+
convert.lab.lch = function(lab) {
|
|
4690
|
+
const l = lab[0];
|
|
4691
|
+
const a = lab[1];
|
|
4692
|
+
const b = lab[2];
|
|
4693
|
+
let h;
|
|
4694
|
+
const hr = Math.atan2(b, a);
|
|
4695
|
+
h = hr * 360 / 2 / Math.PI;
|
|
4696
|
+
if (h < 0) {
|
|
4697
|
+
h += 360;
|
|
4698
|
+
}
|
|
4699
|
+
const c = Math.sqrt(a * a + b * b);
|
|
4700
|
+
return [l, c, h];
|
|
4701
|
+
};
|
|
4702
|
+
convert.lch.lab = function(lch) {
|
|
4703
|
+
const l = lch[0];
|
|
4704
|
+
const c = lch[1];
|
|
4705
|
+
const h = lch[2];
|
|
4706
|
+
const hr = h / 360 * 2 * Math.PI;
|
|
4707
|
+
const a = c * Math.cos(hr);
|
|
4708
|
+
const b = c * Math.sin(hr);
|
|
4709
|
+
return [l, a, b];
|
|
4710
|
+
};
|
|
4711
|
+
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
4712
|
+
const [r, g, b] = args;
|
|
4713
|
+
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
4714
|
+
value = Math.round(value / 50);
|
|
4715
|
+
if (value === 0) {
|
|
4716
|
+
return 30;
|
|
4717
|
+
}
|
|
4718
|
+
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
4719
|
+
if (value === 2) {
|
|
4720
|
+
ansi += 60;
|
|
4721
|
+
}
|
|
4722
|
+
return ansi;
|
|
4723
|
+
};
|
|
4724
|
+
convert.hsv.ansi16 = function(args) {
|
|
4725
|
+
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
4726
|
+
};
|
|
4727
|
+
convert.rgb.ansi256 = function(args) {
|
|
4728
|
+
const r = args[0];
|
|
4729
|
+
const g = args[1];
|
|
4730
|
+
const b = args[2];
|
|
4731
|
+
if (r === g && g === b) {
|
|
4732
|
+
if (r < 8) {
|
|
4733
|
+
return 16;
|
|
4734
|
+
}
|
|
4735
|
+
if (r > 248) {
|
|
4736
|
+
return 231;
|
|
4737
|
+
}
|
|
4738
|
+
return Math.round((r - 8) / 247 * 24) + 232;
|
|
4739
|
+
}
|
|
4740
|
+
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
4741
|
+
return ansi;
|
|
4742
|
+
};
|
|
4743
|
+
convert.ansi16.rgb = function(args) {
|
|
4744
|
+
let color = args % 10;
|
|
4745
|
+
if (color === 0 || color === 7) {
|
|
4746
|
+
if (args > 50) {
|
|
4747
|
+
color += 3.5;
|
|
4748
|
+
}
|
|
4749
|
+
color = color / 10.5 * 255;
|
|
4750
|
+
return [color, color, color];
|
|
4751
|
+
}
|
|
4752
|
+
const mult = (~~(args > 50) + 1) * 0.5;
|
|
4753
|
+
const r = (color & 1) * mult * 255;
|
|
4754
|
+
const g = (color >> 1 & 1) * mult * 255;
|
|
4755
|
+
const b = (color >> 2 & 1) * mult * 255;
|
|
4756
|
+
return [r, g, b];
|
|
4757
|
+
};
|
|
4758
|
+
convert.ansi256.rgb = function(args) {
|
|
4759
|
+
if (args >= 232) {
|
|
4760
|
+
const c = (args - 232) * 10 + 8;
|
|
4761
|
+
return [c, c, c];
|
|
4762
|
+
}
|
|
4763
|
+
args -= 16;
|
|
4764
|
+
let rem;
|
|
4765
|
+
const r = Math.floor(args / 36) / 5 * 255;
|
|
4766
|
+
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
4767
|
+
const b = rem % 6 / 5 * 255;
|
|
4768
|
+
return [r, g, b];
|
|
4769
|
+
};
|
|
4770
|
+
convert.rgb.hex = function(args) {
|
|
4771
|
+
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
4772
|
+
const string = integer.toString(16).toUpperCase();
|
|
4773
|
+
return "000000".substring(string.length) + string;
|
|
4774
|
+
};
|
|
4775
|
+
convert.hex.rgb = function(args) {
|
|
4776
|
+
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
4777
|
+
if (!match) {
|
|
4778
|
+
return [0, 0, 0];
|
|
4779
|
+
}
|
|
4780
|
+
let colorString = match[0];
|
|
4781
|
+
if (match[0].length === 3) {
|
|
4782
|
+
colorString = colorString.split("").map((char) => {
|
|
4783
|
+
return char + char;
|
|
4784
|
+
}).join("");
|
|
4785
|
+
}
|
|
4786
|
+
const integer = parseInt(colorString, 16);
|
|
4787
|
+
const r = integer >> 16 & 255;
|
|
4788
|
+
const g = integer >> 8 & 255;
|
|
4789
|
+
const b = integer & 255;
|
|
4790
|
+
return [r, g, b];
|
|
4791
|
+
};
|
|
4792
|
+
convert.rgb.hcg = function(rgb) {
|
|
4793
|
+
const r = rgb[0] / 255;
|
|
4794
|
+
const g = rgb[1] / 255;
|
|
4795
|
+
const b = rgb[2] / 255;
|
|
4796
|
+
const max = Math.max(Math.max(r, g), b);
|
|
4797
|
+
const min = Math.min(Math.min(r, g), b);
|
|
4798
|
+
const chroma = max - min;
|
|
4799
|
+
let grayscale;
|
|
4800
|
+
let hue;
|
|
4801
|
+
if (chroma < 1) {
|
|
4802
|
+
grayscale = min / (1 - chroma);
|
|
4803
|
+
} else {
|
|
4804
|
+
grayscale = 0;
|
|
4805
|
+
}
|
|
4806
|
+
if (chroma <= 0) {
|
|
4807
|
+
hue = 0;
|
|
4808
|
+
} else if (max === r) {
|
|
4809
|
+
hue = (g - b) / chroma % 6;
|
|
4810
|
+
} else if (max === g) {
|
|
4811
|
+
hue = 2 + (b - r) / chroma;
|
|
4812
|
+
} else {
|
|
4813
|
+
hue = 4 + (r - g) / chroma;
|
|
4814
|
+
}
|
|
4815
|
+
hue /= 6;
|
|
4816
|
+
hue %= 1;
|
|
4817
|
+
return [hue * 360, chroma * 100, grayscale * 100];
|
|
4818
|
+
};
|
|
4819
|
+
convert.hsl.hcg = function(hsl) {
|
|
4820
|
+
const s = hsl[1] / 100;
|
|
4821
|
+
const l = hsl[2] / 100;
|
|
4822
|
+
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
4823
|
+
let f2 = 0;
|
|
4824
|
+
if (c < 1) {
|
|
4825
|
+
f2 = (l - 0.5 * c) / (1 - c);
|
|
4826
|
+
}
|
|
4827
|
+
return [hsl[0], c * 100, f2 * 100];
|
|
4828
|
+
};
|
|
4829
|
+
convert.hsv.hcg = function(hsv) {
|
|
4830
|
+
const s = hsv[1] / 100;
|
|
4831
|
+
const v = hsv[2] / 100;
|
|
4832
|
+
const c = s * v;
|
|
4833
|
+
let f2 = 0;
|
|
4834
|
+
if (c < 1) {
|
|
4835
|
+
f2 = (v - c) / (1 - c);
|
|
4836
|
+
}
|
|
4837
|
+
return [hsv[0], c * 100, f2 * 100];
|
|
4838
|
+
};
|
|
4839
|
+
convert.hcg.rgb = function(hcg) {
|
|
4840
|
+
const h = hcg[0] / 360;
|
|
4841
|
+
const c = hcg[1] / 100;
|
|
4842
|
+
const g = hcg[2] / 100;
|
|
4843
|
+
if (c === 0) {
|
|
4844
|
+
return [g * 255, g * 255, g * 255];
|
|
4845
|
+
}
|
|
4846
|
+
const pure = [0, 0, 0];
|
|
4847
|
+
const hi = h % 1 * 6;
|
|
4848
|
+
const v = hi % 1;
|
|
4849
|
+
const w = 1 - v;
|
|
4850
|
+
let mg = 0;
|
|
4851
|
+
switch (Math.floor(hi)) {
|
|
4852
|
+
case 0:
|
|
4853
|
+
pure[0] = 1;
|
|
4854
|
+
pure[1] = v;
|
|
4855
|
+
pure[2] = 0;
|
|
4856
|
+
break;
|
|
4857
|
+
case 1:
|
|
4858
|
+
pure[0] = w;
|
|
4859
|
+
pure[1] = 1;
|
|
4860
|
+
pure[2] = 0;
|
|
4861
|
+
break;
|
|
4862
|
+
case 2:
|
|
4863
|
+
pure[0] = 0;
|
|
4864
|
+
pure[1] = 1;
|
|
4865
|
+
pure[2] = v;
|
|
4866
|
+
break;
|
|
4867
|
+
case 3:
|
|
4868
|
+
pure[0] = 0;
|
|
4869
|
+
pure[1] = w;
|
|
4870
|
+
pure[2] = 1;
|
|
4871
|
+
break;
|
|
4872
|
+
case 4:
|
|
4873
|
+
pure[0] = v;
|
|
4874
|
+
pure[1] = 0;
|
|
4875
|
+
pure[2] = 1;
|
|
4876
|
+
break;
|
|
4877
|
+
default:
|
|
4878
|
+
pure[0] = 1;
|
|
4879
|
+
pure[1] = 0;
|
|
4880
|
+
pure[2] = w;
|
|
4881
|
+
}
|
|
4882
|
+
mg = (1 - c) * g;
|
|
4883
|
+
return [
|
|
4884
|
+
(c * pure[0] + mg) * 255,
|
|
4885
|
+
(c * pure[1] + mg) * 255,
|
|
4886
|
+
(c * pure[2] + mg) * 255
|
|
4887
|
+
];
|
|
4888
|
+
};
|
|
4889
|
+
convert.hcg.hsv = function(hcg) {
|
|
4890
|
+
const c = hcg[1] / 100;
|
|
4891
|
+
const g = hcg[2] / 100;
|
|
4892
|
+
const v = c + g * (1 - c);
|
|
4893
|
+
let f2 = 0;
|
|
4894
|
+
if (v > 0) {
|
|
4895
|
+
f2 = c / v;
|
|
4896
|
+
}
|
|
4897
|
+
return [hcg[0], f2 * 100, v * 100];
|
|
4898
|
+
};
|
|
4899
|
+
convert.hcg.hsl = function(hcg) {
|
|
4900
|
+
const c = hcg[1] / 100;
|
|
4901
|
+
const g = hcg[2] / 100;
|
|
4902
|
+
const l = g * (1 - c) + 0.5 * c;
|
|
4903
|
+
let s = 0;
|
|
4904
|
+
if (l > 0 && l < 0.5) {
|
|
4905
|
+
s = c / (2 * l);
|
|
4906
|
+
} else if (l >= 0.5 && l < 1) {
|
|
4907
|
+
s = c / (2 * (1 - l));
|
|
4908
|
+
}
|
|
4909
|
+
return [hcg[0], s * 100, l * 100];
|
|
4910
|
+
};
|
|
4911
|
+
convert.hcg.hwb = function(hcg) {
|
|
4912
|
+
const c = hcg[1] / 100;
|
|
4913
|
+
const g = hcg[2] / 100;
|
|
4914
|
+
const v = c + g * (1 - c);
|
|
4915
|
+
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
4916
|
+
};
|
|
4917
|
+
convert.hwb.hcg = function(hwb) {
|
|
4918
|
+
const w = hwb[1] / 100;
|
|
4919
|
+
const b = hwb[2] / 100;
|
|
4920
|
+
const v = 1 - b;
|
|
4921
|
+
const c = v - w;
|
|
4922
|
+
let g = 0;
|
|
4923
|
+
if (c < 1) {
|
|
4924
|
+
g = (v - c) / (1 - c);
|
|
4925
|
+
}
|
|
4926
|
+
return [hwb[0], c * 100, g * 100];
|
|
4927
|
+
};
|
|
4928
|
+
convert.apple.rgb = function(apple) {
|
|
4929
|
+
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
4930
|
+
};
|
|
4931
|
+
convert.rgb.apple = function(rgb) {
|
|
4932
|
+
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
4933
|
+
};
|
|
4934
|
+
convert.gray.rgb = function(args) {
|
|
4935
|
+
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
4936
|
+
};
|
|
4937
|
+
convert.gray.hsl = function(args) {
|
|
4938
|
+
return [0, 0, args[0]];
|
|
4939
|
+
};
|
|
4940
|
+
convert.gray.hsv = convert.gray.hsl;
|
|
4941
|
+
convert.gray.hwb = function(gray) {
|
|
4942
|
+
return [0, 100, gray[0]];
|
|
4943
|
+
};
|
|
4944
|
+
convert.gray.cmyk = function(gray) {
|
|
4945
|
+
return [0, 0, 0, gray[0]];
|
|
4946
|
+
};
|
|
4947
|
+
convert.gray.lab = function(gray) {
|
|
4948
|
+
return [gray[0], 0, 0];
|
|
4949
|
+
};
|
|
4950
|
+
convert.gray.hex = function(gray) {
|
|
4951
|
+
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
4952
|
+
const integer = (val << 16) + (val << 8) + val;
|
|
4953
|
+
const string = integer.toString(16).toUpperCase();
|
|
4954
|
+
return "000000".substring(string.length) + string;
|
|
4955
|
+
};
|
|
4956
|
+
convert.rgb.gray = function(rgb) {
|
|
4957
|
+
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
4958
|
+
return [val / 255 * 100];
|
|
4959
|
+
};
|
|
4960
|
+
}
|
|
4961
|
+
});
|
|
4962
|
+
|
|
4963
|
+
// ../../node_modules/@oclif/core/node_modules/color-convert/route.js
|
|
4964
|
+
var require_route = __commonJS({
|
|
4965
|
+
"../../node_modules/@oclif/core/node_modules/color-convert/route.js"(exports, module) {
|
|
4966
|
+
init_cjs_shims();
|
|
4967
|
+
var conversions = require_conversions();
|
|
4968
|
+
function buildGraph() {
|
|
4969
|
+
const graph = {};
|
|
4970
|
+
const models = Object.keys(conversions);
|
|
4971
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
4972
|
+
graph[models[i]] = {
|
|
4973
|
+
// http://jsperf.com/1-vs-infinity
|
|
4974
|
+
// micro-opt, but this is simple.
|
|
4975
|
+
distance: -1,
|
|
4976
|
+
parent: null
|
|
4977
|
+
};
|
|
4978
|
+
}
|
|
4979
|
+
return graph;
|
|
4980
|
+
}
|
|
4981
|
+
function deriveBFS(fromModel) {
|
|
4982
|
+
const graph = buildGraph();
|
|
4983
|
+
const queue = [fromModel];
|
|
4984
|
+
graph[fromModel].distance = 0;
|
|
4985
|
+
while (queue.length) {
|
|
4986
|
+
const current = queue.pop();
|
|
4987
|
+
const adjacents = Object.keys(conversions[current]);
|
|
4988
|
+
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
4989
|
+
const adjacent = adjacents[i];
|
|
4990
|
+
const node2 = graph[adjacent];
|
|
4991
|
+
if (node2.distance === -1) {
|
|
4992
|
+
node2.distance = graph[current].distance + 1;
|
|
4993
|
+
node2.parent = current;
|
|
4994
|
+
queue.unshift(adjacent);
|
|
4995
|
+
}
|
|
4996
|
+
}
|
|
4997
|
+
}
|
|
4998
|
+
return graph;
|
|
4999
|
+
}
|
|
5000
|
+
function link(from, to) {
|
|
5001
|
+
return function(args) {
|
|
5002
|
+
return to(from(args));
|
|
5003
|
+
};
|
|
5004
|
+
}
|
|
5005
|
+
function wrapConversion(toModel, graph) {
|
|
5006
|
+
const path = [graph[toModel].parent, toModel];
|
|
5007
|
+
let fn = conversions[graph[toModel].parent][toModel];
|
|
5008
|
+
let cur = graph[toModel].parent;
|
|
5009
|
+
while (graph[cur].parent) {
|
|
5010
|
+
path.unshift(graph[cur].parent);
|
|
5011
|
+
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
5012
|
+
cur = graph[cur].parent;
|
|
5013
|
+
}
|
|
5014
|
+
fn.conversion = path;
|
|
5015
|
+
return fn;
|
|
5016
|
+
}
|
|
5017
|
+
module.exports = function(fromModel) {
|
|
5018
|
+
const graph = deriveBFS(fromModel);
|
|
5019
|
+
const conversion = {};
|
|
5020
|
+
const models = Object.keys(graph);
|
|
5021
|
+
for (let len = models.length, i = 0; i < len; i++) {
|
|
5022
|
+
const toModel = models[i];
|
|
5023
|
+
const node2 = graph[toModel];
|
|
5024
|
+
if (node2.parent === null) {
|
|
5025
|
+
continue;
|
|
5026
|
+
}
|
|
5027
|
+
conversion[toModel] = wrapConversion(toModel, graph);
|
|
5028
|
+
}
|
|
5029
|
+
return conversion;
|
|
5030
|
+
};
|
|
5031
|
+
}
|
|
5032
|
+
});
|
|
5033
|
+
|
|
5034
|
+
// ../../node_modules/@oclif/core/node_modules/color-convert/index.js
|
|
5035
|
+
var require_color_convert = __commonJS({
|
|
5036
|
+
"../../node_modules/@oclif/core/node_modules/color-convert/index.js"(exports, module) {
|
|
5037
|
+
init_cjs_shims();
|
|
5038
|
+
var conversions = require_conversions();
|
|
5039
|
+
var route = require_route();
|
|
5040
|
+
var convert = {};
|
|
5041
|
+
var models = Object.keys(conversions);
|
|
5042
|
+
function wrapRaw(fn) {
|
|
5043
|
+
const wrappedFn = function(...args) {
|
|
5044
|
+
const arg0 = args[0];
|
|
5045
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
5046
|
+
return arg0;
|
|
5047
|
+
}
|
|
5048
|
+
if (arg0.length > 1) {
|
|
5049
|
+
args = arg0;
|
|
5050
|
+
}
|
|
5051
|
+
return fn(args);
|
|
5052
|
+
};
|
|
5053
|
+
if ("conversion" in fn) {
|
|
5054
|
+
wrappedFn.conversion = fn.conversion;
|
|
5055
|
+
}
|
|
5056
|
+
return wrappedFn;
|
|
5057
|
+
}
|
|
5058
|
+
function wrapRounded(fn) {
|
|
5059
|
+
const wrappedFn = function(...args) {
|
|
5060
|
+
const arg0 = args[0];
|
|
5061
|
+
if (arg0 === void 0 || arg0 === null) {
|
|
5062
|
+
return arg0;
|
|
5063
|
+
}
|
|
5064
|
+
if (arg0.length > 1) {
|
|
5065
|
+
args = arg0;
|
|
5066
|
+
}
|
|
5067
|
+
const result = fn(args);
|
|
5068
|
+
if (typeof result === "object") {
|
|
5069
|
+
for (let len = result.length, i = 0; i < len; i++) {
|
|
5070
|
+
result[i] = Math.round(result[i]);
|
|
5071
|
+
}
|
|
5072
|
+
}
|
|
5073
|
+
return result;
|
|
5074
|
+
};
|
|
5075
|
+
if ("conversion" in fn) {
|
|
5076
|
+
wrappedFn.conversion = fn.conversion;
|
|
5077
|
+
}
|
|
5078
|
+
return wrappedFn;
|
|
5079
|
+
}
|
|
5080
|
+
models.forEach((fromModel) => {
|
|
5081
|
+
convert[fromModel] = {};
|
|
5082
|
+
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
5083
|
+
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
5084
|
+
const routes = route(fromModel);
|
|
5085
|
+
const routeModels = Object.keys(routes);
|
|
5086
|
+
routeModels.forEach((toModel) => {
|
|
5087
|
+
const fn = routes[toModel];
|
|
5088
|
+
convert[fromModel][toModel] = wrapRounded(fn);
|
|
5089
|
+
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
5090
|
+
});
|
|
5091
|
+
});
|
|
5092
|
+
module.exports = convert;
|
|
5093
|
+
}
|
|
5094
|
+
});
|
|
5095
|
+
|
|
4291
5096
|
// ../../node_modules/@oclif/core/node_modules/ansi-styles/index.js
|
|
4292
5097
|
var require_ansi_styles = __commonJS({
|
|
4293
5098
|
"../../node_modules/@oclif/core/node_modules/ansi-styles/index.js"(exports, module) {
|
|
@@ -9796,7 +10601,7 @@ var require_commonjs2 = __commonJS({
|
|
|
9796
10601
|
"use strict";
|
|
9797
10602
|
init_cjs_shims();
|
|
9798
10603
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9799
|
-
exports.EXPANSION_MAX = void 0;
|
|
10604
|
+
exports.EXPANSION_MAX_LENGTH = exports.EXPANSION_MAX = void 0;
|
|
9800
10605
|
exports.expand = expand;
|
|
9801
10606
|
var balanced_match_1 = require_commonjs();
|
|
9802
10607
|
var escSlash = "\0SLASH" + Math.random() + "\0";
|
|
@@ -9815,6 +10620,7 @@ var require_commonjs2 = __commonJS({
|
|
|
9815
10620
|
var commaPattern = /\\,/g;
|
|
9816
10621
|
var periodPattern = /\\\./g;
|
|
9817
10622
|
exports.EXPANSION_MAX = 1e5;
|
|
10623
|
+
exports.EXPANSION_MAX_LENGTH = 4e6;
|
|
9818
10624
|
function numeric(str) {
|
|
9819
10625
|
return !isNaN(str) ? parseInt(str, 10) : str.charCodeAt(0);
|
|
9820
10626
|
}
|
|
@@ -9849,11 +10655,11 @@ var require_commonjs2 = __commonJS({
|
|
|
9849
10655
|
if (!str) {
|
|
9850
10656
|
return [];
|
|
9851
10657
|
}
|
|
9852
|
-
const { max = exports.EXPANSION_MAX } = options;
|
|
10658
|
+
const { max = exports.EXPANSION_MAX, maxLength = exports.EXPANSION_MAX_LENGTH } = options;
|
|
9853
10659
|
if (str.slice(0, 2) === "{}") {
|
|
9854
10660
|
str = "\\{\\}" + str.slice(2);
|
|
9855
10661
|
}
|
|
9856
|
-
return expand_(escapeBraces(str), max, true).map(unescapeBraces);
|
|
10662
|
+
return expand_(escapeBraces(str), max, maxLength, true).map(unescapeBraces);
|
|
9857
10663
|
}
|
|
9858
10664
|
function embrace(str) {
|
|
9859
10665
|
return "{" + str + "}";
|
|
@@ -9867,19 +10673,84 @@ var require_commonjs2 = __commonJS({
|
|
|
9867
10673
|
function gte(i, y) {
|
|
9868
10674
|
return i >= y;
|
|
9869
10675
|
}
|
|
9870
|
-
function
|
|
9871
|
-
const
|
|
9872
|
-
|
|
9873
|
-
|
|
9874
|
-
|
|
9875
|
-
|
|
9876
|
-
|
|
9877
|
-
|
|
9878
|
-
|
|
9879
|
-
|
|
9880
|
-
|
|
10676
|
+
function combine(acc, pre, values, max, maxLength, dropEmpties) {
|
|
10677
|
+
const out = [];
|
|
10678
|
+
let length = 0;
|
|
10679
|
+
for (let a = 0; a < acc.length; a++) {
|
|
10680
|
+
for (let v = 0; v < values.length; v++) {
|
|
10681
|
+
if (out.length >= max)
|
|
10682
|
+
return out;
|
|
10683
|
+
const expansion = acc[a] + pre + values[v];
|
|
10684
|
+
if (dropEmpties && !expansion)
|
|
10685
|
+
continue;
|
|
10686
|
+
if (length + expansion.length > maxLength)
|
|
10687
|
+
return out;
|
|
10688
|
+
out.push(expansion);
|
|
10689
|
+
length += expansion.length;
|
|
10690
|
+
}
|
|
10691
|
+
}
|
|
10692
|
+
return out;
|
|
10693
|
+
}
|
|
10694
|
+
function expandSequence(body, isAlphaSequence, max) {
|
|
10695
|
+
const n = body.split(/\.\./);
|
|
10696
|
+
const N = [];
|
|
10697
|
+
if (n[0] === void 0 || n[1] === void 0) {
|
|
10698
|
+
return N;
|
|
10699
|
+
}
|
|
10700
|
+
const x = numeric(n[0]);
|
|
10701
|
+
const y = numeric(n[1]);
|
|
10702
|
+
const width = Math.max(n[0].length, n[1].length);
|
|
10703
|
+
let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
10704
|
+
let test = lte;
|
|
10705
|
+
const reverse = y < x;
|
|
10706
|
+
if (reverse) {
|
|
10707
|
+
incr *= -1;
|
|
10708
|
+
test = gte;
|
|
10709
|
+
}
|
|
10710
|
+
const pad = n.some(isPadded);
|
|
10711
|
+
for (let i = x; test(i, y) && N.length < max; i += incr) {
|
|
10712
|
+
let c;
|
|
10713
|
+
if (isAlphaSequence) {
|
|
10714
|
+
c = String.fromCharCode(i);
|
|
10715
|
+
if (c === "\\") {
|
|
10716
|
+
c = "";
|
|
10717
|
+
}
|
|
10718
|
+
} else {
|
|
10719
|
+
c = String(i);
|
|
10720
|
+
if (pad) {
|
|
10721
|
+
const need = width - c.length;
|
|
10722
|
+
if (need > 0) {
|
|
10723
|
+
const z = new Array(need + 1).join("0");
|
|
10724
|
+
if (i < 0) {
|
|
10725
|
+
c = "-" + z + c.slice(1);
|
|
10726
|
+
} else {
|
|
10727
|
+
c = z + c;
|
|
10728
|
+
}
|
|
10729
|
+
}
|
|
10730
|
+
}
|
|
10731
|
+
}
|
|
10732
|
+
N.push(c);
|
|
10733
|
+
}
|
|
10734
|
+
return N;
|
|
10735
|
+
}
|
|
10736
|
+
function expand_(str, max, maxLength, isTop) {
|
|
10737
|
+
let acc = [""];
|
|
10738
|
+
let dropEmpties = false;
|
|
10739
|
+
let firstGroup = true;
|
|
10740
|
+
for (; ; ) {
|
|
10741
|
+
const m = (0, balanced_match_1.balanced)("{", "}", str);
|
|
10742
|
+
if (!m) {
|
|
10743
|
+
return combine(acc, str, [""], max, maxLength, dropEmpties);
|
|
10744
|
+
}
|
|
10745
|
+
const pre = m.pre;
|
|
10746
|
+
if (/\$$/.test(pre)) {
|
|
10747
|
+
acc = combine(acc, pre + "{" + m.body + "}", [""], max, maxLength, dropEmpties && !m.post.length);
|
|
10748
|
+
firstGroup = false;
|
|
10749
|
+
if (!m.post.length)
|
|
10750
|
+
break;
|
|
10751
|
+
str = m.post;
|
|
10752
|
+
continue;
|
|
9881
10753
|
}
|
|
9882
|
-
} else {
|
|
9883
10754
|
const isNumericSequence = /^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body);
|
|
9884
10755
|
const isAlphaSequence = /^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body);
|
|
9885
10756
|
const isSequence = isNumericSequence || isAlphaSequence;
|
|
@@ -9887,75 +10758,41 @@ var require_commonjs2 = __commonJS({
|
|
|
9887
10758
|
if (!isSequence && !isOptions) {
|
|
9888
10759
|
if (m.post.match(/,(?!,).*\}/)) {
|
|
9889
10760
|
str = m.pre + "{" + m.body + escClose + m.post;
|
|
9890
|
-
|
|
10761
|
+
isTop = true;
|
|
10762
|
+
continue;
|
|
9891
10763
|
}
|
|
9892
|
-
return [
|
|
10764
|
+
return combine(acc, pre + "{" + m.body + "}" + m.post, [""], max, maxLength, dropEmpties);
|
|
9893
10765
|
}
|
|
9894
|
-
|
|
10766
|
+
if (firstGroup) {
|
|
10767
|
+
dropEmpties = isTop && !isSequence;
|
|
10768
|
+
firstGroup = false;
|
|
10769
|
+
}
|
|
10770
|
+
let values;
|
|
9895
10771
|
if (isSequence) {
|
|
9896
|
-
|
|
10772
|
+
values = expandSequence(m.body, isAlphaSequence, max);
|
|
9897
10773
|
} else {
|
|
9898
|
-
n = parseCommaParts(m.body);
|
|
10774
|
+
let n = parseCommaParts(m.body);
|
|
9899
10775
|
if (n.length === 1 && n[0] !== void 0) {
|
|
9900
|
-
n = expand_(n[0], max, false).map(embrace);
|
|
10776
|
+
n = expand_(n[0], max, maxLength, false).map(embrace);
|
|
9901
10777
|
if (n.length === 1) {
|
|
9902
|
-
|
|
9903
|
-
|
|
9904
|
-
|
|
9905
|
-
|
|
9906
|
-
|
|
9907
|
-
if (isSequence && n[0] !== void 0 && n[1] !== void 0) {
|
|
9908
|
-
const x = numeric(n[0]);
|
|
9909
|
-
const y = numeric(n[1]);
|
|
9910
|
-
const width = Math.max(n[0].length, n[1].length);
|
|
9911
|
-
let incr = n.length === 3 && n[2] !== void 0 ? Math.max(Math.abs(numeric(n[2])), 1) : 1;
|
|
9912
|
-
let test = lte;
|
|
9913
|
-
const reverse = y < x;
|
|
9914
|
-
if (reverse) {
|
|
9915
|
-
incr *= -1;
|
|
9916
|
-
test = gte;
|
|
9917
|
-
}
|
|
9918
|
-
const pad = n.some(isPadded);
|
|
9919
|
-
N = [];
|
|
9920
|
-
for (let i = x; test(i, y); i += incr) {
|
|
9921
|
-
let c;
|
|
9922
|
-
if (isAlphaSequence) {
|
|
9923
|
-
c = String.fromCharCode(i);
|
|
9924
|
-
if (c === "\\") {
|
|
9925
|
-
c = "";
|
|
9926
|
-
}
|
|
9927
|
-
} else {
|
|
9928
|
-
c = String(i);
|
|
9929
|
-
if (pad) {
|
|
9930
|
-
const need = width - c.length;
|
|
9931
|
-
if (need > 0) {
|
|
9932
|
-
const z = new Array(need + 1).join("0");
|
|
9933
|
-
if (i < 0) {
|
|
9934
|
-
c = "-" + z + c.slice(1);
|
|
9935
|
-
} else {
|
|
9936
|
-
c = z + c;
|
|
9937
|
-
}
|
|
9938
|
-
}
|
|
9939
|
-
}
|
|
10778
|
+
acc = combine(acc, pre + n[0], [""], max, maxLength, dropEmpties && !m.post.length);
|
|
10779
|
+
if (!m.post.length)
|
|
10780
|
+
break;
|
|
10781
|
+
str = m.post;
|
|
10782
|
+
continue;
|
|
9940
10783
|
}
|
|
9941
|
-
N.push(c);
|
|
9942
10784
|
}
|
|
9943
|
-
|
|
9944
|
-
N = [];
|
|
10785
|
+
values = [];
|
|
9945
10786
|
for (let j = 0; j < n.length; j++) {
|
|
9946
|
-
|
|
9947
|
-
}
|
|
9948
|
-
}
|
|
9949
|
-
for (let j = 0; j < N.length; j++) {
|
|
9950
|
-
for (let k = 0; k < post.length && expansions.length < max; k++) {
|
|
9951
|
-
const expansion = pre + N[j] + post[k];
|
|
9952
|
-
if (!isTop || isSequence || expansion) {
|
|
9953
|
-
expansions.push(expansion);
|
|
9954
|
-
}
|
|
10787
|
+
values.push.apply(values, expand_(n[j], max, maxLength, false));
|
|
9955
10788
|
}
|
|
9956
10789
|
}
|
|
10790
|
+
acc = combine(acc, pre, values, max, maxLength, dropEmpties && !m.post.length);
|
|
10791
|
+
if (!m.post.length)
|
|
10792
|
+
break;
|
|
10793
|
+
str = m.post;
|
|
9957
10794
|
}
|
|
9958
|
-
return
|
|
10795
|
+
return acc;
|
|
9959
10796
|
}
|
|
9960
10797
|
}
|
|
9961
10798
|
});
|
|
@@ -36902,6 +37739,461 @@ var require_src3 = __commonJS({
|
|
|
36902
37739
|
}
|
|
36903
37740
|
});
|
|
36904
37741
|
|
|
37742
|
+
// ../../node_modules/https-proxy-agent/node_modules/agent-base/dist/src/promisify.js
|
|
37743
|
+
var require_promisify = __commonJS({
|
|
37744
|
+
"../../node_modules/https-proxy-agent/node_modules/agent-base/dist/src/promisify.js"(exports) {
|
|
37745
|
+
"use strict";
|
|
37746
|
+
init_cjs_shims();
|
|
37747
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37748
|
+
function promisify(fn) {
|
|
37749
|
+
return function(req, opts) {
|
|
37750
|
+
return new Promise((resolve, reject) => {
|
|
37751
|
+
fn.call(this, req, opts, (err, rtn) => {
|
|
37752
|
+
if (err) {
|
|
37753
|
+
reject(err);
|
|
37754
|
+
} else {
|
|
37755
|
+
resolve(rtn);
|
|
37756
|
+
}
|
|
37757
|
+
});
|
|
37758
|
+
});
|
|
37759
|
+
};
|
|
37760
|
+
}
|
|
37761
|
+
exports.default = promisify;
|
|
37762
|
+
}
|
|
37763
|
+
});
|
|
37764
|
+
|
|
37765
|
+
// ../../node_modules/https-proxy-agent/node_modules/agent-base/dist/src/index.js
|
|
37766
|
+
var require_src4 = __commonJS({
|
|
37767
|
+
"../../node_modules/https-proxy-agent/node_modules/agent-base/dist/src/index.js"(exports, module) {
|
|
37768
|
+
"use strict";
|
|
37769
|
+
init_cjs_shims();
|
|
37770
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
37771
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
37772
|
+
};
|
|
37773
|
+
var events_1 = __require("events");
|
|
37774
|
+
var debug_1 = __importDefault(require_src3());
|
|
37775
|
+
var promisify_1 = __importDefault(require_promisify());
|
|
37776
|
+
var debug = debug_1.default("agent-base");
|
|
37777
|
+
function isAgent(v) {
|
|
37778
|
+
return Boolean(v) && typeof v.addRequest === "function";
|
|
37779
|
+
}
|
|
37780
|
+
function isSecureEndpoint() {
|
|
37781
|
+
const { stack } = new Error();
|
|
37782
|
+
if (typeof stack !== "string")
|
|
37783
|
+
return false;
|
|
37784
|
+
return stack.split("\n").some((l) => l.indexOf("(https.js:") !== -1 || l.indexOf("node:https:") !== -1);
|
|
37785
|
+
}
|
|
37786
|
+
function createAgent(callback, opts) {
|
|
37787
|
+
return new createAgent.Agent(callback, opts);
|
|
37788
|
+
}
|
|
37789
|
+
(function(createAgent2) {
|
|
37790
|
+
class Agent extends events_1.EventEmitter {
|
|
37791
|
+
constructor(callback, _opts) {
|
|
37792
|
+
super();
|
|
37793
|
+
let opts = _opts;
|
|
37794
|
+
if (typeof callback === "function") {
|
|
37795
|
+
this.callback = callback;
|
|
37796
|
+
} else if (callback) {
|
|
37797
|
+
opts = callback;
|
|
37798
|
+
}
|
|
37799
|
+
this.timeout = null;
|
|
37800
|
+
if (opts && typeof opts.timeout === "number") {
|
|
37801
|
+
this.timeout = opts.timeout;
|
|
37802
|
+
}
|
|
37803
|
+
this.maxFreeSockets = 1;
|
|
37804
|
+
this.maxSockets = 1;
|
|
37805
|
+
this.maxTotalSockets = Infinity;
|
|
37806
|
+
this.sockets = {};
|
|
37807
|
+
this.freeSockets = {};
|
|
37808
|
+
this.requests = {};
|
|
37809
|
+
this.options = {};
|
|
37810
|
+
}
|
|
37811
|
+
get defaultPort() {
|
|
37812
|
+
if (typeof this.explicitDefaultPort === "number") {
|
|
37813
|
+
return this.explicitDefaultPort;
|
|
37814
|
+
}
|
|
37815
|
+
return isSecureEndpoint() ? 443 : 80;
|
|
37816
|
+
}
|
|
37817
|
+
set defaultPort(v) {
|
|
37818
|
+
this.explicitDefaultPort = v;
|
|
37819
|
+
}
|
|
37820
|
+
get protocol() {
|
|
37821
|
+
if (typeof this.explicitProtocol === "string") {
|
|
37822
|
+
return this.explicitProtocol;
|
|
37823
|
+
}
|
|
37824
|
+
return isSecureEndpoint() ? "https:" : "http:";
|
|
37825
|
+
}
|
|
37826
|
+
set protocol(v) {
|
|
37827
|
+
this.explicitProtocol = v;
|
|
37828
|
+
}
|
|
37829
|
+
callback(req, opts, fn) {
|
|
37830
|
+
throw new Error('"agent-base" has no default implementation, you must subclass and override `callback()`');
|
|
37831
|
+
}
|
|
37832
|
+
/**
|
|
37833
|
+
* Called by node-core's "_http_client.js" module when creating
|
|
37834
|
+
* a new HTTP request with this Agent instance.
|
|
37835
|
+
*
|
|
37836
|
+
* @api public
|
|
37837
|
+
*/
|
|
37838
|
+
addRequest(req, _opts) {
|
|
37839
|
+
const opts = Object.assign({}, _opts);
|
|
37840
|
+
if (typeof opts.secureEndpoint !== "boolean") {
|
|
37841
|
+
opts.secureEndpoint = isSecureEndpoint();
|
|
37842
|
+
}
|
|
37843
|
+
if (opts.host == null) {
|
|
37844
|
+
opts.host = "localhost";
|
|
37845
|
+
}
|
|
37846
|
+
if (opts.port == null) {
|
|
37847
|
+
opts.port = opts.secureEndpoint ? 443 : 80;
|
|
37848
|
+
}
|
|
37849
|
+
if (opts.protocol == null) {
|
|
37850
|
+
opts.protocol = opts.secureEndpoint ? "https:" : "http:";
|
|
37851
|
+
}
|
|
37852
|
+
if (opts.host && opts.path) {
|
|
37853
|
+
delete opts.path;
|
|
37854
|
+
}
|
|
37855
|
+
delete opts.agent;
|
|
37856
|
+
delete opts.hostname;
|
|
37857
|
+
delete opts._defaultAgent;
|
|
37858
|
+
delete opts.defaultPort;
|
|
37859
|
+
delete opts.createConnection;
|
|
37860
|
+
req._last = true;
|
|
37861
|
+
req.shouldKeepAlive = false;
|
|
37862
|
+
let timedOut = false;
|
|
37863
|
+
let timeoutId = null;
|
|
37864
|
+
const timeoutMs = opts.timeout || this.timeout;
|
|
37865
|
+
const onerror = (err) => {
|
|
37866
|
+
if (req._hadError)
|
|
37867
|
+
return;
|
|
37868
|
+
req.emit("error", err);
|
|
37869
|
+
req._hadError = true;
|
|
37870
|
+
};
|
|
37871
|
+
const ontimeout = () => {
|
|
37872
|
+
timeoutId = null;
|
|
37873
|
+
timedOut = true;
|
|
37874
|
+
const err = new Error(`A "socket" was not created for HTTP request before ${timeoutMs}ms`);
|
|
37875
|
+
err.code = "ETIMEOUT";
|
|
37876
|
+
onerror(err);
|
|
37877
|
+
};
|
|
37878
|
+
const callbackError = (err) => {
|
|
37879
|
+
if (timedOut)
|
|
37880
|
+
return;
|
|
37881
|
+
if (timeoutId !== null) {
|
|
37882
|
+
clearTimeout(timeoutId);
|
|
37883
|
+
timeoutId = null;
|
|
37884
|
+
}
|
|
37885
|
+
onerror(err);
|
|
37886
|
+
};
|
|
37887
|
+
const onsocket = (socket) => {
|
|
37888
|
+
if (timedOut)
|
|
37889
|
+
return;
|
|
37890
|
+
if (timeoutId != null) {
|
|
37891
|
+
clearTimeout(timeoutId);
|
|
37892
|
+
timeoutId = null;
|
|
37893
|
+
}
|
|
37894
|
+
if (isAgent(socket)) {
|
|
37895
|
+
debug("Callback returned another Agent instance %o", socket.constructor.name);
|
|
37896
|
+
socket.addRequest(req, opts);
|
|
37897
|
+
return;
|
|
37898
|
+
}
|
|
37899
|
+
if (socket) {
|
|
37900
|
+
socket.once("free", () => {
|
|
37901
|
+
this.freeSocket(socket, opts);
|
|
37902
|
+
});
|
|
37903
|
+
req.onSocket(socket);
|
|
37904
|
+
return;
|
|
37905
|
+
}
|
|
37906
|
+
const err = new Error(`no Duplex stream was returned to agent-base for \`${req.method} ${req.path}\``);
|
|
37907
|
+
onerror(err);
|
|
37908
|
+
};
|
|
37909
|
+
if (typeof this.callback !== "function") {
|
|
37910
|
+
onerror(new Error("`callback` is not defined"));
|
|
37911
|
+
return;
|
|
37912
|
+
}
|
|
37913
|
+
if (!this.promisifiedCallback) {
|
|
37914
|
+
if (this.callback.length >= 3) {
|
|
37915
|
+
debug("Converting legacy callback function to promise");
|
|
37916
|
+
this.promisifiedCallback = promisify_1.default(this.callback);
|
|
37917
|
+
} else {
|
|
37918
|
+
this.promisifiedCallback = this.callback;
|
|
37919
|
+
}
|
|
37920
|
+
}
|
|
37921
|
+
if (typeof timeoutMs === "number" && timeoutMs > 0) {
|
|
37922
|
+
timeoutId = setTimeout(ontimeout, timeoutMs);
|
|
37923
|
+
}
|
|
37924
|
+
if ("port" in opts && typeof opts.port !== "number") {
|
|
37925
|
+
opts.port = Number(opts.port);
|
|
37926
|
+
}
|
|
37927
|
+
try {
|
|
37928
|
+
debug("Resolving socket for %o request: %o", opts.protocol, `${req.method} ${req.path}`);
|
|
37929
|
+
Promise.resolve(this.promisifiedCallback(req, opts)).then(onsocket, callbackError);
|
|
37930
|
+
} catch (err) {
|
|
37931
|
+
Promise.reject(err).catch(callbackError);
|
|
37932
|
+
}
|
|
37933
|
+
}
|
|
37934
|
+
freeSocket(socket, opts) {
|
|
37935
|
+
debug("Freeing socket %o %o", socket.constructor.name, opts);
|
|
37936
|
+
socket.destroy();
|
|
37937
|
+
}
|
|
37938
|
+
destroy() {
|
|
37939
|
+
debug("Destroying agent %o", this.constructor.name);
|
|
37940
|
+
}
|
|
37941
|
+
}
|
|
37942
|
+
createAgent2.Agent = Agent;
|
|
37943
|
+
createAgent2.prototype = createAgent2.Agent.prototype;
|
|
37944
|
+
})(createAgent || (createAgent = {}));
|
|
37945
|
+
module.exports = createAgent;
|
|
37946
|
+
}
|
|
37947
|
+
});
|
|
37948
|
+
|
|
37949
|
+
// ../../node_modules/https-proxy-agent/dist/parse-proxy-response.js
|
|
37950
|
+
var require_parse_proxy_response = __commonJS({
|
|
37951
|
+
"../../node_modules/https-proxy-agent/dist/parse-proxy-response.js"(exports) {
|
|
37952
|
+
"use strict";
|
|
37953
|
+
init_cjs_shims();
|
|
37954
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
37955
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
37956
|
+
};
|
|
37957
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
37958
|
+
var debug_1 = __importDefault(require_src3());
|
|
37959
|
+
var debug = debug_1.default("https-proxy-agent:parse-proxy-response");
|
|
37960
|
+
function parseProxyResponse(socket) {
|
|
37961
|
+
return new Promise((resolve, reject) => {
|
|
37962
|
+
let buffersLength = 0;
|
|
37963
|
+
const buffers = [];
|
|
37964
|
+
function read() {
|
|
37965
|
+
const b = socket.read();
|
|
37966
|
+
if (b)
|
|
37967
|
+
ondata(b);
|
|
37968
|
+
else
|
|
37969
|
+
socket.once("readable", read);
|
|
37970
|
+
}
|
|
37971
|
+
function cleanup() {
|
|
37972
|
+
socket.removeListener("end", onend);
|
|
37973
|
+
socket.removeListener("error", onerror);
|
|
37974
|
+
socket.removeListener("close", onclose);
|
|
37975
|
+
socket.removeListener("readable", read);
|
|
37976
|
+
}
|
|
37977
|
+
function onclose(err) {
|
|
37978
|
+
debug("onclose had error %o", err);
|
|
37979
|
+
}
|
|
37980
|
+
function onend() {
|
|
37981
|
+
debug("onend");
|
|
37982
|
+
}
|
|
37983
|
+
function onerror(err) {
|
|
37984
|
+
cleanup();
|
|
37985
|
+
debug("onerror %o", err);
|
|
37986
|
+
reject(err);
|
|
37987
|
+
}
|
|
37988
|
+
function ondata(b) {
|
|
37989
|
+
buffers.push(b);
|
|
37990
|
+
buffersLength += b.length;
|
|
37991
|
+
const buffered = Buffer.concat(buffers, buffersLength);
|
|
37992
|
+
const endOfHeaders = buffered.indexOf("\r\n\r\n");
|
|
37993
|
+
if (endOfHeaders === -1) {
|
|
37994
|
+
debug("have not received end of HTTP headers yet...");
|
|
37995
|
+
read();
|
|
37996
|
+
return;
|
|
37997
|
+
}
|
|
37998
|
+
const firstLine = buffered.toString("ascii", 0, buffered.indexOf("\r\n"));
|
|
37999
|
+
const statusCode = +firstLine.split(" ")[1];
|
|
38000
|
+
debug("got proxy server response: %o", firstLine);
|
|
38001
|
+
resolve({
|
|
38002
|
+
statusCode,
|
|
38003
|
+
buffered
|
|
38004
|
+
});
|
|
38005
|
+
}
|
|
38006
|
+
socket.on("error", onerror);
|
|
38007
|
+
socket.on("close", onclose);
|
|
38008
|
+
socket.on("end", onend);
|
|
38009
|
+
read();
|
|
38010
|
+
});
|
|
38011
|
+
}
|
|
38012
|
+
exports.default = parseProxyResponse;
|
|
38013
|
+
}
|
|
38014
|
+
});
|
|
38015
|
+
|
|
38016
|
+
// ../../node_modules/https-proxy-agent/dist/agent.js
|
|
38017
|
+
var require_agent = __commonJS({
|
|
38018
|
+
"../../node_modules/https-proxy-agent/dist/agent.js"(exports) {
|
|
38019
|
+
"use strict";
|
|
38020
|
+
init_cjs_shims();
|
|
38021
|
+
var __awaiter = exports && exports.__awaiter || function(thisArg, _arguments, P, generator) {
|
|
38022
|
+
function adopt(value) {
|
|
38023
|
+
return value instanceof P ? value : new P(function(resolve) {
|
|
38024
|
+
resolve(value);
|
|
38025
|
+
});
|
|
38026
|
+
}
|
|
38027
|
+
return new (P || (P = Promise))(function(resolve, reject) {
|
|
38028
|
+
function fulfilled(value) {
|
|
38029
|
+
try {
|
|
38030
|
+
step(generator.next(value));
|
|
38031
|
+
} catch (e) {
|
|
38032
|
+
reject(e);
|
|
38033
|
+
}
|
|
38034
|
+
}
|
|
38035
|
+
function rejected(value) {
|
|
38036
|
+
try {
|
|
38037
|
+
step(generator["throw"](value));
|
|
38038
|
+
} catch (e) {
|
|
38039
|
+
reject(e);
|
|
38040
|
+
}
|
|
38041
|
+
}
|
|
38042
|
+
function step(result) {
|
|
38043
|
+
result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected);
|
|
38044
|
+
}
|
|
38045
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
38046
|
+
});
|
|
38047
|
+
};
|
|
38048
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
38049
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
38050
|
+
};
|
|
38051
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38052
|
+
var net_1 = __importDefault(__require("net"));
|
|
38053
|
+
var tls_1 = __importDefault(__require("tls"));
|
|
38054
|
+
var url_1 = __importDefault(__require("url"));
|
|
38055
|
+
var assert_1 = __importDefault(__require("assert"));
|
|
38056
|
+
var debug_1 = __importDefault(require_src3());
|
|
38057
|
+
var agent_base_1 = require_src4();
|
|
38058
|
+
var parse_proxy_response_1 = __importDefault(require_parse_proxy_response());
|
|
38059
|
+
var debug = debug_1.default("https-proxy-agent:agent");
|
|
38060
|
+
var HttpsProxyAgent = class extends agent_base_1.Agent {
|
|
38061
|
+
constructor(_opts) {
|
|
38062
|
+
let opts;
|
|
38063
|
+
if (typeof _opts === "string") {
|
|
38064
|
+
opts = url_1.default.parse(_opts);
|
|
38065
|
+
} else {
|
|
38066
|
+
opts = _opts;
|
|
38067
|
+
}
|
|
38068
|
+
if (!opts) {
|
|
38069
|
+
throw new Error("an HTTP(S) proxy server `host` and `port` must be specified!");
|
|
38070
|
+
}
|
|
38071
|
+
debug("creating new HttpsProxyAgent instance: %o", opts);
|
|
38072
|
+
super(opts);
|
|
38073
|
+
const proxy = Object.assign({}, opts);
|
|
38074
|
+
this.secureProxy = opts.secureProxy || isHTTPS(proxy.protocol);
|
|
38075
|
+
proxy.host = proxy.hostname || proxy.host;
|
|
38076
|
+
if (typeof proxy.port === "string") {
|
|
38077
|
+
proxy.port = parseInt(proxy.port, 10);
|
|
38078
|
+
}
|
|
38079
|
+
if (!proxy.port && proxy.host) {
|
|
38080
|
+
proxy.port = this.secureProxy ? 443 : 80;
|
|
38081
|
+
}
|
|
38082
|
+
if (this.secureProxy && !("ALPNProtocols" in proxy)) {
|
|
38083
|
+
proxy.ALPNProtocols = ["http 1.1"];
|
|
38084
|
+
}
|
|
38085
|
+
if (proxy.host && proxy.path) {
|
|
38086
|
+
delete proxy.path;
|
|
38087
|
+
delete proxy.pathname;
|
|
38088
|
+
}
|
|
38089
|
+
this.proxy = proxy;
|
|
38090
|
+
}
|
|
38091
|
+
/**
|
|
38092
|
+
* Called when the node-core HTTP client library is creating a
|
|
38093
|
+
* new HTTP request.
|
|
38094
|
+
*
|
|
38095
|
+
* @api protected
|
|
38096
|
+
*/
|
|
38097
|
+
callback(req, opts) {
|
|
38098
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
38099
|
+
const { proxy, secureProxy } = this;
|
|
38100
|
+
let socket;
|
|
38101
|
+
if (secureProxy) {
|
|
38102
|
+
debug("Creating `tls.Socket`: %o", proxy);
|
|
38103
|
+
socket = tls_1.default.connect(proxy);
|
|
38104
|
+
} else {
|
|
38105
|
+
debug("Creating `net.Socket`: %o", proxy);
|
|
38106
|
+
socket = net_1.default.connect(proxy);
|
|
38107
|
+
}
|
|
38108
|
+
const headers = Object.assign({}, proxy.headers);
|
|
38109
|
+
const hostname = `${opts.host}:${opts.port}`;
|
|
38110
|
+
let payload = `CONNECT ${hostname} HTTP/1.1\r
|
|
38111
|
+
`;
|
|
38112
|
+
if (proxy.auth) {
|
|
38113
|
+
headers["Proxy-Authorization"] = `Basic ${Buffer.from(proxy.auth).toString("base64")}`;
|
|
38114
|
+
}
|
|
38115
|
+
let { host, port, secureEndpoint } = opts;
|
|
38116
|
+
if (!isDefaultPort(port, secureEndpoint)) {
|
|
38117
|
+
host += `:${port}`;
|
|
38118
|
+
}
|
|
38119
|
+
headers.Host = host;
|
|
38120
|
+
headers.Connection = "close";
|
|
38121
|
+
for (const name of Object.keys(headers)) {
|
|
38122
|
+
payload += `${name}: ${headers[name]}\r
|
|
38123
|
+
`;
|
|
38124
|
+
}
|
|
38125
|
+
const proxyResponsePromise = parse_proxy_response_1.default(socket);
|
|
38126
|
+
socket.write(`${payload}\r
|
|
38127
|
+
`);
|
|
38128
|
+
const { statusCode, buffered } = yield proxyResponsePromise;
|
|
38129
|
+
if (statusCode === 200) {
|
|
38130
|
+
req.once("socket", resume);
|
|
38131
|
+
if (opts.secureEndpoint) {
|
|
38132
|
+
debug("Upgrading socket connection to TLS");
|
|
38133
|
+
const servername = opts.servername || opts.host;
|
|
38134
|
+
return tls_1.default.connect(Object.assign(Object.assign({}, omit(opts, "host", "hostname", "path", "port")), {
|
|
38135
|
+
socket,
|
|
38136
|
+
servername
|
|
38137
|
+
}));
|
|
38138
|
+
}
|
|
38139
|
+
return socket;
|
|
38140
|
+
}
|
|
38141
|
+
socket.destroy();
|
|
38142
|
+
const fakeSocket = new net_1.default.Socket({ writable: false });
|
|
38143
|
+
fakeSocket.readable = true;
|
|
38144
|
+
req.once("socket", (s) => {
|
|
38145
|
+
debug("replaying proxy buffer for failed request");
|
|
38146
|
+
assert_1.default(s.listenerCount("data") > 0);
|
|
38147
|
+
s.push(buffered);
|
|
38148
|
+
s.push(null);
|
|
38149
|
+
});
|
|
38150
|
+
return fakeSocket;
|
|
38151
|
+
});
|
|
38152
|
+
}
|
|
38153
|
+
};
|
|
38154
|
+
exports.default = HttpsProxyAgent;
|
|
38155
|
+
function resume(socket) {
|
|
38156
|
+
socket.resume();
|
|
38157
|
+
}
|
|
38158
|
+
function isDefaultPort(port, secure) {
|
|
38159
|
+
return Boolean(!secure && port === 80 || secure && port === 443);
|
|
38160
|
+
}
|
|
38161
|
+
function isHTTPS(protocol) {
|
|
38162
|
+
return typeof protocol === "string" ? /^https:?$/i.test(protocol) : false;
|
|
38163
|
+
}
|
|
38164
|
+
function omit(obj, ...keys) {
|
|
38165
|
+
const ret = {};
|
|
38166
|
+
let key;
|
|
38167
|
+
for (key in obj) {
|
|
38168
|
+
if (!keys.includes(key)) {
|
|
38169
|
+
ret[key] = obj[key];
|
|
38170
|
+
}
|
|
38171
|
+
}
|
|
38172
|
+
return ret;
|
|
38173
|
+
}
|
|
38174
|
+
}
|
|
38175
|
+
});
|
|
38176
|
+
|
|
38177
|
+
// ../../node_modules/https-proxy-agent/dist/index.js
|
|
38178
|
+
var require_dist3 = __commonJS({
|
|
38179
|
+
"../../node_modules/https-proxy-agent/dist/index.js"(exports, module) {
|
|
38180
|
+
"use strict";
|
|
38181
|
+
init_cjs_shims();
|
|
38182
|
+
var __importDefault = exports && exports.__importDefault || function(mod) {
|
|
38183
|
+
return mod && mod.__esModule ? mod : { "default": mod };
|
|
38184
|
+
};
|
|
38185
|
+
var agent_1 = __importDefault(require_agent());
|
|
38186
|
+
function createHttpsProxyAgent(opts) {
|
|
38187
|
+
return new agent_1.default(opts);
|
|
38188
|
+
}
|
|
38189
|
+
(function(createHttpsProxyAgent2) {
|
|
38190
|
+
createHttpsProxyAgent2.HttpsProxyAgent = agent_1.default;
|
|
38191
|
+
createHttpsProxyAgent2.prototype = agent_1.default.prototype;
|
|
38192
|
+
})(createHttpsProxyAgent || (createHttpsProxyAgent = {}));
|
|
38193
|
+
module.exports = createHttpsProxyAgent;
|
|
38194
|
+
}
|
|
38195
|
+
});
|
|
38196
|
+
|
|
36905
38197
|
// ../../node_modules/follow-redirects/debug.js
|
|
36906
38198
|
var require_debug2 = __commonJS({
|
|
36907
38199
|
"../../node_modules/follow-redirects/debug.js"(exports, module) {
|
|
@@ -37443,6 +38735,7 @@ var require_axios = __commonJS({
|
|
|
37443
38735
|
var FormData$1 = require_form_data();
|
|
37444
38736
|
var crypto = __require("crypto");
|
|
37445
38737
|
var url = __require("url");
|
|
38738
|
+
var HttpsProxyAgent = require_dist3();
|
|
37446
38739
|
var http = __require("http");
|
|
37447
38740
|
var https = __require("https");
|
|
37448
38741
|
var http2 = __require("http2");
|
|
@@ -37467,6 +38760,25 @@ var require_axios = __commonJS({
|
|
|
37467
38760
|
iterator,
|
|
37468
38761
|
toStringTag
|
|
37469
38762
|
} = Symbol;
|
|
38763
|
+
var hasOwnProperty = (({
|
|
38764
|
+
hasOwnProperty: hasOwnProperty2
|
|
38765
|
+
}) => (obj, prop) => hasOwnProperty2.call(obj, prop))(Object.prototype);
|
|
38766
|
+
var hasOwnInPrototypeChain = (thing, prop) => {
|
|
38767
|
+
let obj = thing;
|
|
38768
|
+
const seen = [];
|
|
38769
|
+
while (obj != null && obj !== Object.prototype) {
|
|
38770
|
+
if (seen.indexOf(obj) !== -1) {
|
|
38771
|
+
return false;
|
|
38772
|
+
}
|
|
38773
|
+
seen.push(obj);
|
|
38774
|
+
if (hasOwnProperty(obj, prop)) {
|
|
38775
|
+
return true;
|
|
38776
|
+
}
|
|
38777
|
+
obj = getPrototypeOf(obj);
|
|
38778
|
+
}
|
|
38779
|
+
return false;
|
|
38780
|
+
};
|
|
38781
|
+
var getSafeProp = (obj, prop) => obj != null && hasOwnInPrototypeChain(obj, prop) ? obj[prop] : void 0;
|
|
37470
38782
|
var kindOf = /* @__PURE__ */ ((cache) => (thing) => {
|
|
37471
38783
|
const str = toString.call(thing);
|
|
37472
38784
|
return cache[str] || (cache[str] = str.slice(8, -1).toLowerCase());
|
|
@@ -37499,11 +38811,14 @@ var require_axios = __commonJS({
|
|
|
37499
38811
|
var isObject = (thing) => thing !== null && typeof thing === "object";
|
|
37500
38812
|
var isBoolean = (thing) => thing === true || thing === false;
|
|
37501
38813
|
var isPlainObject2 = (val) => {
|
|
37502
|
-
if (
|
|
38814
|
+
if (!isObject(val)) {
|
|
37503
38815
|
return false;
|
|
37504
38816
|
}
|
|
37505
38817
|
const prototype2 = getPrototypeOf(val);
|
|
37506
|
-
return (prototype2 === null || prototype2 === Object.prototype ||
|
|
38818
|
+
return (prototype2 === null || prototype2 === Object.prototype || getPrototypeOf(prototype2) === null) && // Treat any genuine (non-Object.prototype-polluted) Symbol.toStringTag or
|
|
38819
|
+
// Symbol.iterator as evidence the value is a tagged/iterable type rather
|
|
38820
|
+
// than a plain object, while ignoring keys injected onto Object.prototype.
|
|
38821
|
+
!hasOwnInPrototypeChain(val, toStringTag) && !hasOwnInPrototypeChain(val, iterator);
|
|
37507
38822
|
};
|
|
37508
38823
|
var isEmptyObject = (val) => {
|
|
37509
38824
|
if (!isObject(val) || isBuffer(val)) {
|
|
@@ -37616,7 +38931,7 @@ var require_axios = __commonJS({
|
|
|
37616
38931
|
if (key === "__proto__" || key === "constructor" || key === "prototype") {
|
|
37617
38932
|
return;
|
|
37618
38933
|
}
|
|
37619
|
-
const targetKey = caseless && findKey(result, key) || key;
|
|
38934
|
+
const targetKey = caseless && typeof key === "string" && findKey(result, key) || key;
|
|
37620
38935
|
const existing = hasOwnProperty(result, targetKey) ? result[targetKey] : void 0;
|
|
37621
38936
|
if (isPlainObject2(existing) && isPlainObject2(val)) {
|
|
37622
38937
|
result[targetKey] = merge(existing, val);
|
|
@@ -37629,7 +38944,21 @@ var require_axios = __commonJS({
|
|
|
37629
38944
|
}
|
|
37630
38945
|
};
|
|
37631
38946
|
for (let i = 0, l = objs.length; i < l; i++) {
|
|
37632
|
-
|
|
38947
|
+
const source = objs[i];
|
|
38948
|
+
if (!source || isBuffer(source)) {
|
|
38949
|
+
continue;
|
|
38950
|
+
}
|
|
38951
|
+
forEach(source, assignValue);
|
|
38952
|
+
if (typeof source !== "object" || isArray(source)) {
|
|
38953
|
+
continue;
|
|
38954
|
+
}
|
|
38955
|
+
const symbols = Object.getOwnPropertySymbols(source);
|
|
38956
|
+
for (let j = 0; j < symbols.length; j++) {
|
|
38957
|
+
const symbol = symbols[j];
|
|
38958
|
+
if (propertyIsEnumerable.call(source, symbol)) {
|
|
38959
|
+
assignValue(source[symbol], symbol);
|
|
38960
|
+
}
|
|
38961
|
+
}
|
|
37633
38962
|
}
|
|
37634
38963
|
return result;
|
|
37635
38964
|
}
|
|
@@ -37755,9 +39084,9 @@ var require_axios = __commonJS({
|
|
|
37755
39084
|
return p1.toUpperCase() + p2;
|
|
37756
39085
|
});
|
|
37757
39086
|
};
|
|
37758
|
-
var
|
|
37759
|
-
|
|
37760
|
-
}
|
|
39087
|
+
var {
|
|
39088
|
+
propertyIsEnumerable
|
|
39089
|
+
} = Object.prototype;
|
|
37761
39090
|
var isRegExp = kindOfTest("RegExp");
|
|
37762
39091
|
var reduceDescriptors = (obj, reducer) => {
|
|
37763
39092
|
const descriptors = Object.getOwnPropertyDescriptors(obj);
|
|
@@ -37809,29 +39138,29 @@ var require_axios = __commonJS({
|
|
|
37809
39138
|
return !!(thing && isFunction$1(thing.append) && thing[toStringTag] === "FormData" && thing[iterator]);
|
|
37810
39139
|
}
|
|
37811
39140
|
var toJSONObject = (obj) => {
|
|
37812
|
-
const
|
|
37813
|
-
const visit = (source
|
|
39141
|
+
const visited = /* @__PURE__ */ new WeakSet();
|
|
39142
|
+
const visit = (source) => {
|
|
37814
39143
|
if (isObject(source)) {
|
|
37815
|
-
if (
|
|
39144
|
+
if (visited.has(source)) {
|
|
37816
39145
|
return;
|
|
37817
39146
|
}
|
|
37818
39147
|
if (isBuffer(source)) {
|
|
37819
39148
|
return source;
|
|
37820
39149
|
}
|
|
37821
39150
|
if (!("toJSON" in source)) {
|
|
37822
|
-
|
|
39151
|
+
visited.add(source);
|
|
37823
39152
|
const target = isArray(source) ? [] : {};
|
|
37824
39153
|
forEach(source, (value, key) => {
|
|
37825
|
-
const reducedValue = visit(value
|
|
39154
|
+
const reducedValue = visit(value);
|
|
37826
39155
|
!isUndefined(reducedValue) && (target[key] = reducedValue);
|
|
37827
39156
|
});
|
|
37828
|
-
|
|
39157
|
+
visited.delete(source);
|
|
37829
39158
|
return target;
|
|
37830
39159
|
}
|
|
37831
39160
|
}
|
|
37832
39161
|
return source;
|
|
37833
39162
|
};
|
|
37834
|
-
return visit(obj
|
|
39163
|
+
return visit(obj);
|
|
37835
39164
|
};
|
|
37836
39165
|
var isAsyncFn = kindOfTest("AsyncFunction");
|
|
37837
39166
|
var isThenable = (thing) => thing && (isObject(thing) || isFunction$1(thing)) && isFunction$1(thing.then) && isFunction$1(thing.catch);
|
|
@@ -37856,6 +39185,7 @@ var require_axios = __commonJS({
|
|
|
37856
39185
|
})(typeof setImmediate === "function", isFunction$1(_global.postMessage));
|
|
37857
39186
|
var asap = typeof queueMicrotask !== "undefined" ? queueMicrotask.bind(_global) : typeof process !== "undefined" && process.nextTick || _setImmediate;
|
|
37858
39187
|
var isIterable = (thing) => thing != null && isFunction$1(thing[iterator]);
|
|
39188
|
+
var isSafeIterable = (thing) => thing != null && hasOwnInPrototypeChain(thing, iterator) && isIterable(thing);
|
|
37859
39189
|
var utils$1 = {
|
|
37860
39190
|
isArray,
|
|
37861
39191
|
isArrayBuffer,
|
|
@@ -37901,6 +39231,8 @@ var require_axios = __commonJS({
|
|
|
37901
39231
|
hasOwnProperty,
|
|
37902
39232
|
hasOwnProp: hasOwnProperty,
|
|
37903
39233
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
39234
|
+
hasOwnInPrototypeChain,
|
|
39235
|
+
getSafeProp,
|
|
37904
39236
|
reduceDescriptors,
|
|
37905
39237
|
freezeMethods,
|
|
37906
39238
|
toObjectSet,
|
|
@@ -37916,7 +39248,8 @@ var require_axios = __commonJS({
|
|
|
37916
39248
|
isThenable,
|
|
37917
39249
|
setImmediate: _setImmediate,
|
|
37918
39250
|
asap,
|
|
37919
|
-
isIterable
|
|
39251
|
+
isIterable,
|
|
39252
|
+
isSafeIterable
|
|
37920
39253
|
};
|
|
37921
39254
|
var ignoreDuplicateOf = utils$1.toObjectSet(["age", "authorization", "content-length", "content-type", "etag", "expires", "from", "host", "if-modified-since", "if-unmodified-since", "last-modified", "location", "max-forwards", "proxy-authorization", "referer", "retry-after", "user-agent"]);
|
|
37922
39255
|
var parseHeaders = (rawHeaders) => {
|
|
@@ -37943,8 +39276,6 @@ var require_axios = __commonJS({
|
|
|
37943
39276
|
});
|
|
37944
39277
|
return parsed;
|
|
37945
39278
|
};
|
|
37946
|
-
var $internals = Symbol("internals");
|
|
37947
|
-
var INVALID_HEADER_VALUE_CHARS_RE = /[^\x09\x20-\x7E\x80-\xFF]/g;
|
|
37948
39279
|
function trimSPorHTAB(str) {
|
|
37949
39280
|
let start = 0;
|
|
37950
39281
|
let end = str.length;
|
|
@@ -37964,12 +39295,27 @@ var require_axios = __commonJS({
|
|
|
37964
39295
|
}
|
|
37965
39296
|
return start === 0 && end === str.length ? str : str.slice(start, end);
|
|
37966
39297
|
}
|
|
39298
|
+
var INVALID_UNICODE_HEADER_VALUE_CHARS = new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+", "g");
|
|
39299
|
+
var INVALID_BYTE_STRING_HEADER_VALUE_CHARS = new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+", "g");
|
|
39300
|
+
function sanitizeValue(value, invalidChars) {
|
|
39301
|
+
if (utils$1.isArray(value)) {
|
|
39302
|
+
return value.map((item) => sanitizeValue(item, invalidChars));
|
|
39303
|
+
}
|
|
39304
|
+
return trimSPorHTAB(String(value).replace(invalidChars, ""));
|
|
39305
|
+
}
|
|
39306
|
+
var sanitizeHeaderValue = (value) => sanitizeValue(value, INVALID_UNICODE_HEADER_VALUE_CHARS);
|
|
39307
|
+
var sanitizeByteStringHeaderValue = (value) => sanitizeValue(value, INVALID_BYTE_STRING_HEADER_VALUE_CHARS);
|
|
39308
|
+
function toByteStringHeaderObject(headers) {
|
|
39309
|
+
const byteStringHeaders = /* @__PURE__ */ Object.create(null);
|
|
39310
|
+
utils$1.forEach(headers.toJSON(), (value, header) => {
|
|
39311
|
+
byteStringHeaders[header] = sanitizeByteStringHeaderValue(value);
|
|
39312
|
+
});
|
|
39313
|
+
return byteStringHeaders;
|
|
39314
|
+
}
|
|
39315
|
+
var $internals = Symbol("internals");
|
|
37967
39316
|
function normalizeHeader(header) {
|
|
37968
39317
|
return header && String(header).trim().toLowerCase();
|
|
37969
39318
|
}
|
|
37970
|
-
function sanitizeHeaderValue(str) {
|
|
37971
|
-
return trimSPorHTAB(str.replace(INVALID_HEADER_VALUE_CHARS_RE, ""));
|
|
37972
|
-
}
|
|
37973
39319
|
function normalizeValue(value) {
|
|
37974
39320
|
if (value === false || value == null) {
|
|
37975
39321
|
return value;
|
|
@@ -38030,7 +39376,7 @@ var require_axios = __commonJS({
|
|
|
38030
39376
|
function setHeader(_value, _header, _rewrite) {
|
|
38031
39377
|
const lHeader = normalizeHeader(_header);
|
|
38032
39378
|
if (!lHeader) {
|
|
38033
|
-
|
|
39379
|
+
return;
|
|
38034
39380
|
}
|
|
38035
39381
|
const key = utils$1.findKey(self2, lHeader);
|
|
38036
39382
|
if (!key || self2[key] === void 0 || _rewrite === true || _rewrite === void 0 && self2[key] !== false) {
|
|
@@ -38042,13 +39388,19 @@ var require_axios = __commonJS({
|
|
|
38042
39388
|
setHeaders(header, valueOrRewrite);
|
|
38043
39389
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
|
38044
39390
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
|
38045
|
-
} else if (utils$1.isObject(header) && utils$1.
|
|
38046
|
-
let obj =
|
|
39391
|
+
} else if (utils$1.isObject(header) && utils$1.isSafeIterable(header)) {
|
|
39392
|
+
let obj = /* @__PURE__ */ Object.create(null), dest, key;
|
|
38047
39393
|
for (const entry of header) {
|
|
38048
39394
|
if (!utils$1.isArray(entry)) {
|
|
38049
|
-
throw TypeError("Object iterator must return a key-value pair");
|
|
39395
|
+
throw new TypeError("Object iterator must return a key-value pair");
|
|
39396
|
+
}
|
|
39397
|
+
key = entry[0];
|
|
39398
|
+
if (utils$1.hasOwnProp(obj, key)) {
|
|
39399
|
+
dest = obj[key];
|
|
39400
|
+
obj[key] = utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]];
|
|
39401
|
+
} else {
|
|
39402
|
+
obj[key] = entry[1];
|
|
38050
39403
|
}
|
|
38051
|
-
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]] : entry[1];
|
|
38052
39404
|
}
|
|
38053
39405
|
setHeaders(obj, valueOrRewrite);
|
|
38054
39406
|
} else {
|
|
@@ -38256,7 +39608,13 @@ var require_axios = __commonJS({
|
|
|
38256
39608
|
var AxiosError = class _AxiosError extends Error {
|
|
38257
39609
|
static from(error, code, config, request, response, customProps) {
|
|
38258
39610
|
const axiosError = new _AxiosError(error.message, code || error.code, config, request, response);
|
|
38259
|
-
axiosError
|
|
39611
|
+
Object.defineProperty(axiosError, "cause", {
|
|
39612
|
+
__proto__: null,
|
|
39613
|
+
value: error,
|
|
39614
|
+
writable: true,
|
|
39615
|
+
enumerable: false,
|
|
39616
|
+
configurable: true
|
|
39617
|
+
});
|
|
38260
39618
|
axiosError.name = error.name;
|
|
38261
39619
|
if (error.status != null && axiosError.status == null) {
|
|
38262
39620
|
axiosError.status = error.status;
|
|
@@ -38333,6 +39691,7 @@ var require_axios = __commonJS({
|
|
|
38333
39691
|
AxiosError.ERR_NOT_SUPPORT = "ERR_NOT_SUPPORT";
|
|
38334
39692
|
AxiosError.ERR_INVALID_URL = "ERR_INVALID_URL";
|
|
38335
39693
|
AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED = "ERR_FORM_DATA_DEPTH_EXCEEDED";
|
|
39694
|
+
var DEFAULT_FORM_DATA_MAX_DEPTH = 100;
|
|
38336
39695
|
function isVisitable(thing) {
|
|
38337
39696
|
return utils$1.isPlainObject(thing) || utils$1.isArray(thing);
|
|
38338
39697
|
}
|
|
@@ -38370,8 +39729,9 @@ var require_axios = __commonJS({
|
|
|
38370
39729
|
const dots = options.dots;
|
|
38371
39730
|
const indexes = options.indexes;
|
|
38372
39731
|
const _Blob = options.Blob || typeof Blob !== "undefined" && Blob;
|
|
38373
|
-
const maxDepth = options.maxDepth === void 0 ?
|
|
39732
|
+
const maxDepth = options.maxDepth === void 0 ? DEFAULT_FORM_DATA_MAX_DEPTH : options.maxDepth;
|
|
38374
39733
|
const useBlob = _Blob && utils$1.isSpecCompliantForm(formData);
|
|
39734
|
+
const stack = [];
|
|
38375
39735
|
if (!utils$1.isFunction(visitor)) {
|
|
38376
39736
|
throw new TypeError("visitor must be a function");
|
|
38377
39737
|
}
|
|
@@ -38388,10 +39748,38 @@ var require_axios = __commonJS({
|
|
|
38388
39748
|
throw new AxiosError("Blob is not supported. Use a Buffer instead.");
|
|
38389
39749
|
}
|
|
38390
39750
|
if (utils$1.isArrayBuffer(value) || utils$1.isTypedArray(value)) {
|
|
38391
|
-
|
|
39751
|
+
if (useBlob && typeof _Blob === "function") {
|
|
39752
|
+
return new _Blob([value]);
|
|
39753
|
+
}
|
|
39754
|
+
if (typeof Buffer !== "undefined") {
|
|
39755
|
+
return Buffer.from(value);
|
|
39756
|
+
}
|
|
39757
|
+
throw new AxiosError("Blob is not supported. Use a Buffer instead.", AxiosError.ERR_NOT_SUPPORT);
|
|
38392
39758
|
}
|
|
38393
39759
|
return value;
|
|
38394
39760
|
}
|
|
39761
|
+
function throwIfMaxDepthExceeded(depth) {
|
|
39762
|
+
if (depth > maxDepth) {
|
|
39763
|
+
throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
39764
|
+
}
|
|
39765
|
+
}
|
|
39766
|
+
function stringifyWithDepthLimit(value, depth) {
|
|
39767
|
+
if (maxDepth === Infinity) {
|
|
39768
|
+
return JSON.stringify(value);
|
|
39769
|
+
}
|
|
39770
|
+
const ancestors = [];
|
|
39771
|
+
return JSON.stringify(value, function limitDepth(_key, currentValue) {
|
|
39772
|
+
if (!utils$1.isObject(currentValue)) {
|
|
39773
|
+
return currentValue;
|
|
39774
|
+
}
|
|
39775
|
+
while (ancestors.length && ancestors[ancestors.length - 1] !== this) {
|
|
39776
|
+
ancestors.pop();
|
|
39777
|
+
}
|
|
39778
|
+
ancestors.push(currentValue);
|
|
39779
|
+
throwIfMaxDepthExceeded(depth + ancestors.length - 1);
|
|
39780
|
+
return currentValue;
|
|
39781
|
+
});
|
|
39782
|
+
}
|
|
38395
39783
|
function defaultVisitor(value, key, path2) {
|
|
38396
39784
|
let arr = value;
|
|
38397
39785
|
if (utils$1.isReactNative(formData) && utils$1.isReactNativeBlob(value)) {
|
|
@@ -38401,7 +39789,7 @@ var require_axios = __commonJS({
|
|
|
38401
39789
|
if (value && !path2 && typeof value === "object") {
|
|
38402
39790
|
if (utils$1.endsWith(key, "{}")) {
|
|
38403
39791
|
key = metaTokens ? key : key.slice(0, -2);
|
|
38404
|
-
value =
|
|
39792
|
+
value = stringifyWithDepthLimit(value, 1);
|
|
38405
39793
|
} else if (utils$1.isArray(value) && isFlatArray(value) || (utils$1.isFileList(value) || utils$1.endsWith(key, "[]")) && (arr = utils$1.toArray(value))) {
|
|
38406
39794
|
key = removeBrackets(key);
|
|
38407
39795
|
arr.forEach(function each(el, index) {
|
|
@@ -38420,7 +39808,6 @@ var require_axios = __commonJS({
|
|
|
38420
39808
|
formData.append(renderKey(path2, key, dots), convertValue(value));
|
|
38421
39809
|
return false;
|
|
38422
39810
|
}
|
|
38423
|
-
const stack = [];
|
|
38424
39811
|
const exposedHelpers = Object.assign(predicates, {
|
|
38425
39812
|
defaultVisitor,
|
|
38426
39813
|
convertValue,
|
|
@@ -38429,11 +39816,9 @@ var require_axios = __commonJS({
|
|
|
38429
39816
|
function build(value, path2, depth = 0) {
|
|
38430
39817
|
if (utils$1.isUndefined(value))
|
|
38431
39818
|
return;
|
|
38432
|
-
|
|
38433
|
-
throw new AxiosError("Object is too deeply nested (" + depth + " levels). Max depth: " + maxDepth, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
38434
|
-
}
|
|
39819
|
+
throwIfMaxDepthExceeded(depth);
|
|
38435
39820
|
if (stack.indexOf(value) !== -1) {
|
|
38436
|
-
throw Error("Circular reference detected in " + path2.join("."));
|
|
39821
|
+
throw new Error("Circular reference detected in " + path2.join("."));
|
|
38437
39822
|
}
|
|
38438
39823
|
stack.push(value);
|
|
38439
39824
|
utils$1.forEach(value, function each(el, key) {
|
|
@@ -38472,9 +39857,7 @@ var require_axios = __commonJS({
|
|
|
38472
39857
|
this._pairs.push([name, value]);
|
|
38473
39858
|
};
|
|
38474
39859
|
prototype.toString = function toString2(encoder) {
|
|
38475
|
-
const _encode = encoder ?
|
|
38476
|
-
return encoder.call(this, value, encode$1);
|
|
38477
|
-
} : encode$1;
|
|
39860
|
+
const _encode = encoder ? (value) => encoder.call(this, value, encode$1) : encode$1;
|
|
38478
39861
|
return this._pairs.map(function each(pair) {
|
|
38479
39862
|
return _encode(pair[0]) + "=" + _encode(pair[1]);
|
|
38480
39863
|
}, "").join("&");
|
|
@@ -38486,11 +39869,12 @@ var require_axios = __commonJS({
|
|
|
38486
39869
|
if (!params) {
|
|
38487
39870
|
return url2;
|
|
38488
39871
|
}
|
|
38489
|
-
|
|
39872
|
+
url2 = url2 || "";
|
|
38490
39873
|
const _options = utils$1.isFunction(options) ? {
|
|
38491
39874
|
serialize: options
|
|
38492
39875
|
} : options;
|
|
38493
|
-
const
|
|
39876
|
+
const _encode = utils$1.getSafeProp(_options, "encode") || encode;
|
|
39877
|
+
const serializeFn = utils$1.getSafeProp(_options, "serialize");
|
|
38494
39878
|
let serializedParams;
|
|
38495
39879
|
if (serializeFn) {
|
|
38496
39880
|
serializedParams = serializeFn(params, _options);
|
|
@@ -38572,7 +39956,9 @@ var require_axios = __commonJS({
|
|
|
38572
39956
|
silentJSONParsing: true,
|
|
38573
39957
|
forcedJSONParsing: true,
|
|
38574
39958
|
clarifyTimeoutError: false,
|
|
38575
|
-
legacyInterceptorReqResOrdering: true
|
|
39959
|
+
legacyInterceptorReqResOrdering: true,
|
|
39960
|
+
advertiseZstdAcceptEncoding: false,
|
|
39961
|
+
validateStatusUndefinedResolves: true
|
|
38576
39962
|
};
|
|
38577
39963
|
var URLSearchParams = url.URLSearchParams;
|
|
38578
39964
|
var ALPHA = "abcdefghijklmnopqrstuvwxyz";
|
|
@@ -38637,10 +40023,21 @@ var require_axios = __commonJS({
|
|
|
38637
40023
|
...options
|
|
38638
40024
|
});
|
|
38639
40025
|
}
|
|
40026
|
+
var MAX_DEPTH = DEFAULT_FORM_DATA_MAX_DEPTH;
|
|
40027
|
+
function throwIfDepthExceeded(index) {
|
|
40028
|
+
if (index > MAX_DEPTH) {
|
|
40029
|
+
throw new AxiosError("FormData field is too deeply nested (" + index + " levels). Max depth: " + MAX_DEPTH, AxiosError.ERR_FORM_DATA_DEPTH_EXCEEDED);
|
|
40030
|
+
}
|
|
40031
|
+
}
|
|
38640
40032
|
function parsePropPath(name) {
|
|
38641
|
-
|
|
38642
|
-
|
|
38643
|
-
|
|
40033
|
+
const path2 = [];
|
|
40034
|
+
const pattern = /\w+|\[(\w*)]/g;
|
|
40035
|
+
let match;
|
|
40036
|
+
while ((match = pattern.exec(name)) !== null) {
|
|
40037
|
+
throwIfDepthExceeded(path2.length);
|
|
40038
|
+
path2.push(match[0] === "[]" ? "" : match[1] || match[0]);
|
|
40039
|
+
}
|
|
40040
|
+
return path2;
|
|
38644
40041
|
}
|
|
38645
40042
|
function arrayToObject(arr) {
|
|
38646
40043
|
const obj = {};
|
|
@@ -38656,6 +40053,7 @@ var require_axios = __commonJS({
|
|
|
38656
40053
|
}
|
|
38657
40054
|
function formDataToJSON(formData) {
|
|
38658
40055
|
function buildPath(path2, value, target, index) {
|
|
40056
|
+
throwIfDepthExceeded(index);
|
|
38659
40057
|
let name = path2[index++];
|
|
38660
40058
|
if (name === "__proto__")
|
|
38661
40059
|
return true;
|
|
@@ -38670,7 +40068,7 @@ var require_axios = __commonJS({
|
|
|
38670
40068
|
}
|
|
38671
40069
|
return !isNumericKey;
|
|
38672
40070
|
}
|
|
38673
|
-
if (!target
|
|
40071
|
+
if (!utils$1.hasOwnProp(target, name) || !utils$1.isObject(target[name])) {
|
|
38674
40072
|
target[name] = [];
|
|
38675
40073
|
}
|
|
38676
40074
|
const result = buildPath(path2, value, target[name], index);
|
|
@@ -38843,9 +40241,28 @@ var require_axios = __commonJS({
|
|
|
38843
40241
|
function combineURLs(baseURL, relativeURL) {
|
|
38844
40242
|
return relativeURL ? baseURL.replace(/\/?\/$/, "") + "/" + relativeURL.replace(/^\/+/, "") : baseURL;
|
|
38845
40243
|
}
|
|
38846
|
-
|
|
40244
|
+
var malformedHttpProtocol = /^https?:(?!\/\/)/i;
|
|
40245
|
+
var httpProtocolControlCharacters = /[\t\n\r]/g;
|
|
40246
|
+
function stripLeadingC0ControlOrSpace(url2) {
|
|
40247
|
+
let i = 0;
|
|
40248
|
+
while (i < url2.length && url2.charCodeAt(i) <= 32) {
|
|
40249
|
+
i++;
|
|
40250
|
+
}
|
|
40251
|
+
return url2.slice(i);
|
|
40252
|
+
}
|
|
40253
|
+
function normalizeURLForProtocolCheck(url2) {
|
|
40254
|
+
return stripLeadingC0ControlOrSpace(url2).replace(httpProtocolControlCharacters, "");
|
|
40255
|
+
}
|
|
40256
|
+
function assertValidHttpProtocolURL(url2, config) {
|
|
40257
|
+
if (typeof url2 === "string" && malformedHttpProtocol.test(normalizeURLForProtocolCheck(url2))) {
|
|
40258
|
+
throw new AxiosError('Invalid URL: missing "//" after protocol', AxiosError.ERR_INVALID_URL, config);
|
|
40259
|
+
}
|
|
40260
|
+
}
|
|
40261
|
+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls, config) {
|
|
40262
|
+
assertValidHttpProtocolURL(requestedURL, config);
|
|
38847
40263
|
let isRelativeUrl = !isAbsoluteURL(requestedURL);
|
|
38848
40264
|
if (baseURL && (isRelativeUrl || allowAbsoluteUrls === false)) {
|
|
40265
|
+
assertValidHttpProtocolURL(baseURL, config);
|
|
38849
40266
|
return combineURLs(baseURL, requestedURL);
|
|
38850
40267
|
}
|
|
38851
40268
|
return requestedURL;
|
|
@@ -38915,12 +40332,12 @@ var require_axios = __commonJS({
|
|
|
38915
40332
|
function getEnv(key) {
|
|
38916
40333
|
return process.env[key.toLowerCase()] || process.env[key.toUpperCase()] || "";
|
|
38917
40334
|
}
|
|
38918
|
-
var VERSION = "1.
|
|
40335
|
+
var VERSION = "1.18.1";
|
|
38919
40336
|
function parseProtocol(url2) {
|
|
38920
40337
|
const match = /^([-+\w]{1,25}):(?:\/\/)?/.exec(url2);
|
|
38921
40338
|
return match && match[1] || "";
|
|
38922
40339
|
}
|
|
38923
|
-
var DATA_URL_PATTERN = /^(
|
|
40340
|
+
var DATA_URL_PATTERN = /^([^,;]+\/[^,;]+)?((?:;[^,;=]+=[^,;]+)*)(;base64)?,([\s\S]*)$/;
|
|
38924
40341
|
function fromDataURI(uri, asBlob, options) {
|
|
38925
40342
|
const _Blob = options && options.Blob || platform.classes.Blob;
|
|
38926
40343
|
const protocol = parseProtocol(uri);
|
|
@@ -38933,10 +40350,17 @@ var require_axios = __commonJS({
|
|
|
38933
40350
|
if (!match) {
|
|
38934
40351
|
throw new AxiosError("Invalid URL", AxiosError.ERR_INVALID_URL);
|
|
38935
40352
|
}
|
|
38936
|
-
const
|
|
38937
|
-
const
|
|
38938
|
-
const
|
|
38939
|
-
const
|
|
40353
|
+
const type = match[1];
|
|
40354
|
+
const params = match[2];
|
|
40355
|
+
const encoding = match[3] ? "base64" : "utf8";
|
|
40356
|
+
const body = match[4];
|
|
40357
|
+
let mime = "";
|
|
40358
|
+
if (type) {
|
|
40359
|
+
mime = params ? type + params : type;
|
|
40360
|
+
} else if (params) {
|
|
40361
|
+
mime = "text/plain" + params;
|
|
40362
|
+
}
|
|
40363
|
+
const buffer = encoding === "base64" ? Buffer.from(body, "base64") : Buffer.from(decodeURIComponent(body), encoding);
|
|
38940
40364
|
if (asBlob) {
|
|
38941
40365
|
if (!_Blob) {
|
|
38942
40366
|
throw new AxiosError("Blob is not supported", AxiosError.ERR_NOT_SUPPORT);
|
|
@@ -39125,10 +40549,10 @@ var require_axios = __commonJS({
|
|
|
39125
40549
|
boundary = tag + "-" + platform.generateString(size, BOUNDARY_ALPHABET)
|
|
39126
40550
|
} = options || {};
|
|
39127
40551
|
if (!utils$1.isFormData(form)) {
|
|
39128
|
-
throw TypeError("FormData instance required");
|
|
40552
|
+
throw new TypeError("FormData instance required");
|
|
39129
40553
|
}
|
|
39130
40554
|
if (boundary.length < 1 || boundary.length > 70) {
|
|
39131
|
-
throw Error("boundary must be 1-70 characters long");
|
|
40555
|
+
throw new Error("boundary must be 1-70 characters long");
|
|
39132
40556
|
}
|
|
39133
40557
|
const boundaryBytes = textEncoder.encode("--" + boundary + CRLF);
|
|
39134
40558
|
const footerBytes = textEncoder.encode("--" + boundary + "--" + CRLF);
|
|
@@ -39173,6 +40597,81 @@ var require_axios = __commonJS({
|
|
|
39173
40597
|
this.__transform(chunk, encoding, callback);
|
|
39174
40598
|
}
|
|
39175
40599
|
};
|
|
40600
|
+
var Http2Sessions = class {
|
|
40601
|
+
constructor() {
|
|
40602
|
+
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
40603
|
+
}
|
|
40604
|
+
getSession(authority, options) {
|
|
40605
|
+
options = Object.assign({
|
|
40606
|
+
sessionTimeout: 1e3
|
|
40607
|
+
}, options);
|
|
40608
|
+
let authoritySessions = this.sessions[authority];
|
|
40609
|
+
if (authoritySessions) {
|
|
40610
|
+
let len = authoritySessions.length;
|
|
40611
|
+
for (let i = 0; i < len; i++) {
|
|
40612
|
+
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
40613
|
+
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
40614
|
+
return sessionHandle;
|
|
40615
|
+
}
|
|
40616
|
+
}
|
|
40617
|
+
}
|
|
40618
|
+
const session = http2.connect(authority, options);
|
|
40619
|
+
let removed;
|
|
40620
|
+
let timer;
|
|
40621
|
+
const removeSession = () => {
|
|
40622
|
+
if (removed) {
|
|
40623
|
+
return;
|
|
40624
|
+
}
|
|
40625
|
+
removed = true;
|
|
40626
|
+
if (timer) {
|
|
40627
|
+
clearTimeout(timer);
|
|
40628
|
+
timer = null;
|
|
40629
|
+
}
|
|
40630
|
+
let entries = authoritySessions, len = entries.length, i = len;
|
|
40631
|
+
while (i--) {
|
|
40632
|
+
if (entries[i][0] === session) {
|
|
40633
|
+
if (len === 1) {
|
|
40634
|
+
delete this.sessions[authority];
|
|
40635
|
+
} else {
|
|
40636
|
+
entries.splice(i, 1);
|
|
40637
|
+
}
|
|
40638
|
+
if (!session.closed) {
|
|
40639
|
+
session.close();
|
|
40640
|
+
}
|
|
40641
|
+
return;
|
|
40642
|
+
}
|
|
40643
|
+
}
|
|
40644
|
+
};
|
|
40645
|
+
const originalRequestFn = session.request;
|
|
40646
|
+
const {
|
|
40647
|
+
sessionTimeout
|
|
40648
|
+
} = options;
|
|
40649
|
+
if (sessionTimeout != null) {
|
|
40650
|
+
let streamsCount = 0;
|
|
40651
|
+
session.request = function() {
|
|
40652
|
+
const stream2 = originalRequestFn.apply(this, arguments);
|
|
40653
|
+
streamsCount++;
|
|
40654
|
+
if (timer) {
|
|
40655
|
+
clearTimeout(timer);
|
|
40656
|
+
timer = null;
|
|
40657
|
+
}
|
|
40658
|
+
stream2.once("close", () => {
|
|
40659
|
+
if (!--streamsCount) {
|
|
40660
|
+
timer = setTimeout(() => {
|
|
40661
|
+
timer = null;
|
|
40662
|
+
removeSession();
|
|
40663
|
+
}, sessionTimeout);
|
|
40664
|
+
}
|
|
40665
|
+
});
|
|
40666
|
+
return stream2;
|
|
40667
|
+
};
|
|
40668
|
+
}
|
|
40669
|
+
session.once("close", removeSession);
|
|
40670
|
+
let entry = [session, options];
|
|
40671
|
+
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
40672
|
+
return session;
|
|
40673
|
+
}
|
|
40674
|
+
};
|
|
39176
40675
|
var callbackify = (fn, reducer) => {
|
|
39177
40676
|
return utils$1.isAsyncFn(fn) ? function(...args) {
|
|
39178
40677
|
const cb = args.pop();
|
|
@@ -39185,7 +40684,7 @@ var require_axios = __commonJS({
|
|
|
39185
40684
|
}, cb);
|
|
39186
40685
|
} : fn;
|
|
39187
40686
|
};
|
|
39188
|
-
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost"]);
|
|
40687
|
+
var LOOPBACK_HOSTNAMES = /* @__PURE__ */ new Set(["localhost", "0.0.0.0"]);
|
|
39189
40688
|
var isIPv4Loopback = (host) => {
|
|
39190
40689
|
const parts = host.split(".");
|
|
39191
40690
|
if (parts.length !== 4)
|
|
@@ -39194,6 +40693,24 @@ var require_axios = __commonJS({
|
|
|
39194
40693
|
return false;
|
|
39195
40694
|
return parts.every((p) => /^\d+$/.test(p) && Number(p) >= 0 && Number(p) <= 255);
|
|
39196
40695
|
};
|
|
40696
|
+
var isIPv6ZeroGroup = (group) => /^0{1,4}$/.test(group);
|
|
40697
|
+
var isIPv6Unspecified = (host) => {
|
|
40698
|
+
if (host === "::")
|
|
40699
|
+
return true;
|
|
40700
|
+
const compressionIndex = host.indexOf("::");
|
|
40701
|
+
if (compressionIndex !== -1) {
|
|
40702
|
+
if (compressionIndex !== host.lastIndexOf("::"))
|
|
40703
|
+
return false;
|
|
40704
|
+
const left = host.slice(0, compressionIndex);
|
|
40705
|
+
const right = host.slice(compressionIndex + 2);
|
|
40706
|
+
const leftGroups = left ? left.split(":") : [];
|
|
40707
|
+
const rightGroups = right ? right.split(":") : [];
|
|
40708
|
+
const explicitGroups = leftGroups.length + rightGroups.length;
|
|
40709
|
+
return explicitGroups < 8 && leftGroups.every(isIPv6ZeroGroup) && rightGroups.every(isIPv6ZeroGroup);
|
|
40710
|
+
}
|
|
40711
|
+
const groups = host.split(":");
|
|
40712
|
+
return groups.length === 8 && groups.every(isIPv6ZeroGroup);
|
|
40713
|
+
};
|
|
39197
40714
|
var isIPv6Loopback = (host) => {
|
|
39198
40715
|
if (host === "::1")
|
|
39199
40716
|
return true;
|
|
@@ -39222,6 +40739,8 @@ var require_axios = __commonJS({
|
|
|
39222
40739
|
return true;
|
|
39223
40740
|
if (isIPv4Loopback(host))
|
|
39224
40741
|
return true;
|
|
40742
|
+
if (isIPv6Unspecified(host))
|
|
40743
|
+
return true;
|
|
39225
40744
|
return isIPv6Loopback(host);
|
|
39226
40745
|
};
|
|
39227
40746
|
var DEFAULT_PORTS = {
|
|
@@ -39384,6 +40903,9 @@ var require_axios = __commonJS({
|
|
|
39384
40903
|
let bytesNotified = 0;
|
|
39385
40904
|
const _speedometer = speedometer(50, 250);
|
|
39386
40905
|
return throttle((e) => {
|
|
40906
|
+
if (!e || typeof e.loaded !== "number") {
|
|
40907
|
+
return;
|
|
40908
|
+
}
|
|
39387
40909
|
const rawLoaded = e.loaded;
|
|
39388
40910
|
const total = e.lengthComputable ? e.total : void 0;
|
|
39389
40911
|
const loaded = total != null ? Math.min(rawLoaded, total) : rawLoaded;
|
|
@@ -39413,6 +40935,8 @@ var require_axios = __commonJS({
|
|
|
39413
40935
|
}), throttled[1]];
|
|
39414
40936
|
};
|
|
39415
40937
|
var asyncDecorator = (fn) => (...args) => utils$1.asap(() => fn(...args));
|
|
40938
|
+
var isHexDigit = (charCode) => charCode >= 48 && charCode <= 57 || charCode >= 65 && charCode <= 70 || charCode >= 97 && charCode <= 102;
|
|
40939
|
+
var isPercentEncodedByte = (str, i, len) => i + 2 < len && isHexDigit(str.charCodeAt(i + 1)) && isHexDigit(str.charCodeAt(i + 2));
|
|
39416
40940
|
function estimateDataURLDecodedBytes(url2) {
|
|
39417
40941
|
if (!url2 || typeof url2 !== "string")
|
|
39418
40942
|
return 0;
|
|
@@ -39431,7 +40955,7 @@ var require_axios = __commonJS({
|
|
|
39431
40955
|
if (body.charCodeAt(i) === 37 && i + 2 < len) {
|
|
39432
40956
|
const a = body.charCodeAt(i + 1);
|
|
39433
40957
|
const b = body.charCodeAt(i + 2);
|
|
39434
|
-
const isHex = (a
|
|
40958
|
+
const isHex = isHexDigit(a) && isHexDigit(b);
|
|
39435
40959
|
if (isHex) {
|
|
39436
40960
|
effectiveLen -= 2;
|
|
39437
40961
|
i += 2;
|
|
@@ -39463,13 +40987,13 @@ var require_axios = __commonJS({
|
|
|
39463
40987
|
const bytes2 = groups * 3 - (pad || 0);
|
|
39464
40988
|
return bytes2 > 0 ? bytes2 : 0;
|
|
39465
40989
|
}
|
|
39466
|
-
if (typeof Buffer !== "undefined" && typeof Buffer.byteLength === "function") {
|
|
39467
|
-
return Buffer.byteLength(body, "utf8");
|
|
39468
|
-
}
|
|
39469
40990
|
let bytes = 0;
|
|
39470
40991
|
for (let i = 0, len = body.length; i < len; i++) {
|
|
39471
40992
|
const c = body.charCodeAt(i);
|
|
39472
|
-
if (c
|
|
40993
|
+
if (c === 37 && isPercentEncodedByte(body, i, len)) {
|
|
40994
|
+
bytes += 1;
|
|
40995
|
+
i += 2;
|
|
40996
|
+
} else if (c < 128) {
|
|
39473
40997
|
bytes += 1;
|
|
39474
40998
|
} else if (c < 2048) {
|
|
39475
40999
|
bytes += 2;
|
|
@@ -39495,7 +41019,14 @@ var require_axios = __commonJS({
|
|
|
39495
41019
|
flush: zlib.constants.BROTLI_OPERATION_FLUSH,
|
|
39496
41020
|
finishFlush: zlib.constants.BROTLI_OPERATION_FLUSH
|
|
39497
41021
|
};
|
|
41022
|
+
var zstdOptions = {
|
|
41023
|
+
flush: zlib.constants.ZSTD_e_flush,
|
|
41024
|
+
finishFlush: zlib.constants.ZSTD_e_flush
|
|
41025
|
+
};
|
|
39498
41026
|
var isBrotliSupported = utils$1.isFunction(zlib.createBrotliDecompress);
|
|
41027
|
+
var isZstdSupported = utils$1.isFunction(zlib.createZstdDecompress);
|
|
41028
|
+
var ACCEPT_ENCODING = "gzip, compress, deflate" + (isBrotliSupported ? ", br" : "");
|
|
41029
|
+
var ACCEPT_ENCODING_WITH_ZSTD = ACCEPT_ENCODING + (isZstdSupported ? ", zstd" : "");
|
|
39499
41030
|
var {
|
|
39500
41031
|
http: httpFollow,
|
|
39501
41032
|
https: httpsFollow
|
|
@@ -39515,10 +41046,67 @@ var require_axios = __commonJS({
|
|
|
39515
41046
|
}
|
|
39516
41047
|
var kAxiosSocketListener = Symbol("axios.http.socketListener");
|
|
39517
41048
|
var kAxiosCurrentReq = Symbol("axios.http.currentReq");
|
|
41049
|
+
var kAxiosInstalledTunnel = Symbol("axios.http.installedTunnel");
|
|
41050
|
+
var tunnelingAgentCache = /* @__PURE__ */ new Map();
|
|
41051
|
+
var tunnelingAgentCacheUser = /* @__PURE__ */ new WeakMap();
|
|
41052
|
+
var NODE_NATIVE_ENV_PROXY_SUPPORT = {
|
|
41053
|
+
22: 21,
|
|
41054
|
+
24: 5
|
|
41055
|
+
};
|
|
41056
|
+
function isNodeNativeEnvProxySupported(nodeVersion = process.versions && process.versions.node) {
|
|
41057
|
+
if (!nodeVersion) {
|
|
41058
|
+
return false;
|
|
41059
|
+
}
|
|
41060
|
+
const [major, minor] = nodeVersion.split(".").map((part) => Number(part));
|
|
41061
|
+
if (!Number.isInteger(major) || !Number.isInteger(minor)) {
|
|
41062
|
+
return false;
|
|
41063
|
+
}
|
|
41064
|
+
if (major > 24) {
|
|
41065
|
+
return true;
|
|
41066
|
+
}
|
|
41067
|
+
return NODE_NATIVE_ENV_PROXY_SUPPORT[major] != null && minor >= NODE_NATIVE_ENV_PROXY_SUPPORT[major];
|
|
41068
|
+
}
|
|
41069
|
+
function isNodeEnvProxyEnabled(agent, nodeVersion = process.versions && process.versions.node) {
|
|
41070
|
+
if (!isNodeNativeEnvProxySupported(nodeVersion)) {
|
|
41071
|
+
return false;
|
|
41072
|
+
}
|
|
41073
|
+
const agentOptions = agent && agent.options;
|
|
41074
|
+
return Boolean(agentOptions && utils$1.hasOwnProp(agentOptions, "proxyEnv") && agentOptions.proxyEnv != null);
|
|
41075
|
+
}
|
|
41076
|
+
function getProxyEnvAgent(options, configHttpAgent, configHttpsAgent) {
|
|
41077
|
+
return isHttps.test(options.protocol) ? configHttpsAgent || https.globalAgent : configHttpAgent || http.globalAgent;
|
|
41078
|
+
}
|
|
41079
|
+
function getTunnelingAgent(agentOptions, userHttpsAgent) {
|
|
41080
|
+
const key = agentOptions.protocol + "//" + agentOptions.hostname + ":" + (agentOptions.port || "") + "#" + (agentOptions.auth || "");
|
|
41081
|
+
const cache = userHttpsAgent ? tunnelingAgentCacheUser.get(userHttpsAgent) || tunnelingAgentCacheUser.set(userHttpsAgent, /* @__PURE__ */ new Map()).get(userHttpsAgent) : tunnelingAgentCache;
|
|
41082
|
+
let agent = cache.get(key);
|
|
41083
|
+
if (agent)
|
|
41084
|
+
return agent;
|
|
41085
|
+
const merged = userHttpsAgent && userHttpsAgent.options ? {
|
|
41086
|
+
...userHttpsAgent.options,
|
|
41087
|
+
...agentOptions
|
|
41088
|
+
} : agentOptions;
|
|
41089
|
+
agent = new HttpsProxyAgent(merged);
|
|
41090
|
+
if (userHttpsAgent && userHttpsAgent.options) {
|
|
41091
|
+
const originTLSOptions = {
|
|
41092
|
+
...userHttpsAgent.options
|
|
41093
|
+
};
|
|
41094
|
+
const callback = agent.callback;
|
|
41095
|
+
agent.callback = function axiosTunnelingAgentCallback(req, opts) {
|
|
41096
|
+
return callback.call(this, req, {
|
|
41097
|
+
...originTLSOptions,
|
|
41098
|
+
...opts
|
|
41099
|
+
});
|
|
41100
|
+
};
|
|
41101
|
+
}
|
|
41102
|
+
agent[kAxiosInstalledTunnel] = true;
|
|
41103
|
+
cache.set(key, agent);
|
|
41104
|
+
return agent;
|
|
41105
|
+
}
|
|
39518
41106
|
var supportedProtocols = platform.protocols.map((protocol) => {
|
|
39519
41107
|
return protocol + ":";
|
|
39520
41108
|
});
|
|
39521
|
-
var decodeURIComponentSafe = (value) => {
|
|
41109
|
+
var decodeURIComponentSafe$1 = (value) => {
|
|
39522
41110
|
if (!utils$1.isString(value)) {
|
|
39523
41111
|
return value;
|
|
39524
41112
|
}
|
|
@@ -39532,89 +41120,45 @@ var require_axios = __commonJS({
|
|
|
39532
41120
|
stream2.on("end", flush).on("error", flush);
|
|
39533
41121
|
return throttled;
|
|
39534
41122
|
};
|
|
39535
|
-
var Http2Sessions = class {
|
|
39536
|
-
constructor() {
|
|
39537
|
-
this.sessions = /* @__PURE__ */ Object.create(null);
|
|
39538
|
-
}
|
|
39539
|
-
getSession(authority, options) {
|
|
39540
|
-
options = Object.assign({
|
|
39541
|
-
sessionTimeout: 1e3
|
|
39542
|
-
}, options);
|
|
39543
|
-
let authoritySessions = this.sessions[authority];
|
|
39544
|
-
if (authoritySessions) {
|
|
39545
|
-
let len = authoritySessions.length;
|
|
39546
|
-
for (let i = 0; i < len; i++) {
|
|
39547
|
-
const [sessionHandle, sessionOptions] = authoritySessions[i];
|
|
39548
|
-
if (!sessionHandle.destroyed && !sessionHandle.closed && util.isDeepStrictEqual(sessionOptions, options)) {
|
|
39549
|
-
return sessionHandle;
|
|
39550
|
-
}
|
|
39551
|
-
}
|
|
39552
|
-
}
|
|
39553
|
-
const session = http2.connect(authority, options);
|
|
39554
|
-
let removed;
|
|
39555
|
-
const removeSession = () => {
|
|
39556
|
-
if (removed) {
|
|
39557
|
-
return;
|
|
39558
|
-
}
|
|
39559
|
-
removed = true;
|
|
39560
|
-
let entries = authoritySessions, len = entries.length, i = len;
|
|
39561
|
-
while (i--) {
|
|
39562
|
-
if (entries[i][0] === session) {
|
|
39563
|
-
if (len === 1) {
|
|
39564
|
-
delete this.sessions[authority];
|
|
39565
|
-
} else {
|
|
39566
|
-
entries.splice(i, 1);
|
|
39567
|
-
}
|
|
39568
|
-
if (!session.closed) {
|
|
39569
|
-
session.close();
|
|
39570
|
-
}
|
|
39571
|
-
return;
|
|
39572
|
-
}
|
|
39573
|
-
}
|
|
39574
|
-
};
|
|
39575
|
-
const originalRequestFn = session.request;
|
|
39576
|
-
const {
|
|
39577
|
-
sessionTimeout
|
|
39578
|
-
} = options;
|
|
39579
|
-
if (sessionTimeout != null) {
|
|
39580
|
-
let timer;
|
|
39581
|
-
let streamsCount = 0;
|
|
39582
|
-
session.request = function() {
|
|
39583
|
-
const stream2 = originalRequestFn.apply(this, arguments);
|
|
39584
|
-
streamsCount++;
|
|
39585
|
-
if (timer) {
|
|
39586
|
-
clearTimeout(timer);
|
|
39587
|
-
timer = null;
|
|
39588
|
-
}
|
|
39589
|
-
stream2.once("close", () => {
|
|
39590
|
-
if (!--streamsCount) {
|
|
39591
|
-
timer = setTimeout(() => {
|
|
39592
|
-
timer = null;
|
|
39593
|
-
removeSession();
|
|
39594
|
-
}, sessionTimeout);
|
|
39595
|
-
}
|
|
39596
|
-
});
|
|
39597
|
-
return stream2;
|
|
39598
|
-
};
|
|
39599
|
-
}
|
|
39600
|
-
session.once("close", removeSession);
|
|
39601
|
-
let entry = [session, options];
|
|
39602
|
-
authoritySessions ? authoritySessions.push(entry) : authoritySessions = this.sessions[authority] = [entry];
|
|
39603
|
-
return session;
|
|
39604
|
-
}
|
|
39605
|
-
};
|
|
39606
41123
|
var http2Sessions = new Http2Sessions();
|
|
39607
41124
|
function dispatchBeforeRedirect(options, responseDetails, requestDetails) {
|
|
39608
41125
|
if (options.beforeRedirects.proxy) {
|
|
39609
41126
|
options.beforeRedirects.proxy(options);
|
|
39610
41127
|
}
|
|
41128
|
+
if (options.beforeRedirects.auth) {
|
|
41129
|
+
options.beforeRedirects.auth(options);
|
|
41130
|
+
}
|
|
41131
|
+
if (options.beforeRedirects.sensitiveHeaders) {
|
|
41132
|
+
options.beforeRedirects.sensitiveHeaders(options, requestDetails);
|
|
41133
|
+
}
|
|
39611
41134
|
if (options.beforeRedirects.config) {
|
|
39612
41135
|
options.beforeRedirects.config(options, responseDetails, requestDetails);
|
|
39613
41136
|
}
|
|
39614
41137
|
}
|
|
39615
|
-
function
|
|
41138
|
+
function stripMatchingHeaders(headers, sensitiveSet) {
|
|
41139
|
+
if (!headers) {
|
|
41140
|
+
return;
|
|
41141
|
+
}
|
|
41142
|
+
Object.keys(headers).forEach((header) => {
|
|
41143
|
+
if (sensitiveSet.has(header.toLowerCase())) {
|
|
41144
|
+
delete headers[header];
|
|
41145
|
+
}
|
|
41146
|
+
});
|
|
41147
|
+
}
|
|
41148
|
+
function isSameOriginRedirect(redirectOptions, requestDetails) {
|
|
41149
|
+
if (!requestDetails) {
|
|
41150
|
+
return false;
|
|
41151
|
+
}
|
|
41152
|
+
try {
|
|
41153
|
+
return new URL(requestDetails.url).origin === new URL(redirectOptions.href).origin;
|
|
41154
|
+
} catch (e) {
|
|
41155
|
+
return false;
|
|
41156
|
+
}
|
|
41157
|
+
}
|
|
41158
|
+
function setProxy(options, configProxy, location, isRedirect, configHttpsAgent, configHttpAgent) {
|
|
39616
41159
|
let proxy = configProxy;
|
|
39617
|
-
|
|
41160
|
+
const proxyEnvAgent = getProxyEnvAgent(options, configHttpAgent, configHttpsAgent);
|
|
41161
|
+
if (!proxy && proxy !== false && !isNodeEnvProxyEnabled(proxyEnvAgent)) {
|
|
39618
41162
|
const proxyUrl = getProxyForUrl(location);
|
|
39619
41163
|
if (proxyUrl) {
|
|
39620
41164
|
if (!shouldBypassProxy(location)) {
|
|
@@ -39629,6 +41173,9 @@ var require_axios = __commonJS({
|
|
|
39629
41173
|
}
|
|
39630
41174
|
}
|
|
39631
41175
|
}
|
|
41176
|
+
if (isRedirect && options.agent && options.agent[kAxiosInstalledTunnel]) {
|
|
41177
|
+
options.agent = void 0;
|
|
41178
|
+
}
|
|
39632
41179
|
if (proxy) {
|
|
39633
41180
|
const isProxyURL = proxy instanceof URL;
|
|
39634
41181
|
const readProxyField = (key) => isProxyURL || utils$1.hasOwnProp(proxy, key) ? proxy[key] : void 0;
|
|
@@ -39650,31 +41197,59 @@ var require_axios = __commonJS({
|
|
|
39650
41197
|
proxy
|
|
39651
41198
|
});
|
|
39652
41199
|
}
|
|
39653
|
-
const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
|
|
39654
|
-
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
39655
41200
|
}
|
|
39656
|
-
|
|
39657
|
-
|
|
39658
|
-
if (
|
|
39659
|
-
|
|
39660
|
-
|
|
41201
|
+
const targetIsHttps = isHttps.test(options.protocol);
|
|
41202
|
+
if (targetIsHttps) {
|
|
41203
|
+
if (!(configHttpsAgent instanceof HttpsProxyAgent)) {
|
|
41204
|
+
const proxyHost = readProxyField("hostname") || readProxyField("host");
|
|
41205
|
+
const proxyPort = readProxyField("port");
|
|
41206
|
+
const rawProxyProtocol = readProxyField("protocol");
|
|
41207
|
+
const normalizedProtocol = rawProxyProtocol ? rawProxyProtocol.includes(":") ? rawProxyProtocol : `${rawProxyProtocol}:` : "http:";
|
|
41208
|
+
const proxyHostForURL = proxyHost && proxyHost.includes(":") && !proxyHost.startsWith("[") ? `[${proxyHost}]` : proxyHost;
|
|
41209
|
+
const proxyURL = new URL(`${normalizedProtocol}//${proxyHostForURL}${proxyPort ? ":" + proxyPort : ""}`);
|
|
41210
|
+
const agentOptions = {
|
|
41211
|
+
protocol: proxyURL.protocol,
|
|
41212
|
+
hostname: proxyURL.hostname.replace(/^\[|\]$/g, ""),
|
|
41213
|
+
port: proxyURL.port,
|
|
41214
|
+
auth: proxyAuth && typeof proxyAuth === "string" ? proxyAuth : void 0
|
|
41215
|
+
};
|
|
41216
|
+
if (proxyURL.protocol === "https:") {
|
|
41217
|
+
agentOptions.ALPNProtocols = ["http/1.1"];
|
|
41218
|
+
}
|
|
41219
|
+
const tunnelingAgent = getTunnelingAgent(agentOptions, configHttpsAgent);
|
|
41220
|
+
options.agent = tunnelingAgent;
|
|
41221
|
+
if (options.agents) {
|
|
41222
|
+
options.agents.https = tunnelingAgent;
|
|
41223
|
+
}
|
|
41224
|
+
}
|
|
41225
|
+
} else {
|
|
41226
|
+
if (proxyAuth) {
|
|
41227
|
+
const base64 = Buffer.from(proxyAuth, "utf8").toString("base64");
|
|
41228
|
+
options.headers["Proxy-Authorization"] = "Basic " + base64;
|
|
41229
|
+
}
|
|
41230
|
+
let hasUserHostHeader = false;
|
|
41231
|
+
for (const name of Object.keys(options.headers)) {
|
|
41232
|
+
if (name.toLowerCase() === "host") {
|
|
41233
|
+
hasUserHostHeader = true;
|
|
41234
|
+
break;
|
|
41235
|
+
}
|
|
41236
|
+
}
|
|
41237
|
+
if (!hasUserHostHeader) {
|
|
41238
|
+
options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
41239
|
+
}
|
|
41240
|
+
const proxyHost = readProxyField("hostname") || readProxyField("host");
|
|
41241
|
+
options.hostname = proxyHost;
|
|
41242
|
+
options.host = proxyHost;
|
|
41243
|
+
options.port = readProxyField("port");
|
|
41244
|
+
options.path = location;
|
|
41245
|
+
const proxyProtocol = readProxyField("protocol");
|
|
41246
|
+
if (proxyProtocol) {
|
|
41247
|
+
options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
|
|
39661
41248
|
}
|
|
39662
|
-
}
|
|
39663
|
-
if (!hasUserHostHeader) {
|
|
39664
|
-
options.headers.host = options.hostname + (options.port ? ":" + options.port : "");
|
|
39665
|
-
}
|
|
39666
|
-
const proxyHost = readProxyField("hostname") || readProxyField("host");
|
|
39667
|
-
options.hostname = proxyHost;
|
|
39668
|
-
options.host = proxyHost;
|
|
39669
|
-
options.port = readProxyField("port");
|
|
39670
|
-
options.path = location;
|
|
39671
|
-
const proxyProtocol = readProxyField("protocol");
|
|
39672
|
-
if (proxyProtocol) {
|
|
39673
|
-
options.protocol = proxyProtocol.includes(":") ? proxyProtocol : `${proxyProtocol}:`;
|
|
39674
41249
|
}
|
|
39675
41250
|
}
|
|
39676
41251
|
options.beforeRedirects.proxy = function beforeRedirect(redirectOptions) {
|
|
39677
|
-
setProxy(redirectOptions, configProxy, redirectOptions.href, true);
|
|
41252
|
+
setProxy(redirectOptions, configProxy, redirectOptions.href, true, configHttpsAgent, configHttpAgent);
|
|
39678
41253
|
};
|
|
39679
41254
|
}
|
|
39680
41255
|
var isHttpAdapterSupported = typeof process !== "undefined" && utils$1.kindOf(process) === "process";
|
|
@@ -39752,7 +41327,8 @@ var require_axios = __commonJS({
|
|
|
39752
41327
|
};
|
|
39753
41328
|
var httpAdapter = isHttpAdapterSupported && function httpAdapter2(config) {
|
|
39754
41329
|
return wrapAsync(async function dispatchHttpRequest(resolve, reject, onDone) {
|
|
39755
|
-
const own2 = (key) => utils$1.
|
|
41330
|
+
const own2 = (key) => utils$1.getSafeProp(config, key);
|
|
41331
|
+
const transitional = own2("transitional") || transitionalDefaults;
|
|
39756
41332
|
let data = own2("data");
|
|
39757
41333
|
let lookup = own2("lookup");
|
|
39758
41334
|
let family = own2("family");
|
|
@@ -39760,9 +41336,17 @@ var require_axios = __commonJS({
|
|
|
39760
41336
|
if (httpVersion === void 0)
|
|
39761
41337
|
httpVersion = 1;
|
|
39762
41338
|
let http2Options = own2("http2Options");
|
|
41339
|
+
const httpAgent = own2("httpAgent");
|
|
41340
|
+
const httpsAgent = own2("httpsAgent");
|
|
41341
|
+
const configProxy = own2("proxy");
|
|
39763
41342
|
const responseType = own2("responseType");
|
|
39764
41343
|
const responseEncoding = own2("responseEncoding");
|
|
39765
|
-
const
|
|
41344
|
+
const socketPath = own2("socketPath");
|
|
41345
|
+
const method = own2("method").toUpperCase();
|
|
41346
|
+
const maxRedirects = own2("maxRedirects");
|
|
41347
|
+
const maxBodyLength = own2("maxBodyLength");
|
|
41348
|
+
const maxContentLength = own2("maxContentLength");
|
|
41349
|
+
const decompress = own2("decompress");
|
|
39766
41350
|
let isDone;
|
|
39767
41351
|
let rejected = false;
|
|
39768
41352
|
let req;
|
|
@@ -39792,7 +41376,6 @@ var require_axios = __commonJS({
|
|
|
39792
41376
|
try {
|
|
39793
41377
|
abortEmitter.emit("abort", !reason || reason.type ? new CanceledError(null, config, req) : reason);
|
|
39794
41378
|
} catch (err) {
|
|
39795
|
-
console.warn("emit error", err);
|
|
39796
41379
|
}
|
|
39797
41380
|
}
|
|
39798
41381
|
function clearConnectPhaseTimer() {
|
|
@@ -39802,10 +41385,11 @@ var require_axios = __commonJS({
|
|
|
39802
41385
|
}
|
|
39803
41386
|
}
|
|
39804
41387
|
function createTimeoutError() {
|
|
39805
|
-
|
|
39806
|
-
|
|
39807
|
-
|
|
39808
|
-
|
|
41388
|
+
const configTimeout = own2("timeout");
|
|
41389
|
+
let timeoutErrorMessage = configTimeout ? "timeout of " + configTimeout + "ms exceeded" : "timeout exceeded";
|
|
41390
|
+
const configTimeoutErrorMessage = own2("timeoutErrorMessage");
|
|
41391
|
+
if (configTimeoutErrorMessage) {
|
|
41392
|
+
timeoutErrorMessage = configTimeoutErrorMessage;
|
|
39809
41393
|
}
|
|
39810
41394
|
return new AxiosError(timeoutErrorMessage, transitional.clarifyTimeoutError ? AxiosError.ETIMEDOUT : AxiosError.ECONNABORTED, config, req);
|
|
39811
41395
|
}
|
|
@@ -39846,15 +41430,16 @@ var require_axios = __commonJS({
|
|
|
39846
41430
|
onFinished();
|
|
39847
41431
|
}
|
|
39848
41432
|
});
|
|
39849
|
-
const fullPath = buildFullPath(
|
|
39850
|
-
const
|
|
41433
|
+
const fullPath = buildFullPath(own2("baseURL"), own2("url"), own2("allowAbsoluteUrls"), config);
|
|
41434
|
+
const urlBase = socketPath ? "http://localhost" : platform.hasBrowserEnv ? platform.origin : void 0;
|
|
41435
|
+
const parsed = new URL(fullPath, urlBase);
|
|
39851
41436
|
const protocol = parsed.protocol || supportedProtocols[0];
|
|
39852
41437
|
if (protocol === "data:") {
|
|
39853
|
-
if (
|
|
39854
|
-
const dataUrl = String(
|
|
41438
|
+
if (maxContentLength > -1) {
|
|
41439
|
+
const dataUrl = String(own2("url") || fullPath || "");
|
|
39855
41440
|
const estimated = estimateDataURLDecodedBytes(dataUrl);
|
|
39856
|
-
if (estimated >
|
|
39857
|
-
return reject(new AxiosError("maxContentLength size of " +
|
|
41441
|
+
if (estimated > maxContentLength) {
|
|
41442
|
+
return reject(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config));
|
|
39858
41443
|
}
|
|
39859
41444
|
}
|
|
39860
41445
|
let convertedData;
|
|
@@ -39867,7 +41452,7 @@ var require_axios = __commonJS({
|
|
|
39867
41452
|
});
|
|
39868
41453
|
}
|
|
39869
41454
|
try {
|
|
39870
|
-
convertedData = fromDataURI(
|
|
41455
|
+
convertedData = fromDataURI(own2("url"), responseType === "blob", {
|
|
39871
41456
|
Blob: config.env && config.env.Blob
|
|
39872
41457
|
});
|
|
39873
41458
|
} catch (err) {
|
|
@@ -39933,7 +41518,7 @@ var require_axios = __commonJS({
|
|
|
39933
41518
|
return reject(new AxiosError("Data after transformation must be a string, an ArrayBuffer, a Buffer, or a Stream", AxiosError.ERR_BAD_REQUEST, config));
|
|
39934
41519
|
}
|
|
39935
41520
|
headers.setContentLength(data.length, false);
|
|
39936
|
-
if (
|
|
41521
|
+
if (maxBodyLength > -1 && data.length > maxBodyLength) {
|
|
39937
41522
|
return reject(new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config));
|
|
39938
41523
|
}
|
|
39939
41524
|
}
|
|
@@ -39958,34 +41543,33 @@ var require_axios = __commonJS({
|
|
|
39958
41543
|
let auth = void 0;
|
|
39959
41544
|
const configAuth = own2("auth");
|
|
39960
41545
|
if (configAuth) {
|
|
39961
|
-
const username = configAuth
|
|
39962
|
-
const password = configAuth
|
|
41546
|
+
const username = utils$1.getSafeProp(configAuth, "username") || "";
|
|
41547
|
+
const password = utils$1.getSafeProp(configAuth, "password") || "";
|
|
39963
41548
|
auth = username + ":" + password;
|
|
39964
41549
|
}
|
|
39965
|
-
if (!auth && parsed.username) {
|
|
39966
|
-
const urlUsername = decodeURIComponentSafe(parsed.username);
|
|
39967
|
-
const urlPassword = decodeURIComponentSafe(parsed.password);
|
|
41550
|
+
if (!auth && (parsed.username || parsed.password)) {
|
|
41551
|
+
const urlUsername = decodeURIComponentSafe$1(parsed.username);
|
|
41552
|
+
const urlPassword = decodeURIComponentSafe$1(parsed.password);
|
|
39968
41553
|
auth = urlUsername + ":" + urlPassword;
|
|
39969
41554
|
}
|
|
39970
41555
|
auth && headers.delete("authorization");
|
|
39971
41556
|
let path$1;
|
|
39972
41557
|
try {
|
|
39973
|
-
path$1 = buildURL(parsed.pathname + parsed.search,
|
|
41558
|
+
path$1 = buildURL(parsed.pathname + parsed.search, own2("params"), own2("paramsSerializer")).replace(/^\?/, "");
|
|
39974
41559
|
} catch (err) {
|
|
39975
|
-
|
|
39976
|
-
|
|
39977
|
-
|
|
39978
|
-
|
|
39979
|
-
return reject(customErr);
|
|
41560
|
+
return reject(AxiosError.from(err, AxiosError.ERR_BAD_REQUEST, config, null, null, {
|
|
41561
|
+
url: own2("url"),
|
|
41562
|
+
exists: true
|
|
41563
|
+
}));
|
|
39980
41564
|
}
|
|
39981
|
-
headers.set("Accept-Encoding",
|
|
41565
|
+
headers.set("Accept-Encoding", utils$1.hasOwnProp(transitional, "advertiseZstdAcceptEncoding") && transitional.advertiseZstdAcceptEncoding === true ? ACCEPT_ENCODING_WITH_ZSTD : ACCEPT_ENCODING, false);
|
|
39982
41566
|
const options = Object.assign(/* @__PURE__ */ Object.create(null), {
|
|
39983
41567
|
path: path$1,
|
|
39984
41568
|
method,
|
|
39985
|
-
headers: headers
|
|
41569
|
+
headers: toByteStringHeaderObject(headers),
|
|
39986
41570
|
agents: {
|
|
39987
|
-
http:
|
|
39988
|
-
https:
|
|
41571
|
+
http: httpAgent,
|
|
41572
|
+
https: httpsAgent
|
|
39989
41573
|
},
|
|
39990
41574
|
auth,
|
|
39991
41575
|
protocol,
|
|
@@ -39995,50 +41579,89 @@ var require_axios = __commonJS({
|
|
|
39995
41579
|
http2Options
|
|
39996
41580
|
});
|
|
39997
41581
|
!utils$1.isUndefined(lookup) && (options.lookup = lookup);
|
|
39998
|
-
if (
|
|
39999
|
-
if (typeof
|
|
41582
|
+
if (socketPath) {
|
|
41583
|
+
if (typeof socketPath !== "string") {
|
|
40000
41584
|
return reject(new AxiosError("socketPath must be a string", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
40001
41585
|
}
|
|
40002
|
-
|
|
40003
|
-
|
|
40004
|
-
const
|
|
41586
|
+
const allowedSocketPaths = own2("allowedSocketPaths");
|
|
41587
|
+
if (allowedSocketPaths != null) {
|
|
41588
|
+
const allowed = Array.isArray(allowedSocketPaths) ? allowedSocketPaths : [allowedSocketPaths];
|
|
41589
|
+
const resolvedSocket = path.resolve(socketPath);
|
|
40005
41590
|
const isAllowed = allowed.some((entry) => typeof entry === "string" && path.resolve(entry) === resolvedSocket);
|
|
40006
41591
|
if (!isAllowed) {
|
|
40007
|
-
return reject(new AxiosError(`socketPath "${
|
|
41592
|
+
return reject(new AxiosError(`socketPath "${socketPath}" is not permitted by allowedSocketPaths`, AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
40008
41593
|
}
|
|
40009
41594
|
}
|
|
40010
|
-
options.socketPath =
|
|
41595
|
+
options.socketPath = socketPath;
|
|
40011
41596
|
} else {
|
|
40012
41597
|
options.hostname = parsed.hostname.startsWith("[") ? parsed.hostname.slice(1, -1) : parsed.hostname;
|
|
40013
41598
|
options.port = parsed.port;
|
|
40014
|
-
setProxy(options,
|
|
41599
|
+
setProxy(options, configProxy, protocol + "//" + parsed.hostname + (parsed.port ? ":" + parsed.port : "") + options.path, false, httpsAgent, httpAgent);
|
|
40015
41600
|
}
|
|
40016
41601
|
let transport;
|
|
40017
41602
|
let isNativeTransport = false;
|
|
41603
|
+
let transportEnforcesMaxBodyLength = false;
|
|
40018
41604
|
const isHttpsRequest = isHttps.test(options.protocol);
|
|
40019
|
-
options.agent
|
|
41605
|
+
if (options.agent == null) {
|
|
41606
|
+
options.agent = isHttpsRequest ? httpsAgent : httpAgent;
|
|
41607
|
+
}
|
|
40020
41608
|
if (isHttp2) {
|
|
40021
41609
|
transport = http2Transport;
|
|
40022
41610
|
} else {
|
|
40023
41611
|
const configTransport = own2("transport");
|
|
40024
41612
|
if (configTransport) {
|
|
40025
41613
|
transport = configTransport;
|
|
40026
|
-
} else if (
|
|
41614
|
+
} else if (maxRedirects === 0) {
|
|
40027
41615
|
transport = isHttpsRequest ? https : http;
|
|
40028
41616
|
isNativeTransport = true;
|
|
40029
41617
|
} else {
|
|
40030
|
-
|
|
40031
|
-
|
|
41618
|
+
transportEnforcesMaxBodyLength = true;
|
|
41619
|
+
options.sensitiveHeaders = [];
|
|
41620
|
+
if (maxRedirects) {
|
|
41621
|
+
options.maxRedirects = maxRedirects;
|
|
40032
41622
|
}
|
|
40033
41623
|
const configBeforeRedirect = own2("beforeRedirect");
|
|
40034
41624
|
if (configBeforeRedirect) {
|
|
40035
41625
|
options.beforeRedirects.config = configBeforeRedirect;
|
|
40036
41626
|
}
|
|
41627
|
+
if (auth) {
|
|
41628
|
+
const requestOrigin = parsed.origin;
|
|
41629
|
+
const authToRestore = auth;
|
|
41630
|
+
options.beforeRedirects.auth = function beforeRedirectAuth(redirectOptions) {
|
|
41631
|
+
try {
|
|
41632
|
+
if (new URL(redirectOptions.href).origin === requestOrigin) {
|
|
41633
|
+
redirectOptions.auth = authToRestore;
|
|
41634
|
+
}
|
|
41635
|
+
} catch (e) {
|
|
41636
|
+
}
|
|
41637
|
+
};
|
|
41638
|
+
}
|
|
41639
|
+
const sensitiveHeaders = own2("sensitiveHeaders");
|
|
41640
|
+
if (sensitiveHeaders != null) {
|
|
41641
|
+
if (!utils$1.isArray(sensitiveHeaders)) {
|
|
41642
|
+
return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
41643
|
+
}
|
|
41644
|
+
const sensitiveSet = /* @__PURE__ */ new Set();
|
|
41645
|
+
for (const header of sensitiveHeaders) {
|
|
41646
|
+
if (!utils$1.isString(header)) {
|
|
41647
|
+
return reject(new AxiosError("sensitiveHeaders must be an array of strings", AxiosError.ERR_BAD_OPTION_VALUE, config));
|
|
41648
|
+
}
|
|
41649
|
+
sensitiveSet.add(header.toLowerCase());
|
|
41650
|
+
}
|
|
41651
|
+
if (sensitiveSet.size) {
|
|
41652
|
+
options.sensitiveHeaders = Array.from(sensitiveSet);
|
|
41653
|
+
options.beforeRedirects.sensitiveHeaders = function beforeRedirectSensitiveHeaders(redirectOptions, requestDetails) {
|
|
41654
|
+
if (!isSameOriginRedirect(redirectOptions, requestDetails)) {
|
|
41655
|
+
stripMatchingHeaders(redirectOptions.headers, sensitiveSet);
|
|
41656
|
+
}
|
|
41657
|
+
};
|
|
41658
|
+
}
|
|
41659
|
+
}
|
|
40037
41660
|
transport = isHttpsRequest ? httpsFollow : httpFollow;
|
|
40038
41661
|
}
|
|
40039
41662
|
}
|
|
40040
|
-
if (
|
|
40041
|
-
options.maxBodyLength =
|
|
41663
|
+
if (maxBodyLength > -1) {
|
|
41664
|
+
options.maxBodyLength = maxBodyLength;
|
|
40042
41665
|
} else {
|
|
40043
41666
|
options.maxBodyLength = Infinity;
|
|
40044
41667
|
}
|
|
@@ -40058,7 +41681,7 @@ var require_axios = __commonJS({
|
|
|
40058
41681
|
}
|
|
40059
41682
|
let responseStream = res;
|
|
40060
41683
|
const lastRequest = res.req || req;
|
|
40061
|
-
if (
|
|
41684
|
+
if (decompress !== false && res.headers["content-encoding"]) {
|
|
40062
41685
|
if (method === "HEAD" || res.statusCode === 204) {
|
|
40063
41686
|
delete res.headers["content-encoding"];
|
|
40064
41687
|
}
|
|
@@ -40080,6 +41703,13 @@ var require_axios = __commonJS({
|
|
|
40080
41703
|
streams.push(zlib.createBrotliDecompress(brotliOptions));
|
|
40081
41704
|
delete res.headers["content-encoding"];
|
|
40082
41705
|
}
|
|
41706
|
+
break;
|
|
41707
|
+
case "zstd":
|
|
41708
|
+
if (isZstdSupported) {
|
|
41709
|
+
streams.push(zlib.createZstdDecompress(zstdOptions));
|
|
41710
|
+
delete res.headers["content-encoding"];
|
|
41711
|
+
}
|
|
41712
|
+
break;
|
|
40083
41713
|
}
|
|
40084
41714
|
}
|
|
40085
41715
|
responseStream = streams.length > 1 ? stream.pipeline(streams, utils$1.noop) : streams[0];
|
|
@@ -40091,8 +41721,8 @@ var require_axios = __commonJS({
|
|
|
40091
41721
|
request: lastRequest
|
|
40092
41722
|
};
|
|
40093
41723
|
if (responseType === "stream") {
|
|
40094
|
-
if (
|
|
40095
|
-
const limit =
|
|
41724
|
+
if (maxContentLength > -1) {
|
|
41725
|
+
const limit = maxContentLength;
|
|
40096
41726
|
const source = responseStream;
|
|
40097
41727
|
async function* enforceMaxContentLength() {
|
|
40098
41728
|
let totalResponseBytes = 0;
|
|
@@ -40116,10 +41746,10 @@ var require_axios = __commonJS({
|
|
|
40116
41746
|
responseStream.on("data", function handleStreamData(chunk) {
|
|
40117
41747
|
responseBuffer.push(chunk);
|
|
40118
41748
|
totalResponseBytes += chunk.length;
|
|
40119
|
-
if (
|
|
41749
|
+
if (maxContentLength > -1 && totalResponseBytes > maxContentLength) {
|
|
40120
41750
|
rejected = true;
|
|
40121
41751
|
responseStream.destroy();
|
|
40122
|
-
abort(new AxiosError("maxContentLength size of " +
|
|
41752
|
+
abort(new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, lastRequest));
|
|
40123
41753
|
}
|
|
40124
41754
|
});
|
|
40125
41755
|
responseStream.on("aborted", function handlerStreamAborted() {
|
|
@@ -40170,7 +41800,9 @@ var require_axios = __commonJS({
|
|
|
40170
41800
|
});
|
|
40171
41801
|
const boundSockets = /* @__PURE__ */ new Set();
|
|
40172
41802
|
req.on("socket", function handleRequestSocket(socket) {
|
|
40173
|
-
socket.setKeepAlive
|
|
41803
|
+
if (typeof socket.setKeepAlive === "function") {
|
|
41804
|
+
socket.setKeepAlive(true, 1e3 * 60);
|
|
41805
|
+
}
|
|
40174
41806
|
if (!socket[kAxiosSocketListener]) {
|
|
40175
41807
|
socket.on("error", function handleSocketError(err) {
|
|
40176
41808
|
const current = socket[kAxiosCurrentReq];
|
|
@@ -40192,8 +41824,8 @@ var require_axios = __commonJS({
|
|
|
40192
41824
|
}
|
|
40193
41825
|
boundSockets.clear();
|
|
40194
41826
|
});
|
|
40195
|
-
if (
|
|
40196
|
-
const timeout = parseInt(
|
|
41827
|
+
if (own2("timeout")) {
|
|
41828
|
+
const timeout = parseInt(own2("timeout"), 10);
|
|
40197
41829
|
if (Number.isNaN(timeout)) {
|
|
40198
41830
|
abort(new AxiosError("error trying to parse `config.timeout` to int", AxiosError.ERR_BAD_OPTION_VALUE, config, req));
|
|
40199
41831
|
return;
|
|
@@ -40226,8 +41858,8 @@ var require_axios = __commonJS({
|
|
|
40226
41858
|
}
|
|
40227
41859
|
});
|
|
40228
41860
|
let uploadStream = data;
|
|
40229
|
-
if (
|
|
40230
|
-
const limit =
|
|
41861
|
+
if (maxBodyLength > -1 && !transportEnforcesMaxBodyLength) {
|
|
41862
|
+
const limit = maxBodyLength;
|
|
40231
41863
|
let bytesSent = 0;
|
|
40232
41864
|
uploadStream = stream.pipeline([data, new stream.Transform({
|
|
40233
41865
|
transform(chunk, _enc, cb) {
|
|
@@ -40286,7 +41918,11 @@ var require_axios = __commonJS({
|
|
|
40286
41918
|
const cookie = cookies2[i].replace(/^\s+/, "");
|
|
40287
41919
|
const eq = cookie.indexOf("=");
|
|
40288
41920
|
if (eq !== -1 && cookie.slice(0, eq) === name) {
|
|
40289
|
-
|
|
41921
|
+
try {
|
|
41922
|
+
return decodeURIComponent(cookie.slice(eq + 1));
|
|
41923
|
+
} catch (e) {
|
|
41924
|
+
return cookie.slice(eq + 1);
|
|
41925
|
+
}
|
|
40290
41926
|
}
|
|
40291
41927
|
}
|
|
40292
41928
|
return null;
|
|
@@ -40311,6 +41947,7 @@ var require_axios = __commonJS({
|
|
|
40311
41947
|
...thing
|
|
40312
41948
|
} : thing;
|
|
40313
41949
|
function mergeConfig(config1, config2) {
|
|
41950
|
+
config1 = config1 || {};
|
|
40314
41951
|
config2 = config2 || {};
|
|
40315
41952
|
const config = /* @__PURE__ */ Object.create(null);
|
|
40316
41953
|
Object.defineProperty(config, "hasOwnProperty", {
|
|
@@ -40353,6 +41990,23 @@ var require_axios = __commonJS({
|
|
|
40353
41990
|
return getMergedValue(void 0, a);
|
|
40354
41991
|
}
|
|
40355
41992
|
}
|
|
41993
|
+
function getMergedTransitionalOption(prop) {
|
|
41994
|
+
const transitional2 = utils$1.hasOwnProp(config2, "transitional") ? config2.transitional : void 0;
|
|
41995
|
+
if (!utils$1.isUndefined(transitional2)) {
|
|
41996
|
+
if (utils$1.isPlainObject(transitional2)) {
|
|
41997
|
+
if (utils$1.hasOwnProp(transitional2, prop)) {
|
|
41998
|
+
return transitional2[prop];
|
|
41999
|
+
}
|
|
42000
|
+
} else {
|
|
42001
|
+
return void 0;
|
|
42002
|
+
}
|
|
42003
|
+
}
|
|
42004
|
+
const transitional1 = utils$1.hasOwnProp(config1, "transitional") ? config1.transitional : void 0;
|
|
42005
|
+
if (utils$1.isPlainObject(transitional1) && utils$1.hasOwnProp(transitional1, prop)) {
|
|
42006
|
+
return transitional1[prop];
|
|
42007
|
+
}
|
|
42008
|
+
return void 0;
|
|
42009
|
+
}
|
|
40356
42010
|
function mergeDirectKeys(a, b, prop) {
|
|
40357
42011
|
if (utils$1.hasOwnProp(config2, prop)) {
|
|
40358
42012
|
return getMergedValue(a, b);
|
|
@@ -40404,6 +42058,13 @@ var require_axios = __commonJS({
|
|
|
40404
42058
|
const configValue = merge2(a, b, prop);
|
|
40405
42059
|
utils$1.isUndefined(configValue) && merge2 !== mergeDirectKeys || (config[prop] = configValue);
|
|
40406
42060
|
});
|
|
42061
|
+
if (utils$1.hasOwnProp(config2, "validateStatus") && utils$1.isUndefined(config2.validateStatus) && getMergedTransitionalOption("validateStatusUndefinedResolves") === false) {
|
|
42062
|
+
if (utils$1.hasOwnProp(config1, "validateStatus")) {
|
|
42063
|
+
config.validateStatus = getMergedValue(void 0, config1.validateStatus);
|
|
42064
|
+
} else {
|
|
42065
|
+
delete config.validateStatus;
|
|
42066
|
+
}
|
|
42067
|
+
}
|
|
40407
42068
|
return config;
|
|
40408
42069
|
}
|
|
40409
42070
|
var FORM_DATA_CONTENT_HEADERS = ["content-type", "content-length"];
|
|
@@ -40412,14 +42073,14 @@ var require_axios = __commonJS({
|
|
|
40412
42073
|
headers.set(formHeaders);
|
|
40413
42074
|
return;
|
|
40414
42075
|
}
|
|
40415
|
-
Object.entries(formHeaders).forEach(([key, val]) => {
|
|
42076
|
+
Object.entries(formHeaders || {}).forEach(([key, val]) => {
|
|
40416
42077
|
if (FORM_DATA_CONTENT_HEADERS.includes(key.toLowerCase())) {
|
|
40417
42078
|
headers.set(key, val);
|
|
40418
42079
|
}
|
|
40419
42080
|
});
|
|
40420
42081
|
}
|
|
40421
|
-
var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
40422
|
-
|
|
42082
|
+
var encodeUTF8$1 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
42083
|
+
function resolveConfig(config) {
|
|
40423
42084
|
const newConfig = mergeConfig({}, config);
|
|
40424
42085
|
const own2 = (key) => utils$1.hasOwnProp(newConfig, key) ? newConfig[key] : void 0;
|
|
40425
42086
|
const data = own2("data");
|
|
@@ -40432,12 +42093,18 @@ var require_axios = __commonJS({
|
|
|
40432
42093
|
const allowAbsoluteUrls = own2("allowAbsoluteUrls");
|
|
40433
42094
|
const url2 = own2("url");
|
|
40434
42095
|
newConfig.headers = headers = AxiosHeaders.from(headers);
|
|
40435
|
-
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls),
|
|
42096
|
+
newConfig.url = buildURL(buildFullPath(baseURL, url2, allowAbsoluteUrls, newConfig), own2("params"), own2("paramsSerializer"));
|
|
40436
42097
|
if (auth) {
|
|
40437
|
-
|
|
42098
|
+
const username = utils$1.getSafeProp(auth, "username") || "";
|
|
42099
|
+
const password = utils$1.getSafeProp(auth, "password") || "";
|
|
42100
|
+
try {
|
|
42101
|
+
headers.set("Authorization", "Basic " + btoa(username + ":" + (password ? encodeUTF8$1(password) : "")));
|
|
42102
|
+
} catch (e) {
|
|
42103
|
+
throw AxiosError.from(e, AxiosError.ERR_BAD_OPTION_VALUE, config);
|
|
42104
|
+
}
|
|
40438
42105
|
}
|
|
40439
42106
|
if (utils$1.isFormData(data)) {
|
|
40440
|
-
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv) {
|
|
42107
|
+
if (platform.hasStandardBrowserEnv || platform.hasStandardBrowserWebWorkerEnv || utils$1.isReactNative(data)) {
|
|
40441
42108
|
headers.setContentType(void 0);
|
|
40442
42109
|
} else if (utils$1.isFunction(data.getHeaders)) {
|
|
40443
42110
|
setFormDataHeaders(headers, data.getHeaders(), own2("formDataHeaderPolicy"));
|
|
@@ -40456,7 +42123,7 @@ var require_axios = __commonJS({
|
|
|
40456
42123
|
}
|
|
40457
42124
|
}
|
|
40458
42125
|
return newConfig;
|
|
40459
|
-
}
|
|
42126
|
+
}
|
|
40460
42127
|
var isXHRAdapterSupported = typeof XMLHttpRequest !== "undefined";
|
|
40461
42128
|
var xhrAdapter = isXHRAdapterSupported && function(config) {
|
|
40462
42129
|
return new Promise(function dispatchXhrRequest(resolve, reject) {
|
|
@@ -40544,7 +42211,7 @@ var require_axios = __commonJS({
|
|
|
40544
42211
|
};
|
|
40545
42212
|
requestData === void 0 && requestHeaders.setContentType(null);
|
|
40546
42213
|
if ("setRequestHeader" in request) {
|
|
40547
|
-
utils$1.forEach(requestHeaders
|
|
42214
|
+
utils$1.forEach(toByteStringHeaderObject(requestHeaders), function setRequestHeader(val, key) {
|
|
40548
42215
|
request.setRequestHeader(key, val);
|
|
40549
42216
|
});
|
|
40550
42217
|
}
|
|
@@ -40581,47 +42248,50 @@ var require_axios = __commonJS({
|
|
|
40581
42248
|
const protocol = parseProtocol(_config.url);
|
|
40582
42249
|
if (protocol && !platform.protocols.includes(protocol)) {
|
|
40583
42250
|
reject(new AxiosError("Unsupported protocol " + protocol + ":", AxiosError.ERR_BAD_REQUEST, config));
|
|
42251
|
+
done();
|
|
40584
42252
|
return;
|
|
40585
42253
|
}
|
|
40586
42254
|
request.send(requestData || null);
|
|
40587
42255
|
});
|
|
40588
42256
|
};
|
|
40589
42257
|
var composeSignals = (signals, timeout) => {
|
|
40590
|
-
|
|
40591
|
-
|
|
40592
|
-
|
|
40593
|
-
if (timeout || length) {
|
|
40594
|
-
let controller = new AbortController();
|
|
40595
|
-
let aborted;
|
|
40596
|
-
const onabort = function(reason) {
|
|
40597
|
-
if (!aborted) {
|
|
40598
|
-
aborted = true;
|
|
40599
|
-
unsubscribe();
|
|
40600
|
-
const err = reason instanceof Error ? reason : this.reason;
|
|
40601
|
-
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
40602
|
-
}
|
|
40603
|
-
};
|
|
40604
|
-
let timer = timeout && setTimeout(() => {
|
|
40605
|
-
timer = null;
|
|
40606
|
-
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
40607
|
-
}, timeout);
|
|
40608
|
-
const unsubscribe = () => {
|
|
40609
|
-
if (signals) {
|
|
40610
|
-
timer && clearTimeout(timer);
|
|
40611
|
-
timer = null;
|
|
40612
|
-
signals.forEach((signal2) => {
|
|
40613
|
-
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
40614
|
-
});
|
|
40615
|
-
signals = null;
|
|
40616
|
-
}
|
|
40617
|
-
};
|
|
40618
|
-
signals.forEach((signal2) => signal2.addEventListener("abort", onabort));
|
|
40619
|
-
const {
|
|
40620
|
-
signal
|
|
40621
|
-
} = controller;
|
|
40622
|
-
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
40623
|
-
return signal;
|
|
42258
|
+
signals = signals ? signals.filter(Boolean) : [];
|
|
42259
|
+
if (!timeout && !signals.length) {
|
|
42260
|
+
return;
|
|
40624
42261
|
}
|
|
42262
|
+
const controller = new AbortController();
|
|
42263
|
+
let aborted = false;
|
|
42264
|
+
const onabort = function(reason) {
|
|
42265
|
+
if (!aborted) {
|
|
42266
|
+
aborted = true;
|
|
42267
|
+
unsubscribe();
|
|
42268
|
+
const err = reason instanceof Error ? reason : this.reason;
|
|
42269
|
+
controller.abort(err instanceof AxiosError ? err : new CanceledError(err instanceof Error ? err.message : err));
|
|
42270
|
+
}
|
|
42271
|
+
};
|
|
42272
|
+
let timer = timeout && setTimeout(() => {
|
|
42273
|
+
timer = null;
|
|
42274
|
+
onabort(new AxiosError(`timeout of ${timeout}ms exceeded`, AxiosError.ETIMEDOUT));
|
|
42275
|
+
}, timeout);
|
|
42276
|
+
const unsubscribe = () => {
|
|
42277
|
+
if (!signals) {
|
|
42278
|
+
return;
|
|
42279
|
+
}
|
|
42280
|
+
timer && clearTimeout(timer);
|
|
42281
|
+
timer = null;
|
|
42282
|
+
signals.forEach((signal2) => {
|
|
42283
|
+
signal2.unsubscribe ? signal2.unsubscribe(onabort) : signal2.removeEventListener("abort", onabort);
|
|
42284
|
+
});
|
|
42285
|
+
signals = null;
|
|
42286
|
+
};
|
|
42287
|
+
signals.forEach((signal2) => signal2.addEventListener("abort", onabort, {
|
|
42288
|
+
once: true
|
|
42289
|
+
}));
|
|
42290
|
+
const {
|
|
42291
|
+
signal
|
|
42292
|
+
} = controller;
|
|
42293
|
+
signal.unsubscribe = () => utils$1.asap(unsubscribe);
|
|
42294
|
+
return signal;
|
|
40625
42295
|
};
|
|
40626
42296
|
var streamChunk = function* (chunk, chunkSize) {
|
|
40627
42297
|
let len = chunk.byteLength;
|
|
@@ -40708,6 +42378,17 @@ var require_axios = __commonJS({
|
|
|
40708
42378
|
var {
|
|
40709
42379
|
isFunction
|
|
40710
42380
|
} = utils$1;
|
|
42381
|
+
var encodeUTF8 = (str) => encodeURIComponent(str).replace(/%([0-9A-F]{2})/gi, (_, hex) => String.fromCharCode(parseInt(hex, 16)));
|
|
42382
|
+
var decodeURIComponentSafe = (value) => {
|
|
42383
|
+
if (!utils$1.isString(value)) {
|
|
42384
|
+
return value;
|
|
42385
|
+
}
|
|
42386
|
+
try {
|
|
42387
|
+
return decodeURIComponent(value);
|
|
42388
|
+
} catch (error) {
|
|
42389
|
+
return value;
|
|
42390
|
+
}
|
|
42391
|
+
};
|
|
40711
42392
|
var test = (fn, ...args) => {
|
|
40712
42393
|
try {
|
|
40713
42394
|
return !!fn(...args);
|
|
@@ -40715,9 +42396,16 @@ var require_axios = __commonJS({
|
|
|
40715
42396
|
return false;
|
|
40716
42397
|
}
|
|
40717
42398
|
};
|
|
42399
|
+
var maybeWithAuthCredentials = (url2) => {
|
|
42400
|
+
const protocolIndex = url2.indexOf("://");
|
|
42401
|
+
let urlToCheck = url2;
|
|
42402
|
+
if (protocolIndex !== -1) {
|
|
42403
|
+
urlToCheck = urlToCheck.slice(protocolIndex + 3);
|
|
42404
|
+
}
|
|
42405
|
+
return urlToCheck.includes("@") || urlToCheck.includes(":");
|
|
42406
|
+
};
|
|
40718
42407
|
var factory = (env) => {
|
|
40719
|
-
|
|
40720
|
-
const globalObject = (_utils$global = utils$1.global) !== null && _utils$global !== void 0 ? _utils$global : globalThis;
|
|
42408
|
+
const globalObject = utils$1.global !== void 0 && utils$1.global !== null ? utils$1.global : globalThis;
|
|
40721
42409
|
const {
|
|
40722
42410
|
ReadableStream: ReadableStream2,
|
|
40723
42411
|
TextEncoder: TextEncoder2
|
|
@@ -40819,6 +42507,7 @@ var require_axios = __commonJS({
|
|
|
40819
42507
|
} = resolveConfig(config);
|
|
40820
42508
|
const hasMaxContentLength = utils$1.isNumber(maxContentLength) && maxContentLength > -1;
|
|
40821
42509
|
const hasMaxBodyLength = utils$1.isNumber(maxBodyLength) && maxBodyLength > -1;
|
|
42510
|
+
const own2 = (key) => utils$1.hasOwnProp(config, key) ? config[key] : void 0;
|
|
40822
42511
|
let _fetch2 = envFetch || fetch;
|
|
40823
42512
|
responseType = responseType ? (responseType + "").toLowerCase() : "text";
|
|
40824
42513
|
let composedSignal = composeSignals([signal, cancelToken && cancelToken.toAbortSignal()], timeout);
|
|
@@ -40827,7 +42516,39 @@ var require_axios = __commonJS({
|
|
|
40827
42516
|
composedSignal.unsubscribe();
|
|
40828
42517
|
});
|
|
40829
42518
|
let requestContentLength;
|
|
42519
|
+
let pendingBodyError = null;
|
|
42520
|
+
const maxBodyLengthError = () => new AxiosError("Request body larger than maxBodyLength limit", AxiosError.ERR_BAD_REQUEST, config, request);
|
|
40830
42521
|
try {
|
|
42522
|
+
let auth = void 0;
|
|
42523
|
+
const configAuth = own2("auth");
|
|
42524
|
+
if (configAuth) {
|
|
42525
|
+
const username = utils$1.getSafeProp(configAuth, "username") || "";
|
|
42526
|
+
const password = utils$1.getSafeProp(configAuth, "password") || "";
|
|
42527
|
+
auth = {
|
|
42528
|
+
username,
|
|
42529
|
+
password
|
|
42530
|
+
};
|
|
42531
|
+
}
|
|
42532
|
+
if (maybeWithAuthCredentials(url2)) {
|
|
42533
|
+
const parsedURL = new URL(url2, platform.origin);
|
|
42534
|
+
if (!auth && (parsedURL.username || parsedURL.password)) {
|
|
42535
|
+
const urlUsername = decodeURIComponentSafe(parsedURL.username);
|
|
42536
|
+
const urlPassword = decodeURIComponentSafe(parsedURL.password);
|
|
42537
|
+
auth = {
|
|
42538
|
+
username: urlUsername,
|
|
42539
|
+
password: urlPassword
|
|
42540
|
+
};
|
|
42541
|
+
}
|
|
42542
|
+
if (parsedURL.username || parsedURL.password) {
|
|
42543
|
+
parsedURL.username = "";
|
|
42544
|
+
parsedURL.password = "";
|
|
42545
|
+
url2 = parsedURL.href;
|
|
42546
|
+
}
|
|
42547
|
+
}
|
|
42548
|
+
if (auth) {
|
|
42549
|
+
headers.delete("authorization");
|
|
42550
|
+
headers.set("Authorization", "Basic " + btoa(encodeUTF8((auth.username || "") + ":" + (auth.password || ""))));
|
|
42551
|
+
}
|
|
40831
42552
|
if (hasMaxContentLength && typeof url2 === "string" && url2.startsWith("data:")) {
|
|
40832
42553
|
const estimated = estimateDataURLDecodedBytes(url2);
|
|
40833
42554
|
if (estimated > maxContentLength) {
|
|
@@ -40835,25 +42556,42 @@ var require_axios = __commonJS({
|
|
|
40835
42556
|
}
|
|
40836
42557
|
}
|
|
40837
42558
|
if (hasMaxBodyLength && method !== "get" && method !== "head") {
|
|
40838
|
-
const outboundLength = await
|
|
40839
|
-
if (typeof outboundLength === "number" && isFinite(outboundLength)
|
|
40840
|
-
|
|
42559
|
+
const outboundLength = await getBodyLength(data);
|
|
42560
|
+
if (typeof outboundLength === "number" && isFinite(outboundLength)) {
|
|
42561
|
+
requestContentLength = outboundLength;
|
|
42562
|
+
if (outboundLength > maxBodyLength) {
|
|
42563
|
+
throw maxBodyLengthError();
|
|
42564
|
+
}
|
|
40841
42565
|
}
|
|
40842
42566
|
}
|
|
40843
|
-
|
|
40844
|
-
|
|
40845
|
-
|
|
40846
|
-
|
|
40847
|
-
|
|
40848
|
-
|
|
40849
|
-
|
|
40850
|
-
|
|
40851
|
-
|
|
40852
|
-
|
|
40853
|
-
|
|
40854
|
-
|
|
40855
|
-
|
|
42567
|
+
const mustEnforceStreamBody = hasMaxBodyLength && (utils$1.isReadableStream(data) || utils$1.isStream(data));
|
|
42568
|
+
const trackRequestStream = (stream2, onProgress, flush) => trackStream(stream2, DEFAULT_CHUNK_SIZE, (loadedBytes) => {
|
|
42569
|
+
if (hasMaxBodyLength && loadedBytes > maxBodyLength) {
|
|
42570
|
+
throw pendingBodyError = maxBodyLengthError();
|
|
42571
|
+
}
|
|
42572
|
+
onProgress && onProgress(loadedBytes);
|
|
42573
|
+
}, flush);
|
|
42574
|
+
if (supportsRequestStream && method !== "get" && method !== "head" && (onUploadProgress || mustEnforceStreamBody)) {
|
|
42575
|
+
requestContentLength = requestContentLength == null ? await resolveBodyLength(headers, data) : requestContentLength;
|
|
42576
|
+
if (requestContentLength !== 0 || mustEnforceStreamBody) {
|
|
42577
|
+
let _request = new Request(url2, {
|
|
42578
|
+
method: "POST",
|
|
42579
|
+
body: data,
|
|
42580
|
+
duplex: "half"
|
|
42581
|
+
});
|
|
42582
|
+
let contentTypeHeader;
|
|
42583
|
+
if (utils$1.isFormData(data) && (contentTypeHeader = _request.headers.get("content-type"))) {
|
|
42584
|
+
headers.setContentType(contentTypeHeader);
|
|
42585
|
+
}
|
|
42586
|
+
if (_request.body) {
|
|
42587
|
+
const [onProgress, flush] = onUploadProgress && progressEventDecorator(requestContentLength, progressEventReducer(asyncDecorator(onUploadProgress))) || [];
|
|
42588
|
+
data = trackRequestStream(_request.body, onProgress, flush);
|
|
42589
|
+
}
|
|
40856
42590
|
}
|
|
42591
|
+
} else if (mustEnforceStreamBody && !isRequestSupported && isReadableStreamSupported && method !== "get" && method !== "head") {
|
|
42592
|
+
data = trackRequestStream(data);
|
|
42593
|
+
} else if (mustEnforceStreamBody && isRequestSupported && !supportsRequestStream && method !== "get" && method !== "head") {
|
|
42594
|
+
throw new AxiosError("Stream request bodies are not supported by the current fetch implementation", AxiosError.ERR_NOT_SUPPORT, config, request);
|
|
40857
42595
|
}
|
|
40858
42596
|
if (!utils$1.isString(withCredentials)) {
|
|
40859
42597
|
withCredentials = withCredentials ? "include" : "omit";
|
|
@@ -40870,15 +42608,16 @@ var require_axios = __commonJS({
|
|
|
40870
42608
|
...fetchOptions,
|
|
40871
42609
|
signal: composedSignal,
|
|
40872
42610
|
method: method.toUpperCase(),
|
|
40873
|
-
headers: headers.normalize()
|
|
42611
|
+
headers: toByteStringHeaderObject(headers.normalize()),
|
|
40874
42612
|
body: data,
|
|
40875
42613
|
duplex: "half",
|
|
40876
42614
|
credentials: isCredentialsSupported ? withCredentials : void 0
|
|
40877
42615
|
};
|
|
40878
42616
|
request = isRequestSupported && new Request(url2, resolvedOptions);
|
|
40879
42617
|
let response = await (isRequestSupported ? _fetch2(request, fetchOptions) : _fetch2(url2, resolvedOptions));
|
|
42618
|
+
const responseHeaders = AxiosHeaders.from(response.headers);
|
|
40880
42619
|
if (hasMaxContentLength) {
|
|
40881
|
-
const declaredLength = utils$1.toFiniteNumber(
|
|
42620
|
+
const declaredLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
40882
42621
|
if (declaredLength != null && declaredLength > maxContentLength) {
|
|
40883
42622
|
throw new AxiosError("maxContentLength size of " + maxContentLength + " exceeded", AxiosError.ERR_BAD_RESPONSE, config, request);
|
|
40884
42623
|
}
|
|
@@ -40889,7 +42628,7 @@ var require_axios = __commonJS({
|
|
|
40889
42628
|
["status", "statusText", "headers"].forEach((prop) => {
|
|
40890
42629
|
options[prop] = response[prop];
|
|
40891
42630
|
});
|
|
40892
|
-
const responseContentLength = utils$1.toFiniteNumber(
|
|
42631
|
+
const responseContentLength = utils$1.toFiniteNumber(responseHeaders.getContentLength());
|
|
40893
42632
|
const [onProgress, flush] = onDownloadProgress && progressEventDecorator(responseContentLength, progressEventReducer(asyncDecorator(onDownloadProgress), true)) || [];
|
|
40894
42633
|
let bytesRead = 0;
|
|
40895
42634
|
const onChunkProgress = (loadedBytes) => {
|
|
@@ -40940,13 +42679,35 @@ var require_axios = __commonJS({
|
|
|
40940
42679
|
const canceledError = composedSignal.reason;
|
|
40941
42680
|
canceledError.config = config;
|
|
40942
42681
|
request && (canceledError.request = request);
|
|
40943
|
-
err !== canceledError
|
|
42682
|
+
if (err !== canceledError) {
|
|
42683
|
+
Object.defineProperty(canceledError, "cause", {
|
|
42684
|
+
__proto__: null,
|
|
42685
|
+
value: err,
|
|
42686
|
+
writable: true,
|
|
42687
|
+
enumerable: false,
|
|
42688
|
+
configurable: true
|
|
42689
|
+
});
|
|
42690
|
+
}
|
|
40944
42691
|
throw canceledError;
|
|
40945
42692
|
}
|
|
42693
|
+
if (pendingBodyError) {
|
|
42694
|
+
request && !pendingBodyError.request && (pendingBodyError.request = request);
|
|
42695
|
+
throw pendingBodyError;
|
|
42696
|
+
}
|
|
42697
|
+
if (err instanceof AxiosError) {
|
|
42698
|
+
request && !err.request && (err.request = request);
|
|
42699
|
+
throw err;
|
|
42700
|
+
}
|
|
40946
42701
|
if (err && err.name === "TypeError" && /Load failed|fetch/i.test(err.message)) {
|
|
40947
|
-
|
|
40948
|
-
|
|
42702
|
+
const networkError = new AxiosError("Network Error", AxiosError.ERR_NETWORK, config, request, err && err.response);
|
|
42703
|
+
Object.defineProperty(networkError, "cause", {
|
|
42704
|
+
__proto__: null,
|
|
42705
|
+
value: err.cause || err,
|
|
42706
|
+
writable: true,
|
|
42707
|
+
enumerable: false,
|
|
42708
|
+
configurable: true
|
|
40949
42709
|
});
|
|
42710
|
+
throw networkError;
|
|
40950
42711
|
}
|
|
40951
42712
|
throw AxiosError.from(err, err && err.code, config, request, err && err.response);
|
|
40952
42713
|
}
|
|
@@ -41021,7 +42782,7 @@ var require_axios = __commonJS({
|
|
|
41021
42782
|
if (!adapter) {
|
|
41022
42783
|
const reasons = Object.entries(rejectedReasons).map(([id, state]) => `adapter ${id} ` + (state === false ? "is not supported by the environment" : "is not available in the build"));
|
|
41023
42784
|
let s = length ? reasons.length > 1 ? "since :\n" + reasons.map(renderReason).join("\n") : " " + renderReason(reasons[0]) : "as no adapter specified";
|
|
41024
|
-
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s,
|
|
42785
|
+
throw new AxiosError(`There is no suitable adapter to dispatch the request ` + s, AxiosError.ERR_NOT_SUPPORT);
|
|
41025
42786
|
}
|
|
41026
42787
|
return adapter;
|
|
41027
42788
|
}
|
|
@@ -41108,7 +42869,7 @@ var require_axios = __commonJS({
|
|
|
41108
42869
|
};
|
|
41109
42870
|
};
|
|
41110
42871
|
function assertOptions(options, schema, allowUnknown) {
|
|
41111
|
-
if (typeof options !== "object") {
|
|
42872
|
+
if (typeof options !== "object" || options === null) {
|
|
41112
42873
|
throw new AxiosError("options must be an object", AxiosError.ERR_BAD_OPTION_VALUE);
|
|
41113
42874
|
}
|
|
41114
42875
|
const keys = Object.keys(options);
|
|
@@ -41199,7 +42960,9 @@ var require_axios = __commonJS({
|
|
|
41199
42960
|
silentJSONParsing: validators.transitional(validators.boolean),
|
|
41200
42961
|
forcedJSONParsing: validators.transitional(validators.boolean),
|
|
41201
42962
|
clarifyTimeoutError: validators.transitional(validators.boolean),
|
|
41202
|
-
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean)
|
|
42963
|
+
legacyInterceptorReqResOrdering: validators.transitional(validators.boolean),
|
|
42964
|
+
advertiseZstdAcceptEncoding: validators.transitional(validators.boolean),
|
|
42965
|
+
validateStatusUndefinedResolves: validators.transitional(validators.boolean)
|
|
41203
42966
|
}, false);
|
|
41204
42967
|
}
|
|
41205
42968
|
if (paramsSerializer != null) {
|
|
@@ -41290,7 +43053,7 @@ var require_axios = __commonJS({
|
|
|
41290
43053
|
}
|
|
41291
43054
|
getUri(config) {
|
|
41292
43055
|
config = mergeConfig(this.defaults, config);
|
|
41293
|
-
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
|
43056
|
+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls, config);
|
|
41294
43057
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
|
41295
43058
|
}
|
|
41296
43059
|
};
|
|
@@ -41299,7 +43062,7 @@ var require_axios = __commonJS({
|
|
|
41299
43062
|
return this.request(mergeConfig(config || {}, {
|
|
41300
43063
|
method,
|
|
41301
43064
|
url: url2,
|
|
41302
|
-
data: (config
|
|
43065
|
+
data: config && utils$1.hasOwnProp(config, "data") ? config.data : void 0
|
|
41303
43066
|
}));
|
|
41304
43067
|
};
|
|
41305
43068
|
});
|
|
@@ -48115,7 +49878,7 @@ mime-types/index.js:
|
|
|
48115
49878
|
*)
|
|
48116
49879
|
|
|
48117
49880
|
axios/dist/node/axios.cjs:
|
|
48118
|
-
(*! Axios v1.
|
|
49881
|
+
(*! Axios v1.18.1 Copyright (c) 2026 Matt Zabriskie and contributors *)
|
|
48119
49882
|
|
|
48120
49883
|
posthog-node/lib/node/index.mjs:
|
|
48121
49884
|
(**
|