@pixerate/editor 0.112.0 → 0.113.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.
@@ -4,7 +4,37 @@ var _chunkD6FH2YAXcjs = require('../chunk-D6FH2YAX.cjs');
4
4
 
5
5
 
6
6
  var _chunkVJUVNERTcjs = require('../chunk-VJUVNERT.cjs');
7
- require('../chunk-FTBZPI77.cjs');
7
+
8
+
9
+
10
+
11
+
12
+
13
+
14
+
15
+
16
+
17
+
18
+
19
+
20
+
21
+
22
+
23
+
24
+
25
+
26
+
27
+
28
+
29
+
30
+
31
+
32
+
33
+
34
+
35
+
36
+
37
+ var _chunk4KLT7ZYScjs = require('../chunk-4KLT7ZYS.cjs');
8
38
 
9
39
 
10
40
 
@@ -2620,7 +2650,7 @@ function createOutlineTextShaper(fonts, options = {}) {
2620
2650
  return { face: e.face, family, key: family.toLowerCase(), weight, italic, postScript };
2621
2651
  });
2622
2652
  const fallbackKey = (_nullishCoalesce(options.fallback, () => ( entries[0].family))).toLowerCase();
2623
- const pick2 = (font) => {
2653
+ const pick3 = (font) => {
2624
2654
  if (font.postScriptName) {
2625
2655
  const exact = entries.find((e) => e.postScript === font.postScriptName);
2626
2656
  if (exact) return { entry: exact, available: true };
@@ -2648,22 +2678,22 @@ function createOutlineTextShaper(fonts, options = {}) {
2648
2678
  return {
2649
2679
  id: _nullishCoalesce(options.id, () => ( `outline:${entries.map((e) => `${e.family}/${e.weight}${e.italic ? "i" : ""}`).join(",")}`)),
2650
2680
  resolve(font) {
2651
- const { entry, available } = pick2(font);
2681
+ const { entry, available } = pick3(font);
2652
2682
  return { family: entry.family, available };
2653
2683
  },
2654
2684
  metrics(font) {
2655
- const { face } = pick2(font).entry;
2685
+ const { face } = pick3(font).entry;
2656
2686
  const k = font.size / face.unitsPerEm;
2657
2687
  return { ascent: face.ascender * k, descent: -face.descender * k };
2658
2688
  },
2659
2689
  measure(text, font) {
2660
- const { face } = pick2(font).entry;
2690
+ const { face } = pick3(font).entry;
2661
2691
  const out = [0];
2662
2692
  for (let i = 1; i <= text.length; i++) out.push(face.getAdvanceWidth(text.slice(0, i), font.size, { kerning: true }));
2663
2693
  return out;
2664
2694
  },
2665
2695
  outline(text, font, x, y) {
2666
- return toPath(pick2(font).entry.face.getPath(text, x, y, font.size, { kerning: true }).commands);
2696
+ return toPath(pick3(font).entry.face.getPath(text, x, y, font.size, { kerning: true }).commands);
2667
2697
  },
2668
2698
  families() {
2669
2699
  return [...new Set(entries.map((e) => e.family))];
@@ -3153,6 +3183,9 @@ var FreeTransformSession = (_class4 = class {
3153
3183
 
3154
3184
  // src/image-editor/controller.ts
3155
3185
  var IMAGE_EDITOR_SCHEMA_VERSION = _chunkYGIMK4NXcjs.LAYERED_SCHEMA_VERSION;
3186
+ var RETOUCH_TOOLS = ["clone", "heal", "spot-heal", "smudge", "dodge", "burn", "sponge"];
3187
+ var isRetouchTool = (tool) => RETOUCH_TOOLS.includes(tool);
3188
+ var STROKE_TOOLS = ["brush", "eraser", "mixer", ...RETOUCH_TOOLS];
3156
3189
  function paintCoverageInto(base, coverage, apply, rects) {
3157
3190
  const tiles = new Map(base.tiles);
3158
3191
  const done = /* @__PURE__ */ new Set();
@@ -3176,7 +3209,7 @@ function defaultTile(s) {
3176
3209
  return d;
3177
3210
  }
3178
3211
  var PaintStrokeSession = (_class5 = class {
3179
- constructor(controller, target, stroke, apply) {;_class5.prototype.__init35.call(this);_class5.prototype.__init36.call(this);_class5.prototype.__init37.call(this);_class5.prototype.__init38.call(this);_class5.prototype.__init39.call(this);
3212
+ constructor(controller, target, stroke, apply) {;_class5.prototype.__init35.call(this);_class5.prototype.__init36.call(this);_class5.prototype.__init37.call(this);_class5.prototype.__init38.call(this);_class5.prototype.__init39.call(this);_class5.prototype.__init40.call(this);_class5.prototype.__init41.call(this);_class5.prototype.__init42.call(this);
3180
3213
  this.controller = controller;
3181
3214
  this.target = target;
3182
3215
  this.apply = apply;
@@ -3186,6 +3219,18 @@ var PaintStrokeSession = (_class5 = class {
3186
3219
  if (stroke instanceof _chunk7VOHOPLWcjs.StrokeCoverage) {
3187
3220
  this.stroke = stroke;
3188
3221
  this.mixer = null;
3222
+ } else if ("kind" in stroke && stroke.kind === "coverage") {
3223
+ this.stroke = stroke.coverage;
3224
+ this.mixer = null;
3225
+ this.retouch = stroke;
3226
+ } else if ("kind" in stroke) {
3227
+ this.stroke = null;
3228
+ this.retouch = stroke;
3229
+ if (this.base.channels === 1) {
3230
+ const view = _chunk4KLT7ZYScjs.rgbaViewOfGrey.call(void 0, this.mixerPixels());
3231
+ this.mixer = stroke.create(view.target);
3232
+ this.flushView = view.flush;
3233
+ } else this.mixer = stroke.create(this.mixerPixels());
3189
3234
  } else {
3190
3235
  this.stroke = null;
3191
3236
  this.mixer = stroke.create(this.mixerPixels());
@@ -3202,10 +3247,20 @@ var PaintStrokeSession = (_class5 = class {
3202
3247
 
3203
3248
 
3204
3249
  __init36() {this.mixerInit = null}
3250
+ __init37() {this.retouch = null}
3251
+ /** Writes a mask's RGBA view back (sequential retouching on a mask). */
3252
+ __init38() {this.flushView = null}
3253
+ __init39() {this.started = false}
3205
3254
  /** Mixer tiles written since the last update: they get new tile objects so the compositor sees them change. */
3206
- __init37() {this.fresh = /* @__PURE__ */ new Set()}
3207
- __init38() {this.last = null}
3208
- __init39() {this.closed = false}
3255
+ __init40() {this.fresh = /* @__PURE__ */ new Set()}
3256
+ __init41() {this.last = null}
3257
+ __init42() {this.closed = false}
3258
+ /** The new tile of a coverage stroke over the pre-stroke tile `src`. */
3259
+ compositeTile(src, tx, ty, options = {}, paint) {
3260
+ const r = this.retouch;
3261
+ if (r && r.kind === "coverage") return _chunk4KLT7ZYScjs.applyRetouchToTile.call(void 0, this.stroke.coverage, src, this.base.channels, tx, ty, _nullishCoalesce(paint, () => ( r.paint())), r.apply, options);
3262
+ return _chunk7VOHOPLWcjs.applyStrokeToTile.call(void 0, this.stroke.coverage, src, this.base.channels, tx, ty, this.apply, options);
3263
+ }
3209
3264
  /** The live pixels a mixer stroke reads and writes; base tiles are copied on first write. */
3210
3265
  mixerPixels() {
3211
3266
  const a = this.apply;
@@ -3232,8 +3287,14 @@ var PaintStrokeSession = (_class5 = class {
3232
3287
  /** Adds input points (document pixels); the stack shows the stroke so far. */
3233
3288
  push(points) {
3234
3289
  if (this.closed || !points.length) return;
3290
+ if (!this.started) {
3291
+ this.started = true;
3292
+ if (_optionalChain([this, 'access', _100 => _100.retouch, 'optionalAccess', _101 => _101.kind]) === "coverage") this.retouch.start(points[0]);
3293
+ }
3235
3294
  this.last = points[points.length - 1];
3236
- this.update(this.mixer ? this.mixer.push(points) : this.stroke.push(points));
3295
+ const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
3296
+ _optionalChain([this, 'access', _102 => _102.flushView, 'optionalCall', _103 => _103()]);
3297
+ this.update(rects);
3237
3298
  }
3238
3299
  update(rects) {
3239
3300
  if (!rects.length) return;
@@ -3254,10 +3315,10 @@ var PaintStrokeSession = (_class5 = class {
3254
3315
  }
3255
3316
  }
3256
3317
  for (const [key, { tx, ty, r }] of regions) {
3257
- const src = _nullishCoalesce(_optionalChain([this, 'access', _100 => _100.base, 'access', _101 => _101.tiles, 'access', _102 => _102.get, 'call', _103 => _103(key), 'optionalAccess', _104 => _104.data]), () => ( defaultTile(this.base)));
3258
- const prev = this.touched.has(key) ? _optionalChain([this, 'access', _105 => _105.live, 'access', _106 => _106.get, 'call', _107 => _107(key), 'optionalAccess', _108 => _108.data]) : void 0;
3318
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _104 => _104.base, 'access', _105 => _105.tiles, 'access', _106 => _106.get, 'call', _107 => _107(key), 'optionalAccess', _108 => _108.data]), () => ( defaultTile(this.base)));
3319
+ const prev = this.touched.has(key) ? _optionalChain([this, 'access', _109 => _109.live, 'access', _110 => _110.get, 'call', _111 => _111(key), 'optionalAccess', _112 => _112.data]) : void 0;
3259
3320
  this.touched.add(key);
3260
- const data = _chunk7VOHOPLWcjs.applyStrokeToTile.call(void 0, stroke.coverage, src, ch, tx, ty, this.apply, prev ? { into: prev, region: r } : {});
3321
+ const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
3261
3322
  this.live.set(key, { data, uniform: null });
3262
3323
  }
3263
3324
  this.controller._strokeUpdate(this.target.id, this.target.channel, new (0, _chunkXIOMMGPDcjs.TiledSurface)(ch, new Map(this.live), this.base.defaultValue), rects);
@@ -3266,9 +3327,22 @@ var PaintStrokeSession = (_class5 = class {
3266
3327
  end() {
3267
3328
  if (this.closed) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("This stroke has already ended.");
3268
3329
  const last = _nullishCoalesce(this.last, () => ( void 0));
3269
- this.update(this.mixer ? this.mixer.finish(last) : this.stroke.finish(last));
3330
+ const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
3331
+ _optionalChain([this, 'access', _113 => _113.flushView, 'optionalCall', _114 => _114()]);
3332
+ this.update(rects);
3270
3333
  this.closed = true;
3271
3334
  const ch = this.base.channels;
3335
+ const r = this.retouch;
3336
+ if (_optionalChain([r, 'optionalAccess', _115 => _115.kind]) === "coverage" && r.finalPaint) {
3337
+ const final = r.finalPaint(this.stroke.coverage);
3338
+ if (final) {
3339
+ for (const key of this.touched) {
3340
+ const { tx, ty } = _chunkXIOMMGPDcjs.tileCoord.call(void 0, key);
3341
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _116 => _116.base, 'access', _117 => _117.tiles, 'access', _118 => _118.get, 'call', _119 => _119(key), 'optionalAccess', _120 => _120.data]), () => ( defaultTile(this.base)));
3342
+ this.live.set(key, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
3343
+ }
3344
+ }
3345
+ }
3272
3346
  const tiles = new Map(this.base.tiles);
3273
3347
  let changed = false;
3274
3348
  for (const key of this.touched) {
@@ -3280,11 +3354,12 @@ var PaintStrokeSession = (_class5 = class {
3280
3354
  if (!sameTile(prev, tile)) changed = true;
3281
3355
  }
3282
3356
  const surface = changed ? new (0, _chunkXIOMMGPDcjs.TiledSurface)(ch, tiles, this.base.defaultValue) : null;
3283
- const mixerLoad = this.mixer ? this.mixerInit.end(this.mixer.load) : void 0;
3357
+ const mixerLoad = this.mixerInit ? this.mixerInit.end(this.mixer.load) : void 0;
3284
3358
  this.controller._strokeCommit(this.before, this.target.id, this.target.channel, surface);
3285
3359
  const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
3286
3360
  const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
3287
3361
  if (mixerLoad) result.mixerLoad = mixerLoad;
3362
+ if (_optionalChain([r, 'optionalAccess', _121 => _121.result])) Object.assign(result, r.result());
3288
3363
  return result;
3289
3364
  }
3290
3365
  /** Abandons the stroke and restores the layer. */
@@ -3330,14 +3405,14 @@ function migrateSerializedImageEditorState(data) {
3330
3405
  const legacy = data;
3331
3406
  const adjustments = normalizeStoredAdjustments(legacy.adjustments);
3332
3407
  return {
3333
- version: _optionalChain([adjustments, 'access', _109 => _109.layers, 'optionalAccess', _110 => _110.length]) ? 2 : 1,
3408
+ version: _optionalChain([adjustments, 'access', _122 => _122.layers, 'optionalAccess', _123 => _123.length]) ? 2 : 1,
3334
3409
  crop: legacy.crop ? { ...legacy.crop } : null,
3335
3410
  transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
3336
3411
  adjustments: serializeAdjustments(adjustments),
3337
3412
  depthMask: {
3338
3413
  ...DEFAULT_DEPTH_MASK,
3339
3414
  ...legacy.depthMask,
3340
- depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _111 => _111.depthMask, 'optionalAccess', _112 => _112.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
3415
+ depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _124 => _124.depthMask, 'optionalAccess', _125 => _125.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
3341
3416
  },
3342
3417
  annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
3343
3418
  ...legacy.selection ? { selection: { ...legacy.selection } } : {}
@@ -3369,26 +3444,26 @@ var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "tempera
3369
3444
  var ImageEditorController = (_class6 = class {
3370
3445
 
3371
3446
 
3372
- __init40() {this.imageElement = null}
3373
- __init41() {this.listeners = /* @__PURE__ */ new Set()}
3374
- __init42() {this.histogramListeners = /* @__PURE__ */ new Set()}
3447
+ __init43() {this.imageElement = null}
3448
+ __init44() {this.listeners = /* @__PURE__ */ new Set()}
3449
+ __init45() {this.histogramListeners = /* @__PURE__ */ new Set()}
3375
3450
 
3376
3451
  // History stacks
3377
- __init43() {this.undoStack = []}
3378
- __init44() {this.redoStack = []}
3452
+ __init46() {this.undoStack = []}
3453
+ __init47() {this.redoStack = []}
3379
3454
 
3380
3455
 
3381
- __init45() {this.isApplyingHistory = false}
3456
+ __init48() {this.isApplyingHistory = false}
3382
3457
 
3383
3458
  /** Pixels the selection tools sample (host-provided or read back from the source). */
3384
- __init46() {this.samplePixels = null}
3385
- __init47() {this.samplePixelsOverride = false}
3459
+ __init49() {this.samplePixels = null}
3460
+ __init50() {this.samplePixelsOverride = false}
3386
3461
  /** Decoded source pixels (the Background's surface), by the buffer or element they came from. */
3387
- __init48() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
3388
- __init49() {this.viewKey = []}
3462
+ __init51() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
3463
+ __init52() {this.viewKey = []}
3389
3464
  /** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
3390
- __init50() {this.compositor = new (0, _chunkYGIMK4NXcjs.LayerCompositor)()}
3391
- constructor(options = {}) {;_class6.prototype.__init40.call(this);_class6.prototype.__init41.call(this);_class6.prototype.__init42.call(this);_class6.prototype.__init43.call(this);_class6.prototype.__init44.call(this);_class6.prototype.__init45.call(this);_class6.prototype.__init46.call(this);_class6.prototype.__init47.call(this);_class6.prototype.__init48.call(this);_class6.prototype.__init49.call(this);_class6.prototype.__init50.call(this);_class6.prototype.__init51.call(this);_class6.prototype.__init52.call(this);_class6.prototype.__init53.call(this);_class6.prototype.__init54.call(this);_class6.prototype.__init55.call(this);_class6.prototype.__init56.call(this);_class6.prototype.__init57.call(this);_class6.prototype.__init58.call(this);_class6.prototype.__init59.call(this);_class6.prototype.__init60.call(this);_class6.prototype.__init61.call(this);
3465
+ __init53() {this.compositor = new (0, _chunkYGIMK4NXcjs.LayerCompositor)()}
3466
+ constructor(options = {}) {;_class6.prototype.__init43.call(this);_class6.prototype.__init44.call(this);_class6.prototype.__init45.call(this);_class6.prototype.__init46.call(this);_class6.prototype.__init47.call(this);_class6.prototype.__init48.call(this);_class6.prototype.__init49.call(this);_class6.prototype.__init50.call(this);_class6.prototype.__init51.call(this);_class6.prototype.__init52.call(this);_class6.prototype.__init53.call(this);_class6.prototype.__init54.call(this);_class6.prototype.__init55.call(this);_class6.prototype.__init56.call(this);_class6.prototype.__init57.call(this);_class6.prototype.__init58.call(this);_class6.prototype.__init59.call(this);_class6.prototype.__init60.call(this);_class6.prototype.__init61.call(this);_class6.prototype.__init62.call(this);_class6.prototype.__init63.call(this);_class6.prototype.__init64.call(this);
3392
3467
  this.maxHistoryDepth = _nullishCoalesce(options.maxHistoryDepth, () => ( 50));
3393
3468
  if (options.textShaper !== void 0) this.textShaperValue = options.textShaper;
3394
3469
  this.maxHistoryBytes = _nullishCoalesce(options.maxHistoryBytes, () => ( 512 * 1024 * 1024));
@@ -3402,7 +3477,7 @@ var ImageEditorController = (_class6 = class {
3402
3477
  sourceIsOpaque: () => this.sourceIsOpaque(),
3403
3478
  version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
3404
3479
  globalLight: () => this.state.globalLight,
3405
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _113 => _113.state, 'access', _114 => _114.patterns, 'optionalAccess', _115 => _115.find, 'call', _116 => _116((p) => p.id === id)]), () => ( null))
3480
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _126 => _126.state, 'access', _127 => _127.patterns, 'optionalAccess', _128 => _128.find, 'call', _129 => _129((p) => p.id === id)]), () => ( null))
3406
3481
  };
3407
3482
  this.state = {
3408
3483
  sourceUrl: typeof options.image === "string" ? options.image : null,
@@ -3423,7 +3498,7 @@ var ImageEditorController = (_class6 = class {
3423
3498
  activeLayerId: null,
3424
3499
  activeTarget: "pixels",
3425
3500
  outputOpacity: 1,
3426
- paint: { brush: { ..._chunk7VOHOPLWcjs.DEFAULT_BRUSH }, foreground: "#000000", background: "#ffffff", mixer: { ..._chunk7VOHOPLWcjs.DEFAULT_MIXER }, mixerLoad: _chunk7VOHOPLWcjs.EMPTY_MIXER_LOAD },
3501
+ paint: { brush: { ..._chunk7VOHOPLWcjs.DEFAULT_BRUSH }, foreground: "#000000", background: "#ffffff", mixer: { ..._chunk7VOHOPLWcjs.DEFAULT_MIXER }, mixerLoad: _chunk7VOHOPLWcjs.EMPTY_MIXER_LOAD, retouch: { ..._chunk4KLT7ZYScjs.DEFAULT_RETOUCH }, cloneSource: null },
3427
3502
  fit: _nullishCoalesce(options.fit, () => ( "margin"))
3428
3503
  };
3429
3504
  if (options.image instanceof Object && "width" in options.image) {
@@ -3435,7 +3510,7 @@ var ImageEditorController = (_class6 = class {
3435
3510
  };
3436
3511
  }
3437
3512
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
3438
- if (_optionalChain([options, 'access', _117 => _117.initialState, 'optionalAccess', _118 => _118.selection])) {
3513
+ if (_optionalChain([options, 'access', _130 => _130.initialState, 'optionalAccess', _131 => _131.selection])) {
3439
3514
  try {
3440
3515
  this.state.selection = normalizeSelection(_chunkYGIMK4NXcjs.deserializeSelection.call(void 0, options.initialState.selection));
3441
3516
  } catch (e13) {
@@ -3513,13 +3588,13 @@ var ImageEditorController = (_class6 = class {
3513
3588
  * Where layer pixels changed since the last viewport render, when only strokes changed them
3514
3589
  * (the renderer then recomposites just those rectangles); `'all'` after any other change.
3515
3590
  */
3516
- __init51() {this.pendingDirty = "all"}
3591
+ __init54() {this.pendingDirty = "all"}
3517
3592
  notify(strokeRects) {
3518
3593
  if (strokeRects && this.pendingDirty !== "all") this.pendingDirty.push(...strokeRects);
3519
3594
  else if (!strokeRects) this.pendingDirty = "all";
3520
3595
  this.syncViews();
3521
3596
  const currentState = { ...this.state };
3522
- _optionalChain([this, 'access', _119 => _119.onStateChange, 'optionalCall', _120 => _120(currentState)]);
3597
+ _optionalChain([this, 'access', _132 => _132.onStateChange, 'optionalCall', _133 => _133(currentState)]);
3523
3598
  this.listeners.forEach((l) => l(currentState));
3524
3599
  }
3525
3600
  /** Recomputes the compatibility views (`adjustments`, `depthMask`, `annotations`) when the stack changed. */
@@ -3730,7 +3805,7 @@ var ImageEditorController = (_class6 = class {
3730
3805
  return this.state.layers;
3731
3806
  }
3732
3807
  getLayer(id) {
3733
- return _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _121 => _121.layer]);
3808
+ return _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _134 => _134.layer]);
3734
3809
  }
3735
3810
  /** The active layer, or `undefined`. */
3736
3811
  getActiveLayer() {
@@ -3743,7 +3818,7 @@ var ImageEditorController = (_class6 = class {
3743
3818
  setActiveLayer(id, target = "pixels") {
3744
3819
  if (id !== null && !this.getLayer(id)) return false;
3745
3820
  const layer = id ? this.getLayer(id) : void 0;
3746
- const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _122 => _122.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _123 => _123.type]) === "smart" && _optionalChain([layer, 'access', _124 => _124.smartFilters, 'optionalAccess', _125 => _125.mask]) ? "filter-mask" : "pixels";
3821
+ const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _135 => _135.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _136 => _136.type]) === "smart" && _optionalChain([layer, 'access', _137 => _137.smartFilters, 'optionalAccess', _138 => _138.mask]) ? "filter-mask" : "pixels";
3747
3822
  if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
3748
3823
  this.state.activeLayerId = id;
3749
3824
  this.state.activeTarget = t;
@@ -3762,7 +3837,7 @@ var ImageEditorController = (_class6 = class {
3762
3837
  if (!b) return null;
3763
3838
  return { x: b.x + layer.offset.x, y: b.y + layer.offset.y, width: b.width, height: b.height, data: _chunkXIOMMGPDcjs.readRegion.call(void 0, surface, b) };
3764
3839
  }
3765
- __init52() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
3840
+ __init55() {this.boundsCache = /* @__PURE__ */ new WeakMap()}
3766
3841
  /**
3767
3842
  * Document bounds of a layer's non-transparent pixels (pixel layers; the Background's source
3768
3843
  * included), or `null` for an empty or non-pixel layer.
@@ -3813,11 +3888,11 @@ var ImageEditorController = (_class6 = class {
3813
3888
  surfaceOf: (l) => this.surfaceOf(l),
3814
3889
  version: `${this.sourceVersion()}:${this.patternsVersion()}`,
3815
3890
  globalLight: this.state.globalLight,
3816
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _126 => _126.state, 'access', _127 => _127.patterns, 'optionalAccess', _128 => _128.find, 'call', _129 => _129((p) => p.id === id)]), () => ( null))
3891
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _139 => _139.state, 'access', _140 => _140.patterns, 'optionalAccess', _141 => _141.find, 'call', _142 => _142((p) => p.id === id)]), () => ( null))
3817
3892
  };
3818
3893
  }
3819
- __init53() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
3820
- __init54() {this.nextSourceId = 1}
3894
+ __init56() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
3895
+ __init57() {this.nextSourceId = 1}
3821
3896
  /** Changes whenever the Background's source pixels can have changed. */
3822
3897
  sourceVersion() {
3823
3898
  const key = this.samplePixelsOverride ? this.samplePixels : _nullishCoalesce(this.imageElement, () => ( this.samplePixels));
@@ -3866,7 +3941,7 @@ var ImageEditorController = (_class6 = class {
3866
3941
  }
3867
3942
  return fits ? fromPixels(px2) : null;
3868
3943
  }
3869
- __init55() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
3944
+ __init58() {this.opaqueCache = /* @__PURE__ */ new WeakMap()}
3870
3945
  /** Whether every source pixel is opaque (some legacy renders depend on it). */
3871
3946
  sourceIsOpaque() {
3872
3947
  const s = this.sourceSurface();
@@ -3890,7 +3965,7 @@ var ImageEditorController = (_class6 = class {
3890
3965
  if (!ctx || typeof ctx.getImageData !== "function") return null;
3891
3966
  ctx.drawImage(el, 0, 0, width, height);
3892
3967
  const data = ctx.getImageData(0, 0, width, height);
3893
- if (!_optionalChain([data, 'optionalAccess', _130 => _130.data]) || data.data.length < width * height * 4) return null;
3968
+ if (!_optionalChain([data, 'optionalAccess', _143 => _143.data]) || data.data.length < width * height * 4) return null;
3894
3969
  return { width, height, data: data.data };
3895
3970
  } catch (e15) {
3896
3971
  return null;
@@ -3901,7 +3976,7 @@ var ImageEditorController = (_class6 = class {
3901
3976
  commitLayers(next, extra, commitToHistory = true) {
3902
3977
  if (commitToHistory) this.recordHistory();
3903
3978
  this.state.layers = next;
3904
- _optionalChain([extra, 'optionalCall', _131 => _131()]);
3979
+ _optionalChain([extra, 'optionalCall', _144 => _144()]);
3905
3980
  if (this.state.activeLayerId && !_chunkPOGBUYWEcjs.findLayer.call(void 0, next, this.state.activeLayerId)) {
3906
3981
  this.state.activeLayerId = null;
3907
3982
  this.state.activeTarget = "pixels";
@@ -3938,7 +4013,7 @@ var ImageEditorController = (_class6 = class {
3938
4013
  const layer = {
3939
4014
  type: "pixel",
3940
4015
  id: init.id && !ids.has(init.id) ? init.id : _chunkYGIMK4NXcjs.newLayerId.call(void 0, ),
3941
- name: _optionalChain([init, 'access', _132 => _132.name, 'optionalAccess', _133 => _133.trim, 'call', _134 => _134()]) || this.nextLayerName(),
4016
+ name: _optionalChain([init, 'access', _145 => _145.name, 'optionalAccess', _146 => _146.trim, 'call', _147 => _147()]) || this.nextLayerName(),
3942
4017
  visible: _nullishCoalesce(init.visible, () => ( true)),
3943
4018
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
3944
4019
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -3965,7 +4040,7 @@ var ImageEditorController = (_class6 = class {
3965
4040
  async decodeImage(image) {
3966
4041
  const trimmed = image.trim();
3967
4042
  let png = null;
3968
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkPOGBUYWEcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _135 => _135.bytes]), () => ( null));
4043
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkPOGBUYWEcjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _148 => _148.bytes]), () => ( null));
3969
4044
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
3970
4045
  try {
3971
4046
  const bytes = _chunkPOGBUYWEcjs.base64ToBytes.call(void 0, trimmed);
@@ -4014,7 +4089,7 @@ var ImageEditorController = (_class6 = class {
4014
4089
  removeLayer(id) {
4015
4090
  const next = _chunkYGIMK4NXcjs.removeLayer.call(void 0, this.state.layers, id);
4016
4091
  this.commitLayers(next, () => {
4017
- if (this.state.selectedAnnotationId && !_chunkPOGBUYWEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkYGIMK4NXcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _136 => _136.id]) === this.state.selectedAnnotationId)) {
4092
+ if (this.state.selectedAnnotationId && !_chunkPOGBUYWEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkYGIMK4NXcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _149 => _149.id]) === this.state.selectedAnnotationId)) {
4018
4093
  this.state.selectedAnnotationId = null;
4019
4094
  }
4020
4095
  });
@@ -4023,9 +4098,9 @@ var ImageEditorController = (_class6 = class {
4023
4098
  moveLayer(id, placement) {
4024
4099
  const next = _chunkYGIMK4NXcjs.moveLayer.call(void 0, this.state.layers, id, placement);
4025
4100
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, next, id);
4026
- if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _137 => _137.parent, 'optionalAccess', _138 => _138.id]), () => ( null)), index: loc.index };
4101
+ if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _150 => _150.parent, 'optionalAccess', _151 => _151.id]), () => ( null)), index: loc.index };
4027
4102
  this.commitLayers(next);
4028
- return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _139 => _139.parent, 'optionalAccess', _140 => _140.id]), () => ( null)), index: loc.index };
4103
+ return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _152 => _152.parent, 'optionalAccess', _153 => _153.id]), () => ( null)), index: loc.index };
4029
4104
  }
4030
4105
  /**
4031
4106
  * Changes name, visibility, opacity, fill, blend, clipping, locks or (groups) collapsed state, as
@@ -4042,7 +4117,7 @@ var ImageEditorController = (_class6 = class {
4042
4117
  const group = {
4043
4118
  type: "group",
4044
4119
  id: _chunkYGIMK4NXcjs.newLayerId.call(void 0, "group"),
4045
- name: _optionalChain([init, 'access', _141 => _141.name, 'optionalAccess', _142 => _142.trim, 'call', _143 => _143()]) || "Group",
4120
+ name: _optionalChain([init, 'access', _154 => _154.name, 'optionalAccess', _155 => _155.trim, 'call', _156 => _156()]) || "Group",
4046
4121
  visible: true,
4047
4122
  opacity: 1,
4048
4123
  blend,
@@ -4129,7 +4204,7 @@ var ImageEditorController = (_class6 = class {
4129
4204
  let mask;
4130
4205
  if (from === "selection") {
4131
4206
  const sel = this.state.selection;
4132
- if (!_optionalChain([sel, 'optionalAccess', _144 => _144.bounds])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
4207
+ if (!_optionalChain([sel, 'optionalAccess', _157 => _157.bounds])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
4133
4208
  mask = this.maskFromSelection(sel, props);
4134
4209
  if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
4135
4210
  mask = { ...mask, surface: _chunkXIOMMGPDcjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
@@ -4207,7 +4282,7 @@ var ImageEditorController = (_class6 = class {
4207
4282
  const layer = loc.layer;
4208
4283
  if (layer.type !== "pixel") throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
4209
4284
  const sel = this.state.selection;
4210
- if (!_optionalChain([sel, 'optionalAccess', _145 => _145.bounds])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
4285
+ if (!_optionalChain([sel, 'optionalAccess', _158 => _158.bounds])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
4211
4286
  if (options.cut) _chunkYGIMK4NXcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
4212
4287
  const surface = this.surfaceOf(layer);
4213
4288
  const sb = sel.bounds;
@@ -4225,14 +4300,14 @@ var ImageEditorController = (_class6 = class {
4225
4300
  const copy = {
4226
4301
  type: "pixel",
4227
4302
  id: _chunkYGIMK4NXcjs.newLayerId.call(void 0, ),
4228
- name: _optionalChain([options, 'access', _146 => _146.name, 'optionalAccess', _147 => _147.trim, 'call', _148 => _148()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
4303
+ name: _optionalChain([options, 'access', _159 => _159.name, 'optionalAccess', _160 => _160.trim, 'call', _161 => _161()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
4229
4304
  visible: true,
4230
4305
  opacity: 1,
4231
4306
  blend: "normal",
4232
4307
  surface: _chunkXIOMMGPDcjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
4233
4308
  offset: { ...layer.offset }
4234
4309
  };
4235
- let next = _chunkPOGBUYWEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _149 => _149.parent, 'optionalAccess', _150 => _150.id]), () => ( null)), loc.index + 1);
4310
+ let next = _chunkPOGBUYWEcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _162 => _162.parent, 'optionalAccess', _163 => _163.id]), () => ( null)), loc.index + 1);
4236
4311
  if (kept) {
4237
4312
  const cutLayer = { ...layer, surface: _chunkXIOMMGPDcjs.writeRegion.call(void 0, surface, src, kept) };
4238
4313
  delete cutLayer.source;
@@ -4245,7 +4320,7 @@ var ImageEditorController = (_class6 = class {
4245
4320
  return copy.id;
4246
4321
  }
4247
4322
  // --- Free Transform ---
4248
- __init56() {this.openTransform = null}
4323
+ __init59() {this.openTransform = null}
4249
4324
  /** The Free Transform in progress (see `beginFreeTransform`), or `null`. */
4250
4325
  getFreeTransform() {
4251
4326
  if (this.openTransform && !this.openTransform.isOpen) this.openTransform = null;
@@ -4256,7 +4331,7 @@ var ImageEditorController = (_class6 = class {
4256
4331
  layers: () => this.state.layers,
4257
4332
  activeLayerId: () => this.state.activeLayerId,
4258
4333
  activeTarget: () => this.state.activeTarget,
4259
- selection: () => _optionalChain([this, 'access', _151 => _151.state, 'access', _152 => _152.selection, 'optionalAccess', _153 => _153.bounds]) ? this.state.selection : null,
4334
+ selection: () => _optionalChain([this, 'access', _164 => _164.state, 'access', _165 => _165.selection, 'optionalAccess', _166 => _166.bounds]) ? this.state.selection : null,
4260
4335
  canvas: () => this.naturalSize,
4261
4336
  pixelsOf: (layer) => this.surfaceOf(layer),
4262
4337
  shapeEnv: () => this.shapeEnv(),
@@ -4404,7 +4479,7 @@ var ImageEditorController = (_class6 = class {
4404
4479
  * anything else nests as a layer document. Returns the smart object's id.
4405
4480
  */
4406
4481
  convertToSmartObject(ids, options = {}) {
4407
- const list = _optionalChain([ids, 'optionalAccess', _154 => _154.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
4482
+ const list = _optionalChain([ids, 'optionalAccess', _167 => _167.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
4408
4483
  if (!list.length) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
4409
4484
  const res = _chunkYGIMK4NXcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
4410
4485
  this.commitLayers(res.layers, () => {
@@ -4437,8 +4512,8 @@ var ImageEditorController = (_class6 = class {
4437
4512
  width: c.width,
4438
4513
  height: c.height,
4439
4514
  decoded: _chunkYGIMK4NXcjs.isContentsDecoded.call(void 0, c),
4440
- fileType: _nullishCoalesce(_optionalChain([c, 'access', _155 => _155.file, 'optionalAccess', _156 => _156.type]), () => ( null)),
4441
- linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _157 => _157.linked, 'optionalAccess', _158 => _158.path]), () => ( null)),
4515
+ fileType: _nullishCoalesce(_optionalChain([c, 'access', _168 => _168.file, 'optionalAccess', _169 => _169.type]), () => ( null)),
4516
+ linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _170 => _170.linked, 'optionalAccess', _171 => _171.path]), () => ( null)),
4442
4517
  instances: _chunkYGIMK4NXcjs.instancesOf.call(void 0, this.state.layers, c.id),
4443
4518
  layerCount: c.document ? _chunkPOGBUYWEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
4444
4519
  },
@@ -4455,9 +4530,9 @@ var ImageEditorController = (_class6 = class {
4455
4530
  bounds: _chunkYGIMK4NXcjs.transformedBox.call(void 0, g)
4456
4531
  },
4457
4532
  smartFilters: {
4458
- enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _159 => _159.enabled]), () => ( true)),
4459
- filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _160 => _160.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
4460
- mask: _optionalChain([stack, 'optionalAccess', _161 => _161.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunkXIOMMGPDcjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
4533
+ enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _172 => _172.enabled]), () => ( true)),
4534
+ filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _173 => _173.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
4535
+ mask: _optionalChain([stack, 'optionalAccess', _174 => _174.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunkXIOMMGPDcjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
4461
4536
  },
4462
4537
  bounds: this.getLayerBounds(id)
4463
4538
  };
@@ -4598,19 +4673,19 @@ var ImageEditorController = (_class6 = class {
4598
4673
  removeSmartFilter(id, filterId) {
4599
4674
  const res = _chunkYGIMK4NXcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
4600
4675
  this.commitLayers(res.layers);
4601
- return _nullishCoalesce(_optionalChain([res, 'access', _162 => _162.layer, 'access', _163 => _163.smartFilters, 'optionalAccess', _164 => _164.filters]), () => ( []));
4676
+ return _nullishCoalesce(_optionalChain([res, 'access', _175 => _175.layer, 'access', _176 => _176.smartFilters, 'optionalAccess', _177 => _177.filters]), () => ( []));
4602
4677
  }
4603
4678
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
4604
4679
  moveSmartFilter(id, filterId, index) {
4605
4680
  const res = _chunkYGIMK4NXcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
4606
4681
  this.commitLayers(res.layers);
4607
- return _nullishCoalesce(_optionalChain([res, 'access', _165 => _165.layer, 'access', _166 => _166.smartFilters, 'optionalAccess', _167 => _167.filters]), () => ( []));
4682
+ return _nullishCoalesce(_optionalChain([res, 'access', _178 => _178.layer, 'access', _179 => _179.smartFilters, 'optionalAccess', _180 => _180.filters]), () => ( []));
4608
4683
  }
4609
4684
  /** Turns a smart object's whole filter stack on or off (one undo step). */
4610
4685
  setSmartFiltersEnabled(id, enabled) {
4611
4686
  const res = _chunkYGIMK4NXcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
4612
4687
  this.commitLayers(res.layers);
4613
- return _nullishCoalesce(_optionalChain([res, 'access', _168 => _168.layer, 'access', _169 => _169.smartFilters, 'optionalAccess', _170 => _170.enabled]), () => ( true));
4688
+ return _nullishCoalesce(_optionalChain([res, 'access', _181 => _181.layer, 'access', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.enabled]), () => ( true));
4614
4689
  }
4615
4690
  /**
4616
4691
  * Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
@@ -4622,11 +4697,11 @@ var ImageEditorController = (_class6 = class {
4622
4697
  let mask;
4623
4698
  if (from === "none") mask = null;
4624
4699
  else if (from === "keep") {
4625
- if (!_optionalChain([layer, 'access', _171 => _171.smartFilters, 'optionalAccess', _172 => _172.mask])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
4700
+ if (!_optionalChain([layer, 'access', _184 => _184.smartFilters, 'optionalAccess', _185 => _185.mask])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
4626
4701
  mask = withMaskProps(layer.smartFilters.mask, props);
4627
4702
  } else if (from === "selection") {
4628
4703
  const sel = this.state.selection;
4629
- if (!_optionalChain([sel, 'optionalAccess', _173 => _173.bounds])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
4704
+ if (!_optionalChain([sel, 'optionalAccess', _186 => _186.bounds])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
4630
4705
  mask = this.maskFromSelection(sel, props);
4631
4706
  } else {
4632
4707
  const v = from === "reveal-all" ? 255 : 0;
@@ -4638,7 +4713,7 @@ var ImageEditorController = (_class6 = class {
4638
4713
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
4639
4714
  else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
4640
4715
  }, commitToHistory);
4641
- return _nullishCoalesce(_optionalChain([res, 'access', _174 => _174.layer, 'access', _175 => _175.smartFilters, 'optionalAccess', _176 => _176.mask]), () => ( null));
4716
+ return _nullishCoalesce(_optionalChain([res, 'access', _187 => _187.layer, 'access', _188 => _188.smartFilters, 'optionalAccess', _189 => _189.mask]), () => ( null));
4642
4717
  }
4643
4718
  /**
4644
4719
  * Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
@@ -4671,7 +4746,7 @@ var ImageEditorController = (_class6 = class {
4671
4746
  return left;
4672
4747
  }
4673
4748
  // --- Smart object contents (Edit Contents) ---
4674
- __init57() {this.contentsStack = []}
4749
+ __init60() {this.contentsStack = []}
4675
4750
  /** The smart objects whose contents are open (outermost first); empty when the document itself is shown. */
4676
4751
  getEditingContents() {
4677
4752
  return this.contentsStack.map((e) => ({ layerId: e.layerId, name: e.name }));
@@ -4686,7 +4761,7 @@ var ImageEditorController = (_class6 = class {
4686
4761
  if (this.getFreeTransform()) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
4687
4762
  const layer = _chunkYGIMK4NXcjs.requireSmartObject.call(void 0, this.state.layers, id);
4688
4763
  const c = layer.contents;
4689
- if (!_chunkYGIMK4NXcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _177 => _177.file, 'optionalAccess', _178 => _178.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
4764
+ if (!_chunkYGIMK4NXcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _190 => _190.file, 'optionalAccess', _191 => _191.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
4690
4765
  const saved = {
4691
4766
  state: { ...this.state },
4692
4767
  undo: this.undoStack,
@@ -4717,9 +4792,9 @@ var ImageEditorController = (_class6 = class {
4717
4792
  editingContents: this.getEditingContents()
4718
4793
  };
4719
4794
  delete this.state.legacyOutputBlur;
4720
- if (_optionalChain([c, 'access', _179 => _179.document, 'optionalAccess', _180 => _180.globalLight])) this.state.globalLight = c.document.globalLight;
4795
+ if (_optionalChain([c, 'access', _192 => _192.document, 'optionalAccess', _193 => _193.globalLight])) this.state.globalLight = c.document.globalLight;
4721
4796
  else delete this.state.globalLight;
4722
- if (_optionalChain([c, 'access', _181 => _181.document, 'optionalAccess', _182 => _182.patterns, 'optionalAccess', _183 => _183.length])) this.state.patterns = c.document.patterns;
4797
+ if (_optionalChain([c, 'access', _194 => _194.document, 'optionalAccess', _195 => _195.patterns, 'optionalAccess', _196 => _196.length])) this.state.patterns = c.document.patterns;
4723
4798
  else delete this.state.patterns;
4724
4799
  this.imageElement = null;
4725
4800
  this.samplePixels = null;
@@ -4739,23 +4814,23 @@ var ImageEditorController = (_class6 = class {
4739
4814
  closeSmartObjectContents(save = true) {
4740
4815
  const top = this.contentsStack.pop();
4741
4816
  if (!top) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
4742
- if (_optionalChain([this, 'access', _184 => _184.openTransform, 'optionalAccess', _185 => _185.isOpen])) this.openTransform.cancel();
4817
+ if (_optionalChain([this, 'access', _197 => _197.openTransform, 'optionalAccess', _198 => _198.isOpen])) this.openTransform.cancel();
4743
4818
  this.openTransform = null;
4744
4819
  const edited = this.state;
4745
4820
  const changed = save && this.undoStack.length > 0;
4746
4821
  let next = null;
4747
4822
  if (changed) {
4748
- const layer = _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _186 => _186.layer]);
4749
- const old = _optionalChain([layer, 'optionalAccess', _187 => _187.contents]);
4823
+ const layer = _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _199 => _199.layer]);
4824
+ const old = _optionalChain([layer, 'optionalAccess', _200 => _200.contents]);
4750
4825
  const { width, height } = edited.imageDimensions;
4751
4826
  const only = edited.layers.length === 1 ? edited.layers[0] : null;
4752
- const plain3 = _optionalChain([only, 'optionalAccess', _188 => _188.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _189 => _189.filters, 'optionalAccess', _190 => _190.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
4753
- if (_optionalChain([old, 'optionalAccess', _191 => _191.kind]) === "raster" && plain3) {
4827
+ const plain3 = _optionalChain([only, 'optionalAccess', _201 => _201.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _202 => _202.filters, 'optionalAccess', _203 => _203.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
4828
+ if (_optionalChain([old, 'optionalAccess', _204 => _204.kind]) === "raster" && plain3) {
4754
4829
  const px2 = _chunkXIOMMGPDcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
4755
4830
  next = _chunkYGIMK4NXcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
4756
4831
  } else {
4757
4832
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
4758
- next = _chunkYGIMK4NXcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _192 => _192.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _193 => _193.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
4833
+ next = _chunkYGIMK4NXcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _205 => _205.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _206 => _206.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
4759
4834
  }
4760
4835
  }
4761
4836
  const saved = top.saved;
@@ -4780,7 +4855,7 @@ var ImageEditorController = (_class6 = class {
4780
4855
  }
4781
4856
  /** The document's own layers (not the contents open for editing). */
4782
4857
  rootLayers() {
4783
- return _nullishCoalesce(_optionalChain([this, 'access', _194 => _194.contentsStack, 'access', _195 => _195[0], 'optionalAccess', _196 => _196.saved, 'access', _197 => _197.state, 'access', _198 => _198.layers]), () => ( this.state.layers));
4858
+ return _nullishCoalesce(_optionalChain([this, 'access', _207 => _207.contentsStack, 'access', _208 => _208[0], 'optionalAccess', _209 => _209.saved, 'access', _210 => _210.state, 'access', _211 => _211.layers]), () => ( this.state.layers));
4784
4859
  }
4785
4860
  /** Drops every open contents edit (loading another document). */
4786
4861
  abandonContents() {
@@ -4820,7 +4895,7 @@ var ImageEditorController = (_class6 = class {
4820
4895
  this.commitLayers(_chunkYGIMK4NXcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
4821
4896
  return this.getLayerEffects(id);
4822
4897
  }
4823
- __init58() {this.patternIds = /* @__PURE__ */ new WeakMap()}
4898
+ __init61() {this.patternIds = /* @__PURE__ */ new WeakMap()}
4824
4899
  /** Changes whenever the document's pattern list is replaced (the compositor then drops its caches). */
4825
4900
  patternsVersion() {
4826
4901
  const list = this.state.patterns;
@@ -4963,7 +5038,7 @@ var ImageEditorController = (_class6 = class {
4963
5038
  });
4964
5039
  return bg.id;
4965
5040
  }
4966
- __init59() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
5041
+ __init62() {this.thumbCache = /* @__PURE__ */ new WeakMap()}
4967
5042
  /**
4968
5043
  * A small RGBA preview of a pixel layer over the canvas (or of its mask with `mask: true`),
4969
5044
  * longest side `maxSide` px, point-sampled; `null` for layers without pixels.
@@ -4982,7 +5057,7 @@ var ImageEditorController = (_class6 = class {
4982
5057
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
4983
5058
  const key = `${tw}x${th}:${ox},${oy}`;
4984
5059
  let byKey = this.thumbCache.get(surface);
4985
- const hit = _optionalChain([byKey, 'optionalAccess', _199 => _199.get, 'call', _200 => _200(key)]);
5060
+ const hit = _optionalChain([byKey, 'optionalAccess', _212 => _212.get, 'call', _213 => _213(key)]);
4986
5061
  if (hit) return hit;
4987
5062
  const out = new Uint8ClampedArray(tw * th * 4);
4988
5063
  for (let y = 0; y < th; y++) {
@@ -5018,12 +5093,16 @@ var ImageEditorController = (_class6 = class {
5018
5093
  /** Brush settings, colours and tool options of the paint tools (view state, no undo). */
5019
5094
  setPaintOptions(options) {
5020
5095
  const cur = this.state.paint;
5096
+ const retouch = options.retouch ? _chunk4KLT7ZYScjs.normalizeRetouch.call(void 0, options.retouch, cur.retouch) : cur.retouch;
5097
+ const cloneSource = cur.cloneSource && retouch.aligned !== cur.retouch.aligned ? { ...cur.cloneSource, offset: null } : cur.cloneSource;
5021
5098
  const next = {
5022
5099
  brush: options.brush ? _chunk7VOHOPLWcjs.normalizeBrush.call(void 0, { ...cur.brush, ...options.brush }) : cur.brush,
5023
5100
  foreground: options.foreground !== void 0 ? toHex(parseColor(options.foreground)) : cur.foreground,
5024
5101
  background: options.background !== void 0 ? toHex(parseColor(options.background)) : cur.background,
5025
5102
  mixer: options.mixer ? _chunk7VOHOPLWcjs.normalizeMixer.call(void 0, { ...cur.mixer, ...options.mixer }) : cur.mixer,
5026
- mixerLoad: cur.mixerLoad
5103
+ mixerLoad: cur.mixerLoad,
5104
+ retouch,
5105
+ cloneSource
5027
5106
  };
5028
5107
  this.state.paint = next;
5029
5108
  this.notify();
@@ -5053,6 +5132,17 @@ var ImageEditorController = (_class6 = class {
5053
5132
  this.notify();
5054
5133
  return _chunk7VOHOPLWcjs.EMPTY_MIXER_LOAD;
5055
5134
  }
5135
+ /**
5136
+ * Sets (Alt-click) or clears the Clone Stamp and Healing Brush source point, in document
5137
+ * pixels. The next stroke fixes the offset from its first point. View state, no undo.
5138
+ */
5139
+ setCloneSource(point) {
5140
+ if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
5141
+ const source = point ? { x: Math.round(point.x), y: Math.round(point.y), offset: null } : null;
5142
+ this.state.paint = { ...this.state.paint, cloneSource: source };
5143
+ this.notify();
5144
+ return source;
5145
+ }
5056
5146
  /** D: black foreground, white background. */
5057
5147
  resetPaintColors() {
5058
5148
  this.setPaintOptions({ foreground: "#000000", background: "#ffffff" });
@@ -5073,7 +5163,7 @@ var ImageEditorController = (_class6 = class {
5073
5163
  if (layer.mask.source) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is generated, not painted.`);
5074
5164
  _chunkYGIMK4NXcjs.requireUnlocked.call(void 0, layer, "all", action);
5075
5165
  } else if (ch === "filter-mask") {
5076
- if (layer.type !== "smart" || !_optionalChain([layer, 'access', _201 => _201.smartFilters, 'optionalAccess', _202 => _202.mask])) {
5166
+ if (layer.type !== "smart" || !_optionalChain([layer, 'access', _214 => _214.smartFilters, 'optionalAccess', _215 => _215.mask])) {
5077
5167
  throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Layer "${layer.name || id}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`);
5078
5168
  }
5079
5169
  if (!_chunkYGIMK4NXcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`);
@@ -5088,7 +5178,7 @@ var ImageEditorController = (_class6 = class {
5088
5178
  if (!layer.visible) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Layer "${layer.name || id}" is hidden; show it before you ${action}.`);
5089
5179
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
5090
5180
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
5091
- const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _203 => _203.locks, 'optionalAccess', _204 => _204.transparency]));
5181
+ const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _216 => _216.locks, 'optionalAccess', _217 => _217.transparency]));
5092
5182
  return { id, layer, channel: ch, offset, surface, lockTransparency };
5093
5183
  }
5094
5184
  /** The layer with its pixels (or mask) replaced by `surface`. */
@@ -5107,8 +5197,8 @@ var ImageEditorController = (_class6 = class {
5107
5197
  */
5108
5198
  beginStroke(init = {}) {
5109
5199
  const tool = _nullishCoalesce(init.tool, () => ( "brush"));
5110
- if (tool !== "brush" && tool !== "eraser" && tool !== "mixer") throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use brush, eraser or mixer.`);
5111
- const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : "paint");
5200
+ if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
5201
+ const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : isRetouchTool(tool) ? "retouch" : "paint");
5112
5202
  if (tool === "mixer" && target.channel !== "pixels") {
5113
5203
  throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.");
5114
5204
  }
@@ -5126,12 +5216,105 @@ var ImageEditorController = (_class6 = class {
5126
5216
  opacity: brush.opacity,
5127
5217
  blend: target.channel !== "pixels" ? "normal" : brush.blend,
5128
5218
  lockTransparency: target.lockTransparency,
5129
- selection: _optionalChain([this, 'access', _205 => _205.state, 'access', _206 => _206.selection, 'optionalAccess', _207 => _207.bounds]) ? this.state.selection : null,
5219
+ selection: _optionalChain([this, 'access', _218 => _218.state, 'access', _219 => _219.selection, 'optionalAccess', _220 => _220.bounds]) ? this.state.selection : null,
5130
5220
  offset: target.offset
5131
5221
  };
5132
5222
  if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply);
5223
+ if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply);
5133
5224
  return new PaintStrokeSession(this, target, new (0, _chunk7VOHOPLWcjs.StrokeCoverage)(brush), apply);
5134
5225
  }
5226
+ /** A retouching stroke's start: its settings, what it samples and how it composites. */
5227
+ retouchStroke(tool, init, brush, target, apply) {
5228
+ const settings = _chunk4KLT7ZYScjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
5229
+ const mask = target.channel !== "pixels";
5230
+ if (tool === "sponge" && mask) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
5231
+ if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunk4KLT7ZYScjs.RetouchDabStroke)(brush, pixels, _chunk4KLT7ZYScjs.smudgeEffect.call(void 0, brush, settings.strength)) };
5232
+ if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunk4KLT7ZYScjs.RetouchDabStroke)(brush, pixels, _chunk4KLT7ZYScjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
5233
+ const retouchApply = {
5234
+ opacity: tool === "clone" || tool === "heal" ? brush.opacity : 1,
5235
+ blend: tool === "clone" && !mask ? brush.blend : "normal",
5236
+ lockTransparency: target.lockTransparency,
5237
+ selection: apply.selection,
5238
+ offset: target.offset
5239
+ };
5240
+ const coverage = new (0, _chunk7VOHOPLWcjs.StrokeCoverage)(brush);
5241
+ if (tool === "dodge" || tool === "burn") {
5242
+ const paint2 = { kind: "tone", tone: _chunk4KLT7ZYScjs.toneOf.call(void 0, tool, settings) };
5243
+ return { kind: "coverage", coverage, apply: retouchApply, start: () => {
5244
+ }, paint: () => paint2 };
5245
+ }
5246
+ const sample = mask ? "current" : settings.sample;
5247
+ const own = this.surfaceSource(target.surface, target.offset);
5248
+ const source = sample === "current" ? own : this.compositeSource(sample === "all" ? null : target.id);
5249
+ const pad = (r, m) => ({ x: r.x - m, y: r.y - m, width: r.width + 2 * m, height: r.height + 2 * m });
5250
+ const covered = (cov, r) => {
5251
+ const m = new Uint8Array(r.width * r.height);
5252
+ for (let y = 0; y < r.height; y++) for (let x = 0; x < r.width; x++) m[y * r.width + x] = cov.get(r.x + x, r.y + y) > 0 ? 1 : 0;
5253
+ return m;
5254
+ };
5255
+ if (tool === "spot-heal") {
5256
+ const { width, height } = this.naturalSize;
5257
+ let patch = null;
5258
+ const trail = { kind: "color", color: [0, 0, 0, 96] };
5259
+ return {
5260
+ kind: "coverage",
5261
+ coverage,
5262
+ apply: retouchApply,
5263
+ start: () => {
5264
+ },
5265
+ paint: () => trail,
5266
+ finalPaint: (cov) => {
5267
+ if (!cov.bounds) return null;
5268
+ const win = _chunk4KLT7ZYScjs.spotHealWindow.call(void 0, cov.bounds, { width, height });
5269
+ if (win.width <= 0 || win.height <= 0) return null;
5270
+ const img = _chunk4KLT7ZYScjs.readSourceRegion.call(void 0, source, win);
5271
+ const hole = covered(cov, win);
5272
+ const healed = _chunk4KLT7ZYScjs.spotHealPixels.call(void 0, win.width, win.height, img, hole, brush.size, settings.spotType, (off) => {
5273
+ patch = off ? { x: off[0], y: off[1] } : null;
5274
+ });
5275
+ return { kind: "source", source: new (0, _chunk4KLT7ZYScjs.RegionPixelSource)(win, healed), dx: 0, dy: 0 };
5276
+ },
5277
+ result: () => ({ spotHeal: { offset: patch } })
5278
+ };
5279
+ }
5280
+ if (init.source) this.setCloneSource(init.source);
5281
+ const cs = this.state.paint.cloneSource;
5282
+ if (!cs) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`The ${tool === "clone" ? "Clone Stamp" : "Healing Brush"} needs a source point; Alt-click the canvas, call set_clone_source, or pass source { x, y }.`);
5283
+ let offset = { x: 0, y: 0 };
5284
+ let first = { x: 0, y: 0 };
5285
+ const paint = () => ({ kind: "source", source, dx: offset.x, dy: offset.y });
5286
+ return {
5287
+ kind: "coverage",
5288
+ coverage,
5289
+ apply: retouchApply,
5290
+ start: (p) => {
5291
+ first = { x: Math.round(p.x), y: Math.round(p.y) };
5292
+ offset = settings.aligned && cs.offset ? { ...cs.offset } : { x: cs.x - first.x, y: cs.y - first.y };
5293
+ if (settings.aligned) this.state.paint = { ...this.state.paint, cloneSource: { x: cs.x, y: cs.y, offset: { ...offset } } };
5294
+ },
5295
+ paint,
5296
+ finalPaint: tool === "heal" ? (cov) => {
5297
+ if (!cov.bounds) return null;
5298
+ const g = pad(cov.bounds, 2);
5299
+ const src = _chunk4KLT7ZYScjs.readSourceRegion.call(void 0, source, g, offset.x, offset.y);
5300
+ const dst = _chunk4KLT7ZYScjs.readSourceRegion.call(void 0, source, g);
5301
+ return { kind: "source", source: new (0, _chunk4KLT7ZYScjs.RegionPixelSource)(g, _chunk4KLT7ZYScjs.healPixels.call(void 0, g.width, g.height, src, dst, covered(cov, g))), dx: 0, dy: 0 };
5302
+ } : void 0,
5303
+ result: () => ({ clone: { offset: { ...offset }, source: { x: first.x + offset.x, y: first.y + offset.y }, aligned: settings.aligned } })
5304
+ };
5305
+ }
5306
+ /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
5307
+ surfaceSource(surface, offset) {
5308
+ return new (0, _chunk4KLT7ZYScjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _221 => _221.tiles, 'access', _222 => _222.get, 'call', _223 => _223(_chunkXIOMMGPDcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _224 => _224.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
5309
+ }
5310
+ /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
5311
+ compositeSource(throughId) {
5312
+ const stack = withoutAnnotations(this.state.layers);
5313
+ const layers = throughId ? layersThrough(stack, throughId) : stack;
5314
+ const compositor = new (0, _chunkYGIMK4NXcjs.LayerCompositor)();
5315
+ const sources = this.compositorSources();
5316
+ return new (0, _chunk4KLT7ZYScjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
5317
+ }
5135
5318
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
5136
5319
  mixerStroke(init, brush) {
5137
5320
  const settings = _chunk7VOHOPLWcjs.normalizeMixer.call(void 0, { ...this.state.paint.mixer, ..._nullishCoalesce(init.mixer, () => ( {})) });
@@ -5178,7 +5361,7 @@ var ImageEditorController = (_class6 = class {
5178
5361
  paintStroke(init) {
5179
5362
  if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("points must hold at least one { x, y } point.");
5180
5363
  for (const p of init.points) {
5181
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _208 => _208.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _209 => _209.y]))) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
5364
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _225 => _225.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _226 => _226.y]))) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
5182
5365
  }
5183
5366
  const session = this.beginStroke(init);
5184
5367
  session.push(init.points);
@@ -5206,8 +5389,8 @@ var ImageEditorController = (_class6 = class {
5206
5389
  const opacity = _nullishCoalesce(options.opacity, () => ( 1));
5207
5390
  if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("opacity must be from 0 to 1.");
5208
5391
  const blend = _nullishCoalesce(_chunkYGIMK4NXcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
5209
- const sel = options.useSelection !== false && _optionalChain([this, 'access', _210 => _210.state, 'access', _211 => _211.selection, 'optionalAccess', _212 => _212.bounds]) ? this.state.selection : null;
5210
- const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _213 => _213.bounds]), () => ( { x: 0, y: 0, width, height }));
5392
+ const sel = options.useSelection !== false && _optionalChain([this, 'access', _227 => _227.state, 'access', _228 => _228.selection, 'optionalAccess', _229 => _229.bounds]) ? this.state.selection : null;
5393
+ const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _230 => _230.bounds]), () => ( { x: 0, y: 0, width, height }));
5211
5394
  const coverage = new (0, _chunk7VOHOPLWcjs.CoverageMap)();
5212
5395
  const ones = new Float32Array(region.width * region.height);
5213
5396
  if (sel) {
@@ -5325,7 +5508,7 @@ var ImageEditorController = (_class6 = class {
5325
5508
  placeLayer(layers, node, where) {
5326
5509
  if (where.aboveId) {
5327
5510
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, layers, where.aboveId);
5328
- if (loc) return _chunkPOGBUYWEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _214 => _214.parent, 'optionalAccess', _215 => _215.id]), () => ( null)), loc.index + 1);
5511
+ if (loc) return _chunkPOGBUYWEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _231 => _231.parent, 'optionalAccess', _232 => _232.id]), () => ( null)), loc.index + 1);
5329
5512
  }
5330
5513
  if (where.parentId) {
5331
5514
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, layers, where.parentId);
@@ -5336,11 +5519,11 @@ var ImageEditorController = (_class6 = class {
5336
5519
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
5337
5520
  if (at < nodes.length) {
5338
5521
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, layers, nodes[at].id);
5339
- return _chunkPOGBUYWEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _216 => _216.parent, 'optionalAccess', _217 => _217.id]), () => ( null)), loc.index);
5522
+ return _chunkPOGBUYWEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _233 => _233.parent, 'optionalAccess', _234 => _234.id]), () => ( null)), loc.index);
5340
5523
  }
5341
5524
  if (nodes.length) {
5342
5525
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
5343
- return _chunkPOGBUYWEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _218 => _218.parent, 'optionalAccess', _219 => _219.id]), () => ( null)), loc.index + 1);
5526
+ return _chunkPOGBUYWEcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _235 => _235.parent, 'optionalAccess', _236 => _236.id]), () => ( null)), loc.index + 1);
5344
5527
  }
5345
5528
  }
5346
5529
  return _chunkPOGBUYWEcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
@@ -5452,7 +5635,7 @@ var ImageEditorController = (_class6 = class {
5452
5635
  const anchor = nodes[to];
5453
5636
  const without = _chunkPOGBUYWEcjs.mapLayer.call(void 0, layers, id, () => null);
5454
5637
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, without, anchor.id);
5455
- return _chunkPOGBUYWEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _220 => _220.parent, 'optionalAccess', _221 => _221.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
5638
+ return _chunkPOGBUYWEcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _237 => _237.parent, 'optionalAccess', _238 => _238.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
5456
5639
  }
5457
5640
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
5458
5641
  moveAdjustmentLayer(id, toIndex) {
@@ -5488,7 +5671,7 @@ var ImageEditorController = (_class6 = class {
5488
5671
  return _nullishCoalesce(this.state.selection, () => ( null));
5489
5672
  }
5490
5673
  get hasSelection() {
5491
- return Boolean(_optionalChain([this, 'access', _222 => _222.state, 'access', _223 => _223.selection, 'optionalAccess', _224 => _224.bounds]));
5674
+ return Boolean(_optionalChain([this, 'access', _239 => _239.state, 'access', _240 => _240.selection, 'optionalAccess', _241 => _241.bounds]));
5492
5675
  }
5493
5676
  get naturalSize() {
5494
5677
  return {
@@ -5578,7 +5761,7 @@ var ImageEditorController = (_class6 = class {
5578
5761
  try {
5579
5762
  const canvas = await this.renderSource();
5580
5763
  const ctx = canvas.getContext("2d");
5581
- const data2 = _optionalChain([ctx, 'optionalAccess', _225 => _225.getImageData, 'optionalCall', _226 => _226(0, 0, width, height)]);
5764
+ const data2 = _optionalChain([ctx, 'optionalAccess', _242 => _242.getImageData, 'optionalCall', _243 => _243(0, 0, width, height)]);
5582
5765
  if (data2 && data2.data && data2.data.length >= width * height * 4) {
5583
5766
  base = { width, height, data: data2.data };
5584
5767
  this.samplePixels = base;
@@ -5644,7 +5827,7 @@ var ImageEditorController = (_class6 = class {
5644
5827
  /** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
5645
5828
  modifySelection(op, radius) {
5646
5829
  const sel = this.state.selection;
5647
- if (!_optionalChain([sel, 'optionalAccess', _227 => _227.bounds])) return false;
5830
+ if (!_optionalChain([sel, 'optionalAccess', _244 => _244.bounds])) return false;
5648
5831
  return this.setSelection(_chunkYGIMK4NXcjs.modifySelection.call(void 0, sel, op, radius));
5649
5832
  }
5650
5833
  /**
@@ -5653,7 +5836,7 @@ var ImageEditorController = (_class6 = class {
5653
5836
  */
5654
5837
  async refineSelection(params, options = {}) {
5655
5838
  const sel = this.state.selection;
5656
- if (!_optionalChain([sel, 'optionalAccess', _228 => _228.bounds])) return false;
5839
+ if (!_optionalChain([sel, 'optionalAccess', _245 => _245.bounds])) return false;
5657
5840
  const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
5658
5841
  return this.setSelection(refineSelection(pixels, sel, params));
5659
5842
  }
@@ -5670,7 +5853,7 @@ var ImageEditorController = (_class6 = class {
5670
5853
  const canvas = this.renderer.createCanvas(w, h);
5671
5854
  const ctx = canvas.getContext("2d");
5672
5855
  if (ctx) ctx.drawImage(img, 0, 0, w, h);
5673
- const data = _optionalChain([ctx, 'optionalAccess', _229 => _229.getImageData, 'optionalCall', _230 => _230(0, 0, w, h)]);
5856
+ const data = _optionalChain([ctx, 'optionalAccess', _246 => _246.getImageData, 'optionalCall', _247 => _247(0, 0, w, h)]);
5674
5857
  if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
5675
5858
  pixels = { width: w, height: h, data: data.data };
5676
5859
  } else {
@@ -5698,7 +5881,7 @@ var ImageEditorController = (_class6 = class {
5698
5881
  */
5699
5882
  applySelectionAsLayerMask(layerId, props = {}) {
5700
5883
  const sel = this.state.selection;
5701
- if (!_optionalChain([sel, 'optionalAccess', _231 => _231.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
5884
+ if (!_optionalChain([sel, 'optionalAccess', _248 => _248.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
5702
5885
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
5703
5886
  }
5704
5887
  setLayerMask(layerId, mask, commitToHistory = true) {
@@ -5729,7 +5912,7 @@ var ImageEditorController = (_class6 = class {
5729
5912
  /** Load Selection from a layer mask (its pixels; density and feather are not applied). */
5730
5913
  selectionFromLayerMask(layerId, mode = "replace") {
5731
5914
  const layer = this.getLayer(layerId);
5732
- if (!_optionalChain([layer, 'optionalAccess', _232 => _232.mask]) || layer.mask.source) return false;
5915
+ if (!_optionalChain([layer, 'optionalAccess', _249 => _249.mask]) || layer.mask.source) return false;
5733
5916
  const { width, height } = this.naturalSize;
5734
5917
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
5735
5918
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -5765,7 +5948,7 @@ var ImageEditorController = (_class6 = class {
5765
5948
  this.state.layers = _chunkPOGBUYWEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
5766
5949
  const next = { ...l };
5767
5950
  if (_chunkYGIMK4NXcjs.isDefaultDepthMask.call(void 0, merged)) {
5768
- if (_optionalChain([next, 'access', _233 => _233.mask, 'optionalAccess', _234 => _234.source])) delete next.mask;
5951
+ if (_optionalChain([next, 'access', _250 => _250.mask, 'optionalAccess', _251 => _251.source])) delete next.mask;
5769
5952
  } else next.mask = _chunkYGIMK4NXcjs.depthRasterMask.call(void 0, merged);
5770
5953
  return next;
5771
5954
  });
@@ -5775,7 +5958,7 @@ var ImageEditorController = (_class6 = class {
5775
5958
  resetDepthMask() {
5776
5959
  this.recordHistory();
5777
5960
  const target = this.developLayer();
5778
- if (_optionalChain([target, 'optionalAccess', _235 => _235.mask, 'optionalAccess', _236 => _236.source])) {
5961
+ if (_optionalChain([target, 'optionalAccess', _252 => _252.mask, 'optionalAccess', _253 => _253.source])) {
5779
5962
  this.state.layers = _chunkPOGBUYWEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
5780
5963
  const next = { ...l };
5781
5964
  delete next.mask;
@@ -5787,7 +5970,7 @@ var ImageEditorController = (_class6 = class {
5787
5970
  // --- Annotations & Layers ---
5788
5971
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
5789
5972
  annotationLayer(id) {
5790
- return _chunkPOGBUYWEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkYGIMK4NXcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _237 => _237.id]) === id);
5973
+ return _chunkPOGBUYWEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkYGIMK4NXcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _254 => _254.id]) === id);
5791
5974
  }
5792
5975
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
5793
5976
  annotationEnv() {
@@ -5805,7 +5988,7 @@ var ImageEditorController = (_class6 = class {
5805
5988
  const fullAnnotation = { ...annotation, id };
5806
5989
  const layer = _chunkYGIMK4NXcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
5807
5990
  const loc = placement.aboveId ? _chunkPOGBUYWEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
5808
- this.state.layers = loc ? _chunkPOGBUYWEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _238 => _238.parent, 'optionalAccess', _239 => _239.id]), () => ( null)), loc.index + 1) : _chunkPOGBUYWEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
5991
+ this.state.layers = loc ? _chunkPOGBUYWEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _255 => _255.parent, 'optionalAccess', _256 => _256.id]), () => ( null)), loc.index + 1) : _chunkPOGBUYWEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
5809
5992
  this.state.selectedAnnotationId = id;
5810
5993
  this.notify();
5811
5994
  return id;
@@ -5885,7 +6068,7 @@ var ImageEditorController = (_class6 = class {
5885
6068
  this.notify();
5886
6069
  }
5887
6070
  // --- Rendering & Export ---
5888
- __init60() {this.blankSource = null}
6071
+ __init63() {this.blankSource = null}
5889
6072
  /**
5890
6073
  * What the renderer draws from: the source image, or, for a document without one (an opened
5891
6074
  * PSD, a v3 document loaded on its own), a transparent canvas of the document size, since every
@@ -5922,7 +6105,7 @@ var ImageEditorController = (_class6 = class {
5922
6105
  return this.renderer.createCanvas(1, 1);
5923
6106
  }
5924
6107
  this.syncViews();
5925
- if (_optionalChain([options, 'optionalAccess', _240 => _240.layerIds])) {
6108
+ if (_optionalChain([options, 'optionalAccess', _257 => _257.layerIds])) {
5926
6109
  const keep = new Set(options.layerIds);
5927
6110
  const layers = _chunkPOGBUYWEcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
5928
6111
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
@@ -6055,7 +6238,7 @@ var ImageEditorController = (_class6 = class {
6055
6238
  let px2 = await this.decodeImage(newDataUrl);
6056
6239
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
6057
6240
  const data = new Uint8ClampedArray(px2.data);
6058
- const sel = _optionalChain([this, 'access', _241 => _241.state, 'access', _242 => _242.selection, 'optionalAccess', _243 => _243.bounds]) ? this.state.selection : null;
6241
+ const sel = _optionalChain([this, 'access', _258 => _258.state, 'access', _259 => _259.selection, 'optionalAccess', _260 => _260.bounds]) ? this.state.selection : null;
6059
6242
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
6060
6243
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
6061
6244
  }
@@ -6102,7 +6285,7 @@ var ImageEditorController = (_class6 = class {
6102
6285
  }
6103
6286
  /** Font families the shaper offers (generic families at least). */
6104
6287
  listFonts() {
6105
- return _nullishCoalesce(_optionalChain([this, 'access', _244 => _244.getTextShaper, 'call', _245 => _245(), 'optionalAccess', _246 => _246.families, 'optionalCall', _247 => _247()]), () => ( ["sans-serif", "serif", "monospace"]));
6288
+ return _nullishCoalesce(_optionalChain([this, 'access', _261 => _261.getTextShaper, 'call', _262 => _262(), 'optionalAccess', _263 => _263.families, 'optionalCall', _264 => _264()]), () => ( ["sans-serif", "serif", "monospace"]));
6106
6289
  }
6107
6290
  typeInfo(id) {
6108
6291
  const layer = _chunkYGIMK4NXcjs.requireTypeLayer.call(void 0, this.state.layers, id);
@@ -6281,7 +6464,7 @@ var ImageEditorController = (_class6 = class {
6281
6464
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
6282
6465
  const missing = _chunkYGIMK4NXcjs.layoutText.call(void 0, layer, shaper).missingFonts;
6283
6466
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
6284
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _248 => _248.runs, 'access', _249 => _249.find, 'call', _250 => _250((r) => r.length > 0), 'optionalAccess', _251 => _251.style]), () => ( _chunkYGIMK4NXcjs.DEFAULT_TEXT_STYLE));
6467
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _265 => _265.runs, 'access', _266 => _266.find, 'call', _267 => _267((r) => r.length > 0), 'optionalAccess', _268 => _268.style]), () => ( _chunkYGIMK4NXcjs.DEFAULT_TEXT_STYLE));
6285
6468
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
6286
6469
  const shape = _chunkYGIMK4NXcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
6287
6470
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
@@ -6314,7 +6497,7 @@ var ImageEditorController = (_class6 = class {
6314
6497
  // --- Shape layers ---
6315
6498
  /** What shape rendering needs: the canvas size and the document's patterns. */
6316
6499
  shapeEnv() {
6317
- return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _252 => _252.state, 'access', _253 => _253.patterns, 'optionalAccess', _254 => _254.find, 'call', _255 => _255((p) => p.id === id)]), () => ( null)) };
6500
+ return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _269 => _269.state, 'access', _270 => _270.patterns, 'optionalAccess', _271 => _271.find, 'call', _272 => _272((p) => p.id === id)]), () => ( null)) };
6318
6501
  }
6319
6502
  /** One component from tool or UI input (validated). */
6320
6503
  componentFrom(spec, path) {
@@ -6357,9 +6540,9 @@ var ImageEditorController = (_class6 = class {
6357
6540
  * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
6358
6541
  */
6359
6542
  addShapeLayer(init) {
6360
- const specs = _optionalChain([init, 'access', _256 => _256.components, 'optionalAccess', _257 => _257.length]) ? init.components : [init];
6361
- if (_optionalChain([init, 'access', _258 => _258.components, 'optionalAccess', _259 => _259.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
6362
- const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _260 => _260.components, 'optionalAccess', _261 => _261.length]) ? `components[${i}].` : ""));
6543
+ const specs = _optionalChain([init, 'access', _273 => _273.components, 'optionalAccess', _274 => _274.length]) ? init.components : [init];
6544
+ if (_optionalChain([init, 'access', _275 => _275.components, 'optionalAccess', _276 => _276.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
6545
+ const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _277 => _277.components, 'optionalAccess', _278 => _278.length]) ? `components[${i}].` : ""));
6363
6546
  const stroke = init.stroke ? _chunkYGIMK4NXcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
6364
6547
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
6365
6548
  const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkYGIMK4NXcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkYGIMK4NXcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
@@ -6470,7 +6653,7 @@ var ImageEditorController = (_class6 = class {
6470
6653
  if (layer.locks) next.locks = layer.locks;
6471
6654
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
6472
6655
  } else if (layer.type === "pixel") {
6473
- if (!_optionalChain([layer, 'access', _262 => _262.filters, 'optionalAccess', _263 => _263.length])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
6656
+ if (!_optionalChain([layer, 'access', _279 => _279.filters, 'optionalAccess', _280 => _280.length])) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
6474
6657
  _chunkYGIMK4NXcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
6475
6658
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
6476
6659
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
@@ -6489,7 +6672,7 @@ var ImageEditorController = (_class6 = class {
6489
6672
  return this.rasterizeSmartObject(id);
6490
6673
  } else if (layer.type === "shape" || layer.type === "type") {
6491
6674
  next = layer.type === "shape" ? _chunkYGIMK4NXcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkYGIMK4NXcjs.typeAsPixelLayer.call(void 0, layer);
6492
- if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _264 => _264.annotation, 'optionalAccess', _265 => _265.id])) this.state.selectedAnnotationId = null;
6675
+ if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _281 => _281.annotation, 'optionalAccess', _282 => _282.id])) this.state.selectedAnnotationId = null;
6493
6676
  } else {
6494
6677
  throw new (0, _chunkYGIMK4NXcjs.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.`);
6495
6678
  }
@@ -6581,7 +6764,7 @@ var ImageEditorController = (_class6 = class {
6581
6764
  const compositor = new (0, _chunkYGIMK4NXcjs.LayerCompositor)();
6582
6765
  const bakeMask = (layer) => {
6583
6766
  const mask = layer.mask;
6584
- if (!_optionalChain([mask, 'optionalAccess', _266 => _266.source])) return mask;
6767
+ if (!_optionalChain([mask, 'optionalAccess', _283 => _283.source])) return mask;
6585
6768
  add2("Parametric (depth) masks were baked into pixel masks", layer.name);
6586
6769
  const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
6587
6770
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
@@ -6598,7 +6781,7 @@ var ImageEditorController = (_class6 = class {
6598
6781
  };
6599
6782
  const prepare = async (layer) => {
6600
6783
  const p = await prepareLayer(layer);
6601
- if (_optionalChain([p, 'optionalAccess', _267 => _267.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
6784
+ if (_optionalChain([p, 'optionalAccess', _284 => _284.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
6602
6785
  return p;
6603
6786
  };
6604
6787
  const prepareLayer = async (layer) => {
@@ -6641,7 +6824,7 @@ var ImageEditorController = (_class6 = class {
6641
6824
  return out2;
6642
6825
  }
6643
6826
  if (layer.type === "shape" || layer.type === "type") {
6644
- if (layer.type === "type" && _optionalChain([layer, 'access', _268 => _268.missingFonts, 'optionalAccess', _269 => _269.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);
6827
+ if (layer.type === "type" && _optionalChain([layer, 'access', _285 => _285.missingFonts, 'optionalAccess', _286 => _286.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);
6645
6828
  const out2 = { ...layer };
6646
6829
  const mask2 = bakeMask(layer);
6647
6830
  if (mask2) out2.mask = mask2;
@@ -6660,7 +6843,7 @@ var ImageEditorController = (_class6 = class {
6660
6843
  out.surface = this.surfaceOf(layer);
6661
6844
  delete out.source;
6662
6845
  }
6663
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _270 => _270.filters, 'optionalAccess', _271 => _271.filter, 'call', _272 => _272(_chunkYGIMK4NXcjs.isActiveFilter)]), () => ( []));
6846
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _287 => _287.filters, 'optionalAccess', _288 => _288.filter, 'call', _289 => _289(_chunkYGIMK4NXcjs.isActiveFilter)]), () => ( []));
6664
6847
  if (active.length) {
6665
6848
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
6666
6849
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -6671,7 +6854,7 @@ var ImageEditorController = (_class6 = class {
6671
6854
  const data = compositor.composite([content], canvas, sources);
6672
6855
  out = { ...out, surface: _chunkXIOMMGPDcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
6673
6856
  }
6674
- if (_optionalChain([layer, 'access', _273 => _273.filters, 'optionalAccess', _274 => _274.some, 'call', _275 => _275((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
6857
+ if (_optionalChain([layer, 'access', _290 => _290.filters, 'optionalAccess', _291 => _291.some, 'call', _292 => _292((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
6675
6858
  delete out.filters;
6676
6859
  const mask = bakeMask(layer);
6677
6860
  if (mask) out.mask = mask;
@@ -6724,7 +6907,7 @@ var ImageEditorController = (_class6 = class {
6724
6907
  );
6725
6908
  }
6726
6909
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
6727
- const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _276 => _276.state, 'access', _277 => _277.patterns, 'optionalAccess', _278 => _278.find, 'call', _279 => _279((p) => p.id === pid)]), () => ( null)) };
6910
+ const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _293 => _293.state, 'access', _294 => _294.patterns, 'optionalAccess', _295 => _295.find, 'call', _296 => _296((p) => p.id === pid)]), () => ( null)) };
6728
6911
  for (const l of _chunkPOGBUYWEcjs.flattenLayers.call(void 0, layers)) {
6729
6912
  if (l.type === "annotation") {
6730
6913
  layers = _chunkPOGBUYWEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
@@ -6733,7 +6916,7 @@ var ImageEditorController = (_class6 = class {
6733
6916
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
6734
6917
  const fromAnnotation = scaled ? _chunkYGIMK4NXcjs.shapeFromAnnotation.call(void 0, scaled) : null;
6735
6918
  const m = [sx, 0, 0, sy, 0, 0];
6736
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _280 => _280.components]), () => ( _chunkYGIMK4NXcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
6919
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _297 => _297.components]), () => ( _chunkYGIMK4NXcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
6737
6920
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
6738
6921
  if (scaled && fromAnnotation) moved.annotation = scaled;
6739
6922
  else delete moved.annotation;
@@ -6751,7 +6934,7 @@ var ImageEditorController = (_class6 = class {
6751
6934
  this.notify();
6752
6935
  }
6753
6936
  toJSON(options) {
6754
- const root = _optionalChain([this, 'access', _281 => _281.contentsStack, 'access', _282 => _282[0], 'optionalAccess', _283 => _283.saved]);
6937
+ const root = _optionalChain([this, 'access', _298 => _298.contentsStack, 'access', _299 => _299[0], 'optionalAccess', _300 => _300.saved]);
6755
6938
  const current = this.state;
6756
6939
  const element = this.imageElement;
6757
6940
  if (root) {
@@ -6762,7 +6945,7 @@ var ImageEditorController = (_class6 = class {
6762
6945
  let out;
6763
6946
  try {
6764
6947
  out = this.serializeState();
6765
- if (_optionalChain([this, 'access', _284 => _284.state, 'access', _285 => _285.selection, 'optionalAccess', _286 => _286.bounds])) out.selection = _chunkYGIMK4NXcjs.serializeSelection.call(void 0, this.state.selection);
6948
+ if (_optionalChain([this, 'access', _301 => _301.state, 'access', _302 => _302.selection, 'optionalAccess', _303 => _303.bounds])) out.selection = _chunkYGIMK4NXcjs.serializeSelection.call(void 0, this.state.selection);
6766
6949
  } finally {
6767
6950
  if (root) {
6768
6951
  this.state = current;
@@ -6806,7 +6989,7 @@ var ImageEditorController = (_class6 = class {
6806
6989
  this.notify();
6807
6990
  }
6808
6991
  /** Problems found by the last `loadJSON` / `initialState` of a v3 document (unreadable layers or assets). */
6809
- __init61() {this.lastLoadProblems = []}
6992
+ __init64() {this.lastLoadProblems = []}
6810
6993
  applyStored(raw) {
6811
6994
  const s = this.state;
6812
6995
  const data = migrateSerializedImageEditorState(raw);
@@ -6860,10 +7043,10 @@ var ImageEditorController = (_class6 = class {
6860
7043
  serializeState() {
6861
7044
  const { width, height } = this.naturalSize;
6862
7045
  const view = _chunkYGIMK4NXcjs.legacyView.call(void 0, this.stack(), width, height, null);
6863
- if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _287 => _287.state, 'access', _288 => _288.patterns, 'optionalAccess', _289 => _289.length])) {
7046
+ if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _304 => _304.state, 'access', _305 => _305.patterns, 'optionalAccess', _306 => _306.length])) {
6864
7047
  return {
6865
7048
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
6866
- version: _optionalChain([view, 'access', _290 => _290.adjustments, 'access', _291 => _291.layers, 'optionalAccess', _292 => _292.length]) ? 2 : 1,
7049
+ version: _optionalChain([view, 'access', _307 => _307.adjustments, 'access', _308 => _308.layers, 'optionalAccess', _309 => _309.length]) ? 2 : 1,
6867
7050
  crop: this.state.crop ? { ...this.state.crop } : null,
6868
7051
  transform: { ...this.state.transform },
6869
7052
  adjustments: serializeAdjustments(view.adjustments),
@@ -6888,14 +7071,14 @@ var ImageEditorController = (_class6 = class {
6888
7071
  };
6889
7072
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
6890
7073
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
6891
- if (_optionalChain([this, 'access', _293 => _293.state, 'access', _294 => _294.patterns, 'optionalAccess', _295 => _295.length])) out.patterns = _chunkYGIMK4NXcjs.serializePatterns.call(void 0, this.state.patterns);
7074
+ if (_optionalChain([this, 'access', _310 => _310.state, 'access', _311 => _311.patterns, 'optionalAccess', _312 => _312.length])) out.patterns = _chunkYGIMK4NXcjs.serializePatterns.call(void 0, this.state.patterns);
6892
7075
  if (smartContents) out.smartContents = smartContents;
6893
7076
  return out;
6894
7077
  }
6895
7078
  }, _class6);
6896
7079
  function serializeAdjustments(adjustments) {
6897
7080
  const out = { ...adjustments };
6898
- if (_optionalChain([out, 'access', _296 => _296.layers, 'optionalAccess', _297 => _297.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
7081
+ if (_optionalChain([out, 'access', _313 => _313.layers, 'optionalAccess', _314 => _314.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
6899
7082
  else delete out.layers;
6900
7083
  if (_chunkYGIMK4NXcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkYGIMK4NXcjs.LEGACY_PROCESS_VERSION) {
6901
7084
  delete out.process;
@@ -6931,11 +7114,11 @@ function withDevelop(layer, partial) {
6931
7114
  return { ...layer, filters };
6932
7115
  }
6933
7116
  function withBlur(layer, radius) {
6934
- const existing = _optionalChain([layer, 'access', _298 => _298.filters, 'optionalAccess', _299 => _299.find, 'call', _300 => _300((f) => f.kind === "blur")]);
7117
+ const existing = _optionalChain([layer, 'access', _315 => _315.filters, 'optionalAccess', _316 => _316.find, 'call', _317 => _317((f) => f.kind === "blur")]);
6935
7118
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
6936
7119
  if (radius > 0) {
6937
7120
  filters.push({
6938
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _301 => _301.id]), () => ( (layer.source === "document" ? _chunkYGIMK4NXcjs.BLUR_FILTER_ID : _chunkYGIMK4NXcjs.newLayerId.call(void 0, "flt")))),
7121
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _318 => _318.id]), () => ( (layer.source === "document" ? _chunkYGIMK4NXcjs.BLUR_FILTER_ID : _chunkYGIMK4NXcjs.newLayerId.call(void 0, "flt")))),
6939
7122
  kind: "blur",
6940
7123
  enabled: true,
6941
7124
  radius
@@ -7027,18 +7210,39 @@ function collectStateTiles(layers, into) {
7027
7210
  if (l.type === "shape" || l.type === "type") _chunkXIOMMGPDcjs.collectTiles.call(void 0, l.surface, into);
7028
7211
  if (l.type === "smart") {
7029
7212
  _chunkXIOMMGPDcjs.collectTiles.call(void 0, l.surface, into);
7030
- if (_optionalChain([l, 'access', _302 => _302.smartFilters, 'optionalAccess', _303 => _303.mask])) _chunkXIOMMGPDcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
7213
+ if (_optionalChain([l, 'access', _319 => _319.smartFilters, 'optionalAccess', _320 => _320.mask])) _chunkXIOMMGPDcjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
7031
7214
  if (l.contents.raster) _chunkXIOMMGPDcjs.collectTiles.call(void 0, l.contents.raster, into);
7032
7215
  if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
7033
7216
  }
7034
7217
  }
7035
7218
  }
7219
+ function layersThrough(layers, id) {
7220
+ const walk = (list) => {
7221
+ const out = [];
7222
+ for (const l of list) {
7223
+ if (l.id === id) {
7224
+ out.push(l);
7225
+ return { out, found: true };
7226
+ }
7227
+ if (l.type === "group") {
7228
+ const sub2 = walk(l.children);
7229
+ if (sub2.found) {
7230
+ out.push({ ...l, children: sub2.out });
7231
+ return { out, found: true };
7232
+ }
7233
+ }
7234
+ out.push(l);
7235
+ }
7236
+ return { out, found: false };
7237
+ };
7238
+ return walk(layers).out;
7239
+ }
7036
7240
  function pixelsOnly(layers) {
7037
7241
  const out = [];
7038
7242
  for (const l of layers) {
7039
7243
  if (l.type === "adjustment") continue;
7040
7244
  if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
7041
- else if (l.type === "pixel" && _optionalChain([l, 'access', _304 => _304.filters, 'optionalAccess', _305 => _305.length])) {
7245
+ else if (l.type === "pixel" && _optionalChain([l, 'access', _321 => _321.filters, 'optionalAccess', _322 => _322.length])) {
7042
7246
  const p = { ...l };
7043
7247
  delete p.filters;
7044
7248
  out.push(p);
@@ -7096,7 +7300,7 @@ function toHex(c) {
7096
7300
  return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
7097
7301
  }
7098
7302
  function normalizeSelection(mask) {
7099
- return _optionalChain([mask, 'optionalAccess', _306 => _306.bounds]) ? mask : null;
7303
+ return _optionalChain([mask, 'optionalAccess', _323 => _323.bounds]) ? mask : null;
7100
7304
  }
7101
7305
  function sameSelection(a, b) {
7102
7306
  if (a.width !== b.width || a.height !== b.height) return false;
@@ -7257,7 +7461,7 @@ function loadImageEditorDocument(input) {
7257
7461
  }
7258
7462
  const state = { version: 1, ...result.value };
7259
7463
  if (isV2) {
7260
- if (_optionalChain([state, 'access', _307 => _307.adjustments, 'access', _308 => _308.layers, 'optionalAccess', _309 => _309.length])) state.version = 2;
7464
+ if (_optionalChain([state, 'access', _324 => _324.adjustments, 'access', _325 => _325.layers, 'optionalAccess', _326 => _326.length])) state.version = 2;
7261
7465
  result.report.version = 2;
7262
7466
  }
7263
7467
  if (state.selection === void 0) delete state.selection;
@@ -7465,7 +7669,7 @@ function findAdjustmentControl(id) {
7465
7669
  }
7466
7670
  function findLayerControl(kind, id) {
7467
7671
  if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
7468
- return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _310 => _310[kind], 'optionalAccess', _311 => _311.find, 'call', _312 => _312((c) => c.id === id)]);
7672
+ return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _327 => _327[kind], 'optionalAccess', _328 => _328.find, 'call', _329 => _329((c) => c.id === id)]);
7469
7673
  }
7470
7674
  function clampControlValue(spec, v) {
7471
7675
  if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
@@ -7728,7 +7932,7 @@ function summary(controller) {
7728
7932
  const area = _chunkYGIMK4NXcjs.selectionArea.call(void 0, sel);
7729
7933
  return {
7730
7934
  empty: !sel,
7731
- bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _313 => _313.bounds]), () => ( null)),
7935
+ bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _330 => _330.bounds]), () => ( null)),
7732
7936
  /** Σ coverage in pixels. */
7733
7937
  area: Math.round(area),
7734
7938
  percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
@@ -7972,7 +8176,7 @@ async function renderImageRegion(controller, request) {
7972
8176
  if (request.includeOverlays) {
7973
8177
  const s = request.scale;
7974
8178
  const selection = state.selection;
7975
- if (_optionalChain([selection, 'optionalAccess', _314 => _314.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
8179
+ if (_optionalChain([selection, 'optionalAccess', _331 => _331.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
7976
8180
  const shade = selectionShade(selection, document);
7977
8181
  if (shade) context.drawImage(shade, rect.x, rect.y, rect.width, rect.height, 0, 0, out.width, out.height);
7978
8182
  }
@@ -7997,7 +8201,7 @@ function createImageCaptureSurface(controller) {
7997
8201
  return {
7998
8202
  units: "image pixels",
7999
8203
  content: whole,
8000
- selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _315 => _315.getState, 'call', _316 => _316(), 'access', _317 => _317.selection, 'optionalAccess', _318 => _318.bounds]), () => ( null)) }),
8204
+ selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _332 => _332.getState, 'call', _333 => _333(), 'access', _334 => _334.selection, 'optionalAccess', _335 => _335.bounds]), () => ( null)) }),
8001
8205
  overlays: "a shade over unselected pixels and the crop box outline",
8002
8206
  maxScale: 8,
8003
8207
  render: (request) => renderImageRegion(controller, request)
@@ -8317,7 +8521,7 @@ function describeLayer(layer, activeId, boundsOf) {
8317
8521
  out.bounds = boundsOf(layer);
8318
8522
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
8319
8523
  out.shape = {
8320
- components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _319 => _319.live, 'optionalAccess', _320 => _320.kind]), () => ( "path")) })),
8524
+ components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _336 => _336.live, 'optionalAccess', _337 => _337.kind]), () => ( "path")) })),
8321
8525
  fill: layer.fill ? layer.fill.type : null,
8322
8526
  stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
8323
8527
  };
@@ -8339,8 +8543,8 @@ function describeLayer(layer, activeId, boundsOf) {
8339
8543
  out.bounds = boundsOf(layer);
8340
8544
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
8341
8545
  out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
8342
- out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _321 => _321.smartFilters, 'optionalAccess', _322 => _322.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
8343
- out.filterMask = maskSummary(_optionalChain([layer, 'access', _323 => _323.smartFilters, 'optionalAccess', _324 => _324.mask]));
8546
+ out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _338 => _338.smartFilters, 'optionalAccess', _339 => _339.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
8547
+ out.filterMask = maskSummary(_optionalChain([layer, 'access', _340 => _340.smartFilters, 'optionalAccess', _341 => _341.mask]));
8344
8548
  break;
8345
8549
  }
8346
8550
  return out;
@@ -8368,7 +8572,7 @@ function createImageLayerTools(controller) {
8368
8572
  if (!loc) return null;
8369
8573
  return {
8370
8574
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
8371
- parentId: _nullishCoalesce(_optionalChain([loc, 'access', _325 => _325.parent, 'optionalAccess', _326 => _326.id]), () => ( null)),
8575
+ parentId: _nullishCoalesce(_optionalChain([loc, 'access', _342 => _342.parent, 'optionalAccess', _343 => _343.id]), () => ( null)),
8372
8576
  index: loc.index
8373
8577
  };
8374
8578
  };
@@ -9175,9 +9379,73 @@ var PAINT_TOOLS = [
9175
9379
  { id: "move", label: "Move", shortcut: "V" },
9176
9380
  { id: "brush", label: "Brush", shortcut: "B" },
9177
9381
  { id: "mixer", label: "Mixer", shortcut: "Shift+B" },
9178
- { id: "eraser", label: "Eraser", shortcut: "E" }
9382
+ { id: "eraser", label: "Eraser", shortcut: "E" },
9383
+ { id: "clone", label: "Clone", shortcut: "S" },
9384
+ { id: "heal", label: "Heal", shortcut: "Shift+J" },
9385
+ { id: "spot-heal", label: "Spot Heal", shortcut: "J" },
9386
+ { id: "smudge", label: "Smudge", shortcut: "" },
9387
+ { id: "dodge", label: "Dodge", shortcut: "O" },
9388
+ { id: "burn", label: "Burn", shortcut: "Shift+O" },
9389
+ { id: "sponge", label: "Sponge", shortcut: "Shift+O" }
9390
+ ];
9391
+ var isPaintTool = (tool) => PAINT_TOOLS.some((t) => t.id === tool);
9392
+ var isRetouchPaintTool = (tool) => tool === "clone" || tool === "heal" || tool === "spot-heal" || tool === "smudge" || tool === "dodge" || tool === "burn" || tool === "sponge";
9393
+ var RETOUCH_OPTION_CONTROLS = [
9394
+ { id: "exposure", label: "Exposure", section: "layer", min: 0, max: 1, step: 0.01, default: 0.5, decimals: 0, track: plain2, displayScale: 100, unit: "%", tools: ["dodge", "burn"] },
9395
+ { id: "strength", label: "Strength", section: "layer", min: 0, max: 1, step: 0.01, default: 0.5, decimals: 0, track: plain2, displayScale: 100, unit: "%", tools: ["smudge"] }
9396
+ ];
9397
+ var RETOUCH_CHOICES = [
9398
+ {
9399
+ id: "sample",
9400
+ label: "Sample",
9401
+ tools: ["clone", "heal", "spot-heal"],
9402
+ options: [
9403
+ { id: "current", label: "Current", title: "Sample the layer being retouched" },
9404
+ { id: "current-below", label: "Current & Below", title: "Sample this layer and the layers under it" },
9405
+ { id: "all", label: "All", title: "Sample every layer (retouch onto an empty layer)" }
9406
+ ]
9407
+ },
9408
+ {
9409
+ id: "spotType",
9410
+ label: "Type",
9411
+ tools: ["spot-heal"],
9412
+ options: [
9413
+ { id: "proximity-match", label: "Proximity Match", title: "Copy the best matching patch nearby" },
9414
+ { id: "smooth", label: "Smooth", title: "Fill smoothly from the edges" }
9415
+ ]
9416
+ },
9417
+ {
9418
+ id: "range",
9419
+ label: "Range",
9420
+ tools: ["dodge", "burn"],
9421
+ options: [
9422
+ { id: "shadows", label: "Shadows", title: "Change the dark tones most" },
9423
+ { id: "midtones", label: "Midtones", title: "Change the middle tones most" },
9424
+ { id: "highlights", label: "Highlights", title: "Change the light tones most" }
9425
+ ]
9426
+ },
9427
+ {
9428
+ id: "spongeMode",
9429
+ label: "Mode",
9430
+ tools: ["sponge"],
9431
+ options: [
9432
+ { id: "desaturate", label: "Desaturate", title: "Take colour out" },
9433
+ { id: "saturate", label: "Saturate", title: "Add colour" }
9434
+ ]
9435
+ }
9436
+ ];
9437
+ var RETOUCH_TOGGLES = [
9438
+ { id: "aligned", label: "Aligned", tools: ["clone", "heal"] },
9439
+ { id: "protectTones", label: "Protect tones", tools: ["dodge", "burn"] },
9440
+ { id: "vibrance", label: "Vibrance", tools: ["sponge"] }
9179
9441
  ];
9180
- var isPaintTool = (tool) => tool === "move" || tool === "brush" || tool === "mixer" || tool === "eraser";
9442
+ function setRetouchChoice(controller, id, value) {
9443
+ controller.setPaintOptions({ retouch: { [id]: value } });
9444
+ }
9445
+ function cloneSourceLabel(controller) {
9446
+ const cs = controller.getState().paint.cloneSource;
9447
+ return cs ? `Source ${cs.x}, ${cs.y}${cs.offset ? ` (offset ${cs.offset.x}, ${cs.offset.y})` : ""}` : "Alt-click to set the source";
9448
+ }
9181
9449
  function rgbUnitToHex(c) {
9182
9450
  return `#${c.map((v) => Math.round(Math.min(1, Math.max(0, v)) * 255).toString(16).padStart(2, "0")).join("")}`;
9183
9451
  }
@@ -9203,6 +9471,18 @@ function handlePaintShortcut(controller, e) {
9203
9471
  case "v":
9204
9472
  controller.setTool("move");
9205
9473
  return true;
9474
+ case "s":
9475
+ controller.setTool("clone");
9476
+ return true;
9477
+ case "j":
9478
+ controller.setTool(e.shiftKey || key === "J" ? controller.getState().activeTool === "heal" ? "spot-heal" : "heal" : "spot-heal");
9479
+ return true;
9480
+ case "o": {
9481
+ const cur = controller.getState().activeTool;
9482
+ const next = e.shiftKey || key === "O" ? cur === "dodge" ? "burn" : cur === "burn" ? "sponge" : "dodge" : "dodge";
9483
+ controller.setTool(next);
9484
+ return true;
9485
+ }
9206
9486
  case "d":
9207
9487
  controller.resetPaintColors();
9208
9488
  return true;
@@ -9231,14 +9511,14 @@ function pointerPressure(e) {
9231
9511
  return 1;
9232
9512
  }
9233
9513
  var PaintGesture = (_class7 = class {
9234
- constructor(controller) {;_class7.prototype.__init62.call(this);_class7.prototype.__init63.call(this);_class7.prototype.__init64.call(this);
9514
+ constructor(controller) {;_class7.prototype.__init65.call(this);_class7.prototype.__init66.call(this);_class7.prototype.__init67.call(this);
9235
9515
  this.controller = controller;
9236
9516
  }
9237
9517
 
9238
- __init62() {this.stroke = null}
9239
- __init63() {this.move = null}
9518
+ __init65() {this.stroke = null}
9519
+ __init66() {this.move = null}
9240
9520
  /** The last refusal (e.g. "layer is locked"), for the editor to show. */
9241
- __init64() {this.error = null}
9521
+ __init67() {this.error = null}
9242
9522
  get active() {
9243
9523
  return Boolean(this.stroke || this.move);
9244
9524
  }
@@ -9250,7 +9530,7 @@ var PaintGesture = (_class7 = class {
9250
9530
  const layer = this.controller.getActiveLayer();
9251
9531
  if (!layer) throw new Error("Select a layer to move in the Layers panel.");
9252
9532
  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.`);
9253
- if (_optionalChain([layer, 'access', _327 => _327.locks, 'optionalAccess', _328 => _328.all]) || _optionalChain([layer, 'access', _329 => _329.locks, 'optionalAccess', _330 => _330.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
9533
+ if (_optionalChain([layer, 'access', _344 => _344.locks, 'optionalAccess', _345 => _345.all]) || _optionalChain([layer, 'access', _346 => _346.locks, 'optionalAccess', _347 => _347.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
9254
9534
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
9255
9535
  const b = _chunkYGIMK4NXcjs.shapeGeometryBounds.call(void 0, layer);
9256
9536
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
@@ -9258,9 +9538,13 @@ var PaintGesture = (_class7 = class {
9258
9538
  this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin, moved: false };
9259
9539
  return null;
9260
9540
  }
9261
- if (tool === "brush" || tool === "eraser" || tool === "mixer") {
9541
+ if ((tool === "clone" || tool === "heal") && sample.altKey) {
9542
+ this.controller.setCloneSource({ x: sample.x, y: sample.y });
9543
+ return null;
9544
+ }
9545
+ if (isPaintTool(tool)) {
9262
9546
  this.stroke = this.controller.beginStroke({ tool });
9263
- this.stroke.push([sample]);
9547
+ this.stroke.push([{ x: sample.x, y: sample.y, pressure: sample.pressure }]);
9264
9548
  return null;
9265
9549
  }
9266
9550
  } catch (err) {
@@ -9303,7 +9587,7 @@ var PaintGesture = (_class7 = class {
9303
9587
  this.move = null;
9304
9588
  }
9305
9589
  cancel() {
9306
- _optionalChain([this, 'access', _331 => _331.stroke, 'optionalAccess', _332 => _332.cancel, 'call', _333 => _333()]);
9590
+ _optionalChain([this, 'access', _348 => _348.stroke, 'optionalAccess', _349 => _349.cancel, 'call', _350 => _350()]);
9307
9591
  this.stroke = null;
9308
9592
  this.move = null;
9309
9593
  }
@@ -9491,8 +9775,272 @@ function createImagePaintTools(controller) {
9491
9775
  return [paintStroke, fill, clear, getMixer, loadMixerTool, cleanMixerTool];
9492
9776
  }
9493
9777
 
9494
- // src/image-editor/psd-tools.ts
9778
+ // src/image-editor/retouch-tools.ts
9495
9779
  var READ5 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
9780
+ var WRITE5 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
9781
+ var POINTS = {
9782
+ type: "array",
9783
+ minItems: 1,
9784
+ maxItems: 1e4,
9785
+ description: "The stroke path in document pixels; one point is one dab.",
9786
+ items: {
9787
+ type: "object",
9788
+ properties: {
9789
+ x: { type: "number", description: "Document x in px." },
9790
+ y: { type: "number", description: "Document y in px." },
9791
+ pressure: { type: "number", minimum: 0, maximum: 1, description: "Pen pressure (default 1)." }
9792
+ },
9793
+ required: ["x", "y"],
9794
+ additionalProperties: false
9795
+ }
9796
+ };
9797
+ var BRUSH2 = {
9798
+ type: "object",
9799
+ description: "Brush tip; missing fields use the current paint options (default round, hard, 20 px).",
9800
+ properties: {
9801
+ size: { type: "number", minimum: 1, maximum: _chunk7VOHOPLWcjs.MAX_BRUSH_SIZE, description: "Diameter in px (default 20)." },
9802
+ hardness: { type: "number", minimum: 0, maximum: 1, description: "Edge hardness 0 (soft) .. 1 (hard, default). Retouching usually wants a soft tip (0..0.5)." },
9803
+ spacing: { type: "number", minimum: 0.01, maximum: 10, description: "Dab spacing as a fraction of the diameter (default 0.1)." },
9804
+ opacity: { type: "number", minimum: 0, maximum: 1, description: "Stroke opacity (Clone Stamp and Healing Brush only; default 1)." },
9805
+ flow: { type: "number", minimum: 0, maximum: 1, description: "Build-up per dab (default 1). For the Sponge, how strongly each pass moves saturation." },
9806
+ smoothing: { type: "number", minimum: 0, maximum: 0.95, description: "Point smoothing 0..0.95 (default 0)." },
9807
+ pressureSize: { type: "boolean", description: "Point pressure scales the size (default true)." },
9808
+ pressureOpacity: { type: "boolean", description: "Point pressure scales the opacity (default false)." }
9809
+ },
9810
+ additionalProperties: false
9811
+ };
9812
+ var TARGET2 = {
9813
+ layerId: { type: "string", description: "Layer to retouch (default the active layer; see list_layers)." },
9814
+ channel: {
9815
+ type: "string",
9816
+ enum: ["pixels", "mask", "filter-mask"],
9817
+ description: "pixels (default for a pixel layer), the layer's mask, or a smart object's filter mask. Masks are grey values and sample only themselves."
9818
+ }
9819
+ };
9820
+ var SAMPLE = {
9821
+ type: "string",
9822
+ enum: [..._chunk4KLT7ZYScjs.RETOUCH_SAMPLES],
9823
+ description: "What is sampled: current (default: the target layer), current-below (the composite of this layer and everything under it), or all (the composite of every layer). Sample current-below or all to retouch onto an empty layer above the image."
9824
+ };
9825
+ function readTarget2(args) {
9826
+ return { layerId: args.layerId, channel: args.channel };
9827
+ }
9828
+ function checkSource(controller, source) {
9829
+ if (source === void 0) return void 0;
9830
+ const p = source;
9831
+ const { width, height } = controller.getState().imageDimensions;
9832
+ if (!(p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
9833
+ throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
9834
+ }
9835
+ return p;
9836
+ }
9837
+ var SOURCE = {
9838
+ type: "object",
9839
+ 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).",
9840
+ properties: { x: { type: "number", description: "Source x in px." }, y: { type: "number", description: "Source y in px." } },
9841
+ required: ["x", "y"],
9842
+ additionalProperties: false
9843
+ };
9844
+ function createImageRetouchTools(controller) {
9845
+ const stroke = (tool, args, retouch) => controller.paintStroke({
9846
+ tool,
9847
+ points: args.points,
9848
+ brush: args.brush,
9849
+ retouch,
9850
+ source: checkSource(controller, args.source),
9851
+ ...readTarget2(args)
9852
+ });
9853
+ const cloneStamp = {
9854
+ name: "clone_stamp",
9855
+ title: "Clone Stamp stroke",
9856
+ description: "Copies pixels from the clone source along a stroke (Photoshop's Clone Stamp): each point paints what lies at point + offset, where the offset is source \u2212 the stroke's first point. With aligned on, later strokes keep that offset; off, every stroke starts again at the source point. Samples the layer, the layers up to it, or all layers, from before the stroke. The selection limits it; a transparency-locked layer keeps its alpha. One undo step. Returns the layerId, channel, changed bounds, dab count and clone {offset, source, aligned}.",
9857
+ inputSchema: {
9858
+ type: "object",
9859
+ properties: {
9860
+ points: POINTS,
9861
+ source: SOURCE,
9862
+ aligned: { type: "boolean", description: "Keep the offset for the next strokes (default the current option, true)." },
9863
+ sample: SAMPLE,
9864
+ brush: BRUSH2,
9865
+ ...TARGET2
9866
+ },
9867
+ required: ["points"],
9868
+ additionalProperties: false
9869
+ },
9870
+ annotations: { title: "Clone Stamp stroke", ...WRITE5 },
9871
+ handler: (args) => stroke("clone", args, pick(args, ["aligned", "sample"]))
9872
+ };
9873
+ const healBrush = {
9874
+ name: "heal_brush",
9875
+ title: "Healing Brush stroke",
9876
+ description: "Heals along a stroke from the clone source (Photoshop's Healing Brush): the source's texture is cloned, then blended so its colour and light match the pixels around the stroke (Poisson seamless cloning, applied when the stroke ends). Use it for blemishes and dust where the area around them is the right tone; use clone_stamp to copy exactly. Same source, offset and aligned rules as clone_stamp. One undo step. Returns the layerId, channel, changed bounds, dab count and clone {offset, source, aligned}.",
9877
+ inputSchema: {
9878
+ type: "object",
9879
+ properties: {
9880
+ points: POINTS,
9881
+ source: SOURCE,
9882
+ aligned: { type: "boolean", description: "Keep the offset for the next strokes (default the current option, true)." },
9883
+ sample: SAMPLE,
9884
+ brush: BRUSH2,
9885
+ ...TARGET2
9886
+ },
9887
+ required: ["points"],
9888
+ additionalProperties: false
9889
+ },
9890
+ annotations: { title: "Healing Brush stroke", ...WRITE5 },
9891
+ handler: (args) => stroke("heal", args, pick(args, ["aligned", "sample"]))
9892
+ };
9893
+ const spotHeal = {
9894
+ name: "spot_heal",
9895
+ title: "Spot Healing stroke",
9896
+ description: "Removes what a stroke covers without a source point (Photoshop's Spot Healing Brush): proximity-match copies the best matching patch nearby and blends it in; smooth fills from the edges inwards (for spots on smooth areas). Paint just over the spot with a brush a little larger than it. One undo step. Returns the layerId, channel, changed bounds, dab count and spotHeal {offset} (the patch offset copied, or null for a smooth fill).",
9897
+ inputSchema: {
9898
+ type: "object",
9899
+ properties: {
9900
+ points: POINTS,
9901
+ type: { type: "string", enum: [..._chunk4KLT7ZYScjs.SPOT_HEAL_TYPES], description: "proximity-match (default) or smooth." },
9902
+ sample: SAMPLE,
9903
+ brush: BRUSH2,
9904
+ ...TARGET2
9905
+ },
9906
+ required: ["points"],
9907
+ additionalProperties: false
9908
+ },
9909
+ annotations: { title: "Spot Healing stroke", ...WRITE5 },
9910
+ handler: (args) => stroke("spot-heal", args, { ...pick(args, ["sample"]), ...args.type !== void 0 ? { spotType: args.type } : {} })
9911
+ };
9912
+ const smudge = {
9913
+ name: "smudge",
9914
+ title: "Smudge stroke",
9915
+ description: "Drags pixels along a stroke like a finger through wet paint (Photoshop's Smudge): each dab lays what the finger carries and picks up what was under it, so colour is pulled in the stroke's direction and fades with distance. One undo step. Returns the layerId, channel, changed bounds and dab count.",
9916
+ inputSchema: {
9917
+ type: "object",
9918
+ properties: {
9919
+ points: POINTS,
9920
+ strength: { type: "number", minimum: 0, maximum: 1, description: "How far colour is dragged, 0..1 (default the current option, 0.5)." },
9921
+ brush: BRUSH2,
9922
+ ...TARGET2
9923
+ },
9924
+ required: ["points"],
9925
+ additionalProperties: false
9926
+ },
9927
+ annotations: { title: "Smudge stroke", ...WRITE5 },
9928
+ handler: (args) => stroke("smudge", args, pick(args, ["strength"]))
9929
+ };
9930
+ const toneSchema = (verb) => ({
9931
+ type: "object",
9932
+ properties: {
9933
+ points: POINTS,
9934
+ range: { type: "string", enum: [..._chunk4KLT7ZYScjs.TONE_RANGES], description: `Which tones to ${verb} most: shadows, midtones (default the current option, midtones) or highlights.` },
9935
+ exposure: { type: "number", minimum: 0, maximum: 1, description: "Strength 0..1 (default the current option, 0.5). Overlapping dabs in one stroke never go past it; another stroke builds on it." },
9936
+ protectTones: { type: "boolean", description: "Change luma only, keeping hue and saturation (default true)." },
9937
+ brush: BRUSH2,
9938
+ ...TARGET2
9939
+ },
9940
+ required: ["points"],
9941
+ additionalProperties: false
9942
+ });
9943
+ const dodge = {
9944
+ name: "dodge",
9945
+ title: "Dodge stroke",
9946
+ description: "Lightens the pixels a stroke covers (Photoshop's Dodge), most in the chosen tonal range. Alpha is kept. One undo step. Returns the layerId, channel, changed bounds and dab count. Inspect the result with capture_view or get_histogram; several light strokes look more natural than one strong one.",
9947
+ inputSchema: toneSchema("lighten"),
9948
+ annotations: { title: "Dodge stroke", ...WRITE5 },
9949
+ handler: (args) => stroke("dodge", args, pick(args, ["range", "exposure", "protectTones"]))
9950
+ };
9951
+ const burn = {
9952
+ name: "burn",
9953
+ title: "Burn stroke",
9954
+ description: "Darkens the pixels a stroke covers (Photoshop's Burn), most in the chosen tonal range. Alpha is kept. One undo step. Returns the layerId, channel, changed bounds and dab count.",
9955
+ inputSchema: toneSchema("darken"),
9956
+ annotations: { title: "Burn stroke", ...WRITE5 },
9957
+ handler: (args) => stroke("burn", args, pick(args, ["range", "exposure", "protectTones"]))
9958
+ };
9959
+ const spongeTool = {
9960
+ name: "sponge",
9961
+ title: "Sponge stroke",
9962
+ description: "Saturates or desaturates the pixels a stroke covers (Photoshop's Sponge); passes compound, and brush.flow sets how much each moves. Pixels only (a mask has no colour). One undo step. Returns the layerId, channel, changed bounds and dab count.",
9963
+ inputSchema: {
9964
+ type: "object",
9965
+ properties: {
9966
+ points: POINTS,
9967
+ mode: { type: "string", enum: ["desaturate", "saturate"], description: "desaturate (default the current option, desaturate) or saturate." },
9968
+ vibrance: { type: "boolean", description: "Damp the change where colours would clip or collapse to grey (default true)." },
9969
+ brush: BRUSH2,
9970
+ layerId: TARGET2.layerId
9971
+ },
9972
+ required: ["points"],
9973
+ additionalProperties: false
9974
+ },
9975
+ annotations: { title: "Sponge stroke", ...WRITE5 },
9976
+ handler: (args) => stroke("sponge", { ...args, channel: "pixels" }, { ...pick(args, ["vibrance"]), ...args.mode !== void 0 ? { spongeMode: args.mode } : {} })
9977
+ };
9978
+ const getOptions = {
9979
+ name: "get_retouch_options",
9980
+ title: "Get retouch options",
9981
+ description: "Reads the retouching tools' options (aligned, sample, spotType, range, exposure, protectTones, spongeMode, vibrance, strength) and the clone source ({x, y, offset} or null; offset is the aligned offset the last clone or heal stroke fixed). Call it before clone_stamp or heal_brush without a source to see where they will sample.",
9982
+ inputSchema: { type: "object", properties: {}, additionalProperties: false },
9983
+ annotations: { title: "Get retouch options", ...READ5 },
9984
+ handler: () => {
9985
+ const { retouch, cloneSource } = controller.getState().paint;
9986
+ return { options: { ...retouch }, cloneSource: cloneSource ? { ...cloneSource } : null };
9987
+ }
9988
+ };
9989
+ const setOptions = {
9990
+ name: "set_retouch_options",
9991
+ title: "Set retouch options",
9992
+ description: "Sets the retouching tools' defaults (view state, not an undo step); each stroke tool can also override them per call. Changing aligned clears the aligned offset. Returns the options after the change.",
9993
+ inputSchema: {
9994
+ type: "object",
9995
+ properties: {
9996
+ aligned: { type: "boolean", description: "Clone / heal: keep the offset from stroke to stroke (default true)." },
9997
+ sample: SAMPLE,
9998
+ spotType: { type: "string", enum: [..._chunk4KLT7ZYScjs.SPOT_HEAL_TYPES], description: "Spot heal: proximity-match (default) or smooth." },
9999
+ range: { type: "string", enum: [..._chunk4KLT7ZYScjs.TONE_RANGES], description: "Dodge / burn: shadows, midtones (default) or highlights." },
10000
+ exposure: { type: "number", minimum: 0, maximum: 1, description: "Dodge / burn strength 0..1 (default 0.5)." },
10001
+ protectTones: { type: "boolean", description: "Dodge / burn: keep hue and saturation (default true)." },
10002
+ spongeMode: { type: "string", enum: ["desaturate", "saturate"], description: "Sponge: desaturate (default) or saturate." },
10003
+ vibrance: { type: "boolean", description: "Sponge: damp clipping (default true)." },
10004
+ strength: { type: "number", minimum: 0, maximum: 1, description: "Smudge strength 0..1 (default 0.5)." }
10005
+ },
10006
+ additionalProperties: false
10007
+ },
10008
+ annotations: { title: "Set retouch options", ...WRITE5, idempotentHint: true },
10009
+ handler: (args) => ({ ...controller.setPaintOptions({ retouch: args }).retouch })
10010
+ };
10011
+ const setSource = {
10012
+ name: "set_clone_source",
10013
+ title: "Set the clone source",
10014
+ description: "Sets the Clone Stamp and Healing Brush source point (Photoshop's Alt-click), in document pixels, or clears it with clear true. The next clone_stamp or heal_brush stroke fixes the offset from its first point. View state, not an undo step. Returns the clone source {x, y, offset} (or null).",
10015
+ inputSchema: {
10016
+ type: "object",
10017
+ properties: {
10018
+ x: { type: "number", description: "Source x in px (required unless clear)." },
10019
+ y: { type: "number", description: "Source y in px (required unless clear)." },
10020
+ clear: { type: "boolean", description: "Remove the source point instead (default false)." }
10021
+ },
10022
+ additionalProperties: false
10023
+ },
10024
+ annotations: { title: "Set the clone source", ...WRITE5, idempotentHint: true },
10025
+ handler: (args) => {
10026
+ if (args.clear === true) {
10027
+ if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Give either clear true or x and y, not both.");
10028
+ return controller.setCloneSource(null);
10029
+ }
10030
+ if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
10031
+ return controller.setCloneSource(checkSource(controller, { x: args.x, y: args.y }));
10032
+ }
10033
+ };
10034
+ return [cloneStamp, healBrush, spotHeal, smudge, dodge, burn, spongeTool, getOptions, setOptions, setSource];
10035
+ }
10036
+ function pick(args, keys) {
10037
+ const out = {};
10038
+ for (const k of keys) if (args[k] !== void 0) out[k] = args[k];
10039
+ return out;
10040
+ }
10041
+
10042
+ // src/image-editor/psd-tools.ts
10043
+ var READ6 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
9496
10044
  var DESTRUCTIVE4 = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false };
9497
10045
  var DATA = {
9498
10046
  type: "string",
@@ -9513,7 +10061,7 @@ function createImagePsdTools(controller) {
9513
10061
  title: "Inspect a PSD",
9514
10062
  description: "Reads a PSD / PSB without opening it: size, bit depth, colour mode, resolution, and every layer (bottom first, a group before its children) with its PSD kind, the layer type it would become and its status (mapped, approximated or dropped, with notes), plus the import warnings. Changes nothing. Call before import_psd to see what would be lost.",
9515
10063
  inputSchema: { type: "object", properties: { data: DATA }, required: ["data"], additionalProperties: false },
9516
- annotations: { title: "Inspect a PSD", ...READ5 },
10064
+ annotations: { title: "Inspect a PSD", ...READ6 },
9517
10065
  handler: ({ data }) => {
9518
10066
  const res = _chunkYGIMK4NXcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
9519
10067
  return {
@@ -9550,7 +10098,7 @@ function createImagePsdTools(controller) {
9550
10098
  title: "Export the document as a PSD",
9551
10099
  description: "Writes the document as an 8-bit RGB PSD (a PSB above 30000 px) with real layers, groups, adjustment layers, masks and layer effects (an effects block opened from a PSD is written back unchanged while its effects are; the patterns effects use are embedded), in the source frame (crop and rotation are not applied). Smart objects are written as Photoshop smart objects (contents embedded once per linked set, placement, warp, smart filters and filter mask; a Develop smart filter has no Photoshop filter and is left out of the list). Shape layers are written as Photoshop shape layers (path, fill, stroke, live shapes) and type layers as Photoshop type layers (text, runs, paragraphs, frame; blocks opened from a PSD are written back unchanged while the layer is). Layer filters and depth masks are baked, annotation layers are rasterized (in a browser; elsewhere left out), and the merged image is the editor's composite. Changes nothing. Returns the file as base64, its size in bytes, whether it is a PSB, and warnings for everything that was changed or left out.",
9552
10100
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
9553
- annotations: { title: "Export the document as a PSD", ...READ5 },
10101
+ annotations: { title: "Export the document as a PSD", ...READ6 },
9554
10102
  handler: async () => {
9555
10103
  const res = await controller.toPsd();
9556
10104
  return {
@@ -9568,8 +10116,8 @@ function createImagePsdTools(controller) {
9568
10116
  }
9569
10117
 
9570
10118
  // src/image-editor/transform-tools.ts
9571
- var READ6 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
9572
- var WRITE5 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
10119
+ var READ7 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
10120
+ var WRITE6 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
9573
10121
  var round4 = (n, digits = 3) => Math.round(n * 10 ** digits) / 10 ** digits;
9574
10122
  var roundPoint = (p) => ({ x: round4(p.x), y: round4(p.y) });
9575
10123
  var POINT = {
@@ -9578,7 +10126,7 @@ var POINT = {
9578
10126
  required: ["x", "y"],
9579
10127
  additionalProperties: false
9580
10128
  };
9581
- var TARGET2 = {
10129
+ var TARGET3 = {
9582
10130
  layerId: { type: "string", description: "Layer to transform (from list_layers; default the active layer)." },
9583
10131
  content: {
9584
10132
  type: "string",
@@ -9660,15 +10208,15 @@ function createImageTransformTools(controller) {
9660
10208
  inputSchema: {
9661
10209
  type: "object",
9662
10210
  properties: {
9663
- layerId: TARGET2.layerId,
9664
- content: { type: "string", enum: FREE_TRANSFORM_CONTENTS, description: `${TARGET2.content.description} selection-outline frames the selection outline alone.` },
9665
- channel: TARGET2.channel,
10211
+ layerId: TARGET3.layerId,
10212
+ content: { type: "string", enum: FREE_TRANSFORM_CONTENTS, description: `${TARGET3.content.description} selection-outline frames the selection outline alone.` },
10213
+ channel: TARGET3.channel,
9666
10214
  meshColumns: { type: "integer", minimum: 1, maximum: 16, description: "Patch columns of an identity warp mesh to return (omit for none)." },
9667
10215
  meshRows: { type: "integer", minimum: 1, maximum: 16, description: "Patch rows of an identity warp mesh to return (default meshColumns)." }
9668
10216
  },
9669
10217
  additionalProperties: false
9670
10218
  },
9671
- annotations: { title: "Get the Free Transform frame", ...READ6 },
10219
+ annotations: { title: "Get the Free Transform frame", ...READ7 },
9672
10220
  handler: (args) => {
9673
10221
  const init = targetFrom(args);
9674
10222
  if (init.content === "selection-copy") init.content = "selection";
@@ -9698,10 +10246,10 @@ function createImageTransformTools(controller) {
9698
10246
  description: "Edit \u203A Free Transform: scales, rotates, skews, moves, distorts or puts in perspective a pixel layer (with its linked mask), the selected pixels, a copy of them on a new layer, or an unlinked mask. Give the transform one way: the numeric fields (as Photoshop\u2019s options bar, about a reference point), a matrix, or the frame\u2019s new corners (distort / perspective; read the frame with get_transform_frame). Resamples once, tile by tile; one undo step. Returns layerId (the new layer for selection-copy), what moved, the frame, the corners and the new document bounds.",
9699
10247
  inputSchema: {
9700
10248
  type: "object",
9701
- properties: { ...TARGET2, ...GEOMETRY },
10249
+ properties: { ...TARGET3, ...GEOMETRY },
9702
10250
  additionalProperties: false
9703
10251
  },
9704
- annotations: { title: "Free Transform a layer", ...WRITE5 },
10252
+ annotations: { title: "Free Transform a layer", ...WRITE6 },
9705
10253
  handler: (args) => summary2(controller.transformLayer({ ...targetFrom(args), ...geometryFrom(args) }))
9706
10254
  };
9707
10255
  const warpLayer = {
@@ -9711,7 +10259,7 @@ function createImageTransformTools(controller) {
9711
10259
  inputSchema: {
9712
10260
  type: "object",
9713
10261
  properties: {
9714
- ...TARGET2,
10262
+ ...TARGET3,
9715
10263
  style: { type: "string", enum: _chunkW3GXSUSQcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
9716
10264
  bend: { type: "number", minimum: -100, maximum: 100, description: "Preset bend in percent, \u2212100..100 (default 50)." },
9717
10265
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Preset horizontal distortion in percent, \u2212100..100 (default 0)." },
@@ -9731,7 +10279,7 @@ function createImageTransformTools(controller) {
9731
10279
  },
9732
10280
  additionalProperties: false
9733
10281
  },
9734
- annotations: { title: "Warp a layer", ...WRITE5 },
10282
+ annotations: { title: "Warp a layer", ...WRITE6 },
9735
10283
  handler: (args) => {
9736
10284
  const hasPreset = ["style", "bend", "horizontal", "vertical", "orientation"].some((k) => args[k] !== void 0);
9737
10285
  if (hasPreset && args.mesh !== void 0) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
@@ -9762,10 +10310,10 @@ function createImageTransformTools(controller) {
9762
10310
  description: "Select \u203A Transform Selection: scales, rotates, skews, moves or distorts only the selection outline; no pixels change. Give the transform one way: the numeric fields (about a reference point of the selection\u2019s bounds), a matrix, or the new corners of its bounds. Needs a selection. One undo step. Returns the new selection bounds.",
9763
10311
  inputSchema: {
9764
10312
  type: "object",
9765
- properties: { interpolation: { ...TARGET2.interpolation, description: "Resampling of soft edges: nearest, bilinear or bicubic (default)." }, ...GEOMETRY },
10313
+ properties: { interpolation: { ...TARGET3.interpolation, description: "Resampling of soft edges: nearest, bilinear or bicubic (default)." }, ...GEOMETRY },
9766
10314
  additionalProperties: false
9767
10315
  },
9768
- annotations: { title: "Transform the selection outline", ...WRITE5 },
10316
+ annotations: { title: "Transform the selection outline", ...WRITE6 },
9769
10317
  handler: (args) => {
9770
10318
  const res = controller.transformLayer({ content: "selection-outline", interpolation: args.interpolation, ...geometryFrom(args) });
9771
10319
  return { changed: res.changed, frame: { ...res.box }, corners: res.corners.map(roundPoint), bounds: res.bounds };
@@ -9779,14 +10327,14 @@ function createImageTransformTools(controller) {
9779
10327
  type: "object",
9780
10328
  properties: {
9781
10329
  axis: { type: "string", enum: ["horizontal", "vertical"], description: "horizontal mirrors left \u2194 right, vertical top \u2194 bottom." },
9782
- layerId: TARGET2.layerId,
9783
- content: TARGET2.content,
9784
- channel: TARGET2.channel
10330
+ layerId: TARGET3.layerId,
10331
+ content: TARGET3.content,
10332
+ channel: TARGET3.channel
9785
10333
  },
9786
10334
  required: ["axis"],
9787
10335
  additionalProperties: false
9788
10336
  },
9789
- annotations: { title: "Flip a layer", ...WRITE5 },
10337
+ annotations: { title: "Flip a layer", ...WRITE6 },
9790
10338
  handler: (args) => summary2(controller.flipLayer(args.axis, targetFrom(args)))
9791
10339
  };
9792
10340
  const rotate90 = {
@@ -9797,22 +10345,22 @@ function createImageTransformTools(controller) {
9797
10345
  type: "object",
9798
10346
  properties: {
9799
10347
  turn: { type: "integer", enum: [90, -90, 180], description: "Degrees: 90 clockwise, -90 counter-clockwise, or 180." },
9800
- layerId: TARGET2.layerId,
9801
- content: TARGET2.content,
9802
- channel: TARGET2.channel
10348
+ layerId: TARGET3.layerId,
10349
+ content: TARGET3.content,
10350
+ channel: TARGET3.channel
9803
10351
  },
9804
10352
  required: ["turn"],
9805
10353
  additionalProperties: false
9806
10354
  },
9807
- annotations: { title: "Rotate a layer by quarter turns", ...WRITE5 },
10355
+ annotations: { title: "Rotate a layer by quarter turns", ...WRITE6 },
9808
10356
  handler: (args) => summary2(controller.rotateLayer90(args.turn, targetFrom(args)))
9809
10357
  };
9810
10358
  return [getFrame, transformLayer, warpLayer, transformSelection, flipLayer, rotate90];
9811
10359
  }
9812
10360
 
9813
10361
  // src/image-editor/smart-tools.ts
9814
- var READ7 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
9815
- var WRITE6 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
10362
+ var READ8 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
10363
+ var WRITE7 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
9816
10364
  var WRITE_IDEMPOTENT4 = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
9817
10365
  var DESTRUCTIVE5 = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false };
9818
10366
  var round5 = (n, digits = 3) => Math.round(n * 10 ** digits) / 10 ** digits;
@@ -9863,14 +10411,14 @@ function createImageSmartObjectTools(controller) {
9863
10411
  const layerSummary = (id) => {
9864
10412
  const s = controller.getState();
9865
10413
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, s.layers, id);
9866
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _334 => _334.parent, 'optionalAccess', _335 => _335.id]), () => ( null)), index: loc.index } : null;
10414
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _351 => _351.parent, 'optionalAccess', _352 => _352.id]), () => ( null)), index: loc.index } : null;
9867
10415
  };
9868
10416
  const getSmart = {
9869
10417
  name: "get_smart_object",
9870
10418
  title: "Read a smart object",
9871
10419
  description: "Returns a smart object\u2019s contents (id shared by linked instances, name, kind raster or document, pixel size, the file type it came from, the instances placed from it), its placement (corners in document pixels, warp mesh in contents pixels, interpolation, and scale / rotate / skew in percent and degrees of the contents\u2019 own size when affine), its smart filters bottom to top (ids, kind, settings, enabled, blend, opacity; kind psd marks a Photoshop filter kept but not drawn) with the filter mask, and the rendered bounds. Changes nothing.",
9872
10420
  inputSchema: { type: "object", properties: { layerId: LAYER_ID4 }, required: ["layerId"], additionalProperties: false },
9873
- annotations: { title: "Read a smart object", ...READ7 },
10421
+ annotations: { title: "Read a smart object", ...READ8 },
9874
10422
  handler: ({ layerId }) => info(smartId(layerId))
9875
10423
  };
9876
10424
  const convert = {
@@ -9885,7 +10433,7 @@ function createImageSmartObjectTools(controller) {
9885
10433
  },
9886
10434
  additionalProperties: false
9887
10435
  },
9888
- annotations: { title: "Convert to Smart Object", ...WRITE6 },
10436
+ annotations: { title: "Convert to Smart Object", ...WRITE7 },
9889
10437
  handler: ({ layerIds, name }) => {
9890
10438
  for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkYGIMK4NXcjs.requireLayer.call(void 0, controller.getLayers(), id2);
9891
10439
  const id = controller.convertToSmartObject(layerIds, { name });
@@ -10004,7 +10552,7 @@ function createImageSmartObjectTools(controller) {
10004
10552
  title: "Export a smart object\u2019s contents",
10005
10553
  description: "Layer \u203A Smart Objects \u203A Export Contents: the contents as a file, base64: the file they came from while unedited (a PSB, PNG, JPEG\u2026), else a PNG for raster contents or a PSD / PSB of a nested document. Returns name, mimeType, byteLength and base64. Changes nothing.",
10006
10554
  inputSchema: { type: "object", properties: { layerId: LAYER_ID4 }, required: ["layerId"], additionalProperties: false },
10007
- annotations: { title: "Export a smart object\u2019s contents", ...READ7 },
10555
+ annotations: { title: "Export a smart object\u2019s contents", ...READ8 },
10008
10556
  handler: ({ layerId }) => {
10009
10557
  const f = controller.exportSmartObjectContents(smartId(layerId));
10010
10558
  return { name: f.name, mimeType: f.mimeType, byteLength: f.bytes.length, base64: _chunkPOGBUYWEcjs.bytesToBase64.call(void 0, f.bytes) };
@@ -10024,7 +10572,7 @@ function createImageSmartObjectTools(controller) {
10024
10572
  required: ["layerId"],
10025
10573
  additionalProperties: false
10026
10574
  },
10027
- annotations: { title: "Copy a smart object", ...WRITE6 },
10575
+ annotations: { title: "Copy a smart object", ...WRITE7 },
10028
10576
  handler: ({ layerId, linked, name }) => {
10029
10577
  const id = controller.copySmartObject(smartId(layerId), linked === true, name);
10030
10578
  return { layer: layerSummary(id), contentsId: controller.getSmartObject(id).contents.id };
@@ -10035,7 +10583,7 @@ function createImageSmartObjectTools(controller) {
10035
10583
  title: "Edit a smart object\u2019s contents",
10036
10584
  description: 'Layer \u203A Smart Objects \u203A Edit Contents: opens the contents as a document of their own (a layer document, or raster contents as one pixel layer "Layer 0") with their own undo history. Every other tool (list_layers, paint, adjustments\u2026) then works inside the contents until close_smart_object_contents saves them back. Contents can nest. Returns the contents\u2019 size and layers.',
10037
10585
  inputSchema: { type: "object", properties: { layerId: LAYER_ID4 }, required: ["layerId"], additionalProperties: false },
10038
- annotations: { title: "Edit a smart object\u2019s contents", ...WRITE6 },
10586
+ annotations: { title: "Edit a smart object\u2019s contents", ...WRITE7 },
10039
10587
  handler: ({ layerId }) => {
10040
10588
  const res = controller.editSmartObjectContents(smartId(layerId));
10041
10589
  const s = controller.getState();
@@ -10051,7 +10599,7 @@ function createImageSmartObjectTools(controller) {
10051
10599
  properties: { save: { type: "boolean", description: "true (default) saves the edits into the smart object; false discards them." } },
10052
10600
  additionalProperties: false
10053
10601
  },
10054
- annotations: { title: "Close a smart object\u2019s contents", ...WRITE6 },
10602
+ annotations: { title: "Close a smart object\u2019s contents", ...WRITE7 },
10055
10603
  handler: ({ save }) => ({ ...controller.closeSmartObjectContents(save !== false), editing: controller.getEditingContents() })
10056
10604
  };
10057
10605
  const addFilter = {
@@ -10069,7 +10617,7 @@ function createImageSmartObjectTools(controller) {
10069
10617
  required: ["layerId", "kind"],
10070
10618
  additionalProperties: false
10071
10619
  },
10072
- annotations: { title: "Add a smart filter", ...WRITE6 },
10620
+ annotations: { title: "Add a smart filter", ...WRITE7 },
10073
10621
  handler: (args) => {
10074
10622
  const id = smartId(args.layerId);
10075
10623
  const filter = controller.addSmartFilter(id, { kind: args.kind, ...settingsFrom(args) }, args.index);
@@ -10158,7 +10706,7 @@ function createImageSmartObjectTools(controller) {
10158
10706
  required: ["layerId", "from"],
10159
10707
  additionalProperties: false
10160
10708
  },
10161
- annotations: { title: "Set the smart filter mask", ...WRITE6 },
10709
+ annotations: { title: "Set the smart filter mask", ...WRITE7 },
10162
10710
  handler: (args) => {
10163
10711
  const id = smartId(args.layerId);
10164
10712
  const props = {};
@@ -10171,8 +10719,8 @@ function createImageSmartObjectTools(controller) {
10171
10719
  }
10172
10720
 
10173
10721
  // src/image-editor/shape-tools.ts
10174
- var READ8 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
10175
- var WRITE7 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
10722
+ var READ9 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
10723
+ var WRITE8 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
10176
10724
  var WRITE_IDEMPOTENT5 = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
10177
10725
  var DESTRUCTIVE6 = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false };
10178
10726
  var LAYER_ID5 = { type: "string", description: "Shape layer id from list_layers (type shape) or add_shape_layer." };
@@ -10418,14 +10966,14 @@ function createImageShapeTools(controller) {
10418
10966
  const layerSummary = (id) => {
10419
10967
  const s = controller.getState();
10420
10968
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, s.layers, id);
10421
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _336 => _336.parent, 'optionalAccess', _337 => _337.id]), () => ( null)), index: loc.index } : null;
10969
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _353 => _353.parent, 'optionalAccess', _354 => _354.id]), () => ( null)), index: loc.index } : null;
10422
10970
  };
10423
10971
  const get = {
10424
10972
  name: "get_shape_layer",
10425
10973
  title: "Read a shape layer",
10426
10974
  description: "Returns a shape layer\u2019s components bottom to top (index, path operation, the live shape it was drawn as or null, its subpaths with absolute anchors and handles, bounds), the fill rule, fill and stroke paints and settings, the path bounds and the rendered bounds (stroke included). Changes nothing.",
10427
10975
  inputSchema: { type: "object", properties: { layerId: LAYER_ID5 }, required: ["layerId"], additionalProperties: false },
10428
- annotations: { title: "Read a shape layer", ...READ8 },
10976
+ annotations: { title: "Read a shape layer", ...READ9 },
10429
10977
  handler: ({ layerId }) => controller.getShapeLayer(shapeId(layerId))
10430
10978
  };
10431
10979
  const add2 = {
@@ -10456,7 +11004,7 @@ function createImageShapeTools(controller) {
10456
11004
  },
10457
11005
  additionalProperties: false
10458
11006
  },
10459
- annotations: { title: "Add a shape layer", ...WRITE7 },
11007
+ annotations: { title: "Add a shape layer", ...WRITE8 },
10460
11008
  handler: (args) => {
10461
11009
  const init = { ...geometry(args) };
10462
11010
  if (args.components !== void 0) init.components = args.components.map(geometry);
@@ -10551,7 +11099,7 @@ function createImageShapeTools(controller) {
10551
11099
  required: ["layerId"],
10552
11100
  additionalProperties: false
10553
11101
  },
10554
- annotations: { title: "Add a shape component", ...WRITE7 },
11102
+ annotations: { title: "Add a shape component", ...WRITE8 },
10555
11103
  handler: ({ layerId, index, ...rest }) => controller.addShapeComponent(shapeId(layerId), geometry(rest), index)
10556
11104
  };
10557
11105
  const removeComponent = {
@@ -10574,8 +11122,8 @@ function createImageShapeTools(controller) {
10574
11122
  }
10575
11123
 
10576
11124
  // src/image-editor/type-tools.ts
10577
- var READ9 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
10578
- var WRITE8 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
11125
+ var READ10 = { readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false };
11126
+ var WRITE9 = { readOnlyHint: false, destructiveHint: false, idempotentHint: false, openWorldHint: false };
10579
11127
  var WRITE_IDEMPOTENT6 = { readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false };
10580
11128
  var DESTRUCTIVE7 = { readOnlyHint: false, destructiveHint: true, idempotentHint: false, openWorldHint: false };
10581
11129
  var LAYER_ID6 = { type: "string", description: "Type layer id from list_layers (type type) or add_text_layer." };
@@ -10603,7 +11151,7 @@ var PARAGRAPH = {
10603
11151
  spaceBefore: { type: ["number", "null"], description: "Space above the paragraph in pixels (not before the first)." },
10604
11152
  spaceAfter: { type: ["number", "null"], description: "Space below the paragraph in pixels." }
10605
11153
  };
10606
- function pick(args, keys) {
11154
+ function pick2(args, keys) {
10607
11155
  const out = {};
10608
11156
  for (const k of keys) if (args[k] !== void 0) out[k] = args[k];
10609
11157
  return out;
@@ -10617,7 +11165,7 @@ function createImageTypeTools(controller) {
10617
11165
  const layerSummary = (id) => {
10618
11166
  const s = controller.getState();
10619
11167
  const loc = _chunkPOGBUYWEcjs.findLayer.call(void 0, s.layers, id);
10620
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _338 => _338.parent, 'optionalAccess', _339 => _339.id]), () => ( null)), index: loc.index } : null;
11168
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _355 => _355.parent, 'optionalAccess', _356 => _356.id]), () => ( null)), index: loc.index } : null;
10621
11169
  };
10622
11170
  const range = (args) => ({ start: args.start, end: args.end });
10623
11171
  const listFonts = {
@@ -10625,15 +11173,15 @@ function createImageTypeTools(controller) {
10625
11173
  title: "List fonts",
10626
11174
  description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
10627
11175
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
10628
- annotations: { title: "List fonts", ...READ9 },
10629
- handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _340 => _340.getTextShaper, 'call', _341 => _341(), 'optionalAccess', _342 => _342.id]), () => ( null)) })
11176
+ annotations: { title: "List fonts", ...READ10 },
11177
+ handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _357 => _357.getTextShaper, 'call', _358 => _358(), 'optionalAccess', _359 => _359.id]), () => ( null)) })
10630
11178
  };
10631
11179
  const get = {
10632
11180
  name: "get_text_layer",
10633
11181
  title: "Read a type layer",
10634
11182
  description: "Returns a type layer\u2019s text, its character runs and paragraphs as [start, end) ranges in UTF-16 code units with their styles, the frame (point text, or a paragraph box with its size), the text-to-document transform, the laid-out lines (range, baseline, width), the rendered bounds, missing fonts and whether the pixels are live or stored from a file. Call before editing text you did not write, to get the ranges. Changes nothing.",
10635
11183
  inputSchema: { type: "object", properties: { layerId: LAYER_ID6 }, required: ["layerId"], additionalProperties: false },
10636
- annotations: { title: "Read a type layer", ...READ9 },
11184
+ annotations: { title: "Read a type layer", ...READ10 },
10637
11185
  handler: ({ layerId }) => controller.getTextLayer(typeId(layerId))
10638
11186
  };
10639
11187
  const add2 = {
@@ -10667,9 +11215,9 @@ function createImageTypeTools(controller) {
10667
11215
  required: ["text", "x", "y"],
10668
11216
  additionalProperties: false
10669
11217
  },
10670
- annotations: { title: "Add a type layer", ...WRITE8 },
11218
+ annotations: { title: "Add a type layer", ...WRITE9 },
10671
11219
  handler: (args) => {
10672
- const init = pick(args, ["text", "x", "y", "box", "style", "paragraph", "rotation", "name", "opacity", "blend", "aboveId", "belowId", "parentId", "index"]);
11220
+ const init = pick2(args, ["text", "x", "y", "box", "style", "paragraph", "rotation", "name", "opacity", "blend", "aboveId", "belowId", "parentId", "index"]);
10673
11221
  if (init.blend !== void 0) init.blend = init.blend;
10674
11222
  const id = controller.addTextLayer(init);
10675
11223
  return { layer: layerSummary(id), text: controller.getTextLayer(id) };
@@ -10680,7 +11228,7 @@ function createImageTypeTools(controller) {
10680
11228
  title: "Edit text",
10681
11229
  description: "Replaces the text in [start, end) (default all of it) with text; inserted text takes the style of the character at start. Use start = end to insert. Returns the text layer with its new runs.",
10682
11230
  inputSchema: { type: "object", properties: { layerId: LAYER_ID6, text: { type: "string", description: "Replacement text (\\n starts a paragraph; empty deletes the range)." }, start: START, end: END }, required: ["layerId", "text"], additionalProperties: false },
10683
- annotations: { title: "Edit text", ...WRITE8 },
11231
+ annotations: { title: "Edit text", ...WRITE9 },
10684
11232
  handler: (args) => controller.setText(typeId(args.layerId), args.text, range(args))
10685
11233
  };
10686
11234
  const setStyle = {
@@ -10690,7 +11238,7 @@ function createImageTypeTools(controller) {
10690
11238
  inputSchema: { type: "object", properties: { layerId: LAYER_ID6, start: START, end: END, ...STYLE }, required: ["layerId"], additionalProperties: false },
10691
11239
  annotations: { title: "Style a range of text", ...WRITE_IDEMPOTENT6 },
10692
11240
  handler: (args) => {
10693
- const style = pick(args, Object.keys(STYLE));
11241
+ const style = pick2(args, Object.keys(STYLE));
10694
11242
  if (!Object.keys(style).length) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
10695
11243
  return controller.setTextStyle(typeId(args.layerId), style, range(args));
10696
11244
  }
@@ -10702,7 +11250,7 @@ function createImageTypeTools(controller) {
10702
11250
  inputSchema: { type: "object", properties: { layerId: LAYER_ID6, start: START, end: END, ...PARAGRAPH }, required: ["layerId"], additionalProperties: false },
10703
11251
  annotations: { title: "Style paragraphs", ...WRITE_IDEMPOTENT6 },
10704
11252
  handler: (args) => {
10705
- const style = pick(args, Object.keys(PARAGRAPH));
11253
+ const style = pick2(args, Object.keys(PARAGRAPH));
10706
11254
  if (!Object.keys(style).length) throw new (0, _chunkYGIMK4NXcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
10707
11255
  return controller.setParagraphStyle(typeId(args.layerId), style, range(args));
10708
11256
  }
@@ -10915,7 +11463,7 @@ function createImageEditorToolProvider(controller, options = {}) {
10915
11463
  for (const ref of [aboveId, parentId]) {
10916
11464
  if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
10917
11465
  }
10918
- if (parentId !== void 0 && _optionalChain([controller, 'access', _343 => _343.getLayer, 'call', _344 => _344(parentId), 'optionalAccess', _345 => _345.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
11466
+ if (parentId !== void 0 && _optionalChain([controller, 'access', _360 => _360.getLayer, 'call', _361 => _361(parentId), 'optionalAccess', _362 => _362.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
10919
11467
  const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId });
10920
11468
  const layer = controller.getAdjustmentLayer(id);
10921
11469
  return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id) };
@@ -10986,6 +11534,7 @@ function createImageEditorToolProvider(controller, options = {}) {
10986
11534
  ...createImageTypeTools(controller),
10987
11535
  ...createImageEffectTools(controller),
10988
11536
  ...createImagePaintTools(controller),
11537
+ ...createImageRetouchTools(controller),
10989
11538
  ..._chunk7VOHOPLWcjs.createPigmentTools.call(void 0, ),
10990
11539
  ...createImagePsdTools(controller)
10991
11540
  ]
@@ -11048,18 +11597,18 @@ var round22 = (v) => Math.round(v * 100) / 100;
11048
11597
 
11049
11598
  // src/image-editor/selection/gesture.ts
11050
11599
  var SelectionGesture = (_class8 = class {
11051
- constructor(controller, getOptions) {;_class8.prototype.__init65.call(this);_class8.prototype.__init66.call(this);_class8.prototype.__init67.call(this);_class8.prototype.__init68.call(this);_class8.prototype.__init69.call(this);
11600
+ constructor(controller, getOptions) {;_class8.prototype.__init68.call(this);_class8.prototype.__init69.call(this);_class8.prototype.__init70.call(this);_class8.prototype.__init71.call(this);_class8.prototype.__init72.call(this);
11052
11601
  this.controller = controller;
11053
11602
  this.getOptions = getOptions;
11054
11603
  }
11055
11604
 
11056
11605
 
11057
- __init65() {this.start = null}
11058
- __init66() {this.points = []}
11059
- __init67() {this.current = null}
11060
- __init68() {this.modifiers = {}}
11606
+ __init68() {this.start = null}
11607
+ __init69() {this.points = []}
11608
+ __init70() {this.current = null}
11609
+ __init71() {this.modifiers = {}}
11061
11610
  /** The last error (e.g. pixels unavailable for the wand), for the UI to show. */
11062
- __init69() {this.error = null}
11611
+ __init72() {this.error = null}
11063
11612
  get active() {
11064
11613
  return this.start !== null;
11065
11614
  }
@@ -11345,15 +11894,15 @@ function liveShapeForDrag(o, a, b, mods = {}) {
11345
11894
  return null;
11346
11895
  }
11347
11896
  var ShapeDrawGesture = (_class9 = class {
11348
- constructor(controller, options) {;_class9.prototype.__init70.call(this);_class9.prototype.__init71.call(this);_class9.prototype.__init72.call(this);
11897
+ constructor(controller, options) {;_class9.prototype.__init73.call(this);_class9.prototype.__init74.call(this);_class9.prototype.__init75.call(this);
11349
11898
  this.controller = controller;
11350
11899
  this.options = options;
11351
11900
  }
11352
11901
 
11353
11902
 
11354
- __init70() {this.start = null}
11355
- __init71() {this.layerId = null}
11356
- __init72() {this.error = null}
11903
+ __init73() {this.start = null}
11904
+ __init74() {this.layerId = null}
11905
+ __init75() {this.error = null}
11357
11906
  get active() {
11358
11907
  return this.start !== null;
11359
11908
  }
@@ -11398,11 +11947,11 @@ function applyShapeOptions(controller, layerId, change) {
11398
11947
  const style = {};
11399
11948
  if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
11400
11949
  if ("stroke" in change || "strokeWidth" in change) {
11401
- const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _346 => _346.stroke, 'optionalAccess', _347 => _347.paint, 'access', _348 => _348.type]) === "color" ? info.stroke.paint.color : null;
11402
- style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _349 => _349.stroke, 'optionalAccess', _350 => _350.width]))), () => ( 2)), paint: color } : null;
11950
+ const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _363 => _363.stroke, 'optionalAccess', _364 => _364.paint, 'access', _365 => _365.type]) === "color" ? info.stroke.paint.color : null;
11951
+ style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _366 => _366.stroke, 'optionalAccess', _367 => _367.width]))), () => ( 2)), paint: color } : null;
11403
11952
  }
11404
11953
  if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
11405
- const live = _optionalChain([info, 'access', _351 => _351.components, 'access', _352 => _352[0], 'optionalAccess', _353 => _353.live]);
11954
+ const live = _optionalChain([info, 'access', _368 => _368.components, 'access', _369 => _369[0], 'optionalAccess', _370 => _370.live]);
11406
11955
  if (!live) return;
11407
11956
  const shape = {};
11408
11957
  if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
@@ -11414,7 +11963,7 @@ function applyShapeOptions(controller, layerId, change) {
11414
11963
  if (Object.keys(shape).length) controller.setShapeComponent(layerId, 0, { shape });
11415
11964
  }
11416
11965
  var TextEditSession = (_class10 = class {
11417
- constructor(controller, layerId, index) {;_class10.prototype.__init73.call(this);_class10.prototype.__init74.call(this);_class10.prototype.__init75.call(this);
11966
+ constructor(controller, layerId, index) {;_class10.prototype.__init76.call(this);_class10.prototype.__init77.call(this);_class10.prototype.__init78.call(this);
11418
11967
  this.controller = controller;
11419
11968
  this.layerId = layerId;
11420
11969
  const n = this.text.length;
@@ -11424,11 +11973,11 @@ var TextEditSession = (_class10 = class {
11424
11973
 
11425
11974
 
11426
11975
 
11427
- __init73() {this.changed = false}
11428
- __init74() {this.listeners = /* @__PURE__ */ new Set()}
11429
- __init75() {this.error = null}
11976
+ __init76() {this.changed = false}
11977
+ __init77() {this.listeners = /* @__PURE__ */ new Set()}
11978
+ __init78() {this.error = null}
11430
11979
  get layer() {
11431
- const l = _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _354 => _354.layer]);
11980
+ const l = _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _371 => _371.layer]);
11432
11981
  if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
11433
11982
  return l;
11434
11983
  }
@@ -11443,7 +11992,7 @@ var TextEditSession = (_class10 = class {
11443
11992
  }
11444
11993
  /** Whether the layer still exists (it can be deleted or undone away while editing). */
11445
11994
  get alive() {
11446
- return _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _355 => _355.layer, 'access', _356 => _356.type]) === "type";
11995
+ return _optionalChain([_chunkPOGBUYWEcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _372 => _372.layer, 'access', _373 => _373.type]) === "type";
11447
11996
  }
11448
11997
  subscribe(fn) {
11449
11998
  this.listeners.add(fn);
@@ -11691,15 +12240,15 @@ function invert(m) {
11691
12240
  return [d / det, -b / det, -c / det, a / det, (c * f - d * e) / det, (b * e - a * f) / det];
11692
12241
  }
11693
12242
  var TypeToolGesture = (_class11 = class {
11694
- constructor(controller, options) {;_class11.prototype.__init76.call(this);_class11.prototype.__init77.call(this);_class11.prototype.__init78.call(this);
12243
+ constructor(controller, options) {;_class11.prototype.__init79.call(this);_class11.prototype.__init80.call(this);_class11.prototype.__init81.call(this);
11695
12244
  this.controller = controller;
11696
12245
  this.options = options;
11697
12246
  }
11698
12247
 
11699
12248
 
11700
- __init76() {this.session = null}
11701
- __init77() {this.dragStart = null}
11702
- __init78() {this.error = null}
12249
+ __init79() {this.session = null}
12250
+ __init80() {this.dragStart = null}
12251
+ __init81() {this.error = null}
11703
12252
  down(p, mods = {}) {
11704
12253
  this.error = null;
11705
12254
  const hit = typeLayerAt(this.controller, p);
@@ -11746,7 +12295,7 @@ var TypeToolGesture = (_class11 = class {
11746
12295
  finish() {
11747
12296
  const s = this.session;
11748
12297
  this.session = null;
11749
- _optionalChain([s, 'optionalAccess', _357 => _357.close, 'call', _358 => _358()]);
12298
+ _optionalChain([s, 'optionalAccess', _374 => _374.close, 'call', _375 => _375()]);
11750
12299
  }
11751
12300
  }, _class11);
11752
12301
 
@@ -11798,7 +12347,7 @@ function layerHasThumbnail(layer) {
11798
12347
  return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
11799
12348
  }
11800
12349
  function layerWarning(layer) {
11801
- if (layer.type === "type" && _optionalChain([layer, 'access', _359 => _359.missingFonts, 'optionalAccess', _360 => _360.length])) {
12350
+ if (layer.type === "type" && _optionalChain([layer, 'access', _376 => _376.missingFonts, 'optionalAccess', _377 => _377.length])) {
11802
12351
  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."}`;
11803
12352
  }
11804
12353
  return null;
@@ -11821,36 +12370,36 @@ function layerMenu(controller) {
11821
12370
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
11822
12371
  const below = loc ? siblings[loc.index - 1] : void 0;
11823
12372
  const hasSel = controller.hasSelection;
11824
- const isPixel = _optionalChain([active, 'optionalAccess', _361 => _361.type]) === "pixel";
12373
+ const isPixel = _optionalChain([active, 'optionalAccess', _378 => _378.type]) === "pixel";
11825
12374
  return [
11826
12375
  { action: "new-layer", label: "New Layer", enabled: true },
11827
12376
  { action: "new-group", label: "New Group", enabled: true },
11828
12377
  { action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
11829
12378
  { action: "delete", label: "Delete Layer", enabled: Boolean(active) },
11830
12379
  { action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
11831
- { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _362 => _362.type]) === "group" },
11832
- { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _363 => _363.visible]) && _optionalChain([below, 'optionalAccess', _364 => _364.type]) === "pixel") },
12380
+ { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _379 => _379.type]) === "group" },
12381
+ { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _380 => _380.visible]) && _optionalChain([below, 'optionalAccess', _381 => _381.type]) === "pixel") },
11833
12382
  { action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
11834
12383
  { action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
11835
12384
  { action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
11836
12385
  { action: "via-cut", label: "Layer via Cut", enabled: isPixel && hasSel },
11837
12386
  { action: "add-mask", label: "Add Layer Mask", enabled: Boolean(active) },
11838
12387
  { action: "add-mask-selection", label: "Add Mask from Selection", enabled: Boolean(active) && hasSel },
11839
- { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _365 => _365.mask])) },
11840
- { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _366 => _366.mask])) },
11841
- { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _367 => _367.mask, 'optionalAccess', _368 => _368.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _369 => _369.mask])) },
11842
- { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _370 => _370.mask, 'optionalAccess', _371 => _371.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _372 => _372.mask]) && !active.mask.source) },
11843
- { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _373 => _373.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _374 => _374.type]) === "smart" || _optionalChain([active, 'optionalAccess', _375 => _375.type]) === "shape" || _optionalChain([active, 'optionalAccess', _376 => _376.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _377 => _377.type]) === "pixel" && _optionalChain([active, 'access', _378 => _378.filters, 'optionalAccess', _379 => _379.length])) },
12388
+ { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _382 => _382.mask])) },
12389
+ { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _383 => _383.mask])) },
12390
+ { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _384 => _384.mask, 'optionalAccess', _385 => _385.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _386 => _386.mask])) },
12391
+ { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _387 => _387.mask, 'optionalAccess', _388 => _388.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _389 => _389.mask]) && !active.mask.source) },
12392
+ { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _390 => _390.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _391 => _391.type]) === "smart" || _optionalChain([active, 'optionalAccess', _392 => _392.type]) === "shape" || _optionalChain([active, 'optionalAccess', _393 => _393.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _394 => _394.type]) === "pixel" && _optionalChain([active, 'access', _395 => _395.filters, 'optionalAccess', _396 => _396.length])) },
11844
12393
  { action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
11845
- { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _380 => _380.type]) === "smart" },
11846
- { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _381 => _381.type]) === "smart" },
11847
- { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _382 => _382.type]) === "smart" && !_optionalChain([active, 'access', _383 => _383.smartFilters, 'optionalAccess', _384 => _384.mask]) },
11848
- { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _385 => _385.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
12394
+ { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _397 => _397.type]) === "smart" },
12395
+ { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _398 => _398.type]) === "smart" },
12396
+ { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _399 => _399.type]) === "smart" && !_optionalChain([active, 'access', _400 => _400.smartFilters, 'optionalAccess', _401 => _401.mask]) },
12397
+ { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _402 => _402.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
11849
12398
  ];
11850
12399
  }
11851
12400
  async function runLayerMenuAction(controller, action) {
11852
12401
  const active = controller.getActiveLayer();
11853
- const id = _optionalChain([active, 'optionalAccess', _386 => _386.id]);
12402
+ const id = _optionalChain([active, 'optionalAccess', _403 => _403.id]);
11854
12403
  try {
11855
12404
  switch (action) {
11856
12405
  case "new-layer":
@@ -11897,10 +12446,10 @@ async function runLayerMenuAction(controller, action) {
11897
12446
  if (id) controller.removeLayerMask(id);
11898
12447
  break;
11899
12448
  case "toggle-mask":
11900
- if (id && _optionalChain([active, 'optionalAccess', _387 => _387.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
12449
+ if (id && _optionalChain([active, 'optionalAccess', _404 => _404.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
11901
12450
  break;
11902
12451
  case "toggle-mask-link":
11903
- if (id && _optionalChain([active, 'optionalAccess', _388 => _388.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
12452
+ if (id && _optionalChain([active, 'optionalAccess', _405 => _405.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
11904
12453
  break;
11905
12454
  case "rasterize":
11906
12455
  if (id) await controller.rasterizeLayer(id);
@@ -11918,7 +12467,7 @@ async function runLayerMenuAction(controller, action) {
11918
12467
  if (id) controller.setSmartFilterMask(id, "reveal-all");
11919
12468
  break;
11920
12469
  case "toggle-clip":
11921
- if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _389 => _389.clipped]) });
12470
+ if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _406 => _406.clipped]) });
11922
12471
  break;
11923
12472
  }
11924
12473
  return null;
@@ -11928,7 +12477,7 @@ async function runLayerMenuAction(controller, action) {
11928
12477
  }
11929
12478
  function smartFilterRows(layer) {
11930
12479
  if (layer.type !== "smart") return [];
11931
- const list = _nullishCoalesce(_optionalChain([layer, 'access', _390 => _390.smartFilters, 'optionalAccess', _391 => _391.filters]), () => ( []));
12480
+ const list = _nullishCoalesce(_optionalChain([layer, 'access', _407 => _407.smartFilters, 'optionalAccess', _408 => _408.filters]), () => ( []));
11932
12481
  const rows = list.map((f, index) => ({
11933
12482
  filter: f,
11934
12483
  index,
@@ -11954,8 +12503,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
11954
12503
  };
11955
12504
  collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
11956
12505
  const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
11957
- const imgW = _optionalChain([state, 'access', _392 => _392.imageDimensions, 'optionalAccess', _393 => _393.width]) || 1;
11958
- const imgH = _optionalChain([state, 'access', _394 => _394.imageDimensions, 'optionalAccess', _395 => _395.height]) || 1;
12506
+ const imgW = _optionalChain([state, 'access', _409 => _409.imageDimensions, 'optionalAccess', _410 => _410.width]) || 1;
12507
+ const imgH = _optionalChain([state, 'access', _411 => _411.imageDimensions, 'optionalAccess', _412 => _412.height]) || 1;
11959
12508
  return ctrlLayers.map((l) => {
11960
12509
  const bounds = controller.getLayerBounds(l.id) || {
11961
12510
  x: 0,
@@ -11964,8 +12513,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
11964
12513
  height: imgH
11965
12514
  };
11966
12515
  const sLayer = sLayerMap.get(l.id);
11967
- const assetKey = _optionalChain([sLayer, 'optionalAccess', _396 => _396.asset]);
11968
- const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _397 => _397.source]) === "document" ? fallbackImageUrl : "");
12516
+ const assetKey = _optionalChain([sLayer, 'optionalAccess', _413 => _413.asset]);
12517
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _414 => _414.source]) === "document" ? fallbackImageUrl : "");
11969
12518
  return {
11970
12519
  id: l.id,
11971
12520
  name: l.name || "Untitled Layer",
@@ -11987,18 +12536,18 @@ function layerEffectsPanel(layer) {
11987
12536
  if (!layer) return { ...empty, available: false, reason: "Select a layer to add effects." };
11988
12537
  if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have effects." };
11989
12538
  const fx = layer.effects;
11990
- const readOnly = Boolean(_optionalChain([layer, 'access', _398 => _398.locks, 'optionalAccess', _399 => _399.all]));
12539
+ const readOnly = Boolean(_optionalChain([layer, 'access', _415 => _415.locks, 'optionalAccess', _416 => _416.all]));
11991
12540
  return {
11992
12541
  available: true,
11993
12542
  readOnly,
11994
12543
  reason: readOnly ? "The layer is locked; unlock it to change its effects." : void 0,
11995
- enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _400 => _400.enabled]), () => ( true)),
11996
- scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _401 => _401.scale]), () => ( 1)),
11997
- rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _402 => _402.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkPOGBUYWEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
12544
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _417 => _417.enabled]), () => ( true)),
12545
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _418 => _418.scale]), () => ( 1)),
12546
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _419 => _419.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkPOGBUYWEcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
11998
12547
  };
11999
12548
  }
12000
12549
  function layerEffectsBadge(layer) {
12001
- if (!_optionalChain([layer, 'access', _403 => _403.effects, 'optionalAccess', _404 => _404.items, 'access', _405 => _405.length])) return null;
12550
+ if (!_optionalChain([layer, 'access', _420 => _420.effects, 'optionalAccess', _421 => _421.items, 'access', _422 => _422.length])) return null;
12002
12551
  return _chunkPOGBUYWEcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
12003
12552
  }
12004
12553
  var LAYER_EFFECT_MENU = _chunkPOGBUYWEcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkPOGBUYWEcjs.layerEffectLabel.call(void 0, kind) }));
@@ -12043,8 +12592,8 @@ function fillControls(f, allowPattern, patterns) {
12043
12592
  }
12044
12593
  function gradientControls(prefix, g) {
12045
12594
  return [
12046
- { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _406 => _406.stops, 'access', _407 => _407[0], 'optionalAccess', _408 => _408.color]), () => ( "#000000")) },
12047
- { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _409 => _409.stops, 'access', _410 => _410[g.stops.length - 1], 'optionalAccess', _411 => _411.color]), () => ( "#ffffff")) },
12595
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _423 => _423.stops, 'access', _424 => _424[0], 'optionalAccess', _425 => _425.color]), () => ( "#000000")) },
12596
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _426 => _426.stops, 'access', _427 => _427[g.stops.length - 1], 'optionalAccess', _428 => _428.color]), () => ( "#ffffff")) },
12048
12597
  { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
12049
12598
  { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
12050
12599
  { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
@@ -12136,19 +12685,19 @@ function layerEffectControls(e, patterns = []) {
12136
12685
  }
12137
12686
  function fillOfType(current, type, patterns) {
12138
12687
  if (type === "gradient") return { type: "gradient", gradient: _chunkPOGBUYWEcjs.defaultEffectGradient.call(void 0, ) };
12139
- if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _412 => _412[0], 'optionalAccess', _413 => _413.id]), () => ( "checker")), scale: 1 };
12688
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _429 => _429[0], 'optionalAccess', _430 => _430.id]), () => ( "checker")), scale: 1 };
12140
12689
  return { type: "color", color: current.type === "color" ? current.color : "#000000" };
12141
12690
  }
12142
12691
  function effectControlChange(effect, key, value, patterns = []) {
12143
12692
  const [top, ...rest] = key.split(".");
12144
12693
  if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
12145
12694
  if (top === "patternId" && !rest.length) {
12146
- const name = _optionalChain([patternOptions, 'call', _414 => _414(patterns), 'access', _415 => _415.find, 'call', _416 => _416((o) => o.value === value), 'optionalAccess', _417 => _417.label]);
12695
+ const name = _optionalChain([patternOptions, 'call', _431 => _431(patterns), 'access', _432 => _432.find, 'call', _433 => _433((o) => o.value === value), 'optionalAccess', _434 => _434.label]);
12147
12696
  return name ? { patternId: value, name } : { patternId: value };
12148
12697
  }
12149
12698
  if (!rest.length) return { [top]: value };
12150
12699
  if (top === "fill" && rest[0] === "patternId") {
12151
- const name = _optionalChain([patternOptions, 'call', _418 => _418(patterns), 'access', _419 => _419.find, 'call', _420 => _420((o) => o.value === value), 'optionalAccess', _421 => _421.label]);
12700
+ const name = _optionalChain([patternOptions, 'call', _435 => _435(patterns), 'access', _436 => _436.find, 'call', _437 => _437((o) => o.value === value), 'optionalAccess', _438 => _438.label]);
12152
12701
  return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
12153
12702
  }
12154
12703
  return { [top]: setPath(getPath(effect, top), rest, value) };
@@ -12276,32 +12825,32 @@ function insidePolygon(poly, p) {
12276
12825
  return inside;
12277
12826
  }
12278
12827
  var FreeTransformTool = (_class12 = class {
12279
- constructor(controller, options = {}) {;_class12.prototype.__init79.call(this);_class12.prototype.__init80.call(this);_class12.prototype.__init81.call(this);_class12.prototype.__init82.call(this);_class12.prototype.__init83.call(this);_class12.prototype.__init84.call(this);_class12.prototype.__init85.call(this);_class12.prototype.__init86.call(this);_class12.prototype.__init87.call(this);_class12.prototype.__init88.call(this);_class12.prototype.__init89.call(this);_class12.prototype.__init90.call(this);_class12.prototype.__init91.call(this);_class12.prototype.__init92.call(this);
12828
+ constructor(controller, options = {}) {;_class12.prototype.__init82.call(this);_class12.prototype.__init83.call(this);_class12.prototype.__init84.call(this);_class12.prototype.__init85.call(this);_class12.prototype.__init86.call(this);_class12.prototype.__init87.call(this);_class12.prototype.__init88.call(this);_class12.prototype.__init89.call(this);_class12.prototype.__init90.call(this);_class12.prototype.__init91.call(this);_class12.prototype.__init92.call(this);_class12.prototype.__init93.call(this);_class12.prototype.__init94.call(this);_class12.prototype.__init95.call(this);
12280
12829
  this.controller = controller;
12281
12830
  this.options = options;
12282
12831
  }
12283
12832
 
12284
12833
 
12285
- __init79() {this.sessionRef = null}
12286
- __init80() {this.modeValue = "scale"}
12834
+ __init82() {this.sessionRef = null}
12835
+ __init83() {this.modeValue = "scale"}
12287
12836
  /** The reference point in the untransformed frame's space (follows the transform). */
12288
- __init81() {this.refBox = { x: 0, y: 0 }}
12289
- __init82() {this.corners = null}
12290
- __init83() {this.drag = null}
12837
+ __init84() {this.refBox = { x: 0, y: 0 }}
12838
+ __init85() {this.corners = null}
12839
+ __init86() {this.drag = null}
12291
12840
  /** The warp mesh in the frame's own space (null: no warp). */
12292
- __init84() {this.mesh = null}
12293
- __init85() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
12294
- __init86() {this.pending = false}
12295
- __init87() {this.viewScale = 1}
12841
+ __init87() {this.mesh = null}
12842
+ __init88() {this.warpSettings = { style: "custom", bend: 50, horizontal: 0, vertical: 0, orientation: "horizontal", columns: 1, rows: 1 }}
12843
+ __init89() {this.pending = false}
12844
+ __init90() {this.viewScale = 1}
12296
12845
 
12297
12846
  /** Values typed into the options bar since the last drag (V skew is not recovered from the shape). */
12298
- __init88() {this.typed = {}}
12847
+ __init91() {this.typed = {}}
12299
12848
  /** Width and height scale together when typed (the chain icon). */
12300
- __init89() {this.proportional = true}
12301
- __init90() {this.error = null}
12302
- __init91() {this.lastResult = null}
12849
+ __init92() {this.proportional = true}
12850
+ __init93() {this.error = null}
12851
+ __init94() {this.lastResult = null}
12303
12852
  get active() {
12304
- return Boolean(_optionalChain([this, 'access', _422 => _422.sessionRef, 'optionalAccess', _423 => _423.isOpen]));
12853
+ return Boolean(_optionalChain([this, 'access', _439 => _439.sessionRef, 'optionalAccess', _440 => _440.isOpen]));
12305
12854
  }
12306
12855
  get session() {
12307
12856
  return this.active ? this.sessionRef : null;
@@ -12310,9 +12859,9 @@ var FreeTransformTool = (_class12 = class {
12310
12859
  return this.modeValue;
12311
12860
  }
12312
12861
  get interpolation() {
12313
- return _nullishCoalesce(_optionalChain([this, 'access', _424 => _424.sessionRef, 'optionalAccess', _425 => _425.interpolation]), () => ( "bicubic"));
12862
+ return _nullishCoalesce(_optionalChain([this, 'access', _441 => _441.sessionRef, 'optionalAccess', _442 => _442.interpolation]), () => ( "bicubic"));
12314
12863
  }
12315
- __init92() {this.listeners = /* @__PURE__ */ new Set()}
12864
+ __init95() {this.listeners = /* @__PURE__ */ new Set()}
12316
12865
  /** Calls `listener` whenever the overlay, readout, mode or error changes. Returns the unsubscribe. */
12317
12866
  subscribe(listener) {
12318
12867
  this.listeners.add(listener);
@@ -12321,7 +12870,7 @@ var FreeTransformTool = (_class12 = class {
12321
12870
  };
12322
12871
  }
12323
12872
  changed() {
12324
- _optionalChain([this, 'access', _426 => _426.options, 'access', _427 => _427.onChange, 'optionalCall', _428 => _428()]);
12873
+ _optionalChain([this, 'access', _443 => _443.options, 'access', _444 => _444.onChange, 'optionalCall', _445 => _445()]);
12325
12874
  for (const l of this.listeners) l();
12326
12875
  }
12327
12876
  /** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
@@ -12715,7 +13264,7 @@ var FreeTransformTool = (_class12 = class {
12715
13264
  }
12716
13265
  /** Abandons the transform and restores everything. */
12717
13266
  cancel() {
12718
- _optionalChain([this, 'access', _429 => _429.sessionRef, 'optionalAccess', _430 => _430.cancel, 'call', _431 => _431()]);
13267
+ _optionalChain([this, 'access', _446 => _446.sessionRef, 'optionalAccess', _447 => _447.cancel, 'call', _448 => _448()]);
12719
13268
  this.sessionRef = null;
12720
13269
  this.corners = null;
12721
13270
  this.mesh = null;
@@ -13439,5 +13988,43 @@ var FreeTransformTool = (_class12 = class {
13439
13988
 
13440
13989
 
13441
13990
 
13442
- exports.ADJUSTMENT_KEYS = _chunkYGIMK4NXcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkYGIMK4NXcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkYGIMK4NXcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkYGIMK4NXcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkYGIMK4NXcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkYGIMK4NXcjs.BACKGROUND_LAYER_NAME; exports.BLEND_MODES = _chunkXIOMMGPDcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkYGIMK4NXcjs.BLUR_FILTER_ID; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.CoverageMap = _chunk7VOHOPLWcjs.CoverageMap; exports.D50 = _chunkYGIMK4NXcjs.D50; exports.D65 = _chunkYGIMK4NXcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkYGIMK4NXcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunk7VOHOPLWcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunk7VOHOPLWcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_GLOBAL_LIGHT = _chunkPOGBUYWEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkYGIMK4NXcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunk7VOHOPLWcjs.DEFAULT_MIXER; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunk7VOHOPLWcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkYGIMK4NXcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkYGIMK4NXcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkPOGBUYWEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DabWalker = _chunk7VOHOPLWcjs.DabWalker; exports.EMPTY_DISTANCE = _chunkYGIMK4NXcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunk7VOHOPLWcjs.EMPTY_MIXER_LOAD; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkYGIMK4NXcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkYGIMK4NXcjs.HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = _chunkYGIMK4NXcjs.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_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.INTERPOLATIONS = _chunkPOGBUYWEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.LATEST_PROCESS_VERSION = _chunkYGIMK4NXcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkYGIMK4NXcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkPOGBUYWEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkYGIMK4NXcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkYGIMK4NXcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkYGIMK4NXcjs.LUMA_709; exports.LayerCompositor = _chunkYGIMK4NXcjs.LayerCompositor; exports.LayerEffectError = _chunkPOGBUYWEcjs.LayerEffectError; exports.LayerOperationError = _chunkYGIMK4NXcjs.LayerOperationError; exports.MAX_BRUSH_SIZE = _chunk7VOHOPLWcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkPOGBUYWEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkYGIMK4NXcjs.MAX_KELVIN; exports.MAX_TRANSFORM_PIXELS = _chunkPOGBUYWEcjs.MAX_TRANSFORM_PIXELS; exports.MIN_KELVIN = _chunkYGIMK4NXcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkYGIMK4NXcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunk7VOHOPLWcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunk7VOHOPLWcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunk7VOHOPLWcjs.MIXING_MODELS; exports.MixerStroke = _chunk7VOHOPLWcjs.MixerStroke; exports.PAINTERLY_BLEND_MODES = _chunkXIOMMGPDcjs.PAINTERLY_BLEND_MODES; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PARAGRAPH_STYLE_FIELDS = _chunkYGIMK4NXcjs.PARAGRAPH_STYLE_FIELDS; exports.PATTERN_BLOCK_KEYS = _chunkYGIMK4NXcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkXIOMMGPDcjs.PIGMENT_BANDS; exports.PIGMENT_LAMBDA_MIN = _chunkXIOMMGPDcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkXIOMMGPDcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_WAVELENGTHS = _chunkXIOMMGPDcjs.PIGMENT_WAVELENGTHS; exports.PSD_BLEND_KEYS = _chunkYGIMK4NXcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.PaintExchange = _chunk7VOHOPLWcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunkPOGBUYWEcjs.PatternPlacement; exports.PatternTile = _chunkPOGBUYWEcjs.PatternTile; exports.PsdError = _chunkYGIMK4NXcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.SELECTION_MODES = _chunkYGIMK4NXcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkYGIMK4NXcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SHADOW_AMBIENT = _chunkXIOMMGPDcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkYGIMK4NXcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkYGIMK4NXcjs.SHAPE_RENDER_MARGIN; exports.SMART_RENDER_MARGIN = _chunkYGIMK4NXcjs.SMART_RENDER_MARGIN; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkYGIMK4NXcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk7VOHOPLWcjs.SmudgeTip; exports.StrokeCoverage = _chunk7VOHOPLWcjs.StrokeCoverage; exports.SurfaceDraft = _chunkXIOMMGPDcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkYGIMK4NXcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkYGIMK4NXcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkYGIMK4NXcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkXIOMMGPDcjs.TILE; exports.TILE_SHIFT = _chunkXIOMMGPDcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkYGIMK4NXcjs.TINT_SCALE; exports.TONE_LUT_SIZE = _chunkYGIMK4NXcjs.TONE_LUT_SIZE; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkYGIMK4NXcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk7VOHOPLWcjs.TileMedium; exports.TiledSurface = _chunkXIOMMGPDcjs.TiledSurface; exports.TransformTooLargeError = _chunkPOGBUYWEcjs.TransformTooLargeError; exports.TypeToolGesture = TypeToolGesture; exports.VIBRANCE_GREY = _chunkYGIMK4NXcjs.VIBRANCE_GREY; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkW3GXSUSQcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkW3GXSUSQcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.XYZ_D50_TO_SRGB = _chunkYGIMK4NXcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkPOGBUYWEcjs.ZlibError; exports.activeAdjustmentLayers = _chunkYGIMK4NXcjs.activeAdjustmentLayers; exports.activeSmartFilters = _chunkYGIMK4NXcjs.activeSmartFilters; exports.addLayerEffect = _chunkYGIMK4NXcjs.addLayerEffect; exports.addLayerFilter = _chunkYGIMK4NXcjs.addLayerFilter; exports.addSmartFilter = _chunkYGIMK4NXcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkYGIMK4NXcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkYGIMK4NXcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkYGIMK4NXcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkYGIMK4NXcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkPOGBUYWEcjs.adler32; exports.anchorPoint = _chunkYGIMK4NXcjs.anchorPoint; exports.annotationBlend = _chunkYGIMK4NXcjs.annotationBlend; exports.annotationLayerFor = _chunkYGIMK4NXcjs.annotationLayerFor; exports.annotationLayerName = _chunkYGIMK4NXcjs.annotationLayerName; exports.annotationOfLayer = _chunkYGIMK4NXcjs.annotationOfLayer; exports.annotationOfShape = _chunkYGIMK4NXcjs.annotationOfShape; exports.annotationOfType = _chunkYGIMK4NXcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkYGIMK4NXcjs.applyAdjustmentLayers; exports.applyAdjustments = _chunkYGIMK4NXcjs.applyAdjustments; exports.applyBoxBlur = _chunkYGIMK4NXcjs.applyBoxBlur; exports.applyDepthMask = _chunkYGIMK4NXcjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunkYGIMK4NXcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkYGIMK4NXcjs.applyLegacyAdjustments; exports.applyMatrix3 = _chunkYGIMK4NXcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkYGIMK4NXcjs.applyParams; exports.applyProcess2Adjustments = _chunkYGIMK4NXcjs.applyProcess2Adjustments; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkYGIMK4NXcjs.applySmartFilters; exports.applyStrokeToTile = _chunk7VOHOPLWcjs.applyStrokeToTile; exports.backgroundLayer = _chunkYGIMK4NXcjs.backgroundLayer; exports.base64ToBytes = _chunkPOGBUYWEcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.blackWhiteGray = _chunkYGIMK4NXcjs.blackWhiteGray; exports.blendChannel = _chunkXIOMMGPDcjs.blendChannel; exports.blendImageData = _chunkXIOMMGPDcjs.blendImageData; exports.blendLum = _chunkXIOMMGPDcjs.blendLum; exports.blendPixel = _chunkXIOMMGPDcjs.blendPixel; exports.blendRadius = _chunk7VOHOPLWcjs.blendRadius; exports.blendRgb = _chunkXIOMMGPDcjs.blendRgb; exports.blendTile = _chunkPOGBUYWEcjs.blendTile; exports.blenderDab = _chunk7VOHOPLWcjs.blenderDab; exports.blurFilter = _chunkYGIMK4NXcjs.blurFilter; exports.borderCoverage = _chunkYGIMK4NXcjs.borderCoverage; exports.boxMean = boxMean; exports.boxPointOf = _chunkYGIMK4NXcjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkYGIMK4NXcjs.bradfordAdaptation; exports.buildLayerMaskPlanes = _chunkYGIMK4NXcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkYGIMK4NXcjs.buildToneLut; exports.builtinPattern = _chunkPOGBUYWEcjs.builtinPattern; exports.builtinPatternIds = _chunkPOGBUYWEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkPOGBUYWEcjs.bytesToBase64; exports.calculateCropDrag = _chunkYGIMK4NXcjs.calculateCropDrag; exports.canvasCompositeOperation = _chunkXIOMMGPDcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkYGIMK4NXcjs.canvasToImagePoint; exports.caretAt = _chunkYGIMK4NXcjs.caretAt; exports.changedTiles = _chunkPOGBUYWEcjs.changedTiles; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkYGIMK4NXcjs.clampCropToImage; exports.cleanMixer = _chunk7VOHOPLWcjs.cleanMixer; exports.collectTiles = _chunkXIOMMGPDcjs.collectTiles; exports.colorBalanceChannel = _chunkYGIMK4NXcjs.colorBalanceChannel; exports.colorRange = colorRange; exports.combineSelections = _chunkYGIMK4NXcjs.combineSelections; exports.compileAdjustmentLayer = _chunkYGIMK4NXcjs.compileAdjustmentLayer; exports.componentPath = _chunkYGIMK4NXcjs.componentPath; exports.compositeSurfaceOver = _chunkPOGBUYWEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkYGIMK4NXcjs.computeSelectionBounds; exports.contentBounds = _chunkXIOMMGPDcjs.contentBounds; exports.contentsBox = _chunkYGIMK4NXcjs.contentsBox; exports.contentsSurface = _chunkYGIMK4NXcjs.contentsSurface; exports.contractCoverage = _chunkYGIMK4NXcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertToSmartObject = _chunkYGIMK4NXcjs.convertToSmartObject; exports.copySmartObject = _chunkYGIMK4NXcjs.copySmartObject; exports.cornersFromMatrix = _chunkYGIMK4NXcjs.cornersFromMatrix; exports.coverageTileCoord = _chunk7VOHOPLWcjs.coverageTileCoord; exports.coverageToByte = _chunkYGIMK4NXcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkYGIMK4NXcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk7VOHOPLWcjs.createBlenderScratch; exports.createCanvasTextShaper = createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createOutlineTextShaper = createOutlineTextShaper; exports.createPigment = _chunkXIOMMGPDcjs.createPigment; exports.createPigmentTools = _chunk7VOHOPLWcjs.createPigmentTools; exports.createSelectionMask = _chunkYGIMK4NXcjs.createSelectionMask; exports.createShapeLayer = _chunkYGIMK4NXcjs.createShapeLayer; exports.createTypeLayer = _chunkYGIMK4NXcjs.createTypeLayer; exports.cssFont = cssFont; exports.cssFontFamily = cssFontFamily; exports.curveLut = _chunkPOGBUYWEcjs.curveLut; exports.curveLutFromLevels = _chunkYGIMK4NXcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk7VOHOPLWcjs.dabCoverage; exports.dabRect = _chunk7VOHOPLWcjs.dabRect; exports.decodeLayerChannel = _chunkYGIMK4NXcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkYGIMK4NXcjs.decodeLayerMask; exports.decodeMergedImage = _chunkYGIMK4NXcjs.decodeMergedImage; exports.decodePlanes = _chunkYGIMK4NXcjs.decodePlanes; exports.decodePng = _chunkPOGBUYWEcjs.decodePng; exports.decodePngDataUrl = _chunkYGIMK4NXcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkYGIMK4NXcjs.decodeSelectionRle; exports.defaultAdjustmentParams = _chunkYGIMK4NXcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkPOGBUYWEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkPOGBUYWEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkYGIMK4NXcjs.defaultShapeName; exports.deflate = _chunkPOGBUYWEcjs.deflate; exports.deflateRaw = _chunkPOGBUYWEcjs.deflateRaw; exports.depthMaskAlpha = _chunkYGIMK4NXcjs.depthMaskAlpha; exports.depthRasterMask = _chunkYGIMK4NXcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkYGIMK4NXcjs.describeTransform; exports.deserializeEffects = _chunkYGIMK4NXcjs.deserializeEffects; exports.deserializeLayer = _chunkYGIMK4NXcjs.deserializeLayer; exports.deserializeLayers = _chunkYGIMK4NXcjs.deserializeLayers; exports.deserializePatterns = _chunkYGIMK4NXcjs.deserializePatterns; exports.deserializeSelection = _chunkYGIMK4NXcjs.deserializeSelection; exports.developFilter = _chunkYGIMK4NXcjs.developFilter; exports.developFromAdjustments = _chunkYGIMK4NXcjs.developFromAdjustments; exports.developTarget = _chunkYGIMK4NXcjs.developTarget; exports.distanceTransform = _chunkYGIMK4NXcjs.distanceTransform; exports.documentContents = _chunkYGIMK4NXcjs.documentContents; exports.downloadPsd = downloadPsd; exports.dragWarpMeshPoint = _chunkW3GXSUSQcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.duplicateLayer = _chunkYGIMK4NXcjs.duplicateLayer; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkPOGBUYWEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectReach = _chunkPOGBUYWEcjs.effectReach; exports.effectsFingerprint = _chunkPOGBUYWEcjs.effectsFingerprint; exports.effectsMargin = _chunkPOGBUYWEcjs.effectsMargin; exports.effectsScale = _chunkPOGBUYWEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkXIOMMGPDcjs.emptySurface; exports.encodePng = _chunkPOGBUYWEcjs.encodePng; exports.encodeRle = _chunkYGIMK4NXcjs.encodeRle; exports.encodeSelectionRle = _chunkYGIMK4NXcjs.encodeSelectionRle; exports.encodeSurface = _chunkYGIMK4NXcjs.encodeSurface; exports.evalWarpMesh = _chunkW3GXSUSQcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkYGIMK4NXcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk7VOHOPLWcjs.exchangeRates; exports.expandCoverage = _chunkYGIMK4NXcjs.expandCoverage; exports.exportPsd = _chunkYGIMK4NXcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkYGIMK4NXcjs.featherCoverage; exports.fillRect = _chunkXIOMMGPDcjs.fillRect; exports.filterMaskCoverage = _chunkYGIMK4NXcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkPOGBUYWEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.finishTile = _chunkXIOMMGPDcjs.finishTile; exports.fitParagraphRuns = _chunkYGIMK4NXcjs.fitParagraphRuns; exports.fitRuns = _chunkYGIMK4NXcjs.fitRuns; exports.flattenLayers = _chunkPOGBUYWEcjs.flattenLayers; exports.flattenPath = _chunkYGIMK4NXcjs.flattenPath; exports.flipCorners = _chunkYGIMK4NXcjs.flipCorners; exports.fontOf = _chunkYGIMK4NXcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkYGIMK4NXcjs.fullSelection; exports.gaussianBlur = _chunkPOGBUYWEcjs.gaussianBlur; exports.geometryHomography = _chunkYGIMK4NXcjs.geometryHomography; exports.getAnnotationBounds = _chunkYGIMK4NXcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkYGIMK4NXcjs.getCropCursor; exports.getRotatedSize = _chunkYGIMK4NXcjs.getRotatedSize; exports.getViewportMetrics = _chunkYGIMK4NXcjs.getViewportMetrics; exports.getViewportProjection = _chunkYGIMK4NXcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.greyMorphology = _chunkYGIMK4NXcjs.greyMorphology; exports.groupLayers = _chunkYGIMK4NXcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkPOGBUYWEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkYGIMK4NXcjs.hasResampledLegacyMask; exports.hasSurface = _chunkYGIMK4NXcjs.hasSurface; exports.hasWarp = _chunkYGIMK4NXcjs.hasWarp; exports.hashMaskContent = _chunkYGIMK4NXcjs.hashMaskContent; exports.hashNoise = _chunkPOGBUYWEcjs.hashNoise; exports.hexToRgb = _chunkYGIMK4NXcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkYGIMK4NXcjs.hitTestAnnotation; exports.hitTestCrop = _chunkYGIMK4NXcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunkYGIMK4NXcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkYGIMK4NXcjs.hueRangeTables; exports.hueRangeWeight = _chunkYGIMK4NXcjs.hueRangeWeight; exports.hueSaturation = _chunkYGIMK4NXcjs.hueSaturation; exports.identityCurve = _chunkYGIMK4NXcjs.identityCurve; exports.identityLevels = _chunkYGIMK4NXcjs.identityLevels; exports.identityTransform = _chunkYGIMK4NXcjs.identityTransform; exports.identityWarpMesh = _chunkW3GXSUSQcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageToCanvasPoint = _chunkYGIMK4NXcjs.imageToCanvasPoint; exports.importPsd = _chunkYGIMK4NXcjs.importPsd; exports.inflate = _chunkPOGBUYWEcjs.inflate; exports.inflateRaw = _chunkPOGBUYWEcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkPOGBUYWEcjs.insertLayer; exports.instancesOf = _chunkYGIMK4NXcjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunkYGIMK4NXcjs.invertMatrix3; exports.invertSelection = _chunkYGIMK4NXcjs.invertSelection; exports.isActiveFilter = _chunkYGIMK4NXcjs.isActiveFilter; exports.isAdjustmentKind = _chunkYGIMK4NXcjs.isAdjustmentKind; exports.isBlendMode = _chunkXIOMMGPDcjs.isBlendMode; exports.isContentsDecoded = _chunkYGIMK4NXcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkYGIMK4NXcjs.isDefaultDepthMask; exports.isIdentityTransform = _chunkYGIMK4NXcjs.isIdentityTransform; exports.isInterpolation = _chunkPOGBUYWEcjs.isInterpolation; exports.isLayerEffectKind = _chunkPOGBUYWEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkPOGBUYWEcjs.isLayerLocked; exports.isLegacyShape = _chunkYGIMK4NXcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkXIOMMGPDcjs.isPainterlyBlendMode; exports.isPng = _chunkPOGBUYWEcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkYGIMK4NXcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkYGIMK4NXcjs.isRenderedLayer; exports.isSelectionEmpty = _chunkYGIMK4NXcjs.isSelectionEmpty; exports.isSelectionMode = _chunkYGIMK4NXcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkXIOMMGPDcjs.isSeparableBlendMode; exports.isSpatialFilter = _chunkYGIMK4NXcjs.isSpatialFilter; exports.isTransformAnchor = _chunkYGIMK4NXcjs.isTransformAnchor; exports.isValidWarp = _chunkYGIMK4NXcjs.isValidWarp; exports.kelvinToTemperature = _chunkYGIMK4NXcjs.kelvinToTemperature; exports.keysWeight = _chunkPOGBUYWEcjs.keysWeight; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkPOGBUYWEcjs.layerEffectFields; exports.layerEffectLabel = _chunkPOGBUYWEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkYGIMK4NXcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkYGIMK4NXcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkYGIMK4NXcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkYGIMK4NXcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkYGIMK4NXcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkYGIMK4NXcjs.layerTree; exports.layerTypeLabel = _chunkYGIMK4NXcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkYGIMK4NXcjs.layersFromLegacy; exports.layoutText = _chunkYGIMK4NXcjs.layoutText; exports.legacyAdjustmentLayer = _chunkYGIMK4NXcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkYGIMK4NXcjs.legacyMaskOf; exports.legacyView = _chunkYGIMK4NXcjs.legacyView; exports.lerpPigment = _chunkXIOMMGPDcjs.lerpPigment; exports.lerpPigmentInto = _chunkXIOMMGPDcjs.lerpPigmentInto; exports.levelsValue = _chunkYGIMK4NXcjs.levelsValue; exports.linearSrgbToXy = _chunkYGIMK4NXcjs.linearSrgbToXy; exports.linearToSrgb = _chunkYGIMK4NXcjs.linearToSrgb; exports.liveComponent = _chunkYGIMK4NXcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkYGIMK4NXcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk7VOHOPLWcjs.loadMixer; exports.magicWand = magicWand; exports.mapCropHandle = _chunkYGIMK4NXcjs.mapCropHandle; exports.mapLayer = _chunkPOGBUYWEcjs.mapLayer; exports.mapSubpaths = _chunkYGIMK4NXcjs.mapSubpaths; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkYGIMK4NXcjs.matrixFromCorners; exports.matrixFromParams = _chunkYGIMK4NXcjs.matrixFromParams; exports.mergeLayerEffect = _chunkPOGBUYWEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkYGIMK4NXcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mixPigment8 = _chunkXIOMMGPDcjs.mixPigment8; exports.mixPigmentRgb = _chunkXIOMMGPDcjs.mixPigmentRgb; exports.mixPigments = _chunkXIOMMGPDcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunk7VOHOPLWcjs.mixerRates; exports.modifySelection = _chunkYGIMK4NXcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkYGIMK4NXcjs.moveLayer; exports.moveSmartFilter = _chunkYGIMK4NXcjs.moveSmartFilter; exports.mulMatrix3 = _chunkYGIMK4NXcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkYGIMK4NXcjs.neutralHueRange; exports.newContentsId = _chunkYGIMK4NXcjs.newContentsId; exports.newEffectId = _chunkPOGBUYWEcjs.newEffectId; exports.newLayerId = _chunkYGIMK4NXcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkYGIMK4NXcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkYGIMK4NXcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkYGIMK4NXcjs.normalizeAngle; exports.normalizeBlendMode = _chunkXIOMMGPDcjs.normalizeBlendMode; exports.normalizeBlender = _chunk7VOHOPLWcjs.normalizeBlender; exports.normalizeBrush = _chunk7VOHOPLWcjs.normalizeBrush; exports.normalizeFilter = _chunkYGIMK4NXcjs.normalizeFilter; exports.normalizeLayerEffects = _chunkPOGBUYWEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkYGIMK4NXcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkYGIMK4NXcjs.normalizeLiveShape; exports.normalizeMixer = _chunk7VOHOPLWcjs.normalizeMixer; exports.normalizePlacement = _chunkYGIMK4NXcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkYGIMK4NXcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeShapePaint = _chunkYGIMK4NXcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkYGIMK4NXcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkYGIMK4NXcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk7VOHOPLWcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkYGIMK4NXcjs.normalizeSubpaths; exports.normalizeText = _chunkYGIMK4NXcjs.normalizeText; exports.offsetLayer = _chunkYGIMK4NXcjs.offsetLayer; exports.offsetShape = _chunkYGIMK4NXcjs.offsetShape; exports.offsetSmartObject = _chunkYGIMK4NXcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkXIOMMGPDcjs.packRgba; exports.paragraphRanges = _chunkYGIMK4NXcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkYGIMK4NXcjs.parseAdjustmentBlock; exports.parseBlend = _chunkYGIMK4NXcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkYGIMK4NXcjs.parseCssColor; exports.parseDataUrl = _chunkPOGBUYWEcjs.parseDataUrl; exports.parseEffectColor = _chunkPOGBUYWEcjs.parseEffectColor; exports.parseLfx2 = _chunkYGIMK4NXcjs.parseLfx2; exports.parseLrfx = _chunkYGIMK4NXcjs.parseLrfx; exports.parsePatternBlock = _chunkYGIMK4NXcjs.parsePatternBlock; exports.parseSelectionMode = _chunkYGIMK4NXcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkYGIMK4NXcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkYGIMK4NXcjs.patchParagraphStyle; exports.patchTextStyle = _chunkYGIMK4NXcjs.patchTextStyle; exports.photoFilterMatrix = _chunkYGIMK4NXcjs.photoFilterMatrix; exports.pigment8 = _chunkXIOMMGPDcjs.pigment8; exports.pixelLayerBounds = _chunkYGIMK4NXcjs.pixelLayerBounds; exports.pixelLayers = _chunkYGIMK4NXcjs.pixelLayers; exports.placeContents = _chunkYGIMK4NXcjs.placeContents; exports.placeLayer = _chunkYGIMK4NXcjs.placeLayer; exports.placementAt = _chunkYGIMK4NXcjs.placementAt; exports.placementBounds = _chunkYGIMK4NXcjs.placementBounds; exports.placementGeometry = _chunkYGIMK4NXcjs.placementGeometry; exports.pngDataUrl = _chunkPOGBUYWEcjs.pngDataUrl; exports.pointerPressure = pointerPressure; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkYGIMK4NXcjs.posterizeValue; exports.presetWarp = _chunkYGIMK4NXcjs.presetWarp; exports.previewStep = previewStep; exports.projectImagePoint = _chunkYGIMK4NXcjs.projectImagePoint; exports.projectImageRect = _chunkYGIMK4NXcjs.projectImageRect; exports.projectMaskCoverage = _chunkYGIMK4NXcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkYGIMK4NXcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkYGIMK4NXcjs.psdToLayers; exports.pullWarpMesh = _chunkW3GXSUSQcjs.pullWarpMesh; exports.quickMaskPixels = quickMaskPixels; exports.rangeLightness = _chunkYGIMK4NXcjs.rangeLightness; exports.rasterContents = _chunkYGIMK4NXcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkYGIMK4NXcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkYGIMK4NXcjs.rasterizeCoverage; exports.rasterizeDab = _chunk7VOHOPLWcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkYGIMK4NXcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readPixel = _chunkXIOMMGPDcjs.readPixel; exports.readPsd = _chunkYGIMK4NXcjs.readPsd; exports.readRegion = _chunkXIOMMGPDcjs.readRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunkPOGBUYWEcjs.reduceSurface; exports.referencePoint = _chunkYGIMK4NXcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkXIOMMGPDcjs.reflectanceToRgb; exports.removeAlpha = _chunkYGIMK4NXcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkYGIMK4NXcjs.removeLayer; exports.removeLayerEffect = _chunkYGIMK4NXcjs.removeLayerEffect; exports.removeLayerFilter = _chunkYGIMK4NXcjs.removeLayerFilter; exports.removeSmartFilter = _chunkYGIMK4NXcjs.removeSmartFilter; exports.renderLayerEffects = _chunkPOGBUYWEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkYGIMK4NXcjs.renderShape; exports.renderShapeRect = _chunkYGIMK4NXcjs.renderShapeRect; exports.renderSmartObject = _chunkYGIMK4NXcjs.renderSmartObject; exports.renderText = _chunkYGIMK4NXcjs.renderText; exports.replaceContents = _chunkYGIMK4NXcjs.replaceContents; exports.replaceTextRange = _chunkYGIMK4NXcjs.replaceTextRange; exports.requireLayer = _chunkYGIMK4NXcjs.requireLayer; exports.requireOperation = _chunkYGIMK4NXcjs.requireOperation; exports.requireShapeLayer = _chunkYGIMK4NXcjs.requireShapeLayer; exports.requireSmartObject = _chunkYGIMK4NXcjs.requireSmartObject; exports.requireTypeLayer = _chunkYGIMK4NXcjs.requireTypeLayer; exports.requireUnlocked = _chunkYGIMK4NXcjs.requireUnlocked; exports.rerender = _chunkYGIMK4NXcjs.rerender; exports.rerenderShape = _chunkYGIMK4NXcjs.rerenderShape; exports.rerenderText = _chunkYGIMK4NXcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkYGIMK4NXcjs.resizeSelection; exports.resizeWarpMesh = _chunkW3GXSUSQcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkYGIMK4NXcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.restyleRange = _chunkYGIMK4NXcjs.restyleRange; exports.rgbToGray = _chunkYGIMK4NXcjs.rgbToGray; exports.rgbToHsl = _chunkYGIMK4NXcjs.rgbToHsl; exports.rgbToReflectance = _chunkXIOMMGPDcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.runLayerFilters = _chunkYGIMK4NXcjs.runLayerFilters; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkYGIMK4NXcjs.sampleLut; exports.sampleToneLut = _chunkYGIMK4NXcjs.sampleToneLut; exports.scaleLayerEffect = _chunkPOGBUYWEcjs.scaleLayerEffect; exports.selectionArea = _chunkYGIMK4NXcjs.selectionArea; exports.selectionFromCoverage = _chunkYGIMK4NXcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkYGIMK4NXcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkYGIMK4NXcjs.selectionToCoverage; exports.selectionToPixels = _chunkYGIMK4NXcjs.selectionToPixels; exports.selectionValueAt = _chunkYGIMK4NXcjs.selectionValueAt; exports.serializeContents = _chunkYGIMK4NXcjs.serializeContents; exports.serializeEffects = _chunkYGIMK4NXcjs.serializeEffects; exports.serializeLayer = _chunkYGIMK4NXcjs.serializeLayer; exports.serializeLayers = _chunkYGIMK4NXcjs.serializeLayers; exports.serializeLayersExternal = _chunkYGIMK4NXcjs.serializeLayersExternal; exports.serializePatterns = _chunkYGIMK4NXcjs.serializePatterns; exports.serializeSelection = _chunkYGIMK4NXcjs.serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkYGIMK4NXcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkYGIMK4NXcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkYGIMK4NXcjs.setLayerMask; exports.setLayerProperties = _chunkYGIMK4NXcjs.setLayerProperties; exports.setLum = _chunkXIOMMGPDcjs.setLum; exports.setPigmentColor = _chunkXIOMMGPDcjs.setPigmentColor; exports.setSmartFilterMask = _chunkYGIMK4NXcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkYGIMK4NXcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkYGIMK4NXcjs.setSmartPlacement; exports.shapeAsPixelLayer = _chunkYGIMK4NXcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkYGIMK4NXcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkYGIMK4NXcjs.shapeGeometryBounds; exports.shapeLayers = _chunkYGIMK4NXcjs.shapeLayers; exports.shapeOutline = _chunkYGIMK4NXcjs.shapeOutline; exports.shapeRenderClip = _chunkYGIMK4NXcjs.shapeRenderClip; exports.shiftCoverage = _chunkYGIMK4NXcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkYGIMK4NXcjs.smartObjectLayers; exports.smoothCoverage = _chunkYGIMK4NXcjs.smoothCoverage; exports.smoothPoints = _chunk7VOHOPLWcjs.smoothPoints; exports.solidSurface = _chunkXIOMMGPDcjs.solidSurface; exports.spliceRuns = _chunkYGIMK4NXcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.srgb8ToLab = srgb8ToLab; exports.srgbToLinear = _chunkYGIMK4NXcjs.srgbToLinear; exports.standardBlendMode = _chunkXIOMMGPDcjs.standardBlendMode; exports.styleAt = _chunkYGIMK4NXcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkXIOMMGPDcjs.surfaceBytes; exports.surfaceFromPixels = _chunkXIOMMGPDcjs.surfaceFromPixels; exports.surfacesEqual = _chunkXIOMMGPDcjs.surfacesEqual; exports.tempTintToXy = _chunkYGIMK4NXcjs.tempTintToXy; exports.temperatureToKelvin = _chunkYGIMK4NXcjs.temperatureToKelvin; exports.textIndexAt = _chunkYGIMK4NXcjs.textIndexAt; exports.textMatrix = _chunkYGIMK4NXcjs.textMatrix; exports.textOutlines = _chunkYGIMK4NXcjs.textOutlines; exports.textRange = _chunkYGIMK4NXcjs.textRange; exports.tileCoord = _chunkXIOMMGPDcjs.tileCoord; exports.tileKey = _chunkXIOMMGPDcjs.tileKey; exports.tileRect = _chunkXIOMMGPDcjs.tileRect; exports.tilesInRect = _chunkXIOMMGPDcjs.tilesInRect; exports.tipFalloff = _chunk7VOHOPLWcjs.tipFalloff; exports.tipReach = _chunk7VOHOPLWcjs.tipReach; exports.tipShape = _chunk7VOHOPLWcjs.tipShape; exports.toHex = toHex; exports.toTextSpace = _chunkYGIMK4NXcjs.toTextSpace; exports.toneCurve = _chunkYGIMK4NXcjs.toneCurve; exports.toneLuts = _chunkYGIMK4NXcjs.toneLuts; exports.toneRange = toneRange; exports.transformHomography = _chunkYGIMK4NXcjs.transformHomography; exports.transformMap = _chunkYGIMK4NXcjs.transformMap; exports.transformShapeComponents = _chunkYGIMK4NXcjs.transformShapeComponents; exports.transformSurface = _chunkPOGBUYWEcjs.transformSurface; exports.transformTypeLayer = _chunkYGIMK4NXcjs.transformTypeLayer; exports.transformedBounds = _chunkPOGBUYWEcjs.transformedBounds; exports.transformedBox = _chunkYGIMK4NXcjs.transformedBox; exports.transformedPoint = _chunkYGIMK4NXcjs.transformedPoint; exports.translateSurface = _chunkXIOMMGPDcjs.translateSurface; exports.typeAsPixelLayer = _chunkYGIMK4NXcjs.typeAsPixelLayer; exports.typeFrame = _chunkYGIMK4NXcjs.typeFrame; exports.typeFromAnnotation = _chunkYGIMK4NXcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkYGIMK4NXcjs.typeLayerName; exports.ungroupLayer = _chunkYGIMK4NXcjs.ungroupLayer; exports.uniformTile = _chunkXIOMMGPDcjs.uniformTile; exports.unionRect = _chunkYGIMK4NXcjs.unionRect; exports.unprojectCanvasPoint = _chunkYGIMK4NXcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkYGIMK4NXcjs.updateLayerEffect; exports.updateLayerFilter = _chunkYGIMK4NXcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkYGIMK4NXcjs.updateLayerMaskProps; exports.updateShapeLayer = _chunkYGIMK4NXcjs.updateShapeLayer; exports.updateSmartFilter = _chunkYGIMK4NXcjs.updateSmartFilter; exports.updateTypeLayer = _chunkYGIMK4NXcjs.updateTypeLayer; exports.uvToXy = _chunkYGIMK4NXcjs.uvToXy; exports.validateEffectGradient = _chunkPOGBUYWEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkPOGBUYWEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkPOGBUYWEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkYGIMK4NXcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkYGIMK4NXcjs.vibranceLinear; exports.vibrancePixel = _chunkYGIMK4NXcjs.vibrancePixel; exports.walkDabs = _chunk7VOHOPLWcjs.walkDabs; exports.warpMeshEditPoints = _chunkW3GXSUSQcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkW3GXSUSQcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkW3GXSUSQcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkW3GXSUSQcjs.warpPresetMesh; exports.warpSurface = _chunkPOGBUYWEcjs.warpSurface; exports.wbMatrix = _chunkYGIMK4NXcjs.wbMatrix; exports.whiteBalanceFromSample = _chunkYGIMK4NXcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkYGIMK4NXcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkYGIMK4NXcjs.withFilterMaskSurface; exports.withNewIds = _chunkYGIMK4NXcjs.withNewIds; exports.writeAdjustmentBlock = _chunkYGIMK4NXcjs.writeAdjustmentBlock; exports.writeLfx2 = _chunkYGIMK4NXcjs.writeLfx2; exports.writePatternBlock = _chunkYGIMK4NXcjs.writePatternBlock; exports.writePsd = _chunkYGIMK4NXcjs.writePsd; exports.writeRegion = _chunkXIOMMGPDcjs.writeRegion; exports.xyToTempTint = _chunkYGIMK4NXcjs.xyToTempTint; exports.xyToUv = _chunkYGIMK4NXcjs.xyToUv;
13991
+
13992
+
13993
+
13994
+
13995
+
13996
+
13997
+
13998
+
13999
+
14000
+
14001
+
14002
+
14003
+
14004
+
14005
+
14006
+
14007
+
14008
+
14009
+
14010
+
14011
+
14012
+
14013
+
14014
+
14015
+
14016
+
14017
+
14018
+
14019
+
14020
+
14021
+
14022
+
14023
+
14024
+
14025
+
14026
+
14027
+
14028
+
14029
+ exports.ADJUSTMENT_KEYS = _chunkYGIMK4NXcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkYGIMK4NXcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkYGIMK4NXcjs.ADJUSTMENT_LUT_SIZE; exports.AS_SHOT_KELVIN = _chunkYGIMK4NXcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkYGIMK4NXcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkYGIMK4NXcjs.BACKGROUND_LAYER_NAME; exports.BLEND_MODES = _chunkXIOMMGPDcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkYGIMK4NXcjs.BLUR_FILTER_ID; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.CoverageMap = _chunk7VOHOPLWcjs.CoverageMap; exports.D50 = _chunkYGIMK4NXcjs.D50; exports.D65 = _chunkYGIMK4NXcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkYGIMK4NXcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunk7VOHOPLWcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunk7VOHOPLWcjs.DEFAULT_BRUSH; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_GLOBAL_LIGHT = _chunkPOGBUYWEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkYGIMK4NXcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunk7VOHOPLWcjs.DEFAULT_MIXER; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk4KLT7ZYScjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunk7VOHOPLWcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkYGIMK4NXcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkYGIMK4NXcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkPOGBUYWEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DabWalker = _chunk7VOHOPLWcjs.DabWalker; exports.EMPTY_DISTANCE = _chunkYGIMK4NXcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunk7VOHOPLWcjs.EMPTY_MIXER_LOAD; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkYGIMK4NXcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkYGIMK4NXcjs.HUE_RANGE_LABELS; exports.IDENTITY_MATRIX3 = _chunkYGIMK4NXcjs.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_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.INTERPOLATIONS = _chunkPOGBUYWEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.LATEST_PROCESS_VERSION = _chunkYGIMK4NXcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkYGIMK4NXcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkPOGBUYWEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkYGIMK4NXcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkYGIMK4NXcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkYGIMK4NXcjs.LUMA_709; exports.LayerCompositor = _chunkYGIMK4NXcjs.LayerCompositor; exports.LayerEffectError = _chunkPOGBUYWEcjs.LayerEffectError; exports.LayerOperationError = _chunkYGIMK4NXcjs.LayerOperationError; exports.MAX_BRUSH_SIZE = _chunk7VOHOPLWcjs.MAX_BRUSH_SIZE; exports.MAX_EFFECT_REACH = _chunkPOGBUYWEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkYGIMK4NXcjs.MAX_KELVIN; exports.MAX_TRANSFORM_PIXELS = _chunkPOGBUYWEcjs.MAX_TRANSFORM_PIXELS; exports.MIN_KELVIN = _chunkYGIMK4NXcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkYGIMK4NXcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunk7VOHOPLWcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunk7VOHOPLWcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunk7VOHOPLWcjs.MIXING_MODELS; exports.MixerStroke = _chunk7VOHOPLWcjs.MixerStroke; exports.PAINTERLY_BLEND_MODES = _chunkXIOMMGPDcjs.PAINTERLY_BLEND_MODES; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PARAGRAPH_STYLE_FIELDS = _chunkYGIMK4NXcjs.PARAGRAPH_STYLE_FIELDS; exports.PATTERN_BLOCK_KEYS = _chunkYGIMK4NXcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkXIOMMGPDcjs.PIGMENT_BANDS; exports.PIGMENT_LAMBDA_MIN = _chunkXIOMMGPDcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkXIOMMGPDcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_WAVELENGTHS = _chunkXIOMMGPDcjs.PIGMENT_WAVELENGTHS; exports.PSD_BLEND_KEYS = _chunkYGIMK4NXcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.PaintExchange = _chunk7VOHOPLWcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintStrokeSession = PaintStrokeSession; exports.PatternPlacement = _chunkPOGBUYWEcjs.PatternPlacement; exports.PatternTile = _chunkPOGBUYWEcjs.PatternTile; exports.PsdError = _chunkYGIMK4NXcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk4KLT7ZYScjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk4KLT7ZYScjs.RegionPixelSource; exports.RetouchDabStroke = _chunk4KLT7ZYScjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkYGIMK4NXcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkYGIMK4NXcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SHADOW_AMBIENT = _chunkXIOMMGPDcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkYGIMK4NXcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkYGIMK4NXcjs.SHAPE_RENDER_MARGIN; exports.SMART_RENDER_MARGIN = _chunkYGIMK4NXcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk4KLT7ZYScjs.SPOT_HEAL_TYPES; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkYGIMK4NXcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunk7VOHOPLWcjs.SmudgeTip; exports.StrokeCoverage = _chunk7VOHOPLWcjs.StrokeCoverage; exports.SurfaceDraft = _chunkXIOMMGPDcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkYGIMK4NXcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkYGIMK4NXcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkYGIMK4NXcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkXIOMMGPDcjs.TILE; exports.TILE_SHIFT = _chunkXIOMMGPDcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkYGIMK4NXcjs.TINT_SCALE; exports.TONE_LUT_SIZE = _chunkYGIMK4NXcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk4KLT7ZYScjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkYGIMK4NXcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunk7VOHOPLWcjs.TileMedium; exports.TilePixelSource = _chunk4KLT7ZYScjs.TilePixelSource; exports.TiledSurface = _chunkXIOMMGPDcjs.TiledSurface; exports.TransformTooLargeError = _chunkPOGBUYWEcjs.TransformTooLargeError; exports.TypeToolGesture = TypeToolGesture; exports.VIBRANCE_GREY = _chunkYGIMK4NXcjs.VIBRANCE_GREY; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkW3GXSUSQcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkW3GXSUSQcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.XYZ_D50_TO_SRGB = _chunkYGIMK4NXcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkPOGBUYWEcjs.ZlibError; exports.activeAdjustmentLayers = _chunkYGIMK4NXcjs.activeAdjustmentLayers; exports.activeSmartFilters = _chunkYGIMK4NXcjs.activeSmartFilters; exports.addLayerEffect = _chunkYGIMK4NXcjs.addLayerEffect; exports.addLayerFilter = _chunkYGIMK4NXcjs.addLayerFilter; exports.addSmartFilter = _chunkYGIMK4NXcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkYGIMK4NXcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkYGIMK4NXcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkYGIMK4NXcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkYGIMK4NXcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkPOGBUYWEcjs.adler32; exports.anchorPoint = _chunkYGIMK4NXcjs.anchorPoint; exports.annotationBlend = _chunkYGIMK4NXcjs.annotationBlend; exports.annotationLayerFor = _chunkYGIMK4NXcjs.annotationLayerFor; exports.annotationLayerName = _chunkYGIMK4NXcjs.annotationLayerName; exports.annotationOfLayer = _chunkYGIMK4NXcjs.annotationOfLayer; exports.annotationOfShape = _chunkYGIMK4NXcjs.annotationOfShape; exports.annotationOfType = _chunkYGIMK4NXcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkYGIMK4NXcjs.applyAdjustmentLayers; exports.applyAdjustments = _chunkYGIMK4NXcjs.applyAdjustments; exports.applyBoxBlur = _chunkYGIMK4NXcjs.applyBoxBlur; exports.applyDepthMask = _chunkYGIMK4NXcjs.applyDepthMask; exports.applyHomography = _chunkMUUXNRU4cjs.applyHomography; exports.applyImageProjectionToContext = _chunkYGIMK4NXcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkYGIMK4NXcjs.applyLegacyAdjustments; exports.applyMatrix3 = _chunkYGIMK4NXcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkYGIMK4NXcjs.applyParams; exports.applyProcess2Adjustments = _chunkYGIMK4NXcjs.applyProcess2Adjustments; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk4KLT7ZYScjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkYGIMK4NXcjs.applySmartFilters; exports.applyStrokeToTile = _chunk7VOHOPLWcjs.applyStrokeToTile; exports.backgroundLayer = _chunkYGIMK4NXcjs.backgroundLayer; exports.base64ToBytes = _chunkPOGBUYWEcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk4KLT7ZYScjs.bestOffset; exports.blackWhiteGray = _chunkYGIMK4NXcjs.blackWhiteGray; exports.blendChannel = _chunkXIOMMGPDcjs.blendChannel; exports.blendImageData = _chunkXIOMMGPDcjs.blendImageData; exports.blendLum = _chunkXIOMMGPDcjs.blendLum; exports.blendPixel = _chunkXIOMMGPDcjs.blendPixel; exports.blendRadius = _chunk7VOHOPLWcjs.blendRadius; exports.blendRgb = _chunkXIOMMGPDcjs.blendRgb; exports.blendTile = _chunkPOGBUYWEcjs.blendTile; exports.blenderDab = _chunk7VOHOPLWcjs.blenderDab; exports.blurFilter = _chunkYGIMK4NXcjs.blurFilter; exports.borderCoverage = _chunkYGIMK4NXcjs.borderCoverage; exports.boxMean = boxMean; exports.boxPointOf = _chunkYGIMK4NXcjs.boxPointOf; exports.boxQuad = _chunkMUUXNRU4cjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkYGIMK4NXcjs.bradfordAdaptation; exports.buildLayerMaskPlanes = _chunkYGIMK4NXcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkYGIMK4NXcjs.buildToneLut; exports.builtinPattern = _chunkPOGBUYWEcjs.builtinPattern; exports.builtinPatternIds = _chunkPOGBUYWEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkPOGBUYWEcjs.bytesToBase64; exports.calculateCropDrag = _chunkYGIMK4NXcjs.calculateCropDrag; exports.canvasCompositeOperation = _chunkXIOMMGPDcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkYGIMK4NXcjs.canvasToImagePoint; exports.caretAt = _chunkYGIMK4NXcjs.caretAt; exports.changedTiles = _chunkPOGBUYWEcjs.changedTiles; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkYGIMK4NXcjs.clampCropToImage; exports.cleanMixer = _chunk7VOHOPLWcjs.cleanMixer; exports.cloneSourceLabel = cloneSourceLabel; exports.collectTiles = _chunkXIOMMGPDcjs.collectTiles; exports.colorBalanceChannel = _chunkYGIMK4NXcjs.colorBalanceChannel; exports.colorRange = colorRange; exports.combineSelections = _chunkYGIMK4NXcjs.combineSelections; exports.compileAdjustmentLayer = _chunkYGIMK4NXcjs.compileAdjustmentLayer; exports.componentPath = _chunkYGIMK4NXcjs.componentPath; exports.compositeSurfaceOver = _chunkPOGBUYWEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkYGIMK4NXcjs.computeSelectionBounds; exports.contentBounds = _chunkXIOMMGPDcjs.contentBounds; exports.contentsBox = _chunkYGIMK4NXcjs.contentsBox; exports.contentsSurface = _chunkYGIMK4NXcjs.contentsSurface; exports.contractCoverage = _chunkYGIMK4NXcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertToSmartObject = _chunkYGIMK4NXcjs.convertToSmartObject; exports.copySmartObject = _chunkYGIMK4NXcjs.copySmartObject; exports.cornersFromMatrix = _chunkYGIMK4NXcjs.cornersFromMatrix; exports.coverageTileCoord = _chunk7VOHOPLWcjs.coverageTileCoord; exports.coverageToByte = _chunkYGIMK4NXcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkYGIMK4NXcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunk7VOHOPLWcjs.createBlenderScratch; exports.createCanvasTextShaper = createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageEditTools = createImageEditTools; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createOutlineTextShaper = createOutlineTextShaper; exports.createPigment = _chunkXIOMMGPDcjs.createPigment; exports.createPigmentTools = _chunk7VOHOPLWcjs.createPigmentTools; exports.createSelectionMask = _chunkYGIMK4NXcjs.createSelectionMask; exports.createShapeLayer = _chunkYGIMK4NXcjs.createShapeLayer; exports.createTypeLayer = _chunkYGIMK4NXcjs.createTypeLayer; exports.cssFont = cssFont; exports.cssFontFamily = cssFontFamily; exports.curveLut = _chunkPOGBUYWEcjs.curveLut; exports.curveLutFromLevels = _chunkYGIMK4NXcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunk7VOHOPLWcjs.dabCoverage; exports.dabRect = _chunk7VOHOPLWcjs.dabRect; exports.decodeLayerChannel = _chunkYGIMK4NXcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkYGIMK4NXcjs.decodeLayerMask; exports.decodeMergedImage = _chunkYGIMK4NXcjs.decodeMergedImage; exports.decodePlanes = _chunkYGIMK4NXcjs.decodePlanes; exports.decodePng = _chunkPOGBUYWEcjs.decodePng; exports.decodePngDataUrl = _chunkYGIMK4NXcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkYGIMK4NXcjs.decodeSelectionRle; exports.defaultAdjustmentParams = _chunkYGIMK4NXcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkPOGBUYWEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkPOGBUYWEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkYGIMK4NXcjs.defaultShapeName; exports.deflate = _chunkPOGBUYWEcjs.deflate; exports.deflateRaw = _chunkPOGBUYWEcjs.deflateRaw; exports.depthMaskAlpha = _chunkYGIMK4NXcjs.depthMaskAlpha; exports.depthRasterMask = _chunkYGIMK4NXcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkYGIMK4NXcjs.describeTransform; exports.deserializeEffects = _chunkYGIMK4NXcjs.deserializeEffects; exports.deserializeLayer = _chunkYGIMK4NXcjs.deserializeLayer; exports.deserializeLayers = _chunkYGIMK4NXcjs.deserializeLayers; exports.deserializePatterns = _chunkYGIMK4NXcjs.deserializePatterns; exports.deserializeSelection = _chunkYGIMK4NXcjs.deserializeSelection; exports.developFilter = _chunkYGIMK4NXcjs.developFilter; exports.developFromAdjustments = _chunkYGIMK4NXcjs.developFromAdjustments; exports.developTarget = _chunkYGIMK4NXcjs.developTarget; exports.dilateMask = _chunk4KLT7ZYScjs.dilateMask; exports.distanceTransform = _chunkYGIMK4NXcjs.distanceTransform; exports.documentContents = _chunkYGIMK4NXcjs.documentContents; exports.dodgeBurn = _chunk4KLT7ZYScjs.dodgeBurn; exports.dodgeBurnCurve = _chunk4KLT7ZYScjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dragWarpMeshPoint = _chunkW3GXSUSQcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.duplicateLayer = _chunkYGIMK4NXcjs.duplicateLayer; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkPOGBUYWEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectReach = _chunkPOGBUYWEcjs.effectReach; exports.effectsFingerprint = _chunkPOGBUYWEcjs.effectsFingerprint; exports.effectsMargin = _chunkPOGBUYWEcjs.effectsMargin; exports.effectsScale = _chunkPOGBUYWEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkXIOMMGPDcjs.emptySurface; exports.encodePng = _chunkPOGBUYWEcjs.encodePng; exports.encodeRle = _chunkYGIMK4NXcjs.encodeRle; exports.encodeSelectionRle = _chunkYGIMK4NXcjs.encodeSelectionRle; exports.encodeSurface = _chunkYGIMK4NXcjs.encodeSurface; exports.evalWarpMesh = _chunkW3GXSUSQcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkYGIMK4NXcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunk7VOHOPLWcjs.exchangeRates; exports.expandCoverage = _chunkYGIMK4NXcjs.expandCoverage; exports.exportPsd = _chunkYGIMK4NXcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkYGIMK4NXcjs.featherCoverage; exports.fillRect = _chunkXIOMMGPDcjs.fillRect; exports.filterMaskCoverage = _chunkYGIMK4NXcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkPOGBUYWEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.finishTile = _chunkXIOMMGPDcjs.finishTile; exports.fitParagraphRuns = _chunkYGIMK4NXcjs.fitParagraphRuns; exports.fitRuns = _chunkYGIMK4NXcjs.fitRuns; exports.flattenLayers = _chunkPOGBUYWEcjs.flattenLayers; exports.flattenPath = _chunkYGIMK4NXcjs.flattenPath; exports.flipCorners = _chunkYGIMK4NXcjs.flipCorners; exports.fontOf = _chunkYGIMK4NXcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkYGIMK4NXcjs.fullSelection; exports.gaussianBlur = _chunkPOGBUYWEcjs.gaussianBlur; exports.geometryHomography = _chunkYGIMK4NXcjs.geometryHomography; exports.getAnnotationBounds = _chunkYGIMK4NXcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkYGIMK4NXcjs.getCropCursor; exports.getRotatedSize = _chunkYGIMK4NXcjs.getRotatedSize; exports.getViewportMetrics = _chunkYGIMK4NXcjs.getViewportMetrics; exports.getViewportProjection = _chunkYGIMK4NXcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.greyMorphology = _chunkYGIMK4NXcjs.greyMorphology; exports.groupLayers = _chunkYGIMK4NXcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkPOGBUYWEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkYGIMK4NXcjs.hasResampledLegacyMask; exports.hasSurface = _chunkYGIMK4NXcjs.hasSurface; exports.hasWarp = _chunkYGIMK4NXcjs.hasWarp; exports.hashMaskContent = _chunkYGIMK4NXcjs.hashMaskContent; exports.hashNoise = _chunkPOGBUYWEcjs.hashNoise; exports.healPixels = _chunk4KLT7ZYScjs.healPixels; exports.hexToRgb = _chunkYGIMK4NXcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkYGIMK4NXcjs.hitTestAnnotation; exports.hitTestCrop = _chunkYGIMK4NXcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkMUUXNRU4cjs.homographyFromAffine; exports.homographyFromPoints = _chunkMUUXNRU4cjs.homographyFromPoints; exports.hslToRgb = _chunkYGIMK4NXcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkYGIMK4NXcjs.hueRangeTables; exports.hueRangeWeight = _chunkYGIMK4NXcjs.hueRangeWeight; exports.hueSaturation = _chunkYGIMK4NXcjs.hueSaturation; exports.identityCurve = _chunkYGIMK4NXcjs.identityCurve; exports.identityLevels = _chunkYGIMK4NXcjs.identityLevels; exports.identityTransform = _chunkYGIMK4NXcjs.identityTransform; exports.identityWarpMesh = _chunkW3GXSUSQcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageToCanvasPoint = _chunkYGIMK4NXcjs.imageToCanvasPoint; exports.importPsd = _chunkYGIMK4NXcjs.importPsd; exports.inflate = _chunkPOGBUYWEcjs.inflate; exports.inflateRaw = _chunkPOGBUYWEcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkPOGBUYWEcjs.insertLayer; exports.instancesOf = _chunkYGIMK4NXcjs.instancesOf; exports.invertHomography = _chunkMUUXNRU4cjs.invertHomography; exports.invertMatrix3 = _chunkYGIMK4NXcjs.invertMatrix3; exports.invertSelection = _chunkYGIMK4NXcjs.invertSelection; exports.isActiveFilter = _chunkYGIMK4NXcjs.isActiveFilter; exports.isAdjustmentKind = _chunkYGIMK4NXcjs.isAdjustmentKind; exports.isBlendMode = _chunkXIOMMGPDcjs.isBlendMode; exports.isContentsDecoded = _chunkYGIMK4NXcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkYGIMK4NXcjs.isDefaultDepthMask; exports.isIdentityTransform = _chunkYGIMK4NXcjs.isIdentityTransform; exports.isInterpolation = _chunkPOGBUYWEcjs.isInterpolation; exports.isLayerEffectKind = _chunkPOGBUYWEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkPOGBUYWEcjs.isLayerLocked; exports.isLegacyShape = _chunkYGIMK4NXcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPainterlyBlendMode = _chunkXIOMMGPDcjs.isPainterlyBlendMode; exports.isPng = _chunkPOGBUYWEcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkYGIMK4NXcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkYGIMK4NXcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkYGIMK4NXcjs.isSelectionEmpty; exports.isSelectionMode = _chunkYGIMK4NXcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkXIOMMGPDcjs.isSeparableBlendMode; exports.isSpatialFilter = _chunkYGIMK4NXcjs.isSpatialFilter; exports.isTransformAnchor = _chunkYGIMK4NXcjs.isTransformAnchor; exports.isValidWarp = _chunkYGIMK4NXcjs.isValidWarp; exports.kelvinToTemperature = _chunkYGIMK4NXcjs.kelvinToTemperature; exports.keysWeight = _chunkPOGBUYWEcjs.keysWeight; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkPOGBUYWEcjs.layerEffectFields; exports.layerEffectLabel = _chunkPOGBUYWEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkYGIMK4NXcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkYGIMK4NXcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkYGIMK4NXcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkYGIMK4NXcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkYGIMK4NXcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerTree = _chunkYGIMK4NXcjs.layerTree; exports.layerTypeLabel = _chunkYGIMK4NXcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkYGIMK4NXcjs.layersFromLegacy; exports.layoutText = _chunkYGIMK4NXcjs.layoutText; exports.legacyAdjustmentLayer = _chunkYGIMK4NXcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkYGIMK4NXcjs.legacyMaskOf; exports.legacyView = _chunkYGIMK4NXcjs.legacyView; exports.lerpPigment = _chunkXIOMMGPDcjs.lerpPigment; exports.lerpPigmentInto = _chunkXIOMMGPDcjs.lerpPigmentInto; exports.levelsValue = _chunkYGIMK4NXcjs.levelsValue; exports.linearSrgbToXy = _chunkYGIMK4NXcjs.linearSrgbToXy; exports.linearToSrgb = _chunkYGIMK4NXcjs.linearToSrgb; exports.liveComponent = _chunkYGIMK4NXcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkYGIMK4NXcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunk7VOHOPLWcjs.loadMixer; exports.luma = _chunk4KLT7ZYScjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkYGIMK4NXcjs.mapCropHandle; exports.mapLayer = _chunkPOGBUYWEcjs.mapLayer; exports.mapSubpaths = _chunkYGIMK4NXcjs.mapSubpaths; exports.maskBounds = _chunk4KLT7ZYScjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkYGIMK4NXcjs.matrixFromCorners; exports.matrixFromParams = _chunkYGIMK4NXcjs.matrixFromParams; exports.membraneFill = _chunk4KLT7ZYScjs.membraneFill; exports.mergeLayerEffect = _chunkPOGBUYWEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkYGIMK4NXcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mixPigment8 = _chunkXIOMMGPDcjs.mixPigment8; exports.mixPigmentRgb = _chunkXIOMMGPDcjs.mixPigmentRgb; exports.mixPigments = _chunkXIOMMGPDcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunk7VOHOPLWcjs.mixerRates; exports.modifySelection = _chunkYGIMK4NXcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkYGIMK4NXcjs.moveLayer; exports.moveSmartFilter = _chunkYGIMK4NXcjs.moveSmartFilter; exports.mulMatrix3 = _chunkYGIMK4NXcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkYGIMK4NXcjs.neutralHueRange; exports.newContentsId = _chunkYGIMK4NXcjs.newContentsId; exports.newEffectId = _chunkPOGBUYWEcjs.newEffectId; exports.newLayerId = _chunkYGIMK4NXcjs.newLayerId; exports.normalizeAdjustmentLayer = _chunkYGIMK4NXcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkYGIMK4NXcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkYGIMK4NXcjs.normalizeAngle; exports.normalizeBlendMode = _chunkXIOMMGPDcjs.normalizeBlendMode; exports.normalizeBlender = _chunk7VOHOPLWcjs.normalizeBlender; exports.normalizeBrush = _chunk7VOHOPLWcjs.normalizeBrush; exports.normalizeFilter = _chunkYGIMK4NXcjs.normalizeFilter; exports.normalizeLayerEffects = _chunkPOGBUYWEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkYGIMK4NXcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkYGIMK4NXcjs.normalizeLiveShape; exports.normalizeMixer = _chunk7VOHOPLWcjs.normalizeMixer; exports.normalizePlacement = _chunkYGIMK4NXcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkYGIMK4NXcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk4KLT7ZYScjs.normalizeRetouch; exports.normalizeShapePaint = _chunkYGIMK4NXcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkYGIMK4NXcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkYGIMK4NXcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunk7VOHOPLWcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkYGIMK4NXcjs.normalizeSubpaths; exports.normalizeText = _chunkYGIMK4NXcjs.normalizeText; exports.offsetLayer = _chunkYGIMK4NXcjs.offsetLayer; exports.offsetShape = _chunkYGIMK4NXcjs.offsetShape; exports.offsetSmartObject = _chunkYGIMK4NXcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkXIOMMGPDcjs.packRgba; exports.paragraphRanges = _chunkYGIMK4NXcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkYGIMK4NXcjs.parseAdjustmentBlock; exports.parseBlend = _chunkYGIMK4NXcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkYGIMK4NXcjs.parseCssColor; exports.parseDataUrl = _chunkPOGBUYWEcjs.parseDataUrl; exports.parseEffectColor = _chunkPOGBUYWEcjs.parseEffectColor; exports.parseLfx2 = _chunkYGIMK4NXcjs.parseLfx2; exports.parseLrfx = _chunkYGIMK4NXcjs.parseLrfx; exports.parsePatternBlock = _chunkYGIMK4NXcjs.parsePatternBlock; exports.parseSelectionMode = _chunkYGIMK4NXcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkYGIMK4NXcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkYGIMK4NXcjs.patchParagraphStyle; exports.patchTextStyle = _chunkYGIMK4NXcjs.patchTextStyle; exports.perDabStrength = _chunk4KLT7ZYScjs.perDabStrength; exports.photoFilterMatrix = _chunkYGIMK4NXcjs.photoFilterMatrix; exports.pigment8 = _chunkXIOMMGPDcjs.pigment8; exports.pixelLayerBounds = _chunkYGIMK4NXcjs.pixelLayerBounds; exports.pixelLayers = _chunkYGIMK4NXcjs.pixelLayers; exports.placeContents = _chunkYGIMK4NXcjs.placeContents; exports.placeLayer = _chunkYGIMK4NXcjs.placeLayer; exports.placementAt = _chunkYGIMK4NXcjs.placementAt; exports.placementBounds = _chunkYGIMK4NXcjs.placementBounds; exports.placementGeometry = _chunkYGIMK4NXcjs.placementGeometry; exports.pngDataUrl = _chunkPOGBUYWEcjs.pngDataUrl; exports.pointerPressure = pointerPressure; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkYGIMK4NXcjs.posterizeValue; exports.presetWarp = _chunkYGIMK4NXcjs.presetWarp; exports.previewStep = previewStep; exports.projectImagePoint = _chunkYGIMK4NXcjs.projectImagePoint; exports.projectImageRect = _chunkYGIMK4NXcjs.projectImageRect; exports.projectMaskCoverage = _chunkYGIMK4NXcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkYGIMK4NXcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkYGIMK4NXcjs.psdToLayers; exports.pullWarpMesh = _chunkW3GXSUSQcjs.pullWarpMesh; exports.quickMaskPixels = quickMaskPixels; exports.rangeLightness = _chunkYGIMK4NXcjs.rangeLightness; exports.rasterContents = _chunkYGIMK4NXcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkYGIMK4NXcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkYGIMK4NXcjs.rasterizeCoverage; exports.rasterizeDab = _chunk7VOHOPLWcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkYGIMK4NXcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readPixel = _chunkXIOMMGPDcjs.readPixel; exports.readPsd = _chunkYGIMK4NXcjs.readPsd; exports.readRegion = _chunkXIOMMGPDcjs.readRegion; exports.readSourceRegion = _chunk4KLT7ZYScjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkMUUXNRU4cjs.rectToQuad; exports.reduceSurface = _chunkPOGBUYWEcjs.reduceSurface; exports.referencePoint = _chunkYGIMK4NXcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkXIOMMGPDcjs.reflectanceToRgb; exports.removeAlpha = _chunkYGIMK4NXcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkYGIMK4NXcjs.removeLayer; exports.removeLayerEffect = _chunkYGIMK4NXcjs.removeLayerEffect; exports.removeLayerFilter = _chunkYGIMK4NXcjs.removeLayerFilter; exports.removeSmartFilter = _chunkYGIMK4NXcjs.removeSmartFilter; exports.renderLayerEffects = _chunkPOGBUYWEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkYGIMK4NXcjs.renderShape; exports.renderShapeRect = _chunkYGIMK4NXcjs.renderShapeRect; exports.renderSmartObject = _chunkYGIMK4NXcjs.renderSmartObject; exports.renderText = _chunkYGIMK4NXcjs.renderText; exports.replaceContents = _chunkYGIMK4NXcjs.replaceContents; exports.replaceTextRange = _chunkYGIMK4NXcjs.replaceTextRange; exports.requireLayer = _chunkYGIMK4NXcjs.requireLayer; exports.requireOperation = _chunkYGIMK4NXcjs.requireOperation; exports.requireShapeLayer = _chunkYGIMK4NXcjs.requireShapeLayer; exports.requireSmartObject = _chunkYGIMK4NXcjs.requireSmartObject; exports.requireTypeLayer = _chunkYGIMK4NXcjs.requireTypeLayer; exports.requireUnlocked = _chunkYGIMK4NXcjs.requireUnlocked; exports.rerender = _chunkYGIMK4NXcjs.rerender; exports.rerenderShape = _chunkYGIMK4NXcjs.rerenderShape; exports.rerenderText = _chunkYGIMK4NXcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkYGIMK4NXcjs.resizeSelection; exports.resizeWarpMesh = _chunkW3GXSUSQcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkYGIMK4NXcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.restyleRange = _chunkYGIMK4NXcjs.restyleRange; exports.rgbToGray = _chunkYGIMK4NXcjs.rgbToGray; exports.rgbToHsl = _chunkYGIMK4NXcjs.rgbToHsl; exports.rgbToReflectance = _chunkXIOMMGPDcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk4KLT7ZYScjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkYGIMK4NXcjs.runLayerFilters; exports.runLayerMenuAction = runLayerMenuAction; exports.sampleLut = _chunkYGIMK4NXcjs.sampleLut; exports.sampleToneLut = _chunkYGIMK4NXcjs.sampleToneLut; exports.saturationOf = _chunk4KLT7ZYScjs.saturationOf; exports.scaleLayerEffect = _chunkPOGBUYWEcjs.scaleLayerEffect; exports.seamlessClone = _chunk4KLT7ZYScjs.seamlessClone; exports.selectionArea = _chunkYGIMK4NXcjs.selectionArea; exports.selectionFromCoverage = _chunkYGIMK4NXcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkYGIMK4NXcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkYGIMK4NXcjs.selectionToCoverage; exports.selectionToPixels = _chunkYGIMK4NXcjs.selectionToPixels; exports.selectionValueAt = _chunkYGIMK4NXcjs.selectionValueAt; exports.serializeContents = _chunkYGIMK4NXcjs.serializeContents; exports.serializeEffects = _chunkYGIMK4NXcjs.serializeEffects; exports.serializeLayer = _chunkYGIMK4NXcjs.serializeLayer; exports.serializeLayers = _chunkYGIMK4NXcjs.serializeLayers; exports.serializeLayersExternal = _chunkYGIMK4NXcjs.serializeLayersExternal; exports.serializePatterns = _chunkYGIMK4NXcjs.serializePatterns; exports.serializeSelection = _chunkYGIMK4NXcjs.serializeSelection; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkYGIMK4NXcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkYGIMK4NXcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkYGIMK4NXcjs.setLayerMask; exports.setLayerProperties = _chunkYGIMK4NXcjs.setLayerProperties; exports.setLum = _chunkXIOMMGPDcjs.setLum; exports.setPigmentColor = _chunkXIOMMGPDcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkYGIMK4NXcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkYGIMK4NXcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkYGIMK4NXcjs.setSmartPlacement; exports.shapeAsPixelLayer = _chunkYGIMK4NXcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkYGIMK4NXcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkYGIMK4NXcjs.shapeGeometryBounds; exports.shapeLayers = _chunkYGIMK4NXcjs.shapeLayers; exports.shapeOutline = _chunkYGIMK4NXcjs.shapeOutline; exports.shapeRenderClip = _chunkYGIMK4NXcjs.shapeRenderClip; exports.shiftCoverage = _chunkYGIMK4NXcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkYGIMK4NXcjs.smartObjectLayers; exports.smoothCoverage = _chunkYGIMK4NXcjs.smoothCoverage; exports.smoothPoints = _chunk7VOHOPLWcjs.smoothPoints; exports.smudgeEffect = _chunk4KLT7ZYScjs.smudgeEffect; exports.solidSurface = _chunkXIOMMGPDcjs.solidSurface; exports.solveMembrane = _chunk4KLT7ZYScjs.solveMembrane; exports.spliceRuns = _chunkYGIMK4NXcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk4KLT7ZYScjs.sponge; exports.spongeEffect = _chunk4KLT7ZYScjs.spongeEffect; exports.spotHealPixels = _chunk4KLT7ZYScjs.spotHealPixels; exports.spotHealWindow = _chunk4KLT7ZYScjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbToLinear = _chunkYGIMK4NXcjs.srgbToLinear; exports.standardBlendMode = _chunkXIOMMGPDcjs.standardBlendMode; exports.styleAt = _chunkYGIMK4NXcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkXIOMMGPDcjs.surfaceBytes; exports.surfaceFromPixels = _chunkXIOMMGPDcjs.surfaceFromPixels; exports.surfacesEqual = _chunkXIOMMGPDcjs.surfacesEqual; exports.tempTintToXy = _chunkYGIMK4NXcjs.tempTintToXy; exports.temperatureToKelvin = _chunkYGIMK4NXcjs.temperatureToKelvin; exports.textIndexAt = _chunkYGIMK4NXcjs.textIndexAt; exports.textMatrix = _chunkYGIMK4NXcjs.textMatrix; exports.textOutlines = _chunkYGIMK4NXcjs.textOutlines; exports.textRange = _chunkYGIMK4NXcjs.textRange; exports.tileCoord = _chunkXIOMMGPDcjs.tileCoord; exports.tileKey = _chunkXIOMMGPDcjs.tileKey; exports.tileRect = _chunkXIOMMGPDcjs.tileRect; exports.tilesInRect = _chunkXIOMMGPDcjs.tilesInRect; exports.tipFalloff = _chunk7VOHOPLWcjs.tipFalloff; exports.tipReach = _chunk7VOHOPLWcjs.tipReach; exports.tipShape = _chunk7VOHOPLWcjs.tipShape; exports.toHex = toHex; exports.toTextSpace = _chunkYGIMK4NXcjs.toTextSpace; exports.toneCurve = _chunkYGIMK4NXcjs.toneCurve; exports.toneLuts = _chunkYGIMK4NXcjs.toneLuts; exports.toneOf = _chunk4KLT7ZYScjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkYGIMK4NXcjs.transformHomography; exports.transformMap = _chunkYGIMK4NXcjs.transformMap; exports.transformShapeComponents = _chunkYGIMK4NXcjs.transformShapeComponents; exports.transformSurface = _chunkPOGBUYWEcjs.transformSurface; exports.transformTypeLayer = _chunkYGIMK4NXcjs.transformTypeLayer; exports.transformedBounds = _chunkPOGBUYWEcjs.transformedBounds; exports.transformedBox = _chunkYGIMK4NXcjs.transformedBox; exports.transformedPoint = _chunkYGIMK4NXcjs.transformedPoint; exports.translateSurface = _chunkXIOMMGPDcjs.translateSurface; exports.typeAsPixelLayer = _chunkYGIMK4NXcjs.typeAsPixelLayer; exports.typeFrame = _chunkYGIMK4NXcjs.typeFrame; exports.typeFromAnnotation = _chunkYGIMK4NXcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkYGIMK4NXcjs.typeLayerName; exports.ungroupLayer = _chunkYGIMK4NXcjs.ungroupLayer; exports.uniformTile = _chunkXIOMMGPDcjs.uniformTile; exports.unionRect = _chunkYGIMK4NXcjs.unionRect; exports.unprojectCanvasPoint = _chunkYGIMK4NXcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkYGIMK4NXcjs.updateLayerEffect; exports.updateLayerFilter = _chunkYGIMK4NXcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkYGIMK4NXcjs.updateLayerMaskProps; exports.updateShapeLayer = _chunkYGIMK4NXcjs.updateShapeLayer; exports.updateSmartFilter = _chunkYGIMK4NXcjs.updateSmartFilter; exports.updateTypeLayer = _chunkYGIMK4NXcjs.updateTypeLayer; exports.uvToXy = _chunkYGIMK4NXcjs.uvToXy; exports.validateEffectGradient = _chunkPOGBUYWEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkPOGBUYWEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkPOGBUYWEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkYGIMK4NXcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkYGIMK4NXcjs.vibranceLinear; exports.vibrancePixel = _chunkYGIMK4NXcjs.vibrancePixel; exports.walkDabs = _chunk7VOHOPLWcjs.walkDabs; exports.warpMeshEditPoints = _chunkW3GXSUSQcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkW3GXSUSQcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkW3GXSUSQcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkW3GXSUSQcjs.warpPresetMesh; exports.warpSurface = _chunkPOGBUYWEcjs.warpSurface; exports.wbMatrix = _chunkYGIMK4NXcjs.wbMatrix; exports.whiteBalanceFromSample = _chunkYGIMK4NXcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkYGIMK4NXcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkYGIMK4NXcjs.withFilterMaskSurface; exports.withNewIds = _chunkYGIMK4NXcjs.withNewIds; exports.writeAdjustmentBlock = _chunkYGIMK4NXcjs.writeAdjustmentBlock; exports.writeLfx2 = _chunkYGIMK4NXcjs.writeLfx2; exports.writePatternBlock = _chunkYGIMK4NXcjs.writePatternBlock; exports.writePsd = _chunkYGIMK4NXcjs.writePsd; exports.writeRegion = _chunkXIOMMGPDcjs.writeRegion; exports.xyToTempTint = _chunkYGIMK4NXcjs.xyToTempTint; exports.xyToUv = _chunkYGIMK4NXcjs.xyToUv;
13443
14030
  //# sourceMappingURL=index.cjs.map