@pixerate/editor 0.196.0 → 0.198.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/dist/image-editor/controller.d.cts +35 -0
- package/dist/image-editor/controller.d.ts +35 -0
- package/dist/image-editor/index.cjs +1450 -406
- package/dist/image-editor/index.js +1050 -6
- package/dist/image-editor/selection/gesture.d.cts +8 -0
- package/dist/image-editor/selection/gesture.d.ts +8 -0
- package/dist/image-editor/selection/index.d.cts +1 -0
- package/dist/image-editor/selection/index.d.ts +1 -0
- package/dist/image-editor/selection/segment/grabcut.d.cts +45 -0
- package/dist/image-editor/selection/segment/grabcut.d.ts +45 -0
- package/dist/image-editor/selection/segment/index.d.cts +4 -0
- package/dist/image-editor/selection/segment/index.d.ts +4 -0
- package/dist/image-editor/selection/segment/maxflow.d.cts +30 -0
- package/dist/image-editor/selection/segment/maxflow.d.ts +30 -0
- package/dist/image-editor/selection/segment/quick.d.cts +28 -0
- package/dist/image-editor/selection/segment/quick.d.ts +28 -0
- package/dist/image-editor/selection/segment/work.d.cts +54 -0
- package/dist/image-editor/selection/segment/work.d.ts +54 -0
- package/dist/image-editor/selection/tool-options.d.cts +11 -1
- package/dist/image-editor/selection/tool-options.d.ts +11 -1
- package/package.json +1 -1
- package/skills/pixerate-image-editor/SKILL.md +1 -0
- package/skills/pixerate-image-selection-masking/SKILL.md +7 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15;
|
|
1
|
+
"use strict";Object.defineProperty(exports, "__esModule", {value: true}); function _nullishCoalesce(lhs, rhsFn) { if (lhs != null) { return lhs; } else { return rhsFn(); } } function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) { const op = ops[i]; const fn = ops[i + 1]; i += 2; if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) { return undefined; } if (op === 'access' || op === 'optionalAccess') { lastAccessLHS = value; value = fn(value); } else if (op === 'call' || op === 'optionalCall') { value = fn((...args) => value.call(lastAccessLHS, ...args)); lastAccessLHS = undefined; } } return value; } var _class; var _class2; var _class3; var _class4; var _class5; var _class6; var _class7; var _class8; var _class9; var _class10; var _class11; var _class12; var _class13; var _class14; var _class15; var _class16;
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
@@ -2803,6 +2803,875 @@ function magneticAnchorSpacing(frequency = 57) {
|
|
|
2803
2803
|
return 8 + (100 - f);
|
|
2804
2804
|
}
|
|
2805
2805
|
|
|
2806
|
+
// src/image-editor/selection/segment/maxflow.ts
|
|
2807
|
+
var TERMINAL = -2;
|
|
2808
|
+
var NONE = -1;
|
|
2809
|
+
var FREE = 0;
|
|
2810
|
+
var SOURCE = 1;
|
|
2811
|
+
var SINK = 2;
|
|
2812
|
+
var GridGraph = class {
|
|
2813
|
+
|
|
2814
|
+
|
|
2815
|
+
/** Residual capacity of the edge leaving node `p` in direction `d`, at `p * 4 + d`. */
|
|
2816
|
+
|
|
2817
|
+
/** Net terminal capacity: above 0 to the source, below 0 to the sink. */
|
|
2818
|
+
|
|
2819
|
+
|
|
2820
|
+
constructor(width, height) {
|
|
2821
|
+
this.width = width;
|
|
2822
|
+
this.height = height;
|
|
2823
|
+
const n = width * height;
|
|
2824
|
+
this.cap = new Float64Array(n * 4);
|
|
2825
|
+
this.tr = new Float64Array(n);
|
|
2826
|
+
this.tree = new Uint8Array(n);
|
|
2827
|
+
}
|
|
2828
|
+
/** Sets the capacity of the edge between `p` and its neighbour in direction `d`, both ways. */
|
|
2829
|
+
setEdge(p, d, capacity) {
|
|
2830
|
+
const q = d === 0 ? p + 1 : p + this.width;
|
|
2831
|
+
this.cap[p * 4 + d] = capacity;
|
|
2832
|
+
this.cap[q * 4 + (d ^ 2)] = capacity;
|
|
2833
|
+
}
|
|
2834
|
+
/** Adds `source` (cost of putting `p` on the sink side) and `sink` (the other way) to `p`. */
|
|
2835
|
+
addTerminal(p, source, sink) {
|
|
2836
|
+
this.tr[p] += source - sink;
|
|
2837
|
+
}
|
|
2838
|
+
/** Whether `p` is on the source side of the minimum cut (after {@link maxflow}). */
|
|
2839
|
+
inSource(p) {
|
|
2840
|
+
return this.tree[p] === SOURCE;
|
|
2841
|
+
}
|
|
2842
|
+
/** Runs max-flow and returns the flow (the cut's cost, less the constant terminal parts). */
|
|
2843
|
+
maxflow() {
|
|
2844
|
+
const { width: w, height: h, cap, tr, tree } = this;
|
|
2845
|
+
const n = w * h;
|
|
2846
|
+
const nb = (p, d) => {
|
|
2847
|
+
const x = p % w;
|
|
2848
|
+
if (d === 0) return x < w - 1 ? p + 1 : -1;
|
|
2849
|
+
if (d === 1) return p + w < n ? p + w : -1;
|
|
2850
|
+
if (d === 2) return x > 0 ? p - 1 : -1;
|
|
2851
|
+
return p - w >= 0 ? p - w : -1;
|
|
2852
|
+
};
|
|
2853
|
+
const parent = new Int8Array(n).fill(NONE);
|
|
2854
|
+
const ts = new Int32Array(n);
|
|
2855
|
+
const dist = new Int32Array(n);
|
|
2856
|
+
const queue = new Int32Array(n + 1);
|
|
2857
|
+
const queued = new Uint8Array(n);
|
|
2858
|
+
let qHead = 0;
|
|
2859
|
+
let qTail = 0;
|
|
2860
|
+
const activate = (p) => {
|
|
2861
|
+
if (queued[p]) return;
|
|
2862
|
+
queued[p] = 1;
|
|
2863
|
+
queue[qTail] = p;
|
|
2864
|
+
qTail = qTail === n ? 0 : qTail + 1;
|
|
2865
|
+
};
|
|
2866
|
+
const nextActive = () => {
|
|
2867
|
+
while (qHead !== qTail) {
|
|
2868
|
+
const p = queue[qHead];
|
|
2869
|
+
qHead = qHead === n ? 0 : qHead + 1;
|
|
2870
|
+
queued[p] = 0;
|
|
2871
|
+
if (tree[p] !== FREE) return p;
|
|
2872
|
+
}
|
|
2873
|
+
return -1;
|
|
2874
|
+
};
|
|
2875
|
+
let orphans = new Int32Array(64);
|
|
2876
|
+
let orphanCount = 0;
|
|
2877
|
+
const orphan = (p) => {
|
|
2878
|
+
parent[p] = NONE;
|
|
2879
|
+
if (orphanCount === orphans.length) {
|
|
2880
|
+
const grown = new Int32Array(orphans.length * 2);
|
|
2881
|
+
grown.set(orphans);
|
|
2882
|
+
orphans = grown;
|
|
2883
|
+
}
|
|
2884
|
+
orphans[orphanCount++] = p;
|
|
2885
|
+
};
|
|
2886
|
+
tree.fill(FREE);
|
|
2887
|
+
for (let p = 0; p < n; p++) {
|
|
2888
|
+
if (tr[p] > 0) tree[p] = SOURCE;
|
|
2889
|
+
else if (tr[p] < 0) tree[p] = SINK;
|
|
2890
|
+
else continue;
|
|
2891
|
+
parent[p] = TERMINAL;
|
|
2892
|
+
dist[p] = 1;
|
|
2893
|
+
activate(p);
|
|
2894
|
+
}
|
|
2895
|
+
let flow = 0;
|
|
2896
|
+
let time = 0;
|
|
2897
|
+
let current = -1;
|
|
2898
|
+
for (; ; ) {
|
|
2899
|
+
if (current < 0 || tree[current] === FREE) {
|
|
2900
|
+
current = nextActive();
|
|
2901
|
+
if (current < 0) break;
|
|
2902
|
+
}
|
|
2903
|
+
const p = current;
|
|
2904
|
+
const side = tree[p];
|
|
2905
|
+
let s = -1;
|
|
2906
|
+
let t = -1;
|
|
2907
|
+
let dir = 0;
|
|
2908
|
+
for (let d = 0; d < 4; d++) {
|
|
2909
|
+
const q = nb(p, d);
|
|
2910
|
+
if (q < 0) continue;
|
|
2911
|
+
if (side === SOURCE ? cap[p * 4 + d] <= 0 : cap[q * 4 + (d ^ 2)] <= 0) continue;
|
|
2912
|
+
if (tree[q] === FREE) {
|
|
2913
|
+
tree[q] = side;
|
|
2914
|
+
parent[q] = d ^ 2;
|
|
2915
|
+
ts[q] = ts[p];
|
|
2916
|
+
dist[q] = dist[p] + 1;
|
|
2917
|
+
activate(q);
|
|
2918
|
+
} else if (tree[q] !== side) {
|
|
2919
|
+
if (side === SOURCE) {
|
|
2920
|
+
s = p;
|
|
2921
|
+
t = q;
|
|
2922
|
+
dir = d;
|
|
2923
|
+
} else {
|
|
2924
|
+
s = q;
|
|
2925
|
+
t = p;
|
|
2926
|
+
dir = d ^ 2;
|
|
2927
|
+
}
|
|
2928
|
+
break;
|
|
2929
|
+
} else if (ts[q] <= ts[p] && dist[q] > dist[p]) {
|
|
2930
|
+
parent[q] = d ^ 2;
|
|
2931
|
+
ts[q] = ts[p];
|
|
2932
|
+
dist[q] = dist[p] + 1;
|
|
2933
|
+
}
|
|
2934
|
+
}
|
|
2935
|
+
if (s < 0) {
|
|
2936
|
+
current = -1;
|
|
2937
|
+
continue;
|
|
2938
|
+
}
|
|
2939
|
+
time++;
|
|
2940
|
+
let f = cap[s * 4 + dir];
|
|
2941
|
+
for (let x = s; ; ) {
|
|
2942
|
+
const a = parent[x];
|
|
2943
|
+
if (a === TERMINAL) {
|
|
2944
|
+
f = Math.min(f, tr[x]);
|
|
2945
|
+
break;
|
|
2946
|
+
}
|
|
2947
|
+
const up = nb(x, a);
|
|
2948
|
+
f = Math.min(f, cap[up * 4 + (a ^ 2)]);
|
|
2949
|
+
x = up;
|
|
2950
|
+
}
|
|
2951
|
+
for (let x = t; ; ) {
|
|
2952
|
+
const a = parent[x];
|
|
2953
|
+
if (a === TERMINAL) {
|
|
2954
|
+
f = Math.min(f, -tr[x]);
|
|
2955
|
+
break;
|
|
2956
|
+
}
|
|
2957
|
+
f = Math.min(f, cap[x * 4 + a]);
|
|
2958
|
+
x = nb(x, a);
|
|
2959
|
+
}
|
|
2960
|
+
cap[s * 4 + dir] -= f;
|
|
2961
|
+
cap[t * 4 + (dir ^ 2)] += f;
|
|
2962
|
+
for (let x = s; ; ) {
|
|
2963
|
+
const a = parent[x];
|
|
2964
|
+
if (a === TERMINAL) {
|
|
2965
|
+
tr[x] -= f;
|
|
2966
|
+
if (tr[x] <= 0) orphan(x);
|
|
2967
|
+
break;
|
|
2968
|
+
}
|
|
2969
|
+
const up = nb(x, a);
|
|
2970
|
+
cap[up * 4 + (a ^ 2)] -= f;
|
|
2971
|
+
cap[x * 4 + a] += f;
|
|
2972
|
+
if (cap[up * 4 + (a ^ 2)] <= 0) orphan(x);
|
|
2973
|
+
x = up;
|
|
2974
|
+
}
|
|
2975
|
+
for (let x = t; ; ) {
|
|
2976
|
+
const a = parent[x];
|
|
2977
|
+
if (a === TERMINAL) {
|
|
2978
|
+
tr[x] += f;
|
|
2979
|
+
if (tr[x] >= 0) orphan(x);
|
|
2980
|
+
break;
|
|
2981
|
+
}
|
|
2982
|
+
const up = nb(x, a);
|
|
2983
|
+
cap[x * 4 + a] -= f;
|
|
2984
|
+
cap[up * 4 + (a ^ 2)] += f;
|
|
2985
|
+
if (cap[x * 4 + a] <= 0) orphan(x);
|
|
2986
|
+
x = up;
|
|
2987
|
+
}
|
|
2988
|
+
flow += f;
|
|
2989
|
+
while (orphanCount) {
|
|
2990
|
+
const o = orphans[--orphanCount];
|
|
2991
|
+
const oSide = tree[o];
|
|
2992
|
+
let best = NONE;
|
|
2993
|
+
let bestDist = Infinity;
|
|
2994
|
+
for (let d = 0; d < 4; d++) {
|
|
2995
|
+
const q = nb(o, d);
|
|
2996
|
+
if (q < 0 || tree[q] !== oSide) continue;
|
|
2997
|
+
if (oSide === SOURCE ? cap[q * 4 + (d ^ 2)] <= 0 : cap[o * 4 + d] <= 0) continue;
|
|
2998
|
+
let k = 0;
|
|
2999
|
+
let x = q;
|
|
3000
|
+
for (; ; ) {
|
|
3001
|
+
if (ts[x] === time) {
|
|
3002
|
+
k += dist[x];
|
|
3003
|
+
break;
|
|
3004
|
+
}
|
|
3005
|
+
const a = parent[x];
|
|
3006
|
+
k++;
|
|
3007
|
+
if (a === TERMINAL) {
|
|
3008
|
+
ts[x] = time;
|
|
3009
|
+
dist[x] = 1;
|
|
3010
|
+
break;
|
|
3011
|
+
}
|
|
3012
|
+
if (a === NONE) {
|
|
3013
|
+
k = Infinity;
|
|
3014
|
+
break;
|
|
3015
|
+
}
|
|
3016
|
+
x = nb(x, a);
|
|
3017
|
+
}
|
|
3018
|
+
if (k === Infinity) continue;
|
|
3019
|
+
if (k < bestDist) {
|
|
3020
|
+
bestDist = k;
|
|
3021
|
+
best = d;
|
|
3022
|
+
}
|
|
3023
|
+
for (let y = q, dd = k; ts[y] !== time; y = nb(y, parent[y]), dd--) {
|
|
3024
|
+
ts[y] = time;
|
|
3025
|
+
dist[y] = dd;
|
|
3026
|
+
}
|
|
3027
|
+
}
|
|
3028
|
+
if (best !== NONE) {
|
|
3029
|
+
parent[o] = best;
|
|
3030
|
+
ts[o] = time;
|
|
3031
|
+
dist[o] = bestDist + 1;
|
|
3032
|
+
continue;
|
|
3033
|
+
}
|
|
3034
|
+
for (let d = 0; d < 4; d++) {
|
|
3035
|
+
const q = nb(o, d);
|
|
3036
|
+
if (q < 0 || tree[q] !== oSide) continue;
|
|
3037
|
+
if (oSide === SOURCE ? cap[q * 4 + (d ^ 2)] > 0 : cap[o * 4 + d] > 0) activate(q);
|
|
3038
|
+
const a = parent[q];
|
|
3039
|
+
if (a !== TERMINAL && a !== NONE && nb(q, a) === o) orphan(q);
|
|
3040
|
+
}
|
|
3041
|
+
tree[o] = FREE;
|
|
3042
|
+
}
|
|
3043
|
+
}
|
|
3044
|
+
return flow;
|
|
3045
|
+
}
|
|
3046
|
+
};
|
|
3047
|
+
|
|
3048
|
+
// src/image-editor/selection/segment/work.ts
|
|
3049
|
+
var WORK_SIZE = 512;
|
|
3050
|
+
var workCache = /* @__PURE__ */ new WeakMap();
|
|
3051
|
+
function workImage(pixels, maxSide = WORK_SIZE) {
|
|
3052
|
+
const cached = workCache.get(pixels.data);
|
|
3053
|
+
if (cached && cached.maxSide === maxSide && cached.work.sourceWidth === pixels.width && cached.work.sourceHeight === pixels.height) return cached.work;
|
|
3054
|
+
const { width: W, height: H, data } = pixels;
|
|
3055
|
+
const scale = Math.min(1, maxSide / Math.max(W, H));
|
|
3056
|
+
const w = Math.max(1, Math.round(W * scale));
|
|
3057
|
+
const h = Math.max(1, Math.round(H * scale));
|
|
3058
|
+
const sum = new Float64Array(w * h * 3);
|
|
3059
|
+
const count = new Float64Array(w * h);
|
|
3060
|
+
const xs = new Int32Array(W);
|
|
3061
|
+
for (let x = 0; x < W; x++) xs[x] = Math.min(w - 1, Math.floor(x * w / W));
|
|
3062
|
+
for (let y = 0; y < H; y++) {
|
|
3063
|
+
const row = Math.min(h - 1, Math.floor(y * h / H)) * w;
|
|
3064
|
+
for (let x = 0, p = y * W * 4; x < W; x++, p += 4) {
|
|
3065
|
+
const o = row + xs[x];
|
|
3066
|
+
const a = data[p + 3] / 255;
|
|
3067
|
+
const k = o * 3;
|
|
3068
|
+
sum[k] += data[p] * a + 255 * (1 - a);
|
|
3069
|
+
sum[k + 1] += data[p + 1] * a + 255 * (1 - a);
|
|
3070
|
+
sum[k + 2] += data[p + 2] * a + 255 * (1 - a);
|
|
3071
|
+
count[o]++;
|
|
3072
|
+
}
|
|
3073
|
+
}
|
|
3074
|
+
const rgb = new Float32Array(w * h * 3);
|
|
3075
|
+
for (let i = 0; i < w * h; i++) {
|
|
3076
|
+
const c = count[i] || 1;
|
|
3077
|
+
rgb[i * 3] = sum[i * 3] / c;
|
|
3078
|
+
rgb[i * 3 + 1] = sum[i * 3 + 1] / c;
|
|
3079
|
+
rgb[i * 3 + 2] = sum[i * 3 + 2] / c;
|
|
3080
|
+
}
|
|
3081
|
+
const work = { sourceWidth: W, sourceHeight: H, width: w, height: h, scale: w / W, rgb };
|
|
3082
|
+
workCache.set(pixels.data, { maxSide, work });
|
|
3083
|
+
return work;
|
|
3084
|
+
}
|
|
3085
|
+
var GAMMA = 50;
|
|
3086
|
+
var UNITS = 64;
|
|
3087
|
+
function smoothnessWeights(work, roi) {
|
|
3088
|
+
const { width: w, rgb } = work;
|
|
3089
|
+
const { x: rx, y: ry, width: rw, height: rh } = roi;
|
|
3090
|
+
const right = new Float64Array(rw * rh);
|
|
3091
|
+
const down = new Float64Array(rw * rh);
|
|
3092
|
+
let sumSq = 0;
|
|
3093
|
+
let pairs = 0;
|
|
3094
|
+
for (let y = 0; y < rh; y++) {
|
|
3095
|
+
for (let x = 0; x < rw; x++) {
|
|
3096
|
+
const p = y * rw + x;
|
|
3097
|
+
const c = ((ry + y) * w + rx + x) * 3;
|
|
3098
|
+
if (x + 1 < rw) {
|
|
3099
|
+
right[p] = (rgb[c] - rgb[c + 3]) ** 2 + (rgb[c + 1] - rgb[c + 4]) ** 2 + (rgb[c + 2] - rgb[c + 5]) ** 2;
|
|
3100
|
+
sumSq += right[p];
|
|
3101
|
+
pairs++;
|
|
3102
|
+
}
|
|
3103
|
+
if (y + 1 < rh) {
|
|
3104
|
+
const k = c + w * 3;
|
|
3105
|
+
down[p] = (rgb[c] - rgb[k]) ** 2 + (rgb[c + 1] - rgb[k + 1]) ** 2 + (rgb[c + 2] - rgb[k + 2]) ** 2;
|
|
3106
|
+
sumSq += down[p];
|
|
3107
|
+
pairs++;
|
|
3108
|
+
}
|
|
3109
|
+
}
|
|
3110
|
+
}
|
|
3111
|
+
const beta = 1 / (2 * Math.max(1e-6, sumSq / Math.max(1, pairs)));
|
|
3112
|
+
for (let p = 0; p < right.length; p++) {
|
|
3113
|
+
right[p] = Math.round(GAMMA * UNITS * Math.exp(-beta * right[p]));
|
|
3114
|
+
down[p] = Math.round(GAMMA * UNITS * Math.exp(-beta * down[p]));
|
|
3115
|
+
}
|
|
3116
|
+
return { right, down };
|
|
3117
|
+
}
|
|
3118
|
+
function boxBlur(src, w, h, passes) {
|
|
3119
|
+
let a = src;
|
|
3120
|
+
for (let k = 0; k < passes; k++) {
|
|
3121
|
+
const b = new Float32Array(a.length);
|
|
3122
|
+
for (let y = 0; y < h; y++) {
|
|
3123
|
+
for (let x = 0; x < w; x++) {
|
|
3124
|
+
let s = 0;
|
|
3125
|
+
let c = 0;
|
|
3126
|
+
for (let j = Math.max(0, y - 1); j <= Math.min(h - 1, y + 1); j++) {
|
|
3127
|
+
for (let i = Math.max(0, x - 1); i <= Math.min(w - 1, x + 1); i++) {
|
|
3128
|
+
s += a[j * w + i];
|
|
3129
|
+
c++;
|
|
3130
|
+
}
|
|
3131
|
+
}
|
|
3132
|
+
b[y * w + x] = s / c;
|
|
3133
|
+
}
|
|
3134
|
+
}
|
|
3135
|
+
a = b;
|
|
3136
|
+
}
|
|
3137
|
+
return a;
|
|
3138
|
+
}
|
|
3139
|
+
function upscaleRegion(work, pixels, roi, label, enhance) {
|
|
3140
|
+
const { sourceWidth: W, sourceHeight: H, scale, rgb, width: ww } = work;
|
|
3141
|
+
const { x: rx, y: ry, width: rw, height: rh } = roi;
|
|
3142
|
+
let soft = Float32Array.from(label);
|
|
3143
|
+
if (enhance) {
|
|
3144
|
+
soft = boxBlur(soft, rw, rh, 2);
|
|
3145
|
+
for (let i = 0; i < soft.length; i++) soft[i] = Math.min(1, Math.max(0, (soft[i] - 0.5) * 3 + 0.5));
|
|
3146
|
+
}
|
|
3147
|
+
const X0 = Math.max(0, Math.floor(rx / scale));
|
|
3148
|
+
const Y0 = Math.max(0, Math.floor(ry / scale));
|
|
3149
|
+
const X1 = Math.min(W, Math.ceil((rx + rw) / scale));
|
|
3150
|
+
const Y1 = Math.min(H, Math.ceil((ry + rh) / scale));
|
|
3151
|
+
const RW = X1 - X0;
|
|
3152
|
+
const RH = Y1 - Y0;
|
|
3153
|
+
const out = new Uint8Array(RW * RH);
|
|
3154
|
+
const at = (x, y) => soft[Math.min(rh - 1, Math.max(0, y)) * rw + Math.min(rw - 1, Math.max(0, x))];
|
|
3155
|
+
const data = pixels.data;
|
|
3156
|
+
const colOf = new Int32Array(RW);
|
|
3157
|
+
const fxOf = new Float32Array(RW);
|
|
3158
|
+
for (let X = 0; X < RW; X++) {
|
|
3159
|
+
const u = (X0 + X + 0.5) * scale - 0.5 - rx;
|
|
3160
|
+
colOf[X] = Math.floor(u);
|
|
3161
|
+
fxOf[X] = u - colOf[X];
|
|
3162
|
+
}
|
|
3163
|
+
const cellState = (i, j) => {
|
|
3164
|
+
const a = at(i, j), b = at(i + 1, j), c = at(i, j + 1), d = at(i + 1, j + 1);
|
|
3165
|
+
if (a === 1 && b === 1 && c === 1 && d === 1) return 1;
|
|
3166
|
+
if (a === 0 && b === 0 && c === 0 && d === 0) return 0;
|
|
3167
|
+
return 2;
|
|
3168
|
+
};
|
|
3169
|
+
for (let Y = 0; Y < RH; Y++) {
|
|
3170
|
+
const v = (Y0 + Y + 0.5) * scale - 0.5 - ry;
|
|
3171
|
+
const j = Math.floor(v);
|
|
3172
|
+
const fy = v - j;
|
|
3173
|
+
for (let X = 0; X < RW; X++) {
|
|
3174
|
+
const i = colOf[X];
|
|
3175
|
+
const state = cellState(i, j);
|
|
3176
|
+
if (state !== 2) {
|
|
3177
|
+
let end = X + 1;
|
|
3178
|
+
while (end < RW && colOf[end] === i) end++;
|
|
3179
|
+
if (state === 1) out.fill(255, Y * RW + X, Y * RW + end);
|
|
3180
|
+
X = end - 1;
|
|
3181
|
+
continue;
|
|
3182
|
+
}
|
|
3183
|
+
const fx = fxOf[X];
|
|
3184
|
+
const m = (at(i, j) * (1 - fx) + at(i + 1, j) * fx) * (1 - fy) + (at(i, j + 1) * (1 - fx) + at(i + 1, j + 1) * fx) * fy;
|
|
3185
|
+
if (m <= 1e-3 || m >= 0.999) {
|
|
3186
|
+
out[Y * RW + X] = m >= 0.999 ? 255 : 0;
|
|
3187
|
+
continue;
|
|
3188
|
+
}
|
|
3189
|
+
let fr = 0, fg = 0, fb = 0, fn = 0, br = 0, bg = 0, bb = 0, bn = 0;
|
|
3190
|
+
for (let jj = j - 1; jj <= j + 2; jj++) {
|
|
3191
|
+
for (let ii = i - 1; ii <= i + 2; ii++) {
|
|
3192
|
+
if (ii < 0 || jj < 0 || ii >= rw || jj >= rh) continue;
|
|
3193
|
+
const k = ((ry + jj) * ww + rx + ii) * 3;
|
|
3194
|
+
if (soft[jj * rw + ii] >= 0.5) {
|
|
3195
|
+
fr += rgb[k];
|
|
3196
|
+
fg += rgb[k + 1];
|
|
3197
|
+
fb += rgb[k + 2];
|
|
3198
|
+
fn++;
|
|
3199
|
+
} else {
|
|
3200
|
+
br += rgb[k];
|
|
3201
|
+
bg += rgb[k + 1];
|
|
3202
|
+
bb += rgb[k + 2];
|
|
3203
|
+
bn++;
|
|
3204
|
+
}
|
|
3205
|
+
}
|
|
3206
|
+
}
|
|
3207
|
+
let alpha = m;
|
|
3208
|
+
if (fn && bn) {
|
|
3209
|
+
fr /= fn;
|
|
3210
|
+
fg /= fn;
|
|
3211
|
+
fb /= fn;
|
|
3212
|
+
br /= bn;
|
|
3213
|
+
bg /= bn;
|
|
3214
|
+
bb /= bn;
|
|
3215
|
+
const dr = fr - br, dg = fg - bg, db = fb - bb;
|
|
3216
|
+
const len2 = dr * dr + dg * dg + db * db;
|
|
3217
|
+
if (len2 > 400) {
|
|
3218
|
+
const p = ((Y0 + Y) * W + X0 + X) * 4;
|
|
3219
|
+
const a = data[p + 3] / 255;
|
|
3220
|
+
const cr = data[p] * a + 255 * (1 - a) - br;
|
|
3221
|
+
const cg = data[p + 1] * a + 255 * (1 - a) - bg;
|
|
3222
|
+
const cb = data[p + 2] * a + 255 * (1 - a) - bb;
|
|
3223
|
+
const proj = Math.min(1, Math.max(0, (cr * dr + cg * dg + cb * db) / len2));
|
|
3224
|
+
alpha = Math.min(1, Math.max(0, proj * 0.75 + m * 0.25));
|
|
3225
|
+
} else alpha = Math.min(1, Math.max(0, (m - 0.5) * 2 + 0.5));
|
|
3226
|
+
}
|
|
3227
|
+
out[Y * RW + X] = Math.round(alpha * 255);
|
|
3228
|
+
}
|
|
3229
|
+
}
|
|
3230
|
+
return _chunkUYXL6ZWQcjs.selectionFromRegion.call(void 0, W, H, { x: X0, y: Y0, width: RW, height: RH }, out);
|
|
3231
|
+
}
|
|
3232
|
+
|
|
3233
|
+
// src/image-editor/selection/segment/quick.ts
|
|
3234
|
+
var BINS = 16;
|
|
3235
|
+
var binOf = (rgb, i) => (Math.min(BINS - 1, rgb[i * 3] >> 4) * BINS + Math.min(BINS - 1, rgb[i * 3 + 1] >> 4)) * BINS + Math.min(BINS - 1, rgb[i * 3 + 2] >> 4);
|
|
3236
|
+
function costTable(hist, total) {
|
|
3237
|
+
let a = hist;
|
|
3238
|
+
for (const stride of [1, BINS, BINS * BINS]) {
|
|
3239
|
+
const b = new Float64Array(a.length);
|
|
3240
|
+
for (let i = 0; i < a.length; i++) {
|
|
3241
|
+
const pos = Math.floor(i / stride) % BINS;
|
|
3242
|
+
const lo = pos > 0 ? a[i - stride] : a[i];
|
|
3243
|
+
const hi = pos < BINS - 1 ? a[i + stride] : a[i];
|
|
3244
|
+
b[i] = (lo + 2 * a[i] + hi) / 4;
|
|
3245
|
+
}
|
|
3246
|
+
a = b;
|
|
3247
|
+
}
|
|
3248
|
+
const out = new Float64Array(a.length);
|
|
3249
|
+
const floor = 1e-4;
|
|
3250
|
+
const denom = Math.max(1, total) * (1 + floor * a.length);
|
|
3251
|
+
for (let i = 0; i < a.length; i++) out[i] = -Math.log((a[i] + floor * Math.max(1, total)) / denom);
|
|
3252
|
+
return out;
|
|
3253
|
+
}
|
|
3254
|
+
function strokePixels(points, r, w, h) {
|
|
3255
|
+
const mask = new Uint8Array(w * h);
|
|
3256
|
+
const list = [];
|
|
3257
|
+
const add2 = (g) => {
|
|
3258
|
+
if (!mask[g]) {
|
|
3259
|
+
mask[g] = 1;
|
|
3260
|
+
list.push(g);
|
|
3261
|
+
}
|
|
3262
|
+
};
|
|
3263
|
+
const segs = points.length === 1 ? [[points[0], points[0]]] : points.slice(1).map((p, i) => [points[i], p]);
|
|
3264
|
+
for (const [a, b] of segs) {
|
|
3265
|
+
const x0 = Math.max(0, Math.floor(Math.min(a.x, b.x) - r));
|
|
3266
|
+
const x1 = Math.min(w - 1, Math.ceil(Math.max(a.x, b.x) + r));
|
|
3267
|
+
const y0 = Math.max(0, Math.floor(Math.min(a.y, b.y) - r));
|
|
3268
|
+
const y1 = Math.min(h - 1, Math.ceil(Math.max(a.y, b.y) + r));
|
|
3269
|
+
const dx = b.x - a.x;
|
|
3270
|
+
const dy = b.y - a.y;
|
|
3271
|
+
const len2 = dx * dx + dy * dy;
|
|
3272
|
+
for (let y = y0; y <= y1; y++) {
|
|
3273
|
+
for (let x = x0; x <= x1; x++) {
|
|
3274
|
+
const px2 = x + 0.5 - a.x;
|
|
3275
|
+
const py = y + 0.5 - a.y;
|
|
3276
|
+
const t = len2 > 0 ? Math.min(1, Math.max(0, (px2 * dx + py * dy) / len2)) : 0;
|
|
3277
|
+
if ((px2 - t * dx) ** 2 + (py - t * dy) ** 2 <= r * r) add2(y * w + x);
|
|
3278
|
+
}
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
if (!list.length) {
|
|
3282
|
+
for (const p of points) add2(Math.min(h - 1, Math.max(0, Math.floor(p.y))) * w + Math.min(w - 1, Math.max(0, Math.floor(p.x))));
|
|
3283
|
+
}
|
|
3284
|
+
return { mask, list };
|
|
3285
|
+
}
|
|
3286
|
+
function segmentStroke(work, stroke, grown, start) {
|
|
3287
|
+
const { width: w, height: h, rgb } = work;
|
|
3288
|
+
let roi = start;
|
|
3289
|
+
for (; ; ) {
|
|
3290
|
+
const { x: rx, y: ry, width: rw, height: rh } = roi;
|
|
3291
|
+
const n = rw * rh;
|
|
3292
|
+
const fgHist = new Float64Array(BINS ** 3);
|
|
3293
|
+
const bgHist = new Float64Array(BINS ** 3);
|
|
3294
|
+
let fgN = 0;
|
|
3295
|
+
let bgN = 0;
|
|
3296
|
+
const atImageEdge = { l: rx === 0, t: ry === 0, r: rx + rw === w, b: ry + rh === h };
|
|
3297
|
+
for (let y = 0; y < rh; y++) {
|
|
3298
|
+
for (let x = 0; x < rw; x++) {
|
|
3299
|
+
const g = (ry + y) * w + (rx + x);
|
|
3300
|
+
const bin = binOf(rgb, g);
|
|
3301
|
+
bgHist[bin]++;
|
|
3302
|
+
bgN++;
|
|
3303
|
+
if (stroke.mask[g] || _optionalChain([grown, 'optionalAccess', _64 => _64[g]])) {
|
|
3304
|
+
fgHist[bin]++;
|
|
3305
|
+
fgN++;
|
|
3306
|
+
}
|
|
3307
|
+
}
|
|
3308
|
+
}
|
|
3309
|
+
const fgCost = costTable(fgHist, fgN);
|
|
3310
|
+
const bgCost = costTable(bgHist, bgN);
|
|
3311
|
+
const { right, down } = smoothnessWeights(work, roi);
|
|
3312
|
+
const graph = new GridGraph(rw, rh);
|
|
3313
|
+
const HARD = 1e9;
|
|
3314
|
+
for (let y = 0; y < rh; y++) {
|
|
3315
|
+
for (let x = 0; x < rw; x++) {
|
|
3316
|
+
const p = y * rw + x;
|
|
3317
|
+
const g = (ry + y) * w + rx + x;
|
|
3318
|
+
if (stroke.mask[g]) graph.addTerminal(p, HARD, 0);
|
|
3319
|
+
else {
|
|
3320
|
+
const bin = binOf(rgb, g);
|
|
3321
|
+
graph.addTerminal(p, Math.round(bgCost[bin] * UNITS), Math.round(fgCost[bin] * UNITS));
|
|
3322
|
+
}
|
|
3323
|
+
if (x + 1 < rw) graph.setEdge(p, 0, right[p]);
|
|
3324
|
+
if (y + 1 < rh) graph.setEdge(p, 1, down[p]);
|
|
3325
|
+
}
|
|
3326
|
+
}
|
|
3327
|
+
graph.maxflow();
|
|
3328
|
+
const label = new Uint8Array(n);
|
|
3329
|
+
const stack = [];
|
|
3330
|
+
for (const g of stroke.list) {
|
|
3331
|
+
const x = g % w - rx;
|
|
3332
|
+
const y = Math.floor(g / w) - ry;
|
|
3333
|
+
if (x < 0 || y < 0 || x >= rw || y >= rh) continue;
|
|
3334
|
+
const p = y * rw + x;
|
|
3335
|
+
if (!label[p]) {
|
|
3336
|
+
label[p] = 1;
|
|
3337
|
+
stack.push(p);
|
|
3338
|
+
}
|
|
3339
|
+
}
|
|
3340
|
+
while (stack.length) {
|
|
3341
|
+
const p = stack.pop();
|
|
3342
|
+
const x = p % rw;
|
|
3343
|
+
for (const q of [x + 1 < rw ? p + 1 : -1, x > 0 ? p - 1 : -1, p + rw < n ? p + rw : -1, p - rw]) {
|
|
3344
|
+
if (q >= 0 && !label[q] && graph.inSource(q)) {
|
|
3345
|
+
label[q] = 1;
|
|
3346
|
+
stack.push(q);
|
|
3347
|
+
}
|
|
3348
|
+
}
|
|
3349
|
+
}
|
|
3350
|
+
let touches = false;
|
|
3351
|
+
for (let y = 0; y < rh; y++) {
|
|
3352
|
+
for (let x = 0; x < rw; x++) {
|
|
3353
|
+
const p = y * rw + x;
|
|
3354
|
+
if (!label[p]) continue;
|
|
3355
|
+
if (!atImageEdge.l && x === 0 || !atImageEdge.t && y === 0 || !atImageEdge.r && x === rw - 1 || !atImageEdge.b && y === rh - 1) touches = true;
|
|
3356
|
+
}
|
|
3357
|
+
}
|
|
3358
|
+
if (!touches || atImageEdge.l && atImageEdge.t && atImageEdge.r && atImageEdge.b) return { roi, label };
|
|
3359
|
+
const nx = Math.max(0, rx - Math.ceil(rw / 2));
|
|
3360
|
+
const ny = Math.max(0, ry - Math.ceil(rh / 2));
|
|
3361
|
+
roi = { x: nx, y: ny, width: Math.min(w, rx + rw + Math.ceil(rw / 2)) - nx, height: Math.min(h, ry + rh + Math.ceil(rh / 2)) - ny };
|
|
3362
|
+
if (roi.width * roi.height * 2.5 > w * h) roi = { x: 0, y: 0, width: w, height: h };
|
|
3363
|
+
}
|
|
3364
|
+
}
|
|
3365
|
+
function quickSelectStroke(pixels, stroke, options = {}) {
|
|
3366
|
+
if (!stroke.length) throw new Error("A stroke needs at least one point.");
|
|
3367
|
+
const work = workImage(pixels);
|
|
3368
|
+
const { width: w, height: h, scale } = work;
|
|
3369
|
+
const r = Math.max(0.5, (_nullishCoalesce(options.size, () => ( 30))) / 2 * scale);
|
|
3370
|
+
const pts = stroke.map((p) => ({ x: p.x * scale, y: p.y * scale }));
|
|
3371
|
+
const seeds = strokePixels(pts, r, w, h);
|
|
3372
|
+
let x0 = Infinity, y0 = Infinity, x1 = -Infinity, y1 = -Infinity;
|
|
3373
|
+
for (const p of pts) {
|
|
3374
|
+
x0 = Math.min(x0, p.x);
|
|
3375
|
+
y0 = Math.min(y0, p.y);
|
|
3376
|
+
x1 = Math.max(x1, p.x);
|
|
3377
|
+
y1 = Math.max(y1, p.y);
|
|
3378
|
+
}
|
|
3379
|
+
const margin = Math.max(24, 4 * r);
|
|
3380
|
+
const rx = Math.max(0, Math.floor(x0 - margin));
|
|
3381
|
+
const ry = Math.max(0, Math.floor(y0 - margin));
|
|
3382
|
+
const roi = { x: rx, y: ry, width: Math.min(w, Math.ceil(x1 + margin)) - rx, height: Math.min(h, Math.ceil(y1 + margin)) - ry };
|
|
3383
|
+
let grown = null;
|
|
3384
|
+
const sel = options.grow ? options.selection : null;
|
|
3385
|
+
if (_optionalChain([sel, 'optionalAccess', _65 => _65.bounds])) {
|
|
3386
|
+
grown = new Uint8Array(w * h);
|
|
3387
|
+
const b = sel.bounds;
|
|
3388
|
+
for (let y = Math.max(0, Math.floor(b.y * scale)); y < Math.min(h, Math.ceil((b.y + b.height) * scale)); y++) {
|
|
3389
|
+
for (let x = Math.max(0, Math.floor(b.x * scale)); x < Math.min(w, Math.ceil((b.x + b.width) * scale)); x++) {
|
|
3390
|
+
if (_chunkUYXL6ZWQcjs.selectionValueAt.call(void 0, sel, Math.min(sel.width - 1, Math.floor((x + 0.5) / scale)), Math.min(sel.height - 1, Math.floor((y + 0.5) / scale))) >= 0.5) grown[y * w + x] = 1;
|
|
3391
|
+
}
|
|
3392
|
+
}
|
|
3393
|
+
}
|
|
3394
|
+
const { roi: done, label } = segmentStroke(work, seeds, grown, roi);
|
|
3395
|
+
return upscaleRegion(work, pixels, done, label, _nullishCoalesce(options.enhanceEdge, () => ( false)));
|
|
3396
|
+
}
|
|
3397
|
+
|
|
3398
|
+
// src/image-editor/selection/segment/grabcut.ts
|
|
3399
|
+
var K = 5;
|
|
3400
|
+
var ColorGmm = (_class6 = class {constructor() { _class6.prototype.__init34.call(this);_class6.prototype.__init35.call(this);_class6.prototype.__init36.call(this);_class6.prototype.__init37.call(this); }
|
|
3401
|
+
__init34() {this.logWeight = new Float64Array(K)}
|
|
3402
|
+
__init35() {this.mean = new Float64Array(K * 3)}
|
|
3403
|
+
/** Inverse covariances, row-major 3 × 3. */
|
|
3404
|
+
__init36() {this.inv = new Float64Array(K * 9)}
|
|
3405
|
+
/** ln(weight) − ½ ln((2π)³ |Σ|) per component; −∞ for an empty one. */
|
|
3406
|
+
__init37() {this.logNorm = new Float64Array(K).fill(-Infinity)}
|
|
3407
|
+
/** Fits the components to the pixels `ids` of `rgb`, each in component `comp[id]`. */
|
|
3408
|
+
fit(rgb, ids, comp) {
|
|
3409
|
+
const n = new Float64Array(K);
|
|
3410
|
+
const sum = new Float64Array(K * 3);
|
|
3411
|
+
const prod = new Float64Array(K * 9);
|
|
3412
|
+
for (let t = 0; t < ids.length; t++) {
|
|
3413
|
+
const i = ids[t];
|
|
3414
|
+
const k = comp[i];
|
|
3415
|
+
const c = [rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]];
|
|
3416
|
+
n[k]++;
|
|
3417
|
+
for (let a = 0; a < 3; a++) {
|
|
3418
|
+
sum[k * 3 + a] += c[a];
|
|
3419
|
+
for (let b = 0; b < 3; b++) prod[k * 9 + a * 3 + b] += c[a] * c[b];
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
const total = ids.length || 1;
|
|
3423
|
+
for (let k = 0; k < K; k++) {
|
|
3424
|
+
if (!n[k]) {
|
|
3425
|
+
this.logNorm[k] = -Infinity;
|
|
3426
|
+
continue;
|
|
3427
|
+
}
|
|
3428
|
+
const m = [sum[k * 3] / n[k], sum[k * 3 + 1] / n[k], sum[k * 3 + 2] / n[k]];
|
|
3429
|
+
const cov = new Float64Array(9);
|
|
3430
|
+
for (let a = 0; a < 3; a++) {
|
|
3431
|
+
for (let b = 0; b < 3; b++) cov[a * 3 + b] = prod[k * 9 + a * 3 + b] / n[k] - m[a] * m[b];
|
|
3432
|
+
cov[a * 4] += 4;
|
|
3433
|
+
}
|
|
3434
|
+
const det = cov[0] * (cov[4] * cov[8] - cov[5] * cov[7]) - cov[1] * (cov[3] * cov[8] - cov[5] * cov[6]) + cov[2] * (cov[3] * cov[7] - cov[4] * cov[6]);
|
|
3435
|
+
const d = Math.max(det, 1e-6);
|
|
3436
|
+
const inv = [
|
|
3437
|
+
(cov[4] * cov[8] - cov[5] * cov[7]) / d,
|
|
3438
|
+
(cov[2] * cov[7] - cov[1] * cov[8]) / d,
|
|
3439
|
+
(cov[1] * cov[5] - cov[2] * cov[4]) / d,
|
|
3440
|
+
(cov[5] * cov[6] - cov[3] * cov[8]) / d,
|
|
3441
|
+
(cov[0] * cov[8] - cov[2] * cov[6]) / d,
|
|
3442
|
+
(cov[2] * cov[3] - cov[0] * cov[5]) / d,
|
|
3443
|
+
(cov[3] * cov[7] - cov[4] * cov[6]) / d,
|
|
3444
|
+
(cov[1] * cov[6] - cov[0] * cov[7]) / d,
|
|
3445
|
+
(cov[0] * cov[4] - cov[1] * cov[3]) / d
|
|
3446
|
+
];
|
|
3447
|
+
this.mean.set(m, k * 3);
|
|
3448
|
+
this.inv.set(inv, k * 9);
|
|
3449
|
+
this.logWeight[k] = Math.log(n[k] / total);
|
|
3450
|
+
this.logNorm[k] = this.logWeight[k] - 0.5 * Math.log(Math.pow(2 * Math.PI, 3) * d);
|
|
3451
|
+
}
|
|
3452
|
+
}
|
|
3453
|
+
/** ln p(colour | component k), up to the shared constant. */
|
|
3454
|
+
componentLog(k, r, g, b) {
|
|
3455
|
+
const ln = this.logNorm[k];
|
|
3456
|
+
if (ln === -Infinity) return -Infinity;
|
|
3457
|
+
const dr = r - this.mean[k * 3];
|
|
3458
|
+
const dg = g - this.mean[k * 3 + 1];
|
|
3459
|
+
const db = b - this.mean[k * 3 + 2];
|
|
3460
|
+
const v = this.inv;
|
|
3461
|
+
const o = k * 9;
|
|
3462
|
+
const q = dr * (v[o] * dr + v[o + 1] * dg + v[o + 2] * db) + dg * (v[o + 3] * dr + v[o + 4] * dg + v[o + 5] * db) + db * (v[o + 6] * dr + v[o + 7] * dg + v[o + 8] * db);
|
|
3463
|
+
return ln - 0.5 * q;
|
|
3464
|
+
}
|
|
3465
|
+
/** −ln p(colour) under the mixture (large for colours the model hasn't seen). */
|
|
3466
|
+
cost(r, g, b) {
|
|
3467
|
+
let best = -Infinity;
|
|
3468
|
+
const logs = new Array(K);
|
|
3469
|
+
for (let k = 0; k < K; k++) {
|
|
3470
|
+
logs[k] = this.componentLog(k, r, g, b);
|
|
3471
|
+
if (logs[k] > best) best = logs[k];
|
|
3472
|
+
}
|
|
3473
|
+
if (best === -Infinity) return 50;
|
|
3474
|
+
let s = 0;
|
|
3475
|
+
for (let k = 0; k < K; k++) if (logs[k] > -Infinity) s += Math.exp(logs[k] - best);
|
|
3476
|
+
return Math.min(50, -(best + Math.log(s)));
|
|
3477
|
+
}
|
|
3478
|
+
/** The component most likely to have produced the colour. */
|
|
3479
|
+
nearest(r, g, b) {
|
|
3480
|
+
let best = 0;
|
|
3481
|
+
let bestLog = -Infinity;
|
|
3482
|
+
for (let k = 0; k < K; k++) {
|
|
3483
|
+
const l = this.componentLog(k, r, g, b);
|
|
3484
|
+
if (l > bestLog) {
|
|
3485
|
+
bestLog = l;
|
|
3486
|
+
best = k;
|
|
3487
|
+
}
|
|
3488
|
+
}
|
|
3489
|
+
return best;
|
|
3490
|
+
}
|
|
3491
|
+
}, _class6);
|
|
3492
|
+
function initialComponents(rgb, ids, comp) {
|
|
3493
|
+
if (!ids.length) return;
|
|
3494
|
+
const step = Math.max(1, Math.floor(ids.length / 6e3));
|
|
3495
|
+
const sample = [];
|
|
3496
|
+
for (let t = 0; t < ids.length; t += step) sample.push(ids[t]);
|
|
3497
|
+
const centres = [];
|
|
3498
|
+
const dist2 = (i, c) => (rgb[i * 3] - c[0]) ** 2 + (rgb[i * 3 + 1] - c[1]) ** 2 + (rgb[i * 3 + 2] - c[2]) ** 2;
|
|
3499
|
+
centres.push([rgb[sample[0] * 3], rgb[sample[0] * 3 + 1], rgb[sample[0] * 3 + 2]]);
|
|
3500
|
+
const near = sample.map((i) => dist2(i, centres[0]));
|
|
3501
|
+
while (centres.length < K) {
|
|
3502
|
+
let far = 0;
|
|
3503
|
+
for (let t = 1; t < sample.length; t++) if (near[t] > near[far]) far = t;
|
|
3504
|
+
const i = sample[far];
|
|
3505
|
+
const c = [rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]];
|
|
3506
|
+
centres.push(c);
|
|
3507
|
+
for (let t = 0; t < sample.length; t++) near[t] = Math.min(near[t], dist2(sample[t], c));
|
|
3508
|
+
}
|
|
3509
|
+
const closest = (i) => {
|
|
3510
|
+
let best = 0;
|
|
3511
|
+
for (let k = 1; k < K; k++) if (dist2(i, centres[k]) < dist2(i, centres[best])) best = k;
|
|
3512
|
+
return best;
|
|
3513
|
+
};
|
|
3514
|
+
for (let round6 = 0; round6 < 6; round6++) {
|
|
3515
|
+
const sum = Array.from({ length: K }, () => [0, 0, 0, 0]);
|
|
3516
|
+
for (const i of sample) {
|
|
3517
|
+
const s = sum[closest(i)];
|
|
3518
|
+
s[0] += rgb[i * 3];
|
|
3519
|
+
s[1] += rgb[i * 3 + 1];
|
|
3520
|
+
s[2] += rgb[i * 3 + 2];
|
|
3521
|
+
s[3]++;
|
|
3522
|
+
}
|
|
3523
|
+
for (let k = 0; k < K; k++) if (sum[k][3]) centres[k] = [sum[k][0] / sum[k][3], sum[k][1] / sum[k][3], sum[k][2] / sum[k][3]];
|
|
3524
|
+
}
|
|
3525
|
+
for (const i of ids) comp[i] = closest(i);
|
|
3526
|
+
}
|
|
3527
|
+
function grabCutLabels(work, setup, iterations) {
|
|
3528
|
+
const { width: w, rgb } = work;
|
|
3529
|
+
const { roi, hardBg, hardFg } = setup;
|
|
3530
|
+
const { x: rx, y: ry, width: rw, height: rh } = roi;
|
|
3531
|
+
const n = rw * rh;
|
|
3532
|
+
const label = setup.initial.slice();
|
|
3533
|
+
const global = new Int32Array(n);
|
|
3534
|
+
for (let y = 0; y < rh; y++) for (let x = 0; x < rw; x++) global[y * rw + x] = (ry + y) * w + rx + x;
|
|
3535
|
+
const comp = new Uint8Array(w * work.height);
|
|
3536
|
+
const fg = new ColorGmm();
|
|
3537
|
+
const bg = new ColorGmm();
|
|
3538
|
+
const { right, down } = smoothnessWeights(work, roi);
|
|
3539
|
+
const HARD = 1e9;
|
|
3540
|
+
for (let iter = 0; iter < iterations; iter++) {
|
|
3541
|
+
const fgIds = [];
|
|
3542
|
+
const bgIds = [];
|
|
3543
|
+
for (let p = 0; p < n; p++) (label[p] ? fgIds : bgIds).push(global[p]);
|
|
3544
|
+
if (!fgIds.length) return label;
|
|
3545
|
+
if (iter === 0) {
|
|
3546
|
+
initialComponents(rgb, fgIds, comp);
|
|
3547
|
+
initialComponents(rgb, bgIds, comp);
|
|
3548
|
+
} else {
|
|
3549
|
+
for (const i of fgIds) comp[i] = fg.nearest(rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]);
|
|
3550
|
+
for (const i of bgIds) comp[i] = bg.nearest(rgb[i * 3], rgb[i * 3 + 1], rgb[i * 3 + 2]);
|
|
3551
|
+
}
|
|
3552
|
+
fg.fit(rgb, fgIds, comp);
|
|
3553
|
+
bg.fit(rgb, bgIds, comp);
|
|
3554
|
+
const graph = new GridGraph(rw, rh);
|
|
3555
|
+
for (let p = 0; p < n; p++) {
|
|
3556
|
+
if (hardBg[p]) graph.addTerminal(p, 0, HARD);
|
|
3557
|
+
else if (_optionalChain([hardFg, 'optionalAccess', _66 => _66[p]])) graph.addTerminal(p, HARD, 0);
|
|
3558
|
+
else {
|
|
3559
|
+
const i = global[p] * 3;
|
|
3560
|
+
graph.addTerminal(p, Math.round(bg.cost(rgb[i], rgb[i + 1], rgb[i + 2]) * UNITS), Math.round(fg.cost(rgb[i], rgb[i + 1], rgb[i + 2]) * UNITS));
|
|
3561
|
+
}
|
|
3562
|
+
if (p % rw + 1 < rw) graph.setEdge(p, 0, right[p]);
|
|
3563
|
+
if (p + rw < n) graph.setEdge(p, 1, down[p]);
|
|
3564
|
+
}
|
|
3565
|
+
graph.maxflow();
|
|
3566
|
+
let changed = 0;
|
|
3567
|
+
for (let p = 0; p < n; p++) {
|
|
3568
|
+
const v = graph.inSource(p) ? 1 : 0;
|
|
3569
|
+
if (v !== label[p]) changed++;
|
|
3570
|
+
label[p] = v;
|
|
3571
|
+
}
|
|
3572
|
+
if (changed <= n * 1e-3) break;
|
|
3573
|
+
}
|
|
3574
|
+
return label;
|
|
3575
|
+
}
|
|
3576
|
+
function keepMainPieces(label, rw, rh, seed) {
|
|
3577
|
+
const n = rw * rh;
|
|
3578
|
+
const piece = new Int32Array(n).fill(-1);
|
|
3579
|
+
const sizes = [];
|
|
3580
|
+
const stack = [];
|
|
3581
|
+
for (let s = 0; s < n; s++) {
|
|
3582
|
+
if (!label[s] || piece[s] >= 0) continue;
|
|
3583
|
+
const id = sizes.length;
|
|
3584
|
+
let size = 0;
|
|
3585
|
+
piece[s] = id;
|
|
3586
|
+
stack.push(s);
|
|
3587
|
+
while (stack.length) {
|
|
3588
|
+
const p = stack.pop();
|
|
3589
|
+
size++;
|
|
3590
|
+
const x = p % rw;
|
|
3591
|
+
for (const q of [x + 1 < rw ? p + 1 : -1, x > 0 ? p - 1 : -1, p + rw < n ? p + rw : -1, p - rw]) {
|
|
3592
|
+
if (q >= 0 && label[q] && piece[q] < 0) {
|
|
3593
|
+
piece[q] = id;
|
|
3594
|
+
stack.push(q);
|
|
3595
|
+
}
|
|
3596
|
+
}
|
|
3597
|
+
}
|
|
3598
|
+
sizes.push(size);
|
|
3599
|
+
}
|
|
3600
|
+
if (!sizes.length) return;
|
|
3601
|
+
const largest = Math.max(...sizes);
|
|
3602
|
+
const keep = (id) => seed !== null && piece[seed] >= 0 ? id === piece[seed] : sizes[id] * 5 >= largest;
|
|
3603
|
+
for (let p = 0; p < n; p++) if (label[p] && !keep(piece[p])) label[p] = 0;
|
|
3604
|
+
}
|
|
3605
|
+
function selectObjectIn(pixels, target, options = {}) {
|
|
3606
|
+
const work = workImage(pixels);
|
|
3607
|
+
const { width: w, height: h, scale } = work;
|
|
3608
|
+
const iterations = Math.max(1, Math.round(_nullishCoalesce(options.iterations, () => ( 5))));
|
|
3609
|
+
const enhance = _nullishCoalesce(options.enhanceEdge, () => ( false));
|
|
3610
|
+
if ("rect" in target) {
|
|
3611
|
+
const r = target.rect;
|
|
3612
|
+
const bx0 = Math.max(0, Math.floor(r.x * scale));
|
|
3613
|
+
const by0 = Math.max(0, Math.floor(r.y * scale));
|
|
3614
|
+
const bx1 = Math.min(w, Math.ceil((r.x + r.width) * scale));
|
|
3615
|
+
const by1 = Math.min(h, Math.ceil((r.y + r.height) * scale));
|
|
3616
|
+
if (bx1 - bx0 < 2 || by1 - by0 < 2) return _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, pixels.width, pixels.height);
|
|
3617
|
+
const m = Math.max(8, Math.round(0.25 * Math.max(bx1 - bx0, by1 - by0)));
|
|
3618
|
+
const rx = Math.max(0, bx0 - m);
|
|
3619
|
+
const ry = Math.max(0, by0 - m);
|
|
3620
|
+
const roi = { x: rx, y: ry, width: Math.min(w, bx1 + m) - rx, height: Math.min(h, by1 + m) - ry };
|
|
3621
|
+
const n = roi.width * roi.height;
|
|
3622
|
+
const initial = new Uint8Array(n);
|
|
3623
|
+
const hardBg = new Uint8Array(n);
|
|
3624
|
+
for (let y = 0; y < roi.height; y++) {
|
|
3625
|
+
for (let x = 0; x < roi.width; x++) {
|
|
3626
|
+
const gx = rx + x;
|
|
3627
|
+
const gy = ry + y;
|
|
3628
|
+
const inside = gx >= bx0 && gx < bx1 && gy >= by0 && gy < by1;
|
|
3629
|
+
initial[y * roi.width + x] = inside ? 1 : 0;
|
|
3630
|
+
hardBg[y * roi.width + x] = inside ? 0 : 1;
|
|
3631
|
+
}
|
|
3632
|
+
}
|
|
3633
|
+
const label = grabCutLabels(work, { roi, initial, hardBg, hardFg: null }, iterations);
|
|
3634
|
+
keepMainPieces(label, roi.width, roi.height, null);
|
|
3635
|
+
return upscaleRegion(work, pixels, roi, label, enhance);
|
|
3636
|
+
}
|
|
3637
|
+
const px2 = Math.min(w - 1, Math.max(0, Math.floor(target.point.x * scale)));
|
|
3638
|
+
const py = Math.min(h - 1, Math.max(0, Math.floor(target.point.y * scale)));
|
|
3639
|
+
let half = Math.max(24, Math.round(0.3 * Math.max(w, h)));
|
|
3640
|
+
for (; ; ) {
|
|
3641
|
+
const rx = Math.max(0, px2 - half);
|
|
3642
|
+
const ry = Math.max(0, py - half);
|
|
3643
|
+
const roi = { x: rx, y: ry, width: Math.min(w, px2 + half + 1) - rx, height: Math.min(h, py + half + 1) - ry };
|
|
3644
|
+
const whole = roi.width === w && roi.height === h;
|
|
3645
|
+
const band = Math.max(4, Math.round(0.15 * half));
|
|
3646
|
+
const n = roi.width * roi.height;
|
|
3647
|
+
const initial = new Uint8Array(n);
|
|
3648
|
+
const hardBg = new Uint8Array(n);
|
|
3649
|
+
const hardFg = new Uint8Array(n);
|
|
3650
|
+
const inBand = (x, y) => rx > 0 && x < band || ry > 0 && y < band || rx + roi.width < w && x >= roi.width - band || ry + roi.height < h && y >= roi.height - band;
|
|
3651
|
+
for (let y = 0; y < roi.height; y++) {
|
|
3652
|
+
for (let x = 0; x < roi.width; x++) {
|
|
3653
|
+
const p = y * roi.width + x;
|
|
3654
|
+
if (inBand(x, y)) hardBg[p] = 1;
|
|
3655
|
+
else initial[p] = 1;
|
|
3656
|
+
if (Math.hypot(rx + x - px2, ry + y - py) <= 1.5) hardFg[p] = 1;
|
|
3657
|
+
}
|
|
3658
|
+
}
|
|
3659
|
+
const label = grabCutLabels(work, { roi, initial, hardBg, hardFg }, iterations);
|
|
3660
|
+
keepMainPieces(label, roi.width, roi.height, (py - ry) * roi.width + (px2 - rx));
|
|
3661
|
+
let touches = false;
|
|
3662
|
+
for (let y = 0; y < roi.height && !touches; y++) {
|
|
3663
|
+
for (let x = 0; x < roi.width; x++) {
|
|
3664
|
+
if (label[y * roi.width + x] && (inBand(x - 1, y) || inBand(x + 1, y) || inBand(x, y - 1) || inBand(x, y + 1))) {
|
|
3665
|
+
touches = true;
|
|
3666
|
+
break;
|
|
3667
|
+
}
|
|
3668
|
+
}
|
|
3669
|
+
}
|
|
3670
|
+
if (!touches || whole) return upscaleRegion(work, pixels, roi, label, enhance);
|
|
3671
|
+
half = Math.round(half * 1.6);
|
|
3672
|
+
}
|
|
3673
|
+
}
|
|
3674
|
+
|
|
2806
3675
|
// src/image-editor/layers/shape-type-ui.ts
|
|
2807
3676
|
var DEFAULT_SHAPE_TOOL_OPTIONS = {
|
|
2808
3677
|
kind: "rect",
|
|
@@ -2861,16 +3730,16 @@ function liveShapeForDrag(o, a, b, mods = {}) {
|
|
|
2861
3730
|
}
|
|
2862
3731
|
return null;
|
|
2863
3732
|
}
|
|
2864
|
-
var ShapeDrawGesture = (
|
|
2865
|
-
constructor(controller, options) {;
|
|
3733
|
+
var ShapeDrawGesture = (_class7 = class {
|
|
3734
|
+
constructor(controller, options) {;_class7.prototype.__init38.call(this);_class7.prototype.__init39.call(this);_class7.prototype.__init40.call(this);
|
|
2866
3735
|
this.controller = controller;
|
|
2867
3736
|
this.options = options;
|
|
2868
3737
|
}
|
|
2869
3738
|
|
|
2870
3739
|
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
3740
|
+
__init38() {this.start = null}
|
|
3741
|
+
__init39() {this.layerId = null}
|
|
3742
|
+
__init40() {this.error = null}
|
|
2874
3743
|
get active() {
|
|
2875
3744
|
return this.start !== null;
|
|
2876
3745
|
}
|
|
@@ -2909,17 +3778,17 @@ var ShapeDrawGesture = (_class6 = class {
|
|
|
2909
3778
|
cancel() {
|
|
2910
3779
|
this.start = null;
|
|
2911
3780
|
}
|
|
2912
|
-
},
|
|
3781
|
+
}, _class7);
|
|
2913
3782
|
function applyShapeOptions(controller, layerId, change) {
|
|
2914
3783
|
const info = controller.getShapeLayer(layerId);
|
|
2915
3784
|
const style = {};
|
|
2916
3785
|
if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
|
|
2917
3786
|
if ("stroke" in change || "strokeWidth" in change) {
|
|
2918
|
-
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access',
|
|
2919
|
-
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access',
|
|
3787
|
+
const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _67 => _67.stroke, 'optionalAccess', _68 => _68.paint, 'access', _69 => _69.type]) === "color" ? info.stroke.paint.color : null;
|
|
3788
|
+
style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _70 => _70.stroke, 'optionalAccess', _71 => _71.width]))), () => ( 2)), paint: color } : null;
|
|
2920
3789
|
}
|
|
2921
3790
|
if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
|
|
2922
|
-
const live = _optionalChain([info, 'access',
|
|
3791
|
+
const live = _optionalChain([info, 'access', _72 => _72.components, 'access', _73 => _73[0], 'optionalAccess', _74 => _74.live]);
|
|
2923
3792
|
if (!live) return;
|
|
2924
3793
|
const shape = {};
|
|
2925
3794
|
if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
|
|
@@ -2930,8 +3799,8 @@ function applyShapeOptions(controller, layerId, change) {
|
|
|
2930
3799
|
if (live.kind === "line" && change.arrow !== void 0) shape.endArrow = change.arrow ? { width: (live.weight || 1) * 4, length: (live.weight || 1) * 4 } : null;
|
|
2931
3800
|
if (Object.keys(shape).length) controller.setShapeComponent(layerId, 0, { shape });
|
|
2932
3801
|
}
|
|
2933
|
-
var TextEditSession = (
|
|
2934
|
-
constructor(controller, layerId, index) {;
|
|
3802
|
+
var TextEditSession = (_class8 = class {
|
|
3803
|
+
constructor(controller, layerId, index) {;_class8.prototype.__init41.call(this);_class8.prototype.__init42.call(this);_class8.prototype.__init43.call(this);
|
|
2935
3804
|
this.controller = controller;
|
|
2936
3805
|
this.layerId = layerId;
|
|
2937
3806
|
const n = this.text.length;
|
|
@@ -2941,11 +3810,11 @@ var TextEditSession = (_class7 = class {
|
|
|
2941
3810
|
|
|
2942
3811
|
|
|
2943
3812
|
|
|
2944
|
-
|
|
2945
|
-
|
|
2946
|
-
|
|
3813
|
+
__init41() {this.changed = false}
|
|
3814
|
+
__init42() {this.listeners = /* @__PURE__ */ new Set()}
|
|
3815
|
+
__init43() {this.error = null}
|
|
2947
3816
|
get layer() {
|
|
2948
|
-
const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3817
|
+
const l = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _75 => _75.layer]);
|
|
2949
3818
|
if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
|
|
2950
3819
|
return l;
|
|
2951
3820
|
}
|
|
@@ -2960,7 +3829,7 @@ var TextEditSession = (_class7 = class {
|
|
|
2960
3829
|
}
|
|
2961
3830
|
/** Whether the layer still exists (it can be deleted or undone away while editing). */
|
|
2962
3831
|
get alive() {
|
|
2963
|
-
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess',
|
|
3832
|
+
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _76 => _76.layer, 'access', _77 => _77.type]) === "type";
|
|
2964
3833
|
}
|
|
2965
3834
|
subscribe(fn) {
|
|
2966
3835
|
this.listeners.add(fn);
|
|
@@ -3158,7 +4027,7 @@ var TextEditSession = (_class7 = class {
|
|
|
3158
4027
|
}
|
|
3159
4028
|
return true;
|
|
3160
4029
|
}
|
|
3161
|
-
},
|
|
4030
|
+
}, _class8);
|
|
3162
4031
|
function typeLayerAt(controller, p, slop = 4) {
|
|
3163
4032
|
const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
|
|
3164
4033
|
for (const l of layers) {
|
|
@@ -3191,16 +4060,16 @@ function invert(m) {
|
|
|
3191
4060
|
const det = a * d - b * c || 1;
|
|
3192
4061
|
return [d / det, -b / det, -c / det, a / det, (c * f - d * e) / det, (b * e - a * f) / det];
|
|
3193
4062
|
}
|
|
3194
|
-
var TypeToolGesture = (
|
|
3195
|
-
constructor(controller, options) {;
|
|
4063
|
+
var TypeToolGesture = (_class9 = class {
|
|
4064
|
+
constructor(controller, options) {;_class9.prototype.__init44.call(this);_class9.prototype.__init45.call(this);_class9.prototype.__init46.call(this);
|
|
3196
4065
|
this.controller = controller;
|
|
3197
4066
|
this.options = options;
|
|
3198
4067
|
}
|
|
3199
4068
|
|
|
3200
4069
|
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
4070
|
+
__init44() {this.session = null}
|
|
4071
|
+
__init45() {this.dragStart = null}
|
|
4072
|
+
__init46() {this.error = null}
|
|
3204
4073
|
down(p, mods = {}) {
|
|
3205
4074
|
this.error = null;
|
|
3206
4075
|
const hit = typeLayerAt(this.controller, p);
|
|
@@ -3248,9 +4117,9 @@ var TypeToolGesture = (_class8 = class {
|
|
|
3248
4117
|
finish() {
|
|
3249
4118
|
const s = this.session;
|
|
3250
4119
|
this.session = null;
|
|
3251
|
-
_optionalChain([s, 'optionalAccess',
|
|
4120
|
+
_optionalChain([s, 'optionalAccess', _78 => _78.close, 'call', _79 => _79()]);
|
|
3252
4121
|
}
|
|
3253
|
-
},
|
|
4122
|
+
}, _class9);
|
|
3254
4123
|
|
|
3255
4124
|
// src/image-editor/selection/shapes.ts
|
|
3256
4125
|
function polygonCoverage(points, width, height, antiAlias = true) {
|
|
@@ -3717,7 +4586,7 @@ function segmentToSelection(width, height, result) {
|
|
|
3717
4586
|
const sized = raw.width === width && raw.height === height ? raw : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, raw, width, height);
|
|
3718
4587
|
out = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, out, sized, "add");
|
|
3719
4588
|
}
|
|
3720
|
-
return _optionalChain([out, 'optionalAccess',
|
|
4589
|
+
return _optionalChain([out, 'optionalAccess', _80 => _80.bounds]) ? out : null;
|
|
3721
4590
|
}
|
|
3722
4591
|
function segmentsToSelection(width, height, results) {
|
|
3723
4592
|
let out = null;
|
|
@@ -3998,7 +4867,7 @@ function deserializeChannels(value, size, problems = []) {
|
|
|
3998
4867
|
visible: v.visible === true
|
|
3999
4868
|
});
|
|
4000
4869
|
} catch (err) {
|
|
4001
|
-
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess',
|
|
4870
|
+
problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _81 => _81.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
|
|
4002
4871
|
}
|
|
4003
4872
|
}
|
|
4004
4873
|
return out;
|
|
@@ -4036,16 +4905,16 @@ function checkEffectTime(time) {
|
|
|
4036
4905
|
return time;
|
|
4037
4906
|
}
|
|
4038
4907
|
function checkEffectAnimation(animate) {
|
|
4039
|
-
const duration = _optionalChain([animate, 'optionalAccess',
|
|
4908
|
+
const duration = _optionalChain([animate, 'optionalAccess', _82 => _82.duration]);
|
|
4040
4909
|
if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS)) {
|
|
4041
4910
|
throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
|
|
4042
4911
|
}
|
|
4043
4912
|
return { duration: Math.round(duration) };
|
|
4044
4913
|
}
|
|
4045
4914
|
function effectLayerTiming(g, d) {
|
|
4046
|
-
if (!_optionalChain([d, 'optionalAccess',
|
|
4915
|
+
if (!_optionalChain([d, 'optionalAccess', _83 => _83.duration])) return null;
|
|
4047
4916
|
const time = _nullishCoalesce(g.time, () => ( 0));
|
|
4048
|
-
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access',
|
|
4917
|
+
return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _84 => _84.animate, 'optionalAccess', _85 => _85.duration]), () => ( d.duration)), loops: d.loop };
|
|
4049
4918
|
}
|
|
4050
4919
|
|
|
4051
4920
|
// src/image-editor/effects.ts
|
|
@@ -4090,18 +4959,18 @@ function effectPixelsToSurface(p, depth) {
|
|
|
4090
4959
|
}
|
|
4091
4960
|
return _chunkCWM3CUUXcjs.surfaceFromDeepPixels.call(void 0, { width: p.width, height: p.height, data: d }, 4);
|
|
4092
4961
|
}
|
|
4093
|
-
var ImageEffectsEngine = (
|
|
4962
|
+
var ImageEffectsEngine = (_class10 = class {
|
|
4094
4963
|
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4964
|
+
__init47() {this.cache = /* @__PURE__ */ new Map()}
|
|
4965
|
+
__init48() {this.pending = /* @__PURE__ */ new Map()}
|
|
4966
|
+
__init49() {this.failures = /* @__PURE__ */ new Map()}
|
|
4098
4967
|
|
|
4099
|
-
|
|
4100
|
-
|
|
4968
|
+
__init50() {this.descriptions = /* @__PURE__ */ new Map()}
|
|
4969
|
+
__init51() {this.listeners = /* @__PURE__ */ new Set()}
|
|
4101
4970
|
|
|
4102
|
-
|
|
4971
|
+
__init52() {this.generation = 0}
|
|
4103
4972
|
|
|
4104
|
-
constructor(options = {}) {;
|
|
4973
|
+
constructor(options = {}) {;_class10.prototype.__init47.call(this);_class10.prototype.__init48.call(this);_class10.prototype.__init49.call(this);_class10.prototype.__init50.call(this);_class10.prototype.__init51.call(this);_class10.prototype.__init52.call(this);
|
|
4105
4974
|
this.slot = _nullishCoalesce(options.slot, () => ( new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()));
|
|
4106
4975
|
this.maxEntries = _nullishCoalesce(options.maxEntries, () => ( 24));
|
|
4107
4976
|
this.pool = new (0, _chunkPY4GWSE2cjs.EffectRendererPool)({ maxRenderers: options.maxRenderers });
|
|
@@ -4210,7 +5079,7 @@ var ImageEffectsEngine = (_class9 = class {
|
|
|
4210
5079
|
this.detach();
|
|
4211
5080
|
this.listeners.clear();
|
|
4212
5081
|
}
|
|
4213
|
-
},
|
|
5082
|
+
}, _class10);
|
|
4214
5083
|
|
|
4215
5084
|
// src/image-editor/free-transform.ts
|
|
4216
5085
|
var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
|
|
@@ -4292,20 +5161,20 @@ function liftMask(mask, sel, o) {
|
|
|
4292
5161
|
}
|
|
4293
5162
|
return { lifted: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: area.width, height: area.height, data: lifted }, 4, area.x, area.y), rest: _chunkCWM3CUUXcjs.writeRegion.call(void 0, mask, area, rest) };
|
|
4294
5163
|
}
|
|
4295
|
-
var FreeTransformSession = (
|
|
4296
|
-
constructor(host, init = {}) {;
|
|
5164
|
+
var FreeTransformSession = (_class11 = class {
|
|
5165
|
+
constructor(host, init = {}) {;_class11.prototype.__init53.call(this);_class11.prototype.__init54.call(this);_class11.prototype.__init55.call(this);_class11.prototype.__init56.call(this);_class11.prototype.__init57.call(this);_class11.prototype.__init58.call(this);_class11.prototype.__init59.call(this);_class11.prototype.__init60.call(this);_class11.prototype.__init61.call(this);_class11.prototype.__init62.call(this);_class11.prototype.__init63.call(this);
|
|
4297
5166
|
this.host = host;
|
|
4298
5167
|
if (init.interpolation !== void 0 && !_chunkHGTDMKNEcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
|
|
4299
5168
|
this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
|
|
4300
5169
|
const sel = host.selection();
|
|
4301
|
-
const selected = Boolean(_optionalChain([sel, 'optionalAccess',
|
|
5170
|
+
const selected = Boolean(_optionalChain([sel, 'optionalAccess', _86 => _86.bounds]));
|
|
4302
5171
|
let content = _nullishCoalesce(init.content, () => ( "auto"));
|
|
4303
5172
|
if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
|
|
4304
5173
|
fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
|
|
4305
5174
|
}
|
|
4306
5175
|
const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
|
|
4307
|
-
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess',
|
|
4308
|
-
const smartTarget = (_optionalChain([target, 'optionalAccess',
|
|
5176
|
+
const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _87 => _87.layer]) : void 0;
|
|
5177
|
+
const smartTarget = (_optionalChain([target, 'optionalAccess', _88 => _88.type]) === "smart" || _optionalChain([target, 'optionalAccess', _89 => _89.type]) === "shape" || _optionalChain([target, 'optionalAccess', _90 => _90.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
|
|
4309
5178
|
if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
|
|
4310
5179
|
this.content = content;
|
|
4311
5180
|
if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
|
|
@@ -4329,9 +5198,9 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4329
5198
|
const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
|
|
4330
5199
|
const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
|
|
4331
5200
|
if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
|
|
4332
|
-
const linked = _optionalChain([mask, 'optionalAccess',
|
|
5201
|
+
const linked = _optionalChain([mask, 'optionalAccess', _91 => _91.linked]) !== false;
|
|
4333
5202
|
const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
|
|
4334
|
-
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access',
|
|
5203
|
+
if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _92 => _92.mask, 'optionalAccess', _93 => _93.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.`);
|
|
4335
5204
|
if (!maskAlone && layer.type !== "pixel" && layer.type !== "smart" && layer.type !== "shape" && layer.type !== "type") fail(`Layer "${layer.name || id}" is a ${layer.type} layer; Free Transform works on pixel, shape, type and smart object layers, layer masks (channel mask) and selections.`);
|
|
4336
5205
|
if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
|
|
4337
5206
|
if (content !== "selection-copy") {
|
|
@@ -4434,7 +5303,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4434
5303
|
};
|
|
4435
5304
|
this.copyId = copy.id;
|
|
4436
5305
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, layer.id);
|
|
4437
|
-
this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
5306
|
+
this.startLayers = _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _94 => _94.parent, 'optionalAccess', _95 => _95.id]), () => ( null)), loc.index + 1);
|
|
4438
5307
|
this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
|
|
4439
5308
|
moves.push("pixels");
|
|
4440
5309
|
}
|
|
@@ -4460,7 +5329,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4460
5329
|
/** The layer being transformed (`null` for `selection-outline`). */
|
|
4461
5330
|
|
|
4462
5331
|
/** The new layer of a `selection-copy`. */
|
|
4463
|
-
|
|
5332
|
+
__init53() {this.copyId = null}
|
|
4464
5333
|
/** The frame (document pixels). */
|
|
4465
5334
|
|
|
4466
5335
|
/** What moves. */
|
|
@@ -4472,27 +5341,27 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4472
5341
|
*/
|
|
4473
5342
|
|
|
4474
5343
|
/** True when the layer is a smart object (the transform sets its placement). */
|
|
4475
|
-
|
|
5344
|
+
__init54() {this.smartObject = false}
|
|
4476
5345
|
/** True when the layer is a shape layer (the transform maps its paths and renders them again). */
|
|
4477
|
-
|
|
4478
|
-
|
|
5346
|
+
__init55() {this.shapeLayer = false}
|
|
5347
|
+
__init56() {this.shape = null}
|
|
4479
5348
|
/** True when the layer is a type layer (the transform sets its text matrix; affine only). */
|
|
4480
|
-
|
|
4481
|
-
|
|
5349
|
+
__init57() {this.typeLayer = false}
|
|
5350
|
+
__init58() {this.typeTarget = null}
|
|
4482
5351
|
|
|
4483
|
-
|
|
4484
|
-
|
|
5352
|
+
__init59() {this.smart = null}
|
|
5353
|
+
__init60() {this.smartReduced = /* @__PURE__ */ new Map()}
|
|
4485
5354
|
|
|
4486
|
-
|
|
5355
|
+
__init61() {this.smartMasksMoved = false}
|
|
4487
5356
|
|
|
4488
|
-
|
|
5357
|
+
__init62() {this.parts = []}
|
|
4489
5358
|
|
|
4490
5359
|
|
|
4491
5360
|
|
|
4492
5361
|
|
|
4493
5362
|
/** The stack this session last showed: anything else means the document changed under it. */
|
|
4494
5363
|
|
|
4495
|
-
|
|
5364
|
+
__init63() {this.closed = false}
|
|
4496
5365
|
/** The current geometry. */
|
|
4497
5366
|
get geometry() {
|
|
4498
5367
|
return this.geometryValue;
|
|
@@ -4543,7 +5412,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4543
5412
|
moveVectorMask(layers) {
|
|
4544
5413
|
const g = this.geometryValue;
|
|
4545
5414
|
if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkUYXL6ZWQcjs.isIdentityTransform.call(void 0, g)) return layers;
|
|
4546
|
-
const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess',
|
|
5415
|
+
const vm = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _96 => _96.layer, 'access', _97 => _97.vectorMask]);
|
|
4547
5416
|
if (!vm || vm.linked === false) return layers;
|
|
4548
5417
|
const warp = _chunkUYXL6ZWQcjs.hasWarp.call(void 0, g);
|
|
4549
5418
|
const f = warp ? _chunkUYXL6ZWQcjs.transformMap.call(void 0, g) : null;
|
|
@@ -4714,11 +5583,11 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4714
5583
|
result(changed, layers, selection) {
|
|
4715
5584
|
let bounds = null;
|
|
4716
5585
|
const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
|
|
4717
|
-
const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess',
|
|
4718
|
-
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess',
|
|
4719
|
-
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess',
|
|
4720
|
-
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess',
|
|
4721
|
-
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess',
|
|
5586
|
+
const layer = id ? _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _98 => _98.layer]) : void 0;
|
|
5587
|
+
if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _99 => _99.type]) === "pixel") bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
|
|
5588
|
+
else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _100 => _100.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "type")) bounds = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
|
|
5589
|
+
else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _103 => _103.mask])) bounds = toDoc(_chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
|
|
5590
|
+
else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _104 => _104.bounds]) ? { ...selection.bounds } : null;
|
|
4722
5591
|
return {
|
|
4723
5592
|
layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
|
|
4724
5593
|
content: this.content,
|
|
@@ -4729,7 +5598,7 @@ var FreeTransformSession = (_class10 = class {
|
|
|
4729
5598
|
changed
|
|
4730
5599
|
};
|
|
4731
5600
|
}
|
|
4732
|
-
},
|
|
5601
|
+
}, _class11);
|
|
4733
5602
|
|
|
4734
5603
|
// src/image-editor/color-management.ts
|
|
4735
5604
|
var DEFAULT_PROOF = { intent: "relative", bpc: true, simulatePaper: false, gamutWarning: false };
|
|
@@ -4747,7 +5616,7 @@ function deserializeColorMode(raw, problems) {
|
|
|
4747
5616
|
}
|
|
4748
5617
|
function effectiveProof(proof, mode) {
|
|
4749
5618
|
if (proof) return proof;
|
|
4750
|
-
if (_optionalChain([mode, 'optionalAccess',
|
|
5619
|
+
if (_optionalChain([mode, 'optionalAccess', _105 => _105.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
|
|
4751
5620
|
return null;
|
|
4752
5621
|
}
|
|
4753
5622
|
function colorModePlanes(doc, mode) {
|
|
@@ -4802,7 +5671,7 @@ function resolveProfile(doc) {
|
|
|
4802
5671
|
return p;
|
|
4803
5672
|
}
|
|
4804
5673
|
function profileBytes(doc) {
|
|
4805
|
-
if (_optionalChain([doc, 'optionalAccess',
|
|
5674
|
+
if (_optionalChain([doc, 'optionalAccess', _106 => _106.icc])) return doc.icc;
|
|
4806
5675
|
const p = resolveProfile(doc);
|
|
4807
5676
|
return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
|
|
4808
5677
|
}
|
|
@@ -4964,7 +5833,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
|
|
|
4964
5833
|
else tiles.delete(key);
|
|
4965
5834
|
continue;
|
|
4966
5835
|
}
|
|
4967
|
-
const src = _nullishCoalesce(_optionalChain([base, 'access',
|
|
5836
|
+
const src = _nullishCoalesce(_optionalChain([base, 'access', _107 => _107.tiles, 'access', _108 => _108.get, 'call', _109 => _109(key), 'optionalAccess', _110 => _110.data]), () => ( defaultTile(base)));
|
|
4968
5837
|
const data = _chunkEBDCRTZIcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
|
|
4969
5838
|
const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
|
|
4970
5839
|
if (tile) tiles.set(key, tile);
|
|
@@ -4978,8 +5847,8 @@ function defaultTile(s) {
|
|
|
4978
5847
|
if (s.defaultValue) d.fill(s.defaultValue);
|
|
4979
5848
|
return d;
|
|
4980
5849
|
}
|
|
4981
|
-
var PaintStrokeSession = (
|
|
4982
|
-
constructor(controller, target, stroke, apply, depth = null) {;
|
|
5850
|
+
var PaintStrokeSession = (_class12 = class {
|
|
5851
|
+
constructor(controller, target, stroke, apply, depth = null) {;_class12.prototype.__init64.call(this);_class12.prototype.__init65.call(this);_class12.prototype.__init66.call(this);_class12.prototype.__init67.call(this);_class12.prototype.__init68.call(this);_class12.prototype.__init69.call(this);_class12.prototype.__init70.call(this);_class12.prototype.__init71.call(this);_class12.prototype.__init72.call(this);_class12.prototype.__init73.call(this);_class12.prototype.__init74.call(this);
|
|
4983
5852
|
this.controller = controller;
|
|
4984
5853
|
this.target = target;
|
|
4985
5854
|
this.apply = apply;
|
|
@@ -5016,28 +5885,28 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5016
5885
|
|
|
5017
5886
|
|
|
5018
5887
|
|
|
5019
|
-
|
|
5888
|
+
__init64() {this.touched = /* @__PURE__ */ new Set()}
|
|
5020
5889
|
|
|
5021
5890
|
|
|
5022
|
-
|
|
5023
|
-
|
|
5891
|
+
__init65() {this.mixerInit = null}
|
|
5892
|
+
__init66() {this.retouch = null}
|
|
5024
5893
|
/** Writes a mask's RGBA view back (sequential retouching on a mask). */
|
|
5025
|
-
|
|
5026
|
-
|
|
5894
|
+
__init67() {this.flushView = null}
|
|
5895
|
+
__init68() {this.started = false}
|
|
5027
5896
|
/** Mixer tiles written since the last update: they get new tile objects so the compositor sees them change. */
|
|
5028
|
-
|
|
5029
|
-
|
|
5030
|
-
|
|
5897
|
+
__init69() {this.fresh = /* @__PURE__ */ new Set()}
|
|
5898
|
+
__init70() {this.last = null}
|
|
5899
|
+
__init71() {this.closed = false}
|
|
5031
5900
|
/** Brush and eraser strokes on a 16- or 32-bit document: the deep samples of each touched tile. */
|
|
5032
5901
|
|
|
5033
|
-
|
|
5902
|
+
__init72() {this.liveDeep = /* @__PURE__ */ new Map()}
|
|
5034
5903
|
/**
|
|
5035
5904
|
* Mixer Brush, Smudge and Sponge on a 16- or 32-bit layer: they read and write float working
|
|
5036
5905
|
* tiles on the 8-bit 0..255 sRGB-encoded scale, which keep the fractions bytes would round away.
|
|
5037
5906
|
*/
|
|
5038
5907
|
|
|
5039
|
-
|
|
5040
|
-
|
|
5908
|
+
__init73() {this.work = /* @__PURE__ */ new Map()}
|
|
5909
|
+
__init74() {this.workRead = /* @__PURE__ */ new Map()}
|
|
5041
5910
|
/** The pre-stroke tile as a float working tile (cached; `null`: transparent). */
|
|
5042
5911
|
readWork(key) {
|
|
5043
5912
|
if (!this.workRead.has(key)) this.workRead.set(key, workTileOf(this.base.tiles.get(key)));
|
|
@@ -5077,7 +5946,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5077
5946
|
writeTile: (tx, ty) => {
|
|
5078
5947
|
const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
|
|
5079
5948
|
if (!this.touched.has(key)) {
|
|
5080
|
-
this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call',
|
|
5949
|
+
this.work.set(key, _nullishCoalesce(_optionalChain([read, 'call', _111 => _111(key), 'optionalAccess', _112 => _112.slice, 'call', _113 => _113()]), () => ( new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4))));
|
|
5081
5950
|
this.touched.add(key);
|
|
5082
5951
|
}
|
|
5083
5952
|
this.fresh.add(key);
|
|
@@ -5089,11 +5958,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5089
5958
|
offset: a.offset,
|
|
5090
5959
|
lockTransparency: a.lockTransparency,
|
|
5091
5960
|
selection: a.selection,
|
|
5092
|
-
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
5961
|
+
readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _114 => _114.live, 'access', _115 => _115.get, 'call', _116 => _116(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _117 => _117.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
|
|
5093
5962
|
writeTile: (tx, ty) => {
|
|
5094
5963
|
const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
|
|
5095
5964
|
if (!this.touched.has(key)) {
|
|
5096
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5965
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _118 => _118.base, 'access', _119 => _119.tiles, 'access', _120 => _120.get, 'call', _121 => _121(key), 'optionalAccess', _122 => _122.data]), () => ( defaultTile(this.base)));
|
|
5097
5966
|
this.live.set(key, { data: new Uint8ClampedArray(src), uniform: null });
|
|
5098
5967
|
this.touched.add(key);
|
|
5099
5968
|
}
|
|
@@ -5110,11 +5979,11 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5110
5979
|
if (this.closed || !points.length) return;
|
|
5111
5980
|
if (!this.started) {
|
|
5112
5981
|
this.started = true;
|
|
5113
|
-
if (_optionalChain([this, 'access',
|
|
5982
|
+
if (_optionalChain([this, 'access', _123 => _123.retouch, 'optionalAccess', _124 => _124.kind]) === "coverage") this.retouch.start(points[0]);
|
|
5114
5983
|
}
|
|
5115
5984
|
this.last = points[points.length - 1];
|
|
5116
5985
|
const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
|
|
5117
|
-
_optionalChain([this, 'access',
|
|
5986
|
+
_optionalChain([this, 'access', _125 => _125.flushView, 'optionalCall', _126 => _126()]);
|
|
5118
5987
|
this.update(rects);
|
|
5119
5988
|
}
|
|
5120
5989
|
update(rects) {
|
|
@@ -5144,7 +6013,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5144
6013
|
for (const [key, { tx, ty, r }] of regions) {
|
|
5145
6014
|
if (this.deep) {
|
|
5146
6015
|
const rt = this.retouch;
|
|
5147
|
-
const paint = _optionalChain([rt, 'optionalAccess',
|
|
6016
|
+
const paint = _optionalChain([rt, 'optionalAccess', _127 => _127.kind]) === "coverage" ? rt.paint() : null;
|
|
5148
6017
|
if (paint && paint.kind !== "tone") {
|
|
5149
6018
|
const prevWork = this.touched.has(key) ? this.work.get(key) : void 0;
|
|
5150
6019
|
this.touched.add(key);
|
|
@@ -5155,13 +6024,13 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5155
6024
|
const prev2 = this.touched.has(key) ? this.liveDeep.get(key) : void 0;
|
|
5156
6025
|
this.touched.add(key);
|
|
5157
6026
|
const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
|
|
5158
|
-
const d = _optionalChain([rt, 'optionalAccess',
|
|
6027
|
+
const d = _optionalChain([rt, 'optionalAccess', _128 => _128.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _129 => _129.kind]) === "tone" ? _chunk7NW46N7Icjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkEBDCRTZIcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
|
|
5159
6028
|
this.liveDeep.set(key, d);
|
|
5160
6029
|
this.live.set(key, { data: _chunkCWM3CUUXcjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
|
|
5161
6030
|
continue;
|
|
5162
6031
|
}
|
|
5163
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
5164
|
-
const prev = this.touched.has(key) ? _optionalChain([this, 'access',
|
|
6032
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _130 => _130.base, 'access', _131 => _131.tiles, 'access', _132 => _132.get, 'call', _133 => _133(key), 'optionalAccess', _134 => _134.data]), () => ( defaultTile(this.base)));
|
|
6033
|
+
const prev = this.touched.has(key) ? _optionalChain([this, 'access', _135 => _135.live, 'access', _136 => _136.get, 'call', _137 => _137(key), 'optionalAccess', _138 => _138.data]) : void 0;
|
|
5165
6034
|
this.touched.add(key);
|
|
5166
6035
|
const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
|
|
5167
6036
|
this.live.set(key, { data, uniform: null });
|
|
@@ -5173,12 +6042,12 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5173
6042
|
if (this.closed) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("This stroke has already ended.");
|
|
5174
6043
|
const last = _nullishCoalesce(this.last, () => ( void 0));
|
|
5175
6044
|
const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
|
|
5176
|
-
_optionalChain([this, 'access',
|
|
6045
|
+
_optionalChain([this, 'access', _139 => _139.flushView, 'optionalCall', _140 => _140()]);
|
|
5177
6046
|
this.update(rects);
|
|
5178
6047
|
this.closed = true;
|
|
5179
6048
|
const ch = this.base.channels;
|
|
5180
6049
|
const r = this.retouch;
|
|
5181
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
6050
|
+
if (_optionalChain([r, 'optionalAccess', _141 => _141.kind]) === "coverage" && r.finalPaint) {
|
|
5182
6051
|
const final = r.finalPaint(this.stroke.coverage);
|
|
5183
6052
|
if (final) {
|
|
5184
6053
|
for (const key of this.touched) {
|
|
@@ -5187,7 +6056,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5187
6056
|
this.retouchDeepTile(key, tx, ty, final, {});
|
|
5188
6057
|
continue;
|
|
5189
6058
|
}
|
|
5190
|
-
const src = _nullishCoalesce(_optionalChain([this, 'access',
|
|
6059
|
+
const src = _nullishCoalesce(_optionalChain([this, 'access', _142 => _142.base, 'access', _143 => _143.tiles, 'access', _144 => _144.get, 'call', _145 => _145(key), 'optionalAccess', _146 => _146.data]), () => ( defaultTile(this.base)));
|
|
5191
6060
|
this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
|
|
5192
6061
|
}
|
|
5193
6062
|
}
|
|
@@ -5209,7 +6078,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5209
6078
|
const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
|
|
5210
6079
|
const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
|
|
5211
6080
|
if (mixerLoad) result.mixerLoad = mixerLoad;
|
|
5212
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
6081
|
+
if (_optionalChain([r, 'optionalAccess', _147 => _147.result])) Object.assign(result, r.result());
|
|
5213
6082
|
return result;
|
|
5214
6083
|
}
|
|
5215
6084
|
/** Abandons the stroke and restores the layer. */
|
|
@@ -5218,7 +6087,7 @@ var PaintStrokeSession = (_class11 = class {
|
|
|
5218
6087
|
this.closed = true;
|
|
5219
6088
|
this.controller._strokeCommit(this.before, this.target.id, this.target.channel, null);
|
|
5220
6089
|
}
|
|
5221
|
-
},
|
|
6090
|
+
}, _class12);
|
|
5222
6091
|
function workRegionOf(surface, rect, depth) {
|
|
5223
6092
|
if (!depth) return Float32Array.from(_chunkCWM3CUUXcjs.readRegion.call(void 0, surface, rect));
|
|
5224
6093
|
const d = _chunkCWM3CUUXcjs.readDeepRegion.call(void 0, surface, rect, depth);
|
|
@@ -5335,14 +6204,14 @@ function migrateSerializedImageEditorState(data) {
|
|
|
5335
6204
|
const legacy = data;
|
|
5336
6205
|
const adjustments = normalizeStoredAdjustments(legacy.adjustments);
|
|
5337
6206
|
return {
|
|
5338
|
-
version: _optionalChain([adjustments, 'access',
|
|
6207
|
+
version: _optionalChain([adjustments, 'access', _148 => _148.layers, 'optionalAccess', _149 => _149.length]) ? 2 : 1,
|
|
5339
6208
|
crop: legacy.crop ? { ...legacy.crop } : null,
|
|
5340
6209
|
transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
|
|
5341
6210
|
adjustments: serializeAdjustments(adjustments),
|
|
5342
6211
|
depthMask: {
|
|
5343
6212
|
...DEFAULT_DEPTH_MASK,
|
|
5344
6213
|
...legacy.depthMask,
|
|
5345
|
-
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access',
|
|
6214
|
+
depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _150 => _150.depthMask, 'optionalAccess', _151 => _151.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
|
|
5346
6215
|
},
|
|
5347
6216
|
annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
|
|
5348
6217
|
...legacy.selection ? { selection: { ...legacy.selection } } : {}
|
|
@@ -5371,36 +6240,36 @@ function migrateToLayeredState(data, size) {
|
|
|
5371
6240
|
var DEFAULT_TRANSFORM = _chunkUYXL6ZWQcjs.DEFAULT_TRANSFORM_VALUES;
|
|
5372
6241
|
var DEFAULT_DEPTH_MASK = _chunkUYXL6ZWQcjs.DEFAULT_DEPTH_MASK_VALUES;
|
|
5373
6242
|
var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
|
|
5374
|
-
var ImageEditorController = (
|
|
6243
|
+
var ImageEditorController = (_class13 = class {
|
|
5375
6244
|
|
|
5376
6245
|
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
6246
|
+
__init75() {this.imageElement = null}
|
|
6247
|
+
__init76() {this.listeners = /* @__PURE__ */ new Set()}
|
|
6248
|
+
__init77() {this.histogramListeners = /* @__PURE__ */ new Set()}
|
|
5380
6249
|
|
|
5381
6250
|
// History stacks
|
|
5382
|
-
|
|
5383
|
-
|
|
6251
|
+
__init78() {this.undoStack = []}
|
|
6252
|
+
__init79() {this.redoStack = []}
|
|
5384
6253
|
|
|
5385
6254
|
|
|
5386
|
-
|
|
6255
|
+
__init80() {this.isApplyingHistory = false}
|
|
5387
6256
|
|
|
5388
6257
|
/** Pixels the selection tools sample (host-provided or read back from the source). */
|
|
5389
|
-
|
|
5390
|
-
|
|
6258
|
+
__init81() {this.samplePixels = null}
|
|
6259
|
+
__init82() {this.samplePixelsOverride = false}
|
|
5391
6260
|
/** Decoded source pixels (the Background's surface), by the buffer or element they came from. */
|
|
5392
|
-
|
|
5393
|
-
|
|
6261
|
+
__init83() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
|
|
6262
|
+
__init84() {this.viewKey = []}
|
|
5394
6263
|
/** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
|
|
5395
|
-
|
|
6264
|
+
__init85() {this.compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)()}
|
|
5396
6265
|
/** The segmentation provider behind `selectSubject` (see `setSegmentationProvider`). */
|
|
5397
|
-
|
|
6266
|
+
__init86() {this.segmentation = null}
|
|
5398
6267
|
/** The effects provider slot (see `setEffectsProvider`). */
|
|
5399
|
-
|
|
6268
|
+
__init87() {this.effects = new (0, _chunkA3A5TI6Rcjs.EffectsSlot)()}
|
|
5400
6269
|
/** Renders provider effects: effect smart filter results and effect layers. */
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
constructor(options = {}) {;
|
|
6270
|
+
__init88() {this.effectsEngine = new ImageEffectsEngine({ slot: this.effects })}
|
|
6271
|
+
__init89() {this.effectRefresh = "none"}
|
|
6272
|
+
constructor(options = {}) {;_class13.prototype.__init75.call(this);_class13.prototype.__init76.call(this);_class13.prototype.__init77.call(this);_class13.prototype.__init78.call(this);_class13.prototype.__init79.call(this);_class13.prototype.__init80.call(this);_class13.prototype.__init81.call(this);_class13.prototype.__init82.call(this);_class13.prototype.__init83.call(this);_class13.prototype.__init84.call(this);_class13.prototype.__init85.call(this);_class13.prototype.__init86.call(this);_class13.prototype.__init87.call(this);_class13.prototype.__init88.call(this);_class13.prototype.__init89.call(this);_class13.prototype.__init90.call(this);_class13.prototype.__init91.call(this);_class13.prototype.__init92.call(this);_class13.prototype.__init93.call(this);_class13.prototype.__init94.call(this);_class13.prototype.__init95.call(this);_class13.prototype.__init96.call(this);_class13.prototype.__init97.call(this);_class13.prototype.__init98.call(this);_class13.prototype.__init99.call(this);_class13.prototype.__init100.call(this);_class13.prototype.__init101.call(this);_class13.prototype.__init102.call(this);_class13.prototype.__init103.call(this);_class13.prototype.__init104.call(this);_class13.prototype.__init105.call(this);
|
|
5404
6273
|
this.effects.subscribe(() => this.queueEffectRefresh("all"));
|
|
5405
6274
|
this.effectsEngine.subscribe(() => this.queueEffectRefresh("incomplete"));
|
|
5406
6275
|
if (options.effects) this.effects.set(options.effects);
|
|
@@ -5418,7 +6287,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5418
6287
|
sourceIsOpaque: () => this.sourceIsOpaque(),
|
|
5419
6288
|
version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
5420
6289
|
globalLight: () => this.state.globalLight,
|
|
5421
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
6290
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _152 => _152.state, 'access', _153 => _153.patterns, 'optionalAccess', _154 => _154.find, 'call', _155 => _155((p) => p.id === id)]), () => ( null))
|
|
5422
6291
|
};
|
|
5423
6292
|
this.state = {
|
|
5424
6293
|
sourceUrl: typeof options.image === "string" ? options.image : null,
|
|
@@ -5451,13 +6320,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
5451
6320
|
};
|
|
5452
6321
|
}
|
|
5453
6322
|
this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
|
|
5454
|
-
if (_optionalChain([options, 'access',
|
|
6323
|
+
if (_optionalChain([options, 'access', _156 => _156.initialState, 'optionalAccess', _157 => _157.selection])) {
|
|
5455
6324
|
try {
|
|
5456
6325
|
this.state.selection = normalizeSelection(_chunkUYXL6ZWQcjs.deserializeSelection.call(void 0, options.initialState.selection));
|
|
5457
6326
|
} catch (e20) {
|
|
5458
6327
|
}
|
|
5459
6328
|
}
|
|
5460
|
-
if (_optionalChain([options, 'access',
|
|
6329
|
+
if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.channels])) {
|
|
5461
6330
|
const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
|
|
5462
6331
|
if (channels.length) this.state.channels = channels;
|
|
5463
6332
|
}
|
|
@@ -5533,7 +6402,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5533
6402
|
* Where layer pixels changed since the last viewport render, when only strokes changed them
|
|
5534
6403
|
* (the renderer then recomposites just those rectangles); `'all'` after any other change.
|
|
5535
6404
|
*/
|
|
5536
|
-
|
|
6405
|
+
__init90() {this.pendingDirty = "all"}
|
|
5537
6406
|
notify(strokeRects) {
|
|
5538
6407
|
if (strokeRects) this.docRevision++;
|
|
5539
6408
|
if (strokeRects && this.pendingDirty !== "all") this.pendingDirty.push(...strokeRects);
|
|
@@ -5541,7 +6410,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5541
6410
|
this.syncViews();
|
|
5542
6411
|
this.syncDisplay();
|
|
5543
6412
|
const currentState = { ...this.state };
|
|
5544
|
-
_optionalChain([this, 'access',
|
|
6413
|
+
_optionalChain([this, 'access', _160 => _160.onStateChange, 'optionalCall', _161 => _161(currentState)]);
|
|
5545
6414
|
this.listeners.forEach((l) => l(currentState));
|
|
5546
6415
|
if (this.effects.provider) this.queueEffectRefresh("incomplete");
|
|
5547
6416
|
}
|
|
@@ -5570,7 +6439,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5570
6439
|
if (l.type === "group") {
|
|
5571
6440
|
const children = walk(l.children);
|
|
5572
6441
|
if (children !== l.children) next2 = { ...l, children };
|
|
5573
|
-
} else if (l.type === "smart" && _optionalChain([l, 'access',
|
|
6442
|
+
} else if (l.type === "smart" && _optionalChain([l, 'access', _162 => _162.smartFilters, 'optionalAccess', _163 => _163.filters, 'access', _164 => _164.some, 'call', _165 => _165((f) => f.kind === "effect")]) && (all || _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
|
|
5574
6443
|
try {
|
|
5575
6444
|
const r = _chunkUYXL6ZWQcjs.rerender.call(void 0, l, canvas);
|
|
5576
6445
|
if (all || !_chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
|
|
@@ -5666,8 +6535,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
5666
6535
|
*/
|
|
5667
6536
|
async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
|
|
5668
6537
|
const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
|
|
5669
|
-
const was = _optionalChain([layer, 'access',
|
|
5670
|
-
if (!was || was.kind !== "effect") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
6538
|
+
const was = _optionalChain([layer, 'access', _166 => _166.smartFilters, 'optionalAccess', _167 => _167.filters, 'access', _168 => _168.find, 'call', _169 => _169((f) => f.id === filterId)]);
|
|
6539
|
+
if (!was || was.kind !== "effect") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _170 => _170.smartFilters, 'optionalAccess', _171 => _171.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
|
|
5671
6540
|
const update = {};
|
|
5672
6541
|
if (changes.values) {
|
|
5673
6542
|
const d = await this.describeEffect(was.effect);
|
|
@@ -5709,7 +6578,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5709
6578
|
const layer = {
|
|
5710
6579
|
type: "pixel",
|
|
5711
6580
|
id,
|
|
5712
|
-
name: _optionalChain([options, 'access',
|
|
6581
|
+
name: _optionalChain([options, 'access', _172 => _172.name, 'optionalAccess', _173 => _173.trim, 'call', _174 => _174()]) || d.name,
|
|
5713
6582
|
visible: true,
|
|
5714
6583
|
opacity: _nullishCoalesce(options.opacity, () => ( 1)),
|
|
5715
6584
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -5734,7 +6603,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5734
6603
|
*/
|
|
5735
6604
|
async updateEffectLayer(layerId, changes, commitToHistory = true) {
|
|
5736
6605
|
const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
|
|
5737
|
-
const layer = _optionalChain([found, 'optionalAccess',
|
|
6606
|
+
const layer = _optionalChain([found, 'optionalAccess', _175 => _175.layer]);
|
|
5738
6607
|
if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
|
|
5739
6608
|
_chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
|
|
5740
6609
|
const g = layer.generator;
|
|
@@ -5763,7 +6632,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5763
6632
|
* and how long it runs, the longest of theirs (ms). Null when none animates.
|
|
5764
6633
|
*/
|
|
5765
6634
|
getAnimation() {
|
|
5766
|
-
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access',
|
|
6635
|
+
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _176 => _176.generator, 'optionalAccess', _177 => _177.animate]));
|
|
5767
6636
|
if (!layers.length) return null;
|
|
5768
6637
|
return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
|
|
5769
6638
|
}
|
|
@@ -5780,7 +6649,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5780
6649
|
const { width, height } = this.naturalSize;
|
|
5781
6650
|
const surfaces = /* @__PURE__ */ new Map();
|
|
5782
6651
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
|
|
5783
|
-
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access',
|
|
6652
|
+
if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _178 => _178.generator, 'optionalAccess', _179 => _179.animate])) continue;
|
|
5784
6653
|
const g = l.generator;
|
|
5785
6654
|
const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
|
|
5786
6655
|
surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
|
|
@@ -5800,7 +6669,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5800
6669
|
})
|
|
5801
6670
|
);
|
|
5802
6671
|
}
|
|
5803
|
-
|
|
6672
|
+
__init91() {this.displayFor = null}
|
|
5804
6673
|
/** Keeps the renderer's display transform in step with the document profile, mode and Proof Setup. */
|
|
5805
6674
|
syncDisplay() {
|
|
5806
6675
|
const s = this.state;
|
|
@@ -5841,7 +6710,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5841
6710
|
transform: { ...s.transform },
|
|
5842
6711
|
outputOpacity: s.outputOpacity,
|
|
5843
6712
|
selection: _nullishCoalesce(s.selection, () => ( null)),
|
|
5844
|
-
..._optionalChain([s, 'access',
|
|
6713
|
+
..._optionalChain([s, 'access', _180 => _180.channels, 'optionalAccess', _181 => _181.length]) ? { channels: s.channels } : {},
|
|
5845
6714
|
source: {
|
|
5846
6715
|
sourceUrl: s.sourceUrl,
|
|
5847
6716
|
element: this.imageElement,
|
|
@@ -5877,7 +6746,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5877
6746
|
if (entry.colorMode) s.colorMode = entry.colorMode;
|
|
5878
6747
|
else delete s.colorMode;
|
|
5879
6748
|
s.selection = entry.selection;
|
|
5880
|
-
if (_optionalChain([entry, 'access',
|
|
6749
|
+
if (_optionalChain([entry, 'access', _182 => _182.channels, 'optionalAccess', _183 => _183.length])) s.channels = entry.channels;
|
|
5881
6750
|
else delete s.channels;
|
|
5882
6751
|
if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
|
|
5883
6752
|
this.imageElement = entry.source.element;
|
|
@@ -5889,7 +6758,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5889
6758
|
}
|
|
5890
6759
|
}
|
|
5891
6760
|
/** Set while `asOneStep` runs: the step is already recorded, so nested commands add none. */
|
|
5892
|
-
|
|
6761
|
+
__init92() {this.historyGrouped = false}
|
|
5893
6762
|
/**
|
|
5894
6763
|
* Runs `fn` as one undo step: history is recorded once, before it, and the commands it calls
|
|
5895
6764
|
* record none. If `fn` throws, the step is dropped and the state goes back to before it, so a
|
|
@@ -5952,7 +6821,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
5952
6821
|
get canUndo() {
|
|
5953
6822
|
return this.undoStack.length > 0;
|
|
5954
6823
|
}
|
|
5955
|
-
|
|
6824
|
+
__init93() {this.docRevision = 0}
|
|
5956
6825
|
/**
|
|
5957
6826
|
* Bumped on every change to the document (an undoable edit, a stroke, undo, redo), not on view
|
|
5958
6827
|
* or tool changes, nor on `loadImage` (the source image is the host's, not part of the document). `createImageEditorDocument` uses it to tell document changes apart.
|
|
@@ -6084,7 +6953,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6084
6953
|
return this.state.layers;
|
|
6085
6954
|
}
|
|
6086
6955
|
getLayer(id) {
|
|
6087
|
-
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess',
|
|
6956
|
+
return _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _184 => _184.layer]);
|
|
6088
6957
|
}
|
|
6089
6958
|
/** The active layer, or `undefined`. */
|
|
6090
6959
|
getActiveLayer() {
|
|
@@ -6097,7 +6966,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6097
6966
|
setActiveLayer(id, target = "pixels") {
|
|
6098
6967
|
if (id !== null && !this.getLayer(id)) return false;
|
|
6099
6968
|
const layer = id ? this.getLayer(id) : void 0;
|
|
6100
|
-
const t = target === "mask" && _optionalChain([layer, 'optionalAccess',
|
|
6969
|
+
const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _185 => _185.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _186 => _186.type]) === "smart" && _optionalChain([layer, 'access', _187 => _187.smartFilters, 'optionalAccess', _188 => _188.mask]) ? "filter-mask" : "pixels";
|
|
6101
6970
|
if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
|
|
6102
6971
|
this.state.activeLayerId = id;
|
|
6103
6972
|
this.state.activeTarget = t;
|
|
@@ -6116,7 +6985,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6116
6985
|
if (!b) return null;
|
|
6117
6986
|
return { x: b.x + layer.offset.x, y: b.y + layer.offset.y, width: b.width, height: b.height, data: _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, b) };
|
|
6118
6987
|
}
|
|
6119
|
-
|
|
6988
|
+
__init94() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
|
|
6120
6989
|
/**
|
|
6121
6990
|
* Document bounds of a layer's non-transparent pixels (pixel layers; the Background's source
|
|
6122
6991
|
* included), or `null` for an empty or non-pixel layer.
|
|
@@ -6259,11 +7128,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
6259
7128
|
surfaceOf: (l) => this.surfaceOf(l),
|
|
6260
7129
|
version: `${this.sourceVersion()}:${this.patternsVersion()}`,
|
|
6261
7130
|
globalLight: this.state.globalLight,
|
|
6262
|
-
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
7131
|
+
pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _189 => _189.state, 'access', _190 => _190.patterns, 'optionalAccess', _191 => _191.find, 'call', _192 => _192((p) => p.id === id)]), () => ( null))
|
|
6263
7132
|
};
|
|
6264
7133
|
}
|
|
6265
|
-
|
|
6266
|
-
|
|
7134
|
+
__init95() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
|
|
7135
|
+
__init96() {this.nextSourceId = 1}
|
|
6267
7136
|
/** Changes whenever the Background's source pixels can have changed. */
|
|
6268
7137
|
sourceVersion() {
|
|
6269
7138
|
const key = this.samplePixelsOverride ? this.samplePixels : _nullishCoalesce(this.imageElement, () => ( this.samplePixels));
|
|
@@ -6312,7 +7181,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6312
7181
|
}
|
|
6313
7182
|
return fits ? fromPixels(px2) : null;
|
|
6314
7183
|
}
|
|
6315
|
-
|
|
7184
|
+
__init97() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
|
|
6316
7185
|
/** Whether every source pixel is opaque (some legacy renders depend on it). */
|
|
6317
7186
|
sourceIsOpaque() {
|
|
6318
7187
|
const s = this.sourceSurface();
|
|
@@ -6336,7 +7205,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6336
7205
|
if (!ctx || typeof ctx.getImageData !== "function") return null;
|
|
6337
7206
|
ctx.drawImage(el, 0, 0, width, height);
|
|
6338
7207
|
const data = ctx.getImageData(0, 0, width, height);
|
|
6339
|
-
if (!_optionalChain([data, 'optionalAccess',
|
|
7208
|
+
if (!_optionalChain([data, 'optionalAccess', _193 => _193.data]) || data.data.length < width * height * 4) return null;
|
|
6340
7209
|
return { width, height, data: data.data };
|
|
6341
7210
|
} catch (e24) {
|
|
6342
7211
|
return null;
|
|
@@ -6349,7 +7218,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6349
7218
|
const prev = this.state.layers;
|
|
6350
7219
|
const depth = this.bitDepth;
|
|
6351
7220
|
this.state.layers = next;
|
|
6352
|
-
_optionalChain([extra, 'optionalCall',
|
|
7221
|
+
_optionalChain([extra, 'optionalCall', _194 => _194()]);
|
|
6353
7222
|
if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
|
|
6354
7223
|
if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
|
|
6355
7224
|
this.state.activeLayerId = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
|
|
@@ -6387,7 +7256,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6387
7256
|
const layer = {
|
|
6388
7257
|
type: "pixel",
|
|
6389
7258
|
id: init.id && !ids.has(init.id) ? init.id : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
|
|
6390
|
-
name: _optionalChain([init, 'access',
|
|
7259
|
+
name: _optionalChain([init, 'access', _195 => _195.name, 'optionalAccess', _196 => _196.trim, 'call', _197 => _197()]) || this.nextLayerName(),
|
|
6391
7260
|
visible: _nullishCoalesce(init.visible, () => ( true)),
|
|
6392
7261
|
opacity: _nullishCoalesce(init.opacity, () => ( 1)),
|
|
6393
7262
|
blend: _nullishCoalesce(blend, () => ( "normal")),
|
|
@@ -6414,7 +7283,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6414
7283
|
async decodeImage(image) {
|
|
6415
7284
|
const trimmed = image.trim();
|
|
6416
7285
|
let png = null;
|
|
6417
|
-
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess',
|
|
7286
|
+
if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkCWM3CUUXcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _198 => _198.bytes]), () => ( null));
|
|
6418
7287
|
else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
|
|
6419
7288
|
try {
|
|
6420
7289
|
const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, trimmed);
|
|
@@ -6463,7 +7332,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6463
7332
|
removeLayer(id) {
|
|
6464
7333
|
const next = _chunkUYXL6ZWQcjs.removeLayer.call(void 0, this.state.layers, id);
|
|
6465
7334
|
this.commitLayers(next, () => {
|
|
6466
|
-
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
7335
|
+
if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _199 => _199.id]) === this.state.selectedAnnotationId)) {
|
|
6467
7336
|
this.state.selectedAnnotationId = null;
|
|
6468
7337
|
}
|
|
6469
7338
|
});
|
|
@@ -6472,9 +7341,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
6472
7341
|
moveLayer(id, placement) {
|
|
6473
7342
|
const next = _chunkUYXL6ZWQcjs.moveLayer.call(void 0, this.state.layers, id, placement);
|
|
6474
7343
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
|
|
6475
|
-
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7344
|
+
if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _200 => _200.parent, 'optionalAccess', _201 => _201.id]), () => ( null)), index: loc.index };
|
|
6476
7345
|
this.commitLayers(next);
|
|
6477
|
-
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7346
|
+
return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _202 => _202.parent, 'optionalAccess', _203 => _203.id]), () => ( null)), index: loc.index };
|
|
6478
7347
|
}
|
|
6479
7348
|
/**
|
|
6480
7349
|
* Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
|
|
@@ -6491,7 +7360,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6491
7360
|
const group = {
|
|
6492
7361
|
type: "group",
|
|
6493
7362
|
id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "group"),
|
|
6494
|
-
name: _optionalChain([init, 'access',
|
|
7363
|
+
name: _optionalChain([init, 'access', _204 => _204.name, 'optionalAccess', _205 => _205.trim, 'call', _206 => _206()]) || "Group",
|
|
6495
7364
|
visible: true,
|
|
6496
7365
|
opacity: 1,
|
|
6497
7366
|
blend,
|
|
@@ -6584,7 +7453,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6584
7453
|
sel = this.layerTransparency(id);
|
|
6585
7454
|
} else {
|
|
6586
7455
|
const current = this.state.selection;
|
|
6587
|
-
if (!_optionalChain([current, 'optionalAccess',
|
|
7456
|
+
if (!_optionalChain([current, 'optionalAccess', _207 => _207.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
|
|
6588
7457
|
sel = from === "hide-selection" ? _chunkUYXL6ZWQcjs.invertSelection.call(void 0, current) : current;
|
|
6589
7458
|
}
|
|
6590
7459
|
mask = this.maskFromSelection(sel, props);
|
|
@@ -6615,7 +7484,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6615
7484
|
const layer = _chunkUYXL6ZWQcjs.requireLayer.call(void 0, this.state.layers, id).layer;
|
|
6616
7485
|
const name = layer.name || id;
|
|
6617
7486
|
if (layer.type === "shape") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is a shape layer, whose path already is its vector mask; change it with set_shape_component, or rasterize the layer first.`);
|
|
6618
|
-
if (_optionalChain([layer, 'access',
|
|
7487
|
+
if (_optionalChain([layer, 'access', _208 => _208.mask, 'optionalAccess', _209 => _209.source])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
|
|
6619
7488
|
return layer;
|
|
6620
7489
|
}
|
|
6621
7490
|
requireVectorMask(id) {
|
|
@@ -6625,10 +7494,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
6625
7494
|
}
|
|
6626
7495
|
/** Components from a path spec: `components`, or one `shape` / `subpaths`. */
|
|
6627
7496
|
vectorMaskComponents(path) {
|
|
6628
|
-
if (_optionalChain([path, 'access',
|
|
7497
|
+
if (_optionalChain([path, 'access', _210 => _210.components, 'optionalAccess', _211 => _211.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
6629
7498
|
if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
|
|
6630
|
-
const specs = _optionalChain([path, 'access',
|
|
6631
|
-
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access',
|
|
7499
|
+
const specs = _optionalChain([path, 'access', _212 => _212.components, 'optionalAccess', _213 => _213.length]) ? path.components : [path];
|
|
7500
|
+
return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _214 => _214.components, 'optionalAccess', _215 => _215.length]) ? `components[${i}].` : ""));
|
|
6632
7501
|
}
|
|
6633
7502
|
/**
|
|
6634
7503
|
* Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
|
|
@@ -6645,7 +7514,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6645
7514
|
vm = { components: this.vectorMaskComponents(path) };
|
|
6646
7515
|
if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
|
|
6647
7516
|
} else if (from === "reveal-all" || from === "hide-all") {
|
|
6648
|
-
if (_optionalChain([path, 'access',
|
|
7517
|
+
if (_optionalChain([path, 'access', _216 => _216.components, 'optionalAccess', _217 => _217.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
|
|
6649
7518
|
vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
|
|
6650
7519
|
} else {
|
|
6651
7520
|
throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
|
|
@@ -6656,7 +7525,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6656
7525
|
/** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
|
|
6657
7526
|
traceSelection(options) {
|
|
6658
7527
|
const sel = this.state.selection;
|
|
6659
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7528
|
+
if (!_optionalChain([sel, 'optionalAccess', _218 => _218.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
|
|
6660
7529
|
if (options.tolerance !== void 0 && !(options.tolerance >= 0.1 && options.tolerance <= 10)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("tolerance must be from 0.1 to 10 px.");
|
|
6661
7530
|
const subpaths = selectionToSubpaths(sel, options);
|
|
6662
7531
|
if (!subpaths.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The selection is too small or too faint to trace (below minArea, or under half selected); lower minArea or threshold.");
|
|
@@ -6837,7 +7706,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6837
7706
|
const layer = loc.layer;
|
|
6838
7707
|
if (layer.type !== "pixel") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
|
|
6839
7708
|
const sel = this.state.selection;
|
|
6840
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
7709
|
+
if (!_optionalChain([sel, 'optionalAccess', _219 => _219.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
|
|
6841
7710
|
if (options.cut) _chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
|
|
6842
7711
|
const surface = this.surfaceOf(layer);
|
|
6843
7712
|
const sb = sel.bounds;
|
|
@@ -6855,14 +7724,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
6855
7724
|
const copy = {
|
|
6856
7725
|
type: "pixel",
|
|
6857
7726
|
id: _chunkUYXL6ZWQcjs.newLayerId.call(void 0, ),
|
|
6858
|
-
name: _optionalChain([options, 'access',
|
|
7727
|
+
name: _optionalChain([options, 'access', _220 => _220.name, 'optionalAccess', _221 => _221.trim, 'call', _222 => _222()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
|
|
6859
7728
|
visible: true,
|
|
6860
7729
|
opacity: 1,
|
|
6861
7730
|
blend: "normal",
|
|
6862
7731
|
surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
|
|
6863
7732
|
offset: { ...layer.offset }
|
|
6864
7733
|
};
|
|
6865
|
-
let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
7734
|
+
let next = _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _223 => _223.parent, 'optionalAccess', _224 => _224.id]), () => ( null)), loc.index + 1);
|
|
6866
7735
|
if (kept) {
|
|
6867
7736
|
const cutLayer = { ...layer, surface: _chunkCWM3CUUXcjs.writeRegion.call(void 0, surface, src, kept) };
|
|
6868
7737
|
delete cutLayer.source;
|
|
@@ -6875,7 +7744,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6875
7744
|
return copy.id;
|
|
6876
7745
|
}
|
|
6877
7746
|
// --- Free Transform ---
|
|
6878
|
-
|
|
7747
|
+
__init98() {this.openTransform = null}
|
|
6879
7748
|
/** The Free Transform in progress (see `beginFreeTransform`), or `null`. */
|
|
6880
7749
|
getFreeTransform() {
|
|
6881
7750
|
if (this.openTransform && !this.openTransform.isOpen) this.openTransform = null;
|
|
@@ -6886,7 +7755,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
6886
7755
|
layers: () => this.state.layers,
|
|
6887
7756
|
activeLayerId: () => this.state.activeLayerId,
|
|
6888
7757
|
activeTarget: () => this.state.activeTarget,
|
|
6889
|
-
selection: () => _optionalChain([this, 'access',
|
|
7758
|
+
selection: () => _optionalChain([this, 'access', _225 => _225.state, 'access', _226 => _226.selection, 'optionalAccess', _227 => _227.bounds]) ? this.state.selection : null,
|
|
6890
7759
|
canvas: () => this.naturalSize,
|
|
6891
7760
|
pixelsOf: (layer) => this.surfaceOf(layer),
|
|
6892
7761
|
shapeEnv: () => this.shapeEnv(),
|
|
@@ -7034,7 +7903,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7034
7903
|
* anything else nests as a layer document. Returns the smart object's id.
|
|
7035
7904
|
*/
|
|
7036
7905
|
convertToSmartObject(ids, options = {}) {
|
|
7037
|
-
const list = _optionalChain([ids, 'optionalAccess',
|
|
7906
|
+
const list = _optionalChain([ids, 'optionalAccess', _228 => _228.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
|
|
7038
7907
|
if (!list.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
|
|
7039
7908
|
const res = _chunkUYXL6ZWQcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
|
|
7040
7909
|
this.commitLayers(res.layers, () => {
|
|
@@ -7067,8 +7936,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
7067
7936
|
width: c.width,
|
|
7068
7937
|
height: c.height,
|
|
7069
7938
|
decoded: _chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c),
|
|
7070
|
-
fileType: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7071
|
-
linkedPath: _nullishCoalesce(_optionalChain([c, 'access',
|
|
7939
|
+
fileType: _nullishCoalesce(_optionalChain([c, 'access', _229 => _229.file, 'optionalAccess', _230 => _230.type]), () => ( null)),
|
|
7940
|
+
linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _231 => _231.linked, 'optionalAccess', _232 => _232.path]), () => ( null)),
|
|
7072
7941
|
instances: _chunkUYXL6ZWQcjs.instancesOf.call(void 0, this.state.layers, c.id),
|
|
7073
7942
|
layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
|
|
7074
7943
|
},
|
|
@@ -7085,9 +7954,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
7085
7954
|
bounds: _chunkUYXL6ZWQcjs.transformedBox.call(void 0, g)
|
|
7086
7955
|
},
|
|
7087
7956
|
smartFilters: {
|
|
7088
|
-
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7089
|
-
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess',
|
|
7090
|
-
mask: _optionalChain([stack, 'optionalAccess',
|
|
7957
|
+
enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _233 => _233.enabled]), () => ( true)),
|
|
7958
|
+
filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _234 => _234.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
|
|
7959
|
+
mask: _optionalChain([stack, 'optionalAccess', _235 => _235.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunkCWM3CUUXcjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
|
|
7091
7960
|
},
|
|
7092
7961
|
bounds: this.getLayerBounds(id)
|
|
7093
7962
|
};
|
|
@@ -7226,7 +8095,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7226
8095
|
* it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
|
|
7227
8096
|
*/
|
|
7228
8097
|
maskFiltersWithSelection(id, useSelection) {
|
|
7229
|
-
if (!useSelection || !_optionalChain([this, 'access',
|
|
8098
|
+
if (!useSelection || !_optionalChain([this, 'access', _236 => _236.state, 'access', _237 => _237.selection, 'optionalAccess', _238 => _238.bounds])) return false;
|
|
7230
8099
|
this.setSmartFilterMask(id, "selection", {}, false);
|
|
7231
8100
|
return true;
|
|
7232
8101
|
}
|
|
@@ -7240,19 +8109,19 @@ var ImageEditorController = (_class12 = class {
|
|
|
7240
8109
|
removeSmartFilter(id, filterId) {
|
|
7241
8110
|
const res = _chunkUYXL6ZWQcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
|
|
7242
8111
|
this.commitLayers(res.layers);
|
|
7243
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8112
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _239 => _239.layer, 'access', _240 => _240.smartFilters, 'optionalAccess', _241 => _241.filters]), () => ( []));
|
|
7244
8113
|
}
|
|
7245
8114
|
/** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
|
|
7246
8115
|
moveSmartFilter(id, filterId, index) {
|
|
7247
8116
|
const res = _chunkUYXL6ZWQcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
|
|
7248
8117
|
this.commitLayers(res.layers);
|
|
7249
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8118
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _242 => _242.layer, 'access', _243 => _243.smartFilters, 'optionalAccess', _244 => _244.filters]), () => ( []));
|
|
7250
8119
|
}
|
|
7251
8120
|
/** Turns a smart object's whole filter stack on or off (one undo step). */
|
|
7252
8121
|
setSmartFiltersEnabled(id, enabled) {
|
|
7253
8122
|
const res = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
|
|
7254
8123
|
this.commitLayers(res.layers);
|
|
7255
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8124
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _245 => _245.layer, 'access', _246 => _246.smartFilters, 'optionalAccess', _247 => _247.enabled]), () => ( true));
|
|
7256
8125
|
}
|
|
7257
8126
|
/**
|
|
7258
8127
|
* Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
|
|
@@ -7264,11 +8133,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
7264
8133
|
let mask;
|
|
7265
8134
|
if (from === "none") mask = null;
|
|
7266
8135
|
else if (from === "keep") {
|
|
7267
|
-
if (!_optionalChain([layer, 'access',
|
|
8136
|
+
if (!_optionalChain([layer, 'access', _248 => _248.smartFilters, 'optionalAccess', _249 => _249.mask])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
|
|
7268
8137
|
mask = withMaskProps(layer.smartFilters.mask, props);
|
|
7269
8138
|
} else if (from === "selection") {
|
|
7270
8139
|
const sel = this.state.selection;
|
|
7271
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8140
|
+
if (!_optionalChain([sel, 'optionalAccess', _250 => _250.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
|
|
7272
8141
|
mask = this.maskFromSelection(sel, props);
|
|
7273
8142
|
} else {
|
|
7274
8143
|
const v = from === "reveal-all" ? 255 : 0;
|
|
@@ -7280,7 +8149,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7280
8149
|
if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
|
|
7281
8150
|
else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
|
|
7282
8151
|
}, commitToHistory);
|
|
7283
|
-
return _nullishCoalesce(_optionalChain([res, 'access',
|
|
8152
|
+
return _nullishCoalesce(_optionalChain([res, 'access', _251 => _251.layer, 'access', _252 => _252.smartFilters, 'optionalAccess', _253 => _253.mask]), () => ( null));
|
|
7284
8153
|
}
|
|
7285
8154
|
/**
|
|
7286
8155
|
* Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
|
|
@@ -7313,7 +8182,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7313
8182
|
return left;
|
|
7314
8183
|
}
|
|
7315
8184
|
// --- Smart object contents (Edit Contents) ---
|
|
7316
|
-
|
|
8185
|
+
__init99() {this.contentsStack = []}
|
|
7317
8186
|
/** The smart objects whose contents are open (outermost first); empty when the document itself is shown. */
|
|
7318
8187
|
getEditingContents() {
|
|
7319
8188
|
return this.contentsStack.map((e) => ({ layerId: e.layerId, name: e.name }));
|
|
@@ -7328,7 +8197,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7328
8197
|
if (this.getFreeTransform()) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
|
|
7329
8198
|
const layer = _chunkUYXL6ZWQcjs.requireSmartObject.call(void 0, this.state.layers, id);
|
|
7330
8199
|
const c = layer.contents;
|
|
7331
|
-
if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access',
|
|
8200
|
+
if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _254 => _254.file, 'optionalAccess', _255 => _255.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
|
|
7332
8201
|
const saved = {
|
|
7333
8202
|
state: { ...this.state },
|
|
7334
8203
|
undo: this.undoStack,
|
|
@@ -7359,9 +8228,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
7359
8228
|
editingContents: this.getEditingContents()
|
|
7360
8229
|
};
|
|
7361
8230
|
delete this.state.legacyOutputBlur;
|
|
7362
|
-
if (_optionalChain([c, 'access',
|
|
8231
|
+
if (_optionalChain([c, 'access', _256 => _256.document, 'optionalAccess', _257 => _257.globalLight])) this.state.globalLight = c.document.globalLight;
|
|
7363
8232
|
else delete this.state.globalLight;
|
|
7364
|
-
if (_optionalChain([c, 'access',
|
|
8233
|
+
if (_optionalChain([c, 'access', _258 => _258.document, 'optionalAccess', _259 => _259.patterns, 'optionalAccess', _260 => _260.length])) this.state.patterns = c.document.patterns;
|
|
7365
8234
|
else delete this.state.patterns;
|
|
7366
8235
|
this.imageElement = null;
|
|
7367
8236
|
this.samplePixels = null;
|
|
@@ -7381,23 +8250,23 @@ var ImageEditorController = (_class12 = class {
|
|
|
7381
8250
|
closeSmartObjectContents(save = true) {
|
|
7382
8251
|
const top = this.contentsStack.pop();
|
|
7383
8252
|
if (!top) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
|
|
7384
|
-
if (_optionalChain([this, 'access',
|
|
8253
|
+
if (_optionalChain([this, 'access', _261 => _261.openTransform, 'optionalAccess', _262 => _262.isOpen])) this.openTransform.cancel();
|
|
7385
8254
|
this.openTransform = null;
|
|
7386
8255
|
const edited = this.state;
|
|
7387
8256
|
const changed = save && this.undoStack.length > 0;
|
|
7388
8257
|
let next = null;
|
|
7389
8258
|
if (changed) {
|
|
7390
|
-
const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess',
|
|
7391
|
-
const old = _optionalChain([layer, 'optionalAccess',
|
|
8259
|
+
const layer = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _263 => _263.layer]);
|
|
8260
|
+
const old = _optionalChain([layer, 'optionalAccess', _264 => _264.contents]);
|
|
7392
8261
|
const { width, height } = edited.imageDimensions;
|
|
7393
8262
|
const only = edited.layers.length === 1 ? edited.layers[0] : null;
|
|
7394
|
-
const plain3 = _optionalChain([only, 'optionalAccess',
|
|
7395
|
-
if (_optionalChain([old, 'optionalAccess',
|
|
8263
|
+
const plain3 = _optionalChain([only, 'optionalAccess', _265 => _265.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _266 => _266.filters, 'optionalAccess', _267 => _267.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
|
|
8264
|
+
if (_optionalChain([old, 'optionalAccess', _268 => _268.kind]) === "raster" && plain3) {
|
|
7396
8265
|
const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
|
|
7397
8266
|
next = _chunkUYXL6ZWQcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
|
|
7398
8267
|
} else {
|
|
7399
8268
|
const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
|
|
7400
|
-
next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess',
|
|
8269
|
+
next = _chunkUYXL6ZWQcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _269 => _269.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _270 => _270.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
|
|
7401
8270
|
}
|
|
7402
8271
|
}
|
|
7403
8272
|
const saved = top.saved;
|
|
@@ -7422,7 +8291,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7422
8291
|
}
|
|
7423
8292
|
/** The document's own layers (not the contents open for editing). */
|
|
7424
8293
|
rootLayers() {
|
|
7425
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
8294
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _271 => _271.contentsStack, 'access', _272 => _272[0], 'optionalAccess', _273 => _273.saved, 'access', _274 => _274.state, 'access', _275 => _275.layers]), () => ( this.state.layers));
|
|
7426
8295
|
}
|
|
7427
8296
|
/** Drops every open contents edit (loading another document). */
|
|
7428
8297
|
abandonContents() {
|
|
@@ -7462,7 +8331,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7462
8331
|
this.commitLayers(_chunkUYXL6ZWQcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
|
|
7463
8332
|
return this.getLayerEffects(id);
|
|
7464
8333
|
}
|
|
7465
|
-
|
|
8334
|
+
__init100() {this.patternIds = /* @__PURE__ */ new WeakMap()}
|
|
7466
8335
|
/** Changes whenever the document's pattern list is replaced (the compositor then drops its caches). */
|
|
7467
8336
|
patternsVersion() {
|
|
7468
8337
|
const list = this.state.patterns;
|
|
@@ -7624,7 +8493,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7624
8493
|
});
|
|
7625
8494
|
return bg.id;
|
|
7626
8495
|
}
|
|
7627
|
-
|
|
8496
|
+
__init101() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
|
|
7628
8497
|
/**
|
|
7629
8498
|
* A small RGBA preview of a pixel layer over the canvas (or of its mask with `mask: true`),
|
|
7630
8499
|
* longest side `maxSide` px, point-sampled; `null` for layers without pixels.
|
|
@@ -7643,7 +8512,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7643
8512
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
7644
8513
|
const key = `${tw}x${th}:${ox},${oy}`;
|
|
7645
8514
|
let byKey = this.thumbCache.get(surface);
|
|
7646
|
-
const hit = _optionalChain([byKey, 'optionalAccess',
|
|
8515
|
+
const hit = _optionalChain([byKey, 'optionalAccess', _276 => _276.get, 'call', _277 => _277(key)]);
|
|
7647
8516
|
if (hit) return hit;
|
|
7648
8517
|
const out = new Uint8ClampedArray(tw * th * 4);
|
|
7649
8518
|
for (let y = 0; y < th; y++) {
|
|
@@ -7784,7 +8653,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7784
8653
|
if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
|
|
7785
8654
|
_chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "all", action);
|
|
7786
8655
|
} else if (ch === "filter-mask") {
|
|
7787
|
-
if (layer.type !== "smart" || !_optionalChain([layer, 'access',
|
|
8656
|
+
if (layer.type !== "smart" || !_optionalChain([layer, 'access', _278 => _278.smartFilters, 'optionalAccess', _279 => _279.mask])) {
|
|
7788
8657
|
throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
|
|
7789
8658
|
}
|
|
7790
8659
|
if (!_chunkUYXL6ZWQcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
|
|
@@ -7799,7 +8668,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7799
8668
|
if (!layer.visible) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
|
|
7800
8669
|
const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
|
|
7801
8670
|
const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
|
|
7802
|
-
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access',
|
|
8671
|
+
const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _280 => _280.locks, 'optionalAccess', _281 => _281.transparency]));
|
|
7803
8672
|
return { id, layer, channel: ch, offset, surface, lockTransparency };
|
|
7804
8673
|
}
|
|
7805
8674
|
/** The layer with its pixels (or mask) replaced by `surface`. */
|
|
@@ -7843,13 +8712,13 @@ var ImageEditorController = (_class12 = class {
|
|
|
7843
8712
|
blend: target.channel !== "pixels" ? "normal" : brush.blend,
|
|
7844
8713
|
lockTransparency: target.lockTransparency,
|
|
7845
8714
|
// In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
|
|
7846
|
-
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access',
|
|
8715
|
+
selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _282 => _282.state, 'access', _283 => _283.selection, 'optionalAccess', _284 => _284.bounds]) ? this.state.selection : null,
|
|
7847
8716
|
offset: target.offset
|
|
7848
8717
|
};
|
|
7849
8718
|
const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
7850
8719
|
if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
|
|
7851
8720
|
if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
|
|
7852
|
-
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess',
|
|
8721
|
+
const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _285 => _285.type]) === "gradient" ? _chunkEBDCRTZIcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
|
|
7853
8722
|
return new PaintStrokeSession(this, target, new (0, _chunkEBDCRTZIcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
|
|
7854
8723
|
}
|
|
7855
8724
|
/** A retouching stroke's start: its settings, what it samples and how it composites. */
|
|
@@ -7896,9 +8765,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
7896
8765
|
const steps = settings.historySteps;
|
|
7897
8766
|
const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
|
|
7898
8767
|
if (!entry) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
|
|
7899
|
-
const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess',
|
|
8768
|
+
const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _286 => _286.layer]);
|
|
7900
8769
|
if (!then) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
|
|
7901
|
-
const surface = target.channel === "mask" ? _optionalChain([then, 'access',
|
|
8770
|
+
const surface = target.channel === "mask" ? _optionalChain([then, 'access', _287 => _287.mask, 'optionalAccess', _288 => _288.surface]) : then.type === "pixel" ? then.surface : void 0;
|
|
7902
8771
|
if (!surface) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
|
|
7903
8772
|
const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
|
|
7904
8773
|
const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
|
|
@@ -7972,7 +8841,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
7972
8841
|
}
|
|
7973
8842
|
/** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
|
|
7974
8843
|
surfaceSource(surface, offset) {
|
|
7975
|
-
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access',
|
|
8844
|
+
return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _289 => _289.tiles, 'access', _290 => _290.get, 'call', _291 => _291(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _292 => _292.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
|
|
7976
8845
|
}
|
|
7977
8846
|
/** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
|
|
7978
8847
|
compositeSource(throughId, depth = null) {
|
|
@@ -8048,7 +8917,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8048
8917
|
paintStroke(init) {
|
|
8049
8918
|
if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("points must hold at least one { x, y } point.");
|
|
8050
8919
|
for (const p of init.points) {
|
|
8051
|
-
if (!Number.isFinite(_optionalChain([p, 'optionalAccess',
|
|
8920
|
+
if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _293 => _293.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _294 => _294.y]))) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
|
|
8052
8921
|
}
|
|
8053
8922
|
const session = this.beginStroke(init);
|
|
8054
8923
|
session.push(init.points);
|
|
@@ -8077,7 +8946,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8077
8946
|
*/
|
|
8078
8947
|
strokeSelection(options) {
|
|
8079
8948
|
const sel = this.state.selection;
|
|
8080
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8949
|
+
if (!_optionalChain([sel, 'optionalAccess', _295 => _295.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
|
|
8081
8950
|
const width = options.width;
|
|
8082
8951
|
if (!(width > 0 && width <= 250)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
|
|
8083
8952
|
const location = _nullishCoalesce(options.location, () => ( "outside"));
|
|
@@ -8094,7 +8963,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8094
8963
|
*/
|
|
8095
8964
|
cropToSelection() {
|
|
8096
8965
|
const sel = this.state.selection;
|
|
8097
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8966
|
+
if (!_optionalChain([sel, 'optionalAccess', _296 => _296.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
|
|
8098
8967
|
const crop = { ...sel.bounds };
|
|
8099
8968
|
this.setCrop(crop);
|
|
8100
8969
|
return crop;
|
|
@@ -8108,7 +8977,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8108
8977
|
*/
|
|
8109
8978
|
contentAwareFill(options = {}) {
|
|
8110
8979
|
const sel = this.state.selection;
|
|
8111
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
8980
|
+
if (!_optionalChain([sel, 'optionalAccess', _297 => _297.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
|
|
8112
8981
|
if (this.bitDepth !== 8) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Content-Aware Fill works on 8-bit documents for now; set_bit_depth 8 first, or use spot_heal.");
|
|
8113
8982
|
const output = _nullishCoalesce(options.output, () => ( "current"));
|
|
8114
8983
|
if (output !== "current" && output !== "new-layer") throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown output "${String(output)}"; use current or new-layer.`);
|
|
@@ -8154,7 +9023,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8154
9023
|
return { layerId: target.id, bounds: { ...b }, output };
|
|
8155
9024
|
}
|
|
8156
9025
|
/** The pixel clipboard (Copy / Cut), or null. */
|
|
8157
|
-
|
|
9026
|
+
__init102() {this.clipboard = null}
|
|
8158
9027
|
/** What Copy or Cut last put on the editor's clipboard, or null. */
|
|
8159
9028
|
getClipboard() {
|
|
8160
9029
|
return this.clipboard;
|
|
@@ -8173,8 +9042,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
8173
9042
|
*/
|
|
8174
9043
|
copyPixels(options = {}) {
|
|
8175
9044
|
const { width, height } = this.naturalSize;
|
|
8176
|
-
const sel = _optionalChain([this, 'access',
|
|
8177
|
-
const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9045
|
+
const sel = _optionalChain([this, 'access', _298 => _298.state, 'access', _299 => _299.selection, 'optionalAccess', _300 => _300.bounds]) ? this.state.selection : null;
|
|
9046
|
+
const rect = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _301 => _301.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
8178
9047
|
let data;
|
|
8179
9048
|
if (options.merged) {
|
|
8180
9049
|
data = new Uint8ClampedArray(this.compositePixels(rect).data);
|
|
@@ -8214,7 +9083,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8214
9083
|
pastePixels(mode = "new-layer", image = this.clipboard) {
|
|
8215
9084
|
if (!image) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
|
|
8216
9085
|
if (!PASTE_MODES.includes(mode)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
|
|
8217
|
-
const sel = _optionalChain([this, 'access',
|
|
9086
|
+
const sel = _optionalChain([this, 'access', _302 => _302.state, 'access', _303 => _303.selection, 'optionalAccess', _304 => _304.bounds]) ? this.state.selection : null;
|
|
8218
9087
|
if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
|
|
8219
9088
|
const { width, height } = this.naturalSize;
|
|
8220
9089
|
let x;
|
|
@@ -8223,7 +9092,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8223
9092
|
x = image.x;
|
|
8224
9093
|
y = image.y;
|
|
8225
9094
|
} else {
|
|
8226
|
-
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9095
|
+
const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _305 => _305.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
8227
9096
|
x = Math.round(frame.x + (frame.width - image.width) / 2);
|
|
8228
9097
|
y = Math.round(frame.y + (frame.height - image.height) / 2);
|
|
8229
9098
|
}
|
|
@@ -8240,8 +9109,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
8240
9109
|
if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("opacity must be from 0 to 1.");
|
|
8241
9110
|
const blend = _nullishCoalesce(_chunkUYXL6ZWQcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
|
|
8242
9111
|
const quickMask = target.channel === "quick-mask";
|
|
8243
|
-
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access',
|
|
8244
|
-
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
9112
|
+
const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _306 => _306.state, 'access', _307 => _307.selection, 'optionalAccess', _308 => _308.bounds]) ? this.state.selection : null)));
|
|
9113
|
+
const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _309 => _309.bounds]), () => ( { x: 0, y: 0, width, height }));
|
|
8245
9114
|
const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
|
|
8246
9115
|
const ones = new Float32Array(region.width * region.height);
|
|
8247
9116
|
if (sel) {
|
|
@@ -8366,7 +9235,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8366
9235
|
placeLayer(layers, node, where) {
|
|
8367
9236
|
if (where.aboveId) {
|
|
8368
9237
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.aboveId);
|
|
8369
|
-
if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9238
|
+
if (loc) return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _310 => _310.parent, 'optionalAccess', _311 => _311.id]), () => ( null)), loc.index + 1);
|
|
8370
9239
|
}
|
|
8371
9240
|
if (where.parentId) {
|
|
8372
9241
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, where.parentId);
|
|
@@ -8377,11 +9246,11 @@ var ImageEditorController = (_class12 = class {
|
|
|
8377
9246
|
const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
|
|
8378
9247
|
if (at < nodes.length) {
|
|
8379
9248
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[at].id);
|
|
8380
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9249
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _312 => _312.parent, 'optionalAccess', _313 => _313.id]), () => ( null)), loc.index);
|
|
8381
9250
|
}
|
|
8382
9251
|
if (nodes.length) {
|
|
8383
9252
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
|
|
8384
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9253
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _314 => _314.parent, 'optionalAccess', _315 => _315.id]), () => ( null)), loc.index + 1);
|
|
8385
9254
|
}
|
|
8386
9255
|
}
|
|
8387
9256
|
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
|
|
@@ -8420,7 +9289,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8420
9289
|
enabled: spec.enabled,
|
|
8421
9290
|
opacity: spec.opacity,
|
|
8422
9291
|
blend: spec.blend,
|
|
8423
|
-
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access',
|
|
9292
|
+
mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _316 => _316.state, 'access', _317 => _317.selection, 'optionalAccess', _318 => _318.bounds]) ? _chunkUYXL6ZWQcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
|
|
8424
9293
|
});
|
|
8425
9294
|
while (ids.has(layer.id)) layer.id = _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "adj");
|
|
8426
9295
|
const { width, height } = this.naturalSize;
|
|
@@ -8497,7 +9366,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8497
9366
|
const anchor = nodes[to];
|
|
8498
9367
|
const without = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, id, () => null);
|
|
8499
9368
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, without, anchor.id);
|
|
8500
|
-
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
9369
|
+
return _chunkHGTDMKNEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _319 => _319.parent, 'optionalAccess', _320 => _320.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
|
|
8501
9370
|
}
|
|
8502
9371
|
/** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
|
|
8503
9372
|
moveAdjustmentLayer(id, toIndex) {
|
|
@@ -8538,7 +9407,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8538
9407
|
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
8539
9408
|
}
|
|
8540
9409
|
get hasSelection() {
|
|
8541
|
-
return Boolean(_optionalChain([this, 'access',
|
|
9410
|
+
return Boolean(_optionalChain([this, 'access', _321 => _321.state, 'access', _322 => _322.selection, 'optionalAccess', _323 => _323.bounds]));
|
|
8542
9411
|
}
|
|
8543
9412
|
/** Returns the current canvas (composition) dimensions. */
|
|
8544
9413
|
getCanvasSize() {
|
|
@@ -8630,7 +9499,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8630
9499
|
const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
|
|
8631
9500
|
if (prev === next || prev && next && sameSelection(prev, next)) return false;
|
|
8632
9501
|
this.recordHistory();
|
|
8633
|
-
if (!next && _optionalChain([prev, 'optionalAccess',
|
|
9502
|
+
if (!next && _optionalChain([prev, 'optionalAccess', _324 => _324.bounds])) this.lastSelection = prev;
|
|
8634
9503
|
this.state.selection = next;
|
|
8635
9504
|
this.notify();
|
|
8636
9505
|
return true;
|
|
@@ -8645,7 +9514,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8645
9514
|
return this.setSelection(null);
|
|
8646
9515
|
}
|
|
8647
9516
|
/** The selection a Deselect cleared, for `reselect` (not saved, not part of history). */
|
|
8648
|
-
|
|
9517
|
+
__init103() {this.lastSelection = null}
|
|
8649
9518
|
/** Whether `reselect` has a selection to bring back. */
|
|
8650
9519
|
canReselect() {
|
|
8651
9520
|
const { width, height } = this.naturalSize;
|
|
@@ -8673,14 +9542,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
8673
9542
|
/** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
|
|
8674
9543
|
async growSelection(options = {}) {
|
|
8675
9544
|
const sel = this.state.selection;
|
|
8676
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9545
|
+
if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) return false;
|
|
8677
9546
|
const pixels = await this.requirePixels(options);
|
|
8678
9547
|
return this.setSelection(growSelection(pixels, sel, options));
|
|
8679
9548
|
}
|
|
8680
9549
|
/** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
|
|
8681
9550
|
async selectSimilar(options = {}) {
|
|
8682
9551
|
const sel = this.state.selection;
|
|
8683
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9552
|
+
if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) return false;
|
|
8684
9553
|
const pixels = await this.requirePixels(options);
|
|
8685
9554
|
return this.setSelection(selectSimilar(pixels, sel, options));
|
|
8686
9555
|
}
|
|
@@ -8747,6 +9616,53 @@ var ImageEditorController = (_class12 = class {
|
|
|
8747
9616
|
const pixels = await this.requirePixels(options);
|
|
8748
9617
|
return snapPolygonToEdges(pixels, points, options);
|
|
8749
9618
|
}
|
|
9619
|
+
/**
|
|
9620
|
+
* Quick Selection: each stroke (the brush's path in natural pixels) grows into the region it is
|
|
9621
|
+
* painted on, out to that region's edges, and is combined with the selection by `mode`; with
|
|
9622
|
+
* `replace`, the first stroke replaces it and the rest add, as the brush does. All strokes are
|
|
9623
|
+
* one undo step. Resolves to the resulting selection.
|
|
9624
|
+
*/
|
|
9625
|
+
async quickSelect(strokes, options = {}) {
|
|
9626
|
+
if (!strokes.length || strokes.some((s) => !s.length)) throw new Error("Pass at least one stroke, each with at least one point.");
|
|
9627
|
+
const { width, height } = this.naturalSize;
|
|
9628
|
+
for (const s of strokes) {
|
|
9629
|
+
if (!s.some((p) => p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
|
|
9630
|
+
throw new Error(`A stroke lies entirely outside the image (0..${width - 1}, 0..${height - 1}); paint over the area to select.`);
|
|
9631
|
+
}
|
|
9632
|
+
}
|
|
9633
|
+
const pixels = await this.requirePixels({ sample: options.sampleAllLayers === false ? "active-layer" : "composite" });
|
|
9634
|
+
const mode = _nullishCoalesce(options.mode, () => ( "replace"));
|
|
9635
|
+
let sel = _nullishCoalesce(this.state.selection, () => ( null));
|
|
9636
|
+
strokes.forEach((stroke, i) => {
|
|
9637
|
+
const m = mode === "replace" && i > 0 ? "add" : mode;
|
|
9638
|
+
const region = quickSelectStroke(pixels, stroke, { size: options.size, selection: sel, grow: m === "add", enhanceEdge: options.enhanceEdge });
|
|
9639
|
+
sel = _chunkUYXL6ZWQcjs.combineSelections.call(void 0, sel, region, m);
|
|
9640
|
+
});
|
|
9641
|
+
this.setSelection(sel, "replace");
|
|
9642
|
+
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
9643
|
+
}
|
|
9644
|
+
/**
|
|
9645
|
+
* Object Selection: the object inside `target.rect` (natural pixels; what is outside the box is
|
|
9646
|
+
* background) or under `target.point`, found by GrabCut (colour models of object and background
|
|
9647
|
+
* plus a graph cut along edges), combined with the selection by `mode` as one undo step.
|
|
9648
|
+
* Resolves to the resulting selection.
|
|
9649
|
+
*/
|
|
9650
|
+
async selectObject(target, options = {}) {
|
|
9651
|
+
const { width, height } = this.naturalSize;
|
|
9652
|
+
if ("rect" in target) {
|
|
9653
|
+
const r = target.rect;
|
|
9654
|
+
if (!(r.width > 0 && r.height > 0)) throw new Error("The box needs a positive width and height.");
|
|
9655
|
+
if (r.x >= width || r.y >= height || r.x + r.width <= 0 || r.y + r.height <= 0) {
|
|
9656
|
+
throw new Error(`The box lies outside the image (0..${width}, 0..${height}); draw it around the object.`);
|
|
9657
|
+
}
|
|
9658
|
+
} else if (!(target.point.x >= 0 && target.point.y >= 0 && target.point.x < width && target.point.y < height)) {
|
|
9659
|
+
throw new Error(`(${target.point.x}, ${target.point.y}) is outside the image (0..${width - 1}, 0..${height - 1}); click on the object.`);
|
|
9660
|
+
}
|
|
9661
|
+
const pixels = await this.requirePixels({ sample: options.sampleAllLayers === false ? "active-layer" : "composite" });
|
|
9662
|
+
const region = selectObjectIn(pixels, target, { enhanceEdge: options.enhanceEdge });
|
|
9663
|
+
this.setSelection(region, _nullishCoalesce(options.mode, () => ( "replace")));
|
|
9664
|
+
return _nullishCoalesce(this.state.selection, () => ( null));
|
|
9665
|
+
}
|
|
8750
9666
|
/**
|
|
8751
9667
|
* Supplies the pixels the selection tools sample (natural size RGBA), e.g. decoded in a worker
|
|
8752
9668
|
* or in a test; `null` goes back to reading the source image. Without a canvas (Node, workers)
|
|
@@ -8768,7 +9684,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8768
9684
|
try {
|
|
8769
9685
|
const canvas = await this.renderSource();
|
|
8770
9686
|
const ctx = canvas.getContext("2d");
|
|
8771
|
-
const data2 = _optionalChain([ctx, 'optionalAccess',
|
|
9687
|
+
const data2 = _optionalChain([ctx, 'optionalAccess', _327 => _327.getImageData, 'optionalCall', _328 => _328(0, 0, width, height)]);
|
|
8772
9688
|
if (data2 && data2.data && data2.data.length >= width * height * 4) {
|
|
8773
9689
|
base = { width, height, data: data2.data };
|
|
8774
9690
|
this.samplePixels = base;
|
|
@@ -8843,7 +9759,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8843
9759
|
/** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
|
|
8844
9760
|
modifySelection(op, radius) {
|
|
8845
9761
|
const sel = this.state.selection;
|
|
8846
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9762
|
+
if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) return false;
|
|
8847
9763
|
return this.setSelection(_chunkUYXL6ZWQcjs.modifySelection.call(void 0, sel, op, radius));
|
|
8848
9764
|
}
|
|
8849
9765
|
/**
|
|
@@ -8852,7 +9768,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8852
9768
|
*/
|
|
8853
9769
|
async refineSelection(params, options = {}) {
|
|
8854
9770
|
const sel = this.state.selection;
|
|
8855
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9771
|
+
if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) return false;
|
|
8856
9772
|
const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
|
|
8857
9773
|
return this.setSelection(refineSelection(pixels, sel, params));
|
|
8858
9774
|
}
|
|
@@ -8883,7 +9799,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8883
9799
|
let mask;
|
|
8884
9800
|
if (source === "selection") {
|
|
8885
9801
|
const sel = this.state.selection;
|
|
8886
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9802
|
+
if (!_optionalChain([sel, 'optionalAccess', _331 => _331.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
|
|
8887
9803
|
mask = sel;
|
|
8888
9804
|
} else if ("channelId" in source) {
|
|
8889
9805
|
mask = this.requireChannel(source.channelId).mask;
|
|
@@ -8907,7 +9823,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8907
9823
|
const canvas = this.renderer.createCanvas(w, h);
|
|
8908
9824
|
const ctx = canvas.getContext("2d");
|
|
8909
9825
|
if (ctx) ctx.drawImage(img, 0, 0, w, h);
|
|
8910
|
-
const data = _optionalChain([ctx, 'optionalAccess',
|
|
9826
|
+
const data = _optionalChain([ctx, 'optionalAccess', _332 => _332.getImageData, 'optionalCall', _333 => _333(0, 0, w, h)]);
|
|
8911
9827
|
if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
|
|
8912
9828
|
return { width: w, height: h, data: data.data };
|
|
8913
9829
|
}
|
|
@@ -8925,24 +9841,24 @@ var ImageEditorController = (_class12 = class {
|
|
|
8925
9841
|
const { width, height } = this.naturalSize;
|
|
8926
9842
|
const image = await this.toDataURL({ format: "image/png" });
|
|
8927
9843
|
const results = await provider.segment({ image, width, height, target: description, maxSegments: options.maxSegments, signal: options.signal });
|
|
8928
|
-
_optionalChain([options, 'access',
|
|
9844
|
+
_optionalChain([options, 'access', _334 => _334.signal, 'optionalAccess', _335 => _335.throwIfAborted, 'call', _336 => _336()]);
|
|
8929
9845
|
const decoded = [];
|
|
8930
9846
|
for (const r of _nullishCoalesce(results, () => ( []))) {
|
|
8931
9847
|
decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
|
|
8932
9848
|
}
|
|
8933
9849
|
const segments = decoded.map((r) => {
|
|
8934
9850
|
const one = segmentsToSelection(width, height, [r]);
|
|
8935
|
-
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess',
|
|
9851
|
+
return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _337 => _337.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
|
|
8936
9852
|
});
|
|
8937
9853
|
const mask = segmentsToSelection(width, height, decoded);
|
|
8938
9854
|
if (mask && options.beforeApply) {
|
|
8939
9855
|
const outlines = decoded.flatMap((r, i) => {
|
|
8940
9856
|
const rings = segmentationOutlines(r);
|
|
8941
|
-
const b = _optionalChain([segments, 'access',
|
|
9857
|
+
const b = _optionalChain([segments, 'access', _338 => _338[i], 'optionalAccess', _339 => _339.bounds]);
|
|
8942
9858
|
return rings.length ? rings : b ? [[{ x: b.x, y: b.y }, { x: b.x + b.width, y: b.y }, { x: b.x + b.width, y: b.y + b.height }, { x: b.x, y: b.y + b.height }]] : [];
|
|
8943
9859
|
});
|
|
8944
9860
|
await options.beforeApply(outlines);
|
|
8945
|
-
_optionalChain([options, 'access',
|
|
9861
|
+
_optionalChain([options, 'access', _340 => _340.signal, 'optionalAccess', _341 => _341.throwIfAborted, 'call', _342 => _342()]);
|
|
8946
9862
|
}
|
|
8947
9863
|
if (mask) this.shapeCommand(mask, options);
|
|
8948
9864
|
return { segments: segments.filter((s) => s.bounds) };
|
|
@@ -8975,7 +9891,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8975
9891
|
const view = this.state.maskView;
|
|
8976
9892
|
if (!view) return null;
|
|
8977
9893
|
const layer = this.getLayer(view.layerId);
|
|
8978
|
-
return _optionalChain([layer, 'optionalAccess',
|
|
9894
|
+
return _optionalChain([layer, 'optionalAccess', _343 => _343.mask]) && !layer.mask.source ? view : null;
|
|
8979
9895
|
}
|
|
8980
9896
|
/**
|
|
8981
9897
|
* Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
|
|
@@ -8998,7 +9914,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
8998
9914
|
if (!layer.mask) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
|
|
8999
9915
|
if (layer.mask.source) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is computed, not painted, so it has no mask view.`);
|
|
9000
9916
|
const cur = this.state.maskView;
|
|
9001
|
-
if (_optionalChain([cur, 'optionalAccess',
|
|
9917
|
+
if (_optionalChain([cur, 'optionalAccess', _344 => _344.layerId]) !== id || cur.mode !== mode) {
|
|
9002
9918
|
this.state.maskView = { layerId: id, mode };
|
|
9003
9919
|
this.notify();
|
|
9004
9920
|
}
|
|
@@ -9010,7 +9926,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9010
9926
|
return _nullishCoalesce(this.state.channels, () => ( []));
|
|
9011
9927
|
}
|
|
9012
9928
|
getChannel(id) {
|
|
9013
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
9929
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _345 => _345.state, 'access', _346 => _346.channels, 'optionalAccess', _347 => _347.find, 'call', _348 => _348((c) => c.id === id)]), () => ( null));
|
|
9014
9930
|
}
|
|
9015
9931
|
requireChannel(id) {
|
|
9016
9932
|
const channel = this.getChannel(id);
|
|
@@ -9039,14 +9955,14 @@ var ImageEditorController = (_class12 = class {
|
|
|
9039
9955
|
*/
|
|
9040
9956
|
saveSelection(options = {}) {
|
|
9041
9957
|
const sel = this.state.selection;
|
|
9042
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
9958
|
+
if (!_optionalChain([sel, 'optionalAccess', _349 => _349.bounds])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
|
|
9043
9959
|
const { width, height } = this.naturalSize;
|
|
9044
9960
|
const sized = sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height);
|
|
9045
9961
|
const channels = [...this.getChannels()];
|
|
9046
9962
|
if (options.channelId !== void 0) {
|
|
9047
9963
|
const existing = this.requireChannel(options.channelId);
|
|
9048
9964
|
const mask = _nullishCoalesce(_chunkUYXL6ZWQcjs.combineSelections.call(void 0, existing.mask.bounds ? existing.mask : null, sized, _nullishCoalesce(options.mode, () => ( "replace"))), () => ( _chunkUYXL6ZWQcjs.createSelectionMask.call(void 0, width, height)));
|
|
9049
|
-
const next = { ...existing, mask, ..._optionalChain([options, 'access',
|
|
9965
|
+
const next = { ...existing, mask, ..._optionalChain([options, 'access', _350 => _350.name, 'optionalAccess', _351 => _351.trim, 'call', _352 => _352()]) ? { name: options.name.trim() } : {} };
|
|
9050
9966
|
this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
|
|
9051
9967
|
return next;
|
|
9052
9968
|
}
|
|
@@ -9057,7 +9973,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9057
9973
|
const channels = this.getChannels();
|
|
9058
9974
|
const channel = {
|
|
9059
9975
|
id: this.newChannelId(),
|
|
9060
|
-
name: _optionalChain([name, 'optionalAccess',
|
|
9976
|
+
name: _optionalChain([name, 'optionalAccess', _353 => _353.trim, 'call', _354 => _354()]) || `Alpha ${channels.length + 1}`,
|
|
9061
9977
|
mask,
|
|
9062
9978
|
color: DEFAULT_CHANNEL_COLOR,
|
|
9063
9979
|
opacity: 0.5,
|
|
@@ -9102,7 +10018,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9102
10018
|
/** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
|
|
9103
10019
|
duplicateChannel(id, name) {
|
|
9104
10020
|
const channel = this.requireChannel(id);
|
|
9105
|
-
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess',
|
|
10021
|
+
const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _355 => _355.trim, 'call', _356 => _356()]) || `${channel.name} copy` };
|
|
9106
10022
|
const channels = [...this.getChannels()];
|
|
9107
10023
|
channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
|
|
9108
10024
|
this.setChannels(channels);
|
|
@@ -9133,7 +10049,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9133
10049
|
quickMaskSurface() {
|
|
9134
10050
|
const { width, height } = this.naturalSize;
|
|
9135
10051
|
const sel = this.state.selection;
|
|
9136
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10052
|
+
if (!_optionalChain([sel, 'optionalAccess', _357 => _357.bounds])) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, 0);
|
|
9137
10053
|
return (sel.width === width && sel.height === height ? sel : _chunkUYXL6ZWQcjs.resizeSelection.call(void 0, sel, width, height)).surface;
|
|
9138
10054
|
}
|
|
9139
10055
|
/** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
|
|
@@ -9154,7 +10070,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9154
10070
|
*/
|
|
9155
10071
|
applySelectionAsLayerMask(layerId, props = {}) {
|
|
9156
10072
|
const sel = this.state.selection;
|
|
9157
|
-
if (!_optionalChain([sel, 'optionalAccess',
|
|
10073
|
+
if (!_optionalChain([sel, 'optionalAccess', _358 => _358.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
|
|
9158
10074
|
return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
|
|
9159
10075
|
}
|
|
9160
10076
|
setLayerMask(layerId, mask, commitToHistory = true) {
|
|
@@ -9194,7 +10110,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9194
10110
|
/** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
|
|
9195
10111
|
layerMaskCoverage(layerId) {
|
|
9196
10112
|
const layer = this.getLayer(layerId);
|
|
9197
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
10113
|
+
if (!_optionalChain([layer, 'optionalAccess', _359 => _359.mask]) || layer.mask.source) return null;
|
|
9198
10114
|
const { width, height } = this.naturalSize;
|
|
9199
10115
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
9200
10116
|
const oy = layer.type === "pixel" ? layer.offset.y : 0;
|
|
@@ -9229,7 +10145,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9229
10145
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
9230
10146
|
const next = { ...l };
|
|
9231
10147
|
if (_chunkUYXL6ZWQcjs.isDefaultDepthMask.call(void 0, merged)) {
|
|
9232
|
-
if (_optionalChain([next, 'access',
|
|
10148
|
+
if (_optionalChain([next, 'access', _360 => _360.mask, 'optionalAccess', _361 => _361.source])) delete next.mask;
|
|
9233
10149
|
} else next.mask = _chunkUYXL6ZWQcjs.depthRasterMask.call(void 0, merged);
|
|
9234
10150
|
return next;
|
|
9235
10151
|
});
|
|
@@ -9239,7 +10155,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9239
10155
|
resetDepthMask() {
|
|
9240
10156
|
this.recordHistory();
|
|
9241
10157
|
const target = this.developLayer();
|
|
9242
|
-
if (_optionalChain([target, 'optionalAccess',
|
|
10158
|
+
if (_optionalChain([target, 'optionalAccess', _362 => _362.mask, 'optionalAccess', _363 => _363.source])) {
|
|
9243
10159
|
this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
|
|
9244
10160
|
const next = { ...l };
|
|
9245
10161
|
delete next.mask;
|
|
@@ -9251,7 +10167,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9251
10167
|
// --- Annotations & Layers ---
|
|
9252
10168
|
/** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
|
|
9253
10169
|
annotationLayer(id) {
|
|
9254
|
-
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess',
|
|
10170
|
+
return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkUYXL6ZWQcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _364 => _364.id]) === id);
|
|
9255
10171
|
}
|
|
9256
10172
|
/** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
|
|
9257
10173
|
annotationEnv() {
|
|
@@ -9269,7 +10185,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9269
10185
|
const fullAnnotation = { ...annotation, id };
|
|
9270
10186
|
const layer = _chunkUYXL6ZWQcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
|
|
9271
10187
|
const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
|
|
9272
|
-
this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access',
|
|
10188
|
+
this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _365 => _365.parent, 'optionalAccess', _366 => _366.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
|
|
9273
10189
|
this.state.selectedAnnotationId = id;
|
|
9274
10190
|
this.notify();
|
|
9275
10191
|
return id;
|
|
@@ -9349,7 +10265,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9349
10265
|
this.notify();
|
|
9350
10266
|
}
|
|
9351
10267
|
// --- Rendering & Export ---
|
|
9352
|
-
|
|
10268
|
+
__init104() {this.blankSource = null}
|
|
9353
10269
|
/**
|
|
9354
10270
|
* What the renderer draws from: the source image, or, for a document without one (an opened
|
|
9355
10271
|
* PSD, a v3 document loaded on its own), a transparent canvas of the document size, since every
|
|
@@ -9392,7 +10308,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9392
10308
|
await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
|
|
9393
10309
|
...options,
|
|
9394
10310
|
// The clone source follows the brush cursor (both editors pass it).
|
|
9395
|
-
cloneSourceMarker: _optionalChain([options, 'optionalAccess',
|
|
10311
|
+
cloneSourceMarker: _optionalChain([options, 'optionalAccess', _367 => _367.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _368 => _368.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
|
|
9396
10312
|
dirty: dirty === "all" ? void 0 : dirty,
|
|
9397
10313
|
checkpointLayerId: this.state.activeLayerId
|
|
9398
10314
|
});
|
|
@@ -9405,7 +10321,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9405
10321
|
return this.renderer.createCanvas(1, 1);
|
|
9406
10322
|
}
|
|
9407
10323
|
this.syncViews();
|
|
9408
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
10324
|
+
if (_optionalChain([options, 'optionalAccess', _369 => _369.layerIds])) {
|
|
9409
10325
|
const keep = new Set(options.layerIds);
|
|
9410
10326
|
const layers = _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
|
|
9411
10327
|
return this.renderer.renderExport(source, { ...this.state, layers }, options);
|
|
@@ -9559,7 +10475,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9559
10475
|
let px2 = await this.decodeImage(newDataUrl);
|
|
9560
10476
|
if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
|
|
9561
10477
|
const data = new Uint8ClampedArray(px2.data);
|
|
9562
|
-
const sel = _optionalChain([this, 'access',
|
|
10478
|
+
const sel = _optionalChain([this, 'access', _370 => _370.state, 'access', _371 => _371.selection, 'optionalAccess', _372 => _372.bounds]) ? this.state.selection : null;
|
|
9563
10479
|
if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
|
|
9564
10480
|
return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
|
|
9565
10481
|
}
|
|
@@ -9606,7 +10522,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9606
10522
|
}
|
|
9607
10523
|
/** Font families the shaper offers (generic families at least). */
|
|
9608
10524
|
listFonts() {
|
|
9609
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
10525
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _373 => _373.getTextShaper, 'call', _374 => _374(), 'optionalAccess', _375 => _375.families, 'optionalCall', _376 => _376()]), () => ( ["sans-serif", "serif", "monospace"]));
|
|
9610
10526
|
}
|
|
9611
10527
|
typeInfo(id) {
|
|
9612
10528
|
const layer = _chunkUYXL6ZWQcjs.requireTypeLayer.call(void 0, this.state.layers, id);
|
|
@@ -9680,8 +10596,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
9680
10596
|
const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
|
|
9681
10597
|
const { width, height } = this.naturalSize;
|
|
9682
10598
|
const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, layer.surface);
|
|
9683
|
-
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
9684
|
-
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess',
|
|
10599
|
+
const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _377 => _377.x]), () => ( 0)));
|
|
10600
|
+
const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _378 => _378.y]), () => ( 0)));
|
|
9685
10601
|
const x1 = Math.min(width, b ? b.x + b.width : 0);
|
|
9686
10602
|
const y1 = Math.min(height, b ? b.y + b.height : 0);
|
|
9687
10603
|
let mask;
|
|
@@ -9858,7 +10774,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9858
10774
|
if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
|
|
9859
10775
|
const missing = _chunkBRKVNXDZcjs.layoutText.call(void 0, layer, shaper).missingFonts;
|
|
9860
10776
|
if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
|
|
9861
|
-
const first = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
10777
|
+
const first = _nullishCoalesce(_optionalChain([layer, 'access', _379 => _379.runs, 'access', _380 => _380.find, 'call', _381 => _381((r) => r.length > 0), 'optionalAccess', _382 => _382.style]), () => ( _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE));
|
|
9862
10778
|
const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
|
|
9863
10779
|
const shape = _chunkUYXL6ZWQcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
|
|
9864
10780
|
const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
|
|
@@ -9891,7 +10807,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
9891
10807
|
// --- Shape layers ---
|
|
9892
10808
|
/** What shape rendering needs: the canvas size and the document's patterns. */
|
|
9893
10809
|
shapeEnv() {
|
|
9894
|
-
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
10810
|
+
return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _383 => _383.state, 'access', _384 => _384.patterns, 'optionalAccess', _385 => _385.find, 'call', _386 => _386((p) => p.id === id)]), () => ( null)) };
|
|
9895
10811
|
}
|
|
9896
10812
|
/** One component from tool or UI input (validated). */
|
|
9897
10813
|
componentFrom(spec, path) {
|
|
@@ -9934,9 +10850,9 @@ var ImageEditorController = (_class12 = class {
|
|
|
9934
10850
|
* open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
|
|
9935
10851
|
*/
|
|
9936
10852
|
addShapeLayer(init) {
|
|
9937
|
-
const specs = _optionalChain([init, 'access',
|
|
9938
|
-
if (_optionalChain([init, 'access',
|
|
9939
|
-
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access',
|
|
10853
|
+
const specs = _optionalChain([init, 'access', _387 => _387.components, 'optionalAccess', _388 => _388.length]) ? init.components : [init];
|
|
10854
|
+
if (_optionalChain([init, 'access', _389 => _389.components, 'optionalAccess', _390 => _390.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
|
|
10855
|
+
const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _391 => _391.components, 'optionalAccess', _392 => _392.length]) ? `components[${i}].` : ""));
|
|
9940
10856
|
const stroke = init.stroke ? _chunkUYXL6ZWQcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
|
|
9941
10857
|
const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
|
|
9942
10858
|
const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkUYXL6ZWQcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkUYXL6ZWQcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
|
|
@@ -10047,7 +10963,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10047
10963
|
if (layer.locks) next.locks = layer.locks;
|
|
10048
10964
|
if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
|
|
10049
10965
|
} else if (layer.type === "pixel") {
|
|
10050
|
-
if (!_optionalChain([layer, 'access',
|
|
10966
|
+
if (!_optionalChain([layer, 'access', _393 => _393.filters, 'optionalAccess', _394 => _394.length])) throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
|
|
10051
10967
|
_chunkUYXL6ZWQcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
|
|
10052
10968
|
const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
|
|
10053
10969
|
const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -10066,7 +10982,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10066
10982
|
return this.rasterizeSmartObject(id);
|
|
10067
10983
|
} else if (layer.type === "shape" || layer.type === "type") {
|
|
10068
10984
|
next = layer.type === "shape" ? _chunkUYXL6ZWQcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkUYXL6ZWQcjs.typeAsPixelLayer.call(void 0, layer);
|
|
10069
|
-
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access',
|
|
10985
|
+
if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _395 => _395.annotation, 'optionalAccess', _396 => _396.id])) this.state.selectedAnnotationId = null;
|
|
10070
10986
|
} else {
|
|
10071
10987
|
throw new (0, _chunkUYXL6ZWQcjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
|
|
10072
10988
|
}
|
|
@@ -10080,8 +10996,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
10080
10996
|
const doc = this.state.colorProfile;
|
|
10081
10997
|
const p = resolveProfile(doc);
|
|
10082
10998
|
const m = this.state.colorMode;
|
|
10083
|
-
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess',
|
|
10084
|
-
if (_optionalChain([m, 'optionalAccess',
|
|
10999
|
+
const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _397 => _397.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _398 => _398.mode]), () => ( "rgb")) };
|
|
11000
|
+
if (_optionalChain([m, 'optionalAccess', _399 => _399.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
|
|
10085
11001
|
return out;
|
|
10086
11002
|
}
|
|
10087
11003
|
/**
|
|
@@ -10171,7 +11087,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10171
11087
|
const textEnv = this.textEnv();
|
|
10172
11088
|
const walk = (layers) => layers.map((l) => {
|
|
10173
11089
|
let next2 = l;
|
|
10174
|
-
if (_optionalChain([l, 'access',
|
|
11090
|
+
if (_optionalChain([l, 'access', _400 => _400.effects, 'optionalAccess', _401 => _401.items, 'access', _402 => _402.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
|
|
10175
11091
|
if (l.type === "group") {
|
|
10176
11092
|
if (next2 !== l) converted.push(l.id);
|
|
10177
11093
|
return { ...next2, children: walk(l.children) };
|
|
@@ -10355,8 +11271,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
10355
11271
|
else delete s.bitDepth;
|
|
10356
11272
|
delete s.colorProfile;
|
|
10357
11273
|
delete s.colorMode;
|
|
10358
|
-
if (_optionalChain([result, 'access',
|
|
10359
|
-
else if (_optionalChain([result, 'access',
|
|
11274
|
+
if (_optionalChain([result, 'access', _403 => _403.sourceMode, 'optionalAccess', _404 => _404.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
|
|
11275
|
+
else if (_optionalChain([result, 'access', _405 => _405.sourceMode, 'optionalAccess', _406 => _406.mode]) === "lab") s.colorMode = { mode: "lab" };
|
|
10360
11276
|
else if (result.iccProfile) {
|
|
10361
11277
|
try {
|
|
10362
11278
|
const doc = documentProfile(result.iccProfile);
|
|
@@ -10420,7 +11336,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10420
11336
|
const compositor = new (0, _chunkUYXL6ZWQcjs.LayerCompositor)();
|
|
10421
11337
|
const bakeMask = (layer) => {
|
|
10422
11338
|
const mask = layer.mask;
|
|
10423
|
-
if (!_optionalChain([mask, 'optionalAccess',
|
|
11339
|
+
if (!_optionalChain([mask, 'optionalAccess', _407 => _407.source])) return mask;
|
|
10424
11340
|
add2("Parametric (depth) masks were baked into pixel masks", layer.name);
|
|
10425
11341
|
const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
|
|
10426
11342
|
const ox = layer.type === "pixel" ? layer.offset.x : 0;
|
|
@@ -10437,7 +11353,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10437
11353
|
};
|
|
10438
11354
|
const prepare = async (layer) => {
|
|
10439
11355
|
const p = await prepareLayer(layer);
|
|
10440
|
-
if (_optionalChain([p, 'optionalAccess',
|
|
11356
|
+
if (_optionalChain([p, 'optionalAccess', _408 => _408.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
|
|
10441
11357
|
return p;
|
|
10442
11358
|
};
|
|
10443
11359
|
const prepareLayer = async (layer) => {
|
|
@@ -10480,7 +11396,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10480
11396
|
return out2;
|
|
10481
11397
|
}
|
|
10482
11398
|
if (layer.type === "shape" || layer.type === "type") {
|
|
10483
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
11399
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _409 => _409.missingFonts, 'optionalAccess', _410 => _410.length])) add2(`Type layers drawn with a fallback for missing fonts (${layer.missingFonts.join(", ")}) keep the font names, so Photoshop may draw them differently`, layer.name);
|
|
10484
11400
|
const out2 = { ...layer };
|
|
10485
11401
|
const mask2 = bakeMask(layer);
|
|
10486
11402
|
if (mask2) out2.mask = mask2;
|
|
@@ -10499,7 +11415,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10499
11415
|
out.surface = this.surfaceOf(layer);
|
|
10500
11416
|
delete out.source;
|
|
10501
11417
|
}
|
|
10502
|
-
const active = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
11418
|
+
const active = _nullishCoalesce(_optionalChain([layer, 'access', _411 => _411.filters, 'optionalAccess', _412 => _412.filter, 'call', _413 => _413(_chunkUYXL6ZWQcjs.isActiveFilter)]), () => ( []));
|
|
10503
11419
|
if (active.length) {
|
|
10504
11420
|
add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
|
|
10505
11421
|
const content = { ...out, visible: true, opacity: 1, blend: "normal" };
|
|
@@ -10510,7 +11426,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10510
11426
|
const data = compositor.composite([content], canvas, sources);
|
|
10511
11427
|
out = { ...out, surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
|
|
10512
11428
|
}
|
|
10513
|
-
if (_optionalChain([layer, 'access',
|
|
11429
|
+
if (_optionalChain([layer, 'access', _414 => _414.filters, 'optionalAccess', _415 => _415.some, 'call', _416 => _416((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
|
|
10514
11430
|
delete out.filters;
|
|
10515
11431
|
const mask = bakeMask(layer);
|
|
10516
11432
|
if (mask) out.mask = mask;
|
|
@@ -10574,7 +11490,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10574
11490
|
);
|
|
10575
11491
|
}
|
|
10576
11492
|
layers = resizeLegacyMasks(layers, prev, next.dimensions);
|
|
10577
|
-
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
11493
|
+
const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _417 => _417.state, 'access', _418 => _418.patterns, 'optionalAccess', _419 => _419.find, 'call', _420 => _420((p) => p.id === pid)]), () => ( null)) };
|
|
10578
11494
|
for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
|
|
10579
11495
|
if (l.type === "annotation") {
|
|
10580
11496
|
layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
|
|
@@ -10583,7 +11499,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10583
11499
|
const scaled = a ? scaleAnnotation(a, sx, sy) : null;
|
|
10584
11500
|
const fromAnnotation = scaled ? _chunkUYXL6ZWQcjs.shapeFromAnnotation.call(void 0, scaled) : null;
|
|
10585
11501
|
const m = [sx, 0, 0, sy, 0, 0];
|
|
10586
|
-
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess',
|
|
11502
|
+
const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _421 => _421.components]), () => ( _chunkUYXL6ZWQcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
|
|
10587
11503
|
const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
|
|
10588
11504
|
if (scaled && fromAnnotation) moved.annotation = scaled;
|
|
10589
11505
|
else delete moved.annotation;
|
|
@@ -10601,7 +11517,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10601
11517
|
this.notify();
|
|
10602
11518
|
}
|
|
10603
11519
|
toJSON(options) {
|
|
10604
|
-
const root = _optionalChain([this, 'access',
|
|
11520
|
+
const root = _optionalChain([this, 'access', _422 => _422.contentsStack, 'access', _423 => _423[0], 'optionalAccess', _424 => _424.saved]);
|
|
10605
11521
|
const current = this.state;
|
|
10606
11522
|
const element = this.imageElement;
|
|
10607
11523
|
if (root) {
|
|
@@ -10612,8 +11528,8 @@ var ImageEditorController = (_class12 = class {
|
|
|
10612
11528
|
let out;
|
|
10613
11529
|
try {
|
|
10614
11530
|
out = this.serializeState();
|
|
10615
|
-
if (_optionalChain([this, 'access',
|
|
10616
|
-
if (_optionalChain([this, 'access',
|
|
11531
|
+
if (_optionalChain([this, 'access', _425 => _425.state, 'access', _426 => _426.selection, 'optionalAccess', _427 => _427.bounds])) out.selection = _chunkUYXL6ZWQcjs.serializeSelection.call(void 0, this.state.selection);
|
|
11532
|
+
if (_optionalChain([this, 'access', _428 => _428.state, 'access', _429 => _429.channels, 'optionalAccess', _430 => _430.length])) out.channels = serializeChannels(this.state.channels);
|
|
10617
11533
|
} finally {
|
|
10618
11534
|
if (root) {
|
|
10619
11535
|
this.state = current;
|
|
@@ -10662,7 +11578,7 @@ var ImageEditorController = (_class12 = class {
|
|
|
10662
11578
|
this.notify();
|
|
10663
11579
|
}
|
|
10664
11580
|
/** Problems found by the last `loadJSON` / `initialState` of a v3 document (unreadable layers or assets). */
|
|
10665
|
-
|
|
11581
|
+
__init105() {this.lastLoadProblems = []}
|
|
10666
11582
|
applyStored(raw) {
|
|
10667
11583
|
const s = this.state;
|
|
10668
11584
|
const data = migrateSerializedImageEditorState(raw);
|
|
@@ -10727,10 +11643,10 @@ var ImageEditorController = (_class12 = class {
|
|
|
10727
11643
|
serializeState() {
|
|
10728
11644
|
const { width, height } = this.naturalSize;
|
|
10729
11645
|
const view = _chunkUYXL6ZWQcjs.legacyView.call(void 0, this.stack(), width, height, null);
|
|
10730
|
-
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access',
|
|
11646
|
+
if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _431 => _431.state, 'access', _432 => _432.patterns, 'optionalAccess', _433 => _433.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
|
|
10731
11647
|
return {
|
|
10732
11648
|
// States without adjustment layers keep schema 1, so they round-trip unchanged.
|
|
10733
|
-
version: _optionalChain([view, 'access',
|
|
11649
|
+
version: _optionalChain([view, 'access', _434 => _434.adjustments, 'access', _435 => _435.layers, 'optionalAccess', _436 => _436.length]) ? 2 : 1,
|
|
10734
11650
|
crop: this.state.crop ? { ...this.state.crop } : null,
|
|
10735
11651
|
transform: { ...this.state.transform },
|
|
10736
11652
|
adjustments: serializeAdjustments(view.adjustments),
|
|
@@ -10755,17 +11671,17 @@ var ImageEditorController = (_class12 = class {
|
|
|
10755
11671
|
};
|
|
10756
11672
|
if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
|
|
10757
11673
|
if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
|
|
10758
|
-
if (_optionalChain([this, 'access',
|
|
11674
|
+
if (_optionalChain([this, 'access', _437 => _437.state, 'access', _438 => _438.patterns, 'optionalAccess', _439 => _439.length])) out.patterns = _chunkUYXL6ZWQcjs.serializePatterns.call(void 0, this.state.patterns);
|
|
10759
11675
|
if (smartContents) out.smartContents = smartContents;
|
|
10760
11676
|
if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
|
|
10761
11677
|
if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
|
|
10762
11678
|
if (this.state.colorMode) out.colorMode = serializeColorMode(this.state.colorMode);
|
|
10763
11679
|
return out;
|
|
10764
11680
|
}
|
|
10765
|
-
},
|
|
11681
|
+
}, _class13);
|
|
10766
11682
|
function serializeAdjustments(adjustments) {
|
|
10767
11683
|
const out = { ...adjustments };
|
|
10768
|
-
if (_optionalChain([out, 'access',
|
|
11684
|
+
if (_optionalChain([out, 'access', _440 => _440.layers, 'optionalAccess', _441 => _441.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
|
|
10769
11685
|
else delete out.layers;
|
|
10770
11686
|
if (_chunkUYXL6ZWQcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION) {
|
|
10771
11687
|
delete out.process;
|
|
@@ -10801,11 +11717,11 @@ function withDevelop(layer, partial) {
|
|
|
10801
11717
|
return { ...layer, filters };
|
|
10802
11718
|
}
|
|
10803
11719
|
function withBlur(layer, radius) {
|
|
10804
|
-
const existing = _optionalChain([layer, 'access',
|
|
11720
|
+
const existing = _optionalChain([layer, 'access', _442 => _442.filters, 'optionalAccess', _443 => _443.find, 'call', _444 => _444((f) => f.kind === "blur")]);
|
|
10805
11721
|
const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
|
|
10806
11722
|
if (radius > 0) {
|
|
10807
11723
|
filters.push({
|
|
10808
|
-
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess',
|
|
11724
|
+
id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _445 => _445.id]), () => ( (layer.source === "document" ? _chunkUYXL6ZWQcjs.BLUR_FILTER_ID : _chunkUYXL6ZWQcjs.newLayerId.call(void 0, "flt")))),
|
|
10809
11725
|
kind: "blur",
|
|
10810
11726
|
enabled: true,
|
|
10811
11727
|
radius
|
|
@@ -10901,7 +11817,7 @@ function collectStateTiles(layers, into) {
|
|
|
10901
11817
|
if (l.type === "shape" || l.type === "type") _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
|
|
10902
11818
|
if (l.type === "smart") {
|
|
10903
11819
|
_chunkCWM3CUUXcjs.collectTiles.call(void 0, l.surface, into);
|
|
10904
|
-
if (_optionalChain([l, 'access',
|
|
11820
|
+
if (_optionalChain([l, 'access', _446 => _446.smartFilters, 'optionalAccess', _447 => _447.mask])) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
|
|
10905
11821
|
if (l.contents.raster) _chunkCWM3CUUXcjs.collectTiles.call(void 0, l.contents.raster, into);
|
|
10906
11822
|
if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
|
|
10907
11823
|
}
|
|
@@ -10933,7 +11849,7 @@ function pixelsOnly(layers) {
|
|
|
10933
11849
|
for (const l of layers) {
|
|
10934
11850
|
if (l.type === "adjustment") continue;
|
|
10935
11851
|
if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
|
|
10936
|
-
else if (l.type === "pixel" && _optionalChain([l, 'access',
|
|
11852
|
+
else if (l.type === "pixel" && _optionalChain([l, 'access', _448 => _448.filters, 'optionalAccess', _449 => _449.length])) {
|
|
10937
11853
|
const p = { ...l };
|
|
10938
11854
|
delete p.filters;
|
|
10939
11855
|
out.push(p);
|
|
@@ -10999,7 +11915,7 @@ function toHex(c) {
|
|
|
10999
11915
|
return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
|
|
11000
11916
|
}
|
|
11001
11917
|
function normalizeSelection(mask) {
|
|
11002
|
-
return _optionalChain([mask, 'optionalAccess',
|
|
11918
|
+
return _optionalChain([mask, 'optionalAccess', _450 => _450.bounds]) ? mask : null;
|
|
11003
11919
|
}
|
|
11004
11920
|
function sameSelection(a, b) {
|
|
11005
11921
|
if (a.width !== b.width || a.height !== b.height) return false;
|
|
@@ -11209,7 +12125,7 @@ function loadImageEditorDocument(input) {
|
|
|
11209
12125
|
}
|
|
11210
12126
|
const state = { version: 1, ...result.value };
|
|
11211
12127
|
if (isV2) {
|
|
11212
|
-
if (_optionalChain([state, 'access',
|
|
12128
|
+
if (_optionalChain([state, 'access', _451 => _451.adjustments, 'access', _452 => _452.layers, 'optionalAccess', _453 => _453.length])) state.version = 2;
|
|
11213
12129
|
result.report.version = 2;
|
|
11214
12130
|
}
|
|
11215
12131
|
if (state.selection === void 0) delete state.selection;
|
|
@@ -11417,7 +12333,7 @@ function findAdjustmentControl(id) {
|
|
|
11417
12333
|
}
|
|
11418
12334
|
function findLayerControl(kind, id) {
|
|
11419
12335
|
if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
|
|
11420
|
-
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access',
|
|
12336
|
+
return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _454 => _454[kind], 'optionalAccess', _455 => _455.find, 'call', _456 => _456((c) => c.id === id)]);
|
|
11421
12337
|
}
|
|
11422
12338
|
function clampControlValue(spec, v) {
|
|
11423
12339
|
if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
|
|
@@ -11634,7 +12550,7 @@ var DEPTH_MASK_CONTROLS = [
|
|
|
11634
12550
|
// src/image-editor/playback.ts
|
|
11635
12551
|
var IMAGE_PLAYBACK_KIND = "layer";
|
|
11636
12552
|
var PAINT = /^(paint_stroke|clone_stamp|heal_brush|spot_heal|dodge|burn|sponge|smudge|blur_stroke|sharpen_stroke|history_brush|set_clone_source|set_clone_transform|fill_pixels|clear_pixels|set_paint|set_retouch_options|load_mixer_brush|clean_mixer_brush)$/;
|
|
11637
|
-
var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|select_line|magic_wand|grow_selection|select_similar|reselect|select_layer_transparency|select_color_range|load_selection_from_image|load_selection_from_mask|set_selection_display|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy|stroke_selection|content_aware_fill|copy_pixels|cut_pixels|paste_pixels|save_selection|load_selection_from_channel|set_channel_properties|duplicate_channel|delete_channel|load_channel_from_image|set_quick_mask|path_to_selection|select_text_shape)$/;
|
|
12553
|
+
var SELECT = /^(select_region|select_subject|select_by_color|select_all|deselect|invert_selection|select_rect|select_ellipse|select_polygon|quick_select|select_object|select_line|magic_wand|grow_selection|select_similar|reselect|select_layer_transparency|select_color_range|load_selection_from_image|load_selection_from_mask|set_selection_display|modify_selection|refine_selection|transform_selection|apply_selection_as_mask|layer_via_copy|stroke_selection|content_aware_fill|copy_pixels|cut_pixels|paste_pixels|save_selection|load_selection_from_channel|set_channel_properties|duplicate_channel|delete_channel|load_channel_from_image|set_quick_mask|path_to_selection|select_text_shape)$/;
|
|
11638
12554
|
var ANNOTATE = /^(add_shape_layer|update_shape|add_shape_component|set_shape_component|remove_shape_component|merge_shape_components|add_text_layer|set_text|set_text_style|set_paragraph_style|set_text_frame|set_text_orientation|convert_text_to_shape)$/;
|
|
11639
12555
|
var CROP = /^(set_crop|crop_to_selection|reset_crop|set_rotation|flip_image|transform_layer|warp_layer|flip_layer|offset_layer)$/;
|
|
11640
12556
|
var ADJUST = /^(set_adjustments|add_adjustment_layer|update_adjustment_layer|remove_adjustment_layer|move_adjustment_layer)$/;
|
|
@@ -11756,6 +12672,8 @@ var SELECTION_TOOLS = [
|
|
|
11756
12672
|
{ id: "lasso", label: "Lasso" },
|
|
11757
12673
|
{ id: "polygon", label: "Polygonal Lasso" },
|
|
11758
12674
|
{ id: "magnetic", label: "Magnetic Lasso" },
|
|
12675
|
+
{ id: "quick", label: "Quick Selection" },
|
|
12676
|
+
{ id: "object", label: "Object Selection" },
|
|
11759
12677
|
{ id: "range", label: "Color Range" },
|
|
11760
12678
|
{ id: "type", label: "Type Mask" },
|
|
11761
12679
|
{ id: "type-vertical", label: "Vertical Type Mask" }
|
|
@@ -11793,6 +12711,11 @@ var DEFAULT_SELECTION_TOOL_OPTIONS = {
|
|
|
11793
12711
|
magneticWidth: 10,
|
|
11794
12712
|
magneticContrast: 10,
|
|
11795
12713
|
magneticFrequency: 57,
|
|
12714
|
+
quickSize: 30,
|
|
12715
|
+
quickSampleAll: true,
|
|
12716
|
+
quickEnhance: false,
|
|
12717
|
+
objectSampleAll: true,
|
|
12718
|
+
objectEnhance: false,
|
|
11796
12719
|
typeText: "Type",
|
|
11797
12720
|
typeSize: 72,
|
|
11798
12721
|
typeFamily: "sans-serif"
|
|
@@ -11865,7 +12788,7 @@ function summary(controller) {
|
|
|
11865
12788
|
const area = _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel);
|
|
11866
12789
|
return {
|
|
11867
12790
|
empty: !sel,
|
|
11868
|
-
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
12791
|
+
bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _457 => _457.bounds]), () => ( null)),
|
|
11869
12792
|
/** Σ coverage in pixels. */
|
|
11870
12793
|
area: Math.round(area),
|
|
11871
12794
|
percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
|
|
@@ -11941,7 +12864,7 @@ function createImageSelectionTools(controller) {
|
|
|
11941
12864
|
break;
|
|
11942
12865
|
}
|
|
11943
12866
|
case "polygon": {
|
|
11944
|
-
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
12867
|
+
const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _458 => _458.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _459 => _459.y]), NaN) })) : [];
|
|
11945
12868
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
11946
12869
|
throw new Error("polygon needs points: at least 3 { x, y } vertices.");
|
|
11947
12870
|
}
|
|
@@ -12178,7 +13101,7 @@ function createImageSelectionTools(controller) {
|
|
|
12178
13101
|
},
|
|
12179
13102
|
annotations: writeAnnotations("Select a polygon (lasso)", true),
|
|
12180
13103
|
handler: async (args) => {
|
|
12181
|
-
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess',
|
|
13104
|
+
const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _460 => _460.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _461 => _461.y]), NaN) })) : [];
|
|
12182
13105
|
if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
|
|
12183
13106
|
throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
|
|
12184
13107
|
}
|
|
@@ -12192,6 +13115,75 @@ function createImageSelectionTools(controller) {
|
|
|
12192
13115
|
return { ...summary(controller), outlinePoints: outline.length };
|
|
12193
13116
|
}
|
|
12194
13117
|
};
|
|
13118
|
+
const quickSelectTool = {
|
|
13119
|
+
name: "quick_select",
|
|
13120
|
+
title: "Quick Selection",
|
|
13121
|
+
description: "Quick Selection: paints brush strokes (paths in natural image pixels) that each grow into the region they are painted on, out to its edges (a graph cut on colour and edges), combined with the selection by mode. With replace (default) the first stroke replaces the selection and later ones add, as the brush does; use mode subtract to take an area back out. Best for a subject or area that differs from its surroundings: paint inside it, away from the edge, then check with get_selection and capture_view and add or subtract strokes where it leaked or fell short. All strokes are one undoable step. Returns the selection.",
|
|
13122
|
+
inputSchema: {
|
|
13123
|
+
type: "object",
|
|
13124
|
+
properties: {
|
|
13125
|
+
strokes: {
|
|
13126
|
+
type: "array",
|
|
13127
|
+
minItems: 1,
|
|
13128
|
+
items: { type: "array", minItems: 1, items: pointSchema, description: "One stroke: the brush path, in order (one point is a dab)." },
|
|
13129
|
+
description: "Brush strokes in natural image pixels, applied in order."
|
|
13130
|
+
},
|
|
13131
|
+
size: { type: "number", minimum: 1, maximum: 2500, description: "Brush diameter in natural image pixels (default 30). Smaller for a narrow area, larger for a broad one." },
|
|
13132
|
+
mode: modeSchema,
|
|
13133
|
+
sampleAllLayers: { type: "boolean", description: "Read every layer (default true); false reads only the active pixel layer." },
|
|
13134
|
+
enhanceEdge: { type: "boolean", description: "Smoother, less blocky edges (Auto-Enhance; default false). Use it before masking a smooth-edged subject." }
|
|
13135
|
+
},
|
|
13136
|
+
required: ["strokes"],
|
|
13137
|
+
additionalProperties: false
|
|
13138
|
+
},
|
|
13139
|
+
annotations: writeAnnotations("Quick Selection"),
|
|
13140
|
+
handler: async (args) => {
|
|
13141
|
+
const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _462 => _462.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _463 => _463.y]), NaN) })) : []) : [];
|
|
13142
|
+
if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
|
|
13143
|
+
throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
|
|
13144
|
+
}
|
|
13145
|
+
await controller.quickSelect(strokes, {
|
|
13146
|
+
size: args.size === void 0 ? void 0 : num2(args.size, 30),
|
|
13147
|
+
mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, args.mode),
|
|
13148
|
+
sampleAllLayers: args.sampleAllLayers,
|
|
13149
|
+
enhanceEdge: args.enhanceEdge
|
|
13150
|
+
});
|
|
13151
|
+
return summary(controller);
|
|
13152
|
+
}
|
|
13153
|
+
};
|
|
13154
|
+
const selectObjectTool = {
|
|
13155
|
+
name: "select_object",
|
|
13156
|
+
title: "Object Selection",
|
|
13157
|
+
description: "Object Selection: selects the object inside rect (a box drawn loosely around it, natural image pixels; what lies outside the box is treated as background) or the object under point, found from the colours of object and background and the edges between them (GrabCut). Combined with the selection by mode. A box is more reliable than a point: make it a little larger than the object on every side. Check with get_selection and capture_view, then fix with quick_select strokes or select_object with mode add / subtract. One undoable step. Returns the selection.",
|
|
13158
|
+
inputSchema: {
|
|
13159
|
+
type: "object",
|
|
13160
|
+
properties: {
|
|
13161
|
+
rect: {
|
|
13162
|
+
type: "object",
|
|
13163
|
+
properties: rectProperties,
|
|
13164
|
+
required: ["x", "y", "width", "height"],
|
|
13165
|
+
additionalProperties: false,
|
|
13166
|
+
description: "A box around the object (x, y, width, height in natural image pixels). Pass this or point."
|
|
13167
|
+
},
|
|
13168
|
+
point: { ...pointSchema, description: "A point on the object (natural image pixels). Pass this or rect." },
|
|
13169
|
+
mode: modeSchema,
|
|
13170
|
+
sampleAllLayers: { type: "boolean", description: "Read every layer (default true); false reads only the active pixel layer." },
|
|
13171
|
+
enhanceEdge: { type: "boolean", description: "Smoother, less blocky edges (Auto-Enhance; default false)." }
|
|
13172
|
+
},
|
|
13173
|
+
additionalProperties: false
|
|
13174
|
+
},
|
|
13175
|
+
annotations: writeAnnotations("Object Selection"),
|
|
13176
|
+
handler: async (args) => {
|
|
13177
|
+
const rect = args.rect;
|
|
13178
|
+
const point = args.point;
|
|
13179
|
+
if (!rect && !point) throw new Error("Pass rect (a box around the object) or point (a point on it).");
|
|
13180
|
+
if (rect && point) throw new Error("Pass rect or point, not both.");
|
|
13181
|
+
const options = { mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, args.mode), sampleAllLayers: args.sampleAllLayers, enhanceEdge: args.enhanceEdge };
|
|
13182
|
+
if (rect) await controller.selectObject({ rect: { x: num2(rect.x, NaN), y: num2(rect.y, NaN), width: num2(rect.width, NaN), height: num2(rect.height, NaN) } }, options);
|
|
13183
|
+
else await controller.selectObject({ point: { x: num2(point.x, NaN), y: num2(point.y, NaN) } }, options);
|
|
13184
|
+
return summary(controller);
|
|
13185
|
+
}
|
|
13186
|
+
};
|
|
12195
13187
|
const magicWandTool = {
|
|
12196
13188
|
name: "magic_wand",
|
|
12197
13189
|
title: "Magic wand",
|
|
@@ -12285,7 +13277,7 @@ function createImageSelectionTools(controller) {
|
|
|
12285
13277
|
await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
|
|
12286
13278
|
} else {
|
|
12287
13279
|
const samples = args.samples.map((s, i) => {
|
|
12288
|
-
if (typeof _optionalChain([s, 'optionalAccess',
|
|
13280
|
+
if (typeof _optionalChain([s, 'optionalAccess', _464 => _464.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
|
|
12289
13281
|
const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
|
|
12290
13282
|
return at ? { color: s.color, at } : { color: s.color };
|
|
12291
13283
|
});
|
|
@@ -12744,6 +13736,8 @@ function createImageSelectionTools(controller) {
|
|
|
12744
13736
|
selectRect,
|
|
12745
13737
|
selectEllipse,
|
|
12746
13738
|
selectPolygonTool,
|
|
13739
|
+
quickSelectTool,
|
|
13740
|
+
selectObjectTool,
|
|
12747
13741
|
lineTool,
|
|
12748
13742
|
magicWandTool,
|
|
12749
13743
|
colorRangeTool,
|
|
@@ -12800,12 +13794,12 @@ function createImageSubjectSelectionTool(controller) {
|
|
|
12800
13794
|
annotations: { ...writeAnnotations("Select a subject"), openWorldHint: true },
|
|
12801
13795
|
handler: async ({ target, maxSegments, mode, feather }, context) => {
|
|
12802
13796
|
if (typeof target !== "string" || !target.trim()) throw new Error("target must describe what to select.");
|
|
12803
|
-
const perform = _optionalChain([context, 'optionalAccess',
|
|
13797
|
+
const perform = _optionalChain([context, 'optionalAccess', _465 => _465.perform]);
|
|
12804
13798
|
const { segments } = await controller.selectSubject(target, {
|
|
12805
13799
|
mode: _chunkUYXL6ZWQcjs.parseSelectionMode.call(void 0, mode),
|
|
12806
13800
|
feather: num2(feather, 0),
|
|
12807
13801
|
maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
|
|
12808
|
-
signal: _optionalChain([context, 'optionalAccess',
|
|
13802
|
+
signal: _optionalChain([context, 'optionalAccess', _466 => _466.signal]),
|
|
12809
13803
|
// Under playback the cursor traces what the model found, as a lasso, before it is selected.
|
|
12810
13804
|
beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
|
|
12811
13805
|
});
|
|
@@ -12884,7 +13878,7 @@ async function renderImageRegion(controller, request) {
|
|
|
12884
13878
|
const maskView = maskViewCanvas(controller, document);
|
|
12885
13879
|
if (maskView) context.drawImage(maskView, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
|
|
12886
13880
|
const selection = state.selection;
|
|
12887
|
-
if (_optionalChain([selection, 'optionalAccess',
|
|
13881
|
+
if (_optionalChain([selection, 'optionalAccess', _467 => _467.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
|
|
12888
13882
|
const shade = selectionShade(selection, document);
|
|
12889
13883
|
if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
|
|
12890
13884
|
}
|
|
@@ -12909,7 +13903,7 @@ function createImageCaptureSurface(controller) {
|
|
|
12909
13903
|
return {
|
|
12910
13904
|
units: "image pixels",
|
|
12911
13905
|
content: whole,
|
|
12912
|
-
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
13906
|
+
selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _468 => _468.getState, 'call', _469 => _469(), 'access', _470 => _470.selection, 'optionalAccess', _471 => _471.bounds]), () => ( null)) }),
|
|
12913
13907
|
overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
|
|
12914
13908
|
maxScale: 8,
|
|
12915
13909
|
render: (request) => renderImageRegion(controller, request)
|
|
@@ -13243,7 +14237,7 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
13243
14237
|
out.bounds = boundsOf(layer);
|
|
13244
14238
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
13245
14239
|
out.shape = {
|
|
13246
|
-
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access',
|
|
14240
|
+
components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _472 => _472.live, 'optionalAccess', _473 => _473.kind]), () => ( "path")) })),
|
|
13247
14241
|
fill: layer.fill ? layer.fill.type : null,
|
|
13248
14242
|
stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
|
|
13249
14243
|
};
|
|
@@ -13266,8 +14260,8 @@ function describeLayer(layer, activeId, boundsOf) {
|
|
|
13266
14260
|
out.bounds = boundsOf(layer);
|
|
13267
14261
|
out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
|
|
13268
14262
|
out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
|
|
13269
|
-
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access',
|
|
13270
|
-
out.filterMask = maskSummary(_optionalChain([layer, 'access',
|
|
14263
|
+
out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _474 => _474.smartFilters, 'optionalAccess', _475 => _475.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
|
|
14264
|
+
out.filterMask = maskSummary(_optionalChain([layer, 'access', _476 => _476.smartFilters, 'optionalAccess', _477 => _477.mask]));
|
|
13271
14265
|
break;
|
|
13272
14266
|
}
|
|
13273
14267
|
return out;
|
|
@@ -13295,7 +14289,7 @@ function createImageLayerTools(controller) {
|
|
|
13295
14289
|
if (!loc) return null;
|
|
13296
14290
|
return {
|
|
13297
14291
|
...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
|
|
13298
|
-
parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
14292
|
+
parentId: _nullishCoalesce(_optionalChain([loc, 'access', _478 => _478.parent, 'optionalAccess', _479 => _479.id]), () => ( null)),
|
|
13299
14293
|
index: loc.index
|
|
13300
14294
|
};
|
|
13301
14295
|
};
|
|
@@ -13618,7 +14612,7 @@ function createImageLayerTools(controller) {
|
|
|
13618
14612
|
if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
|
|
13619
14613
|
const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
|
|
13620
14614
|
const shown = controller.setMaskView(view, id);
|
|
13621
|
-
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess',
|
|
14615
|
+
return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _480 => _480.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _481 => _481.layerId]), () => ( null)) };
|
|
13622
14616
|
}
|
|
13623
14617
|
};
|
|
13624
14618
|
const maskProps = {
|
|
@@ -14111,29 +15105,34 @@ function snapTo45(from, point) {
|
|
|
14111
15105
|
const a = Math.round(Math.atan2(dy, dx) / (Math.PI / 4)) * (Math.PI / 4);
|
|
14112
15106
|
return { x: from.x + Math.cos(a) * len, y: from.y + Math.sin(a) * len };
|
|
14113
15107
|
}
|
|
14114
|
-
var SelectionGesture = (
|
|
14115
|
-
constructor(controller, getOptions) {;
|
|
15108
|
+
var SelectionGesture = (_class14 = class {
|
|
15109
|
+
constructor(controller, getOptions) {;_class14.prototype.__init106.call(this);_class14.prototype.__init107.call(this);_class14.prototype.__init108.call(this);_class14.prototype.__init109.call(this);_class14.prototype.__init110.call(this);_class14.prototype.__init111.call(this);_class14.prototype.__init112.call(this);_class14.prototype.__init113.call(this);_class14.prototype.__init114.call(this);_class14.prototype.__init115.call(this);_class14.prototype.__init116.call(this);
|
|
14116
15110
|
this.controller = controller;
|
|
14117
15111
|
this.getOptions = getOptions;
|
|
14118
15112
|
}
|
|
14119
15113
|
|
|
14120
15114
|
|
|
14121
|
-
|
|
14122
|
-
|
|
14123
|
-
|
|
14124
|
-
|
|
15115
|
+
__init106() {this.start = null}
|
|
15116
|
+
__init107() {this.points = []}
|
|
15117
|
+
__init108() {this.current = null}
|
|
15118
|
+
__init109() {this.modifiers = {}}
|
|
14125
15119
|
/** Polygonal lasso corners while one is being drawn. */
|
|
14126
|
-
|
|
14127
|
-
|
|
14128
|
-
|
|
14129
|
-
|
|
15120
|
+
__init110() {this.polygon = null}
|
|
15121
|
+
__init111() {this.pressedAt = null}
|
|
15122
|
+
__init112() {this.freehand = false}
|
|
15123
|
+
__init113() {this.magnetic = null}
|
|
14130
15124
|
/** A click this close to the first corner (natural pixels) closes a polygonal lasso. */
|
|
14131
|
-
|
|
15125
|
+
__init114() {this.closeRadius = 8}
|
|
14132
15126
|
/** The last error (e.g. pixels unavailable for the wand), for the UI to show. */
|
|
14133
|
-
|
|
15127
|
+
__init115() {this.error = null}
|
|
15128
|
+
__init116() {this.pending = Promise.resolve()}
|
|
14134
15129
|
get active() {
|
|
14135
15130
|
return this.start !== null || this.polygon !== null || this.magnetic !== null;
|
|
14136
15131
|
}
|
|
15132
|
+
/** Resolves once a Quick Selection stroke or an Object Selection has been applied. */
|
|
15133
|
+
get settled() {
|
|
15134
|
+
return this.pending;
|
|
15135
|
+
}
|
|
14137
15136
|
/** The anchors of a Magnetic Lasso being drawn (empty otherwise). */
|
|
14138
15137
|
get magneticAnchors() {
|
|
14139
15138
|
const m = this.magnetic;
|
|
@@ -14145,7 +15144,7 @@ var SelectionGesture = (_class13 = class {
|
|
|
14145
15144
|
if (this.polygon) return this.current ? [...this.polygon, this.current] : this.polygon.slice();
|
|
14146
15145
|
if (!this.start || !this.current) return null;
|
|
14147
15146
|
const { tool } = this.getOptions();
|
|
14148
|
-
if (tool === "lasso") return this.points.length > 1 ? this.points.slice() : null;
|
|
15147
|
+
if (tool === "lasso" || tool === "quick") return this.points.length > 1 ? this.points.slice() : null;
|
|
14149
15148
|
const rect = normalizeRect({
|
|
14150
15149
|
x: this.start.x,
|
|
14151
15150
|
y: this.start.y,
|
|
@@ -14279,7 +15278,8 @@ var SelectionGesture = (_class13 = class {
|
|
|
14279
15278
|
}
|
|
14280
15279
|
if (!this.start) return false;
|
|
14281
15280
|
this.current = point;
|
|
14282
|
-
|
|
15281
|
+
const drawn = this.getOptions().tool;
|
|
15282
|
+
if (drawn === "lasso" || drawn === "quick") {
|
|
14283
15283
|
const last = this.points[this.points.length - 1];
|
|
14284
15284
|
if (Math.hypot(point.x - last.x, point.y - last.y) < 0.5) return false;
|
|
14285
15285
|
this.points.push(point);
|
|
@@ -14299,6 +15299,39 @@ var SelectionGesture = (_class13 = class {
|
|
|
14299
15299
|
if (point) this.move(point);
|
|
14300
15300
|
const options = this.getOptions();
|
|
14301
15301
|
const mode = selectionModeFromModifiers(_nullishCoalesce(modifiers, () => ( this.modifiers)), options.mode);
|
|
15302
|
+
if (options.tool === "object") {
|
|
15303
|
+
const rect2 = normalizeRect({ x: this.start.x, y: this.start.y, width: this.current.x - this.start.x, height: this.current.y - this.start.y });
|
|
15304
|
+
this.start = null;
|
|
15305
|
+
this.current = null;
|
|
15306
|
+
this.points = [];
|
|
15307
|
+
const target = rect2.width >= 4 && rect2.height >= 4 ? { rect: rect2 } : { point: { x: rect2.x + rect2.width / 2, y: rect2.y + rect2.height / 2 } };
|
|
15308
|
+
this.pending = this.controller.selectObject(target, { mode, sampleAllLayers: _nullishCoalesce(options.objectSampleAll, () => ( true)), enhanceEdge: _nullishCoalesce(options.objectEnhance, () => ( false)) }).then(
|
|
15309
|
+
() => void 0,
|
|
15310
|
+
(err) => {
|
|
15311
|
+
this.error = err instanceof Error ? err.message : String(err);
|
|
15312
|
+
}
|
|
15313
|
+
);
|
|
15314
|
+
return false;
|
|
15315
|
+
}
|
|
15316
|
+
if (options.tool === "quick") {
|
|
15317
|
+
const stroke = this.points;
|
|
15318
|
+
this.start = null;
|
|
15319
|
+
this.current = null;
|
|
15320
|
+
this.points = [];
|
|
15321
|
+
const strokeMode = mode === "replace" && this.controller.getSelection() ? "add" : mode;
|
|
15322
|
+
this.pending = this.controller.quickSelect([stroke], {
|
|
15323
|
+
size: _nullishCoalesce(options.quickSize, () => ( 30)),
|
|
15324
|
+
mode: strokeMode,
|
|
15325
|
+
sampleAllLayers: _nullishCoalesce(options.quickSampleAll, () => ( true)),
|
|
15326
|
+
enhanceEdge: _nullishCoalesce(options.quickEnhance, () => ( false))
|
|
15327
|
+
}).then(
|
|
15328
|
+
() => void 0,
|
|
15329
|
+
(err) => {
|
|
15330
|
+
this.error = err instanceof Error ? err.message : String(err);
|
|
15331
|
+
}
|
|
15332
|
+
);
|
|
15333
|
+
return false;
|
|
15334
|
+
}
|
|
14302
15335
|
const path = this.draftPath;
|
|
14303
15336
|
const rect = normalizeRect({
|
|
14304
15337
|
x: this.start.x,
|
|
@@ -14433,7 +15466,7 @@ var SelectionGesture = (_class13 = class {
|
|
|
14433
15466
|
this.pressedAt = null;
|
|
14434
15467
|
this.freehand = false;
|
|
14435
15468
|
}
|
|
14436
|
-
},
|
|
15469
|
+
}, _class14);
|
|
14437
15470
|
function handleSelectionShortcut(controller, e, onError) {
|
|
14438
15471
|
if (!(e.ctrlKey || e.metaKey)) return false;
|
|
14439
15472
|
const key = e.key.toLowerCase();
|
|
@@ -14441,7 +15474,7 @@ function handleSelectionShortcut(controller, e, onError) {
|
|
|
14441
15474
|
try {
|
|
14442
15475
|
fn();
|
|
14443
15476
|
} catch (err) {
|
|
14444
|
-
_optionalChain([onError, 'optionalCall',
|
|
15477
|
+
_optionalChain([onError, 'optionalCall', _482 => _482(err instanceof Error ? err.message : String(err))]);
|
|
14445
15478
|
}
|
|
14446
15479
|
return true;
|
|
14447
15480
|
};
|
|
@@ -14456,9 +15489,9 @@ function handleMaskViewKey(controller, e) {
|
|
|
14456
15489
|
if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
|
|
14457
15490
|
const id = controller.getState().activeLayerId;
|
|
14458
15491
|
const layer = id ? controller.getLayer(id) : null;
|
|
14459
|
-
if (!_optionalChain([layer, 'optionalAccess',
|
|
15492
|
+
if (!_optionalChain([layer, 'optionalAccess', _483 => _483.mask]) || layer.mask.source) return false;
|
|
14460
15493
|
const view = controller.getMaskView();
|
|
14461
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
15494
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _484 => _484.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
|
|
14462
15495
|
return true;
|
|
14463
15496
|
}
|
|
14464
15497
|
function handleQuickMaskKey(controller, e) {
|
|
@@ -14652,15 +15685,15 @@ function handlePaintShortcut(controller, e) {
|
|
|
14652
15685
|
}
|
|
14653
15686
|
return false;
|
|
14654
15687
|
}
|
|
14655
|
-
var PaintGesture = (
|
|
14656
|
-
constructor(controller) {;
|
|
15688
|
+
var PaintGesture = (_class15 = class {
|
|
15689
|
+
constructor(controller) {;_class15.prototype.__init117.call(this);_class15.prototype.__init118.call(this);_class15.prototype.__init119.call(this);
|
|
14657
15690
|
this.controller = controller;
|
|
14658
15691
|
}
|
|
14659
15692
|
|
|
14660
|
-
|
|
14661
|
-
|
|
15693
|
+
__init117() {this.stroke = null}
|
|
15694
|
+
__init118() {this.move = null}
|
|
14662
15695
|
/** The last refusal (e.g. "layer is locked"), for the editor to show. */
|
|
14663
|
-
|
|
15696
|
+
__init119() {this.error = null}
|
|
14664
15697
|
get active() {
|
|
14665
15698
|
return Boolean(this.stroke || this.move);
|
|
14666
15699
|
}
|
|
@@ -14672,7 +15705,7 @@ var PaintGesture = (_class14 = class {
|
|
|
14672
15705
|
const layer = this.controller.getActiveLayer();
|
|
14673
15706
|
if (!layer) throw new Error("Select a layer to move in the Layers panel.");
|
|
14674
15707
|
if (layer.type !== "pixel" && layer.type !== "shape" && layer.type !== "smart") throw new Error(`Only pixel, shape and smart object layers move; "${layer.name}" is a ${layer.type} layer.`);
|
|
14675
|
-
if (_optionalChain([layer, 'access',
|
|
15708
|
+
if (_optionalChain([layer, 'access', _485 => _485.locks, 'optionalAccess', _486 => _486.all]) || _optionalChain([layer, 'access', _487 => _487.locks, 'optionalAccess', _488 => _488.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
|
|
14676
15709
|
const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
|
|
14677
15710
|
const b = _chunkUYXL6ZWQcjs.shapeGeometryBounds.call(void 0, layer);
|
|
14678
15711
|
return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
|
|
@@ -14729,11 +15762,11 @@ var PaintGesture = (_class14 = class {
|
|
|
14729
15762
|
this.move = null;
|
|
14730
15763
|
}
|
|
14731
15764
|
cancel() {
|
|
14732
|
-
_optionalChain([this, 'access',
|
|
15765
|
+
_optionalChain([this, 'access', _489 => _489.stroke, 'optionalAccess', _490 => _490.cancel, 'call', _491 => _491()]);
|
|
14733
15766
|
this.stroke = null;
|
|
14734
15767
|
this.move = null;
|
|
14735
15768
|
}
|
|
14736
|
-
},
|
|
15769
|
+
}, _class15);
|
|
14737
15770
|
|
|
14738
15771
|
// src/image-editor/paint-tools.ts
|
|
14739
15772
|
var READ4 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
|
|
@@ -15154,7 +16187,7 @@ function checkSource(controller, source) {
|
|
|
15154
16187
|
}
|
|
15155
16188
|
return p;
|
|
15156
16189
|
}
|
|
15157
|
-
var
|
|
16190
|
+
var SOURCE2 = {
|
|
15158
16191
|
type: "object",
|
|
15159
16192
|
description: "Source point in document pixels (an Alt-click). Given, it replaces the clone source and the offset starts afresh at this stroke; missing, the current clone source is used (set_clone_source).",
|
|
15160
16193
|
properties: { x: { type: "number", description: "Source x in px." }, y: { type: "number", description: "Source y in px." } },
|
|
@@ -15178,7 +16211,7 @@ function createImageRetouchTools(controller) {
|
|
|
15178
16211
|
type: "object",
|
|
15179
16212
|
properties: {
|
|
15180
16213
|
points: POINTS,
|
|
15181
|
-
source:
|
|
16214
|
+
source: SOURCE2,
|
|
15182
16215
|
aligned: { type: "boolean", description: "Keep the offset for the next strokes (default the current option, true)." },
|
|
15183
16216
|
sample: SAMPLE,
|
|
15184
16217
|
brush: BRUSH2,
|
|
@@ -15198,7 +16231,7 @@ function createImageRetouchTools(controller) {
|
|
|
15198
16231
|
type: "object",
|
|
15199
16232
|
properties: {
|
|
15200
16233
|
points: POINTS,
|
|
15201
|
-
source:
|
|
16234
|
+
source: SOURCE2,
|
|
15202
16235
|
aligned: { type: "boolean", description: "Keep the offset for the next strokes (default the current option, true)." },
|
|
15203
16236
|
sample: SAMPLE,
|
|
15204
16237
|
brush: BRUSH2,
|
|
@@ -15810,7 +16843,7 @@ function createImageSmartObjectTools(controller) {
|
|
|
15810
16843
|
const layerSummary = (id) => {
|
|
15811
16844
|
const s = controller.getState();
|
|
15812
16845
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
15813
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
16846
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _492 => _492.parent, 'optionalAccess', _493 => _493.id]), () => ( null)), index: loc.index } : null;
|
|
15814
16847
|
};
|
|
15815
16848
|
const getSmart = {
|
|
15816
16849
|
name: "get_smart_object",
|
|
@@ -16367,7 +17400,7 @@ function createImageShapeTools(controller) {
|
|
|
16367
17400
|
const layerSummary = (id) => {
|
|
16368
17401
|
const s = controller.getState();
|
|
16369
17402
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
16370
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
17403
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _494 => _494.parent, 'optionalAccess', _495 => _495.id]), () => ( null)), index: loc.index } : null;
|
|
16371
17404
|
};
|
|
16372
17405
|
const get = {
|
|
16373
17406
|
name: "get_shape_layer",
|
|
@@ -16584,7 +17617,7 @@ function createImageShapeTools(controller) {
|
|
|
16584
17617
|
const mode = args.mode;
|
|
16585
17618
|
controller.pathToSelection(pathSpec(args), { feather: args.feather, antiAlias: args.antiAlias, mode });
|
|
16586
17619
|
const sel = controller.getSelection();
|
|
16587
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
17620
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _496 => _496.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
|
|
16588
17621
|
}
|
|
16589
17622
|
};
|
|
16590
17623
|
const getVectorMask = {
|
|
@@ -16615,7 +17648,7 @@ function createImageShapeTools(controller) {
|
|
|
16615
17648
|
handler: (args) => {
|
|
16616
17649
|
const id = layerArg(args.layerId);
|
|
16617
17650
|
const spec = pathSpec(args);
|
|
16618
|
-
const hasPath = _optionalChain([spec, 'access',
|
|
17651
|
+
const hasPath = _optionalChain([spec, 'access', _497 => _497.components, 'optionalAccess', _498 => _498.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
|
|
16619
17652
|
const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
|
|
16620
17653
|
if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
|
|
16621
17654
|
controller.addVectorMask(id, from, spec, traceOptions(args));
|
|
@@ -16735,7 +17768,7 @@ function createImageTypeTools(controller) {
|
|
|
16735
17768
|
const layerSummary = (id) => {
|
|
16736
17769
|
const s = controller.getState();
|
|
16737
17770
|
const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, id);
|
|
16738
|
-
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access',
|
|
17771
|
+
return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _499 => _499.parent, 'optionalAccess', _500 => _500.id]), () => ( null)), index: loc.index } : null;
|
|
16739
17772
|
};
|
|
16740
17773
|
const range = (args) => ({ start: args.start, end: args.end });
|
|
16741
17774
|
const listFonts = {
|
|
@@ -16744,7 +17777,7 @@ function createImageTypeTools(controller) {
|
|
|
16744
17777
|
description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
|
|
16745
17778
|
inputSchema: { type: "object", properties: {}, additionalProperties: false },
|
|
16746
17779
|
annotations: { title: "List fonts", ...READ11 },
|
|
16747
|
-
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access',
|
|
17780
|
+
handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _501 => _501.getTextShaper, 'call', _502 => _502(), 'optionalAccess', _503 => _503.id]), () => ( null)) })
|
|
16748
17781
|
};
|
|
16749
17782
|
const get = {
|
|
16750
17783
|
name: "get_text_layer",
|
|
@@ -16900,7 +17933,7 @@ function createImageTypeTools(controller) {
|
|
|
16900
17933
|
const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
|
|
16901
17934
|
controller.selectTextShape(init);
|
|
16902
17935
|
const sel = controller.getSelection();
|
|
16903
|
-
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess',
|
|
17936
|
+
return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _504 => _504.bounds]), () => ( null)), area: Math.round(sel ? _chunkUYXL6ZWQcjs.selectionArea.call(void 0, sel) : 0) };
|
|
16904
17937
|
}
|
|
16905
17938
|
};
|
|
16906
17939
|
return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
|
|
@@ -17079,7 +18112,7 @@ function createImageEditorToolProvider(controller, options = {}) {
|
|
|
17079
18112
|
for (const ref of [aboveId, parentId]) {
|
|
17080
18113
|
if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
|
|
17081
18114
|
}
|
|
17082
|
-
if (parentId !== void 0 && _optionalChain([controller, 'access',
|
|
18115
|
+
if (parentId !== void 0 && _optionalChain([controller, 'access', _505 => _505.getLayer, 'call', _506 => _506(parentId), 'optionalAccess', _507 => _507.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
|
|
17083
18116
|
const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
|
|
17084
18117
|
const layer = controller.getAdjustmentLayer(id);
|
|
17085
18118
|
return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
|
|
@@ -17393,7 +18426,7 @@ function maskThumbnailClick(controller, layer, e) {
|
|
|
17393
18426
|
} else if (e.altKey && !layer.mask.source) {
|
|
17394
18427
|
const mode = e.shiftKey ? "overlay" : "gray";
|
|
17395
18428
|
const view = controller.getMaskView();
|
|
17396
|
-
controller.setMaskView(_optionalChain([view, 'optionalAccess',
|
|
18429
|
+
controller.setMaskView(_optionalChain([view, 'optionalAccess', _508 => _508.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
|
|
17397
18430
|
} else if (e.shiftKey) {
|
|
17398
18431
|
controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
|
|
17399
18432
|
} else {
|
|
@@ -17457,7 +18490,7 @@ function layerHasThumbnail(layer) {
|
|
|
17457
18490
|
return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
|
|
17458
18491
|
}
|
|
17459
18492
|
function layerWarning(layer) {
|
|
17460
|
-
if (layer.type === "type" && _optionalChain([layer, 'access',
|
|
18493
|
+
if (layer.type === "type" && _optionalChain([layer, 'access', _509 => _509.missingFonts, 'optionalAccess', _510 => _510.length])) {
|
|
17461
18494
|
return `Missing ${layer.missingFonts.length === 1 ? "font" : "fonts"}: ${layer.missingFonts.join(", ")}. ${layer.rendering === "stored" ? "Showing the saved pixels until the text is edited." : "Drawn with a fallback font."}`;
|
|
17462
18495
|
}
|
|
17463
18496
|
return null;
|
|
@@ -17480,16 +18513,16 @@ function layerMenu(controller) {
|
|
|
17480
18513
|
const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
|
|
17481
18514
|
const below = loc ? siblings[loc.index - 1] : void 0;
|
|
17482
18515
|
const hasSel = controller.hasSelection;
|
|
17483
|
-
const isPixel = _optionalChain([active, 'optionalAccess',
|
|
17484
|
-
const hasOwnPixels = _optionalChain([active, 'optionalAccess',
|
|
18516
|
+
const isPixel = _optionalChain([active, 'optionalAccess', _511 => _511.type]) === "pixel";
|
|
18517
|
+
const hasOwnPixels = _optionalChain([active, 'optionalAccess', _512 => _512.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _513 => _513.type]) === "shape" || _optionalChain([active, 'optionalAccess', _514 => _514.type]) === "type" || _optionalChain([active, 'optionalAccess', _515 => _515.type]) === "smart";
|
|
17485
18518
|
return [
|
|
17486
18519
|
{ action: "new-layer", label: "New Layer", enabled: true },
|
|
17487
18520
|
{ action: "new-group", label: "New Group", enabled: true },
|
|
17488
18521
|
{ action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
|
|
17489
18522
|
{ action: "delete", label: "Delete Layer", enabled: Boolean(active) },
|
|
17490
18523
|
{ action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
|
|
17491
|
-
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess',
|
|
17492
|
-
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
18524
|
+
{ action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _516 => _516.type]) === "group" },
|
|
18525
|
+
{ action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _517 => _517.visible]) && _optionalChain([below, 'optionalAccess', _518 => _518.type]) === "pixel") },
|
|
17493
18526
|
{ action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
|
|
17494
18527
|
{ action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
|
|
17495
18528
|
{ action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
|
|
@@ -17499,27 +18532,27 @@ function layerMenu(controller) {
|
|
|
17499
18532
|
{ action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
|
|
17500
18533
|
{ action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
|
|
17501
18534
|
{ action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
|
|
17502
|
-
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess',
|
|
17503
|
-
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
17504
|
-
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess',
|
|
17505
|
-
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess',
|
|
17506
|
-
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
17507
|
-
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
17508
|
-
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access',
|
|
17509
|
-
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
17510
|
-
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess',
|
|
17511
|
-
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess',
|
|
17512
|
-
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess',
|
|
18535
|
+
{ action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _519 => _519.mask])) },
|
|
18536
|
+
{ action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _520 => _520.mask])) },
|
|
18537
|
+
{ action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _521 => _521.mask, 'optionalAccess', _522 => _522.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _523 => _523.mask])) },
|
|
18538
|
+
{ action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _524 => _524.mask, 'optionalAccess', _525 => _525.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _526 => _526.mask]) && !active.mask.source) },
|
|
18539
|
+
{ action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _527 => _527.mask, 'optionalAccess', _528 => _528.source])) },
|
|
18540
|
+
{ action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _529 => _529.mask, 'optionalAccess', _530 => _530.source])) },
|
|
18541
|
+
{ action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _531 => _531.mask, 'optionalAccess', _532 => _532.source])) && hasSel },
|
|
18542
|
+
{ action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _533 => _533.vectorMask])) },
|
|
18543
|
+
{ action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _534 => _534.vectorMask, 'optionalAccess', _535 => _535.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _536 => _536.vectorMask])) },
|
|
18544
|
+
{ action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _537 => _537.vectorMask])) },
|
|
18545
|
+
{ action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _538 => _538.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _539 => _539.type]) === "smart" || _optionalChain([active, 'optionalAccess', _540 => _540.type]) === "shape" || _optionalChain([active, 'optionalAccess', _541 => _541.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _542 => _542.type]) === "pixel" && _optionalChain([active, 'access', _543 => _543.filters, 'optionalAccess', _544 => _544.length])) },
|
|
17513
18546
|
{ action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
|
|
17514
|
-
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess',
|
|
17515
|
-
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess',
|
|
17516
|
-
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess',
|
|
17517
|
-
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess',
|
|
18547
|
+
{ action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _545 => _545.type]) === "smart" },
|
|
18548
|
+
{ action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _546 => _546.type]) === "smart" },
|
|
18549
|
+
{ action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _547 => _547.type]) === "smart" && !_optionalChain([active, 'access', _548 => _548.smartFilters, 'optionalAccess', _549 => _549.mask]) },
|
|
18550
|
+
{ action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _550 => _550.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
|
|
17518
18551
|
];
|
|
17519
18552
|
}
|
|
17520
18553
|
async function runLayerMenuAction(controller, action) {
|
|
17521
18554
|
const active = controller.getActiveLayer();
|
|
17522
|
-
const id = _optionalChain([active, 'optionalAccess',
|
|
18555
|
+
const id = _optionalChain([active, 'optionalAccess', _551 => _551.id]);
|
|
17523
18556
|
try {
|
|
17524
18557
|
switch (action) {
|
|
17525
18558
|
case "new-layer":
|
|
@@ -17575,10 +18608,10 @@ async function runLayerMenuAction(controller, action) {
|
|
|
17575
18608
|
if (id) controller.removeLayerMask(id);
|
|
17576
18609
|
break;
|
|
17577
18610
|
case "toggle-mask":
|
|
17578
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
18611
|
+
if (id && _optionalChain([active, 'optionalAccess', _552 => _552.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
|
|
17579
18612
|
break;
|
|
17580
18613
|
case "toggle-mask-link":
|
|
17581
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
18614
|
+
if (id && _optionalChain([active, 'optionalAccess', _553 => _553.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
|
|
17582
18615
|
break;
|
|
17583
18616
|
case "add-vector-mask":
|
|
17584
18617
|
case "add-vector-mask-hide":
|
|
@@ -17591,7 +18624,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
17591
18624
|
if (id) controller.removeVectorMask(id);
|
|
17592
18625
|
break;
|
|
17593
18626
|
case "toggle-vector-mask":
|
|
17594
|
-
if (id && _optionalChain([active, 'optionalAccess',
|
|
18627
|
+
if (id && _optionalChain([active, 'optionalAccess', _554 => _554.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
|
|
17595
18628
|
break;
|
|
17596
18629
|
case "rasterize-vector-mask":
|
|
17597
18630
|
if (id) controller.rasterizeVectorMask(id);
|
|
@@ -17612,7 +18645,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
17612
18645
|
if (id) controller.setSmartFilterMask(id, "reveal-all");
|
|
17613
18646
|
break;
|
|
17614
18647
|
case "toggle-clip":
|
|
17615
|
-
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess',
|
|
18648
|
+
if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _555 => _555.clipped]) });
|
|
17616
18649
|
break;
|
|
17617
18650
|
}
|
|
17618
18651
|
return null;
|
|
@@ -17622,7 +18655,7 @@ async function runLayerMenuAction(controller, action) {
|
|
|
17622
18655
|
}
|
|
17623
18656
|
function smartFilterRows(layer) {
|
|
17624
18657
|
if (layer.type !== "smart") return [];
|
|
17625
|
-
const list = _nullishCoalesce(_optionalChain([layer, 'access',
|
|
18658
|
+
const list = _nullishCoalesce(_optionalChain([layer, 'access', _556 => _556.smartFilters, 'optionalAccess', _557 => _557.filters]), () => ( []));
|
|
17626
18659
|
const rows = list.map((f, index) => ({
|
|
17627
18660
|
filter: f,
|
|
17628
18661
|
index,
|
|
@@ -17648,8 +18681,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
17648
18681
|
};
|
|
17649
18682
|
collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
|
|
17650
18683
|
const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
|
|
17651
|
-
const imgW = _optionalChain([state, 'access',
|
|
17652
|
-
const imgH = _optionalChain([state, 'access',
|
|
18684
|
+
const imgW = _optionalChain([state, 'access', _558 => _558.imageDimensions, 'optionalAccess', _559 => _559.width]) || 1;
|
|
18685
|
+
const imgH = _optionalChain([state, 'access', _560 => _560.imageDimensions, 'optionalAccess', _561 => _561.height]) || 1;
|
|
17653
18686
|
return ctrlLayers.map((l) => {
|
|
17654
18687
|
const bounds = controller.getLayerBounds(l.id) || {
|
|
17655
18688
|
x: 0,
|
|
@@ -17658,8 +18691,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
|
|
|
17658
18691
|
height: imgH
|
|
17659
18692
|
};
|
|
17660
18693
|
const sLayer = sLayerMap.get(l.id);
|
|
17661
|
-
const assetKey = _optionalChain([sLayer, 'optionalAccess',
|
|
17662
|
-
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess',
|
|
18694
|
+
const assetKey = _optionalChain([sLayer, 'optionalAccess', _562 => _562.asset]);
|
|
18695
|
+
const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _563 => _563.source]) === "document" ? fallbackImageUrl : "");
|
|
17663
18696
|
return {
|
|
17664
18697
|
id: l.id,
|
|
17665
18698
|
name: l.name || "Untitled Layer",
|
|
@@ -17713,9 +18746,9 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
17713
18746
|
const cx = Math.round(canvas.width / 2);
|
|
17714
18747
|
const cy = Math.round(canvas.height / 2);
|
|
17715
18748
|
return controller.addTextLayer({
|
|
17716
|
-
text: _optionalChain([init, 'optionalAccess',
|
|
17717
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
17718
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
18749
|
+
text: _optionalChain([init, 'optionalAccess', _564 => _564.text]) || "New Text",
|
|
18750
|
+
x: typeof _optionalChain([init, 'optionalAccess', _565 => _565.x]) === "number" ? init.x : cx - 100,
|
|
18751
|
+
y: typeof _optionalChain([init, 'optionalAccess', _566 => _566.y]) === "number" ? init.y : cy,
|
|
17719
18752
|
...init
|
|
17720
18753
|
});
|
|
17721
18754
|
}
|
|
@@ -17728,10 +18761,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
17728
18761
|
return controller.addShapeLayer({
|
|
17729
18762
|
shape: {
|
|
17730
18763
|
kind: "rect",
|
|
17731
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
17732
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
17733
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
17734
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
18764
|
+
x: typeof _optionalChain([init, 'optionalAccess', _567 => _567.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
18765
|
+
y: typeof _optionalChain([init, 'optionalAccess', _568 => _568.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
18766
|
+
width: typeof _optionalChain([init, 'optionalAccess', _569 => _569.width]) === "number" ? init.width : w,
|
|
18767
|
+
height: typeof _optionalChain([init, 'optionalAccess', _570 => _570.height]) === "number" ? init.height : h
|
|
17735
18768
|
},
|
|
17736
18769
|
name: "Rectangle",
|
|
17737
18770
|
...init
|
|
@@ -17746,10 +18779,10 @@ async function addLayerOfKind(controller, id, init) {
|
|
|
17746
18779
|
return controller.addShapeLayer({
|
|
17747
18780
|
shape: {
|
|
17748
18781
|
kind: "ellipse",
|
|
17749
|
-
x: typeof _optionalChain([init, 'optionalAccess',
|
|
17750
|
-
y: typeof _optionalChain([init, 'optionalAccess',
|
|
17751
|
-
width: typeof _optionalChain([init, 'optionalAccess',
|
|
17752
|
-
height: typeof _optionalChain([init, 'optionalAccess',
|
|
18782
|
+
x: typeof _optionalChain([init, 'optionalAccess', _571 => _571.x]) === "number" ? init.x : cx - Math.round(w / 2),
|
|
18783
|
+
y: typeof _optionalChain([init, 'optionalAccess', _572 => _572.y]) === "number" ? init.y : cy - Math.round(h / 2),
|
|
18784
|
+
width: typeof _optionalChain([init, 'optionalAccess', _573 => _573.width]) === "number" ? init.width : w,
|
|
18785
|
+
height: typeof _optionalChain([init, 'optionalAccess', _574 => _574.height]) === "number" ? init.height : h
|
|
17753
18786
|
},
|
|
17754
18787
|
name: "Ellipse",
|
|
17755
18788
|
...init
|
|
@@ -17810,18 +18843,18 @@ function layerEffectsPanel(layer) {
|
|
|
17810
18843
|
if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
|
|
17811
18844
|
if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
|
|
17812
18845
|
const fx = layer.effects;
|
|
17813
|
-
const readOnly = Boolean(_optionalChain([layer, 'access',
|
|
18846
|
+
const readOnly = Boolean(_optionalChain([layer, 'access', _575 => _575.locks, 'optionalAccess', _576 => _576.all]));
|
|
17814
18847
|
return {
|
|
17815
18848
|
available: true,
|
|
17816
18849
|
readOnly,
|
|
17817
18850
|
reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
|
|
17818
|
-
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
17819
|
-
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
17820
|
-
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess',
|
|
18851
|
+
enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _577 => _577.enabled]), () => ( true)),
|
|
18852
|
+
scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _578 => _578.scale]), () => ( 1)),
|
|
18853
|
+
rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _579 => _579.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
|
|
17821
18854
|
};
|
|
17822
18855
|
}
|
|
17823
18856
|
function layerEffectsBadge(layer) {
|
|
17824
|
-
if (!_optionalChain([layer, 'access',
|
|
18857
|
+
if (!_optionalChain([layer, 'access', _580 => _580.effects, 'optionalAccess', _581 => _581.items, 'access', _582 => _582.length])) return null;
|
|
17825
18858
|
return _chunkHGTDMKNEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
|
|
17826
18859
|
}
|
|
17827
18860
|
var LAYER_EFFECT_MENU = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkHGTDMKNEcjs.layerEffectLabel.call(void 0, kind) }));
|
|
@@ -17866,8 +18899,8 @@ function fillControls(f, allowPattern, patterns) {
|
|
|
17866
18899
|
}
|
|
17867
18900
|
function gradientControls(prefix, g) {
|
|
17868
18901
|
return [
|
|
17869
|
-
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
17870
|
-
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access',
|
|
18902
|
+
{ key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _583 => _583.stops, 'access', _584 => _584[0], 'optionalAccess', _585 => _585.color]), () => ( "#000000")) },
|
|
18903
|
+
{ key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _586 => _586.stops, 'access', _587 => _587[g.stops.length - 1], 'optionalAccess', _588 => _588.color]), () => ( "#ffffff")) },
|
|
17871
18904
|
{ key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
|
|
17872
18905
|
{ key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
|
|
17873
18906
|
{ key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
|
|
@@ -17959,19 +18992,19 @@ function layerEffectControls(e, patterns = []) {
|
|
|
17959
18992
|
}
|
|
17960
18993
|
function fillOfType(current, type, patterns) {
|
|
17961
18994
|
if (type === "gradient") return { type: "gradient", gradient: _chunkHGTDMKNEcjs.defaultEffectGradient.call(void 0, ) };
|
|
17962
|
-
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access',
|
|
18995
|
+
if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _589 => _589[0], 'optionalAccess', _590 => _590.id]), () => ( "checker")), scale: 1 };
|
|
17963
18996
|
return { type: "color", color: current.type === "color" ? current.color : "#000000" };
|
|
17964
18997
|
}
|
|
17965
18998
|
function effectControlChange(effect, key, value, patterns = []) {
|
|
17966
18999
|
const [top, ...rest] = key.split(".");
|
|
17967
19000
|
if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
|
|
17968
19001
|
if (top === "patternId" && !rest.length) {
|
|
17969
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
19002
|
+
const name = _optionalChain([patternOptions, 'call', _591 => _591(patterns), 'access', _592 => _592.find, 'call', _593 => _593((o) => o.value === value), 'optionalAccess', _594 => _594.label]);
|
|
17970
19003
|
return name ? { patternId: value, name } : { patternId: value };
|
|
17971
19004
|
}
|
|
17972
19005
|
if (!rest.length) return { [top]: value };
|
|
17973
19006
|
if (top === "fill" && rest[0] === "patternId") {
|
|
17974
|
-
const name = _optionalChain([patternOptions, 'call',
|
|
19007
|
+
const name = _optionalChain([patternOptions, 'call', _595 => _595(patterns), 'access', _596 => _596.find, 'call', _597 => _597((o) => o.value === value), 'optionalAccess', _598 => _598.label]);
|
|
17975
19008
|
return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
|
|
17976
19009
|
}
|
|
17977
19010
|
return { [top]: setPath(getPath(effect, top), rest, value) };
|
|
@@ -17998,7 +19031,7 @@ function colorPanelView(controller) {
|
|
|
17998
19031
|
profileName: profile.name,
|
|
17999
19032
|
workingSpace: profile.builtin,
|
|
18000
19033
|
mode: profile.mode,
|
|
18001
|
-
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access',
|
|
19034
|
+
cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _599 => _599.cmykProfile, 'optionalAccess', _600 => _600.name]), () => ( null)),
|
|
18002
19035
|
proof: proof ? { id: _nullishCoalesce(proof.profile.builtin, () => ( null)), name: proof.profile.name, intent: proof.intent, simulatePaper: proof.simulatePaper, gamutWarning: proof.gamutWarning, bpc: proof.bpc } : null
|
|
18003
19036
|
};
|
|
18004
19037
|
}
|
|
@@ -18180,33 +19213,33 @@ function boxFrameHit(overlay, p, tolerance, band) {
|
|
|
18180
19213
|
}
|
|
18181
19214
|
return null;
|
|
18182
19215
|
}
|
|
18183
|
-
var FreeTransformTool = (
|
|
18184
|
-
constructor(controller, options = {}) {;
|
|
19216
|
+
var FreeTransformTool = (_class16 = class {
|
|
19217
|
+
constructor(controller, options = {}) {;_class16.prototype.__init120.call(this);_class16.prototype.__init121.call(this);_class16.prototype.__init122.call(this);_class16.prototype.__init123.call(this);_class16.prototype.__init124.call(this);_class16.prototype.__init125.call(this);_class16.prototype.__init126.call(this);_class16.prototype.__init127.call(this);_class16.prototype.__init128.call(this);_class16.prototype.__init129.call(this);_class16.prototype.__init130.call(this);_class16.prototype.__init131.call(this);_class16.prototype.__init132.call(this);_class16.prototype.__init133.call(this);
|
|
18185
19218
|
this.controller = controller;
|
|
18186
19219
|
this.options = options;
|
|
18187
19220
|
}
|
|
18188
19221
|
|
|
18189
19222
|
|
|
18190
|
-
|
|
18191
|
-
|
|
19223
|
+
__init120() {this.sessionRef = null}
|
|
19224
|
+
__init121() {this.modeValue = "scale"}
|
|
18192
19225
|
/** The reference point in the untransformed frame's space (follows the transform). */
|
|
18193
|
-
|
|
18194
|
-
|
|
18195
|
-
|
|
19226
|
+
__init122() {this.refBox = { x: 0, y: 0 }}
|
|
19227
|
+
__init123() {this.corners = null}
|
|
19228
|
+
__init124() {this.drag = null}
|
|
18196
19229
|
/** The warp mesh in the frame's own space (null: no warp). */
|
|
18197
|
-
|
|
18198
|
-
|
|
18199
|
-
|
|
18200
|
-
|
|
19230
|
+
__init125() {this.mesh = null}
|
|
19231
|
+
__init126() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
|
|
19232
|
+
__init127() {this.pending = false}
|
|
19233
|
+
__init128() {this.viewScale = 1}
|
|
18201
19234
|
|
|
18202
19235
|
/** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
|
|
18203
|
-
|
|
19236
|
+
__init129() {this.typed = {}}
|
|
18204
19237
|
/** Width and height scale together when typed (the chain icon). */
|
|
18205
|
-
|
|
18206
|
-
|
|
18207
|
-
|
|
19238
|
+
__init130() {this.proportional = true}
|
|
19239
|
+
__init131() {this.error = null}
|
|
19240
|
+
__init132() {this.lastResult = null}
|
|
18208
19241
|
get active() {
|
|
18209
|
-
return Boolean(_optionalChain([this, 'access',
|
|
19242
|
+
return Boolean(_optionalChain([this, 'access', _601 => _601.sessionRef, 'optionalAccess', _602 => _602.isOpen]));
|
|
18210
19243
|
}
|
|
18211
19244
|
get session() {
|
|
18212
19245
|
return this.active ? this.sessionRef : null;
|
|
@@ -18215,7 +19248,7 @@ var FreeTransformTool = (_class15 = class {
|
|
|
18215
19248
|
return this.modeValue;
|
|
18216
19249
|
}
|
|
18217
19250
|
get interpolation() {
|
|
18218
|
-
return _nullishCoalesce(_optionalChain([this, 'access',
|
|
19251
|
+
return _nullishCoalesce(_optionalChain([this, 'access', _603 => _603.sessionRef, 'optionalAccess', _604 => _604.interpolation]), () => ( "bicubic"));
|
|
18219
19252
|
}
|
|
18220
19253
|
/** Whether the open transform has changed anything yet (a commit would add an undo step). */
|
|
18221
19254
|
get modified() {
|
|
@@ -18225,7 +19258,7 @@ var FreeTransformTool = (_class15 = class {
|
|
|
18225
19258
|
const start = s.startGeometry.corners;
|
|
18226
19259
|
return this.corners.some((p, i) => p.x !== start[i].x || p.y !== start[i].y);
|
|
18227
19260
|
}
|
|
18228
|
-
|
|
19261
|
+
__init133() {this.listeners = /* @__PURE__ */ new Set()}
|
|
18229
19262
|
/** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
|
|
18230
19263
|
subscribe(listener) {
|
|
18231
19264
|
this.listeners.add(listener);
|
|
@@ -18234,7 +19267,7 @@ var FreeTransformTool = (_class15 = class {
|
|
|
18234
19267
|
};
|
|
18235
19268
|
}
|
|
18236
19269
|
changed() {
|
|
18237
|
-
_optionalChain([this, 'access',
|
|
19270
|
+
_optionalChain([this, 'access', _605 => _605.options, 'access', _606 => _606.onChange, 'optionalCall', _607 => _607()]);
|
|
18238
19271
|
for (const l of this.listeners) l();
|
|
18239
19272
|
}
|
|
18240
19273
|
/** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
|
|
@@ -18627,7 +19660,7 @@ var FreeTransformTool = (_class15 = class {
|
|
|
18627
19660
|
}
|
|
18628
19661
|
/** Abandons the transform and restores everything. */
|
|
18629
19662
|
cancel() {
|
|
18630
|
-
_optionalChain([this, 'access',
|
|
19663
|
+
_optionalChain([this, 'access', _608 => _608.sessionRef, 'optionalAccess', _609 => _609.cancel, 'call', _610 => _610()]);
|
|
18631
19664
|
this.sessionRef = null;
|
|
18632
19665
|
this.corners = null;
|
|
18633
19666
|
this.mesh = null;
|
|
@@ -18668,7 +19701,7 @@ var FreeTransformTool = (_class15 = class {
|
|
|
18668
19701
|
}
|
|
18669
19702
|
return false;
|
|
18670
19703
|
}
|
|
18671
|
-
},
|
|
19704
|
+
}, _class16);
|
|
18672
19705
|
|
|
18673
19706
|
// src/image-editor/provider-effect-tools.ts
|
|
18674
19707
|
var ANIMATE_SCHEMA = {
|
|
@@ -18683,7 +19716,7 @@ function imageLayerAppliedEffects(layer) {
|
|
|
18683
19716
|
const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
|
|
18684
19717
|
if (layer.type === "pixel" && layer.generator) out.push({ id: "generator", ...ref(layer.generator), role: "effect layer", enabled: true, values: layer.generator.values, ...layer.generator.time ? { time: layer.generator.time } : {}, ...layer.generator.animate ? { animate: layer.generator.animate } : {} });
|
|
18685
19718
|
if (layer.type === "smart")
|
|
18686
|
-
(_nullishCoalesce(_optionalChain([layer, 'access',
|
|
19719
|
+
(_nullishCoalesce(_optionalChain([layer, 'access', _611 => _611.smartFilters, 'optionalAccess', _612 => _612.filters]), () => ( []))).forEach((f, index) => {
|
|
18687
19720
|
if (f.kind === "effect") out.push({ id: f.id, ...ref(f), role: "smart filter", enabled: f.enabled && layer.smartFilters.enabled, opacity: f.opacity, blend: f.blend, values: f.values, index });
|
|
18688
19721
|
});
|
|
18689
19722
|
return out;
|
|
@@ -18835,7 +19868,7 @@ var OTHER_TOOL_LABELS = {
|
|
|
18835
19868
|
watermark: "Watermark"
|
|
18836
19869
|
};
|
|
18837
19870
|
function imageToolLabel(tool) {
|
|
18838
|
-
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access',
|
|
19871
|
+
return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _613 => _613.find, 'call', _614 => _614((t) => t.id === tool), 'optionalAccess', _615 => _615.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
|
|
18839
19872
|
}
|
|
18840
19873
|
var IMAGE_TOOL_SHORTCUTS = {
|
|
18841
19874
|
...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
|
|
@@ -19949,4 +20982,15 @@ function createImageEditorDocument(controller, options = {}) {
|
|
|
19949
20982
|
|
|
19950
20983
|
|
|
19951
20984
|
|
|
19952
|
-
exports.ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUYXL6ZWQcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUYXL6ZWQcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUYXL6ZWQcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkUYXL6ZWQcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUYXL6ZWQcjs.D50; exports.D65 = _chunkUYXL6ZWQcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkBRKVNXDZcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkUYXL6ZWQcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkUYXL6ZWQcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkUYXL6ZWQcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkUYXL6ZWQcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkUYXL6ZWQcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUYXL6ZWQcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUYXL6ZWQcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUYXL6ZWQcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUYXL6ZWQcjs.LUMA_709; exports.LayerCompositor = _chunkUYXL6ZWQcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUYXL6ZWQcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUYXL6ZWQcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkUYXL6ZWQcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUYXL6ZWQcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkUYXL6ZWQcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATTERN_BLOCK_KEYS = _chunkUYXL6ZWQcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkUYXL6ZWQcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkUYXL6ZWQcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkUYXL6ZWQcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUYXL6ZWQcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkUYXL6ZWQcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUYXL6ZWQcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkUYXL6ZWQcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkUYXL6ZWQcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUYXL6ZWQcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUYXL6ZWQcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUYXL6ZWQcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUYXL6ZWQcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkUYXL6ZWQcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkBRKVNXDZcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkBRKVNXDZcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkUYXL6ZWQcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUYXL6ZWQcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUYXL6ZWQcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUYXL6ZWQcjs.activeSmartFilters; exports.addLayerEffect = _chunkUYXL6ZWQcjs.addLayerEffect; exports.addLayerFilter = _chunkUYXL6ZWQcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUYXL6ZWQcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUYXL6ZWQcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUYXL6ZWQcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUYXL6ZWQcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUYXL6ZWQcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUYXL6ZWQcjs.anchorPoint; exports.annotationBlend = _chunkUYXL6ZWQcjs.annotationBlend; exports.annotationLayerFor = _chunkUYXL6ZWQcjs.annotationLayerFor; exports.annotationLayerName = _chunkUYXL6ZWQcjs.annotationLayerName; exports.annotationOfLayer = _chunkUYXL6ZWQcjs.annotationOfLayer; exports.annotationOfShape = _chunkUYXL6ZWQcjs.annotationOfShape; exports.annotationOfType = _chunkUYXL6ZWQcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUYXL6ZWQcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUYXL6ZWQcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUYXL6ZWQcjs.applyAdjustments; exports.applyBoxBlur = _chunkUYXL6ZWQcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUYXL6ZWQcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUYXL6ZWQcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUYXL6ZWQcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUYXL6ZWQcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUYXL6ZWQcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUYXL6ZWQcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUYXL6ZWQcjs.applyParams; exports.applyProcess2Adjustments = _chunkUYXL6ZWQcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUYXL6ZWQcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUYXL6ZWQcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUYXL6ZWQcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUYXL6ZWQcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkUYXL6ZWQcjs.blurFilter; exports.borderCoverage = _chunkUYXL6ZWQcjs.borderCoverage; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUYXL6ZWQcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUYXL6ZWQcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkUYXL6ZWQcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUYXL6ZWQcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUYXL6ZWQcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUYXL6ZWQcjs.canvasToImagePoint; exports.caretAt = _chunkBRKVNXDZcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUYXL6ZWQcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUYXL6ZWQcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkUYXL6ZWQcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUYXL6ZWQcjs.compileAdjustmentLayer; exports.componentPath = _chunkUYXL6ZWQcjs.componentPath; exports.componentsCoverage = _chunkUYXL6ZWQcjs.componentsCoverage; exports.compositeDeep = _chunkUYXL6ZWQcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUYXL6ZWQcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUYXL6ZWQcjs.contentsBox; exports.contentsSurface = _chunkUYXL6ZWQcjs.contentsSurface; exports.contractCoverage = _chunkUYXL6ZWQcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUYXL6ZWQcjs.convertToSmartObject; exports.copySmartObject = _chunkUYXL6ZWQcjs.copySmartObject; exports.cornersFromMatrix = _chunkUYXL6ZWQcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUYXL6ZWQcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUYXL6ZWQcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkBRKVNXDZcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkBRKVNXDZcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkBRKVNXDZcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUYXL6ZWQcjs.createSelectionMask; exports.createShapeLayer = _chunkUYXL6ZWQcjs.createShapeLayer; exports.createTypeLayer = _chunkUYXL6ZWQcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkBRKVNXDZcjs.cssFont; exports.cssFontFamily = _chunkBRKVNXDZcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUYXL6ZWQcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUYXL6ZWQcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUYXL6ZWQcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUYXL6ZWQcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUYXL6ZWQcjs.decodeMergedImage; exports.decodePlanes = _chunkUYXL6ZWQcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUYXL6ZWQcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUYXL6ZWQcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUYXL6ZWQcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUYXL6ZWQcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUYXL6ZWQcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUYXL6ZWQcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUYXL6ZWQcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUYXL6ZWQcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUYXL6ZWQcjs.deserializeEffects; exports.deserializeLayer = _chunkUYXL6ZWQcjs.deserializeLayer; exports.deserializeLayers = _chunkUYXL6ZWQcjs.deserializeLayers; exports.deserializePatterns = _chunkUYXL6ZWQcjs.deserializePatterns; exports.deserializeSelection = _chunkUYXL6ZWQcjs.deserializeSelection; exports.developFilter = _chunkUYXL6ZWQcjs.developFilter; exports.developFromAdjustments = _chunkUYXL6ZWQcjs.developFromAdjustments; exports.developTarget = _chunkUYXL6ZWQcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUYXL6ZWQcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUYXL6ZWQcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkBRKVNXDZcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUYXL6ZWQcjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveLayerMask = _chunkUYXL6ZWQcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkUYXL6ZWQcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUYXL6ZWQcjs.encodeRle; exports.encodeSelectionRle = _chunkUYXL6ZWQcjs.encodeSelectionRle; exports.encodeSurface = _chunkUYXL6ZWQcjs.encodeSurface; exports.evalWarpMesh = _chunkBRKVNXDZcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUYXL6ZWQcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUYXL6ZWQcjs.expandCoverage; exports.exportPsd = _chunkUYXL6ZWQcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUYXL6ZWQcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUYXL6ZWQcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkBRKVNXDZcjs.fitParagraphRuns; exports.fitRuns = _chunkBRKVNXDZcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUYXL6ZWQcjs.flattenPath; exports.flipCorners = _chunkUYXL6ZWQcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.followLayerMove = _chunkUYXL6ZWQcjs.followLayerMove; exports.fontOf = _chunkBRKVNXDZcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUYXL6ZWQcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUYXL6ZWQcjs.geometryHomography; exports.getAnnotationBounds = _chunkUYXL6ZWQcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUYXL6ZWQcjs.getCropCursor; exports.getRotatedSize = _chunkUYXL6ZWQcjs.getRotatedSize; exports.getViewportMetrics = _chunkUYXL6ZWQcjs.getViewportMetrics; exports.getViewportProjection = _chunkUYXL6ZWQcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUYXL6ZWQcjs.greyMorphology; exports.groupLayers = _chunkUYXL6ZWQcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUYXL6ZWQcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUYXL6ZWQcjs.hasSurface; exports.hasWarp = _chunkUYXL6ZWQcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUYXL6ZWQcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUYXL6ZWQcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUYXL6ZWQcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUYXL6ZWQcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUYXL6ZWQcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUYXL6ZWQcjs.hueRangeTables; exports.hueRangeWeight = _chunkUYXL6ZWQcjs.hueRangeWeight; exports.hueSaturation = _chunkUYXL6ZWQcjs.hueSaturation; exports.identityCurve = _chunkUYXL6ZWQcjs.identityCurve; exports.identityLevels = _chunkUYXL6ZWQcjs.identityLevels; exports.identityTransform = _chunkUYXL6ZWQcjs.identityTransform; exports.identityWarpMesh = _chunkBRKVNXDZcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUYXL6ZWQcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkUYXL6ZWQcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUYXL6ZWQcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUYXL6ZWQcjs.invertMatrix3; exports.invertSelection = _chunkUYXL6ZWQcjs.invertSelection; exports.isActiveFilter = _chunkUYXL6ZWQcjs.isActiveFilter; exports.isActiveVectorMask = _chunkUYXL6ZWQcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkUYXL6ZWQcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkUYXL6ZWQcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUYXL6ZWQcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUYXL6ZWQcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUYXL6ZWQcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUYXL6ZWQcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUYXL6ZWQcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUYXL6ZWQcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUYXL6ZWQcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUYXL6ZWQcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUYXL6ZWQcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUYXL6ZWQcjs.isTransformAnchor; exports.isValidWarp = _chunkUYXL6ZWQcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkUYXL6ZWQcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkUYXL6ZWQcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUYXL6ZWQcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUYXL6ZWQcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUYXL6ZWQcjs.layerMaskKey; exports.layerMaskSelection = _chunkUYXL6ZWQcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkUYXL6ZWQcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkUYXL6ZWQcjs.layerTree; exports.layerTypeLabel = _chunkUYXL6ZWQcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUYXL6ZWQcjs.layersFromLegacy; exports.layoutText = _chunkBRKVNXDZcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUYXL6ZWQcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUYXL6ZWQcjs.legacyMaskOf; exports.legacyView = _chunkUYXL6ZWQcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUYXL6ZWQcjs.levelsValue; exports.linearSrgbToXy = _chunkUYXL6ZWQcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUYXL6ZWQcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUYXL6ZWQcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUYXL6ZWQcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk3T5VCDIVcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkUYXL6ZWQcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUYXL6ZWQcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkUYXL6ZWQcjs.matrixFromCorners; exports.matrixFromParams = _chunkUYXL6ZWQcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUYXL6ZWQcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkUYXL6ZWQcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUYXL6ZWQcjs.moveLayer; exports.moveSmartFilter = _chunkUYXL6ZWQcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUYXL6ZWQcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUYXL6ZWQcjs.neutralHueRange; exports.newContentsId = _chunkUYXL6ZWQcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUYXL6ZWQcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUYXL6ZWQcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUYXL6ZWQcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUYXL6ZWQcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUYXL6ZWQcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUYXL6ZWQcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUYXL6ZWQcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUYXL6ZWQcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUYXL6ZWQcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUYXL6ZWQcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUYXL6ZWQcjs.normalizeSubpaths; exports.normalizeText = _chunkUYXL6ZWQcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUYXL6ZWQcjs.offsetLayer; exports.offsetShape = _chunkUYXL6ZWQcjs.offsetShape; exports.offsetSmartObject = _chunkUYXL6ZWQcjs.offsetSmartObject; exports.offsetVectorMask = _chunkUYXL6ZWQcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkBRKVNXDZcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUYXL6ZWQcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUYXL6ZWQcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUYXL6ZWQcjs.parseLfx2; exports.parseLrfx = _chunkUYXL6ZWQcjs.parseLrfx; exports.parseOpenTypeFont = _chunk3T5VCDIVcjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUYXL6ZWQcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUYXL6ZWQcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUYXL6ZWQcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUYXL6ZWQcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUYXL6ZWQcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUYXL6ZWQcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUYXL6ZWQcjs.pixelLayerBounds; exports.pixelLayers = _chunkUYXL6ZWQcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUYXL6ZWQcjs.placeContents; exports.placeLayer = _chunkUYXL6ZWQcjs.placeLayer; exports.placementAt = _chunkUYXL6ZWQcjs.placementAt; exports.placementBounds = _chunkUYXL6ZWQcjs.placementBounds; exports.placementGeometry = _chunkUYXL6ZWQcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonCoverageBox = polygonCoverageBox; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUYXL6ZWQcjs.posterizeValue; exports.presetWarp = _chunkUYXL6ZWQcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUYXL6ZWQcjs.projectImagePoint; exports.projectImageRect = _chunkUYXL6ZWQcjs.projectImageRect; exports.projectMaskCoverage = _chunkUYXL6ZWQcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUYXL6ZWQcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUYXL6ZWQcjs.psdToLayers; exports.pullWarpMesh = _chunkBRKVNXDZcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUYXL6ZWQcjs.rangeLightness; exports.rasterContents = _chunkUYXL6ZWQcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUYXL6ZWQcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUYXL6ZWQcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUYXL6ZWQcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUYXL6ZWQcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUYXL6ZWQcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUYXL6ZWQcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUYXL6ZWQcjs.removeLayer; exports.removeLayerEffect = _chunkUYXL6ZWQcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUYXL6ZWQcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUYXL6ZWQcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUYXL6ZWQcjs.renderShape; exports.renderShapeRect = _chunkUYXL6ZWQcjs.renderShapeRect; exports.renderSmartObject = _chunkUYXL6ZWQcjs.renderSmartObject; exports.renderText = _chunkUYXL6ZWQcjs.renderText; exports.replaceContents = _chunkUYXL6ZWQcjs.replaceContents; exports.replaceTextRange = _chunkUYXL6ZWQcjs.replaceTextRange; exports.requireLayer = _chunkUYXL6ZWQcjs.requireLayer; exports.requireOperation = _chunkUYXL6ZWQcjs.requireOperation; exports.requireShapeLayer = _chunkUYXL6ZWQcjs.requireShapeLayer; exports.requireSmartObject = _chunkUYXL6ZWQcjs.requireSmartObject; exports.requireTypeLayer = _chunkUYXL6ZWQcjs.requireTypeLayer; exports.requireUnlocked = _chunkUYXL6ZWQcjs.requireUnlocked; exports.rerender = _chunkUYXL6ZWQcjs.rerender; exports.rerenderShape = _chunkUYXL6ZWQcjs.rerenderShape; exports.rerenderText = _chunkUYXL6ZWQcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUYXL6ZWQcjs.resizeSelection; exports.resizeWarpMesh = _chunkBRKVNXDZcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUYXL6ZWQcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkUYXL6ZWQcjs.resolveVectorMasks; exports.restyleRange = _chunkBRKVNXDZcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUYXL6ZWQcjs.rgbToGray; exports.rgbToHsl = _chunkUYXL6ZWQcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUYXL6ZWQcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUYXL6ZWQcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUYXL6ZWQcjs.sampleLut; exports.sampleToneLut = _chunkUYXL6ZWQcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkUYXL6ZWQcjs.selectionArea; exports.selectionFromCoverage = _chunkUYXL6ZWQcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUYXL6ZWQcjs.selectionFromPixels; exports.selectionFromRegion = _chunkUYXL6ZWQcjs.selectionFromRegion; exports.selectionFromTiles = _chunkUYXL6ZWQcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkUYXL6ZWQcjs.selectionToCoverage; exports.selectionToPixels = _chunkUYXL6ZWQcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionValueAt = _chunkUYXL6ZWQcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUYXL6ZWQcjs.serializeContents; exports.serializeEffects = _chunkUYXL6ZWQcjs.serializeEffects; exports.serializeLayer = _chunkUYXL6ZWQcjs.serializeLayer; exports.serializeLayers = _chunkUYXL6ZWQcjs.serializeLayers; exports.serializeLayersExternal = _chunkUYXL6ZWQcjs.serializeLayersExternal; exports.serializePatterns = _chunkUYXL6ZWQcjs.serializePatterns; exports.serializeSelection = _chunkUYXL6ZWQcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUYXL6ZWQcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUYXL6ZWQcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUYXL6ZWQcjs.setLayerMask; exports.setLayerProperties = _chunkUYXL6ZWQcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUYXL6ZWQcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUYXL6ZWQcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUYXL6ZWQcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUYXL6ZWQcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUYXL6ZWQcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUYXL6ZWQcjs.shapeLayers; exports.shapeOutline = _chunkUYXL6ZWQcjs.shapeOutline; exports.shapeRenderClip = _chunkUYXL6ZWQcjs.shapeRenderClip; exports.shiftCoverage = _chunkUYXL6ZWQcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkBRKVNXDZcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkUYXL6ZWQcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkBRKVNXDZcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUYXL6ZWQcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUYXL6ZWQcjs.temperatureToKelvin; exports.textIndexAt = _chunkBRKVNXDZcjs.textIndexAt; exports.textMatrix = _chunkUYXL6ZWQcjs.textMatrix; exports.textOrientation = _chunkUYXL6ZWQcjs.textOrientation; exports.textOutlines = _chunkUYXL6ZWQcjs.textOutlines; exports.textRange = _chunkUYXL6ZWQcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkUYXL6ZWQcjs.toTextSpace; exports.toneCurve = _chunkUYXL6ZWQcjs.toneCurve; exports.toneLuts = _chunkUYXL6ZWQcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUYXL6ZWQcjs.transformHomography; exports.transformMap = _chunkUYXL6ZWQcjs.transformMap; exports.transformShapeComponents = _chunkUYXL6ZWQcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUYXL6ZWQcjs.transformTypeLayer; exports.transformVectorMask = _chunkUYXL6ZWQcjs.transformVectorMask; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUYXL6ZWQcjs.transformedBox; exports.transformedPoint = _chunkUYXL6ZWQcjs.transformedPoint; exports.translateLayer = _chunkUYXL6ZWQcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUYXL6ZWQcjs.typeAsPixelLayer; exports.typeFrame = _chunkUYXL6ZWQcjs.typeFrame; exports.typeFromAnnotation = _chunkUYXL6ZWQcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUYXL6ZWQcjs.typeLayerName; exports.ungroupLayer = _chunkUYXL6ZWQcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUYXL6ZWQcjs.unionRect; exports.unprojectCanvasPoint = _chunkUYXL6ZWQcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUYXL6ZWQcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUYXL6ZWQcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUYXL6ZWQcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUYXL6ZWQcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUYXL6ZWQcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUYXL6ZWQcjs.updateTypeLayer; exports.userErrorMessage = _chunkUYXL6ZWQcjs.userErrorMessage; exports.uvToXy = _chunkUYXL6ZWQcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkUYXL6ZWQcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkUYXL6ZWQcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkUYXL6ZWQcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkUYXL6ZWQcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUYXL6ZWQcjs.vibranceLinear; exports.vibrancePixel = _chunkUYXL6ZWQcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkBRKVNXDZcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkBRKVNXDZcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkBRKVNXDZcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkBRKVNXDZcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUYXL6ZWQcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUYXL6ZWQcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUYXL6ZWQcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUYXL6ZWQcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUYXL6ZWQcjs.withNewIds; exports.writeAdjustmentBlock = _chunkUYXL6ZWQcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUYXL6ZWQcjs.writeLfx2; exports.writePatternBlock = _chunkUYXL6ZWQcjs.writePatternBlock; exports.writePsd = _chunkUYXL6ZWQcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUYXL6ZWQcjs.xyToTempTint; exports.xyToUv = _chunkUYXL6ZWQcjs.xyToUv;
|
|
20985
|
+
|
|
20986
|
+
|
|
20987
|
+
|
|
20988
|
+
|
|
20989
|
+
|
|
20990
|
+
|
|
20991
|
+
|
|
20992
|
+
|
|
20993
|
+
|
|
20994
|
+
|
|
20995
|
+
|
|
20996
|
+
exports.ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkUYXL6ZWQcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkUYXL6ZWQcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkUYXL6ZWQcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkUYXL6ZWQcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkUYXL6ZWQcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkUYXL6ZWQcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.ColorGmm = ColorGmm; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkUYXL6ZWQcjs.D50; exports.D65 = _chunkUYXL6ZWQcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkBRKVNXDZcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkUYXL6ZWQcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkBRKVNXDZcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkUYXL6ZWQcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkUYXL6ZWQcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkUYXL6ZWQcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = GAMMA; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.GridGraph = GridGraph; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkUYXL6ZWQcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkUYXL6ZWQcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkUYXL6ZWQcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkUYXL6ZWQcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkUYXL6ZWQcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkUYXL6ZWQcjs.LUMA_709; exports.LayerCompositor = _chunkUYXL6ZWQcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkUYXL6ZWQcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkUYXL6ZWQcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkUYXL6ZWQcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkUYXL6ZWQcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkUYXL6ZWQcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkUYXL6ZWQcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATTERN_BLOCK_KEYS = _chunkUYXL6ZWQcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkUYXL6ZWQcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkUYXL6ZWQcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkUYXL6ZWQcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkUYXL6ZWQcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkUYXL6ZWQcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkUYXL6ZWQcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkUYXL6ZWQcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkUYXL6ZWQcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkUYXL6ZWQcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkUYXL6ZWQcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkUYXL6ZWQcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkUYXL6ZWQcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkUYXL6ZWQcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkUYXL6ZWQcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = UNITS; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkUYXL6ZWQcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkBRKVNXDZcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkBRKVNXDZcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_SIZE = WORK_SIZE; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkUYXL6ZWQcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkUYXL6ZWQcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkUYXL6ZWQcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkUYXL6ZWQcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkUYXL6ZWQcjs.activeSmartFilters; exports.addLayerEffect = _chunkUYXL6ZWQcjs.addLayerEffect; exports.addLayerFilter = _chunkUYXL6ZWQcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkUYXL6ZWQcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkUYXL6ZWQcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkUYXL6ZWQcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkUYXL6ZWQcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkUYXL6ZWQcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkUYXL6ZWQcjs.anchorPoint; exports.annotationBlend = _chunkUYXL6ZWQcjs.annotationBlend; exports.annotationLayerFor = _chunkUYXL6ZWQcjs.annotationLayerFor; exports.annotationLayerName = _chunkUYXL6ZWQcjs.annotationLayerName; exports.annotationOfLayer = _chunkUYXL6ZWQcjs.annotationOfLayer; exports.annotationOfShape = _chunkUYXL6ZWQcjs.annotationOfShape; exports.annotationOfType = _chunkUYXL6ZWQcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkUYXL6ZWQcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkUYXL6ZWQcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkUYXL6ZWQcjs.applyAdjustments; exports.applyBoxBlur = _chunkUYXL6ZWQcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkUYXL6ZWQcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkUYXL6ZWQcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkUYXL6ZWQcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkUYXL6ZWQcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkUYXL6ZWQcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkUYXL6ZWQcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkUYXL6ZWQcjs.applyParams; exports.applyProcess2Adjustments = _chunkUYXL6ZWQcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkUYXL6ZWQcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkUYXL6ZWQcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkUYXL6ZWQcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkUYXL6ZWQcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkUYXL6ZWQcjs.blurFilter; exports.borderCoverage = _chunkUYXL6ZWQcjs.borderCoverage; exports.boxBlur = boxBlur; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkUYXL6ZWQcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkUYXL6ZWQcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkUYXL6ZWQcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkUYXL6ZWQcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkUYXL6ZWQcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkUYXL6ZWQcjs.canvasToImagePoint; exports.caretAt = _chunkBRKVNXDZcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkUYXL6ZWQcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkUYXL6ZWQcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkUYXL6ZWQcjs.combineSelections; exports.compileAdjustmentLayer = _chunkUYXL6ZWQcjs.compileAdjustmentLayer; exports.componentPath = _chunkUYXL6ZWQcjs.componentPath; exports.componentsCoverage = _chunkUYXL6ZWQcjs.componentsCoverage; exports.compositeDeep = _chunkUYXL6ZWQcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkUYXL6ZWQcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkUYXL6ZWQcjs.contentsBox; exports.contentsSurface = _chunkUYXL6ZWQcjs.contentsSurface; exports.contractCoverage = _chunkUYXL6ZWQcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkUYXL6ZWQcjs.convertToSmartObject; exports.copySmartObject = _chunkUYXL6ZWQcjs.copySmartObject; exports.cornersFromMatrix = _chunkUYXL6ZWQcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkUYXL6ZWQcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkUYXL6ZWQcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkBRKVNXDZcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkBRKVNXDZcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkBRKVNXDZcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkUYXL6ZWQcjs.createSelectionMask; exports.createShapeLayer = _chunkUYXL6ZWQcjs.createShapeLayer; exports.createTypeLayer = _chunkUYXL6ZWQcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkBRKVNXDZcjs.cssFont; exports.cssFontFamily = _chunkBRKVNXDZcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkUYXL6ZWQcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkUYXL6ZWQcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkUYXL6ZWQcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkUYXL6ZWQcjs.decodeLayerMask; exports.decodeMergedImage = _chunkUYXL6ZWQcjs.decodeMergedImage; exports.decodePlanes = _chunkUYXL6ZWQcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkUYXL6ZWQcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkUYXL6ZWQcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkUYXL6ZWQcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkUYXL6ZWQcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkUYXL6ZWQcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkUYXL6ZWQcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkUYXL6ZWQcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkUYXL6ZWQcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkUYXL6ZWQcjs.deserializeEffects; exports.deserializeLayer = _chunkUYXL6ZWQcjs.deserializeLayer; exports.deserializeLayers = _chunkUYXL6ZWQcjs.deserializeLayers; exports.deserializePatterns = _chunkUYXL6ZWQcjs.deserializePatterns; exports.deserializeSelection = _chunkUYXL6ZWQcjs.deserializeSelection; exports.developFilter = _chunkUYXL6ZWQcjs.developFilter; exports.developFromAdjustments = _chunkUYXL6ZWQcjs.developFromAdjustments; exports.developTarget = _chunkUYXL6ZWQcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkUYXL6ZWQcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkUYXL6ZWQcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkBRKVNXDZcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkUYXL6ZWQcjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveLayerMask = _chunkUYXL6ZWQcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkUYXL6ZWQcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkUYXL6ZWQcjs.encodeRle; exports.encodeSelectionRle = _chunkUYXL6ZWQcjs.encodeSelectionRle; exports.encodeSurface = _chunkUYXL6ZWQcjs.encodeSurface; exports.evalWarpMesh = _chunkBRKVNXDZcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkUYXL6ZWQcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkUYXL6ZWQcjs.expandCoverage; exports.exportPsd = _chunkUYXL6ZWQcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkUYXL6ZWQcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkUYXL6ZWQcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkBRKVNXDZcjs.fitParagraphRuns; exports.fitRuns = _chunkBRKVNXDZcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkUYXL6ZWQcjs.flattenPath; exports.flipCorners = _chunkUYXL6ZWQcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.followLayerMove = _chunkUYXL6ZWQcjs.followLayerMove; exports.fontOf = _chunkBRKVNXDZcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkUYXL6ZWQcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkUYXL6ZWQcjs.geometryHomography; exports.getAnnotationBounds = _chunkUYXL6ZWQcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkUYXL6ZWQcjs.getCropCursor; exports.getRotatedSize = _chunkUYXL6ZWQcjs.getRotatedSize; exports.getViewportMetrics = _chunkUYXL6ZWQcjs.getViewportMetrics; exports.getViewportProjection = _chunkUYXL6ZWQcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkUYXL6ZWQcjs.greyMorphology; exports.groupLayers = _chunkUYXL6ZWQcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkUYXL6ZWQcjs.hasResampledLegacyMask; exports.hasSurface = _chunkUYXL6ZWQcjs.hasSurface; exports.hasWarp = _chunkUYXL6ZWQcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkUYXL6ZWQcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkUYXL6ZWQcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkUYXL6ZWQcjs.hitTestAnnotation; exports.hitTestCrop = _chunkUYXL6ZWQcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkUYXL6ZWQcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkUYXL6ZWQcjs.hueRangeTables; exports.hueRangeWeight = _chunkUYXL6ZWQcjs.hueRangeWeight; exports.hueSaturation = _chunkUYXL6ZWQcjs.hueSaturation; exports.identityCurve = _chunkUYXL6ZWQcjs.identityCurve; exports.identityLevels = _chunkUYXL6ZWQcjs.identityLevels; exports.identityTransform = _chunkUYXL6ZWQcjs.identityTransform; exports.identityWarpMesh = _chunkBRKVNXDZcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkUYXL6ZWQcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkUYXL6ZWQcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkUYXL6ZWQcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkUYXL6ZWQcjs.invertMatrix3; exports.invertSelection = _chunkUYXL6ZWQcjs.invertSelection; exports.isActiveFilter = _chunkUYXL6ZWQcjs.isActiveFilter; exports.isActiveVectorMask = _chunkUYXL6ZWQcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkUYXL6ZWQcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkUYXL6ZWQcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkUYXL6ZWQcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkUYXL6ZWQcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkUYXL6ZWQcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkUYXL6ZWQcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkUYXL6ZWQcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkUYXL6ZWQcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkUYXL6ZWQcjs.isSelectionEmpty; exports.isSelectionMode = _chunkUYXL6ZWQcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkUYXL6ZWQcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkUYXL6ZWQcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkUYXL6ZWQcjs.isTransformAnchor; exports.isValidWarp = _chunkUYXL6ZWQcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkUYXL6ZWQcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkUYXL6ZWQcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkUYXL6ZWQcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkUYXL6ZWQcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkUYXL6ZWQcjs.layerMaskKey; exports.layerMaskSelection = _chunkUYXL6ZWQcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkUYXL6ZWQcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkUYXL6ZWQcjs.layerTree; exports.layerTypeLabel = _chunkUYXL6ZWQcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkUYXL6ZWQcjs.layersFromLegacy; exports.layoutText = _chunkBRKVNXDZcjs.layoutText; exports.legacyAdjustmentLayer = _chunkUYXL6ZWQcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkUYXL6ZWQcjs.legacyMaskOf; exports.legacyView = _chunkUYXL6ZWQcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkUYXL6ZWQcjs.levelsValue; exports.linearSrgbToXy = _chunkUYXL6ZWQcjs.linearSrgbToXy; exports.linearToSrgb = _chunkUYXL6ZWQcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkUYXL6ZWQcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkUYXL6ZWQcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk3T5VCDIVcjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkUYXL6ZWQcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkUYXL6ZWQcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkUYXL6ZWQcjs.matrixFromCorners; exports.matrixFromParams = _chunkUYXL6ZWQcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkUYXL6ZWQcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkUYXL6ZWQcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkUYXL6ZWQcjs.moveLayer; exports.moveSmartFilter = _chunkUYXL6ZWQcjs.moveSmartFilter; exports.mulMatrix3 = _chunkUYXL6ZWQcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkUYXL6ZWQcjs.neutralHueRange; exports.newContentsId = _chunkUYXL6ZWQcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkUYXL6ZWQcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkUYXL6ZWQcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkUYXL6ZWQcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkUYXL6ZWQcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkUYXL6ZWQcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkUYXL6ZWQcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkUYXL6ZWQcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkUYXL6ZWQcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkUYXL6ZWQcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkUYXL6ZWQcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkUYXL6ZWQcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkUYXL6ZWQcjs.normalizeSubpaths; exports.normalizeText = _chunkUYXL6ZWQcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkUYXL6ZWQcjs.offsetLayer; exports.offsetShape = _chunkUYXL6ZWQcjs.offsetShape; exports.offsetSmartObject = _chunkUYXL6ZWQcjs.offsetSmartObject; exports.offsetVectorMask = _chunkUYXL6ZWQcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkBRKVNXDZcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkUYXL6ZWQcjs.parseAdjustmentBlock; exports.parseBlend = _chunkUYXL6ZWQcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkUYXL6ZWQcjs.parseLfx2; exports.parseLrfx = _chunkUYXL6ZWQcjs.parseLrfx; exports.parseOpenTypeFont = _chunk3T5VCDIVcjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkUYXL6ZWQcjs.parsePatternBlock; exports.parseSelectionMode = _chunkUYXL6ZWQcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkUYXL6ZWQcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkUYXL6ZWQcjs.patchParagraphStyle; exports.patchTextStyle = _chunkUYXL6ZWQcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkUYXL6ZWQcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkUYXL6ZWQcjs.pixelLayerBounds; exports.pixelLayers = _chunkUYXL6ZWQcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkUYXL6ZWQcjs.placeContents; exports.placeLayer = _chunkUYXL6ZWQcjs.placeLayer; exports.placementAt = _chunkUYXL6ZWQcjs.placementAt; exports.placementBounds = _chunkUYXL6ZWQcjs.placementBounds; exports.placementGeometry = _chunkUYXL6ZWQcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonCoverageBox = polygonCoverageBox; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkUYXL6ZWQcjs.posterizeValue; exports.presetWarp = _chunkUYXL6ZWQcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkUYXL6ZWQcjs.projectImagePoint; exports.projectImageRect = _chunkUYXL6ZWQcjs.projectImageRect; exports.projectMaskCoverage = _chunkUYXL6ZWQcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkUYXL6ZWQcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkUYXL6ZWQcjs.psdToLayers; exports.pullWarpMesh = _chunkBRKVNXDZcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = quickSelectStroke; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkUYXL6ZWQcjs.rangeLightness; exports.rasterContents = _chunkUYXL6ZWQcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkUYXL6ZWQcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkUYXL6ZWQcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkUYXL6ZWQcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkUYXL6ZWQcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkUYXL6ZWQcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkUYXL6ZWQcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkUYXL6ZWQcjs.removeLayer; exports.removeLayerEffect = _chunkUYXL6ZWQcjs.removeLayerEffect; exports.removeLayerFilter = _chunkUYXL6ZWQcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkUYXL6ZWQcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkUYXL6ZWQcjs.renderShape; exports.renderShapeRect = _chunkUYXL6ZWQcjs.renderShapeRect; exports.renderSmartObject = _chunkUYXL6ZWQcjs.renderSmartObject; exports.renderText = _chunkUYXL6ZWQcjs.renderText; exports.replaceContents = _chunkUYXL6ZWQcjs.replaceContents; exports.replaceTextRange = _chunkUYXL6ZWQcjs.replaceTextRange; exports.requireLayer = _chunkUYXL6ZWQcjs.requireLayer; exports.requireOperation = _chunkUYXL6ZWQcjs.requireOperation; exports.requireShapeLayer = _chunkUYXL6ZWQcjs.requireShapeLayer; exports.requireSmartObject = _chunkUYXL6ZWQcjs.requireSmartObject; exports.requireTypeLayer = _chunkUYXL6ZWQcjs.requireTypeLayer; exports.requireUnlocked = _chunkUYXL6ZWQcjs.requireUnlocked; exports.rerender = _chunkUYXL6ZWQcjs.rerender; exports.rerenderShape = _chunkUYXL6ZWQcjs.rerenderShape; exports.rerenderText = _chunkUYXL6ZWQcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkUYXL6ZWQcjs.resizeSelection; exports.resizeWarpMesh = _chunkBRKVNXDZcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkUYXL6ZWQcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkUYXL6ZWQcjs.resolveVectorMasks; exports.restyleRange = _chunkBRKVNXDZcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkUYXL6ZWQcjs.rgbToGray; exports.rgbToHsl = _chunkUYXL6ZWQcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkUYXL6ZWQcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkUYXL6ZWQcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkUYXL6ZWQcjs.sampleLut; exports.sampleToneLut = _chunkUYXL6ZWQcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkUYXL6ZWQcjs.selectionArea; exports.selectionFromCoverage = _chunkUYXL6ZWQcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkUYXL6ZWQcjs.selectionFromPixels; exports.selectionFromRegion = _chunkUYXL6ZWQcjs.selectionFromRegion; exports.selectionFromTiles = _chunkUYXL6ZWQcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkUYXL6ZWQcjs.selectionToCoverage; exports.selectionToPixels = _chunkUYXL6ZWQcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionValueAt = _chunkUYXL6ZWQcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkUYXL6ZWQcjs.serializeContents; exports.serializeEffects = _chunkUYXL6ZWQcjs.serializeEffects; exports.serializeLayer = _chunkUYXL6ZWQcjs.serializeLayer; exports.serializeLayers = _chunkUYXL6ZWQcjs.serializeLayers; exports.serializeLayersExternal = _chunkUYXL6ZWQcjs.serializeLayersExternal; exports.serializePatterns = _chunkUYXL6ZWQcjs.serializePatterns; exports.serializeSelection = _chunkUYXL6ZWQcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkUYXL6ZWQcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkUYXL6ZWQcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkUYXL6ZWQcjs.setLayerMask; exports.setLayerProperties = _chunkUYXL6ZWQcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkUYXL6ZWQcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkUYXL6ZWQcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkUYXL6ZWQcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkUYXL6ZWQcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkUYXL6ZWQcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkUYXL6ZWQcjs.shapeGeometryBounds; exports.shapeLayers = _chunkUYXL6ZWQcjs.shapeLayers; exports.shapeOutline = _chunkUYXL6ZWQcjs.shapeOutline; exports.shapeRenderClip = _chunkUYXL6ZWQcjs.shapeRenderClip; exports.shiftCoverage = _chunkUYXL6ZWQcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkUYXL6ZWQcjs.smartObjectLayers; exports.smoothCoverage = _chunkUYXL6ZWQcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smoothnessWeights = smoothnessWeights; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkBRKVNXDZcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkUYXL6ZWQcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkBRKVNXDZcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkUYXL6ZWQcjs.tempTintToXy; exports.temperatureToKelvin = _chunkUYXL6ZWQcjs.temperatureToKelvin; exports.textIndexAt = _chunkBRKVNXDZcjs.textIndexAt; exports.textMatrix = _chunkUYXL6ZWQcjs.textMatrix; exports.textOrientation = _chunkUYXL6ZWQcjs.textOrientation; exports.textOutlines = _chunkUYXL6ZWQcjs.textOutlines; exports.textRange = _chunkUYXL6ZWQcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkUYXL6ZWQcjs.toTextSpace; exports.toneCurve = _chunkUYXL6ZWQcjs.toneCurve; exports.toneLuts = _chunkUYXL6ZWQcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkUYXL6ZWQcjs.transformHomography; exports.transformMap = _chunkUYXL6ZWQcjs.transformMap; exports.transformShapeComponents = _chunkUYXL6ZWQcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkUYXL6ZWQcjs.transformTypeLayer; exports.transformVectorMask = _chunkUYXL6ZWQcjs.transformVectorMask; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkUYXL6ZWQcjs.transformedBox; exports.transformedPoint = _chunkUYXL6ZWQcjs.transformedPoint; exports.translateLayer = _chunkUYXL6ZWQcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkUYXL6ZWQcjs.typeAsPixelLayer; exports.typeFrame = _chunkUYXL6ZWQcjs.typeFrame; exports.typeFromAnnotation = _chunkUYXL6ZWQcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkUYXL6ZWQcjs.typeLayerName; exports.ungroupLayer = _chunkUYXL6ZWQcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkUYXL6ZWQcjs.unionRect; exports.unprojectCanvasPoint = _chunkUYXL6ZWQcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkUYXL6ZWQcjs.updateLayerEffect; exports.updateLayerFilter = _chunkUYXL6ZWQcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkUYXL6ZWQcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkUYXL6ZWQcjs.updateShapeLayer; exports.updateSmartFilter = _chunkUYXL6ZWQcjs.updateSmartFilter; exports.updateTypeLayer = _chunkUYXL6ZWQcjs.updateTypeLayer; exports.upscaleRegion = upscaleRegion; exports.userErrorMessage = _chunkUYXL6ZWQcjs.userErrorMessage; exports.uvToXy = _chunkUYXL6ZWQcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkUYXL6ZWQcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkUYXL6ZWQcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkUYXL6ZWQcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkUYXL6ZWQcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkUYXL6ZWQcjs.vibranceLinear; exports.vibrancePixel = _chunkUYXL6ZWQcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkBRKVNXDZcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkBRKVNXDZcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkBRKVNXDZcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkBRKVNXDZcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkUYXL6ZWQcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkUYXL6ZWQcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkUYXL6ZWQcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkUYXL6ZWQcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkUYXL6ZWQcjs.withNewIds; exports.workImage = workImage; exports.writeAdjustmentBlock = _chunkUYXL6ZWQcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkUYXL6ZWQcjs.writeLfx2; exports.writePatternBlock = _chunkUYXL6ZWQcjs.writePatternBlock; exports.writePsd = _chunkUYXL6ZWQcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkUYXL6ZWQcjs.xyToTempTint; exports.xyToUv = _chunkUYXL6ZWQcjs.xyToUv;
|