@chainpatrol/sdk 1.7.0 → 1.8.0
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/CHANGELOG.md +22 -0
- package/dist/api/index.d.mts +33 -1
- package/dist/api/index.d.ts +33 -1
- package/dist/api/index.js +6 -0
- package/dist/api/index.js.map +1 -1
- package/dist/api/index.mjs +6 -0
- package/dist/api/index.mjs.map +1 -1
- package/dist/index.js +119 -70
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +119 -70
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1313,17 +1313,17 @@ var PolyDateFormatter = class {
|
|
|
1313
1313
|
constructor(dt, intl, opts) {
|
|
1314
1314
|
this.opts = opts;
|
|
1315
1315
|
this.originalZone = void 0;
|
|
1316
|
-
let
|
|
1316
|
+
let z55 = void 0;
|
|
1317
1317
|
if (this.opts.timeZone) {
|
|
1318
1318
|
this.dt = dt;
|
|
1319
1319
|
} else if (dt.zone.type === "fixed") {
|
|
1320
1320
|
const gmtOffset = -1 * (dt.offset / 60);
|
|
1321
1321
|
const offsetZ = gmtOffset >= 0 ? `Etc/GMT+${gmtOffset}` : `Etc/GMT${gmtOffset}`;
|
|
1322
1322
|
if (dt.offset !== 0 && IANAZone.create(offsetZ).valid) {
|
|
1323
|
-
|
|
1323
|
+
z55 = offsetZ;
|
|
1324
1324
|
this.dt = dt;
|
|
1325
1325
|
} else {
|
|
1326
|
-
|
|
1326
|
+
z55 = "UTC";
|
|
1327
1327
|
this.dt = dt.offset === 0 ? dt : dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1328
1328
|
this.originalZone = dt.zone;
|
|
1329
1329
|
}
|
|
@@ -1331,14 +1331,14 @@ var PolyDateFormatter = class {
|
|
|
1331
1331
|
this.dt = dt;
|
|
1332
1332
|
} else if (dt.zone.type === "iana") {
|
|
1333
1333
|
this.dt = dt;
|
|
1334
|
-
|
|
1334
|
+
z55 = dt.zone.name;
|
|
1335
1335
|
} else {
|
|
1336
|
-
|
|
1336
|
+
z55 = "UTC";
|
|
1337
1337
|
this.dt = dt.setZone("UTC").plus({ minutes: dt.offset });
|
|
1338
1338
|
this.originalZone = dt.zone;
|
|
1339
1339
|
}
|
|
1340
1340
|
const intlOpts = __spreadValues({}, this.opts);
|
|
1341
|
-
intlOpts.timeZone = intlOpts.timeZone ||
|
|
1341
|
+
intlOpts.timeZone = intlOpts.timeZone || z55;
|
|
1342
1342
|
this.dtf = getCachedDTF(intl, intlOpts);
|
|
1343
1343
|
}
|
|
1344
1344
|
format() {
|
|
@@ -11558,6 +11558,55 @@ zod.z.object({
|
|
|
11558
11558
|
"Median time from takedown start to completion, one entry per asset type, ascending by median"
|
|
11559
11559
|
)
|
|
11560
11560
|
});
|
|
11561
|
+
zod.z.object({
|
|
11562
|
+
slug: zod.z.string().min(1).describe("Organization slug"),
|
|
11563
|
+
months: zod.z.number().int().min(2).max(36).default(12).describe("Size of the trailing window in whole months, including the current month"),
|
|
11564
|
+
assetTypes: zod.z.array(zod.z.nativeEnum(AssetType)).max(5).optional().describe(
|
|
11565
|
+
"Break the trend down by these asset types, one series each. Omit for a single series pooled across every asset type"
|
|
11566
|
+
),
|
|
11567
|
+
blockLabel: zod.z.string().optional().describe(
|
|
11568
|
+
'Only include assets blocked with this review label, e.g. "Brand Impersonation", "Employee Impersonation" or "Targeting Org Users"'
|
|
11569
|
+
),
|
|
11570
|
+
brandType: zod.z.nativeEnum(BrandType).optional().describe("Only include assets belonging to brands of this type"),
|
|
11571
|
+
countryCodes: zod.z.array(zod.z.string().length(2)).optional().describe("Only include assets scanned from these ISO 3166-1 alpha-2 countries"),
|
|
11572
|
+
brandIds: zod.z.array(zod.z.number().int().positive()).optional().describe("Only include assets belonging to these brands")
|
|
11573
|
+
});
|
|
11574
|
+
var MetricsTakedownTimeTrendPointSchema = zod.z.object({
|
|
11575
|
+
period: zod.z.string().describe("Month the takedowns completed in, as a yyyy-MM key"),
|
|
11576
|
+
medianTakedownMinutes: zod.z.number().nullable().describe("Null when no takedowns completed in this month"),
|
|
11577
|
+
medianTakedownHours: zod.z.number().nullable(),
|
|
11578
|
+
medianTakedownDays: zod.z.number().nullable(),
|
|
11579
|
+
count: zod.z.number().describe("Number of completed takedowns behind the median")
|
|
11580
|
+
});
|
|
11581
|
+
var MetricsTakedownTimeTrendChangeSchema = zod.z.object({
|
|
11582
|
+
latest: MetricsTakedownTimeTrendPointSchema.nullable().describe(
|
|
11583
|
+
"Most recent month in the window that had completed takedowns"
|
|
11584
|
+
),
|
|
11585
|
+
previous: MetricsTakedownTimeTrendPointSchema.nullable().describe(
|
|
11586
|
+
"Month with completed takedowns immediately before `latest`, skipping empty months"
|
|
11587
|
+
),
|
|
11588
|
+
percentChange: zod.z.number().nullable().describe(
|
|
11589
|
+
"Change in the median from `previous` to `latest`, as a percentage. Negative means takedowns got faster. Null when there is no comparable earlier month"
|
|
11590
|
+
),
|
|
11591
|
+
direction: zod.z.enum(["improved", "worsened", "unchanged"]).nullable().describe("Sign of `percentChange`, read as lower-is-better. Null when it is null")
|
|
11592
|
+
});
|
|
11593
|
+
zod.z.object({
|
|
11594
|
+
months: zod.z.number().describe("Size of the trailing window that was used"),
|
|
11595
|
+
periods: zod.z.array(zod.z.string()).describe("Every yyyy-MM key in the window, oldest first"),
|
|
11596
|
+
series: zod.z.array(
|
|
11597
|
+
zod.z.object({
|
|
11598
|
+
assetType: zod.z.nativeEnum(AssetType).nullable().describe("Null for the series pooled across every asset type"),
|
|
11599
|
+
points: zod.z.array(MetricsTakedownTimeTrendPointSchema).describe(
|
|
11600
|
+
"One point per month in the window, oldest first. Months with no completed takedowns carry a null median"
|
|
11601
|
+
),
|
|
11602
|
+
change: MetricsTakedownTimeTrendChangeSchema.describe(
|
|
11603
|
+
"Month-over-month comparison for this series"
|
|
11604
|
+
)
|
|
11605
|
+
})
|
|
11606
|
+
).describe(
|
|
11607
|
+
"One series per requested asset type, in the order requested, or a single pooled series when no asset types were given"
|
|
11608
|
+
)
|
|
11609
|
+
});
|
|
11561
11610
|
zod.z.object({
|
|
11562
11611
|
slug: zod.z.string().optional().describe(
|
|
11563
11612
|
"Organization slug. Optional for organization-scoped API keys, which resolve the organization from the key itself. Required when your credentials can reach more than one organization."
|
|
@@ -13397,20 +13446,20 @@ var convertA98ToXyz65_default = convertA98ToXyz65;
|
|
|
13397
13446
|
|
|
13398
13447
|
// ../../node_modules/culori/src/a98/convertXyz65ToA98.js
|
|
13399
13448
|
var gamma = (v) => Math.pow(Math.abs(v), 256 / 563) * Math.sign(v);
|
|
13400
|
-
var convertXyz65ToA98 = ({ x, y, z:
|
|
13449
|
+
var convertXyz65ToA98 = ({ x, y, z: z55, alpha }) => {
|
|
13401
13450
|
if (x === void 0) x = 0;
|
|
13402
13451
|
if (y === void 0) y = 0;
|
|
13403
|
-
if (
|
|
13452
|
+
if (z55 === void 0) z55 = 0;
|
|
13404
13453
|
let res = {
|
|
13405
13454
|
mode: "a98",
|
|
13406
13455
|
r: gamma(
|
|
13407
|
-
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 *
|
|
13456
|
+
x * 2.0415879038107465 - y * 0.5650069742788597 - 0.3447313507783297 * z55
|
|
13408
13457
|
),
|
|
13409
13458
|
g: gamma(
|
|
13410
|
-
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 *
|
|
13459
|
+
x * -0.9692436362808798 + y * 1.8759675015077206 + 0.0415550574071756 * z55
|
|
13411
13460
|
),
|
|
13412
13461
|
b: gamma(
|
|
13413
|
-
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 *
|
|
13462
|
+
x * 0.0134442806320312 - y * 0.1183623922310184 + 1.0151749943912058 * z55
|
|
13414
13463
|
)
|
|
13415
13464
|
};
|
|
13416
13465
|
if (alpha !== void 0) {
|
|
@@ -13477,14 +13526,14 @@ var convertLrgbToRgb = ({ r, g, b, alpha }, mode = "rgb") => {
|
|
|
13477
13526
|
var convertLrgbToRgb_default = convertLrgbToRgb;
|
|
13478
13527
|
|
|
13479
13528
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToRgb.js
|
|
13480
|
-
var convertXyz65ToRgb = ({ x, y, z:
|
|
13529
|
+
var convertXyz65ToRgb = ({ x, y, z: z55, alpha }) => {
|
|
13481
13530
|
if (x === void 0) x = 0;
|
|
13482
13531
|
if (y === void 0) y = 0;
|
|
13483
|
-
if (
|
|
13532
|
+
if (z55 === void 0) z55 = 0;
|
|
13484
13533
|
let res = convertLrgbToRgb_default({
|
|
13485
|
-
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 *
|
|
13486
|
-
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 *
|
|
13487
|
-
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 *
|
|
13534
|
+
r: x * 3.2409699419045226 - y * 1.537383177570094 - 0.4986107602930034 * z55,
|
|
13535
|
+
g: x * -0.9692436362808796 + y * 1.8759675015077204 + 0.0415550574071756 * z55,
|
|
13536
|
+
b: x * 0.0556300796969936 - y * 0.2039769588889765 + 1.0569715142428784 * z55
|
|
13488
13537
|
});
|
|
13489
13538
|
if (alpha !== void 0) {
|
|
13490
13539
|
res.alpha = alpha;
|
|
@@ -13734,13 +13783,13 @@ var convertLab65ToRgb_default = convertLab65ToRgb;
|
|
|
13734
13783
|
|
|
13735
13784
|
// ../../node_modules/culori/src/lab65/convertXyz65ToLab65.js
|
|
13736
13785
|
var f = (value) => value > e ? Math.cbrt(value) : (k * value + 16) / 116;
|
|
13737
|
-
var convertXyz65ToLab65 = ({ x, y, z:
|
|
13786
|
+
var convertXyz65ToLab65 = ({ x, y, z: z55, alpha }) => {
|
|
13738
13787
|
if (x === void 0) x = 0;
|
|
13739
13788
|
if (y === void 0) y = 0;
|
|
13740
|
-
if (
|
|
13789
|
+
if (z55 === void 0) z55 = 0;
|
|
13741
13790
|
let f0 = f(x / D65.X);
|
|
13742
13791
|
let f1 = f(y / D65.Y);
|
|
13743
|
-
let f22 = f(
|
|
13792
|
+
let f22 = f(z55 / D65.Z);
|
|
13744
13793
|
let res = {
|
|
13745
13794
|
mode: "lab65",
|
|
13746
13795
|
l: 116 * f1 - 16,
|
|
@@ -14397,10 +14446,10 @@ var convertItpToXyz65_default = convertItpToXyz65;
|
|
|
14397
14446
|
|
|
14398
14447
|
// ../../node_modules/culori/src/itp/convertXyz65ToItp.js
|
|
14399
14448
|
var toAbs = (c2 = 0) => Math.max(c2 * YW, 0);
|
|
14400
|
-
var convertXyz65ToItp = ({ x, y, z:
|
|
14449
|
+
var convertXyz65ToItp = ({ x, y, z: z55, alpha }) => {
|
|
14401
14450
|
const absX = toAbs(x);
|
|
14402
14451
|
const absY = toAbs(y);
|
|
14403
|
-
const absZ = toAbs(
|
|
14452
|
+
const absZ = toAbs(z55);
|
|
14404
14453
|
const l2 = transferPqEncode(
|
|
14405
14454
|
0.3592832590121217 * absX + 0.6976051147779502 * absY - 0.0358915932320289 * absZ
|
|
14406
14455
|
);
|
|
@@ -14458,15 +14507,15 @@ var jabPqEncode = (v) => {
|
|
|
14458
14507
|
return Math.pow((C1 + C2 * vn3) / (1 + C3 * vn3), p);
|
|
14459
14508
|
};
|
|
14460
14509
|
var abs = (v = 0) => Math.max(v * 203, 0);
|
|
14461
|
-
var convertXyz65ToJab = ({ x, y, z:
|
|
14510
|
+
var convertXyz65ToJab = ({ x, y, z: z55, alpha }) => {
|
|
14462
14511
|
x = abs(x);
|
|
14463
14512
|
y = abs(y);
|
|
14464
|
-
|
|
14465
|
-
let xp = 1.15 * x - 0.15 *
|
|
14513
|
+
z55 = abs(z55);
|
|
14514
|
+
let xp = 1.15 * x - 0.15 * z55;
|
|
14466
14515
|
let yp = 0.66 * y + 0.34 * x;
|
|
14467
|
-
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 *
|
|
14468
|
-
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 *
|
|
14469
|
-
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 *
|
|
14516
|
+
let l2 = jabPqEncode(0.41478972 * xp + 0.579999 * yp + 0.014648 * z55);
|
|
14517
|
+
let m = jabPqEncode(-0.20151 * xp + 1.120649 * yp + 0.0531008 * z55);
|
|
14518
|
+
let s2 = jabPqEncode(-0.0166008 * xp + 0.2648 * yp + 0.6684799 * z55);
|
|
14470
14519
|
let i = (l2 + m) / 2;
|
|
14471
14520
|
let res = {
|
|
14472
14521
|
mode: "jab",
|
|
@@ -14652,14 +14701,14 @@ var convertLabToXyz50 = ({ l: l2, a, b, alpha }) => {
|
|
|
14652
14701
|
var convertLabToXyz50_default = convertLabToXyz50;
|
|
14653
14702
|
|
|
14654
14703
|
// ../../node_modules/culori/src/xyz50/convertXyz50ToRgb.js
|
|
14655
|
-
var convertXyz50ToRgb = ({ x, y, z:
|
|
14704
|
+
var convertXyz50ToRgb = ({ x, y, z: z55, alpha }) => {
|
|
14656
14705
|
if (x === void 0) x = 0;
|
|
14657
14706
|
if (y === void 0) y = 0;
|
|
14658
|
-
if (
|
|
14707
|
+
if (z55 === void 0) z55 = 0;
|
|
14659
14708
|
let res = convertLrgbToRgb_default({
|
|
14660
|
-
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 *
|
|
14661
|
-
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 *
|
|
14662
|
-
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 *
|
|
14709
|
+
r: x * 3.1341359569958707 - y * 1.6173863321612538 - 0.4906619460083532 * z55,
|
|
14710
|
+
g: x * -0.978795502912089 + y * 1.916254567259524 + 0.03344273116131949 * z55,
|
|
14711
|
+
b: x * 0.07195537988411677 - y * 0.2289768264158322 + 1.405386058324125 * z55
|
|
14663
14712
|
});
|
|
14664
14713
|
if (alpha !== void 0) {
|
|
14665
14714
|
res.alpha = alpha;
|
|
@@ -14690,13 +14739,13 @@ var convertRgbToXyz50_default = convertRgbToXyz50;
|
|
|
14690
14739
|
|
|
14691
14740
|
// ../../node_modules/culori/src/lab/convertXyz50ToLab.js
|
|
14692
14741
|
var f2 = (value) => value > e3 ? Math.cbrt(value) : (k3 * value + 16) / 116;
|
|
14693
|
-
var convertXyz50ToLab = ({ x, y, z:
|
|
14742
|
+
var convertXyz50ToLab = ({ x, y, z: z55, alpha }) => {
|
|
14694
14743
|
if (x === void 0) x = 0;
|
|
14695
14744
|
if (y === void 0) y = 0;
|
|
14696
|
-
if (
|
|
14745
|
+
if (z55 === void 0) z55 = 0;
|
|
14697
14746
|
let f0 = f2(x / D50.X);
|
|
14698
14747
|
let f1 = f2(y / D50.Y);
|
|
14699
|
-
let f22 = f2(
|
|
14748
|
+
let f22 = f2(z55 / D50.Z);
|
|
14700
14749
|
let res = {
|
|
14701
14750
|
mode: "lab",
|
|
14702
14751
|
l: 116 * f1 - 16,
|
|
@@ -14931,18 +14980,18 @@ var convertLchuvToLuv = ({ l: l2, c: c2, h, alpha }) => {
|
|
|
14931
14980
|
var convertLchuvToLuv_default = convertLchuvToLuv;
|
|
14932
14981
|
|
|
14933
14982
|
// ../../node_modules/culori/src/luv/convertXyz50ToLuv.js
|
|
14934
|
-
var u_fn = (x, y,
|
|
14935
|
-
var v_fn = (x, y,
|
|
14983
|
+
var u_fn = (x, y, z55) => 4 * x / (x + 15 * y + 3 * z55);
|
|
14984
|
+
var v_fn = (x, y, z55) => 9 * y / (x + 15 * y + 3 * z55);
|
|
14936
14985
|
var un = u_fn(D50.X, D50.Y, D50.Z);
|
|
14937
14986
|
var vn = v_fn(D50.X, D50.Y, D50.Z);
|
|
14938
14987
|
var l_fn = (value) => value <= e3 ? k3 * value : 116 * Math.cbrt(value) - 16;
|
|
14939
|
-
var convertXyz50ToLuv = ({ x, y, z:
|
|
14988
|
+
var convertXyz50ToLuv = ({ x, y, z: z55, alpha }) => {
|
|
14940
14989
|
if (x === void 0) x = 0;
|
|
14941
14990
|
if (y === void 0) y = 0;
|
|
14942
|
-
if (
|
|
14991
|
+
if (z55 === void 0) z55 = 0;
|
|
14943
14992
|
let l2 = l_fn(y / D50.Y);
|
|
14944
|
-
let u = u_fn(x, y,
|
|
14945
|
-
let v = v_fn(x, y,
|
|
14993
|
+
let u = u_fn(x, y, z55);
|
|
14994
|
+
let v = v_fn(x, y, z55);
|
|
14946
14995
|
if (!isFinite(u) || !isFinite(v)) {
|
|
14947
14996
|
l2 = u = v = 0;
|
|
14948
14997
|
} else {
|
|
@@ -14963,8 +15012,8 @@ var convertXyz50ToLuv = ({ x, y, z: z54, alpha }) => {
|
|
|
14963
15012
|
var convertXyz50ToLuv_default = convertXyz50ToLuv;
|
|
14964
15013
|
|
|
14965
15014
|
// ../../node_modules/culori/src/luv/convertLuvToXyz50.js
|
|
14966
|
-
var u_fn2 = (x, y,
|
|
14967
|
-
var v_fn2 = (x, y,
|
|
15015
|
+
var u_fn2 = (x, y, z55) => 4 * x / (x + 15 * y + 3 * z55);
|
|
15016
|
+
var v_fn2 = (x, y, z55) => 9 * y / (x + 15 * y + 3 * z55);
|
|
14968
15017
|
var un2 = u_fn2(D50.X, D50.Y, D50.Z);
|
|
14969
15018
|
var vn2 = v_fn2(D50.X, D50.Y, D50.Z);
|
|
14970
15019
|
var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
@@ -14978,8 +15027,8 @@ var convertLuvToXyz50 = ({ l: l2, u, v, alpha }) => {
|
|
|
14978
15027
|
let vp = v / (13 * l2) + vn2;
|
|
14979
15028
|
let y = D50.Y * (l2 <= 8 ? l2 / k3 : Math.pow((l2 + 16) / 116, 3));
|
|
14980
15029
|
let x = y * (9 * up) / (4 * vp);
|
|
14981
|
-
let
|
|
14982
|
-
let res = { mode: "xyz50", x, y, z:
|
|
15030
|
+
let z55 = y * (12 - 3 * up - 20 * vp) / (4 * vp);
|
|
15031
|
+
let res = { mode: "xyz50", x, y, z: z55 };
|
|
14983
15032
|
if (alpha !== void 0) {
|
|
14984
15033
|
res.alpha = alpha;
|
|
14985
15034
|
}
|
|
@@ -15596,15 +15645,15 @@ var convertP3ToXyz65 = (rgb2) => {
|
|
|
15596
15645
|
var convertP3ToXyz65_default = convertP3ToXyz65;
|
|
15597
15646
|
|
|
15598
15647
|
// ../../node_modules/culori/src/p3/convertXyz65ToP3.js
|
|
15599
|
-
var convertXyz65ToP3 = ({ x, y, z:
|
|
15648
|
+
var convertXyz65ToP3 = ({ x, y, z: z55, alpha }) => {
|
|
15600
15649
|
if (x === void 0) x = 0;
|
|
15601
15650
|
if (y === void 0) y = 0;
|
|
15602
|
-
if (
|
|
15651
|
+
if (z55 === void 0) z55 = 0;
|
|
15603
15652
|
let res = convertLrgbToRgb_default(
|
|
15604
15653
|
{
|
|
15605
|
-
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 *
|
|
15606
|
-
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 *
|
|
15607
|
-
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 *
|
|
15654
|
+
r: x * 2.4934969119414263 - y * 0.9313836179191242 - 0.402710784450717 * z55,
|
|
15655
|
+
g: x * -0.8294889695615749 + y * 1.7626640603183465 + 0.0236246858419436 * z55,
|
|
15656
|
+
b: x * 0.0358458302437845 - y * 0.0761723892680418 + 0.9568845240076871 * z55
|
|
15608
15657
|
},
|
|
15609
15658
|
"p3"
|
|
15610
15659
|
);
|
|
@@ -15639,19 +15688,19 @@ var gamma2 = (v) => {
|
|
|
15639
15688
|
}
|
|
15640
15689
|
return 16 * v;
|
|
15641
15690
|
};
|
|
15642
|
-
var convertXyz50ToProphoto = ({ x, y, z:
|
|
15691
|
+
var convertXyz50ToProphoto = ({ x, y, z: z55, alpha }) => {
|
|
15643
15692
|
if (x === void 0) x = 0;
|
|
15644
15693
|
if (y === void 0) y = 0;
|
|
15645
|
-
if (
|
|
15694
|
+
if (z55 === void 0) z55 = 0;
|
|
15646
15695
|
let res = {
|
|
15647
15696
|
mode: "prophoto",
|
|
15648
15697
|
r: gamma2(
|
|
15649
|
-
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 *
|
|
15698
|
+
x * 1.3457868816471585 - y * 0.2555720873797946 - 0.0511018649755453 * z55
|
|
15650
15699
|
),
|
|
15651
15700
|
g: gamma2(
|
|
15652
|
-
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 *
|
|
15701
|
+
x * -0.5446307051249019 + y * 1.5082477428451466 + 0.0205274474364214 * z55
|
|
15653
15702
|
),
|
|
15654
|
-
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 *
|
|
15703
|
+
b: gamma2(x * 0 + y * 0 + 1.2119675456389452 * z55)
|
|
15655
15704
|
};
|
|
15656
15705
|
if (alpha !== void 0) {
|
|
15657
15706
|
res.alpha = alpha;
|
|
@@ -15711,20 +15760,20 @@ var gamma3 = (v) => {
|
|
|
15711
15760
|
}
|
|
15712
15761
|
return 4.5 * v;
|
|
15713
15762
|
};
|
|
15714
|
-
var convertXyz65ToRec2020 = ({ x, y, z:
|
|
15763
|
+
var convertXyz65ToRec2020 = ({ x, y, z: z55, alpha }) => {
|
|
15715
15764
|
if (x === void 0) x = 0;
|
|
15716
15765
|
if (y === void 0) y = 0;
|
|
15717
|
-
if (
|
|
15766
|
+
if (z55 === void 0) z55 = 0;
|
|
15718
15767
|
let res = {
|
|
15719
15768
|
mode: "rec2020",
|
|
15720
15769
|
r: gamma3(
|
|
15721
|
-
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 *
|
|
15770
|
+
x * 1.7166511879712683 - y * 0.3556707837763925 - 0.2533662813736599 * z55
|
|
15722
15771
|
),
|
|
15723
15772
|
g: gamma3(
|
|
15724
|
-
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 *
|
|
15773
|
+
x * -0.6666843518324893 + y * 1.6164812366349395 + 0.0157685458139111 * z55
|
|
15725
15774
|
),
|
|
15726
15775
|
b: gamma3(
|
|
15727
|
-
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 *
|
|
15776
|
+
x * 0.0176398574453108 - y * 0.0427706132578085 + 0.9421031212354739 * z55
|
|
15728
15777
|
)
|
|
15729
15778
|
};
|
|
15730
15779
|
if (alpha !== void 0) {
|
|
@@ -15877,15 +15926,15 @@ var definition_default26 = definition26;
|
|
|
15877
15926
|
|
|
15878
15927
|
// ../../node_modules/culori/src/xyz65/convertXyz65ToXyz50.js
|
|
15879
15928
|
var convertXyz65ToXyz50 = (xyz652) => {
|
|
15880
|
-
let { x, y, z:
|
|
15929
|
+
let { x, y, z: z55, alpha } = xyz652;
|
|
15881
15930
|
if (x === void 0) x = 0;
|
|
15882
15931
|
if (y === void 0) y = 0;
|
|
15883
|
-
if (
|
|
15932
|
+
if (z55 === void 0) z55 = 0;
|
|
15884
15933
|
let res = {
|
|
15885
15934
|
mode: "xyz50",
|
|
15886
|
-
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 *
|
|
15887
|
-
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 *
|
|
15888
|
-
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 *
|
|
15935
|
+
x: 1.0479298208405488 * x + 0.0229467933410191 * y - 0.0501922295431356 * z55,
|
|
15936
|
+
y: 0.0296278156881593 * x + 0.990434484573249 * y - 0.0170738250293851 * z55,
|
|
15937
|
+
z: -0.0092430581525912 * x + 0.0150551448965779 * y + 0.7518742899580008 * z55
|
|
15889
15938
|
};
|
|
15890
15939
|
if (alpha !== void 0) {
|
|
15891
15940
|
res.alpha = alpha;
|
|
@@ -15896,15 +15945,15 @@ var convertXyz65ToXyz50_default = convertXyz65ToXyz50;
|
|
|
15896
15945
|
|
|
15897
15946
|
// ../../node_modules/culori/src/xyz65/convertXyz50ToXyz65.js
|
|
15898
15947
|
var convertXyz50ToXyz65 = (xyz502) => {
|
|
15899
|
-
let { x, y, z:
|
|
15948
|
+
let { x, y, z: z55, alpha } = xyz502;
|
|
15900
15949
|
if (x === void 0) x = 0;
|
|
15901
15950
|
if (y === void 0) y = 0;
|
|
15902
|
-
if (
|
|
15951
|
+
if (z55 === void 0) z55 = 0;
|
|
15903
15952
|
let res = {
|
|
15904
15953
|
mode: "xyz65",
|
|
15905
|
-
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 *
|
|
15906
|
-
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 *
|
|
15907
|
-
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 *
|
|
15954
|
+
x: 0.9554734527042182 * x - 0.0230985368742614 * y + 0.0632593086610217 * z55,
|
|
15955
|
+
y: -0.0283697069632081 * x + 1.0099954580058226 * y + 0.021041398966943 * z55,
|
|
15956
|
+
z: 0.0123140016883199 * x - 0.0205076964334779 * y + 1.3303659366080753 * z55
|
|
15908
15957
|
};
|
|
15909
15958
|
if (alpha !== void 0) {
|
|
15910
15959
|
res.alpha = alpha;
|