hyperframes 0.8.42 → 0.8.43
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/cli.js +151 -11
- package/dist/fontLocalizeCli.js +110 -9
- package/dist/hyperframe-runtime.js +1 -1
- package/dist/hyperframe.manifest.json +1 -1
- package/dist/hyperframe.runtime.iife.js +1 -1
- package/dist/hyperframes-player.global.js +1 -1
- package/dist/renderSetupWorker.js +1552 -1489
- package/dist/studio/assets/{hyperframes-player-DMsjnQck.js → hyperframes-player-mDAHKhe5.js} +1 -1
- package/dist/studio/assets/{index-CVKJ_KP2.js → index-B_TY4ev_.js} +1 -1
- package/dist/studio/assets/{index-DfBPbqKk.js → index-CfHgkH4-.js} +1 -1
- package/dist/studio/assets/{index-BZDSpvtS.js → index-DnsLHxGU.js} +3 -3
- package/dist/studio/index.html +1 -1
- package/package.json +1 -1
|
@@ -48716,492 +48716,6 @@ function parseFeed(feed, options = parseFeedDefaultOptions) {
|
|
|
48716
48716
|
var import_postcss_selector_parser = __toESM(require_dist(), 1);
|
|
48717
48717
|
import postcss from "postcss";
|
|
48718
48718
|
|
|
48719
|
-
// ../parsers/dist/colorGradingContract.js
|
|
48720
|
-
var COLOR_GRADING_COLOR_SPACE = "rec709";
|
|
48721
|
-
var COLOR_GRADING_MAX_CURVE_POINTS = 16;
|
|
48722
|
-
var COLOR_GRADING_MAX_SECONDARIES = 4;
|
|
48723
|
-
var COLOR_GRADING_ADVANCED_LIMITS = {
|
|
48724
|
-
hueDegrees: { min: 0, max: 360, inclusiveMax: false },
|
|
48725
|
-
unit: { min: 0, max: 1 },
|
|
48726
|
-
signedUnit: { min: -1, max: 1 },
|
|
48727
|
-
secondaryHueRange: { min: 0, max: 180 },
|
|
48728
|
-
secondaryHueSoftness: { min: 0, max: 180 },
|
|
48729
|
-
secondaryHueCombinedMax: 180,
|
|
48730
|
-
secondarySoftRangeSoftness: { min: 0, max: 0.5 },
|
|
48731
|
-
secondaryHueShift: { min: -180, max: 180 },
|
|
48732
|
-
effects: {
|
|
48733
|
-
asciiStyle: { min: 0, max: 7 },
|
|
48734
|
-
bloom: { min: 0, max: 3 },
|
|
48735
|
-
bloomRadius: { min: 1, max: 100 },
|
|
48736
|
-
monoScreenShape: { min: 0, max: 4 }
|
|
48737
|
-
}
|
|
48738
|
-
};
|
|
48739
|
-
var COLOR_GRADING_TOP_LEVEL_KEYS = [
|
|
48740
|
-
"enabled",
|
|
48741
|
-
"preset",
|
|
48742
|
-
"intensity",
|
|
48743
|
-
"adjust",
|
|
48744
|
-
"wheels",
|
|
48745
|
-
"curves",
|
|
48746
|
-
"hueCurves",
|
|
48747
|
-
"secondaries",
|
|
48748
|
-
"details",
|
|
48749
|
-
"effects",
|
|
48750
|
-
"palette",
|
|
48751
|
-
"lut",
|
|
48752
|
-
"colorSpace"
|
|
48753
|
-
];
|
|
48754
|
-
var COLOR_GRADING_ADJUST_KEYS = [
|
|
48755
|
-
"exposure",
|
|
48756
|
-
"contrast",
|
|
48757
|
-
"highlights",
|
|
48758
|
-
"shadows",
|
|
48759
|
-
"whites",
|
|
48760
|
-
"blacks",
|
|
48761
|
-
"temperature",
|
|
48762
|
-
"tint",
|
|
48763
|
-
"vibrance",
|
|
48764
|
-
"saturation"
|
|
48765
|
-
];
|
|
48766
|
-
var COLOR_GRADING_WHEEL_KEYS = ["shadows", "midtones", "highlights"];
|
|
48767
|
-
var COLOR_GRADING_CURVE_KEYS = ["master", "red", "green", "blue"];
|
|
48768
|
-
var COLOR_GRADING_HUE_CURVE_KEYS = ["hueVsHue", "hueVsSaturation", "hueVsLuma"];
|
|
48769
|
-
var COLOR_GRADING_WHEEL_CONTROL_KEYS = ["hue", "amount", "level"];
|
|
48770
|
-
var COLOR_GRADING_SECONDARY_KEYS = ["enabled", "key", "correction"];
|
|
48771
|
-
var COLOR_GRADING_SECONDARY_KEY_KEYS = ["hue", "saturation", "luma"];
|
|
48772
|
-
var COLOR_GRADING_HUE_RANGE_KEYS = ["center", "range", "softness"];
|
|
48773
|
-
var COLOR_GRADING_SOFT_RANGE_KEYS = ["min", "max", "softness"];
|
|
48774
|
-
var COLOR_GRADING_SECONDARY_CORRECTION_KEYS = [
|
|
48775
|
-
"hueShift",
|
|
48776
|
-
"saturation",
|
|
48777
|
-
"luma",
|
|
48778
|
-
"temperature",
|
|
48779
|
-
"tint"
|
|
48780
|
-
];
|
|
48781
|
-
var COLOR_GRADING_DETAIL_KEYS = [
|
|
48782
|
-
"vignette",
|
|
48783
|
-
"vignetteMidpoint",
|
|
48784
|
-
"vignetteRoundness",
|
|
48785
|
-
"vignetteFeather",
|
|
48786
|
-
"grain",
|
|
48787
|
-
"grainSize",
|
|
48788
|
-
"grainRoughness"
|
|
48789
|
-
];
|
|
48790
|
-
var COLOR_GRADING_EFFECT_KEYS = [
|
|
48791
|
-
"blur",
|
|
48792
|
-
"pixelate",
|
|
48793
|
-
"chromaBleed",
|
|
48794
|
-
"tapeDamage",
|
|
48795
|
-
"tapeTracking",
|
|
48796
|
-
"tapeNoise",
|
|
48797
|
-
"tapeSpeed",
|
|
48798
|
-
"filmArtifacts",
|
|
48799
|
-
"halftone",
|
|
48800
|
-
"halftoneSize",
|
|
48801
|
-
"twoInkPrint",
|
|
48802
|
-
"twoInkPrintSize",
|
|
48803
|
-
"ascii",
|
|
48804
|
-
"asciiSize",
|
|
48805
|
-
"asciiInvert",
|
|
48806
|
-
"asciiStyle",
|
|
48807
|
-
"asciiColor",
|
|
48808
|
-
"asciiRotation",
|
|
48809
|
-
"dither",
|
|
48810
|
-
"ditherSize",
|
|
48811
|
-
"bloom",
|
|
48812
|
-
"bloomRadius",
|
|
48813
|
-
"monoScreen",
|
|
48814
|
-
"monoScreenSize",
|
|
48815
|
-
"monoScreenAngle",
|
|
48816
|
-
"monoScreenSpread",
|
|
48817
|
-
"monoScreenShape",
|
|
48818
|
-
"monoScreenInvert",
|
|
48819
|
-
"scanlines",
|
|
48820
|
-
"scanlineCount",
|
|
48821
|
-
"scanlineSoftness",
|
|
48822
|
-
"chromaticAberration",
|
|
48823
|
-
"chromaticAngle",
|
|
48824
|
-
"crtCurvature",
|
|
48825
|
-
"digitalGlitch",
|
|
48826
|
-
"digitalGlitchColorSplit",
|
|
48827
|
-
"digitalGlitchLineTear",
|
|
48828
|
-
"digitalGlitchPixelate",
|
|
48829
|
-
"digitalGlitchBlockAmount",
|
|
48830
|
-
"digitalGlitchBlockDisplacement",
|
|
48831
|
-
"digitalGlitchBlockOpacity",
|
|
48832
|
-
"digitalGlitchSpeed",
|
|
48833
|
-
"engraving",
|
|
48834
|
-
"engravingSpacing",
|
|
48835
|
-
"engravingMinThickness",
|
|
48836
|
-
"engravingMaxThickness",
|
|
48837
|
-
"engravingAngle",
|
|
48838
|
-
"engravingContrast",
|
|
48839
|
-
"engravingSharpness",
|
|
48840
|
-
"engravingWave",
|
|
48841
|
-
"engravingWaveFrequency",
|
|
48842
|
-
"crosshatch",
|
|
48843
|
-
"crosshatchSpacing",
|
|
48844
|
-
"crosshatchThickness",
|
|
48845
|
-
"crosshatchAngle",
|
|
48846
|
-
"crosshatchContrast",
|
|
48847
|
-
"crosshatchEdges",
|
|
48848
|
-
"crosshatchLineWeight",
|
|
48849
|
-
"crosshatchWave",
|
|
48850
|
-
"crosshatchWaveFrequency",
|
|
48851
|
-
"kuwahara",
|
|
48852
|
-
"kuwaharaRadius",
|
|
48853
|
-
"kuwaharaSharpness",
|
|
48854
|
-
"kuwaharaSaturation"
|
|
48855
|
-
];
|
|
48856
|
-
var COLOR_GRADING_LUT_KEYS = ["src", "intensity"];
|
|
48857
|
-
var UNIT_LIMIT = COLOR_GRADING_ADVANCED_LIMITS.unit;
|
|
48858
|
-
var SIGNED_UNIT_LIMIT = COLOR_GRADING_ADVANCED_LIMITS.signedUnit;
|
|
48859
|
-
var EFFECT_LIMIT_OVERRIDES = COLOR_GRADING_ADVANCED_LIMITS.effects;
|
|
48860
|
-
var VARIABLE_REF = /^\$(?:\{[A-Za-z0-9_.:-]+\}|[A-Za-z0-9_.:-]+)$/;
|
|
48861
|
-
var PALETTE_COLOR = /^#[0-9a-f]{6}$/i;
|
|
48862
|
-
var OBJECT_SECTIONS = [
|
|
48863
|
-
["adjust", COLOR_GRADING_ADJUST_KEYS],
|
|
48864
|
-
["details", COLOR_GRADING_DETAIL_KEYS],
|
|
48865
|
-
["effects", COLOR_GRADING_EFFECT_KEYS],
|
|
48866
|
-
["lut", COLOR_GRADING_LUT_KEYS]
|
|
48867
|
-
];
|
|
48868
|
-
function isRecord(value) {
|
|
48869
|
-
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
48870
|
-
}
|
|
48871
|
-
function isColorGradingVariableRef(value) {
|
|
48872
|
-
return typeof value === "string" && VARIABLE_REF.test(value.trim());
|
|
48873
|
-
}
|
|
48874
|
-
function unknownKeysHint(path, unknown) {
|
|
48875
|
-
if (path !== "grading") return `Correct or remove the unsupported "${path}" keys.`;
|
|
48876
|
-
const sections = new Set(
|
|
48877
|
-
unknown.flatMap(
|
|
48878
|
-
(key2) => OBJECT_SECTIONS.filter(([, keys2]) => keys2.includes(key2)).map(
|
|
48879
|
-
([section]) => section
|
|
48880
|
-
)
|
|
48881
|
-
)
|
|
48882
|
-
);
|
|
48883
|
-
return sections.size === 1 ? `Move those controls under "${[...sections][0]}".` : "Use only the documented media-treatment keys at the top level.";
|
|
48884
|
-
}
|
|
48885
|
-
function validateObject(value, path, keys2, issues) {
|
|
48886
|
-
if (isColorGradingVariableRef(value)) return null;
|
|
48887
|
-
if (!isRecord(value)) {
|
|
48888
|
-
issues.push({ path, message: "must be an object or variable reference" });
|
|
48889
|
-
return null;
|
|
48890
|
-
}
|
|
48891
|
-
const allowed = new Set(keys2);
|
|
48892
|
-
const unknown = Object.keys(value).filter((key2) => !allowed.has(key2));
|
|
48893
|
-
if (unknown.length > 0) {
|
|
48894
|
-
issues.push({
|
|
48895
|
-
path,
|
|
48896
|
-
message: `has unsupported key(s): ${unknown.join(", ")}`,
|
|
48897
|
-
hint: unknownKeysHint(path, unknown)
|
|
48898
|
-
});
|
|
48899
|
-
}
|
|
48900
|
-
return value;
|
|
48901
|
-
}
|
|
48902
|
-
function isNumberInRange(value, limit, inclusiveMax) {
|
|
48903
|
-
if (typeof value !== "number" || !Number.isFinite(value) || value < limit.min) return false;
|
|
48904
|
-
return inclusiveMax ? value <= limit.max : value < limit.max;
|
|
48905
|
-
}
|
|
48906
|
-
function validateNumericField(value, key2, path, limit, issues, inclusiveMax = true) {
|
|
48907
|
-
const candidate = value[key2];
|
|
48908
|
-
if (candidate === void 0 || isColorGradingVariableRef(candidate)) return;
|
|
48909
|
-
if (isNumberInRange(candidate, limit, inclusiveMax)) return;
|
|
48910
|
-
issues.push({
|
|
48911
|
-
path: path ? `${path}.${key2}` : key2,
|
|
48912
|
-
message: `must be a finite number from ${limit.min} ${inclusiveMax ? "through" : "up to"} ${limit.max}`
|
|
48913
|
-
});
|
|
48914
|
-
}
|
|
48915
|
-
function isFiniteTuple(value) {
|
|
48916
|
-
return Array.isArray(value) && value.length === 2 && value.every((coordinate) => typeof coordinate === "number" && Number.isFinite(coordinate));
|
|
48917
|
-
}
|
|
48918
|
-
function validateCurve(value, path, issues) {
|
|
48919
|
-
if (isColorGradingVariableRef(value)) return;
|
|
48920
|
-
if (!Array.isArray(value) || value.length < 2 || value.length > COLOR_GRADING_MAX_CURVE_POINTS) {
|
|
48921
|
-
issues.push({
|
|
48922
|
-
path,
|
|
48923
|
-
message: `must contain 2 to ${COLOR_GRADING_MAX_CURVE_POINTS} [input, output] points`
|
|
48924
|
-
});
|
|
48925
|
-
return;
|
|
48926
|
-
}
|
|
48927
|
-
const inputs = /* @__PURE__ */ new Set();
|
|
48928
|
-
value.forEach((point, index) => {
|
|
48929
|
-
if (!isFiniteTuple(point)) {
|
|
48930
|
-
issues.push({ path: `${path}[${index}]`, message: "must be a finite [input, output] tuple" });
|
|
48931
|
-
return;
|
|
48932
|
-
}
|
|
48933
|
-
const [input2, output] = point;
|
|
48934
|
-
if (input2 < 0 || input2 > 1 || output < 0 || output > 1) {
|
|
48935
|
-
issues.push({ path: `${path}[${index}]`, message: "coordinates must be between 0 and 1" });
|
|
48936
|
-
}
|
|
48937
|
-
if (inputs.has(input2)) issues.push({ path, message: `contains duplicate input ${input2}` });
|
|
48938
|
-
inputs.add(input2);
|
|
48939
|
-
});
|
|
48940
|
-
const inferredPointCount = value.length + (inputs.has(0) ? 0 : 1) + (inputs.has(1) ? 0 : 1);
|
|
48941
|
-
if (inferredPointCount > COLOR_GRADING_MAX_CURVE_POINTS) {
|
|
48942
|
-
issues.push({
|
|
48943
|
-
path,
|
|
48944
|
-
message: `must contain at most ${COLOR_GRADING_MAX_CURVE_POINTS} points including inferred 0 and 1 endpoints`
|
|
48945
|
-
});
|
|
48946
|
-
}
|
|
48947
|
-
}
|
|
48948
|
-
function validateHueCurve(value, path, outputMin, outputMax, issues) {
|
|
48949
|
-
if (isColorGradingVariableRef(value)) return;
|
|
48950
|
-
if (!Array.isArray(value) || value.length < 3 || value.length > COLOR_GRADING_MAX_CURVE_POINTS) {
|
|
48951
|
-
issues.push({
|
|
48952
|
-
path,
|
|
48953
|
-
message: `must contain 3 to ${COLOR_GRADING_MAX_CURVE_POINTS} [hueDegrees, delta] points`
|
|
48954
|
-
});
|
|
48955
|
-
return;
|
|
48956
|
-
}
|
|
48957
|
-
const hues = /* @__PURE__ */ new Set();
|
|
48958
|
-
value.forEach((point, index) => {
|
|
48959
|
-
if (!isFiniteTuple(point)) {
|
|
48960
|
-
issues.push({ path: `${path}[${index}]`, message: "must be a finite [hue, delta] tuple" });
|
|
48961
|
-
return;
|
|
48962
|
-
}
|
|
48963
|
-
const [hue, delta] = point;
|
|
48964
|
-
if (hue < 0 || hue >= 360) {
|
|
48965
|
-
issues.push({ path: `${path}[${index}][0]`, message: "must be from 0 up to 360 degrees" });
|
|
48966
|
-
}
|
|
48967
|
-
if (delta < outputMin || delta > outputMax) {
|
|
48968
|
-
issues.push({
|
|
48969
|
-
path: `${path}[${index}][1]`,
|
|
48970
|
-
message: `must be between ${outputMin} and ${outputMax}`
|
|
48971
|
-
});
|
|
48972
|
-
}
|
|
48973
|
-
if (hues.has(hue)) issues.push({ path, message: `contains duplicate hue ${hue}` });
|
|
48974
|
-
hues.add(hue);
|
|
48975
|
-
});
|
|
48976
|
-
}
|
|
48977
|
-
function validateNumericSection(value, path, keys2, limitFor, issues) {
|
|
48978
|
-
for (const key2 of keys2) validateNumericField(value, key2, path, limitFor(key2), issues);
|
|
48979
|
-
}
|
|
48980
|
-
function validatePalette(value, issues) {
|
|
48981
|
-
if (value === void 0 || value === null || isColorGradingVariableRef(value)) return;
|
|
48982
|
-
const hint = 'Use 2 to 6 colors in the intended mapping order, each written as exact "#RRGGBB", or use a project variable reference.';
|
|
48983
|
-
if (!Array.isArray(value) || value.length < 2 || value.length > 6) {
|
|
48984
|
-
issues.push({ path: "palette", message: "must contain 2 to 6 hex colors", hint });
|
|
48985
|
-
return;
|
|
48986
|
-
}
|
|
48987
|
-
value.forEach((color, index) => {
|
|
48988
|
-
if (typeof color !== "string" || !PALETTE_COLOR.test(color)) {
|
|
48989
|
-
issues.push({
|
|
48990
|
-
path: `palette[${index}]`,
|
|
48991
|
-
message: "must be a six-digit hex color",
|
|
48992
|
-
hint
|
|
48993
|
-
});
|
|
48994
|
-
}
|
|
48995
|
-
});
|
|
48996
|
-
}
|
|
48997
|
-
function validateLut(value, object, issues) {
|
|
48998
|
-
if (typeof value === "string") {
|
|
48999
|
-
if (!value.trim()) issues.push({ path: "lut", message: "must not be empty" });
|
|
49000
|
-
return;
|
|
49001
|
-
}
|
|
49002
|
-
if (!object) return;
|
|
49003
|
-
if (!isColorGradingVariableRef(object.src) && (typeof object.src !== "string" || !object.src.trim())) {
|
|
49004
|
-
issues.push({
|
|
49005
|
-
path: "lut.src",
|
|
49006
|
-
message: "must be a non-empty string or variable reference"
|
|
49007
|
-
});
|
|
49008
|
-
}
|
|
49009
|
-
validateNumericField(object, "intensity", "lut", UNIT_LIMIT, issues);
|
|
49010
|
-
}
|
|
49011
|
-
function validateEnabled(grading, issues) {
|
|
49012
|
-
if (grading.enabled !== void 0 && !isColorGradingVariableRef(grading.enabled) && typeof grading.enabled !== "boolean") {
|
|
49013
|
-
issues.push({ path: "enabled", message: "must be a boolean or variable reference" });
|
|
49014
|
-
}
|
|
49015
|
-
}
|
|
49016
|
-
function validatePreset(grading, issues) {
|
|
49017
|
-
if (grading.preset !== void 0 && grading.preset !== null && !isColorGradingVariableRef(grading.preset) && (typeof grading.preset !== "string" || !grading.preset.trim())) {
|
|
49018
|
-
issues.push({
|
|
49019
|
-
path: "preset",
|
|
49020
|
-
message: "must be a non-empty string, null, or variable reference"
|
|
49021
|
-
});
|
|
49022
|
-
}
|
|
49023
|
-
}
|
|
49024
|
-
function validateColorSpace(grading, issues) {
|
|
49025
|
-
if (grading.colorSpace !== void 0 && !isColorGradingVariableRef(grading.colorSpace) && grading.colorSpace !== COLOR_GRADING_COLOR_SPACE) {
|
|
49026
|
-
issues.push({
|
|
49027
|
-
path: "colorSpace",
|
|
49028
|
-
message: `must be "${COLOR_GRADING_COLOR_SPACE}" or a variable reference`
|
|
49029
|
-
});
|
|
49030
|
-
}
|
|
49031
|
-
}
|
|
49032
|
-
function validateTopLevel(grading, issues) {
|
|
49033
|
-
validateEnabled(grading, issues);
|
|
49034
|
-
validateNumericField(grading, "intensity", "", UNIT_LIMIT, issues);
|
|
49035
|
-
validatePreset(grading, issues);
|
|
49036
|
-
validateColorSpace(grading, issues);
|
|
49037
|
-
}
|
|
49038
|
-
function validateSection(grading, key2, keys2, issues) {
|
|
49039
|
-
const section = grading[key2];
|
|
49040
|
-
if (section === void 0 || key2 === "lut" && section === null) return;
|
|
49041
|
-
if (key2 === "lut" && typeof section === "string") {
|
|
49042
|
-
validateLut(section, null, issues);
|
|
49043
|
-
return;
|
|
49044
|
-
}
|
|
49045
|
-
const object = validateObject(section, key2, keys2, issues);
|
|
49046
|
-
if (!object) return;
|
|
49047
|
-
if (key2 === "lut") return validateLut(section, object, issues);
|
|
49048
|
-
const limitFor = (control) => {
|
|
49049
|
-
if (key2 === "adjust" && control === "exposure") return { min: -2, max: 2 };
|
|
49050
|
-
if (key2 === "adjust" || key2 === "details" && control === "vignetteRoundness") {
|
|
49051
|
-
return SIGNED_UNIT_LIMIT;
|
|
49052
|
-
}
|
|
49053
|
-
return key2 === "effects" ? EFFECT_LIMIT_OVERRIDES[control] ?? UNIT_LIMIT : UNIT_LIMIT;
|
|
49054
|
-
};
|
|
49055
|
-
validateNumericSection(object, key2, keys2, limitFor, issues);
|
|
49056
|
-
}
|
|
49057
|
-
function validateSections(grading, issues) {
|
|
49058
|
-
for (const [key2, keys2] of OBJECT_SECTIONS) validateSection(grading, key2, keys2, issues);
|
|
49059
|
-
}
|
|
49060
|
-
function validateWheels(value, issues) {
|
|
49061
|
-
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
49062
|
-
const wheels = validateObject(value, "wheels", COLOR_GRADING_WHEEL_KEYS, issues);
|
|
49063
|
-
if (!wheels) return;
|
|
49064
|
-
for (const wheel of COLOR_GRADING_WHEEL_KEYS) {
|
|
49065
|
-
if (wheels[wheel] === void 0) continue;
|
|
49066
|
-
const path = `wheels.${wheel}`;
|
|
49067
|
-
const controls = validateObject(wheels[wheel], path, COLOR_GRADING_WHEEL_CONTROL_KEYS, issues);
|
|
49068
|
-
if (!controls) continue;
|
|
49069
|
-
validateNumericField(
|
|
49070
|
-
controls,
|
|
49071
|
-
"hue",
|
|
49072
|
-
path,
|
|
49073
|
-
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees,
|
|
49074
|
-
issues,
|
|
49075
|
-
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees.inclusiveMax
|
|
49076
|
-
);
|
|
49077
|
-
validateNumericField(controls, "amount", path, UNIT_LIMIT, issues);
|
|
49078
|
-
validateNumericField(controls, "level", path, SIGNED_UNIT_LIMIT, issues);
|
|
49079
|
-
}
|
|
49080
|
-
}
|
|
49081
|
-
function validateCurves(value, issues) {
|
|
49082
|
-
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
49083
|
-
const curves = validateObject(value, "curves", COLOR_GRADING_CURVE_KEYS, issues);
|
|
49084
|
-
if (!curves) return;
|
|
49085
|
-
for (const key2 of COLOR_GRADING_CURVE_KEYS) {
|
|
49086
|
-
if (curves[key2] !== void 0) validateCurve(curves[key2], `curves.${key2}`, issues);
|
|
49087
|
-
}
|
|
49088
|
-
}
|
|
49089
|
-
function validateHueCurves(value, issues) {
|
|
49090
|
-
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
49091
|
-
const curves = validateObject(value, "hueCurves", COLOR_GRADING_HUE_CURVE_KEYS, issues);
|
|
49092
|
-
if (!curves) return;
|
|
49093
|
-
const limits = {
|
|
49094
|
-
hueVsHue: [-180, 180],
|
|
49095
|
-
hueVsSaturation: [-1, 1],
|
|
49096
|
-
hueVsLuma: [-1, 1]
|
|
49097
|
-
};
|
|
49098
|
-
for (const key2 of COLOR_GRADING_HUE_CURVE_KEYS) {
|
|
49099
|
-
if (curves[key2] !== void 0) {
|
|
49100
|
-
validateHueCurve(curves[key2], `hueCurves.${key2}`, limits[key2][0], limits[key2][1], issues);
|
|
49101
|
-
}
|
|
49102
|
-
}
|
|
49103
|
-
}
|
|
49104
|
-
function validateSoftRange(value, path, issues) {
|
|
49105
|
-
const range = validateObject(value, path, COLOR_GRADING_SOFT_RANGE_KEYS, issues);
|
|
49106
|
-
if (!range) return;
|
|
49107
|
-
validateNumericField(range, "min", path, UNIT_LIMIT, issues);
|
|
49108
|
-
validateNumericField(range, "max", path, UNIT_LIMIT, issues);
|
|
49109
|
-
validateNumericField(
|
|
49110
|
-
range,
|
|
49111
|
-
"softness",
|
|
49112
|
-
path,
|
|
49113
|
-
COLOR_GRADING_ADVANCED_LIMITS.secondarySoftRangeSoftness,
|
|
49114
|
-
issues
|
|
49115
|
-
);
|
|
49116
|
-
if (typeof range.min === "number" && typeof range.max === "number" && range.min >= range.max) {
|
|
49117
|
-
issues.push({ path, message: "min must be smaller than max" });
|
|
49118
|
-
}
|
|
49119
|
-
}
|
|
49120
|
-
function validateSecondaryHue(value, path, issues) {
|
|
49121
|
-
const hue = validateObject(value, path, COLOR_GRADING_HUE_RANGE_KEYS, issues);
|
|
49122
|
-
if (!hue) return;
|
|
49123
|
-
validateNumericField(
|
|
49124
|
-
hue,
|
|
49125
|
-
"center",
|
|
49126
|
-
path,
|
|
49127
|
-
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees,
|
|
49128
|
-
issues,
|
|
49129
|
-
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees.inclusiveMax
|
|
49130
|
-
);
|
|
49131
|
-
validateNumericField(hue, "range", path, COLOR_GRADING_ADVANCED_LIMITS.secondaryHueRange, issues);
|
|
49132
|
-
validateNumericField(
|
|
49133
|
-
hue,
|
|
49134
|
-
"softness",
|
|
49135
|
-
path,
|
|
49136
|
-
COLOR_GRADING_ADVANCED_LIMITS.secondaryHueSoftness,
|
|
49137
|
-
issues
|
|
49138
|
-
);
|
|
49139
|
-
if (typeof hue.range === "number" && typeof hue.softness === "number" && hue.range + hue.softness > COLOR_GRADING_ADVANCED_LIMITS.secondaryHueCombinedMax) {
|
|
49140
|
-
issues.push({
|
|
49141
|
-
path,
|
|
49142
|
-
message: `range plus softness must not exceed ${COLOR_GRADING_ADVANCED_LIMITS.secondaryHueCombinedMax} degrees`
|
|
49143
|
-
});
|
|
49144
|
-
}
|
|
49145
|
-
}
|
|
49146
|
-
function validateSecondaryKey(value, path, issues) {
|
|
49147
|
-
const key2 = validateObject(value, path, COLOR_GRADING_SECONDARY_KEY_KEYS, issues);
|
|
49148
|
-
if (!key2) return;
|
|
49149
|
-
if (key2.hue !== void 0) validateSecondaryHue(key2.hue, `${path}.hue`, issues);
|
|
49150
|
-
if (key2.saturation !== void 0) validateSoftRange(key2.saturation, `${path}.saturation`, issues);
|
|
49151
|
-
if (key2.luma !== void 0) validateSoftRange(key2.luma, `${path}.luma`, issues);
|
|
49152
|
-
}
|
|
49153
|
-
function validateSecondaryCorrection(value, path, issues) {
|
|
49154
|
-
const correction = validateObject(value, path, COLOR_GRADING_SECONDARY_CORRECTION_KEYS, issues);
|
|
49155
|
-
if (!correction) return;
|
|
49156
|
-
validateNumericField(
|
|
49157
|
-
correction,
|
|
49158
|
-
"hueShift",
|
|
49159
|
-
path,
|
|
49160
|
-
COLOR_GRADING_ADVANCED_LIMITS.secondaryHueShift,
|
|
49161
|
-
issues
|
|
49162
|
-
);
|
|
49163
|
-
for (const key2 of ["saturation", "luma", "temperature", "tint"]) {
|
|
49164
|
-
validateNumericField(correction, key2, path, SIGNED_UNIT_LIMIT, issues);
|
|
49165
|
-
}
|
|
49166
|
-
}
|
|
49167
|
-
function validateSecondary(value, index, issues) {
|
|
49168
|
-
const path = `secondaries[${index}]`;
|
|
49169
|
-
const secondary = validateObject(value, path, COLOR_GRADING_SECONDARY_KEYS, issues);
|
|
49170
|
-
if (!secondary) return;
|
|
49171
|
-
if (secondary.enabled !== void 0 && typeof secondary.enabled !== "boolean" && !isColorGradingVariableRef(secondary.enabled)) {
|
|
49172
|
-
issues.push({ path: `${path}.enabled`, message: "must be a boolean" });
|
|
49173
|
-
}
|
|
49174
|
-
validateSecondaryKey(secondary.key, `${path}.key`, issues);
|
|
49175
|
-
validateSecondaryCorrection(secondary.correction, `${path}.correction`, issues);
|
|
49176
|
-
}
|
|
49177
|
-
function validateSecondaries(value, issues) {
|
|
49178
|
-
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
49179
|
-
if (!Array.isArray(value) || value.length > COLOR_GRADING_MAX_SECONDARIES) {
|
|
49180
|
-
issues.push({
|
|
49181
|
-
path: "secondaries",
|
|
49182
|
-
message: `must be an array of at most ${COLOR_GRADING_MAX_SECONDARIES} selections`
|
|
49183
|
-
});
|
|
49184
|
-
return;
|
|
49185
|
-
}
|
|
49186
|
-
value.forEach((secondary, index) => validateSecondary(secondary, index, issues));
|
|
49187
|
-
}
|
|
49188
|
-
function validateColorGradingContract(value) {
|
|
49189
|
-
if (typeof value === "string") {
|
|
49190
|
-
return value.trim() ? [] : [{ path: "grading", message: "is empty" }];
|
|
49191
|
-
}
|
|
49192
|
-
const issues = [];
|
|
49193
|
-
const grading = validateObject(value, "grading", COLOR_GRADING_TOP_LEVEL_KEYS, issues);
|
|
49194
|
-
if (!grading) return issues;
|
|
49195
|
-
validateTopLevel(grading, issues);
|
|
49196
|
-
validateSections(grading, issues);
|
|
49197
|
-
validateWheels(grading.wheels, issues);
|
|
49198
|
-
validateCurves(grading.curves, issues);
|
|
49199
|
-
validateHueCurves(grading.hueCurves, issues);
|
|
49200
|
-
validateSecondaries(grading.secondaries, issues);
|
|
49201
|
-
validatePalette(grading.palette, issues);
|
|
49202
|
-
return issues;
|
|
49203
|
-
}
|
|
49204
|
-
|
|
49205
48719
|
// ../parsers/dist/index.js
|
|
49206
48720
|
var recast = __toESM(require_main2(), 1);
|
|
49207
48721
|
var import_parser2 = __toESM(require_lib(), 1);
|
|
@@ -54436,34 +53950,228 @@ var HTMLSlotElement = class extends HTMLElement {
|
|
|
54436
53950
|
}
|
|
54437
53951
|
/* c8 ignore stop */
|
|
54438
53952
|
};
|
|
54439
|
-
registerHTMLClass(tagName14, HTMLSlotElement);
|
|
53953
|
+
registerHTMLClass(tagName14, HTMLSlotElement);
|
|
53954
|
+
|
|
53955
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/form-element.js
|
|
53956
|
+
var HTMLFormElement = class extends HTMLElement {
|
|
53957
|
+
constructor(ownerDocument, localName = "form") {
|
|
53958
|
+
super(ownerDocument, localName);
|
|
53959
|
+
}
|
|
53960
|
+
};
|
|
53961
|
+
|
|
53962
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/image-element.js
|
|
53963
|
+
var tagName15 = "img";
|
|
53964
|
+
var HTMLImageElement = class extends HTMLElement {
|
|
53965
|
+
constructor(ownerDocument, localName = tagName15) {
|
|
53966
|
+
super(ownerDocument, localName);
|
|
53967
|
+
}
|
|
53968
|
+
/* c8 ignore start */
|
|
53969
|
+
get alt() {
|
|
53970
|
+
return stringAttribute.get(this, "alt");
|
|
53971
|
+
}
|
|
53972
|
+
set alt(value) {
|
|
53973
|
+
stringAttribute.set(this, "alt", value);
|
|
53974
|
+
}
|
|
53975
|
+
get sizes() {
|
|
53976
|
+
return stringAttribute.get(this, "sizes");
|
|
53977
|
+
}
|
|
53978
|
+
set sizes(value) {
|
|
53979
|
+
stringAttribute.set(this, "sizes", value);
|
|
53980
|
+
}
|
|
53981
|
+
get src() {
|
|
53982
|
+
return stringAttribute.get(this, "src");
|
|
53983
|
+
}
|
|
53984
|
+
set src(value) {
|
|
53985
|
+
stringAttribute.set(this, "src", value);
|
|
53986
|
+
}
|
|
53987
|
+
get srcset() {
|
|
53988
|
+
return stringAttribute.get(this, "srcset");
|
|
53989
|
+
}
|
|
53990
|
+
set srcset(value) {
|
|
53991
|
+
stringAttribute.set(this, "srcset", value);
|
|
53992
|
+
}
|
|
53993
|
+
get title() {
|
|
53994
|
+
return stringAttribute.get(this, "title");
|
|
53995
|
+
}
|
|
53996
|
+
set title(value) {
|
|
53997
|
+
stringAttribute.set(this, "title", value);
|
|
53998
|
+
}
|
|
53999
|
+
get width() {
|
|
54000
|
+
return numericAttribute.get(this, "width");
|
|
54001
|
+
}
|
|
54002
|
+
set width(value) {
|
|
54003
|
+
numericAttribute.set(this, "width", value);
|
|
54004
|
+
}
|
|
54005
|
+
get height() {
|
|
54006
|
+
return numericAttribute.get(this, "height");
|
|
54007
|
+
}
|
|
54008
|
+
set height(value) {
|
|
54009
|
+
numericAttribute.set(this, "height", value);
|
|
54010
|
+
}
|
|
54011
|
+
/* c8 ignore stop */
|
|
54012
|
+
};
|
|
54013
|
+
registerHTMLClass(tagName15, HTMLImageElement);
|
|
54014
|
+
|
|
54015
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/pre-element.js
|
|
54016
|
+
var HTMLPreElement = class extends HTMLElement {
|
|
54017
|
+
constructor(ownerDocument, localName = "pre") {
|
|
54018
|
+
super(ownerDocument, localName);
|
|
54019
|
+
}
|
|
54020
|
+
};
|
|
54021
|
+
|
|
54022
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/u-list-element.js
|
|
54023
|
+
var HTMLUListElement = class extends HTMLElement {
|
|
54024
|
+
constructor(ownerDocument, localName = "ul") {
|
|
54025
|
+
super(ownerDocument, localName);
|
|
54026
|
+
}
|
|
54027
|
+
};
|
|
54028
|
+
|
|
54029
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/meta-element.js
|
|
54030
|
+
var tagName16 = "meta";
|
|
54031
|
+
var HTMLMetaElement = class extends HTMLElement {
|
|
54032
|
+
constructor(ownerDocument, localName = tagName16) {
|
|
54033
|
+
super(ownerDocument, localName);
|
|
54034
|
+
}
|
|
54035
|
+
/* c8 ignore start */
|
|
54036
|
+
get name() {
|
|
54037
|
+
return stringAttribute.get(this, "name");
|
|
54038
|
+
}
|
|
54039
|
+
set name(value) {
|
|
54040
|
+
stringAttribute.set(this, "name", value);
|
|
54041
|
+
}
|
|
54042
|
+
get httpEquiv() {
|
|
54043
|
+
return stringAttribute.get(this, "http-equiv");
|
|
54044
|
+
}
|
|
54045
|
+
set httpEquiv(value) {
|
|
54046
|
+
stringAttribute.set(this, "http-equiv", value);
|
|
54047
|
+
}
|
|
54048
|
+
get content() {
|
|
54049
|
+
return stringAttribute.get(this, "content");
|
|
54050
|
+
}
|
|
54051
|
+
set content(value) {
|
|
54052
|
+
stringAttribute.set(this, "content", value);
|
|
54053
|
+
}
|
|
54054
|
+
get charset() {
|
|
54055
|
+
return stringAttribute.get(this, "charset");
|
|
54056
|
+
}
|
|
54057
|
+
set charset(value) {
|
|
54058
|
+
stringAttribute.set(this, "charset", value);
|
|
54059
|
+
}
|
|
54060
|
+
get media() {
|
|
54061
|
+
return stringAttribute.get(this, "media");
|
|
54062
|
+
}
|
|
54063
|
+
set media(value) {
|
|
54064
|
+
stringAttribute.set(this, "media", value);
|
|
54065
|
+
}
|
|
54066
|
+
/* c8 ignore stop */
|
|
54067
|
+
};
|
|
54068
|
+
registerHTMLClass(tagName16, HTMLMetaElement);
|
|
54069
|
+
|
|
54070
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/picture-element.js
|
|
54071
|
+
var HTMLPictureElement = class extends HTMLElement {
|
|
54072
|
+
constructor(ownerDocument, localName = "picture") {
|
|
54073
|
+
super(ownerDocument, localName);
|
|
54074
|
+
}
|
|
54075
|
+
};
|
|
54076
|
+
|
|
54077
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/area-element.js
|
|
54078
|
+
var HTMLAreaElement = class extends HTMLElement {
|
|
54079
|
+
constructor(ownerDocument, localName = "area") {
|
|
54080
|
+
super(ownerDocument, localName);
|
|
54081
|
+
}
|
|
54082
|
+
};
|
|
54083
|
+
|
|
54084
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/o-list-element.js
|
|
54085
|
+
var HTMLOListElement = class extends HTMLElement {
|
|
54086
|
+
constructor(ownerDocument, localName = "ol") {
|
|
54087
|
+
super(ownerDocument, localName);
|
|
54088
|
+
}
|
|
54089
|
+
};
|
|
54090
|
+
|
|
54091
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/table-caption-element.js
|
|
54092
|
+
var HTMLTableCaptionElement = class extends HTMLElement {
|
|
54093
|
+
constructor(ownerDocument, localName = "caption") {
|
|
54094
|
+
super(ownerDocument, localName);
|
|
54095
|
+
}
|
|
54096
|
+
};
|
|
54097
|
+
|
|
54098
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/anchor-element.js
|
|
54099
|
+
var tagName17 = "a";
|
|
54100
|
+
var HTMLAnchorElement = class extends HTMLElement {
|
|
54101
|
+
constructor(ownerDocument, localName = tagName17) {
|
|
54102
|
+
super(ownerDocument, localName);
|
|
54103
|
+
}
|
|
54104
|
+
/* c8 ignore start */
|
|
54105
|
+
// copy paste from img.src, already covered
|
|
54106
|
+
get href() {
|
|
54107
|
+
return encodeURI(decodeURI(stringAttribute.get(this, "href"))).trim();
|
|
54108
|
+
}
|
|
54109
|
+
set href(value) {
|
|
54110
|
+
stringAttribute.set(this, "href", decodeURI(value));
|
|
54111
|
+
}
|
|
54112
|
+
get download() {
|
|
54113
|
+
return encodeURI(decodeURI(stringAttribute.get(this, "download")));
|
|
54114
|
+
}
|
|
54115
|
+
set download(value) {
|
|
54116
|
+
stringAttribute.set(this, "download", decodeURI(value));
|
|
54117
|
+
}
|
|
54118
|
+
get target() {
|
|
54119
|
+
return stringAttribute.get(this, "target");
|
|
54120
|
+
}
|
|
54121
|
+
set target(value) {
|
|
54122
|
+
stringAttribute.set(this, "target", value);
|
|
54123
|
+
}
|
|
54124
|
+
get type() {
|
|
54125
|
+
return stringAttribute.get(this, "type");
|
|
54126
|
+
}
|
|
54127
|
+
set type(value) {
|
|
54128
|
+
stringAttribute.set(this, "type", value);
|
|
54129
|
+
}
|
|
54130
|
+
get rel() {
|
|
54131
|
+
return stringAttribute.get(this, "rel");
|
|
54132
|
+
}
|
|
54133
|
+
set rel(value) {
|
|
54134
|
+
stringAttribute.set(this, "rel", value);
|
|
54135
|
+
}
|
|
54136
|
+
/* c8 ignore stop */
|
|
54137
|
+
};
|
|
54138
|
+
registerHTMLClass(tagName17, HTMLAnchorElement);
|
|
54139
|
+
|
|
54140
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/label-element.js
|
|
54141
|
+
var HTMLLabelElement = class extends HTMLElement {
|
|
54142
|
+
constructor(ownerDocument, localName = "label") {
|
|
54143
|
+
super(ownerDocument, localName);
|
|
54144
|
+
}
|
|
54145
|
+
};
|
|
54146
|
+
|
|
54147
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/unknown-element.js
|
|
54148
|
+
var HTMLUnknownElement = class extends HTMLElement {
|
|
54149
|
+
constructor(ownerDocument, localName = "unknown") {
|
|
54150
|
+
super(ownerDocument, localName);
|
|
54151
|
+
}
|
|
54152
|
+
};
|
|
54153
|
+
|
|
54154
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/mod-element.js
|
|
54155
|
+
var HTMLModElement = class extends HTMLElement {
|
|
54156
|
+
constructor(ownerDocument, localName = "mod") {
|
|
54157
|
+
super(ownerDocument, localName);
|
|
54158
|
+
}
|
|
54159
|
+
};
|
|
54440
54160
|
|
|
54441
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/
|
|
54442
|
-
var
|
|
54443
|
-
constructor(ownerDocument, localName = "
|
|
54161
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/details-element.js
|
|
54162
|
+
var HTMLDetailsElement = class extends HTMLElement {
|
|
54163
|
+
constructor(ownerDocument, localName = "details") {
|
|
54444
54164
|
super(ownerDocument, localName);
|
|
54445
54165
|
}
|
|
54446
54166
|
};
|
|
54447
54167
|
|
|
54448
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/
|
|
54449
|
-
var
|
|
54450
|
-
var
|
|
54451
|
-
constructor(ownerDocument, localName =
|
|
54168
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/source-element.js
|
|
54169
|
+
var tagName18 = "source";
|
|
54170
|
+
var HTMLSourceElement = class extends HTMLElement {
|
|
54171
|
+
constructor(ownerDocument, localName = tagName18) {
|
|
54452
54172
|
super(ownerDocument, localName);
|
|
54453
54173
|
}
|
|
54454
54174
|
/* c8 ignore start */
|
|
54455
|
-
get alt() {
|
|
54456
|
-
return stringAttribute.get(this, "alt");
|
|
54457
|
-
}
|
|
54458
|
-
set alt(value) {
|
|
54459
|
-
stringAttribute.set(this, "alt", value);
|
|
54460
|
-
}
|
|
54461
|
-
get sizes() {
|
|
54462
|
-
return stringAttribute.get(this, "sizes");
|
|
54463
|
-
}
|
|
54464
|
-
set sizes(value) {
|
|
54465
|
-
stringAttribute.set(this, "sizes", value);
|
|
54466
|
-
}
|
|
54467
54175
|
get src() {
|
|
54468
54176
|
return stringAttribute.get(this, "src");
|
|
54469
54177
|
}
|
|
@@ -54476,1103 +54184,1398 @@ var HTMLImageElement = class extends HTMLElement {
|
|
|
54476
54184
|
set srcset(value) {
|
|
54477
54185
|
stringAttribute.set(this, "srcset", value);
|
|
54478
54186
|
}
|
|
54479
|
-
get
|
|
54480
|
-
return stringAttribute.get(this, "
|
|
54481
|
-
}
|
|
54482
|
-
set title(value) {
|
|
54483
|
-
stringAttribute.set(this, "title", value);
|
|
54484
|
-
}
|
|
54485
|
-
get width() {
|
|
54486
|
-
return numericAttribute.get(this, "width");
|
|
54187
|
+
get sizes() {
|
|
54188
|
+
return stringAttribute.get(this, "sizes");
|
|
54487
54189
|
}
|
|
54488
|
-
set
|
|
54489
|
-
|
|
54190
|
+
set sizes(value) {
|
|
54191
|
+
stringAttribute.set(this, "sizes", value);
|
|
54490
54192
|
}
|
|
54491
|
-
get
|
|
54492
|
-
return
|
|
54193
|
+
get type() {
|
|
54194
|
+
return stringAttribute.get(this, "type");
|
|
54493
54195
|
}
|
|
54494
|
-
set
|
|
54495
|
-
|
|
54196
|
+
set type(value) {
|
|
54197
|
+
stringAttribute.set(this, "type", value);
|
|
54496
54198
|
}
|
|
54497
54199
|
/* c8 ignore stop */
|
|
54498
54200
|
};
|
|
54499
|
-
registerHTMLClass(
|
|
54201
|
+
registerHTMLClass(tagName18, HTMLSourceElement);
|
|
54500
54202
|
|
|
54501
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/
|
|
54502
|
-
var
|
|
54503
|
-
constructor(ownerDocument, localName = "
|
|
54203
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/track-element.js
|
|
54204
|
+
var HTMLTrackElement = class extends HTMLElement {
|
|
54205
|
+
constructor(ownerDocument, localName = "track") {
|
|
54504
54206
|
super(ownerDocument, localName);
|
|
54505
54207
|
}
|
|
54506
54208
|
};
|
|
54507
54209
|
|
|
54508
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/
|
|
54509
|
-
var
|
|
54510
|
-
constructor(ownerDocument, localName = "
|
|
54210
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/marquee-element.js
|
|
54211
|
+
var HTMLMarqueeElement = class extends HTMLElement {
|
|
54212
|
+
constructor(ownerDocument, localName = "marquee") {
|
|
54511
54213
|
super(ownerDocument, localName);
|
|
54512
54214
|
}
|
|
54513
54215
|
};
|
|
54514
54216
|
|
|
54515
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html
|
|
54516
|
-
var
|
|
54517
|
-
|
|
54518
|
-
|
|
54519
|
-
|
|
54217
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/shared/html-classes.js
|
|
54218
|
+
var HTMLClasses = {
|
|
54219
|
+
HTMLElement,
|
|
54220
|
+
HTMLTemplateElement,
|
|
54221
|
+
HTMLHtmlElement,
|
|
54222
|
+
HTMLScriptElement,
|
|
54223
|
+
HTMLFrameElement,
|
|
54224
|
+
HTMLIFrameElement,
|
|
54225
|
+
HTMLObjectElement,
|
|
54226
|
+
HTMLHeadElement,
|
|
54227
|
+
HTMLBodyElement,
|
|
54228
|
+
HTMLStyleElement,
|
|
54229
|
+
HTMLTimeElement,
|
|
54230
|
+
HTMLFieldSetElement,
|
|
54231
|
+
HTMLEmbedElement,
|
|
54232
|
+
HTMLHRElement,
|
|
54233
|
+
HTMLProgressElement,
|
|
54234
|
+
HTMLParagraphElement,
|
|
54235
|
+
HTMLTableElement,
|
|
54236
|
+
HTMLFrameSetElement,
|
|
54237
|
+
HTMLLIElement,
|
|
54238
|
+
HTMLBaseElement,
|
|
54239
|
+
HTMLDataListElement,
|
|
54240
|
+
HTMLInputElement,
|
|
54241
|
+
HTMLParamElement,
|
|
54242
|
+
HTMLMediaElement,
|
|
54243
|
+
HTMLAudioElement,
|
|
54244
|
+
HTMLHeadingElement,
|
|
54245
|
+
HTMLDirectoryElement,
|
|
54246
|
+
HTMLQuoteElement,
|
|
54247
|
+
HTMLCanvasElement,
|
|
54248
|
+
HTMLLegendElement,
|
|
54249
|
+
HTMLOptionElement,
|
|
54250
|
+
HTMLSpanElement,
|
|
54251
|
+
HTMLMeterElement,
|
|
54252
|
+
HTMLVideoElement,
|
|
54253
|
+
HTMLTableCellElement,
|
|
54254
|
+
HTMLTitleElement,
|
|
54255
|
+
HTMLOutputElement,
|
|
54256
|
+
HTMLTableRowElement,
|
|
54257
|
+
HTMLDataElement,
|
|
54258
|
+
HTMLMenuElement,
|
|
54259
|
+
HTMLSelectElement,
|
|
54260
|
+
HTMLBRElement,
|
|
54261
|
+
HTMLButtonElement,
|
|
54262
|
+
HTMLMapElement,
|
|
54263
|
+
HTMLOptGroupElement,
|
|
54264
|
+
HTMLDListElement,
|
|
54265
|
+
HTMLTextAreaElement,
|
|
54266
|
+
HTMLFontElement,
|
|
54267
|
+
HTMLDivElement,
|
|
54268
|
+
HTMLLinkElement,
|
|
54269
|
+
HTMLSlotElement,
|
|
54270
|
+
HTMLFormElement,
|
|
54271
|
+
HTMLImageElement,
|
|
54272
|
+
HTMLPreElement,
|
|
54273
|
+
HTMLUListElement,
|
|
54274
|
+
HTMLMetaElement,
|
|
54275
|
+
HTMLPictureElement,
|
|
54276
|
+
HTMLAreaElement,
|
|
54277
|
+
HTMLOListElement,
|
|
54278
|
+
HTMLTableCaptionElement,
|
|
54279
|
+
HTMLAnchorElement,
|
|
54280
|
+
HTMLLabelElement,
|
|
54281
|
+
HTMLUnknownElement,
|
|
54282
|
+
HTMLModElement,
|
|
54283
|
+
HTMLDetailsElement,
|
|
54284
|
+
HTMLSourceElement,
|
|
54285
|
+
HTMLTrackElement,
|
|
54286
|
+
HTMLMarqueeElement
|
|
54287
|
+
};
|
|
54288
|
+
|
|
54289
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/shared/mime.js
|
|
54290
|
+
var voidElements2 = { test: () => true };
|
|
54291
|
+
var Mime = {
|
|
54292
|
+
"text/html": {
|
|
54293
|
+
docType: "<!DOCTYPE html>",
|
|
54294
|
+
ignoreCase: true,
|
|
54295
|
+
voidElements: /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i
|
|
54296
|
+
},
|
|
54297
|
+
"image/svg+xml": {
|
|
54298
|
+
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54299
|
+
ignoreCase: false,
|
|
54300
|
+
voidElements: voidElements2
|
|
54301
|
+
},
|
|
54302
|
+
"text/xml": {
|
|
54303
|
+
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54304
|
+
ignoreCase: false,
|
|
54305
|
+
voidElements: voidElements2
|
|
54306
|
+
},
|
|
54307
|
+
"application/xml": {
|
|
54308
|
+
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54309
|
+
ignoreCase: false,
|
|
54310
|
+
voidElements: voidElements2
|
|
54311
|
+
},
|
|
54312
|
+
"application/xhtml+xml": {
|
|
54313
|
+
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54314
|
+
ignoreCase: false,
|
|
54315
|
+
voidElements: voidElements2
|
|
54520
54316
|
}
|
|
54521
|
-
|
|
54522
|
-
|
|
54523
|
-
|
|
54317
|
+
};
|
|
54318
|
+
|
|
54319
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/custom-event.js
|
|
54320
|
+
var CustomEvent = class extends GlobalEvent {
|
|
54321
|
+
constructor(type, eventInitDict = {}) {
|
|
54322
|
+
super(type, eventInitDict);
|
|
54323
|
+
this.detail = eventInitDict.detail;
|
|
54324
|
+
}
|
|
54325
|
+
};
|
|
54326
|
+
|
|
54327
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/input-event.js
|
|
54328
|
+
var InputEvent = class extends GlobalEvent {
|
|
54329
|
+
constructor(type, inputEventInit = {}) {
|
|
54330
|
+
super(type, inputEventInit);
|
|
54331
|
+
this.inputType = inputEventInit.inputType;
|
|
54332
|
+
this.data = inputEventInit.data;
|
|
54333
|
+
this.dataTransfer = inputEventInit.dataTransfer;
|
|
54334
|
+
this.isComposing = inputEventInit.isComposing || false;
|
|
54335
|
+
this.ranges = inputEventInit.ranges;
|
|
54336
|
+
}
|
|
54337
|
+
};
|
|
54338
|
+
|
|
54339
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/image.js
|
|
54340
|
+
var ImageClass = (ownerDocument) => (
|
|
54341
|
+
/**
|
|
54342
|
+
* @implements globalThis.Image
|
|
54343
|
+
*/
|
|
54344
|
+
class Image extends HTMLImageElement {
|
|
54345
|
+
constructor(width, height) {
|
|
54346
|
+
super(ownerDocument);
|
|
54347
|
+
switch (arguments.length) {
|
|
54348
|
+
case 1:
|
|
54349
|
+
this.height = width;
|
|
54350
|
+
this.width = width;
|
|
54351
|
+
break;
|
|
54352
|
+
case 2:
|
|
54353
|
+
this.height = height;
|
|
54354
|
+
this.width = width;
|
|
54355
|
+
break;
|
|
54356
|
+
}
|
|
54357
|
+
}
|
|
54358
|
+
}
|
|
54359
|
+
);
|
|
54360
|
+
|
|
54361
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/range.js
|
|
54362
|
+
var deleteContents = ({ [START]: start, [END]: end }, fragment = null) => {
|
|
54363
|
+
setAdjacent(start[PREV], end[NEXT]);
|
|
54364
|
+
do {
|
|
54365
|
+
const after2 = getEnd(start);
|
|
54366
|
+
const next = after2 === end ? after2 : after2[NEXT];
|
|
54367
|
+
if (fragment)
|
|
54368
|
+
fragment.insertBefore(start, fragment[END]);
|
|
54369
|
+
else
|
|
54370
|
+
start.remove();
|
|
54371
|
+
start = next;
|
|
54372
|
+
} while (start !== end);
|
|
54373
|
+
};
|
|
54374
|
+
var Range = class _Range {
|
|
54375
|
+
constructor() {
|
|
54376
|
+
this[START] = null;
|
|
54377
|
+
this[END] = null;
|
|
54378
|
+
this.commonAncestorContainer = null;
|
|
54379
|
+
}
|
|
54380
|
+
/* TODO: this is more complicated than it looks
|
|
54381
|
+
setStart(node, offset) {
|
|
54382
|
+
this[START] = node.childNodes[offset];
|
|
54383
|
+
}
|
|
54384
|
+
|
|
54385
|
+
setEnd(node, offset) {
|
|
54386
|
+
this[END] = getEnd(node.childNodes[offset]);
|
|
54387
|
+
}
|
|
54388
|
+
//*/
|
|
54389
|
+
insertNode(newNode) {
|
|
54390
|
+
this[END].parentNode.insertBefore(newNode, this[START]);
|
|
54391
|
+
}
|
|
54392
|
+
selectNode(node) {
|
|
54393
|
+
this[START] = node;
|
|
54394
|
+
this[END] = getEnd(node);
|
|
54395
|
+
}
|
|
54396
|
+
// TODO: SVG elements should then create contextual fragments
|
|
54397
|
+
// that return SVG nodes
|
|
54398
|
+
selectNodeContents(node) {
|
|
54399
|
+
this.selectNode(node);
|
|
54400
|
+
this.commonAncestorContainer = node;
|
|
54401
|
+
}
|
|
54402
|
+
surroundContents(parentNode) {
|
|
54403
|
+
parentNode.replaceChildren(this.extractContents());
|
|
54524
54404
|
}
|
|
54525
|
-
|
|
54526
|
-
|
|
54405
|
+
setStartBefore(node) {
|
|
54406
|
+
this[START] = node;
|
|
54527
54407
|
}
|
|
54528
|
-
|
|
54529
|
-
|
|
54408
|
+
setStartAfter(node) {
|
|
54409
|
+
this[START] = node.nextSibling;
|
|
54530
54410
|
}
|
|
54531
|
-
|
|
54532
|
-
|
|
54411
|
+
setEndBefore(node) {
|
|
54412
|
+
this[END] = getEnd(node.previousSibling);
|
|
54533
54413
|
}
|
|
54534
|
-
|
|
54535
|
-
|
|
54414
|
+
setEndAfter(node) {
|
|
54415
|
+
this[END] = getEnd(node);
|
|
54536
54416
|
}
|
|
54537
|
-
|
|
54538
|
-
|
|
54417
|
+
cloneContents() {
|
|
54418
|
+
let { [START]: start, [END]: end } = this;
|
|
54419
|
+
const fragment = start.ownerDocument.createDocumentFragment();
|
|
54420
|
+
while (start !== end) {
|
|
54421
|
+
fragment.insertBefore(start.cloneNode(true), fragment[END]);
|
|
54422
|
+
start = getEnd(start);
|
|
54423
|
+
if (start !== end)
|
|
54424
|
+
start = start[NEXT];
|
|
54425
|
+
}
|
|
54426
|
+
return fragment;
|
|
54539
54427
|
}
|
|
54540
|
-
|
|
54541
|
-
|
|
54428
|
+
deleteContents() {
|
|
54429
|
+
deleteContents(this);
|
|
54542
54430
|
}
|
|
54543
|
-
|
|
54544
|
-
|
|
54431
|
+
extractContents() {
|
|
54432
|
+
const fragment = this[START].ownerDocument.createDocumentFragment();
|
|
54433
|
+
deleteContents(this, fragment);
|
|
54434
|
+
return fragment;
|
|
54545
54435
|
}
|
|
54546
|
-
|
|
54547
|
-
|
|
54436
|
+
createContextualFragment(html) {
|
|
54437
|
+
const { commonAncestorContainer: doc } = this;
|
|
54438
|
+
const isSVG = "ownerSVGElement" in doc;
|
|
54439
|
+
const document = isSVG ? doc.ownerDocument : doc;
|
|
54440
|
+
let content = htmlToFragment(document, html);
|
|
54441
|
+
if (isSVG) {
|
|
54442
|
+
const childNodes = [...content.childNodes];
|
|
54443
|
+
content = document.createDocumentFragment();
|
|
54444
|
+
Object.setPrototypeOf(content, SVGElement.prototype);
|
|
54445
|
+
content.ownerSVGElement = document;
|
|
54446
|
+
for (const child of childNodes) {
|
|
54447
|
+
Object.setPrototypeOf(child, SVGElement.prototype);
|
|
54448
|
+
child.ownerSVGElement = document;
|
|
54449
|
+
content.appendChild(child);
|
|
54450
|
+
}
|
|
54451
|
+
} else
|
|
54452
|
+
this.selectNode(content);
|
|
54453
|
+
return content;
|
|
54548
54454
|
}
|
|
54549
|
-
|
|
54550
|
-
|
|
54455
|
+
cloneRange() {
|
|
54456
|
+
const range = new _Range();
|
|
54457
|
+
range[START] = this[START];
|
|
54458
|
+
range[END] = this[END];
|
|
54459
|
+
return range;
|
|
54551
54460
|
}
|
|
54552
|
-
/* c8 ignore stop */
|
|
54553
54461
|
};
|
|
54554
|
-
registerHTMLClass(tagName16, HTMLMetaElement);
|
|
54555
54462
|
|
|
54556
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/
|
|
54557
|
-
var
|
|
54558
|
-
|
|
54559
|
-
|
|
54463
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/tree-walker.js
|
|
54464
|
+
var isOK = ({ nodeType }, mask) => {
|
|
54465
|
+
switch (nodeType) {
|
|
54466
|
+
case ELEMENT_NODE:
|
|
54467
|
+
return mask & SHOW_ELEMENT;
|
|
54468
|
+
case TEXT_NODE:
|
|
54469
|
+
return mask & SHOW_TEXT;
|
|
54470
|
+
case COMMENT_NODE:
|
|
54471
|
+
return mask & SHOW_COMMENT;
|
|
54472
|
+
case CDATA_SECTION_NODE:
|
|
54473
|
+
return mask & SHOW_CDATA_SECTION;
|
|
54560
54474
|
}
|
|
54475
|
+
return 0;
|
|
54561
54476
|
};
|
|
54562
|
-
|
|
54563
|
-
|
|
54564
|
-
|
|
54565
|
-
|
|
54566
|
-
|
|
54477
|
+
var TreeWalker = class {
|
|
54478
|
+
constructor(root, whatToShow = SHOW_ALL) {
|
|
54479
|
+
this.root = root;
|
|
54480
|
+
this.currentNode = root;
|
|
54481
|
+
this.whatToShow = whatToShow;
|
|
54482
|
+
let { [NEXT]: next, [END]: end } = root;
|
|
54483
|
+
if (root.nodeType === DOCUMENT_NODE) {
|
|
54484
|
+
const { documentElement } = root;
|
|
54485
|
+
next = documentElement;
|
|
54486
|
+
end = documentElement[END];
|
|
54487
|
+
}
|
|
54488
|
+
const nodes = [];
|
|
54489
|
+
while (next && next !== end) {
|
|
54490
|
+
if (isOK(next, whatToShow))
|
|
54491
|
+
nodes.push(next);
|
|
54492
|
+
next = next[NEXT];
|
|
54493
|
+
}
|
|
54494
|
+
this[PRIVATE] = { i: 0, nodes };
|
|
54567
54495
|
}
|
|
54568
|
-
|
|
54569
|
-
|
|
54570
|
-
|
|
54571
|
-
|
|
54572
|
-
constructor(ownerDocument, localName = "ol") {
|
|
54573
|
-
super(ownerDocument, localName);
|
|
54496
|
+
nextNode() {
|
|
54497
|
+
const $ = this[PRIVATE];
|
|
54498
|
+
this.currentNode = $.i < $.nodes.length ? $.nodes[$.i++] : null;
|
|
54499
|
+
return this.currentNode;
|
|
54574
54500
|
}
|
|
54575
54501
|
};
|
|
54576
54502
|
|
|
54577
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/
|
|
54578
|
-
var
|
|
54579
|
-
|
|
54580
|
-
|
|
54581
|
-
}
|
|
54503
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/document.js
|
|
54504
|
+
var query = (method, ownerDocument, selectors) => {
|
|
54505
|
+
let { [NEXT]: next, [END]: end } = ownerDocument;
|
|
54506
|
+
return method.call({ ownerDocument, [NEXT]: next, [END]: end }, selectors);
|
|
54582
54507
|
};
|
|
54583
|
-
|
|
54584
|
-
|
|
54585
|
-
|
|
54586
|
-
|
|
54587
|
-
|
|
54588
|
-
|
|
54589
|
-
|
|
54590
|
-
|
|
54591
|
-
|
|
54592
|
-
|
|
54593
|
-
|
|
54594
|
-
}
|
|
54595
|
-
set href(value) {
|
|
54596
|
-
stringAttribute.set(this, "href", decodeURI(value));
|
|
54597
|
-
}
|
|
54598
|
-
get download() {
|
|
54599
|
-
return encodeURI(decodeURI(stringAttribute.get(this, "download")));
|
|
54600
|
-
}
|
|
54601
|
-
set download(value) {
|
|
54602
|
-
stringAttribute.set(this, "download", decodeURI(value));
|
|
54603
|
-
}
|
|
54604
|
-
get target() {
|
|
54605
|
-
return stringAttribute.get(this, "target");
|
|
54508
|
+
var globalExports = assign(
|
|
54509
|
+
{},
|
|
54510
|
+
Facades,
|
|
54511
|
+
HTMLClasses,
|
|
54512
|
+
{
|
|
54513
|
+
CustomEvent,
|
|
54514
|
+
Event: GlobalEvent,
|
|
54515
|
+
EventTarget: DOMEventTarget,
|
|
54516
|
+
InputEvent,
|
|
54517
|
+
NamedNodeMap,
|
|
54518
|
+
NodeList
|
|
54606
54519
|
}
|
|
54607
|
-
|
|
54608
|
-
|
|
54520
|
+
);
|
|
54521
|
+
var window2 = /* @__PURE__ */ new WeakMap();
|
|
54522
|
+
var Document2 = class extends NonElementParentNode {
|
|
54523
|
+
constructor(type) {
|
|
54524
|
+
super(null, "#document", DOCUMENT_NODE);
|
|
54525
|
+
this[CUSTOM_ELEMENTS] = { active: false, registry: null };
|
|
54526
|
+
this[MUTATION_OBSERVER] = { active: false, class: null };
|
|
54527
|
+
this[MIME] = Mime[type];
|
|
54528
|
+
this[DOCTYPE] = null;
|
|
54529
|
+
this[DOM_PARSER] = null;
|
|
54530
|
+
this[GLOBALS] = null;
|
|
54531
|
+
this[IMAGE] = null;
|
|
54532
|
+
this[UPGRADE] = null;
|
|
54609
54533
|
}
|
|
54610
|
-
|
|
54611
|
-
|
|
54534
|
+
/**
|
|
54535
|
+
* @type {globalThis.Document['defaultView']}
|
|
54536
|
+
*/
|
|
54537
|
+
get defaultView() {
|
|
54538
|
+
if (!window2.has(this))
|
|
54539
|
+
window2.set(this, new Proxy(globalThis, {
|
|
54540
|
+
set: (target, name, value) => {
|
|
54541
|
+
switch (name) {
|
|
54542
|
+
case "addEventListener":
|
|
54543
|
+
case "removeEventListener":
|
|
54544
|
+
case "dispatchEvent":
|
|
54545
|
+
this[EVENT_TARGET][name] = value;
|
|
54546
|
+
break;
|
|
54547
|
+
default:
|
|
54548
|
+
target[name] = value;
|
|
54549
|
+
break;
|
|
54550
|
+
}
|
|
54551
|
+
return true;
|
|
54552
|
+
},
|
|
54553
|
+
get: (globalThis2, name) => {
|
|
54554
|
+
switch (name) {
|
|
54555
|
+
case "addEventListener":
|
|
54556
|
+
case "removeEventListener":
|
|
54557
|
+
case "dispatchEvent":
|
|
54558
|
+
if (!this[EVENT_TARGET]) {
|
|
54559
|
+
const et = this[EVENT_TARGET] = new DOMEventTarget();
|
|
54560
|
+
et.dispatchEvent = et.dispatchEvent.bind(et);
|
|
54561
|
+
et.addEventListener = et.addEventListener.bind(et);
|
|
54562
|
+
et.removeEventListener = et.removeEventListener.bind(et);
|
|
54563
|
+
}
|
|
54564
|
+
return this[EVENT_TARGET][name];
|
|
54565
|
+
case "document":
|
|
54566
|
+
return this;
|
|
54567
|
+
/* c8 ignore start */
|
|
54568
|
+
case "navigator":
|
|
54569
|
+
return {
|
|
54570
|
+
userAgent: "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/88.0.4324.150 Safari/537.36"
|
|
54571
|
+
};
|
|
54572
|
+
/* c8 ignore stop */
|
|
54573
|
+
case "window":
|
|
54574
|
+
return window2.get(this);
|
|
54575
|
+
case "customElements":
|
|
54576
|
+
if (!this[CUSTOM_ELEMENTS].registry)
|
|
54577
|
+
this[CUSTOM_ELEMENTS] = new CustomElementRegistry(this);
|
|
54578
|
+
return this[CUSTOM_ELEMENTS];
|
|
54579
|
+
case "performance":
|
|
54580
|
+
return globalThis2.performance;
|
|
54581
|
+
case "DOMParser":
|
|
54582
|
+
return this[DOM_PARSER];
|
|
54583
|
+
case "Image":
|
|
54584
|
+
if (!this[IMAGE])
|
|
54585
|
+
this[IMAGE] = ImageClass(this);
|
|
54586
|
+
return this[IMAGE];
|
|
54587
|
+
case "MutationObserver":
|
|
54588
|
+
if (!this[MUTATION_OBSERVER].class)
|
|
54589
|
+
this[MUTATION_OBSERVER] = new MutationObserverClass(this);
|
|
54590
|
+
return this[MUTATION_OBSERVER].class;
|
|
54591
|
+
}
|
|
54592
|
+
return this[GLOBALS] && this[GLOBALS][name] || globalExports[name] || globalThis2[name];
|
|
54593
|
+
}
|
|
54594
|
+
}));
|
|
54595
|
+
return window2.get(this);
|
|
54612
54596
|
}
|
|
54613
|
-
|
|
54614
|
-
|
|
54597
|
+
get doctype() {
|
|
54598
|
+
const docType = this[DOCTYPE];
|
|
54599
|
+
if (docType)
|
|
54600
|
+
return docType;
|
|
54601
|
+
const { firstChild } = this;
|
|
54602
|
+
if (firstChild && firstChild.nodeType === DOCUMENT_TYPE_NODE)
|
|
54603
|
+
return this[DOCTYPE] = firstChild;
|
|
54604
|
+
return null;
|
|
54615
54605
|
}
|
|
54616
|
-
|
|
54617
|
-
|
|
54606
|
+
set doctype(value) {
|
|
54607
|
+
if (/^([a-z:]+)(\s+system|\s+public(\s+"([^"]+)")?)?(\s+"([^"]+)")?/i.test(value)) {
|
|
54608
|
+
const { $1: name, $4: publicId, $6: systemId } = RegExp;
|
|
54609
|
+
this[DOCTYPE] = new DocumentType(this, name, publicId, systemId);
|
|
54610
|
+
knownSiblings(this, this[DOCTYPE], this[NEXT]);
|
|
54611
|
+
}
|
|
54618
54612
|
}
|
|
54619
|
-
|
|
54620
|
-
|
|
54613
|
+
get documentElement() {
|
|
54614
|
+
return this.firstElementChild;
|
|
54621
54615
|
}
|
|
54622
|
-
|
|
54623
|
-
|
|
54624
|
-
registerHTMLClass(tagName17, HTMLAnchorElement);
|
|
54625
|
-
|
|
54626
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/label-element.js
|
|
54627
|
-
var HTMLLabelElement = class extends HTMLElement {
|
|
54628
|
-
constructor(ownerDocument, localName = "label") {
|
|
54629
|
-
super(ownerDocument, localName);
|
|
54616
|
+
get isConnected() {
|
|
54617
|
+
return true;
|
|
54630
54618
|
}
|
|
54631
|
-
|
|
54632
|
-
|
|
54633
|
-
|
|
54634
|
-
|
|
54635
|
-
|
|
54636
|
-
super(ownerDocument, localName);
|
|
54619
|
+
/**
|
|
54620
|
+
* @protected
|
|
54621
|
+
*/
|
|
54622
|
+
_getParent() {
|
|
54623
|
+
return this[EVENT_TARGET];
|
|
54637
54624
|
}
|
|
54638
|
-
|
|
54639
|
-
|
|
54640
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/mod-element.js
|
|
54641
|
-
var HTMLModElement = class extends HTMLElement {
|
|
54642
|
-
constructor(ownerDocument, localName = "mod") {
|
|
54643
|
-
super(ownerDocument, localName);
|
|
54625
|
+
createAttribute(name) {
|
|
54626
|
+
return new Attr(this, name);
|
|
54644
54627
|
}
|
|
54645
|
-
|
|
54646
|
-
|
|
54647
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/details-element.js
|
|
54648
|
-
var HTMLDetailsElement = class extends HTMLElement {
|
|
54649
|
-
constructor(ownerDocument, localName = "details") {
|
|
54650
|
-
super(ownerDocument, localName);
|
|
54628
|
+
createCDATASection(data2) {
|
|
54629
|
+
return new CDATASection(this, data2);
|
|
54651
54630
|
}
|
|
54652
|
-
|
|
54653
|
-
|
|
54654
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/source-element.js
|
|
54655
|
-
var tagName18 = "source";
|
|
54656
|
-
var HTMLSourceElement = class extends HTMLElement {
|
|
54657
|
-
constructor(ownerDocument, localName = tagName18) {
|
|
54658
|
-
super(ownerDocument, localName);
|
|
54631
|
+
createComment(textContent2) {
|
|
54632
|
+
return new Comment3(this, textContent2);
|
|
54659
54633
|
}
|
|
54660
|
-
|
|
54661
|
-
|
|
54662
|
-
return stringAttribute.get(this, "src");
|
|
54634
|
+
createDocumentFragment() {
|
|
54635
|
+
return new DocumentFragment(this);
|
|
54663
54636
|
}
|
|
54664
|
-
|
|
54665
|
-
|
|
54637
|
+
createDocumentType(name, publicId, systemId) {
|
|
54638
|
+
return new DocumentType(this, name, publicId, systemId);
|
|
54666
54639
|
}
|
|
54667
|
-
|
|
54668
|
-
return
|
|
54640
|
+
createElement(localName) {
|
|
54641
|
+
return new Element2(this, localName);
|
|
54669
54642
|
}
|
|
54670
|
-
|
|
54671
|
-
|
|
54643
|
+
createRange() {
|
|
54644
|
+
const range = new Range();
|
|
54645
|
+
range.commonAncestorContainer = this;
|
|
54646
|
+
return range;
|
|
54672
54647
|
}
|
|
54673
|
-
|
|
54674
|
-
return
|
|
54648
|
+
createTextNode(textContent2) {
|
|
54649
|
+
return new Text3(this, textContent2);
|
|
54675
54650
|
}
|
|
54676
|
-
|
|
54677
|
-
|
|
54651
|
+
createTreeWalker(root, whatToShow = -1) {
|
|
54652
|
+
return new TreeWalker(root, whatToShow);
|
|
54678
54653
|
}
|
|
54679
|
-
|
|
54680
|
-
return
|
|
54654
|
+
createNodeIterator(root, whatToShow = -1) {
|
|
54655
|
+
return this.createTreeWalker(root, whatToShow);
|
|
54681
54656
|
}
|
|
54682
|
-
|
|
54683
|
-
|
|
54657
|
+
createEvent(name) {
|
|
54658
|
+
const event = create(name === "Event" ? new GlobalEvent("") : new CustomEvent(""));
|
|
54659
|
+
event.initEvent = event.initCustomEvent = (type, canBubble = false, cancelable = false, detail) => {
|
|
54660
|
+
event.bubbles = !!canBubble;
|
|
54661
|
+
defineProperties(event, {
|
|
54662
|
+
type: { value: type },
|
|
54663
|
+
canBubble: { value: canBubble },
|
|
54664
|
+
cancelable: { value: cancelable },
|
|
54665
|
+
detail: { value: detail }
|
|
54666
|
+
});
|
|
54667
|
+
};
|
|
54668
|
+
return event;
|
|
54684
54669
|
}
|
|
54685
|
-
|
|
54686
|
-
|
|
54687
|
-
|
|
54688
|
-
|
|
54689
|
-
|
|
54690
|
-
|
|
54691
|
-
|
|
54692
|
-
|
|
54670
|
+
cloneNode(deep = false) {
|
|
54671
|
+
const {
|
|
54672
|
+
constructor,
|
|
54673
|
+
[CUSTOM_ELEMENTS]: customElements2,
|
|
54674
|
+
[DOCTYPE]: doctype
|
|
54675
|
+
} = this;
|
|
54676
|
+
const document = new constructor();
|
|
54677
|
+
document[CUSTOM_ELEMENTS] = customElements2;
|
|
54678
|
+
if (deep) {
|
|
54679
|
+
const end = document[END];
|
|
54680
|
+
const { childNodes } = this;
|
|
54681
|
+
for (let { length } = childNodes, i = 0; i < length; i++)
|
|
54682
|
+
document.insertBefore(childNodes[i].cloneNode(true), end);
|
|
54683
|
+
if (doctype)
|
|
54684
|
+
document[DOCTYPE] = childNodes[0];
|
|
54685
|
+
}
|
|
54686
|
+
return document;
|
|
54693
54687
|
}
|
|
54694
|
-
|
|
54695
|
-
|
|
54696
|
-
|
|
54697
|
-
|
|
54698
|
-
|
|
54699
|
-
|
|
54688
|
+
importNode(externalNode) {
|
|
54689
|
+
const deep = 1 < arguments.length && !!arguments[1];
|
|
54690
|
+
const node = externalNode.cloneNode(deep);
|
|
54691
|
+
const { [CUSTOM_ELEMENTS]: customElements2 } = this;
|
|
54692
|
+
const { active } = customElements2;
|
|
54693
|
+
const upgrade = (element) => {
|
|
54694
|
+
const { ownerDocument, nodeType } = element;
|
|
54695
|
+
element.ownerDocument = this;
|
|
54696
|
+
if (active && ownerDocument !== this && nodeType === ELEMENT_NODE)
|
|
54697
|
+
customElements2.upgrade(element);
|
|
54698
|
+
};
|
|
54699
|
+
upgrade(node);
|
|
54700
|
+
if (deep) {
|
|
54701
|
+
switch (node.nodeType) {
|
|
54702
|
+
case ELEMENT_NODE:
|
|
54703
|
+
case DOCUMENT_FRAGMENT_NODE: {
|
|
54704
|
+
let { [NEXT]: next, [END]: end } = node;
|
|
54705
|
+
while (next !== end) {
|
|
54706
|
+
if (next.nodeType === ELEMENT_NODE)
|
|
54707
|
+
upgrade(next);
|
|
54708
|
+
next = next[NEXT];
|
|
54709
|
+
}
|
|
54710
|
+
break;
|
|
54711
|
+
}
|
|
54712
|
+
}
|
|
54713
|
+
}
|
|
54714
|
+
return node;
|
|
54700
54715
|
}
|
|
54701
|
-
|
|
54702
|
-
|
|
54703
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/shared/html-classes.js
|
|
54704
|
-
var HTMLClasses = {
|
|
54705
|
-
HTMLElement,
|
|
54706
|
-
HTMLTemplateElement,
|
|
54707
|
-
HTMLHtmlElement,
|
|
54708
|
-
HTMLScriptElement,
|
|
54709
|
-
HTMLFrameElement,
|
|
54710
|
-
HTMLIFrameElement,
|
|
54711
|
-
HTMLObjectElement,
|
|
54712
|
-
HTMLHeadElement,
|
|
54713
|
-
HTMLBodyElement,
|
|
54714
|
-
HTMLStyleElement,
|
|
54715
|
-
HTMLTimeElement,
|
|
54716
|
-
HTMLFieldSetElement,
|
|
54717
|
-
HTMLEmbedElement,
|
|
54718
|
-
HTMLHRElement,
|
|
54719
|
-
HTMLProgressElement,
|
|
54720
|
-
HTMLParagraphElement,
|
|
54721
|
-
HTMLTableElement,
|
|
54722
|
-
HTMLFrameSetElement,
|
|
54723
|
-
HTMLLIElement,
|
|
54724
|
-
HTMLBaseElement,
|
|
54725
|
-
HTMLDataListElement,
|
|
54726
|
-
HTMLInputElement,
|
|
54727
|
-
HTMLParamElement,
|
|
54728
|
-
HTMLMediaElement,
|
|
54729
|
-
HTMLAudioElement,
|
|
54730
|
-
HTMLHeadingElement,
|
|
54731
|
-
HTMLDirectoryElement,
|
|
54732
|
-
HTMLQuoteElement,
|
|
54733
|
-
HTMLCanvasElement,
|
|
54734
|
-
HTMLLegendElement,
|
|
54735
|
-
HTMLOptionElement,
|
|
54736
|
-
HTMLSpanElement,
|
|
54737
|
-
HTMLMeterElement,
|
|
54738
|
-
HTMLVideoElement,
|
|
54739
|
-
HTMLTableCellElement,
|
|
54740
|
-
HTMLTitleElement,
|
|
54741
|
-
HTMLOutputElement,
|
|
54742
|
-
HTMLTableRowElement,
|
|
54743
|
-
HTMLDataElement,
|
|
54744
|
-
HTMLMenuElement,
|
|
54745
|
-
HTMLSelectElement,
|
|
54746
|
-
HTMLBRElement,
|
|
54747
|
-
HTMLButtonElement,
|
|
54748
|
-
HTMLMapElement,
|
|
54749
|
-
HTMLOptGroupElement,
|
|
54750
|
-
HTMLDListElement,
|
|
54751
|
-
HTMLTextAreaElement,
|
|
54752
|
-
HTMLFontElement,
|
|
54753
|
-
HTMLDivElement,
|
|
54754
|
-
HTMLLinkElement,
|
|
54755
|
-
HTMLSlotElement,
|
|
54756
|
-
HTMLFormElement,
|
|
54757
|
-
HTMLImageElement,
|
|
54758
|
-
HTMLPreElement,
|
|
54759
|
-
HTMLUListElement,
|
|
54760
|
-
HTMLMetaElement,
|
|
54761
|
-
HTMLPictureElement,
|
|
54762
|
-
HTMLAreaElement,
|
|
54763
|
-
HTMLOListElement,
|
|
54764
|
-
HTMLTableCaptionElement,
|
|
54765
|
-
HTMLAnchorElement,
|
|
54766
|
-
HTMLLabelElement,
|
|
54767
|
-
HTMLUnknownElement,
|
|
54768
|
-
HTMLModElement,
|
|
54769
|
-
HTMLDetailsElement,
|
|
54770
|
-
HTMLSourceElement,
|
|
54771
|
-
HTMLTrackElement,
|
|
54772
|
-
HTMLMarqueeElement
|
|
54773
|
-
};
|
|
54774
|
-
|
|
54775
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/shared/mime.js
|
|
54776
|
-
var voidElements2 = { test: () => true };
|
|
54777
|
-
var Mime = {
|
|
54778
|
-
"text/html": {
|
|
54779
|
-
docType: "<!DOCTYPE html>",
|
|
54780
|
-
ignoreCase: true,
|
|
54781
|
-
voidElements: /^(?:area|base|br|col|embed|hr|img|input|keygen|link|menuitem|meta|param|source|track|wbr)$/i
|
|
54782
|
-
},
|
|
54783
|
-
"image/svg+xml": {
|
|
54784
|
-
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54785
|
-
ignoreCase: false,
|
|
54786
|
-
voidElements: voidElements2
|
|
54787
|
-
},
|
|
54788
|
-
"text/xml": {
|
|
54789
|
-
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54790
|
-
ignoreCase: false,
|
|
54791
|
-
voidElements: voidElements2
|
|
54792
|
-
},
|
|
54793
|
-
"application/xml": {
|
|
54794
|
-
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54795
|
-
ignoreCase: false,
|
|
54796
|
-
voidElements: voidElements2
|
|
54797
|
-
},
|
|
54798
|
-
"application/xhtml+xml": {
|
|
54799
|
-
docType: '<?xml version="1.0" encoding="utf-8"?>',
|
|
54800
|
-
ignoreCase: false,
|
|
54801
|
-
voidElements: voidElements2
|
|
54716
|
+
toString() {
|
|
54717
|
+
return this.childNodes.join("");
|
|
54802
54718
|
}
|
|
54803
|
-
|
|
54804
|
-
|
|
54805
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/custom-event.js
|
|
54806
|
-
var CustomEvent = class extends GlobalEvent {
|
|
54807
|
-
constructor(type, eventInitDict = {}) {
|
|
54808
|
-
super(type, eventInitDict);
|
|
54809
|
-
this.detail = eventInitDict.detail;
|
|
54719
|
+
querySelector(selectors) {
|
|
54720
|
+
return query(super.querySelector, this, selectors);
|
|
54810
54721
|
}
|
|
54811
|
-
|
|
54812
|
-
|
|
54813
|
-
|
|
54814
|
-
|
|
54815
|
-
|
|
54816
|
-
|
|
54817
|
-
|
|
54818
|
-
|
|
54819
|
-
this.
|
|
54820
|
-
|
|
54821
|
-
|
|
54722
|
+
querySelectorAll(selectors) {
|
|
54723
|
+
return query(super.querySelectorAll, this, selectors);
|
|
54724
|
+
}
|
|
54725
|
+
/* c8 ignore start */
|
|
54726
|
+
getElementsByTagNameNS(_, name) {
|
|
54727
|
+
return this.getElementsByTagName(name);
|
|
54728
|
+
}
|
|
54729
|
+
createAttributeNS(_, name) {
|
|
54730
|
+
return this.createAttribute(name);
|
|
54731
|
+
}
|
|
54732
|
+
createElementNS(nsp, localName, options) {
|
|
54733
|
+
return nsp === SVG_NAMESPACE ? new SVGElement(this, localName, null) : this.createElement(localName, options);
|
|
54822
54734
|
}
|
|
54735
|
+
/* c8 ignore stop */
|
|
54823
54736
|
};
|
|
54737
|
+
setPrototypeOf(
|
|
54738
|
+
globalExports.Document = function Document3() {
|
|
54739
|
+
illegalConstructor();
|
|
54740
|
+
},
|
|
54741
|
+
Document2
|
|
54742
|
+
).prototype = Document2.prototype;
|
|
54824
54743
|
|
|
54825
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/
|
|
54826
|
-
var
|
|
54827
|
-
|
|
54828
|
-
|
|
54829
|
-
|
|
54830
|
-
|
|
54831
|
-
|
|
54832
|
-
|
|
54833
|
-
|
|
54834
|
-
|
|
54835
|
-
|
|
54836
|
-
|
|
54837
|
-
|
|
54838
|
-
|
|
54839
|
-
this.height = height;
|
|
54840
|
-
this.width = width;
|
|
54841
|
-
break;
|
|
54842
|
-
}
|
|
54744
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/document.js
|
|
54745
|
+
var createHTMLElement = (ownerDocument, builtin, localName, options) => {
|
|
54746
|
+
if (!builtin && htmlClasses.has(localName)) {
|
|
54747
|
+
const Class = htmlClasses.get(localName);
|
|
54748
|
+
return new Class(ownerDocument, localName);
|
|
54749
|
+
}
|
|
54750
|
+
const { [CUSTOM_ELEMENTS]: { active, registry } } = ownerDocument;
|
|
54751
|
+
if (active) {
|
|
54752
|
+
const ce = builtin ? options.is : localName;
|
|
54753
|
+
if (registry.has(ce)) {
|
|
54754
|
+
const { Class } = registry.get(ce);
|
|
54755
|
+
const element = new Class(ownerDocument, localName);
|
|
54756
|
+
customElements.set(element, { connected: false });
|
|
54757
|
+
return element;
|
|
54843
54758
|
}
|
|
54844
54759
|
}
|
|
54845
|
-
);
|
|
54846
|
-
|
|
54847
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/interface/range.js
|
|
54848
|
-
var deleteContents = ({ [START]: start, [END]: end }, fragment = null) => {
|
|
54849
|
-
setAdjacent(start[PREV], end[NEXT]);
|
|
54850
|
-
do {
|
|
54851
|
-
const after2 = getEnd(start);
|
|
54852
|
-
const next = after2 === end ? after2 : after2[NEXT];
|
|
54853
|
-
if (fragment)
|
|
54854
|
-
fragment.insertBefore(start, fragment[END]);
|
|
54855
|
-
else
|
|
54856
|
-
start.remove();
|
|
54857
|
-
start = next;
|
|
54858
|
-
} while (start !== end);
|
|
54760
|
+
return new HTMLElement(ownerDocument, localName);
|
|
54859
54761
|
};
|
|
54860
|
-
var
|
|
54762
|
+
var HTMLDocument = class extends Document2 {
|
|
54861
54763
|
constructor() {
|
|
54862
|
-
|
|
54863
|
-
this[END] = null;
|
|
54864
|
-
this.commonAncestorContainer = null;
|
|
54764
|
+
super("text/html");
|
|
54865
54765
|
}
|
|
54866
|
-
|
|
54867
|
-
|
|
54868
|
-
|
|
54766
|
+
get all() {
|
|
54767
|
+
const nodeList = new NodeList();
|
|
54768
|
+
let { [NEXT]: next, [END]: end } = this;
|
|
54769
|
+
while (next !== end) {
|
|
54770
|
+
switch (next.nodeType) {
|
|
54771
|
+
case ELEMENT_NODE:
|
|
54772
|
+
nodeList.push(next);
|
|
54773
|
+
break;
|
|
54774
|
+
}
|
|
54775
|
+
next = next[NEXT];
|
|
54869
54776
|
}
|
|
54870
|
-
|
|
54871
|
-
|
|
54872
|
-
|
|
54777
|
+
return nodeList;
|
|
54778
|
+
}
|
|
54779
|
+
/**
|
|
54780
|
+
* @type HTMLHeadElement
|
|
54781
|
+
*/
|
|
54782
|
+
get head() {
|
|
54783
|
+
const { documentElement } = this;
|
|
54784
|
+
let { firstElementChild } = documentElement;
|
|
54785
|
+
if (!firstElementChild || firstElementChild.tagName !== "HEAD") {
|
|
54786
|
+
firstElementChild = this.createElement("head");
|
|
54787
|
+
documentElement.prepend(firstElementChild);
|
|
54873
54788
|
}
|
|
54874
|
-
|
|
54875
|
-
insertNode(newNode) {
|
|
54876
|
-
this[END].parentNode.insertBefore(newNode, this[START]);
|
|
54789
|
+
return firstElementChild;
|
|
54877
54790
|
}
|
|
54878
|
-
|
|
54879
|
-
|
|
54880
|
-
|
|
54791
|
+
/**
|
|
54792
|
+
* @type HTMLBodyElement
|
|
54793
|
+
*/
|
|
54794
|
+
get body() {
|
|
54795
|
+
const { head } = this;
|
|
54796
|
+
let { nextElementSibling: nextElementSibling3 } = head;
|
|
54797
|
+
if (!nextElementSibling3 || nextElementSibling3.tagName !== "BODY") {
|
|
54798
|
+
nextElementSibling3 = this.createElement("body");
|
|
54799
|
+
head.after(nextElementSibling3);
|
|
54800
|
+
}
|
|
54801
|
+
return nextElementSibling3;
|
|
54881
54802
|
}
|
|
54882
|
-
|
|
54883
|
-
|
|
54884
|
-
|
|
54885
|
-
|
|
54886
|
-
|
|
54803
|
+
/**
|
|
54804
|
+
* @type HTMLTitleElement
|
|
54805
|
+
*/
|
|
54806
|
+
get title() {
|
|
54807
|
+
const { head } = this;
|
|
54808
|
+
return head.getElementsByTagName("title").at(0)?.textContent || "";
|
|
54887
54809
|
}
|
|
54888
|
-
|
|
54889
|
-
|
|
54810
|
+
set title(textContent2) {
|
|
54811
|
+
const { head } = this;
|
|
54812
|
+
let title = head.getElementsByTagName("title").at(0);
|
|
54813
|
+
if (title)
|
|
54814
|
+
title.textContent = textContent2;
|
|
54815
|
+
else {
|
|
54816
|
+
head.insertBefore(
|
|
54817
|
+
this.createElement("title"),
|
|
54818
|
+
head.firstChild
|
|
54819
|
+
).textContent = textContent2;
|
|
54820
|
+
}
|
|
54890
54821
|
}
|
|
54891
|
-
|
|
54892
|
-
|
|
54822
|
+
createElement(localName, options) {
|
|
54823
|
+
const builtin = !!(options && options.is);
|
|
54824
|
+
const element = createHTMLElement(this, builtin, localName, options);
|
|
54825
|
+
if (builtin)
|
|
54826
|
+
element.setAttribute("is", options.is);
|
|
54827
|
+
return element;
|
|
54893
54828
|
}
|
|
54894
|
-
|
|
54895
|
-
|
|
54829
|
+
};
|
|
54830
|
+
|
|
54831
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/svg/document.js
|
|
54832
|
+
var SVGDocument = class extends Document2 {
|
|
54833
|
+
constructor() {
|
|
54834
|
+
super("image/svg+xml");
|
|
54896
54835
|
}
|
|
54897
|
-
|
|
54898
|
-
this[
|
|
54836
|
+
toString() {
|
|
54837
|
+
return this[MIME].docType + super.toString();
|
|
54899
54838
|
}
|
|
54900
|
-
|
|
54901
|
-
|
|
54839
|
+
};
|
|
54840
|
+
|
|
54841
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/xml/document.js
|
|
54842
|
+
var XMLDocument = class extends Document2 {
|
|
54843
|
+
constructor() {
|
|
54844
|
+
super("text/xml");
|
|
54902
54845
|
}
|
|
54903
|
-
|
|
54904
|
-
|
|
54905
|
-
|
|
54906
|
-
|
|
54907
|
-
|
|
54908
|
-
|
|
54909
|
-
|
|
54910
|
-
|
|
54911
|
-
|
|
54912
|
-
|
|
54846
|
+
toString() {
|
|
54847
|
+
return this[MIME].docType + super.toString();
|
|
54848
|
+
}
|
|
54849
|
+
};
|
|
54850
|
+
|
|
54851
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/dom/parser.js
|
|
54852
|
+
var DOMParser2 = class _DOMParser {
|
|
54853
|
+
/** @typedef {{ "text/html": HTMLDocument, "image/svg+xml": SVGDocument, "text/xml": XMLDocument }} MimeToDoc */
|
|
54854
|
+
/**
|
|
54855
|
+
* @template {keyof MimeToDoc} MIME
|
|
54856
|
+
* @param {string} markupLanguage
|
|
54857
|
+
* @param {MIME} mimeType
|
|
54858
|
+
* @returns {MimeToDoc[MIME]}
|
|
54859
|
+
*/
|
|
54860
|
+
parseFromString(markupLanguage, mimeType, globals = null) {
|
|
54861
|
+
let isHTML = false, document;
|
|
54862
|
+
if (mimeType === "text/html") {
|
|
54863
|
+
isHTML = true;
|
|
54864
|
+
document = new HTMLDocument();
|
|
54865
|
+
} else if (mimeType === "image/svg+xml")
|
|
54866
|
+
document = new SVGDocument();
|
|
54867
|
+
else
|
|
54868
|
+
document = new XMLDocument();
|
|
54869
|
+
document[DOM_PARSER] = _DOMParser;
|
|
54870
|
+
if (globals)
|
|
54871
|
+
document[GLOBALS] = globals;
|
|
54872
|
+
if (isHTML && markupLanguage === "...")
|
|
54873
|
+
markupLanguage = "<!doctype html><html><head></head><body></body></html>";
|
|
54874
|
+
return markupLanguage ? parseFromString(document, isHTML, markupLanguage) : document;
|
|
54875
|
+
}
|
|
54876
|
+
};
|
|
54877
|
+
|
|
54878
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/shared/parse-json.js
|
|
54879
|
+
var { parse: parse7 } = JSON;
|
|
54880
|
+
|
|
54881
|
+
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/index.js
|
|
54882
|
+
var parseHTML = (html, globals = null) => new DOMParser2().parseFromString(
|
|
54883
|
+
html,
|
|
54884
|
+
"text/html",
|
|
54885
|
+
globals
|
|
54886
|
+
).defaultView;
|
|
54887
|
+
function Document4() {
|
|
54888
|
+
illegalConstructor();
|
|
54889
|
+
}
|
|
54890
|
+
setPrototypeOf(Document4, Document2).prototype = Document2.prototype;
|
|
54891
|
+
|
|
54892
|
+
// ../parsers/dist/index.js
|
|
54893
|
+
init_walk();
|
|
54894
|
+
init_acorn();
|
|
54895
|
+
init_acorn();
|
|
54896
|
+
init_walk();
|
|
54897
|
+
init_acorn();
|
|
54898
|
+
init_walk();
|
|
54899
|
+
var CANVAS_DIMENSIONS = {
|
|
54900
|
+
landscape: { width: 1920, height: 1080 },
|
|
54901
|
+
portrait: { width: 1080, height: 1920 },
|
|
54902
|
+
"landscape-4k": { width: 3840, height: 2160 },
|
|
54903
|
+
"portrait-4k": { width: 2160, height: 3840 },
|
|
54904
|
+
square: { width: 1080, height: 1080 },
|
|
54905
|
+
"square-4k": { width: 2160, height: 2160 }
|
|
54906
|
+
};
|
|
54907
|
+
var VALID_CANVAS_RESOLUTIONS = Object.keys(
|
|
54908
|
+
CANVAS_DIMENSIONS
|
|
54909
|
+
);
|
|
54910
|
+
var PROPERTY_GROUPS = {
|
|
54911
|
+
position: /* @__PURE__ */ new Set(["x", "y", "xPercent", "yPercent"]),
|
|
54912
|
+
scale: /* @__PURE__ */ new Set(["scale", "scaleX", "scaleY"]),
|
|
54913
|
+
size: /* @__PURE__ */ new Set(["width", "height"]),
|
|
54914
|
+
rotation: /* @__PURE__ */ new Set(["rotation", "skewX", "skewY"]),
|
|
54915
|
+
visual: /* @__PURE__ */ new Set(["opacity", "autoAlpha"]),
|
|
54916
|
+
other: /* @__PURE__ */ new Set()
|
|
54917
|
+
};
|
|
54918
|
+
var PROP_TO_GROUP = /* @__PURE__ */ new Map();
|
|
54919
|
+
for (const [group, props] of Object.entries(PROPERTY_GROUPS)) {
|
|
54920
|
+
for (const p of props) PROP_TO_GROUP.set(p, group);
|
|
54921
|
+
}
|
|
54922
|
+
var COMPOSITION_ATTRIBUTES = Object.freeze({
|
|
54923
|
+
start: "data-start",
|
|
54924
|
+
duration: "data-duration",
|
|
54925
|
+
trackIndex: "data-track-index",
|
|
54926
|
+
derivedEnd: "data-end",
|
|
54927
|
+
legacyTrack: "data-layer"
|
|
54928
|
+
});
|
|
54929
|
+
var CANONICAL_AUTHORED_TIMING_ATTRIBUTES = Object.freeze([
|
|
54930
|
+
COMPOSITION_ATTRIBUTES.start,
|
|
54931
|
+
COMPOSITION_ATTRIBUTES.duration,
|
|
54932
|
+
COMPOSITION_ATTRIBUTES.trackIndex
|
|
54933
|
+
]);
|
|
54934
|
+
var DERIVED_TIMING_ATTRIBUTES = Object.freeze([
|
|
54935
|
+
COMPOSITION_ATTRIBUTES.derivedEnd
|
|
54936
|
+
]);
|
|
54937
|
+
var LEGACY_TIMING_ATTRIBUTES = Object.freeze([
|
|
54938
|
+
COMPOSITION_ATTRIBUTES.derivedEnd,
|
|
54939
|
+
COMPOSITION_ATTRIBUTES.legacyTrack
|
|
54940
|
+
]);
|
|
54941
|
+
var HTML_BODY_CSS_WIDTH_FIRST_RE = /html\s*,\s*body\s*\{[^}]*?width:\s*(\d+)px[^}]*?height:\s*(\d+)px/i;
|
|
54942
|
+
var HTML_BODY_CSS_HEIGHT_FIRST_RE = /html\s*,\s*body\s*\{[^}]*?height:\s*(\d+)px[^}]*?width:\s*(\d+)px/i;
|
|
54943
|
+
var VIEWPORT_META_SIZE_RE = /<meta[^>]*name=["']viewport["'][^>]*content=["']width=(\d+),\s*height=(\d+)/i;
|
|
54944
|
+
function parseProgram2(script) {
|
|
54945
|
+
try {
|
|
54946
|
+
return parse3(script, { ecmaVersion: "latest", sourceType: "script" });
|
|
54947
|
+
} catch {
|
|
54948
|
+
return parse3(script, { ecmaVersion: "latest", sourceType: "module" });
|
|
54913
54949
|
}
|
|
54914
|
-
|
|
54915
|
-
|
|
54950
|
+
}
|
|
54951
|
+
function literalString(node) {
|
|
54952
|
+
if (node?.type === "Literal" && typeof node.value === "string") return node.value;
|
|
54953
|
+
if (node?.type === "TemplateLiteral" && node.expressions?.length === 0) {
|
|
54954
|
+
return node.quasis?.[0]?.value?.cooked;
|
|
54916
54955
|
}
|
|
54917
|
-
|
|
54918
|
-
|
|
54919
|
-
|
|
54920
|
-
|
|
54956
|
+
return void 0;
|
|
54957
|
+
}
|
|
54958
|
+
function memberName(node) {
|
|
54959
|
+
if (node?.type !== "MemberExpression") return void 0;
|
|
54960
|
+
if (!node.computed && node.property?.type === "Identifier") return node.property.name;
|
|
54961
|
+
return literalString(node.property);
|
|
54962
|
+
}
|
|
54963
|
+
function lookupSelector(node, bindings) {
|
|
54964
|
+
if (node?.type === "Identifier") return bindings.get(node.name);
|
|
54965
|
+
if (node?.type !== "CallExpression" || node.callee?.type !== "MemberExpression") {
|
|
54966
|
+
return void 0;
|
|
54921
54967
|
}
|
|
54922
|
-
|
|
54923
|
-
|
|
54924
|
-
|
|
54925
|
-
|
|
54926
|
-
|
|
54927
|
-
|
|
54928
|
-
|
|
54929
|
-
|
|
54930
|
-
|
|
54931
|
-
|
|
54932
|
-
|
|
54933
|
-
|
|
54934
|
-
|
|
54935
|
-
|
|
54968
|
+
const method = memberName(node.callee);
|
|
54969
|
+
if (method !== "getElementById" && method !== "querySelector") return void 0;
|
|
54970
|
+
const value = literalString(node.arguments?.[0]);
|
|
54971
|
+
if (!value) return void 0;
|
|
54972
|
+
return method === "getElementById" ? `#${value}` : value;
|
|
54973
|
+
}
|
|
54974
|
+
function extractMediaSrcMutations(script) {
|
|
54975
|
+
try {
|
|
54976
|
+
const ast = parseProgram2(script);
|
|
54977
|
+
const bindings = /* @__PURE__ */ new Map();
|
|
54978
|
+
simple(ast, {
|
|
54979
|
+
VariableDeclarator(node) {
|
|
54980
|
+
if (node.id?.type !== "Identifier") return;
|
|
54981
|
+
const selector = lookupSelector(node.init, bindings);
|
|
54982
|
+
if (selector) bindings.set(node.id.name, selector);
|
|
54936
54983
|
}
|
|
54937
|
-
}
|
|
54938
|
-
|
|
54939
|
-
|
|
54940
|
-
|
|
54941
|
-
|
|
54942
|
-
|
|
54943
|
-
|
|
54944
|
-
|
|
54945
|
-
|
|
54984
|
+
});
|
|
54985
|
+
const mutations = [];
|
|
54986
|
+
simple(ast, {
|
|
54987
|
+
AssignmentExpression(node) {
|
|
54988
|
+
if (node.operator !== "=" || memberName(node.left) !== "src") return;
|
|
54989
|
+
const selector = lookupSelector(node.left.object, bindings);
|
|
54990
|
+
if (!selector) return;
|
|
54991
|
+
mutations.push({
|
|
54992
|
+
selector,
|
|
54993
|
+
operation: "src_assignment",
|
|
54994
|
+
raw: script.slice(node.start, node.end)
|
|
54995
|
+
});
|
|
54996
|
+
},
|
|
54997
|
+
CallExpression(node) {
|
|
54998
|
+
if (memberName(node.callee) !== "setAttribute") return;
|
|
54999
|
+
if (literalString(node.arguments?.[0])?.toLowerCase() !== "src") return;
|
|
55000
|
+
const selector = lookupSelector(node.callee.object, bindings);
|
|
55001
|
+
if (!selector) return;
|
|
55002
|
+
mutations.push({
|
|
55003
|
+
selector,
|
|
55004
|
+
operation: "set_attribute",
|
|
55005
|
+
raw: script.slice(node.start, node.end)
|
|
55006
|
+
});
|
|
55007
|
+
}
|
|
55008
|
+
});
|
|
55009
|
+
return mutations;
|
|
55010
|
+
} catch {
|
|
55011
|
+
return [];
|
|
54946
55012
|
}
|
|
55013
|
+
}
|
|
55014
|
+
var FONT_ALIAS_MAP = {
|
|
55015
|
+
// ── Canonical bundled fonts (self-referencing) ────────────────────────
|
|
55016
|
+
inter: "inter",
|
|
55017
|
+
montserrat: "montserrat",
|
|
55018
|
+
outfit: "outfit",
|
|
55019
|
+
nunito: "nunito",
|
|
55020
|
+
oswald: "oswald",
|
|
55021
|
+
"league gothic": "league-gothic",
|
|
55022
|
+
"archivo black": "archivo-black",
|
|
55023
|
+
"space mono": "space-mono",
|
|
55024
|
+
"ibm plex mono": "ibm-plex-mono",
|
|
55025
|
+
"jetbrains mono": "jetbrains-mono",
|
|
55026
|
+
"eb garamond": "eb-garamond",
|
|
55027
|
+
"playfair display": "playfair-display",
|
|
55028
|
+
"source code pro": "source-code-pro",
|
|
55029
|
+
"noto sans jp": "noto-sans-jp",
|
|
55030
|
+
roboto: "roboto",
|
|
55031
|
+
"open sans": "open-sans",
|
|
55032
|
+
lato: "lato",
|
|
55033
|
+
poppins: "poppins",
|
|
55034
|
+
// ── Common aliases → nearest canonical ────────────────────────────────
|
|
55035
|
+
"helvetica neue": "inter",
|
|
55036
|
+
helvetica: "inter",
|
|
55037
|
+
arial: "inter",
|
|
55038
|
+
"helvetica bold": "inter",
|
|
55039
|
+
futura: "montserrat",
|
|
55040
|
+
"din alternate": "montserrat",
|
|
55041
|
+
"arial black": "montserrat",
|
|
55042
|
+
"bebas neue": "league-gothic",
|
|
55043
|
+
"courier new": "jetbrains-mono",
|
|
55044
|
+
courier: "jetbrains-mono",
|
|
55045
|
+
garamond: "eb-garamond",
|
|
55046
|
+
"noto sans japanese": "noto-sans-jp",
|
|
55047
|
+
"segoe ui": "roboto",
|
|
55048
|
+
// ── macOS sans-serif system fonts → inter ─────────────────────────────
|
|
55049
|
+
"sf pro": "inter",
|
|
55050
|
+
"sf pro display": "inter",
|
|
55051
|
+
"sf pro text": "inter",
|
|
55052
|
+
"sf pro rounded": "inter",
|
|
55053
|
+
avenir: "inter",
|
|
55054
|
+
"avenir next": "inter",
|
|
55055
|
+
"lucida grande": "inter",
|
|
55056
|
+
geneva: "inter",
|
|
55057
|
+
optima: "inter",
|
|
55058
|
+
// ── Windows sans-serif system fonts → inter ───────────────────────────
|
|
55059
|
+
verdana: "inter",
|
|
55060
|
+
tahoma: "inter",
|
|
55061
|
+
"trebuchet ms": "inter",
|
|
55062
|
+
calibri: "inter",
|
|
55063
|
+
candara: "inter",
|
|
55064
|
+
corbel: "inter",
|
|
55065
|
+
"lucida sans": "inter",
|
|
55066
|
+
"lucida sans unicode": "inter",
|
|
55067
|
+
// ── Linux sans-serif system fonts → inter ─────────────────────────────
|
|
55068
|
+
"noto sans": "inter",
|
|
55069
|
+
"dejavu sans": "inter",
|
|
55070
|
+
"liberation sans": "inter",
|
|
55071
|
+
// ── Monospace system fonts → jetbrains-mono ───────────────────────────
|
|
55072
|
+
"sf mono": "jetbrains-mono",
|
|
55073
|
+
menlo: "jetbrains-mono",
|
|
55074
|
+
monaco: "jetbrains-mono",
|
|
55075
|
+
consolas: "jetbrains-mono",
|
|
55076
|
+
"lucida console": "jetbrains-mono",
|
|
55077
|
+
"lucida sans typewriter": "jetbrains-mono",
|
|
55078
|
+
"andale mono": "jetbrains-mono",
|
|
55079
|
+
"dejavu sans mono": "jetbrains-mono",
|
|
55080
|
+
"liberation mono": "jetbrains-mono",
|
|
55081
|
+
// ── Serif system fonts → eb-garamond ──────────────────────────────────
|
|
55082
|
+
georgia: "eb-garamond",
|
|
55083
|
+
palatino: "eb-garamond",
|
|
55084
|
+
"palatino linotype": "eb-garamond",
|
|
55085
|
+
"book antiqua": "eb-garamond",
|
|
55086
|
+
cambria: "eb-garamond",
|
|
55087
|
+
times: "eb-garamond",
|
|
55088
|
+
"times new roman": "eb-garamond",
|
|
55089
|
+
"dejavu serif": "eb-garamond",
|
|
55090
|
+
"liberation serif": "eb-garamond"
|
|
54947
55091
|
};
|
|
55092
|
+
var FONT_ALIAS_KEYS = new Set(Object.keys(FONT_ALIAS_MAP));
|
|
54948
55093
|
|
|
54949
|
-
//
|
|
54950
|
-
var
|
|
54951
|
-
|
|
54952
|
-
|
|
54953
|
-
|
|
54954
|
-
|
|
54955
|
-
|
|
54956
|
-
|
|
54957
|
-
|
|
54958
|
-
|
|
54959
|
-
|
|
54960
|
-
}
|
|
54961
|
-
|
|
54962
|
-
|
|
54963
|
-
|
|
54964
|
-
|
|
54965
|
-
|
|
54966
|
-
|
|
54967
|
-
this.whatToShow = whatToShow;
|
|
54968
|
-
let { [NEXT]: next, [END]: end } = root;
|
|
54969
|
-
if (root.nodeType === DOCUMENT_NODE) {
|
|
54970
|
-
const { documentElement } = root;
|
|
54971
|
-
next = documentElement;
|
|
54972
|
-
end = documentElement[END];
|
|
54973
|
-
}
|
|
54974
|
-
const nodes = [];
|
|
54975
|
-
while (next && next !== end) {
|
|
54976
|
-
if (isOK(next, whatToShow))
|
|
54977
|
-
nodes.push(next);
|
|
54978
|
-
next = next[NEXT];
|
|
54979
|
-
}
|
|
54980
|
-
this[PRIVATE] = { i: 0, nodes };
|
|
54981
|
-
}
|
|
54982
|
-
nextNode() {
|
|
54983
|
-
const $ = this[PRIVATE];
|
|
54984
|
-
this.currentNode = $.i < $.nodes.length ? $.nodes[$.i++] : null;
|
|
54985
|
-
return this.currentNode;
|
|
55094
|
+
// ../parsers/dist/colorGradingContract.js
|
|
55095
|
+
var COLOR_GRADING_COLOR_SPACE = "rec709";
|
|
55096
|
+
var COLOR_GRADING_MAX_CURVE_POINTS = 16;
|
|
55097
|
+
var COLOR_GRADING_MAX_SECONDARIES = 4;
|
|
55098
|
+
var COLOR_GRADING_ADVANCED_LIMITS = {
|
|
55099
|
+
hueDegrees: { min: 0, max: 360, inclusiveMax: false },
|
|
55100
|
+
unit: { min: 0, max: 1 },
|
|
55101
|
+
signedUnit: { min: -1, max: 1 },
|
|
55102
|
+
secondaryHueRange: { min: 0, max: 180 },
|
|
55103
|
+
secondaryHueSoftness: { min: 0, max: 180 },
|
|
55104
|
+
secondaryHueCombinedMax: 180,
|
|
55105
|
+
secondarySoftRangeSoftness: { min: 0, max: 0.5 },
|
|
55106
|
+
secondaryHueShift: { min: -180, max: 180 },
|
|
55107
|
+
effects: {
|
|
55108
|
+
asciiStyle: { min: 0, max: 7 },
|
|
55109
|
+
bloom: { min: 0, max: 3 },
|
|
55110
|
+
bloomRadius: { min: 1, max: 100 },
|
|
55111
|
+
monoScreenShape: { min: 0, max: 4 }
|
|
54986
55112
|
}
|
|
54987
55113
|
};
|
|
54988
|
-
|
|
54989
|
-
|
|
54990
|
-
|
|
54991
|
-
|
|
54992
|
-
|
|
54993
|
-
|
|
54994
|
-
|
|
54995
|
-
|
|
54996
|
-
|
|
54997
|
-
|
|
54998
|
-
|
|
54999
|
-
|
|
55000
|
-
|
|
55001
|
-
|
|
55002
|
-
|
|
55003
|
-
|
|
55004
|
-
|
|
55005
|
-
|
|
55006
|
-
|
|
55007
|
-
|
|
55008
|
-
|
|
55009
|
-
|
|
55010
|
-
|
|
55011
|
-
|
|
55012
|
-
|
|
55013
|
-
|
|
55014
|
-
|
|
55015
|
-
|
|
55016
|
-
|
|
55017
|
-
|
|
55018
|
-
|
|
55019
|
-
|
|
55020
|
-
|
|
55021
|
-
|
|
55022
|
-
|
|
55023
|
-
|
|
55024
|
-
|
|
55025
|
-
|
|
55026
|
-
|
|
55027
|
-
|
|
55028
|
-
|
|
55029
|
-
|
|
55030
|
-
|
|
55031
|
-
|
|
55032
|
-
|
|
55033
|
-
|
|
55034
|
-
|
|
55035
|
-
|
|
55036
|
-
|
|
55037
|
-
|
|
55038
|
-
|
|
55039
|
-
|
|
55040
|
-
|
|
55041
|
-
|
|
55042
|
-
|
|
55043
|
-
|
|
55044
|
-
|
|
55045
|
-
|
|
55046
|
-
|
|
55047
|
-
|
|
55048
|
-
|
|
55049
|
-
|
|
55050
|
-
|
|
55051
|
-
|
|
55052
|
-
|
|
55053
|
-
|
|
55054
|
-
|
|
55055
|
-
|
|
55056
|
-
|
|
55057
|
-
|
|
55058
|
-
|
|
55059
|
-
|
|
55060
|
-
|
|
55061
|
-
|
|
55062
|
-
|
|
55063
|
-
|
|
55064
|
-
|
|
55065
|
-
|
|
55066
|
-
|
|
55067
|
-
|
|
55068
|
-
|
|
55069
|
-
|
|
55070
|
-
|
|
55071
|
-
|
|
55072
|
-
|
|
55073
|
-
|
|
55074
|
-
|
|
55075
|
-
|
|
55076
|
-
|
|
55077
|
-
|
|
55078
|
-
|
|
55079
|
-
|
|
55080
|
-
|
|
55081
|
-
|
|
55082
|
-
|
|
55083
|
-
|
|
55084
|
-
|
|
55085
|
-
|
|
55086
|
-
|
|
55087
|
-
|
|
55088
|
-
|
|
55089
|
-
|
|
55114
|
+
var COLOR_GRADING_TOP_LEVEL_KEYS = [
|
|
55115
|
+
"enabled",
|
|
55116
|
+
"preset",
|
|
55117
|
+
"intensity",
|
|
55118
|
+
"adjust",
|
|
55119
|
+
"wheels",
|
|
55120
|
+
"curves",
|
|
55121
|
+
"hueCurves",
|
|
55122
|
+
"secondaries",
|
|
55123
|
+
"details",
|
|
55124
|
+
"effects",
|
|
55125
|
+
"palette",
|
|
55126
|
+
"lut",
|
|
55127
|
+
"colorSpace"
|
|
55128
|
+
];
|
|
55129
|
+
var COLOR_GRADING_ADJUST_KEYS = [
|
|
55130
|
+
"exposure",
|
|
55131
|
+
"contrast",
|
|
55132
|
+
"highlights",
|
|
55133
|
+
"shadows",
|
|
55134
|
+
"whites",
|
|
55135
|
+
"blacks",
|
|
55136
|
+
"temperature",
|
|
55137
|
+
"tint",
|
|
55138
|
+
"vibrance",
|
|
55139
|
+
"saturation"
|
|
55140
|
+
];
|
|
55141
|
+
var COLOR_GRADING_WHEEL_KEYS = ["shadows", "midtones", "highlights"];
|
|
55142
|
+
var COLOR_GRADING_CURVE_KEYS = ["master", "red", "green", "blue"];
|
|
55143
|
+
var COLOR_GRADING_HUE_CURVE_KEYS = ["hueVsHue", "hueVsSaturation", "hueVsLuma"];
|
|
55144
|
+
var COLOR_GRADING_WHEEL_CONTROL_KEYS = ["hue", "amount", "level"];
|
|
55145
|
+
var COLOR_GRADING_SECONDARY_KEYS = ["enabled", "key", "correction"];
|
|
55146
|
+
var COLOR_GRADING_SECONDARY_KEY_KEYS = ["hue", "saturation", "luma"];
|
|
55147
|
+
var COLOR_GRADING_HUE_RANGE_KEYS = ["center", "range", "softness"];
|
|
55148
|
+
var COLOR_GRADING_SOFT_RANGE_KEYS = ["min", "max", "softness"];
|
|
55149
|
+
var COLOR_GRADING_SECONDARY_CORRECTION_KEYS = [
|
|
55150
|
+
"hueShift",
|
|
55151
|
+
"saturation",
|
|
55152
|
+
"luma",
|
|
55153
|
+
"temperature",
|
|
55154
|
+
"tint"
|
|
55155
|
+
];
|
|
55156
|
+
var COLOR_GRADING_DETAIL_KEYS = [
|
|
55157
|
+
"vignette",
|
|
55158
|
+
"vignetteMidpoint",
|
|
55159
|
+
"vignetteRoundness",
|
|
55160
|
+
"vignetteFeather",
|
|
55161
|
+
"grain",
|
|
55162
|
+
"grainSize",
|
|
55163
|
+
"grainRoughness"
|
|
55164
|
+
];
|
|
55165
|
+
var COLOR_GRADING_EFFECT_KEYS = [
|
|
55166
|
+
"blur",
|
|
55167
|
+
"pixelate",
|
|
55168
|
+
"chromaBleed",
|
|
55169
|
+
"tapeDamage",
|
|
55170
|
+
"tapeTracking",
|
|
55171
|
+
"tapeNoise",
|
|
55172
|
+
"tapeSpeed",
|
|
55173
|
+
"filmArtifacts",
|
|
55174
|
+
"halftone",
|
|
55175
|
+
"halftoneSize",
|
|
55176
|
+
"twoInkPrint",
|
|
55177
|
+
"twoInkPrintSize",
|
|
55178
|
+
"ascii",
|
|
55179
|
+
"asciiSize",
|
|
55180
|
+
"asciiInvert",
|
|
55181
|
+
"asciiStyle",
|
|
55182
|
+
"asciiColor",
|
|
55183
|
+
"asciiRotation",
|
|
55184
|
+
"dither",
|
|
55185
|
+
"ditherSize",
|
|
55186
|
+
"bloom",
|
|
55187
|
+
"bloomRadius",
|
|
55188
|
+
"monoScreen",
|
|
55189
|
+
"monoScreenSize",
|
|
55190
|
+
"monoScreenAngle",
|
|
55191
|
+
"monoScreenSpread",
|
|
55192
|
+
"monoScreenShape",
|
|
55193
|
+
"monoScreenInvert",
|
|
55194
|
+
"scanlines",
|
|
55195
|
+
"scanlineCount",
|
|
55196
|
+
"scanlineSoftness",
|
|
55197
|
+
"chromaticAberration",
|
|
55198
|
+
"chromaticAngle",
|
|
55199
|
+
"crtCurvature",
|
|
55200
|
+
"digitalGlitch",
|
|
55201
|
+
"digitalGlitchColorSplit",
|
|
55202
|
+
"digitalGlitchLineTear",
|
|
55203
|
+
"digitalGlitchPixelate",
|
|
55204
|
+
"digitalGlitchBlockAmount",
|
|
55205
|
+
"digitalGlitchBlockDisplacement",
|
|
55206
|
+
"digitalGlitchBlockOpacity",
|
|
55207
|
+
"digitalGlitchSpeed",
|
|
55208
|
+
"engraving",
|
|
55209
|
+
"engravingSpacing",
|
|
55210
|
+
"engravingMinThickness",
|
|
55211
|
+
"engravingMaxThickness",
|
|
55212
|
+
"engravingAngle",
|
|
55213
|
+
"engravingContrast",
|
|
55214
|
+
"engravingSharpness",
|
|
55215
|
+
"engravingWave",
|
|
55216
|
+
"engravingWaveFrequency",
|
|
55217
|
+
"crosshatch",
|
|
55218
|
+
"crosshatchSpacing",
|
|
55219
|
+
"crosshatchThickness",
|
|
55220
|
+
"crosshatchAngle",
|
|
55221
|
+
"crosshatchContrast",
|
|
55222
|
+
"crosshatchEdges",
|
|
55223
|
+
"crosshatchLineWeight",
|
|
55224
|
+
"crosshatchWave",
|
|
55225
|
+
"crosshatchWaveFrequency",
|
|
55226
|
+
"kuwahara",
|
|
55227
|
+
"kuwaharaRadius",
|
|
55228
|
+
"kuwaharaSharpness",
|
|
55229
|
+
"kuwaharaSaturation"
|
|
55230
|
+
];
|
|
55231
|
+
var COLOR_GRADING_LUT_KEYS = ["src", "intensity"];
|
|
55232
|
+
var UNIT_LIMIT = COLOR_GRADING_ADVANCED_LIMITS.unit;
|
|
55233
|
+
var SIGNED_UNIT_LIMIT = COLOR_GRADING_ADVANCED_LIMITS.signedUnit;
|
|
55234
|
+
var EFFECT_LIMIT_OVERRIDES = COLOR_GRADING_ADVANCED_LIMITS.effects;
|
|
55235
|
+
var VARIABLE_REF = /^\$(?:\{[A-Za-z0-9_.:-]+\}|[A-Za-z0-9_.:-]+)$/;
|
|
55236
|
+
var PALETTE_COLOR = /^#[0-9a-f]{6}$/i;
|
|
55237
|
+
var OBJECT_SECTIONS = [
|
|
55238
|
+
["adjust", COLOR_GRADING_ADJUST_KEYS],
|
|
55239
|
+
["details", COLOR_GRADING_DETAIL_KEYS],
|
|
55240
|
+
["effects", COLOR_GRADING_EFFECT_KEYS],
|
|
55241
|
+
["lut", COLOR_GRADING_LUT_KEYS]
|
|
55242
|
+
];
|
|
55243
|
+
function isRecord(value) {
|
|
55244
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
55245
|
+
}
|
|
55246
|
+
function isColorGradingVariableRef(value) {
|
|
55247
|
+
return typeof value === "string" && VARIABLE_REF.test(value.trim());
|
|
55248
|
+
}
|
|
55249
|
+
function unknownKeysHint(path, unknown) {
|
|
55250
|
+
if (path !== "grading") return `Correct or remove the unsupported "${path}" keys.`;
|
|
55251
|
+
const sections = new Set(
|
|
55252
|
+
unknown.flatMap(
|
|
55253
|
+
(key2) => OBJECT_SECTIONS.filter(([, keys2]) => keys2.includes(key2)).map(
|
|
55254
|
+
([section]) => section
|
|
55255
|
+
)
|
|
55256
|
+
)
|
|
55257
|
+
);
|
|
55258
|
+
return sections.size === 1 ? `Move those controls under "${[...sections][0]}".` : "Use only the documented media-treatment keys at the top level.";
|
|
55259
|
+
}
|
|
55260
|
+
function validateObject(value, path, keys2, issues) {
|
|
55261
|
+
if (isColorGradingVariableRef(value)) return null;
|
|
55262
|
+
if (!isRecord(value)) {
|
|
55263
|
+
issues.push({ path, message: "must be an object or variable reference" });
|
|
55090
55264
|
return null;
|
|
55091
55265
|
}
|
|
55092
|
-
|
|
55093
|
-
|
|
55094
|
-
|
|
55095
|
-
|
|
55096
|
-
|
|
55097
|
-
|
|
55098
|
-
|
|
55099
|
-
|
|
55100
|
-
return this.firstElementChild;
|
|
55101
|
-
}
|
|
55102
|
-
get isConnected() {
|
|
55103
|
-
return true;
|
|
55104
|
-
}
|
|
55105
|
-
/**
|
|
55106
|
-
* @protected
|
|
55107
|
-
*/
|
|
55108
|
-
_getParent() {
|
|
55109
|
-
return this[EVENT_TARGET];
|
|
55110
|
-
}
|
|
55111
|
-
createAttribute(name) {
|
|
55112
|
-
return new Attr(this, name);
|
|
55113
|
-
}
|
|
55114
|
-
createCDATASection(data2) {
|
|
55115
|
-
return new CDATASection(this, data2);
|
|
55116
|
-
}
|
|
55117
|
-
createComment(textContent2) {
|
|
55118
|
-
return new Comment3(this, textContent2);
|
|
55119
|
-
}
|
|
55120
|
-
createDocumentFragment() {
|
|
55121
|
-
return new DocumentFragment(this);
|
|
55122
|
-
}
|
|
55123
|
-
createDocumentType(name, publicId, systemId) {
|
|
55124
|
-
return new DocumentType(this, name, publicId, systemId);
|
|
55125
|
-
}
|
|
55126
|
-
createElement(localName) {
|
|
55127
|
-
return new Element2(this, localName);
|
|
55128
|
-
}
|
|
55129
|
-
createRange() {
|
|
55130
|
-
const range = new Range();
|
|
55131
|
-
range.commonAncestorContainer = this;
|
|
55132
|
-
return range;
|
|
55133
|
-
}
|
|
55134
|
-
createTextNode(textContent2) {
|
|
55135
|
-
return new Text3(this, textContent2);
|
|
55136
|
-
}
|
|
55137
|
-
createTreeWalker(root, whatToShow = -1) {
|
|
55138
|
-
return new TreeWalker(root, whatToShow);
|
|
55139
|
-
}
|
|
55140
|
-
createNodeIterator(root, whatToShow = -1) {
|
|
55141
|
-
return this.createTreeWalker(root, whatToShow);
|
|
55142
|
-
}
|
|
55143
|
-
createEvent(name) {
|
|
55144
|
-
const event = create(name === "Event" ? new GlobalEvent("") : new CustomEvent(""));
|
|
55145
|
-
event.initEvent = event.initCustomEvent = (type, canBubble = false, cancelable = false, detail) => {
|
|
55146
|
-
event.bubbles = !!canBubble;
|
|
55147
|
-
defineProperties(event, {
|
|
55148
|
-
type: { value: type },
|
|
55149
|
-
canBubble: { value: canBubble },
|
|
55150
|
-
cancelable: { value: cancelable },
|
|
55151
|
-
detail: { value: detail }
|
|
55152
|
-
});
|
|
55153
|
-
};
|
|
55154
|
-
return event;
|
|
55155
|
-
}
|
|
55156
|
-
cloneNode(deep = false) {
|
|
55157
|
-
const {
|
|
55158
|
-
constructor,
|
|
55159
|
-
[CUSTOM_ELEMENTS]: customElements2,
|
|
55160
|
-
[DOCTYPE]: doctype
|
|
55161
|
-
} = this;
|
|
55162
|
-
const document = new constructor();
|
|
55163
|
-
document[CUSTOM_ELEMENTS] = customElements2;
|
|
55164
|
-
if (deep) {
|
|
55165
|
-
const end = document[END];
|
|
55166
|
-
const { childNodes } = this;
|
|
55167
|
-
for (let { length } = childNodes, i = 0; i < length; i++)
|
|
55168
|
-
document.insertBefore(childNodes[i].cloneNode(true), end);
|
|
55169
|
-
if (doctype)
|
|
55170
|
-
document[DOCTYPE] = childNodes[0];
|
|
55171
|
-
}
|
|
55172
|
-
return document;
|
|
55173
|
-
}
|
|
55174
|
-
importNode(externalNode) {
|
|
55175
|
-
const deep = 1 < arguments.length && !!arguments[1];
|
|
55176
|
-
const node = externalNode.cloneNode(deep);
|
|
55177
|
-
const { [CUSTOM_ELEMENTS]: customElements2 } = this;
|
|
55178
|
-
const { active } = customElements2;
|
|
55179
|
-
const upgrade = (element) => {
|
|
55180
|
-
const { ownerDocument, nodeType } = element;
|
|
55181
|
-
element.ownerDocument = this;
|
|
55182
|
-
if (active && ownerDocument !== this && nodeType === ELEMENT_NODE)
|
|
55183
|
-
customElements2.upgrade(element);
|
|
55184
|
-
};
|
|
55185
|
-
upgrade(node);
|
|
55186
|
-
if (deep) {
|
|
55187
|
-
switch (node.nodeType) {
|
|
55188
|
-
case ELEMENT_NODE:
|
|
55189
|
-
case DOCUMENT_FRAGMENT_NODE: {
|
|
55190
|
-
let { [NEXT]: next, [END]: end } = node;
|
|
55191
|
-
while (next !== end) {
|
|
55192
|
-
if (next.nodeType === ELEMENT_NODE)
|
|
55193
|
-
upgrade(next);
|
|
55194
|
-
next = next[NEXT];
|
|
55195
|
-
}
|
|
55196
|
-
break;
|
|
55197
|
-
}
|
|
55198
|
-
}
|
|
55199
|
-
}
|
|
55200
|
-
return node;
|
|
55201
|
-
}
|
|
55202
|
-
toString() {
|
|
55203
|
-
return this.childNodes.join("");
|
|
55204
|
-
}
|
|
55205
|
-
querySelector(selectors) {
|
|
55206
|
-
return query(super.querySelector, this, selectors);
|
|
55207
|
-
}
|
|
55208
|
-
querySelectorAll(selectors) {
|
|
55209
|
-
return query(super.querySelectorAll, this, selectors);
|
|
55210
|
-
}
|
|
55211
|
-
/* c8 ignore start */
|
|
55212
|
-
getElementsByTagNameNS(_, name) {
|
|
55213
|
-
return this.getElementsByTagName(name);
|
|
55214
|
-
}
|
|
55215
|
-
createAttributeNS(_, name) {
|
|
55216
|
-
return this.createAttribute(name);
|
|
55217
|
-
}
|
|
55218
|
-
createElementNS(nsp, localName, options) {
|
|
55219
|
-
return nsp === SVG_NAMESPACE ? new SVGElement(this, localName, null) : this.createElement(localName, options);
|
|
55220
|
-
}
|
|
55221
|
-
/* c8 ignore stop */
|
|
55222
|
-
};
|
|
55223
|
-
setPrototypeOf(
|
|
55224
|
-
globalExports.Document = function Document3() {
|
|
55225
|
-
illegalConstructor();
|
|
55226
|
-
},
|
|
55227
|
-
Document2
|
|
55228
|
-
).prototype = Document2.prototype;
|
|
55229
|
-
|
|
55230
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/html/document.js
|
|
55231
|
-
var createHTMLElement = (ownerDocument, builtin, localName, options) => {
|
|
55232
|
-
if (!builtin && htmlClasses.has(localName)) {
|
|
55233
|
-
const Class = htmlClasses.get(localName);
|
|
55234
|
-
return new Class(ownerDocument, localName);
|
|
55235
|
-
}
|
|
55236
|
-
const { [CUSTOM_ELEMENTS]: { active, registry } } = ownerDocument;
|
|
55237
|
-
if (active) {
|
|
55238
|
-
const ce = builtin ? options.is : localName;
|
|
55239
|
-
if (registry.has(ce)) {
|
|
55240
|
-
const { Class } = registry.get(ce);
|
|
55241
|
-
const element = new Class(ownerDocument, localName);
|
|
55242
|
-
customElements.set(element, { connected: false });
|
|
55243
|
-
return element;
|
|
55244
|
-
}
|
|
55266
|
+
const allowed = new Set(keys2);
|
|
55267
|
+
const unknown = Object.keys(value).filter((key2) => !allowed.has(key2));
|
|
55268
|
+
if (unknown.length > 0) {
|
|
55269
|
+
issues.push({
|
|
55270
|
+
path,
|
|
55271
|
+
message: `has unsupported key(s): ${unknown.join(", ")}`,
|
|
55272
|
+
hint: unknownKeysHint(path, unknown)
|
|
55273
|
+
});
|
|
55245
55274
|
}
|
|
55246
|
-
return
|
|
55247
|
-
}
|
|
55248
|
-
|
|
55249
|
-
|
|
55250
|
-
|
|
55275
|
+
return value;
|
|
55276
|
+
}
|
|
55277
|
+
function isNumberInRange(value, limit, inclusiveMax) {
|
|
55278
|
+
if (typeof value !== "number" || !Number.isFinite(value) || value < limit.min) return false;
|
|
55279
|
+
return inclusiveMax ? value <= limit.max : value < limit.max;
|
|
55280
|
+
}
|
|
55281
|
+
function validateNumericField(value, key2, path, limit, issues, inclusiveMax = true) {
|
|
55282
|
+
const candidate = value[key2];
|
|
55283
|
+
if (candidate === void 0 || isColorGradingVariableRef(candidate)) return;
|
|
55284
|
+
if (isNumberInRange(candidate, limit, inclusiveMax)) return;
|
|
55285
|
+
issues.push({
|
|
55286
|
+
path: path ? `${path}.${key2}` : key2,
|
|
55287
|
+
message: `must be a finite number from ${limit.min} ${inclusiveMax ? "through" : "up to"} ${limit.max}`
|
|
55288
|
+
});
|
|
55289
|
+
}
|
|
55290
|
+
function isFiniteTuple(value) {
|
|
55291
|
+
return Array.isArray(value) && value.length === 2 && value.every((coordinate) => typeof coordinate === "number" && Number.isFinite(coordinate));
|
|
55292
|
+
}
|
|
55293
|
+
function validateCurve(value, path, issues) {
|
|
55294
|
+
if (isColorGradingVariableRef(value)) return;
|
|
55295
|
+
if (!Array.isArray(value) || value.length < 2 || value.length > COLOR_GRADING_MAX_CURVE_POINTS) {
|
|
55296
|
+
issues.push({
|
|
55297
|
+
path,
|
|
55298
|
+
message: `must contain 2 to ${COLOR_GRADING_MAX_CURVE_POINTS} [input, output] points`
|
|
55299
|
+
});
|
|
55300
|
+
return;
|
|
55251
55301
|
}
|
|
55252
|
-
|
|
55253
|
-
|
|
55254
|
-
|
|
55255
|
-
|
|
55256
|
-
|
|
55257
|
-
case ELEMENT_NODE:
|
|
55258
|
-
nodeList.push(next);
|
|
55259
|
-
break;
|
|
55260
|
-
}
|
|
55261
|
-
next = next[NEXT];
|
|
55302
|
+
const inputs = /* @__PURE__ */ new Set();
|
|
55303
|
+
value.forEach((point, index) => {
|
|
55304
|
+
if (!isFiniteTuple(point)) {
|
|
55305
|
+
issues.push({ path: `${path}[${index}]`, message: "must be a finite [input, output] tuple" });
|
|
55306
|
+
return;
|
|
55262
55307
|
}
|
|
55263
|
-
|
|
55264
|
-
|
|
55265
|
-
|
|
55266
|
-
* @type HTMLHeadElement
|
|
55267
|
-
*/
|
|
55268
|
-
get head() {
|
|
55269
|
-
const { documentElement } = this;
|
|
55270
|
-
let { firstElementChild } = documentElement;
|
|
55271
|
-
if (!firstElementChild || firstElementChild.tagName !== "HEAD") {
|
|
55272
|
-
firstElementChild = this.createElement("head");
|
|
55273
|
-
documentElement.prepend(firstElementChild);
|
|
55308
|
+
const [input2, output] = point;
|
|
55309
|
+
if (input2 < 0 || input2 > 1 || output < 0 || output > 1) {
|
|
55310
|
+
issues.push({ path: `${path}[${index}]`, message: "coordinates must be between 0 and 1" });
|
|
55274
55311
|
}
|
|
55275
|
-
|
|
55312
|
+
if (inputs.has(input2)) issues.push({ path, message: `contains duplicate input ${input2}` });
|
|
55313
|
+
inputs.add(input2);
|
|
55314
|
+
});
|
|
55315
|
+
const inferredPointCount = value.length + (inputs.has(0) ? 0 : 1) + (inputs.has(1) ? 0 : 1);
|
|
55316
|
+
if (inferredPointCount > COLOR_GRADING_MAX_CURVE_POINTS) {
|
|
55317
|
+
issues.push({
|
|
55318
|
+
path,
|
|
55319
|
+
message: `must contain at most ${COLOR_GRADING_MAX_CURVE_POINTS} points including inferred 0 and 1 endpoints`
|
|
55320
|
+
});
|
|
55276
55321
|
}
|
|
55277
|
-
|
|
55278
|
-
|
|
55279
|
-
|
|
55280
|
-
|
|
55281
|
-
|
|
55282
|
-
|
|
55283
|
-
|
|
55284
|
-
|
|
55285
|
-
|
|
55286
|
-
}
|
|
55287
|
-
return nextElementSibling3;
|
|
55322
|
+
}
|
|
55323
|
+
function validateHueCurve(value, path, outputMin, outputMax, issues) {
|
|
55324
|
+
if (isColorGradingVariableRef(value)) return;
|
|
55325
|
+
if (!Array.isArray(value) || value.length < 3 || value.length > COLOR_GRADING_MAX_CURVE_POINTS) {
|
|
55326
|
+
issues.push({
|
|
55327
|
+
path,
|
|
55328
|
+
message: `must contain 3 to ${COLOR_GRADING_MAX_CURVE_POINTS} [hueDegrees, delta] points`
|
|
55329
|
+
});
|
|
55330
|
+
return;
|
|
55288
55331
|
}
|
|
55289
|
-
|
|
55290
|
-
|
|
55291
|
-
|
|
55292
|
-
|
|
55293
|
-
|
|
55294
|
-
|
|
55332
|
+
const hues = /* @__PURE__ */ new Set();
|
|
55333
|
+
value.forEach((point, index) => {
|
|
55334
|
+
if (!isFiniteTuple(point)) {
|
|
55335
|
+
issues.push({ path: `${path}[${index}]`, message: "must be a finite [hue, delta] tuple" });
|
|
55336
|
+
return;
|
|
55337
|
+
}
|
|
55338
|
+
const [hue, delta] = point;
|
|
55339
|
+
if (hue < 0 || hue >= 360) {
|
|
55340
|
+
issues.push({ path: `${path}[${index}][0]`, message: "must be from 0 up to 360 degrees" });
|
|
55341
|
+
}
|
|
55342
|
+
if (delta < outputMin || delta > outputMax) {
|
|
55343
|
+
issues.push({
|
|
55344
|
+
path: `${path}[${index}][1]`,
|
|
55345
|
+
message: `must be between ${outputMin} and ${outputMax}`
|
|
55346
|
+
});
|
|
55347
|
+
}
|
|
55348
|
+
if (hues.has(hue)) issues.push({ path, message: `contains duplicate hue ${hue}` });
|
|
55349
|
+
hues.add(hue);
|
|
55350
|
+
});
|
|
55351
|
+
}
|
|
55352
|
+
function validateNumericSection(value, path, keys2, limitFor, issues) {
|
|
55353
|
+
for (const key2 of keys2) validateNumericField(value, key2, path, limitFor(key2), issues);
|
|
55354
|
+
}
|
|
55355
|
+
function validatePalette(value, issues) {
|
|
55356
|
+
if (value === void 0 || value === null || isColorGradingVariableRef(value)) return;
|
|
55357
|
+
const hint = 'Use 2 to 6 colors in the intended mapping order, each written as exact "#RRGGBB", or use a project variable reference.';
|
|
55358
|
+
if (!Array.isArray(value) || value.length < 2 || value.length > 6) {
|
|
55359
|
+
issues.push({ path: "palette", message: "must contain 2 to 6 hex colors", hint });
|
|
55360
|
+
return;
|
|
55295
55361
|
}
|
|
55296
|
-
|
|
55297
|
-
|
|
55298
|
-
|
|
55299
|
-
|
|
55300
|
-
|
|
55301
|
-
|
|
55302
|
-
|
|
55303
|
-
this.createElement("title"),
|
|
55304
|
-
head.firstChild
|
|
55305
|
-
).textContent = textContent2;
|
|
55362
|
+
value.forEach((color, index) => {
|
|
55363
|
+
if (typeof color !== "string" || !PALETTE_COLOR.test(color)) {
|
|
55364
|
+
issues.push({
|
|
55365
|
+
path: `palette[${index}]`,
|
|
55366
|
+
message: "must be a six-digit hex color",
|
|
55367
|
+
hint
|
|
55368
|
+
});
|
|
55306
55369
|
}
|
|
55370
|
+
});
|
|
55371
|
+
}
|
|
55372
|
+
function validateLut(value, object, issues) {
|
|
55373
|
+
if (typeof value === "string") {
|
|
55374
|
+
if (!value.trim()) issues.push({ path: "lut", message: "must not be empty" });
|
|
55375
|
+
return;
|
|
55307
55376
|
}
|
|
55308
|
-
|
|
55309
|
-
|
|
55310
|
-
|
|
55311
|
-
|
|
55312
|
-
|
|
55313
|
-
|
|
55377
|
+
if (!object) return;
|
|
55378
|
+
if (!isColorGradingVariableRef(object.src) && (typeof object.src !== "string" || !object.src.trim())) {
|
|
55379
|
+
issues.push({
|
|
55380
|
+
path: "lut.src",
|
|
55381
|
+
message: "must be a non-empty string or variable reference"
|
|
55382
|
+
});
|
|
55314
55383
|
}
|
|
55315
|
-
|
|
55316
|
-
|
|
55317
|
-
|
|
55318
|
-
|
|
55319
|
-
|
|
55320
|
-
super("image/svg+xml");
|
|
55384
|
+
validateNumericField(object, "intensity", "lut", UNIT_LIMIT, issues);
|
|
55385
|
+
}
|
|
55386
|
+
function validateEnabled(grading, issues) {
|
|
55387
|
+
if (grading.enabled !== void 0 && !isColorGradingVariableRef(grading.enabled) && typeof grading.enabled !== "boolean") {
|
|
55388
|
+
issues.push({ path: "enabled", message: "must be a boolean or variable reference" });
|
|
55321
55389
|
}
|
|
55322
|
-
|
|
55323
|
-
|
|
55390
|
+
}
|
|
55391
|
+
function validatePreset(grading, issues) {
|
|
55392
|
+
if (grading.preset !== void 0 && grading.preset !== null && !isColorGradingVariableRef(grading.preset) && (typeof grading.preset !== "string" || !grading.preset.trim())) {
|
|
55393
|
+
issues.push({
|
|
55394
|
+
path: "preset",
|
|
55395
|
+
message: "must be a non-empty string, null, or variable reference"
|
|
55396
|
+
});
|
|
55324
55397
|
}
|
|
55325
|
-
}
|
|
55326
|
-
|
|
55327
|
-
|
|
55328
|
-
|
|
55329
|
-
|
|
55330
|
-
|
|
55398
|
+
}
|
|
55399
|
+
function validateColorSpace(grading, issues) {
|
|
55400
|
+
if (grading.colorSpace !== void 0 && !isColorGradingVariableRef(grading.colorSpace) && grading.colorSpace !== COLOR_GRADING_COLOR_SPACE) {
|
|
55401
|
+
issues.push({
|
|
55402
|
+
path: "colorSpace",
|
|
55403
|
+
message: `must be "${COLOR_GRADING_COLOR_SPACE}" or a variable reference`
|
|
55404
|
+
});
|
|
55331
55405
|
}
|
|
55332
|
-
|
|
55333
|
-
|
|
55406
|
+
}
|
|
55407
|
+
function validateTopLevel(grading, issues) {
|
|
55408
|
+
validateEnabled(grading, issues);
|
|
55409
|
+
validateNumericField(grading, "intensity", "", UNIT_LIMIT, issues);
|
|
55410
|
+
validatePreset(grading, issues);
|
|
55411
|
+
validateColorSpace(grading, issues);
|
|
55412
|
+
}
|
|
55413
|
+
function validateSection(grading, key2, keys2, issues) {
|
|
55414
|
+
const section = grading[key2];
|
|
55415
|
+
if (section === void 0 || key2 === "lut" && section === null) return;
|
|
55416
|
+
if (key2 === "lut" && typeof section === "string") {
|
|
55417
|
+
validateLut(section, null, issues);
|
|
55418
|
+
return;
|
|
55334
55419
|
}
|
|
55335
|
-
|
|
55336
|
-
|
|
55337
|
-
|
|
55338
|
-
|
|
55339
|
-
|
|
55340
|
-
|
|
55341
|
-
|
|
55342
|
-
|
|
55343
|
-
|
|
55344
|
-
|
|
55345
|
-
|
|
55346
|
-
|
|
55347
|
-
|
|
55348
|
-
|
|
55349
|
-
|
|
55350
|
-
|
|
55351
|
-
|
|
55352
|
-
|
|
55353
|
-
|
|
55354
|
-
|
|
55355
|
-
|
|
55356
|
-
|
|
55357
|
-
|
|
55358
|
-
if (
|
|
55359
|
-
|
|
55360
|
-
|
|
55420
|
+
const object = validateObject(section, key2, keys2, issues);
|
|
55421
|
+
if (!object) return;
|
|
55422
|
+
if (key2 === "lut") return validateLut(section, object, issues);
|
|
55423
|
+
const limitFor = (control) => {
|
|
55424
|
+
if (key2 === "adjust" && control === "exposure") return { min: -2, max: 2 };
|
|
55425
|
+
if (key2 === "adjust" || key2 === "details" && control === "vignetteRoundness") {
|
|
55426
|
+
return SIGNED_UNIT_LIMIT;
|
|
55427
|
+
}
|
|
55428
|
+
return key2 === "effects" ? EFFECT_LIMIT_OVERRIDES[control] ?? UNIT_LIMIT : UNIT_LIMIT;
|
|
55429
|
+
};
|
|
55430
|
+
validateNumericSection(object, key2, keys2, limitFor, issues);
|
|
55431
|
+
}
|
|
55432
|
+
function validateSections(grading, issues) {
|
|
55433
|
+
for (const [key2, keys2] of OBJECT_SECTIONS) validateSection(grading, key2, keys2, issues);
|
|
55434
|
+
}
|
|
55435
|
+
function validateWheels(value, issues) {
|
|
55436
|
+
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
55437
|
+
const wheels = validateObject(value, "wheels", COLOR_GRADING_WHEEL_KEYS, issues);
|
|
55438
|
+
if (!wheels) return;
|
|
55439
|
+
for (const wheel of COLOR_GRADING_WHEEL_KEYS) {
|
|
55440
|
+
if (wheels[wheel] === void 0) continue;
|
|
55441
|
+
const path = `wheels.${wheel}`;
|
|
55442
|
+
const controls = validateObject(wheels[wheel], path, COLOR_GRADING_WHEEL_CONTROL_KEYS, issues);
|
|
55443
|
+
if (!controls) continue;
|
|
55444
|
+
validateNumericField(
|
|
55445
|
+
controls,
|
|
55446
|
+
"hue",
|
|
55447
|
+
path,
|
|
55448
|
+
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees,
|
|
55449
|
+
issues,
|
|
55450
|
+
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees.inclusiveMax
|
|
55451
|
+
);
|
|
55452
|
+
validateNumericField(controls, "amount", path, UNIT_LIMIT, issues);
|
|
55453
|
+
validateNumericField(controls, "level", path, SIGNED_UNIT_LIMIT, issues);
|
|
55361
55454
|
}
|
|
55362
|
-
};
|
|
55363
|
-
|
|
55364
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/shared/parse-json.js
|
|
55365
|
-
var { parse: parse7 } = JSON;
|
|
55366
|
-
|
|
55367
|
-
// ../../node_modules/.bun/linkedom@0.18.12/node_modules/linkedom/esm/index.js
|
|
55368
|
-
var parseHTML = (html, globals = null) => new DOMParser2().parseFromString(
|
|
55369
|
-
html,
|
|
55370
|
-
"text/html",
|
|
55371
|
-
globals
|
|
55372
|
-
).defaultView;
|
|
55373
|
-
function Document4() {
|
|
55374
|
-
illegalConstructor();
|
|
55375
55455
|
}
|
|
55376
|
-
|
|
55377
|
-
|
|
55378
|
-
|
|
55379
|
-
|
|
55380
|
-
|
|
55381
|
-
|
|
55382
|
-
|
|
55383
|
-
init_acorn();
|
|
55384
|
-
init_walk();
|
|
55385
|
-
var CANVAS_DIMENSIONS = {
|
|
55386
|
-
landscape: { width: 1920, height: 1080 },
|
|
55387
|
-
portrait: { width: 1080, height: 1920 },
|
|
55388
|
-
"landscape-4k": { width: 3840, height: 2160 },
|
|
55389
|
-
"portrait-4k": { width: 2160, height: 3840 },
|
|
55390
|
-
square: { width: 1080, height: 1080 },
|
|
55391
|
-
"square-4k": { width: 2160, height: 2160 }
|
|
55392
|
-
};
|
|
55393
|
-
var VALID_CANVAS_RESOLUTIONS = Object.keys(
|
|
55394
|
-
CANVAS_DIMENSIONS
|
|
55395
|
-
);
|
|
55396
|
-
var PROPERTY_GROUPS = {
|
|
55397
|
-
position: /* @__PURE__ */ new Set(["x", "y", "xPercent", "yPercent"]),
|
|
55398
|
-
scale: /* @__PURE__ */ new Set(["scale", "scaleX", "scaleY"]),
|
|
55399
|
-
size: /* @__PURE__ */ new Set(["width", "height"]),
|
|
55400
|
-
rotation: /* @__PURE__ */ new Set(["rotation", "skewX", "skewY"]),
|
|
55401
|
-
visual: /* @__PURE__ */ new Set(["opacity", "autoAlpha"]),
|
|
55402
|
-
other: /* @__PURE__ */ new Set()
|
|
55403
|
-
};
|
|
55404
|
-
var PROP_TO_GROUP = /* @__PURE__ */ new Map();
|
|
55405
|
-
for (const [group, props] of Object.entries(PROPERTY_GROUPS)) {
|
|
55406
|
-
for (const p of props) PROP_TO_GROUP.set(p, group);
|
|
55456
|
+
function validateCurves(value, issues) {
|
|
55457
|
+
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
55458
|
+
const curves = validateObject(value, "curves", COLOR_GRADING_CURVE_KEYS, issues);
|
|
55459
|
+
if (!curves) return;
|
|
55460
|
+
for (const key2 of COLOR_GRADING_CURVE_KEYS) {
|
|
55461
|
+
if (curves[key2] !== void 0) validateCurve(curves[key2], `curves.${key2}`, issues);
|
|
55462
|
+
}
|
|
55407
55463
|
}
|
|
55408
|
-
|
|
55409
|
-
|
|
55410
|
-
|
|
55411
|
-
|
|
55412
|
-
|
|
55413
|
-
|
|
55414
|
-
|
|
55415
|
-
|
|
55416
|
-
|
|
55417
|
-
|
|
55418
|
-
|
|
55419
|
-
]);
|
|
55420
|
-
|
|
55421
|
-
COMPOSITION_ATTRIBUTES.derivedEnd
|
|
55422
|
-
]);
|
|
55423
|
-
var LEGACY_TIMING_ATTRIBUTES = Object.freeze([
|
|
55424
|
-
COMPOSITION_ATTRIBUTES.derivedEnd,
|
|
55425
|
-
COMPOSITION_ATTRIBUTES.legacyTrack
|
|
55426
|
-
]);
|
|
55427
|
-
function parseProgram2(script) {
|
|
55428
|
-
try {
|
|
55429
|
-
return parse3(script, { ecmaVersion: "latest", sourceType: "script" });
|
|
55430
|
-
} catch {
|
|
55431
|
-
return parse3(script, { ecmaVersion: "latest", sourceType: "module" });
|
|
55464
|
+
function validateHueCurves(value, issues) {
|
|
55465
|
+
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
55466
|
+
const curves = validateObject(value, "hueCurves", COLOR_GRADING_HUE_CURVE_KEYS, issues);
|
|
55467
|
+
if (!curves) return;
|
|
55468
|
+
const limits = {
|
|
55469
|
+
hueVsHue: [-180, 180],
|
|
55470
|
+
hueVsSaturation: [-1, 1],
|
|
55471
|
+
hueVsLuma: [-1, 1]
|
|
55472
|
+
};
|
|
55473
|
+
for (const key2 of COLOR_GRADING_HUE_CURVE_KEYS) {
|
|
55474
|
+
if (curves[key2] !== void 0) {
|
|
55475
|
+
validateHueCurve(curves[key2], `hueCurves.${key2}`, limits[key2][0], limits[key2][1], issues);
|
|
55476
|
+
}
|
|
55432
55477
|
}
|
|
55433
55478
|
}
|
|
55434
|
-
function
|
|
55435
|
-
|
|
55436
|
-
if (
|
|
55437
|
-
|
|
55479
|
+
function validateSoftRange(value, path, issues) {
|
|
55480
|
+
const range = validateObject(value, path, COLOR_GRADING_SOFT_RANGE_KEYS, issues);
|
|
55481
|
+
if (!range) return;
|
|
55482
|
+
validateNumericField(range, "min", path, UNIT_LIMIT, issues);
|
|
55483
|
+
validateNumericField(range, "max", path, UNIT_LIMIT, issues);
|
|
55484
|
+
validateNumericField(
|
|
55485
|
+
range,
|
|
55486
|
+
"softness",
|
|
55487
|
+
path,
|
|
55488
|
+
COLOR_GRADING_ADVANCED_LIMITS.secondarySoftRangeSoftness,
|
|
55489
|
+
issues
|
|
55490
|
+
);
|
|
55491
|
+
if (typeof range.min === "number" && typeof range.max === "number" && range.min >= range.max) {
|
|
55492
|
+
issues.push({ path, message: "min must be smaller than max" });
|
|
55438
55493
|
}
|
|
55439
|
-
return void 0;
|
|
55440
55494
|
}
|
|
55441
|
-
function
|
|
55442
|
-
|
|
55443
|
-
if (!
|
|
55444
|
-
|
|
55495
|
+
function validateSecondaryHue(value, path, issues) {
|
|
55496
|
+
const hue = validateObject(value, path, COLOR_GRADING_HUE_RANGE_KEYS, issues);
|
|
55497
|
+
if (!hue) return;
|
|
55498
|
+
validateNumericField(
|
|
55499
|
+
hue,
|
|
55500
|
+
"center",
|
|
55501
|
+
path,
|
|
55502
|
+
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees,
|
|
55503
|
+
issues,
|
|
55504
|
+
COLOR_GRADING_ADVANCED_LIMITS.hueDegrees.inclusiveMax
|
|
55505
|
+
);
|
|
55506
|
+
validateNumericField(hue, "range", path, COLOR_GRADING_ADVANCED_LIMITS.secondaryHueRange, issues);
|
|
55507
|
+
validateNumericField(
|
|
55508
|
+
hue,
|
|
55509
|
+
"softness",
|
|
55510
|
+
path,
|
|
55511
|
+
COLOR_GRADING_ADVANCED_LIMITS.secondaryHueSoftness,
|
|
55512
|
+
issues
|
|
55513
|
+
);
|
|
55514
|
+
if (typeof hue.range === "number" && typeof hue.softness === "number" && hue.range + hue.softness > COLOR_GRADING_ADVANCED_LIMITS.secondaryHueCombinedMax) {
|
|
55515
|
+
issues.push({
|
|
55516
|
+
path,
|
|
55517
|
+
message: `range plus softness must not exceed ${COLOR_GRADING_ADVANCED_LIMITS.secondaryHueCombinedMax} degrees`
|
|
55518
|
+
});
|
|
55519
|
+
}
|
|
55445
55520
|
}
|
|
55446
|
-
function
|
|
55447
|
-
|
|
55448
|
-
if (
|
|
55449
|
-
|
|
55521
|
+
function validateSecondaryKey(value, path, issues) {
|
|
55522
|
+
const key2 = validateObject(value, path, COLOR_GRADING_SECONDARY_KEY_KEYS, issues);
|
|
55523
|
+
if (!key2) return;
|
|
55524
|
+
if (key2.hue !== void 0) validateSecondaryHue(key2.hue, `${path}.hue`, issues);
|
|
55525
|
+
if (key2.saturation !== void 0) validateSoftRange(key2.saturation, `${path}.saturation`, issues);
|
|
55526
|
+
if (key2.luma !== void 0) validateSoftRange(key2.luma, `${path}.luma`, issues);
|
|
55527
|
+
}
|
|
55528
|
+
function validateSecondaryCorrection(value, path, issues) {
|
|
55529
|
+
const correction = validateObject(value, path, COLOR_GRADING_SECONDARY_CORRECTION_KEYS, issues);
|
|
55530
|
+
if (!correction) return;
|
|
55531
|
+
validateNumericField(
|
|
55532
|
+
correction,
|
|
55533
|
+
"hueShift",
|
|
55534
|
+
path,
|
|
55535
|
+
COLOR_GRADING_ADVANCED_LIMITS.secondaryHueShift,
|
|
55536
|
+
issues
|
|
55537
|
+
);
|
|
55538
|
+
for (const key2 of ["saturation", "luma", "temperature", "tint"]) {
|
|
55539
|
+
validateNumericField(correction, key2, path, SIGNED_UNIT_LIMIT, issues);
|
|
55450
55540
|
}
|
|
55451
|
-
const method = memberName(node.callee);
|
|
55452
|
-
if (method !== "getElementById" && method !== "querySelector") return void 0;
|
|
55453
|
-
const value = literalString(node.arguments?.[0]);
|
|
55454
|
-
if (!value) return void 0;
|
|
55455
|
-
return method === "getElementById" ? `#${value}` : value;
|
|
55456
55541
|
}
|
|
55457
|
-
function
|
|
55458
|
-
|
|
55459
|
-
|
|
55460
|
-
|
|
55461
|
-
|
|
55462
|
-
|
|
55463
|
-
|
|
55464
|
-
|
|
55465
|
-
|
|
55466
|
-
|
|
55467
|
-
|
|
55468
|
-
|
|
55469
|
-
|
|
55470
|
-
|
|
55471
|
-
|
|
55472
|
-
|
|
55473
|
-
if (!selector) return;
|
|
55474
|
-
mutations.push({
|
|
55475
|
-
selector,
|
|
55476
|
-
operation: "src_assignment",
|
|
55477
|
-
raw: script.slice(node.start, node.end)
|
|
55478
|
-
});
|
|
55479
|
-
},
|
|
55480
|
-
CallExpression(node) {
|
|
55481
|
-
if (memberName(node.callee) !== "setAttribute") return;
|
|
55482
|
-
if (literalString(node.arguments?.[0])?.toLowerCase() !== "src") return;
|
|
55483
|
-
const selector = lookupSelector(node.callee.object, bindings);
|
|
55484
|
-
if (!selector) return;
|
|
55485
|
-
mutations.push({
|
|
55486
|
-
selector,
|
|
55487
|
-
operation: "set_attribute",
|
|
55488
|
-
raw: script.slice(node.start, node.end)
|
|
55489
|
-
});
|
|
55490
|
-
}
|
|
55542
|
+
function validateSecondary(value, index, issues) {
|
|
55543
|
+
const path = `secondaries[${index}]`;
|
|
55544
|
+
const secondary = validateObject(value, path, COLOR_GRADING_SECONDARY_KEYS, issues);
|
|
55545
|
+
if (!secondary) return;
|
|
55546
|
+
if (secondary.enabled !== void 0 && typeof secondary.enabled !== "boolean" && !isColorGradingVariableRef(secondary.enabled)) {
|
|
55547
|
+
issues.push({ path: `${path}.enabled`, message: "must be a boolean" });
|
|
55548
|
+
}
|
|
55549
|
+
validateSecondaryKey(secondary.key, `${path}.key`, issues);
|
|
55550
|
+
validateSecondaryCorrection(secondary.correction, `${path}.correction`, issues);
|
|
55551
|
+
}
|
|
55552
|
+
function validateSecondaries(value, issues) {
|
|
55553
|
+
if (value === void 0 || isColorGradingVariableRef(value)) return;
|
|
55554
|
+
if (!Array.isArray(value) || value.length > COLOR_GRADING_MAX_SECONDARIES) {
|
|
55555
|
+
issues.push({
|
|
55556
|
+
path: "secondaries",
|
|
55557
|
+
message: `must be an array of at most ${COLOR_GRADING_MAX_SECONDARIES} selections`
|
|
55491
55558
|
});
|
|
55492
|
-
return
|
|
55493
|
-
} catch {
|
|
55494
|
-
return [];
|
|
55559
|
+
return;
|
|
55495
55560
|
}
|
|
55561
|
+
value.forEach((secondary, index) => validateSecondary(secondary, index, issues));
|
|
55562
|
+
}
|
|
55563
|
+
function validateColorGradingContract(value) {
|
|
55564
|
+
if (typeof value === "string") {
|
|
55565
|
+
return value.trim() ? [] : [{ path: "grading", message: "is empty" }];
|
|
55566
|
+
}
|
|
55567
|
+
const issues = [];
|
|
55568
|
+
const grading = validateObject(value, "grading", COLOR_GRADING_TOP_LEVEL_KEYS, issues);
|
|
55569
|
+
if (!grading) return issues;
|
|
55570
|
+
validateTopLevel(grading, issues);
|
|
55571
|
+
validateSections(grading, issues);
|
|
55572
|
+
validateWheels(grading.wheels, issues);
|
|
55573
|
+
validateCurves(grading.curves, issues);
|
|
55574
|
+
validateHueCurves(grading.hueCurves, issues);
|
|
55575
|
+
validateSecondaries(grading.secondaries, issues);
|
|
55576
|
+
validatePalette(grading.palette, issues);
|
|
55577
|
+
return issues;
|
|
55496
55578
|
}
|
|
55497
|
-
var FONT_ALIAS_MAP = {
|
|
55498
|
-
// ── Canonical bundled fonts (self-referencing) ────────────────────────
|
|
55499
|
-
inter: "inter",
|
|
55500
|
-
montserrat: "montserrat",
|
|
55501
|
-
outfit: "outfit",
|
|
55502
|
-
nunito: "nunito",
|
|
55503
|
-
oswald: "oswald",
|
|
55504
|
-
"league gothic": "league-gothic",
|
|
55505
|
-
"archivo black": "archivo-black",
|
|
55506
|
-
"space mono": "space-mono",
|
|
55507
|
-
"ibm plex mono": "ibm-plex-mono",
|
|
55508
|
-
"jetbrains mono": "jetbrains-mono",
|
|
55509
|
-
"eb garamond": "eb-garamond",
|
|
55510
|
-
"playfair display": "playfair-display",
|
|
55511
|
-
"source code pro": "source-code-pro",
|
|
55512
|
-
"noto sans jp": "noto-sans-jp",
|
|
55513
|
-
roboto: "roboto",
|
|
55514
|
-
"open sans": "open-sans",
|
|
55515
|
-
lato: "lato",
|
|
55516
|
-
poppins: "poppins",
|
|
55517
|
-
// ── Common aliases → nearest canonical ────────────────────────────────
|
|
55518
|
-
"helvetica neue": "inter",
|
|
55519
|
-
helvetica: "inter",
|
|
55520
|
-
arial: "inter",
|
|
55521
|
-
"helvetica bold": "inter",
|
|
55522
|
-
futura: "montserrat",
|
|
55523
|
-
"din alternate": "montserrat",
|
|
55524
|
-
"arial black": "montserrat",
|
|
55525
|
-
"bebas neue": "league-gothic",
|
|
55526
|
-
"courier new": "jetbrains-mono",
|
|
55527
|
-
courier: "jetbrains-mono",
|
|
55528
|
-
garamond: "eb-garamond",
|
|
55529
|
-
"noto sans japanese": "noto-sans-jp",
|
|
55530
|
-
"segoe ui": "roboto",
|
|
55531
|
-
// ── macOS sans-serif system fonts → inter ─────────────────────────────
|
|
55532
|
-
"sf pro": "inter",
|
|
55533
|
-
"sf pro display": "inter",
|
|
55534
|
-
"sf pro text": "inter",
|
|
55535
|
-
"sf pro rounded": "inter",
|
|
55536
|
-
avenir: "inter",
|
|
55537
|
-
"avenir next": "inter",
|
|
55538
|
-
"lucida grande": "inter",
|
|
55539
|
-
geneva: "inter",
|
|
55540
|
-
optima: "inter",
|
|
55541
|
-
// ── Windows sans-serif system fonts → inter ───────────────────────────
|
|
55542
|
-
verdana: "inter",
|
|
55543
|
-
tahoma: "inter",
|
|
55544
|
-
"trebuchet ms": "inter",
|
|
55545
|
-
calibri: "inter",
|
|
55546
|
-
candara: "inter",
|
|
55547
|
-
corbel: "inter",
|
|
55548
|
-
"lucida sans": "inter",
|
|
55549
|
-
"lucida sans unicode": "inter",
|
|
55550
|
-
// ── Linux sans-serif system fonts → inter ─────────────────────────────
|
|
55551
|
-
"noto sans": "inter",
|
|
55552
|
-
"dejavu sans": "inter",
|
|
55553
|
-
"liberation sans": "inter",
|
|
55554
|
-
// ── Monospace system fonts → jetbrains-mono ───────────────────────────
|
|
55555
|
-
"sf mono": "jetbrains-mono",
|
|
55556
|
-
menlo: "jetbrains-mono",
|
|
55557
|
-
monaco: "jetbrains-mono",
|
|
55558
|
-
consolas: "jetbrains-mono",
|
|
55559
|
-
"lucida console": "jetbrains-mono",
|
|
55560
|
-
"lucida sans typewriter": "jetbrains-mono",
|
|
55561
|
-
"andale mono": "jetbrains-mono",
|
|
55562
|
-
"dejavu sans mono": "jetbrains-mono",
|
|
55563
|
-
"liberation mono": "jetbrains-mono",
|
|
55564
|
-
// ── Serif system fonts → eb-garamond ──────────────────────────────────
|
|
55565
|
-
georgia: "eb-garamond",
|
|
55566
|
-
palatino: "eb-garamond",
|
|
55567
|
-
"palatino linotype": "eb-garamond",
|
|
55568
|
-
"book antiqua": "eb-garamond",
|
|
55569
|
-
cambria: "eb-garamond",
|
|
55570
|
-
times: "eb-garamond",
|
|
55571
|
-
"times new roman": "eb-garamond",
|
|
55572
|
-
"dejavu serif": "eb-garamond",
|
|
55573
|
-
"liberation serif": "eb-garamond"
|
|
55574
|
-
};
|
|
55575
|
-
var FONT_ALIAS_KEYS = new Set(Object.keys(FONT_ALIAS_MAP));
|
|
55576
55579
|
|
|
55577
55580
|
// ../parsers/dist/composition.js
|
|
55578
55581
|
init_acorn();
|
|
@@ -57137,6 +57140,35 @@ function findVisibleMarkupCommentLeak(source) {
|
|
|
57137
57140
|
}
|
|
57138
57141
|
return null;
|
|
57139
57142
|
}
|
|
57143
|
+
function readHtmlBodyCssSize(source) {
|
|
57144
|
+
const widthFirst = source.match(HTML_BODY_CSS_WIDTH_FIRST_RE);
|
|
57145
|
+
if (widthFirst) {
|
|
57146
|
+
const [, width = "", height = ""] = widthFirst;
|
|
57147
|
+
return { width, height };
|
|
57148
|
+
}
|
|
57149
|
+
const heightFirst = source.match(HTML_BODY_CSS_HEIGHT_FIRST_RE);
|
|
57150
|
+
if (heightFirst) {
|
|
57151
|
+
const [, height = "", width = ""] = heightFirst;
|
|
57152
|
+
return { width, height };
|
|
57153
|
+
}
|
|
57154
|
+
return null;
|
|
57155
|
+
}
|
|
57156
|
+
function readViewportMetaSize(source) {
|
|
57157
|
+
const match = source.match(VIEWPORT_META_SIZE_RE);
|
|
57158
|
+
if (!match) return null;
|
|
57159
|
+
const [, width = "", height = ""] = match;
|
|
57160
|
+
return { width, height };
|
|
57161
|
+
}
|
|
57162
|
+
function describeSizeMismatch(label, size, dataWidth, dataHeight) {
|
|
57163
|
+
if (!size || size.width === dataWidth && size.height === dataHeight) return null;
|
|
57164
|
+
return `${label} is ${size.width}x${size.height}`;
|
|
57165
|
+
}
|
|
57166
|
+
function findScaffoldSizeMismatches(source, dataWidth, dataHeight) {
|
|
57167
|
+
return [
|
|
57168
|
+
describeSizeMismatch("html/body CSS", readHtmlBodyCssSize(source), dataWidth, dataHeight),
|
|
57169
|
+
describeSizeMismatch("the viewport meta", readViewportMetaSize(source), dataWidth, dataHeight)
|
|
57170
|
+
].filter((mismatch) => mismatch !== null);
|
|
57171
|
+
}
|
|
57140
57172
|
var coreRules = [
|
|
57141
57173
|
// id_requires_css_escape
|
|
57142
57174
|
({ tags }) => {
|
|
@@ -57181,6 +57213,37 @@ var coreRules = [
|
|
|
57181
57213
|
}
|
|
57182
57214
|
return findings;
|
|
57183
57215
|
},
|
|
57216
|
+
// root_dimensions_mismatch
|
|
57217
|
+
//
|
|
57218
|
+
// Render size and the runtime's forced #root size both read the root's own
|
|
57219
|
+
// data-width/data-height, so they stay correct. But editing only those two
|
|
57220
|
+
// attributes — rather than scaffolding with `hyperframes init --resolution`,
|
|
57221
|
+
// which rewrites the scaffold's other copies of the resolution too — leaves
|
|
57222
|
+
// the `html, body` CSS and the `<meta viewport>` at the old value, and a
|
|
57223
|
+
// stale body with `overflow: hidden` visually clips the correctly-sized
|
|
57224
|
+
// root. `hyperframes check`'s layout audits can't see it: they measure
|
|
57225
|
+
// against the root's own (already-correct) rect, not the body's.
|
|
57226
|
+
//
|
|
57227
|
+
// A sub-composition fragment has no html/body or viewport to compare
|
|
57228
|
+
// against, which makes this top-level-only without a separate guard.
|
|
57229
|
+
({ rootTag, source }) => {
|
|
57230
|
+
if (!rootTag) return [];
|
|
57231
|
+
const dataWidth = readAttr(rootTag.raw, "data-width");
|
|
57232
|
+
const dataHeight = readAttr(rootTag.raw, "data-height");
|
|
57233
|
+
if (!dataWidth || !dataHeight) return [];
|
|
57234
|
+
const mismatches = findScaffoldSizeMismatches(source, dataWidth, dataHeight);
|
|
57235
|
+
if (mismatches.length === 0) return [];
|
|
57236
|
+
return [
|
|
57237
|
+
{
|
|
57238
|
+
code: "root_dimensions_mismatch",
|
|
57239
|
+
severity: "warning",
|
|
57240
|
+
message: `Root composition declares data-width="${dataWidth}" data-height="${dataHeight}", but ${mismatches.join(" and ")}. The scaffolded body clips the composition at its old size.`,
|
|
57241
|
+
elementId: readAttr(rootTag.raw, "id") || void 0,
|
|
57242
|
+
fixHint: "update html/body CSS and the meta viewport to match, or scaffold with `hyperframes init --resolution portrait`",
|
|
57243
|
+
snippet: truncateSnippet(rootTag.raw)
|
|
57244
|
+
}
|
|
57245
|
+
];
|
|
57246
|
+
},
|
|
57184
57247
|
// unbalanced_style_tags
|
|
57185
57248
|
({ source }) => {
|
|
57186
57249
|
let opens = 0;
|