rayzee 9.4.1 → 9.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +226 -25
- package/dist/ActiveColor-YvuQq44O.js +13 -0
- package/dist/ArchiveImporter-xuUJiklP.js +4301 -0
- package/dist/AssetConfig-DSEntE65.js +30 -0
- package/dist/BidirectionalIntegrator-C5PKjJoT.js +934 -0
- package/dist/ColorManagement-CheBCPaW.js +1488 -0
- package/dist/EngineDefaults-DH3bI5t-.js +844 -0
- package/dist/EngineEvents-Ci8dVWCP.js +73 -0
- package/dist/EngineIssues-CIZnXHsF.js +72 -0
- package/dist/FileFormats-sPGJeCRc.js +102 -0
- package/dist/Logger-BnHghprG.js +97 -0
- package/dist/{NeuralRetouch-vkdXXyK2.js → NeuralRetouch-CW11yLZ_.js} +8 -6
- package/dist/{NeuralSuperRes-FVqRJKQV.js → NeuralSuperRes-BekaecYg.js} +55 -120
- package/dist/PathTracer-Ccl9KOuF.js +29729 -0
- package/dist/PhysicalSky-Dv2PMFGW.js +1219 -0
- package/dist/RayzeeRenderer-BQxnzCTD.js +3542 -0
- package/dist/SolarLimb-ken-JbDK.js +721 -0
- package/dist/ToneMapGPU-BHi5JzIq.js +177 -0
- package/dist/ViewTransforms-D0rTLBsX.js +255 -0
- package/dist/WorkingMatrix-C6y233hT.js +27 -0
- package/dist/ZipReader-gDSWr0I5.js +98 -0
- package/dist/addons/archives.es.js +3 -0
- package/dist/addons/bidirectional.es.js +2 -0
- package/dist/addons/color.es.js +3 -0
- package/dist/addons/formats.es.js +2 -0
- package/dist/addons/physical-sky.es.js +2 -0
- package/dist/addons/storage.es.js +3 -0
- package/dist/archiveFormats-BZw7TiDp.js +75 -0
- package/dist/identity-DrQsGT2o.js +39 -0
- package/dist/openStorage-DwcBRUj7.js +820 -0
- package/dist/rayzee-core.es.js +12 -0
- package/dist/rayzee.es.js +2266 -44125
- package/dist/rayzee.umd.js +485 -473
- package/dist/sceneCachePolicy-BmwYOYDu.js +183 -0
- package/dist/shared-BGBcSxBQ.js +17 -0
- package/package.json +23 -2
- package/src/Color/ActiveColor.js +34 -0
- package/src/Color/BasicColor.js +147 -0
- package/src/Color/ColorManagement.js +7 -31
- package/src/EngineDefaults.js +23 -14
- package/src/EngineEvents.js +2 -0
- package/src/EngineIssues.js +1 -0
- package/src/PathTracerApp.js +617 -4016
- package/src/Pipeline/PipelineContext.js +0 -4
- package/src/Platform.js +36 -0
- package/src/Processor/ArchiveCache.js +1 -1
- package/src/Processor/ArchiveImporter.js +1259 -0
- package/src/Processor/AssetLoader.js +322 -1746
- package/src/Processor/AtmosphereModel.js +1 -2
- package/src/Processor/BVHBuilder.js +4 -95
- package/src/Processor/EnvironmentExactTable.js +187 -0
- package/src/Processor/EquirectHDRInfo.js +30 -223
- package/src/Processor/FileFormats.js +116 -0
- package/src/Processor/GLTFDecoders.js +85 -0
- package/src/Processor/GLTFDiffuseTransmission.js +63 -0
- package/src/Processor/GeometryExtractor.js +12 -1
- package/src/Processor/IESParser.js +47 -35
- package/src/Processor/KernelManager.js +35 -2
- package/src/Processor/MaterialPacking.js +8 -7
- package/src/Processor/PBRT/PBRTMaterials.js +129 -41
- package/src/Processor/PBRT/PBRTParser.js +30 -17
- package/src/Processor/PBRT/PBRTSceneBuilder.js +548 -37
- package/src/Processor/PBRT/PBRTTextureBake.js +154 -0
- package/src/Processor/PBRT/PFM.js +59 -0
- package/src/Processor/PackedRayBuffer.js +116 -9
- package/src/Processor/ParallelBVHBuilder.js +3 -6
- package/src/Processor/PhysicalSky.js +5 -4
- package/src/Processor/PlatformImageLoader.js +50 -6
- package/src/Processor/QueueManager.js +12 -3
- package/src/Processor/ReinsertionOptimizer.js +2 -2
- package/src/Processor/SceneProcessor.js +15 -55
- package/src/Processor/ShaderBuilder.js +6 -16
- package/src/Processor/SimpleSky.js +1 -62
- package/src/Processor/SolarLimb.js +3 -0
- package/src/Processor/TextureCreator.js +1 -1
- package/src/Processor/Workers/BVHSubtreeWorker.js +1 -34
- package/src/Processor/Workers/BVHWorker.js +5 -18
- package/src/Processor/Workers/CDFWorker.js +6 -183
- package/src/Processor/archiveFormats.js +7 -0
- package/src/Processor/utils.js +2 -1
- package/src/RayzeeRenderer.js +3902 -0
- package/src/RenderSettings.js +49 -41
- package/src/Stages/ASVGF.js +5 -7
- package/src/Stages/AutoExposure.js +3 -12
- package/src/Stages/Compositor.js +8 -23
- package/src/Stages/NRD.js +9 -2
- package/src/Stages/NormalDepth.js +9 -6
- package/src/Stages/PathTracer.js +254 -38
- package/src/Stages/PathTracerStage.js +11 -16
- package/src/Storage/BLASCache.js +1 -1
- package/src/Storage/CDFCache.js +18 -17
- package/src/Storage/DownloadCache.js +1 -1
- package/src/Storage/SceneGraphCodec.js +46 -3
- package/src/Storage/SpillStore.js +1 -1
- package/src/Storage/StorageManager.js +2 -4
- package/src/Storage/areas.js +4 -0
- package/src/TSL/BVHTraversal.js +62 -24
- package/src/TSL/Bidirectional.js +204 -0
- package/src/TSL/BidirectionalLamps.js +132 -0
- package/src/TSL/Clearcoat.js +15 -6
- package/src/TSL/Common.js +19 -14
- package/src/TSL/ConnectKernel.js +147 -0
- package/src/TSL/Debugger.js +1 -1
- package/src/TSL/Displacement.js +4 -3
- package/src/TSL/EmissiveSampling.js +64 -17
- package/src/TSL/Environment.js +77 -106
- package/src/TSL/EnvironmentCDF.js +85 -39
- package/src/TSL/ExtendKernel.js +8 -3
- package/src/TSL/FinalWriteKernel.js +4 -4
- package/src/TSL/GenerateKernel.js +18 -4
- package/src/TSL/HitFacet.js +35 -5
- package/src/TSL/LightBVHSampling.js +40 -9
- package/src/TSL/LightGenerateKernel.js +293 -0
- package/src/TSL/LightGuide.js +198 -0
- package/src/TSL/LightSplatKernel.js +165 -0
- package/src/TSL/LightsCore.js +13 -38
- package/src/TSL/LightsDirect.js +28 -29
- package/src/TSL/LightsIndirect.js +3 -1
- package/src/TSL/LightsSampling.js +90 -38
- package/src/TSL/MaterialEvaluation.js +113 -31
- package/src/TSL/MaterialProperties.js +44 -17
- package/src/TSL/MaterialTransmission.js +52 -47
- package/src/TSL/MergeKernel.js +218 -0
- package/src/TSL/PathTracerCore.js +65 -29
- package/src/TSL/Random.js +4 -0
- package/src/TSL/SceneResources.js +51 -0
- package/src/TSL/ShadeKernel.js +881 -103
- package/src/TSL/Struct.js +10 -0
- package/src/TSL/Sun.js +1 -1
- package/src/TSL/TextureSampling.js +65 -60
- package/src/addons/archives.js +14 -0
- package/src/addons/bidirectional.js +13 -0
- package/src/addons/color.js +32 -0
- package/src/addons/formats.js +16 -0
- package/src/addons/physicalSky.js +14 -0
- package/src/addons/storage.js +19 -0
- package/src/core.js +35 -0
- package/src/index.js +3 -1
- package/src/integrators/BidirectionalIntegrator.js +832 -0
- package/src/managers/EnvironmentManager.js +94 -91
- package/src/managers/MaterialDataManager.js +42 -0
- package/src/managers/UniformManager.js +0 -1
- package/dist/ToneMapGPU-DKQM1pMd.js +0 -552
- package/dist/rolldown-runtime-CAFD8bLK.js +0 -11
- package/src/Processor/TreeletOptimizer.js +0 -574
|
@@ -0,0 +1,1488 @@
|
|
|
1
|
+
import { r as e } from "./Logger-BnHghprG.js";
|
|
2
|
+
import { n as t } from "./EngineIssues-CIZnXHsF.js";
|
|
3
|
+
import { a as n, n as r, t as i } from "./WorkingMatrix-C6y233hT.js";
|
|
4
|
+
import { i as a, n as o, r as s, t as c } from "./ActiveColor-YvuQq44O.js";
|
|
5
|
+
import { n as l } from "./AssetConfig-DSEntE65.js";
|
|
6
|
+
import { a as u, c as d, d as f, f as p, g as m, h, i as g, l as _, m as v, p as ee, s as te, t as ne, u as re } from "./ViewTransforms-D0rTLBsX.js";
|
|
7
|
+
import { Fn as ie, If as y, clamp as b, float as x, floor as ae, ivec3 as S, log2 as oe, max as se, texture3DLoad as ce, vec3 as C } from "three/tsl";
|
|
8
|
+
import { ClampToEdgeWrapping as le, Data3DTexture as ue, HalfFloatType as de, LinearSRGBColorSpace as fe, NearestFilter as pe, NoColorSpace as me, RGBAFormat as he, SRGBColorSpace as ge } from "three";
|
|
9
|
+
//#region src/Color/Displays.js
|
|
10
|
+
function _e(e) {
|
|
11
|
+
let t = String(e ?? "");
|
|
12
|
+
return /(hdr|pq|hlg|2100|st2084)/i.test(t) ? null : /^display\s*p3\b/i.test(t) ? "display-p3" : /^(srgb|rec\.?\s*1886|bt\.?\s*1886|gamma\s*2\.2\s*rec\.?\s*709)\b(?!.*(p3|2020))/i.test(t) ? "srgb" : null;
|
|
13
|
+
}
|
|
14
|
+
//#endregion
|
|
15
|
+
//#region src/Color/OcioRuntime.js
|
|
16
|
+
var w = e("ocio");
|
|
17
|
+
function ve(e) {
|
|
18
|
+
let t = String(e);
|
|
19
|
+
/\[OpenColorIO Error\]/.test(t) ? w.error(t) : /\[OpenColorIO Warning\]/.test(t) ? w.warn(t) : w.debug(t);
|
|
20
|
+
}
|
|
21
|
+
var T = null, E = null, D = null, O = null, k = null;
|
|
22
|
+
async function ye() {
|
|
23
|
+
let { ocioRuntimeFactory: e, ocioRuntimeUrl: t } = l();
|
|
24
|
+
if (typeof e == "function") return await e();
|
|
25
|
+
if (typeof t == "string" && t) return await import(
|
|
26
|
+
/* @vite-ignore */
|
|
27
|
+
t
|
|
28
|
+
);
|
|
29
|
+
throw Error("OpenColorIO runtime not configured. Call configureAssets({ ocioRuntimeFactory: () => import('@bb-studio/ocio') }) before loading a config.");
|
|
30
|
+
}
|
|
31
|
+
async function be() {
|
|
32
|
+
return E || (T ||= (async () => {
|
|
33
|
+
let e = await ye();
|
|
34
|
+
if (typeof e.createOcioRuntime != "function") throw Error("OCIO module has no createOcioRuntime() — wrong package or version");
|
|
35
|
+
let { ocioWasmUrl: t } = l();
|
|
36
|
+
return E = await e.createOcioRuntime({
|
|
37
|
+
...t ? { wasmUrl: t } : {},
|
|
38
|
+
moduleOptions: {
|
|
39
|
+
print: ve,
|
|
40
|
+
printErr: ve
|
|
41
|
+
}
|
|
42
|
+
}), E;
|
|
43
|
+
})().catch((e) => {
|
|
44
|
+
throw T = null, e;
|
|
45
|
+
}), await T);
|
|
46
|
+
}
|
|
47
|
+
async function xe() {
|
|
48
|
+
return (await be()).ocio.listBuiltinConfigs();
|
|
49
|
+
}
|
|
50
|
+
async function Se({ builtin: e, text: t, files: n = [], configPath: r = "config.ocio", id: i } = {}) {
|
|
51
|
+
let a = await be();
|
|
52
|
+
if (e) D = a.loadBuiltinConfig(e), O = e, k = we(a, e);
|
|
53
|
+
else {
|
|
54
|
+
let e = n.map((e) => ({
|
|
55
|
+
relativePath: e.relativePath ?? e.path ?? e.name,
|
|
56
|
+
data: e.data instanceof Uint8Array ? e.data : new Uint8Array(e.data)
|
|
57
|
+
}));
|
|
58
|
+
if (t !== void 0 && e.unshift({
|
|
59
|
+
relativePath: r,
|
|
60
|
+
data: new TextEncoder().encode(t)
|
|
61
|
+
}), !e.some((e) => e.relativePath === r)) throw Error(`config package has no "${r}" — pass configPath to name the .ocio file`);
|
|
62
|
+
D = a.loadConfigPackage({
|
|
63
|
+
configRelativePath: r,
|
|
64
|
+
files: e
|
|
65
|
+
}, i ? { id: i } : void 0), O = i ?? D.id;
|
|
66
|
+
let o = e.find((e) => e.relativePath === r);
|
|
67
|
+
k = o ? new TextDecoder().decode(o.data) : null;
|
|
68
|
+
}
|
|
69
|
+
return N();
|
|
70
|
+
}
|
|
71
|
+
function Ce() {
|
|
72
|
+
D = null, O = null, k = null;
|
|
73
|
+
}
|
|
74
|
+
function A() {
|
|
75
|
+
return D !== null;
|
|
76
|
+
}
|
|
77
|
+
function j() {
|
|
78
|
+
return D ? E : null;
|
|
79
|
+
}
|
|
80
|
+
function M() {
|
|
81
|
+
return D;
|
|
82
|
+
}
|
|
83
|
+
function N() {
|
|
84
|
+
if (!D) return null;
|
|
85
|
+
let e = Object.fromEntries(D.roles.map((e) => [e.name, e.colorSpace]));
|
|
86
|
+
return {
|
|
87
|
+
id: O,
|
|
88
|
+
name: k?.match(/^name:\s*(\S.*?)\s*$/m)?.[1] ?? null,
|
|
89
|
+
ocioVersion: D.ocioVersion,
|
|
90
|
+
version: D.version,
|
|
91
|
+
roles: e,
|
|
92
|
+
sceneLinear: e.scene_linear ?? null,
|
|
93
|
+
colorPicking: e.color_picking ?? e.texture_paint ?? null,
|
|
94
|
+
texturePaint: e.texture_paint ?? e.color_picking ?? null,
|
|
95
|
+
data: e.data ?? null,
|
|
96
|
+
compositingLog: e.compositing_log ?? e.color_timing ?? null,
|
|
97
|
+
colorSpaces: D.colorSpaces.map((e) => ({
|
|
98
|
+
name: e.name,
|
|
99
|
+
family: e.family,
|
|
100
|
+
categories: e.categories ?? [],
|
|
101
|
+
encoding: e.encoding,
|
|
102
|
+
isData: e.isData,
|
|
103
|
+
aliases: e.aliases,
|
|
104
|
+
description: e.description
|
|
105
|
+
})),
|
|
106
|
+
displays: D.displays.slice(),
|
|
107
|
+
defaultDisplay: D.defaultDisplay,
|
|
108
|
+
views: Object.fromEntries(Object.entries(D.viewsByDisplay).map(([e, t]) => [e, t.map((e) => ({
|
|
109
|
+
name: e.name,
|
|
110
|
+
transform: e.transform,
|
|
111
|
+
colorSpace: e.colorSpace,
|
|
112
|
+
looks: e.looks,
|
|
113
|
+
description: e.description
|
|
114
|
+
}))])),
|
|
115
|
+
defaultViews: { ...D.defaultViewsByDisplay },
|
|
116
|
+
looks: D.looks.map((e) => ({
|
|
117
|
+
name: e.name,
|
|
118
|
+
processSpace: e.processSpace,
|
|
119
|
+
description: e.description,
|
|
120
|
+
forward: e.hasForwardTransform,
|
|
121
|
+
inverse: e.hasInverseTransform
|
|
122
|
+
})),
|
|
123
|
+
namedTransforms: D.namedTransforms.map((e) => e.name),
|
|
124
|
+
fileRules: D.fileRules.map((e) => ({
|
|
125
|
+
index: e.index,
|
|
126
|
+
name: e.name,
|
|
127
|
+
colorSpace: e.colorSpace,
|
|
128
|
+
pattern: e.pattern,
|
|
129
|
+
extension: e.extension,
|
|
130
|
+
regex: e.regex
|
|
131
|
+
})),
|
|
132
|
+
contextVariables: Te()
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
function we(e, t) {
|
|
136
|
+
try {
|
|
137
|
+
return e.ocio.getBuiltinConfigYaml(t);
|
|
138
|
+
} catch {
|
|
139
|
+
return null;
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
function Te() {
|
|
143
|
+
if (!k) return [];
|
|
144
|
+
let e = /* @__PURE__ */ new Map(), t = k.split(/\r?\n/), n = t.findIndex((e) => /^environment:\s*(\{\s*\})?\s*$/.test(e));
|
|
145
|
+
if (n >= 0 && !/\{\s*\}/.test(t[n])) for (let r = n + 1; r < t.length; r++) {
|
|
146
|
+
let n = t[r];
|
|
147
|
+
if (/^\S/.test(n)) break;
|
|
148
|
+
let i = n.match(/^\s+([A-Za-z_][A-Za-z0-9_]*)\s*:\s*(.*?)\s*$/);
|
|
149
|
+
i && e.set(i[1], {
|
|
150
|
+
name: i[1],
|
|
151
|
+
default: i[2].replace(/^["']|["']$/g, "") || null,
|
|
152
|
+
declared: !0
|
|
153
|
+
});
|
|
154
|
+
}
|
|
155
|
+
for (let t of k.matchAll(/\$\{?([A-Za-z_][A-Za-z0-9_]*)\}?/g)) e.has(t[1]) || e.set(t[1], {
|
|
156
|
+
name: t[1],
|
|
157
|
+
default: null,
|
|
158
|
+
declared: !1
|
|
159
|
+
});
|
|
160
|
+
return [...e.values()].sort((e, t) => e.name.localeCompare(t.name));
|
|
161
|
+
}
|
|
162
|
+
function Ee() {
|
|
163
|
+
Ce(), E?.dispose?.(), E = null, T = null;
|
|
164
|
+
}
|
|
165
|
+
//#endregion
|
|
166
|
+
//#region src/Color/ColorSpaces.js
|
|
167
|
+
var P = 1 << 20, F = /* @__PURE__ */ new Map(), I = /* @__PURE__ */ new Map(), De = 4096, L = /* @__PURE__ */ new Map();
|
|
168
|
+
function R(e, t, n) {
|
|
169
|
+
return `${e}\u0000${t}\u0000${n ? JSON.stringify(n) : ""}`;
|
|
170
|
+
}
|
|
171
|
+
function z() {
|
|
172
|
+
for (let e of F.values()) e.dispose?.();
|
|
173
|
+
F.clear(), I.clear(), L.clear();
|
|
174
|
+
}
|
|
175
|
+
function B(e, t, { context: n = null } = {}) {
|
|
176
|
+
if (!j() || e === t) return null;
|
|
177
|
+
let r = R(e, t, n), i = F.get(r);
|
|
178
|
+
if (i !== void 0) return i;
|
|
179
|
+
try {
|
|
180
|
+
i = Oe().createColorSpaceProcessor(e, t, n ? { context: n } : void 0), i.isNoOp && (i.dispose(), i = null);
|
|
181
|
+
} catch (n) {
|
|
182
|
+
throw Error(`no OCIO transform from "${e}" to "${t}": ${n.message}`);
|
|
183
|
+
}
|
|
184
|
+
return F.set(r, i), i;
|
|
185
|
+
}
|
|
186
|
+
var V = null, H = null, U = !1;
|
|
187
|
+
function Oe() {
|
|
188
|
+
let e = j();
|
|
189
|
+
if (!e) throw Error("no OCIO config loaded");
|
|
190
|
+
if (e.config) return e.config;
|
|
191
|
+
let t = M();
|
|
192
|
+
if (V && H === t.id) return V;
|
|
193
|
+
if (U && V?.dispose?.(), !t.id?.startsWith("ocio://")) throw Error("OCIO runtime exposes no Config handle for this config");
|
|
194
|
+
return V = e.ocio.createBuiltinConfig(t.id), U = !0, H = t.id, V;
|
|
195
|
+
}
|
|
196
|
+
function W() {
|
|
197
|
+
U && V?.dispose?.(), V = null, H = null, U = !1, z();
|
|
198
|
+
}
|
|
199
|
+
function G(e, t, n, { context: r = null } = {}) {
|
|
200
|
+
let i = j();
|
|
201
|
+
if (!i || t === n) return [
|
|
202
|
+
e[0],
|
|
203
|
+
e[1],
|
|
204
|
+
e[2]
|
|
205
|
+
];
|
|
206
|
+
let a = `${R(t, n, r)}\u0000${e[0]},${e[1]},${e[2]}`, o = I.get(a);
|
|
207
|
+
if (o) return o.slice();
|
|
208
|
+
let s = i.transformRgb(t, n, [
|
|
209
|
+
e[0],
|
|
210
|
+
e[1],
|
|
211
|
+
e[2]
|
|
212
|
+
], r ? { context: r } : void 0);
|
|
213
|
+
return I.size >= De && I.clear(), I.set(a, s), s.slice();
|
|
214
|
+
}
|
|
215
|
+
function K(e, t, n, { context: r = null } = {}) {
|
|
216
|
+
if (e.length % 4 != 0) throw Error("convertPixelsF32 wants 4 floats per pixel");
|
|
217
|
+
let i = B(t, n, { context: r });
|
|
218
|
+
if (!i) return e;
|
|
219
|
+
let a = e.length / 4;
|
|
220
|
+
if (a <= P) return i.applyRGBAF32(e), e;
|
|
221
|
+
for (let t = 0; t < a; t += P) {
|
|
222
|
+
let n = Math.min(P, a - t);
|
|
223
|
+
i.applyRGBAF32(e.subarray(t * 4, (t + n) * 4));
|
|
224
|
+
}
|
|
225
|
+
return e;
|
|
226
|
+
}
|
|
227
|
+
var q = .055;
|
|
228
|
+
function ke(e) {
|
|
229
|
+
return e <= .04045 ? e / 12.92 : ((e + q) / (1 + q)) ** 2.4;
|
|
230
|
+
}
|
|
231
|
+
function Ae(e) {
|
|
232
|
+
return e <= 0 ? 0 : e <= .0031308 ? 12.92 * e : (1 + q) * e ** (1 / 2.4) - q;
|
|
233
|
+
}
|
|
234
|
+
var je = new Float32Array(256);
|
|
235
|
+
for (let e = 0; e < 256; e++) je[e] = ke(e / 255);
|
|
236
|
+
var Me = new Float32Array(256);
|
|
237
|
+
for (let e = 0; e < 256; e++) Me[e] = e / 255;
|
|
238
|
+
function Ne(e) {
|
|
239
|
+
return e === "srgb" ? je : Me;
|
|
240
|
+
}
|
|
241
|
+
function Pe(e, t, n, { context: r = null, inputEncoding: i = "raw", outputEncoding: a = "srgb" } = {}) {
|
|
242
|
+
if (e.length % 4 != 0) throw Error("convertEncodedRGBA8 wants 4 bytes per pixel");
|
|
243
|
+
let o = B(t, n, { context: r });
|
|
244
|
+
if (!o) return e;
|
|
245
|
+
let s = e.length / 4, c = Ne(i), l = a === "srgb" ? Ie : Le, u = new Float32Array(Math.min(P, s) * 4);
|
|
246
|
+
for (let t = 0; t < s; t += P) {
|
|
247
|
+
let n = Math.min(P, s - t), r = n * 4 === u.length ? u : u.subarray(0, n * 4);
|
|
248
|
+
for (let i = 0; i < n; i++) {
|
|
249
|
+
let n = (t + i) * 4, a = i * 4;
|
|
250
|
+
r[a] = c[e[n]], r[a + 1] = c[e[n + 1]], r[a + 2] = c[e[n + 2]], r[a + 3] = 1;
|
|
251
|
+
}
|
|
252
|
+
o.applyRGBAF32(r);
|
|
253
|
+
for (let i = 0; i < n; i++) {
|
|
254
|
+
let n = (t + i) * 4, a = i * 4;
|
|
255
|
+
e[n] = l(r[a]), e[n + 1] = l(r[a + 1]), e[n + 2] = l(r[a + 2]);
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
return e;
|
|
259
|
+
}
|
|
260
|
+
var J = 65536, Fe = new Uint8Array(J + 1);
|
|
261
|
+
for (let e = 0; e <= J; e++) {
|
|
262
|
+
let t = e / J;
|
|
263
|
+
Fe[e] = Math.round(Ae(t * t) * 255);
|
|
264
|
+
}
|
|
265
|
+
function Ie(e) {
|
|
266
|
+
return e > 0 ? e >= 1 ? 255 : Fe[Math.sqrt(e) * J + .5 | 0] : 0;
|
|
267
|
+
}
|
|
268
|
+
function Le(e) {
|
|
269
|
+
return e > 0 ? e >= 1 ? 255 : e * 255 + .5 | 0 : 0;
|
|
270
|
+
}
|
|
271
|
+
function Re(e, t, n = "srgb") {
|
|
272
|
+
if (!t) return e;
|
|
273
|
+
let r = Ne(n), i = n === "srgb" ? Ie : Le, [a, o, s, c, l, u, d, f, p] = t;
|
|
274
|
+
for (let t = 0; t < e.length; t += 4) {
|
|
275
|
+
let n = r[e[t]], m = r[e[t + 1]], h = r[e[t + 2]];
|
|
276
|
+
e[t] = i(a * n + o * m + s * h), e[t + 1] = i(c * n + l * m + u * h), e[t + 2] = i(d * n + f * m + p * h);
|
|
277
|
+
}
|
|
278
|
+
return e;
|
|
279
|
+
}
|
|
280
|
+
function ze(e, t, { context: n = null, tolerance: r = 1e-4 } = {}) {
|
|
281
|
+
if (!j()) return null;
|
|
282
|
+
if (e === t) return [
|
|
283
|
+
1,
|
|
284
|
+
0,
|
|
285
|
+
0,
|
|
286
|
+
0,
|
|
287
|
+
1,
|
|
288
|
+
0,
|
|
289
|
+
0,
|
|
290
|
+
0,
|
|
291
|
+
1
|
|
292
|
+
];
|
|
293
|
+
let i = R(e, t, n);
|
|
294
|
+
if (L.has(i)) return L.get(i);
|
|
295
|
+
let a = B(e, t, { context: n });
|
|
296
|
+
if (!a) return L.set(i, [
|
|
297
|
+
1,
|
|
298
|
+
0,
|
|
299
|
+
0,
|
|
300
|
+
0,
|
|
301
|
+
1,
|
|
302
|
+
0,
|
|
303
|
+
0,
|
|
304
|
+
0,
|
|
305
|
+
1
|
|
306
|
+
]), L.get(i);
|
|
307
|
+
let o = (e) => {
|
|
308
|
+
let t = new Float32Array([
|
|
309
|
+
e[0],
|
|
310
|
+
e[1],
|
|
311
|
+
e[2],
|
|
312
|
+
1
|
|
313
|
+
]);
|
|
314
|
+
return a.applyRGBAF32(t), [
|
|
315
|
+
t[0],
|
|
316
|
+
t[1],
|
|
317
|
+
t[2]
|
|
318
|
+
];
|
|
319
|
+
}, s = [
|
|
320
|
+
o([
|
|
321
|
+
1,
|
|
322
|
+
0,
|
|
323
|
+
0
|
|
324
|
+
]),
|
|
325
|
+
o([
|
|
326
|
+
0,
|
|
327
|
+
1,
|
|
328
|
+
0
|
|
329
|
+
]),
|
|
330
|
+
o([
|
|
331
|
+
0,
|
|
332
|
+
0,
|
|
333
|
+
1
|
|
334
|
+
])
|
|
335
|
+
], c = [
|
|
336
|
+
s[0][0],
|
|
337
|
+
s[1][0],
|
|
338
|
+
s[2][0],
|
|
339
|
+
s[0][1],
|
|
340
|
+
s[1][1],
|
|
341
|
+
s[2][1],
|
|
342
|
+
s[0][2],
|
|
343
|
+
s[1][2],
|
|
344
|
+
s[2][2]
|
|
345
|
+
], l = (e) => [
|
|
346
|
+
c[0] * e[0] + c[1] * e[1] + c[2] * e[2],
|
|
347
|
+
c[3] * e[0] + c[4] * e[1] + c[5] * e[2],
|
|
348
|
+
c[6] * e[0] + c[7] * e[1] + c[8] * e[2]
|
|
349
|
+
], u = [
|
|
350
|
+
[
|
|
351
|
+
.18,
|
|
352
|
+
.18,
|
|
353
|
+
.18
|
|
354
|
+
],
|
|
355
|
+
[
|
|
356
|
+
.5,
|
|
357
|
+
.25,
|
|
358
|
+
.75
|
|
359
|
+
],
|
|
360
|
+
[
|
|
361
|
+
2,
|
|
362
|
+
.1,
|
|
363
|
+
.4
|
|
364
|
+
],
|
|
365
|
+
[
|
|
366
|
+
.02,
|
|
367
|
+
.9,
|
|
368
|
+
.3
|
|
369
|
+
],
|
|
370
|
+
[
|
|
371
|
+
8,
|
|
372
|
+
4,
|
|
373
|
+
1
|
|
374
|
+
],
|
|
375
|
+
[
|
|
376
|
+
.001,
|
|
377
|
+
.002,
|
|
378
|
+
.004
|
|
379
|
+
]
|
|
380
|
+
], d = !0;
|
|
381
|
+
for (let e of u) {
|
|
382
|
+
let t = o(e), n = l(e), i = Math.max(.001, Math.abs(n[0]), Math.abs(n[1]), Math.abs(n[2]));
|
|
383
|
+
for (let e = 0; e < 3; e++) Math.abs(t[e] - n[e]) > r * i && (d = !1);
|
|
384
|
+
if (!d) break;
|
|
385
|
+
}
|
|
386
|
+
let f = d ? c : null;
|
|
387
|
+
return L.set(i, f), f;
|
|
388
|
+
}
|
|
389
|
+
function Be(e) {
|
|
390
|
+
let t = M();
|
|
391
|
+
if (!t) return !1;
|
|
392
|
+
let n = t.colorSpaces.find((t) => t.name === e || t.aliases?.includes(e));
|
|
393
|
+
return n ? n.isData : !1;
|
|
394
|
+
}
|
|
395
|
+
function Y(e) {
|
|
396
|
+
let t = M();
|
|
397
|
+
return !t || !e ? !1 : t.colorSpaces.some((t) => t.name === e || t.aliases?.includes(e));
|
|
398
|
+
}
|
|
399
|
+
//#endregion
|
|
400
|
+
//#region src/Color/LutBake.js
|
|
401
|
+
var Ve = 1e-10;
|
|
402
|
+
function He(e, t, n, r) {
|
|
403
|
+
return e <= 0 ? 0 : 2 ** (n + e / (t - 1) * (r - n));
|
|
404
|
+
}
|
|
405
|
+
function Ue(e, t, n, r) {
|
|
406
|
+
let i = (Math.log2(Math.max(e, Ve)) - n) / (r - n);
|
|
407
|
+
return Math.min(Math.max(i, 0), 1) * (t - 1);
|
|
408
|
+
}
|
|
409
|
+
function We({ size: e, minEv: t, maxEv: n, apply: r }) {
|
|
410
|
+
let i = e * e * e, a = new Float32Array(i * 4), o = new Float64Array(e);
|
|
411
|
+
for (let r = 0; r < e; r++) o[r] = He(r, e, t, n);
|
|
412
|
+
let s = 0;
|
|
413
|
+
for (let t = 0; t < e; t++) for (let n = 0; n < e; n++) for (let r = 0; r < e; r++) a[s++] = o[r], a[s++] = o[n], a[s++] = o[t], a[s++] = 1;
|
|
414
|
+
return r(a), a;
|
|
415
|
+
}
|
|
416
|
+
function Ge(e) {
|
|
417
|
+
let t = new Uint16Array(e.length), n = new Float32Array(1), r = new Uint32Array(n.buffer);
|
|
418
|
+
for (let i = 0; i < e.length; i++) {
|
|
419
|
+
n[0] = e[i];
|
|
420
|
+
let a = r[0], o = a >>> 16 & 32768, s = a >>> 23 & 255, c = a & 8388607;
|
|
421
|
+
if (s === 255) t[i] = o | 31744 | (c ? 512 : 0);
|
|
422
|
+
else if (s > 142) t[i] = o | 31743;
|
|
423
|
+
else if (s < 113) {
|
|
424
|
+
let e = 13 + (113 - s);
|
|
425
|
+
c |= 8388608, t[i] = e >= 32 ? o : o | c >>> e;
|
|
426
|
+
} else {
|
|
427
|
+
let e = o | s - 112 << 10 | c >>> 13, n = c & 8191;
|
|
428
|
+
(n > 4096 || n === 4096 && e & 1) && e++, t[i] = (e & 32767) >= 31744 ? o | 31743 : e;
|
|
429
|
+
}
|
|
430
|
+
}
|
|
431
|
+
return t;
|
|
432
|
+
}
|
|
433
|
+
function Ke(e, t = new Float32Array(e.length)) {
|
|
434
|
+
for (let n = 0; n < e.length; n++) {
|
|
435
|
+
let r = e[n], i = r & 32768 ? -1 : 1, a = (r & 31744) >> 10, o = r & 1023;
|
|
436
|
+
a === 0 ? t[n] = i * 2 ** -14 * (o / 1024) : a === 31 ? t[n] = o ? NaN : i * Infinity : t[n] = i * 2 ** (a - 15) * (1 + o / 1024);
|
|
437
|
+
}
|
|
438
|
+
return t;
|
|
439
|
+
}
|
|
440
|
+
var qe = null;
|
|
441
|
+
function Je() {
|
|
442
|
+
if (!qe) {
|
|
443
|
+
let e = new Uint16Array(65536);
|
|
444
|
+
for (let t = 0; t < 65536; t++) e[t] = t;
|
|
445
|
+
qe = Ke(e);
|
|
446
|
+
}
|
|
447
|
+
return qe;
|
|
448
|
+
}
|
|
449
|
+
function Ye(e, t, n) {
|
|
450
|
+
return e > t ? t > n ? {
|
|
451
|
+
w: [
|
|
452
|
+
e,
|
|
453
|
+
t,
|
|
454
|
+
n
|
|
455
|
+
],
|
|
456
|
+
c: [
|
|
457
|
+
[
|
|
458
|
+
1,
|
|
459
|
+
0,
|
|
460
|
+
0
|
|
461
|
+
],
|
|
462
|
+
[
|
|
463
|
+
1,
|
|
464
|
+
1,
|
|
465
|
+
0
|
|
466
|
+
],
|
|
467
|
+
[
|
|
468
|
+
1,
|
|
469
|
+
1,
|
|
470
|
+
1
|
|
471
|
+
]
|
|
472
|
+
]
|
|
473
|
+
} : e > n ? {
|
|
474
|
+
w: [
|
|
475
|
+
e,
|
|
476
|
+
n,
|
|
477
|
+
t
|
|
478
|
+
],
|
|
479
|
+
c: [
|
|
480
|
+
[
|
|
481
|
+
1,
|
|
482
|
+
0,
|
|
483
|
+
0
|
|
484
|
+
],
|
|
485
|
+
[
|
|
486
|
+
1,
|
|
487
|
+
0,
|
|
488
|
+
1
|
|
489
|
+
],
|
|
490
|
+
[
|
|
491
|
+
1,
|
|
492
|
+
1,
|
|
493
|
+
1
|
|
494
|
+
]
|
|
495
|
+
]
|
|
496
|
+
} : {
|
|
497
|
+
w: [
|
|
498
|
+
n,
|
|
499
|
+
e,
|
|
500
|
+
t
|
|
501
|
+
],
|
|
502
|
+
c: [
|
|
503
|
+
[
|
|
504
|
+
0,
|
|
505
|
+
0,
|
|
506
|
+
1
|
|
507
|
+
],
|
|
508
|
+
[
|
|
509
|
+
1,
|
|
510
|
+
0,
|
|
511
|
+
1
|
|
512
|
+
],
|
|
513
|
+
[
|
|
514
|
+
1,
|
|
515
|
+
1,
|
|
516
|
+
1
|
|
517
|
+
]
|
|
518
|
+
]
|
|
519
|
+
} : n > t ? {
|
|
520
|
+
w: [
|
|
521
|
+
n,
|
|
522
|
+
t,
|
|
523
|
+
e
|
|
524
|
+
],
|
|
525
|
+
c: [
|
|
526
|
+
[
|
|
527
|
+
0,
|
|
528
|
+
0,
|
|
529
|
+
1
|
|
530
|
+
],
|
|
531
|
+
[
|
|
532
|
+
0,
|
|
533
|
+
1,
|
|
534
|
+
1
|
|
535
|
+
],
|
|
536
|
+
[
|
|
537
|
+
1,
|
|
538
|
+
1,
|
|
539
|
+
1
|
|
540
|
+
]
|
|
541
|
+
]
|
|
542
|
+
} : n > e ? {
|
|
543
|
+
w: [
|
|
544
|
+
t,
|
|
545
|
+
n,
|
|
546
|
+
e
|
|
547
|
+
],
|
|
548
|
+
c: [
|
|
549
|
+
[
|
|
550
|
+
0,
|
|
551
|
+
1,
|
|
552
|
+
0
|
|
553
|
+
],
|
|
554
|
+
[
|
|
555
|
+
0,
|
|
556
|
+
1,
|
|
557
|
+
1
|
|
558
|
+
],
|
|
559
|
+
[
|
|
560
|
+
1,
|
|
561
|
+
1,
|
|
562
|
+
1
|
|
563
|
+
]
|
|
564
|
+
]
|
|
565
|
+
} : {
|
|
566
|
+
w: [
|
|
567
|
+
t,
|
|
568
|
+
e,
|
|
569
|
+
n
|
|
570
|
+
],
|
|
571
|
+
c: [
|
|
572
|
+
[
|
|
573
|
+
0,
|
|
574
|
+
1,
|
|
575
|
+
0
|
|
576
|
+
],
|
|
577
|
+
[
|
|
578
|
+
1,
|
|
579
|
+
1,
|
|
580
|
+
0
|
|
581
|
+
],
|
|
582
|
+
[
|
|
583
|
+
1,
|
|
584
|
+
1,
|
|
585
|
+
1
|
|
586
|
+
]
|
|
587
|
+
]
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
function Xe({ data: e, size: t, minEv: n, maxEv: r }) {
|
|
591
|
+
let i = t * t, a = t - 1, o = e instanceof Uint16Array, s = o ? Je() : null, c = o ? (n, r, a, o) => s[e[(n + r * t + a * i) * 4 + o]] : (n, r, a, o) => e[(n + r * t + a * i) * 4 + o];
|
|
592
|
+
return function(e, i, o, s) {
|
|
593
|
+
let l = Ue(e, t, n, r), u = Ue(i, t, n, r), d = Ue(o, t, n, r), f = Math.min(Math.floor(l), a - 1), p = Math.min(Math.floor(u), a - 1), m = Math.min(Math.floor(d), a - 1), { w: h, c: g } = Ye(Math.min(Math.max(l - f, 0), 1), Math.min(Math.max(u - p, 0), 1), Math.min(Math.max(d - m, 0), 1));
|
|
594
|
+
for (let e = 0; e < 3; e++) {
|
|
595
|
+
let t = c(f, p, m, e), n = t, r = t;
|
|
596
|
+
for (let t = 0; t < 3; t++) {
|
|
597
|
+
let i = c(f + g[t][0], p + g[t][1], m + g[t][2], e);
|
|
598
|
+
n += (i - r) * h[t], r = i;
|
|
599
|
+
}
|
|
600
|
+
s[e] = n;
|
|
601
|
+
}
|
|
602
|
+
};
|
|
603
|
+
}
|
|
604
|
+
function Ze({ fnName: e, texName: t, size: n, minEv: r, maxEv: i }) {
|
|
605
|
+
let a = (e) => Number.isInteger(e) ? `${e}.0` : String(e);
|
|
606
|
+
return `
|
|
607
|
+
fn ${e}_shape( v: vec3<f32> ) -> vec3<f32> {
|
|
608
|
+
let ev = log2( max( v, vec3<f32>( 1e-10 ) ) );
|
|
609
|
+
let t = ( ev - vec3<f32>( ${a(r)} ) ) / ${a(i - r)};
|
|
610
|
+
return clamp( t, vec3<f32>( 0.0 ), vec3<f32>( 1.0 ) ) * ${a(n - 1)};
|
|
611
|
+
}
|
|
612
|
+
|
|
613
|
+
fn ${e}_fetch( i: vec3<i32> ) -> vec3<f32> {
|
|
614
|
+
return textureLoad( ${t}, clamp( i, vec3<i32>( 0 ), vec3<i32>( ${n - 1} ) ), 0 ).rgb;
|
|
615
|
+
}
|
|
616
|
+
|
|
617
|
+
fn ${e}( c: vec3<f32> ) -> vec3<f32> {
|
|
618
|
+
let p = ${e}_shape( c );
|
|
619
|
+
let i0 = clamp( vec3<i32>( floor( p ) ), vec3<i32>( 0 ), vec3<i32>( ${n - 2} ) );
|
|
620
|
+
let f = clamp( p - vec3<f32>( i0 ), vec3<f32>( 0.0 ), vec3<f32>( 1.0 ) );
|
|
621
|
+
|
|
622
|
+
let c000 = ${e}_fetch( i0 );
|
|
623
|
+
var w: vec3<f32>;
|
|
624
|
+
var o1: vec3<i32>;
|
|
625
|
+
var o2: vec3<i32>;
|
|
626
|
+
var o3: vec3<i32>;
|
|
627
|
+
|
|
628
|
+
if ( f.x > f.y ) {
|
|
629
|
+
if ( f.y > f.z ) {
|
|
630
|
+
w = vec3<f32>( f.x, f.y, f.z );
|
|
631
|
+
o1 = vec3<i32>( 1, 0, 0 ); o2 = vec3<i32>( 1, 1, 0 ); o3 = vec3<i32>( 1, 1, 1 );
|
|
632
|
+
} else if ( f.x > f.z ) {
|
|
633
|
+
w = vec3<f32>( f.x, f.z, f.y );
|
|
634
|
+
o1 = vec3<i32>( 1, 0, 0 ); o2 = vec3<i32>( 1, 0, 1 ); o3 = vec3<i32>( 1, 1, 1 );
|
|
635
|
+
} else {
|
|
636
|
+
w = vec3<f32>( f.z, f.x, f.y );
|
|
637
|
+
o1 = vec3<i32>( 0, 0, 1 ); o2 = vec3<i32>( 1, 0, 1 ); o3 = vec3<i32>( 1, 1, 1 );
|
|
638
|
+
}
|
|
639
|
+
} else {
|
|
640
|
+
if ( f.z > f.y ) {
|
|
641
|
+
w = vec3<f32>( f.z, f.y, f.x );
|
|
642
|
+
o1 = vec3<i32>( 0, 0, 1 ); o2 = vec3<i32>( 0, 1, 1 ); o3 = vec3<i32>( 1, 1, 1 );
|
|
643
|
+
} else if ( f.z > f.x ) {
|
|
644
|
+
w = vec3<f32>( f.y, f.z, f.x );
|
|
645
|
+
o1 = vec3<i32>( 0, 1, 0 ); o2 = vec3<i32>( 0, 1, 1 ); o3 = vec3<i32>( 1, 1, 1 );
|
|
646
|
+
} else {
|
|
647
|
+
w = vec3<f32>( f.y, f.x, f.z );
|
|
648
|
+
o1 = vec3<i32>( 0, 1, 0 ); o2 = vec3<i32>( 1, 1, 0 ); o3 = vec3<i32>( 1, 1, 1 );
|
|
649
|
+
}
|
|
650
|
+
}
|
|
651
|
+
|
|
652
|
+
let v1 = ${e}_fetch( i0 + o1 );
|
|
653
|
+
let v2 = ${e}_fetch( i0 + o2 );
|
|
654
|
+
let v3 = ${e}_fetch( i0 + o3 );
|
|
655
|
+
|
|
656
|
+
return c000 + ( v1 - c000 ) * w.x + ( v2 - v1 ) * w.y + ( v3 - v2 ) * w.z;
|
|
657
|
+
}
|
|
658
|
+
`;
|
|
659
|
+
}
|
|
660
|
+
function Qe({ sampler: e, apply: t, count: n = 4e3, seed: r = 31337 }) {
|
|
661
|
+
let i = r >>> 0, a = () => (i = i * 1664525 + 1013904223 >>> 0) / 4294967296, o = [];
|
|
662
|
+
for (let e = 0; e < n; e++) {
|
|
663
|
+
let e = .18 * 2 ** (-7 + a() * 13), t = a() ** 1.2, n = a() * 6, r = [
|
|
664
|
+
0,
|
|
665
|
+
1,
|
|
666
|
+
2
|
|
667
|
+
].map((e) => 1 - t * Math.min(1, Math.abs((n + e * 2) % 6 - 3))), i = Math.max(...r) || 1;
|
|
668
|
+
o.push(r.map((t) => Math.max(t, 0) / i * e));
|
|
669
|
+
}
|
|
670
|
+
let s = new Float32Array(o.length * 4);
|
|
671
|
+
o.forEach((e, t) => {
|
|
672
|
+
s[t * 4] = e[0], s[t * 4 + 1] = e[1], s[t * 4 + 2] = e[2], s[t * 4 + 3] = 1;
|
|
673
|
+
}), t(s);
|
|
674
|
+
let c = [
|
|
675
|
+
0,
|
|
676
|
+
0,
|
|
677
|
+
0
|
|
678
|
+
], l = [];
|
|
679
|
+
for (let t = 0; t < o.length; t++) {
|
|
680
|
+
e(o[t][0], o[t][1], o[t][2], c);
|
|
681
|
+
for (let e = 0; e < 3; e++) l.push(Math.abs(c[e] - s[t * 4 + e]) * 255);
|
|
682
|
+
}
|
|
683
|
+
return l.sort((e, t) => e - t), {
|
|
684
|
+
mean: l.reduce((e, t) => e + t, 0) / l.length,
|
|
685
|
+
p95: l[Math.floor(l.length * .95)],
|
|
686
|
+
max: l[l.length - 1],
|
|
687
|
+
samples: l.length
|
|
688
|
+
};
|
|
689
|
+
}
|
|
690
|
+
//#endregion
|
|
691
|
+
//#region src/Color/OcioViews.js
|
|
692
|
+
var $e = -12.47393, et = 12.5260688117, tt = 65, nt = null, X = /* @__PURE__ */ new Map();
|
|
693
|
+
function rt(e) {
|
|
694
|
+
nt = e;
|
|
695
|
+
}
|
|
696
|
+
function it() {
|
|
697
|
+
let e = j();
|
|
698
|
+
if (!e) throw Error("load an OCIO config first");
|
|
699
|
+
if (!e.config) throw Error("OCIO runtime exposes no Config handle");
|
|
700
|
+
return e.config;
|
|
701
|
+
}
|
|
702
|
+
function at({ source: e, display: t, view: n, look: r, context: i }) {
|
|
703
|
+
let a = it(), o = i ? { context: i } : void 0;
|
|
704
|
+
return r ? a.createGroupTransformProcessor([{
|
|
705
|
+
type: "look",
|
|
706
|
+
source: e,
|
|
707
|
+
destination: e,
|
|
708
|
+
looks: r
|
|
709
|
+
}, {
|
|
710
|
+
type: "displayView",
|
|
711
|
+
source: e,
|
|
712
|
+
display: t,
|
|
713
|
+
view: n
|
|
714
|
+
}], o) : a.createDisplayViewProcessor({
|
|
715
|
+
source: e,
|
|
716
|
+
display: t,
|
|
717
|
+
view: n,
|
|
718
|
+
...i ? { context: i } : {}
|
|
719
|
+
});
|
|
720
|
+
}
|
|
721
|
+
function ot({ texture: e, size: t, minEv: n, maxEv: r }) {
|
|
722
|
+
let i = t - 1, a = r - n, o = (t) => ce(e, b(t, S(0), S(i))).rgb;
|
|
723
|
+
return ie(([e, r]) => {
|
|
724
|
+
let s = b(oe(se(se(e.mul(r), C(0)), C(1e-10))).sub(x(n)).div(x(a)), C(0), C(1)).mul(x(i)).toVar(), c = b(S(ae(s)), S(0), S(t - 2)).toVar(), l = b(s.sub(C(c)), C(0), C(1)).toVar(), u = C(0).toVar(), d = S(0).toVar(), f = S(0).toVar(), p = S(1).toVar();
|
|
725
|
+
y(l.x.greaterThan(l.y), () => {
|
|
726
|
+
y(l.y.greaterThan(l.z), () => {
|
|
727
|
+
u.assign(C(l.x, l.y, l.z)), d.assign(S(1, 0, 0)), f.assign(S(1, 1, 0)), p.assign(S(1, 1, 1));
|
|
728
|
+
}).ElseIf(l.x.greaterThan(l.z), () => {
|
|
729
|
+
u.assign(C(l.x, l.z, l.y)), d.assign(S(1, 0, 0)), f.assign(S(1, 0, 1)), p.assign(S(1, 1, 1));
|
|
730
|
+
}).Else(() => {
|
|
731
|
+
u.assign(C(l.z, l.x, l.y)), d.assign(S(0, 0, 1)), f.assign(S(1, 0, 1)), p.assign(S(1, 1, 1));
|
|
732
|
+
});
|
|
733
|
+
}).Else(() => {
|
|
734
|
+
y(l.z.greaterThan(l.y), () => {
|
|
735
|
+
u.assign(C(l.z, l.y, l.x)), d.assign(S(0, 0, 1)), f.assign(S(0, 1, 1)), p.assign(S(1, 1, 1));
|
|
736
|
+
}).ElseIf(l.z.greaterThan(l.x), () => {
|
|
737
|
+
u.assign(C(l.y, l.z, l.x)), d.assign(S(0, 1, 0)), f.assign(S(0, 1, 1)), p.assign(S(1, 1, 1));
|
|
738
|
+
}).Else(() => {
|
|
739
|
+
u.assign(C(l.y, l.x, l.z)), d.assign(S(0, 1, 0)), f.assign(S(1, 1, 0)), p.assign(S(1, 1, 1));
|
|
740
|
+
});
|
|
741
|
+
});
|
|
742
|
+
let m = o(c).toVar(), h = o(c.add(d)).toVar(), g = o(c.add(f)).toVar(), _ = o(c.add(p)).toVar();
|
|
743
|
+
return m.add(h.sub(m).mul(u.x)).add(g.sub(h).mul(u.y)).add(_.sub(g).mul(u.z));
|
|
744
|
+
});
|
|
745
|
+
}
|
|
746
|
+
function st({ display: e, view: n, look: r = null, context: i = null, source: a = null, size: o = 65, minEv: s = $e, maxEv: c = et, id: l = null, name: u = null } = {}) {
|
|
747
|
+
let d = M();
|
|
748
|
+
if (!d) throw Error("load an OCIO config first");
|
|
749
|
+
let f = d.roles.find((e) => e.name === "scene_linear")?.colorSpace, p = a ?? f;
|
|
750
|
+
if (!p) throw Error("config has no scene_linear role — pass an explicit source space");
|
|
751
|
+
if (!d.displays.includes(e)) throw Error(`config has no display "${e}" — has ${d.displays.join(", ")}`);
|
|
752
|
+
let m = (d.viewsByDisplay[e] ?? []).map((e) => e.name);
|
|
753
|
+
if (!m.includes(n)) throw Error(`display "${e}" has no view "${n}" — has ${m.join(", ")}`);
|
|
754
|
+
if (r && !d.looks.some((e) => e.name === r)) throw Error(`config has no look "${r}" — has ${d.looks.map((e) => e.name).join(", ")}`);
|
|
755
|
+
_e(e) === null && nt?.warn(t.VIEW_TRANSFORM_DISPLAY_MISMATCH, `"${e}" is not an sRGB-class SDR display, which is all the canvas is configured for — its view will be shown clipped or in the wrong gamut on screen, though a saved buffer is right`, {
|
|
756
|
+
display: e,
|
|
757
|
+
view: n
|
|
758
|
+
});
|
|
759
|
+
let h = at({
|
|
760
|
+
source: p,
|
|
761
|
+
display: e,
|
|
762
|
+
view: n,
|
|
763
|
+
look: r,
|
|
764
|
+
context: i
|
|
765
|
+
}), g = (e) => h.applyRGBAF32(e), _, v;
|
|
766
|
+
try {
|
|
767
|
+
_ = Ge(We({
|
|
768
|
+
size: o,
|
|
769
|
+
minEv: s,
|
|
770
|
+
maxEv: c,
|
|
771
|
+
apply: g
|
|
772
|
+
})), v = Qe({
|
|
773
|
+
sampler: Xe({
|
|
774
|
+
data: _,
|
|
775
|
+
size: o,
|
|
776
|
+
minEv: s,
|
|
777
|
+
maxEv: c
|
|
778
|
+
}),
|
|
779
|
+
apply: g
|
|
780
|
+
});
|
|
781
|
+
} finally {
|
|
782
|
+
h.dispose();
|
|
783
|
+
}
|
|
784
|
+
return lt({
|
|
785
|
+
id: l,
|
|
786
|
+
half: _,
|
|
787
|
+
error: v,
|
|
788
|
+
name: u ?? (r ? `${n} + ${r} (${e})` : `${n} (${e})`),
|
|
789
|
+
ocio: {
|
|
790
|
+
display: e,
|
|
791
|
+
view: n,
|
|
792
|
+
look: r,
|
|
793
|
+
context: i,
|
|
794
|
+
source: p,
|
|
795
|
+
configId: d.id,
|
|
796
|
+
size: o,
|
|
797
|
+
minEv: s,
|
|
798
|
+
maxEv: c
|
|
799
|
+
}
|
|
800
|
+
});
|
|
801
|
+
}
|
|
802
|
+
function ct(e, t = null) {
|
|
803
|
+
let { name: n, data: r, error: i, configId: a, display: o, view: s, look: c, context: l, source: u, size: d, minEv: f, maxEv: p, fingerprint: m, ocioVersion: h } = e;
|
|
804
|
+
return lt({
|
|
805
|
+
id: t,
|
|
806
|
+
name: n,
|
|
807
|
+
error: i,
|
|
808
|
+
half: r,
|
|
809
|
+
ocio: {
|
|
810
|
+
display: o,
|
|
811
|
+
view: s,
|
|
812
|
+
look: c ?? null,
|
|
813
|
+
context: l ?? null,
|
|
814
|
+
source: u,
|
|
815
|
+
configId: a,
|
|
816
|
+
size: d,
|
|
817
|
+
minEv: f,
|
|
818
|
+
maxEv: p,
|
|
819
|
+
baked: {
|
|
820
|
+
fingerprint: m ?? null,
|
|
821
|
+
ocioVersion: h ?? null
|
|
822
|
+
}
|
|
823
|
+
}
|
|
824
|
+
});
|
|
825
|
+
}
|
|
826
|
+
function lt({ id: e, name: t, half: n, error: r, ocio: i }) {
|
|
827
|
+
let { size: a, minEv: o, maxEv: s } = i, c = Xe({
|
|
828
|
+
data: n,
|
|
829
|
+
size: a,
|
|
830
|
+
minEv: o,
|
|
831
|
+
maxEv: s
|
|
832
|
+
}), l = e ?? f(), u = `TM_OCIO_${l}`, d = `tm_ocio_${l}`, p = X.get(l), m = p && p.size === a && p.minEv === o && p.maxEv === s, h, g;
|
|
833
|
+
return m ? (h = p.texture, h.image.data = n, h.needsUpdate = !0, g = p.tsl) : (p?.texture.dispose(), h = new ue(n, a, a, a), h.format = he, h.type = de, h.minFilter = pe, h.magFilter = pe, h.wrapS = h.wrapT = h.wrapR = le, h.needsUpdate = !0, g = ot({
|
|
834
|
+
texture: h,
|
|
835
|
+
size: a,
|
|
836
|
+
minEv: o,
|
|
837
|
+
maxEv: s
|
|
838
|
+
})), X.set(l, {
|
|
839
|
+
texture: h,
|
|
840
|
+
tsl: g,
|
|
841
|
+
size: a,
|
|
842
|
+
minEv: o,
|
|
843
|
+
maxEv: s
|
|
844
|
+
}), {
|
|
845
|
+
id: l,
|
|
846
|
+
name: t,
|
|
847
|
+
wgslConst: u,
|
|
848
|
+
source: "ocio",
|
|
849
|
+
outputEncoded: !0,
|
|
850
|
+
appliesExposure: !0,
|
|
851
|
+
cpu: (e, t, n, r, i) => c(e * r, t * r, n * r, i),
|
|
852
|
+
wgsl: Ze({
|
|
853
|
+
fnName: d,
|
|
854
|
+
texName: `${u.toLowerCase()}_tex`,
|
|
855
|
+
size: a,
|
|
856
|
+
minEv: o,
|
|
857
|
+
maxEv: s
|
|
858
|
+
}),
|
|
859
|
+
call: `${d}( c )`,
|
|
860
|
+
tsl: g,
|
|
861
|
+
table: {
|
|
862
|
+
data: n,
|
|
863
|
+
size: a,
|
|
864
|
+
texture: h
|
|
865
|
+
},
|
|
866
|
+
error: r,
|
|
867
|
+
ocio: i
|
|
868
|
+
};
|
|
869
|
+
}
|
|
870
|
+
function Z(e) {
|
|
871
|
+
return u(st(e));
|
|
872
|
+
}
|
|
873
|
+
function ut({ display: e = null, look: n = null, context: r = null, source: i = null, size: a = 65 } = {}) {
|
|
874
|
+
let o = M();
|
|
875
|
+
if (!o) throw Error("load an OCIO config first");
|
|
876
|
+
let s = e ?? o.defaultDisplay, c = o.viewsByDisplay[s] ?? [], l = [], u = [];
|
|
877
|
+
for (let e of c) {
|
|
878
|
+
if (e.colorSpace && e.colorSpace !== "<USE_DISPLAY_NAME>" && o.colorSpaces.find((t) => t.name === e.colorSpace)?.isData) {
|
|
879
|
+
u.push({
|
|
880
|
+
view: e.name,
|
|
881
|
+
reason: "data view"
|
|
882
|
+
});
|
|
883
|
+
continue;
|
|
884
|
+
}
|
|
885
|
+
try {
|
|
886
|
+
l.push(Z({
|
|
887
|
+
display: s,
|
|
888
|
+
view: e.name,
|
|
889
|
+
look: n,
|
|
890
|
+
context: r,
|
|
891
|
+
source: i,
|
|
892
|
+
size: a
|
|
893
|
+
}));
|
|
894
|
+
} catch (n) {
|
|
895
|
+
u.push({
|
|
896
|
+
view: e.name,
|
|
897
|
+
reason: n.message
|
|
898
|
+
}), nt?.warn(t.VIEW_TRANSFORM_BAKE_FAILED, `could not bake "${e.name}" (${s}): ${n.message}`, {
|
|
899
|
+
display: s,
|
|
900
|
+
view: e.name
|
|
901
|
+
});
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
return {
|
|
905
|
+
added: l,
|
|
906
|
+
skipped: u
|
|
907
|
+
};
|
|
908
|
+
}
|
|
909
|
+
function dt(e) {
|
|
910
|
+
let t = X.get(e);
|
|
911
|
+
t && (t.texture.dispose(), X.delete(e));
|
|
912
|
+
}
|
|
913
|
+
function ft(e = null) {
|
|
914
|
+
for (let t of g.values()) t.source === "ocio" && !e?.has(t.id) && t.table?.texture?.dispose?.();
|
|
915
|
+
for (let [t, n] of X) e?.has(t) || (n.texture.dispose(), X.delete(t));
|
|
916
|
+
}
|
|
917
|
+
//#endregion
|
|
918
|
+
//#region src/Color/BakedViews.js
|
|
919
|
+
var pt = [
|
|
920
|
+
82,
|
|
921
|
+
90,
|
|
922
|
+
86,
|
|
923
|
+
84
|
|
924
|
+
], mt = "rayzee-baked-view", ht = 15360;
|
|
925
|
+
async function gt(e, t) {
|
|
926
|
+
return new Uint8Array(await new Response(new Blob([e]).stream().pipeThrough(t)).arrayBuffer());
|
|
927
|
+
}
|
|
928
|
+
async function _t(e, t = {}) {
|
|
929
|
+
let n = e?.table?.data;
|
|
930
|
+
if (e?.source !== "ocio" || !(n instanceof Uint16Array)) throw Error("only a baked OCIO view can be saved");
|
|
931
|
+
let { size: r, minEv: i, maxEv: a } = e.ocio, o = r * r * r;
|
|
932
|
+
if (n.length !== o * 4) throw Error(`table holds ${n.length} values, expected ${o * 4}`);
|
|
933
|
+
let s = new Uint8Array(o * 6);
|
|
934
|
+
for (let e = 0; e < 3; e++) for (let t = 0; t < o; t++) {
|
|
935
|
+
if (e === 0 && n[t * 4 + 3] !== ht) throw Error("table alpha is not 1");
|
|
936
|
+
let i = n[t * 4 + e] - (t % r ? n[(t - 1) * 4 + e] : 0) & 65535;
|
|
937
|
+
s[e * o + t] = i >> 8, s[3 * o + e * o + t] = i & 255;
|
|
938
|
+
}
|
|
939
|
+
let { display: c, view: l, look: u, context: d, source: f, configId: p } = e.ocio, m = new TextEncoder().encode(JSON.stringify({
|
|
940
|
+
format: mt,
|
|
941
|
+
version: 1,
|
|
942
|
+
name: e.name,
|
|
943
|
+
configId: p,
|
|
944
|
+
display: c,
|
|
945
|
+
view: l,
|
|
946
|
+
look: u ?? null,
|
|
947
|
+
context: d ?? null,
|
|
948
|
+
source: f,
|
|
949
|
+
size: r,
|
|
950
|
+
minEv: i,
|
|
951
|
+
maxEv: a,
|
|
952
|
+
error: e.error ?? null,
|
|
953
|
+
...t
|
|
954
|
+
})), h = new Uint8Array(8 + m.length + s.length);
|
|
955
|
+
return h.set(pt, 0), new DataView(h.buffer).setUint32(4, m.length, !0), h.set(m, 8), h.set(s, 8 + m.length), await gt(h, new CompressionStream("gzip"));
|
|
956
|
+
}
|
|
957
|
+
async function vt(e) {
|
|
958
|
+
let t = await gt(e, new DecompressionStream("gzip"));
|
|
959
|
+
if (t.length < 8 || pt.some((e, n) => t[n] !== e)) throw Error("not a baked view file");
|
|
960
|
+
let n = new DataView(t.buffer, t.byteOffset).getUint32(4, !0), r = JSON.parse(new TextDecoder().decode(t.subarray(8, 8 + n)));
|
|
961
|
+
if (r.format !== mt || r.version !== 1) throw Error(`unsupported baked view ${r.format} v${r.version}`);
|
|
962
|
+
let { size: i, minEv: a, maxEv: o } = r;
|
|
963
|
+
if (!Number.isInteger(i) || i < 2 || i > 129 || !(a < o)) throw Error("baked view has a bad table shape");
|
|
964
|
+
let s = i * i * i, c = t.subarray(8 + n);
|
|
965
|
+
if (c.length !== s * 6) throw Error(`baked view holds ${c.length} bytes of table, expected ${s * 6}`);
|
|
966
|
+
let l = new Uint16Array(s * 4);
|
|
967
|
+
for (let e = 0; e < 3; e++) {
|
|
968
|
+
let t = 0;
|
|
969
|
+
for (let n = 0; n < s; n++) n % i === 0 && (t = 0), t = t + (c[e * s + n] << 8 | c[3 * s + e * s + n]) & 65535, l[n * 4 + e] = t;
|
|
970
|
+
}
|
|
971
|
+
for (let e = 0; e < s; e++) l[e * 4 + 3] = ht;
|
|
972
|
+
return {
|
|
973
|
+
...r,
|
|
974
|
+
data: l
|
|
975
|
+
};
|
|
976
|
+
}
|
|
977
|
+
async function yt({ builtin: e, text: t, files: n = [], configPath: r = "config.ocio" } = {}) {
|
|
978
|
+
if (e) return `builtin:${e}`;
|
|
979
|
+
let i = globalThis.crypto?.subtle;
|
|
980
|
+
if (!i) return null;
|
|
981
|
+
let a = (e) => Array.from(new Uint8Array(e), (e) => e.toString(16).padStart(2, "0")).join(""), o = async (e) => a(await i.digest("SHA-256", e)), s = await Promise.all(n.map(async (e) => `${e.relativePath ?? e.path ?? e.name}:${await o(e.data)}`));
|
|
982
|
+
return t !== void 0 && s.push(`text:${await o(new TextEncoder().encode(t))}`), s.sort(), s.unshift(`config:${r}`), `sha256:${await o(new TextEncoder().encode(s.join("\n")))}`;
|
|
983
|
+
}
|
|
984
|
+
//#endregion
|
|
985
|
+
//#region src/Color/InputColorSpaces.js
|
|
986
|
+
var Q = [], $ = 0;
|
|
987
|
+
function bt() {
|
|
988
|
+
return $;
|
|
989
|
+
}
|
|
990
|
+
function xt() {
|
|
991
|
+
$++;
|
|
992
|
+
}
|
|
993
|
+
function St(e, t) {
|
|
994
|
+
Q.unshift({
|
|
995
|
+
match: e,
|
|
996
|
+
colorSpace: t
|
|
997
|
+
}), $++;
|
|
998
|
+
}
|
|
999
|
+
function Ct() {
|
|
1000
|
+
Q.length !== 0 && (Q.length = 0, $++);
|
|
1001
|
+
}
|
|
1002
|
+
function wt() {
|
|
1003
|
+
return Q.map((e) => ({
|
|
1004
|
+
match: String(e.match),
|
|
1005
|
+
colorSpace: e.colorSpace
|
|
1006
|
+
}));
|
|
1007
|
+
}
|
|
1008
|
+
function Tt(e) {
|
|
1009
|
+
if (!e) return null;
|
|
1010
|
+
for (let t of Q) if (t.match instanceof RegExp ? t.match.test(e) : e.includes(t.match)) return t.colorSpace;
|
|
1011
|
+
return null;
|
|
1012
|
+
}
|
|
1013
|
+
function Et() {
|
|
1014
|
+
return M()?.fileRules.map((e) => ({
|
|
1015
|
+
index: e.index,
|
|
1016
|
+
name: e.name,
|
|
1017
|
+
colorSpace: e.colorSpace,
|
|
1018
|
+
pattern: e.pattern,
|
|
1019
|
+
extension: e.extension,
|
|
1020
|
+
regex: e.regex
|
|
1021
|
+
})) ?? [];
|
|
1022
|
+
}
|
|
1023
|
+
function Dt(e) {
|
|
1024
|
+
let t = M();
|
|
1025
|
+
if (!t) return null;
|
|
1026
|
+
let n = (e) => t.roles.find((t) => t.name === e)?.colorSpace ?? null;
|
|
1027
|
+
return e === me ? n("data") : e === ge ? n("texture_paint") ?? n("color_picking") ?? t.colorSpaces.find((e) => /^srgb\b/i.test(e.name) && !/display/i.test(e.name))?.name ?? null : e === fe ? t.colorSpaces.find((e) => /^lin(ear)?[\s_-]*(rec\.?\s*)?709/i.test(e.name))?.name ?? t.colorSpaces.find((e) => /^linear.*srgb/i.test(e.name))?.name ?? n("scene_linear") : null;
|
|
1028
|
+
}
|
|
1029
|
+
function Ot(e, { threeColorSpace: t = null } = {}) {
|
|
1030
|
+
if (!M()) return null;
|
|
1031
|
+
let n = Tt(e);
|
|
1032
|
+
if (n) return {
|
|
1033
|
+
colorSpace: n,
|
|
1034
|
+
via: "override",
|
|
1035
|
+
rule: null
|
|
1036
|
+
};
|
|
1037
|
+
let r = j();
|
|
1038
|
+
if (r && e) {
|
|
1039
|
+
let t = r.matchFileRule(e);
|
|
1040
|
+
if (t && !t.isDefaultRule && Y(t.colorSpace)) return {
|
|
1041
|
+
colorSpace: t.colorSpace,
|
|
1042
|
+
via: "rule",
|
|
1043
|
+
rule: {
|
|
1044
|
+
index: t.ruleIndex,
|
|
1045
|
+
name: t.ruleName
|
|
1046
|
+
}
|
|
1047
|
+
};
|
|
1048
|
+
}
|
|
1049
|
+
let i = Dt(t);
|
|
1050
|
+
if (i) return {
|
|
1051
|
+
colorSpace: i,
|
|
1052
|
+
via: "three",
|
|
1053
|
+
rule: null
|
|
1054
|
+
};
|
|
1055
|
+
let a = j();
|
|
1056
|
+
if (a && e) {
|
|
1057
|
+
let t = a.matchFileRule(e);
|
|
1058
|
+
if (t && Y(t.colorSpace)) return {
|
|
1059
|
+
colorSpace: t.colorSpace,
|
|
1060
|
+
via: "rule",
|
|
1061
|
+
rule: {
|
|
1062
|
+
index: t.ruleIndex,
|
|
1063
|
+
name: t.ruleName,
|
|
1064
|
+
isDefault: t.isDefaultRule
|
|
1065
|
+
}
|
|
1066
|
+
};
|
|
1067
|
+
}
|
|
1068
|
+
return null;
|
|
1069
|
+
}
|
|
1070
|
+
function kt(e) {
|
|
1071
|
+
if (!e) return !1;
|
|
1072
|
+
if (e.colorSpace === me) return !0;
|
|
1073
|
+
let t = e.userData?.ocioColorSpace;
|
|
1074
|
+
return !!(t && Be(t));
|
|
1075
|
+
}
|
|
1076
|
+
function At(e, t) {
|
|
1077
|
+
return t ?? e.userData?.sourcePath ?? (e.name || null) ?? e.image?.src ?? null;
|
|
1078
|
+
}
|
|
1079
|
+
function jt(e, t = null) {
|
|
1080
|
+
if (!M() || !e) return null;
|
|
1081
|
+
let n = e.userData?.ocioColorSpace;
|
|
1082
|
+
return n ? Y(n) ? {
|
|
1083
|
+
colorSpace: n,
|
|
1084
|
+
via: "tag",
|
|
1085
|
+
rule: null
|
|
1086
|
+
} : null : kt(e) ? null : Ot(At(e, t), { threeColorSpace: e.colorSpace });
|
|
1087
|
+
}
|
|
1088
|
+
function Mt(e, t = null) {
|
|
1089
|
+
return jt(e, t)?.colorSpace ?? null;
|
|
1090
|
+
}
|
|
1091
|
+
//#endregion
|
|
1092
|
+
//#region src/Color/ColorManagement.js
|
|
1093
|
+
function Nt(e) {
|
|
1094
|
+
return _e(e) ?? "srgb";
|
|
1095
|
+
}
|
|
1096
|
+
var Pt = [
|
|
1097
|
+
"Linear Rec.709 (sRGB)",
|
|
1098
|
+
"lin_rec709_srgb",
|
|
1099
|
+
"lin_rec709",
|
|
1100
|
+
"lin_srgb",
|
|
1101
|
+
"Linear Rec.709",
|
|
1102
|
+
"Utility - Linear - sRGB",
|
|
1103
|
+
"Utility - Linear - Rec.709",
|
|
1104
|
+
"Linear BT.709",
|
|
1105
|
+
"linrec709"
|
|
1106
|
+
], Ft = /^(lin(ear)?[\s_-]*(rec\.?\s*|bt\.?\s*)?709|linear[\s_-]*\(?srgb\)?$|utility - linear - (srgb|rec\.?709))/i;
|
|
1107
|
+
function It(e) {
|
|
1108
|
+
if (!e) return null;
|
|
1109
|
+
let t = e.colorSpaces.filter((e) => !e.isData), n = (e) => [e.name, ...e.aliases ?? []];
|
|
1110
|
+
for (let e of Pt) {
|
|
1111
|
+
let r = t.find((t) => n(t).some((t) => t.toLowerCase() === e.toLowerCase()));
|
|
1112
|
+
if (r) return r.name;
|
|
1113
|
+
}
|
|
1114
|
+
return t.find((e) => n(e).some((e) => Ft.test(e)))?.name ?? null;
|
|
1115
|
+
}
|
|
1116
|
+
var Lt = class {
|
|
1117
|
+
constructor({ issues: e = null, renderer: t = null } = {}) {
|
|
1118
|
+
this._issues = e, this._renderer = t, this._listeners = /* @__PURE__ */ new Map(), this._workingSpace = null, this._activeView = null, this._exportSpace = null, this._context = null, this._lastUsed = /* @__PURE__ */ new Map(), this._useClock = 0, this._lastBuiltin = ne, this._fingerprint = null, rt(e), this._offRegistry = p(() => {
|
|
1119
|
+
this._renderer && ee(this._renderer), this._emit("transforms");
|
|
1120
|
+
}), o(this);
|
|
1121
|
+
}
|
|
1122
|
+
on(e, t) {
|
|
1123
|
+
return this._listeners.has(e) || this._listeners.set(e, /* @__PURE__ */ new Set()), this._listeners.get(e).add(t), () => this._listeners.get(e)?.delete(t);
|
|
1124
|
+
}
|
|
1125
|
+
_emit(e, t = null) {
|
|
1126
|
+
for (let n of this._listeners.get(e) ?? []) n(t);
|
|
1127
|
+
if (e !== "change") for (let n of this._listeners.get("change") ?? []) n({
|
|
1128
|
+
event: e,
|
|
1129
|
+
detail: t
|
|
1130
|
+
});
|
|
1131
|
+
}
|
|
1132
|
+
static async listBuiltinConfigs() {
|
|
1133
|
+
return await xe();
|
|
1134
|
+
}
|
|
1135
|
+
async loadConfig({ adoptWorkingSpace: e = !1, registerViews: n = !0, display: r = null, lutSize: i, ...a } = {}) {
|
|
1136
|
+
await be();
|
|
1137
|
+
let o = yt(a).catch(() => null), s = await this._bakedViewsFrom(a.builtin ?? a.id ?? null, o), c;
|
|
1138
|
+
try {
|
|
1139
|
+
c = await Se(a);
|
|
1140
|
+
} catch (e) {
|
|
1141
|
+
throw this._issues?.warn(t.COLOR_CONFIG_LOAD_FAILED, `colour config failed to load; the previous one stays in effect: ${e.message}`, {
|
|
1142
|
+
builtin: a.builtin ?? null,
|
|
1143
|
+
configPath: a.configPath ?? null
|
|
1144
|
+
}), e;
|
|
1145
|
+
}
|
|
1146
|
+
this._releaseViews(new Set(s.filter((e) => e.ocio.baked.ocioVersion === c.ocioVersion).map((e) => e.id))), this._fingerprint = o, xt(), W(), this._context = null;
|
|
1147
|
+
let l = this._workingSpace;
|
|
1148
|
+
if (e ? this._workingSpace = c.sceneLinear : l && !Y(l) && (this._workingSpace = null), It(M()) || this._issues?.warn(t.COLOR_CONFIG_LOAD_FAILED, `"${c.id}" names no linear Rec.709 space, so until a working space is adopted its views treat the render as ${c.sceneLinear} — colours will be off by that primaries change`, { sceneLinear: c.sceneLinear }), this._publishWorkingMatrix(), this._emit("config", c), n) {
|
|
1149
|
+
let e = r ?? c.defaultDisplay, { added: t, skipped: n } = ut({
|
|
1150
|
+
display: e,
|
|
1151
|
+
context: this._context,
|
|
1152
|
+
source: this.workingSpace,
|
|
1153
|
+
...i ? { size: i } : {}
|
|
1154
|
+
});
|
|
1155
|
+
if (t.length) {
|
|
1156
|
+
let n = c.defaultViews[e], r = t.find((e) => e.ocio.view === n) ?? t[0];
|
|
1157
|
+
this.setActiveView(r.id);
|
|
1158
|
+
}
|
|
1159
|
+
this._emit("transforms", {
|
|
1160
|
+
added: t,
|
|
1161
|
+
skipped: n
|
|
1162
|
+
});
|
|
1163
|
+
}
|
|
1164
|
+
return (this._workingSpace ?? null) !== (l ?? null) && this._emit("workingSpace", this.workingSpace), c;
|
|
1165
|
+
}
|
|
1166
|
+
unloadConfig() {
|
|
1167
|
+
this.workingSpaceAdopted && this._issues?.warn(t.COLOR_CONFIG_LOAD_FAILED, `unloaded while rendering in ${this._workingSpace}; the environment stays converted into it — use app.unloadColorConfig(), which reverts the scene first`, { workingSpace: this._workingSpace }), this._releaseViews(), Ce(), W(), Ct(), xt(), this._fingerprint = null, this._workingSpace = null, this._activeView = null, this._exportSpace = null, this._context = null, n(null), this._applyRendererOutputColorSpace(), this._emit("config", null), this._emit("workingSpace", this.workingSpace);
|
|
1168
|
+
}
|
|
1169
|
+
_releaseViews(e = null) {
|
|
1170
|
+
ft(e), v(e);
|
|
1171
|
+
for (let t of this._lastUsed.keys()) e?.has(t) || this._lastUsed.delete(t);
|
|
1172
|
+
this._renderer && _(this._renderer.toneMapping) === null && (this._renderer.toneMapping = _(this._lastBuiltin) ? this._lastBuiltin : ne, this._activeView = null, this._applyRendererOutputColorSpace());
|
|
1173
|
+
}
|
|
1174
|
+
async _bakedViewsFrom(e, t) {
|
|
1175
|
+
let n = [...g.values()].filter((t) => t.ocio?.baked && e !== null && t.ocio.configId === e);
|
|
1176
|
+
if (n.length === 0) return [];
|
|
1177
|
+
let r = await t;
|
|
1178
|
+
return r ? n.filter((e) => e.ocio.baked.fingerprint === r) : [];
|
|
1179
|
+
}
|
|
1180
|
+
async loadBakedView(e, { expect: t = null } = {}) {
|
|
1181
|
+
let n = await vt(e);
|
|
1182
|
+
for (let [e, r] of Object.entries(t ?? {})) if ((n[e] ?? null) !== (r ?? null)) throw Error(`baked view has ${e} "${n[e]}", expected "${r}"`);
|
|
1183
|
+
let r = N();
|
|
1184
|
+
if (r && (r.id !== n.configId || await this._fingerprint !== n.fingerprint)) throw Error(`baked view is from "${n.configId}", not the loaded "${r.id}"`);
|
|
1185
|
+
let i = [...g.values()].find((e) => e.source === "ocio" && e.ocio.display === n.display && e.ocio.view === n.view && (e.ocio.look ?? null) === (n.look ?? null));
|
|
1186
|
+
return i || this._makeRoomForTable(), u(ct(n, i?.id ?? null));
|
|
1187
|
+
}
|
|
1188
|
+
async saveBakedView(e) {
|
|
1189
|
+
let t = _(e);
|
|
1190
|
+
if (t?.source !== "ocio") throw Error(`no OCIO view with id ${e}`);
|
|
1191
|
+
let n = N();
|
|
1192
|
+
return await _t(t, {
|
|
1193
|
+
configId: n?.id ?? t.ocio.configId,
|
|
1194
|
+
fingerprint: (n ? await this._fingerprint : null) ?? t.ocio.baked?.fingerprint ?? null,
|
|
1195
|
+
ocioVersion: n?.ocioVersion ?? t.ocio.baked?.ocioVersion ?? null
|
|
1196
|
+
});
|
|
1197
|
+
}
|
|
1198
|
+
get hasConfig() {
|
|
1199
|
+
return A();
|
|
1200
|
+
}
|
|
1201
|
+
describe() {
|
|
1202
|
+
return N();
|
|
1203
|
+
}
|
|
1204
|
+
get workingSpace() {
|
|
1205
|
+
return this._workingSpace ? this._workingSpace : A() ? this.nativeLinearSpace ?? N()?.sceneLinear ?? "Linear Rec.709 (sRGB)" : c;
|
|
1206
|
+
}
|
|
1207
|
+
get workingSpaceAdopted() {
|
|
1208
|
+
return this._workingSpace !== null;
|
|
1209
|
+
}
|
|
1210
|
+
setWorkingSpace(e) {
|
|
1211
|
+
if (e !== null) {
|
|
1212
|
+
if (!A()) throw Error("load an OCIO config before choosing a working space");
|
|
1213
|
+
if (!Y(e)) throw Error(`config has no colour space "${e}"`);
|
|
1214
|
+
}
|
|
1215
|
+
(this._workingSpace ?? null) !== (e ?? null) && (this._workingSpace = e, z(), this._publishWorkingMatrix(), this._rebakeViews(), this._emit("workingSpace", this.workingSpace));
|
|
1216
|
+
}
|
|
1217
|
+
matrixToWorking(e) {
|
|
1218
|
+
return A() ? ze(e, this.workingSpace, { context: this._context }) : null;
|
|
1219
|
+
}
|
|
1220
|
+
listViews() {
|
|
1221
|
+
return re();
|
|
1222
|
+
}
|
|
1223
|
+
get activeView() {
|
|
1224
|
+
return this._activeView;
|
|
1225
|
+
}
|
|
1226
|
+
setActiveView(e) {
|
|
1227
|
+
let t = _(e);
|
|
1228
|
+
if (!t) throw Error(`no view transform with id ${e}`);
|
|
1229
|
+
return this._isStale(t) && (t = this._rebakeView(t) ?? t), this._activeView = t.source === "ocio" ? {
|
|
1230
|
+
...t.ocio,
|
|
1231
|
+
id: t.id,
|
|
1232
|
+
name: t.name
|
|
1233
|
+
} : null, this._lastUsed.set(e, ++this._useClock), t.source === "builtin" && (this._lastBuiltin = e), this._renderer && (this._renderer.toneMapping = e), this._applyRendererOutputColorSpace(), this._emit("view", t), t;
|
|
1234
|
+
}
|
|
1235
|
+
setView({ display: e, view: t, look: n = null, size: r } = {}) {
|
|
1236
|
+
if (!A()) throw Error("load an OCIO config first");
|
|
1237
|
+
let i = [...g.values()].find((i) => i.source === "ocio" && i.ocio.display === e && i.ocio.view === t && (i.ocio.look ?? null) === (n ?? null) && (!r || i.ocio.size === r));
|
|
1238
|
+
i || this._makeRoomForTable();
|
|
1239
|
+
let a = i ?? Z({
|
|
1240
|
+
display: e,
|
|
1241
|
+
view: t,
|
|
1242
|
+
look: n,
|
|
1243
|
+
context: this._context,
|
|
1244
|
+
source: this.workingSpace,
|
|
1245
|
+
...r ? { size: r } : {}
|
|
1246
|
+
});
|
|
1247
|
+
return this.setActiveView(a.id), _(a.id);
|
|
1248
|
+
}
|
|
1249
|
+
_makeRoomForTable() {
|
|
1250
|
+
if (te() < 12) return;
|
|
1251
|
+
let e = this._renderer?.toneMapping ?? this._activeView?.id ?? null, t = [...g.values()].filter((t) => t.source === "ocio" && t.id !== e).sort((e, t) => (this._lastUsed.get(e.id) ?? 0) - (this._lastUsed.get(t.id) ?? 0))[0];
|
|
1252
|
+
t && (dt(t.id), h(t.id), this._lastUsed.delete(t.id));
|
|
1253
|
+
}
|
|
1254
|
+
setLook(e) {
|
|
1255
|
+
if (!this._activeView) throw Error("no OCIO view is active");
|
|
1256
|
+
return this.setView({
|
|
1257
|
+
...this._activeView,
|
|
1258
|
+
look: e
|
|
1259
|
+
});
|
|
1260
|
+
}
|
|
1261
|
+
setContext(e) {
|
|
1262
|
+
let t = e && Object.keys(e).length ? { ...e } : null;
|
|
1263
|
+
JSON.stringify(t) !== JSON.stringify(this._context) && (this._context = t, A() && (this._context && j()?.invalidateContext(this._context), z(), this._rebakeViews()), this._emit("context", this._context));
|
|
1264
|
+
}
|
|
1265
|
+
get context() {
|
|
1266
|
+
return this._context;
|
|
1267
|
+
}
|
|
1268
|
+
_isStale(e) {
|
|
1269
|
+
return e.source !== "ocio" || !A() ? !1 : e.ocio.source !== this.workingSpace || JSON.stringify(e.ocio.context ?? null) !== JSON.stringify(this._context ?? null);
|
|
1270
|
+
}
|
|
1271
|
+
_rebakeView(e) {
|
|
1272
|
+
try {
|
|
1273
|
+
let t = Z({
|
|
1274
|
+
id: e.id,
|
|
1275
|
+
display: e.ocio.display,
|
|
1276
|
+
view: e.ocio.view,
|
|
1277
|
+
look: e.ocio.look,
|
|
1278
|
+
context: this._context,
|
|
1279
|
+
source: this.workingSpace,
|
|
1280
|
+
size: e.ocio.size,
|
|
1281
|
+
minEv: e.ocio.minEv,
|
|
1282
|
+
maxEv: e.ocio.maxEv
|
|
1283
|
+
}), n = e.table?.texture;
|
|
1284
|
+
return n && n !== t.table?.texture && n.dispose?.(), t;
|
|
1285
|
+
} catch (n) {
|
|
1286
|
+
return this._issues?.warn(t.VIEW_TRANSFORM_BAKE_FAILED, `could not rebake "${e.name}": ${n.message}`, { id: e.id }), null;
|
|
1287
|
+
}
|
|
1288
|
+
}
|
|
1289
|
+
_rebakeViews() {
|
|
1290
|
+
let e = this._renderer?.toneMapping ?? this._activeView?.id ?? null, t = e === null ? null : _(e);
|
|
1291
|
+
if (!t || !this._isStale(t)) return;
|
|
1292
|
+
let n = this._rebakeView(t);
|
|
1293
|
+
n && (this._activeView = {
|
|
1294
|
+
...n.ocio,
|
|
1295
|
+
id: n.id,
|
|
1296
|
+
name: n.name
|
|
1297
|
+
});
|
|
1298
|
+
}
|
|
1299
|
+
attachRenderer(e) {
|
|
1300
|
+
this._renderer = e, _(e.toneMapping)?.source === "builtin" && (this._lastBuiltin = e.toneMapping);
|
|
1301
|
+
let t = ee(e);
|
|
1302
|
+
return this._applyRendererOutputColorSpace(), t;
|
|
1303
|
+
}
|
|
1304
|
+
_applyRendererOutputColorSpace() {
|
|
1305
|
+
if (!this._renderer) return;
|
|
1306
|
+
let e = _(this._renderer.toneMapping);
|
|
1307
|
+
this._renderer.outputColorSpace = e?.outputEncoded ? fe : ge, this._applyCanvasColorSpace(e?.source === "ocio" ? Nt(e.ocio.display) : "srgb");
|
|
1308
|
+
}
|
|
1309
|
+
_applyCanvasColorSpace(e) {
|
|
1310
|
+
let n = (this._renderer?.domElement)?.getContext?.("webgpu"), r = n?.getConfiguration?.();
|
|
1311
|
+
if (r) {
|
|
1312
|
+
if (!n.__rayzeeConfigure) {
|
|
1313
|
+
let e = n.configure.bind(n);
|
|
1314
|
+
n.__rayzeeConfigure = e, n.configure = (t) => e({
|
|
1315
|
+
...t,
|
|
1316
|
+
colorSpace: n.__rayzeeColorSpace ?? t.colorSpace
|
|
1317
|
+
});
|
|
1318
|
+
}
|
|
1319
|
+
if (n.__rayzeeColorSpace = e, r.colorSpace !== e) try {
|
|
1320
|
+
n.configure({
|
|
1321
|
+
...r,
|
|
1322
|
+
colorSpace: e
|
|
1323
|
+
});
|
|
1324
|
+
} catch (n) {
|
|
1325
|
+
this._issues?.warn(t.VIEW_TRANSFORM_DISPLAY_MISMATCH, `the canvas could not be set to ${e}: ${n.message}`, { colorSpace: e });
|
|
1326
|
+
}
|
|
1327
|
+
}
|
|
1328
|
+
}
|
|
1329
|
+
resolveInput(e, t) {
|
|
1330
|
+
return Ot(e, t);
|
|
1331
|
+
}
|
|
1332
|
+
textureSpace(e, t) {
|
|
1333
|
+
return Mt(e, t);
|
|
1334
|
+
}
|
|
1335
|
+
resolveTexture(e, t) {
|
|
1336
|
+
return jt(e, t);
|
|
1337
|
+
}
|
|
1338
|
+
describeTextureSpace(e) {
|
|
1339
|
+
let t = e?.userData ?? {}, n = t.ocioColorSpace ?? t.__rayzeeColorSpaceChoice ?? null, r = null, i = t.__rayzeeOriginalColorSpace ?? e?.colorSpace;
|
|
1340
|
+
return A() && (r = jt({
|
|
1341
|
+
...e,
|
|
1342
|
+
name: e?.name,
|
|
1343
|
+
image: e?.image,
|
|
1344
|
+
colorSpace: i,
|
|
1345
|
+
userData: {}
|
|
1346
|
+
})), r ||= {
|
|
1347
|
+
colorSpace: i === ge ? "sRGB" : "Linear",
|
|
1348
|
+
via: "three"
|
|
1349
|
+
}, {
|
|
1350
|
+
choice: n,
|
|
1351
|
+
auto: r
|
|
1352
|
+
};
|
|
1353
|
+
}
|
|
1354
|
+
get inputKey() {
|
|
1355
|
+
return A() ? `${N()?.id}|${this.workingSpace}|${bt()}|${JSON.stringify(this._context)}` : "-";
|
|
1356
|
+
}
|
|
1357
|
+
overrideInput(e, t) {
|
|
1358
|
+
St(e, t);
|
|
1359
|
+
}
|
|
1360
|
+
fileRules() {
|
|
1361
|
+
return Et();
|
|
1362
|
+
}
|
|
1363
|
+
toWorkingPixels(e, t) {
|
|
1364
|
+
return !A() || !t ? e : K(e, t, this.workingSpace, { context: this._context });
|
|
1365
|
+
}
|
|
1366
|
+
get nativeLinearSpace() {
|
|
1367
|
+
return It(M());
|
|
1368
|
+
}
|
|
1369
|
+
_publishWorkingMatrix() {
|
|
1370
|
+
let e = s();
|
|
1371
|
+
e !== null && e !== this || n(A() ? this.primariesMatrixToWorking() : null, this.workingSpace);
|
|
1372
|
+
}
|
|
1373
|
+
primariesMatrixToWorking() {
|
|
1374
|
+
if (!A() || !this.workingSpaceAdopted) return null;
|
|
1375
|
+
let e = this.nativeLinearSpace;
|
|
1376
|
+
if (!e || e === this.workingSpace) return null;
|
|
1377
|
+
let t = ze(e, this.workingSpace, { context: this._context });
|
|
1378
|
+
return t ? [
|
|
1379
|
+
1,
|
|
1380
|
+
0,
|
|
1381
|
+
0,
|
|
1382
|
+
0,
|
|
1383
|
+
1,
|
|
1384
|
+
0,
|
|
1385
|
+
0,
|
|
1386
|
+
0,
|
|
1387
|
+
1
|
|
1388
|
+
].every((e, n) => Math.abs(t[n] - e) < 1e-6) ? null : t : null;
|
|
1389
|
+
}
|
|
1390
|
+
convertLinearTriple(e) {
|
|
1391
|
+
return i(e);
|
|
1392
|
+
}
|
|
1393
|
+
convertLinearTriples(e, t, n) {
|
|
1394
|
+
return r(e, t, n);
|
|
1395
|
+
}
|
|
1396
|
+
convertTexturePixels(e, { space: n = null } = {}) {
|
|
1397
|
+
if (!A()) return !1;
|
|
1398
|
+
let r = e?.image?.data;
|
|
1399
|
+
if (!r) return !1;
|
|
1400
|
+
let i = this.nativeLinearSpace, a = e.userData?.__rayzeeColorSpace ?? n ?? i, o = this.workingSpaceAdopted ? this.workingSpace : i;
|
|
1401
|
+
if (!a || !o || a === o) return !1;
|
|
1402
|
+
let s = !1;
|
|
1403
|
+
if (r instanceof Float32Array) K(r, a, o, { context: this._context }), s = !0;
|
|
1404
|
+
else if (r instanceof Uint16Array) {
|
|
1405
|
+
let e = Ke(r);
|
|
1406
|
+
K(e, a, o, { context: this._context }), r.set(Ge(e)), s = !0;
|
|
1407
|
+
} else if (r instanceof Uint8Array || r instanceof Uint8ClampedArray) Pe(r, a, o, {
|
|
1408
|
+
context: this._context,
|
|
1409
|
+
inputEncoding: "srgb",
|
|
1410
|
+
outputEncoding: "srgb"
|
|
1411
|
+
}), s = !0;
|
|
1412
|
+
else return this._issues?.warn(t.VIEW_TRANSFORM_BAKE_FAILED, `texture data is ${r.constructor?.name ?? typeof r}, which cannot be colour-converted`, {
|
|
1413
|
+
from: a,
|
|
1414
|
+
to: o
|
|
1415
|
+
}), !1;
|
|
1416
|
+
return e.userData = e.userData ?? {}, e.userData.__rayzeeColorSpace = o, e.needsUpdate = !0, s;
|
|
1417
|
+
}
|
|
1418
|
+
convertTextureBytes(e, { space: t = null, encoding: n = "srgb" } = {}) {
|
|
1419
|
+
if (!A()) return !1;
|
|
1420
|
+
if (t) return t === this.workingSpace ? !1 : (Pe(e, t, this.workingSpace, {
|
|
1421
|
+
context: this._context,
|
|
1422
|
+
inputEncoding: "raw",
|
|
1423
|
+
outputEncoding: n
|
|
1424
|
+
}), !0);
|
|
1425
|
+
let r = this.primariesMatrixToWorking();
|
|
1426
|
+
return r ? (Re(e, r, n), !0) : !1;
|
|
1427
|
+
}
|
|
1428
|
+
toWorkingColor(e, t) {
|
|
1429
|
+
return !A() || !t ? [
|
|
1430
|
+
e[0],
|
|
1431
|
+
e[1],
|
|
1432
|
+
e[2]
|
|
1433
|
+
] : G(e, t, this.workingSpace, { context: this._context });
|
|
1434
|
+
}
|
|
1435
|
+
convert(e, t, n) {
|
|
1436
|
+
return G(e, t, n, { context: this._context });
|
|
1437
|
+
}
|
|
1438
|
+
get exportSpace() {
|
|
1439
|
+
return this._exportSpace;
|
|
1440
|
+
}
|
|
1441
|
+
setExportSpace(e) {
|
|
1442
|
+
if (e != null) {
|
|
1443
|
+
if (!A()) throw Error("load an OCIO config before choosing an export space");
|
|
1444
|
+
if (!Y(e)) throw Error(`config has no colour space "${e}"`);
|
|
1445
|
+
}
|
|
1446
|
+
this._exportSpace = e ?? null, this._emit("export", this._exportSpace);
|
|
1447
|
+
}
|
|
1448
|
+
exportPixels(e, t = void 0) {
|
|
1449
|
+
let n = t === void 0 ? this._exportSpace : t;
|
|
1450
|
+
return !n || !A() ? {
|
|
1451
|
+
rgba: e,
|
|
1452
|
+
colorSpace: this.workingSpace
|
|
1453
|
+
} : (K(e, this.workingSpace, n, { context: this._context }), {
|
|
1454
|
+
rgba: e,
|
|
1455
|
+
colorSpace: n
|
|
1456
|
+
});
|
|
1457
|
+
}
|
|
1458
|
+
status() {
|
|
1459
|
+
let e = N(), t = this._renderer ? _(this._renderer.toneMapping) : null;
|
|
1460
|
+
return {
|
|
1461
|
+
config: e,
|
|
1462
|
+
workingSpace: this.workingSpace,
|
|
1463
|
+
workingSpaceAdopted: this.workingSpaceAdopted,
|
|
1464
|
+
activeTransform: t ? {
|
|
1465
|
+
id: t.id,
|
|
1466
|
+
name: t.name,
|
|
1467
|
+
source: t.source
|
|
1468
|
+
} : null,
|
|
1469
|
+
activeView: this._activeView,
|
|
1470
|
+
context: this._context,
|
|
1471
|
+
exportSpace: this._exportSpace,
|
|
1472
|
+
views: re(),
|
|
1473
|
+
registryVersion: d(),
|
|
1474
|
+
bakeError: t?.error ?? null
|
|
1475
|
+
};
|
|
1476
|
+
}
|
|
1477
|
+
dispose() {
|
|
1478
|
+
this._offRegistry?.(), this._listeners.clear(), this._releaseViews(), rt(null), this._renderer = null, this._issues = null, s() === this && (n(null), a(null));
|
|
1479
|
+
}
|
|
1480
|
+
static resetAll() {
|
|
1481
|
+
a(null), n(null), ft(), m(), W(), Ct(), Ee();
|
|
1482
|
+
}
|
|
1483
|
+
};
|
|
1484
|
+
function Rt() {
|
|
1485
|
+
return A();
|
|
1486
|
+
}
|
|
1487
|
+
//#endregion
|
|
1488
|
+
export { _e as A, Pe as C, Be as D, Y as E, Ae as O, G as S, ze as T, st as _, Ct as a, Qe as b, wt as c, Mt as d, tt as f, Z as g, ut as h, Rt as i, ke as k, Ot as l, $e as m, Nt as n, kt as o, et as p, It as r, Et as s, Lt as t, St as u, We as v, K as w, Re as x, Xe as y };
|