@fragment-dev/cli 2026.8.19-2 → 2026.8.19-5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-TKGH62DQ.js → chunk-2F3EPMC2.js} +3 -3
- package/dist/{chunk-4BCQFVJS.js → chunk-2SSJEXQE.js} +2 -2
- package/dist/{chunk-IYYWZCZE.js → chunk-52KK5CBJ.js} +3 -3
- package/dist/{chunk-5JLMMFER.js → chunk-6CZRVR4P.js} +1 -1
- package/dist/{chunk-MW6SJUWV.js → chunk-A7SZSUFN.js} +3 -3
- package/dist/{chunk-B6FQTKMF.js → chunk-BOKRXIIJ.js} +6 -1
- package/dist/{chunk-K5RBCJWQ.js → chunk-BYZNYEGH.js} +2 -2
- package/dist/{chunk-VCANHQTI.js → chunk-C76SZWZQ.js} +3 -3
- package/dist/{chunk-JFF37Z5K.js → chunk-EXE547EZ.js} +1 -1
- package/dist/{chunk-K3P7VNMI.js → chunk-FFPHQE2L.js} +2 -2
- package/dist/{chunk-SI23PX53.js → chunk-FSXQNE7C.js} +3 -3
- package/dist/{chunk-U3MARZMM.js → chunk-GC4BS6PI.js} +2 -2
- package/dist/{chunk-XWX7CFJN.js → chunk-GMRU6GAU.js} +3 -3
- package/dist/{chunk-G353NPK6.js → chunk-GR56HSO2.js} +3 -3
- package/dist/{chunk-2IMQAI2H.js → chunk-HD5OZZGY.js} +3 -3
- package/dist/{chunk-URUHIS5X.js → chunk-IJZAXY2T.js} +2 -2
- package/dist/{chunk-63M7ILIN.js → chunk-IMKPDURF.js} +1 -1
- package/dist/{chunk-6SMC73UW.js → chunk-LFCNPXLH.js} +11 -11
- package/dist/{chunk-TUQGCEII.js → chunk-LFLUV5JB.js} +3 -3
- package/dist/{chunk-5AKX23CJ.js → chunk-LKSH7JX2.js} +1 -1
- package/dist/{chunk-T3VKTESM.js → chunk-OU47YR6G.js} +2 -2
- package/dist/{chunk-IXX2EVIM.js → chunk-PISSWWTD.js} +3 -3
- package/dist/{chunk-QBPVO732.js → chunk-PYCCU6YP.js} +25 -25
- package/dist/{chunk-TOXMGEU7.js → chunk-Q4ZYW3HH.js} +2 -2
- package/dist/{chunk-PRVTTUHI.js → chunk-QQKP5HYM.js} +3 -3
- package/dist/{chunk-YVL4XU33.js → chunk-T26ZJFU2.js} +2 -2
- package/dist/{chunk-O4B4GJRJ.js → chunk-TA7AII5O.js} +3 -3
- package/dist/{chunk-JDSPZQFF.js → chunk-UZGZUY2H.js} +4 -4
- package/dist/{chunk-W2V2ILHS.js → chunk-W33MLXYW.js} +34 -817
- package/dist/{chunk-7WVW7SOJ.js → chunk-W3NR7LXK.js} +7 -7
- package/dist/{chunk-AFWII2SB.js → chunk-WCZBTF4D.js} +5 -5
- package/dist/{chunk-HVQUC54T.js → chunk-XDMOC74J.js} +1 -1
- package/dist/{chunk-B7FCVEVL.js → chunk-XK2D2Z44.js} +7 -7
- package/dist/{chunk-QAFH3E4Q.js → chunk-YIORXOPF.js} +1 -1
- package/dist/{chunk-GXPUQEAI.js → chunk-YMMWICMZ.js} +3 -3
- package/dist/{chunk-KAGCPC3G.js → chunk-YPZVTJEH.js} +46 -830
- package/dist/{chunk-X5KIPJRF.js → chunk-ZMFGVGZP.js} +1 -1
- package/dist/{chunk-7FQSPYFZ.js → chunk-ZQC6OQUA.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 +1 -1
- package/package.json +1 -1
|
@@ -13,11 +13,11 @@ import {
|
|
|
13
13
|
require_syntax,
|
|
14
14
|
require_type,
|
|
15
15
|
require_uri
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-W33MLXYW.js";
|
|
17
17
|
import {
|
|
18
|
-
|
|
18
|
+
require_color_convert,
|
|
19
19
|
require_source
|
|
20
|
-
} from "./chunk-
|
|
20
|
+
} from "./chunk-XK2D2Z44.js";
|
|
21
21
|
import {
|
|
22
22
|
__commonJS,
|
|
23
23
|
__require,
|
|
@@ -13390,811 +13390,6 @@ var require_cli_width = __commonJS({
|
|
|
13390
13390
|
}
|
|
13391
13391
|
});
|
|
13392
13392
|
|
|
13393
|
-
// ../../node_modules/wrap-ansi/node_modules/color-convert/conversions.js
|
|
13394
|
-
var require_conversions = __commonJS({
|
|
13395
|
-
"../../node_modules/wrap-ansi/node_modules/color-convert/conversions.js"(exports, module) {
|
|
13396
|
-
init_cjs_shims();
|
|
13397
|
-
var cssKeywords = require_color_name();
|
|
13398
|
-
var reverseKeywords = {};
|
|
13399
|
-
for (const key of Object.keys(cssKeywords)) {
|
|
13400
|
-
reverseKeywords[cssKeywords[key]] = key;
|
|
13401
|
-
}
|
|
13402
|
-
var convert = {
|
|
13403
|
-
rgb: { channels: 3, labels: "rgb" },
|
|
13404
|
-
hsl: { channels: 3, labels: "hsl" },
|
|
13405
|
-
hsv: { channels: 3, labels: "hsv" },
|
|
13406
|
-
hwb: { channels: 3, labels: "hwb" },
|
|
13407
|
-
cmyk: { channels: 4, labels: "cmyk" },
|
|
13408
|
-
xyz: { channels: 3, labels: "xyz" },
|
|
13409
|
-
lab: { channels: 3, labels: "lab" },
|
|
13410
|
-
lch: { channels: 3, labels: "lch" },
|
|
13411
|
-
hex: { channels: 1, labels: ["hex"] },
|
|
13412
|
-
keyword: { channels: 1, labels: ["keyword"] },
|
|
13413
|
-
ansi16: { channels: 1, labels: ["ansi16"] },
|
|
13414
|
-
ansi256: { channels: 1, labels: ["ansi256"] },
|
|
13415
|
-
hcg: { channels: 3, labels: ["h", "c", "g"] },
|
|
13416
|
-
apple: { channels: 3, labels: ["r16", "g16", "b16"] },
|
|
13417
|
-
gray: { channels: 1, labels: ["gray"] }
|
|
13418
|
-
};
|
|
13419
|
-
module.exports = convert;
|
|
13420
|
-
for (const model of Object.keys(convert)) {
|
|
13421
|
-
if (!("channels" in convert[model])) {
|
|
13422
|
-
throw new Error("missing channels property: " + model);
|
|
13423
|
-
}
|
|
13424
|
-
if (!("labels" in convert[model])) {
|
|
13425
|
-
throw new Error("missing channel labels property: " + model);
|
|
13426
|
-
}
|
|
13427
|
-
if (convert[model].labels.length !== convert[model].channels) {
|
|
13428
|
-
throw new Error("channel and label counts mismatch: " + model);
|
|
13429
|
-
}
|
|
13430
|
-
const { channels, labels } = convert[model];
|
|
13431
|
-
delete convert[model].channels;
|
|
13432
|
-
delete convert[model].labels;
|
|
13433
|
-
Object.defineProperty(convert[model], "channels", { value: channels });
|
|
13434
|
-
Object.defineProperty(convert[model], "labels", { value: labels });
|
|
13435
|
-
}
|
|
13436
|
-
convert.rgb.hsl = function(rgb) {
|
|
13437
|
-
const r = rgb[0] / 255;
|
|
13438
|
-
const g = rgb[1] / 255;
|
|
13439
|
-
const b = rgb[2] / 255;
|
|
13440
|
-
const min = Math.min(r, g, b);
|
|
13441
|
-
const max = Math.max(r, g, b);
|
|
13442
|
-
const delta = max - min;
|
|
13443
|
-
let h;
|
|
13444
|
-
let s;
|
|
13445
|
-
if (max === min) {
|
|
13446
|
-
h = 0;
|
|
13447
|
-
} else if (r === max) {
|
|
13448
|
-
h = (g - b) / delta;
|
|
13449
|
-
} else if (g === max) {
|
|
13450
|
-
h = 2 + (b - r) / delta;
|
|
13451
|
-
} else if (b === max) {
|
|
13452
|
-
h = 4 + (r - g) / delta;
|
|
13453
|
-
}
|
|
13454
|
-
h = Math.min(h * 60, 360);
|
|
13455
|
-
if (h < 0) {
|
|
13456
|
-
h += 360;
|
|
13457
|
-
}
|
|
13458
|
-
const l = (min + max) / 2;
|
|
13459
|
-
if (max === min) {
|
|
13460
|
-
s = 0;
|
|
13461
|
-
} else if (l <= 0.5) {
|
|
13462
|
-
s = delta / (max + min);
|
|
13463
|
-
} else {
|
|
13464
|
-
s = delta / (2 - max - min);
|
|
13465
|
-
}
|
|
13466
|
-
return [h, s * 100, l * 100];
|
|
13467
|
-
};
|
|
13468
|
-
convert.rgb.hsv = function(rgb) {
|
|
13469
|
-
let rdif;
|
|
13470
|
-
let gdif;
|
|
13471
|
-
let bdif;
|
|
13472
|
-
let h;
|
|
13473
|
-
let s;
|
|
13474
|
-
const r = rgb[0] / 255;
|
|
13475
|
-
const g = rgb[1] / 255;
|
|
13476
|
-
const b = rgb[2] / 255;
|
|
13477
|
-
const v = Math.max(r, g, b);
|
|
13478
|
-
const diff = v - Math.min(r, g, b);
|
|
13479
|
-
const diffc = function(c) {
|
|
13480
|
-
return (v - c) / 6 / diff + 1 / 2;
|
|
13481
|
-
};
|
|
13482
|
-
if (diff === 0) {
|
|
13483
|
-
h = 0;
|
|
13484
|
-
s = 0;
|
|
13485
|
-
} else {
|
|
13486
|
-
s = diff / v;
|
|
13487
|
-
rdif = diffc(r);
|
|
13488
|
-
gdif = diffc(g);
|
|
13489
|
-
bdif = diffc(b);
|
|
13490
|
-
if (r === v) {
|
|
13491
|
-
h = bdif - gdif;
|
|
13492
|
-
} else if (g === v) {
|
|
13493
|
-
h = 1 / 3 + rdif - bdif;
|
|
13494
|
-
} else if (b === v) {
|
|
13495
|
-
h = 2 / 3 + gdif - rdif;
|
|
13496
|
-
}
|
|
13497
|
-
if (h < 0) {
|
|
13498
|
-
h += 1;
|
|
13499
|
-
} else if (h > 1) {
|
|
13500
|
-
h -= 1;
|
|
13501
|
-
}
|
|
13502
|
-
}
|
|
13503
|
-
return [
|
|
13504
|
-
h * 360,
|
|
13505
|
-
s * 100,
|
|
13506
|
-
v * 100
|
|
13507
|
-
];
|
|
13508
|
-
};
|
|
13509
|
-
convert.rgb.hwb = function(rgb) {
|
|
13510
|
-
const r = rgb[0];
|
|
13511
|
-
const g = rgb[1];
|
|
13512
|
-
let b = rgb[2];
|
|
13513
|
-
const h = convert.rgb.hsl(rgb)[0];
|
|
13514
|
-
const w = 1 / 255 * Math.min(r, Math.min(g, b));
|
|
13515
|
-
b = 1 - 1 / 255 * Math.max(r, Math.max(g, b));
|
|
13516
|
-
return [h, w * 100, b * 100];
|
|
13517
|
-
};
|
|
13518
|
-
convert.rgb.cmyk = function(rgb) {
|
|
13519
|
-
const r = rgb[0] / 255;
|
|
13520
|
-
const g = rgb[1] / 255;
|
|
13521
|
-
const b = rgb[2] / 255;
|
|
13522
|
-
const k = Math.min(1 - r, 1 - g, 1 - b);
|
|
13523
|
-
const c = (1 - r - k) / (1 - k) || 0;
|
|
13524
|
-
const m = (1 - g - k) / (1 - k) || 0;
|
|
13525
|
-
const y = (1 - b - k) / (1 - k) || 0;
|
|
13526
|
-
return [c * 100, m * 100, y * 100, k * 100];
|
|
13527
|
-
};
|
|
13528
|
-
function comparativeDistance(x, y) {
|
|
13529
|
-
return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
|
|
13530
|
-
}
|
|
13531
|
-
convert.rgb.keyword = function(rgb) {
|
|
13532
|
-
const reversed = reverseKeywords[rgb];
|
|
13533
|
-
if (reversed) {
|
|
13534
|
-
return reversed;
|
|
13535
|
-
}
|
|
13536
|
-
let currentClosestDistance = Infinity;
|
|
13537
|
-
let currentClosestKeyword;
|
|
13538
|
-
for (const keyword of Object.keys(cssKeywords)) {
|
|
13539
|
-
const value = cssKeywords[keyword];
|
|
13540
|
-
const distance = comparativeDistance(rgb, value);
|
|
13541
|
-
if (distance < currentClosestDistance) {
|
|
13542
|
-
currentClosestDistance = distance;
|
|
13543
|
-
currentClosestKeyword = keyword;
|
|
13544
|
-
}
|
|
13545
|
-
}
|
|
13546
|
-
return currentClosestKeyword;
|
|
13547
|
-
};
|
|
13548
|
-
convert.keyword.rgb = function(keyword) {
|
|
13549
|
-
return cssKeywords[keyword];
|
|
13550
|
-
};
|
|
13551
|
-
convert.rgb.xyz = function(rgb) {
|
|
13552
|
-
let r = rgb[0] / 255;
|
|
13553
|
-
let g = rgb[1] / 255;
|
|
13554
|
-
let b = rgb[2] / 255;
|
|
13555
|
-
r = r > 0.04045 ? ((r + 0.055) / 1.055) ** 2.4 : r / 12.92;
|
|
13556
|
-
g = g > 0.04045 ? ((g + 0.055) / 1.055) ** 2.4 : g / 12.92;
|
|
13557
|
-
b = b > 0.04045 ? ((b + 0.055) / 1.055) ** 2.4 : b / 12.92;
|
|
13558
|
-
const x = r * 0.4124 + g * 0.3576 + b * 0.1805;
|
|
13559
|
-
const y = r * 0.2126 + g * 0.7152 + b * 0.0722;
|
|
13560
|
-
const z = r * 0.0193 + g * 0.1192 + b * 0.9505;
|
|
13561
|
-
return [x * 100, y * 100, z * 100];
|
|
13562
|
-
};
|
|
13563
|
-
convert.rgb.lab = function(rgb) {
|
|
13564
|
-
const xyz = convert.rgb.xyz(rgb);
|
|
13565
|
-
let x = xyz[0];
|
|
13566
|
-
let y = xyz[1];
|
|
13567
|
-
let z = xyz[2];
|
|
13568
|
-
x /= 95.047;
|
|
13569
|
-
y /= 100;
|
|
13570
|
-
z /= 108.883;
|
|
13571
|
-
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
13572
|
-
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
13573
|
-
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
13574
|
-
const l = 116 * y - 16;
|
|
13575
|
-
const a = 500 * (x - y);
|
|
13576
|
-
const b = 200 * (y - z);
|
|
13577
|
-
return [l, a, b];
|
|
13578
|
-
};
|
|
13579
|
-
convert.hsl.rgb = function(hsl) {
|
|
13580
|
-
const h = hsl[0] / 360;
|
|
13581
|
-
const s = hsl[1] / 100;
|
|
13582
|
-
const l = hsl[2] / 100;
|
|
13583
|
-
let t2;
|
|
13584
|
-
let t3;
|
|
13585
|
-
let val;
|
|
13586
|
-
if (s === 0) {
|
|
13587
|
-
val = l * 255;
|
|
13588
|
-
return [val, val, val];
|
|
13589
|
-
}
|
|
13590
|
-
if (l < 0.5) {
|
|
13591
|
-
t2 = l * (1 + s);
|
|
13592
|
-
} else {
|
|
13593
|
-
t2 = l + s - l * s;
|
|
13594
|
-
}
|
|
13595
|
-
const t1 = 2 * l - t2;
|
|
13596
|
-
const rgb = [0, 0, 0];
|
|
13597
|
-
for (let i = 0; i < 3; i++) {
|
|
13598
|
-
t3 = h + 1 / 3 * -(i - 1);
|
|
13599
|
-
if (t3 < 0) {
|
|
13600
|
-
t3++;
|
|
13601
|
-
}
|
|
13602
|
-
if (t3 > 1) {
|
|
13603
|
-
t3--;
|
|
13604
|
-
}
|
|
13605
|
-
if (6 * t3 < 1) {
|
|
13606
|
-
val = t1 + (t2 - t1) * 6 * t3;
|
|
13607
|
-
} else if (2 * t3 < 1) {
|
|
13608
|
-
val = t2;
|
|
13609
|
-
} else if (3 * t3 < 2) {
|
|
13610
|
-
val = t1 + (t2 - t1) * (2 / 3 - t3) * 6;
|
|
13611
|
-
} else {
|
|
13612
|
-
val = t1;
|
|
13613
|
-
}
|
|
13614
|
-
rgb[i] = val * 255;
|
|
13615
|
-
}
|
|
13616
|
-
return rgb;
|
|
13617
|
-
};
|
|
13618
|
-
convert.hsl.hsv = function(hsl) {
|
|
13619
|
-
const h = hsl[0];
|
|
13620
|
-
let s = hsl[1] / 100;
|
|
13621
|
-
let l = hsl[2] / 100;
|
|
13622
|
-
let smin = s;
|
|
13623
|
-
const lmin = Math.max(l, 0.01);
|
|
13624
|
-
l *= 2;
|
|
13625
|
-
s *= l <= 1 ? l : 2 - l;
|
|
13626
|
-
smin *= lmin <= 1 ? lmin : 2 - lmin;
|
|
13627
|
-
const v = (l + s) / 2;
|
|
13628
|
-
const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l + s);
|
|
13629
|
-
return [h, sv * 100, v * 100];
|
|
13630
|
-
};
|
|
13631
|
-
convert.hsv.rgb = function(hsv) {
|
|
13632
|
-
const h = hsv[0] / 60;
|
|
13633
|
-
const s = hsv[1] / 100;
|
|
13634
|
-
let v = hsv[2] / 100;
|
|
13635
|
-
const hi = Math.floor(h) % 6;
|
|
13636
|
-
const f = h - Math.floor(h);
|
|
13637
|
-
const p = 255 * v * (1 - s);
|
|
13638
|
-
const q = 255 * v * (1 - s * f);
|
|
13639
|
-
const t = 255 * v * (1 - s * (1 - f));
|
|
13640
|
-
v *= 255;
|
|
13641
|
-
switch (hi) {
|
|
13642
|
-
case 0:
|
|
13643
|
-
return [v, t, p];
|
|
13644
|
-
case 1:
|
|
13645
|
-
return [q, v, p];
|
|
13646
|
-
case 2:
|
|
13647
|
-
return [p, v, t];
|
|
13648
|
-
case 3:
|
|
13649
|
-
return [p, q, v];
|
|
13650
|
-
case 4:
|
|
13651
|
-
return [t, p, v];
|
|
13652
|
-
case 5:
|
|
13653
|
-
return [v, p, q];
|
|
13654
|
-
}
|
|
13655
|
-
};
|
|
13656
|
-
convert.hsv.hsl = function(hsv) {
|
|
13657
|
-
const h = hsv[0];
|
|
13658
|
-
const s = hsv[1] / 100;
|
|
13659
|
-
const v = hsv[2] / 100;
|
|
13660
|
-
const vmin = Math.max(v, 0.01);
|
|
13661
|
-
let sl;
|
|
13662
|
-
let l;
|
|
13663
|
-
l = (2 - s) * v;
|
|
13664
|
-
const lmin = (2 - s) * vmin;
|
|
13665
|
-
sl = s * vmin;
|
|
13666
|
-
sl /= lmin <= 1 ? lmin : 2 - lmin;
|
|
13667
|
-
sl = sl || 0;
|
|
13668
|
-
l /= 2;
|
|
13669
|
-
return [h, sl * 100, l * 100];
|
|
13670
|
-
};
|
|
13671
|
-
convert.hwb.rgb = function(hwb) {
|
|
13672
|
-
const h = hwb[0] / 360;
|
|
13673
|
-
let wh = hwb[1] / 100;
|
|
13674
|
-
let bl = hwb[2] / 100;
|
|
13675
|
-
const ratio = wh + bl;
|
|
13676
|
-
let f;
|
|
13677
|
-
if (ratio > 1) {
|
|
13678
|
-
wh /= ratio;
|
|
13679
|
-
bl /= ratio;
|
|
13680
|
-
}
|
|
13681
|
-
const i = Math.floor(6 * h);
|
|
13682
|
-
const v = 1 - bl;
|
|
13683
|
-
f = 6 * h - i;
|
|
13684
|
-
if ((i & 1) !== 0) {
|
|
13685
|
-
f = 1 - f;
|
|
13686
|
-
}
|
|
13687
|
-
const n = wh + f * (v - wh);
|
|
13688
|
-
let r;
|
|
13689
|
-
let g;
|
|
13690
|
-
let b;
|
|
13691
|
-
switch (i) {
|
|
13692
|
-
default:
|
|
13693
|
-
case 6:
|
|
13694
|
-
case 0:
|
|
13695
|
-
r = v;
|
|
13696
|
-
g = n;
|
|
13697
|
-
b = wh;
|
|
13698
|
-
break;
|
|
13699
|
-
case 1:
|
|
13700
|
-
r = n;
|
|
13701
|
-
g = v;
|
|
13702
|
-
b = wh;
|
|
13703
|
-
break;
|
|
13704
|
-
case 2:
|
|
13705
|
-
r = wh;
|
|
13706
|
-
g = v;
|
|
13707
|
-
b = n;
|
|
13708
|
-
break;
|
|
13709
|
-
case 3:
|
|
13710
|
-
r = wh;
|
|
13711
|
-
g = n;
|
|
13712
|
-
b = v;
|
|
13713
|
-
break;
|
|
13714
|
-
case 4:
|
|
13715
|
-
r = n;
|
|
13716
|
-
g = wh;
|
|
13717
|
-
b = v;
|
|
13718
|
-
break;
|
|
13719
|
-
case 5:
|
|
13720
|
-
r = v;
|
|
13721
|
-
g = wh;
|
|
13722
|
-
b = n;
|
|
13723
|
-
break;
|
|
13724
|
-
}
|
|
13725
|
-
return [r * 255, g * 255, b * 255];
|
|
13726
|
-
};
|
|
13727
|
-
convert.cmyk.rgb = function(cmyk) {
|
|
13728
|
-
const c = cmyk[0] / 100;
|
|
13729
|
-
const m = cmyk[1] / 100;
|
|
13730
|
-
const y = cmyk[2] / 100;
|
|
13731
|
-
const k = cmyk[3] / 100;
|
|
13732
|
-
const r = 1 - Math.min(1, c * (1 - k) + k);
|
|
13733
|
-
const g = 1 - Math.min(1, m * (1 - k) + k);
|
|
13734
|
-
const b = 1 - Math.min(1, y * (1 - k) + k);
|
|
13735
|
-
return [r * 255, g * 255, b * 255];
|
|
13736
|
-
};
|
|
13737
|
-
convert.xyz.rgb = function(xyz) {
|
|
13738
|
-
const x = xyz[0] / 100;
|
|
13739
|
-
const y = xyz[1] / 100;
|
|
13740
|
-
const z = xyz[2] / 100;
|
|
13741
|
-
let r;
|
|
13742
|
-
let g;
|
|
13743
|
-
let b;
|
|
13744
|
-
r = x * 3.2406 + y * -1.5372 + z * -0.4986;
|
|
13745
|
-
g = x * -0.9689 + y * 1.8758 + z * 0.0415;
|
|
13746
|
-
b = x * 0.0557 + y * -0.204 + z * 1.057;
|
|
13747
|
-
r = r > 31308e-7 ? 1.055 * r ** (1 / 2.4) - 0.055 : r * 12.92;
|
|
13748
|
-
g = g > 31308e-7 ? 1.055 * g ** (1 / 2.4) - 0.055 : g * 12.92;
|
|
13749
|
-
b = b > 31308e-7 ? 1.055 * b ** (1 / 2.4) - 0.055 : b * 12.92;
|
|
13750
|
-
r = Math.min(Math.max(0, r), 1);
|
|
13751
|
-
g = Math.min(Math.max(0, g), 1);
|
|
13752
|
-
b = Math.min(Math.max(0, b), 1);
|
|
13753
|
-
return [r * 255, g * 255, b * 255];
|
|
13754
|
-
};
|
|
13755
|
-
convert.xyz.lab = function(xyz) {
|
|
13756
|
-
let x = xyz[0];
|
|
13757
|
-
let y = xyz[1];
|
|
13758
|
-
let z = xyz[2];
|
|
13759
|
-
x /= 95.047;
|
|
13760
|
-
y /= 100;
|
|
13761
|
-
z /= 108.883;
|
|
13762
|
-
x = x > 8856e-6 ? x ** (1 / 3) : 7.787 * x + 16 / 116;
|
|
13763
|
-
y = y > 8856e-6 ? y ** (1 / 3) : 7.787 * y + 16 / 116;
|
|
13764
|
-
z = z > 8856e-6 ? z ** (1 / 3) : 7.787 * z + 16 / 116;
|
|
13765
|
-
const l = 116 * y - 16;
|
|
13766
|
-
const a = 500 * (x - y);
|
|
13767
|
-
const b = 200 * (y - z);
|
|
13768
|
-
return [l, a, b];
|
|
13769
|
-
};
|
|
13770
|
-
convert.lab.xyz = function(lab) {
|
|
13771
|
-
const l = lab[0];
|
|
13772
|
-
const a = lab[1];
|
|
13773
|
-
const b = lab[2];
|
|
13774
|
-
let x;
|
|
13775
|
-
let y;
|
|
13776
|
-
let z;
|
|
13777
|
-
y = (l + 16) / 116;
|
|
13778
|
-
x = a / 500 + y;
|
|
13779
|
-
z = y - b / 200;
|
|
13780
|
-
const y2 = y ** 3;
|
|
13781
|
-
const x2 = x ** 3;
|
|
13782
|
-
const z2 = z ** 3;
|
|
13783
|
-
y = y2 > 8856e-6 ? y2 : (y - 16 / 116) / 7.787;
|
|
13784
|
-
x = x2 > 8856e-6 ? x2 : (x - 16 / 116) / 7.787;
|
|
13785
|
-
z = z2 > 8856e-6 ? z2 : (z - 16 / 116) / 7.787;
|
|
13786
|
-
x *= 95.047;
|
|
13787
|
-
y *= 100;
|
|
13788
|
-
z *= 108.883;
|
|
13789
|
-
return [x, y, z];
|
|
13790
|
-
};
|
|
13791
|
-
convert.lab.lch = function(lab) {
|
|
13792
|
-
const l = lab[0];
|
|
13793
|
-
const a = lab[1];
|
|
13794
|
-
const b = lab[2];
|
|
13795
|
-
let h;
|
|
13796
|
-
const hr = Math.atan2(b, a);
|
|
13797
|
-
h = hr * 360 / 2 / Math.PI;
|
|
13798
|
-
if (h < 0) {
|
|
13799
|
-
h += 360;
|
|
13800
|
-
}
|
|
13801
|
-
const c = Math.sqrt(a * a + b * b);
|
|
13802
|
-
return [l, c, h];
|
|
13803
|
-
};
|
|
13804
|
-
convert.lch.lab = function(lch) {
|
|
13805
|
-
const l = lch[0];
|
|
13806
|
-
const c = lch[1];
|
|
13807
|
-
const h = lch[2];
|
|
13808
|
-
const hr = h / 360 * 2 * Math.PI;
|
|
13809
|
-
const a = c * Math.cos(hr);
|
|
13810
|
-
const b = c * Math.sin(hr);
|
|
13811
|
-
return [l, a, b];
|
|
13812
|
-
};
|
|
13813
|
-
convert.rgb.ansi16 = function(args, saturation = null) {
|
|
13814
|
-
const [r, g, b] = args;
|
|
13815
|
-
let value = saturation === null ? convert.rgb.hsv(args)[2] : saturation;
|
|
13816
|
-
value = Math.round(value / 50);
|
|
13817
|
-
if (value === 0) {
|
|
13818
|
-
return 30;
|
|
13819
|
-
}
|
|
13820
|
-
let ansi = 30 + (Math.round(b / 255) << 2 | Math.round(g / 255) << 1 | Math.round(r / 255));
|
|
13821
|
-
if (value === 2) {
|
|
13822
|
-
ansi += 60;
|
|
13823
|
-
}
|
|
13824
|
-
return ansi;
|
|
13825
|
-
};
|
|
13826
|
-
convert.hsv.ansi16 = function(args) {
|
|
13827
|
-
return convert.rgb.ansi16(convert.hsv.rgb(args), args[2]);
|
|
13828
|
-
};
|
|
13829
|
-
convert.rgb.ansi256 = function(args) {
|
|
13830
|
-
const r = args[0];
|
|
13831
|
-
const g = args[1];
|
|
13832
|
-
const b = args[2];
|
|
13833
|
-
if (r === g && g === b) {
|
|
13834
|
-
if (r < 8) {
|
|
13835
|
-
return 16;
|
|
13836
|
-
}
|
|
13837
|
-
if (r > 248) {
|
|
13838
|
-
return 231;
|
|
13839
|
-
}
|
|
13840
|
-
return Math.round((r - 8) / 247 * 24) + 232;
|
|
13841
|
-
}
|
|
13842
|
-
const ansi = 16 + 36 * Math.round(r / 255 * 5) + 6 * Math.round(g / 255 * 5) + Math.round(b / 255 * 5);
|
|
13843
|
-
return ansi;
|
|
13844
|
-
};
|
|
13845
|
-
convert.ansi16.rgb = function(args) {
|
|
13846
|
-
let color = args % 10;
|
|
13847
|
-
if (color === 0 || color === 7) {
|
|
13848
|
-
if (args > 50) {
|
|
13849
|
-
color += 3.5;
|
|
13850
|
-
}
|
|
13851
|
-
color = color / 10.5 * 255;
|
|
13852
|
-
return [color, color, color];
|
|
13853
|
-
}
|
|
13854
|
-
const mult = (~~(args > 50) + 1) * 0.5;
|
|
13855
|
-
const r = (color & 1) * mult * 255;
|
|
13856
|
-
const g = (color >> 1 & 1) * mult * 255;
|
|
13857
|
-
const b = (color >> 2 & 1) * mult * 255;
|
|
13858
|
-
return [r, g, b];
|
|
13859
|
-
};
|
|
13860
|
-
convert.ansi256.rgb = function(args) {
|
|
13861
|
-
if (args >= 232) {
|
|
13862
|
-
const c = (args - 232) * 10 + 8;
|
|
13863
|
-
return [c, c, c];
|
|
13864
|
-
}
|
|
13865
|
-
args -= 16;
|
|
13866
|
-
let rem;
|
|
13867
|
-
const r = Math.floor(args / 36) / 5 * 255;
|
|
13868
|
-
const g = Math.floor((rem = args % 36) / 6) / 5 * 255;
|
|
13869
|
-
const b = rem % 6 / 5 * 255;
|
|
13870
|
-
return [r, g, b];
|
|
13871
|
-
};
|
|
13872
|
-
convert.rgb.hex = function(args) {
|
|
13873
|
-
const integer = ((Math.round(args[0]) & 255) << 16) + ((Math.round(args[1]) & 255) << 8) + (Math.round(args[2]) & 255);
|
|
13874
|
-
const string = integer.toString(16).toUpperCase();
|
|
13875
|
-
return "000000".substring(string.length) + string;
|
|
13876
|
-
};
|
|
13877
|
-
convert.hex.rgb = function(args) {
|
|
13878
|
-
const match = args.toString(16).match(/[a-f0-9]{6}|[a-f0-9]{3}/i);
|
|
13879
|
-
if (!match) {
|
|
13880
|
-
return [0, 0, 0];
|
|
13881
|
-
}
|
|
13882
|
-
let colorString = match[0];
|
|
13883
|
-
if (match[0].length === 3) {
|
|
13884
|
-
colorString = colorString.split("").map((char) => {
|
|
13885
|
-
return char + char;
|
|
13886
|
-
}).join("");
|
|
13887
|
-
}
|
|
13888
|
-
const integer = parseInt(colorString, 16);
|
|
13889
|
-
const r = integer >> 16 & 255;
|
|
13890
|
-
const g = integer >> 8 & 255;
|
|
13891
|
-
const b = integer & 255;
|
|
13892
|
-
return [r, g, b];
|
|
13893
|
-
};
|
|
13894
|
-
convert.rgb.hcg = function(rgb) {
|
|
13895
|
-
const r = rgb[0] / 255;
|
|
13896
|
-
const g = rgb[1] / 255;
|
|
13897
|
-
const b = rgb[2] / 255;
|
|
13898
|
-
const max = Math.max(Math.max(r, g), b);
|
|
13899
|
-
const min = Math.min(Math.min(r, g), b);
|
|
13900
|
-
const chroma = max - min;
|
|
13901
|
-
let grayscale;
|
|
13902
|
-
let hue;
|
|
13903
|
-
if (chroma < 1) {
|
|
13904
|
-
grayscale = min / (1 - chroma);
|
|
13905
|
-
} else {
|
|
13906
|
-
grayscale = 0;
|
|
13907
|
-
}
|
|
13908
|
-
if (chroma <= 0) {
|
|
13909
|
-
hue = 0;
|
|
13910
|
-
} else if (max === r) {
|
|
13911
|
-
hue = (g - b) / chroma % 6;
|
|
13912
|
-
} else if (max === g) {
|
|
13913
|
-
hue = 2 + (b - r) / chroma;
|
|
13914
|
-
} else {
|
|
13915
|
-
hue = 4 + (r - g) / chroma;
|
|
13916
|
-
}
|
|
13917
|
-
hue /= 6;
|
|
13918
|
-
hue %= 1;
|
|
13919
|
-
return [hue * 360, chroma * 100, grayscale * 100];
|
|
13920
|
-
};
|
|
13921
|
-
convert.hsl.hcg = function(hsl) {
|
|
13922
|
-
const s = hsl[1] / 100;
|
|
13923
|
-
const l = hsl[2] / 100;
|
|
13924
|
-
const c = l < 0.5 ? 2 * s * l : 2 * s * (1 - l);
|
|
13925
|
-
let f = 0;
|
|
13926
|
-
if (c < 1) {
|
|
13927
|
-
f = (l - 0.5 * c) / (1 - c);
|
|
13928
|
-
}
|
|
13929
|
-
return [hsl[0], c * 100, f * 100];
|
|
13930
|
-
};
|
|
13931
|
-
convert.hsv.hcg = function(hsv) {
|
|
13932
|
-
const s = hsv[1] / 100;
|
|
13933
|
-
const v = hsv[2] / 100;
|
|
13934
|
-
const c = s * v;
|
|
13935
|
-
let f = 0;
|
|
13936
|
-
if (c < 1) {
|
|
13937
|
-
f = (v - c) / (1 - c);
|
|
13938
|
-
}
|
|
13939
|
-
return [hsv[0], c * 100, f * 100];
|
|
13940
|
-
};
|
|
13941
|
-
convert.hcg.rgb = function(hcg) {
|
|
13942
|
-
const h = hcg[0] / 360;
|
|
13943
|
-
const c = hcg[1] / 100;
|
|
13944
|
-
const g = hcg[2] / 100;
|
|
13945
|
-
if (c === 0) {
|
|
13946
|
-
return [g * 255, g * 255, g * 255];
|
|
13947
|
-
}
|
|
13948
|
-
const pure = [0, 0, 0];
|
|
13949
|
-
const hi = h % 1 * 6;
|
|
13950
|
-
const v = hi % 1;
|
|
13951
|
-
const w = 1 - v;
|
|
13952
|
-
let mg = 0;
|
|
13953
|
-
switch (Math.floor(hi)) {
|
|
13954
|
-
case 0:
|
|
13955
|
-
pure[0] = 1;
|
|
13956
|
-
pure[1] = v;
|
|
13957
|
-
pure[2] = 0;
|
|
13958
|
-
break;
|
|
13959
|
-
case 1:
|
|
13960
|
-
pure[0] = w;
|
|
13961
|
-
pure[1] = 1;
|
|
13962
|
-
pure[2] = 0;
|
|
13963
|
-
break;
|
|
13964
|
-
case 2:
|
|
13965
|
-
pure[0] = 0;
|
|
13966
|
-
pure[1] = 1;
|
|
13967
|
-
pure[2] = v;
|
|
13968
|
-
break;
|
|
13969
|
-
case 3:
|
|
13970
|
-
pure[0] = 0;
|
|
13971
|
-
pure[1] = w;
|
|
13972
|
-
pure[2] = 1;
|
|
13973
|
-
break;
|
|
13974
|
-
case 4:
|
|
13975
|
-
pure[0] = v;
|
|
13976
|
-
pure[1] = 0;
|
|
13977
|
-
pure[2] = 1;
|
|
13978
|
-
break;
|
|
13979
|
-
default:
|
|
13980
|
-
pure[0] = 1;
|
|
13981
|
-
pure[1] = 0;
|
|
13982
|
-
pure[2] = w;
|
|
13983
|
-
}
|
|
13984
|
-
mg = (1 - c) * g;
|
|
13985
|
-
return [
|
|
13986
|
-
(c * pure[0] + mg) * 255,
|
|
13987
|
-
(c * pure[1] + mg) * 255,
|
|
13988
|
-
(c * pure[2] + mg) * 255
|
|
13989
|
-
];
|
|
13990
|
-
};
|
|
13991
|
-
convert.hcg.hsv = function(hcg) {
|
|
13992
|
-
const c = hcg[1] / 100;
|
|
13993
|
-
const g = hcg[2] / 100;
|
|
13994
|
-
const v = c + g * (1 - c);
|
|
13995
|
-
let f = 0;
|
|
13996
|
-
if (v > 0) {
|
|
13997
|
-
f = c / v;
|
|
13998
|
-
}
|
|
13999
|
-
return [hcg[0], f * 100, v * 100];
|
|
14000
|
-
};
|
|
14001
|
-
convert.hcg.hsl = function(hcg) {
|
|
14002
|
-
const c = hcg[1] / 100;
|
|
14003
|
-
const g = hcg[2] / 100;
|
|
14004
|
-
const l = g * (1 - c) + 0.5 * c;
|
|
14005
|
-
let s = 0;
|
|
14006
|
-
if (l > 0 && l < 0.5) {
|
|
14007
|
-
s = c / (2 * l);
|
|
14008
|
-
} else if (l >= 0.5 && l < 1) {
|
|
14009
|
-
s = c / (2 * (1 - l));
|
|
14010
|
-
}
|
|
14011
|
-
return [hcg[0], s * 100, l * 100];
|
|
14012
|
-
};
|
|
14013
|
-
convert.hcg.hwb = function(hcg) {
|
|
14014
|
-
const c = hcg[1] / 100;
|
|
14015
|
-
const g = hcg[2] / 100;
|
|
14016
|
-
const v = c + g * (1 - c);
|
|
14017
|
-
return [hcg[0], (v - c) * 100, (1 - v) * 100];
|
|
14018
|
-
};
|
|
14019
|
-
convert.hwb.hcg = function(hwb) {
|
|
14020
|
-
const w = hwb[1] / 100;
|
|
14021
|
-
const b = hwb[2] / 100;
|
|
14022
|
-
const v = 1 - b;
|
|
14023
|
-
const c = v - w;
|
|
14024
|
-
let g = 0;
|
|
14025
|
-
if (c < 1) {
|
|
14026
|
-
g = (v - c) / (1 - c);
|
|
14027
|
-
}
|
|
14028
|
-
return [hwb[0], c * 100, g * 100];
|
|
14029
|
-
};
|
|
14030
|
-
convert.apple.rgb = function(apple) {
|
|
14031
|
-
return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
|
|
14032
|
-
};
|
|
14033
|
-
convert.rgb.apple = function(rgb) {
|
|
14034
|
-
return [rgb[0] / 255 * 65535, rgb[1] / 255 * 65535, rgb[2] / 255 * 65535];
|
|
14035
|
-
};
|
|
14036
|
-
convert.gray.rgb = function(args) {
|
|
14037
|
-
return [args[0] / 100 * 255, args[0] / 100 * 255, args[0] / 100 * 255];
|
|
14038
|
-
};
|
|
14039
|
-
convert.gray.hsl = function(args) {
|
|
14040
|
-
return [0, 0, args[0]];
|
|
14041
|
-
};
|
|
14042
|
-
convert.gray.hsv = convert.gray.hsl;
|
|
14043
|
-
convert.gray.hwb = function(gray) {
|
|
14044
|
-
return [0, 100, gray[0]];
|
|
14045
|
-
};
|
|
14046
|
-
convert.gray.cmyk = function(gray) {
|
|
14047
|
-
return [0, 0, 0, gray[0]];
|
|
14048
|
-
};
|
|
14049
|
-
convert.gray.lab = function(gray) {
|
|
14050
|
-
return [gray[0], 0, 0];
|
|
14051
|
-
};
|
|
14052
|
-
convert.gray.hex = function(gray) {
|
|
14053
|
-
const val = Math.round(gray[0] / 100 * 255) & 255;
|
|
14054
|
-
const integer = (val << 16) + (val << 8) + val;
|
|
14055
|
-
const string = integer.toString(16).toUpperCase();
|
|
14056
|
-
return "000000".substring(string.length) + string;
|
|
14057
|
-
};
|
|
14058
|
-
convert.rgb.gray = function(rgb) {
|
|
14059
|
-
const val = (rgb[0] + rgb[1] + rgb[2]) / 3;
|
|
14060
|
-
return [val / 255 * 100];
|
|
14061
|
-
};
|
|
14062
|
-
}
|
|
14063
|
-
});
|
|
14064
|
-
|
|
14065
|
-
// ../../node_modules/wrap-ansi/node_modules/color-convert/route.js
|
|
14066
|
-
var require_route = __commonJS({
|
|
14067
|
-
"../../node_modules/wrap-ansi/node_modules/color-convert/route.js"(exports, module) {
|
|
14068
|
-
init_cjs_shims();
|
|
14069
|
-
var conversions = require_conversions();
|
|
14070
|
-
function buildGraph() {
|
|
14071
|
-
const graph = {};
|
|
14072
|
-
const models = Object.keys(conversions);
|
|
14073
|
-
for (let len = models.length, i = 0; i < len; i++) {
|
|
14074
|
-
graph[models[i]] = {
|
|
14075
|
-
// http://jsperf.com/1-vs-infinity
|
|
14076
|
-
// micro-opt, but this is simple.
|
|
14077
|
-
distance: -1,
|
|
14078
|
-
parent: null
|
|
14079
|
-
};
|
|
14080
|
-
}
|
|
14081
|
-
return graph;
|
|
14082
|
-
}
|
|
14083
|
-
function deriveBFS(fromModel) {
|
|
14084
|
-
const graph = buildGraph();
|
|
14085
|
-
const queue = [fromModel];
|
|
14086
|
-
graph[fromModel].distance = 0;
|
|
14087
|
-
while (queue.length) {
|
|
14088
|
-
const current = queue.pop();
|
|
14089
|
-
const adjacents = Object.keys(conversions[current]);
|
|
14090
|
-
for (let len = adjacents.length, i = 0; i < len; i++) {
|
|
14091
|
-
const adjacent = adjacents[i];
|
|
14092
|
-
const node = graph[adjacent];
|
|
14093
|
-
if (node.distance === -1) {
|
|
14094
|
-
node.distance = graph[current].distance + 1;
|
|
14095
|
-
node.parent = current;
|
|
14096
|
-
queue.unshift(adjacent);
|
|
14097
|
-
}
|
|
14098
|
-
}
|
|
14099
|
-
}
|
|
14100
|
-
return graph;
|
|
14101
|
-
}
|
|
14102
|
-
function link(from3, to) {
|
|
14103
|
-
return function(args) {
|
|
14104
|
-
return to(from3(args));
|
|
14105
|
-
};
|
|
14106
|
-
}
|
|
14107
|
-
function wrapConversion(toModel, graph) {
|
|
14108
|
-
const path = [graph[toModel].parent, toModel];
|
|
14109
|
-
let fn = conversions[graph[toModel].parent][toModel];
|
|
14110
|
-
let cur = graph[toModel].parent;
|
|
14111
|
-
while (graph[cur].parent) {
|
|
14112
|
-
path.unshift(graph[cur].parent);
|
|
14113
|
-
fn = link(conversions[graph[cur].parent][cur], fn);
|
|
14114
|
-
cur = graph[cur].parent;
|
|
14115
|
-
}
|
|
14116
|
-
fn.conversion = path;
|
|
14117
|
-
return fn;
|
|
14118
|
-
}
|
|
14119
|
-
module.exports = function(fromModel) {
|
|
14120
|
-
const graph = deriveBFS(fromModel);
|
|
14121
|
-
const conversion = {};
|
|
14122
|
-
const models = Object.keys(graph);
|
|
14123
|
-
for (let len = models.length, i = 0; i < len; i++) {
|
|
14124
|
-
const toModel = models[i];
|
|
14125
|
-
const node = graph[toModel];
|
|
14126
|
-
if (node.parent === null) {
|
|
14127
|
-
continue;
|
|
14128
|
-
}
|
|
14129
|
-
conversion[toModel] = wrapConversion(toModel, graph);
|
|
14130
|
-
}
|
|
14131
|
-
return conversion;
|
|
14132
|
-
};
|
|
14133
|
-
}
|
|
14134
|
-
});
|
|
14135
|
-
|
|
14136
|
-
// ../../node_modules/wrap-ansi/node_modules/color-convert/index.js
|
|
14137
|
-
var require_color_convert = __commonJS({
|
|
14138
|
-
"../../node_modules/wrap-ansi/node_modules/color-convert/index.js"(exports, module) {
|
|
14139
|
-
init_cjs_shims();
|
|
14140
|
-
var conversions = require_conversions();
|
|
14141
|
-
var route = require_route();
|
|
14142
|
-
var convert = {};
|
|
14143
|
-
var models = Object.keys(conversions);
|
|
14144
|
-
function wrapRaw(fn) {
|
|
14145
|
-
const wrappedFn = function(...args) {
|
|
14146
|
-
const arg0 = args[0];
|
|
14147
|
-
if (arg0 === void 0 || arg0 === null) {
|
|
14148
|
-
return arg0;
|
|
14149
|
-
}
|
|
14150
|
-
if (arg0.length > 1) {
|
|
14151
|
-
args = arg0;
|
|
14152
|
-
}
|
|
14153
|
-
return fn(args);
|
|
14154
|
-
};
|
|
14155
|
-
if ("conversion" in fn) {
|
|
14156
|
-
wrappedFn.conversion = fn.conversion;
|
|
14157
|
-
}
|
|
14158
|
-
return wrappedFn;
|
|
14159
|
-
}
|
|
14160
|
-
function wrapRounded(fn) {
|
|
14161
|
-
const wrappedFn = function(...args) {
|
|
14162
|
-
const arg0 = args[0];
|
|
14163
|
-
if (arg0 === void 0 || arg0 === null) {
|
|
14164
|
-
return arg0;
|
|
14165
|
-
}
|
|
14166
|
-
if (arg0.length > 1) {
|
|
14167
|
-
args = arg0;
|
|
14168
|
-
}
|
|
14169
|
-
const result = fn(args);
|
|
14170
|
-
if (typeof result === "object") {
|
|
14171
|
-
for (let len = result.length, i = 0; i < len; i++) {
|
|
14172
|
-
result[i] = Math.round(result[i]);
|
|
14173
|
-
}
|
|
14174
|
-
}
|
|
14175
|
-
return result;
|
|
14176
|
-
};
|
|
14177
|
-
if ("conversion" in fn) {
|
|
14178
|
-
wrappedFn.conversion = fn.conversion;
|
|
14179
|
-
}
|
|
14180
|
-
return wrappedFn;
|
|
14181
|
-
}
|
|
14182
|
-
models.forEach((fromModel) => {
|
|
14183
|
-
convert[fromModel] = {};
|
|
14184
|
-
Object.defineProperty(convert[fromModel], "channels", { value: conversions[fromModel].channels });
|
|
14185
|
-
Object.defineProperty(convert[fromModel], "labels", { value: conversions[fromModel].labels });
|
|
14186
|
-
const routes = route(fromModel);
|
|
14187
|
-
const routeModels = Object.keys(routes);
|
|
14188
|
-
routeModels.forEach((toModel) => {
|
|
14189
|
-
const fn = routes[toModel];
|
|
14190
|
-
convert[fromModel][toModel] = wrapRounded(fn);
|
|
14191
|
-
convert[fromModel][toModel].raw = wrapRaw(fn);
|
|
14192
|
-
});
|
|
14193
|
-
});
|
|
14194
|
-
module.exports = convert;
|
|
14195
|
-
}
|
|
14196
|
-
});
|
|
14197
|
-
|
|
14198
13393
|
// ../../node_modules/wrap-ansi/node_modules/ansi-styles/index.js
|
|
14199
13394
|
var require_ansi_styles = __commonJS({
|
|
14200
13395
|
"../../node_modules/wrap-ansi/node_modules/ansi-styles/index.js"(exports, module) {
|
|
@@ -14472,9 +13667,9 @@ var require_wrap_ansi = __commonJS({
|
|
|
14472
13667
|
}
|
|
14473
13668
|
});
|
|
14474
13669
|
|
|
14475
|
-
// ../../node_modules/
|
|
13670
|
+
// ../../node_modules/is-unicode-supported/index.js
|
|
14476
13671
|
var require_is_unicode_supported = __commonJS({
|
|
14477
|
-
"../../node_modules/
|
|
13672
|
+
"../../node_modules/is-unicode-supported/index.js"(exports, module) {
|
|
14478
13673
|
"use strict";
|
|
14479
13674
|
init_cjs_shims();
|
|
14480
13675
|
module.exports = () => {
|
|
@@ -14885,21 +14080,6 @@ var require_is_interactive = __commonJS({
|
|
|
14885
14080
|
}
|
|
14886
14081
|
});
|
|
14887
14082
|
|
|
14888
|
-
// ../../node_modules/ora/node_modules/is-unicode-supported/index.js
|
|
14889
|
-
var require_is_unicode_supported2 = __commonJS({
|
|
14890
|
-
"../../node_modules/ora/node_modules/is-unicode-supported/index.js"(exports, module) {
|
|
14891
|
-
"use strict";
|
|
14892
|
-
init_cjs_shims();
|
|
14893
|
-
module.exports = () => {
|
|
14894
|
-
if (process.platform !== "win32") {
|
|
14895
|
-
return true;
|
|
14896
|
-
}
|
|
14897
|
-
return Boolean(process.env.CI) || Boolean(process.env.WT_SESSION) || // Windows Terminal
|
|
14898
|
-
process.env.TERM_PROGRAM === "vscode" || process.env.TERM === "xterm-256color" || process.env.TERM === "alacritty";
|
|
14899
|
-
};
|
|
14900
|
-
}
|
|
14901
|
-
});
|
|
14902
|
-
|
|
14903
14083
|
// ../../node_modules/readable-stream/lib/internal/streams/stream.js
|
|
14904
14084
|
var require_stream = __commonJS({
|
|
14905
14085
|
"../../node_modules/readable-stream/lib/internal/streams/stream.js"(exports, module) {
|
|
@@ -18223,7 +17403,7 @@ var require_ora = __commonJS({
|
|
|
18223
17403
|
var stripAnsi2 = require_strip_ansi();
|
|
18224
17404
|
var wcwidth = require_wcwidth();
|
|
18225
17405
|
var isInteractive = require_is_interactive();
|
|
18226
|
-
var isUnicodeSupported2 =
|
|
17406
|
+
var isUnicodeSupported2 = require_is_unicode_supported();
|
|
18227
17407
|
var { BufferListStream } = require_bl();
|
|
18228
17408
|
var TEXT = Symbol("text");
|
|
18229
17409
|
var PREFIX_TEXT = Symbol("prefixText");
|
|
@@ -28522,9 +27702,9 @@ var require_get_intrinsic = __commonJS({
|
|
|
28522
27702
|
}
|
|
28523
27703
|
});
|
|
28524
27704
|
|
|
28525
|
-
// ../../node_modules/es-define-property/index.js
|
|
27705
|
+
// ../../node_modules/define-data-property/node_modules/es-define-property/index.js
|
|
28526
27706
|
var require_es_define_property = __commonJS({
|
|
28527
|
-
"../../node_modules/es-define-property/index.js"(exports, module) {
|
|
27707
|
+
"../../node_modules/define-data-property/node_modules/es-define-property/index.js"(exports, module) {
|
|
28528
27708
|
"use strict";
|
|
28529
27709
|
init_cjs_shims();
|
|
28530
27710
|
var GetIntrinsic = require_get_intrinsic();
|
|
@@ -28607,12 +27787,30 @@ var require_define_data_property = __commonJS({
|
|
|
28607
27787
|
}
|
|
28608
27788
|
});
|
|
28609
27789
|
|
|
27790
|
+
// ../../node_modules/has-property-descriptors/node_modules/es-define-property/index.js
|
|
27791
|
+
var require_es_define_property2 = __commonJS({
|
|
27792
|
+
"../../node_modules/has-property-descriptors/node_modules/es-define-property/index.js"(exports, module) {
|
|
27793
|
+
"use strict";
|
|
27794
|
+
init_cjs_shims();
|
|
27795
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
27796
|
+
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
|
|
27797
|
+
if ($defineProperty) {
|
|
27798
|
+
try {
|
|
27799
|
+
$defineProperty({}, "a", { value: 1 });
|
|
27800
|
+
} catch (e) {
|
|
27801
|
+
$defineProperty = false;
|
|
27802
|
+
}
|
|
27803
|
+
}
|
|
27804
|
+
module.exports = $defineProperty;
|
|
27805
|
+
}
|
|
27806
|
+
});
|
|
27807
|
+
|
|
28610
27808
|
// ../../node_modules/has-property-descriptors/index.js
|
|
28611
27809
|
var require_has_property_descriptors = __commonJS({
|
|
28612
27810
|
"../../node_modules/has-property-descriptors/index.js"(exports, module) {
|
|
28613
27811
|
"use strict";
|
|
28614
27812
|
init_cjs_shims();
|
|
28615
|
-
var $defineProperty =
|
|
27813
|
+
var $defineProperty = require_es_define_property2();
|
|
28616
27814
|
var hasPropertyDescriptors = function hasPropertyDescriptors2() {
|
|
28617
27815
|
return !!$defineProperty;
|
|
28618
27816
|
};
|
|
@@ -28702,6 +27900,24 @@ var require_set_function_length = __commonJS({
|
|
|
28702
27900
|
}
|
|
28703
27901
|
});
|
|
28704
27902
|
|
|
27903
|
+
// ../../node_modules/call-bind/node_modules/es-define-property/index.js
|
|
27904
|
+
var require_es_define_property3 = __commonJS({
|
|
27905
|
+
"../../node_modules/call-bind/node_modules/es-define-property/index.js"(exports, module) {
|
|
27906
|
+
"use strict";
|
|
27907
|
+
init_cjs_shims();
|
|
27908
|
+
var GetIntrinsic = require_get_intrinsic();
|
|
27909
|
+
var $defineProperty = GetIntrinsic("%Object.defineProperty%", true) || false;
|
|
27910
|
+
if ($defineProperty) {
|
|
27911
|
+
try {
|
|
27912
|
+
$defineProperty({}, "a", { value: 1 });
|
|
27913
|
+
} catch (e) {
|
|
27914
|
+
$defineProperty = false;
|
|
27915
|
+
}
|
|
27916
|
+
}
|
|
27917
|
+
module.exports = $defineProperty;
|
|
27918
|
+
}
|
|
27919
|
+
});
|
|
27920
|
+
|
|
28705
27921
|
// ../../node_modules/call-bind/index.js
|
|
28706
27922
|
var require_call_bind = __commonJS({
|
|
28707
27923
|
"../../node_modules/call-bind/index.js"(exports, module) {
|
|
@@ -28714,7 +27930,7 @@ var require_call_bind = __commonJS({
|
|
|
28714
27930
|
var $apply = GetIntrinsic("%Function.prototype.apply%");
|
|
28715
27931
|
var $call = GetIntrinsic("%Function.prototype.call%");
|
|
28716
27932
|
var $reflectApply = GetIntrinsic("%Reflect.apply%", true) || bind.call($call, $apply);
|
|
28717
|
-
var $defineProperty =
|
|
27933
|
+
var $defineProperty = require_es_define_property3();
|
|
28718
27934
|
var $max = GetIntrinsic("%Math.max%");
|
|
28719
27935
|
module.exports = function callBind(originalFunction) {
|
|
28720
27936
|
if (typeof originalFunction !== "function") {
|