@pixerate/editor 0.99.0 → 0.101.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/THIRD_PARTY_NOTICES.md +4 -0
- package/dist/animation-editor/index.cjs +39 -39
- package/dist/animation-editor/index.d.cts +1 -1
- package/dist/animation-editor/index.d.ts +1 -1
- package/dist/animation-editor/index.js +1 -1
- package/dist/{chunk-YGZNGDIT.js → chunk-63EFQCT5.js} +807 -73
- package/dist/chunk-63EFQCT5.js.map +1 -0
- package/dist/{chunk-JF5PXN7W.cjs → chunk-KANRAHTL.cjs} +838 -104
- package/dist/chunk-KANRAHTL.cjs.map +1 -0
- package/dist/image-editor/index.cjs +321 -165
- package/dist/image-editor/index.cjs.map +1 -1
- package/dist/image-editor/index.d.cts +70 -11
- package/dist/image-editor/index.d.ts +70 -11
- package/dist/image-editor/index.js +165 -9
- package/dist/image-editor/index.js.map +1 -1
- package/dist/{svg-C9r284x8.d.cts → svg-Bj1MQFh6.d.cts} +395 -2
- package/dist/{svg-MVKBqwD4.d.ts → svg-vme0PLNo.d.ts} +395 -2
- package/dist/vector/index.cjs +1352 -584
- package/dist/vector/index.cjs.map +1 -1
- package/dist/vector/index.d.cts +302 -197
- package/dist/vector/index.d.ts +302 -197
- package/dist/vector/index.js +854 -86
- package/dist/vector/index.js.map +1 -1
- package/package.json +1 -1
- package/skills/pixerate-vector/SKILL.md +52 -2
- package/skills/pixerate-vector/references/commands.md +21 -0
- package/dist/chunk-JF5PXN7W.cjs.map +0 -1
- package/dist/chunk-YGZNGDIT.js.map +0 -1
|
@@ -3198,22 +3198,44 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3198
3198
|
ctx.save();
|
|
3199
3199
|
try {
|
|
3200
3200
|
const scr = (p) => projectImagePoint(p, projection);
|
|
3201
|
-
const outline = t.outline.map(scr);
|
|
3202
3201
|
ctx.beginPath();
|
|
3203
|
-
|
|
3204
|
-
|
|
3202
|
+
if (t.warp) {
|
|
3203
|
+
for (const c of t.warp.curves) {
|
|
3204
|
+
const [a, b, d, e] = c.map(scr);
|
|
3205
|
+
ctx.moveTo(a.x, a.y);
|
|
3206
|
+
ctx.bezierCurveTo(b.x, b.y, d.x, d.y, e.x, e.y);
|
|
3207
|
+
}
|
|
3208
|
+
for (const h of t.warp.handles) {
|
|
3209
|
+
const a = scr(h.anchor);
|
|
3210
|
+
const q2 = scr(h.point);
|
|
3211
|
+
ctx.moveTo(a.x, a.y);
|
|
3212
|
+
ctx.lineTo(q2.x, q2.y);
|
|
3213
|
+
}
|
|
3214
|
+
} else {
|
|
3215
|
+
const outline = t.outline.map(scr);
|
|
3216
|
+
outline.forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
|
|
3217
|
+
ctx.closePath();
|
|
3218
|
+
}
|
|
3205
3219
|
ctx.lineWidth = 3;
|
|
3206
3220
|
ctx.strokeStyle = "rgba(0,0,0,0.5)";
|
|
3207
3221
|
ctx.stroke();
|
|
3208
3222
|
ctx.lineWidth = 1;
|
|
3209
3223
|
ctx.strokeStyle = "#ffffff";
|
|
3210
3224
|
ctx.stroke();
|
|
3211
|
-
for (const h of t.handles.map(scr)) {
|
|
3225
|
+
for (const h of [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _46 => _46.warp, 'optionalAccess', _47 => _47.anchors]), () => ( []))].map(scr)) {
|
|
3212
3226
|
ctx.fillStyle = "#ffffff";
|
|
3213
3227
|
ctx.strokeStyle = "#1e293b";
|
|
3214
3228
|
ctx.fillRect(h.x - 4, h.y - 4, 8, 8);
|
|
3215
3229
|
ctx.strokeRect(h.x - 4, h.y - 4, 8, 8);
|
|
3216
3230
|
}
|
|
3231
|
+
for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _48 => _48.warp, 'optionalAccess', _49 => _49.handles]), () => ( []))).map((w) => scr(w.point))) {
|
|
3232
|
+
ctx.beginPath();
|
|
3233
|
+
ctx.arc(h.x, h.y, 3, 0, Math.PI * 2);
|
|
3234
|
+
ctx.fillStyle = "#ffffff";
|
|
3235
|
+
ctx.fill();
|
|
3236
|
+
ctx.strokeStyle = "#1e293b";
|
|
3237
|
+
ctx.stroke();
|
|
3238
|
+
}
|
|
3217
3239
|
const r = scr(t.reference);
|
|
3218
3240
|
ctx.beginPath();
|
|
3219
3241
|
ctx.arc(r.x, r.y, 5, 0, Math.PI * 2);
|
|
@@ -3298,7 +3320,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3298
3320
|
} catch (e7) {
|
|
3299
3321
|
}
|
|
3300
3322
|
}
|
|
3301
|
-
_optionalChain([onPixels, 'optionalCall',
|
|
3323
|
+
_optionalChain([onPixels, 'optionalCall', _50 => _50(imageData)]);
|
|
3302
3324
|
baseCtx.putImageData(imageData, 0, 0);
|
|
3303
3325
|
}
|
|
3304
3326
|
return baseCanvas;
|
|
@@ -3307,7 +3329,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3307
3329
|
/** Which base path renders `state` (see `needsLegacyBase`). */
|
|
3308
3330
|
chooseRoute(state, region, naturalWidth, naturalHeight) {
|
|
3309
3331
|
let route;
|
|
3310
|
-
if (!_optionalChain([state, 'access',
|
|
3332
|
+
if (!_optionalChain([state, 'access', _51 => _51.layers, 'optionalAccess', _52 => _52.length])) route = "legacy";
|
|
3311
3333
|
else if (this.baseRoute === "layers") route = "layers";
|
|
3312
3334
|
else {
|
|
3313
3335
|
const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
|
|
@@ -3317,7 +3339,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3317
3339
|
region,
|
|
3318
3340
|
canvas: { width: naturalWidth, height: naturalHeight },
|
|
3319
3341
|
transform: state.transform,
|
|
3320
|
-
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access',
|
|
3342
|
+
sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _53 => _53.layerSources, 'optionalAccess', _54 => _54.sourceIsOpaque, 'call', _55 => _55()]), () => ( true))
|
|
3321
3343
|
}) ? "legacy" : "layers";
|
|
3322
3344
|
}
|
|
3323
3345
|
this.lastBaseRoute = route;
|
|
@@ -3335,24 +3357,24 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3335
3357
|
return _nullishCoalesce(this.depthMaps.get(`${source.maskSource}|${width}x${height}`), () => ( null));
|
|
3336
3358
|
},
|
|
3337
3359
|
rasterizeAnnotation: (annotation, rect) => this.rasterizeAnnotation(annotation, rect),
|
|
3338
|
-
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess',
|
|
3339
|
-
globalLight: _optionalChain([host, 'optionalAccess',
|
|
3340
|
-
pattern: _optionalChain([host, 'optionalAccess',
|
|
3360
|
+
version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _56 => _56.version, 'call', _57 => _57()]), () => ( ""))}:${this.assetVersion}`,
|
|
3361
|
+
globalLight: _optionalChain([host, 'optionalAccess', _58 => _58.globalLight, 'optionalCall', _59 => _59()]),
|
|
3362
|
+
pattern: _optionalChain([host, 'optionalAccess', _60 => _60.pattern]) ? (id) => host.pattern(id) : void 0
|
|
3341
3363
|
};
|
|
3342
3364
|
}
|
|
3343
3365
|
/** Loads what the compositor reads synchronously: depth maps (at canvas size) and annotation images. */
|
|
3344
3366
|
/** Loads depth maps and annotation images the compositor reads synchronously. */
|
|
3345
3367
|
async prepareLayerAssets(layers, width, height) {
|
|
3346
3368
|
for (const l of _chunkWT6ZAWJPcjs.flattenLayers.call(void 0, layers)) {
|
|
3347
|
-
const source = _optionalChain([l, 'access',
|
|
3348
|
-
if (_optionalChain([source, 'optionalAccess',
|
|
3369
|
+
const source = _optionalChain([l, 'access', _61 => _61.mask, 'optionalAccess', _62 => _62.source]);
|
|
3370
|
+
if (_optionalChain([source, 'optionalAccess', _63 => _63.enabled]) && source.maskSource) {
|
|
3349
3371
|
const key = `${source.maskSource}|${width}x${height}`;
|
|
3350
3372
|
if (this.depthMaps.has(key)) continue;
|
|
3351
3373
|
try {
|
|
3352
3374
|
const maskImg = await this.imageCache.get(source.maskSource);
|
|
3353
3375
|
const canvas = this.createCanvas(width, height);
|
|
3354
3376
|
const mctx = canvas.getContext("2d");
|
|
3355
|
-
const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access',
|
|
3377
|
+
const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access', _64 => _64.getImageData, 'optionalCall', _65 => _65(0, 0, width, height)])) : null;
|
|
3356
3378
|
if (data) {
|
|
3357
3379
|
this.depthMaps.set(key, { width, height, data: data.data });
|
|
3358
3380
|
this.assetVersion++;
|
|
@@ -3472,7 +3494,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3472
3494
|
const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
|
|
3473
3495
|
const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
|
|
3474
3496
|
if (!(opacity < 1) && !(blur > 0)) return null;
|
|
3475
|
-
const data = _optionalChain([ctx, 'access',
|
|
3497
|
+
const data = _optionalChain([ctx, 'access', _66 => _66.getImageData, 'optionalCall', _67 => _67(0, 0, w, h)]);
|
|
3476
3498
|
if (!data) return null;
|
|
3477
3499
|
applyOutputStage(data, opacity, blur);
|
|
3478
3500
|
ctx.putImageData(data, 0, 0);
|
|
@@ -3481,7 +3503,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3481
3503
|
publishHistogram(histogram) {
|
|
3482
3504
|
if (histogram === this.previewHistogram) return;
|
|
3483
3505
|
this.previewHistogram = histogram;
|
|
3484
|
-
_optionalChain([this, 'access',
|
|
3506
|
+
_optionalChain([this, 'access', _68 => _68.onPreviewHistogram, 'optionalCall', _69 => _69(histogram)]);
|
|
3485
3507
|
}
|
|
3486
3508
|
__init19() {this.quickMaskCache = /* @__PURE__ */ new WeakMap()}
|
|
3487
3509
|
__init20() {this.outlineCache = /* @__PURE__ */ new WeakMap()}
|
|
@@ -3894,8 +3916,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3894
3916
|
if (!ctx) return maskCanvas;
|
|
3895
3917
|
ctx.fillStyle = MASK_BLACK;
|
|
3896
3918
|
ctx.fillRect(0, 0, naturalWidth, naturalHeight);
|
|
3897
|
-
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3898
|
-
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3919
|
+
const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _70 => _70.useCrop]), () => ( true));
|
|
3920
|
+
const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _71 => _71.useAnnotations]), () => ( true));
|
|
3899
3921
|
if (useCrop && state.crop) {
|
|
3900
3922
|
ctx.fillStyle = MASK_WHITE;
|
|
3901
3923
|
ctx.fillRect(state.crop.x, state.crop.y, state.crop.width, state.crop.height);
|
|
@@ -3905,8 +3927,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
|
|
|
3905
3927
|
this.drawAnnotationMask(ctx, ann);
|
|
3906
3928
|
}
|
|
3907
3929
|
}
|
|
3908
|
-
const imageData = _optionalChain([ctx, 'access',
|
|
3909
|
-
const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
3930
|
+
const imageData = _optionalChain([ctx, 'access', _72 => _72.getImageData, 'optionalCall', _73 => _73(0, 0, naturalWidth, naturalHeight)]);
|
|
3931
|
+
const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _74 => _74.useSelection]), () => ( true))) && _optionalChain([state, 'access', _75 => _75.selection, 'optionalAccess', _76 => _76.bounds]) && state.selection.width === naturalWidth && state.selection.height === naturalHeight ? state.selection : null;
|
|
3910
3932
|
if (imageData) {
|
|
3911
3933
|
const d = imageData.data;
|
|
3912
3934
|
for (let i = 0; i < d.length; i += 4) {
|
|
@@ -4683,7 +4705,7 @@ function serializeLayer(layer, ctx) {
|
|
|
4683
4705
|
}
|
|
4684
4706
|
}
|
|
4685
4707
|
if (layer.fillOpacity !== void 0 && layer.fillOpacity !== 1) out.fillOpacity = layer.fillOpacity;
|
|
4686
|
-
if (_optionalChain([layer, 'access',
|
|
4708
|
+
if (_optionalChain([layer, 'access', _77 => _77.filters, 'optionalAccess', _78 => _78.length])) out.filters = JSON.parse(JSON.stringify(layer.filters));
|
|
4687
4709
|
return out;
|
|
4688
4710
|
}
|
|
4689
4711
|
case "adjustment":
|
|
@@ -4862,7 +4884,7 @@ function deserializeLayer(raw, ctx) {
|
|
|
4862
4884
|
...base,
|
|
4863
4885
|
type: "pixel",
|
|
4864
4886
|
surface: r.source === "document" ? _chunkCRMAXIUVcjs.emptySurface.call(void 0, 4) : readSurface(r.asset, r.x, r.y, 4, 0, ctx, `Layer "${base.name || id}"`),
|
|
4865
|
-
offset: { x: Math.round(num(_optionalChain([r, 'access',
|
|
4887
|
+
offset: { x: Math.round(num(_optionalChain([r, 'access', _79 => _79.offset, 'optionalAccess', _80 => _80.x]), -1e7, 1e7, 0)), y: Math.round(num(_optionalChain([r, 'access', _81 => _81.offset, 'optionalAccess', _82 => _82.y]), -1e7, 1e7, 0)) }
|
|
4866
4888
|
};
|
|
4867
4889
|
if (r.source === "document") layer.source = "document";
|
|
4868
4890
|
if (typeof r.fillOpacity === "number" && r.fillOpacity !== 1) layer.fillOpacity = num(r.fillOpacity, 0, 1, 1);
|
|
@@ -4938,7 +4960,7 @@ function placeLayer(layers, layer, placement = {}, defaultIndex) {
|
|
|
4938
4960
|
if (given > 1) fail("Give only one of aboveId, belowId and parentId.");
|
|
4939
4961
|
if (placement.aboveId || placement.belowId) {
|
|
4940
4962
|
const ref = requireLayer(layers, _nullishCoalesce(placement.aboveId, () => ( placement.belowId)));
|
|
4941
|
-
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, layer, _nullishCoalesce(_optionalChain([ref, 'access',
|
|
4963
|
+
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, layer, _nullishCoalesce(_optionalChain([ref, 'access', _83 => _83.parent, 'optionalAccess', _84 => _84.id]), () => ( null)), ref.index + (placement.aboveId ? 1 : 0));
|
|
4942
4964
|
}
|
|
4943
4965
|
if (placement.parentId) {
|
|
4944
4966
|
const ref = requireLayer(layers, placement.parentId);
|
|
@@ -4976,7 +4998,7 @@ function duplicateLayer(layers, id, name) {
|
|
|
4976
4998
|
const copy = withNewIds(loc.layer);
|
|
4977
4999
|
copy.name = _nullishCoalesce(name, () => ( `${loc.layer.name || "Layer"} copy`));
|
|
4978
5000
|
delete copy.locks;
|
|
4979
|
-
return { layers: _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5001
|
+
return { layers: _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _85 => _85.parent, 'optionalAccess', _86 => _86.id]), () => ( null)), loc.index + 1), id: copy.id };
|
|
4980
5002
|
}
|
|
4981
5003
|
function setLayerProperties(layers, id, props) {
|
|
4982
5004
|
const loc = requireLayer(layers, id);
|
|
@@ -5028,8 +5050,8 @@ function setLayerProperties(layers, id, props) {
|
|
|
5028
5050
|
function groupLayers(layers, ids, name = "Group") {
|
|
5029
5051
|
if (!ids.length) fail("Give at least one layer id to group.");
|
|
5030
5052
|
const locs = ids.map((id) => requireLayer(layers, id));
|
|
5031
|
-
const parent = _nullishCoalesce(_optionalChain([locs, 'access',
|
|
5032
|
-
if (locs.some((l) => (_nullishCoalesce(_optionalChain([l, 'access',
|
|
5053
|
+
const parent = _nullishCoalesce(_optionalChain([locs, 'access', _87 => _87[0], 'access', _88 => _88.parent, 'optionalAccess', _89 => _89.id]), () => ( null));
|
|
5054
|
+
if (locs.some((l) => (_nullishCoalesce(_optionalChain([l, 'access', _90 => _90.parent, 'optionalAccess', _91 => _91.id]), () => ( null))) !== parent)) fail("Layers to group must share one parent; move them next to each other first.");
|
|
5033
5055
|
for (const l of locs) requireUnlocked(l.layer, "all", "group it");
|
|
5034
5056
|
const ordered = [...new Set(locs)].sort((a, b) => a.index - b.index);
|
|
5035
5057
|
const top = ordered[ordered.length - 1].index;
|
|
@@ -5046,7 +5068,7 @@ function groupLayers(layers, ids, name = "Group") {
|
|
|
5046
5068
|
return c;
|
|
5047
5069
|
})
|
|
5048
5070
|
};
|
|
5049
|
-
if (_optionalChain([group, 'access',
|
|
5071
|
+
if (_optionalChain([group, 'access', _92 => _92.children, 'access', _93 => _93[0], 'optionalAccess', _94 => _94.clipped])) {
|
|
5050
5072
|
const c = { ...group.children[0] };
|
|
5051
5073
|
delete c.clipped;
|
|
5052
5074
|
group.children[0] = c;
|
|
@@ -5062,7 +5084,7 @@ function ungroupLayer(layers, id) {
|
|
|
5062
5084
|
const group = loc.layer;
|
|
5063
5085
|
let out = _chunkWT6ZAWJPcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
5064
5086
|
group.children.forEach((c, i) => {
|
|
5065
|
-
out = _chunkWT6ZAWJPcjs.insertLayer.call(void 0, out, c, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5087
|
+
out = _chunkWT6ZAWJPcjs.insertLayer.call(void 0, out, c, _nullishCoalesce(_optionalChain([loc, 'access', _95 => _95.parent, 'optionalAccess', _96 => _96.id]), () => ( null)), loc.index + i);
|
|
5066
5088
|
});
|
|
5067
5089
|
return { layers: out, ids: group.children.map((c) => c.id) };
|
|
5068
5090
|
}
|
|
@@ -5120,7 +5142,7 @@ function requirePixelLayer(layers, id) {
|
|
|
5120
5142
|
}
|
|
5121
5143
|
function addLayerFilter(layers, id, filter) {
|
|
5122
5144
|
const layer = requirePixelLayer(layers, id);
|
|
5123
|
-
if (_optionalChain([layer, 'access',
|
|
5145
|
+
if (_optionalChain([layer, 'access', _97 => _97.filters, 'optionalAccess', _98 => _98.some, 'call', _99 => _99((f) => f.kind === filter.kind)])) fail(`Layer "${id}" already has a ${filter.kind} filter; change it with update_layer_filter.`);
|
|
5124
5146
|
return _chunkWT6ZAWJPcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters: [..._nullishCoalesce(layer.filters, () => ( [])), filter] }));
|
|
5125
5147
|
}
|
|
5126
5148
|
function updateLayerFilter(layers, id, filterId, changes) {
|
|
@@ -5184,7 +5206,7 @@ function addLayerEffect(layers, id, kind, params = {}, index) {
|
|
|
5184
5206
|
return { layers: setLayerEffects(layers, id, { ...current, items }), effect };
|
|
5185
5207
|
}
|
|
5186
5208
|
function requireEffect(layer, effectId) {
|
|
5187
|
-
const items = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
5209
|
+
const items = _nullishCoalesce(_optionalChain([layer, 'access', _100 => _100.effects, 'optionalAccess', _101 => _101.items]), () => ( []));
|
|
5188
5210
|
const i = items.findIndex((e) => e.id === effectId);
|
|
5189
5211
|
if (i === -1) fail(`Layer "${layer.name || layer.id}" has no effect "${effectId}". Effects: ${items.map((e) => `${e.id} (${e.kind})`).join(", ") || "none"}; call list_layer_effects.`);
|
|
5190
5212
|
return i;
|
|
@@ -5472,7 +5494,7 @@ function descriptor(classId, items = []) {
|
|
|
5472
5494
|
return { name: "", classId, items };
|
|
5473
5495
|
}
|
|
5474
5496
|
function descGet(d, key) {
|
|
5475
|
-
return _optionalChain([d, 'access',
|
|
5497
|
+
return _optionalChain([d, 'access', _102 => _102.items, 'access', _103 => _103.find, 'call', _104 => _104(([k]) => k === key), 'optionalAccess', _105 => _105[1]]);
|
|
5476
5498
|
}
|
|
5477
5499
|
function descNumber(d, key) {
|
|
5478
5500
|
const v = descGet(d, key);
|
|
@@ -5482,7 +5504,7 @@ function descNumber(d, key) {
|
|
|
5482
5504
|
}
|
|
5483
5505
|
function descBool(d, key) {
|
|
5484
5506
|
const v = descGet(d, key);
|
|
5485
|
-
return _optionalChain([v, 'optionalAccess',
|
|
5507
|
+
return _optionalChain([v, 'optionalAccess', _106 => _106.type]) === "bool" ? v.value : void 0;
|
|
5486
5508
|
}
|
|
5487
5509
|
function descObject(d, key) {
|
|
5488
5510
|
const v = descGet(d, key);
|
|
@@ -6445,7 +6467,7 @@ function readPsd(bytes) {
|
|
|
6445
6467
|
return { header, colorModeData, resources, layers, mergedAlpha, globalBlocks, imageCompression, imageData: r.rest() };
|
|
6446
6468
|
}
|
|
6447
6469
|
function layerBlock(rec, key) {
|
|
6448
|
-
return _optionalChain([rec, 'access',
|
|
6470
|
+
return _optionalChain([rec, 'access', _107 => _107.blocks, 'access', _108 => _108.find, 'call', _109 => _109((b) => b.key === key), 'optionalAccess', _110 => _110.data]);
|
|
6449
6471
|
}
|
|
6450
6472
|
function layerName(rec) {
|
|
6451
6473
|
const luni = layerBlock(rec, "luni");
|
|
@@ -6476,7 +6498,7 @@ function u8Block(rec, key) {
|
|
|
6476
6498
|
function layerTree(file) {
|
|
6477
6499
|
const stack = [[]];
|
|
6478
6500
|
file.layers.forEach((rec, index) => {
|
|
6479
|
-
const kind = _nullishCoalesce(_optionalChain([sectionDivider, 'call',
|
|
6501
|
+
const kind = _nullishCoalesce(_optionalChain([sectionDivider, 'call', _111 => _111(rec), 'optionalAccess', _112 => _112.kind]), () => ( SECTION_OTHER));
|
|
6480
6502
|
if (kind === SECTION_DIVIDER) {
|
|
6481
6503
|
stack.push([]);
|
|
6482
6504
|
} else if (kind === SECTION_OPEN || kind === SECTION_CLOSED) {
|
|
@@ -6494,7 +6516,7 @@ function layerTree(file) {
|
|
|
6494
6516
|
}
|
|
6495
6517
|
function channelRect(rec, id) {
|
|
6496
6518
|
if (id === CHANNEL_USER_MASK && rec.mask) return rec.mask.rect;
|
|
6497
|
-
if (id === CHANNEL_REAL_USER_MASK && rec.mask) return _nullishCoalesce(_optionalChain([rec, 'access',
|
|
6519
|
+
if (id === CHANNEL_REAL_USER_MASK && rec.mask) return _nullishCoalesce(_optionalChain([rec, 'access', _113 => _113.mask, 'access', _114 => _114.real, 'optionalAccess', _115 => _115.rect]), () => ( rec.mask.rect));
|
|
6498
6520
|
return rec.rect;
|
|
6499
6521
|
}
|
|
6500
6522
|
function decodeLayerChannel(file, rec, id) {
|
|
@@ -6512,7 +6534,7 @@ function decodeMergedImage(file) {
|
|
|
6512
6534
|
return decodePlanes(file.imageCompression, file.imageData, { planes: channels, width, height, depth, psb });
|
|
6513
6535
|
}
|
|
6514
6536
|
function resource(file, id) {
|
|
6515
|
-
return _optionalChain([file, 'access',
|
|
6537
|
+
return _optionalChain([file, 'access', _116 => _116.resources, 'access', _117 => _117.find, 'call', _118 => _118((r) => r.id === id), 'optionalAccess', _119 => _119.data]);
|
|
6516
6538
|
}
|
|
6517
6539
|
function resolution(file) {
|
|
6518
6540
|
const d = resource(file, 1005);
|
|
@@ -6839,15 +6861,15 @@ var pct = (d, key, fallback) => num2(d, key, fallback * 100) / 100;
|
|
|
6839
6861
|
var bool = (d, key) => descBool(d, key) === true;
|
|
6840
6862
|
var enumOf = (d, key) => {
|
|
6841
6863
|
const v = descGet(d, key);
|
|
6842
|
-
return _optionalChain([v, 'optionalAccess',
|
|
6864
|
+
return _optionalChain([v, 'optionalAccess', _120 => _120.type]) === "enum" ? v.value : void 0;
|
|
6843
6865
|
};
|
|
6844
6866
|
var text = (d, key) => {
|
|
6845
6867
|
const v = d ? descGet(d, key) : void 0;
|
|
6846
|
-
return _optionalChain([v, 'optionalAccess',
|
|
6868
|
+
return _optionalChain([v, 'optionalAccess', _121 => _121.type]) === "TEXT" ? v.value : "";
|
|
6847
6869
|
};
|
|
6848
6870
|
var list = (d, key) => {
|
|
6849
6871
|
const v = descGet(d, key);
|
|
6850
|
-
if (_optionalChain([v, 'optionalAccess',
|
|
6872
|
+
if (_optionalChain([v, 'optionalAccess', _122 => _122.type]) !== "VlLs") return [];
|
|
6851
6873
|
return v.items.flatMap((it) => it.type === "Objc" || it.type === "GlbO" ? [it.value] : []);
|
|
6852
6874
|
};
|
|
6853
6875
|
var clamp3 = (v, lo, hi) => Number.isFinite(v) ? Math.min(hi, Math.max(lo, v)) : lo;
|
|
@@ -6917,8 +6939,8 @@ function contourOf(d, key) {
|
|
|
6917
6939
|
return { name, points };
|
|
6918
6940
|
}
|
|
6919
6941
|
function contourDesc(c) {
|
|
6920
|
-
const name = _nullishCoalesce(_optionalChain([c, 'optionalAccess',
|
|
6921
|
-
const points = _nullishCoalesce(_optionalChain([c, 'optionalAccess',
|
|
6942
|
+
const name = _nullishCoalesce(_optionalChain([c, 'optionalAccess', _123 => _123.name]), () => ( "Linear"));
|
|
6943
|
+
const points = _nullishCoalesce(_optionalChain([c, 'optionalAccess', _124 => _124.points]), () => ( [
|
|
6922
6944
|
{ input: 0, output: 0 },
|
|
6923
6945
|
{ input: 1, output: 1 }
|
|
6924
6946
|
]));
|
|
@@ -6953,7 +6975,7 @@ function gradientOf(d, notes) {
|
|
|
6953
6975
|
{ position: 0, color: "#000000" },
|
|
6954
6976
|
{ position: 1, color: "#ffffff" }
|
|
6955
6977
|
],
|
|
6956
|
-
style: _nullishCoalesce(_optionalChain([GRADIENT_STYLES, 'access',
|
|
6978
|
+
style: _nullishCoalesce(_optionalChain([GRADIENT_STYLES, 'access', _125 => _125.find, 'call', _126 => _126(([, id]) => id === enumOf(d, "Type")), 'optionalAccess', _127 => _127[0]]), () => ( "linear")),
|
|
6957
6979
|
angle: clamp3(num2(d, "Angl", 90), -360, 360),
|
|
6958
6980
|
scale: clamp3(pct(d, "Scl ", 1), 0.1, 1.5),
|
|
6959
6981
|
reverse: bool(d, "Rvrs"),
|
|
@@ -7007,7 +7029,7 @@ function gradientItems(g) {
|
|
|
7007
7029
|
)
|
|
7008
7030
|
)
|
|
7009
7031
|
};
|
|
7010
|
-
const op = _optionalChain([g, 'access',
|
|
7032
|
+
const op = _optionalChain([g, 'access', _128 => _128.opacityStops, 'optionalAccess', _129 => _129.length]) ? g.opacityStops : g.stops.map((s) => ({ position: s.position, opacity: 1 }));
|
|
7011
7033
|
const trns = {
|
|
7012
7034
|
type: "VlLs",
|
|
7013
7035
|
items: op.map(
|
|
@@ -7776,7 +7798,7 @@ function importNode(ctx, node, depth) {
|
|
|
7776
7798
|
if (node.children) {
|
|
7777
7799
|
const props2 = baseProps(ctx, rec, name, notes);
|
|
7778
7800
|
const divider = sectionDivider(rec);
|
|
7779
|
-
const key = _nullishCoalesce(_optionalChain([divider, 'optionalAccess',
|
|
7801
|
+
const key = _nullishCoalesce(_optionalChain([divider, 'optionalAccess', _130 => _130.blendKey]), () => ( rec.blendKey));
|
|
7780
7802
|
const groupBlend = key === "pass" ? "pass-through" : _nullishCoalesce(PSD_BLEND_KEYS[key], () => ( "normal"));
|
|
7781
7803
|
const children = [];
|
|
7782
7804
|
for (const child of node.children) {
|
|
@@ -7786,7 +7808,7 @@ function importNode(ctx, node, depth) {
|
|
|
7786
7808
|
const group = { type: "group", id: ctx.newId(name), ...props2, blend: groupBlend, children };
|
|
7787
7809
|
const effects2 = recordEffects(ctx, rec, name, notes, true);
|
|
7788
7810
|
if (effects2) group.effects = effects2;
|
|
7789
|
-
if (_optionalChain([divider, 'optionalAccess',
|
|
7811
|
+
if (_optionalChain([divider, 'optionalAccess', _131 => _131.kind]) === SECTION_CLOSED) group.collapsed = true;
|
|
7790
7812
|
const mask2 = recordMask(ctx, rec, name);
|
|
7791
7813
|
if (mask2) group.mask = mask2;
|
|
7792
7814
|
entry.type = "group";
|
|
@@ -8027,7 +8049,7 @@ function exportPsd(input) {
|
|
|
8027
8049
|
return {
|
|
8028
8050
|
opacity: Math.round(Math.min(1, Math.max(0, layer.opacity)) * 255),
|
|
8029
8051
|
clipping: layer.clipped ? 1 : 0,
|
|
8030
|
-
flags: (layer.visible ? 0 : LAYER_FLAG_HIDDEN) | (_optionalChain([layer, 'access',
|
|
8052
|
+
flags: (layer.visible ? 0 : LAYER_FLAG_HIDDEN) | (_optionalChain([layer, 'access', _132 => _132.locks, 'optionalAccess', _133 => _133.transparency]) ? LAYER_FLAG_TRANSPARENCY_PROTECTED : 0),
|
|
8031
8053
|
legacyName: name,
|
|
8032
8054
|
blocks
|
|
8033
8055
|
};
|
|
@@ -8084,7 +8106,7 @@ function exportPsd(input) {
|
|
|
8084
8106
|
}
|
|
8085
8107
|
case "pixel": {
|
|
8086
8108
|
if (layer.source === "document") throw new PsdError(`Layer "${layer.name}" reads the document image; resolve its pixels before export.`);
|
|
8087
|
-
if (_optionalChain([layer, 'access',
|
|
8109
|
+
if (_optionalChain([layer, 'access', _134 => _134.filters, 'optionalAccess', _135 => _135.some, 'call', _136 => _136(isActiveFilter)])) throw new PsdError(`Layer "${layer.name}" has live filters; bake them before export.`);
|
|
8088
8110
|
const extra = [];
|
|
8089
8111
|
if (layer.fillOpacity !== void 0 && layer.fillOpacity < 1) {
|
|
8090
8112
|
extra.push({ key: "iOpa", data: Uint8Array.from([Math.round(Math.max(0, layer.fillOpacity) * 255), 0, 0, 0]) });
|
|
@@ -8400,7 +8422,7 @@ var FreeTransformSession = (_class6 = class {
|
|
|
8400
8422
|
if (init.interpolation !== void 0 && !_chunkWT6ZAWJPcjs.isInterpolation.call(void 0, init.interpolation)) fail2(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
8401
8423
|
this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
|
|
8402
8424
|
const sel = host.selection();
|
|
8403
|
-
const selected = Boolean(_optionalChain([sel, 'optionalAccess',
|
|
8425
|
+
const selected = Boolean(_optionalChain([sel, 'optionalAccess', _137 => _137.bounds]));
|
|
8404
8426
|
let content = _nullishCoalesce(init.content, () => ( "auto"));
|
|
8405
8427
|
if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
|
|
8406
8428
|
fail2(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
|
|
@@ -8428,9 +8450,9 @@ var FreeTransformSession = (_class6 = class {
|
|
|
8428
8450
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
8429
8451
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
8430
8452
|
if (channel !== "pixels" && channel !== "mask") fail2(`Unknown channel "${String(channel)}"; use pixels or mask.`);
|
|
8431
|
-
const linked = _optionalChain([mask, 'optionalAccess',
|
|
8453
|
+
const linked = _optionalChain([mask, 'optionalAccess', _138 => _138.linked]) !== false;
|
|
8432
8454
|
const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
|
|
8433
|
-
if (channel === "mask" && !mask) fail2(_optionalChain([layer, 'access',
|
|
8455
|
+
if (channel === "mask" && !mask) fail2(_optionalChain([layer, 'access', _139 => _139.mask, 'optionalAccess', _140 => _140.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
|
|
8434
8456
|
if (!maskAlone && layer.type !== "pixel") fail2(`Layer "${layer.name || id}" is a ${layer.type} layer; Free Transform works on pixel layers, layer masks (channel mask) and selections.`);
|
|
8435
8457
|
if (!layer.visible && content !== "selection-copy") fail2(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
8436
8458
|
if (content !== "selection-copy") {
|
|
@@ -8485,7 +8507,7 @@ var FreeTransformSession = (_class6 = class {
|
|
|
8485
8507
|
};
|
|
8486
8508
|
this.copyId = copy.id;
|
|
8487
8509
|
const loc = _chunkWT6ZAWJPcjs.findLayer.call(void 0, layers, layer.id);
|
|
8488
|
-
this.startLayers = _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
8510
|
+
this.startLayers = _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _141 => _141.parent, 'optionalAccess', _142 => _142.id]), () => ( null)), loc.index + 1);
|
|
8489
8511
|
this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
|
|
8490
8512
|
moves.push("pixels");
|
|
8491
8513
|
}
|
|
@@ -8655,10 +8677,10 @@ var FreeTransformSession = (_class6 = class {
|
|
|
8655
8677
|
result(changed, layers, selection) {
|
|
8656
8678
|
let bounds = null;
|
|
8657
8679
|
const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
|
|
8658
|
-
const layer = id ? _optionalChain([_chunkWT6ZAWJPcjs.findLayer.call(void 0, layers, id), 'optionalAccess',
|
|
8659
|
-
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess',
|
|
8660
|
-
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess',
|
|
8661
|
-
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess',
|
|
8680
|
+
const layer = id ? _optionalChain([_chunkWT6ZAWJPcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _143 => _143.layer]) : void 0;
|
|
8681
|
+
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _144 => _144.type]) === "pixel") bounds = toDoc(_chunkCRMAXIUVcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
|
|
8682
|
+
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _145 => _145.mask])) bounds = toDoc(_chunkCRMAXIUVcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
|
|
8683
|
+
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _146 => _146.bounds]) ? { ...selection.bounds } : null;
|
|
8662
8684
|
return {
|
|
8663
8685
|
layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
|
|
8664
8686
|
content: this.content,
|
|
@@ -8681,7 +8703,7 @@ function paintCoverageInto(base, coverage, apply, rects) {
|
|
|
8681
8703
|
const key = _chunkCRMAXIUVcjs.tileKey.call(void 0, t.tx, t.ty);
|
|
8682
8704
|
if (done.has(key)) continue;
|
|
8683
8705
|
done.add(key);
|
|
8684
|
-
const src = _nullishCoalesce(_optionalChain([base, 'access',
|
|
8706
|
+
const src = _nullishCoalesce(_optionalChain([base, 'access', _147 => _147.tiles, 'access', _148 => _148.get, 'call', _149 => _149(key), 'optionalAccess', _150 => _150.data]), () => ( defaultTile(base)));
|
|
8685
8707
|
const data = _chunkZZOTHJ4Kcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
|
|
8686
8708
|
const tile = _chunkCRMAXIUVcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
|
|
8687
8709
|
if (tile) tiles.set(key, tile);
|
|
@@ -8733,11 +8755,11 @@ var PaintStrokeSession = (_class7 = class {
|
|
|
8733
8755
|
offset: a.offset,
|
|
8734
8756
|
lockTransparency: a.lockTransparency,
|
|
8735
8757
|
selection: a.selection,
|
|
8736
|
-
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
8758
|
+
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _151 => _151.live, 'access', _152 => _152.get, 'call', _153 => _153(_chunkCRMAXIUVcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _154 => _154.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
|
|
8737
8759
|
writeTile: (tx, ty) => {
|
|
8738
8760
|
const key = _chunkCRMAXIUVcjs.tileKey.call(void 0, tx, ty);
|
|
8739
8761
|
if (!this.touched.has(key)) {
|
|
8740
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
8762
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _155 => _155.base, 'access', _156 => _156.tiles, 'access', _157 => _157.get, 'call', _158 => _158(key), 'optionalAccess', _159 => _159.data]), () => ( defaultTile(this.base)));
|
|
8741
8763
|
this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
|
|
8742
8764
|
this.touched.add(key);
|
|
8743
8765
|
}
|
|
@@ -8774,8 +8796,8 @@ var PaintStrokeSession = (_class7 = class {
|
|
|
8774
8796
|
}
|
|
8775
8797
|
}
|
|
8776
8798
|
for (const [key, { tx, ty, r }] of regions) {
|
|
8777
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
8778
|
-
const prev = this.touched.has(key) ? _optionalChain([this, 'access',
|
|
8799
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _160 => _160.base, 'access', _161 => _161.tiles, 'access', _162 => _162.get, 'call', _163 => _163(key), 'optionalAccess', _164 => _164.data]), () => ( defaultTile(this.base)));
|
|
8800
|
+
const prev = this.touched.has(key) ? _optionalChain([this, 'access', _165 => _165.live, 'access', _166 => _166.get, 'call', _167 => _167(key), 'optionalAccess', _168 => _168.data]) : void 0;
|
|
8779
8801
|
this.touched.add(key);
|
|
8780
8802
|
const data = _chunkZZOTHJ4Kcjs.applyStrokeToTile.call(void 0, stroke.coverage, src, ch, tx, ty, this.apply, prev ? { into: prev, region: r } : {});
|
|
8781
8803
|
this.live.set(key, { data, uniform: null });
|
|
@@ -8850,14 +8872,14 @@ function migrateSerializedImageEditorState(data) {
|
|
|
8850
8872
|
const legacy = data;
|
|
8851
8873
|
const adjustments = normalizeStoredAdjustments(legacy.adjustments);
|
|
8852
8874
|
return {
|
|
8853
|
-
version: _optionalChain([adjustments, 'access',
|
|
8875
|
+
version: _optionalChain([adjustments, 'access', _169 => _169.layers, 'optionalAccess', _170 => _170.length]) ? 2 : 1,
|
|
8854
8876
|
crop: legacy.crop ? { ...legacy.crop } : null,
|
|
8855
8877
|
transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
|
|
8856
8878
|
adjustments: serializeAdjustments(adjustments),
|
|
8857
8879
|
depthMask: {
|
|
8858
8880
|
...DEFAULT_DEPTH_MASK,
|
|
8859
8881
|
...legacy.depthMask,
|
|
8860
|
-
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access',
|
|
8882
|
+
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _171 => _171.depthMask, 'optionalAccess', _172 => _172.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
|
|
8861
8883
|
},
|
|
8862
8884
|
annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
|
|
8863
8885
|
...legacy.selection ? { selection: { ...legacy.selection } } : {}
|
|
@@ -8921,7 +8943,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
8921
8943
|
sourceIsOpaque: () => this.sourceIsOpaque(),
|
|
8922
8944
|
version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
8923
8945
|
globalLight: () => this.state.globalLight,
|
|
8924
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
8946
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _173 => _173.state, 'access', _174 => _174.patterns, 'optionalAccess', _175 => _175.find, 'call', _176 => _176((p) => p.id === id)]), () => ( null))
|
|
8925
8947
|
};
|
|
8926
8948
|
this.state = {
|
|
8927
8949
|
sourceUrl: typeof options.image === "string" ? options.image : null,
|
|
@@ -8954,7 +8976,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
8954
8976
|
};
|
|
8955
8977
|
}
|
|
8956
8978
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
8957
|
-
if (_optionalChain([options, 'access',
|
|
8979
|
+
if (_optionalChain([options, 'access', _177 => _177.initialState, 'optionalAccess', _178 => _178.selection])) {
|
|
8958
8980
|
try {
|
|
8959
8981
|
this.state.selection = normalizeSelection(deserializeSelection(options.initialState.selection));
|
|
8960
8982
|
} catch (e20) {
|
|
@@ -9037,7 +9059,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9037
9059
|
else if (!strokeRects) this.pendingDirty = "all";
|
|
9038
9060
|
this.syncViews();
|
|
9039
9061
|
const currentState = { ...this.state };
|
|
9040
|
-
_optionalChain([this, 'access',
|
|
9062
|
+
_optionalChain([this, 'access', _179 => _179.onStateChange, 'optionalCall', _180 => _180(currentState)]);
|
|
9041
9063
|
this.listeners.forEach((l) => l(currentState));
|
|
9042
9064
|
}
|
|
9043
9065
|
/** Recomputes the compatibility views (`adjustments`, `depthMask`, `annotations`) when the stack changed. */
|
|
@@ -9248,7 +9270,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9248
9270
|
return this.state.layers;
|
|
9249
9271
|
}
|
|
9250
9272
|
getLayer(id) {
|
|
9251
|
-
return _optionalChain([_chunkWT6ZAWJPcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess',
|
|
9273
|
+
return _optionalChain([_chunkWT6ZAWJPcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _181 => _181.layer]);
|
|
9252
9274
|
}
|
|
9253
9275
|
/** The active layer, or `undefined`. */
|
|
9254
9276
|
getActiveLayer() {
|
|
@@ -9261,7 +9283,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9261
9283
|
setActiveLayer(id, target = "pixels") {
|
|
9262
9284
|
if (id !== null && !this.getLayer(id)) return false;
|
|
9263
9285
|
const layer = id ? this.getLayer(id) : void 0;
|
|
9264
|
-
const t = target === "mask" && _optionalChain([layer, 'optionalAccess',
|
|
9286
|
+
const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _182 => _182.mask]) ? "mask" : "pixels";
|
|
9265
9287
|
if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
|
|
9266
9288
|
this.state.activeLayerId = id;
|
|
9267
9289
|
this.state.activeTarget = t;
|
|
@@ -9320,7 +9342,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9320
9342
|
surfaceOf: (l) => this.surfaceOf(l),
|
|
9321
9343
|
version: `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
9322
9344
|
globalLight: this.state.globalLight,
|
|
9323
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
9345
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _183 => _183.state, 'access', _184 => _184.patterns, 'optionalAccess', _185 => _185.find, 'call', _186 => _186((p) => p.id === id)]), () => ( null))
|
|
9324
9346
|
};
|
|
9325
9347
|
}
|
|
9326
9348
|
__init49() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
|
|
@@ -9397,7 +9419,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9397
9419
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
9398
9420
|
ctx.drawImage(el, 0, 0, width, height);
|
|
9399
9421
|
const data = ctx.getImageData(0, 0, width, height);
|
|
9400
|
-
if (!_optionalChain([data, 'optionalAccess',
|
|
9422
|
+
if (!_optionalChain([data, 'optionalAccess', _187 => _187.data]) || data.data.length < width * height * 4) return null;
|
|
9401
9423
|
return { width, height, data: data.data };
|
|
9402
9424
|
} catch (e22) {
|
|
9403
9425
|
return null;
|
|
@@ -9408,7 +9430,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9408
9430
|
commitLayers(next, extra, commitToHistory = true) {
|
|
9409
9431
|
if (commitToHistory) this.recordHistory();
|
|
9410
9432
|
this.state.layers = next;
|
|
9411
|
-
_optionalChain([extra, 'optionalCall',
|
|
9433
|
+
_optionalChain([extra, 'optionalCall', _188 => _188()]);
|
|
9412
9434
|
if (this.state.activeLayerId && !_chunkWT6ZAWJPcjs.findLayer.call(void 0, next, this.state.activeLayerId)) {
|
|
9413
9435
|
this.state.activeLayerId = null;
|
|
9414
9436
|
this.state.activeTarget = "pixels";
|
|
@@ -9445,7 +9467,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9445
9467
|
const layer = {
|
|
9446
9468
|
type: "pixel",
|
|
9447
9469
|
id: init.id && !ids.has(init.id) ? init.id : newLayerId(),
|
|
9448
|
-
name: _optionalChain([init, 'access',
|
|
9470
|
+
name: _optionalChain([init, 'access', _189 => _189.name, 'optionalAccess', _190 => _190.trim, 'call', _191 => _191()]) || this.nextLayerName(),
|
|
9449
9471
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
9450
9472
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
9451
9473
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -9472,7 +9494,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9472
9494
|
async decodeImage(image) {
|
|
9473
9495
|
const trimmed = image.trim();
|
|
9474
9496
|
let png = null;
|
|
9475
|
-
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkWT6ZAWJPcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess',
|
|
9497
|
+
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkWT6ZAWJPcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _192 => _192.bytes]), () => ( null));
|
|
9476
9498
|
else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
|
|
9477
9499
|
try {
|
|
9478
9500
|
const bytes = _chunkWT6ZAWJPcjs.base64ToBytes.call(void 0, trimmed);
|
|
@@ -9530,9 +9552,9 @@ var ImageEditorController = (_class8 = class {
|
|
|
9530
9552
|
moveLayer(id, placement) {
|
|
9531
9553
|
const next = moveLayer(this.state.layers, id, placement);
|
|
9532
9554
|
const loc = _chunkWT6ZAWJPcjs.findLayer.call(void 0, next, id);
|
|
9533
|
-
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9555
|
+
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _193 => _193.parent, 'optionalAccess', _194 => _194.id]), () => ( null)), index: loc.index };
|
|
9534
9556
|
this.commitLayers(next);
|
|
9535
|
-
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9557
|
+
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _195 => _195.parent, 'optionalAccess', _196 => _196.id]), () => ( null)), index: loc.index };
|
|
9536
9558
|
}
|
|
9537
9559
|
/**
|
|
9538
9560
|
* Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
|
|
@@ -9549,7 +9571,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9549
9571
|
const group = {
|
|
9550
9572
|
type: "group",
|
|
9551
9573
|
id: newLayerId("group"),
|
|
9552
|
-
name: _optionalChain([init, 'access',
|
|
9574
|
+
name: _optionalChain([init, 'access', _197 => _197.name, 'optionalAccess', _198 => _198.trim, 'call', _199 => _199()]) || "Group",
|
|
9553
9575
|
visible: true,
|
|
9554
9576
|
opacity: 1,
|
|
9555
9577
|
blend,
|
|
@@ -9599,7 +9621,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9599
9621
|
let mask;
|
|
9600
9622
|
if (from === "selection") {
|
|
9601
9623
|
const sel = this.state.selection;
|
|
9602
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9624
|
+
if (!_optionalChain([sel, 'optionalAccess', _200 => _200.bounds])) throw new LayerOperationError("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
9603
9625
|
mask = this.maskFromSelection(sel, props);
|
|
9604
9626
|
if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
|
|
9605
9627
|
mask = { ...mask, surface: _chunkCRMAXIUVcjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
|
|
@@ -9677,7 +9699,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9677
9699
|
const layer = loc.layer;
|
|
9678
9700
|
if (layer.type !== "pixel") throw new LayerOperationError(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
9679
9701
|
const sel = this.state.selection;
|
|
9680
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9702
|
+
if (!_optionalChain([sel, 'optionalAccess', _201 => _201.bounds])) throw new LayerOperationError("Nothing is selected; select the pixels to copy first.");
|
|
9681
9703
|
if (options.cut) requireUnlocked(layer, "pixels", "cut from it");
|
|
9682
9704
|
const surface = this.surfaceOf(layer);
|
|
9683
9705
|
const sb = sel.bounds;
|
|
@@ -9695,14 +9717,14 @@ var ImageEditorController = (_class8 = class {
|
|
|
9695
9717
|
const copy = {
|
|
9696
9718
|
type: "pixel",
|
|
9697
9719
|
id: newLayerId(),
|
|
9698
|
-
name: _optionalChain([options, 'access',
|
|
9720
|
+
name: _optionalChain([options, 'access', _202 => _202.name, 'optionalAccess', _203 => _203.trim, 'call', _204 => _204()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
9699
9721
|
visible: true,
|
|
9700
9722
|
opacity: 1,
|
|
9701
9723
|
blend: "normal",
|
|
9702
9724
|
surface: _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
|
|
9703
9725
|
offset: { ...layer.offset }
|
|
9704
9726
|
};
|
|
9705
|
-
let next = _chunkWT6ZAWJPcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9727
|
+
let next = _chunkWT6ZAWJPcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _205 => _205.parent, 'optionalAccess', _206 => _206.id]), () => ( null)), loc.index + 1);
|
|
9706
9728
|
if (kept) {
|
|
9707
9729
|
const cutLayer = { ...layer, surface: _chunkCRMAXIUVcjs.writeRegion.call(void 0, surface, src, kept) };
|
|
9708
9730
|
delete cutLayer.source;
|
|
@@ -9726,7 +9748,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
9726
9748
|
layers: () => this.state.layers,
|
|
9727
9749
|
activeLayerId: () => this.state.activeLayerId,
|
|
9728
9750
|
activeTarget: () => this.state.activeTarget,
|
|
9729
|
-
selection: () => _optionalChain([this, 'access',
|
|
9751
|
+
selection: () => _optionalChain([this, 'access', _207 => _207.state, 'access', _208 => _208.selection, 'optionalAccess', _209 => _209.bounds]) ? this.state.selection : null,
|
|
9730
9752
|
canvas: () => this.naturalSize,
|
|
9731
9753
|
pixelsOf: (layer) => this.surfaceOf(layer),
|
|
9732
9754
|
capture: () => this.captureHistoryEntry(),
|
|
@@ -10057,7 +10079,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10057
10079
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
10058
10080
|
const key = `${tw}x${th}:${ox},${oy}`;
|
|
10059
10081
|
let byKey = this.thumbCache.get(surface);
|
|
10060
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
10082
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _210 => _210.get, 'call', _211 => _211(key)]);
|
|
10061
10083
|
if (hit) return hit;
|
|
10062
10084
|
const out = new Uint8ClampedArray(tw * th * 4);
|
|
10063
10085
|
for (let y = 0; y < th; y++) {
|
|
@@ -10145,7 +10167,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10145
10167
|
if (!layer.visible) throw new LayerOperationError(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
|
|
10146
10168
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
10147
10169
|
const surface = ch === "mask" ? layer.mask.surface : this.surfaceOf(layer);
|
|
10148
|
-
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access',
|
|
10170
|
+
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _212 => _212.locks, 'optionalAccess', _213 => _213.transparency]));
|
|
10149
10171
|
return { id, layer, channel: ch, offset, surface, lockTransparency };
|
|
10150
10172
|
}
|
|
10151
10173
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
@@ -10182,7 +10204,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10182
10204
|
opacity: brush.opacity,
|
|
10183
10205
|
blend: target.channel === "mask" ? "normal" : brush.blend,
|
|
10184
10206
|
lockTransparency: target.lockTransparency,
|
|
10185
|
-
selection: _optionalChain([this, 'access',
|
|
10207
|
+
selection: _optionalChain([this, 'access', _214 => _214.state, 'access', _215 => _215.selection, 'optionalAccess', _216 => _216.bounds]) ? this.state.selection : null,
|
|
10186
10208
|
offset: target.offset
|
|
10187
10209
|
};
|
|
10188
10210
|
if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply);
|
|
@@ -10234,7 +10256,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10234
10256
|
paintStroke(init) {
|
|
10235
10257
|
if (!Array.isArray(init.points) || !init.points.length) throw new LayerOperationError("points must hold at least one { x, y } point.");
|
|
10236
10258
|
for (const p of init.points) {
|
|
10237
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess',
|
|
10259
|
+
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _217 => _217.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _218 => _218.y]))) throw new LayerOperationError("Every point needs finite x and y (document pixels).");
|
|
10238
10260
|
}
|
|
10239
10261
|
const session = this.beginStroke(init);
|
|
10240
10262
|
session.push(init.points);
|
|
@@ -10262,8 +10284,8 @@ var ImageEditorController = (_class8 = class {
|
|
|
10262
10284
|
const opacity = _nullishCoalesce(options.opacity, () => ( 1));
|
|
10263
10285
|
if (!(opacity >= 0 && opacity <= 1)) throw new LayerOperationError("opacity must be from 0 to 1.");
|
|
10264
10286
|
const blend = _nullishCoalesce(parseBlend(options.blend), () => ( "normal"));
|
|
10265
|
-
const sel = options.useSelection !== false && _optionalChain([this, 'access',
|
|
10266
|
-
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
10287
|
+
const sel = options.useSelection !== false && _optionalChain([this, 'access', _219 => _219.state, 'access', _220 => _220.selection, 'optionalAccess', _221 => _221.bounds]) ? this.state.selection : null;
|
|
10288
|
+
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _222 => _222.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
10267
10289
|
const coverage = new (0, _chunkZZOTHJ4Kcjs.CoverageMap)();
|
|
10268
10290
|
const ones = new Float32Array(region.width * region.height);
|
|
10269
10291
|
if (sel) {
|
|
@@ -10381,7 +10403,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10381
10403
|
placeLayer(layers, node, where) {
|
|
10382
10404
|
if (where.aboveId) {
|
|
10383
10405
|
const loc = _chunkWT6ZAWJPcjs.findLayer.call(void 0, layers, where.aboveId);
|
|
10384
|
-
if (loc) return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10406
|
+
if (loc) return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _223 => _223.parent, 'optionalAccess', _224 => _224.id]), () => ( null)), loc.index + 1);
|
|
10385
10407
|
}
|
|
10386
10408
|
if (where.parentId) {
|
|
10387
10409
|
const loc = _chunkWT6ZAWJPcjs.findLayer.call(void 0, layers, where.parentId);
|
|
@@ -10392,11 +10414,11 @@ var ImageEditorController = (_class8 = class {
|
|
|
10392
10414
|
const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
|
|
10393
10415
|
if (at < nodes.length) {
|
|
10394
10416
|
const loc = _chunkWT6ZAWJPcjs.findLayer.call(void 0, layers, nodes[at].id);
|
|
10395
|
-
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10417
|
+
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _225 => _225.parent, 'optionalAccess', _226 => _226.id]), () => ( null)), loc.index);
|
|
10396
10418
|
}
|
|
10397
10419
|
if (nodes.length) {
|
|
10398
10420
|
const loc = _chunkWT6ZAWJPcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
|
|
10399
|
-
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10421
|
+
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _227 => _227.parent, 'optionalAccess', _228 => _228.id]), () => ( null)), loc.index + 1);
|
|
10400
10422
|
}
|
|
10401
10423
|
}
|
|
10402
10424
|
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
|
|
@@ -10508,7 +10530,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10508
10530
|
const anchor = nodes[to];
|
|
10509
10531
|
const without = _chunkWT6ZAWJPcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
10510
10532
|
const loc = _chunkWT6ZAWJPcjs.findLayer.call(void 0, without, anchor.id);
|
|
10511
|
-
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10533
|
+
return _chunkWT6ZAWJPcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _229 => _229.parent, 'optionalAccess', _230 => _230.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
|
|
10512
10534
|
}
|
|
10513
10535
|
/** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
10514
10536
|
moveAdjustmentLayer(id, toIndex) {
|
|
@@ -10544,7 +10566,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10544
10566
|
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
10545
10567
|
}
|
|
10546
10568
|
get hasSelection() {
|
|
10547
|
-
return Boolean(_optionalChain([this, 'access',
|
|
10569
|
+
return Boolean(_optionalChain([this, 'access', _231 => _231.state, 'access', _232 => _232.selection, 'optionalAccess', _233 => _233.bounds]));
|
|
10548
10570
|
}
|
|
10549
10571
|
get naturalSize() {
|
|
10550
10572
|
return {
|
|
@@ -10634,7 +10656,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10634
10656
|
try {
|
|
10635
10657
|
const canvas = await this.renderSource();
|
|
10636
10658
|
const ctx = canvas.getContext("2d");
|
|
10637
|
-
const data2 = _optionalChain([ctx, 'optionalAccess',
|
|
10659
|
+
const data2 = _optionalChain([ctx, 'optionalAccess', _234 => _234.getImageData, 'optionalCall', _235 => _235(0, 0, width, height)]);
|
|
10638
10660
|
if (data2 && data2.data && data2.data.length >= width * height * 4) {
|
|
10639
10661
|
base = { width, height, data: data2.data };
|
|
10640
10662
|
this.samplePixels = base;
|
|
@@ -10700,7 +10722,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10700
10722
|
/** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
|
|
10701
10723
|
modifySelection(op, radius) {
|
|
10702
10724
|
const sel = this.state.selection;
|
|
10703
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10725
|
+
if (!_optionalChain([sel, 'optionalAccess', _236 => _236.bounds])) return false;
|
|
10704
10726
|
return this.setSelection(modifySelection(sel, op, radius));
|
|
10705
10727
|
}
|
|
10706
10728
|
/**
|
|
@@ -10709,7 +10731,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10709
10731
|
*/
|
|
10710
10732
|
async refineSelection(params, options = {}) {
|
|
10711
10733
|
const sel = this.state.selection;
|
|
10712
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10734
|
+
if (!_optionalChain([sel, 'optionalAccess', _237 => _237.bounds])) return false;
|
|
10713
10735
|
const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
|
|
10714
10736
|
return this.setSelection(refineSelection(pixels, sel, params));
|
|
10715
10737
|
}
|
|
@@ -10726,7 +10748,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10726
10748
|
const canvas = this.renderer.createCanvas(w, h);
|
|
10727
10749
|
const ctx = canvas.getContext("2d");
|
|
10728
10750
|
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
10729
|
-
const data = _optionalChain([ctx, 'optionalAccess',
|
|
10751
|
+
const data = _optionalChain([ctx, 'optionalAccess', _238 => _238.getImageData, 'optionalCall', _239 => _239(0, 0, w, h)]);
|
|
10730
10752
|
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
10731
10753
|
pixels = { width: w, height: h, data: data.data };
|
|
10732
10754
|
} else {
|
|
@@ -10754,7 +10776,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10754
10776
|
*/
|
|
10755
10777
|
applySelectionAsLayerMask(layerId, props = {}) {
|
|
10756
10778
|
const sel = this.state.selection;
|
|
10757
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10779
|
+
if (!_optionalChain([sel, 'optionalAccess', _240 => _240.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
|
|
10758
10780
|
return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
|
|
10759
10781
|
}
|
|
10760
10782
|
setLayerMask(layerId, mask, commitToHistory = true) {
|
|
@@ -10785,7 +10807,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10785
10807
|
/** Load Selection from a layer mask (its pixels; density and feather are not applied). */
|
|
10786
10808
|
selectionFromLayerMask(layerId, mode = "replace") {
|
|
10787
10809
|
const layer = this.getLayer(layerId);
|
|
10788
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
10810
|
+
if (!_optionalChain([layer, 'optionalAccess', _241 => _241.mask]) || layer.mask.source) return false;
|
|
10789
10811
|
const { width, height } = this.naturalSize;
|
|
10790
10812
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
10791
10813
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -10821,7 +10843,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10821
10843
|
this.state.layers = _chunkWT6ZAWJPcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10822
10844
|
const next = { ...l };
|
|
10823
10845
|
if (isDefaultDepthMask(merged)) {
|
|
10824
|
-
if (_optionalChain([next, 'access',
|
|
10846
|
+
if (_optionalChain([next, 'access', _242 => _242.mask, 'optionalAccess', _243 => _243.source])) delete next.mask;
|
|
10825
10847
|
} else next.mask = depthRasterMask(merged);
|
|
10826
10848
|
return next;
|
|
10827
10849
|
});
|
|
@@ -10831,7 +10853,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10831
10853
|
resetDepthMask() {
|
|
10832
10854
|
this.recordHistory();
|
|
10833
10855
|
const target = this.developLayer();
|
|
10834
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
10856
|
+
if (_optionalChain([target, 'optionalAccess', _244 => _244.mask, 'optionalAccess', _245 => _245.source])) {
|
|
10835
10857
|
this.state.layers = _chunkWT6ZAWJPcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
10836
10858
|
const next = { ...l };
|
|
10837
10859
|
delete next.mask;
|
|
@@ -10853,7 +10875,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10853
10875
|
const fullAnnotation = { ...annotation, id };
|
|
10854
10876
|
const layer = annotationLayerFor(fullAnnotation);
|
|
10855
10877
|
const loc = placement.aboveId ? _chunkWT6ZAWJPcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
|
|
10856
|
-
this.state.layers = loc ? _chunkWT6ZAWJPcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10878
|
+
this.state.layers = loc ? _chunkWT6ZAWJPcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _246 => _246.parent, 'optionalAccess', _247 => _247.id]), () => ( null)), loc.index + 1) : _chunkWT6ZAWJPcjs.insertLayer.call(void 0, this.state.layers, layer, null);
|
|
10857
10879
|
this.state.selectedAnnotationId = id;
|
|
10858
10880
|
this.notify();
|
|
10859
10881
|
return id;
|
|
@@ -10959,7 +10981,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
10959
10981
|
return this.renderer.createCanvas(1, 1);
|
|
10960
10982
|
}
|
|
10961
10983
|
this.syncViews();
|
|
10962
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10984
|
+
if (_optionalChain([options, 'optionalAccess', _248 => _248.layerIds])) {
|
|
10963
10985
|
const keep = new Set(options.layerIds);
|
|
10964
10986
|
const layers = _chunkWT6ZAWJPcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
|
|
10965
10987
|
return this.renderer.renderExport(source, { ...this.state, layers }, options);
|
|
@@ -11092,7 +11114,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
11092
11114
|
let px2 = await this.decodeImage(newDataUrl);
|
|
11093
11115
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
11094
11116
|
const data = new Uint8ClampedArray(px2.data);
|
|
11095
|
-
const sel = _optionalChain([this, 'access',
|
|
11117
|
+
const sel = _optionalChain([this, 'access', _249 => _249.state, 'access', _250 => _250.selection, 'optionalAccess', _251 => _251.bounds]) ? this.state.selection : null;
|
|
11096
11118
|
if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
|
|
11097
11119
|
return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
|
|
11098
11120
|
}
|
|
@@ -11144,7 +11166,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
11144
11166
|
if (layer.locks) next.locks = layer.locks;
|
|
11145
11167
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
11146
11168
|
} else if (layer.type === "pixel") {
|
|
11147
|
-
if (!_optionalChain([layer, 'access',
|
|
11169
|
+
if (!_optionalChain([layer, 'access', _252 => _252.filters, 'optionalAccess', _253 => _253.length])) throw new LayerOperationError(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
|
|
11148
11170
|
requireUnlocked(layer, "pixels", "rasterize it");
|
|
11149
11171
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
11150
11172
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11225,7 +11247,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
11225
11247
|
const compositor = new LayerCompositor();
|
|
11226
11248
|
const bakeMask = (layer) => {
|
|
11227
11249
|
const mask = layer.mask;
|
|
11228
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
11250
|
+
if (!_optionalChain([mask, 'optionalAccess', _254 => _254.source])) return mask;
|
|
11229
11251
|
add2("Parametric (depth) masks were baked into pixel masks", layer.name);
|
|
11230
11252
|
const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
|
|
11231
11253
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
@@ -11242,7 +11264,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
11242
11264
|
};
|
|
11243
11265
|
const prepare = async (layer) => {
|
|
11244
11266
|
const p = await prepareLayer(layer);
|
|
11245
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11267
|
+
if (_optionalChain([p, 'optionalAccess', _255 => _255.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
|
|
11246
11268
|
return p;
|
|
11247
11269
|
};
|
|
11248
11270
|
const prepareLayer = async (layer) => {
|
|
@@ -11289,7 +11311,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
11289
11311
|
out.surface = this.surfaceOf(layer);
|
|
11290
11312
|
delete out.source;
|
|
11291
11313
|
}
|
|
11292
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11314
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _256 => _256.filters, 'optionalAccess', _257 => _257.filter, 'call', _258 => _258(isActiveFilter)]), () => ( []));
|
|
11293
11315
|
if (active.length) {
|
|
11294
11316
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
11295
11317
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -11300,7 +11322,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
11300
11322
|
const data = compositor.composite([content], canvas, sources);
|
|
11301
11323
|
out = { ...out, surface: _chunkCRMAXIUVcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
|
|
11302
11324
|
}
|
|
11303
|
-
if (_optionalChain([layer, 'access',
|
|
11325
|
+
if (_optionalChain([layer, 'access', _259 => _259.filters, 'optionalAccess', _260 => _260.some, 'call', _261 => _261((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
|
|
11304
11326
|
delete out.filters;
|
|
11305
11327
|
const mask = bakeMask(layer);
|
|
11306
11328
|
if (mask) out.mask = mask;
|
|
@@ -11370,7 +11392,7 @@ var ImageEditorController = (_class8 = class {
|
|
|
11370
11392
|
}
|
|
11371
11393
|
toJSON(options) {
|
|
11372
11394
|
const out = this.serializeState();
|
|
11373
|
-
if (_optionalChain([this, 'access',
|
|
11395
|
+
if (_optionalChain([this, 'access', _262 => _262.state, 'access', _263 => _263.selection, 'optionalAccess', _264 => _264.bounds])) out.selection = serializeSelection(this.state.selection);
|
|
11374
11396
|
if (!options || out.version !== LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
|
|
11375
11397
|
return serializeLayersExternal(this.state.layers, options.store).then(({ layers, assets }) => ({ ...out, layers, assets }));
|
|
11376
11398
|
}
|
|
@@ -11451,10 +11473,10 @@ var ImageEditorController = (_class8 = class {
|
|
|
11451
11473
|
serializeState() {
|
|
11452
11474
|
const { width, height } = this.naturalSize;
|
|
11453
11475
|
const view = legacyView(this.stack(), width, height, null);
|
|
11454
|
-
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access',
|
|
11476
|
+
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _265 => _265.state, 'access', _266 => _266.patterns, 'optionalAccess', _267 => _267.length])) {
|
|
11455
11477
|
return {
|
|
11456
11478
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
11457
|
-
version: _optionalChain([view, 'access',
|
|
11479
|
+
version: _optionalChain([view, 'access', _268 => _268.adjustments, 'access', _269 => _269.layers, 'optionalAccess', _270 => _270.length]) ? 2 : 1,
|
|
11458
11480
|
crop: this.state.crop ? { ...this.state.crop } : null,
|
|
11459
11481
|
transform: { ...this.state.transform },
|
|
11460
11482
|
adjustments: serializeAdjustments(view.adjustments),
|
|
@@ -11479,13 +11501,13 @@ var ImageEditorController = (_class8 = class {
|
|
|
11479
11501
|
};
|
|
11480
11502
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
11481
11503
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
11482
|
-
if (_optionalChain([this, 'access',
|
|
11504
|
+
if (_optionalChain([this, 'access', _271 => _271.state, 'access', _272 => _272.patterns, 'optionalAccess', _273 => _273.length])) out.patterns = serializePatterns(this.state.patterns);
|
|
11483
11505
|
return out;
|
|
11484
11506
|
}
|
|
11485
11507
|
}, _class8);
|
|
11486
11508
|
function serializeAdjustments(adjustments) {
|
|
11487
11509
|
const out = { ...adjustments };
|
|
11488
|
-
if (_optionalChain([out, 'access',
|
|
11510
|
+
if (_optionalChain([out, 'access', _274 => _274.layers, 'optionalAccess', _275 => _275.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
11489
11511
|
else delete out.layers;
|
|
11490
11512
|
if (normalizeProcessVersion(out.process) === LEGACY_PROCESS_VERSION) {
|
|
11491
11513
|
delete out.process;
|
|
@@ -11521,11 +11543,11 @@ function withDevelop(layer, partial) {
|
|
|
11521
11543
|
return { ...layer, filters };
|
|
11522
11544
|
}
|
|
11523
11545
|
function withBlur(layer, radius) {
|
|
11524
|
-
const existing = _optionalChain([layer, 'access',
|
|
11546
|
+
const existing = _optionalChain([layer, 'access', _276 => _276.filters, 'optionalAccess', _277 => _277.find, 'call', _278 => _278((f) => f.kind === "blur")]);
|
|
11525
11547
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
11526
11548
|
if (radius > 0) {
|
|
11527
11549
|
filters.push({
|
|
11528
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
11550
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _279 => _279.id]), () => ( (layer.source === "document" ? BLUR_FILTER_ID : newLayerId("flt")))),
|
|
11529
11551
|
kind: "blur",
|
|
11530
11552
|
enabled: true,
|
|
11531
11553
|
radius
|
|
@@ -11621,7 +11643,7 @@ function pixelsOnly(layers) {
|
|
|
11621
11643
|
for (const l of layers) {
|
|
11622
11644
|
if (l.type === "adjustment") continue;
|
|
11623
11645
|
if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
|
|
11624
|
-
else if (l.type === "pixel" && _optionalChain([l, 'access',
|
|
11646
|
+
else if (l.type === "pixel" && _optionalChain([l, 'access', _280 => _280.filters, 'optionalAccess', _281 => _281.length])) {
|
|
11625
11647
|
const p = { ...l };
|
|
11626
11648
|
delete p.filters;
|
|
11627
11649
|
out.push(p);
|
|
@@ -11679,7 +11701,7 @@ function toHex2(c) {
|
|
|
11679
11701
|
return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
|
|
11680
11702
|
}
|
|
11681
11703
|
function normalizeSelection(mask) {
|
|
11682
|
-
return _optionalChain([mask, 'optionalAccess',
|
|
11704
|
+
return _optionalChain([mask, 'optionalAccess', _282 => _282.bounds]) ? mask : null;
|
|
11683
11705
|
}
|
|
11684
11706
|
function sameSelection(a, b) {
|
|
11685
11707
|
if (a.width !== b.width || a.height !== b.height) return false;
|
|
@@ -11840,7 +11862,7 @@ function loadImageEditorDocument(input) {
|
|
|
11840
11862
|
}
|
|
11841
11863
|
const state = { version: 1, ...result.value };
|
|
11842
11864
|
if (isV2) {
|
|
11843
|
-
if (_optionalChain([state, 'access',
|
|
11865
|
+
if (_optionalChain([state, 'access', _283 => _283.adjustments, 'access', _284 => _284.layers, 'optionalAccess', _285 => _285.length])) state.version = 2;
|
|
11844
11866
|
result.report.version = 2;
|
|
11845
11867
|
}
|
|
11846
11868
|
if (state.selection === void 0) delete state.selection;
|
|
@@ -12040,7 +12062,7 @@ function findAdjustmentControl(id) {
|
|
|
12040
12062
|
}
|
|
12041
12063
|
function findLayerControl(kind, id) {
|
|
12042
12064
|
if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
|
|
12043
|
-
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access',
|
|
12065
|
+
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _286 => _286[kind], 'optionalAccess', _287 => _287.find, 'call', _288 => _288((c) => c.id === id)]);
|
|
12044
12066
|
}
|
|
12045
12067
|
function clampControlValue(spec, v) {
|
|
12046
12068
|
if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
|
|
@@ -12159,7 +12181,7 @@ function summary(controller) {
|
|
|
12159
12181
|
const area = selectionArea(sel);
|
|
12160
12182
|
return {
|
|
12161
12183
|
empty: !sel,
|
|
12162
|
-
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
12184
|
+
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _289 => _289.bounds]), () => ( null)),
|
|
12163
12185
|
/** Σ coverage in pixels. */
|
|
12164
12186
|
area: Math.round(area),
|
|
12165
12187
|
percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
|
|
@@ -12403,7 +12425,7 @@ async function renderImageRegion(controller, request) {
|
|
|
12403
12425
|
if (request.includeOverlays) {
|
|
12404
12426
|
const s = request.scale;
|
|
12405
12427
|
const selection = state.selection;
|
|
12406
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
12428
|
+
if (_optionalChain([selection, 'optionalAccess', _290 => _290.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
|
|
12407
12429
|
const shade = selectionShade(selection, document);
|
|
12408
12430
|
if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
|
|
12409
12431
|
}
|
|
@@ -12428,7 +12450,7 @@ function createImageCaptureSurface(controller) {
|
|
|
12428
12450
|
return {
|
|
12429
12451
|
units: "image pixels",
|
|
12430
12452
|
content: whole,
|
|
12431
|
-
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
12453
|
+
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _291 => _291.getState, 'call', _292 => _292(), 'access', _293 => _293.selection, 'optionalAccess', _294 => _294.bounds]), () => ( null)) }),
|
|
12432
12454
|
overlays: "a shade over unselected pixels and the crop box outline",
|
|
12433
12455
|
maxScale: 8,
|
|
12434
12456
|
render: (request) => renderImageRegion(controller, request)
|
|
@@ -12770,7 +12792,7 @@ function createImageLayerTools(controller) {
|
|
|
12770
12792
|
if (!loc) return null;
|
|
12771
12793
|
return {
|
|
12772
12794
|
...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
|
|
12773
|
-
parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
12795
|
+
parentId: _nullishCoalesce(_optionalChain([loc, 'access', _295 => _295.parent, 'optionalAccess', _296 => _296.id]), () => ( null)),
|
|
12774
12796
|
index: loc.index
|
|
12775
12797
|
};
|
|
12776
12798
|
};
|
|
@@ -13652,7 +13674,7 @@ var PaintGesture = (_class9 = class {
|
|
|
13652
13674
|
const layer = this.controller.getActiveLayer();
|
|
13653
13675
|
if (!layer) throw new Error("Select a layer to move in the Layers panel.");
|
|
13654
13676
|
if (layer.type !== "pixel") throw new Error(`Only pixel layers move; "${layer.name}" is a ${layer.type} layer.`);
|
|
13655
|
-
if (_optionalChain([layer, 'access',
|
|
13677
|
+
if (_optionalChain([layer, 'access', _297 => _297.locks, 'optionalAccess', _298 => _298.all]) || _optionalChain([layer, 'access', _299 => _299.locks, 'optionalAccess', _300 => _300.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
|
|
13656
13678
|
this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin: { ...layer.offset }, moved: false };
|
|
13657
13679
|
return null;
|
|
13658
13680
|
}
|
|
@@ -13701,7 +13723,7 @@ var PaintGesture = (_class9 = class {
|
|
|
13701
13723
|
this.move = null;
|
|
13702
13724
|
}
|
|
13703
13725
|
cancel() {
|
|
13704
|
-
_optionalChain([this, 'access',
|
|
13726
|
+
_optionalChain([this, 'access', _301 => _301.stroke, 'optionalAccess', _302 => _302.cancel, 'call', _303 => _303()]);
|
|
13705
13727
|
this.stroke = null;
|
|
13706
13728
|
this.move = null;
|
|
13707
13729
|
}
|
|
@@ -14375,7 +14397,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
14375
14397
|
for (const ref of [aboveId, parentId]) {
|
|
14376
14398
|
if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
|
|
14377
14399
|
}
|
|
14378
|
-
if (parentId !== void 0 && _optionalChain([controller, 'access',
|
|
14400
|
+
if (parentId !== void 0 && _optionalChain([controller, 'access', _304 => _304.getLayer, 'call', _305 => _305(parentId), 'optionalAccess', _306 => _306.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
|
|
14379
14401
|
const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId });
|
|
14380
14402
|
const layer = controller.getAdjustmentLayer(id);
|
|
14381
14403
|
return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id) };
|
|
@@ -14799,32 +14821,32 @@ function layerMenu(controller) {
|
|
|
14799
14821
|
const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
|
|
14800
14822
|
const below = loc ? siblings[loc.index - 1] : void 0;
|
|
14801
14823
|
const hasSel = controller.hasSelection;
|
|
14802
|
-
const isPixel = _optionalChain([active, 'optionalAccess',
|
|
14824
|
+
const isPixel = _optionalChain([active, 'optionalAccess', _307 => _307.type]) === "pixel";
|
|
14803
14825
|
return [
|
|
14804
14826
|
{ action: "new-layer", label: "New Layer", enabled: true },
|
|
14805
14827
|
{ action: "new-group", label: "New Group", enabled: true },
|
|
14806
14828
|
{ action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
|
|
14807
14829
|
{ action: "delete", label: "Delete Layer", enabled: Boolean(active) },
|
|
14808
14830
|
{ action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
|
|
14809
|
-
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess',
|
|
14810
|
-
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
14831
|
+
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _308 => _308.type]) === "group" },
|
|
14832
|
+
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _309 => _309.visible]) && _optionalChain([below, 'optionalAccess', _310 => _310.type]) === "pixel") },
|
|
14811
14833
|
{ action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
|
|
14812
14834
|
{ action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
|
|
14813
14835
|
{ action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
|
|
14814
14836
|
{ action: "via-cut", label: "Layer via Cut", enabled: isPixel && hasSel },
|
|
14815
14837
|
{ action: "add-mask", label: "Add Layer Mask", enabled: Boolean(active) },
|
|
14816
14838
|
{ action: "add-mask-selection", label: "Add Mask from Selection", enabled: Boolean(active) && hasSel },
|
|
14817
|
-
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess',
|
|
14818
|
-
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
14819
|
-
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess',
|
|
14820
|
-
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess',
|
|
14821
|
-
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess',
|
|
14822
|
-
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess',
|
|
14839
|
+
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _311 => _311.mask])) },
|
|
14840
|
+
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _312 => _312.mask])) },
|
|
14841
|
+
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _313 => _313.mask, 'optionalAccess', _314 => _314.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _315 => _315.mask])) },
|
|
14842
|
+
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _316 => _316.mask, 'optionalAccess', _317 => _317.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _318 => _318.mask]) && !active.mask.source) },
|
|
14843
|
+
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _319 => _319.type]) === "annotation" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _320 => _320.type]) === "pixel" && _optionalChain([active, 'access', _321 => _321.filters, 'optionalAccess', _322 => _322.length])) },
|
|
14844
|
+
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _323 => _323.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
|
|
14823
14845
|
];
|
|
14824
14846
|
}
|
|
14825
14847
|
async function runLayerMenuAction(controller, action) {
|
|
14826
14848
|
const active = controller.getActiveLayer();
|
|
14827
|
-
const id = _optionalChain([active, 'optionalAccess',
|
|
14849
|
+
const id = _optionalChain([active, 'optionalAccess', _324 => _324.id]);
|
|
14828
14850
|
try {
|
|
14829
14851
|
switch (action) {
|
|
14830
14852
|
case "new-layer":
|
|
@@ -14871,16 +14893,16 @@ async function runLayerMenuAction(controller, action) {
|
|
|
14871
14893
|
if (id) controller.removeLayerMask(id);
|
|
14872
14894
|
break;
|
|
14873
14895
|
case "toggle-mask":
|
|
14874
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
14896
|
+
if (id && _optionalChain([active, 'optionalAccess', _325 => _325.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
|
|
14875
14897
|
break;
|
|
14876
14898
|
case "toggle-mask-link":
|
|
14877
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
14899
|
+
if (id && _optionalChain([active, 'optionalAccess', _326 => _326.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
|
|
14878
14900
|
break;
|
|
14879
14901
|
case "rasterize":
|
|
14880
14902
|
if (id) await controller.rasterizeLayer(id);
|
|
14881
14903
|
break;
|
|
14882
14904
|
case "toggle-clip":
|
|
14883
|
-
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess',
|
|
14905
|
+
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _327 => _327.clipped]) });
|
|
14884
14906
|
break;
|
|
14885
14907
|
}
|
|
14886
14908
|
return null;
|
|
@@ -14895,18 +14917,18 @@ function layerEffectsPanel(layer) {
|
|
|
14895
14917
|
if (!layer) return { ...empty, available: false, reason: "Select a layer to add effects." };
|
|
14896
14918
|
if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have effects." };
|
|
14897
14919
|
const fx = layer.effects;
|
|
14898
|
-
const readOnly = Boolean(_optionalChain([layer, 'access',
|
|
14920
|
+
const readOnly = Boolean(_optionalChain([layer, 'access', _328 => _328.locks, 'optionalAccess', _329 => _329.all]));
|
|
14899
14921
|
return {
|
|
14900
14922
|
available: true,
|
|
14901
14923
|
readOnly,
|
|
14902
14924
|
reason: readOnly ? "The layer is locked; unlock it to change its effects." : void 0,
|
|
14903
|
-
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
14904
|
-
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
14905
|
-
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
14925
|
+
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _330 => _330.enabled]), () => ( true)),
|
|
14926
|
+
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _331 => _331.scale]), () => ( 1)),
|
|
14927
|
+
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _332 => _332.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkWT6ZAWJPcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
|
|
14906
14928
|
};
|
|
14907
14929
|
}
|
|
14908
14930
|
function layerEffectsBadge(layer) {
|
|
14909
|
-
if (!_optionalChain([layer, 'access',
|
|
14931
|
+
if (!_optionalChain([layer, 'access', _333 => _333.effects, 'optionalAccess', _334 => _334.items, 'access', _335 => _335.length])) return null;
|
|
14910
14932
|
return _chunkWT6ZAWJPcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
|
|
14911
14933
|
}
|
|
14912
14934
|
var LAYER_EFFECT_MENU = _chunkWT6ZAWJPcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkWT6ZAWJPcjs.layerEffectLabel.call(void 0, kind) }));
|
|
@@ -14951,8 +14973,8 @@ function fillControls(f, allowPattern, patterns) {
|
|
|
14951
14973
|
}
|
|
14952
14974
|
function gradientControls(prefix, g) {
|
|
14953
14975
|
return [
|
|
14954
|
-
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
14955
|
-
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
14976
|
+
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _336 => _336.stops, 'access', _337 => _337[0], 'optionalAccess', _338 => _338.color]), () => ( "#000000")) },
|
|
14977
|
+
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _339 => _339.stops, 'access', _340 => _340[g.stops.length - 1], 'optionalAccess', _341 => _341.color]), () => ( "#ffffff")) },
|
|
14956
14978
|
{ key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
|
|
14957
14979
|
{ key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
|
|
14958
14980
|
{ key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
|
|
@@ -15044,19 +15066,19 @@ function layerEffectControls(e, patterns = []) {
|
|
|
15044
15066
|
}
|
|
15045
15067
|
function fillOfType(current, type, patterns) {
|
|
15046
15068
|
if (type === "gradient") return { type: "gradient", gradient: _chunkWT6ZAWJPcjs.defaultEffectGradient.call(void 0, ) };
|
|
15047
|
-
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access',
|
|
15069
|
+
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _342 => _342[0], 'optionalAccess', _343 => _343.id]), () => ( "checker")), scale: 1 };
|
|
15048
15070
|
return { type: "color", color: current.type === "color" ? current.color : "#000000" };
|
|
15049
15071
|
}
|
|
15050
15072
|
function effectControlChange(effect, key, value, patterns = []) {
|
|
15051
15073
|
const [top, ...rest] = key.split(".");
|
|
15052
15074
|
if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
|
|
15053
15075
|
if (top === "patternId" && !rest.length) {
|
|
15054
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
15076
|
+
const name = _optionalChain([patternOptions, 'call', _344 => _344(patterns), 'access', _345 => _345.find, 'call', _346 => _346((o) => o.value === value), 'optionalAccess', _347 => _347.label]);
|
|
15055
15077
|
return name ? { patternId: value, name } : { patternId: value };
|
|
15056
15078
|
}
|
|
15057
15079
|
if (!rest.length) return { [top]: value };
|
|
15058
15080
|
if (top === "fill" && rest[0] === "patternId") {
|
|
15059
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
15081
|
+
const name = _optionalChain([patternOptions, 'call', _348 => _348(patterns), 'access', _349 => _349.find, 'call', _350 => _350((o) => o.value === value), 'optionalAccess', _351 => _351.label]);
|
|
15060
15082
|
return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
|
|
15061
15083
|
}
|
|
15062
15084
|
return { [top]: setPath(getPath(effect, top), rest, value) };
|
|
@@ -15117,7 +15139,17 @@ var FREE_TRANSFORM_MODE_OPTIONS = [
|
|
|
15117
15139
|
{ id: "rotate", label: "Rotate", title: "Every handle rotates about the reference point" },
|
|
15118
15140
|
{ id: "skew", label: "Skew", title: "Sides slide along themselves" },
|
|
15119
15141
|
{ id: "distort", label: "Distort", title: "Each corner moves freely" },
|
|
15120
|
-
{ id: "perspective", label: "Perspective", title: "A corner and its partner move symmetrically" }
|
|
15142
|
+
{ id: "perspective", label: "Perspective", title: "A corner and its partner move symmetrically" },
|
|
15143
|
+
{ id: "warp", label: "Warp", title: "Bend through a mesh: drag its points or pull inside; presets in the bar" }
|
|
15144
|
+
];
|
|
15145
|
+
var WARP_STYLE_OPTIONS = [
|
|
15146
|
+
{ id: "custom", label: "Custom" },
|
|
15147
|
+
..._chunkDWGZUSEScjs.WARP_STYLES.map((id) => ({ id, label: _chunkDWGZUSEScjs.WARP_STYLE_LABELS[id] }))
|
|
15148
|
+
];
|
|
15149
|
+
var WARP_GRID_OPTIONS = [
|
|
15150
|
+
{ id: "1x1", label: "Default", columns: 1, rows: 1 },
|
|
15151
|
+
{ id: "3x3", label: "3 \xD7 3", columns: 3, rows: 3 },
|
|
15152
|
+
{ id: "5x5", label: "5 \xD7 5", columns: 5, rows: 5 }
|
|
15121
15153
|
];
|
|
15122
15154
|
var FREE_TRANSFORM_FIELDS = [
|
|
15123
15155
|
{ id: "x", label: "X", unit: "px", title: "Reference point X (document pixels)" },
|
|
@@ -15141,6 +15173,7 @@ var CURSOR = {
|
|
|
15141
15173
|
inside: "move",
|
|
15142
15174
|
outside: "alias"
|
|
15143
15175
|
};
|
|
15176
|
+
var meshIndex = (h) => h && h.startsWith("mesh:") ? Number(h.slice(5)) : -1;
|
|
15144
15177
|
var mod = (m) => Boolean(m.ctrlKey || m.metaKey);
|
|
15145
15178
|
var add = (a, b) => ({ x: a.x + b.x, y: a.y + b.y });
|
|
15146
15179
|
var sub = (a, b) => ({ x: a.x - b.x, y: a.y - b.y });
|
|
@@ -15163,8 +15196,17 @@ function insideQuad(q2, p) {
|
|
|
15163
15196
|
}
|
|
15164
15197
|
return true;
|
|
15165
15198
|
}
|
|
15199
|
+
function insidePolygon(poly, p) {
|
|
15200
|
+
let inside = false;
|
|
15201
|
+
for (let i = 0, j = poly.length - 1; i < poly.length; j = i++) {
|
|
15202
|
+
const a = poly[i];
|
|
15203
|
+
const b = poly[j];
|
|
15204
|
+
if (a.y > p.y !== b.y > p.y && p.x < (b.x - a.x) * (p.y - a.y) / (b.y - a.y) + a.x) inside = !inside;
|
|
15205
|
+
}
|
|
15206
|
+
return inside;
|
|
15207
|
+
}
|
|
15166
15208
|
var FreeTransformTool = (_class11 = class {
|
|
15167
|
-
constructor(controller, options = {}) {;_class11.prototype.__init65.call(this);_class11.prototype.__init66.call(this);_class11.prototype.__init67.call(this);_class11.prototype.__init68.call(this);_class11.prototype.__init69.call(this);_class11.prototype.__init70.call(this);_class11.prototype.__init71.call(this);_class11.prototype.__init72.call(this);_class11.prototype.__init73.call(this);_class11.prototype.__init74.call(this);_class11.prototype.__init75.call(this);_class11.prototype.__init76.call(this);
|
|
15209
|
+
constructor(controller, options = {}) {;_class11.prototype.__init65.call(this);_class11.prototype.__init66.call(this);_class11.prototype.__init67.call(this);_class11.prototype.__init68.call(this);_class11.prototype.__init69.call(this);_class11.prototype.__init70.call(this);_class11.prototype.__init71.call(this);_class11.prototype.__init72.call(this);_class11.prototype.__init73.call(this);_class11.prototype.__init74.call(this);_class11.prototype.__init75.call(this);_class11.prototype.__init76.call(this);_class11.prototype.__init77.call(this);_class11.prototype.__init78.call(this);
|
|
15168
15210
|
this.controller = controller;
|
|
15169
15211
|
this.options = options;
|
|
15170
15212
|
}
|
|
@@ -15176,17 +15218,20 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15176
15218
|
__init67() {this.refBox = { x: 0, y: 0 }}
|
|
15177
15219
|
__init68() {this.corners = null}
|
|
15178
15220
|
__init69() {this.drag = null}
|
|
15179
|
-
|
|
15180
|
-
|
|
15221
|
+
/** The warp mesh in the frame's own space (null: no warp). */
|
|
15222
|
+
__init70() {this.mesh = null}
|
|
15223
|
+
__init71() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
|
|
15224
|
+
__init72() {this.pending = false}
|
|
15225
|
+
__init73() {this.viewScale = 1}
|
|
15181
15226
|
|
|
15182
15227
|
/** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
|
|
15183
|
-
|
|
15228
|
+
__init74() {this.typed = {}}
|
|
15184
15229
|
/** Width and height scale together when typed (the chain icon). */
|
|
15185
|
-
|
|
15186
|
-
|
|
15187
|
-
|
|
15230
|
+
__init75() {this.proportional = true}
|
|
15231
|
+
__init76() {this.error = null}
|
|
15232
|
+
__init77() {this.lastResult = null}
|
|
15188
15233
|
get active() {
|
|
15189
|
-
return Boolean(_optionalChain([this, 'access',
|
|
15234
|
+
return Boolean(_optionalChain([this, 'access', _352 => _352.sessionRef, 'optionalAccess', _353 => _353.isOpen]));
|
|
15190
15235
|
}
|
|
15191
15236
|
get session() {
|
|
15192
15237
|
return this.active ? this.sessionRef : null;
|
|
@@ -15195,9 +15240,9 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15195
15240
|
return this.modeValue;
|
|
15196
15241
|
}
|
|
15197
15242
|
get interpolation() {
|
|
15198
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
15243
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _354 => _354.sessionRef, 'optionalAccess', _355 => _355.interpolation]), () => ( "bicubic"));
|
|
15199
15244
|
}
|
|
15200
|
-
|
|
15245
|
+
__init78() {this.listeners = /* @__PURE__ */ new Set()}
|
|
15201
15246
|
/** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
|
|
15202
15247
|
subscribe(listener) {
|
|
15203
15248
|
this.listeners.add(listener);
|
|
@@ -15206,7 +15251,7 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15206
15251
|
};
|
|
15207
15252
|
}
|
|
15208
15253
|
changed() {
|
|
15209
|
-
_optionalChain([this, 'access',
|
|
15254
|
+
_optionalChain([this, 'access', _356 => _356.options, 'access', _357 => _357.onChange, 'optionalCall', _358 => _358()]);
|
|
15210
15255
|
for (const l of this.listeners) l();
|
|
15211
15256
|
}
|
|
15212
15257
|
/** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
|
|
@@ -15222,6 +15267,8 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15222
15267
|
this.corners = s.geometry.corners;
|
|
15223
15268
|
this.refBox = { x: s.box.x + s.box.width / 2, y: s.box.y + s.box.height / 2 };
|
|
15224
15269
|
this.modeValue = "scale";
|
|
15270
|
+
this.mesh = null;
|
|
15271
|
+
this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 };
|
|
15225
15272
|
this.typed = {};
|
|
15226
15273
|
this.error = null;
|
|
15227
15274
|
} catch (e) {
|
|
@@ -15232,7 +15279,39 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15232
15279
|
}
|
|
15233
15280
|
setMode(mode) {
|
|
15234
15281
|
this.modeValue = mode;
|
|
15282
|
+
const s = this.session;
|
|
15283
|
+
if (mode === "warp" && s && !this.mesh) this.mesh = _chunkDWGZUSEScjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
|
|
15284
|
+
this.changed();
|
|
15285
|
+
}
|
|
15286
|
+
/** The Warp options bar's settings. */
|
|
15287
|
+
warpBar() {
|
|
15288
|
+
return { ...this.warpSettings };
|
|
15289
|
+
}
|
|
15290
|
+
/** The warp mesh (frame space), or null. */
|
|
15291
|
+
get warp() {
|
|
15292
|
+
return this.mesh;
|
|
15293
|
+
}
|
|
15294
|
+
/**
|
|
15295
|
+
* Applies Warp options: a preset `style` with `bend` / `horizontal` / `vertical` (percent) and
|
|
15296
|
+
* `orientation` replaces the mesh; `custom` keeps it; the grid size re-splits it (exactly when it
|
|
15297
|
+
* can). Switches to Warp mode.
|
|
15298
|
+
*/
|
|
15299
|
+
setWarp(changes) {
|
|
15300
|
+
const s = this.session;
|
|
15301
|
+
if (!s) return;
|
|
15302
|
+
this.modeValue = "warp";
|
|
15303
|
+
const next = { ...this.warpSettings, ...changes };
|
|
15304
|
+
this.warpSettings = next;
|
|
15305
|
+
let mesh = _nullishCoalesce(this.mesh, () => ( _chunkDWGZUSEScjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
|
|
15306
|
+
if (next.style !== "custom" && ("style" in changes || "bend" in changes || "horizontal" in changes || "vertical" in changes || "orientation" in changes)) {
|
|
15307
|
+
const preset = { style: next.style, bend: next.bend, horizontal: next.horizontal, vertical: next.vertical, orientation: next.orientation };
|
|
15308
|
+
mesh = _nullishCoalesce(_chunkDWGZUSEScjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkDWGZUSEScjs.identityWarpMesh.call(void 0, s.box)));
|
|
15309
|
+
mesh = _chunkDWGZUSEScjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
|
|
15310
|
+
}
|
|
15311
|
+
if ("columns" in changes || "rows" in changes) mesh = _chunkDWGZUSEScjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
|
|
15312
|
+
this.mesh = mesh;
|
|
15235
15313
|
this.changed();
|
|
15314
|
+
this.preview();
|
|
15236
15315
|
}
|
|
15237
15316
|
/** Sets the reference point to an anchor of the frame (the options bar's locator). */
|
|
15238
15317
|
setReference(anchor) {
|
|
@@ -15271,12 +15350,54 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15271
15350
|
const p = _nullishCoalesce(_chunkMUUXNRU4cjs.applyHomography.call(void 0, h, { x: s.box.x + fx * s.box.width, y: s.box.y + fy * s.box.height }), () => ( { x: 0, y: 0 }));
|
|
15272
15351
|
return { id, x: p.x, y: p.y };
|
|
15273
15352
|
});
|
|
15274
|
-
|
|
15353
|
+
const out = { outline: this.corners.map((p) => ({ x: p.x, y: p.y })), handles, reference: _nullishCoalesce(this.referencePoint(), () => ( { x: 0, y: 0 })) };
|
|
15354
|
+
if (this.modeValue === "warp" && this.mesh) {
|
|
15355
|
+
const m = this.mesh;
|
|
15356
|
+
const at = (p) => _nullishCoalesce(_chunkMUUXNRU4cjs.applyHomography.call(void 0, h, p), () => ( p));
|
|
15357
|
+
const pts = m.points.map(at);
|
|
15358
|
+
const edit = _chunkDWGZUSEScjs.warpMeshEditPoints.call(void 0, m);
|
|
15359
|
+
out.handles = [];
|
|
15360
|
+
out.outline = _chunkDWGZUSEScjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
|
|
15361
|
+
out.warp = {
|
|
15362
|
+
curves: _chunkDWGZUSEScjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
|
|
15363
|
+
anchors: edit.anchors.map((i) => pts[i]),
|
|
15364
|
+
handles: edit.handles.map((e) => ({ point: pts[e.index], anchor: pts[e.anchor] }))
|
|
15365
|
+
};
|
|
15366
|
+
}
|
|
15367
|
+
return out;
|
|
15368
|
+
}
|
|
15369
|
+
/** The mesh's border anchors, clockwise (for the inside test). */
|
|
15370
|
+
meshOutline(pts, m) {
|
|
15371
|
+
const nx = 3 * (m.us.length - 1) + 1;
|
|
15372
|
+
const ny = 3 * (m.vs.length - 1) + 1;
|
|
15373
|
+
const ring = [];
|
|
15374
|
+
for (let i = 0; i < nx; i++) ring.push(pts[i]);
|
|
15375
|
+
for (let j = 1; j < ny; j++) ring.push(pts[j * nx + nx - 1]);
|
|
15376
|
+
for (let i = nx - 2; i >= 0; i--) ring.push(pts[(ny - 1) * nx + i]);
|
|
15377
|
+
for (let j = ny - 2; j > 0; j--) ring.push(pts[j * nx]);
|
|
15378
|
+
return ring;
|
|
15275
15379
|
}
|
|
15276
15380
|
/** What a document point is over (`tolerance` in document pixels: a few screen pixels / scale). */
|
|
15277
15381
|
hit(p, tolerance) {
|
|
15278
15382
|
const o = this.overlay();
|
|
15279
15383
|
if (!o) return null;
|
|
15384
|
+
if (this.modeValue === "warp" && this.mesh) {
|
|
15385
|
+
const h = this.homography();
|
|
15386
|
+
const edit = _chunkDWGZUSEScjs.warpMeshEditPoints.call(void 0, this.mesh);
|
|
15387
|
+
let best2 = -1;
|
|
15388
|
+
let bestD2 = tolerance;
|
|
15389
|
+
for (const i of [...edit.anchors, ...edit.handles.map((e) => e.index)]) {
|
|
15390
|
+
const q2 = _chunkMUUXNRU4cjs.applyHomography.call(void 0, h, this.mesh.points[i]);
|
|
15391
|
+
if (!q2) continue;
|
|
15392
|
+
const d = Math.hypot(q2.x - p.x, q2.y - p.y);
|
|
15393
|
+
if (d <= bestD2) {
|
|
15394
|
+
best2 = i;
|
|
15395
|
+
bestD2 = d;
|
|
15396
|
+
}
|
|
15397
|
+
}
|
|
15398
|
+
if (best2 >= 0) return `mesh:${best2}`;
|
|
15399
|
+
return insidePolygon(o.outline, p) ? "inside" : "outside";
|
|
15400
|
+
}
|
|
15280
15401
|
let best = null;
|
|
15281
15402
|
let bestD = tolerance;
|
|
15282
15403
|
for (const h of o.handles) {
|
|
@@ -15293,6 +15414,8 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15293
15414
|
/** The CSS cursor for a handle. */
|
|
15294
15415
|
cursor(handle) {
|
|
15295
15416
|
if (!handle) return "default";
|
|
15417
|
+
if (meshIndex(handle) >= 0) return "pointer";
|
|
15418
|
+
if (this.modeValue === "warp") return handle === "inside" ? "grab" : "default";
|
|
15296
15419
|
if (this.modeValue === "rotate" && handle !== "inside" && handle !== "reference") return CURSOR.outside;
|
|
15297
15420
|
return CURSOR[handle];
|
|
15298
15421
|
}
|
|
@@ -15301,9 +15424,24 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15301
15424
|
if (!this.session || !this.corners) return null;
|
|
15302
15425
|
const handle = this.hit(p, tolerance);
|
|
15303
15426
|
if (!handle) return null;
|
|
15304
|
-
|
|
15427
|
+
let st = null;
|
|
15428
|
+
if (this.modeValue === "warp" && this.mesh && handle === "inside") {
|
|
15429
|
+
const q2 = this.toFrame(p, this.corners);
|
|
15430
|
+
if (q2) {
|
|
15431
|
+
const r = _chunkDWGZUSEScjs.warpMeshParamAt.call(void 0, this.mesh, q2);
|
|
15432
|
+
st = { s: r.s, t: r.t };
|
|
15433
|
+
}
|
|
15434
|
+
}
|
|
15435
|
+
this.drag = { handle, start: { x: p.x, y: p.y }, corners: this.corners, refBox: { ...this.refBox }, ref: _nullishCoalesce(this.referencePoint(), () => ( p)), mesh: this.mesh, st };
|
|
15305
15436
|
return handle;
|
|
15306
15437
|
}
|
|
15438
|
+
/** A document point in the frame's own space under `corners`. */
|
|
15439
|
+
toFrame(p, corners) {
|
|
15440
|
+
const s = this.session;
|
|
15441
|
+
const h = s ? _chunkMUUXNRU4cjs.rectToQuad.call(void 0, s.box, corners) : null;
|
|
15442
|
+
const inv = h && _chunkMUUXNRU4cjs.invertHomography.call(void 0, h);
|
|
15443
|
+
return inv ? _chunkMUUXNRU4cjs.applyHomography.call(void 0, inv, p) : null;
|
|
15444
|
+
}
|
|
15307
15445
|
/** Continues the drag to `p` with the modifiers held now. */
|
|
15308
15446
|
move(p, m = {}) {
|
|
15309
15447
|
const d = this.drag;
|
|
@@ -15317,6 +15455,20 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15317
15455
|
this.changed();
|
|
15318
15456
|
return;
|
|
15319
15457
|
}
|
|
15458
|
+
if (this.modeValue === "warp" && d.mesh) {
|
|
15459
|
+
const a = this.toFrame(d.start, d.corners);
|
|
15460
|
+
const b = this.toFrame(p, d.corners);
|
|
15461
|
+
if (!a || !b) return;
|
|
15462
|
+
const delta = { x: b.x - a.x, y: b.y - a.y };
|
|
15463
|
+
const i = meshIndex(d.handle);
|
|
15464
|
+
if (i >= 0) this.mesh = _chunkDWGZUSEScjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
|
|
15465
|
+
else if (d.handle === "inside" && d.st) this.mesh = _chunkDWGZUSEScjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
|
|
15466
|
+
else return;
|
|
15467
|
+
this.warpSettings = { ...this.warpSettings, style: "custom" };
|
|
15468
|
+
this.changed();
|
|
15469
|
+
this.preview();
|
|
15470
|
+
return;
|
|
15471
|
+
}
|
|
15320
15472
|
const corners = this.dragCorners(d, p, m);
|
|
15321
15473
|
if (corners) this.setCorners(corners);
|
|
15322
15474
|
}
|
|
@@ -15415,7 +15567,7 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15415
15567
|
this.pending = false;
|
|
15416
15568
|
const s = this.session;
|
|
15417
15569
|
if (!s || !this.corners) return;
|
|
15418
|
-
this.run(() => s.update({ corners: this.corners }, { scale: this.viewScale, clip: this.viewClip }));
|
|
15570
|
+
this.run(() => s.update({ corners: this.corners, warp: this.mesh }, { scale: this.viewScale, clip: this.viewClip }));
|
|
15419
15571
|
};
|
|
15420
15572
|
if (this.options.schedule) this.options.schedule(run);
|
|
15421
15573
|
else run();
|
|
@@ -15480,21 +15632,23 @@ var FreeTransformTool = (_class11 = class {
|
|
|
15480
15632
|
let res = null;
|
|
15481
15633
|
this.pending = false;
|
|
15482
15634
|
this.run(() => {
|
|
15483
|
-
if (this.corners) s.update({ corners: this.corners }, false);
|
|
15635
|
+
if (this.corners) s.update({ corners: this.corners, warp: this.mesh }, false);
|
|
15484
15636
|
res = s.commit();
|
|
15485
15637
|
});
|
|
15486
15638
|
this.lastResult = res;
|
|
15487
15639
|
this.sessionRef = null;
|
|
15488
15640
|
this.corners = null;
|
|
15641
|
+
this.mesh = null;
|
|
15489
15642
|
this.drag = null;
|
|
15490
15643
|
this.changed();
|
|
15491
15644
|
return res;
|
|
15492
15645
|
}
|
|
15493
15646
|
/** Abandons the transform and restores everything. */
|
|
15494
15647
|
cancel() {
|
|
15495
|
-
_optionalChain([this, 'access',
|
|
15648
|
+
_optionalChain([this, 'access', _359 => _359.sessionRef, 'optionalAccess', _360 => _360.cancel, 'call', _361 => _361()]);
|
|
15496
15649
|
this.sessionRef = null;
|
|
15497
15650
|
this.corners = null;
|
|
15651
|
+
this.mesh = null;
|
|
15498
15652
|
this.drag = null;
|
|
15499
15653
|
this.pending = false;
|
|
15500
15654
|
this.error = null;
|
|
@@ -16065,5 +16219,7 @@ var FreeTransformTool = (_class11 = class {
|
|
|
16065
16219
|
|
|
16066
16220
|
|
|
16067
16221
|
|
|
16068
|
-
exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.BLEND_MODES = _chunkCRMAXIUVcjs.BLEND_MODES; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.CoverageMap = _chunkZZOTHJ4Kcjs.CoverageMap; exports.D50 = D50; exports.D65 = D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_BRUSH = _chunkZZOTHJ4Kcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_GLOBAL_LIGHT = _chunkWT6ZAWJPcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MIXER = _chunkZZOTHJ4Kcjs.DEFAULT_MIXER; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkWT6ZAWJPcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DabWalker = _chunkZZOTHJ4Kcjs.DabWalker; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkZZOTHJ4Kcjs.EMPTY_MIXER_LOAD; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.INTERPOLATIONS = _chunkWT6ZAWJPcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkWT6ZAWJPcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LUMA_709 = LUMA_709; exports.LayerCompositor = LayerCompositor; exports.LayerEffectError = _chunkWT6ZAWJPcjs.LayerEffectError; exports.LayerOperationError = LayerOperationError; exports.MAX_BRUSH_SIZE = _chunkZZOTHJ4Kcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkWT6ZAWJPcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = MAX_KELVIN; exports.MAX_TRANSFORM_PIXELS = _chunkWT6ZAWJPcjs.MAX_TRANSFORM_PIXELS; exports.MIN_KELVIN = MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkZZOTHJ4Kcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkZZOTHJ4Kcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkZZOTHJ4Kcjs.MIXING_MODELS; exports.MixerStroke = _chunkZZOTHJ4Kcjs.MixerStroke; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCRMAXIUVcjs.PIGMENT_BANDS; exports.PIGMENT_LAMBDA_MIN = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_WAVELENGTHS = _chunkCRMAXIUVcjs.PIGMENT_WAVELENGTHS; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.PaintGesture = PaintGesture; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunkWT6ZAWJPcjs.PatternPlacement; exports.PatternTile = _chunkWT6ZAWJPcjs.PatternTile; exports.PsdError = PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.SELECTION_MODES = SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.StrokeCoverage = _chunkZZOTHJ4Kcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCRMAXIUVcjs.SurfaceDraft; exports.TILE = _chunkCRMAXIUVcjs.TILE; exports.TILE_SHIFT = _chunkCRMAXIUVcjs.TILE_SHIFT; exports.TINT_SCALE = TINT_SCALE; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.TiledSurface = _chunkCRMAXIUVcjs.TiledSurface; exports.TransformTooLargeError = _chunkWT6ZAWJPcjs.TransformTooLargeError; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.WARP_STYLES = _chunkDWGZUSEScjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkDWGZUSEScjs.WARP_STYLE_LABELS; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.ZlibError = _chunkWT6ZAWJPcjs.ZlibError; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.addLayerEffect = addLayerEffect; exports.addLayerFilter = addLayerFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = adjustmentKindLabel; exports.adjustmentLayersKey = adjustmentLayersKey; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.adler32 = _chunkWT6ZAWJPcjs.adler32; exports.anchorPoint = anchorPoint; exports.annotationLayerFor = annotationLayerFor; exports.annotationLayerName = annotationLayerName; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustments = applyAdjustments; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyMatrix3 = applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = applyParams; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyStrokeToTile = _chunkZZOTHJ4Kcjs.applyStrokeToTile; exports.backgroundLayer = backgroundLayer; exports.base64ToBytes = _chunkWT6ZAWJPcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.blackWhiteGray = blackWhiteGray; exports.blendChannel = _chunkCRMAXIUVcjs.blendChannel; exports.blendImageData = _chunkCRMAXIUVcjs.blendImageData; exports.blendLum = _chunkCRMAXIUVcjs.blendLum; exports.blendPixel = _chunkCRMAXIUVcjs.blendPixel; exports.blendRgb = _chunkCRMAXIUVcjs.blendRgb; exports.blendTile = _chunkWT6ZAWJPcjs.blendTile; exports.blurFilter = blurFilter; exports.borderCoverage = borderCoverage; exports.boxMean = boxMean; exports.boxPointOf = boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = bradfordAdaptation; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.buildToneLut = buildToneLut; exports.builtinPattern = _chunkWT6ZAWJPcjs.builtinPattern; exports.builtinPatternIds = _chunkWT6ZAWJPcjs.builtinPatternIds; exports.bytesToBase64 = _chunkWT6ZAWJPcjs.bytesToBase64; exports.calculateCropDrag = calculateCropDrag; exports.canvasCompositeOperation = _chunkCRMAXIUVcjs.canvasCompositeOperation; exports.canvasToImagePoint = canvasToImagePoint; exports.changedTiles = _chunkWT6ZAWJPcjs.changedTiles; exports.clampControlValue = clampControlValue; exports.clampCropToImage = clampCropToImage; exports.cleanMixer = _chunkZZOTHJ4Kcjs.cleanMixer; exports.collectTiles = _chunkCRMAXIUVcjs.collectTiles; exports.colorBalanceChannel = colorBalanceChannel; exports.colorRange = colorRange; exports.combineSelections = combineSelections; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.compositeSurfaceOver = _chunkWT6ZAWJPcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = computeSelectionBounds; exports.contentBounds = _chunkCRMAXIUVcjs.contentBounds; exports.contractCoverage = contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.cornersFromMatrix = cornersFromMatrix; exports.coverageTileCoord = _chunkZZOTHJ4Kcjs.coverageTileCoord; exports.coverageToByte = coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = createAdjustmentLayer; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageTransformTools = createImageTransformTools; exports.createPigment = _chunkCRMAXIUVcjs.createPigment; exports.createPigmentTools = _chunkZZOTHJ4Kcjs.createPigmentTools; exports.createSelectionMask = createSelectionMask; exports.curveLut = _chunkWT6ZAWJPcjs.curveLut; exports.curveLutFromLevels = curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkZZOTHJ4Kcjs.dabCoverage; exports.dabRect = _chunkZZOTHJ4Kcjs.dabRect; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeLayerMask = decodeLayerMask; exports.decodeMergedImage = decodeMergedImage; exports.decodePlanes = decodePlanes; exports.decodePng = _chunkWT6ZAWJPcjs.decodePng; exports.decodePngDataUrl = decodePngDataUrl; exports.decodeSelectionRle = decodeSelectionRle; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.defaultEffectGradient = _chunkWT6ZAWJPcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkWT6ZAWJPcjs.defaultLayerEffect; exports.deflate = _chunkWT6ZAWJPcjs.deflate; exports.deflateRaw = _chunkWT6ZAWJPcjs.deflateRaw; exports.depthMaskAlpha = depthMaskAlpha; exports.depthRasterMask = depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = describeTransform; exports.deserializeEffects = deserializeEffects; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.deserializePatterns = deserializePatterns; exports.deserializeSelection = deserializeSelection; exports.developFilter = developFilter; exports.developFromAdjustments = developFromAdjustments; exports.developTarget = developTarget; exports.distanceTransform = distanceTransform; exports.downloadPsd = downloadPsd; exports.dragWarpMeshPoint = _chunkDWGZUSEScjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.duplicateLayer = duplicateLayer; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkWT6ZAWJPcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectReach = _chunkWT6ZAWJPcjs.effectReach; exports.effectsFingerprint = _chunkWT6ZAWJPcjs.effectsFingerprint; exports.effectsMargin = _chunkWT6ZAWJPcjs.effectsMargin; exports.effectsScale = _chunkWT6ZAWJPcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCRMAXIUVcjs.emptySurface; exports.encodePng = _chunkWT6ZAWJPcjs.encodePng; exports.encodeRle = encodeRle; exports.encodeSelectionRle = encodeSelectionRle; exports.encodeSurface = encodeSurface; exports.evalWarpMesh = _chunkDWGZUSEScjs.evalWarpMesh; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.expandCoverage = expandCoverage; exports.exportPsd = exportPsd; exports.featherCoverage = featherCoverage; exports.fillRect = _chunkCRMAXIUVcjs.fillRect; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkWT6ZAWJPcjs.findLayer; exports.findLayerControl = findLayerControl; exports.finishTile = _chunkCRMAXIUVcjs.finishTile; exports.flattenLayers = _chunkWT6ZAWJPcjs.flattenLayers; exports.flipCorners = flipCorners; exports.formatControlValue = formatControlValue; exports.fullSelection = fullSelection; exports.gaussianBlur = _chunkWT6ZAWJPcjs.gaussianBlur; exports.geometryHomography = geometryHomography; exports.getAnnotationBounds = getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = getCropCursor; exports.getRotatedSize = getRotatedSize; exports.getViewportMetrics = getViewportMetrics; exports.getViewportProjection = getViewportProjection; exports.globalImageCache = globalImageCache; exports.greyMorphology = greyMorphology; exports.groupLayers = groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkWT6ZAWJPcjs.hasActiveEffects; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.hasWarp = hasWarp; exports.hashMaskContent = hashMaskContent; exports.hashNoise = _chunkWT6ZAWJPcjs.hashNoise; exports.hexToRgb = hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = hitTestAnnotation; exports.hitTestCrop = hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = hueRangeTables; exports.hueRangeWeight = hueRangeWeight; exports.hueSaturation = hueSaturation; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.identityTransform = identityTransform; exports.identityWarpMesh = _chunkDWGZUSEScjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageToCanvasPoint = imageToCanvasPoint; exports.importPsd = importPsd; exports.inflate = _chunkWT6ZAWJPcjs.inflate; exports.inflateRaw = _chunkWT6ZAWJPcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkWT6ZAWJPcjs.insertLayer; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = invertMatrix3; exports.invertSelection = invertSelection; exports.isActiveFilter = isActiveFilter; exports.isAdjustmentKind = isAdjustmentKind; exports.isBlendMode = _chunkCRMAXIUVcjs.isBlendMode; exports.isDefaultDepthMask = isDefaultDepthMask; exports.isIdentityTransform = isIdentityTransform; exports.isInterpolation = _chunkWT6ZAWJPcjs.isInterpolation; exports.isLayerEffectKind = _chunkWT6ZAWJPcjs.isLayerEffectKind; exports.isLayerLocked = _chunkWT6ZAWJPcjs.isLayerLocked; exports.isLegacyShape = isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPng = _chunkWT6ZAWJPcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.isSelectionEmpty = isSelectionEmpty; exports.isSelectionMode = isSelectionMode; exports.isSeparableBlendMode = _chunkCRMAXIUVcjs.isSeparableBlendMode; exports.isSpatialFilter = isSpatialFilter; exports.isTransformAnchor = isTransformAnchor; exports.isValidWarp = isValidWarp; exports.kelvinToTemperature = kelvinToTemperature; exports.keysWeight = _chunkWT6ZAWJPcjs.keysWeight; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkWT6ZAWJPcjs.layerEffectFields; exports.layerEffectLabel = _chunkWT6ZAWJPcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerLabel = layerLabel; exports.layerMaskCoverage = layerMaskCoverage; exports.layerMaskFromSelection = layerMaskFromSelection; exports.layerMaskKey = layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = layerTree; exports.layerTypeLabel = layerTypeLabel; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.legacyMaskOf = legacyMaskOf; exports.legacyView = legacyView; exports.lerpPigment = _chunkCRMAXIUVcjs.lerpPigment; exports.lerpPigmentInto = _chunkCRMAXIUVcjs.lerpPigmentInto; exports.levelsValue = levelsValue; exports.linearSrgbToXy = linearSrgbToXy; exports.linearToSrgb = linearToSrgb; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkZZOTHJ4Kcjs.loadMixer; exports.magicWand = magicWand; exports.mapCropHandle = mapCropHandle; exports.mapLayer = _chunkWT6ZAWJPcjs.mapLayer; exports.maskSummary = maskSummary; exports.matrixFromCorners = matrixFromCorners; exports.matrixFromParams = matrixFromParams; exports.mergeLayerEffect = _chunkWT6ZAWJPcjs.mergeLayerEffect; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mixPigment8 = _chunkCRMAXIUVcjs.mixPigment8; exports.mixPigmentRgb = _chunkCRMAXIUVcjs.mixPigmentRgb; exports.mixPigments = _chunkCRMAXIUVcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.modifySelection = modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = moveLayer; exports.mulMatrix3 = mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = neutralHueRange; exports.newEffectId = _chunkWT6ZAWJPcjs.newEffectId; exports.newLayerId = newLayerId; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.normalizeAngle = normalizeAngle; exports.normalizeBlendMode = _chunkCRMAXIUVcjs.normalizeBlendMode; exports.normalizeBrush = _chunkZZOTHJ4Kcjs.normalizeBrush; exports.normalizeFilter = normalizeFilter; exports.normalizeLayerEffects = _chunkWT6ZAWJPcjs.normalizeLayerEffects; exports.normalizeLayerMask = normalizeLayerMask; exports.normalizeMixer = _chunkZZOTHJ4Kcjs.normalizeMixer; exports.normalizeProcessVersion = normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.offsetLayer = offsetLayer; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCRMAXIUVcjs.packRgba; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.parseBlend = parseBlend; exports.parseColor = parseColor; exports.parseDataUrl = _chunkWT6ZAWJPcjs.parseDataUrl; exports.parseEffectColor = _chunkWT6ZAWJPcjs.parseEffectColor; exports.parseLfx2 = parseLfx2; exports.parseLrfx = parseLrfx; exports.parsePatternBlock = parsePatternBlock; exports.parseSelectionMode = parseSelectionMode; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.photoFilterMatrix = photoFilterMatrix; exports.pixelLayerBounds = pixelLayerBounds; exports.pixelLayers = pixelLayers; exports.placeLayer = placeLayer; exports.pngDataUrl = _chunkWT6ZAWJPcjs.pngDataUrl; exports.pointerPressure = pointerPressure; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = posterizeValue; exports.presetWarp = presetWarp; exports.previewStep = previewStep; exports.projectImagePoint = projectImagePoint; exports.projectImageRect = projectImageRect; exports.projectMaskCoverage = projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.psdToLayers = psdToLayers; exports.pullWarpMesh = _chunkDWGZUSEScjs.pullWarpMesh; exports.quickMaskPixels = quickMaskPixels; exports.rangeLightness = rangeLightness; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.rasterizeDab = _chunkZZOTHJ4Kcjs.rasterizeDab; exports.readAdjustmentControls = readAdjustmentControls; exports.readPixel = _chunkCRMAXIUVcjs.readPixel; exports.readPsd = readPsd; exports.readRegion = _chunkCRMAXIUVcjs.readRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunkWT6ZAWJPcjs.reduceSurface; exports.referencePoint = referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCRMAXIUVcjs.reflectanceToRgb; exports.removeAlpha = removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = removeLayer; exports.removeLayerEffect = removeLayerEffect; exports.removeLayerFilter = removeLayerFilter; exports.renderLayerEffects = _chunkWT6ZAWJPcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.resizePixels = resizePixels; exports.resizeSelection = resizeSelection; exports.resizeWarpMesh = _chunkDWGZUSEScjs.resizeWarpMesh; exports.resolveExternalAssets = resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.rgbToGray = rgbToGray; exports.rgbToHsl = rgbToHsl; exports.rgbToReflectance = _chunkCRMAXIUVcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = sampleLut; exports.sampleToneLut = sampleToneLut; exports.scaleLayerEffect = _chunkWT6ZAWJPcjs.scaleLayerEffect; exports.selectionArea = selectionArea; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionFromPixels = selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = selectionToCoverage; exports.selectionToPixels = selectionToPixels; exports.selectionValueAt = selectionValueAt; exports.serializeEffects = serializeEffects; exports.serializeLayer = serializeLayer; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.serializePatterns = serializePatterns; exports.serializeSelection = serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = setLayerEffects; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.setLayerMask = setLayerMask; exports.setLayerProperties = setLayerProperties; exports.setLum = _chunkCRMAXIUVcjs.setLum; exports.setPigmentColor = _chunkCRMAXIUVcjs.setPigmentColor; exports.shiftCoverage = shiftCoverage; exports.smoothCoverage = smoothCoverage; exports.smoothPoints = _chunkZZOTHJ4Kcjs.smoothPoints; exports.solidSurface = _chunkCRMAXIUVcjs.solidSurface; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.srgb8ToLab = srgb8ToLab; exports.srgbToLinear = srgbToLinear; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCRMAXIUVcjs.surfaceBytes; exports.surfaceFromPixels = _chunkCRMAXIUVcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCRMAXIUVcjs.surfacesEqual; exports.tempTintToXy = tempTintToXy; exports.temperatureToKelvin = temperatureToKelvin; exports.tileCoord = _chunkCRMAXIUVcjs.tileCoord; exports.tileKey = _chunkCRMAXIUVcjs.tileKey; exports.tileRect = _chunkCRMAXIUVcjs.tileRect; exports.tilesInRect = _chunkCRMAXIUVcjs.tilesInRect; exports.tipFalloff = _chunkZZOTHJ4Kcjs.tipFalloff; exports.tipReach = _chunkZZOTHJ4Kcjs.tipReach; exports.tipShape = _chunkZZOTHJ4Kcjs.tipShape; exports.toHex = toHex2; exports.toneCurve = toneCurve; exports.toneLuts = toneLuts; exports.toneRange = toneRange; exports.transformHomography = transformHomography; exports.transformMap = transformMap; exports.transformSurface = _chunkWT6ZAWJPcjs.transformSurface; exports.transformedBounds = _chunkWT6ZAWJPcjs.transformedBounds; exports.transformedBox = transformedBox; exports.transformedPoint = transformedPoint; exports.translateSurface = _chunkCRMAXIUVcjs.translateSurface; exports.ungroupLayer = ungroupLayer; exports.uniformTile = _chunkCRMAXIUVcjs.uniformTile; exports.unionRect = unionRect; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.updateLayerEffect = updateLayerEffect; exports.updateLayerFilter = updateLayerFilter; exports.updateLayerMaskProps = updateLayerMaskProps; exports.uvToXy = uvToXy; exports.validateEffectGradient = _chunkWT6ZAWJPcjs.validateEffectGradient; exports.validateLayerEffect = _chunkWT6ZAWJPcjs.validateLayerEffect; exports.validateLayerEffects = _chunkWT6ZAWJPcjs.validateLayerEffects; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.walkDabs = _chunkZZOTHJ4Kcjs.walkDabs; exports.warpMeshEditPoints = _chunkDWGZUSEScjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkDWGZUSEScjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkDWGZUSEScjs.warpMeshParamAt; exports.warpPresetMesh = _chunkDWGZUSEScjs.warpPresetMesh; exports.warpSurface = _chunkWT6ZAWJPcjs.warpSurface; exports.wbMatrix = wbMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.withNewIds = withNewIds; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.writeLfx2 = writeLfx2; exports.writePatternBlock = writePatternBlock; exports.writePsd = writePsd; exports.writeRegion = _chunkCRMAXIUVcjs.writeRegion; exports.xyToTempTint = xyToTempTint; exports.xyToUv = xyToUv;
|
|
16222
|
+
|
|
16223
|
+
|
|
16224
|
+
exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.BLEND_MODES = _chunkCRMAXIUVcjs.BLEND_MODES; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.CoverageMap = _chunkZZOTHJ4Kcjs.CoverageMap; exports.D50 = D50; exports.D65 = D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_BRUSH = _chunkZZOTHJ4Kcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_GLOBAL_LIGHT = _chunkWT6ZAWJPcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MIXER = _chunkZZOTHJ4Kcjs.DEFAULT_MIXER; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkWT6ZAWJPcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DabWalker = _chunkZZOTHJ4Kcjs.DabWalker; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkZZOTHJ4Kcjs.EMPTY_MIXER_LOAD; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.INTERPOLATIONS = _chunkWT6ZAWJPcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkWT6ZAWJPcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LUMA_709 = LUMA_709; exports.LayerCompositor = LayerCompositor; exports.LayerEffectError = _chunkWT6ZAWJPcjs.LayerEffectError; exports.LayerOperationError = LayerOperationError; exports.MAX_BRUSH_SIZE = _chunkZZOTHJ4Kcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkWT6ZAWJPcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = MAX_KELVIN; exports.MAX_TRANSFORM_PIXELS = _chunkWT6ZAWJPcjs.MAX_TRANSFORM_PIXELS; exports.MIN_KELVIN = MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkZZOTHJ4Kcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkZZOTHJ4Kcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkZZOTHJ4Kcjs.MIXING_MODELS; exports.MixerStroke = _chunkZZOTHJ4Kcjs.MixerStroke; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCRMAXIUVcjs.PIGMENT_BANDS; exports.PIGMENT_LAMBDA_MIN = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCRMAXIUVcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_WAVELENGTHS = _chunkCRMAXIUVcjs.PIGMENT_WAVELENGTHS; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.PaintGesture = PaintGesture; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunkWT6ZAWJPcjs.PatternPlacement; exports.PatternTile = _chunkWT6ZAWJPcjs.PatternTile; exports.PsdError = PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.SELECTION_MODES = SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.StrokeCoverage = _chunkZZOTHJ4Kcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCRMAXIUVcjs.SurfaceDraft; exports.TILE = _chunkCRMAXIUVcjs.TILE; exports.TILE_SHIFT = _chunkCRMAXIUVcjs.TILE_SHIFT; exports.TINT_SCALE = TINT_SCALE; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.TiledSurface = _chunkCRMAXIUVcjs.TiledSurface; exports.TransformTooLargeError = _chunkWT6ZAWJPcjs.TransformTooLargeError; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkDWGZUSEScjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkDWGZUSEScjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.ZlibError = _chunkWT6ZAWJPcjs.ZlibError; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.addLayerEffect = addLayerEffect; exports.addLayerFilter = addLayerFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = adjustmentKindLabel; exports.adjustmentLayersKey = adjustmentLayersKey; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.adler32 = _chunkWT6ZAWJPcjs.adler32; exports.anchorPoint = anchorPoint; exports.annotationLayerFor = annotationLayerFor; exports.annotationLayerName = annotationLayerName; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustments = applyAdjustments; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyMatrix3 = applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = applyParams; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyStrokeToTile = _chunkZZOTHJ4Kcjs.applyStrokeToTile; exports.backgroundLayer = backgroundLayer; exports.base64ToBytes = _chunkWT6ZAWJPcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.blackWhiteGray = blackWhiteGray; exports.blendChannel = _chunkCRMAXIUVcjs.blendChannel; exports.blendImageData = _chunkCRMAXIUVcjs.blendImageData; exports.blendLum = _chunkCRMAXIUVcjs.blendLum; exports.blendPixel = _chunkCRMAXIUVcjs.blendPixel; exports.blendRgb = _chunkCRMAXIUVcjs.blendRgb; exports.blendTile = _chunkWT6ZAWJPcjs.blendTile; exports.blurFilter = blurFilter; exports.borderCoverage = borderCoverage; exports.boxMean = boxMean; exports.boxPointOf = boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = bradfordAdaptation; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.buildToneLut = buildToneLut; exports.builtinPattern = _chunkWT6ZAWJPcjs.builtinPattern; exports.builtinPatternIds = _chunkWT6ZAWJPcjs.builtinPatternIds; exports.bytesToBase64 = _chunkWT6ZAWJPcjs.bytesToBase64; exports.calculateCropDrag = calculateCropDrag; exports.canvasCompositeOperation = _chunkCRMAXIUVcjs.canvasCompositeOperation; exports.canvasToImagePoint = canvasToImagePoint; exports.changedTiles = _chunkWT6ZAWJPcjs.changedTiles; exports.clampControlValue = clampControlValue; exports.clampCropToImage = clampCropToImage; exports.cleanMixer = _chunkZZOTHJ4Kcjs.cleanMixer; exports.collectTiles = _chunkCRMAXIUVcjs.collectTiles; exports.colorBalanceChannel = colorBalanceChannel; exports.colorRange = colorRange; exports.combineSelections = combineSelections; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.compositeSurfaceOver = _chunkWT6ZAWJPcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = computeSelectionBounds; exports.contentBounds = _chunkCRMAXIUVcjs.contentBounds; exports.contractCoverage = contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.cornersFromMatrix = cornersFromMatrix; exports.coverageTileCoord = _chunkZZOTHJ4Kcjs.coverageTileCoord; exports.coverageToByte = coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = createAdjustmentLayer; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageTransformTools = createImageTransformTools; exports.createPigment = _chunkCRMAXIUVcjs.createPigment; exports.createPigmentTools = _chunkZZOTHJ4Kcjs.createPigmentTools; exports.createSelectionMask = createSelectionMask; exports.curveLut = _chunkWT6ZAWJPcjs.curveLut; exports.curveLutFromLevels = curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkZZOTHJ4Kcjs.dabCoverage; exports.dabRect = _chunkZZOTHJ4Kcjs.dabRect; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeLayerMask = decodeLayerMask; exports.decodeMergedImage = decodeMergedImage; exports.decodePlanes = decodePlanes; exports.decodePng = _chunkWT6ZAWJPcjs.decodePng; exports.decodePngDataUrl = decodePngDataUrl; exports.decodeSelectionRle = decodeSelectionRle; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.defaultEffectGradient = _chunkWT6ZAWJPcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkWT6ZAWJPcjs.defaultLayerEffect; exports.deflate = _chunkWT6ZAWJPcjs.deflate; exports.deflateRaw = _chunkWT6ZAWJPcjs.deflateRaw; exports.depthMaskAlpha = depthMaskAlpha; exports.depthRasterMask = depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = describeTransform; exports.deserializeEffects = deserializeEffects; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.deserializePatterns = deserializePatterns; exports.deserializeSelection = deserializeSelection; exports.developFilter = developFilter; exports.developFromAdjustments = developFromAdjustments; exports.developTarget = developTarget; exports.distanceTransform = distanceTransform; exports.downloadPsd = downloadPsd; exports.dragWarpMeshPoint = _chunkDWGZUSEScjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.duplicateLayer = duplicateLayer; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkWT6ZAWJPcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectReach = _chunkWT6ZAWJPcjs.effectReach; exports.effectsFingerprint = _chunkWT6ZAWJPcjs.effectsFingerprint; exports.effectsMargin = _chunkWT6ZAWJPcjs.effectsMargin; exports.effectsScale = _chunkWT6ZAWJPcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCRMAXIUVcjs.emptySurface; exports.encodePng = _chunkWT6ZAWJPcjs.encodePng; exports.encodeRle = encodeRle; exports.encodeSelectionRle = encodeSelectionRle; exports.encodeSurface = encodeSurface; exports.evalWarpMesh = _chunkDWGZUSEScjs.evalWarpMesh; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.expandCoverage = expandCoverage; exports.exportPsd = exportPsd; exports.featherCoverage = featherCoverage; exports.fillRect = _chunkCRMAXIUVcjs.fillRect; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkWT6ZAWJPcjs.findLayer; exports.findLayerControl = findLayerControl; exports.finishTile = _chunkCRMAXIUVcjs.finishTile; exports.flattenLayers = _chunkWT6ZAWJPcjs.flattenLayers; exports.flipCorners = flipCorners; exports.formatControlValue = formatControlValue; exports.fullSelection = fullSelection; exports.gaussianBlur = _chunkWT6ZAWJPcjs.gaussianBlur; exports.geometryHomography = geometryHomography; exports.getAnnotationBounds = getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = getCropCursor; exports.getRotatedSize = getRotatedSize; exports.getViewportMetrics = getViewportMetrics; exports.getViewportProjection = getViewportProjection; exports.globalImageCache = globalImageCache; exports.greyMorphology = greyMorphology; exports.groupLayers = groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkWT6ZAWJPcjs.hasActiveEffects; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.hasWarp = hasWarp; exports.hashMaskContent = hashMaskContent; exports.hashNoise = _chunkWT6ZAWJPcjs.hashNoise; exports.hexToRgb = hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = hitTestAnnotation; exports.hitTestCrop = hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = hueRangeTables; exports.hueRangeWeight = hueRangeWeight; exports.hueSaturation = hueSaturation; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.identityTransform = identityTransform; exports.identityWarpMesh = _chunkDWGZUSEScjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageToCanvasPoint = imageToCanvasPoint; exports.importPsd = importPsd; exports.inflate = _chunkWT6ZAWJPcjs.inflate; exports.inflateRaw = _chunkWT6ZAWJPcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkWT6ZAWJPcjs.insertLayer; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = invertMatrix3; exports.invertSelection = invertSelection; exports.isActiveFilter = isActiveFilter; exports.isAdjustmentKind = isAdjustmentKind; exports.isBlendMode = _chunkCRMAXIUVcjs.isBlendMode; exports.isDefaultDepthMask = isDefaultDepthMask; exports.isIdentityTransform = isIdentityTransform; exports.isInterpolation = _chunkWT6ZAWJPcjs.isInterpolation; exports.isLayerEffectKind = _chunkWT6ZAWJPcjs.isLayerEffectKind; exports.isLayerLocked = _chunkWT6ZAWJPcjs.isLayerLocked; exports.isLegacyShape = isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPng = _chunkWT6ZAWJPcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.isSelectionEmpty = isSelectionEmpty; exports.isSelectionMode = isSelectionMode; exports.isSeparableBlendMode = _chunkCRMAXIUVcjs.isSeparableBlendMode; exports.isSpatialFilter = isSpatialFilter; exports.isTransformAnchor = isTransformAnchor; exports.isValidWarp = isValidWarp; exports.kelvinToTemperature = kelvinToTemperature; exports.keysWeight = _chunkWT6ZAWJPcjs.keysWeight; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkWT6ZAWJPcjs.layerEffectFields; exports.layerEffectLabel = _chunkWT6ZAWJPcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerLabel = layerLabel; exports.layerMaskCoverage = layerMaskCoverage; exports.layerMaskFromSelection = layerMaskFromSelection; exports.layerMaskKey = layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = layerTree; exports.layerTypeLabel = layerTypeLabel; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.legacyMaskOf = legacyMaskOf; exports.legacyView = legacyView; exports.lerpPigment = _chunkCRMAXIUVcjs.lerpPigment; exports.lerpPigmentInto = _chunkCRMAXIUVcjs.lerpPigmentInto; exports.levelsValue = levelsValue; exports.linearSrgbToXy = linearSrgbToXy; exports.linearToSrgb = linearToSrgb; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkZZOTHJ4Kcjs.loadMixer; exports.magicWand = magicWand; exports.mapCropHandle = mapCropHandle; exports.mapLayer = _chunkWT6ZAWJPcjs.mapLayer; exports.maskSummary = maskSummary; exports.matrixFromCorners = matrixFromCorners; exports.matrixFromParams = matrixFromParams; exports.mergeLayerEffect = _chunkWT6ZAWJPcjs.mergeLayerEffect; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mixPigment8 = _chunkCRMAXIUVcjs.mixPigment8; exports.mixPigmentRgb = _chunkCRMAXIUVcjs.mixPigmentRgb; exports.mixPigments = _chunkCRMAXIUVcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.modifySelection = modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = moveLayer; exports.mulMatrix3 = mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = neutralHueRange; exports.newEffectId = _chunkWT6ZAWJPcjs.newEffectId; exports.newLayerId = newLayerId; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.normalizeAngle = normalizeAngle; exports.normalizeBlendMode = _chunkCRMAXIUVcjs.normalizeBlendMode; exports.normalizeBrush = _chunkZZOTHJ4Kcjs.normalizeBrush; exports.normalizeFilter = normalizeFilter; exports.normalizeLayerEffects = _chunkWT6ZAWJPcjs.normalizeLayerEffects; exports.normalizeLayerMask = normalizeLayerMask; exports.normalizeMixer = _chunkZZOTHJ4Kcjs.normalizeMixer; exports.normalizeProcessVersion = normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.offsetLayer = offsetLayer; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCRMAXIUVcjs.packRgba; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.parseBlend = parseBlend; exports.parseColor = parseColor; exports.parseDataUrl = _chunkWT6ZAWJPcjs.parseDataUrl; exports.parseEffectColor = _chunkWT6ZAWJPcjs.parseEffectColor; exports.parseLfx2 = parseLfx2; exports.parseLrfx = parseLrfx; exports.parsePatternBlock = parsePatternBlock; exports.parseSelectionMode = parseSelectionMode; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.photoFilterMatrix = photoFilterMatrix; exports.pixelLayerBounds = pixelLayerBounds; exports.pixelLayers = pixelLayers; exports.placeLayer = placeLayer; exports.pngDataUrl = _chunkWT6ZAWJPcjs.pngDataUrl; exports.pointerPressure = pointerPressure; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = posterizeValue; exports.presetWarp = presetWarp; exports.previewStep = previewStep; exports.projectImagePoint = projectImagePoint; exports.projectImageRect = projectImageRect; exports.projectMaskCoverage = projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.psdToLayers = psdToLayers; exports.pullWarpMesh = _chunkDWGZUSEScjs.pullWarpMesh; exports.quickMaskPixels = quickMaskPixels; exports.rangeLightness = rangeLightness; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.rasterizeDab = _chunkZZOTHJ4Kcjs.rasterizeDab; exports.readAdjustmentControls = readAdjustmentControls; exports.readPixel = _chunkCRMAXIUVcjs.readPixel; exports.readPsd = readPsd; exports.readRegion = _chunkCRMAXIUVcjs.readRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunkWT6ZAWJPcjs.reduceSurface; exports.referencePoint = referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCRMAXIUVcjs.reflectanceToRgb; exports.removeAlpha = removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = removeLayer; exports.removeLayerEffect = removeLayerEffect; exports.removeLayerFilter = removeLayerFilter; exports.renderLayerEffects = _chunkWT6ZAWJPcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.resizePixels = resizePixels; exports.resizeSelection = resizeSelection; exports.resizeWarpMesh = _chunkDWGZUSEScjs.resizeWarpMesh; exports.resolveExternalAssets = resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.rgbToGray = rgbToGray; exports.rgbToHsl = rgbToHsl; exports.rgbToReflectance = _chunkCRMAXIUVcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = sampleLut; exports.sampleToneLut = sampleToneLut; exports.scaleLayerEffect = _chunkWT6ZAWJPcjs.scaleLayerEffect; exports.selectionArea = selectionArea; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionFromPixels = selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = selectionToCoverage; exports.selectionToPixels = selectionToPixels; exports.selectionValueAt = selectionValueAt; exports.serializeEffects = serializeEffects; exports.serializeLayer = serializeLayer; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.serializePatterns = serializePatterns; exports.serializeSelection = serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = setLayerEffects; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.setLayerMask = setLayerMask; exports.setLayerProperties = setLayerProperties; exports.setLum = _chunkCRMAXIUVcjs.setLum; exports.setPigmentColor = _chunkCRMAXIUVcjs.setPigmentColor; exports.shiftCoverage = shiftCoverage; exports.smoothCoverage = smoothCoverage; exports.smoothPoints = _chunkZZOTHJ4Kcjs.smoothPoints; exports.solidSurface = _chunkCRMAXIUVcjs.solidSurface; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.srgb8ToLab = srgb8ToLab; exports.srgbToLinear = srgbToLinear; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCRMAXIUVcjs.surfaceBytes; exports.surfaceFromPixels = _chunkCRMAXIUVcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCRMAXIUVcjs.surfacesEqual; exports.tempTintToXy = tempTintToXy; exports.temperatureToKelvin = temperatureToKelvin; exports.tileCoord = _chunkCRMAXIUVcjs.tileCoord; exports.tileKey = _chunkCRMAXIUVcjs.tileKey; exports.tileRect = _chunkCRMAXIUVcjs.tileRect; exports.tilesInRect = _chunkCRMAXIUVcjs.tilesInRect; exports.tipFalloff = _chunkZZOTHJ4Kcjs.tipFalloff; exports.tipReach = _chunkZZOTHJ4Kcjs.tipReach; exports.tipShape = _chunkZZOTHJ4Kcjs.tipShape; exports.toHex = toHex2; exports.toneCurve = toneCurve; exports.toneLuts = toneLuts; exports.toneRange = toneRange; exports.transformHomography = transformHomography; exports.transformMap = transformMap; exports.transformSurface = _chunkWT6ZAWJPcjs.transformSurface; exports.transformedBounds = _chunkWT6ZAWJPcjs.transformedBounds; exports.transformedBox = transformedBox; exports.transformedPoint = transformedPoint; exports.translateSurface = _chunkCRMAXIUVcjs.translateSurface; exports.ungroupLayer = ungroupLayer; exports.uniformTile = _chunkCRMAXIUVcjs.uniformTile; exports.unionRect = unionRect; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.updateLayerEffect = updateLayerEffect; exports.updateLayerFilter = updateLayerFilter; exports.updateLayerMaskProps = updateLayerMaskProps; exports.uvToXy = uvToXy; exports.validateEffectGradient = _chunkWT6ZAWJPcjs.validateEffectGradient; exports.validateLayerEffect = _chunkWT6ZAWJPcjs.validateLayerEffect; exports.validateLayerEffects = _chunkWT6ZAWJPcjs.validateLayerEffects; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.walkDabs = _chunkZZOTHJ4Kcjs.walkDabs; exports.warpMeshEditPoints = _chunkDWGZUSEScjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkDWGZUSEScjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkDWGZUSEScjs.warpMeshParamAt; exports.warpPresetMesh = _chunkDWGZUSEScjs.warpPresetMesh; exports.warpSurface = _chunkWT6ZAWJPcjs.warpSurface; exports.wbMatrix = wbMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.withNewIds = withNewIds; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.writeLfx2 = writeLfx2; exports.writePatternBlock = writePatternBlock; exports.writePsd = writePsd; exports.writeRegion = _chunkCRMAXIUVcjs.writeRegion; exports.xyToTempTint = xyToTempTint; exports.xyToUv = xyToUv;
|
|
16069
16225
|
//# sourceMappingURL=index.cjs.map
|