@pixerate/editor 0.218.0 → 0.218.1

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.
@@ -1039,6 +1039,44 @@ function selectionOutline(mask, threshold = 128) {
1039
1039
  }
1040
1040
  return Float32Array.from(segs);
1041
1041
  }
1042
+ function selectionOutlinePaths(mask, threshold = 128) {
1043
+ const segs = selectionOutline(mask, threshold);
1044
+ const n = segs.length / 4;
1045
+ if (!n) return [];
1046
+ const stride = mask.width + 1;
1047
+ const key2 = (x, y) => y * stride + x;
1048
+ const at = /* @__PURE__ */ new Map();
1049
+ for (let s = 0; s < n; s++) {
1050
+ for (const k of [key2(segs[s * 4], segs[s * 4 + 1]), key2(segs[s * 4 + 2], segs[s * 4 + 3])]) {
1051
+ const list = at.get(k);
1052
+ if (list) list.push(s);
1053
+ else at.set(k, [s]);
1054
+ }
1055
+ }
1056
+ const used = new Uint8Array(n);
1057
+ const paths = [];
1058
+ for (let s0 = 0; s0 < n; s0++) {
1059
+ if (used[s0]) continue;
1060
+ used[s0] = 1;
1061
+ const pts = [segs[s0 * 4], segs[s0 * 4 + 1], segs[s0 * 4 + 2], segs[s0 * 4 + 3]];
1062
+ for (const forward of [true, false]) {
1063
+ for (; ; ) {
1064
+ const x = forward ? pts[pts.length - 2] : pts[0];
1065
+ const y = forward ? pts[pts.length - 1] : pts[1];
1066
+ const next = _optionalChain([at, 'access', _2 => _2.get, 'call', _3 => _3(key2(x, y)), 'optionalAccess', _4 => _4.find, 'call', _5 => _5((t) => !used[t])]);
1067
+ if (next === void 0) break;
1068
+ used[next] = 1;
1069
+ const a = [segs[next * 4], segs[next * 4 + 1]];
1070
+ const b = [segs[next * 4 + 2], segs[next * 4 + 3]];
1071
+ const far = a[0] === x && a[1] === y ? b : a;
1072
+ if (forward) pts.push(far[0], far[1]);
1073
+ else pts.unshift(far[0], far[1]);
1074
+ }
1075
+ }
1076
+ paths.push(Float32Array.from(pts));
1077
+ }
1078
+ return paths;
1079
+ }
1042
1080
  function quickMaskPixels(mask, style = {}) {
1043
1081
  const [r, g, b] = _nullishCoalesce(style.color, () => ( [255, 0, 0]));
1044
1082
  const k = Math.min(1, Math.max(0, _nullishCoalesce(style.opacity, () => ( 0.5))));
@@ -1076,8 +1114,8 @@ function compareSelectionMasks(a, b, width, height, options = {}) {
1076
1114
  const minArea = Math.max(1, _nullishCoalesce(options.minArea, () => ( 4)));
1077
1115
  const maxRegions = Math.max(1, _nullishCoalesce(options.maxRegions, () => ( 10)));
1078
1116
  const n = width * height;
1079
- const ad = _optionalChain([a, 'optionalAccess', _2 => _2.data]);
1080
- const bd = _optionalChain([b, 'optionalAccess', _3 => _3.data]);
1117
+ const ad = _optionalChain([a, 'optionalAccess', _6 => _6.data]);
1118
+ const bd = _optionalChain([b, 'optionalAccess', _7 => _7.data]);
1081
1119
  const added = new Uint8Array(n);
1082
1120
  const removed = new Uint8Array(n);
1083
1121
  let areaA = 0;
@@ -1107,8 +1145,8 @@ function compareSelectionMasks(a, b, width, height, options = {}) {
1107
1145
  const addedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, added);
1108
1146
  const removedMask = _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height, removed);
1109
1147
  return {
1110
- a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess', _4 => _4.bounds]), () => ( null)) },
1111
- b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess', _5 => _5.bounds]), () => ( null)) },
1148
+ a: { area: areaA, bounds: _nullishCoalesce(_optionalChain([a, 'optionalAccess', _8 => _8.bounds]), () => ( null)) },
1149
+ b: { area: areaB, bounds: _nullishCoalesce(_optionalChain([b, 'optionalAccess', _9 => _9.bounds]), () => ( null)) },
1112
1150
  added: { area: addedArea, ...pieces(added, width, height, addedMask.bounds, minArea, maxRegions) },
1113
1151
  removed: { area: removedArea, ...pieces(removed, width, height, removedMask.bounds, minArea, maxRegions) },
1114
1152
  iou: union ? Math.round(inter / union * 1e4) / 1e4 : 1,
@@ -1232,7 +1270,7 @@ function needsLegacyBase(input) {
1232
1270
  if (!_chunkS55JFWDAcjs.isLegacyShape.call(void 0, stack)) return false;
1233
1271
  const bg = stack.layers[0];
1234
1272
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
1235
- if (_optionalChain([bg, 'access', _6 => _6.mask, 'optionalAccess', _7 => _7.source, 'optionalAccess', _8 => _8.enabled]) && bg.mask.source.maskSource) return true;
1273
+ if (_optionalChain([bg, 'access', _10 => _10.mask, 'optionalAccess', _11 => _11.source, 'optionalAccess', _12 => _12.enabled]) && bg.mask.source.maskSource) return true;
1236
1274
  if (stack.outputOpacity < 1) return true;
1237
1275
  const blur = _chunkS55JFWDAcjs.blurFilter.call(void 0, bg);
1238
1276
  if (blur && blur.enabled && blur.radius > 0) {
@@ -1513,7 +1551,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1513
1551
  `${projection.angle},${transform.flipH},${transform.flipV}`,
1514
1552
  `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1515
1553
  _chunkS55JFWDAcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1516
- `${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _9 => _9.depthRange, 'optionalAccess', _10 => _10[0]])}-${_optionalChain([depthMask, 'access', _11 => _11.depthRange, 'optionalAccess', _12 => _12[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
1554
+ `${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _13 => _13.depthRange, 'optionalAccess', _14 => _14[0]])}-${_optionalChain([depthMask, 'access', _15 => _15.depthRange, 'optionalAccess', _16 => _16[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
1517
1555
  `d${this.displayKey}`
1518
1556
  ].join("|");
1519
1557
  let baseCanvas = this.cachedBaseCanvas;
@@ -1521,12 +1559,12 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1521
1559
  let histogram = null;
1522
1560
  baseCanvas = await this.renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, (pixels) => {
1523
1561
  histogram = computeHistogram(pixels);
1524
- _optionalChain([this, 'access', _13 => _13.display, 'optionalCall', _14 => _14(pixels.data)]);
1562
+ _optionalChain([this, 'access', _17 => _17.display, 'optionalCall', _18 => _18(pixels.data)]);
1525
1563
  });
1526
1564
  this.cachedBaseCanvas = baseCanvas;
1527
1565
  this.cachedBaseKey = baseKey;
1528
1566
  this.previewHistogram = histogram;
1529
- _optionalChain([this, 'access', _15 => _15.onPreviewHistogram, 'optionalCall', _16 => _16(histogram)]);
1567
+ _optionalChain([this, 'access', _19 => _19.onPreviewHistogram, 'optionalCall', _20 => _20(histogram)]);
1530
1568
  }
1531
1569
  const drawW = rotated.width * projection.scale;
1532
1570
  const drawH = rotated.height * projection.scale;
@@ -1541,7 +1579,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1541
1579
  const drawW = rotated.width * projection.scale;
1542
1580
  const drawH = rotated.height * projection.scale;
1543
1581
  ctx.drawImage(base.canvas, projection.originX - drawW / 2, projection.originY - drawH / 2, drawW, drawH);
1544
- this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess', _17 => _17.histogram, 'call', _18 => _18()]))), () => ( null)));
1582
+ this.publishHistogram(_nullishCoalesce(_nullishCoalesce(base.histogram, () => ( _optionalChain([comp, 'optionalAccess', _21 => _21.histogram, 'call', _22 => _22()]))), () => ( null)));
1545
1583
  }
1546
1584
  }
1547
1585
  if (overlay.length > 0 || options.draftAnnotation) {
@@ -1599,8 +1637,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1599
1637
  }
1600
1638
  const { width: iw, height: ih } = state.imageDimensions;
1601
1639
  const shownSel = state.selectionPreview !== void 0 ? state.selectionPreview : state.selection;
1602
- const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess', _19 => _19.bounds]) ? this.emptyMask(Math.round(iw), Math.round(ih)) : null;
1603
- if (_optionalChain([shownSel, 'optionalAccess', _20 => _20.bounds]) && display !== "none" || quickMaskSel || _optionalChain([options, 'access', _21 => _21.draftSelectionPath, 'optionalAccess', _22 => _22.length])) {
1640
+ const quickMaskSel = display === "quickMask" && state.quickMaskEditing && !_optionalChain([shownSel, 'optionalAccess', _23 => _23.bounds]) ? this.emptyMask(Math.round(iw), Math.round(ih)) : null;
1641
+ if (_optionalChain([shownSel, 'optionalAccess', _24 => _24.bounds]) && display !== "none" || quickMaskSel || _optionalChain([options, 'access', _25 => _25.draftSelectionPath, 'optionalAccess', _26 => _26.length])) {
1604
1642
  ctx.save();
1605
1643
  try {
1606
1644
  _chunkS55JFWDAcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
@@ -1608,9 +1646,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1608
1646
  ctx.rect(region.x, region.y, region.width, region.height);
1609
1647
  ctx.clip();
1610
1648
  if (quickMaskSel) this.drawQuickMask(ctx, quickMaskSel);
1611
- else if (_optionalChain([shownSel, 'optionalAccess', _23 => _23.bounds]) && display === "quickMask") this.drawQuickMask(ctx, shownSel);
1612
- else if (_optionalChain([shownSel, 'optionalAccess', _24 => _24.bounds]) && display === "ants") this.drawAnts(ctx, shownSel, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
1613
- if (_optionalChain([options, 'access', _25 => _25.draftSelectionPath, 'optionalAccess', _26 => _26.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
1649
+ else if (_optionalChain([shownSel, 'optionalAccess', _27 => _27.bounds]) && display === "quickMask") this.drawQuickMask(ctx, shownSel);
1650
+ else if (_optionalChain([shownSel, 'optionalAccess', _28 => _28.bounds]) && display === "ants") this.drawAnts(ctx, shownSel, projection.scale / u, _nullishCoalesce(options.antsOffset, () => ( 0)));
1651
+ if (_optionalChain([options, 'access', _29 => _29.draftSelectionPath, 'optionalAccess', _30 => _30.length])) this.drawDraftPath(ctx, options.draftSelectionPath, projection.scale / u);
1614
1652
  } catch (e7) {
1615
1653
  }
1616
1654
  ctx.restore();
@@ -1741,7 +1779,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1741
1779
  ctx.lineWidth = 1.5 * u;
1742
1780
  ctx.strokeStyle = "#ffffff";
1743
1781
  ctx.stroke();
1744
- drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _27 => _27.warp, 'optionalAccess', _28 => _28.anchors]), () => ( []))].map(scr), u);
1782
+ drawOverlayHandles(ctx, [...t.handles, ..._nullishCoalesce(_optionalChain([t, 'access', _31 => _31.warp, 'optionalAccess', _32 => _32.anchors]), () => ( []))].map(scr), u);
1745
1783
  if (rotate) {
1746
1784
  ctx.beginPath();
1747
1785
  ctx.arc(rotate.x, rotate.y, 5 * u, 0, Math.PI * 2);
@@ -1751,7 +1789,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1751
1789
  ctx.strokeStyle = OVERLAY_HANDLE_EDGE;
1752
1790
  ctx.stroke();
1753
1791
  }
1754
- for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _29 => _29.warp, 'optionalAccess', _30 => _30.handles]), () => ( []))).map((w) => scr(w.point))) {
1792
+ for (const h of (_nullishCoalesce(_optionalChain([t, 'access', _33 => _33.warp, 'optionalAccess', _34 => _34.handles]), () => ( []))).map((w) => scr(w.point))) {
1755
1793
  ctx.beginPath();
1756
1794
  ctx.arc(h.x, h.y, 3.5 * u, 0, Math.PI * 2);
1757
1795
  ctx.fillStyle = "#ffffff";
@@ -1896,7 +1934,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1896
1934
  } catch (e14) {
1897
1935
  }
1898
1936
  }
1899
- _optionalChain([onPixels, 'optionalCall', _31 => _31(imageData)]);
1937
+ _optionalChain([onPixels, 'optionalCall', _35 => _35(imageData)]);
1900
1938
  baseCtx.putImageData(imageData, 0, 0);
1901
1939
  }
1902
1940
  return baseCanvas;
@@ -1905,7 +1943,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1905
1943
  /** Which base path renders `state` (see `needsLegacyBase`). */
1906
1944
  chooseRoute(state, region, naturalWidth, naturalHeight) {
1907
1945
  let route;
1908
- if (!_optionalChain([state, 'access', _32 => _32.layers, 'optionalAccess', _33 => _33.length])) route = "legacy";
1946
+ if (!_optionalChain([state, 'access', _36 => _36.layers, 'optionalAccess', _37 => _37.length])) route = "legacy";
1909
1947
  else if (this.baseRoute === "layers") route = "layers";
1910
1948
  else {
1911
1949
  const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
@@ -1915,7 +1953,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1915
1953
  region,
1916
1954
  canvas: { width: naturalWidth, height: naturalHeight },
1917
1955
  transform: state.transform,
1918
- sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _34 => _34.layerSources, 'optionalAccess', _35 => _35.sourceIsOpaque, 'call', _36 => _36()]), () => ( true))
1956
+ sourceOpaque: _nullishCoalesce(_optionalChain([this, 'access', _38 => _38.layerSources, 'optionalAccess', _39 => _39.sourceIsOpaque, 'call', _40 => _40()]), () => ( true))
1919
1957
  }) ? "legacy" : "layers";
1920
1958
  }
1921
1959
  this.lastBaseRoute = route;
@@ -1933,24 +1971,24 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1933
1971
  return _nullishCoalesce(this.depthMaps.get(`${source.maskSource}|${width}x${height}`), () => ( null));
1934
1972
  },
1935
1973
  rasterizeAnnotation: (annotation, rect2) => this.rasterizeAnnotation(annotation, rect2),
1936
- version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _37 => _37.version, 'call', _38 => _38()]), () => ( ""))}:${this.assetVersion}`,
1937
- globalLight: _optionalChain([host, 'optionalAccess', _39 => _39.globalLight, 'optionalCall', _40 => _40()]),
1938
- pattern: _optionalChain([host, 'optionalAccess', _41 => _41.pattern]) ? (id) => host.pattern(id) : void 0
1974
+ version: `${_nullishCoalesce(_optionalChain([host, 'optionalAccess', _41 => _41.version, 'call', _42 => _42()]), () => ( ""))}:${this.assetVersion}`,
1975
+ globalLight: _optionalChain([host, 'optionalAccess', _43 => _43.globalLight, 'optionalCall', _44 => _44()]),
1976
+ pattern: _optionalChain([host, 'optionalAccess', _45 => _45.pattern]) ? (id) => host.pattern(id) : void 0
1939
1977
  };
1940
1978
  }
1941
1979
  /** Loads what the compositor reads synchronously: depth maps (at canvas size) and annotation images. */
1942
1980
  /** Loads depth maps and annotation images the compositor reads synchronously. */
1943
1981
  async prepareLayerAssets(layers, width, height) {
1944
1982
  for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
1945
- const source = _optionalChain([l, 'access', _42 => _42.mask, 'optionalAccess', _43 => _43.source]);
1946
- if (_optionalChain([source, 'optionalAccess', _44 => _44.enabled]) && source.maskSource) {
1983
+ const source = _optionalChain([l, 'access', _46 => _46.mask, 'optionalAccess', _47 => _47.source]);
1984
+ if (_optionalChain([source, 'optionalAccess', _48 => _48.enabled]) && source.maskSource) {
1947
1985
  const key2 = `${source.maskSource}|${width}x${height}`;
1948
1986
  if (this.depthMaps.has(key2)) continue;
1949
1987
  try {
1950
1988
  const maskImg = await this.imageCache.get(source.maskSource);
1951
1989
  const canvas = this.createCanvas(width, height);
1952
1990
  const mctx = canvas.getContext("2d");
1953
- const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access', _45 => _45.getImageData, 'optionalCall', _46 => _46(0, 0, width, height)])) : null;
1991
+ const data = mctx ? (mctx.drawImage(maskImg, 0, 0, width, height), _optionalChain([mctx, 'access', _49 => _49.getImageData, 'optionalCall', _50 => _50(0, 0, width, height)])) : null;
1954
1992
  if (data) {
1955
1993
  this.depthMaps.set(key2, { width, height, data: data.data });
1956
1994
  this.assetVersion++;
@@ -2004,7 +2042,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2004
2042
  if (x1 <= x0 || y1 <= y0) return;
2005
2043
  const img = ctx.createImageData(_chunk474IQG74cjs.TILE, _chunk474IQG74cjs.TILE);
2006
2044
  img.data.set(data);
2007
- _optionalChain([this, 'access', _47 => _47.display, 'optionalCall', _48 => _48(img.data)]);
2045
+ _optionalChain([this, 'access', _51 => _51.display, 'optionalCall', _52 => _52(img.data)]);
2008
2046
  ctx.putImageData(img, ox, oy, x0, y0, x1 - x0, y1 - y0);
2009
2047
  }
2010
2048
  /**
@@ -2071,7 +2109,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2071
2109
  const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
2072
2110
  const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
2073
2111
  if (!(opacity < 1) && !(blur > 0)) return null;
2074
- const data = _optionalChain([ctx, 'access', _49 => _49.getImageData, 'optionalCall', _50 => _50(0, 0, w, h)]);
2112
+ const data = _optionalChain([ctx, 'access', _53 => _53.getImageData, 'optionalCall', _54 => _54(0, 0, w, h)]);
2075
2113
  if (!data) return null;
2076
2114
  applyOutputStage(data, opacity, blur);
2077
2115
  ctx.putImageData(data, 0, 0);
@@ -2080,7 +2118,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2080
2118
  publishHistogram(histogram) {
2081
2119
  if (histogram === this.previewHistogram) return;
2082
2120
  this.previewHistogram = histogram;
2083
- _optionalChain([this, 'access', _51 => _51.onPreviewHistogram, 'optionalCall', _52 => _52(histogram)]);
2121
+ _optionalChain([this, 'access', _55 => _55.onPreviewHistogram, 'optionalCall', _56 => _56(histogram)]);
2084
2122
  }
2085
2123
  __init21() {this.quickMaskCache = /* @__PURE__ */ new WeakMap()}
2086
2124
  __init22() {this.diffCache = /* @__PURE__ */ new WeakMap()}
@@ -2101,7 +2139,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2101
2139
  if (!layer.mask || layer.mask.source || width < 1 || height < 1) return null;
2102
2140
  const key2 = `${width}x${height}:${layer.type === "pixel" ? `${layer.offset.x},${layer.offset.y}` : ""}`;
2103
2141
  const cached = this.maskViewCache.get(layer.mask.surface);
2104
- if (_optionalChain([cached, 'optionalAccess', _53 => _53.key]) === key2) return cached.mask;
2142
+ if (_optionalChain([cached, 'optionalAccess', _57 => _57.key]) === key2) return cached.mask;
2105
2143
  const mask = _chunkS55JFWDAcjs.layerMaskSelection.call(void 0, layer, width, height);
2106
2144
  if (mask) this.maskViewCache.set(layer.mask.surface, { key: key2, mask });
2107
2145
  return mask;
@@ -2122,7 +2160,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2122
2160
  }
2123
2161
  /** A channel's tint (colour, opacity, masked or selected area), drawn in natural image space. */
2124
2162
  drawMaskOverlay(ctx, mask, style) {
2125
- const key2 = `${_optionalChain([style, 'access', _54 => _54.color, 'optionalAccess', _55 => _55.join, 'call', _56 => _56(",")])}|${style.opacity}|${style.indicates}`;
2163
+ const key2 = `${_optionalChain([style, 'access', _58 => _58.color, 'optionalAccess', _59 => _59.join, 'call', _60 => _60(",")])}|${style.opacity}|${style.indicates}`;
2126
2164
  let cached = this.overlayCache.get(mask);
2127
2165
  if (!cached || cached.key !== key2) {
2128
2166
  const canvas = this.createCanvas(mask.width, mask.height);
@@ -2168,17 +2206,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2168
2206
  * screen pixels per natural pixel (the projection scale times the host's CSS scale).
2169
2207
  */
2170
2208
  drawAnts(ctx, selection, scale, offset) {
2171
- let segs = this.outlineCache.get(selection);
2172
- if (!segs) {
2173
- segs = selectionOutline(selection);
2174
- this.outlineCache.set(selection, segs);
2209
+ let paths = this.outlineCache.get(selection);
2210
+ if (!paths) {
2211
+ paths = selectionOutlinePaths(selection);
2212
+ this.outlineCache.set(selection, paths);
2175
2213
  }
2176
- if (!segs.length) return;
2214
+ if (!paths.length) return;
2177
2215
  const px2 = 1 / (scale || 1);
2178
2216
  ctx.beginPath();
2179
- for (let i = 0; i < segs.length; i += 4) {
2180
- ctx.moveTo(segs[i], segs[i + 1]);
2181
- ctx.lineTo(segs[i + 2], segs[i + 3]);
2217
+ for (const p of paths) {
2218
+ ctx.moveTo(p[0], p[1]);
2219
+ for (let i = 2; i < p.length; i += 2) ctx.lineTo(p[i], p[i + 1]);
2182
2220
  }
2183
2221
  ctx.lineWidth = px2;
2184
2222
  ctx.strokeStyle = "#ffffff";
@@ -2553,8 +2591,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2553
2591
  if (!ctx) return maskCanvas;
2554
2592
  ctx.fillStyle = MASK_BLACK;
2555
2593
  ctx.fillRect(0, 0, naturalWidth, naturalHeight);
2556
- const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _57 => _57.useCrop]), () => ( true));
2557
- const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _58 => _58.useAnnotations]), () => ( true));
2594
+ const useCrop = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.useCrop]), () => ( true));
2595
+ const useAnnotations = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _62 => _62.useAnnotations]), () => ( true));
2558
2596
  if (useCrop && state.crop) {
2559
2597
  ctx.fillStyle = MASK_WHITE;
2560
2598
  ctx.fillRect(state.crop.x, state.crop.y, state.crop.width, state.crop.height);
@@ -2564,8 +2602,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2564
2602
  this.drawAnnotationMask(ctx, ann);
2565
2603
  }
2566
2604
  }
2567
- const imageData = _optionalChain([ctx, 'access', _59 => _59.getImageData, 'optionalCall', _60 => _60(0, 0, naturalWidth, naturalHeight)]);
2568
- const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _61 => _61.useSelection]), () => ( true))) && _optionalChain([state, 'access', _62 => _62.selection, 'optionalAccess', _63 => _63.bounds]) && state.selection.width === naturalWidth && state.selection.height === naturalHeight ? state.selection : null;
2605
+ const imageData = _optionalChain([ctx, 'access', _63 => _63.getImageData, 'optionalCall', _64 => _64(0, 0, naturalWidth, naturalHeight)]);
2606
+ const selection = (_nullishCoalesce(_optionalChain([options, 'optionalAccess', _65 => _65.useSelection]), () => ( true))) && _optionalChain([state, 'access', _66 => _66.selection, 'optionalAccess', _67 => _67.bounds]) && state.selection.width === naturalWidth && state.selection.height === naturalHeight ? state.selection : null;
2569
2607
  if (imageData) {
2570
2608
  const d = imageData.data;
2571
2609
  for (let i = 0; i < d.length; i += 4) {
@@ -3649,15 +3687,15 @@ function readPaths(stored, problems = []) {
3649
3687
  let work = false;
3650
3688
  for (const [i, raw] of stored.entries()) {
3651
3689
  const r = raw;
3652
- const name = typeof _optionalChain([r, 'optionalAccess', _64 => _64.name]) === "string" && r.name.trim() ? r.name.trim() : `Path ${i + 1}`;
3690
+ const name = typeof _optionalChain([r, 'optionalAccess', _68 => _68.name]) === "string" && r.name.trim() ? r.name.trim() : `Path ${i + 1}`;
3653
3691
  try {
3654
- const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess', _65 => _65.components]));
3655
- let id = typeof _optionalChain([r, 'optionalAccess', _66 => _66.id]) === "string" && r.id ? r.id : newPathId();
3692
+ const components = _chunkS55JFWDAcjs.readShapeComponents.call(void 0, _optionalChain([r, 'optionalAccess', _69 => _69.components]));
3693
+ let id = typeof _optionalChain([r, 'optionalAccess', _70 => _70.id]) === "string" && r.id ? r.id : newPathId();
3656
3694
  if (ids.has(id)) id = newPathId();
3657
3695
  ids.add(id);
3658
3696
  const path = { id, name, components };
3659
- if (_optionalChain([r, 'optionalAccess', _67 => _67.fillRule]) === "evenodd") path.fillRule = "evenodd";
3660
- if (_optionalChain([r, 'optionalAccess', _68 => _68.work]) === true && !work) {
3697
+ if (_optionalChain([r, 'optionalAccess', _71 => _71.fillRule]) === "evenodd") path.fillRule = "evenodd";
3698
+ if (_optionalChain([r, 'optionalAccess', _72 => _72.work]) === true && !work) {
3661
3699
  path.work = true;
3662
3700
  work = true;
3663
3701
  }
@@ -3781,11 +3819,11 @@ function applyShapeOptions(controller, layerId, change) {
3781
3819
  const style = {};
3782
3820
  if ("fill" in change) style.fill = _nullishCoalesce(change.fill, () => ( null));
3783
3821
  if ("stroke" in change || "strokeWidth" in change) {
3784
- const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _69 => _69.stroke, 'optionalAccess', _70 => _70.paint, 'access', _71 => _71.type]) === "color" ? info.stroke.paint.color : null;
3785
- style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _72 => _72.stroke, 'optionalAccess', _73 => _73.width]))), () => ( 2)), paint: color } : null;
3822
+ const color = "stroke" in change ? change.stroke : _optionalChain([info, 'access', _73 => _73.stroke, 'optionalAccess', _74 => _74.paint, 'access', _75 => _75.type]) === "color" ? info.stroke.paint.color : null;
3823
+ style.stroke = color ? { width: _nullishCoalesce(_nullishCoalesce(change.strokeWidth, () => ( _optionalChain([info, 'access', _76 => _76.stroke, 'optionalAccess', _77 => _77.width]))), () => ( 2)), paint: color } : null;
3786
3824
  }
3787
3825
  if (Object.keys(style).length) controller.setShapeStyle(layerId, style);
3788
- const live = _optionalChain([info, 'access', _74 => _74.components, 'access', _75 => _75[0], 'optionalAccess', _76 => _76.live]);
3826
+ const live = _optionalChain([info, 'access', _78 => _78.components, 'access', _79 => _79[0], 'optionalAccess', _80 => _80.live]);
3789
3827
  if (!live) return;
3790
3828
  const shape = {};
3791
3829
  if (live.kind === "rect" && change.radius !== void 0) shape.radius = change.radius;
@@ -3811,7 +3849,7 @@ var TextEditSession = (_class7 = class {
3811
3849
  __init39() {this.listeners = /* @__PURE__ */ new Set()}
3812
3850
  __init40() {this.error = null}
3813
3851
  get layer() {
3814
- const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _77 => _77.layer]);
3852
+ const l = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _81 => _81.layer]);
3815
3853
  if (!l || l.type !== "type") throw new Error("The type layer being edited is gone.");
3816
3854
  return l;
3817
3855
  }
@@ -3826,7 +3864,7 @@ var TextEditSession = (_class7 = class {
3826
3864
  }
3827
3865
  /** Whether the layer still exists (it can be deleted or undone away while editing). */
3828
3866
  get alive() {
3829
- return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _78 => _78.layer, 'access', _79 => _79.type]) === "type";
3867
+ return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.controller.getLayers(), this.layerId), 'optionalAccess', _82 => _82.layer, 'access', _83 => _83.type]) === "type";
3830
3868
  }
3831
3869
  subscribe(fn) {
3832
3870
  this.listeners.add(fn);
@@ -4114,7 +4152,7 @@ var TypeToolGesture = (_class8 = class {
4114
4152
  finish() {
4115
4153
  const s = this.session;
4116
4154
  this.session = null;
4117
- _optionalChain([s, 'optionalAccess', _80 => _80.close, 'call', _81 => _81()]);
4155
+ _optionalChain([s, 'optionalAccess', _84 => _84.close, 'call', _85 => _85()]);
4118
4156
  }
4119
4157
  }, _class8);
4120
4158
 
@@ -4466,7 +4504,7 @@ function segmentToSelection(width, height, result) {
4466
4504
  const sized = raw.width === width && raw.height === height ? raw : _chunkSS53NNZOcjs.resizeSelection.call(void 0, raw, width, height);
4467
4505
  out = _chunkSS53NNZOcjs.combineSelections.call(void 0, out, sized, "add");
4468
4506
  }
4469
- return _optionalChain([out, 'optionalAccess', _82 => _82.bounds]) ? out : null;
4507
+ return _optionalChain([out, 'optionalAccess', _86 => _86.bounds]) ? out : null;
4470
4508
  }
4471
4509
  function segmentsToSelection(width, height, results) {
4472
4510
  let out = null;
@@ -4515,7 +4553,7 @@ function deserializeChannels(value, size, problems = []) {
4515
4553
  visible: v.visible === true
4516
4554
  });
4517
4555
  } catch (err) {
4518
- problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _83 => _83.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4556
+ problems.push(`Alpha channel "${String(_nullishCoalesce(_optionalChain([v, 'optionalAccess', _87 => _87.name]), () => ( "?")))}" could not be read: ${err instanceof Error ? err.message : String(err)}.`);
4519
4557
  }
4520
4558
  }
4521
4559
  return out;
@@ -4553,16 +4591,16 @@ function checkEffectTime(time) {
4553
4591
  return time;
4554
4592
  }
4555
4593
  function checkEffectAnimation(animate) {
4556
- const duration = _optionalChain([animate, 'optionalAccess', _84 => _84.duration]);
4594
+ const duration = _optionalChain([animate, 'optionalAccess', _88 => _88.duration]);
4557
4595
  if (!(typeof duration === "number" && Number.isFinite(duration) && duration > 0 && duration <= _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS)) {
4558
4596
  throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`animate.duration must be more than 0 and at most ${_chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS} ms.`);
4559
4597
  }
4560
4598
  return { duration: Math.round(duration) };
4561
4599
  }
4562
4600
  function effectLayerTiming(g, d) {
4563
- if (!_optionalChain([d, 'optionalAccess', _85 => _85.duration])) return null;
4601
+ if (!_optionalChain([d, 'optionalAccess', _89 => _89.duration])) return null;
4564
4602
  const time = _nullishCoalesce(g.time, () => ( 0));
4565
- return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _86 => _86.animate, 'optionalAccess', _87 => _87.duration]), () => ( d.duration)), loops: d.loop };
4603
+ return { mode: g.animate ? "animate" : "still", time, range: Math.max(d.duration, time), duration: _nullishCoalesce(_optionalChain([g, 'access', _90 => _90.animate, 'optionalAccess', _91 => _91.duration]), () => ( d.duration)), loops: d.loop };
4566
4604
  }
4567
4605
 
4568
4606
  // src/image-editor/effects.ts
@@ -4815,14 +4853,14 @@ var FreeTransformSession = (_class10 = class {
4815
4853
  if (init.interpolation !== void 0 && !_chunkB46UQUDCcjs.isInterpolation.call(void 0, init.interpolation)) fail(`Unknown interpolation "${String(init.interpolation)}"; use nearest, bilinear or bicubic.`);
4816
4854
  this.interp = _nullishCoalesce(init.interpolation, () => ( "bicubic"));
4817
4855
  const sel = host.selection();
4818
- const selected = Boolean(_optionalChain([sel, 'optionalAccess', _88 => _88.bounds]));
4856
+ const selected = Boolean(_optionalChain([sel, 'optionalAccess', _92 => _92.bounds]));
4819
4857
  let content = _nullishCoalesce(init.content, () => ( "auto"));
4820
4858
  if (!["auto", "layer", "selection", "selection-copy", "selection-outline"].includes(content)) {
4821
4859
  fail(`Unknown content "${String(content)}"; use auto, layer, selection, selection-copy or selection-outline.`);
4822
4860
  }
4823
4861
  const targetId = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
4824
- const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _89 => _89.layer]) : void 0;
4825
- const smartTarget = (_optionalChain([target, 'optionalAccess', _90 => _90.type]) === "smart" || _optionalChain([target, 'optionalAccess', _91 => _91.type]) === "shape" || _optionalChain([target, 'optionalAccess', _92 => _92.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
4862
+ const target = targetId && content !== "selection-outline" ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, host.layers(), targetId), 'optionalAccess', _93 => _93.layer]) : void 0;
4863
+ const smartTarget = (_optionalChain([target, 'optionalAccess', _94 => _94.type]) === "smart" || _optionalChain([target, 'optionalAccess', _95 => _95.type]) === "shape" || _optionalChain([target, 'optionalAccess', _96 => _96.type]) === "type") && (_nullishCoalesce(init.channel, () => ( (target.id === host.activeLayerId() ? host.activeTarget() : "pixels")))) !== "mask";
4826
4864
  if (content === "auto") content = selected && !smartTarget ? "selection" : "layer";
4827
4865
  this.content = content;
4828
4866
  if (content !== "layer" && !selected) fail(`Nothing is selected; ${content} needs a selection. Select first, or use content layer.`);
@@ -4846,9 +4884,9 @@ var FreeTransformSession = (_class10 = class {
4846
4884
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
4847
4885
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
4848
4886
  if (channel !== "pixels" && channel !== "mask") fail(`Unknown channel "${String(channel)}"; use pixels or mask.`);
4849
- const linked = _optionalChain([mask, 'optionalAccess', _93 => _93.linked]) !== false;
4887
+ const linked = _optionalChain([mask, 'optionalAccess', _97 => _97.linked]) !== false;
4850
4888
  const maskAlone = channel === "mask" && (!linked || layer.type !== "pixel");
4851
- if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _94 => _94.mask, 'optionalAccess', _95 => _95.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
4889
+ if (channel === "mask" && !mask) fail(_optionalChain([layer, 'access', _98 => _98.mask, 'optionalAccess', _99 => _99.source]) ? `Layer "${layer.name || id}" has a depth mask, which is generated, not transformed.` : `Layer "${layer.name || id}" has no mask to transform; add one with add_layer_mask, or transform its pixels.`);
4852
4890
  if (!maskAlone && layer.type !== "pixel" && layer.type !== "smart" && layer.type !== "shape" && layer.type !== "type") fail(`Layer "${layer.name || id}" is a ${layer.type} layer; Free Transform works on pixel, shape, type and smart object layers, layer masks (channel mask) and selections.`);
4853
4891
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
4854
4892
  if (content !== "selection-copy") {
@@ -4951,7 +4989,7 @@ var FreeTransformSession = (_class10 = class {
4951
4989
  };
4952
4990
  this.copyId = copy.id;
4953
4991
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, layer.id);
4954
- this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _96 => _96.parent, 'optionalAccess', _97 => _97.id]), () => ( null)), loc.index + 1);
4992
+ this.startLayers = _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _100 => _100.parent, 'optionalAccess', _101 => _101.id]), () => ( null)), loc.index + 1);
4955
4993
  this.parts.push({ what: "pixels", offset: o, moving: lifted, base: null, reduced: /* @__PURE__ */ new Map() });
4956
4994
  moves.push("pixels");
4957
4995
  }
@@ -5060,7 +5098,7 @@ var FreeTransformSession = (_class10 = class {
5060
5098
  moveVectorMask(layers) {
5061
5099
  const g = this.geometryValue;
5062
5100
  if (!this.layerId || this.copyId || !this.moves.includes("pixels") || _chunkS55JFWDAcjs.isIdentityTransform.call(void 0, g)) return layers;
5063
- const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _98 => _98.layer, 'access', _99 => _99.vectorMask]);
5101
+ const vm = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, this.layerId), 'optionalAccess', _102 => _102.layer, 'access', _103 => _103.vectorMask]);
5064
5102
  if (!vm || vm.linked === false) return layers;
5065
5103
  const warp = _chunkS55JFWDAcjs.hasWarp.call(void 0, g);
5066
5104
  const f = warp ? _chunkS55JFWDAcjs.transformMap.call(void 0, g) : null;
@@ -5231,11 +5269,11 @@ var FreeTransformSession = (_class10 = class {
5231
5269
  result(changed, layers, selection) {
5232
5270
  let bounds = null;
5233
5271
  const id = _nullishCoalesce(this.copyId, () => ( this.layerId));
5234
- const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _100 => _100.layer]) : void 0;
5235
- if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _101 => _101.type]) === "pixel") bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5236
- else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _102 => _102.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _103 => _103.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _104 => _104.type]) === "type")) bounds = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
5237
- else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _105 => _105.mask])) bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5238
- else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _106 => _106.bounds]) ? { ...selection.bounds } : null;
5272
+ const layer = id ? _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _104 => _104.layer]) : void 0;
5273
+ if (this.moves.includes("pixels") && _optionalChain([layer, 'optionalAccess', _105 => _105.type]) === "pixel") bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, this.host.pixelsOf(layer)), layer.offset);
5274
+ else if (this.moves.includes("pixels") && (_optionalChain([layer, 'optionalAccess', _106 => _106.type]) === "smart" || _optionalChain([layer, 'optionalAccess', _107 => _107.type]) === "shape" || _optionalChain([layer, 'optionalAccess', _108 => _108.type]) === "type")) bounds = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
5275
+ else if (this.moves.includes("mask") && _optionalChain([layer, 'optionalAccess', _109 => _109.mask])) bounds = toDoc(_chunk474IQG74cjs.contentBounds.call(void 0, layer.mask.surface), layer.type === "pixel" ? layer.offset : { x: 0, y: 0 });
5276
+ else if (this.moves.includes("selection")) bounds = _optionalChain([selection, 'optionalAccess', _110 => _110.bounds]) ? { ...selection.bounds } : null;
5239
5277
  return {
5240
5278
  layerId: _nullishCoalesce(this.copyId, () => ( this.layerId)),
5241
5279
  content: this.content,
@@ -5264,7 +5302,7 @@ function deserializeColorMode(raw, problems) {
5264
5302
  }
5265
5303
  function effectiveProof(proof, mode) {
5266
5304
  if (proof) return proof;
5267
- if (_optionalChain([mode, 'optionalAccess', _107 => _107.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5305
+ if (_optionalChain([mode, 'optionalAccess', _111 => _111.mode]) === "cmyk") return { ...DEFAULT_PROOF, profile: mode.profile, intent: mode.intent };
5268
5306
  return null;
5269
5307
  }
5270
5308
  function colorModePlanes(doc, mode) {
@@ -5319,7 +5357,7 @@ function resolveProfile(doc) {
5319
5357
  return p;
5320
5358
  }
5321
5359
  function profileBytes(doc) {
5322
- if (_optionalChain([doc, 'optionalAccess', _108 => _108.icc])) return doc.icc;
5360
+ if (_optionalChain([doc, 'optionalAccess', _112 => _112.icc])) return doc.icc;
5323
5361
  const p = resolveProfile(doc);
5324
5362
  return _nullishCoalesce(p.bytes, () => ( _chunkBROJYMWUcjs.encodeProfile.call(void 0, p)));
5325
5363
  }
@@ -5481,7 +5519,7 @@ function paintCoverageInto(base, coverage, apply, rects, depth = null) {
5481
5519
  else tiles.delete(key2);
5482
5520
  continue;
5483
5521
  }
5484
- const src = _nullishCoalesce(_optionalChain([base, 'access', _109 => _109.tiles, 'access', _110 => _110.get, 'call', _111 => _111(key2), 'optionalAccess', _112 => _112.data]), () => ( defaultTile(base)));
5522
+ const src = _nullishCoalesce(_optionalChain([base, 'access', _113 => _113.tiles, 'access', _114 => _114.get, 'call', _115 => _115(key2), 'optionalAccess', _116 => _116.data]), () => ( defaultTile(base)));
5485
5523
  const data = _chunkPQ3H2AANcjs.applyStrokeToTile.call(void 0, coverage, src, base.channels, t.tx, t.ty, apply);
5486
5524
  const tile = _chunk474IQG74cjs.finishTile.call(void 0, data, base.channels, base.defaultValue);
5487
5525
  if (tile) tiles.set(key2, tile);
@@ -5594,7 +5632,7 @@ var PaintStrokeSession = (_class11 = class {
5594
5632
  writeTile: (tx, ty) => {
5595
5633
  const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
5596
5634
  if (!this.touched.has(key2)) {
5597
- this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call', _113 => _113(key2), 'optionalAccess', _114 => _114.slice, 'call', _115 => _115()]), () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))));
5635
+ this.work.set(key2, _nullishCoalesce(_optionalChain([read, 'call', _117 => _117(key2), 'optionalAccess', _118 => _118.slice, 'call', _119 => _119()]), () => ( new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4))));
5598
5636
  this.touched.add(key2);
5599
5637
  }
5600
5638
  this.fresh.add(key2);
@@ -5606,11 +5644,11 @@ var PaintStrokeSession = (_class11 = class {
5606
5644
  offset: a.offset,
5607
5645
  lockTransparency: a.lockTransparency,
5608
5646
  selection: a.selection,
5609
- readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _116 => _116.live, 'access', _117 => _117.get, 'call', _118 => _118(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _119 => _119.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
5647
+ readTile: (tx, ty) => _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.live, 'access', _121 => _121.get, 'call', _122 => _122(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _123 => _123.data]), () => ( (this.base.defaultValue ? defaultTile(this.base) : null))),
5610
5648
  writeTile: (tx, ty) => {
5611
5649
  const key2 = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
5612
5650
  if (!this.touched.has(key2)) {
5613
- const src = _nullishCoalesce(_optionalChain([this, 'access', _120 => _120.base, 'access', _121 => _121.tiles, 'access', _122 => _122.get, 'call', _123 => _123(key2), 'optionalAccess', _124 => _124.data]), () => ( defaultTile(this.base)));
5651
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _124 => _124.base, 'access', _125 => _125.tiles, 'access', _126 => _126.get, 'call', _127 => _127(key2), 'optionalAccess', _128 => _128.data]), () => ( defaultTile(this.base)));
5614
5652
  this.live.set(key2, { data: new Uint8ClampedArray(src), uniform: null });
5615
5653
  this.touched.add(key2);
5616
5654
  }
@@ -5627,11 +5665,11 @@ var PaintStrokeSession = (_class11 = class {
5627
5665
  if (this.closed || !points.length) return;
5628
5666
  if (!this.started) {
5629
5667
  this.started = true;
5630
- if (_optionalChain([this, 'access', _125 => _125.retouch, 'optionalAccess', _126 => _126.kind]) === "coverage") this.retouch.start(points[0]);
5668
+ if (_optionalChain([this, 'access', _129 => _129.retouch, 'optionalAccess', _130 => _130.kind]) === "coverage") this.retouch.start(points[0]);
5631
5669
  }
5632
5670
  this.last = points[points.length - 1];
5633
5671
  const rects = this.mixer ? this.mixer.push(points) : this.stroke.push(points);
5634
- _optionalChain([this, 'access', _127 => _127.flushView, 'optionalCall', _128 => _128()]);
5672
+ _optionalChain([this, 'access', _131 => _131.flushView, 'optionalCall', _132 => _132()]);
5635
5673
  this.update(rects);
5636
5674
  }
5637
5675
  update(rects) {
@@ -5661,7 +5699,7 @@ var PaintStrokeSession = (_class11 = class {
5661
5699
  for (const [key2, { tx, ty, r }] of regions2) {
5662
5700
  if (this.deep) {
5663
5701
  const rt = this.retouch;
5664
- const paint = _optionalChain([rt, 'optionalAccess', _129 => _129.kind]) === "coverage" ? rt.paint() : null;
5702
+ const paint = _optionalChain([rt, 'optionalAccess', _133 => _133.kind]) === "coverage" ? rt.paint() : null;
5665
5703
  if (paint && paint.kind !== "tone") {
5666
5704
  const prevWork = this.touched.has(key2) ? this.work.get(key2) : void 0;
5667
5705
  this.touched.add(key2);
@@ -5672,13 +5710,13 @@ var PaintStrokeSession = (_class11 = class {
5672
5710
  const prev2 = this.touched.has(key2) ? this.liveDeep.get(key2) : void 0;
5673
5711
  this.touched.add(key2);
5674
5712
  const opts = prev2 ? { into: prev2, region: r, channels: ch } : { channels: ch };
5675
- const d = _optionalChain([rt, 'optionalAccess', _130 => _130.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _131 => _131.kind]) === "tone" ? _chunkYF3YZZ6Gcjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkPQ3H2AANcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
5713
+ const d = _optionalChain([rt, 'optionalAccess', _134 => _134.kind]) === "coverage" && _optionalChain([paint, 'optionalAccess', _135 => _135.kind]) === "tone" ? _chunkYF3YZZ6Gcjs.applyToneToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, paint.tone, rt.apply, opts) : _chunkPQ3H2AANcjs.applyStrokeToDeepTile.call(void 0, stroke.coverage, src2, tx, ty, this.apply, opts);
5676
5714
  this.liveDeep.set(key2, d);
5677
5715
  this.live.set(key2, { data: _chunkOLNIPTB3cjs.proxyOf.call(void 0, d, ch), uniform: null, deep: d });
5678
5716
  continue;
5679
5717
  }
5680
- const src = _nullishCoalesce(_optionalChain([this, 'access', _132 => _132.base, 'access', _133 => _133.tiles, 'access', _134 => _134.get, 'call', _135 => _135(key2), 'optionalAccess', _136 => _136.data]), () => ( defaultTile(this.base)));
5681
- const prev = this.touched.has(key2) ? _optionalChain([this, 'access', _137 => _137.live, 'access', _138 => _138.get, 'call', _139 => _139(key2), 'optionalAccess', _140 => _140.data]) : void 0;
5718
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _136 => _136.base, 'access', _137 => _137.tiles, 'access', _138 => _138.get, 'call', _139 => _139(key2), 'optionalAccess', _140 => _140.data]), () => ( defaultTile(this.base)));
5719
+ const prev = this.touched.has(key2) ? _optionalChain([this, 'access', _141 => _141.live, 'access', _142 => _142.get, 'call', _143 => _143(key2), 'optionalAccess', _144 => _144.data]) : void 0;
5682
5720
  this.touched.add(key2);
5683
5721
  const data = this.compositeTile(src, tx, ty, prev ? { into: prev, region: r } : {});
5684
5722
  this.live.set(key2, { data, uniform: null });
@@ -5690,12 +5728,12 @@ var PaintStrokeSession = (_class11 = class {
5690
5728
  if (this.closed) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("This stroke has already ended.");
5691
5729
  const last = _nullishCoalesce(this.last, () => ( void 0));
5692
5730
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
5693
- _optionalChain([this, 'access', _141 => _141.flushView, 'optionalCall', _142 => _142()]);
5731
+ _optionalChain([this, 'access', _145 => _145.flushView, 'optionalCall', _146 => _146()]);
5694
5732
  this.update(rects);
5695
5733
  this.closed = true;
5696
5734
  const ch = this.base.channels;
5697
5735
  const r = this.retouch;
5698
- if (_optionalChain([r, 'optionalAccess', _143 => _143.kind]) === "coverage" && r.finalPaint) {
5736
+ if (_optionalChain([r, 'optionalAccess', _147 => _147.kind]) === "coverage" && r.finalPaint) {
5699
5737
  const final = r.finalPaint(this.stroke.coverage);
5700
5738
  if (final) {
5701
5739
  for (const key2 of this.touched) {
@@ -5704,7 +5742,7 @@ var PaintStrokeSession = (_class11 = class {
5704
5742
  this.retouchDeepTile(key2, tx, ty, final, {});
5705
5743
  continue;
5706
5744
  }
5707
- const src = _nullishCoalesce(_optionalChain([this, 'access', _144 => _144.base, 'access', _145 => _145.tiles, 'access', _146 => _146.get, 'call', _147 => _147(key2), 'optionalAccess', _148 => _148.data]), () => ( defaultTile(this.base)));
5745
+ const src = _nullishCoalesce(_optionalChain([this, 'access', _148 => _148.base, 'access', _149 => _149.tiles, 'access', _150 => _150.get, 'call', _151 => _151(key2), 'optionalAccess', _152 => _152.data]), () => ( defaultTile(this.base)));
5708
5746
  this.live.set(key2, { data: this.compositeTile(src, tx, ty, {}, final), uniform: null });
5709
5747
  }
5710
5748
  }
@@ -5726,7 +5764,7 @@ var PaintStrokeSession = (_class11 = class {
5726
5764
  const b = this.mixer ? this.mixer.bounds : this.stroke.coverage.bounds;
5727
5765
  const result = { layerId: this.target.id, channel: this.target.channel, bounds: changed ? b : null, dabs: (_nullishCoalesce(this.mixer, () => ( this.stroke))).dabCount };
5728
5766
  if (mixerLoad) result.mixerLoad = mixerLoad;
5729
- if (_optionalChain([r, 'optionalAccess', _149 => _149.result])) Object.assign(result, r.result());
5767
+ if (_optionalChain([r, 'optionalAccess', _153 => _153.result])) Object.assign(result, r.result());
5730
5768
  return result;
5731
5769
  }
5732
5770
  /** Abandons the stroke and restores the layer. */
@@ -5852,14 +5890,14 @@ function migrateSerializedImageEditorState(data) {
5852
5890
  const legacy = data;
5853
5891
  const adjustments = normalizeStoredAdjustments(legacy.adjustments);
5854
5892
  return {
5855
- version: _optionalChain([adjustments, 'access', _150 => _150.layers, 'optionalAccess', _151 => _151.length]) ? 2 : 1,
5893
+ version: _optionalChain([adjustments, 'access', _154 => _154.layers, 'optionalAccess', _155 => _155.length]) ? 2 : 1,
5856
5894
  crop: legacy.crop ? { ...legacy.crop } : null,
5857
5895
  transform: { ...DEFAULT_TRANSFORM, ...legacy.transform },
5858
5896
  adjustments: serializeAdjustments(adjustments),
5859
5897
  depthMask: {
5860
5898
  ...DEFAULT_DEPTH_MASK,
5861
5899
  ...legacy.depthMask,
5862
- depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _152 => _152.depthMask, 'optionalAccess', _153 => _153.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
5900
+ depthRange: [..._nullishCoalesce(_optionalChain([legacy, 'access', _156 => _156.depthMask, 'optionalAccess', _157 => _157.depthRange]), () => ( DEFAULT_DEPTH_MASK.depthRange))]
5863
5901
  },
5864
5902
  annotations: JSON.parse(JSON.stringify(_nullishCoalesce(legacy.annotations, () => ( [])))),
5865
5903
  ...legacy.selection ? { selection: { ...legacy.selection } } : {}
@@ -5939,7 +5977,7 @@ var ImageEditorController = (_class12 = class {
5939
5977
  sourceIsOpaque: () => this.sourceIsOpaque(),
5940
5978
  version: () => `${this.sourceVersion()}:${this.patternsVersion()}`,
5941
5979
  globalLight: () => this.state.globalLight,
5942
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _154 => _154.state, 'access', _155 => _155.patterns, 'optionalAccess', _156 => _156.find, 'call', _157 => _157((p) => p.id === id)]), () => ( null))
5980
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _158 => _158.state, 'access', _159 => _159.patterns, 'optionalAccess', _160 => _160.find, 'call', _161 => _161((p) => p.id === id)]), () => ( null))
5943
5981
  };
5944
5982
  this.state = {
5945
5983
  sourceUrl: typeof options.image === "string" ? options.image : null,
@@ -5972,13 +6010,13 @@ var ImageEditorController = (_class12 = class {
5972
6010
  };
5973
6011
  }
5974
6012
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
5975
- if (_optionalChain([options, 'access', _158 => _158.initialState, 'optionalAccess', _159 => _159.selection])) {
6013
+ if (_optionalChain([options, 'access', _162 => _162.initialState, 'optionalAccess', _163 => _163.selection])) {
5976
6014
  try {
5977
6015
  this.state.selection = normalizeSelection(_chunkSS53NNZOcjs.deserializeSelection.call(void 0, options.initialState.selection));
5978
6016
  } catch (e23) {
5979
6017
  }
5980
6018
  }
5981
- if (_optionalChain([options, 'access', _160 => _160.initialState, 'optionalAccess', _161 => _161.channels])) {
6019
+ if (_optionalChain([options, 'access', _164 => _164.initialState, 'optionalAccess', _165 => _165.channels])) {
5982
6020
  const channels = deserializeChannels(options.initialState.channels, this.naturalSize, this.lastLoadProblems);
5983
6021
  if (channels.length) this.state.channels = channels;
5984
6022
  }
@@ -6003,6 +6041,10 @@ var ImageEditorController = (_class12 = class {
6003
6041
  this.state.imageDimensions = source.dimensions;
6004
6042
  if (!this.samplePixelsOverride) this.samplePixels = null;
6005
6043
  if (prev.width !== source.dimensions.width || prev.height !== source.dimensions.height) {
6044
+ const c = this.state.crop;
6045
+ if (c && c.x === 0 && c.y === 0 && c.width === prev.width && c.height === prev.height) {
6046
+ this.state.crop = { x: 0, y: 0, width: source.dimensions.width, height: source.dimensions.height };
6047
+ }
6006
6048
  this.state.layers = resizeLegacyMasks(this.state.layers, prev, source.dimensions);
6007
6049
  }
6008
6050
  this.dropMismatchedSelection();
@@ -6062,7 +6104,7 @@ var ImageEditorController = (_class12 = class {
6062
6104
  this.syncViews();
6063
6105
  this.syncDisplay();
6064
6106
  const currentState = { ...this.state };
6065
- _optionalChain([this, 'access', _162 => _162.onStateChange, 'optionalCall', _163 => _163(currentState)]);
6107
+ _optionalChain([this, 'access', _166 => _166.onStateChange, 'optionalCall', _167 => _167(currentState)]);
6066
6108
  this.listeners.forEach((l) => l(currentState));
6067
6109
  if (this.effects.provider) this.queueEffectRefresh("incomplete");
6068
6110
  }
@@ -6091,7 +6133,7 @@ var ImageEditorController = (_class12 = class {
6091
6133
  if (l.type === "group") {
6092
6134
  const children = walk(l.children);
6093
6135
  if (children !== l.children) next2 = { ...l, children };
6094
- } else if (l.type === "smart" && _optionalChain([l, 'access', _164 => _164.smartFilters, 'optionalAccess', _165 => _165.filters, 'access', _166 => _166.some, 'call', _167 => _167((f) => f.kind === "effect")]) && (all || _chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6136
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _168 => _168.smartFilters, 'optionalAccess', _169 => _169.filters, 'access', _170 => _170.some, 'call', _171 => _171((f) => f.kind === "effect")]) && (all || _chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
6095
6137
  try {
6096
6138
  const r = _chunkS55JFWDAcjs.rerender.call(void 0, l, canvas);
6097
6139
  if (all || !_chunkS55JFWDAcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
@@ -6120,7 +6162,7 @@ var ImageEditorController = (_class12 = class {
6120
6162
  * A worker that is cancelled or fails is replaced by a fresh one on the next job.
6121
6163
  */
6122
6164
  setSelectionWorker(factory) {
6123
- _optionalChain([this, 'access', _168 => _168.selectionWorker, 'optionalAccess', _169 => _169.terminate, 'call', _170 => _170()]);
6165
+ _optionalChain([this, 'access', _172 => _172.selectionWorker, 'optionalAccess', _173 => _173.terminate, 'call', _174 => _174()]);
6124
6166
  this.selectionWorker = factory ? new (0, _chunkUC3PWFM3cjs.SelectionWorkerClient)(factory) : null;
6125
6167
  }
6126
6168
  /** Sets (or with `null` removes) how new documents are opened (see `DocumentOpener`). Not an edit. */
@@ -6146,7 +6188,7 @@ var ImageEditorController = (_class12 = class {
6146
6188
  const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6147
6189
  if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A new document needs a pixel layer; "${id}" is a ${layer.type} layer.`);
6148
6190
  const sel = _nullishCoalesce(options.selection, () => ( this.state.selection));
6149
- if (!_optionalChain([sel, 'optionalAccess', _171 => _171.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what goes in the new document first.");
6191
+ if (!_optionalChain([sel, 'optionalAccess', _175 => _175.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what goes in the new document first.");
6150
6192
  const { width, height } = this.naturalSize;
6151
6193
  const surface = this.surfaceOf(layer);
6152
6194
  let copy;
@@ -6197,10 +6239,10 @@ var ImageEditorController = (_class12 = class {
6197
6239
  * `onProgress` hears its stages. The document is not changed.
6198
6240
  */
6199
6241
  async runSelectionJob(job, pixels, options = {}) {
6200
- _optionalChain([options, 'access', _172 => _172.signal, 'optionalAccess', _173 => _173.throwIfAborted, 'call', _174 => _174()]);
6242
+ _optionalChain([options, 'access', _176 => _176.signal, 'optionalAccess', _177 => _177.throwIfAborted, 'call', _178 => _178()]);
6201
6243
  if (this.selectionWorker) return this.selectionWorker.run(job, pixels, options);
6202
6244
  const result = _chunkUC3PWFM3cjs.runSelectionJob.call(void 0, job, pixels, options.onProgress);
6203
- _optionalChain([options, 'access', _175 => _175.signal, 'optionalAccess', _176 => _176.throwIfAborted, 'call', _177 => _177()]);
6245
+ _optionalChain([options, 'access', _179 => _179.signal, 'optionalAccess', _180 => _180.throwIfAborted, 'call', _181 => _181()]);
6204
6246
  return result;
6205
6247
  }
6206
6248
  /** Registers (or with `null` removes) the segmentation provider. Not an edit: no undo step. */
@@ -6275,8 +6317,8 @@ var ImageEditorController = (_class12 = class {
6275
6317
  */
6276
6318
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
6277
6319
  const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
6278
- const was = _optionalChain([layer, 'access', _178 => _178.smartFilters, 'optionalAccess', _179 => _179.filters, 'access', _180 => _180.find, 'call', _181 => _181((f) => f.id === filterId)]);
6279
- if (!was || was.kind !== "effect") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6320
+ const was = _optionalChain([layer, 'access', _182 => _182.smartFilters, 'optionalAccess', _183 => _183.filters, 'access', _184 => _184.find, 'call', _185 => _185((f) => f.id === filterId)]);
6321
+ if (!was || was.kind !== "effect") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _186 => _186.smartFilters, 'optionalAccess', _187 => _187.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
6280
6322
  const update = {};
6281
6323
  if (changes.values) {
6282
6324
  const d = await this.describeEffect(was.effect);
@@ -6318,7 +6360,7 @@ var ImageEditorController = (_class12 = class {
6318
6360
  const layer = {
6319
6361
  type: "pixel",
6320
6362
  id,
6321
- name: _optionalChain([options, 'access', _184 => _184.name, 'optionalAccess', _185 => _185.trim, 'call', _186 => _186()]) || d.name,
6363
+ name: _optionalChain([options, 'access', _188 => _188.name, 'optionalAccess', _189 => _189.trim, 'call', _190 => _190()]) || d.name,
6322
6364
  visible: true,
6323
6365
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
6324
6366
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -6343,7 +6385,7 @@ var ImageEditorController = (_class12 = class {
6343
6385
  */
6344
6386
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
6345
6387
  const found = _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, layerId);
6346
- const layer = _optionalChain([found, 'optionalAccess', _187 => _187.layer]);
6388
+ const layer = _optionalChain([found, 'optionalAccess', _191 => _191.layer]);
6347
6389
  if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
6348
6390
  _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
6349
6391
  const g = layer.generator;
@@ -6372,7 +6414,7 @@ var ImageEditorController = (_class12 = class {
6372
6414
  * and how long it runs, the longest of theirs (ms). Null when none animates.
6373
6415
  */
6374
6416
  getAnimation() {
6375
- const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _188 => _188.generator, 'optionalAccess', _189 => _189.animate]));
6417
+ const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => l.type === "pixel" && l.visible && !!_optionalChain([l, 'access', _192 => _192.generator, 'optionalAccess', _193 => _193.animate]));
6376
6418
  if (!layers.length) return null;
6377
6419
  return { duration: Math.max(...layers.map((l) => l.generator.animate.duration)), layerIds: layers.map((l) => l.id) };
6378
6420
  }
@@ -6389,7 +6431,7 @@ var ImageEditorController = (_class12 = class {
6389
6431
  const { width, height } = this.naturalSize;
6390
6432
  const surfaces = /* @__PURE__ */ new Map();
6391
6433
  for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers)) {
6392
- if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _190 => _190.generator, 'optionalAccess', _191 => _191.animate])) continue;
6434
+ if (l.type !== "pixel" || !l.visible || !_optionalChain([l, 'access', _194 => _194.generator, 'optionalAccess', _195 => _195.animate])) continue;
6393
6435
  const g = l.generator;
6394
6436
  const pixels = await this.effectsEngine.renderLayer(g.effect, g.values, { width, height, depth: this.bitDepth, time: (_nullishCoalesce(g.time, () => ( 0))) + time });
6395
6437
  surfaces.set(l.id, effectPixelsToSurface(pixels, this.bitDepth));
@@ -6450,8 +6492,8 @@ var ImageEditorController = (_class12 = class {
6450
6492
  transform: { ...s.transform },
6451
6493
  outputOpacity: s.outputOpacity,
6452
6494
  selection: _nullishCoalesce(s.selection, () => ( null)),
6453
- ..._optionalChain([s, 'access', _192 => _192.channels, 'optionalAccess', _193 => _193.length]) ? { channels: s.channels } : {},
6454
- ..._optionalChain([s, 'access', _194 => _194.paths, 'optionalAccess', _195 => _195.length]) ? { paths: s.paths } : {},
6495
+ ..._optionalChain([s, 'access', _196 => _196.channels, 'optionalAccess', _197 => _197.length]) ? { channels: s.channels } : {},
6496
+ ..._optionalChain([s, 'access', _198 => _198.paths, 'optionalAccess', _199 => _199.length]) ? { paths: s.paths } : {},
6455
6497
  source: {
6456
6498
  sourceUrl: s.sourceUrl,
6457
6499
  element: this.imageElement,
@@ -6487,11 +6529,11 @@ var ImageEditorController = (_class12 = class {
6487
6529
  if (entry.colorMode) s.colorMode = entry.colorMode;
6488
6530
  else delete s.colorMode;
6489
6531
  s.selection = entry.selection;
6490
- if (_optionalChain([entry, 'access', _196 => _196.channels, 'optionalAccess', _197 => _197.length])) s.channels = entry.channels;
6532
+ if (_optionalChain([entry, 'access', _200 => _200.channels, 'optionalAccess', _201 => _201.length])) s.channels = entry.channels;
6491
6533
  else delete s.channels;
6492
- if (_optionalChain([entry, 'access', _198 => _198.paths, 'optionalAccess', _199 => _199.length])) s.paths = entry.paths;
6534
+ if (_optionalChain([entry, 'access', _202 => _202.paths, 'optionalAccess', _203 => _203.length])) s.paths = entry.paths;
6493
6535
  else delete s.paths;
6494
- if (s.activePathId && !_optionalChain([s, 'access', _200 => _200.paths, 'optionalAccess', _201 => _201.some, 'call', _202 => _202((p) => p.id === s.activePathId)])) s.activePathId = null;
6536
+ if (s.activePathId && !_optionalChain([s, 'access', _204 => _204.paths, 'optionalAccess', _205 => _205.some, 'call', _206 => _206((p) => p.id === s.activePathId)])) s.activePathId = null;
6495
6537
  if (this.imageElement !== entry.source.element && !this.samplePixelsOverride) this.samplePixels = null;
6496
6538
  this.imageElement = entry.source.element;
6497
6539
  s.sourceUrl = entry.source.sourceUrl;
@@ -6697,7 +6739,7 @@ var ImageEditorController = (_class12 = class {
6697
6739
  return this.state.layers;
6698
6740
  }
6699
6741
  getLayer(id) {
6700
- return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _203 => _203.layer]);
6742
+ return _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, id), 'optionalAccess', _207 => _207.layer]);
6701
6743
  }
6702
6744
  /** The active layer, or `undefined`. */
6703
6745
  getActiveLayer() {
@@ -6710,7 +6752,7 @@ var ImageEditorController = (_class12 = class {
6710
6752
  setActiveLayer(id, target = "pixels") {
6711
6753
  if (id !== null && !this.getLayer(id)) return false;
6712
6754
  const layer = id ? this.getLayer(id) : void 0;
6713
- const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _204 => _204.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _205 => _205.type]) === "smart" && _optionalChain([layer, 'access', _206 => _206.smartFilters, 'optionalAccess', _207 => _207.mask]) ? "filter-mask" : "pixels";
6755
+ const t = target === "mask" && _optionalChain([layer, 'optionalAccess', _208 => _208.mask]) ? "mask" : target === "filter-mask" && _optionalChain([layer, 'optionalAccess', _209 => _209.type]) === "smart" && _optionalChain([layer, 'access', _210 => _210.smartFilters, 'optionalAccess', _211 => _211.mask]) ? "filter-mask" : "pixels";
6714
6756
  if (this.state.activeLayerId === id && this.state.activeTarget === t) return true;
6715
6757
  this.state.activeLayerId = id;
6716
6758
  this.state.activeTarget = t;
@@ -6872,7 +6914,7 @@ var ImageEditorController = (_class12 = class {
6872
6914
  surfaceOf: (l) => this.surfaceOf(l),
6873
6915
  version: `${this.sourceVersion()}:${this.patternsVersion()}`,
6874
6916
  globalLight: this.state.globalLight,
6875
- pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _208 => _208.state, 'access', _209 => _209.patterns, 'optionalAccess', _210 => _210.find, 'call', _211 => _211((p) => p.id === id)]), () => ( null))
6917
+ pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _212 => _212.state, 'access', _213 => _213.patterns, 'optionalAccess', _214 => _214.find, 'call', _215 => _215((p) => p.id === id)]), () => ( null))
6876
6918
  };
6877
6919
  }
6878
6920
  __init94() {this.sourceIds = /* @__PURE__ */ new WeakMap()}
@@ -6949,7 +6991,7 @@ var ImageEditorController = (_class12 = class {
6949
6991
  if (!ctx || typeof ctx.getImageData !== "function") return null;
6950
6992
  ctx.drawImage(el, 0, 0, width, height);
6951
6993
  const data = ctx.getImageData(0, 0, width, height);
6952
- if (!_optionalChain([data, 'optionalAccess', _212 => _212.data]) || data.data.length < width * height * 4) return null;
6994
+ if (!_optionalChain([data, 'optionalAccess', _216 => _216.data]) || data.data.length < width * height * 4) return null;
6953
6995
  return { width, height, data: data.data };
6954
6996
  } catch (e27) {
6955
6997
  return null;
@@ -6962,7 +7004,7 @@ var ImageEditorController = (_class12 = class {
6962
7004
  const prev = this.state.layers;
6963
7005
  const depth = this.bitDepth;
6964
7006
  this.state.layers = next;
6965
- _optionalChain([extra, 'optionalCall', _213 => _213()]);
7007
+ _optionalChain([extra, 'optionalCall', _217 => _217()]);
6966
7008
  if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
6967
7009
  if (this.state.activeLayerId && !_chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
6968
7010
  this.state.activeLayerId = _chunkS55JFWDAcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
@@ -7000,7 +7042,7 @@ var ImageEditorController = (_class12 = class {
7000
7042
  const layer = {
7001
7043
  type: "pixel",
7002
7044
  id: init.id && !ids.has(init.id) ? init.id : _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
7003
- name: _optionalChain([init, 'access', _214 => _214.name, 'optionalAccess', _215 => _215.trim, 'call', _216 => _216()]) || this.nextLayerName(),
7045
+ name: _optionalChain([init, 'access', _218 => _218.name, 'optionalAccess', _219 => _219.trim, 'call', _220 => _220()]) || this.nextLayerName(),
7004
7046
  visible: _nullishCoalesce(init.visible, () => ( true)),
7005
7047
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
7006
7048
  blend: _nullishCoalesce(blend, () => ( "normal")),
@@ -7027,7 +7069,7 @@ var ImageEditorController = (_class12 = class {
7027
7069
  async decodeImage(image) {
7028
7070
  const trimmed = image.trim();
7029
7071
  let png = null;
7030
- if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _217 => _217.bytes]), () => ( null));
7072
+ if (/^data:image\/png/i.test(trimmed)) png = _nullishCoalesce(_optionalChain([_chunkOLNIPTB3cjs.parseDataUrl.call(void 0, trimmed), 'optionalAccess', _221 => _221.bytes]), () => ( null));
7031
7073
  else if (/^[A-Za-z0-9+/=\s]+$/.test(trimmed) && trimmed.length > 16) {
7032
7074
  try {
7033
7075
  const bytes = _chunkOLNIPTB3cjs.base64ToBytes.call(void 0, trimmed);
@@ -7076,7 +7118,7 @@ var ImageEditorController = (_class12 = class {
7076
7118
  removeLayer(id) {
7077
7119
  const next = _chunkS55JFWDAcjs.removeLayer.call(void 0, this.state.layers, id);
7078
7120
  this.commitLayers(next, () => {
7079
- if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _218 => _218.id]) === this.state.selectedAnnotationId)) {
7121
+ if (this.state.selectedAnnotationId && !_chunkB46UQUDCcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _222 => _222.id]) === this.state.selectedAnnotationId)) {
7080
7122
  this.state.selectedAnnotationId = null;
7081
7123
  }
7082
7124
  });
@@ -7085,9 +7127,9 @@ var ImageEditorController = (_class12 = class {
7085
7127
  moveLayer(id, placement) {
7086
7128
  const next = _chunkS55JFWDAcjs.moveLayer.call(void 0, this.state.layers, id, placement);
7087
7129
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, next, id);
7088
- if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _219 => _219.parent, 'optionalAccess', _220 => _220.id]), () => ( null)), index: loc.index };
7130
+ if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _223 => _223.parent, 'optionalAccess', _224 => _224.id]), () => ( null)), index: loc.index };
7089
7131
  this.commitLayers(next);
7090
- return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _221 => _221.parent, 'optionalAccess', _222 => _222.id]), () => ( null)), index: loc.index };
7132
+ return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _225 => _225.parent, 'optionalAccess', _226 => _226.id]), () => ( null)), index: loc.index };
7091
7133
  }
7092
7134
  /** A layer's edge colour as percentages (see `setEdgeColor`). */
7093
7135
  getEdgeColor(id) {
@@ -7183,7 +7225,7 @@ var ImageEditorController = (_class12 = class {
7183
7225
  const group = {
7184
7226
  type: "group",
7185
7227
  id: _chunkS55JFWDAcjs.newLayerId.call(void 0, "group"),
7186
- name: _optionalChain([init, 'access', _223 => _223.name, 'optionalAccess', _224 => _224.trim, 'call', _225 => _225()]) || "Group",
7228
+ name: _optionalChain([init, 'access', _227 => _227.name, 'optionalAccess', _228 => _228.trim, 'call', _229 => _229()]) || "Group",
7187
7229
  visible: true,
7188
7230
  opacity: 1,
7189
7231
  blend,
@@ -7276,7 +7318,7 @@ var ImageEditorController = (_class12 = class {
7276
7318
  sel = this.layerTransparency(id);
7277
7319
  } else {
7278
7320
  const current = this.state.selection;
7279
- if (!_optionalChain([current, 'optionalAccess', _226 => _226.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7321
+ if (!_optionalChain([current, 'optionalAccess', _230 => _230.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all / transparency.");
7280
7322
  sel = from === "hide-selection" ? _chunkSS53NNZOcjs.invertSelection.call(void 0, current) : current;
7281
7323
  }
7282
7324
  mask = this.maskFromSelection(sel, props);
@@ -7307,7 +7349,7 @@ var ImageEditorController = (_class12 = class {
7307
7349
  const layer = _chunkS55JFWDAcjs.requireLayer.call(void 0, this.state.layers, id).layer;
7308
7350
  const name = layer.name || id;
7309
7351
  if (layer.type === "shape") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is a shape layer, whose path already is its vector mask; change it with set_shape_component, or rasterize the layer first.`);
7310
- if (_optionalChain([layer, 'access', _227 => _227.mask, 'optionalAccess', _228 => _228.source])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
7352
+ if (_optionalChain([layer, 'access', _231 => _231.mask, 'optionalAccess', _232 => _232.source])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which cannot be combined with a vector mask; remove the depth mask first.`);
7311
7353
  return layer;
7312
7354
  }
7313
7355
  requireVectorMask(id) {
@@ -7317,10 +7359,10 @@ var ImageEditorController = (_class12 = class {
7317
7359
  }
7318
7360
  /** Components from a path spec: `components`, or one `shape` / `subpaths`. */
7319
7361
  vectorMaskComponents(path) {
7320
- if (_optionalChain([path, 'access', _229 => _229.components, 'optionalAccess', _230 => _230.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7362
+ if (_optionalChain([path, 'access', _233 => _233.components, 'optionalAccess', _234 => _234.length]) && (path.shape !== void 0 || path.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
7321
7363
  if (path.fillRule !== void 0 && path.fillRule !== "nonzero" && path.fillRule !== "evenodd") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
7322
- const specs = _optionalChain([path, 'access', _231 => _231.components, 'optionalAccess', _232 => _232.length]) ? path.components : [path];
7323
- return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _233 => _233.components, 'optionalAccess', _234 => _234.length]) ? `components[${i}].` : ""));
7364
+ const specs = _optionalChain([path, 'access', _235 => _235.components, 'optionalAccess', _236 => _236.length]) ? path.components : [path];
7365
+ return specs.map((c, i) => this.componentFrom(c, _optionalChain([path, 'access', _237 => _237.components, 'optionalAccess', _238 => _238.length]) ? `components[${i}].` : ""));
7324
7366
  }
7325
7367
  /**
7326
7368
  * Layer › Vector Mask: `reveal-all` (an empty path showing everything), `hide-all` (an empty path
@@ -7337,7 +7379,7 @@ var ImageEditorController = (_class12 = class {
7337
7379
  vm = { components: this.vectorMaskComponents(path) };
7338
7380
  if (path.fillRule === "evenodd") vm.fillRule = "evenodd";
7339
7381
  } else if (from === "reveal-all" || from === "hide-all") {
7340
- if (_optionalChain([path, 'access', _235 => _235.components, 'optionalAccess', _236 => _236.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
7382
+ if (_optionalChain([path, 'access', _239 => _239.components, 'optionalAccess', _240 => _240.length]) || path.shape !== void 0 || path.subpaths !== void 0) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${from} vector mask starts empty; use from path to give a path.`);
7341
7383
  vm = { components: [], ...from === "reveal-all" ? { inverted: true } : {} };
7342
7384
  } else {
7343
7385
  throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown vector mask source "${String(from)}". Use reveal-all, hide-all, path or selection.`);
@@ -7348,7 +7390,7 @@ var ImageEditorController = (_class12 = class {
7348
7390
  /** The selection's outline as subpaths; throws when nothing is selected or nothing is left to trace. */
7349
7391
  traceSelection(options) {
7350
7392
  const sel = this.state.selection;
7351
- if (!_optionalChain([sel, 'optionalAccess', _237 => _237.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7393
+ if (!_optionalChain([sel, 'optionalAccess', _241 => _241.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then make a path from the selection.");
7352
7394
  if (options.tolerance !== void 0 && !(options.tolerance >= 0.1 && options.tolerance <= 10)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("tolerance must be from 0.1 to 10 px.");
7353
7395
  const subpaths = selectionToSubpaths(sel, options);
7354
7396
  if (!subpaths.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The selection is too small or too faint to trace (below minArea, or under half selected); lower minArea or threshold.");
@@ -7388,7 +7430,7 @@ var ImageEditorController = (_class12 = class {
7388
7430
  return _nullishCoalesce(this.state.paths, () => ( []));
7389
7431
  }
7390
7432
  getPath(id) {
7391
- return _nullishCoalesce(_optionalChain([this, 'access', _238 => _238.state, 'access', _239 => _239.paths, 'optionalAccess', _240 => _240.find, 'call', _241 => _241((p) => p.id === id)]), () => ( null));
7433
+ return _nullishCoalesce(_optionalChain([this, 'access', _242 => _242.state, 'access', _243 => _243.paths, 'optionalAccess', _244 => _244.find, 'call', _245 => _245((p) => p.id === id)]), () => ( null));
7392
7434
  }
7393
7435
  requirePath(id) {
7394
7436
  const path = this.getPath(id);
@@ -7421,14 +7463,14 @@ var ImageEditorController = (_class12 = class {
7421
7463
  const subpaths = this.traceSelection(options);
7422
7464
  const paths = this.getPaths();
7423
7465
  const old = paths.find((p) => p.work);
7424
- const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _242 => _242.id]), () => ( newPathId())), name: WORK_PATH_NAME, components: [{ op: "combine", subpaths }], fillRule: "evenodd", work: true };
7466
+ const work = { id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _246 => _246.id]), () => ( newPathId())), name: WORK_PATH_NAME, components: [{ op: "combine", subpaths }], fillRule: "evenodd", work: true };
7425
7467
  this.commitPaths(old ? paths.map((p) => p === old ? work : p) : [...paths, work], work.id);
7426
7468
  return work;
7427
7469
  }
7428
7470
  /** A new saved path from geometry (`shape`, `subpaths` or `components`). One undo step. */
7429
7471
  addPath(input) {
7430
7472
  const paths = this.getPaths();
7431
- const path = { id: newPathId(), name: _optionalChain([input, 'access', _243 => _243.name, 'optionalAccess', _244 => _244.trim, 'call', _245 => _245()]) || `Path ${paths.filter((p) => !p.work).length + 1}`, components: this.vectorMaskComponents(input) };
7473
+ const path = { id: newPathId(), name: _optionalChain([input, 'access', _247 => _247.name, 'optionalAccess', _248 => _248.trim, 'call', _249 => _249()]) || `Path ${paths.filter((p) => !p.work).length + 1}`, components: this.vectorMaskComponents(input) };
7432
7474
  if (input.fillRule === "evenodd") path.fillRule = "evenodd";
7433
7475
  this.commitPaths([...paths.filter((p) => !p.work), path, ...paths.filter((p) => p.work)], path.id);
7434
7476
  return path;
@@ -7492,7 +7534,7 @@ var ImageEditorController = (_class12 = class {
7492
7534
  const paths = this.getPaths();
7493
7535
  const old = paths.find((p) => p.work);
7494
7536
  const work = {
7495
- id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _246 => _246.id]), () => ( newPathId())),
7537
+ id: _nullishCoalesce(_optionalChain([old, 'optionalAccess', _250 => _250.id]), () => ( newPathId())),
7496
7538
  name: WORK_PATH_NAME,
7497
7539
  components: components.map((c, i) => this.componentFrom({ op: c.op, subpaths: c.subpaths }, `components[${i}].`)),
7498
7540
  work: true
@@ -7513,7 +7555,7 @@ var ImageEditorController = (_class12 = class {
7513
7555
  /** Duplicates a path as a saved path. One undo step. */
7514
7556
  duplicatePath(id, name) {
7515
7557
  const old = this.requirePath(id);
7516
- const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess', _247 => _247.trim, 'call', _248 => _248()]) || `${old.name} copy`, components: JSON.parse(JSON.stringify(old.components)) };
7558
+ const copy = { ...old, id: newPathId(), name: _optionalChain([name, 'optionalAccess', _251 => _251.trim, 'call', _252 => _252()]) || `${old.name} copy`, components: JSON.parse(JSON.stringify(old.components)) };
7517
7559
  delete copy.work;
7518
7560
  const paths = this.getPaths();
7519
7561
  this.commitPaths([...paths.filter((p) => !p.work), copy, ...paths.filter((p) => p.work)], copy.id);
@@ -7719,7 +7761,7 @@ var ImageEditorController = (_class12 = class {
7719
7761
  const layer = loc.layer;
7720
7762
  if (layer.type !== "pixel") throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
7721
7763
  const sel = this.state.selection;
7722
- if (!_optionalChain([sel, 'optionalAccess', _249 => _249.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7764
+ if (!_optionalChain([sel, 'optionalAccess', _253 => _253.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
7723
7765
  if (options.cut) _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
7724
7766
  const surface = this.surfaceOf(layer);
7725
7767
  const sb = sel.bounds;
@@ -7737,14 +7779,14 @@ var ImageEditorController = (_class12 = class {
7737
7779
  const copy = {
7738
7780
  type: "pixel",
7739
7781
  id: _chunkS55JFWDAcjs.newLayerId.call(void 0, ),
7740
- name: _optionalChain([options, 'access', _250 => _250.name, 'optionalAccess', _251 => _251.trim, 'call', _252 => _252()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7782
+ name: _optionalChain([options, 'access', _254 => _254.name, 'optionalAccess', _255 => _255.trim, 'call', _256 => _256()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
7741
7783
  visible: true,
7742
7784
  opacity: 1,
7743
7785
  blend: "normal",
7744
7786
  surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width: src.width, height: src.height, data: px2 }, 4, src.x, src.y),
7745
7787
  offset: { ...layer.offset }
7746
7788
  };
7747
- let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _253 => _253.parent, 'optionalAccess', _254 => _254.id]), () => ( null)), loc.index + 1);
7789
+ let next = _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _257 => _257.parent, 'optionalAccess', _258 => _258.id]), () => ( null)), loc.index + 1);
7748
7790
  if (kept) {
7749
7791
  const cutLayer = { ...layer, surface: _chunk474IQG74cjs.writeRegion.call(void 0, surface, src, kept) };
7750
7792
  delete cutLayer.source;
@@ -7768,7 +7810,7 @@ var ImageEditorController = (_class12 = class {
7768
7810
  layers: () => this.state.layers,
7769
7811
  activeLayerId: () => this.state.activeLayerId,
7770
7812
  activeTarget: () => this.state.activeTarget,
7771
- selection: () => _optionalChain([this, 'access', _255 => _255.state, 'access', _256 => _256.selection, 'optionalAccess', _257 => _257.bounds]) ? this.state.selection : null,
7813
+ selection: () => _optionalChain([this, 'access', _259 => _259.state, 'access', _260 => _260.selection, 'optionalAccess', _261 => _261.bounds]) ? this.state.selection : null,
7772
7814
  canvas: () => this.naturalSize,
7773
7815
  pixelsOf: (layer) => this.surfaceOf(layer),
7774
7816
  shapeEnv: () => this.shapeEnv(),
@@ -7916,7 +7958,7 @@ var ImageEditorController = (_class12 = class {
7916
7958
  * anything else nests as a layer document. Returns the smart object's id.
7917
7959
  */
7918
7960
  convertToSmartObject(ids, options = {}) {
7919
- const list = _optionalChain([ids, 'optionalAccess', _258 => _258.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7961
+ const list = _optionalChain([ids, 'optionalAccess', _262 => _262.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
7920
7962
  if (!list.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
7921
7963
  const res = _chunkS55JFWDAcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
7922
7964
  this.commitLayers(res.layers, () => {
@@ -7949,8 +7991,8 @@ var ImageEditorController = (_class12 = class {
7949
7991
  width: c.width,
7950
7992
  height: c.height,
7951
7993
  decoded: _chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c),
7952
- fileType: _nullishCoalesce(_optionalChain([c, 'access', _259 => _259.file, 'optionalAccess', _260 => _260.type]), () => ( null)),
7953
- linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _261 => _261.linked, 'optionalAccess', _262 => _262.path]), () => ( null)),
7994
+ fileType: _nullishCoalesce(_optionalChain([c, 'access', _263 => _263.file, 'optionalAccess', _264 => _264.type]), () => ( null)),
7995
+ linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _265 => _265.linked, 'optionalAccess', _266 => _266.path]), () => ( null)),
7954
7996
  instances: _chunkS55JFWDAcjs.instancesOf.call(void 0, this.state.layers, c.id),
7955
7997
  layerCount: c.document ? _chunkB46UQUDCcjs.flattenLayers.call(void 0, c.document.layers).length : 0
7956
7998
  },
@@ -7967,9 +8009,9 @@ var ImageEditorController = (_class12 = class {
7967
8009
  bounds: _chunkS55JFWDAcjs.transformedBox.call(void 0, g)
7968
8010
  },
7969
8011
  smartFilters: {
7970
- enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _263 => _263.enabled]), () => ( true)),
7971
- filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _264 => _264.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
7972
- mask: _optionalChain([stack, 'optionalAccess', _265 => _265.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunk474IQG74cjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
8012
+ enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _267 => _267.enabled]), () => ( true)),
8013
+ filters: (_nullishCoalesce(_optionalChain([stack, 'optionalAccess', _268 => _268.filters]), () => ( []))).map((f) => f.kind === "psd" ? { id: f.id, kind: "psd", name: f.name, enabled: f.enabled, blend: f.blend, opacity: f.opacity } : { ...f }),
8014
+ mask: _optionalChain([stack, 'optionalAccess', _269 => _269.mask]) ? { enabled: stack.mask.enabled !== false, linked: stack.mask.linked !== false, density: _nullishCoalesce(stack.mask.density, () => ( 1)), feather: _nullishCoalesce(stack.mask.feather, () => ( 0)), bounds: _chunk474IQG74cjs.contentBounds.call(void 0, stack.mask.surface), defaultValue: stack.mask.defaultValue } : null
7973
8015
  },
7974
8016
  bounds: this.getLayerBounds(id)
7975
8017
  };
@@ -8108,7 +8150,7 @@ var ImageEditorController = (_class12 = class {
8108
8150
  * it in the same undo step (Photoshop limits a filter to the selection). Returns whether it did.
8109
8151
  */
8110
8152
  maskFiltersWithSelection(id, useSelection) {
8111
- if (!useSelection || !_optionalChain([this, 'access', _266 => _266.state, 'access', _267 => _267.selection, 'optionalAccess', _268 => _268.bounds])) return false;
8153
+ if (!useSelection || !_optionalChain([this, 'access', _270 => _270.state, 'access', _271 => _271.selection, 'optionalAccess', _272 => _272.bounds])) return false;
8112
8154
  this.setSmartFilterMask(id, "selection", {}, false);
8113
8155
  return true;
8114
8156
  }
@@ -8122,19 +8164,19 @@ var ImageEditorController = (_class12 = class {
8122
8164
  removeSmartFilter(id, filterId) {
8123
8165
  const res = _chunkS55JFWDAcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
8124
8166
  this.commitLayers(res.layers);
8125
- return _nullishCoalesce(_optionalChain([res, 'access', _269 => _269.layer, 'access', _270 => _270.smartFilters, 'optionalAccess', _271 => _271.filters]), () => ( []));
8167
+ return _nullishCoalesce(_optionalChain([res, 'access', _273 => _273.layer, 'access', _274 => _274.smartFilters, 'optionalAccess', _275 => _275.filters]), () => ( []));
8126
8168
  }
8127
8169
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
8128
8170
  moveSmartFilter(id, filterId, index) {
8129
8171
  const res = _chunkS55JFWDAcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
8130
8172
  this.commitLayers(res.layers);
8131
- return _nullishCoalesce(_optionalChain([res, 'access', _272 => _272.layer, 'access', _273 => _273.smartFilters, 'optionalAccess', _274 => _274.filters]), () => ( []));
8173
+ return _nullishCoalesce(_optionalChain([res, 'access', _276 => _276.layer, 'access', _277 => _277.smartFilters, 'optionalAccess', _278 => _278.filters]), () => ( []));
8132
8174
  }
8133
8175
  /** Turns a smart object's whole filter stack on or off (one undo step). */
8134
8176
  setSmartFiltersEnabled(id, enabled) {
8135
8177
  const res = _chunkS55JFWDAcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
8136
8178
  this.commitLayers(res.layers);
8137
- return _nullishCoalesce(_optionalChain([res, 'access', _275 => _275.layer, 'access', _276 => _276.smartFilters, 'optionalAccess', _277 => _277.enabled]), () => ( true));
8179
+ return _nullishCoalesce(_optionalChain([res, 'access', _279 => _279.layer, 'access', _280 => _280.smartFilters, 'optionalAccess', _281 => _281.enabled]), () => ( true));
8138
8180
  }
8139
8181
  /**
8140
8182
  * Sets the smart filter mask (one undo step): `reveal-all`, `hide-all`, `selection` (the
@@ -8146,11 +8188,11 @@ var ImageEditorController = (_class12 = class {
8146
8188
  let mask;
8147
8189
  if (from === "none") mask = null;
8148
8190
  else if (from === "keep") {
8149
- if (!_optionalChain([layer, 'access', _278 => _278.smartFilters, 'optionalAccess', _279 => _279.mask])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
8191
+ if (!_optionalChain([layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
8150
8192
  mask = withMaskProps(layer.smartFilters.mask, props);
8151
8193
  } else if (from === "selection") {
8152
8194
  const sel = this.state.selection;
8153
- if (!_optionalChain([sel, 'optionalAccess', _280 => _280.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8195
+ if (!_optionalChain([sel, 'optionalAccess', _284 => _284.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
8154
8196
  mask = this.maskFromSelection(sel, props);
8155
8197
  } else {
8156
8198
  const v = from === "reveal-all" ? 255 : 0;
@@ -8162,7 +8204,7 @@ var ImageEditorController = (_class12 = class {
8162
8204
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
8163
8205
  else if (!mask && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
8164
8206
  }, commitToHistory);
8165
- return _nullishCoalesce(_optionalChain([res, 'access', _281 => _281.layer, 'access', _282 => _282.smartFilters, 'optionalAccess', _283 => _283.mask]), () => ( null));
8207
+ return _nullishCoalesce(_optionalChain([res, 'access', _285 => _285.layer, 'access', _286 => _286.smartFilters, 'optionalAccess', _287 => _287.mask]), () => ( null));
8166
8208
  }
8167
8209
  /**
8168
8210
  * Decodes smart object contents that came as files the synchronous decoders cannot read (a JPEG
@@ -8210,7 +8252,7 @@ var ImageEditorController = (_class12 = class {
8210
8252
  if (this.getFreeTransform()) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
8211
8253
  const layer = _chunkS55JFWDAcjs.requireSmartObject.call(void 0, this.state.layers, id);
8212
8254
  const c = layer.contents;
8213
- if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _284 => _284.file, 'optionalAccess', _285 => _285.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8255
+ if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _288 => _288.file, 'optionalAccess', _289 => _289.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
8214
8256
  const saved = {
8215
8257
  state: { ...this.state },
8216
8258
  undo: this.undoStack,
@@ -8241,9 +8283,9 @@ var ImageEditorController = (_class12 = class {
8241
8283
  editingContents: this.getEditingContents()
8242
8284
  };
8243
8285
  delete this.state.legacyOutputBlur;
8244
- if (_optionalChain([c, 'access', _286 => _286.document, 'optionalAccess', _287 => _287.globalLight])) this.state.globalLight = c.document.globalLight;
8286
+ if (_optionalChain([c, 'access', _290 => _290.document, 'optionalAccess', _291 => _291.globalLight])) this.state.globalLight = c.document.globalLight;
8245
8287
  else delete this.state.globalLight;
8246
- if (_optionalChain([c, 'access', _288 => _288.document, 'optionalAccess', _289 => _289.patterns, 'optionalAccess', _290 => _290.length])) this.state.patterns = c.document.patterns;
8288
+ if (_optionalChain([c, 'access', _292 => _292.document, 'optionalAccess', _293 => _293.patterns, 'optionalAccess', _294 => _294.length])) this.state.patterns = c.document.patterns;
8247
8289
  else delete this.state.patterns;
8248
8290
  this.imageElement = null;
8249
8291
  this.samplePixels = null;
@@ -8263,23 +8305,23 @@ var ImageEditorController = (_class12 = class {
8263
8305
  closeSmartObjectContents(save = true) {
8264
8306
  const top = this.contentsStack.pop();
8265
8307
  if (!top) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
8266
- if (_optionalChain([this, 'access', _291 => _291.openTransform, 'optionalAccess', _292 => _292.isOpen])) this.openTransform.cancel();
8308
+ if (_optionalChain([this, 'access', _295 => _295.openTransform, 'optionalAccess', _296 => _296.isOpen])) this.openTransform.cancel();
8267
8309
  this.openTransform = null;
8268
8310
  const edited = this.state;
8269
8311
  const changed = save && this.undoStack.length > 0;
8270
8312
  let next = null;
8271
8313
  if (changed) {
8272
- const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _293 => _293.layer]);
8273
- const old = _optionalChain([layer, 'optionalAccess', _294 => _294.contents]);
8314
+ const layer = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, top.saved.state.layers, top.layerId), 'optionalAccess', _297 => _297.layer]);
8315
+ const old = _optionalChain([layer, 'optionalAccess', _298 => _298.contents]);
8274
8316
  const { width, height } = edited.imageDimensions;
8275
8317
  const only = edited.layers.length === 1 ? edited.layers[0] : null;
8276
- const plain3 = _optionalChain([only, 'optionalAccess', _295 => _295.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _296 => _296.filters, 'optionalAccess', _297 => _297.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8277
- if (_optionalChain([old, 'optionalAccess', _298 => _298.kind]) === "raster" && plain3) {
8318
+ const plain3 = _optionalChain([only, 'optionalAccess', _299 => _299.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _300 => _300.filters, 'optionalAccess', _301 => _301.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
8319
+ if (_optionalChain([old, 'optionalAccess', _302 => _302.kind]) === "raster" && plain3) {
8278
8320
  const px2 = _chunk474IQG74cjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
8279
8321
  next = _chunkS55JFWDAcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
8280
8322
  } else {
8281
8323
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
8282
- next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _299 => _299.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _300 => _300.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8324
+ next = _chunkS55JFWDAcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _303 => _303.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _304 => _304.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
8283
8325
  }
8284
8326
  }
8285
8327
  const saved = top.saved;
@@ -8304,7 +8346,7 @@ var ImageEditorController = (_class12 = class {
8304
8346
  }
8305
8347
  /** The document's own layers (not the contents open for editing). */
8306
8348
  rootLayers() {
8307
- return _nullishCoalesce(_optionalChain([this, 'access', _301 => _301.contentsStack, 'access', _302 => _302[0], 'optionalAccess', _303 => _303.saved, 'access', _304 => _304.state, 'access', _305 => _305.layers]), () => ( this.state.layers));
8349
+ return _nullishCoalesce(_optionalChain([this, 'access', _305 => _305.contentsStack, 'access', _306 => _306[0], 'optionalAccess', _307 => _307.saved, 'access', _308 => _308.state, 'access', _309 => _309.layers]), () => ( this.state.layers));
8308
8350
  }
8309
8351
  /** Drops every open contents edit (loading another document). */
8310
8352
  abandonContents() {
@@ -8525,7 +8567,7 @@ var ImageEditorController = (_class12 = class {
8525
8567
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
8526
8568
  const key2 = `${tw}x${th}:${ox},${oy}`;
8527
8569
  let byKey = this.thumbCache.get(surface);
8528
- const hit = _optionalChain([byKey, 'optionalAccess', _306 => _306.get, 'call', _307 => _307(key2)]);
8570
+ const hit = _optionalChain([byKey, 'optionalAccess', _310 => _310.get, 'call', _311 => _311(key2)]);
8529
8571
  if (hit) return hit;
8530
8572
  const out = new Uint8ClampedArray(tw * th * 4);
8531
8573
  for (let y = 0; y < th; y++) {
@@ -8666,7 +8708,7 @@ var ImageEditorController = (_class12 = class {
8666
8708
  if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
8667
8709
  _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "all", action);
8668
8710
  } else if (ch === "filter-mask") {
8669
- if (layer.type !== "smart" || !_optionalChain([layer, 'access', _308 => _308.smartFilters, 'optionalAccess', _309 => _309.mask])) {
8711
+ if (layer.type !== "smart" || !_optionalChain([layer, 'access', _312 => _312.smartFilters, 'optionalAccess', _313 => _313.mask])) {
8670
8712
  throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
8671
8713
  }
8672
8714
  if (!_chunkS55JFWDAcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
@@ -8681,7 +8723,7 @@ var ImageEditorController = (_class12 = class {
8681
8723
  if (!layer.visible) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
8682
8724
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
8683
8725
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
8684
- const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _310 => _310.locks, 'optionalAccess', _311 => _311.transparency]));
8726
+ const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _314 => _314.locks, 'optionalAccess', _315 => _315.transparency]));
8685
8727
  return { id, layer, channel: ch, offset, surface, lockTransparency };
8686
8728
  }
8687
8729
  /** The layer with its pixels (or mask) replaced by `surface`. */
@@ -8725,13 +8767,13 @@ var ImageEditorController = (_class12 = class {
8725
8767
  blend: target.channel !== "pixels" ? "normal" : brush.blend,
8726
8768
  lockTransparency: target.lockTransparency,
8727
8769
  // In Quick Mask mode the selection is what is painted, so it does not limit the stroke.
8728
- selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _312 => _312.state, 'access', _313 => _313.selection, 'optionalAccess', _314 => _314.bounds]) ? this.state.selection : null,
8770
+ selection: target.channel !== "quick-mask" && _optionalChain([this, 'access', _316 => _316.state, 'access', _317 => _317.selection, 'optionalAccess', _318 => _318.bounds]) ? this.state.selection : null,
8729
8771
  offset: target.offset
8730
8772
  };
8731
8773
  const depth = target.channel !== "filter-mask" && target.channel !== "quick-mask" && this.bitDepth !== 8 ? this.bitDepth : null;
8732
8774
  if (tool === "mixer") return new PaintStrokeSession(this, target, this.mixerStroke(init, brush), apply, depth);
8733
8775
  if (isRetouchTool(tool)) return new PaintStrokeSession(this, target, this.retouchStroke(tool, init, brush, target, apply), apply, depth);
8734
- const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _315 => _315.type]) === "gradient" ? _chunkPQ3H2AANcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8776
+ const gradient = tool === "brush" && _optionalChain([strokePaint, 'optionalAccess', _319 => _319.type]) === "gradient" ? _chunkPQ3H2AANcjs.resolvePaintGradient.call(void 0, strokePaint, { paint: toHex(color), secondary: toHex(background) }) : null;
8735
8777
  return new PaintStrokeSession(this, target, new (0, _chunkPQ3H2AANcjs.StrokeCoverage)(brush, gradient, _nullishCoalesce(init.seed, () => ( 0))), apply, depth);
8736
8778
  }
8737
8779
  /** A retouching stroke's start: its settings, what it samples and how it composites. */
@@ -8778,9 +8820,9 @@ var ImageEditorController = (_class12 = class {
8778
8820
  const steps = settings.historySteps;
8779
8821
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
8780
8822
  if (!entry) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
8781
- const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _316 => _316.layer]);
8823
+ const then = _optionalChain([_chunkB46UQUDCcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _320 => _320.layer]);
8782
8824
  if (!then) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
8783
- const surface = target.channel === "mask" ? _optionalChain([then, 'access', _317 => _317.mask, 'optionalAccess', _318 => _318.surface]) : then.type === "pixel" ? then.surface : void 0;
8825
+ const surface = target.channel === "mask" ? _optionalChain([then, 'access', _321 => _321.mask, 'optionalAccess', _322 => _322.surface]) : then.type === "pixel" ? then.surface : void 0;
8784
8826
  if (!surface) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
8785
8827
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
8786
8828
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
@@ -8854,7 +8896,7 @@ var ImageEditorController = (_class12 = class {
8854
8896
  }
8855
8897
  /** A pixel source over a surface (layer pixels or a mask) in layer space at `offset`. */
8856
8898
  surfaceSource(surface, offset) {
8857
- return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _319 => _319.tiles, 'access', _320 => _320.get, 'call', _321 => _321(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _322 => _322.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
8899
+ return new (0, _chunkYF3YZZ6Gcjs.TilePixelSource)((tx, ty) => _nullishCoalesce(_optionalChain([surface, 'access', _323 => _323.tiles, 'access', _324 => _324.get, 'call', _325 => _325(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _326 => _326.data]), () => ( (surface.defaultValue ? defaultTile(surface) : null))), surface.channels, offset);
8858
8900
  }
8859
8901
  /** A pixel source over the composite of the current layers (through `throughId` and below, or all of them), as it is now. */
8860
8902
  compositeSource(throughId, depth = null) {
@@ -8930,7 +8972,7 @@ var ImageEditorController = (_class12 = class {
8930
8972
  paintStroke(init) {
8931
8973
  if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("points must hold at least one { x, y } point.");
8932
8974
  for (const p of init.points) {
8933
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _323 => _323.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _324 => _324.y]))) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
8975
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _327 => _327.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _328 => _328.y]))) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
8934
8976
  }
8935
8977
  const session = this.beginStroke(init);
8936
8978
  session.push(init.points);
@@ -8959,7 +9001,7 @@ var ImageEditorController = (_class12 = class {
8959
9001
  */
8960
9002
  strokeSelection(options) {
8961
9003
  const sel = this.state.selection;
8962
- if (!_optionalChain([sel, 'optionalAccess', _325 => _325.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
9004
+ if (!_optionalChain([sel, 'optionalAccess', _329 => _329.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then stroke the selection.");
8963
9005
  const width = options.width;
8964
9006
  if (!(width > 0 && width <= 250)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("width must be greater than 0 and at most 250 px.");
8965
9007
  const location = _nullishCoalesce(options.location, () => ( "outside"));
@@ -8976,7 +9018,7 @@ var ImageEditorController = (_class12 = class {
8976
9018
  */
8977
9019
  cropToSelection() {
8978
9020
  const sel = this.state.selection;
8979
- if (!_optionalChain([sel, 'optionalAccess', _326 => _326.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
9021
+ if (!_optionalChain([sel, 'optionalAccess', _330 => _330.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select the area to keep, then crop to it.");
8980
9022
  const crop = { ...sel.bounds };
8981
9023
  this.setCrop(crop);
8982
9024
  return crop;
@@ -9027,7 +9069,7 @@ var ImageEditorController = (_class12 = class {
9027
9069
  */
9028
9070
  prepareContentAwareFill(options = {}) {
9029
9071
  const sel = this.state.selection;
9030
- if (!_optionalChain([sel, 'optionalAccess', _327 => _327.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9072
+ if (!_optionalChain([sel, 'optionalAccess', _331 => _331.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select what to remove, then fill it.");
9031
9073
  if (this.bitDepth !== 8) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Content-Aware Fill works on 8-bit documents for now; set_bit_depth 8 first, or use spot_heal.");
9032
9074
  const output = _nullishCoalesce(options.output, () => ( "current"));
9033
9075
  if (output !== "current" && output !== "new-layer" && output !== "duplicate-layer") {
@@ -9038,12 +9080,12 @@ var ImageEditorController = (_class12 = class {
9038
9080
  const b = sel.bounds;
9039
9081
  let area = _nullishCoalesce(options.samplingArea, () => ( null));
9040
9082
  if (!area && options.samplingChannelId) area = this.requireChannel(options.samplingChannelId).mask;
9041
- if (!area && _optionalChain([options, 'access', _328 => _328.sampleRects, 'optionalAccess', _329 => _329.length])) {
9083
+ if (!area && _optionalChain([options, 'access', _332 => _332.sampleRects, 'optionalAccess', _333 => _333.length])) {
9042
9084
  for (const r of options.sampleRects) area = _chunkSS53NNZOcjs.combineSelections.call(void 0, area, _chunkUC3PWFM3cjs.rectSelection.call(void 0, width, height, r, { antiAlias: false }), "add");
9043
9085
  }
9044
9086
  if (area && !area.bounds) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The sampling area is empty; paint or give an area to sample from.");
9045
9087
  let win;
9046
- if (_optionalChain([area, 'optionalAccess', _330 => _330.bounds])) {
9088
+ if (_optionalChain([area, 'optionalAccess', _334 => _334.bounds])) {
9047
9089
  const a = area.bounds;
9048
9090
  const x0 = Math.max(0, Math.min(b.x - 8, a.x));
9049
9091
  const y0 = Math.max(0, Math.min(b.y - 8, a.y));
@@ -9068,7 +9110,7 @@ var ImageEditorController = (_class12 = class {
9068
9110
  }
9069
9111
  }
9070
9112
  let exclude = null;
9071
- if (area || _optionalChain([options, 'access', _331 => _331.excludeRects, 'optionalAccess', _332 => _332.length])) {
9113
+ if (area || _optionalChain([options, 'access', _335 => _335.excludeRects, 'optionalAccess', _336 => _336.length])) {
9072
9114
  exclude = new Uint8Array(n);
9073
9115
  if (area) {
9074
9116
  const ad = area.data;
@@ -9139,8 +9181,8 @@ var ImageEditorController = (_class12 = class {
9139
9181
  */
9140
9182
  copyPixels(options = {}) {
9141
9183
  const { width, height } = this.naturalSize;
9142
- const sel = _optionalChain([this, 'access', _333 => _333.state, 'access', _334 => _334.selection, 'optionalAccess', _335 => _335.bounds]) ? this.state.selection : null;
9143
- const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _336 => _336.bounds]), () => ( { x: 0, y: 0, width, height }));
9184
+ const sel = _optionalChain([this, 'access', _337 => _337.state, 'access', _338 => _338.selection, 'optionalAccess', _339 => _339.bounds]) ? this.state.selection : null;
9185
+ const rect2 = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _340 => _340.bounds]), () => ( { x: 0, y: 0, width, height }));
9144
9186
  let data;
9145
9187
  if (options.merged) {
9146
9188
  data = new Uint8ClampedArray(this.compositePixels(rect2).data);
@@ -9180,7 +9222,7 @@ var ImageEditorController = (_class12 = class {
9180
9222
  pastePixels(mode = "new-layer", image = this.clipboard) {
9181
9223
  if (!image) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("The clipboard is empty; copy_pixels first.");
9182
9224
  if (!PASTE_MODES.includes(mode)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Unknown paste mode "${String(mode)}"; use ${PASTE_MODES.join(", ")}.`);
9183
- const sel = _optionalChain([this, 'access', _337 => _337.state, 'access', _338 => _338.selection, 'optionalAccess', _339 => _339.bounds]) ? this.state.selection : null;
9225
+ const sel = _optionalChain([this, 'access', _341 => _341.state, 'access', _342 => _342.selection, 'optionalAccess', _343 => _343.bounds]) ? this.state.selection : null;
9184
9226
  if ((mode === "into" || mode === "outside") && !sel) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Paste ${mode === "into" ? "Into" : "Outside"} needs a selection; select where it goes first.`);
9185
9227
  const { width, height } = this.naturalSize;
9186
9228
  let x;
@@ -9189,7 +9231,7 @@ var ImageEditorController = (_class12 = class {
9189
9231
  x = image.x;
9190
9232
  y = image.y;
9191
9233
  } else {
9192
- const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _340 => _340.bounds]), () => ( { x: 0, y: 0, width, height }));
9234
+ const frame = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _344 => _344.bounds]), () => ( { x: 0, y: 0, width, height }));
9193
9235
  x = Math.round(frame.x + (frame.width - image.width) / 2);
9194
9236
  y = Math.round(frame.y + (frame.height - image.height) / 2);
9195
9237
  }
@@ -9206,8 +9248,8 @@ var ImageEditorController = (_class12 = class {
9206
9248
  if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("opacity must be from 0 to 1.");
9207
9249
  const blend = _nullishCoalesce(_chunkS55JFWDAcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
9208
9250
  const quickMask = target.channel === "quick-mask";
9209
- const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _341 => _341.state, 'access', _342 => _342.selection, 'optionalAccess', _343 => _343.bounds]) ? this.state.selection : null)));
9210
- const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _344 => _344.bounds]), () => ( { x: 0, y: 0, width, height }));
9251
+ const sel = _nullishCoalesce(coverageMask, () => ( (!quickMask && options.useSelection !== false && _optionalChain([this, 'access', _345 => _345.state, 'access', _346 => _346.selection, 'optionalAccess', _347 => _347.bounds]) ? this.state.selection : null)));
9252
+ const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _348 => _348.bounds]), () => ( { x: 0, y: 0, width, height }));
9211
9253
  const coverage = new (0, _chunkPQ3H2AANcjs.CoverageMap)();
9212
9254
  const ones = new Float32Array(region.width * region.height);
9213
9255
  if (sel) {
@@ -9332,7 +9374,7 @@ var ImageEditorController = (_class12 = class {
9332
9374
  placeLayer(layers, node, where) {
9333
9375
  if (where.aboveId) {
9334
9376
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.aboveId);
9335
- if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _345 => _345.parent, 'optionalAccess', _346 => _346.id]), () => ( null)), loc.index + 1);
9377
+ if (loc) return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _349 => _349.parent, 'optionalAccess', _350 => _350.id]), () => ( null)), loc.index + 1);
9336
9378
  }
9337
9379
  if (where.parentId) {
9338
9380
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, where.parentId);
@@ -9343,11 +9385,11 @@ var ImageEditorController = (_class12 = class {
9343
9385
  const at = Math.max(0, Math.min(nodes.length, Math.round(where.adjustmentIndex)));
9344
9386
  if (at < nodes.length) {
9345
9387
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[at].id);
9346
- return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _347 => _347.parent, 'optionalAccess', _348 => _348.id]), () => ( null)), loc.index);
9388
+ return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _351 => _351.parent, 'optionalAccess', _352 => _352.id]), () => ( null)), loc.index);
9347
9389
  }
9348
9390
  if (nodes.length) {
9349
9391
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, layers, nodes[nodes.length - 1].id);
9350
- return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _349 => _349.parent, 'optionalAccess', _350 => _350.id]), () => ( null)), loc.index + 1);
9392
+ return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, _nullishCoalesce(_optionalChain([loc, 'access', _353 => _353.parent, 'optionalAccess', _354 => _354.id]), () => ( null)), loc.index + 1);
9351
9393
  }
9352
9394
  }
9353
9395
  return _chunkB46UQUDCcjs.insertLayer.call(void 0, layers, node, null, this.defaultInsertIndex(layers));
@@ -9386,7 +9428,7 @@ var ImageEditorController = (_class12 = class {
9386
9428
  enabled: spec.enabled,
9387
9429
  opacity: spec.opacity,
9388
9430
  blend: spec.blend,
9389
- mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _351 => _351.state, 'access', _352 => _352.selection, 'optionalAccess', _353 => _353.bounds]) ? _chunkS55JFWDAcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9431
+ mask: _nullishCoalesce(spec.mask, () => ( (spec.useSelection && _optionalChain([this, 'access', _355 => _355.state, 'access', _356 => _356.selection, 'optionalAccess', _357 => _357.bounds]) ? _chunkS55JFWDAcjs.layerMaskFromSelection.call(void 0, this.state.selection) : void 0)))
9390
9432
  });
9391
9433
  while (ids.has(layer.id)) layer.id = _chunkS55JFWDAcjs.newLayerId.call(void 0, "adj");
9392
9434
  const { width, height } = this.naturalSize;
@@ -9463,7 +9505,7 @@ var ImageEditorController = (_class12 = class {
9463
9505
  const anchor = nodes[to];
9464
9506
  const without = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, id, () => null);
9465
9507
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, without, anchor.id);
9466
- return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _354 => _354.parent, 'optionalAccess', _355 => _355.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9508
+ return _chunkB46UQUDCcjs.insertLayer.call(void 0, without, node, _nullishCoalesce(_optionalChain([loc, 'access', _358 => _358.parent, 'optionalAccess', _359 => _359.id]), () => ( null)), to > from ? loc.index + 1 : loc.index);
9467
9509
  }
9468
9510
  /** Moves a layer to `toIndex` among the adjustment layers (0 = bottom) as one undo step. Returns false if nothing moved. */
9469
9511
  moveAdjustmentLayer(id, toIndex) {
@@ -9504,7 +9546,7 @@ var ImageEditorController = (_class12 = class {
9504
9546
  return _nullishCoalesce(this.state.selection, () => ( null));
9505
9547
  }
9506
9548
  get hasSelection() {
9507
- return Boolean(_optionalChain([this, 'access', _356 => _356.state, 'access', _357 => _357.selection, 'optionalAccess', _358 => _358.bounds]));
9549
+ return Boolean(_optionalChain([this, 'access', _360 => _360.state, 'access', _361 => _361.selection, 'optionalAccess', _362 => _362.bounds]));
9508
9550
  }
9509
9551
  /** Returns the current canvas (composition) dimensions. */
9510
9552
  getCanvasSize() {
@@ -9596,7 +9638,7 @@ var ImageEditorController = (_class12 = class {
9596
9638
  const prev = normalizeSelection(_nullishCoalesce(this.state.selection, () => ( null)));
9597
9639
  if (prev === next || prev && next && sameSelection(prev, next)) return false;
9598
9640
  this.recordHistory();
9599
- if (!next && _optionalChain([prev, 'optionalAccess', _359 => _359.bounds])) this.lastSelection = prev;
9641
+ if (!next && _optionalChain([prev, 'optionalAccess', _363 => _363.bounds])) this.lastSelection = prev;
9600
9642
  this.state.selection = next;
9601
9643
  this.notify();
9602
9644
  return true;
@@ -9650,14 +9692,14 @@ var ImageEditorController = (_class12 = class {
9650
9692
  /** Select › Grow: adds connected pixels within `tolerance` of a selected colour (one undo step). */
9651
9693
  async growSelection(options = {}) {
9652
9694
  const sel = this.state.selection;
9653
- if (!_optionalChain([sel, 'optionalAccess', _360 => _360.bounds])) return false;
9695
+ if (!_optionalChain([sel, 'optionalAccess', _364 => _364.bounds])) return false;
9654
9696
  const pixels = await this.requirePixels(options);
9655
9697
  return this.setSelection(growSelection(pixels, sel, options));
9656
9698
  }
9657
9699
  /** Select › Similar: adds every pixel within `tolerance` of a selected colour (one undo step). */
9658
9700
  async selectSimilar(options = {}) {
9659
9701
  const sel = this.state.selection;
9660
- if (!_optionalChain([sel, 'optionalAccess', _361 => _361.bounds])) return false;
9702
+ if (!_optionalChain([sel, 'optionalAccess', _365 => _365.bounds])) return false;
9661
9703
  const pixels = await this.requirePixels(options);
9662
9704
  return this.setSelection(selectSimilar(pixels, sel, options));
9663
9705
  }
@@ -9749,7 +9791,7 @@ var ImageEditorController = (_class12 = class {
9749
9791
  size: options.size,
9750
9792
  grow: m === "add",
9751
9793
  enhanceEdge: options.enhanceEdge,
9752
- selection: m === "add" && _optionalChain([sel, 'optionalAccess', _362 => _362.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, sel) : null
9794
+ selection: m === "add" && _optionalChain([sel, 'optionalAccess', _366 => _366.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, sel) : null
9753
9795
  };
9754
9796
  const { mask } = await this.runSelectionJob(job, pixels, {
9755
9797
  signal: options.signal,
@@ -9769,7 +9811,7 @@ var ImageEditorController = (_class12 = class {
9769
9811
  const { width, height } = this.naturalSize;
9770
9812
  const image = await this.toDataURL({ format: "image/png" });
9771
9813
  const results = await provider.segment({ ...request, image, width, height });
9772
- _optionalChain([request, 'access', _363 => _363.signal, 'optionalAccess', _364 => _364.throwIfAborted, 'call', _365 => _365()]);
9814
+ _optionalChain([request, 'access', _367 => _367.signal, 'optionalAccess', _368 => _368.throwIfAborted, 'call', _369 => _369()]);
9773
9815
  const decoded = [];
9774
9816
  for (const r of _nullishCoalesce(results, () => ( []))) decoded.push({ ...r, mask: r.mask !== void 0 ? await this.decodeMaskImage(r.mask) : void 0 });
9775
9817
  return decoded;
@@ -9786,7 +9828,7 @@ var ImageEditorController = (_class12 = class {
9786
9828
  let union = null;
9787
9829
  for (const r of decoded) {
9788
9830
  const one = segmentsToSelection(width, height, [r]);
9789
- if (!_optionalChain([one, 'optionalAccess', _366 => _366.bounds])) continue;
9831
+ if (!_optionalChain([one, 'optionalAccess', _370 => _370.bounds])) continue;
9790
9832
  if ("rect" in target) {
9791
9833
  const r0 = target.rect;
9792
9834
  const grow = 0.1 * Math.max(r0.width, r0.height);
@@ -9854,7 +9896,7 @@ var ImageEditorController = (_class12 = class {
9854
9896
  if (this.segmentation && options.useModel !== false) {
9855
9897
  const { width, height } = this.naturalSize;
9856
9898
  const sky = segmentsToSelection(width, height, await this.modelSegments({ target: "the sky", signal: options.signal }));
9857
- if (!_optionalChain([sky, 'optionalAccess', _367 => _367.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
9899
+ if (!_optionalChain([sky, 'optionalAccess', _371 => _371.bounds])) return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model", note: "The segmentation model found no sky." };
9858
9900
  this.setSelection(sky, _nullishCoalesce(options.mode, () => ( "replace")));
9859
9901
  return { selection: _nullishCoalesce(this.state.selection, () => ( null)), method: "model" };
9860
9902
  }
@@ -9885,7 +9927,7 @@ var ImageEditorController = (_class12 = class {
9885
9927
  try {
9886
9928
  const canvas = await this.renderSource();
9887
9929
  const ctx = canvas.getContext("2d");
9888
- const data2 = _optionalChain([ctx, 'optionalAccess', _368 => _368.getImageData, 'optionalCall', _369 => _369(0, 0, width, height)]);
9930
+ const data2 = _optionalChain([ctx, 'optionalAccess', _372 => _372.getImageData, 'optionalCall', _373 => _373(0, 0, width, height)]);
9889
9931
  if (data2 && data2.data && data2.data.length >= width * height * 4) {
9890
9932
  base = { width, height, data: data2.data };
9891
9933
  this.samplePixels = base;
@@ -9960,7 +10002,7 @@ var ImageEditorController = (_class12 = class {
9960
10002
  /** Select › Modify: grow, shrink, feather, border or smooth by `radius` pixels (one undo step). */
9961
10003
  modifySelection(op, radius) {
9962
10004
  const sel = this.state.selection;
9963
- if (!_optionalChain([sel, 'optionalAccess', _370 => _370.bounds])) return false;
10005
+ if (!_optionalChain([sel, 'optionalAccess', _374 => _374.bounds])) return false;
9964
10006
  return this.setSelection(_chunkSS53NNZOcjs.modifySelection.call(void 0, sel, op, radius));
9965
10007
  }
9966
10008
  /**
@@ -9969,7 +10011,7 @@ var ImageEditorController = (_class12 = class {
9969
10011
  */
9970
10012
  async refineSelection(params, options = {}) {
9971
10013
  const sel = this.state.selection;
9972
- if (!_optionalChain([sel, 'optionalAccess', _371 => _371.bounds])) return false;
10014
+ if (!_optionalChain([sel, 'optionalAccess', _375 => _375.bounds])) return false;
9973
10015
  const pixels = (_nullishCoalesce(params.radius, () => ( 0))) > 0 ? await this.requirePixels(options) : null;
9974
10016
  return this.setSelection(_chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params));
9975
10017
  }
@@ -9992,7 +10034,7 @@ var ImageEditorController = (_class12 = class {
9992
10034
  const edits = _nullishCoalesce(options.edits, () => ( []));
9993
10035
  const regions2 = this.checkRegions(options.regions);
9994
10036
  const refineMode = _nullishCoalesce(options.refineMode, () => ( "color"));
9995
- if (!_optionalChain([this, 'access', _372 => _372.state, 'access', _373 => _373.selection, 'optionalAccess', _374 => _374.bounds]) && !edits.length) throw new Error("Nothing is selected; select first, or pass edits that paint a selection.");
10037
+ if (!_optionalChain([this, 'access', _376 => _376.state, 'access', _377 => _377.selection, 'optionalAccess', _378 => _378.bounds]) && !edits.length) throw new Error("Nothing is selected; select first, or pass edits that paint a selection.");
9996
10038
  if (refineMode === "object" && !this.segmentation) {
9997
10039
  throw new Error("Object aware refinement needs a segmentation model (setSegmentationProvider); use refineMode color.");
9998
10040
  }
@@ -10015,14 +10057,14 @@ var ImageEditorController = (_class12 = class {
10015
10057
  const { width, height } = this.naturalSize;
10016
10058
  const edited = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, pixels, _nullishCoalesce(this.state.selection, () => ( null)), edits, width, height);
10017
10059
  let sel = edited.selection;
10018
- if (!_optionalChain([sel, 'optionalAccess', _375 => _375.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
10060
+ if (!_optionalChain([sel, 'optionalAccess', _379 => _379.bounds])) throw new Error("The edits leave nothing selected; paint with mode add first.");
10019
10061
  if (refineMode === "object") {
10020
10062
  const b = sel.bounds;
10021
10063
  const found = await this.modelObject({ rect: b }, options.signal);
10022
10064
  if (!found) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
10023
10065
  const near = _chunkSS53NNZOcjs.modifySelection.call(void 0, sel, "expand", Math.max(4, _nullishCoalesce(params.radius, () => ( 8))));
10024
10066
  const clipped = _chunkSS53NNZOcjs.combineSelections.call(void 0, found, near, "intersect");
10025
- if (!_optionalChain([clipped, 'optionalAccess', _376 => _376.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
10067
+ if (!_optionalChain([clipped, 'optionalAccess', _380 => _380.bounds])) throw new Error("The segmentation model found no object in the selection; use refineMode color.");
10026
10068
  sel = clipped;
10027
10069
  }
10028
10070
  let refined = _chunkSS53NNZOcjs.refineSelection.call(void 0, pixels, sel, params, edited.refineBrush);
@@ -10124,7 +10166,7 @@ var ImageEditorController = (_class12 = class {
10124
10166
  let mask;
10125
10167
  if (source === "selection") {
10126
10168
  const sel = this.state.selection;
10127
- if (!_optionalChain([sel, 'optionalAccess', _377 => _377.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10169
+ if (!_optionalChain([sel, 'optionalAccess', _381 => _381.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, or export a channel or a layer mask.");
10128
10170
  mask = sel;
10129
10171
  } else if ("channelId" in source) {
10130
10172
  mask = this.requireChannel(source.channelId).mask;
@@ -10148,7 +10190,7 @@ var ImageEditorController = (_class12 = class {
10148
10190
  const canvas = this.renderer.createCanvas(w, h);
10149
10191
  const ctx = canvas.getContext("2d");
10150
10192
  if (ctx) ctx.drawImage(img, 0, 0, w, h);
10151
- const data = _optionalChain([ctx, 'optionalAccess', _378 => _378.getImageData, 'optionalCall', _379 => _379(0, 0, w, h)]);
10193
+ const data = _optionalChain([ctx, 'optionalAccess', _382 => _382.getImageData, 'optionalCall', _383 => _383(0, 0, w, h)]);
10152
10194
  if (!data) throw new Error("The mask image pixels are not available (no canvas access); pass pixels.");
10153
10195
  return { width: w, height: h, data: data.data };
10154
10196
  }
@@ -10164,7 +10206,7 @@ var ImageEditorController = (_class12 = class {
10164
10206
  const provider = this.segmentation;
10165
10207
  if (!provider) {
10166
10208
  const pixels = await this.requirePixels({});
10167
- _optionalChain([options, 'access', _380 => _380.signal, 'optionalAccess', _381 => _381.throwIfAborted, 'call', _382 => _382()]);
10209
+ _optionalChain([options, 'access', _384 => _384.signal, 'optionalAccess', _385 => _385.throwIfAborted, 'call', _386 => _386()]);
10168
10210
  const { mask: selection, reason } = await this.runSelectionJob({ op: "subject", enhanceEdge: options.enhanceEdge }, pixels, options);
10169
10211
  if (selection.bounds) this.shapeCommand(selection, options);
10170
10212
  const unused = target.trim() ? ` "${target.trim()}" was not used to choose it.` : "";
@@ -10180,17 +10222,17 @@ var ImageEditorController = (_class12 = class {
10180
10222
  const decoded = await this.modelSegments({ target: description, maxSegments: options.maxSegments, signal: options.signal });
10181
10223
  const segments = decoded.map((r) => {
10182
10224
  const one = segmentsToSelection(width, height, [r]);
10183
- return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _383 => _383.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10225
+ return { label: r.label || description, bounds: _nullishCoalesce(_optionalChain([one, 'optionalAccess', _387 => _387.bounds]), () => ( null)), ...r.score !== void 0 ? { score: r.score } : {} };
10184
10226
  });
10185
10227
  const mask = segmentsToSelection(width, height, decoded);
10186
10228
  if (mask && options.beforeApply) {
10187
10229
  const outlines = decoded.flatMap((r, i) => {
10188
10230
  const rings = segmentationOutlines(r);
10189
- const b = _optionalChain([segments, 'access', _384 => _384[i], 'optionalAccess', _385 => _385.bounds]);
10231
+ const b = _optionalChain([segments, 'access', _388 => _388[i], 'optionalAccess', _389 => _389.bounds]);
10190
10232
  return rings.length ? rings : b ? [[{ x: b.x, y: b.y }, { x: b.x + b.width, y: b.y }, { x: b.x + b.width, y: b.y + b.height }, { x: b.x, y: b.y + b.height }]] : [];
10191
10233
  });
10192
10234
  await options.beforeApply(outlines);
10193
- _optionalChain([options, 'access', _386 => _386.signal, 'optionalAccess', _387 => _387.throwIfAborted, 'call', _388 => _388()]);
10235
+ _optionalChain([options, 'access', _390 => _390.signal, 'optionalAccess', _391 => _391.throwIfAborted, 'call', _392 => _392()]);
10194
10236
  }
10195
10237
  if (mask) this.shapeCommand(mask, options);
10196
10238
  return { segments: segments.filter((s) => s.bounds), method: "model" };
@@ -10223,7 +10265,7 @@ var ImageEditorController = (_class12 = class {
10223
10265
  const view = this.state.maskView;
10224
10266
  if (!view) return null;
10225
10267
  const layer = this.getLayer(view.layerId);
10226
- return _optionalChain([layer, 'optionalAccess', _389 => _389.mask]) && !layer.mask.source ? view : null;
10268
+ return _optionalChain([layer, 'optionalAccess', _393 => _393.mask]) && !layer.mask.source ? view : null;
10227
10269
  }
10228
10270
  /**
10229
10271
  * Shows a layer's mask on the canvas: `gray` alone in grey (Alt-click the mask thumbnail),
@@ -10246,7 +10288,7 @@ var ImageEditorController = (_class12 = class {
10246
10288
  if (!layer.mask) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask to show; add one with add_layer_mask.`);
10247
10289
  if (layer.mask.source) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" has a depth mask, which is computed, not painted, so it has no mask view.`);
10248
10290
  const cur = this.state.maskView;
10249
- if (_optionalChain([cur, 'optionalAccess', _390 => _390.layerId]) !== id || cur.mode !== mode) {
10291
+ if (_optionalChain([cur, 'optionalAccess', _394 => _394.layerId]) !== id || cur.mode !== mode) {
10250
10292
  this.state.maskView = { layerId: id, mode };
10251
10293
  this.notify();
10252
10294
  }
@@ -10258,7 +10300,7 @@ var ImageEditorController = (_class12 = class {
10258
10300
  return _nullishCoalesce(this.state.channels, () => ( []));
10259
10301
  }
10260
10302
  getChannel(id) {
10261
- return _nullishCoalesce(_optionalChain([this, 'access', _391 => _391.state, 'access', _392 => _392.channels, 'optionalAccess', _393 => _393.find, 'call', _394 => _394((c) => c.id === id)]), () => ( null));
10303
+ return _nullishCoalesce(_optionalChain([this, 'access', _395 => _395.state, 'access', _396 => _396.channels, 'optionalAccess', _397 => _397.find, 'call', _398 => _398((c) => c.id === id)]), () => ( null));
10262
10304
  }
10263
10305
  requireChannel(id) {
10264
10306
  const channel = this.getChannel(id);
@@ -10287,14 +10329,14 @@ var ImageEditorController = (_class12 = class {
10287
10329
  */
10288
10330
  saveSelection(options = {}) {
10289
10331
  const sel = this.state.selection;
10290
- if (!_optionalChain([sel, 'optionalAccess', _395 => _395.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10332
+ if (!_optionalChain([sel, 'optionalAccess', _399 => _399.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected; select first, then save the selection to a channel.");
10291
10333
  const { width, height } = this.naturalSize;
10292
10334
  const sized = sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height);
10293
10335
  const channels = [...this.getChannels()];
10294
10336
  if (options.channelId !== void 0) {
10295
10337
  const existing = this.requireChannel(options.channelId);
10296
10338
  const mask = _nullishCoalesce(_chunkSS53NNZOcjs.combineSelections.call(void 0, existing.mask.bounds ? existing.mask : null, sized, _nullishCoalesce(options.mode, () => ( "replace"))), () => ( _chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height)));
10297
- const next = { ...existing, mask, ..._optionalChain([options, 'access', _396 => _396.name, 'optionalAccess', _397 => _397.trim, 'call', _398 => _398()]) ? { name: options.name.trim() } : {} };
10339
+ const next = { ...existing, mask, ..._optionalChain([options, 'access', _400 => _400.name, 'optionalAccess', _401 => _401.trim, 'call', _402 => _402()]) ? { name: options.name.trim() } : {} };
10298
10340
  this.setChannels(channels.map((c) => c.id === existing.id ? next : c));
10299
10341
  return next;
10300
10342
  }
@@ -10305,7 +10347,7 @@ var ImageEditorController = (_class12 = class {
10305
10347
  const channels = this.getChannels();
10306
10348
  const channel = {
10307
10349
  id: this.newChannelId(),
10308
- name: _optionalChain([name, 'optionalAccess', _399 => _399.trim, 'call', _400 => _400()]) || `Alpha ${channels.length + 1}`,
10350
+ name: _optionalChain([name, 'optionalAccess', _403 => _403.trim, 'call', _404 => _404()]) || `Alpha ${channels.length + 1}`,
10309
10351
  mask,
10310
10352
  color: DEFAULT_CHANNEL_COLOR,
10311
10353
  opacity: 0.5,
@@ -10350,7 +10392,7 @@ var ImageEditorController = (_class12 = class {
10350
10392
  /** Duplicates an alpha channel just after it (one undo step). Returns the copy. */
10351
10393
  duplicateChannel(id, name) {
10352
10394
  const channel = this.requireChannel(id);
10353
- const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _401 => _401.trim, 'call', _402 => _402()]) || `${channel.name} copy` };
10395
+ const copy = { ...channel, id: this.newChannelId(), name: _optionalChain([name, 'optionalAccess', _405 => _405.trim, 'call', _406 => _406()]) || `${channel.name} copy` };
10354
10396
  const channels = [...this.getChannels()];
10355
10397
  channels.splice(channels.findIndex((c) => c.id === id) + 1, 0, copy);
10356
10398
  this.setChannels(channels);
@@ -10381,7 +10423,7 @@ var ImageEditorController = (_class12 = class {
10381
10423
  quickMaskSurface() {
10382
10424
  const { width, height } = this.naturalSize;
10383
10425
  const sel = this.state.selection;
10384
- if (!_optionalChain([sel, 'optionalAccess', _403 => _403.bounds])) return _chunk474IQG74cjs.emptySurface.call(void 0, 1, 0);
10426
+ if (!_optionalChain([sel, 'optionalAccess', _407 => _407.bounds])) return _chunk474IQG74cjs.emptySurface.call(void 0, 1, 0);
10385
10427
  return (sel.width === width && sel.height === height ? sel : _chunkSS53NNZOcjs.resizeSelection.call(void 0, sel, width, height)).surface;
10386
10428
  }
10387
10429
  /** The selection a painted Quick Mask surface stands for (it shares the surface's tiles). */
@@ -10402,7 +10444,7 @@ var ImageEditorController = (_class12 = class {
10402
10444
  */
10403
10445
  applySelectionAsLayerMask(layerId, props = {}) {
10404
10446
  const sel = this.state.selection;
10405
- if (!_optionalChain([sel, 'optionalAccess', _404 => _404.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10447
+ if (!_optionalChain([sel, 'optionalAccess', _408 => _408.bounds]) || !this.getAdjustmentLayer(layerId)) return false;
10406
10448
  return this.setLayerMask(layerId, this.maskFromSelection(sel, props));
10407
10449
  }
10408
10450
  setLayerMask(layerId, mask, commitToHistory = true) {
@@ -10451,7 +10493,7 @@ var ImageEditorController = (_class12 = class {
10451
10493
  let layer;
10452
10494
  if (target === "selection") {
10453
10495
  mask = this.getSelection();
10454
- if (!_optionalChain([mask, 'optionalAccess', _405 => _405.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected: make a selection first, or inspect a layer-mask or vector-mask with layerId.");
10496
+ if (!_optionalChain([mask, 'optionalAccess', _409 => _409.bounds])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Nothing is selected: make a selection first, or inspect a layer-mask or vector-mask with layerId.");
10455
10497
  } else if (target === "layer-mask" || target === "vector-mask") {
10456
10498
  if (!options.layerId) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`A ${target} needs layerId (see list_layers).`);
10457
10499
  layer = this.getLayer(options.layerId);
@@ -10472,7 +10514,7 @@ var ImageEditorController = (_class12 = class {
10472
10514
  const x = Math.max(0, b.x - 8);
10473
10515
  const y = Math.max(0, b.y - 8);
10474
10516
  const region = { x, y, width: Math.min(width, b.x + b.width + 8) - x, height: Math.min(height, b.y + b.height + 8) - y };
10475
- const own = _optionalChain([layer, 'optionalAccess', _406 => _406.type]) === "pixel" ? this.getLayerPixels(layer.id) : null;
10517
+ const own = _optionalChain([layer, 'optionalAccess', _410 => _410.type]) === "pixel" ? this.getLayerPixels(layer.id) : null;
10476
10518
  const image = _nullishCoalesce(own, () => ( { ...this.compositePixels(region), x: region.x, y: region.y }));
10477
10519
  const report = inspectMaskEdge(mask, image, options);
10478
10520
  return { target, ...layer ? { layerId: layer.id } : {}, ...report };
@@ -10483,10 +10525,10 @@ var ImageEditorController = (_class12 = class {
10483
10525
  const { width, height } = this.naturalSize;
10484
10526
  if (!Array.isArray(regions2) || !regions2.length) throw new Error("regions must be a non-empty list of { x, y, width, height } (e.g. the uncertainRegions bounds); leave it out to refine everywhere.");
10485
10527
  return regions2.map((r, i) => {
10486
- const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _407 => _407.x])));
10487
- const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _408 => _408.y])));
10488
- const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess', _409 => _409.x]) + _optionalChain([r, 'optionalAccess', _410 => _410.width])));
10489
- const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess', _411 => _411.y]) + _optionalChain([r, 'optionalAccess', _412 => _412.height])));
10528
+ const x = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _411 => _411.x])));
10529
+ const y = Math.max(0, Math.floor(_optionalChain([r, 'optionalAccess', _412 => _412.y])));
10530
+ const x1 = Math.min(width, Math.ceil(_optionalChain([r, 'optionalAccess', _413 => _413.x]) + _optionalChain([r, 'optionalAccess', _414 => _414.width])));
10531
+ const y1 = Math.min(height, Math.ceil(_optionalChain([r, 'optionalAccess', _415 => _415.y]) + _optionalChain([r, 'optionalAccess', _416 => _416.height])));
10490
10532
  if (![x, y, x1, y1].every(Number.isFinite) || x1 <= x || y1 <= y) throw new Error(`regions[${i}] must overlap the image (0..${width} \xD7 0..${height}), got ${JSON.stringify(r)}.`);
10491
10533
  return { x, y, width: x1 - x, height: y1 - y };
10492
10534
  });
@@ -10500,7 +10542,7 @@ var ImageEditorController = (_class12 = class {
10500
10542
  selectionUncertainty(options = {}) {
10501
10543
  const { width, height } = this.naturalSize;
10502
10544
  const sel = this.getSelection();
10503
- if (!_optionalChain([sel, 'optionalAccess', _413 => _413.bounds])) return selectionUncertainty(_chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height), { x: 0, y: 0, width: 0, height: 0, data: new Uint8ClampedArray(0) }, options);
10545
+ if (!_optionalChain([sel, 'optionalAccess', _417 => _417.bounds])) return selectionUncertainty(_chunkSS53NNZOcjs.createSelectionMask.call(void 0, width, height), { x: 0, y: 0, width: 0, height: 0, data: new Uint8ClampedArray(0) }, options);
10504
10546
  const b = sel.bounds;
10505
10547
  const m = Math.max(8, Math.ceil(_nullishCoalesce(options.band, () => ( Math.max(2, Math.min(width, height) / 200)))) + 4);
10506
10548
  const x = Math.max(0, b.x - m);
@@ -10514,7 +10556,7 @@ var ImageEditorController = (_class12 = class {
10514
10556
  */
10515
10557
  selectionFrom(source) {
10516
10558
  const { width, height } = this.naturalSize;
10517
- switch (_optionalChain([source, 'optionalAccess', _414 => _414.kind])) {
10559
+ switch (_optionalChain([source, 'optionalAccess', _418 => _418.kind])) {
10518
10560
  case "selection":
10519
10561
  return this.getSelection();
10520
10562
  case "history": {
@@ -10570,7 +10612,7 @@ var ImageEditorController = (_class12 = class {
10570
10612
  /** A layer's painted mask over the canvas as a selection mask; null without one (or for a depth mask). */
10571
10613
  layerMaskCoverage(layerId) {
10572
10614
  const layer = this.getLayer(layerId);
10573
- if (!_optionalChain([layer, 'optionalAccess', _415 => _415.mask]) || layer.mask.source) return null;
10615
+ if (!_optionalChain([layer, 'optionalAccess', _419 => _419.mask]) || layer.mask.source) return null;
10574
10616
  const { width, height } = this.naturalSize;
10575
10617
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
10576
10618
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -10605,7 +10647,7 @@ var ImageEditorController = (_class12 = class {
10605
10647
  this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10606
10648
  const next = { ...l };
10607
10649
  if (_chunkS55JFWDAcjs.isDefaultDepthMask.call(void 0, merged)) {
10608
- if (_optionalChain([next, 'access', _416 => _416.mask, 'optionalAccess', _417 => _417.source])) delete next.mask;
10650
+ if (_optionalChain([next, 'access', _420 => _420.mask, 'optionalAccess', _421 => _421.source])) delete next.mask;
10609
10651
  } else next.mask = _chunkS55JFWDAcjs.depthRasterMask.call(void 0, merged);
10610
10652
  return next;
10611
10653
  });
@@ -10615,7 +10657,7 @@ var ImageEditorController = (_class12 = class {
10615
10657
  resetDepthMask() {
10616
10658
  this.recordHistory();
10617
10659
  const target = this.developLayer();
10618
- if (_optionalChain([target, 'optionalAccess', _418 => _418.mask, 'optionalAccess', _419 => _419.source])) {
10660
+ if (_optionalChain([target, 'optionalAccess', _422 => _422.mask, 'optionalAccess', _423 => _423.source])) {
10619
10661
  this.state.layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
10620
10662
  const next = { ...l };
10621
10663
  delete next.mask;
@@ -10627,7 +10669,7 @@ var ImageEditorController = (_class12 = class {
10627
10669
  // --- Annotations & Layers ---
10628
10670
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
10629
10671
  annotationLayer(id) {
10630
- return _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _420 => _420.id]) === id);
10672
+ return _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkS55JFWDAcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _424 => _424.id]) === id);
10631
10673
  }
10632
10674
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
10633
10675
  annotationEnv() {
@@ -10645,7 +10687,7 @@ var ImageEditorController = (_class12 = class {
10645
10687
  const fullAnnotation = { ...annotation, id };
10646
10688
  const layer = _chunkS55JFWDAcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
10647
10689
  const loc = placement.aboveId ? _chunkB46UQUDCcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
10648
- this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _421 => _421.parent, 'optionalAccess', _422 => _422.id]), () => ( null)), loc.index + 1) : _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10690
+ this.state.layers = loc ? _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _425 => _425.parent, 'optionalAccess', _426 => _426.id]), () => ( null)), loc.index + 1) : _chunkB46UQUDCcjs.insertLayer.call(void 0, this.state.layers, layer, null);
10649
10691
  this.state.selectedAnnotationId = id;
10650
10692
  this.notify();
10651
10693
  return id;
@@ -10768,7 +10810,7 @@ var ImageEditorController = (_class12 = class {
10768
10810
  await this.renderer.renderToCanvas(targetCanvas, source, this.state, {
10769
10811
  ...options,
10770
10812
  // The clone source follows the brush cursor (both editors pass it).
10771
- cloneSourceMarker: _optionalChain([options, 'optionalAccess', _423 => _423.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _424 => _424.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10813
+ cloneSourceMarker: _optionalChain([options, 'optionalAccess', _427 => _427.cloneSourceMarker]) !== void 0 ? options.cloneSourceMarker : _optionalChain([options, 'optionalAccess', _428 => _428.brushCursor]) ? this.cloneSourceMarker(options.brushCursor) : null,
10772
10814
  dirty: dirty === "all" ? void 0 : dirty,
10773
10815
  checkpointLayerId: this.state.activeLayerId
10774
10816
  });
@@ -10781,7 +10823,7 @@ var ImageEditorController = (_class12 = class {
10781
10823
  return this.renderer.createCanvas(1, 1);
10782
10824
  }
10783
10825
  this.syncViews();
10784
- if (_optionalChain([options, 'optionalAccess', _425 => _425.layerIds])) {
10826
+ if (_optionalChain([options, 'optionalAccess', _429 => _429.layerIds])) {
10785
10827
  const keep = new Set(options.layerIds);
10786
10828
  const layers = _chunkB46UQUDCcjs.flattenLayers.call(void 0, this.state.layers).filter((l) => keep.has(l.id));
10787
10829
  return this.renderer.renderExport(source, { ...this.state, layers }, options);
@@ -10935,7 +10977,7 @@ var ImageEditorController = (_class12 = class {
10935
10977
  let px2 = await this.decodeImage(newDataUrl);
10936
10978
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
10937
10979
  const data = new Uint8ClampedArray(px2.data);
10938
- const sel = _optionalChain([this, 'access', _426 => _426.state, 'access', _427 => _427.selection, 'optionalAccess', _428 => _428.bounds]) ? this.state.selection : null;
10980
+ const sel = _optionalChain([this, 'access', _430 => _430.state, 'access', _431 => _431.selection, 'optionalAccess', _432 => _432.bounds]) ? this.state.selection : null;
10939
10981
  if (sel) for (let p = 0, i = 3; p < width * height; p++, i += 4) data[i] = Math.round(data[i] * sel.data[p] / 255);
10940
10982
  return this.addPixelLayer({ name: "Inpaint", pixels: { width, height, data } });
10941
10983
  }
@@ -10982,7 +11024,7 @@ var ImageEditorController = (_class12 = class {
10982
11024
  }
10983
11025
  /** Font families the shaper offers (generic families at least). */
10984
11026
  listFonts() {
10985
- return _nullishCoalesce(_optionalChain([this, 'access', _429 => _429.getTextShaper, 'call', _430 => _430(), 'optionalAccess', _431 => _431.families, 'optionalCall', _432 => _432()]), () => ( ["sans-serif", "serif", "monospace"]));
11027
+ return _nullishCoalesce(_optionalChain([this, 'access', _433 => _433.getTextShaper, 'call', _434 => _434(), 'optionalAccess', _435 => _435.families, 'optionalCall', _436 => _436()]), () => ( ["sans-serif", "serif", "monospace"]));
10986
11028
  }
10987
11029
  typeInfo(id) {
10988
11030
  const layer = _chunkS55JFWDAcjs.requireTypeLayer.call(void 0, this.state.layers, id);
@@ -11056,8 +11098,8 @@ var ImageEditorController = (_class12 = class {
11056
11098
  const layer = this.layoutTypeLayer({ ...init, text, orientation: vertical ? "vertical" : "horizontal" });
11057
11099
  const { width, height } = this.naturalSize;
11058
11100
  const b = _chunk474IQG74cjs.contentBounds.call(void 0, layer.surface);
11059
- const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _433 => _433.x]), () => ( 0)));
11060
- const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _434 => _434.y]), () => ( 0)));
11101
+ const x0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _437 => _437.x]), () => ( 0)));
11102
+ const y0 = Math.max(0, _nullishCoalesce(_optionalChain([b, 'optionalAccess', _438 => _438.y]), () => ( 0)));
11061
11103
  const x1 = Math.min(width, b ? b.x + b.width : 0);
11062
11104
  const y1 = Math.min(height, b ? b.y + b.height : 0);
11063
11105
  let mask;
@@ -11234,7 +11276,7 @@ var ImageEditorController = (_class12 = class {
11234
11276
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
11235
11277
  const missing = _chunkQAUIZPYIcjs.layoutText.call(void 0, layer, shaper).missingFonts;
11236
11278
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
11237
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _435 => _435.runs, 'access', _436 => _436.find, 'call', _437 => _437((r) => r.length > 0), 'optionalAccess', _438 => _438.style]), () => ( _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE));
11279
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _439 => _439.runs, 'access', _440 => _440.find, 'call', _441 => _441((r) => r.length > 0), 'optionalAccess', _442 => _442.style]), () => ( _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE));
11238
11280
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
11239
11281
  const shape = _chunkS55JFWDAcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
11240
11282
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
@@ -11267,7 +11309,7 @@ var ImageEditorController = (_class12 = class {
11267
11309
  // --- Shape layers ---
11268
11310
  /** What shape rendering needs: the canvas size and the document's patterns. */
11269
11311
  shapeEnv() {
11270
- return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _439 => _439.state, 'access', _440 => _440.patterns, 'optionalAccess', _441 => _441.find, 'call', _442 => _442((p) => p.id === id)]), () => ( null)) };
11312
+ return { ...this.naturalSize, pattern: (id) => _nullishCoalesce(_optionalChain([this, 'access', _443 => _443.state, 'access', _444 => _444.patterns, 'optionalAccess', _445 => _445.find, 'call', _446 => _446((p) => p.id === id)]), () => ( null)) };
11271
11313
  }
11272
11314
  /** One component from tool or UI input (validated). */
11273
11315
  componentFrom(spec, path) {
@@ -11310,9 +11352,9 @@ var ImageEditorController = (_class12 = class {
11310
11352
  * open path) and stroked with `stroke`. Goes above the active layer unless placed. Returns its id.
11311
11353
  */
11312
11354
  addShapeLayer(init) {
11313
- const specs = _optionalChain([init, 'access', _443 => _443.components, 'optionalAccess', _444 => _444.length]) ? init.components : [init];
11314
- if (_optionalChain([init, 'access', _445 => _445.components, 'optionalAccess', _446 => _446.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11315
- const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _447 => _447.components, 'optionalAccess', _448 => _448.length]) ? `components[${i}].` : ""));
11355
+ const specs = _optionalChain([init, 'access', _447 => _447.components, 'optionalAccess', _448 => _448.length]) ? init.components : [init];
11356
+ if (_optionalChain([init, 'access', _449 => _449.components, 'optionalAccess', _450 => _450.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
11357
+ const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _451 => _451.components, 'optionalAccess', _452 => _452.length]) ? `components[${i}].` : ""));
11316
11358
  const stroke = init.stroke ? _chunkS55JFWDAcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
11317
11359
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
11318
11360
  const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkS55JFWDAcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkS55JFWDAcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
@@ -11423,7 +11465,7 @@ var ImageEditorController = (_class12 = class {
11423
11465
  if (layer.locks) next.locks = layer.locks;
11424
11466
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
11425
11467
  } else if (layer.type === "pixel") {
11426
- if (!_optionalChain([layer, 'access', _449 => _449.filters, 'optionalAccess', _450 => _450.length])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11468
+ if (!_optionalChain([layer, 'access', _453 => _453.filters, 'optionalAccess', _454 => _454.length])) throw new (0, _chunkS55JFWDAcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
11427
11469
  _chunkS55JFWDAcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
11428
11470
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
11429
11471
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
@@ -11442,7 +11484,7 @@ var ImageEditorController = (_class12 = class {
11442
11484
  return this.rasterizeSmartObject(id);
11443
11485
  } else if (layer.type === "shape" || layer.type === "type") {
11444
11486
  next = layer.type === "shape" ? _chunkS55JFWDAcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkS55JFWDAcjs.typeAsPixelLayer.call(void 0, layer);
11445
- if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _451 => _451.annotation, 'optionalAccess', _452 => _452.id])) this.state.selectedAnnotationId = null;
11487
+ if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _455 => _455.annotation, 'optionalAccess', _456 => _456.id])) this.state.selectedAnnotationId = null;
11446
11488
  } else {
11447
11489
  throw new (0, _chunkS55JFWDAcjs.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.`);
11448
11490
  }
@@ -11456,8 +11498,8 @@ var ImageEditorController = (_class12 = class {
11456
11498
  const doc = this.state.colorProfile;
11457
11499
  const p = resolveProfile(doc);
11458
11500
  const m = this.state.colorMode;
11459
- const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _453 => _453.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _454 => _454.mode]), () => ( "rgb")) };
11460
- if (_optionalChain([m, 'optionalAccess', _455 => _455.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11501
+ const out = { name: _nullishCoalesce(_optionalChain([doc, 'optionalAccess', _457 => _457.name]), () => ( p.description)), builtin: doc ? _nullishCoalesce(doc.builtin, () => ( null)) : "srgb", colorSpace: p.colorSpace, srgb: isSrgb(doc), mode: _nullishCoalesce(_optionalChain([m, 'optionalAccess', _458 => _458.mode]), () => ( "rgb")) };
11502
+ if (_optionalChain([m, 'optionalAccess', _459 => _459.mode]) === "cmyk") out.cmykProfile = { name: m.profile.name, builtin: _nullishCoalesce(m.profile.builtin, () => ( null)), intent: m.intent };
11461
11503
  return out;
11462
11504
  }
11463
11505
  /**
@@ -11547,7 +11589,7 @@ var ImageEditorController = (_class12 = class {
11547
11589
  const textEnv = this.textEnv();
11548
11590
  const walk = (layers) => layers.map((l) => {
11549
11591
  let next2 = l;
11550
- if (_optionalChain([l, 'access', _456 => _456.effects, 'optionalAccess', _457 => _457.items, 'access', _458 => _458.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11592
+ if (_optionalChain([l, 'access', _460 => _460.effects, 'optionalAccess', _461 => _461.items, 'access', _462 => _462.length])) next2 = { ...next2, effects: convertColorFields(l.effects, hex) };
11551
11593
  if (l.type === "group") {
11552
11594
  if (next2 !== l) converted.push(l.id);
11553
11595
  return { ...next2, children: walk(l.children) };
@@ -11735,8 +11777,8 @@ var ImageEditorController = (_class12 = class {
11735
11777
  else delete s.bitDepth;
11736
11778
  delete s.colorProfile;
11737
11779
  delete s.colorMode;
11738
- if (_optionalChain([result, 'access', _459 => _459.sourceMode, 'optionalAccess', _460 => _460.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11739
- else if (_optionalChain([result, 'access', _461 => _461.sourceMode, 'optionalAccess', _462 => _462.mode]) === "lab") s.colorMode = { mode: "lab" };
11780
+ if (_optionalChain([result, 'access', _463 => _463.sourceMode, 'optionalAccess', _464 => _464.mode]) === "cmyk") s.colorMode = { mode: "cmyk", profile: result.sourceMode.profile, intent: "relative" };
11781
+ else if (_optionalChain([result, 'access', _465 => _465.sourceMode, 'optionalAccess', _466 => _466.mode]) === "lab") s.colorMode = { mode: "lab" };
11740
11782
  else if (result.iccProfile) {
11741
11783
  try {
11742
11784
  const doc = documentProfile(result.iccProfile);
@@ -11800,7 +11842,7 @@ var ImageEditorController = (_class12 = class {
11800
11842
  const compositor = new (0, _chunkS55JFWDAcjs.LayerCompositor)();
11801
11843
  const bakeMask = (layer) => {
11802
11844
  const mask = layer.mask;
11803
- if (!_optionalChain([mask, 'optionalAccess', _463 => _463.source])) return mask;
11845
+ if (!_optionalChain([mask, 'optionalAccess', _467 => _467.source])) return mask;
11804
11846
  add2("Parametric (depth) masks were baked into pixel masks", layer.name);
11805
11847
  const plain3 = { ...layer, mask: { ...mask, density: 1, feather: 0, enabled: true } };
11806
11848
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
@@ -11816,10 +11858,10 @@ var ImageEditorController = (_class12 = class {
11816
11858
  return baked;
11817
11859
  };
11818
11860
  const prepare = async (layer) => {
11819
- if (_optionalChain([layer, 'access', _464 => _464.edge, 'optionalAccess', _465 => _465.ambient])) add2("The live edge cast (set_edge_ambient) has no PSD equivalent and was left out", layer.name);
11861
+ if (_optionalChain([layer, 'access', _468 => _468.edge, 'optionalAccess', _469 => _469.ambient])) add2("The live edge cast (set_edge_ambient) has no PSD equivalent and was left out", layer.name);
11820
11862
  const p = await prepareLayer(layer);
11821
- if (_optionalChain([p, 'optionalAccess', _466 => _466.edge])) delete p.edge;
11822
- if (_optionalChain([p, 'optionalAccess', _467 => _467.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11863
+ if (_optionalChain([p, 'optionalAccess', _470 => _470.edge])) delete p.edge;
11864
+ if (_optionalChain([p, 'optionalAccess', _471 => _471.blend]) === "pigment") add2("The Pigment blend mode has no PSD equivalent and was written as Normal", layer.name);
11823
11865
  return p;
11824
11866
  };
11825
11867
  const prepareLayer = async (layer) => {
@@ -11862,7 +11904,7 @@ var ImageEditorController = (_class12 = class {
11862
11904
  return out2;
11863
11905
  }
11864
11906
  if (layer.type === "shape" || layer.type === "type") {
11865
- if (layer.type === "type" && _optionalChain([layer, 'access', _468 => _468.missingFonts, 'optionalAccess', _469 => _469.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);
11907
+ if (layer.type === "type" && _optionalChain([layer, 'access', _472 => _472.missingFonts, 'optionalAccess', _473 => _473.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);
11866
11908
  const out2 = { ...layer };
11867
11909
  const mask2 = bakeMask(layer);
11868
11910
  if (mask2) out2.mask = mask2;
@@ -11881,7 +11923,7 @@ var ImageEditorController = (_class12 = class {
11881
11923
  out.surface = this.surfaceOf(layer);
11882
11924
  delete out.source;
11883
11925
  }
11884
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _470 => _470.filters, 'optionalAccess', _471 => _471.filter, 'call', _472 => _472(_chunkS55JFWDAcjs.isActiveFilter)]), () => ( []));
11926
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _474 => _474.filters, 'optionalAccess', _475 => _475.filter, 'call', _476 => _476(_chunkS55JFWDAcjs.isActiveFilter)]), () => ( []));
11885
11927
  if (active.length) {
11886
11928
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
11887
11929
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -11892,7 +11934,7 @@ var ImageEditorController = (_class12 = class {
11892
11934
  const data = compositor.composite([content], canvas, sources);
11893
11935
  out = { ...out, surface: _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, -layer.offset.x, -layer.offset.y) };
11894
11936
  }
11895
- if (_optionalChain([layer, 'access', _473 => _473.filters, 'optionalAccess', _474 => _474.some, 'call', _475 => _475((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11937
+ if (_optionalChain([layer, 'access', _477 => _477.filters, 'optionalAccess', _478 => _478.some, 'call', _479 => _479((f) => !f.enabled)])) add2("Disabled layer filters were left out", layer.name);
11896
11938
  delete out.filters;
11897
11939
  const unmixMask = _chunkS55JFWDAcjs.hasEdgeUnmix.call(void 0, layer.edge) ? _chunkS55JFWDAcjs.effectiveLayerMask.call(void 0, layer, width, height) : void 0;
11898
11940
  if (unmixMask && !unmixMask.source && unmixMask.enabled !== false) {
@@ -11964,7 +12006,7 @@ var ImageEditorController = (_class12 = class {
11964
12006
  );
11965
12007
  }
11966
12008
  layers = resizeLegacyMasks(layers, prev, next.dimensions);
11967
- const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _476 => _476.state, 'access', _477 => _477.patterns, 'optionalAccess', _478 => _478.find, 'call', _479 => _479((p) => p.id === pid)]), () => ( null)) };
12009
+ const env = { ...next.dimensions, pattern: (pid) => _nullishCoalesce(_optionalChain([this, 'access', _480 => _480.state, 'access', _481 => _481.patterns, 'optionalAccess', _482 => _482.find, 'call', _483 => _483((p) => p.id === pid)]), () => ( null)) };
11968
12010
  for (const l of _chunkB46UQUDCcjs.flattenLayers.call(void 0, layers)) {
11969
12011
  if (l.type === "annotation") {
11970
12012
  layers = _chunkB46UQUDCcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, annotation: scaleAnnotation(l.annotation, sx, sy) }));
@@ -11973,7 +12015,7 @@ var ImageEditorController = (_class12 = class {
11973
12015
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
11974
12016
  const fromAnnotation = scaled ? _chunkS55JFWDAcjs.shapeFromAnnotation.call(void 0, scaled) : null;
11975
12017
  const m = [sx, 0, 0, sy, 0, 0];
11976
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _480 => _480.components]), () => ( _chunkS55JFWDAcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
12018
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _484 => _484.components]), () => ( _chunkS55JFWDAcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
11977
12019
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
11978
12020
  if (scaled && fromAnnotation) moved.annotation = scaled;
11979
12021
  else delete moved.annotation;
@@ -11991,7 +12033,7 @@ var ImageEditorController = (_class12 = class {
11991
12033
  this.notify();
11992
12034
  }
11993
12035
  toJSON(options) {
11994
- const root = _optionalChain([this, 'access', _481 => _481.contentsStack, 'access', _482 => _482[0], 'optionalAccess', _483 => _483.saved]);
12036
+ const root = _optionalChain([this, 'access', _485 => _485.contentsStack, 'access', _486 => _486[0], 'optionalAccess', _487 => _487.saved]);
11995
12037
  const current = this.state;
11996
12038
  const element = this.imageElement;
11997
12039
  if (root) {
@@ -12002,9 +12044,9 @@ var ImageEditorController = (_class12 = class {
12002
12044
  let out;
12003
12045
  try {
12004
12046
  out = this.serializeState();
12005
- if (_optionalChain([this, 'access', _484 => _484.state, 'access', _485 => _485.selection, 'optionalAccess', _486 => _486.bounds])) out.selection = _chunkSS53NNZOcjs.serializeSelection.call(void 0, this.state.selection);
12006
- if (_optionalChain([this, 'access', _487 => _487.state, 'access', _488 => _488.channels, 'optionalAccess', _489 => _489.length])) out.channels = serializeChannels(this.state.channels);
12007
- if (_optionalChain([this, 'access', _490 => _490.state, 'access', _491 => _491.paths, 'optionalAccess', _492 => _492.length])) out.paths = serializePaths(this.state.paths);
12047
+ if (_optionalChain([this, 'access', _488 => _488.state, 'access', _489 => _489.selection, 'optionalAccess', _490 => _490.bounds])) out.selection = _chunkSS53NNZOcjs.serializeSelection.call(void 0, this.state.selection);
12048
+ if (_optionalChain([this, 'access', _491 => _491.state, 'access', _492 => _492.channels, 'optionalAccess', _493 => _493.length])) out.channels = serializeChannels(this.state.channels);
12049
+ if (_optionalChain([this, 'access', _494 => _494.state, 'access', _495 => _495.paths, 'optionalAccess', _496 => _496.length])) out.paths = serializePaths(this.state.paths);
12008
12050
  } finally {
12009
12051
  if (root) {
12010
12052
  this.state = current;
@@ -12122,10 +12164,10 @@ var ImageEditorController = (_class12 = class {
12122
12164
  serializeState() {
12123
12165
  const { width, height } = this.naturalSize;
12124
12166
  const view = _chunkS55JFWDAcjs.legacyView.call(void 0, this.stack(), width, height, null);
12125
- if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _493 => _493.state, 'access', _494 => _494.patterns, 'optionalAccess', _495 => _495.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
12167
+ if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _497 => _497.state, 'access', _498 => _498.patterns, 'optionalAccess', _499 => _499.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
12126
12168
  return {
12127
12169
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
12128
- version: _optionalChain([view, 'access', _496 => _496.adjustments, 'access', _497 => _497.layers, 'optionalAccess', _498 => _498.length]) ? 2 : 1,
12170
+ version: _optionalChain([view, 'access', _500 => _500.adjustments, 'access', _501 => _501.layers, 'optionalAccess', _502 => _502.length]) ? 2 : 1,
12129
12171
  crop: this.state.crop ? { ...this.state.crop } : null,
12130
12172
  transform: { ...this.state.transform },
12131
12173
  adjustments: serializeAdjustments(view.adjustments),
@@ -12150,7 +12192,7 @@ var ImageEditorController = (_class12 = class {
12150
12192
  };
12151
12193
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
12152
12194
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
12153
- if (_optionalChain([this, 'access', _499 => _499.state, 'access', _500 => _500.patterns, 'optionalAccess', _501 => _501.length])) out.patterns = _chunkS55JFWDAcjs.serializePatterns.call(void 0, this.state.patterns);
12195
+ if (_optionalChain([this, 'access', _503 => _503.state, 'access', _504 => _504.patterns, 'optionalAccess', _505 => _505.length])) out.patterns = _chunkS55JFWDAcjs.serializePatterns.call(void 0, this.state.patterns);
12154
12196
  if (smartContents) out.smartContents = smartContents;
12155
12197
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
12156
12198
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -12160,7 +12202,7 @@ var ImageEditorController = (_class12 = class {
12160
12202
  }, _class12);
12161
12203
  function serializeAdjustments(adjustments) {
12162
12204
  const out = { ...adjustments };
12163
- if (_optionalChain([out, 'access', _502 => _502.layers, 'optionalAccess', _503 => _503.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
12205
+ if (_optionalChain([out, 'access', _506 => _506.layers, 'optionalAccess', _507 => _507.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
12164
12206
  else delete out.layers;
12165
12207
  if (_chunkS55JFWDAcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION) {
12166
12208
  delete out.process;
@@ -12196,11 +12238,11 @@ function withDevelop(layer, partial) {
12196
12238
  return { ...layer, filters };
12197
12239
  }
12198
12240
  function withBlur(layer, radius) {
12199
- const existing = _optionalChain([layer, 'access', _504 => _504.filters, 'optionalAccess', _505 => _505.find, 'call', _506 => _506((f) => f.kind === "blur")]);
12241
+ const existing = _optionalChain([layer, 'access', _508 => _508.filters, 'optionalAccess', _509 => _509.find, 'call', _510 => _510((f) => f.kind === "blur")]);
12200
12242
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
12201
12243
  if (radius > 0) {
12202
12244
  filters.push({
12203
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _507 => _507.id]), () => ( (layer.source === "document" ? _chunkS55JFWDAcjs.BLUR_FILTER_ID : _chunkS55JFWDAcjs.newLayerId.call(void 0, "flt")))),
12245
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _511 => _511.id]), () => ( (layer.source === "document" ? _chunkS55JFWDAcjs.BLUR_FILTER_ID : _chunkS55JFWDAcjs.newLayerId.call(void 0, "flt")))),
12204
12246
  kind: "blur",
12205
12247
  enabled: true,
12206
12248
  radius
@@ -12296,7 +12338,7 @@ function collectStateTiles(layers, into) {
12296
12338
  if (l.type === "shape" || l.type === "type") _chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
12297
12339
  if (l.type === "smart") {
12298
12340
  _chunk474IQG74cjs.collectTiles.call(void 0, l.surface, into);
12299
- if (_optionalChain([l, 'access', _508 => _508.smartFilters, 'optionalAccess', _509 => _509.mask])) _chunk474IQG74cjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12341
+ if (_optionalChain([l, 'access', _512 => _512.smartFilters, 'optionalAccess', _513 => _513.mask])) _chunk474IQG74cjs.collectTiles.call(void 0, l.smartFilters.mask.surface, into);
12300
12342
  if (l.contents.raster) _chunk474IQG74cjs.collectTiles.call(void 0, l.contents.raster, into);
12301
12343
  if (l.contents.document) collectStateTiles(l.contents.document.layers, into);
12302
12344
  }
@@ -12328,7 +12370,7 @@ function pixelsOnly(layers) {
12328
12370
  for (const l of layers) {
12329
12371
  if (l.type === "adjustment") continue;
12330
12372
  if (l.type === "group") out.push({ ...l, children: pixelsOnly(l.children) });
12331
- else if (l.type === "pixel" && _optionalChain([l, 'access', _510 => _510.filters, 'optionalAccess', _511 => _511.length])) {
12373
+ else if (l.type === "pixel" && _optionalChain([l, 'access', _514 => _514.filters, 'optionalAccess', _515 => _515.length])) {
12332
12374
  const p = { ...l };
12333
12375
  delete p.filters;
12334
12376
  out.push(p);
@@ -12394,7 +12436,7 @@ function toHex(c) {
12394
12436
  return "#" + [c[0], c[1], c[2]].map((v) => Math.round(v).toString(16).padStart(2, "0")).join("");
12395
12437
  }
12396
12438
  function normalizeSelection(mask) {
12397
- return _optionalChain([mask, 'optionalAccess', _512 => _512.bounds]) ? mask : null;
12439
+ return _optionalChain([mask, 'optionalAccess', _516 => _516.bounds]) ? mask : null;
12398
12440
  }
12399
12441
  function sameSelection(a, b) {
12400
12442
  if (a.width !== b.width || a.height !== b.height) return false;
@@ -12604,7 +12646,7 @@ function loadImageEditorDocument(input) {
12604
12646
  }
12605
12647
  const state = { version: 1, ...result.value };
12606
12648
  if (isV2) {
12607
- if (_optionalChain([state, 'access', _513 => _513.adjustments, 'access', _514 => _514.layers, 'optionalAccess', _515 => _515.length])) state.version = 2;
12649
+ if (_optionalChain([state, 'access', _517 => _517.adjustments, 'access', _518 => _518.layers, 'optionalAccess', _519 => _519.length])) state.version = 2;
12608
12650
  result.report.version = 2;
12609
12651
  }
12610
12652
  if (state.selection === void 0) delete state.selection;
@@ -12812,7 +12854,7 @@ function findAdjustmentControl(id) {
12812
12854
  }
12813
12855
  function findLayerControl(kind, id) {
12814
12856
  if (id === "opacity") return ADJUSTMENT_LAYER_OPACITY_CONTROL;
12815
- return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _516 => _516[kind], 'optionalAccess', _517 => _517.find, 'call', _518 => _518((c) => c.id === id)]);
12857
+ return _optionalChain([ADJUSTMENT_LAYER_CONTROLS, 'access', _520 => _520[kind], 'optionalAccess', _521 => _521.find, 'call', _522 => _522((c) => c.id === id)]);
12816
12858
  }
12817
12859
  function clampControlValue(spec, v) {
12818
12860
  if (typeof v !== "number" || !Number.isFinite(v)) return spec.default;
@@ -13289,7 +13331,7 @@ function summary(controller) {
13289
13331
  const area = _chunkSS53NNZOcjs.selectionArea.call(void 0, sel);
13290
13332
  return {
13291
13333
  empty: !sel,
13292
- bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _519 => _519.bounds]), () => ( null)),
13334
+ bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _523 => _523.bounds]), () => ( null)),
13293
13335
  /** Σ coverage in pixels. */
13294
13336
  area: Math.round(area),
13295
13337
  percent: Math.round(area / Math.max(1, width * height) * 1e4) / 100,
@@ -13444,7 +13486,7 @@ function createImageSelectionTools(controller) {
13444
13486
  break;
13445
13487
  }
13446
13488
  case "polygon": {
13447
- const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _520 => _520.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _521 => _521.y]), NaN) })) : [];
13489
+ const list = Array.isArray(points) ? points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _524 => _524.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _525 => _525.y]), NaN) })) : [];
13448
13490
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13449
13491
  throw new Error("polygon needs points: at least 3 { x, y } vertices.");
13450
13492
  }
@@ -13579,7 +13621,7 @@ function createImageSelectionTools(controller) {
13579
13621
  },
13580
13622
  annotations: writeAnnotations("Refine the selection edge"),
13581
13623
  handler: async (params) => {
13582
- const edits = Array.isArray(params.edits) ? params.edits.map((e) => e.kind === "object" ? { ...e } : { ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _522 => _522.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _523 => _523.y]), NaN) })) }) : [];
13624
+ const edits = Array.isArray(params.edits) ? params.edits.map((e) => e.kind === "object" ? { ...e } : { ...e, points: (_nullishCoalesce(e.points, () => ( []))).map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _526 => _526.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _527 => _527.y]), NaN) })) }) : [];
13583
13625
  for (const e of edits) {
13584
13626
  if (e.kind === "object") {
13585
13627
  if (!e.rect === !e.point) throw new Error("An object edit takes rect (a box around the object) or point (on it).");
@@ -13744,7 +13786,7 @@ function createImageSelectionTools(controller) {
13744
13786
  },
13745
13787
  annotations: writeAnnotations("Select a polygon (lasso)", true),
13746
13788
  handler: async (args) => {
13747
- const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _524 => _524.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _525 => _525.y]), NaN) })) : [];
13789
+ const list = Array.isArray(args.points) ? args.points.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _528 => _528.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _529 => _529.y]), NaN) })) : [];
13748
13790
  if (list.length < 3 || !list.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) {
13749
13791
  throw new Error("points needs at least 3 { x, y } vertices in natural image pixels.");
13750
13792
  }
@@ -13781,7 +13823,7 @@ function createImageSelectionTools(controller) {
13781
13823
  },
13782
13824
  annotations: writeAnnotations("Quick Selection"),
13783
13825
  handler: async (args, context) => {
13784
- const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _526 => _526.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _527 => _527.y]), NaN) })) : []) : [];
13826
+ const strokes = Array.isArray(args.strokes) ? args.strokes.map((s) => Array.isArray(s) ? s.map((p) => ({ x: num2(_optionalChain([p, 'optionalAccess', _530 => _530.x]), NaN), y: num2(_optionalChain([p, 'optionalAccess', _531 => _531.y]), NaN) })) : []) : [];
13785
13827
  if (!strokes.length || strokes.some((s) => !s.length || !s.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y)))) {
13786
13828
  throw new Error("strokes needs at least one stroke of { x, y } points in natural image pixels.");
13787
13829
  }
@@ -13790,7 +13832,7 @@ function createImageSelectionTools(controller) {
13790
13832
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
13791
13833
  sampleAllLayers: args.sampleAllLayers,
13792
13834
  enhanceEdge: args.enhanceEdge,
13793
- signal: _optionalChain([context, 'optionalAccess', _528 => _528.signal])
13835
+ signal: _optionalChain([context, 'optionalAccess', _532 => _532.signal])
13794
13836
  });
13795
13837
  return { ...summary(controller), ...uncertainty(controller) };
13796
13838
  }
@@ -13828,7 +13870,7 @@ function createImageSelectionTools(controller) {
13828
13870
  sampleAllLayers: args.sampleAllLayers,
13829
13871
  enhanceEdge: args.enhanceEdge,
13830
13872
  useModel: args.useModel,
13831
- signal: _optionalChain([context, 'optionalAccess', _529 => _529.signal])
13873
+ signal: _optionalChain([context, 'optionalAccess', _533 => _533.signal])
13832
13874
  };
13833
13875
  const { method } = rect2 ? await controller.selectObject({ rect: { x: num2(rect2.x, NaN), y: num2(rect2.y, NaN), width: num2(rect2.width, NaN), height: num2(rect2.height, NaN) } }, options) : await controller.selectObject({ point: { x: num2(point.x, NaN), y: num2(point.y, NaN) } }, options);
13834
13876
  return { ...summary(controller), method, ...uncertainty(controller) };
@@ -13857,7 +13899,7 @@ function createImageSelectionTools(controller) {
13857
13899
  softness: args.softness === void 0 ? void 0 : num2(args.softness, 4),
13858
13900
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
13859
13901
  sampleAllLayers: args.sampleAllLayers,
13860
- signal: _optionalChain([context, 'optionalAccess', _530 => _530.signal])
13902
+ signal: _optionalChain([context, 'optionalAccess', _534 => _534.signal])
13861
13903
  });
13862
13904
  return { ...summary(controller), noiseLevel };
13863
13905
  }
@@ -13885,7 +13927,7 @@ function createImageSelectionTools(controller) {
13885
13927
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, args.mode),
13886
13928
  sampleAllLayers: args.sampleAllLayers,
13887
13929
  useModel: args.useModel,
13888
- signal: _optionalChain([context, 'optionalAccess', _531 => _531.signal])
13930
+ signal: _optionalChain([context, 'optionalAccess', _535 => _535.signal])
13889
13931
  });
13890
13932
  return { ...summary(controller), method, ...note ? { note } : {}, ...uncertainty(controller) };
13891
13933
  }
@@ -13983,7 +14025,7 @@ function createImageSelectionTools(controller) {
13983
14025
  await controller.selectColorRangePreset(args.preset, { ...common, falloff: num2(args.fuzziness, 20) });
13984
14026
  } else {
13985
14027
  const samples = args.samples.map((s, i) => {
13986
- if (typeof _optionalChain([s, 'optionalAccess', _532 => _532.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
14028
+ if (typeof _optionalChain([s, 'optionalAccess', _536 => _536.color]) !== "string" || !/^#?[0-9a-f]{6}$/i.test(s.color.trim())) throw new Error(`samples[${i}].color must be #rrggbb.`);
13987
14029
  const at = typeof s.x === "number" && typeof s.y === "number" ? { x: s.x, y: s.y } : void 0;
13988
14030
  return at ? { color: s.color, at } : { color: s.color };
13989
14031
  });
@@ -14225,7 +14267,7 @@ function createImageSelectionTools(controller) {
14225
14267
  annotations: writeAnnotations("Content-Aware Fill"),
14226
14268
  handler: async (args, context) => {
14227
14269
  if (!controller.getSelection()) throw new Error("Nothing is selected; select what to remove first.");
14228
- const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess', _533 => _533.x]), NaN), y: num2(_optionalChain([r, 'optionalAccess', _534 => _534.y]), NaN), width: num2(_optionalChain([r, 'optionalAccess', _535 => _535.width]), NaN), height: num2(_optionalChain([r, 'optionalAccess', _536 => _536.height]), NaN) })) : void 0;
14270
+ const rects = (v) => Array.isArray(v) ? v.map((r) => ({ x: num2(_optionalChain([r, 'optionalAccess', _537 => _537.x]), NaN), y: num2(_optionalChain([r, 'optionalAccess', _538 => _538.y]), NaN), width: num2(_optionalChain([r, 'optionalAccess', _539 => _539.width]), NaN), height: num2(_optionalChain([r, 'optionalAccess', _540 => _540.height]), NaN) })) : void 0;
14229
14271
  return controller.contentAwareFillAsync({
14230
14272
  output: args.output,
14231
14273
  sampleRadius: args.sampleRadius,
@@ -14234,7 +14276,7 @@ function createImageSelectionTools(controller) {
14234
14276
  sampleRects: rects(args.sampleRects),
14235
14277
  excludeRects: rects(args.excludeRects),
14236
14278
  samplingChannelId: typeof args.samplingChannelId === "string" ? args.samplingChannelId : void 0,
14237
- signal: _optionalChain([context, 'optionalAccess', _537 => _537.signal])
14279
+ signal: _optionalChain([context, 'optionalAccess', _541 => _541.signal])
14238
14280
  });
14239
14281
  }
14240
14282
  };
@@ -14514,13 +14556,13 @@ function createImageSubjectSelectionTool(controller) {
14514
14556
  handler: async ({ target, maxSegments, mode, feather, enhanceEdge }, context) => {
14515
14557
  if (target !== void 0 && typeof target !== "string") throw new Error("target must be a description in words.");
14516
14558
  if (controller.segmentationProvider && !String(_nullishCoalesce(target, () => ( ""))).trim()) throw new Error("target must describe what to select (a model is set, and it selects by description).");
14517
- const perform = _optionalChain([context, 'optionalAccess', _538 => _538.perform]);
14559
+ const perform = _optionalChain([context, 'optionalAccess', _542 => _542.perform]);
14518
14560
  const { segments, method, note } = await controller.selectSubject(String(_nullishCoalesce(target, () => ( ""))), {
14519
14561
  mode: _chunkSS53NNZOcjs.parseSelectionMode.call(void 0, mode),
14520
14562
  feather: num2(feather, 0),
14521
14563
  maxSegments: typeof maxSegments === "number" ? Math.max(1, Math.round(maxSegments)) : void 0,
14522
14564
  enhanceEdge: enhanceEdge === true,
14523
- signal: _optionalChain([context, 'optionalAccess', _539 => _539.signal]),
14565
+ signal: _optionalChain([context, 'optionalAccess', _543 => _543.signal]),
14524
14566
  // Under playback the cursor traces what the model found, as a lasso, before it is selected.
14525
14567
  beforeApply: perform ? (outlines) => perform(planOutlineTrace(outlines)) : void 0
14526
14568
  });
@@ -14598,7 +14640,7 @@ async function renderImageRegion(controller, request) {
14598
14640
  const maskView = maskViewCanvas(controller, document);
14599
14641
  if (maskView) context.drawImage(maskView, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
14600
14642
  const selection = state.selection;
14601
- if (_optionalChain([selection, 'optionalAccess', _540 => _540.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14643
+ if (_optionalChain([selection, 'optionalAccess', _544 => _544.bounds]) && selection.width === state.imageDimensions.width && selection.height === state.imageDimensions.height) {
14602
14644
  const shade = selectionShade(selection, document);
14603
14645
  if (shade) context.drawImage(shade, rect2.x, rect2.y, rect2.width, rect2.height, 0, 0, out.width, out.height);
14604
14646
  }
@@ -14623,7 +14665,7 @@ function createImageCaptureSurface(controller) {
14623
14665
  return {
14624
14666
  units: "image pixels",
14625
14667
  content: whole,
14626
- selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _541 => _541.getState, 'call', _542 => _542(), 'access', _543 => _543.selection, 'optionalAccess', _544 => _544.bounds]), () => ( null)) }),
14668
+ selection: () => ({ rect: _nullishCoalesce(_optionalChain([controller, 'access', _545 => _545.getState, 'call', _546 => _546(), 'access', _547 => _547.selection, 'optionalAccess', _548 => _548.bounds]), () => ( null)) }),
14627
14669
  overlays: "a shade over unselected pixels, the crop box outline and a layer mask view (set_mask_view)",
14628
14670
  maxScale: 8,
14629
14671
  render: (request) => renderImageRegion(controller, request)
@@ -14957,7 +14999,7 @@ function describeLayer(layer, activeId, boundsOf) {
14957
14999
  out.bounds = boundsOf(layer);
14958
15000
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14959
15001
  out.shape = {
14960
- components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _545 => _545.live, 'optionalAccess', _546 => _546.kind]), () => ( "path")) })),
15002
+ components: layer.components.map((c) => ({ op: c.op, kind: _nullishCoalesce(_optionalChain([c, 'access', _549 => _549.live, 'optionalAccess', _550 => _550.kind]), () => ( "path")) })),
14961
15003
  fill: layer.fill ? layer.fill.type : null,
14962
15004
  stroke: layer.stroke ? { width: layer.stroke.width, paint: layer.stroke.paint.type } : null
14963
15005
  };
@@ -14980,8 +15022,8 @@ function describeLayer(layer, activeId, boundsOf) {
14980
15022
  out.bounds = boundsOf(layer);
14981
15023
  out.fillOpacity = round3(_nullishCoalesce(layer.fillOpacity, () => ( 1)));
14982
15024
  out.contents = { id: layer.contents.id, name: layer.contents.name, kind: layer.contents.kind, width: layer.contents.width, height: layer.contents.height };
14983
- out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _547 => _547.smartFilters, 'optionalAccess', _548 => _548.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
14984
- out.filterMask = maskSummary(_optionalChain([layer, 'access', _549 => _549.smartFilters, 'optionalAccess', _550 => _550.mask]));
15025
+ out.smartFilters = (_nullishCoalesce(_optionalChain([layer, 'access', _551 => _551.smartFilters, 'optionalAccess', _552 => _552.filters]), () => ( []))).map((f) => ({ id: f.id, kind: f.kind, enabled: f.enabled }));
15026
+ out.filterMask = maskSummary(_optionalChain([layer, 'access', _553 => _553.smartFilters, 'optionalAccess', _554 => _554.mask]));
14985
15027
  break;
14986
15028
  }
14987
15029
  return out;
@@ -15009,7 +15051,7 @@ function createImageLayerTools(controller) {
15009
15051
  if (!loc) return null;
15010
15052
  return {
15011
15053
  ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)),
15012
- parentId: _nullishCoalesce(_optionalChain([loc, 'access', _551 => _551.parent, 'optionalAccess', _552 => _552.id]), () => ( null)),
15054
+ parentId: _nullishCoalesce(_optionalChain([loc, 'access', _555 => _555.parent, 'optionalAccess', _556 => _556.id]), () => ( null)),
15013
15055
  index: loc.index
15014
15056
  };
15015
15057
  };
@@ -15332,7 +15374,7 @@ function createImageLayerTools(controller) {
15332
15374
  if (view !== "gray" && view !== "overlay" && view !== "off") throw new Error(`Unknown view "${String(view)}". Use gray, overlay or off.`);
15333
15375
  const id = view === "off" || layerId === void 0 ? void 0 : exists(layerId);
15334
15376
  const shown = controller.setMaskView(view, id);
15335
- return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _553 => _553.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _554 => _554.layerId]), () => ( null)) };
15377
+ return { view: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _557 => _557.mode]), () => ( "off")), layerId: _nullishCoalesce(_optionalChain([shown, 'optionalAccess', _558 => _558.layerId]), () => ( null)) };
15336
15378
  }
15337
15379
  };
15338
15380
  const AMOUNT = (what) => ({ type: "number", minimum: 0, maximum: 100, description: `${what}, in percent 0-100; 0 turns it off.` });
@@ -15931,7 +15973,7 @@ var SelectionGesture = (_class13 = class {
15931
15973
  size: _nullishCoalesce(options.quickSize, () => ( 30)),
15932
15974
  grow: q.mode === "add",
15933
15975
  enhanceEdge: _nullishCoalesce(options.quickEnhance, () => ( false)),
15934
- selection: q.mode === "add" && _optionalChain([q, 'access', _555 => _555.base, 'optionalAccess', _556 => _556.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, q.base) : null
15976
+ selection: q.mode === "add" && _optionalChain([q, 'access', _559 => _559.base, 'optionalAccess', _560 => _560.bounds]) ? _chunkUC3PWFM3cjs.serializeMask.call(void 0, q.base) : null
15935
15977
  },
15936
15978
  pixels
15937
15979
  );
@@ -16142,7 +16184,7 @@ var SelectionGesture = (_class13 = class {
16142
16184
  this.start = null;
16143
16185
  this.current = null;
16144
16186
  this.points = [];
16145
- const strokeMode = _nullishCoalesce(_optionalChain([this, 'access', _557 => _557.quick, 'optionalAccess', _558 => _558.mode]), () => ( (mode === "replace" && this.controller.getSelection() ? "add" : mode)));
16187
+ const strokeMode = _nullishCoalesce(_optionalChain([this, 'access', _561 => _561.quick, 'optionalAccess', _562 => _562.mode]), () => ( (mode === "replace" && this.controller.getSelection() ? "add" : mode)));
16146
16188
  this.quick = null;
16147
16189
  this.pending = this.controller.quickSelect([stroke], {
16148
16190
  size: _nullishCoalesce(options.quickSize, () => ( 30)),
@@ -16303,7 +16345,7 @@ function handleSelectionShortcut(controller, e, onError) {
16303
16345
  try {
16304
16346
  fn();
16305
16347
  } catch (err) {
16306
- _optionalChain([onError, 'optionalCall', _559 => _559(err instanceof Error ? err.message : String(err))]);
16348
+ _optionalChain([onError, 'optionalCall', _563 => _563(err instanceof Error ? err.message : String(err))]);
16307
16349
  }
16308
16350
  return true;
16309
16351
  };
@@ -16318,9 +16360,9 @@ function handleMaskViewKey(controller, e) {
16318
16360
  if (e.ctrlKey || e.metaKey || e.altKey || e.key !== "\\") return false;
16319
16361
  const id = controller.getState().activeLayerId;
16320
16362
  const layer = id ? controller.getLayer(id) : null;
16321
- if (!_optionalChain([layer, 'optionalAccess', _560 => _560.mask]) || layer.mask.source) return false;
16363
+ if (!_optionalChain([layer, 'optionalAccess', _564 => _564.mask]) || layer.mask.source) return false;
16322
16364
  const view = controller.getMaskView();
16323
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _561 => _561.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
16365
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _565 => _565.layerId]) === layer.id && view.mode === "overlay" ? "off" : "overlay", layer.id);
16324
16366
  return true;
16325
16367
  }
16326
16368
  function handleQuickMaskKey(controller, e) {
@@ -16534,7 +16576,7 @@ var PaintGesture = (_class14 = class {
16534
16576
  const layer = this.controller.getActiveLayer();
16535
16577
  if (!layer) throw new Error("Select a layer to move in the Layers panel.");
16536
16578
  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.`);
16537
- if (_optionalChain([layer, 'access', _562 => _562.locks, 'optionalAccess', _563 => _563.all]) || _optionalChain([layer, 'access', _564 => _564.locks, 'optionalAccess', _565 => _565.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
16579
+ if (_optionalChain([layer, 'access', _566 => _566.locks, 'optionalAccess', _567 => _567.all]) || _optionalChain([layer, 'access', _568 => _568.locks, 'optionalAccess', _569 => _569.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
16538
16580
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
16539
16581
  const b = _chunkS55JFWDAcjs.shapeGeometryBounds.call(void 0, layer);
16540
16582
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
@@ -16591,7 +16633,7 @@ var PaintGesture = (_class14 = class {
16591
16633
  this.move = null;
16592
16634
  }
16593
16635
  cancel() {
16594
- _optionalChain([this, 'access', _566 => _566.stroke, 'optionalAccess', _567 => _567.cancel, 'call', _568 => _568()]);
16636
+ _optionalChain([this, 'access', _570 => _570.stroke, 'optionalAccess', _571 => _571.cancel, 'call', _572 => _572()]);
16595
16637
  this.stroke = null;
16596
16638
  this.move = null;
16597
16639
  }
@@ -17672,7 +17714,7 @@ function createImageSmartObjectTools(controller) {
17672
17714
  const layerSummary = (id) => {
17673
17715
  const s = controller.getState();
17674
17716
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
17675
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _569 => _569.parent, 'optionalAccess', _570 => _570.id]), () => ( null)), index: loc.index } : null;
17717
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _573 => _573.parent, 'optionalAccess', _574 => _574.id]), () => ( null)), index: loc.index } : null;
17676
17718
  };
17677
17719
  const getSmart = {
17678
17720
  name: "get_smart_object",
@@ -18229,7 +18271,7 @@ function createImageShapeTools(controller) {
18229
18271
  const layerSummary = (id) => {
18230
18272
  const s = controller.getState();
18231
18273
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
18232
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _571 => _571.parent, 'optionalAccess', _572 => _572.id]), () => ( null)), index: loc.index } : null;
18274
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _575 => _575.parent, 'optionalAccess', _576 => _576.id]), () => ( null)), index: loc.index } : null;
18233
18275
  };
18234
18276
  const get = {
18235
18277
  name: "get_shape_layer",
@@ -18460,7 +18502,7 @@ function createImageShapeTools(controller) {
18460
18502
  const mode = args.mode;
18461
18503
  controller.pathToSelection(_nullishCoalesce(fromPathId(args), () => ( pathSpec(args))), { feather: args.feather, antiAlias: args.antiAlias, mode });
18462
18504
  const sel = controller.getSelection();
18463
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _573 => _573.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
18505
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _577 => _577.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
18464
18506
  }
18465
18507
  };
18466
18508
  const getVectorMask = {
@@ -18492,7 +18534,7 @@ function createImageShapeTools(controller) {
18492
18534
  handler: (args) => {
18493
18535
  const id = layerArg(args.layerId);
18494
18536
  const spec = _nullishCoalesce(fromPathId(args), () => ( pathSpec(args)));
18495
- const hasPath = _optionalChain([spec, 'access', _574 => _574.components, 'optionalAccess', _575 => _575.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
18537
+ const hasPath = _optionalChain([spec, 'access', _578 => _578.components, 'optionalAccess', _579 => _579.length]) || spec.shape !== void 0 || spec.subpaths !== void 0;
18496
18538
  const from = _nullishCoalesce(args.from, () => ( (hasPath ? "path" : "reveal-all")));
18497
18539
  if (from !== "selection" && TRACE_KEYS.some((k) => args[k] !== void 0)) throw new Error("tolerance, cornerRoundness and minArea apply only to from selection.");
18498
18540
  controller.addVectorMask(id, from, spec, traceOptions(args));
@@ -18600,7 +18642,7 @@ function createImageShapeTools(controller) {
18600
18642
  annotations: { title: "Add a document path", ...WRITE8 },
18601
18643
  handler: (args) => {
18602
18644
  const spec = pathSpec(args);
18603
- if (!_optionalChain([spec, 'access', _576 => _576.components, 'optionalAccess', _577 => _577.length]) && spec.shape === void 0 && spec.subpaths === void 0) throw new Error("Give the path as shape, subpaths or components.");
18645
+ if (!_optionalChain([spec, 'access', _580 => _580.components, 'optionalAccess', _581 => _581.length]) && spec.shape === void 0 && spec.subpaths === void 0) throw new Error("Give the path as shape, subpaths or components.");
18604
18646
  return { path: pathSummary(controller.addPath({ ...spec, name: args.name }).id) };
18605
18647
  }
18606
18648
  };
@@ -18744,7 +18786,7 @@ function createImageTypeTools(controller) {
18744
18786
  const layerSummary = (id) => {
18745
18787
  const s = controller.getState();
18746
18788
  const loc = _chunkB46UQUDCcjs.findLayer.call(void 0, s.layers, id);
18747
- return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _578 => _578.parent, 'optionalAccess', _579 => _579.id]), () => ( null)), index: loc.index } : null;
18789
+ return loc ? { ...describeLayer(loc.layer, s.activeLayerId, (x) => controller.getLayerBounds(x.id)), parentId: _nullishCoalesce(_optionalChain([loc, 'access', _582 => _582.parent, 'optionalAccess', _583 => _583.id]), () => ( null)), index: loc.index } : null;
18748
18790
  };
18749
18791
  const range = (args) => ({ start: args.start, end: args.end });
18750
18792
  const listFonts = {
@@ -18753,7 +18795,7 @@ function createImageTypeTools(controller) {
18753
18795
  description: "Returns the font families type layers can use here (generic families such as sans-serif always work). Changes nothing.",
18754
18796
  inputSchema: { type: "object", properties: {}, additionalProperties: false },
18755
18797
  annotations: { title: "List fonts", ...READ11 },
18756
- handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _580 => _580.getTextShaper, 'call', _581 => _581(), 'optionalAccess', _582 => _582.id]), () => ( null)) })
18798
+ handler: () => ({ families: controller.listFonts(), shaper: _nullishCoalesce(_optionalChain([controller, 'access', _584 => _584.getTextShaper, 'call', _585 => _585(), 'optionalAccess', _586 => _586.id]), () => ( null)) })
18757
18799
  };
18758
18800
  const get = {
18759
18801
  name: "get_text_layer",
@@ -18909,7 +18951,7 @@ function createImageTypeTools(controller) {
18909
18951
  const init = pick2(args, ["text", "x", "y", "orientation", "box", "style", "paragraph", "rotation", "mode", "feather", "antiAlias"]);
18910
18952
  controller.selectTextShape(init);
18911
18953
  const sel = controller.getSelection();
18912
- return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _583 => _583.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
18954
+ return { empty: !sel, bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _587 => _587.bounds]), () => ( null)), area: Math.round(sel ? _chunkSS53NNZOcjs.selectionArea.call(void 0, sel) : 0) };
18913
18955
  }
18914
18956
  };
18915
18957
  return [listFonts, get, add2, setText, setStyle, setParagraph, setFrame, setOrientation, toShape, typeMask];
@@ -19088,7 +19130,7 @@ function createImageEditorToolProvider(controller, options = {}) {
19088
19130
  for (const ref of [aboveId, parentId]) {
19089
19131
  if (ref !== void 0 && !controller.getLayer(ref)) throw new Error(`Unknown layer "${ref}". Call list_layers for ids.`);
19090
19132
  }
19091
- if (parentId !== void 0 && _optionalChain([controller, 'access', _584 => _584.getLayer, 'call', _585 => _585(parentId), 'optionalAccess', _586 => _586.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
19133
+ if (parentId !== void 0 && _optionalChain([controller, 'access', _588 => _588.getLayer, 'call', _589 => _589(parentId), 'optionalAccess', _590 => _590.type]) !== "group") throw new Error(`Layer "${parentId}" is not a group.`);
19092
19134
  const id = controller.addAdjustmentLayer({ kind, params, opacity, blend, name, aboveId, parentId, useSelection: useSelection !== false });
19093
19135
  const layer = controller.getAdjustmentLayer(id);
19094
19136
  return { layer: JSON.parse(JSON.stringify(layer)), index: controller.getAdjustmentLayers().findIndex((l) => l.id === id), masked: Boolean(layer.mask) };
@@ -19423,7 +19465,7 @@ var SelectAndMaskSession = (_class15 = class {
19423
19465
  const h = Math.max(1, Math.round(px2.height * s));
19424
19466
  this.previewPixels = scalePixels(px2, w, h);
19425
19467
  this.belowPreview = this.below ? scalePixels(this.below, w, h) : null;
19426
- this.baseMask = _optionalChain([this, 'access', _587 => _587.base, 'optionalAccess', _588 => _588.bounds]) ? s === 1 ? this.base : _chunkSS53NNZOcjs.resizeSelection.call(void 0, this.base, w, h) : null;
19468
+ this.baseMask = _optionalChain([this, 'access', _591 => _591.base, 'optionalAccess', _592 => _592.bounds]) ? s === 1 ? this.base : _chunkSS53NNZOcjs.resizeSelection.call(void 0, this.base, w, h) : null;
19427
19469
  }
19428
19470
  /**
19429
19471
  * Recomputes the preview mask from the base selection, the strokes and the settings: at once on
@@ -19441,7 +19483,7 @@ var SelectAndMaskSession = (_class15 = class {
19441
19483
  const edits = [...this.editsList, ...this.live ? [this.live] : []].map((e) => scaleEdit(e, scale));
19442
19484
  try {
19443
19485
  const { selection, refineBrush } = _chunkUC3PWFM3cjs.applyRefineEdits.call(void 0, px2, this.baseMask, edits, px2.width, px2.height);
19444
- this.previewMask = _optionalChain([selection, 'optionalAccess', _589 => _589.bounds]) ? _chunkSS53NNZOcjs.refineSelection.call(void 0, px2, selection, scaleParams(this.settingsValue.params, scale), refineBrush) : null;
19486
+ this.previewMask = _optionalChain([selection, 'optionalAccess', _593 => _593.bounds]) ? _chunkSS53NNZOcjs.refineSelection.call(void 0, px2, selection, scaleParams(this.settingsValue.params, scale), refineBrush) : null;
19445
19487
  this.error = null;
19446
19488
  } catch (err) {
19447
19489
  this.previewMask = null;
@@ -19547,7 +19589,7 @@ var SelectAndMaskSession = (_class15 = class {
19547
19589
  break;
19548
19590
  }
19549
19591
  case "on-layers": {
19550
- const under = _optionalChain([this, 'access', _590 => _590.belowPreview, 'optionalAccess', _591 => _591.data]);
19592
+ const under = _optionalChain([this, 'access', _594 => _594.belowPreview, 'optionalAccess', _595 => _595.data]);
19551
19593
  let ur = checker;
19552
19594
  let ug = checker;
19553
19595
  let ub = checker;
@@ -19843,7 +19885,7 @@ function maskThumbnailClick(controller, layer, e) {
19843
19885
  } else if (e.altKey && !layer.mask.source) {
19844
19886
  const mode = e.shiftKey ? "overlay" : "gray";
19845
19887
  const view = controller.getMaskView();
19846
- controller.setMaskView(_optionalChain([view, 'optionalAccess', _592 => _592.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
19888
+ controller.setMaskView(_optionalChain([view, 'optionalAccess', _596 => _596.layerId]) === layer.id && view.mode === mode ? "off" : mode, layer.id);
19847
19889
  } else if (e.shiftKey) {
19848
19890
  controller.setLayerMaskProps(layer.id, { enabled: layer.mask.enabled === false });
19849
19891
  } else {
@@ -19907,7 +19949,7 @@ function layerHasThumbnail(layer) {
19907
19949
  return layer.type === "pixel" || layer.type === "shape" || layer.type === "type";
19908
19950
  }
19909
19951
  function layerWarning(layer) {
19910
- if (layer.type === "type" && _optionalChain([layer, 'access', _593 => _593.missingFonts, 'optionalAccess', _594 => _594.length])) {
19952
+ if (layer.type === "type" && _optionalChain([layer, 'access', _597 => _597.missingFonts, 'optionalAccess', _598 => _598.length])) {
19911
19953
  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."}`;
19912
19954
  }
19913
19955
  return null;
@@ -19930,16 +19972,16 @@ function layerMenu(controller) {
19930
19972
  const siblings = loc ? loc.parent ? loc.parent.children : s.layers : [];
19931
19973
  const below = loc ? siblings[loc.index - 1] : void 0;
19932
19974
  const hasSel = controller.hasSelection;
19933
- const isPixel = _optionalChain([active, 'optionalAccess', _595 => _595.type]) === "pixel";
19934
- const hasOwnPixels = _optionalChain([active, 'optionalAccess', _596 => _596.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _597 => _597.type]) === "shape" || _optionalChain([active, 'optionalAccess', _598 => _598.type]) === "type" || _optionalChain([active, 'optionalAccess', _599 => _599.type]) === "smart";
19975
+ const isPixel = _optionalChain([active, 'optionalAccess', _599 => _599.type]) === "pixel";
19976
+ const hasOwnPixels = _optionalChain([active, 'optionalAccess', _600 => _600.type]) === "pixel" || _optionalChain([active, 'optionalAccess', _601 => _601.type]) === "shape" || _optionalChain([active, 'optionalAccess', _602 => _602.type]) === "type" || _optionalChain([active, 'optionalAccess', _603 => _603.type]) === "smart";
19935
19977
  return [
19936
19978
  { action: "new-layer", label: "New Layer", enabled: true },
19937
19979
  { action: "new-group", label: "New Group", enabled: true },
19938
19980
  { action: "duplicate", label: "Duplicate Layer", enabled: Boolean(active) },
19939
19981
  { action: "delete", label: "Delete Layer", enabled: Boolean(active) },
19940
19982
  { action: "group-selected", label: "Group Layer", enabled: Boolean(active) },
19941
- { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _600 => _600.type]) === "group" },
19942
- { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _601 => _601.visible]) && _optionalChain([below, 'optionalAccess', _602 => _602.type]) === "pixel") },
19983
+ { action: "ungroup", label: "Ungroup", enabled: _optionalChain([active, 'optionalAccess', _604 => _604.type]) === "group" },
19984
+ { action: "merge-down", label: "Merge Down", enabled: Boolean(_optionalChain([active, 'optionalAccess', _605 => _605.visible]) && _optionalChain([below, 'optionalAccess', _606 => _606.type]) === "pixel") },
19943
19985
  { action: "merge-visible", label: "Merge Visible", enabled: s.layers.some((l) => l.visible) },
19944
19986
  { action: "flatten", label: "Flatten Image", enabled: s.layers.length > 0 },
19945
19987
  { action: "via-copy", label: "Layer via Copy", enabled: isPixel && hasSel },
@@ -19949,27 +19991,27 @@ function layerMenu(controller) {
19949
19991
  { action: "add-mask-hide-selection", label: "Add Mask Hiding Selection", enabled: Boolean(active) && hasSel },
19950
19992
  { action: "add-mask-transparency", label: "Add Mask from Transparency", enabled: hasOwnPixels },
19951
19993
  { action: "select-transparency", label: "Select Layer Pixels", enabled: hasOwnPixels },
19952
- { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _603 => _603.mask])) },
19953
- { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _604 => _604.mask])) },
19954
- { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _605 => _605.mask, 'optionalAccess', _606 => _606.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _607 => _607.mask])) },
19955
- { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _608 => _608.mask, 'optionalAccess', _609 => _609.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _610 => _610.mask]) && !active.mask.source) },
19956
- { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _611 => _611.mask, 'optionalAccess', _612 => _612.source])) },
19957
- { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _613 => _613.mask, 'optionalAccess', _614 => _614.source])) },
19958
- { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _615 => _615.mask, 'optionalAccess', _616 => _616.source])) && hasSel },
19959
- { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _617 => _617.vectorMask])) },
19960
- { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _618 => _618.vectorMask, 'optionalAccess', _619 => _619.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _620 => _620.vectorMask])) },
19961
- { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _621 => _621.vectorMask])) },
19962
- { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _622 => _622.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _623 => _623.type]) === "smart" || _optionalChain([active, 'optionalAccess', _624 => _624.type]) === "shape" || _optionalChain([active, 'optionalAccess', _625 => _625.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _626 => _626.type]) === "pixel" && _optionalChain([active, 'access', _627 => _627.filters, 'optionalAccess', _628 => _628.length])) },
19994
+ { action: "apply-mask", label: "Apply Layer Mask", enabled: isPixel && Boolean(_optionalChain([active, 'optionalAccess', _607 => _607.mask])) },
19995
+ { action: "delete-mask", label: "Delete Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _608 => _608.mask])) },
19996
+ { action: "toggle-mask", label: _optionalChain([active, 'optionalAccess', _609 => _609.mask, 'optionalAccess', _610 => _610.enabled]) === false ? "Enable Layer Mask" : "Disable Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _611 => _611.mask])) },
19997
+ { action: "toggle-mask-link", label: _optionalChain([active, 'optionalAccess', _612 => _612.mask, 'optionalAccess', _613 => _613.linked]) === false ? "Link Layer Mask" : "Unlink Layer Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _614 => _614.mask]) && !active.mask.source) },
19998
+ { action: "add-vector-mask", label: "Add Vector Mask (Reveal All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _615 => _615.mask, 'optionalAccess', _616 => _616.source])) },
19999
+ { action: "add-vector-mask-hide", label: "Add Vector Mask (Hide All)", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _617 => _617.mask, 'optionalAccess', _618 => _618.source])) },
20000
+ { action: "add-vector-mask-selection", label: "Add Vector Mask from Selection", enabled: Boolean(active && active.type !== "shape" && !_optionalChain([active, 'access', _619 => _619.mask, 'optionalAccess', _620 => _620.source])) && hasSel },
20001
+ { action: "delete-vector-mask", label: "Delete Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _621 => _621.vectorMask])) },
20002
+ { action: "toggle-vector-mask", label: _optionalChain([active, 'optionalAccess', _622 => _622.vectorMask, 'optionalAccess', _623 => _623.enabled]) === false ? "Enable Vector Mask" : "Disable Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _624 => _624.vectorMask])) },
20003
+ { action: "rasterize-vector-mask", label: "Rasterize Vector Mask", enabled: Boolean(_optionalChain([active, 'optionalAccess', _625 => _625.vectorMask])) },
20004
+ { action: "rasterize", label: "Rasterize Layer", enabled: _optionalChain([active, 'optionalAccess', _626 => _626.type]) === "annotation" || _optionalChain([active, 'optionalAccess', _627 => _627.type]) === "smart" || _optionalChain([active, 'optionalAccess', _628 => _628.type]) === "shape" || _optionalChain([active, 'optionalAccess', _629 => _629.type]) === "type" || isPixel && Boolean(_optionalChain([active, 'optionalAccess', _630 => _630.type]) === "pixel" && _optionalChain([active, 'access', _631 => _631.filters, 'optionalAccess', _632 => _632.length])) },
19963
20005
  { action: "convert-smart", label: "Convert to Smart Object", enabled: Boolean(active && active.type !== "annotation") },
19964
- { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _629 => _629.type]) === "smart" },
19965
- { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _630 => _630.type]) === "smart" },
19966
- { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _631 => _631.type]) === "smart" && !_optionalChain([active, 'access', _632 => _632.smartFilters, 'optionalAccess', _633 => _633.mask]) },
19967
- { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _634 => _634.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
20006
+ { action: "edit-contents", label: "Edit Contents", enabled: _optionalChain([active, 'optionalAccess', _633 => _633.type]) === "smart" },
20007
+ { action: "smart-via-copy", label: "New Smart Object via Copy", enabled: _optionalChain([active, 'optionalAccess', _634 => _634.type]) === "smart" },
20008
+ { action: "add-filter-mask", label: "Add Smart Filter Mask", enabled: _optionalChain([active, 'optionalAccess', _635 => _635.type]) === "smart" && !_optionalChain([active, 'access', _636 => _636.smartFilters, 'optionalAccess', _637 => _637.mask]) },
20009
+ { action: "toggle-clip", label: _optionalChain([active, 'optionalAccess', _638 => _638.clipped]) ? "Release Clipping Mask" : "Create Clipping Mask", enabled: Boolean(loc && loc.index > 0) }
19968
20010
  ];
19969
20011
  }
19970
20012
  async function runLayerMenuAction(controller, action) {
19971
20013
  const active = controller.getActiveLayer();
19972
- const id = _optionalChain([active, 'optionalAccess', _635 => _635.id]);
20014
+ const id = _optionalChain([active, 'optionalAccess', _639 => _639.id]);
19973
20015
  try {
19974
20016
  switch (action) {
19975
20017
  case "new-layer":
@@ -20025,10 +20067,10 @@ async function runLayerMenuAction(controller, action) {
20025
20067
  if (id) controller.removeLayerMask(id);
20026
20068
  break;
20027
20069
  case "toggle-mask":
20028
- if (id && _optionalChain([active, 'optionalAccess', _636 => _636.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
20070
+ if (id && _optionalChain([active, 'optionalAccess', _640 => _640.mask])) controller.setLayerMaskProps(id, { enabled: active.mask.enabled === false });
20029
20071
  break;
20030
20072
  case "toggle-mask-link":
20031
- if (id && _optionalChain([active, 'optionalAccess', _637 => _637.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
20073
+ if (id && _optionalChain([active, 'optionalAccess', _641 => _641.mask])) controller.setLayerMaskProps(id, { linked: active.mask.linked === false });
20032
20074
  break;
20033
20075
  case "add-vector-mask":
20034
20076
  case "add-vector-mask-hide":
@@ -20041,7 +20083,7 @@ async function runLayerMenuAction(controller, action) {
20041
20083
  if (id) controller.removeVectorMask(id);
20042
20084
  break;
20043
20085
  case "toggle-vector-mask":
20044
- if (id && _optionalChain([active, 'optionalAccess', _638 => _638.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
20086
+ if (id && _optionalChain([active, 'optionalAccess', _642 => _642.vectorMask])) controller.setVectorMaskProps(id, { enabled: active.vectorMask.enabled === false });
20045
20087
  break;
20046
20088
  case "rasterize-vector-mask":
20047
20089
  if (id) controller.rasterizeVectorMask(id);
@@ -20062,7 +20104,7 @@ async function runLayerMenuAction(controller, action) {
20062
20104
  if (id) controller.setSmartFilterMask(id, "reveal-all");
20063
20105
  break;
20064
20106
  case "toggle-clip":
20065
- if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _639 => _639.clipped]) });
20107
+ if (id) controller.setLayerProperties(id, { clipped: !_optionalChain([active, 'optionalAccess', _643 => _643.clipped]) });
20066
20108
  break;
20067
20109
  }
20068
20110
  return null;
@@ -20072,7 +20114,7 @@ async function runLayerMenuAction(controller, action) {
20072
20114
  }
20073
20115
  function smartFilterRows(layer) {
20074
20116
  if (layer.type !== "smart") return [];
20075
- const list = _nullishCoalesce(_optionalChain([layer, 'access', _640 => _640.smartFilters, 'optionalAccess', _641 => _641.filters]), () => ( []));
20117
+ const list = _nullishCoalesce(_optionalChain([layer, 'access', _644 => _644.smartFilters, 'optionalAccess', _645 => _645.filters]), () => ( []));
20076
20118
  const rows = list.map((f, index) => ({
20077
20119
  filter: f,
20078
20120
  index,
@@ -20098,8 +20140,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
20098
20140
  };
20099
20141
  collectSerialized(_nullishCoalesce(serialized.layers, () => ( [])));
20100
20142
  const sLayerMap = new Map(allSerializedLayers.map((sl) => [sl.id, sl]));
20101
- const imgW = _optionalChain([state, 'access', _642 => _642.imageDimensions, 'optionalAccess', _643 => _643.width]) || 1;
20102
- const imgH = _optionalChain([state, 'access', _644 => _644.imageDimensions, 'optionalAccess', _645 => _645.height]) || 1;
20143
+ const imgW = _optionalChain([state, 'access', _646 => _646.imageDimensions, 'optionalAccess', _647 => _647.width]) || 1;
20144
+ const imgH = _optionalChain([state, 'access', _648 => _648.imageDimensions, 'optionalAccess', _649 => _649.height]) || 1;
20103
20145
  return ctrlLayers.map((l) => {
20104
20146
  const bounds = controller.getLayerBounds(l.id) || {
20105
20147
  x: 0,
@@ -20108,8 +20150,8 @@ function extractNormalizedLayerItems(controller, fallbackImageUrl = "") {
20108
20150
  height: imgH
20109
20151
  };
20110
20152
  const sLayer = sLayerMap.get(l.id);
20111
- const assetKey = _optionalChain([sLayer, 'optionalAccess', _646 => _646.asset]);
20112
- const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _647 => _647.source]) === "document" ? fallbackImageUrl : "");
20153
+ const assetKey = _optionalChain([sLayer, 'optionalAccess', _650 => _650.asset]);
20154
+ const layerDataUrl = assetKey && assets[assetKey] || assets[l.id] || (_optionalChain([sLayer, 'optionalAccess', _651 => _651.source]) === "document" ? fallbackImageUrl : "");
20113
20155
  return {
20114
20156
  id: l.id,
20115
20157
  name: l.name || "Untitled Layer",
@@ -20163,9 +20205,9 @@ async function addLayerOfKind(controller, id, init) {
20163
20205
  const cx = Math.round(canvas.width / 2);
20164
20206
  const cy = Math.round(canvas.height / 2);
20165
20207
  return controller.addTextLayer({
20166
- text: _optionalChain([init, 'optionalAccess', _648 => _648.text]) || "New Text",
20167
- x: typeof _optionalChain([init, 'optionalAccess', _649 => _649.x]) === "number" ? init.x : cx - 100,
20168
- y: typeof _optionalChain([init, 'optionalAccess', _650 => _650.y]) === "number" ? init.y : cy,
20208
+ text: _optionalChain([init, 'optionalAccess', _652 => _652.text]) || "New Text",
20209
+ x: typeof _optionalChain([init, 'optionalAccess', _653 => _653.x]) === "number" ? init.x : cx - 100,
20210
+ y: typeof _optionalChain([init, 'optionalAccess', _654 => _654.y]) === "number" ? init.y : cy,
20169
20211
  ...init
20170
20212
  });
20171
20213
  }
@@ -20178,10 +20220,10 @@ async function addLayerOfKind(controller, id, init) {
20178
20220
  return controller.addShapeLayer({
20179
20221
  shape: {
20180
20222
  kind: "rect",
20181
- x: typeof _optionalChain([init, 'optionalAccess', _651 => _651.x]) === "number" ? init.x : cx - Math.round(w / 2),
20182
- y: typeof _optionalChain([init, 'optionalAccess', _652 => _652.y]) === "number" ? init.y : cy - Math.round(h / 2),
20183
- width: typeof _optionalChain([init, 'optionalAccess', _653 => _653.width]) === "number" ? init.width : w,
20184
- height: typeof _optionalChain([init, 'optionalAccess', _654 => _654.height]) === "number" ? init.height : h
20223
+ x: typeof _optionalChain([init, 'optionalAccess', _655 => _655.x]) === "number" ? init.x : cx - Math.round(w / 2),
20224
+ y: typeof _optionalChain([init, 'optionalAccess', _656 => _656.y]) === "number" ? init.y : cy - Math.round(h / 2),
20225
+ width: typeof _optionalChain([init, 'optionalAccess', _657 => _657.width]) === "number" ? init.width : w,
20226
+ height: typeof _optionalChain([init, 'optionalAccess', _658 => _658.height]) === "number" ? init.height : h
20185
20227
  },
20186
20228
  name: "Rectangle",
20187
20229
  ...init
@@ -20196,10 +20238,10 @@ async function addLayerOfKind(controller, id, init) {
20196
20238
  return controller.addShapeLayer({
20197
20239
  shape: {
20198
20240
  kind: "ellipse",
20199
- x: typeof _optionalChain([init, 'optionalAccess', _655 => _655.x]) === "number" ? init.x : cx - Math.round(w / 2),
20200
- y: typeof _optionalChain([init, 'optionalAccess', _656 => _656.y]) === "number" ? init.y : cy - Math.round(h / 2),
20201
- width: typeof _optionalChain([init, 'optionalAccess', _657 => _657.width]) === "number" ? init.width : w,
20202
- height: typeof _optionalChain([init, 'optionalAccess', _658 => _658.height]) === "number" ? init.height : h
20241
+ x: typeof _optionalChain([init, 'optionalAccess', _659 => _659.x]) === "number" ? init.x : cx - Math.round(w / 2),
20242
+ y: typeof _optionalChain([init, 'optionalAccess', _660 => _660.y]) === "number" ? init.y : cy - Math.round(h / 2),
20243
+ width: typeof _optionalChain([init, 'optionalAccess', _661 => _661.width]) === "number" ? init.width : w,
20244
+ height: typeof _optionalChain([init, 'optionalAccess', _662 => _662.height]) === "number" ? init.height : h
20203
20245
  },
20204
20246
  name: "Ellipse",
20205
20247
  ...init
@@ -20260,18 +20302,18 @@ function layerEffectsPanel(layer) {
20260
20302
  if (!layer) return { ...empty, available: false, reason: "Select a layer to add a layer style." };
20261
20303
  if (layer.type === "adjustment") return { ...empty, available: false, reason: "Adjustment layers cannot have a layer style." };
20262
20304
  const fx = layer.effects;
20263
- const readOnly = Boolean(_optionalChain([layer, 'access', _659 => _659.locks, 'optionalAccess', _660 => _660.all]));
20305
+ const readOnly = Boolean(_optionalChain([layer, 'access', _663 => _663.locks, 'optionalAccess', _664 => _664.all]));
20264
20306
  return {
20265
20307
  available: true,
20266
20308
  readOnly,
20267
20309
  reason: readOnly ? "The layer is locked; unlock it to change its layer style." : void 0,
20268
- enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _661 => _661.enabled]), () => ( true)),
20269
- scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _662 => _662.scale]), () => ( 1)),
20270
- rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _663 => _663.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
20310
+ enabled: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _665 => _665.enabled]), () => ( true)),
20311
+ scale: _nullishCoalesce(_optionalChain([fx, 'optionalAccess', _666 => _666.scale]), () => ( 1)),
20312
+ rows: (_nullishCoalesce(_optionalChain([fx, 'optionalAccess', _667 => _667.items]), () => ( []))).map((e) => ({ id: e.id, kind: e.kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, e.kind), enabled: e.enabled }))
20271
20313
  };
20272
20314
  }
20273
20315
  function layerEffectsBadge(layer) {
20274
- if (!_optionalChain([layer, 'access', _664 => _664.effects, 'optionalAccess', _665 => _665.items, 'access', _666 => _666.length])) return null;
20316
+ if (!_optionalChain([layer, 'access', _668 => _668.effects, 'optionalAccess', _669 => _669.items, 'access', _670 => _670.length])) return null;
20275
20317
  return _chunkB46UQUDCcjs.hasActiveEffects.call(void 0, layer.effects) ? "on" : "off";
20276
20318
  }
20277
20319
  var LAYER_EFFECT_MENU = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS.map((kind) => ({ kind, label: _chunkB46UQUDCcjs.layerEffectLabel.call(void 0, kind) }));
@@ -20316,8 +20358,8 @@ function fillControls(f, allowPattern, patterns) {
20316
20358
  }
20317
20359
  function gradientControls(prefix, g) {
20318
20360
  return [
20319
- { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _667 => _667.stops, 'access', _668 => _668[0], 'optionalAccess', _669 => _669.color]), () => ( "#000000")) },
20320
- { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _670 => _670.stops, 'access', _671 => _671[g.stops.length - 1], 'optionalAccess', _672 => _672.color]), () => ( "#ffffff")) },
20361
+ { key: `${prefix}.stops.0.color`, label: "Start colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _671 => _671.stops, 'access', _672 => _672[0], 'optionalAccess', _673 => _673.color]), () => ( "#000000")) },
20362
+ { key: `${prefix}.stops.last.color`, label: "End colour", type: "color", value: _nullishCoalesce(_optionalChain([g, 'access', _674 => _674.stops, 'access', _675 => _675[g.stops.length - 1], 'optionalAccess', _676 => _676.color]), () => ( "#ffffff")) },
20321
20363
  { key: `${prefix}.style`, label: "Style", type: "select", value: g.style, options: opt(["linear", "Linear"], ["radial", "Radial"], ["angle", "Angle"], ["reflected", "Reflected"], ["diamond", "Diamond"]) },
20322
20364
  { key: `${prefix}.angle`, label: "Angle", type: "range", min: -180, max: 180, step: 1, value: g.angle, unit: "\xB0" },
20323
20365
  { key: `${prefix}.scale`, label: "Scale", type: "range", min: 0.1, max: 1.5, step: 0.01, value: g.scale, percent: true, unit: "%" },
@@ -20409,19 +20451,19 @@ function layerEffectControls(e, patterns = []) {
20409
20451
  }
20410
20452
  function fillOfType(current, type, patterns) {
20411
20453
  if (type === "gradient") return { type: "gradient", gradient: _chunkB46UQUDCcjs.defaultEffectGradient.call(void 0, ) };
20412
- if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _673 => _673[0], 'optionalAccess', _674 => _674.id]), () => ( "checker")), scale: 1 };
20454
+ if (type === "pattern") return { type: "pattern", patternId: _nullishCoalesce(_optionalChain([patterns, 'access', _677 => _677[0], 'optionalAccess', _678 => _678.id]), () => ( "checker")), scale: 1 };
20413
20455
  return { type: "color", color: current.type === "color" ? current.color : "#000000" };
20414
20456
  }
20415
20457
  function effectControlChange(effect, key2, value, patterns = []) {
20416
20458
  const [top, ...rest] = key2.split(".");
20417
20459
  if (top === "fill" && rest[0] === "type") return { fill: fillOfType(effect.fill, String(value), patterns) };
20418
20460
  if (top === "patternId" && !rest.length) {
20419
- const name = _optionalChain([patternOptions, 'call', _675 => _675(patterns), 'access', _676 => _676.find, 'call', _677 => _677((o) => o.value === value), 'optionalAccess', _678 => _678.label]);
20461
+ const name = _optionalChain([patternOptions, 'call', _679 => _679(patterns), 'access', _680 => _680.find, 'call', _681 => _681((o) => o.value === value), 'optionalAccess', _682 => _682.label]);
20420
20462
  return name ? { patternId: value, name } : { patternId: value };
20421
20463
  }
20422
20464
  if (!rest.length) return { [top]: value };
20423
20465
  if (top === "fill" && rest[0] === "patternId") {
20424
- const name = _optionalChain([patternOptions, 'call', _679 => _679(patterns), 'access', _680 => _680.find, 'call', _681 => _681((o) => o.value === value), 'optionalAccess', _682 => _682.label]);
20466
+ const name = _optionalChain([patternOptions, 'call', _683 => _683(patterns), 'access', _684 => _684.find, 'call', _685 => _685((o) => o.value === value), 'optionalAccess', _686 => _686.label]);
20425
20467
  return { fill: { ...effect.fill, patternId: value, ...name ? { name } : {} } };
20426
20468
  }
20427
20469
  return { [top]: setPath(getPath(effect, top), rest, value) };
@@ -20448,7 +20490,7 @@ function colorPanelView(controller) {
20448
20490
  profileName: profile.name,
20449
20491
  workingSpace: profile.builtin,
20450
20492
  mode: profile.mode,
20451
- cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _683 => _683.cmykProfile, 'optionalAccess', _684 => _684.name]), () => ( null)),
20493
+ cmykProfileName: _nullishCoalesce(_optionalChain([profile, 'access', _687 => _687.cmykProfile, 'optionalAccess', _688 => _688.name]), () => ( null)),
20452
20494
  proof: proof ? { id: _nullishCoalesce(proof.profile.builtin, () => ( null)), name: proof.profile.name, intent: proof.intent, simulatePaper: proof.simulatePaper, gamutWarning: proof.gamutWarning, bpc: proof.bpc } : null
20453
20495
  };
20454
20496
  }
@@ -20656,7 +20698,7 @@ var FreeTransformTool = (_class16 = class {
20656
20698
  __init147() {this.error = null}
20657
20699
  __init148() {this.lastResult = null}
20658
20700
  get active() {
20659
- return Boolean(_optionalChain([this, 'access', _685 => _685.sessionRef, 'optionalAccess', _686 => _686.isOpen]));
20701
+ return Boolean(_optionalChain([this, 'access', _689 => _689.sessionRef, 'optionalAccess', _690 => _690.isOpen]));
20660
20702
  }
20661
20703
  get session() {
20662
20704
  return this.active ? this.sessionRef : null;
@@ -20665,7 +20707,7 @@ var FreeTransformTool = (_class16 = class {
20665
20707
  return this.modeValue;
20666
20708
  }
20667
20709
  get interpolation() {
20668
- return _nullishCoalesce(_optionalChain([this, 'access', _687 => _687.sessionRef, 'optionalAccess', _688 => _688.interpolation]), () => ( "bicubic"));
20710
+ return _nullishCoalesce(_optionalChain([this, 'access', _691 => _691.sessionRef, 'optionalAccess', _692 => _692.interpolation]), () => ( "bicubic"));
20669
20711
  }
20670
20712
  /** Whether the open transform has changed anything yet (a commit would add an undo step). */
20671
20713
  get modified() {
@@ -20684,7 +20726,7 @@ var FreeTransformTool = (_class16 = class {
20684
20726
  };
20685
20727
  }
20686
20728
  changed() {
20687
- _optionalChain([this, 'access', _689 => _689.options, 'access', _690 => _690.onChange, 'optionalCall', _691 => _691()]);
20729
+ _optionalChain([this, 'access', _693 => _693.options, 'access', _694 => _694.onChange, 'optionalCall', _695 => _695()]);
20688
20730
  for (const l of this.listeners) l();
20689
20731
  }
20690
20732
  /** Opens a Free Transform (default: the selected pixels of the active layer, or the whole layer). Returns an error message or `null`. */
@@ -21077,7 +21119,7 @@ var FreeTransformTool = (_class16 = class {
21077
21119
  }
21078
21120
  /** Abandons the transform and restores everything. */
21079
21121
  cancel() {
21080
- _optionalChain([this, 'access', _692 => _692.sessionRef, 'optionalAccess', _693 => _693.cancel, 'call', _694 => _694()]);
21122
+ _optionalChain([this, 'access', _696 => _696.sessionRef, 'optionalAccess', _697 => _697.cancel, 'call', _698 => _698()]);
21081
21123
  this.sessionRef = null;
21082
21124
  this.corners = null;
21083
21125
  this.mesh = null;
@@ -21133,7 +21175,7 @@ function imageLayerAppliedEffects(layer) {
21133
21175
  const ref = (r) => ({ effect: r.effect, ...r.name ? { name: r.name } : {}, ...r.provider ? { provider: r.provider } : {} });
21134
21176
  if (layer.type === "pixel" && layer.generator) out.push({ id: "generator", ...ref(layer.generator), role: "effect layer", enabled: true, values: layer.generator.values, ...layer.generator.time ? { time: layer.generator.time } : {}, ...layer.generator.animate ? { animate: layer.generator.animate } : {} });
21135
21177
  if (layer.type === "smart")
21136
- (_nullishCoalesce(_optionalChain([layer, 'access', _695 => _695.smartFilters, 'optionalAccess', _696 => _696.filters]), () => ( []))).forEach((f, index) => {
21178
+ (_nullishCoalesce(_optionalChain([layer, 'access', _699 => _699.smartFilters, 'optionalAccess', _700 => _700.filters]), () => ( []))).forEach((f, index) => {
21137
21179
  if (f.kind === "effect") out.push({ id: f.id, ...ref(f), role: "smart filter", enabled: f.enabled && layer.smartFilters.enabled, opacity: f.opacity, blend: f.blend, values: f.values, index });
21138
21180
  });
21139
21181
  return out;
@@ -21290,7 +21332,7 @@ var OTHER_TOOL_LABELS = {
21290
21332
  watermark: "Watermark"
21291
21333
  };
21292
21334
  function imageToolLabel(tool) {
21293
- return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _697 => _697.find, 'call', _698 => _698((t) => t.id === tool), 'optionalAccess', _699 => _699.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
21335
+ return _nullishCoalesce(_nullishCoalesce(_optionalChain([PAINT_TOOLS, 'access', _701 => _701.find, 'call', _702 => _702((t) => t.id === tool), 'optionalAccess', _703 => _703.label]), () => ( OTHER_TOOL_LABELS[tool])), () => ( tool));
21294
21336
  }
21295
21337
  var IMAGE_TOOL_SHORTCUTS = {
21296
21338
  ...Object.fromEntries(PAINT_TOOLS.filter((t) => t.shortcut).map((t) => [t.id, t.shortcut])),
@@ -21422,10 +21464,10 @@ var PathEditGesture = (_class17 = class {
21422
21464
  }
21423
21465
  for (const k of [...this.selected]) {
21424
21466
  const r = parseKey(k);
21425
- if (!_optionalChain([cs, 'access', _700 => _700[r.component], 'optionalAccess', _701 => _701.subpaths, 'access', _702 => _702[r.subpath], 'optionalAccess', _703 => _703.anchors, 'access', _704 => _704[r.anchor]])) this.selected.delete(k);
21467
+ if (!_optionalChain([cs, 'access', _704 => _704[r.component], 'optionalAccess', _705 => _705.subpaths, 'access', _706 => _706[r.subpath], 'optionalAccess', _707 => _707.anchors, 'access', _708 => _708[r.anchor]])) this.selected.delete(k);
21426
21468
  }
21427
21469
  const d = this.drawing;
21428
- if (d && (!_optionalChain([cs, 'access', _705 => _705[d.component], 'optionalAccess', _706 => _706.subpaths, 'access', _707 => _707[d.subpath]]) || cs[d.component].subpaths[d.subpath].closed)) this.drawing = null;
21470
+ if (d && (!_optionalChain([cs, 'access', _709 => _709[d.component], 'optionalAccess', _710 => _710.subpaths, 'access', _711 => _711[d.subpath]]) || cs[d.component].subpaths[d.subpath].closed)) this.drawing = null;
21429
21471
  return cs;
21430
21472
  }
21431
21473
  anchorAt(cs, p) {
@@ -21760,11 +21802,11 @@ var PathEditGesture = (_class17 = class {
21760
21802
  let preview = null;
21761
21803
  const d = this.drawing;
21762
21804
  if (tool === "path-pen" && d && this.pointer && !this.drag) {
21763
- const sp = _optionalChain([cs, 'access', _708 => _708[d.component], 'optionalAccess', _709 => _709.subpaths, 'access', _710 => _710[d.subpath]]);
21764
- const last = _optionalChain([sp, 'optionalAccess', _711 => _711.anchors, 'access', _712 => _712[sp.anchors.length - 1]]);
21805
+ const sp = _optionalChain([cs, 'access', _712 => _712[d.component], 'optionalAccess', _713 => _713.subpaths, 'access', _714 => _714[d.subpath]]);
21806
+ const last = _optionalChain([sp, 'optionalAccess', _715 => _715.anchors, 'access', _716 => _716[sp.anchors.length - 1]]);
21765
21807
  if (last) preview = last.out ? [pt(last), pt(last.out), this.pointer, this.pointer] : [pt(last), this.pointer];
21766
21808
  }
21767
- const marquee = _optionalChain([this, 'access', _713 => _713.drag, 'optionalAccess', _714 => _714.kind]) === "marquee" ? rect(this.drag.start, this.drag.end) : null;
21809
+ const marquee = _optionalChain([this, 'access', _717 => _717.drag, 'optionalAccess', _718 => _718.kind]) === "marquee" ? rect(this.drag.start, this.drag.end) : null;
21768
21810
  return { curves, anchors, handles, marquee, preview };
21769
21811
  }
21770
21812
  }, _class17);
@@ -21846,8 +21888,8 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
21846
21888
  async open() {
21847
21889
  try {
21848
21890
  const { width, height } = this.controller.getState().imageDimensions;
21849
- const b = _optionalChain([this, 'access', _715 => _715.controller, 'access', _716 => _716.getSelection, 'call', _717 => _717(), 'optionalAccess', _718 => _718.bounds]);
21850
- this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess', _719 => _719.width]), () => ( 0)), _nullishCoalesce(_optionalChain([b, 'optionalAccess', _720 => _720.height]), () => ( 0))));
21891
+ const b = _optionalChain([this, 'access', _719 => _719.controller, 'access', _720 => _720.getSelection, 'call', _721 => _721(), 'optionalAccess', _722 => _722.bounds]);
21892
+ this.margin = width * height <= _ContentAwareFillSession.WHOLE_IMAGE_PIXELS ? Math.max(width, height) : Math.max(256, 2 * Math.max(_nullishCoalesce(_optionalChain([b, 'optionalAccess', _723 => _723.width]), () => ( 0)), _nullishCoalesce(_optionalChain([b, 'optionalAccess', _724 => _724.height]), () => ( 0))));
21851
21893
  this.plan = this.controller.prepareContentAwareFill({ sampleRadius: this.margin });
21852
21894
  } catch (err) {
21853
21895
  this.error = err instanceof Error ? err.message : String(err);
@@ -22005,7 +22047,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
22005
22047
  this.dirty = false;
22006
22048
  try {
22007
22049
  const area = this.samplingMask();
22008
- if (!_optionalChain([area, 'optionalAccess', _721 => _721.bounds])) throw new Error("The sampling area is empty; paint where the fill may copy from.");
22050
+ if (!_optionalChain([area, 'optionalAccess', _725 => _725.bounds])) throw new Error("The sampling area is empty; paint where the fill may copy from.");
22009
22051
  const { plan, after } = await this.controller.previewContentAwareFill({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed });
22010
22052
  const win = this.win;
22011
22053
  const out = Uint8ClampedArray.from(this.before);
@@ -22084,7 +22126,7 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
22084
22126
  /** OK: fills with this sampling area, seed and output as one undo step. */
22085
22127
  async commit(options = {}) {
22086
22128
  const area = this.samplingMask();
22087
- if (!this.plan || !_optionalChain([area, 'optionalAccess', _722 => _722.bounds])) throw new Error(_nullishCoalesce(this.error, () => ( "The sampling area is empty; paint where the fill may copy from.")));
22129
+ if (!this.plan || !_optionalChain([area, 'optionalAccess', _726 => _726.bounds])) throw new Error(_nullishCoalesce(this.error, () => ( "The sampling area is empty; paint where the fill may copy from.")));
22088
22130
  return this.controller.contentAwareFillAsync({ layerId: this.plan.layerId, samplingArea: area, seed: this.settingsValue.seed, output: this.settingsValue.output, signal: options.signal });
22089
22131
  }
22090
22132
  }, _class18.__initStatic(), _class18);
@@ -23203,4 +23245,5 @@ var ContentAwareFillSession = (_class18 = class _ContentAwareFillSession {
23203
23245
 
23204
23246
 
23205
23247
 
23206
- exports.ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkS55JFWDAcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkS55JFWDAcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkS55JFWDAcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkS55JFWDAcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkS55JFWDAcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkS55JFWDAcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkOLNIPTB3cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkOLNIPTB3cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkS55JFWDAcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkXFYLA3ZOcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkPQ3H2AANcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CONTENT_AWARE_FILL_SAMPLING = CONTENT_AWARE_FILL_SAMPLING; exports.CONTENT_AWARE_FILL_TOOLS = CONTENT_AWARE_FILL_TOOLS; exports.ColorGmm = _chunkUC3PWFM3cjs.ColorGmm; exports.ContentAwareFillSession = ContentAwareFillSession; exports.CoverageMap = _chunkPQ3H2AANcjs.CoverageMap; exports.D50 = _chunkS55JFWDAcjs.D50; exports.D65 = _chunkS55JFWDAcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkQAUIZPYIcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkPQ3H2AANcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkPQ3H2AANcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_CONTENT_AWARE_FILL_SETTINGS = DEFAULT_CONTENT_AWARE_FILL_SETTINGS; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkXFYLA3ZOcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkB46UQUDCcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkS55JFWDAcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkPQ3H2AANcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = _chunkSS53NNZOcjs.DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkYF3YZZ6Gcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SELECT_AND_MASK_SETTINGS = DEFAULT_SELECT_AND_MASK_SETTINGS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkPQ3H2AANcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkXFYLA3ZOcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkXFYLA3ZOcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkS55JFWDAcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkXFYLA3ZOcjs.DRY_EPS; exports.DabWalker = _chunkPQ3H2AANcjs.DabWalker; exports.EDGE_COLOR_RADIUS = _chunkS55JFWDAcjs.EDGE_COLOR_RADIUS; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkSS53NNZOcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkXFYLA3ZOcjs.EX; exports.EY = _chunkXFYLA3ZOcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkXFYLA3ZOcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkXFYLA3ZOcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkXFYLA3ZOcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkXFYLA3ZOcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkXFYLA3ZOcjs.FLAG_TOP; exports.FLAG_WET = _chunkXFYLA3ZOcjs.FLAG_WET; exports.FLAT = _chunkXFYLA3ZOcjs.FLAT; exports.FREE_INTERVAL = _chunkXFYLA3ZOcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkS55JFWDAcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = _chunkUC3PWFM3cjs.GAMMA; exports.GRAIN_PATTERNS = _chunkPQ3H2AANcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkPQ3H2AANcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = _chunkSS53NNZOcjs.GUIDED_FILTER_EPS; exports.GridGraph = _chunkUC3PWFM3cjs.GridGraph; exports.HIDE = _chunkXFYLA3ZOcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkS55JFWDAcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkS55JFWDAcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkB46UQUDCcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkS55JFWDAcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkS55JFWDAcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkS55JFWDAcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkS55JFWDAcjs.LUMA_709; exports.LayerCompositor = _chunkS55JFWDAcjs.LayerCompositor; exports.LayerEffectError = _chunkB46UQUDCcjs.LayerEffectError; exports.LayerOperationError = _chunkS55JFWDAcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_EDGE_THRESHOLDS = MASK_EDGE_THRESHOLDS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkXFYLA3ZOcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkPQ3H2AANcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkB46UQUDCcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkS55JFWDAcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkXFYLA3ZOcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkB46UQUDCcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkXFYLA3ZOcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkXFYLA3ZOcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkS55JFWDAcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkS55JFWDAcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkPQ3H2AANcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkPQ3H2AANcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkPQ3H2AANcjs.MIXING_MODELS; exports.MixerStroke = _chunkPQ3H2AANcjs.MixerStroke; exports.OPP = _chunkXFYLA3ZOcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkOLNIPTB3cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkPQ3H2AANcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkPQ3H2AANcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkXFYLA3ZOcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkS55JFWDAcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkXFYLA3ZOcjs.PARAM; exports.PARAM_FLOATS = _chunkXFYLA3ZOcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATH_EDIT_TOOLS = PATH_EDIT_TOOLS; exports.PATTERN_BLOCK_KEYS = _chunkS55JFWDAcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkOLNIPTB3cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkXFYLA3ZOcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkXFYLA3ZOcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkOLNIPTB3cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkXFYLA3ZOcjs.PLANE; exports.PLANE_BYTES = _chunkXFYLA3ZOcjs.PLANE_BYTES; exports.PREVIEW_SIZE = PREVIEW_SIZE; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkS55JFWDAcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkXFYLA3ZOcjs.P_D0; exports.P_EDGE = _chunkXFYLA3ZOcjs.P_EDGE; exports.P_FX = _chunkXFYLA3ZOcjs.P_FX; exports.P_FY = _chunkXFYLA3ZOcjs.P_FY; exports.P_H = _chunkXFYLA3ZOcjs.P_H; exports.P_P0 = _chunkXFYLA3ZOcjs.P_P0; exports.P_RHO = _chunkXFYLA3ZOcjs.P_RHO; exports.P_SW = _chunkXFYLA3ZOcjs.P_SW; exports.P_UX = _chunkXFYLA3ZOcjs.P_UX; exports.P_UY = _chunkXFYLA3ZOcjs.P_UY; exports.PaintExchange = _chunkPQ3H2AANcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkPQ3H2AANcjs.PaintGradientSampler; exports.PaintSourceError = _chunkPQ3H2AANcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkPQ3H2AANcjs.PaperGrain; exports.PathEditGesture = PathEditGesture; exports.PatternPlacement = _chunkB46UQUDCcjs.PatternPlacement; exports.PatternTile = _chunkB46UQUDCcjs.PatternTile; exports.PsdError = _chunkS55JFWDAcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = _chunkUC3PWFM3cjs.REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYF3YZZ6Gcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYF3YZZ6Gcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYF3YZZ6Gcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkSS53NNZOcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkSS53NNZOcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SELECT_AND_MASK_TOOLS = SELECT_AND_MASK_TOOLS; exports.SELECT_AND_MASK_VIEWS = SELECT_AND_MASK_VIEWS; exports.SET_PLANES = _chunkXFYLA3ZOcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkOLNIPTB3cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkS55JFWDAcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkS55JFWDAcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkXFYLA3ZOcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkXFYLA3ZOcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkXFYLA3ZOcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkS55JFWDAcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkXFYLA3ZOcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkXFYLA3ZOcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectAndMaskSession = SelectAndMaskSession; exports.SelectionGesture = SelectionGesture; exports.SelectionWorkerClient = _chunkUC3PWFM3cjs.SelectionWorkerClient; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkPQ3H2AANcjs.SmudgeTip; exports.StrokeCoverage = _chunkPQ3H2AANcjs.StrokeCoverage; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkS55JFWDAcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkS55JFWDAcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkS55JFWDAcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkS55JFWDAcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkS55JFWDAcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkPQ3H2AANcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkS55JFWDAcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYF3YZZ6Gcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkS55JFWDAcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkPQ3H2AANcjs.TileMedium; exports.TilePixelSource = _chunkYF3YZZ6Gcjs.TilePixelSource; exports.TileableNoise = _chunkPQ3H2AANcjs.TileableNoise; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkB46UQUDCcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYF3YZZ6Gcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = _chunkUC3PWFM3cjs.UNITS; exports.U_MAX = _chunkXFYLA3ZOcjs.U_MAX; exports.VIBRANCE_GREY = _chunkS55JFWDAcjs.VIBRANCE_GREY; exports.W9 = _chunkXFYLA3ZOcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkQAUIZPYIcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkQAUIZPYIcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkXFYLA3ZOcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkXFYLA3ZOcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkXFYLA3ZOcjs.WET_TILE; exports.WGSL_HALO = _chunkXFYLA3ZOcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkXFYLA3ZOcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkXFYLA3ZOcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_PATH_NAME = WORK_PATH_NAME; exports.WORK_SIZE = _chunkUC3PWFM3cjs.WORK_SIZE; exports.WetGpuEngine = _chunkXFYLA3ZOcjs.WetGpuEngine; exports.WetMedium = _chunkXFYLA3ZOcjs.WetMedium; exports.WetWorkerPool = _chunkXFYLA3ZOcjs.WetWorkerPool; exports.WetWorld = _chunkXFYLA3ZOcjs.WetWorld; exports.WetWorldError = _chunkXFYLA3ZOcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkS55JFWDAcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkS55JFWDAcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkS55JFWDAcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkS55JFWDAcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkS55JFWDAcjs.activeSmartFilters; exports.addLayerEffect = _chunkS55JFWDAcjs.addLayerEffect; exports.addLayerFilter = _chunkS55JFWDAcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkPQ3H2AANcjs.addPaintGradientStop; exports.addSmartFilter = _chunkS55JFWDAcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkS55JFWDAcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkS55JFWDAcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkS55JFWDAcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkS55JFWDAcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkS55JFWDAcjs.anchorPoint; exports.annotationBlend = _chunkS55JFWDAcjs.annotationBlend; exports.annotationLayerFor = _chunkS55JFWDAcjs.annotationLayerFor; exports.annotationLayerName = _chunkS55JFWDAcjs.annotationLayerName; exports.annotationOfLayer = _chunkS55JFWDAcjs.annotationOfLayer; exports.annotationOfShape = _chunkS55JFWDAcjs.annotationOfShape; exports.annotationOfType = _chunkS55JFWDAcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkS55JFWDAcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkS55JFWDAcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkS55JFWDAcjs.applyAdjustments; exports.applyBoxBlur = _chunkS55JFWDAcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkS55JFWDAcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkS55JFWDAcjs.applyDepthMask; exports.applyEdgeUnmix = _chunkS55JFWDAcjs.applyEdgeUnmix; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkS55JFWDAcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkS55JFWDAcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkS55JFWDAcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkS55JFWDAcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkS55JFWDAcjs.applyParams; exports.applyProcess2Adjustments = _chunkS55JFWDAcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkS55JFWDAcjs.applyProcess2Float; exports.applyRefineEdits = _chunkUC3PWFM3cjs.applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYF3YZZ6Gcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkS55JFWDAcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkPQ3H2AANcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkPQ3H2AANcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYF3YZZ6Gcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkS55JFWDAcjs.backgroundLayer; exports.base64ToBytes = _chunkOLNIPTB3cjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkMQDIP4CFcjs.bestOffset; exports.blackWhiteGray = _chunkS55JFWDAcjs.blackWhiteGray; exports.blendChannel = _chunkOLNIPTB3cjs.blendChannel; exports.blendImageData = _chunkOLNIPTB3cjs.blendImageData; exports.blendLum = _chunkOLNIPTB3cjs.blendLum; exports.blendPixel = _chunkOLNIPTB3cjs.blendPixel; exports.blendRadius = _chunkPQ3H2AANcjs.blendRadius; exports.blendRgb = _chunkOLNIPTB3cjs.blendRgb; exports.blendTile = _chunkB46UQUDCcjs.blendTile; exports.blenderDab = _chunkPQ3H2AANcjs.blenderDab; exports.blurFilter = _chunkS55JFWDAcjs.blurFilter; exports.borderCoverage = _chunkSS53NNZOcjs.borderCoverage; exports.boxBlur = _chunkUC3PWFM3cjs.boxBlur; exports.boxBlurPixels = _chunkYF3YZZ6Gcjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = _chunkSS53NNZOcjs.boxMean; exports.boxPointOf = _chunkS55JFWDAcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkS55JFWDAcjs.bradfordAdaptation; exports.brushStrokeMask = _chunkUC3PWFM3cjs.brushStrokeMask; exports.brushstrokeDataUrl = _chunkPQ3H2AANcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkPQ3H2AANcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkPQ3H2AANcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkPQ3H2AANcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkPQ3H2AANcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkS55JFWDAcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkS55JFWDAcjs.buildToneLut; exports.builtinPattern = _chunkB46UQUDCcjs.builtinPattern; exports.builtinPatternIds = _chunkB46UQUDCcjs.builtinPatternIds; exports.bytesToBase64 = _chunkOLNIPTB3cjs.bytesToBase64; exports.calculateCropDrag = _chunkS55JFWDAcjs.calculateCropDrag; exports.canShareMemory = _chunkXFYLA3ZOcjs.canShareMemory; exports.canvasCompositeOperation = _chunkOLNIPTB3cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkS55JFWDAcjs.canvasToImagePoint; exports.caretAt = _chunkQAUIZPYIcjs.caretAt; exports.changedTiles = _chunkB46UQUDCcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkS55JFWDAcjs.clampCropToImage; exports.cleanMixer = _chunkPQ3H2AANcjs.cleanMixer; exports.cloneSamplePoint = _chunkYF3YZZ6Gcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.colorBalanceChannel = _chunkS55JFWDAcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkSS53NNZOcjs.combineSelections; exports.compareSelectionMasks = compareSelectionMasks; exports.compileAdjustmentLayer = _chunkS55JFWDAcjs.compileAdjustmentLayer; exports.componentPath = _chunkS55JFWDAcjs.componentPath; exports.componentsCoverage = _chunkS55JFWDAcjs.componentsCoverage; exports.compositeDeep = _chunkS55JFWDAcjs.compositeDeep; exports.compositeSurfaceOver = _chunkB46UQUDCcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkSS53NNZOcjs.computeSelectionBounds; exports.contentAwareFill = _chunkMQDIP4CFcjs.contentAwareFill; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contentsBox = _chunkS55JFWDAcjs.contentsBox; exports.contentsSurface = _chunkS55JFWDAcjs.contentsSurface; exports.contractCoverage = _chunkSS53NNZOcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkOLNIPTB3cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkS55JFWDAcjs.convertToSmartObject; exports.copySmartObject = _chunkS55JFWDAcjs.copySmartObject; exports.cornersFromMatrix = _chunkS55JFWDAcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkPQ3H2AANcjs.coverageTileCoord; exports.coverageToByte = _chunkSS53NNZOcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkS55JFWDAcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkPQ3H2AANcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkQAUIZPYIcjs.createCanvasTextShaper; exports.createGradientSampler = createGradientSampler; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkQAUIZPYIcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkQAUIZPYIcjs.createOutlineTextShaper; exports.createPigment = _chunkOLNIPTB3cjs.createPigment; exports.createPigmentTools = _chunkXFYLA3ZOcjs.createPigmentTools; exports.createSelectionMask = _chunkSS53NNZOcjs.createSelectionMask; exports.createShapeLayer = _chunkS55JFWDAcjs.createShapeLayer; exports.createTypeLayer = _chunkS55JFWDAcjs.createTypeLayer; exports.createWetGpuEngine = _chunkXFYLA3ZOcjs.createWetGpuEngine; exports.cssFont = _chunkQAUIZPYIcjs.cssFont; exports.cssFontFamily = _chunkQAUIZPYIcjs.cssFontFamily; exports.curveLut = _chunkB46UQUDCcjs.curveLut; exports.curveLutFromLevels = _chunkS55JFWDAcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkPQ3H2AANcjs.dabCoverage; exports.dabRect = _chunkPQ3H2AANcjs.dabRect; exports.decodeDeepSurface = _chunkS55JFWDAcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkS55JFWDAcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkS55JFWDAcjs.decodeLayerMask; exports.decodeMergedImage = _chunkS55JFWDAcjs.decodeMergedImage; exports.decodePlanes = _chunkS55JFWDAcjs.decodePlanes; exports.decodePng = _chunkOLNIPTB3cjs.decodePng; exports.decodePngDataUrl = _chunkS55JFWDAcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkSS53NNZOcjs.decodeSelectionRle; exports.decontaminateColors = _chunkSS53NNZOcjs.decontaminateColors; exports.deepBytes = _chunkOLNIPTB3cjs.deepBytes; exports.deepTile = _chunkOLNIPTB3cjs.deepTile; exports.defaultActiveLayerId = _chunkS55JFWDAcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkS55JFWDAcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkB46UQUDCcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkB46UQUDCcjs.defaultLayerEffect; exports.defaultShapeName = _chunkS55JFWDAcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkS55JFWDAcjs.depthMaskAlpha; exports.depthOf = _chunkOLNIPTB3cjs.depthOf; exports.depthRasterMask = _chunkS55JFWDAcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkS55JFWDAcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkS55JFWDAcjs.deserializeEffects; exports.deserializeLayer = _chunkS55JFWDAcjs.deserializeLayer; exports.deserializeLayers = _chunkS55JFWDAcjs.deserializeLayers; exports.deserializeMask = _chunkUC3PWFM3cjs.deserializeMask; exports.deserializePatterns = _chunkS55JFWDAcjs.deserializePatterns; exports.deserializeSelection = _chunkSS53NNZOcjs.deserializeSelection; exports.despillEdge = _chunkS55JFWDAcjs.despillEdge; exports.developFilter = _chunkS55JFWDAcjs.developFilter; exports.developFromAdjustments = _chunkS55JFWDAcjs.developFromAdjustments; exports.developTarget = _chunkS55JFWDAcjs.developTarget; exports.dexp = _chunkXFYLA3ZOcjs.dexp; exports.dilateMask = _chunkMQDIP4CFcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkSS53NNZOcjs.distanceTransform; exports.dlog = _chunkXFYLA3ZOcjs.dlog; exports.documentContents = _chunkS55JFWDAcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYF3YZZ6Gcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYF3YZZ6Gcjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkXFYLA3ZOcjs.dpow; exports.dragWarpMeshPoint = _chunkQAUIZPYIcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkXFYLA3ZOcjs.dsincos; exports.duplicateLayer = _chunkS55JFWDAcjs.duplicateLayer; exports.edgeBits = _chunkXFYLA3ZOcjs.edgeBits; exports.edgeWidth = _chunkSS53NNZOcjs.edgeWidth; exports.effectColorHex = _chunkB46UQUDCcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkB46UQUDCcjs.effectReach; exports.effectiveLayerMask = _chunkS55JFWDAcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkB46UQUDCcjs.effectsFingerprint; exports.effectsMargin = _chunkB46UQUDCcjs.effectsMargin; exports.effectsScale = _chunkB46UQUDCcjs.effectsScale; exports.ellipsePoints = _chunkUC3PWFM3cjs.ellipsePoints; exports.ellipseSelection = _chunkUC3PWFM3cjs.ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodeDeepSurface = _chunkS55JFWDAcjs.encodeDeepSurface; exports.encodePng = _chunkOLNIPTB3cjs.encodePng; exports.encodeRle = _chunkS55JFWDAcjs.encodeRle; exports.encodeSelectionRle = _chunkSS53NNZOcjs.encodeSelectionRle; exports.encodeSurface = _chunkS55JFWDAcjs.encodeSurface; exports.evalWarpMesh = _chunkQAUIZPYIcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkS55JFWDAcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkPQ3H2AANcjs.exchangeRates; exports.expNeg = _chunkXFYLA3ZOcjs.expNeg; exports.expandCoverage = _chunkSS53NNZOcjs.expandCoverage; exports.exportPsd = _chunkS55JFWDAcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkSS53NNZOcjs.featherCoverage; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.filmPixel = _chunkXFYLA3ZOcjs.filmPixel; exports.filmReflectance = _chunkXFYLA3ZOcjs.filmReflectance; exports.filterMaskCoverage = _chunkS55JFWDAcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkB46UQUDCcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = _chunkUC3PWFM3cjs.findSky; exports.findSubject = _chunkUC3PWFM3cjs.findSubject; exports.findWebGpu = _chunkXFYLA3ZOcjs.findWebGpu; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.fitParagraphRuns = _chunkQAUIZPYIcjs.fitParagraphRuns; exports.fitRuns = _chunkQAUIZPYIcjs.fitRuns; exports.flattenLayers = _chunkB46UQUDCcjs.flattenLayers; exports.flattenPath = _chunkS55JFWDAcjs.flattenPath; exports.flipCorners = _chunkS55JFWDAcjs.flipCorners; exports.flowField = _chunkXFYLA3ZOcjs.flowField; exports.focusArea = _chunkUC3PWFM3cjs.focusArea; exports.followLayerMove = _chunkS55JFWDAcjs.followLayerMove; exports.fontOf = _chunkQAUIZPYIcjs.fontOf; exports.forgetSelectAndMaskSettings = forgetSelectAndMaskSettings; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkSS53NNZOcjs.fullSelection; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.geometryHomography = _chunkS55JFWDAcjs.geometryHomography; exports.getAnnotationBounds = _chunkS55JFWDAcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkS55JFWDAcjs.getCropCursor; exports.getRotatedSize = _chunkS55JFWDAcjs.getRotatedSize; exports.getViewportMetrics = _chunkS55JFWDAcjs.getViewportMetrics; exports.getViewportProjection = _chunkS55JFWDAcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = _chunkUC3PWFM3cjs.grabCutLabels; exports.gradientDabColor = _chunkPQ3H2AANcjs.gradientDabColor; exports.grainCatch = _chunkPQ3H2AANcjs.grainCatch; exports.grainHeights = _chunkPQ3H2AANcjs.grainHeights; exports.greyMorphology = _chunkSS53NNZOcjs.greyMorphology; exports.groupLayers = _chunkS55JFWDAcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = _chunkSS53NNZOcjs.guidePlanes; exports.guidedFilterColor = _chunkSS53NNZOcjs.guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkB46UQUDCcjs.hasActiveEffects; exports.hasEdgeUnmix = _chunkS55JFWDAcjs.hasEdgeUnmix; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkS55JFWDAcjs.hasResampledLegacyMask; exports.hasSoftBand = _chunkS55JFWDAcjs.hasSoftBand; exports.hasSurface = _chunkS55JFWDAcjs.hasSurface; exports.hasWarp = _chunkS55JFWDAcjs.hasWarp; exports.hash2 = _chunkPQ3H2AANcjs.hash2; exports.hashMaskContent = _chunkSS53NNZOcjs.hashMaskContent; exports.hashNoise = _chunkB46UQUDCcjs.hashNoise; exports.healPixels = _chunkYF3YZZ6Gcjs.healPixels; exports.hexToPaintRgb = _chunkPQ3H2AANcjs.hexToPaintRgb; exports.hexToRgb = _chunkS55JFWDAcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkS55JFWDAcjs.hitTestAnnotation; exports.hitTestCrop = _chunkS55JFWDAcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkS55JFWDAcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkS55JFWDAcjs.hueRangeTables; exports.hueRangeWeight = _chunkS55JFWDAcjs.hueRangeWeight; exports.hueSaturation = _chunkS55JFWDAcjs.hueSaturation; exports.identityCurve = _chunkS55JFWDAcjs.identityCurve; exports.identityLevels = _chunkS55JFWDAcjs.identityLevels; exports.identityTransform = _chunkS55JFWDAcjs.identityTransform; exports.identityWarpMesh = _chunkQAUIZPYIcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkS55JFWDAcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkS55JFWDAcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkB46UQUDCcjs.insertLayer; exports.inspectMaskEdge = inspectMaskEdge; exports.instancesOf = _chunkS55JFWDAcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkS55JFWDAcjs.invertMatrix3; exports.invertSelection = _chunkSS53NNZOcjs.invertSelection; exports.isActiveFilter = _chunkS55JFWDAcjs.isActiveFilter; exports.isActiveVectorMask = _chunkS55JFWDAcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkS55JFWDAcjs.isAdjustmentKind; exports.isBitDepth = _chunkOLNIPTB3cjs.isBitDepth; exports.isBlendMode = _chunkOLNIPTB3cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkPQ3H2AANcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkS55JFWDAcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkS55JFWDAcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkPQ3H2AANcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYF3YZZ6Gcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkS55JFWDAcjs.isIdentityTransform; exports.isInterpolation = _chunkB46UQUDCcjs.isInterpolation; exports.isLayerEffectKind = _chunkB46UQUDCcjs.isLayerEffectKind; exports.isLayerLocked = _chunkB46UQUDCcjs.isLayerLocked; exports.isLegacyShape = _chunkS55JFWDAcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkS55JFWDAcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkOLNIPTB3cjs.isPainterlyBlendMode; exports.isPathEditTool = isPathEditTool; exports.isPng = _chunkOLNIPTB3cjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkS55JFWDAcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkS55JFWDAcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkSS53NNZOcjs.isSelectionEmpty; exports.isSelectionMode = _chunkSS53NNZOcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkOLNIPTB3cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkS55JFWDAcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkS55JFWDAcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkS55JFWDAcjs.isTransformAnchor; exports.isValidWarp = _chunkS55JFWDAcjs.isValidWarp; exports.keepDeepSamples = _chunkOLNIPTB3cjs.keepDeepSamples; exports.keepMainPieces = _chunkUC3PWFM3cjs.keepMainPieces; exports.kelvinToTemperature = _chunkS55JFWDAcjs.kelvinToTemperature; exports.keysWeight = _chunkB46UQUDCcjs.keysWeight; exports.latticeViscosity = _chunkXFYLA3ZOcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkB46UQUDCcjs.layerEffectFields; exports.layerEffectLabel = _chunkB46UQUDCcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkS55JFWDAcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkS55JFWDAcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkS55JFWDAcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkS55JFWDAcjs.layerMaskKey; exports.layerMaskSelection = _chunkS55JFWDAcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkS55JFWDAcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkS55JFWDAcjs.layerTree; exports.layerTypeLabel = _chunkS55JFWDAcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkS55JFWDAcjs.layersFromLegacy; exports.layoutText = _chunkQAUIZPYIcjs.layoutText; exports.legacyAdjustmentLayer = _chunkS55JFWDAcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkS55JFWDAcjs.legacyMaskOf; exports.legacyView = _chunkS55JFWDAcjs.legacyView; exports.lerpPigment = _chunkOLNIPTB3cjs.lerpPigment; exports.lerpPigmentInto = _chunkOLNIPTB3cjs.lerpPigmentInto; exports.levelsValue = _chunkS55JFWDAcjs.levelsValue; exports.linearSrgbToXy = _chunkS55JFWDAcjs.linearSrgbToXy; exports.linearToSrgb = _chunkS55JFWDAcjs.linearToSrgb; exports.linearToSrgb8 = _chunkXFYLA3ZOcjs.linearToSrgb8; exports.liveComponent = _chunkS55JFWDAcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkS55JFWDAcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkPQ3H2AANcjs.loadMixer; exports.loadOpenTypeFont = _chunkLCCMOWR7cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkXFYLA3ZOcjs.loadWetKernel; exports.luma = _chunkYF3YZZ6Gcjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkS55JFWDAcjs.mapCropHandle; exports.mapLayer = _chunkB46UQUDCcjs.mapLayer; exports.mapSubpaths = _chunkS55JFWDAcjs.mapSubpaths; exports.maskBounds = _chunkMQDIP4CFcjs.maskBounds; exports.maskCoverageOverCanvas = _chunkS55JFWDAcjs.maskCoverageOverCanvas; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkS55JFWDAcjs.matrixFromCorners; exports.matrixFromParams = _chunkS55JFWDAcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunkMQDIP4CFcjs.membraneFill; exports.mergeLayerEffect = _chunkB46UQUDCcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkS55JFWDAcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkPQ3H2AANcjs.mix32; exports.mixPigment8 = _chunkOLNIPTB3cjs.mixPigment8; exports.mixPigmentRgb = _chunkOLNIPTB3cjs.mixPigmentRgb; exports.mixPigments = _chunkOLNIPTB3cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkPQ3H2AANcjs.mixerRates; exports.modifySelection = _chunkSS53NNZOcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkS55JFWDAcjs.moveLayer; exports.moveSmartFilter = _chunkS55JFWDAcjs.moveSmartFilter; exports.moveWetSnapshot = _chunkXFYLA3ZOcjs.moveWetSnapshot; exports.mulMatrix3 = _chunkS55JFWDAcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkS55JFWDAcjs.neutralHueRange; exports.newContentsId = _chunkS55JFWDAcjs.newContentsId; exports.newEffectId = _chunkB46UQUDCcjs.newEffectId; exports.newLayerId = _chunkS55JFWDAcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.newPathId = newPathId; exports.normalizeAdjustmentLayer = _chunkS55JFWDAcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkS55JFWDAcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkS55JFWDAcjs.normalizeAngle; exports.normalizeBlendMode = _chunkOLNIPTB3cjs.normalizeBlendMode; exports.normalizeBlender = _chunkPQ3H2AANcjs.normalizeBlender; exports.normalizeBrush = _chunkPQ3H2AANcjs.normalizeBrush; exports.normalizeFilter = _chunkS55JFWDAcjs.normalizeFilter; exports.normalizeFlow = _chunkXFYLA3ZOcjs.normalizeFlow; exports.normalizeHexColor = _chunkPQ3H2AANcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkB46UQUDCcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkS55JFWDAcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkS55JFWDAcjs.normalizeLiveShape; exports.normalizeMixer = _chunkPQ3H2AANcjs.normalizeMixer; exports.normalizePlacement = _chunkS55JFWDAcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkS55JFWDAcjs.normalizeProcessVersion; exports.normalizeRect = _chunkUC3PWFM3cjs.normalizeRect; exports.normalizeRefineEdgeParams = _chunkSS53NNZOcjs.normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYF3YZZ6Gcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkS55JFWDAcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkS55JFWDAcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkS55JFWDAcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkPQ3H2AANcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkS55JFWDAcjs.normalizeSubpaths; exports.normalizeText = _chunkS55JFWDAcjs.normalizeText; exports.normalizeTilt = _chunkXFYLA3ZOcjs.normalizeTilt; exports.normalizeWetParams = _chunkXFYLA3ZOcjs.normalizeWetParams; exports.offsetLayer = _chunkS55JFWDAcjs.offsetLayer; exports.offsetShape = _chunkS55JFWDAcjs.offsetShape; exports.offsetSmartObject = _chunkS55JFWDAcjs.offsetSmartObject; exports.offsetVectorMask = _chunkS55JFWDAcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = _chunkUC3PWFM3cjs.otsuThreshold; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.packWetParams = _chunkXFYLA3ZOcjs.packWetParams; exports.paintGradientMappingFor = _chunkPQ3H2AANcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkPQ3H2AANcjs.paintPathStroke; exports.paintSourceColor = _chunkPQ3H2AANcjs.paintSourceColor; exports.paintSourceCss = _chunkPQ3H2AANcjs.paintSourceCss; exports.paragraphRanges = _chunkQAUIZPYIcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkS55JFWDAcjs.parseAdjustmentBlock; exports.parseBlend = _chunkS55JFWDAcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkOLNIPTB3cjs.parseDataUrl; exports.parseEffectColor = _chunkB46UQUDCcjs.parseEffectColor; exports.parseLfx2 = _chunkS55JFWDAcjs.parseLfx2; exports.parseLrfx = _chunkS55JFWDAcjs.parseLrfx; exports.parseOpenTypeFont = _chunkLCCMOWR7cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkPQ3H2AANcjs.parsePaintSource; exports.parsePatternBlock = _chunkS55JFWDAcjs.parsePatternBlock; exports.parseSelectionMode = _chunkSS53NNZOcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkS55JFWDAcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkS55JFWDAcjs.patchParagraphStyle; exports.patchTextStyle = _chunkS55JFWDAcjs.patchTextStyle; exports.pathAnchorCount = pathAnchorCount; exports.pathBounds = pathBounds; exports.pathStrokeCoverage = _chunkPQ3H2AANcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkPQ3H2AANcjs.pathStrokeDabs; exports.pathSvgData = pathSvgData; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunkYF3YZZ6Gcjs.perDabStrength; exports.photoFilterMatrix = _chunkS55JFWDAcjs.photoFilterMatrix; exports.pigment8 = _chunkOLNIPTB3cjs.pigment8; exports.pigmentColor = _chunkXFYLA3ZOcjs.pigmentColor; exports.pigmentOf = _chunkXFYLA3ZOcjs.pigmentOf; exports.pixelLayerBounds = _chunkS55JFWDAcjs.pixelLayerBounds; exports.pixelLayers = _chunkS55JFWDAcjs.pixelLayers; exports.pixelPigment = _chunkXFYLA3ZOcjs.pixelPigment; exports.placeContents = _chunkS55JFWDAcjs.placeContents; exports.placeLayer = _chunkS55JFWDAcjs.placeLayer; exports.placementAt = _chunkS55JFWDAcjs.placementAt; exports.placementBounds = _chunkS55JFWDAcjs.placementBounds; exports.placementGeometry = _chunkS55JFWDAcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkOLNIPTB3cjs.pngDataUrl; exports.pointerPressure = _chunkXFYLA3ZOcjs.pointerPressure; exports.pointerStrokeSample = _chunkXFYLA3ZOcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkXFYLA3ZOcjs.pointerStrokeSamples; exports.polygonCoverage = _chunkUC3PWFM3cjs.polygonCoverage; exports.polygonCoverageBox = _chunkUC3PWFM3cjs.polygonCoverageBox; exports.polygonSelection = _chunkUC3PWFM3cjs.polygonSelection; exports.posterizeValue = _chunkS55JFWDAcjs.posterizeValue; exports.presetWarp = _chunkS55JFWDAcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkS55JFWDAcjs.projectImagePoint; exports.projectImageRect = _chunkS55JFWDAcjs.projectImageRect; exports.projectMaskCoverage = _chunkS55JFWDAcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkOLNIPTB3cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkS55JFWDAcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkS55JFWDAcjs.psdToLayers; exports.pullWarpMesh = _chunkQAUIZPYIcjs.pullWarpMesh; exports.put255 = _chunkPQ3H2AANcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = _chunkUC3PWFM3cjs.quickSelectStroke; exports.rand01 = _chunkPQ3H2AANcjs.rand01; exports.randSigned = _chunkPQ3H2AANcjs.randSigned; exports.rangeLightness = _chunkS55JFWDAcjs.rangeLightness; exports.rasterContents = _chunkS55JFWDAcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkS55JFWDAcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkS55JFWDAcjs.rasterizeCoverage; exports.rasterizeDab = _chunkPQ3H2AANcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkS55JFWDAcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkOLNIPTB3cjs.readDeepRegion; exports.readEdgeColor = _chunkS55JFWDAcjs.readEdgeColor; exports.readPaintSource = _chunkPQ3H2AANcjs.readPaintSource; exports.readPaths = readPaths; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readPsd = _chunkS55JFWDAcjs.readPsd; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.readShapeComponents = _chunkS55JFWDAcjs.readShapeComponents; exports.readSourceRegion = _chunkYF3YZZ6Gcjs.readSourceRegion; exports.rectSelection = _chunkUC3PWFM3cjs.rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkB46UQUDCcjs.reduceSurface; exports.referencePoint = _chunkS55JFWDAcjs.referencePoint; exports.refineCoverage = _chunkSS53NNZOcjs.refineCoverage; exports.refineEdgeHalo = _chunkSS53NNZOcjs.refineEdgeHalo; exports.refineSelection = _chunkSS53NNZOcjs.refineSelection; exports.reflectanceToRgb = _chunkOLNIPTB3cjs.reflectanceToRgb; exports.removeAlpha = _chunkS55JFWDAcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkS55JFWDAcjs.removeLayer; exports.removeLayerEffect = _chunkS55JFWDAcjs.removeLayerEffect; exports.removeLayerFilter = _chunkS55JFWDAcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkPQ3H2AANcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkS55JFWDAcjs.removeSmartFilter; exports.renderBrushstroke = _chunkPQ3H2AANcjs.renderBrushstroke; exports.renderLayerEffects = _chunkB46UQUDCcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkS55JFWDAcjs.renderShape; exports.renderShapeRect = _chunkS55JFWDAcjs.renderShapeRect; exports.renderSmartObject = _chunkS55JFWDAcjs.renderSmartObject; exports.renderText = _chunkS55JFWDAcjs.renderText; exports.replaceContents = _chunkS55JFWDAcjs.replaceContents; exports.replaceTextRange = _chunkS55JFWDAcjs.replaceTextRange; exports.requireLayer = _chunkS55JFWDAcjs.requireLayer; exports.requireOperation = _chunkS55JFWDAcjs.requireOperation; exports.requireShapeLayer = _chunkS55JFWDAcjs.requireShapeLayer; exports.requireSmartObject = _chunkS55JFWDAcjs.requireSmartObject; exports.requireTypeLayer = _chunkS55JFWDAcjs.requireTypeLayer; exports.requireUnlocked = _chunkS55JFWDAcjs.requireUnlocked; exports.rerender = _chunkS55JFWDAcjs.rerender; exports.rerenderShape = _chunkS55JFWDAcjs.rerenderShape; exports.rerenderText = _chunkS55JFWDAcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkSS53NNZOcjs.resizeSelection; exports.resizeWarpMesh = _chunkQAUIZPYIcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkS55JFWDAcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkPQ3H2AANcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkS55JFWDAcjs.resolveVectorMasks; exports.restyleRange = _chunkQAUIZPYIcjs.restyleRange; exports.retouchFilter = _chunkYF3YZZ6Gcjs.retouchFilter; exports.reversePaintGradient = _chunkPQ3H2AANcjs.reversePaintGradient; exports.rgbToGray = _chunkS55JFWDAcjs.rgbToGray; exports.rgbToHsl = _chunkS55JFWDAcjs.rgbToHsl; exports.rgbToReflectance = _chunkOLNIPTB3cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYF3YZZ6Gcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkS55JFWDAcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkS55JFWDAcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.runSelectionJob = _chunkUC3PWFM3cjs.runSelectionJob; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkS55JFWDAcjs.sampleLut; exports.sampleToneLut = _chunkS55JFWDAcjs.sampleToneLut; exports.saturationOf = _chunkYF3YZZ6Gcjs.saturationOf; exports.scaleLayerEffect = _chunkB46UQUDCcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkPQ3H2AANcjs.scalePaintGradient; exports.seamlessClone = _chunkMQDIP4CFcjs.seamlessClone; exports.seedFromString = _chunkPQ3H2AANcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = _chunkUC3PWFM3cjs.selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkSS53NNZOcjs.selectionArea; exports.selectionDiffPixels = selectionDiffPixels; exports.selectionFromCoverage = _chunkSS53NNZOcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkSS53NNZOcjs.selectionFromPixels; exports.selectionFromRegion = _chunkSS53NNZOcjs.selectionFromRegion; exports.selectionFromTiles = _chunkSS53NNZOcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkSS53NNZOcjs.selectionToCoverage; exports.selectionToPixels = _chunkSS53NNZOcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionUncertainty = selectionUncertainty; exports.selectionValueAt = _chunkSS53NNZOcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkS55JFWDAcjs.serializeContents; exports.serializeEffects = _chunkS55JFWDAcjs.serializeEffects; exports.serializeLayer = _chunkS55JFWDAcjs.serializeLayer; exports.serializeLayers = _chunkS55JFWDAcjs.serializeLayers; exports.serializeLayersExternal = _chunkS55JFWDAcjs.serializeLayersExternal; exports.serializeMask = _chunkUC3PWFM3cjs.serializeMask; exports.serializePaths = serializePaths; exports.serializePatterns = _chunkS55JFWDAcjs.serializePatterns; exports.serializeSelection = _chunkSS53NNZOcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkS55JFWDAcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkS55JFWDAcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkS55JFWDAcjs.setLayerMask; exports.setLayerProperties = _chunkS55JFWDAcjs.setLayerProperties; exports.setLum = _chunkOLNIPTB3cjs.setLum; exports.setPigmentColor = _chunkOLNIPTB3cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkS55JFWDAcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkS55JFWDAcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkS55JFWDAcjs.setSmartPlacement; exports.shadeTile = _chunkXFYLA3ZOcjs.shadeTile; exports.shapeAsPixelLayer = _chunkS55JFWDAcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkS55JFWDAcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkS55JFWDAcjs.shapeGeometryBounds; exports.shapeLayers = _chunkS55JFWDAcjs.shapeLayers; exports.shapeOutline = _chunkS55JFWDAcjs.shapeOutline; exports.shapeRenderClip = _chunkS55JFWDAcjs.shapeRenderClip; exports.shiftCoverage = _chunkSS53NNZOcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = _chunkUC3PWFM3cjs.slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkS55JFWDAcjs.smartObjectLayers; exports.smoothCoverage = _chunkSS53NNZOcjs.smoothCoverage; exports.smoothPoints = _chunkPQ3H2AANcjs.smoothPoints; exports.smoothnessWeights = _chunkUC3PWFM3cjs.smoothnessWeights; exports.smudgeEffect = _chunkYF3YZZ6Gcjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = _chunkUC3PWFM3cjs.softMaskToSelection; exports.solidPaint = _chunkPQ3H2AANcjs.solidPaint; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.solveMembrane = _chunkMQDIP4CFcjs.solveMembrane; exports.spliceRuns = _chunkQAUIZPYIcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYF3YZZ6Gcjs.sponge; exports.spongeEffect = _chunkYF3YZZ6Gcjs.spongeEffect; exports.spotHealPixels = _chunkYF3YZZ6Gcjs.spotHealPixels; exports.spotHealWindow = _chunkYF3YZZ6Gcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkXFYLA3ZOcjs.srgbByteToLinear; exports.srgbDecode = _chunkOLNIPTB3cjs.srgbDecode; exports.srgbEncode = _chunkOLNIPTB3cjs.srgbEncode; exports.srgbToLinear = _chunkS55JFWDAcjs.srgbToLinear; exports.standardBlendMode = _chunkOLNIPTB3cjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.startSelectionWorker = _chunkUC3PWFM3cjs.startSelectionWorker; exports.stepSlotTs = _chunkXFYLA3ZOcjs.stepSlotTs; exports.strokeGrainCatch = _chunkPQ3H2AANcjs.strokeGrainCatch; exports.styleAt = _chunkQAUIZPYIcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = _chunkUC3PWFM3cjs.superpixelSaliency; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunkOLNIPTB3cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkOLNIPTB3cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tempTintToXy = _chunkS55JFWDAcjs.tempTintToXy; exports.temperatureToKelvin = _chunkS55JFWDAcjs.temperatureToKelvin; exports.textIndexAt = _chunkQAUIZPYIcjs.textIndexAt; exports.textMatrix = _chunkS55JFWDAcjs.textMatrix; exports.textOrientation = _chunkS55JFWDAcjs.textOrientation; exports.textOutlines = _chunkS55JFWDAcjs.textOutlines; exports.textRange = _chunkS55JFWDAcjs.textRange; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunkOLNIPTB3cjs.tileSamples; exports.tileSamples16 = _chunkOLNIPTB3cjs.tileSamples16; exports.tileSamples32 = _chunkOLNIPTB3cjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.tipFalloff = _chunkPQ3H2AANcjs.tipFalloff; exports.tipReach = _chunkPQ3H2AANcjs.tipReach; exports.tipShape = _chunkPQ3H2AANcjs.tipShape; exports.to16From32 = _chunkOLNIPTB3cjs.to16From32; exports.to16From8 = _chunkOLNIPTB3cjs.to16From8; exports.to32From16 = _chunkOLNIPTB3cjs.to32From16; exports.to32From8 = _chunkOLNIPTB3cjs.to32From8; exports.to8From16 = _chunkOLNIPTB3cjs.to8From16; exports.to8From32 = _chunkOLNIPTB3cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkS55JFWDAcjs.toTextSpace; exports.toneCurve = _chunkS55JFWDAcjs.toneCurve; exports.toneLuts = _chunkS55JFWDAcjs.toneLuts; exports.toneOf = _chunkYF3YZZ6Gcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkS55JFWDAcjs.transformHomography; exports.transformMap = _chunkS55JFWDAcjs.transformMap; exports.transformShapeComponents = _chunkS55JFWDAcjs.transformShapeComponents; exports.transformSurface = _chunkB46UQUDCcjs.transformSurface; exports.transformTypeLayer = _chunkS55JFWDAcjs.transformTypeLayer; exports.transformVectorMask = _chunkS55JFWDAcjs.transformVectorMask; exports.transformedBounds = _chunkB46UQUDCcjs.transformedBounds; exports.transformedBox = _chunkS55JFWDAcjs.transformedBox; exports.transformedPoint = _chunkS55JFWDAcjs.transformedPoint; exports.translateLayer = _chunkS55JFWDAcjs.translateLayer; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.typeAsPixelLayer = _chunkS55JFWDAcjs.typeAsPixelLayer; exports.typeFrame = _chunkS55JFWDAcjs.typeFrame; exports.typeFromAnnotation = _chunkS55JFWDAcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkS55JFWDAcjs.typeLayerName; exports.ungroupLayer = _chunkS55JFWDAcjs.ungroupLayer; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.unionRect = _chunkS55JFWDAcjs.unionRect; exports.unprojectCanvasPoint = _chunkS55JFWDAcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkS55JFWDAcjs.updateLayerEffect; exports.updateLayerFilter = _chunkS55JFWDAcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkS55JFWDAcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkPQ3H2AANcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkS55JFWDAcjs.updateShapeLayer; exports.updateSmartFilter = _chunkS55JFWDAcjs.updateSmartFilter; exports.updateTypeLayer = _chunkS55JFWDAcjs.updateTypeLayer; exports.upscaleRegion = _chunkUC3PWFM3cjs.upscaleRegion; exports.userErrorMessage = _chunkS55JFWDAcjs.userErrorMessage; exports.uvToXy = _chunkS55JFWDAcjs.uvToXy; exports.validateEffectGradient = _chunkB46UQUDCcjs.validateEffectGradient; exports.validateLayerEffect = _chunkB46UQUDCcjs.validateLayerEffect; exports.validateLayerEffects = _chunkB46UQUDCcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkS55JFWDAcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkS55JFWDAcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkS55JFWDAcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkS55JFWDAcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkS55JFWDAcjs.vibranceLinear; exports.vibrancePixel = _chunkS55JFWDAcjs.vibrancePixel; exports.walkDabs = _chunkPQ3H2AANcjs.walkDabs; exports.warpMeshEditPoints = _chunkQAUIZPYIcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkQAUIZPYIcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkQAUIZPYIcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkQAUIZPYIcjs.warpPresetMesh; exports.warpSurface = _chunkB46UQUDCcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkS55JFWDAcjs.wbMatrix; exports.wetGpuSupport = _chunkXFYLA3ZOcjs.wetGpuSupport; exports.wetSimdSupported = _chunkXFYLA3ZOcjs.wetSimdSupported; exports.wetSupport = _chunkXFYLA3ZOcjs.wetSupport; exports.whiteBalanceFromSample = _chunkS55JFWDAcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkS55JFWDAcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkS55JFWDAcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkS55JFWDAcjs.withNewIds; exports.workImage = _chunkUC3PWFM3cjs.workImage; exports.workLuma = _chunkUC3PWFM3cjs.workLuma; exports.workPlanes = _chunkUC3PWFM3cjs.workPlanes; exports.writeAdjustmentBlock = _chunkS55JFWDAcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkOLNIPTB3cjs.writeDeepRegion; exports.writeLfx2 = _chunkS55JFWDAcjs.writeLfx2; exports.writePatternBlock = _chunkS55JFWDAcjs.writePatternBlock; exports.writePsd = _chunkS55JFWDAcjs.writePsd; exports.writeRegion = _chunk474IQG74cjs.writeRegion; exports.xyToTempTint = _chunkS55JFWDAcjs.xyToTempTint; exports.xyToUv = _chunkS55JFWDAcjs.xyToUv;
23248
+
23249
+ exports.ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkS55JFWDAcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkS55JFWDAcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkS55JFWDAcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkS55JFWDAcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkS55JFWDAcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkS55JFWDAcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkOLNIPTB3cjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkOLNIPTB3cjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkS55JFWDAcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkXFYLA3ZOcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkPQ3H2AANcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.COLOR_RANGE_PRESETS = COLOR_RANGE_PRESETS; exports.COLOR_RANGE_PRESET_LABELS = COLOR_RANGE_PRESET_LABELS; exports.CONTENT_AWARE_FILL_SAMPLING = CONTENT_AWARE_FILL_SAMPLING; exports.CONTENT_AWARE_FILL_TOOLS = CONTENT_AWARE_FILL_TOOLS; exports.ColorGmm = _chunkUC3PWFM3cjs.ColorGmm; exports.ContentAwareFillSession = ContentAwareFillSession; exports.CoverageMap = _chunkPQ3H2AANcjs.CoverageMap; exports.D50 = _chunkS55JFWDAcjs.D50; exports.D65 = _chunkS55JFWDAcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkQAUIZPYIcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkPQ3H2AANcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkPQ3H2AANcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_CHANNEL_COLOR = DEFAULT_CHANNEL_COLOR; exports.DEFAULT_CONTENT_AWARE_FILL_SETTINGS = DEFAULT_CONTENT_AWARE_FILL_SETTINGS; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkXFYLA3ZOcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkB46UQUDCcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkS55JFWDAcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkPQ3H2AANcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkPQ3H2AANcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = _chunkSS53NNZOcjs.DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunkYF3YZZ6Gcjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SELECT_AND_MASK_SETTINGS = DEFAULT_SELECT_AND_MASK_SETTINGS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkPQ3H2AANcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkQAUIZPYIcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkXFYLA3ZOcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkXFYLA3ZOcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkS55JFWDAcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkK6PXS6DOcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkXFYLA3ZOcjs.DRY_EPS; exports.DabWalker = _chunkPQ3H2AANcjs.DabWalker; exports.EDGE_COLOR_RADIUS = _chunkS55JFWDAcjs.EDGE_COLOR_RADIUS; exports.EFFECT_LAYER_USES = EFFECT_LAYER_USES; exports.EMPTY_DISTANCE = _chunkSS53NNZOcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkPQ3H2AANcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkXFYLA3ZOcjs.EX; exports.EY = _chunkXFYLA3ZOcjs.EY; exports.EdgeMap = EdgeMap; exports.FLAG_ALIVE = _chunkXFYLA3ZOcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkXFYLA3ZOcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkXFYLA3ZOcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkXFYLA3ZOcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkXFYLA3ZOcjs.FLAG_TOP; exports.FLAG_WET = _chunkXFYLA3ZOcjs.FLAG_WET; exports.FLAT = _chunkXFYLA3ZOcjs.FLAT; exports.FREE_INTERVAL = _chunkXFYLA3ZOcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkS55JFWDAcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GAMMA = _chunkUC3PWFM3cjs.GAMMA; exports.GRAIN_PATTERNS = _chunkPQ3H2AANcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkPQ3H2AANcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = _chunkSS53NNZOcjs.GUIDED_FILTER_EPS; exports.GridGraph = _chunkUC3PWFM3cjs.GridGraph; exports.HIDE = _chunkXFYLA3ZOcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkS55JFWDAcjs.HUE_RANGE_LABELS; exports.HUE_RANGE_PRESETS = HUE_RANGE_PRESETS; exports.IDENTITY_CLONE_TRANSFORM = _chunkYF3YZZ6Gcjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkS55JFWDAcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.IMAGE_TOOL_GROUPS = IMAGE_TOOL_GROUPS; exports.IMAGE_TOOL_SHORTCUTS = IMAGE_TOOL_SHORTCUTS; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkB46UQUDCcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkS55JFWDAcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkS55JFWDAcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkB46UQUDCcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkS55JFWDAcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkS55JFWDAcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkS55JFWDAcjs.LUMA_709; exports.LayerCompositor = _chunkS55JFWDAcjs.LayerCompositor; exports.LayerEffectError = _chunkB46UQUDCcjs.LayerEffectError; exports.LayerOperationError = _chunkS55JFWDAcjs.LayerOperationError; exports.MARCHING_ANTS_STEP_MS = MARCHING_ANTS_STEP_MS; exports.MASK_EDGE_THRESHOLDS = MASK_EDGE_THRESHOLDS; exports.MASK_FILE_ACCEPT = MASK_FILE_ACCEPT; exports.MAX_BATCH = _chunkXFYLA3ZOcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkPQ3H2AANcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_ANIMATION_MS = _chunkS55JFWDAcjs.MAX_EFFECT_ANIMATION_MS; exports.MAX_EFFECT_REACH = _chunkB46UQUDCcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkS55JFWDAcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkXFYLA3ZOcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkB46UQUDCcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkXFYLA3ZOcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkXFYLA3ZOcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkS55JFWDAcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkS55JFWDAcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkPQ3H2AANcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkPQ3H2AANcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkPQ3H2AANcjs.MIXING_MODELS; exports.MixerStroke = _chunkPQ3H2AANcjs.MixerStroke; exports.OPP = _chunkXFYLA3ZOcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkOLNIPTB3cjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkPQ3H2AANcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkPQ3H2AANcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkPQ3H2AANcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkPQ3H2AANcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkXFYLA3ZOcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkS55JFWDAcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkXFYLA3ZOcjs.PARAM; exports.PARAM_FLOATS = _chunkXFYLA3ZOcjs.PARAM_FLOATS; exports.PASTE_MODES = PASTE_MODES; exports.PATH_EDIT_TOOLS = PATH_EDIT_TOOLS; exports.PATTERN_BLOCK_KEYS = _chunkS55JFWDAcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkOLNIPTB3cjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkXFYLA3ZOcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkOLNIPTB3cjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkXFYLA3ZOcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkOLNIPTB3cjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkXFYLA3ZOcjs.PLANE; exports.PLANE_BYTES = _chunkXFYLA3ZOcjs.PLANE_BYTES; exports.PREVIEW_SIZE = PREVIEW_SIZE; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkS55JFWDAcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkXFYLA3ZOcjs.P_D0; exports.P_EDGE = _chunkXFYLA3ZOcjs.P_EDGE; exports.P_FX = _chunkXFYLA3ZOcjs.P_FX; exports.P_FY = _chunkXFYLA3ZOcjs.P_FY; exports.P_H = _chunkXFYLA3ZOcjs.P_H; exports.P_P0 = _chunkXFYLA3ZOcjs.P_P0; exports.P_RHO = _chunkXFYLA3ZOcjs.P_RHO; exports.P_SW = _chunkXFYLA3ZOcjs.P_SW; exports.P_UX = _chunkXFYLA3ZOcjs.P_UX; exports.P_UY = _chunkXFYLA3ZOcjs.P_UY; exports.PaintExchange = _chunkPQ3H2AANcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkPQ3H2AANcjs.PaintGradientSampler; exports.PaintSourceError = _chunkPQ3H2AANcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkPQ3H2AANcjs.PaperGrain; exports.PathEditGesture = PathEditGesture; exports.PatternPlacement = _chunkB46UQUDCcjs.PatternPlacement; exports.PatternTile = _chunkB46UQUDCcjs.PatternTile; exports.PsdError = _chunkS55JFWDAcjs.PsdError; exports.QUICK_MASK_TARGET = QUICK_MASK_TARGET; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.REFINE_EDIT_KINDS = _chunkUC3PWFM3cjs.REFINE_EDIT_KINDS; exports.REFINE_OUTPUTS = REFINE_OUTPUTS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunkYF3YZZ6Gcjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunkYF3YZZ6Gcjs.RegionPixelSource; exports.RetouchDabStroke = _chunkYF3YZZ6Gcjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkSS53NNZOcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkSS53NNZOcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SELECT_AND_MASK_TOOLS = SELECT_AND_MASK_TOOLS; exports.SELECT_AND_MASK_VIEWS = SELECT_AND_MASK_VIEWS; exports.SET_PLANES = _chunkXFYLA3ZOcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkOLNIPTB3cjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkS55JFWDAcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkS55JFWDAcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkXFYLA3ZOcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkXFYLA3ZOcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkXFYLA3ZOcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkS55JFWDAcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunkYF3YZZ6Gcjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkXFYLA3ZOcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkXFYLA3ZOcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkS55JFWDAcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectAndMaskSession = SelectAndMaskSession; exports.SelectionGesture = SelectionGesture; exports.SelectionWorkerClient = _chunkUC3PWFM3cjs.SelectionWorkerClient; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkPQ3H2AANcjs.SmudgeTip; exports.StrokeCoverage = _chunkPQ3H2AANcjs.StrokeCoverage; exports.SurfaceDraft = _chunk474IQG74cjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkS55JFWDAcjs.TEXT_ALIGNS; exports.TEXT_ORIENTATIONS = _chunkS55JFWDAcjs.TEXT_ORIENTATIONS; exports.TEXT_RENDER_MARGIN = _chunkS55JFWDAcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkS55JFWDAcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunk474IQG74cjs.TILE; exports.TILE_SHIFT = _chunk474IQG74cjs.TILE_SHIFT; exports.TINT_SCALE = _chunkS55JFWDAcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkPQ3H2AANcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkS55JFWDAcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunkYF3YZZ6Gcjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkS55JFWDAcjs.TRANSFORM_ANCHORS; exports.TRANSFORM_ROTATE_HANDLE_OFFSET = TRANSFORM_ROTATE_HANDLE_OFFSET; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkPQ3H2AANcjs.TileMedium; exports.TilePixelSource = _chunkYF3YZZ6Gcjs.TilePixelSource; exports.TileableNoise = _chunkPQ3H2AANcjs.TileableNoise; exports.TiledSurface = _chunk474IQG74cjs.TiledSurface; exports.TransformTooLargeError = _chunkB46UQUDCcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunkYF3YZZ6Gcjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.UNITS = _chunkUC3PWFM3cjs.UNITS; exports.U_MAX = _chunkXFYLA3ZOcjs.U_MAX; exports.VIBRANCE_GREY = _chunkS55JFWDAcjs.VIBRANCE_GREY; exports.W9 = _chunkXFYLA3ZOcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkQAUIZPYIcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkQAUIZPYIcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkXFYLA3ZOcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkXFYLA3ZOcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkXFYLA3ZOcjs.WET_TILE; exports.WGSL_HALO = _chunkXFYLA3ZOcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkXFYLA3ZOcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkXFYLA3ZOcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WORK_PATH_NAME = WORK_PATH_NAME; exports.WORK_SIZE = _chunkUC3PWFM3cjs.WORK_SIZE; exports.WetGpuEngine = _chunkXFYLA3ZOcjs.WetGpuEngine; exports.WetMedium = _chunkXFYLA3ZOcjs.WetMedium; exports.WetWorkerPool = _chunkXFYLA3ZOcjs.WetWorkerPool; exports.WetWorld = _chunkXFYLA3ZOcjs.WetWorld; exports.WetWorldError = _chunkXFYLA3ZOcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkS55JFWDAcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkS55JFWDAcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkS55JFWDAcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkS55JFWDAcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkS55JFWDAcjs.activeSmartFilters; exports.addLayerEffect = _chunkS55JFWDAcjs.addLayerEffect; exports.addLayerFilter = _chunkS55JFWDAcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkPQ3H2AANcjs.addPaintGradientStop; exports.addSmartFilter = _chunkS55JFWDAcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkS55JFWDAcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkS55JFWDAcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkS55JFWDAcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkS55JFWDAcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkS55JFWDAcjs.anchorPoint; exports.annotationBlend = _chunkS55JFWDAcjs.annotationBlend; exports.annotationLayerFor = _chunkS55JFWDAcjs.annotationLayerFor; exports.annotationLayerName = _chunkS55JFWDAcjs.annotationLayerName; exports.annotationOfLayer = _chunkS55JFWDAcjs.annotationOfLayer; exports.annotationOfShape = _chunkS55JFWDAcjs.annotationOfShape; exports.annotationOfType = _chunkS55JFWDAcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkS55JFWDAcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkS55JFWDAcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkS55JFWDAcjs.applyAdjustments; exports.applyBoxBlur = _chunkS55JFWDAcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkS55JFWDAcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkS55JFWDAcjs.applyDepthMask; exports.applyEdgeUnmix = _chunkS55JFWDAcjs.applyEdgeUnmix; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkS55JFWDAcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkS55JFWDAcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkS55JFWDAcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkS55JFWDAcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkS55JFWDAcjs.applyParams; exports.applyProcess2Adjustments = _chunkS55JFWDAcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkS55JFWDAcjs.applyProcess2Float; exports.applyRefineEdits = _chunkUC3PWFM3cjs.applyRefineEdits; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunkYF3YZZ6Gcjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkS55JFWDAcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkPQ3H2AANcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkPQ3H2AANcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunkYF3YZZ6Gcjs.applyToneToDeepTile; exports.backgroundLayer = _chunkS55JFWDAcjs.backgroundLayer; exports.base64ToBytes = _chunkOLNIPTB3cjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunkMQDIP4CFcjs.bestOffset; exports.blackWhiteGray = _chunkS55JFWDAcjs.blackWhiteGray; exports.blendChannel = _chunkOLNIPTB3cjs.blendChannel; exports.blendImageData = _chunkOLNIPTB3cjs.blendImageData; exports.blendLum = _chunkOLNIPTB3cjs.blendLum; exports.blendPixel = _chunkOLNIPTB3cjs.blendPixel; exports.blendRadius = _chunkPQ3H2AANcjs.blendRadius; exports.blendRgb = _chunkOLNIPTB3cjs.blendRgb; exports.blendTile = _chunkB46UQUDCcjs.blendTile; exports.blenderDab = _chunkPQ3H2AANcjs.blenderDab; exports.blurFilter = _chunkS55JFWDAcjs.blurFilter; exports.borderCoverage = _chunkSS53NNZOcjs.borderCoverage; exports.boxBlur = _chunkUC3PWFM3cjs.boxBlur; exports.boxBlurPixels = _chunkYF3YZZ6Gcjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = _chunkSS53NNZOcjs.boxMean; exports.boxPointOf = _chunkS55JFWDAcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkS55JFWDAcjs.bradfordAdaptation; exports.brushStrokeMask = _chunkUC3PWFM3cjs.brushStrokeMask; exports.brushstrokeDataUrl = _chunkPQ3H2AANcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkPQ3H2AANcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkPQ3H2AANcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkPQ3H2AANcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkPQ3H2AANcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkS55JFWDAcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkS55JFWDAcjs.buildToneLut; exports.builtinPattern = _chunkB46UQUDCcjs.builtinPattern; exports.builtinPatternIds = _chunkB46UQUDCcjs.builtinPatternIds; exports.bytesToBase64 = _chunkOLNIPTB3cjs.bytesToBase64; exports.calculateCropDrag = _chunkS55JFWDAcjs.calculateCropDrag; exports.canShareMemory = _chunkXFYLA3ZOcjs.canShareMemory; exports.canvasCompositeOperation = _chunkOLNIPTB3cjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkS55JFWDAcjs.canvasToImagePoint; exports.caretAt = _chunkQAUIZPYIcjs.caretAt; exports.changedTiles = _chunkB46UQUDCcjs.changedTiles; exports.channelThumbnail = channelThumbnail; exports.checkEffectAnimation = checkEffectAnimation; exports.checkEffectTime = checkEffectTime; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkS55JFWDAcjs.clampCropToImage; exports.cleanMixer = _chunkPQ3H2AANcjs.cleanMixer; exports.cloneSamplePoint = _chunkYF3YZZ6Gcjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunk474IQG74cjs.collectTiles; exports.colorBalanceChannel = _chunkS55JFWDAcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.colorRangePreset = colorRangePreset; exports.combineSelections = _chunkSS53NNZOcjs.combineSelections; exports.compareSelectionMasks = compareSelectionMasks; exports.compileAdjustmentLayer = _chunkS55JFWDAcjs.compileAdjustmentLayer; exports.componentPath = _chunkS55JFWDAcjs.componentPath; exports.componentsCoverage = _chunkS55JFWDAcjs.componentsCoverage; exports.compositeDeep = _chunkS55JFWDAcjs.compositeDeep; exports.compositeSurfaceOver = _chunkB46UQUDCcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkSS53NNZOcjs.computeSelectionBounds; exports.contentAwareFill = _chunkMQDIP4CFcjs.contentAwareFill; exports.contentBounds = _chunk474IQG74cjs.contentBounds; exports.contentsBox = _chunkS55JFWDAcjs.contentsBox; exports.contentsSurface = _chunkS55JFWDAcjs.contentsSurface; exports.contractCoverage = _chunkSS53NNZOcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkOLNIPTB3cjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkS55JFWDAcjs.convertToSmartObject; exports.copySmartObject = _chunkS55JFWDAcjs.copySmartObject; exports.cornersFromMatrix = _chunkS55JFWDAcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkPQ3H2AANcjs.coverageTileCoord; exports.coverageToByte = _chunkSS53NNZOcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkS55JFWDAcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkPQ3H2AANcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkQAUIZPYIcjs.createCanvasTextShaper; exports.createGradientSampler = createGradientSampler; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSegmentationToolProvider = createImageSegmentationToolProvider; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageSubjectSelectionTool = createImageSubjectSelectionTool; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkQAUIZPYIcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkQAUIZPYIcjs.createOutlineTextShaper; exports.createPigment = _chunkOLNIPTB3cjs.createPigment; exports.createPigmentTools = _chunkXFYLA3ZOcjs.createPigmentTools; exports.createSelectionMask = _chunkSS53NNZOcjs.createSelectionMask; exports.createShapeLayer = _chunkS55JFWDAcjs.createShapeLayer; exports.createTypeLayer = _chunkS55JFWDAcjs.createTypeLayer; exports.createWetGpuEngine = _chunkXFYLA3ZOcjs.createWetGpuEngine; exports.cssFont = _chunkQAUIZPYIcjs.cssFont; exports.cssFontFamily = _chunkQAUIZPYIcjs.cssFontFamily; exports.curveLut = _chunkB46UQUDCcjs.curveLut; exports.curveLutFromLevels = _chunkS55JFWDAcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkPQ3H2AANcjs.dabCoverage; exports.dabRect = _chunkPQ3H2AANcjs.dabRect; exports.decodeDeepSurface = _chunkS55JFWDAcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkS55JFWDAcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkS55JFWDAcjs.decodeLayerMask; exports.decodeMergedImage = _chunkS55JFWDAcjs.decodeMergedImage; exports.decodePlanes = _chunkS55JFWDAcjs.decodePlanes; exports.decodePng = _chunkOLNIPTB3cjs.decodePng; exports.decodePngDataUrl = _chunkS55JFWDAcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkSS53NNZOcjs.decodeSelectionRle; exports.decontaminateColors = _chunkSS53NNZOcjs.decontaminateColors; exports.deepBytes = _chunkOLNIPTB3cjs.deepBytes; exports.deepTile = _chunkOLNIPTB3cjs.deepTile; exports.defaultActiveLayerId = _chunkS55JFWDAcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkS55JFWDAcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkB46UQUDCcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkB46UQUDCcjs.defaultLayerEffect; exports.defaultShapeName = _chunkS55JFWDAcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkS55JFWDAcjs.depthMaskAlpha; exports.depthOf = _chunkOLNIPTB3cjs.depthOf; exports.depthRasterMask = _chunkS55JFWDAcjs.depthRasterMask; exports.describeChannel = describeChannel; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkS55JFWDAcjs.describeTransform; exports.deserializeChannels = deserializeChannels; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkS55JFWDAcjs.deserializeEffects; exports.deserializeLayer = _chunkS55JFWDAcjs.deserializeLayer; exports.deserializeLayers = _chunkS55JFWDAcjs.deserializeLayers; exports.deserializeMask = _chunkUC3PWFM3cjs.deserializeMask; exports.deserializePatterns = _chunkS55JFWDAcjs.deserializePatterns; exports.deserializeSelection = _chunkSS53NNZOcjs.deserializeSelection; exports.despillEdge = _chunkS55JFWDAcjs.despillEdge; exports.developFilter = _chunkS55JFWDAcjs.developFilter; exports.developFromAdjustments = _chunkS55JFWDAcjs.developFromAdjustments; exports.developTarget = _chunkS55JFWDAcjs.developTarget; exports.dexp = _chunkXFYLA3ZOcjs.dexp; exports.dilateMask = _chunkMQDIP4CFcjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkSS53NNZOcjs.distanceTransform; exports.dlog = _chunkXFYLA3ZOcjs.dlog; exports.documentContents = _chunkS55JFWDAcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunkYF3YZZ6Gcjs.dodgeBurn; exports.dodgeBurnCurve = _chunkYF3YZZ6Gcjs.dodgeBurnCurve; exports.downloadMaskImage = downloadMaskImage; exports.downloadPsd = downloadPsd; exports.dpow = _chunkXFYLA3ZOcjs.dpow; exports.dragWarpMeshPoint = _chunkQAUIZPYIcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkXFYLA3ZOcjs.dsincos; exports.duplicateLayer = _chunkS55JFWDAcjs.duplicateLayer; exports.edgeBits = _chunkXFYLA3ZOcjs.edgeBits; exports.edgeWidth = _chunkSS53NNZOcjs.edgeWidth; exports.effectColorHex = _chunkB46UQUDCcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectLayerTiming = effectLayerTiming; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkB46UQUDCcjs.effectReach; exports.effectiveLayerMask = _chunkS55JFWDAcjs.effectiveLayerMask; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkB46UQUDCcjs.effectsFingerprint; exports.effectsMargin = _chunkB46UQUDCcjs.effectsMargin; exports.effectsScale = _chunkB46UQUDCcjs.effectsScale; exports.ellipsePoints = _chunkUC3PWFM3cjs.ellipsePoints; exports.ellipseSelection = _chunkUC3PWFM3cjs.ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunk474IQG74cjs.emptySurface; exports.encodeDeepSurface = _chunkS55JFWDAcjs.encodeDeepSurface; exports.encodePng = _chunkOLNIPTB3cjs.encodePng; exports.encodeRle = _chunkS55JFWDAcjs.encodeRle; exports.encodeSelectionRle = _chunkSS53NNZOcjs.encodeSelectionRle; exports.encodeSurface = _chunkS55JFWDAcjs.encodeSurface; exports.evalWarpMesh = _chunkQAUIZPYIcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkS55JFWDAcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkPQ3H2AANcjs.exchangeRates; exports.expNeg = _chunkXFYLA3ZOcjs.expNeg; exports.expandCoverage = _chunkSS53NNZOcjs.expandCoverage; exports.exportPsd = _chunkS55JFWDAcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkSS53NNZOcjs.featherCoverage; exports.fillRect = _chunk474IQG74cjs.fillRect; exports.filmPixel = _chunkXFYLA3ZOcjs.filmPixel; exports.filmReflectance = _chunkXFYLA3ZOcjs.filmReflectance; exports.filterMaskCoverage = _chunkS55JFWDAcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkB46UQUDCcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findSky = _chunkUC3PWFM3cjs.findSky; exports.findSubject = _chunkUC3PWFM3cjs.findSubject; exports.findWebGpu = _chunkXFYLA3ZOcjs.findWebGpu; exports.finishTile = _chunk474IQG74cjs.finishTile; exports.fitParagraphRuns = _chunkQAUIZPYIcjs.fitParagraphRuns; exports.fitRuns = _chunkQAUIZPYIcjs.fitRuns; exports.flattenLayers = _chunkB46UQUDCcjs.flattenLayers; exports.flattenPath = _chunkS55JFWDAcjs.flattenPath; exports.flipCorners = _chunkS55JFWDAcjs.flipCorners; exports.flowField = _chunkXFYLA3ZOcjs.flowField; exports.focusArea = _chunkUC3PWFM3cjs.focusArea; exports.followLayerMove = _chunkS55JFWDAcjs.followLayerMove; exports.fontOf = _chunkQAUIZPYIcjs.fontOf; exports.forgetSelectAndMaskSettings = forgetSelectAndMaskSettings; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkSS53NNZOcjs.fullSelection; exports.gaussianBlur = _chunkK6PXS6DOcjs.gaussianBlur; exports.geometryHomography = _chunkS55JFWDAcjs.geometryHomography; exports.getAnnotationBounds = _chunkS55JFWDAcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkS55JFWDAcjs.getCropCursor; exports.getRotatedSize = _chunkS55JFWDAcjs.getRotatedSize; exports.getViewportMetrics = _chunkS55JFWDAcjs.getViewportMetrics; exports.getViewportProjection = _chunkS55JFWDAcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.grabCutLabels = _chunkUC3PWFM3cjs.grabCutLabels; exports.gradientDabColor = _chunkPQ3H2AANcjs.gradientDabColor; exports.grainCatch = _chunkPQ3H2AANcjs.grainCatch; exports.grainHeights = _chunkPQ3H2AANcjs.grainHeights; exports.greyMorphology = _chunkSS53NNZOcjs.greyMorphology; exports.groupLayers = _chunkS55JFWDAcjs.groupLayers; exports.growSelection = growSelection; exports.guidePlanes = _chunkSS53NNZOcjs.guidePlanes; exports.guidedFilterColor = _chunkSS53NNZOcjs.guidedFilterColor; exports.handleMaskViewKey = handleMaskViewKey; exports.handlePaintShortcut = handlePaintShortcut; exports.handleQuickMaskKey = handleQuickMaskKey; exports.handleSelectionShortcut = handleSelectionShortcut; exports.hasActiveEffects = _chunkB46UQUDCcjs.hasActiveEffects; exports.hasEdgeUnmix = _chunkS55JFWDAcjs.hasEdgeUnmix; exports.hasLayersBelow = hasLayersBelow; exports.hasResampledLegacyMask = _chunkS55JFWDAcjs.hasResampledLegacyMask; exports.hasSoftBand = _chunkS55JFWDAcjs.hasSoftBand; exports.hasSurface = _chunkS55JFWDAcjs.hasSurface; exports.hasWarp = _chunkS55JFWDAcjs.hasWarp; exports.hash2 = _chunkPQ3H2AANcjs.hash2; exports.hashMaskContent = _chunkSS53NNZOcjs.hashMaskContent; exports.hashNoise = _chunkB46UQUDCcjs.hashNoise; exports.healPixels = _chunkYF3YZZ6Gcjs.healPixels; exports.hexToPaintRgb = _chunkPQ3H2AANcjs.hexToPaintRgb; exports.hexToRgb = _chunkS55JFWDAcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkS55JFWDAcjs.hitTestAnnotation; exports.hitTestCrop = _chunkS55JFWDAcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkS55JFWDAcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkS55JFWDAcjs.hueRangeTables; exports.hueRangeWeight = _chunkS55JFWDAcjs.hueRangeWeight; exports.hueSaturation = _chunkS55JFWDAcjs.hueSaturation; exports.identityCurve = _chunkS55JFWDAcjs.identityCurve; exports.identityLevels = _chunkS55JFWDAcjs.identityLevels; exports.identityTransform = _chunkS55JFWDAcjs.identityTransform; exports.identityWarpMesh = _chunkQAUIZPYIcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePanelTool = imagePanelTool; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkS55JFWDAcjs.imageToCanvasPoint; exports.imageToolCanvasMode = imageToolCanvasMode; exports.imageToolForShortcut = imageToolForShortcut; exports.imageToolGroup = imageToolGroup; exports.imageToolLabel = imageToolLabel; exports.imageToolPanel = imageToolPanel; exports.importPsd = _chunkS55JFWDAcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkB46UQUDCcjs.insertLayer; exports.inspectMaskEdge = inspectMaskEdge; exports.instancesOf = _chunkS55JFWDAcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkS55JFWDAcjs.invertMatrix3; exports.invertSelection = _chunkSS53NNZOcjs.invertSelection; exports.isActiveFilter = _chunkS55JFWDAcjs.isActiveFilter; exports.isActiveVectorMask = _chunkS55JFWDAcjs.isActiveVectorMask; exports.isAdjustmentKind = _chunkS55JFWDAcjs.isAdjustmentKind; exports.isBitDepth = _chunkOLNIPTB3cjs.isBitDepth; exports.isBlendMode = _chunkOLNIPTB3cjs.isBlendMode; exports.isBrushstrokeBrush = _chunkPQ3H2AANcjs.isBrushstrokeBrush; exports.isColorRangePreset = isColorRangePreset; exports.isContentsDecoded = _chunkS55JFWDAcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkS55JFWDAcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkPQ3H2AANcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunkYF3YZZ6Gcjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkS55JFWDAcjs.isIdentityTransform; exports.isInterpolation = _chunkB46UQUDCcjs.isInterpolation; exports.isLayerEffectKind = _chunkB46UQUDCcjs.isLayerEffectKind; exports.isLayerLocked = _chunkB46UQUDCcjs.isLayerLocked; exports.isLegacyShape = _chunkS55JFWDAcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkS55JFWDAcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkOLNIPTB3cjs.isPainterlyBlendMode; exports.isPathEditTool = isPathEditTool; exports.isPng = _chunkOLNIPTB3cjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkS55JFWDAcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkS55JFWDAcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkSS53NNZOcjs.isSelectionEmpty; exports.isSelectionMode = _chunkSS53NNZOcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkOLNIPTB3cjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkS55JFWDAcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkS55JFWDAcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkS55JFWDAcjs.isTransformAnchor; exports.isValidWarp = _chunkS55JFWDAcjs.isValidWarp; exports.keepDeepSamples = _chunkOLNIPTB3cjs.keepDeepSamples; exports.keepMainPieces = _chunkUC3PWFM3cjs.keepMainPieces; exports.kelvinToTemperature = _chunkS55JFWDAcjs.kelvinToTemperature; exports.keysWeight = _chunkB46UQUDCcjs.keysWeight; exports.latticeViscosity = _chunkXFYLA3ZOcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkB46UQUDCcjs.layerEffectFields; exports.layerEffectLabel = _chunkB46UQUDCcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkS55JFWDAcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkS55JFWDAcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkS55JFWDAcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkS55JFWDAcjs.layerMaskKey; exports.layerMaskSelection = _chunkS55JFWDAcjs.layerMaskSelection; exports.layerMenu = layerMenu; exports.layerName = _chunkS55JFWDAcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerThumbnailClick = layerThumbnailClick; exports.layerTree = _chunkS55JFWDAcjs.layerTree; exports.layerTypeLabel = _chunkS55JFWDAcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkS55JFWDAcjs.layersFromLegacy; exports.layoutText = _chunkQAUIZPYIcjs.layoutText; exports.legacyAdjustmentLayer = _chunkS55JFWDAcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkS55JFWDAcjs.legacyMaskOf; exports.legacyView = _chunkS55JFWDAcjs.legacyView; exports.lerpPigment = _chunkOLNIPTB3cjs.lerpPigment; exports.lerpPigmentInto = _chunkOLNIPTB3cjs.lerpPigmentInto; exports.levelsValue = _chunkS55JFWDAcjs.levelsValue; exports.linearSrgbToXy = _chunkS55JFWDAcjs.linearSrgbToXy; exports.linearToSrgb = _chunkS55JFWDAcjs.linearToSrgb; exports.linearToSrgb8 = _chunkXFYLA3ZOcjs.linearToSrgb8; exports.liveComponent = _chunkS55JFWDAcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkS55JFWDAcjs.liveShapeSubpaths; exports.liveWire = liveWire; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkPQ3H2AANcjs.loadMixer; exports.loadOpenTypeFont = _chunkLCCMOWR7cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkXFYLA3ZOcjs.loadWetKernel; exports.luma = _chunkYF3YZZ6Gcjs.luma; exports.magicWand = magicWand; exports.magneticAnchorSpacing = magneticAnchorSpacing; exports.mapCropHandle = _chunkS55JFWDAcjs.mapCropHandle; exports.mapLayer = _chunkB46UQUDCcjs.mapLayer; exports.mapSubpaths = _chunkS55JFWDAcjs.mapSubpaths; exports.maskBounds = _chunkMQDIP4CFcjs.maskBounds; exports.maskCoverageOverCanvas = _chunkS55JFWDAcjs.maskCoverageOverCanvas; exports.maskFileName = maskFileName; exports.maskNameFromFile = maskNameFromFile; exports.maskSummary = maskSummary; exports.maskThumbnailClick = maskThumbnailClick; exports.matrixFromCorners = _chunkS55JFWDAcjs.matrixFromCorners; exports.matrixFromParams = _chunkS55JFWDAcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunkMQDIP4CFcjs.membraneFill; exports.mergeLayerEffect = _chunkB46UQUDCcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkS55JFWDAcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkPQ3H2AANcjs.mix32; exports.mixPigment8 = _chunkOLNIPTB3cjs.mixPigment8; exports.mixPigmentRgb = _chunkOLNIPTB3cjs.mixPigmentRgb; exports.mixPigments = _chunkOLNIPTB3cjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkPQ3H2AANcjs.mixerRates; exports.modifySelection = _chunkSS53NNZOcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkS55JFWDAcjs.moveLayer; exports.moveSmartFilter = _chunkS55JFWDAcjs.moveSmartFilter; exports.moveWetSnapshot = _chunkXFYLA3ZOcjs.moveWetSnapshot; exports.mulMatrix3 = _chunkS55JFWDAcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkS55JFWDAcjs.neutralHueRange; exports.newContentsId = _chunkS55JFWDAcjs.newContentsId; exports.newEffectId = _chunkB46UQUDCcjs.newEffectId; exports.newLayerId = _chunkS55JFWDAcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.newPathId = newPathId; exports.normalizeAdjustmentLayer = _chunkS55JFWDAcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkS55JFWDAcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkS55JFWDAcjs.normalizeAngle; exports.normalizeBlendMode = _chunkOLNIPTB3cjs.normalizeBlendMode; exports.normalizeBlender = _chunkPQ3H2AANcjs.normalizeBlender; exports.normalizeBrush = _chunkPQ3H2AANcjs.normalizeBrush; exports.normalizeFilter = _chunkS55JFWDAcjs.normalizeFilter; exports.normalizeFlow = _chunkXFYLA3ZOcjs.normalizeFlow; exports.normalizeHexColor = _chunkPQ3H2AANcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkB46UQUDCcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkS55JFWDAcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkS55JFWDAcjs.normalizeLiveShape; exports.normalizeMixer = _chunkPQ3H2AANcjs.normalizeMixer; exports.normalizePlacement = _chunkS55JFWDAcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkS55JFWDAcjs.normalizeProcessVersion; exports.normalizeRect = _chunkUC3PWFM3cjs.normalizeRect; exports.normalizeRefineEdgeParams = _chunkSS53NNZOcjs.normalizeRefineEdgeParams; exports.normalizeRetouch = _chunkYF3YZZ6Gcjs.normalizeRetouch; exports.normalizeShapePaint = _chunkS55JFWDAcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkS55JFWDAcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkS55JFWDAcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkPQ3H2AANcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkS55JFWDAcjs.normalizeSubpaths; exports.normalizeText = _chunkS55JFWDAcjs.normalizeText; exports.normalizeTilt = _chunkXFYLA3ZOcjs.normalizeTilt; exports.normalizeWetParams = _chunkXFYLA3ZOcjs.normalizeWetParams; exports.offsetLayer = _chunkS55JFWDAcjs.offsetLayer; exports.offsetShape = _chunkS55JFWDAcjs.offsetShape; exports.offsetSmartObject = _chunkS55JFWDAcjs.offsetSmartObject; exports.offsetVectorMask = _chunkS55JFWDAcjs.offsetVectorMask; exports.openMaskFile = openMaskFile; exports.openPsdFile = openPsdFile; exports.otsuThreshold = _chunkUC3PWFM3cjs.otsuThreshold; exports.packRgba = _chunk474IQG74cjs.packRgba; exports.packWetParams = _chunkXFYLA3ZOcjs.packWetParams; exports.paintGradientMappingFor = _chunkPQ3H2AANcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkPQ3H2AANcjs.paintPathStroke; exports.paintSourceColor = _chunkPQ3H2AANcjs.paintSourceColor; exports.paintSourceCss = _chunkPQ3H2AANcjs.paintSourceCss; exports.paragraphRanges = _chunkQAUIZPYIcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkS55JFWDAcjs.parseAdjustmentBlock; exports.parseBlend = _chunkS55JFWDAcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkOLNIPTB3cjs.parseDataUrl; exports.parseEffectColor = _chunkB46UQUDCcjs.parseEffectColor; exports.parseLfx2 = _chunkS55JFWDAcjs.parseLfx2; exports.parseLrfx = _chunkS55JFWDAcjs.parseLrfx; exports.parseOpenTypeFont = _chunkLCCMOWR7cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkPQ3H2AANcjs.parsePaintSource; exports.parsePatternBlock = _chunkS55JFWDAcjs.parsePatternBlock; exports.parseSelectionMode = _chunkSS53NNZOcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkS55JFWDAcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkS55JFWDAcjs.patchParagraphStyle; exports.patchTextStyle = _chunkS55JFWDAcjs.patchTextStyle; exports.pathAnchorCount = pathAnchorCount; exports.pathBounds = pathBounds; exports.pathStrokeCoverage = _chunkPQ3H2AANcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkPQ3H2AANcjs.pathStrokeDabs; exports.pathSvgData = pathSvgData; exports.pathToSelection = pathToSelection; exports.perDabStrength = _chunkYF3YZZ6Gcjs.perDabStrength; exports.photoFilterMatrix = _chunkS55JFWDAcjs.photoFilterMatrix; exports.pigment8 = _chunkOLNIPTB3cjs.pigment8; exports.pigmentColor = _chunkXFYLA3ZOcjs.pigmentColor; exports.pigmentOf = _chunkXFYLA3ZOcjs.pigmentOf; exports.pixelLayerBounds = _chunkS55JFWDAcjs.pixelLayerBounds; exports.pixelLayers = _chunkS55JFWDAcjs.pixelLayers; exports.pixelPigment = _chunkXFYLA3ZOcjs.pixelPigment; exports.placeContents = _chunkS55JFWDAcjs.placeContents; exports.placeLayer = _chunkS55JFWDAcjs.placeLayer; exports.placementAt = _chunkS55JFWDAcjs.placementAt; exports.placementBounds = _chunkS55JFWDAcjs.placementBounds; exports.placementGeometry = _chunkS55JFWDAcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.planOutlineTrace = planOutlineTrace; exports.pngDataUrl = _chunkOLNIPTB3cjs.pngDataUrl; exports.pointerPressure = _chunkXFYLA3ZOcjs.pointerPressure; exports.pointerStrokeSample = _chunkXFYLA3ZOcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkXFYLA3ZOcjs.pointerStrokeSamples; exports.polygonCoverage = _chunkUC3PWFM3cjs.polygonCoverage; exports.polygonCoverageBox = _chunkUC3PWFM3cjs.polygonCoverageBox; exports.polygonSelection = _chunkUC3PWFM3cjs.polygonSelection; exports.posterizeValue = _chunkS55JFWDAcjs.posterizeValue; exports.presetWarp = _chunkS55JFWDAcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkS55JFWDAcjs.projectImagePoint; exports.projectImageRect = _chunkS55JFWDAcjs.projectImageRect; exports.projectMaskCoverage = _chunkS55JFWDAcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkOLNIPTB3cjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkS55JFWDAcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkS55JFWDAcjs.psdToLayers; exports.pullWarpMesh = _chunkQAUIZPYIcjs.pullWarpMesh; exports.put255 = _chunkPQ3H2AANcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.quickSelectStroke = _chunkUC3PWFM3cjs.quickSelectStroke; exports.rand01 = _chunkPQ3H2AANcjs.rand01; exports.randSigned = _chunkPQ3H2AANcjs.randSigned; exports.rangeLightness = _chunkS55JFWDAcjs.rangeLightness; exports.rasterContents = _chunkS55JFWDAcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkS55JFWDAcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkS55JFWDAcjs.rasterizeCoverage; exports.rasterizeDab = _chunkPQ3H2AANcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkS55JFWDAcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkOLNIPTB3cjs.readDeepRegion; exports.readEdgeColor = _chunkS55JFWDAcjs.readEdgeColor; exports.readPaintSource = _chunkPQ3H2AANcjs.readPaintSource; exports.readPaths = readPaths; exports.readPixel = _chunk474IQG74cjs.readPixel; exports.readPsd = _chunkS55JFWDAcjs.readPsd; exports.readRegion = _chunk474IQG74cjs.readRegion; exports.readShapeComponents = _chunkS55JFWDAcjs.readShapeComponents; exports.readSourceRegion = _chunkYF3YZZ6Gcjs.readSourceRegion; exports.rectSelection = _chunkUC3PWFM3cjs.rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkB46UQUDCcjs.reduceSurface; exports.referencePoint = _chunkS55JFWDAcjs.referencePoint; exports.refineCoverage = _chunkSS53NNZOcjs.refineCoverage; exports.refineEdgeHalo = _chunkSS53NNZOcjs.refineEdgeHalo; exports.refineSelection = _chunkSS53NNZOcjs.refineSelection; exports.reflectanceToRgb = _chunkOLNIPTB3cjs.reflectanceToRgb; exports.removeAlpha = _chunkS55JFWDAcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkS55JFWDAcjs.removeLayer; exports.removeLayerEffect = _chunkS55JFWDAcjs.removeLayerEffect; exports.removeLayerFilter = _chunkS55JFWDAcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkPQ3H2AANcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkS55JFWDAcjs.removeSmartFilter; exports.renderBrushstroke = _chunkPQ3H2AANcjs.renderBrushstroke; exports.renderLayerEffects = _chunkB46UQUDCcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkS55JFWDAcjs.renderShape; exports.renderShapeRect = _chunkS55JFWDAcjs.renderShapeRect; exports.renderSmartObject = _chunkS55JFWDAcjs.renderSmartObject; exports.renderText = _chunkS55JFWDAcjs.renderText; exports.replaceContents = _chunkS55JFWDAcjs.replaceContents; exports.replaceTextRange = _chunkS55JFWDAcjs.replaceTextRange; exports.requireLayer = _chunkS55JFWDAcjs.requireLayer; exports.requireOperation = _chunkS55JFWDAcjs.requireOperation; exports.requireShapeLayer = _chunkS55JFWDAcjs.requireShapeLayer; exports.requireSmartObject = _chunkS55JFWDAcjs.requireSmartObject; exports.requireTypeLayer = _chunkS55JFWDAcjs.requireTypeLayer; exports.requireUnlocked = _chunkS55JFWDAcjs.requireUnlocked; exports.rerender = _chunkS55JFWDAcjs.rerender; exports.rerenderShape = _chunkS55JFWDAcjs.rerenderShape; exports.rerenderText = _chunkS55JFWDAcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkSS53NNZOcjs.resizeSelection; exports.resizeWarpMesh = _chunkQAUIZPYIcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkS55JFWDAcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkPQ3H2AANcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.resolveVectorMasks = _chunkS55JFWDAcjs.resolveVectorMasks; exports.restyleRange = _chunkQAUIZPYIcjs.restyleRange; exports.retouchFilter = _chunkYF3YZZ6Gcjs.retouchFilter; exports.reversePaintGradient = _chunkPQ3H2AANcjs.reversePaintGradient; exports.rgbToGray = _chunkS55JFWDAcjs.rgbToGray; exports.rgbToHsl = _chunkS55JFWDAcjs.rgbToHsl; exports.rgbToReflectance = _chunkOLNIPTB3cjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunkYF3YZZ6Gcjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkS55JFWDAcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkS55JFWDAcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.runSelectionJob = _chunkUC3PWFM3cjs.runSelectionJob; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkS55JFWDAcjs.sampleLut; exports.sampleToneLut = _chunkS55JFWDAcjs.sampleToneLut; exports.saturationOf = _chunkYF3YZZ6Gcjs.saturationOf; exports.scaleLayerEffect = _chunkB46UQUDCcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkPQ3H2AANcjs.scalePaintGradient; exports.seamlessClone = _chunkMQDIP4CFcjs.seamlessClone; exports.seedFromString = _chunkPQ3H2AANcjs.seedFromString; exports.segmentToSelection = segmentToSelection; exports.segmentationOutlines = segmentationOutlines; exports.segmentsToSelection = segmentsToSelection; exports.selectObjectIn = _chunkUC3PWFM3cjs.selectObjectIn; exports.selectSimilar = selectSimilar; exports.selectionArea = _chunkSS53NNZOcjs.selectionArea; exports.selectionDiffPixels = selectionDiffPixels; exports.selectionFromCoverage = _chunkSS53NNZOcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkSS53NNZOcjs.selectionFromPixels; exports.selectionFromRegion = _chunkSS53NNZOcjs.selectionFromRegion; exports.selectionFromTiles = _chunkSS53NNZOcjs.selectionFromTiles; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionOutlinePaths = selectionOutlinePaths; exports.selectionRing = selectionRing; exports.selectionToCoverage = _chunkSS53NNZOcjs.selectionToCoverage; exports.selectionToPixels = _chunkSS53NNZOcjs.selectionToPixels; exports.selectionToSubpaths = selectionToSubpaths; exports.selectionUncertainty = selectionUncertainty; exports.selectionValueAt = _chunkSS53NNZOcjs.selectionValueAt; exports.serializeChannels = serializeChannels; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkS55JFWDAcjs.serializeContents; exports.serializeEffects = _chunkS55JFWDAcjs.serializeEffects; exports.serializeLayer = _chunkS55JFWDAcjs.serializeLayer; exports.serializeLayers = _chunkS55JFWDAcjs.serializeLayers; exports.serializeLayersExternal = _chunkS55JFWDAcjs.serializeLayersExternal; exports.serializeMask = _chunkUC3PWFM3cjs.serializeMask; exports.serializePaths = serializePaths; exports.serializePatterns = _chunkS55JFWDAcjs.serializePatterns; exports.serializeSelection = _chunkSS53NNZOcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkS55JFWDAcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkS55JFWDAcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkS55JFWDAcjs.setLayerMask; exports.setLayerProperties = _chunkS55JFWDAcjs.setLayerProperties; exports.setLum = _chunkOLNIPTB3cjs.setLum; exports.setPigmentColor = _chunkOLNIPTB3cjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkS55JFWDAcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkS55JFWDAcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkS55JFWDAcjs.setSmartPlacement; exports.shadeTile = _chunkXFYLA3ZOcjs.shadeTile; exports.shapeAsPixelLayer = _chunkS55JFWDAcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkS55JFWDAcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkS55JFWDAcjs.shapeGeometryBounds; exports.shapeLayers = _chunkS55JFWDAcjs.shapeLayers; exports.shapeOutline = _chunkS55JFWDAcjs.shapeOutline; exports.shapeRenderClip = _chunkS55JFWDAcjs.shapeRenderClip; exports.shiftCoverage = _chunkSS53NNZOcjs.shiftCoverage; exports.simplifyPixelPath = simplifyPixelPath; exports.skinToneRange = skinToneRange; exports.slicSuperpixels = _chunkUC3PWFM3cjs.slicSuperpixels; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkS55JFWDAcjs.smartObjectLayers; exports.smoothCoverage = _chunkSS53NNZOcjs.smoothCoverage; exports.smoothPoints = _chunkPQ3H2AANcjs.smoothPoints; exports.smoothnessWeights = _chunkUC3PWFM3cjs.smoothnessWeights; exports.smudgeEffect = _chunkYF3YZZ6Gcjs.smudgeEffect; exports.snapPolygonToEdges = snapPolygonToEdges; exports.snapTo45 = snapTo45; exports.snapToEdge = snapToEdge; exports.softMaskToSelection = _chunkUC3PWFM3cjs.softMaskToSelection; exports.solidPaint = _chunkPQ3H2AANcjs.solidPaint; exports.solidSurface = _chunk474IQG74cjs.solidSurface; exports.solveMembrane = _chunkMQDIP4CFcjs.solveMembrane; exports.spliceRuns = _chunkQAUIZPYIcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunkYF3YZZ6Gcjs.sponge; exports.spongeEffect = _chunkYF3YZZ6Gcjs.spongeEffect; exports.spotHealPixels = _chunkYF3YZZ6Gcjs.spotHealPixels; exports.spotHealWindow = _chunkYF3YZZ6Gcjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkXFYLA3ZOcjs.srgbByteToLinear; exports.srgbDecode = _chunkOLNIPTB3cjs.srgbDecode; exports.srgbEncode = _chunkOLNIPTB3cjs.srgbEncode; exports.srgbToLinear = _chunkS55JFWDAcjs.srgbToLinear; exports.standardBlendMode = _chunkOLNIPTB3cjs.standardBlendMode; exports.startMarchingAnts = startMarchingAnts; exports.startSelectionWorker = _chunkUC3PWFM3cjs.startSelectionWorker; exports.stepSlotTs = _chunkXFYLA3ZOcjs.stepSlotTs; exports.strokeGrainCatch = _chunkPQ3H2AANcjs.strokeGrainCatch; exports.styleAt = _chunkQAUIZPYIcjs.styleAt; exports.subpathsToSvgPath = subpathsToSvgPath; exports.sumHistograms = sumHistograms; exports.superpixelSaliency = _chunkUC3PWFM3cjs.superpixelSaliency; exports.surfaceBytes = _chunk474IQG74cjs.surfaceBytes; exports.surfaceDepth = _chunkOLNIPTB3cjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkOLNIPTB3cjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunk474IQG74cjs.surfaceFromPixels; exports.surfacesEqual = _chunk474IQG74cjs.surfacesEqual; exports.tempTintToXy = _chunkS55JFWDAcjs.tempTintToXy; exports.temperatureToKelvin = _chunkS55JFWDAcjs.temperatureToKelvin; exports.textIndexAt = _chunkQAUIZPYIcjs.textIndexAt; exports.textMatrix = _chunkS55JFWDAcjs.textMatrix; exports.textOrientation = _chunkS55JFWDAcjs.textOrientation; exports.textOutlines = _chunkS55JFWDAcjs.textOutlines; exports.textRange = _chunkS55JFWDAcjs.textRange; exports.tileCoord = _chunk474IQG74cjs.tileCoord; exports.tileKey = _chunk474IQG74cjs.tileKey; exports.tileRect = _chunk474IQG74cjs.tileRect; exports.tileSamples = _chunkOLNIPTB3cjs.tileSamples; exports.tileSamples16 = _chunkOLNIPTB3cjs.tileSamples16; exports.tileSamples32 = _chunkOLNIPTB3cjs.tileSamples32; exports.tilesInRect = _chunk474IQG74cjs.tilesInRect; exports.tipFalloff = _chunkPQ3H2AANcjs.tipFalloff; exports.tipReach = _chunkPQ3H2AANcjs.tipReach; exports.tipShape = _chunkPQ3H2AANcjs.tipShape; exports.to16From32 = _chunkOLNIPTB3cjs.to16From32; exports.to16From8 = _chunkOLNIPTB3cjs.to16From8; exports.to32From16 = _chunkOLNIPTB3cjs.to32From16; exports.to32From8 = _chunkOLNIPTB3cjs.to32From8; exports.to8From16 = _chunkOLNIPTB3cjs.to8From16; exports.to8From32 = _chunkOLNIPTB3cjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkS55JFWDAcjs.toTextSpace; exports.toneCurve = _chunkS55JFWDAcjs.toneCurve; exports.toneLuts = _chunkS55JFWDAcjs.toneLuts; exports.toneOf = _chunkYF3YZZ6Gcjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkS55JFWDAcjs.transformHomography; exports.transformMap = _chunkS55JFWDAcjs.transformMap; exports.transformShapeComponents = _chunkS55JFWDAcjs.transformShapeComponents; exports.transformSurface = _chunkB46UQUDCcjs.transformSurface; exports.transformTypeLayer = _chunkS55JFWDAcjs.transformTypeLayer; exports.transformVectorMask = _chunkS55JFWDAcjs.transformVectorMask; exports.transformedBounds = _chunkB46UQUDCcjs.transformedBounds; exports.transformedBox = _chunkS55JFWDAcjs.transformedBox; exports.transformedPoint = _chunkS55JFWDAcjs.transformedPoint; exports.translateLayer = _chunkS55JFWDAcjs.translateLayer; exports.translateSurface = _chunk474IQG74cjs.translateSurface; exports.typeAsPixelLayer = _chunkS55JFWDAcjs.typeAsPixelLayer; exports.typeFrame = _chunkS55JFWDAcjs.typeFrame; exports.typeFromAnnotation = _chunkS55JFWDAcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkS55JFWDAcjs.typeLayerName; exports.ungroupLayer = _chunkS55JFWDAcjs.ungroupLayer; exports.uniformTile = _chunk474IQG74cjs.uniformTile; exports.unionRect = _chunkS55JFWDAcjs.unionRect; exports.unprojectCanvasPoint = _chunkS55JFWDAcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkS55JFWDAcjs.updateLayerEffect; exports.updateLayerFilter = _chunkS55JFWDAcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkS55JFWDAcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkPQ3H2AANcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkS55JFWDAcjs.updateShapeLayer; exports.updateSmartFilter = _chunkS55JFWDAcjs.updateSmartFilter; exports.updateTypeLayer = _chunkS55JFWDAcjs.updateTypeLayer; exports.upscaleRegion = _chunkUC3PWFM3cjs.upscaleRegion; exports.userErrorMessage = _chunkS55JFWDAcjs.userErrorMessage; exports.uvToXy = _chunkS55JFWDAcjs.uvToXy; exports.validateEffectGradient = _chunkB46UQUDCcjs.validateEffectGradient; exports.validateLayerEffect = _chunkB46UQUDCcjs.validateLayerEffect; exports.validateLayerEffects = _chunkB46UQUDCcjs.validateLayerEffects; exports.vectorMaskBounds = _chunkS55JFWDAcjs.vectorMaskBounds; exports.vectorMaskCoverage = _chunkS55JFWDAcjs.vectorMaskCoverage; exports.vectorMaskThumbnail = _chunkS55JFWDAcjs.vectorMaskThumbnail; exports.vectorMaskThumbnailClick = vectorMaskThumbnailClick; exports.versionedDescriptorBytes = _chunkS55JFWDAcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkS55JFWDAcjs.vibranceLinear; exports.vibrancePixel = _chunkS55JFWDAcjs.vibrancePixel; exports.walkDabs = _chunkPQ3H2AANcjs.walkDabs; exports.warpMeshEditPoints = _chunkQAUIZPYIcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkQAUIZPYIcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkQAUIZPYIcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkQAUIZPYIcjs.warpPresetMesh; exports.warpSurface = _chunkB46UQUDCcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkS55JFWDAcjs.wbMatrix; exports.wetGpuSupport = _chunkXFYLA3ZOcjs.wetGpuSupport; exports.wetSimdSupported = _chunkXFYLA3ZOcjs.wetSimdSupported; exports.wetSupport = _chunkXFYLA3ZOcjs.wetSupport; exports.whiteBalanceFromSample = _chunkS55JFWDAcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkS55JFWDAcjs.whiteBalanceMatrix; exports.withBackgroundOpacity = withBackgroundOpacity; exports.withFilterMaskSurface = _chunkS55JFWDAcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkS55JFWDAcjs.withNewIds; exports.workImage = _chunkUC3PWFM3cjs.workImage; exports.workLuma = _chunkUC3PWFM3cjs.workLuma; exports.workPlanes = _chunkUC3PWFM3cjs.workPlanes; exports.writeAdjustmentBlock = _chunkS55JFWDAcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkOLNIPTB3cjs.writeDeepRegion; exports.writeLfx2 = _chunkS55JFWDAcjs.writeLfx2; exports.writePatternBlock = _chunkS55JFWDAcjs.writePatternBlock; exports.writePsd = _chunkS55JFWDAcjs.writePsd; exports.writeRegion = _chunk474IQG74cjs.writeRegion; exports.xyToTempTint = _chunkS55JFWDAcjs.xyToTempTint; exports.xyToUv = _chunkS55JFWDAcjs.xyToUv;