@pixerate/editor 0.116.0 → 0.117.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (61) hide show
  1. package/dist/{chunk-ZYZGEILO.cjs → chunk-2J3LS7JZ.cjs} +203 -203
  2. package/dist/{chunk-ZYZGEILO.cjs.map → chunk-2J3LS7JZ.cjs.map} +1 -1
  3. package/dist/{chunk-TFOPHZ3U.cjs → chunk-7ISPWEJA.cjs} +302 -5
  4. package/dist/chunk-7ISPWEJA.cjs.map +1 -0
  5. package/dist/{chunk-2UT4GXYA.cjs → chunk-BYAWOAST.cjs} +109 -41
  6. package/dist/chunk-BYAWOAST.cjs.map +1 -0
  7. package/dist/{chunk-PAOWHJ5O.cjs → chunk-EBSYZRSW.cjs} +217 -400
  8. package/dist/chunk-EBSYZRSW.cjs.map +1 -0
  9. package/dist/{chunk-XK5LZKBD.js → chunk-HKDTM6VC.js} +298 -1
  10. package/dist/chunk-HKDTM6VC.js.map +1 -0
  11. package/dist/{chunk-D53VQGEJ.js → chunk-IVSNUXW7.js} +79 -2
  12. package/dist/chunk-IVSNUXW7.js.map +1 -0
  13. package/dist/{chunk-ARQ7PQ6Q.js → chunk-JHXMNOMF.js} +71 -3
  14. package/dist/chunk-JHXMNOMF.js.map +1 -0
  15. package/dist/{chunk-HOCPSFGA.cjs → chunk-L2T6EJ5S.cjs} +154 -77
  16. package/dist/chunk-L2T6EJ5S.cjs.map +1 -0
  17. package/dist/{chunk-SEBYNBHW.js → chunk-R2JE6SA7.js} +9 -9
  18. package/dist/{chunk-D53KSJUV.js → chunk-VD2UDVF7.js} +100 -283
  19. package/dist/chunk-VD2UDVF7.js.map +1 -0
  20. package/dist/{export-BXxSGBCq.d.cts → export-DMOuzgZZ.d.cts} +8 -3
  21. package/dist/{export-Dm44YUvS.d.ts → export-Dul1SbPv.d.ts} +8 -3
  22. package/dist/{flow-COCB42TP.d.cts → flow-4-OC-UkQ.d.cts} +22 -1
  23. package/dist/{flow-BMtHAmg4.d.ts → flow-Cb7lkPm8.d.ts} +22 -1
  24. package/dist/image-editor/index.cjs +1112 -1024
  25. package/dist/image-editor/index.cjs.map +1 -1
  26. package/dist/image-editor/index.d.cts +6 -6
  27. package/dist/image-editor/index.d.ts +6 -6
  28. package/dist/image-editor/index.js +124 -36
  29. package/dist/image-editor/index.js.map +1 -1
  30. package/dist/paint/index.cjs +8 -4
  31. package/dist/paint/index.cjs.map +1 -1
  32. package/dist/paint/index.d.cts +2 -2
  33. package/dist/paint/index.d.ts +2 -2
  34. package/dist/paint/index.js +7 -3
  35. package/dist/paint-editor/index.cjs +242 -242
  36. package/dist/paint-editor/index.d.cts +4 -4
  37. package/dist/paint-editor/index.d.ts +4 -4
  38. package/dist/paint-editor/index.js +4 -4
  39. package/dist/raster/index.cjs +6 -4
  40. package/dist/raster/index.cjs.map +1 -1
  41. package/dist/raster/index.d.cts +2 -2
  42. package/dist/raster/index.d.ts +2 -2
  43. package/dist/raster/index.js +27 -25
  44. package/dist/{render-CrmHOgpo.d.ts → render-B05K68_h.d.ts} +9 -1
  45. package/dist/{render-B1K_OoLy.d.cts → render-DnAbIKcs.d.cts} +9 -1
  46. package/dist/vector/index.cjs +11272 -10183
  47. package/dist/vector/index.cjs.map +1 -1
  48. package/dist/vector/index.d.cts +135 -1
  49. package/dist/vector/index.d.ts +135 -1
  50. package/dist/vector/index.js +11179 -10090
  51. package/dist/vector/index.js.map +1 -1
  52. package/package.json +1 -1
  53. package/dist/chunk-2UT4GXYA.cjs.map +0 -1
  54. package/dist/chunk-ARQ7PQ6Q.js.map +0 -1
  55. package/dist/chunk-D53KSJUV.js.map +0 -1
  56. package/dist/chunk-D53VQGEJ.js.map +0 -1
  57. package/dist/chunk-HOCPSFGA.cjs.map +0 -1
  58. package/dist/chunk-PAOWHJ5O.cjs.map +0 -1
  59. package/dist/chunk-TFOPHZ3U.cjs.map +0 -1
  60. package/dist/chunk-XK5LZKBD.js.map +0 -1
  61. /package/dist/{chunk-SEBYNBHW.js.map → chunk-R2JE6SA7.js.map} +0 -0
@@ -34,11 +34,11 @@
34
34
 
35
35
 
36
36
 
37
+ var _chunkEBSYZRSWcjs = require('./chunk-EBSYZRSW.cjs');
37
38
 
38
39
 
39
40
 
40
41
 
41
- var _chunkPAOWHJ5Ocjs = require('./chunk-PAOWHJ5O.cjs');
42
42
 
43
43
 
44
44
 
@@ -50,11 +50,11 @@ var _chunkPAOWHJ5Ocjs = require('./chunk-PAOWHJ5O.cjs');
50
50
 
51
51
 
52
52
 
53
+ var _chunkEJVDBITDcjs = require('./chunk-EJVDBITD.cjs');
53
54
 
54
55
 
55
56
 
56
57
 
57
- var _chunkEJVDBITDcjs = require('./chunk-EJVDBITD.cjs');
58
58
 
59
59
 
60
60
 
@@ -71,7 +71,7 @@ var _chunkEJVDBITDcjs = require('./chunk-EJVDBITD.cjs');
71
71
 
72
72
 
73
73
 
74
- var _chunkTFOPHZ3Ucjs = require('./chunk-TFOPHZ3U.cjs');
74
+ var _chunk7ISPWEJAcjs = require('./chunk-7ISPWEJA.cjs');
75
75
 
76
76
 
77
77
 
@@ -1137,7 +1137,7 @@ function smoothCoverage(m, w, h, r) {
1137
1137
  return src;
1138
1138
  }
1139
1139
  function featherCoverage(m, w, h, radius) {
1140
- const out = _chunkPAOWHJ5Ocjs.gaussianBlur.call(void 0, m, w, h, Number.isFinite(radius) ? Math.max(0, radius) : 0, "zero");
1140
+ const out = _chunkEBSYZRSWcjs.gaussianBlur.call(void 0, m, w, h, Number.isFinite(radius) ? Math.max(0, radius) : 0, "zero");
1141
1141
  for (let i = 0; i < out.length; i++) if (Math.abs(out[i]) < 1e-7) out[i] = 0;
1142
1142
  return out;
1143
1143
  }
@@ -1285,7 +1285,7 @@ function layerMaskCoverage(mask) {
1285
1285
  let v = new Float32Array(sel.data.length);
1286
1286
  for (let i = 0; i < v.length; i++) v[i] = sel.data[i] / 255;
1287
1287
  const feather = _nullishCoalesce(mask.feather, () => ( 0));
1288
- if (feather > 0) v = _chunkPAOWHJ5Ocjs.gaussianBlur.call(void 0, v, mask.width, mask.height, feather, "clamp");
1288
+ if (feather > 0) v = _chunkEBSYZRSWcjs.gaussianBlur.call(void 0, v, mask.width, mask.height, feather, "clamp");
1289
1289
  const density = _nullishCoalesce(mask.density, () => ( 1));
1290
1290
  if (density !== 1) for (let i = 0; i < v.length; i++) v[i] = 1 - density * (1 - v[i]);
1291
1291
  return v;
@@ -1506,7 +1506,7 @@ function normalizeAdjustmentLayer(raw) {
1506
1506
  kind: r.kind,
1507
1507
  enabled: r.enabled !== false,
1508
1508
  opacity: clampTo(r.opacity, 0, 1, 1),
1509
- blend: _chunkTFOPHZ3Ucjs.normalizeBlendMode.call(void 0, r.blend),
1509
+ blend: _chunk7ISPWEJAcjs.normalizeBlendMode.call(void 0, r.blend),
1510
1510
  params: normParams(r.kind, r.params)
1511
1511
  };
1512
1512
  if (typeof r.name === "string" && r.name) layer.name = r.name;
@@ -1528,7 +1528,7 @@ function normalizeAdjustmentLayers(raw) {
1528
1528
  return out;
1529
1529
  }
1530
1530
  function curveLutFromLevels(points) {
1531
- return _chunkPAOWHJ5Ocjs.curveLut.call(void 0, points.map((p) => ({ input: p.input / 255, output: p.output / 255 })));
1531
+ return _chunkEBSYZRSWcjs.curveLut.call(void 0, points.map((p) => ({ input: p.input / 255, output: p.output / 255 })));
1532
1532
  }
1533
1533
  var toUnitLevels = (c) => ({
1534
1534
  inBlack: c.inBlack / 255,
@@ -1852,7 +1852,7 @@ function compileAdjustmentLayer(layer, options = {}) {
1852
1852
  return (c) => {
1853
1853
  const g = blackWhiteGray(c, weights);
1854
1854
  if (tint) {
1855
- const t = _chunkTFOPHZ3Ucjs.setLum.call(void 0, tint, g);
1855
+ const t = _chunk7ISPWEJAcjs.setLum.call(void 0, tint, g);
1856
1856
  c[0] = clamp01(t[0]);
1857
1857
  c[1] = clamp01(t[1]);
1858
1858
  c[2] = clamp01(t[2]);
@@ -1871,7 +1871,7 @@ function compileAdjustmentLayer(layer, options = {}) {
1871
1871
  let f = [0, 1, 2].map((r) => linearToSrgb(Math.max(0, m[r][0] * l[0] + m[r][1] * l[1] + m[r][2] * l[2])));
1872
1872
  if (preserve) {
1873
1873
  const target = 0.3 * c[0] + 0.59 * c[1] + 0.11 * c[2];
1874
- f = _chunkTFOPHZ3Ucjs.setLum.call(void 0, f, target);
1874
+ f = _chunk7ISPWEJAcjs.setLum.call(void 0, f, target);
1875
1875
  }
1876
1876
  c[0] = clamp01(f[0]);
1877
1877
  c[1] = clamp01(f[1]);
@@ -1938,10 +1938,10 @@ function applyLayer(c, layer, op, coverage = 1) {
1938
1938
  const cb0 = c[0], cb1 = c[1], cb2 = c[2];
1939
1939
  op(c);
1940
1940
  if (blend === "pigment") {
1941
- _chunkTFOPHZ3Ucjs.mixPigmentRgb.call(void 0, [clamp01(cb0), clamp01(cb1), clamp01(cb2)], [clamp01(c[0]), clamp01(c[1]), clamp01(c[2])], alpha, c);
1941
+ _chunk7ISPWEJAcjs.mixPigmentRgb.call(void 0, [clamp01(cb0), clamp01(cb1), clamp01(cb2)], [clamp01(c[0]), clamp01(c[1]), clamp01(c[2])], alpha, c);
1942
1942
  return;
1943
1943
  }
1944
- const b = blend === "normal" ? c : _chunkTFOPHZ3Ucjs.blendRgb.call(void 0, blend, [cb0, cb1, cb2], c);
1944
+ const b = blend === "normal" ? c : _chunk7ISPWEJAcjs.blendRgb.call(void 0, blend, [cb0, cb1, cb2], c);
1945
1945
  c[0] = (1 - alpha) * cb0 + alpha * b[0];
1946
1946
  c[1] = (1 - alpha) * cb1 + alpha * b[1];
1947
1947
  c[2] = (1 - alpha) * cb2 + alpha * b[2];
@@ -2282,7 +2282,7 @@ function newLayerId(prefix = "layer") {
2282
2282
  return `${prefix}_${Date.now().toString(36)}_${(++idCounter).toString(36)}`;
2283
2283
  }
2284
2284
  function pixelLayers(layers) {
2285
- return _chunkPAOWHJ5Ocjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "pixel");
2285
+ return _chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "pixel");
2286
2286
  }
2287
2287
  function developFilter(layer) {
2288
2288
  return _optionalChain([layer, 'access', _10 => _10.filters, 'optionalAccess', _11 => _11.find, 'call', _12 => _12((f) => f.kind === "develop")]);
@@ -2313,10 +2313,10 @@ function isRenderedLayer(layer) {
2313
2313
  return layer.type === "smart" || layer.type === "shape" || layer.type === "type";
2314
2314
  }
2315
2315
  function shapeLayers(layers) {
2316
- return _chunkPAOWHJ5Ocjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "shape");
2316
+ return _chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "shape");
2317
2317
  }
2318
2318
  function smartObjectLayers(layers) {
2319
- return _chunkPAOWHJ5Ocjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "smart");
2319
+ return _chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "smart");
2320
2320
  }
2321
2321
 
2322
2322
  // src/image-editor/layers/compositor.ts
@@ -2422,13 +2422,13 @@ var PHOTO_PROFILE = {
2422
2422
  return v;
2423
2423
  }
2424
2424
  };
2425
- var LayerCompositor = class extends _chunkPAOWHJ5Ocjs.RasterCompositor {
2425
+ var LayerCompositor = class extends _chunkEBSYZRSWcjs.RasterCompositor {
2426
2426
  constructor(options = {}) {
2427
2427
  super(PHOTO_PROFILE, options);
2428
2428
  }
2429
2429
  };
2430
2430
  function compositeDeep(layers, rect, sources, depth) {
2431
- const deep = new (0, _chunkPAOWHJ5Ocjs.DeepCompositor)(new LayerCompositor(), PHOTO_PROFILE, {
2431
+ const deep = new (0, _chunkEBSYZRSWcjs.DeepCompositor)(new LayerCompositor(), PHOTO_PROFILE, {
2432
2432
  applyFilterRunDeep: (run, acc, _r, masks) => applyAdjustmentLayersFloat(acc, run.map(adjustmentNodeAsLayer), masks)
2433
2433
  }, depth);
2434
2434
  return deep.composite(layers, rect, sources);
@@ -2974,47 +2974,47 @@ var fail = (message) => {
2974
2974
  throw new LayerOperationError(message);
2975
2975
  };
2976
2976
  function requireLayer(layers, id) {
2977
- const loc = _chunkPAOWHJ5Ocjs.findLayer.call(void 0, layers, id);
2977
+ const loc = _chunkEBSYZRSWcjs.findLayer.call(void 0, layers, id);
2978
2978
  if (!loc) {
2979
- const ids = _chunkPAOWHJ5Ocjs.flattenLayers.call(void 0, layers).map((l) => l.id);
2979
+ const ids = _chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers).map((l) => l.id);
2980
2980
  fail(`Unknown layer "${id}". ${ids.length ? `Layers: ${ids.join(", ")}.` : "The document has no layers."} Call list_layers for ids.`);
2981
2981
  }
2982
2982
  return loc;
2983
2983
  }
2984
2984
  function requireUnlocked(layer, what, action) {
2985
- if (_chunkPAOWHJ5Ocjs.isLayerLocked.call(void 0, layer, "all")) fail(`Layer "${layer.name || layer.id}" is locked (all); unlock it before you ${action}.`);
2986
- if (what !== "all" && _chunkPAOWHJ5Ocjs.isLayerLocked.call(void 0, layer, what)) fail(`Layer "${layer.name || layer.id}" has its ${what} locked; unlock it before you ${action}.`);
2985
+ if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, layer, "all")) fail(`Layer "${layer.name || layer.id}" is locked (all); unlock it before you ${action}.`);
2986
+ if (what !== "all" && _chunkEBSYZRSWcjs.isLayerLocked.call(void 0, layer, what)) fail(`Layer "${layer.name || layer.id}" has its ${what} locked; unlock it before you ${action}.`);
2987
2987
  }
2988
2988
  function placeLayer(layers, layer, placement = {}, defaultIndex) {
2989
2989
  const given = [placement.aboveId, placement.belowId, placement.parentId].filter((v) => v !== void 0).length;
2990
2990
  if (given > 1) fail("Give only one of aboveId, belowId and parentId.");
2991
2991
  if (placement.aboveId || placement.belowId) {
2992
2992
  const ref = requireLayer(layers, _nullishCoalesce(placement.aboveId, () => ( placement.belowId)));
2993
- return _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, layers, layer, _nullishCoalesce(_optionalChain([ref, 'access', _21 => _21.parent, 'optionalAccess', _22 => _22.id]), () => ( null)), ref.index + (placement.aboveId ? 1 : 0));
2993
+ return _chunkEBSYZRSWcjs.insertLayer.call(void 0, layers, layer, _nullishCoalesce(_optionalChain([ref, 'access', _21 => _21.parent, 'optionalAccess', _22 => _22.id]), () => ( null)), ref.index + (placement.aboveId ? 1 : 0));
2994
2994
  }
2995
2995
  if (placement.parentId) {
2996
2996
  const ref = requireLayer(layers, placement.parentId);
2997
2997
  if (ref.layer.type !== "group") fail(`Layer "${placement.parentId}" is not a group; parentId must be a group id.`);
2998
- return _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, layers, layer, ref.layer.id, placement.index);
2998
+ return _chunkEBSYZRSWcjs.insertLayer.call(void 0, layers, layer, ref.layer.id, placement.index);
2999
2999
  }
3000
- return _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, layers, layer, null, _nullishCoalesce(placement.index, () => ( defaultIndex)));
3000
+ return _chunkEBSYZRSWcjs.insertLayer.call(void 0, layers, layer, null, _nullishCoalesce(placement.index, () => ( defaultIndex)));
3001
3001
  }
3002
3002
  function removeLayer(layers, id) {
3003
3003
  const loc = requireLayer(layers, id);
3004
3004
  requireUnlocked(loc.layer, "all", "delete it");
3005
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => null);
3005
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => null);
3006
3006
  }
3007
3007
  function moveLayer(layers, id, placement) {
3008
3008
  const loc = requireLayer(layers, id);
3009
3009
  requireUnlocked(loc.layer, "all", "move it");
3010
3010
  const target = _nullishCoalesce(_nullishCoalesce(placement.aboveId, () => ( placement.belowId)), () => ( placement.parentId));
3011
3011
  if (target === id) fail("A layer cannot be placed relative to itself.");
3012
- if (target && loc.layer.type === "group" && _chunkPAOWHJ5Ocjs.flattenLayers.call(void 0, loc.layer.children).some((l) => l.id === target)) {
3012
+ if (target && loc.layer.type === "group" && _chunkEBSYZRSWcjs.flattenLayers.call(void 0, loc.layer.children).some((l) => l.id === target)) {
3013
3013
  fail(`Group "${id}" cannot be moved into its own child "${target}".`);
3014
3014
  }
3015
3015
  if (target) requireLayer(layers, target);
3016
3016
  if (!target && placement.index === void 0) fail("Give aboveId, belowId, parentId or index.");
3017
- const without = _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => null);
3017
+ const without = _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => null);
3018
3018
  return placeLayer(without, loc.layer, placement);
3019
3019
  }
3020
3020
  function withNewIds(layer) {
@@ -3033,7 +3033,7 @@ function duplicateLayer(layers, id, name) {
3033
3033
  const copy = withNewIds(loc.layer);
3034
3034
  copy.name = _nullishCoalesce(name, () => ( `${loc.layer.name || "Layer"} copy`));
3035
3035
  delete copy.locks;
3036
- return { layers: _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _25 => _25.parent, 'optionalAccess', _26 => _26.id]), () => ( null)), loc.index + 1), id: copy.id };
3036
+ return { layers: _chunkEBSYZRSWcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _25 => _25.parent, 'optionalAccess', _26 => _26.id]), () => ( null)), loc.index + 1), id: copy.id };
3037
3037
  }
3038
3038
  function setLayerProperties(layers, id, props) {
3039
3039
  const loc = requireLayer(layers, id);
@@ -3060,7 +3060,7 @@ function setLayerProperties(layers, id, props) {
3060
3060
  if (props.blend !== void 0) {
3061
3061
  if (props.blend === "pass-through") {
3062
3062
  if (layer.type !== "group") fail("pass-through is only for groups.");
3063
- } else if (!_chunkTFOPHZ3Ucjs.isBlendMode.call(void 0, props.blend)) fail(`Unknown blend mode "${props.blend}".`);
3063
+ } else if (!_chunk7ISPWEJAcjs.isBlendMode.call(void 0, props.blend)) fail(`Unknown blend mode "${props.blend}".`);
3064
3064
  next.blend = props.blend;
3065
3065
  }
3066
3066
  if (props.clipped !== void 0) {
@@ -3080,7 +3080,7 @@ function setLayerProperties(layers, id, props) {
3080
3080
  if (props.collapsed) g.collapsed = true;
3081
3081
  else delete g.collapsed;
3082
3082
  }
3083
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next);
3083
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next);
3084
3084
  }
3085
3085
  function groupLayers(layers, ids, name = "Group") {
3086
3086
  if (!ids.length) fail("Give at least one layer id to group.");
@@ -3109,17 +3109,17 @@ function groupLayers(layers, ids, name = "Group") {
3109
3109
  group.children[0] = c;
3110
3110
  }
3111
3111
  let out = layers;
3112
- for (const l of ordered) out = _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, out, l.layer.id, () => null);
3113
- return { layers: _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, out, group, parent, top - below), id: group.id };
3112
+ for (const l of ordered) out = _chunkEBSYZRSWcjs.mapLayer.call(void 0, out, l.layer.id, () => null);
3113
+ return { layers: _chunkEBSYZRSWcjs.insertLayer.call(void 0, out, group, parent, top - below), id: group.id };
3114
3114
  }
3115
3115
  function ungroupLayer(layers, id) {
3116
3116
  const loc = requireLayer(layers, id);
3117
3117
  if (loc.layer.type !== "group") fail(`Layer "${id}" is not a group.`);
3118
3118
  requireUnlocked(loc.layer, "all", "ungroup it");
3119
3119
  const group = loc.layer;
3120
- let out = _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => null);
3120
+ let out = _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => null);
3121
3121
  group.children.forEach((c, i) => {
3122
- out = _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, out, c, _nullishCoalesce(_optionalChain([loc, 'access', _35 => _35.parent, 'optionalAccess', _36 => _36.id]), () => ( null)), loc.index + i);
3122
+ out = _chunkEBSYZRSWcjs.insertLayer.call(void 0, out, c, _nullishCoalesce(_optionalChain([loc, 'access', _35 => _35.parent, 'optionalAccess', _36 => _36.id]), () => ( null)), loc.index + i);
3123
3123
  });
3124
3124
  return { layers: out, ids: group.children.map((c) => c.id) };
3125
3125
  }
@@ -3132,14 +3132,14 @@ function offsetLayer(layers, id, offset) {
3132
3132
  const next = { ...layer, offset: { x: Math.round(offset.x), y: Math.round(offset.y) } };
3133
3133
  const mask = layer.mask;
3134
3134
  if (mask && mask.linked === false && !mask.source) {
3135
- next.mask = { ...mask, surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, mask.surface, layer.offset.x - next.offset.x, layer.offset.y - next.offset.y) };
3135
+ next.mask = { ...mask, surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, mask.surface, layer.offset.x - next.offset.x, layer.offset.y - next.offset.y) };
3136
3136
  }
3137
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next);
3137
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next);
3138
3138
  }
3139
3139
  function setLayerMask(layers, id, mask) {
3140
3140
  const loc = requireLayer(layers, id);
3141
3141
  requireUnlocked(loc.layer, "all", "change its mask");
3142
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, (l) => {
3142
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, (l) => {
3143
3143
  const next = { ...l };
3144
3144
  if (mask) next.mask = mask;
3145
3145
  else delete next.mask;
@@ -3178,7 +3178,7 @@ function requirePixelLayer(layers, id) {
3178
3178
  function addLayerFilter(layers, id, filter) {
3179
3179
  const layer = requirePixelLayer(layers, id);
3180
3180
  if (_optionalChain([layer, 'access', _37 => _37.filters, 'optionalAccess', _38 => _38.some, 'call', _39 => _39((f) => f.kind === filter.kind)])) fail(`Layer "${id}" already has a ${filter.kind} filter; change it with update_layer_filter.`);
3181
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters: [..._nullishCoalesce(layer.filters, () => ( [])), filter] }));
3181
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters: [..._nullishCoalesce(layer.filters, () => ( [])), filter] }));
3182
3182
  }
3183
3183
  function updateLayerFilter(layers, id, filterId, changes) {
3184
3184
  const layer = requirePixelLayer(layers, id);
@@ -3189,7 +3189,7 @@ function updateLayerFilter(layers, id, filterId, changes) {
3189
3189
  const merged2 = normalizeFilter({ ...current, ...changes, kind: current.kind }, current.id);
3190
3190
  const filters = [...layer.filters];
3191
3191
  filters[i] = merged2;
3192
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters }));
3192
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => ({ ...layer, filters }));
3193
3193
  }
3194
3194
  function removeLayerFilter(layers, id, filterId) {
3195
3195
  const layer = requirePixelLayer(layers, id);
@@ -3198,7 +3198,7 @@ function removeLayerFilter(layers, id, filterId) {
3198
3198
  const next = { ...layer };
3199
3199
  if (filters.length) next.filters = filters;
3200
3200
  else delete next.filters;
3201
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next);
3201
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next);
3202
3202
  }
3203
3203
  function requireEffectLayer(layers, id, action) {
3204
3204
  const layer = requireLayer(layers, id).layer;
@@ -3213,7 +3213,7 @@ function guard(fn) {
3213
3213
  try {
3214
3214
  return fn();
3215
3215
  } catch (e) {
3216
- if (e instanceof _chunkPAOWHJ5Ocjs.LayerEffectError) fail(e.message);
3216
+ if (e instanceof _chunkEBSYZRSWcjs.LayerEffectError) fail(e.message);
3217
3217
  throw e;
3218
3218
  }
3219
3219
  }
@@ -3221,20 +3221,20 @@ function setLayerEffects(layers, id, effects) {
3221
3221
  const layer = requireEffectLayer(layers, id, "change its effects");
3222
3222
  const next = { ...layer };
3223
3223
  if (effects && (effects.items.length || effects.psd || effects.scale !== void 0 || !effects.enabled)) {
3224
- guard(() => _chunkPAOWHJ5Ocjs.validateLayerEffects.call(void 0, effects));
3224
+ guard(() => _chunkEBSYZRSWcjs.validateLayerEffects.call(void 0, effects));
3225
3225
  next.effects = effects;
3226
3226
  } else delete next.effects;
3227
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next);
3227
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next);
3228
3228
  }
3229
3229
  function addLayerEffect(layers, id, kind, params = {}, index) {
3230
- if (!_chunkPAOWHJ5Ocjs.isLayerEffectKind.call(void 0, kind)) fail(`Unknown effect kind "${String(kind)}". Kinds: ${_chunkPAOWHJ5Ocjs.LAYER_EFFECT_KINDS.join(", ")}.`);
3230
+ if (!_chunkEBSYZRSWcjs.isLayerEffectKind.call(void 0, kind)) fail(`Unknown effect kind "${String(kind)}". Kinds: ${_chunkEBSYZRSWcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
3231
3231
  const layer = requireEffectLayer(layers, id, "add effects");
3232
3232
  const current = layerEffectsOf(layer);
3233
3233
  const ids = new Set(current.items.map((e) => e.id));
3234
- let effectId = _chunkPAOWHJ5Ocjs.newEffectId.call(void 0, );
3235
- while (ids.has(effectId)) effectId = _chunkPAOWHJ5Ocjs.newEffectId.call(void 0, );
3234
+ let effectId = _chunkEBSYZRSWcjs.newEffectId.call(void 0, );
3235
+ while (ids.has(effectId)) effectId = _chunkEBSYZRSWcjs.newEffectId.call(void 0, );
3236
3236
  const { id: _ignored, kind: _kind, ...rest } = params;
3237
- const effect = guard(() => _chunkPAOWHJ5Ocjs.mergeLayerEffect.call(void 0, _chunkPAOWHJ5Ocjs.defaultLayerEffect.call(void 0, kind, effectId), rest));
3237
+ const effect = guard(() => _chunkEBSYZRSWcjs.mergeLayerEffect.call(void 0, _chunkEBSYZRSWcjs.defaultLayerEffect.call(void 0, kind, effectId), rest));
3238
3238
  const items = [...current.items];
3239
3239
  const at = index === void 0 ? items.length : Math.max(0, Math.min(items.length, Math.floor(index)));
3240
3240
  items.splice(at, 0, effect);
@@ -3251,7 +3251,7 @@ function updateLayerEffect(layers, id, effectId, changes) {
3251
3251
  const i = requireEffect(layer, effectId);
3252
3252
  const current = layer.effects;
3253
3253
  const items = [...current.items];
3254
- items[i] = guard(() => _chunkPAOWHJ5Ocjs.mergeLayerEffect.call(void 0, items[i], changes));
3254
+ items[i] = guard(() => _chunkEBSYZRSWcjs.mergeLayerEffect.call(void 0, items[i], changes));
3255
3255
  return setLayerEffects(layers, id, { ...current, items });
3256
3256
  }
3257
3257
  function removeLayerEffect(layers, id, effectId) {
@@ -3274,7 +3274,7 @@ function setLayerEffectsEnabled(layers, id, enabled, scale) {
3274
3274
  function parseBlend(value, allowPassThrough = false) {
3275
3275
  if (value === void 0) return void 0;
3276
3276
  if (value === "pass-through" && allowPassThrough) return value;
3277
- if (!_chunkTFOPHZ3Ucjs.isBlendMode.call(void 0, value)) fail(`Unknown blend mode "${String(value)}".`);
3277
+ if (!_chunk7ISPWEJAcjs.isBlendMode.call(void 0, value)) fail(`Unknown blend mode "${String(value)}".`);
3278
3278
  return value;
3279
3279
  }
3280
3280
  function unionRect(a, b) {
@@ -3286,7 +3286,7 @@ function unionRect(a, b) {
3286
3286
  }
3287
3287
 
3288
3288
  // src/image-editor/layers/shape.ts
3289
- var SHAPE_RENDER_MARGIN = _chunkPAOWHJ5Ocjs.MAX_EFFECT_REACH;
3289
+ var SHAPE_RENDER_MARGIN = _chunkEBSYZRSWcjs.MAX_EFFECT_REACH;
3290
3290
  var DEFAULT_MITER_LIMIT = 100;
3291
3291
  var fail2 = (message) => {
3292
3292
  throw new LayerOperationError(message);
@@ -3502,11 +3502,11 @@ function fillCoverage(geo, rect, rule, inverted = false) {
3502
3502
  function paintContext(env) {
3503
3503
  const tiles = /* @__PURE__ */ new Map();
3504
3504
  return {
3505
- light: _chunkPAOWHJ5Ocjs.DEFAULT_GLOBAL_LIGHT,
3505
+ light: _chunkEBSYZRSWcjs.DEFAULT_GLOBAL_LIGHT,
3506
3506
  pattern: (id) => {
3507
3507
  if (tiles.has(id)) return tiles.get(id);
3508
- const p = _nullishCoalesce(_optionalChain([env, 'access', _44 => _44.pattern, 'optionalCall', _45 => _45(id)]), () => ( _chunkPAOWHJ5Ocjs.builtinPattern.call(void 0, id)));
3509
- const t = p && p.width > 0 && p.height > 0 && p.data.length >= p.width * p.height * 4 ? new (0, _chunkPAOWHJ5Ocjs.PatternTile)(p) : null;
3508
+ const p = _nullishCoalesce(_optionalChain([env, 'access', _44 => _44.pattern, 'optionalCall', _45 => _45(id)]), () => ( _chunkEBSYZRSWcjs.builtinPattern.call(void 0, id)));
3509
+ const t = p && p.width > 0 && p.height > 0 && p.data.length >= p.width * p.height * 4 ? new (0, _chunkEBSYZRSWcjs.PatternTile)(p) : null;
3510
3510
  tiles.set(id, t);
3511
3511
  return t;
3512
3512
  }
@@ -3537,9 +3537,9 @@ function renderShapeRect(layer, rect, env, ctx = paintContext(env)) {
3537
3537
  if (!fCov && !sCov) return null;
3538
3538
  const canvas = { x: 0, y: 0, width: env.width, height: env.height };
3539
3539
  const anchor = { x: geo.frame.x, y: geo.frame.y };
3540
- const fc = fCov ? _chunkPAOWHJ5Ocjs.effectFillColors.call(void 0, layer.fill, rect, geo.frame, canvas, anchor, ctx) : null;
3540
+ const fc = fCov ? _chunkEBSYZRSWcjs.effectFillColors.call(void 0, layer.fill, rect, geo.frame, canvas, anchor, ctx) : null;
3541
3541
  const fo = _nullishCoalesce(_optionalChain([layer, 'access', _46 => _46.fill, 'optionalAccess', _47 => _47.opacity]), () => ( 1));
3542
- const sc = sCov ? _chunkPAOWHJ5Ocjs.effectFillColors.call(void 0, layer.stroke.paint, rect, geo.frame, canvas, anchor, ctx) : null;
3542
+ const sc = sCov ? _chunkEBSYZRSWcjs.effectFillColors.call(void 0, layer.stroke.paint, rect, geo.frame, canvas, anchor, ctx) : null;
3543
3543
  const so = _nullishCoalesce(_optionalChain([layer, 'access', _48 => _48.stroke, 'optionalAccess', _49 => _49.paint, 'access', _50 => _50.opacity]), () => ( 1));
3544
3544
  const out = new Uint8ClampedArray(n * 4);
3545
3545
  let any = false;
@@ -3578,20 +3578,20 @@ function renderShapeRect(layer, rect, env, ctx = paintContext(env)) {
3578
3578
  }
3579
3579
  function renderShape(layer, env, options = {}) {
3580
3580
  const geo = shapeGeometry(layer);
3581
- if (!geo.bounds) return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4);
3581
+ if (!geo.bounds) return _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
3582
3582
  let region = intersect(geo.bounds, shapeRenderClip(env));
3583
3583
  if (region && options.clip) region = intersect(region, options.clip);
3584
- if (!region) return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4);
3584
+ if (!region) return _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
3585
3585
  const ctx = paintContext(env);
3586
3586
  const tiles = /* @__PURE__ */ new Map();
3587
- for (const { tx, ty } of _chunkTFOPHZ3Ucjs.tilesInRect.call(void 0, region)) {
3588
- const rect = { x: tx * _chunkTFOPHZ3Ucjs.TILE, y: ty * _chunkTFOPHZ3Ucjs.TILE, width: _chunkTFOPHZ3Ucjs.TILE, height: _chunkTFOPHZ3Ucjs.TILE };
3587
+ for (const { tx, ty } of _chunk7ISPWEJAcjs.tilesInRect.call(void 0, region)) {
3588
+ const rect = { x: tx * _chunk7ISPWEJAcjs.TILE, y: ty * _chunk7ISPWEJAcjs.TILE, width: _chunk7ISPWEJAcjs.TILE, height: _chunk7ISPWEJAcjs.TILE };
3589
3589
  const px2 = renderShapeRect(layer, rect, env, ctx);
3590
3590
  if (!px2) continue;
3591
- const tile = _chunkTFOPHZ3Ucjs.finishTile.call(void 0, px2, 4, 0);
3592
- if (tile) tiles.set(_chunkTFOPHZ3Ucjs.tileKey.call(void 0, tx, ty), tile);
3591
+ const tile = _chunk7ISPWEJAcjs.finishTile.call(void 0, px2, 4, 0);
3592
+ if (tile) tiles.set(_chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty), tile);
3593
3593
  }
3594
- return new (0, _chunkTFOPHZ3Ucjs.TiledSurface)(4, tiles, 0);
3594
+ return new (0, _chunk7ISPWEJAcjs.TiledSurface)(4, tiles, 0);
3595
3595
  }
3596
3596
  function rerenderShape(layer, env) {
3597
3597
  return { ...layer, surface: renderShape(layer, env) };
@@ -3632,9 +3632,9 @@ function normalizeShapePaint(v, path = "paint") {
3632
3632
  offset: _nullishCoalesce(g.offset, () => ( { x: 0, y: 0 }))
3633
3633
  };
3634
3634
  try {
3635
- _chunkPAOWHJ5Ocjs.validateEffectGradient.call(void 0, gradient, `${path}.gradient`);
3635
+ _chunkEBSYZRSWcjs.validateEffectGradient.call(void 0, gradient, `${path}.gradient`);
3636
3636
  } catch (e) {
3637
- if (e instanceof _chunkPAOWHJ5Ocjs.LayerEffectError) fail2(e.message);
3637
+ if (e instanceof _chunkEBSYZRSWcjs.LayerEffectError) fail2(e.message);
3638
3638
  throw e;
3639
3639
  }
3640
3640
  if (gradient.stops.length < 1) fail2(`${path}.gradient.stops needs at least one { position, color }.`);
@@ -3815,7 +3815,7 @@ function createShapeLayer(init, env, id = newLayerId()) {
3815
3815
  components: init.components,
3816
3816
  fill: init.fill === void 0 ? null : init.fill,
3817
3817
  stroke: _nullishCoalesce(init.stroke, () => ( null)),
3818
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4),
3818
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4),
3819
3819
  offset: { x: 0, y: 0 }
3820
3820
  };
3821
3821
  if (init.fillRule && init.fillRule !== "nonzero") layer.fillRule = init.fillRule;
@@ -3846,7 +3846,7 @@ function updateShapeLayer(layers, id, change, env, action = "edit it") {
3846
3846
  if (!("annotation" in patch)) delete next.annotation;
3847
3847
  if (!next.components.length) fail2("A shape needs at least one component; delete the layer instead.");
3848
3848
  const rendered = rerenderShape(next, env);
3849
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
3849
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
3850
3850
  }
3851
3851
  function transformShapeComponents(components, f, affine) {
3852
3852
  return components.map((c) => {
@@ -3877,7 +3877,7 @@ function shapeAsPixelLayer(layer) {
3877
3877
  }
3878
3878
  function annotationPaint(color, opacity) {
3879
3879
  const c = parseCssColor(color);
3880
- if (!c || !_chunkPAOWHJ5Ocjs.parseEffectColor.call(void 0, c.hex)) return void 0;
3880
+ if (!c || !_chunkEBSYZRSWcjs.parseEffectColor.call(void 0, c.hex)) return void 0;
3881
3881
  const a = c.alpha * opacity;
3882
3882
  return a !== 1 ? { type: "color", color: c.hex, opacity: a } : { type: "color", color: c.hex };
3883
3883
  }
@@ -3941,7 +3941,7 @@ function shapeFromAnnotation(a) {
3941
3941
  }
3942
3942
  function annotationBlend(a, layerBlend) {
3943
3943
  if (layerBlend !== "normal") return layerBlend;
3944
- return a.blend && _chunkTFOPHZ3Ucjs.isBlendMode.call(void 0, a.blend) ? a.blend : "normal";
3944
+ return a.blend && _chunk7ISPWEJAcjs.isBlendMode.call(void 0, a.blend) ? a.blend : "normal";
3945
3945
  }
3946
3946
  function annotationOfShape(layer) {
3947
3947
  const a = layer.annotation;
@@ -3958,7 +3958,7 @@ function annotationOfShape(layer) {
3958
3958
  var fail3 = (message) => {
3959
3959
  throw new LayerOperationError(message);
3960
3960
  };
3961
- var TEXT_RENDER_MARGIN = _chunkPAOWHJ5Ocjs.MAX_EFFECT_REACH;
3961
+ var TEXT_RENDER_MARGIN = _chunkEBSYZRSWcjs.MAX_EFFECT_REACH;
3962
3962
  function textMatrix(layer) {
3963
3963
  return _nullishCoalesce(layer.transform, () => ( _chunkFODKPD44cjs.IDENTITY_MATRIX));
3964
3964
  }
@@ -4024,9 +4024,9 @@ var rgbOf = (hex) => {
4024
4024
  function renderOutlines(layer, shaper, region) {
4025
4025
  const parts = textOutlines(layer, shaper).map(({ fragment, path }) => ({ style: fragment.style, flat: flattenPath(path) }));
4026
4026
  const tiles = /* @__PURE__ */ new Map();
4027
- for (const { tx, ty } of _chunkTFOPHZ3Ucjs.tilesInRect.call(void 0, region)) {
4028
- const rect = { x: tx * _chunkTFOPHZ3Ucjs.TILE, y: ty * _chunkTFOPHZ3Ucjs.TILE, width: _chunkTFOPHZ3Ucjs.TILE, height: _chunkTFOPHZ3Ucjs.TILE };
4029
- const n = _chunkTFOPHZ3Ucjs.TILE * _chunkTFOPHZ3Ucjs.TILE;
4027
+ for (const { tx, ty } of _chunk7ISPWEJAcjs.tilesInRect.call(void 0, region)) {
4028
+ const rect = { x: tx * _chunk7ISPWEJAcjs.TILE, y: ty * _chunk7ISPWEJAcjs.TILE, width: _chunk7ISPWEJAcjs.TILE, height: _chunk7ISPWEJAcjs.TILE };
4029
+ const n = _chunk7ISPWEJAcjs.TILE * _chunk7ISPWEJAcjs.TILE;
4030
4030
  const acc = new Float32Array(n * 4);
4031
4031
  let any = false;
4032
4032
  for (const p of parts) {
@@ -4057,10 +4057,10 @@ function renderOutlines(layer, shaper, region) {
4057
4057
  px2[i + 2] = Math.round(acc[i + 2]);
4058
4058
  px2[i + 3] = a;
4059
4059
  }
4060
- const tile = _chunkTFOPHZ3Ucjs.finishTile.call(void 0, px2, 4, 0);
4061
- if (tile) tiles.set(_chunkTFOPHZ3Ucjs.tileKey.call(void 0, tx, ty), tile);
4060
+ const tile = _chunk7ISPWEJAcjs.finishTile.call(void 0, px2, 4, 0);
4061
+ if (tile) tiles.set(_chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty), tile);
4062
4062
  }
4063
- return new (0, _chunkTFOPHZ3Ucjs.TiledSurface)(4, tiles, 0);
4063
+ return new (0, _chunk7ISPWEJAcjs.TiledSurface)(4, tiles, 0);
4064
4064
  }
4065
4065
  function renderOnCanvas(layer, shaper, region, env) {
4066
4066
  if (!env.createCanvas) return null;
@@ -4086,7 +4086,7 @@ function renderOnCanvas(layer, shaper, region, env) {
4086
4086
  ctx.globalAlpha = 1;
4087
4087
  ctx.setTransform(1, 0, 0, 1, 0, 0);
4088
4088
  const data = ctx.getImageData(0, 0, region.width, region.height).data;
4089
- return _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width: region.width, height: region.height, data: new Uint8ClampedArray(data) }, 4, region.x, region.y);
4089
+ return _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width: region.width, height: region.height, data: new Uint8ClampedArray(data) }, 4, region.x, region.y);
4090
4090
  }
4091
4091
  function renderText(layer, env) {
4092
4092
  const shaper = env.shaper;
@@ -4095,7 +4095,7 @@ function renderText(layer, env) {
4095
4095
  const ink = inkBounds(layout);
4096
4096
  const clip = { x: -TEXT_RENDER_MARGIN, y: -TEXT_RENDER_MARGIN, width: env.width + 2 * TEXT_RENDER_MARGIN, height: env.height + 2 * TEXT_RENDER_MARGIN };
4097
4097
  const region = ink ? intersect2(docRect(ink, textMatrix(layer)), clip) : null;
4098
- if (!region) return { surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4), missingFonts: layout.missingFonts };
4098
+ if (!region) return { surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4), missingFonts: layout.missingFonts };
4099
4099
  if (shaper.outline) return { surface: renderOutlines(layer, shaper, region), missingFonts: layout.missingFonts };
4100
4100
  const surface = renderOnCanvas(layer, shaper, region, env);
4101
4101
  return surface ? { surface, missingFonts: layout.missingFonts } : null;
@@ -4226,7 +4226,7 @@ function createTypeLayer(init, env, id = newLayerId(), lenient = false) {
4226
4226
  runs: _chunkFODKPD44cjs.fitRuns.call(void 0, init.runs, text3.length, _chunkFODKPD44cjs.DEFAULT_TEXT_STYLE),
4227
4227
  paragraphs: _chunkFODKPD44cjs.fitParagraphRuns.call(void 0, _nullishCoalesce(init.paragraphs, () => ( [{ length: text3.length, style: {} }])), text3),
4228
4228
  frame: init.frame,
4229
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4),
4229
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4),
4230
4230
  offset: { x: 0, y: 0 }
4231
4231
  };
4232
4232
  if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([init, 'access', _62 => _62.runs, 'access', _63 => _63[0], 'optionalAccess', _64 => _64.style]), () => ( _chunkFODKPD44cjs.DEFAULT_TEXT_STYLE)) }];
@@ -4244,7 +4244,7 @@ function updateTypeLayer(layers, id, change, env, action = "edit it") {
4244
4244
  if (!next.runs.length) next.runs = [{ length: 0, style: _chunkFODKPD44cjs.styleAt.call(void 0, current.runs, 0, _chunkFODKPD44cjs.DEFAULT_TEXT_STYLE) }];
4245
4245
  if ("text" in patch || "paragraphs" in patch) next.paragraphs = _chunkFODKPD44cjs.fitParagraphRuns.call(void 0, next.paragraphs, next.text);
4246
4246
  const rendered = rerenderText(next, env);
4247
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
4247
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => rendered), layer: rendered };
4248
4248
  }
4249
4249
  function replaceTextRange(layer, start, end, insert) {
4250
4250
  const text3 = layer.text.slice(0, start) + insert + layer.text.slice(end);
@@ -4336,7 +4336,7 @@ function rasterMaskFromLegacy(mask, width, height) {
4336
4336
  const sel = decodeLayerMask(mask);
4337
4337
  if (!sel) return null;
4338
4338
  const sized = sel.width === width && sel.height === height ? sel : resizeSelection(sel, width, height);
4339
- const surface = _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0);
4339
+ const surface = _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0);
4340
4340
  legacyMaskMemo.set(surface, { width: mask.width, height: mask.height, rle: mask.rle });
4341
4341
  const out = { surface, defaultValue: 0 };
4342
4342
  if (mask.density !== void 0 && mask.density !== 1) out.density = mask.density;
@@ -4355,7 +4355,7 @@ function hasResampledLegacyMask(layers, width, height) {
4355
4355
  function legacyMaskOf(mask, width, height) {
4356
4356
  let memo = legacyMaskMemo.get(mask.surface);
4357
4357
  if (!memo) {
4358
- const data = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, mask.surface, { x: 0, y: 0, width, height });
4358
+ const data = _chunk7ISPWEJAcjs.readRegion.call(void 0, mask.surface, { x: 0, y: 0, width, height });
4359
4359
  memo = { width, height, rle: encodeSelectionRle(new Uint8Array(data.buffer, data.byteOffset, data.length)) };
4360
4360
  legacyMaskMemo.set(mask.surface, memo);
4361
4361
  }
@@ -4457,7 +4457,7 @@ function backgroundLayer(filters = [], mask) {
4457
4457
  visible: true,
4458
4458
  opacity: 1,
4459
4459
  blend: "normal",
4460
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4),
4460
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4),
4461
4461
  offset: { x: 0, y: 0 },
4462
4462
  source: "document",
4463
4463
  filters
@@ -4467,7 +4467,7 @@ function backgroundLayer(filters = [], mask) {
4467
4467
  }
4468
4468
  function depthRasterMask(source) {
4469
4469
  const out = {
4470
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 1, 255),
4470
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 1, 255),
4471
4471
  defaultValue: 255,
4472
4472
  source: { ...source, depthRange: [...source.depthRange] }
4473
4473
  };
@@ -4761,7 +4761,7 @@ function geometryHomography(geometry) {
4761
4761
  var fail4 = (message) => {
4762
4762
  throw new LayerOperationError(message);
4763
4763
  };
4764
- var SMART_RENDER_MARGIN = _chunkPAOWHJ5Ocjs.MAX_EFFECT_REACH;
4764
+ var SMART_RENDER_MARGIN = _chunkEBSYZRSWcjs.MAX_EFFECT_REACH;
4765
4765
  function newContentsId() {
4766
4766
  return newLayerId("so");
4767
4767
  }
@@ -4794,10 +4794,10 @@ function contentsSurface(contents) {
4794
4794
  let s = contentsPixels.get(contents);
4795
4795
  if (s) return s;
4796
4796
  if (contents.kind === "raster") {
4797
- s = _nullishCoalesce(contents.raster, () => ( _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4)));
4797
+ s = _nullishCoalesce(contents.raster, () => ( _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4)));
4798
4798
  } else {
4799
4799
  const doc = contents.document;
4800
- if (!doc) return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4);
4800
+ if (!doc) return _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
4801
4801
  const W = contents.width;
4802
4802
  const H = contents.height;
4803
4803
  const data = new LayerCompositor().composite(doc.layers, { x: 0, y: 0, width: W, height: H }, {
@@ -4806,14 +4806,14 @@ function contentsSurface(contents) {
4806
4806
  globalLight: doc.globalLight,
4807
4807
  pattern: (id) => _nullishCoalesce(_optionalChain([doc, 'access', _77 => _77.patterns, 'optionalAccess', _78 => _78.find, 'call', _79 => _79((p) => p.id === id)]), () => ( null))
4808
4808
  });
4809
- s = _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width: W, height: H, data }, 4, 0, 0);
4809
+ s = _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width: W, height: H, data }, 4, 0, 0);
4810
4810
  }
4811
4811
  contentsPixels.set(contents, s);
4812
4812
  return s;
4813
4813
  }
4814
4814
  function rasterContents(pixels, name, id = newContentsId()) {
4815
4815
  if (!(pixels.width > 0 && pixels.height > 0) || pixels.data.length < pixels.width * pixels.height * 4) fail4("Contents pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
4816
- return { id, name, width: pixels.width, height: pixels.height, kind: "raster", raster: _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, pixels, 4, 0, 0) };
4816
+ return { id, name, width: pixels.width, height: pixels.height, kind: "raster", raster: _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, pixels, 4, 0, 0) };
4817
4817
  }
4818
4818
  function documentContents(document, width, height, name, id = newContentsId()) {
4819
4819
  if (!(Number.isInteger(width) && Number.isInteger(height) && width > 0 && height > 0)) fail4("Contents width and height must be positive whole numbers.");
@@ -4857,7 +4857,7 @@ function placeContents(layer, canvas, options = {}) {
4857
4857
  let out;
4858
4858
  const move = integerMove(layer);
4859
4859
  if (move && !options.clip) {
4860
- out = _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, src, move.x, move.y);
4860
+ out = _chunk7ISPWEJAcjs.translateSurface.call(void 0, src, move.x, move.y);
4861
4861
  } else {
4862
4862
  const g = placementGeometry(layer);
4863
4863
  const interpolation = preview ? placement.interpolation === "nearest" ? "nearest" : "bilinear" : _nullishCoalesce(placement.interpolation, () => ( "bicubic"));
@@ -4868,7 +4868,7 @@ function placeContents(layer, canvas, options = {}) {
4868
4868
  k = step;
4869
4869
  let r = _optionalChain([options, 'access', _84 => _84.reduced, 'optionalAccess', _85 => _85.get, 'call', _86 => _86(k)]);
4870
4870
  if (!r) {
4871
- r = _chunkPAOWHJ5Ocjs.reduceSurface.call(void 0, src, k);
4871
+ r = _chunkEBSYZRSWcjs.reduceSurface.call(void 0, src, k);
4872
4872
  _optionalChain([options, 'access', _87 => _87.reduced, 'optionalAccess', _88 => _88.set, 'call', _89 => _89(k, r)]);
4873
4873
  }
4874
4874
  source = r;
@@ -4878,15 +4878,15 @@ function placeContents(layer, canvas, options = {}) {
4878
4878
  if (hasWarp(g)) {
4879
4879
  const f = transformMap(g);
4880
4880
  if (!f) fail4("The placement folds the contents over itself or through the horizon; keep the corners a convex quad.");
4881
- out = _chunkPAOWHJ5Ocjs.warpSurface.call(void 0, source, (p) => f({ x: p.x * k, y: p.y * k }), { interpolation, source: box2, clip, step: step > 1 ? step : void 0 });
4881
+ out = _chunkEBSYZRSWcjs.warpSurface.call(void 0, source, (p) => f({ x: p.x * k, y: p.y * k }), { interpolation, source: box2, clip, step: step > 1 ? step : void 0 });
4882
4882
  } else {
4883
4883
  const h = transformHomography(g);
4884
4884
  if (!h) fail4("The placement folds the contents over itself or through the horizon; keep the corners a convex quad.");
4885
4885
  const hk = _chunkEJVDBITDcjs.multiplyHomographies.call(void 0, [k, 0, 0, 0, k, 0, 0, 0, 1], h);
4886
- out = _chunkPAOWHJ5Ocjs.transformSurface.call(void 0, source, hk, { interpolation, source: box2, clip, step: step > 1 ? step : void 0 });
4886
+ out = _chunkEBSYZRSWcjs.transformSurface.call(void 0, source, hk, { interpolation, source: box2, clip, step: step > 1 ? step : void 0 });
4887
4887
  }
4888
4888
  } catch (e) {
4889
- if (e instanceof _chunkPAOWHJ5Ocjs.TransformTooLargeError) fail4(e.message);
4889
+ if (e instanceof _chunkEBSYZRSWcjs.TransformTooLargeError) fail4(e.message);
4890
4890
  throw e;
4891
4891
  }
4892
4892
  }
@@ -4909,7 +4909,7 @@ function filterMaskCoverage(mask, canvas) {
4909
4909
  if (!mask || mask.enabled === false || mask.source) return null;
4910
4910
  const W = canvas.width;
4911
4911
  const H = canvas.height;
4912
- const bytes = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, mask.surface, { x: 0, y: 0, width: W, height: H });
4912
+ const bytes = _chunk7ISPWEJAcjs.readRegion.call(void 0, mask.surface, { x: 0, y: 0, width: W, height: H });
4913
4913
  let v = new Float32Array(W * H);
4914
4914
  let all = true;
4915
4915
  for (let i = 0; i < v.length; i++) {
@@ -4918,7 +4918,7 @@ function filterMaskCoverage(mask, canvas) {
4918
4918
  }
4919
4919
  const feather = _nullishCoalesce(mask.feather, () => ( 0));
4920
4920
  if (all && !(feather > 0)) return null;
4921
- if (feather > 0) v = _chunkPAOWHJ5Ocjs.gaussianBlur.call(void 0, v, W, H, feather, "clamp");
4921
+ if (feather > 0) v = _chunkEBSYZRSWcjs.gaussianBlur.call(void 0, v, W, H, feather, "clamp");
4922
4922
  const density = _nullishCoalesce(mask.density, () => ( 1));
4923
4923
  if (density !== 1) for (let i = 0; i < v.length; i++) v[i] = 1 - density * (1 - v[i]);
4924
4924
  return v;
@@ -4931,7 +4931,7 @@ function applySmartFilters(placed, stack, canvas) {
4931
4931
  const key = JSON.stringify([W, H, active.map((f) => ({ ...f, id: void 0 }))]);
4932
4932
  let entry = filteredCache.get(placed);
4933
4933
  if (!entry || entry.key !== key) {
4934
- const base = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, placed, { x: 0, y: 0, width: W, height: H });
4934
+ const base = _chunk7ISPWEJAcjs.readRegion.call(void 0, placed, { x: 0, y: 0, width: W, height: H });
4935
4935
  let acc = new Uint8ClampedArray(base);
4936
4936
  for (const f of active) {
4937
4937
  const out = new Uint8ClampedArray(acc);
@@ -4940,7 +4940,7 @@ function applySmartFilters(placed, stack, canvas) {
4940
4940
  if (f.opacity >= 1) acc = out;
4941
4941
  else lerpInto(acc, out, f.opacity, null);
4942
4942
  } else {
4943
- _chunkPAOWHJ5Ocjs.blendTile.call(void 0, acc, out, f.blend, f.opacity, null);
4943
+ _chunkEBSYZRSWcjs.blendTile.call(void 0, acc, out, f.blend, f.opacity, null);
4944
4944
  }
4945
4945
  }
4946
4946
  entry = { key, base, filtered: acc };
@@ -4952,7 +4952,7 @@ function applySmartFilters(placed, stack, canvas) {
4952
4952
  result = new Uint8ClampedArray(entry.base);
4953
4953
  lerpInto(result, entry.filtered, 1, cov);
4954
4954
  }
4955
- return _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width: W, height: H, data: result }, 4, 0, 0);
4955
+ return _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width: W, height: H, data: result }, 4, 0, 0);
4956
4956
  }
4957
4957
  function lerpInto(dst, src, k, coverage) {
4958
4958
  for (let i = 0, p = 0; i < dst.length; i += 4, p++) {
@@ -4987,7 +4987,7 @@ function normalizePlacement(raw, contents) {
4987
4987
  out.warp = { us: [...raw.warp.us], vs: [...raw.warp.vs], points: raw.warp.points.map((p) => ({ x: p.x, y: p.y })) };
4988
4988
  }
4989
4989
  if (raw.interpolation !== void 0) {
4990
- if (!_chunkPAOWHJ5Ocjs.isInterpolation.call(void 0, raw.interpolation)) fail4(`Unknown interpolation "${String(raw.interpolation)}"; use nearest, bilinear or bicubic.`);
4990
+ if (!_chunkEBSYZRSWcjs.isInterpolation.call(void 0, raw.interpolation)) fail4(`Unknown interpolation "${String(raw.interpolation)}"; use nearest, bilinear or bicubic.`);
4991
4991
  if (raw.interpolation !== "bicubic") out.interpolation = raw.interpolation;
4992
4992
  }
4993
4993
  const g = { box: { x: 0, y: 0, width: contents.width, height: contents.height }, corners: out.corners, warp: _nullishCoalesce(out.warp, () => ( null)) };
@@ -5007,7 +5007,7 @@ function followMask(mask, before, after) {
5007
5007
  const inv = _chunkEJVDBITDcjs.invertHomography.call(void 0, h0);
5008
5008
  if (!inv) return mask;
5009
5009
  const delta = _chunkEJVDBITDcjs.multiplyHomographies.call(void 0, inv, h1);
5010
- const surface = _chunkPAOWHJ5Ocjs.transformSurface.call(void 0, mask.surface, delta, { interpolation: "bilinear" });
5010
+ const surface = _chunkEBSYZRSWcjs.transformSurface.call(void 0, mask.surface, delta, { interpolation: "bilinear" });
5011
5011
  return { ...mask, surface };
5012
5012
  }
5013
5013
  function setSmartPlacement(layers, id, placement, canvas) {
@@ -5028,7 +5028,7 @@ function setSmartPlacement(layers, id, placement, canvas) {
5028
5028
  next.smartFilters = { ...next.smartFilters, mask: m };
5029
5029
  }
5030
5030
  next = rerender(next, canvas, "be transformed");
5031
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next), layer: next, masksMoved };
5031
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next), layer: next, masksMoved };
5032
5032
  }
5033
5033
  function offsetSmartObject(layers, id, dx, dy, canvas) {
5034
5034
  const layer = requireSmartObject(layers, id);
@@ -5038,26 +5038,26 @@ function offsetSmartObject(layers, id, dx, dy, canvas) {
5038
5038
  if (!mx && !my) return layers;
5039
5039
  const corners = layer.placement.corners.map((p) => ({ x: p.x + mx, y: p.y + my }));
5040
5040
  let next = { ...layer, placement: { ...layer.placement, corners } };
5041
- const moveMask = (m2) => m2 && m2.linked !== false && !m2.source ? { ...m2, surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, m2.surface, mx, my) } : m2;
5041
+ const moveMask = (m2) => m2 && m2.linked !== false && !m2.source ? { ...m2, surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, m2.surface, mx, my) } : m2;
5042
5042
  if (layer.mask) next.mask = moveMask(layer.mask);
5043
5043
  if (_optionalChain([layer, 'access', _94 => _94.smartFilters, 'optionalAccess', _95 => _95.mask])) next.smartFilters = { ...layer.smartFilters, mask: moveMask(layer.smartFilters.mask) };
5044
5044
  const spatial = activeSmartFilters(layer.smartFilters).some((f) => f.kind === "blur");
5045
- const b = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, layer.surface);
5045
+ const b = _chunk7ISPWEJAcjs.contentBounds.call(void 0, layer.surface);
5046
5046
  const m = SMART_RENDER_MARGIN;
5047
5047
  const cut = b && (b.x <= -m || b.y <= -m || b.x + b.width >= canvas.width + m || b.y + b.height >= canvas.height + m);
5048
5048
  if (!spatial && !cut && !(_optionalChain([next, 'access', _96 => _96.smartFilters, 'optionalAccess', _97 => _97.mask]) && activeSmartFilters(next.smartFilters).length && next.smartFilters.mask.linked === false)) {
5049
- next = { ...next, surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, layer.surface, mx, my) };
5049
+ next = { ...next, surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, layer.surface, mx, my) };
5050
5050
  } else {
5051
5051
  next = rerender(next, canvas, "move");
5052
5052
  }
5053
- return _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next);
5053
+ return _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next);
5054
5054
  }
5055
5055
  function translateLayer(layer, dx, dy) {
5056
5056
  if (!dx && !dy) return layer;
5057
5057
  const moveMask = (m) => {
5058
5058
  if (!m) return m;
5059
5059
  if (m.source) fail4(`Layer "${layer.name || layer.id}" has a depth mask, which cannot move into a smart object; bake or remove it first.`);
5060
- return { ...m, surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, m.surface, dx, dy) };
5060
+ return { ...m, surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, m.surface, dx, dy) };
5061
5061
  };
5062
5062
  switch (layer.type) {
5063
5063
  case "pixel":
@@ -5066,7 +5066,7 @@ function translateLayer(layer, dx, dy) {
5066
5066
  const next = {
5067
5067
  ...layer,
5068
5068
  placement: { ...layer.placement, corners: layer.placement.corners.map((p) => ({ x: p.x + dx, y: p.y + dy })) },
5069
- surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, layer.surface, dx, dy),
5069
+ surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, layer.surface, dx, dy),
5070
5070
  mask: moveMask(layer.mask)
5071
5071
  };
5072
5072
  if (!next.mask) delete next.mask;
@@ -5087,7 +5087,7 @@ function translateLayer(layer, dx, dy) {
5087
5087
  const next = {
5088
5088
  ...layer,
5089
5089
  components: transformShapeComponents(layer.components, (p) => ({ x: p.x + dx, y: p.y + dy }), _chunkFODKPD44cjs.translateMatrix.call(void 0, dx, dy)),
5090
- surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, layer.surface, dx, dy),
5090
+ surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, layer.surface, dx, dy),
5091
5091
  mask: moveMask(layer.mask)
5092
5092
  };
5093
5093
  if (!next.mask) delete next.mask;
@@ -5095,7 +5095,7 @@ function translateLayer(layer, dx, dy) {
5095
5095
  return next;
5096
5096
  }
5097
5097
  case "type": {
5098
- const next = { ...transformTypeLayer(layer, _chunkFODKPD44cjs.translateMatrix.call(void 0, dx, dy)), surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
5098
+ const next = { ...transformTypeLayer(layer, _chunkFODKPD44cjs.translateMatrix.call(void 0, dx, dy)), surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, layer.surface, dx, dy), mask: moveMask(layer.mask) };
5099
5099
  if (!next.mask) delete next.mask;
5100
5100
  return next;
5101
5101
  }
@@ -5110,7 +5110,7 @@ function layerExtent(layer, surfaceOf, canvas) {
5110
5110
  const s = layer.type === "pixel" ? surfaceOf(layer) : layer.surface;
5111
5111
  if (s.defaultValue !== 0) b = full;
5112
5112
  else {
5113
- const c = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, s);
5113
+ const c = _chunk7ISPWEJAcjs.contentBounds.call(void 0, s);
5114
5114
  b = c ? { x: c.x + layer.offset.x, y: c.y + layer.offset.y, width: c.width, height: c.height } : null;
5115
5115
  }
5116
5116
  } else if (layer.type === "group") {
@@ -5118,7 +5118,7 @@ function layerExtent(layer, surfaceOf, canvas) {
5118
5118
  } else {
5119
5119
  b = full;
5120
5120
  }
5121
- const m = _chunkPAOWHJ5Ocjs.effectsMargin.call(void 0, layer.effects);
5121
+ const m = _chunkEBSYZRSWcjs.effectsMargin.call(void 0, layer.effects);
5122
5122
  if (b && m > 0) b = { x: b.x - Math.ceil(m), y: b.y - Math.ceil(m), width: b.width + 2 * Math.ceil(m), height: b.height + 2 * Math.ceil(m) };
5123
5123
  return b;
5124
5124
  }
@@ -5146,7 +5146,7 @@ function convertToSmartObject(layers, ids, canvas, options) {
5146
5146
  if (single && single.type === "pixel") {
5147
5147
  const surface = options.surfaceOf(single);
5148
5148
  if (surface.defaultValue !== 0) fail4(`Layer "${single.name || single.id}" has no transparent area to crop to; it cannot be converted.`);
5149
- const b = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, surface);
5149
+ const b = _chunk7ISPWEJAcjs.contentBounds.call(void 0, surface);
5150
5150
  if (!b) fail4(`Layer "${single.name || single.id}" has no pixels to convert; paint something first.`);
5151
5151
  const contents = {
5152
5152
  id: newContentsId(),
@@ -5154,7 +5154,7 @@ function convertToSmartObject(layers, ids, canvas, options) {
5154
5154
  width: b.width,
5155
5155
  height: b.height,
5156
5156
  kind: "raster",
5157
- raster: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, surface, -b.x, -b.y)
5157
+ raster: _chunk7ISPWEJAcjs.translateSurface.call(void 0, surface, -b.x, -b.y)
5158
5158
  };
5159
5159
  smart = {
5160
5160
  type: "smart",
@@ -5165,14 +5165,14 @@ function convertToSmartObject(layers, ids, canvas, options) {
5165
5165
  blend: single.blend,
5166
5166
  contents,
5167
5167
  placement: placementAt(contents, b.x + single.offset.x, b.y + single.offset.y),
5168
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4),
5168
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4),
5169
5169
  offset: { x: 0, y: 0 }
5170
5170
  };
5171
5171
  if (single.clipped) smart.clipped = true;
5172
5172
  if (single.fillOpacity !== void 0) smart.fillOpacity = single.fillOpacity;
5173
5173
  if (single.effects) smart.effects = single.effects;
5174
5174
  if (single.mask) {
5175
- smart.mask = single.mask.source ? single.mask : { ...single.mask, surface: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, single.mask.surface, single.offset.x, single.offset.y) };
5175
+ smart.mask = single.mask.source ? single.mask : { ...single.mask, surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, single.mask.surface, single.offset.x, single.offset.y) };
5176
5176
  }
5177
5177
  const filters = asSmartFilters(single.filters);
5178
5178
  if (filters) smart.smartFilters = filters;
@@ -5187,7 +5187,7 @@ function convertToSmartObject(layers, ids, canvas, options) {
5187
5187
  delete resolved.source;
5188
5188
  layer = resolved;
5189
5189
  }
5190
- if (_chunkPAOWHJ5Ocjs.flattenLayers.call(void 0, [layer]).some((x) => x.type === "pixel" && x.source === "document")) fail4(`Layer "${layer.name || layer.id}" holds the document image inside a group; convert the Background on its own.`);
5190
+ if (_chunkEBSYZRSWcjs.flattenLayers.call(void 0, [layer]).some((x) => x.type === "pixel" && x.source === "document")) fail4(`Layer "${layer.name || layer.id}" holds the document image inside a group; convert the Background on its own.`);
5191
5191
  return translateLayer(layer, -b.x, -b.y);
5192
5192
  });
5193
5193
  if (nested[0].clipped) {
@@ -5206,7 +5206,7 @@ function convertToSmartObject(layers, ids, canvas, options) {
5206
5206
  blend: "normal",
5207
5207
  contents,
5208
5208
  placement: placementAt(contents, b.x, b.y),
5209
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4),
5209
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4),
5210
5210
  offset: { x: 0, y: 0 }
5211
5211
  };
5212
5212
  }
@@ -5214,8 +5214,8 @@ function convertToSmartObject(layers, ids, canvas, options) {
5214
5214
  smart = { ...smart, surface: renderSmartObject(smart, canvas) };
5215
5215
  const below = ordered.filter((l) => l.index < top.index).length;
5216
5216
  let out = layers;
5217
- for (const l of ordered) out = _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, out, l.layer.id, () => null);
5218
- return { layers: _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, out, smart, parent, top.index - below), layer: smart };
5217
+ for (const l of ordered) out = _chunkEBSYZRSWcjs.mapLayer.call(void 0, out, l.layer.id, () => null);
5218
+ return { layers: _chunkEBSYZRSWcjs.insertLayer.call(void 0, out, smart, parent, top.index - below), layer: smart };
5219
5219
  }
5220
5220
  function rasterizeSmartObject(layers, id) {
5221
5221
  const layer = requireSmartObject(layers, id);
@@ -5235,7 +5235,7 @@ function rasterizeSmartObject(layers, id) {
5235
5235
  if (layer.locks) out.locks = layer.locks;
5236
5236
  if (layer.effects) out.effects = layer.effects;
5237
5237
  if (layer.fillOpacity !== void 0) out.fillOpacity = layer.fillOpacity;
5238
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => out), layer: out };
5238
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => out), layer: out };
5239
5239
  }
5240
5240
  function copySmartObject(layers, id, linked, name) {
5241
5241
  const loc = requireLayer(layers, id);
@@ -5245,19 +5245,19 @@ function copySmartObject(layers, id, linked, name) {
5245
5245
  delete copy.psd;
5246
5246
  if (!linked) copy.contents = { ...layer.contents, id: newContentsId() };
5247
5247
  if (copy.smartFilters) copy.smartFilters = { ...copy.smartFilters, filters: copy.smartFilters.filters.map((f) => ({ ...f, id: newLayerId("flt") })) };
5248
- return { layers: _chunkPAOWHJ5Ocjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _114 => _114.parent, 'optionalAccess', _115 => _115.id]), () => ( null)), loc.index + 1), layer: copy };
5248
+ return { layers: _chunkEBSYZRSWcjs.insertLayer.call(void 0, layers, copy, _nullishCoalesce(_optionalChain([loc, 'access', _114 => _114.parent, 'optionalAccess', _115 => _115.id]), () => ( null)), loc.index + 1), layer: copy };
5249
5249
  }
5250
5250
  function instancesOf(layers, contentsId) {
5251
- return _chunkPAOWHJ5Ocjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "smart" && l.contents.id === contentsId).map((l) => l.id);
5251
+ return _chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers).filter((l) => l.type === "smart" && l.contents.id === contentsId).map((l) => l.id);
5252
5252
  }
5253
5253
  function replaceContents(layers, contentsId, contents, canvas) {
5254
5254
  const ids = instancesOf(layers, contentsId);
5255
5255
  if (!ids.length) fail4(`No smart object uses contents "${contentsId}".`);
5256
- for (const id of ids) requireUnlocked(_chunkPAOWHJ5Ocjs.findLayer.call(void 0, layers, id).layer, "all", "replace its contents");
5256
+ for (const id of ids) requireUnlocked(_chunkEBSYZRSWcjs.findLayer.call(void 0, layers, id).layer, "all", "replace its contents");
5257
5257
  const next = { ...contents, id: contentsId };
5258
5258
  let out = layers;
5259
5259
  for (const id of ids) {
5260
- out = _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, out, id, (l) => {
5260
+ out = _chunkEBSYZRSWcjs.mapLayer.call(void 0, out, id, (l) => {
5261
5261
  const layer = l;
5262
5262
  return rerender({ ...layer, contents: next, placement: refitPlacement(layer, next) }, canvas, "take the new contents");
5263
5263
  });
@@ -5288,7 +5288,7 @@ function normalizeSmartFilter(raw, id = newLayerId("flt")) {
5288
5288
  if (raw.kind === "psd") fail4("Photoshop filters can only come from a PSD; add develop or blur.");
5289
5289
  const base = normalizeFilter(raw, id);
5290
5290
  const blend = _nullishCoalesce(raw.blend, () => ( "normal"));
5291
- if (!_chunkTFOPHZ3Ucjs.isBlendMode.call(void 0, blend) || blend === "pigment") fail4(`Unknown blend mode "${String(blend)}" for a smart filter.`);
5291
+ if (!_chunk7ISPWEJAcjs.isBlendMode.call(void 0, blend) || blend === "pigment") fail4(`Unknown blend mode "${String(blend)}" for a smart filter.`);
5292
5292
  const opacity = _nullishCoalesce(raw.opacity, () => ( 1));
5293
5293
  if (!(typeof opacity === "number" && opacity >= 0 && opacity <= 1)) fail4("opacity must be a number from 0 to 1.");
5294
5294
  return { ...base, blend, opacity };
@@ -5320,7 +5320,7 @@ function addSmartFilter(layers, id, filter, canvas, index) {
5320
5320
  const at = index === void 0 ? filters.length : Math.max(0, Math.min(filters.length, Math.floor(index)));
5321
5321
  filters.splice(at, 0, filter);
5322
5322
  const next = withStack(layer, { ...stack, filters }, canvas);
5323
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next), layer: next, filter };
5323
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next), layer: next, filter };
5324
5324
  }
5325
5325
  function updateSmartFilter(layers, id, filterId, changes, canvas) {
5326
5326
  const layer = editableSmart(layers, id);
@@ -5332,7 +5332,7 @@ function updateSmartFilter(layers, id, filterId, changes, canvas) {
5332
5332
  const extra = Object.keys(changes).filter((k) => !["enabled", "blend", "opacity", "kind"].includes(k));
5333
5333
  if (extra.length) fail4(`"${current.name}" is a Photoshop filter we keep but do not model; only enabled, blend and opacity change. Unknown: ${extra.join(", ")}.`);
5334
5334
  const blend = _nullishCoalesce(changes.blend, () => ( current.blend));
5335
- if (!_chunkTFOPHZ3Ucjs.isBlendMode.call(void 0, blend) || blend === "pigment") fail4(`Unknown blend mode "${String(blend)}" for a smart filter.`);
5335
+ if (!_chunk7ISPWEJAcjs.isBlendMode.call(void 0, blend) || blend === "pigment") fail4(`Unknown blend mode "${String(blend)}" for a smart filter.`);
5336
5336
  const opacity = _nullishCoalesce(changes.opacity, () => ( current.opacity));
5337
5337
  if (!(typeof opacity === "number" && opacity >= 0 && opacity <= 1)) fail4("opacity must be a number from 0 to 1.");
5338
5338
  merged2 = { ...current, enabled: changes.enabled === void 0 ? current.enabled : Boolean(changes.enabled), blend, opacity };
@@ -5342,7 +5342,7 @@ function updateSmartFilter(layers, id, filterId, changes, canvas) {
5342
5342
  const filters = [...layer.smartFilters.filters];
5343
5343
  filters[i] = merged2;
5344
5344
  const next = withStack(layer, { ...layer.smartFilters, filters }, canvas);
5345
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next), layer: next, filter: merged2 };
5345
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next), layer: next, filter: merged2 };
5346
5346
  }
5347
5347
  function removeSmartFilter(layers, id, filterId, canvas) {
5348
5348
  const layer = editableSmart(layers, id);
@@ -5350,7 +5350,7 @@ function removeSmartFilter(layers, id, filterId, canvas) {
5350
5350
  const stack = layer.smartFilters;
5351
5351
  const filters = stack.filters.filter((f) => f.id !== filterId);
5352
5352
  const next = withStack(layer, filters.length ? { ...stack, filters } : stack.enabled ? void 0 : { enabled: false, filters }, canvas);
5353
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5353
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5354
5354
  }
5355
5355
  function moveSmartFilter(layers, id, filterId, index, canvas) {
5356
5356
  const layer = editableSmart(layers, id);
@@ -5361,12 +5361,12 @@ function moveSmartFilter(layers, id, filterId, index, canvas) {
5361
5361
  const [f] = filters.splice(i, 1);
5362
5362
  filters.splice(index, 0, f);
5363
5363
  const next = withStack(layer, { ...layer.smartFilters, filters }, canvas);
5364
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5364
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5365
5365
  }
5366
5366
  function setSmartFiltersEnabled(layers, id, enabled, canvas) {
5367
5367
  const layer = editableSmart(layers, id);
5368
5368
  const next = withStack(layer, { ...stackOf(layer), enabled: Boolean(enabled) }, canvas);
5369
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5369
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5370
5370
  }
5371
5371
  function setSmartFilterMask(layers, id, mask, canvas) {
5372
5372
  const layer = editableSmart(layers, id);
@@ -5375,7 +5375,7 @@ function setSmartFilterMask(layers, id, mask, canvas) {
5375
5375
  if (mask) stack.mask = mask;
5376
5376
  else delete stack.mask;
5377
5377
  const next = withStack(layer, stack, canvas);
5378
- return { layers: _chunkPAOWHJ5Ocjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5378
+ return { layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, () => next), layer: next };
5379
5379
  }
5380
5380
  function withFilterMaskSurface(layer, surface, canvas) {
5381
5381
  const stack = stackOf(layer);
@@ -5408,10 +5408,10 @@ function deserializePatterns(raw, problems = []) {
5408
5408
  var encodedCache = /* @__PURE__ */ new WeakMap();
5409
5409
  function encodeSurface(surface) {
5410
5410
  if (encodedCache.has(surface)) return encodedCache.get(surface);
5411
- const b = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, surface);
5411
+ const b = _chunk7ISPWEJAcjs.contentBounds.call(void 0, surface);
5412
5412
  let out = null;
5413
5413
  if (b) {
5414
- const data = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, surface, b);
5414
+ const data = _chunk7ISPWEJAcjs.readRegion.call(void 0, surface, b);
5415
5415
  out = { url: _chunkEJVDBITDcjs.pngDataUrl.call(void 0, b.width, b.height, data, surface.channels), x: b.x, y: b.y };
5416
5416
  }
5417
5417
  encodedCache.set(surface, out);
@@ -5421,10 +5421,10 @@ var deepCache = /* @__PURE__ */ new WeakMap();
5421
5421
  function encodeDeepSurface(surface) {
5422
5422
  if (deepCache.has(surface)) return deepCache.get(surface);
5423
5423
  let out = null;
5424
- const depth = _chunkPAOWHJ5Ocjs.surfaceDepth.call(void 0, surface);
5425
- const b = depth === 8 ? null : _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, surface);
5424
+ const depth = _chunk7ISPWEJAcjs.surfaceDepth.call(void 0, surface);
5425
+ const b = depth === 8 ? null : _chunk7ISPWEJAcjs.contentBounds.call(void 0, surface);
5426
5426
  if (depth !== 8 && b) {
5427
- const samples = _chunkPAOWHJ5Ocjs.readDeepRegion.call(void 0, surface, b, depth);
5427
+ const samples = _chunk7ISPWEJAcjs.readDeepRegion.call(void 0, surface, b, depth);
5428
5428
  const bytes = new Uint8Array(samples.byteLength);
5429
5429
  const view = new DataView(bytes.buffer);
5430
5430
  if (samples instanceof Uint16Array) for (let i = 0; i < samples.length; i++) view.setUint16(2 * i, samples[i], true);
@@ -5447,7 +5447,7 @@ function decodeDeepSurface(surface, raw, problems, label) {
5447
5447
  const samples = d.depth === 16 ? new Uint16Array(n) : new Float32Array(n);
5448
5448
  if (samples instanceof Uint16Array) for (let i = 0; i < n; i++) samples[i] = view.getUint16(2 * i, true);
5449
5449
  else for (let i = 0; i < n; i++) samples[i] = view.getFloat32(4 * i, true);
5450
- return _chunkPAOWHJ5Ocjs.writeDeepRegion.call(void 0, surface, { x: d.x, y: d.y, width: d.width, height: d.height }, samples);
5450
+ return _chunk7ISPWEJAcjs.writeDeepRegion.call(void 0, surface, { x: d.x, y: d.y, width: d.width, height: d.height }, samples);
5451
5451
  } catch (e6) {
5452
5452
  problems.push(`${label}: its ${d.depth}-bit samples could not be read, so it was opened at 8 bits`);
5453
5453
  return surface;
@@ -5485,7 +5485,7 @@ function deserializeEffects(raw) {
5485
5485
  psd = void 0;
5486
5486
  }
5487
5487
  }
5488
- return _chunkPAOWHJ5Ocjs.normalizeLayerEffects.call(void 0, { ...r, psd });
5488
+ return _chunkEBSYZRSWcjs.normalizeLayerEffects.call(void 0, { ...r, psd });
5489
5489
  }
5490
5490
  function serializeMask(mask, hint, ctx) {
5491
5491
  const out = { defaultValue: mask.defaultValue };
@@ -5594,7 +5594,7 @@ function readType(r, base, ctx) {
5594
5594
  runs: _chunkFODKPD44cjs.fitRuns.call(void 0, runs, text3.length, _chunkFODKPD44cjs.DEFAULT_TEXT_STYLE),
5595
5595
  paragraphs: _chunkFODKPD44cjs.fitParagraphRuns.call(void 0, paragraphs.length ? paragraphs : [{ length: text3.length, style: {} }], text3),
5596
5596
  frame,
5597
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4),
5597
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4),
5598
5598
  offset: { x: 0, y: 0 }
5599
5599
  };
5600
5600
  if (!layer.runs.length) layer.runs = [{ length: 0, style: _nullishCoalesce(_optionalChain([runs, 'access', _137 => _137[0], 'optionalAccess', _138 => _138.style]), () => ( _chunkFODKPD44cjs.DEFAULT_TEXT_STYLE)) }];
@@ -5716,7 +5716,7 @@ function serializeContents(c, ctx) {
5716
5716
  const enc = encodeSurface(c.raster);
5717
5717
  if (enc) {
5718
5718
  if (enc.x !== 0 || enc.y !== 0) {
5719
- const data = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, c.raster, { x: 0, y: 0, width: c.width, height: c.height });
5719
+ const data = _chunk7ISPWEJAcjs.readRegion.call(void 0, c.raster, { x: 0, y: 0, width: c.width, height: c.height });
5720
5720
  out.asset = ctx.addAsset(_chunkEJVDBITDcjs.pngDataUrl.call(void 0, c.width, c.height, data, 4), `contents-${c.id}`);
5721
5721
  } else out.asset = ctx.addAsset(enc.url, `contents-${c.id}`);
5722
5722
  }
@@ -5818,18 +5818,18 @@ function decodePngDataUrl(url, channels) {
5818
5818
  }
5819
5819
  var num2 = (v, lo, hi, fallback) => typeof v === "number" && Number.isFinite(v) ? Math.min(hi, Math.max(lo, v)) : fallback;
5820
5820
  function readSurface(ref, x, y, channels, defaultValue, ctx, what) {
5821
- if (typeof ref !== "string" || !ref) return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, channels, defaultValue);
5821
+ if (typeof ref !== "string" || !ref) return _chunk7ISPWEJAcjs.emptySurface.call(void 0, channels, defaultValue);
5822
5822
  const url = ctx.assets[ref];
5823
5823
  if (typeof url !== "string") {
5824
5824
  ctx.problems.push(`${what}: asset "${ref}" is missing`);
5825
- return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, channels, defaultValue);
5825
+ return _chunk7ISPWEJAcjs.emptySurface.call(void 0, channels, defaultValue);
5826
5826
  }
5827
5827
  try {
5828
5828
  const px2 = (_nullishCoalesce(ctx.decodeAsset, () => ( decodePngDataUrl)))(url, channels);
5829
- return _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, px2, channels, Math.round(num2(x, -1e7, 1e7, 0)), Math.round(num2(y, -1e7, 1e7, 0)), defaultValue);
5829
+ return _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, px2, channels, Math.round(num2(x, -1e7, 1e7, 0)), Math.round(num2(y, -1e7, 1e7, 0)), defaultValue);
5830
5830
  } catch (err) {
5831
5831
  ctx.problems.push(`${what}: asset "${ref}" could not be decoded (${err.message})`);
5832
- return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, channels, defaultValue);
5832
+ return _chunk7ISPWEJAcjs.emptySurface.call(void 0, channels, defaultValue);
5833
5833
  }
5834
5834
  }
5835
5835
  function readMask(raw, ctx, what) {
@@ -5837,7 +5837,7 @@ function readMask(raw, ctx, what) {
5837
5837
  const r = raw;
5838
5838
  const defaultValue = r.defaultValue === 255 ? 255 : 0;
5839
5839
  const mask = {
5840
- surface: r.source ? _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 1, 255) : readSurface(r.asset, r.x, r.y, 1, defaultValue, ctx, `${what} mask`),
5840
+ surface: r.source ? _chunk7ISPWEJAcjs.emptySurface.call(void 0, 1, 255) : readSurface(r.asset, r.x, r.y, 1, defaultValue, ctx, `${what} mask`),
5841
5841
  defaultValue: r.source ? 255 : defaultValue
5842
5842
  };
5843
5843
  if (typeof r.density === "number" && r.density !== 1) mask.density = num2(r.density, 0, 1, 1);
@@ -5885,7 +5885,7 @@ function deserializeLayer(raw, ctx) {
5885
5885
  name: typeof r.name === "string" ? r.name : "",
5886
5886
  visible: r.visible !== false,
5887
5887
  opacity: num2(r.opacity, 0, 1, 1),
5888
- blend: _chunkTFOPHZ3Ucjs.normalizeBlendMode.call(void 0, r.blend)
5888
+ blend: _chunk7ISPWEJAcjs.normalizeBlendMode.call(void 0, r.blend)
5889
5889
  };
5890
5890
  if (r.clipped === true) base.clipped = true;
5891
5891
  const mask = readMask(r.mask, ctx, `Layer "${base.name || id}"`);
@@ -5902,7 +5902,7 @@ function deserializeLayer(raw, ctx) {
5902
5902
  const layer = {
5903
5903
  ...base,
5904
5904
  type: "pixel",
5905
- surface: r.source === "document" ? _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4) : readSurface(r.asset, r.x, r.y, 4, 0, ctx, `Layer "${base.name || id}"`),
5905
+ surface: r.source === "document" ? _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4) : readSurface(r.asset, r.x, r.y, 4, 0, ctx, `Layer "${base.name || id}"`),
5906
5906
  offset: { x: Math.round(num2(_optionalChain([r, 'access', _155 => _155.offset, 'optionalAccess', _156 => _156.x]), -1e7, 1e7, 0)), y: Math.round(num2(_optionalChain([r, 'access', _157 => _157.offset, 'optionalAccess', _158 => _158.y]), -1e7, 1e7, 0)) }
5907
5907
  };
5908
5908
  if (r.source === "document") layer.source = "document";
@@ -5922,7 +5922,7 @@ function deserializeLayer(raw, ctx) {
5922
5922
  }
5923
5923
  case "group": {
5924
5924
  const children = Array.isArray(r.children) ? r.children.map((c) => deserializeLayer(c, ctx)).filter(Boolean) : [];
5925
- const blend = r.blend === "pass-through" ? "pass-through" : _chunkTFOPHZ3Ucjs.isBlendMode.call(void 0, r.blend) ? r.blend : "pass-through";
5925
+ const blend = r.blend === "pass-through" ? "pass-through" : _chunk7ISPWEJAcjs.isBlendMode.call(void 0, r.blend) ? r.blend : "pass-through";
5926
5926
  const group = { ...base, type: "group", blend, children };
5927
5927
  if (r.collapsed === true) group.collapsed = true;
5928
5928
  return group;
@@ -5982,7 +5982,7 @@ function readContents(id, ctx) {
5982
5982
  if (raw.linked && typeof raw.linked.path === "string") c.linked = { path: raw.linked.path };
5983
5983
  if (c.kind === "raster") {
5984
5984
  if (typeof raw.asset === "string") c.raster = readSurface(raw.asset, 0, 0, 4, 0, ctx, `Smart object contents "${c.name}"`);
5985
- else if (!c.file) c.raster = _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4);
5985
+ else if (!c.file) c.raster = _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
5986
5986
  } else {
5987
5987
  const outer = ctx.canvas;
5988
5988
  ctx.canvas = { width, height };
@@ -6005,7 +6005,7 @@ function readSmartFilters(raw, ctx, what) {
6005
6005
  let k = 0;
6006
6006
  for (const f of list2) {
6007
6007
  if (!f || typeof f !== "object") continue;
6008
- const blend = _chunkTFOPHZ3Ucjs.isBlendMode.call(void 0, f.blend) && f.blend !== "pigment" ? f.blend : "normal";
6008
+ const blend = _chunk7ISPWEJAcjs.isBlendMode.call(void 0, f.blend) && f.blend !== "pigment" ? f.blend : "normal";
6009
6009
  const opacity = num2(f.opacity, 0, 1, 1);
6010
6010
  if (f.kind === "psd") {
6011
6011
  try {
@@ -6035,13 +6035,13 @@ function readSmartObject(r, base, ctx) {
6035
6035
  try {
6036
6036
  const raw = { corners: p.corners };
6037
6037
  if (p.warp && _chunkFODKPD44cjs.isValidWarpMesh.call(void 0, p.warp)) raw.warp = p.warp;
6038
- if (_chunkPAOWHJ5Ocjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
6038
+ if (_chunkEBSYZRSWcjs.isInterpolation.call(void 0, p.interpolation)) raw.interpolation = p.interpolation;
6039
6039
  placement = normalizePlacement(raw, contents);
6040
6040
  } catch (e) {
6041
6041
  ctx.problems.push(`${what}: its placement is invalid (${e instanceof Error ? e.message : String(e)}); it was placed at the top left`);
6042
6042
  placement = { corners: [{ x: 0, y: 0 }, { x: contents.width, y: 0 }, { x: contents.width, y: contents.height }, { x: 0, y: contents.height }] };
6043
6043
  }
6044
- const layer = { ...base, type: "smart", contents, placement, surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4), offset: { x: 0, y: 0 } };
6044
+ const layer = { ...base, type: "smart", contents, placement, surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4), offset: { x: 0, y: 0 } };
6045
6045
  const filters = readSmartFilters(r.smartFilters, ctx, what);
6046
6046
  if (filters) layer.smartFilters = filters;
6047
6047
  if (typeof r.fillOpacity === "number" && r.fillOpacity !== 1) layer.fillOpacity = num2(r.fillOpacity, 0, 1, 1);
@@ -8035,7 +8035,7 @@ function buildEngineData(layer, template) {
8035
8035
  }
8036
8036
  function inkBounds2(layer) {
8037
8037
  if (layer.frame.kind === "box") return [0, 0, layer.frame.width, layer.frame.height];
8038
- const b = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, layer.surface);
8038
+ const b = _chunk7ISPWEJAcjs.contentBounds.call(void 0, layer.surface);
8039
8039
  if (!b) return [0, 0, 0, 0];
8040
8040
  const inv = _chunkFODKPD44cjs.invertMatrix.call(void 0, textMatrix(layer));
8041
8041
  const pts = [
@@ -8481,11 +8481,11 @@ function filterMaskFromItem(item) {
8481
8481
  const height = rect.bottom - rect.top;
8482
8482
  if (!(width > 0 && height > 0) || width * height > 1 << 28) return null;
8483
8483
  const bytes = decodePlanes(plane.compression, plane.data, { planes: 1, width, height, depth: 8, psb: true });
8484
- const surface = _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width, height, data: bytes }, 1, rect.left, rect.top, 255);
8484
+ const surface = _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width, height, data: bytes }, 1, rect.left, rect.top, 255);
8485
8485
  return { surface, defaultValue: 255 };
8486
8486
  }
8487
8487
  function filterMaskItem(placed, mask, area) {
8488
- const painted = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, mask.surface);
8488
+ const painted = _chunk7ISPWEJAcjs.contentBounds.call(void 0, mask.surface);
8489
8489
  let b = _nullishCoalesce(painted, () => ( { x: 0, y: 0, width: 1, height: 1 }));
8490
8490
  if (mask.defaultValue !== 255 && area) {
8491
8491
  const x0 = Math.min(area.x, _nullishCoalesce(_optionalChain([painted, 'optionalAccess', _216 => _216.x]), () => ( area.x)));
@@ -8495,7 +8495,7 @@ function filterMaskItem(placed, mask, area) {
8495
8495
  b = { x: x0, y: y0, width: x1 - x0, height: y1 - y0 };
8496
8496
  }
8497
8497
  const rect = { top: b.y, left: b.x, bottom: b.y + b.height, right: b.x + b.width };
8498
- const values = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, mask.surface, b);
8498
+ const values = _chunk7ISPWEJAcjs.readRegion.call(void 0, mask.surface, b);
8499
8499
  const plane = new Uint8Array(values.buffer, values.byteOffset, values.length);
8500
8500
  return {
8501
8501
  id: placed,
@@ -9748,11 +9748,11 @@ function safeSize(ctx, rect, name) {
9748
9748
  }
9749
9749
  function recordPixels(ctx, rec, name) {
9750
9750
  const { width, height } = safeSize(ctx, rec.rect, name);
9751
- if (!width || !height || ctx.skipPixels) return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4);
9751
+ if (!width || !height || ctx.skipPixels) return _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
9752
9752
  const ids = [...Array.from({ length: ctx.colorCount }, (_, i) => i), CHANNEL_ALPHA];
9753
9753
  const planes = ids.map((id) => rec.channels.some((c) => c.id === id) ? _nullishCoalesce(decodeOr(ctx, rec, id, name), () => ( null)) : void 0);
9754
- if (planes.some((p) => p === null)) return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4);
9755
- if (planes.every((p) => p === void 0)) return _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4);
9754
+ if (planes.some((p) => p === null)) return _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
9755
+ if (planes.every((p) => p === void 0)) return _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
9756
9756
  const set = {
9757
9757
  width,
9758
9758
  height,
@@ -9764,8 +9764,8 @@ function recordPixels(ctx, rec, name) {
9764
9764
  cmykToRgb: ctx.cmykToRgb
9765
9765
  };
9766
9766
  const deep = set.cmykToRgb ? null : toRgbaDeep(set);
9767
- if (deep) return _chunkPAOWHJ5Ocjs.surfaceFromDeepPixels.call(void 0, { width, height, data: deep }, 4, rec.rect.left, rec.rect.top);
9768
- return _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width, height, data: toRgba8(set) }, 4, rec.rect.left, rec.rect.top);
9767
+ if (deep) return _chunk7ISPWEJAcjs.surfaceFromDeepPixels.call(void 0, { width, height, data: deep }, 4, rec.rect.left, rec.rect.top);
9768
+ return _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width, height, data: toRgba8(set) }, 4, rec.rect.left, rec.rect.top);
9769
9769
  }
9770
9770
  function recordMask(ctx, rec, name) {
9771
9771
  const m = rec.mask;
@@ -9776,11 +9776,11 @@ function recordMask(ctx, rec, name) {
9776
9776
  const rect = useReal ? m.real.rect : m.rect;
9777
9777
  const def = (useReal ? m.real.background : m.defaultColor) >= 128 ? 255 : 0;
9778
9778
  const flags = useReal ? m.real.flags : m.flags;
9779
- let surface = _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 1, def);
9779
+ let surface = _chunk7ISPWEJAcjs.emptySurface.call(void 0, 1, def);
9780
9780
  const { width, height } = safeSize(ctx, rect, name);
9781
9781
  if (width && height && !ctx.skipPixels) {
9782
9782
  const plane = decodeOr(ctx, rec, id, name);
9783
- if (plane) surface = _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width, height, data: toMask8(plane, width, height, ctx.file.header.depth) }, 1, rect.left, rect.top, def);
9783
+ if (plane) surface = _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width, height, data: toMask8(plane, width, height, ctx.file.header.depth) }, 1, rect.left, rect.top, def);
9784
9784
  }
9785
9785
  const mask = { surface, defaultValue: def };
9786
9786
  if (m.userDensity !== void 0 && m.userDensity < 255) mask.density = percent(m.userDensity);
@@ -9840,7 +9840,7 @@ function recordEffects(ctx, rec, name, notes, group) {
9840
9840
  }
9841
9841
  for (const e of parsed.effects.items) {
9842
9842
  for (const id of patternIds(e)) {
9843
- if (ctx.patterns.has(id) || _chunkPAOWHJ5Ocjs.builtinPattern.call(void 0, id)) continue;
9843
+ if (ctx.patterns.has(id) || _chunkEBSYZRSWcjs.builtinPattern.call(void 0, id)) continue;
9844
9844
  ctx.warn.add("A pattern effect uses a pattern the file does not contain, and paints nothing", name);
9845
9845
  notes.push(`pattern "${id}" is not in the file`);
9846
9846
  }
@@ -9919,7 +9919,7 @@ function importNode(ctx, node, depth) {
9919
9919
  if (!file || file.kind !== "liFD") notes.push("linked contents come in as the stored pixels");
9920
9920
  entry.type = "smart";
9921
9921
  entry.status = notes.length ? "approximated" : "mapped";
9922
- return { type: "pixel", id: ctx.newId(name), ...props, surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4), offset: { x: 0, y: 0 } };
9922
+ return { type: "pixel", id: ctx.newId(name), ...props, surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4), offset: { x: 0, y: 0 } };
9923
9923
  }
9924
9924
  }
9925
9925
  if (kind === "smart-object" && !ctx.skipPixels) {
@@ -9982,7 +9982,7 @@ function importShape(ctx, rec, name, notes, props) {
9982
9982
  components: data.components,
9983
9983
  fill: data.fill,
9984
9984
  stroke: data.stroke,
9985
- surface: _chunkTFOPHZ3Ucjs.emptySurface.call(void 0, 4),
9985
+ surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4),
9986
9986
  offset: { x: 0, y: 0 }
9987
9987
  };
9988
9988
  if (data.inverted) layer.inverted = true;
@@ -10051,7 +10051,7 @@ function contentsFor(ctx, placed, name, notes) {
10051
10051
  };
10052
10052
  } else if (t.ext === "png") {
10053
10053
  const png = _chunkEJVDBITDcjs.decodePng.call(void 0, file.bytes);
10054
- out = { ...base, kind: "raster", width: png.width, height: png.height, raster: _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, png, 4, 0, 0) };
10054
+ out = { ...base, kind: "raster", width: png.width, height: png.height, raster: _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, png, 4, 0, 0) };
10055
10055
  } else {
10056
10056
  const size = _nullishCoalesce(placed.size, () => ( { width: 0, height: 0 }));
10057
10057
  if (!(size.width > 0 && size.height > 0)) throw new PsdError("the contents have no stored size");
@@ -10106,7 +10106,7 @@ function importSmart(ctx, rec, name, notes, props) {
10106
10106
  width,
10107
10107
  height,
10108
10108
  kind: "raster",
10109
- raster: _chunkTFOPHZ3Ucjs.translateSurface.call(void 0, surface, -rec.rect.left, -rec.rect.top)
10109
+ raster: _chunk7ISPWEJAcjs.translateSurface.call(void 0, surface, -rec.rect.left, -rec.rect.top)
10110
10110
  };
10111
10111
  if (file && file.kind !== "liFD") {
10112
10112
  contents.linked = { path: _nullishCoalesce(file.path, () => ( file.name)) };
@@ -10175,11 +10175,11 @@ function mergedLayer(ctx) {
10175
10175
  };
10176
10176
  const deep = hasAlpha || set.cmykToRgb ? null : toRgbaDeep(set);
10177
10177
  let surface;
10178
- if (deep) surface = _chunkPAOWHJ5Ocjs.surfaceFromDeepPixels.call(void 0, { width, height, data: deep }, 4);
10178
+ if (deep) surface = _chunk7ISPWEJAcjs.surfaceFromDeepPixels.call(void 0, { width, height, data: deep }, 4);
10179
10179
  else {
10180
10180
  const data = toRgba8(set);
10181
10181
  if (hasAlpha) unmatteWhite(data);
10182
- surface = _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width, height, data }, 4);
10182
+ surface = _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4);
10183
10183
  }
10184
10184
  return {
10185
10185
  type: "pixel",
@@ -10393,34 +10393,34 @@ function blendOf(d, key, fallback, notes) {
10393
10393
  function colorOf(d, fallback = "#000000") {
10394
10394
  if (!d) return fallback;
10395
10395
  const g = (k) => descNumber(d, k);
10396
- if (g("redFloat") !== void 0) return _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, [g("redFloat"), _nullishCoalesce(g("greenFloat"), () => ( 0)), _nullishCoalesce(g("blueFloat"), () => ( 0))]);
10396
+ if (g("redFloat") !== void 0) return _chunkEBSYZRSWcjs.effectColorHex.call(void 0, [g("redFloat"), _nullishCoalesce(g("greenFloat"), () => ( 0)), _nullishCoalesce(g("blueFloat"), () => ( 0))]);
10397
10397
  switch (d.classId) {
10398
10398
  case "HSBC": {
10399
10399
  const rgb = decodePsdColor(1, [(_nullishCoalesce(g("H "), () => ( 0))) / 360 * 65535, (_nullishCoalesce(g("Strt"), () => ( 0))) / 100 * 65535, (_nullishCoalesce(g("Brgh"), () => ( 0))) / 100 * 65535]);
10400
- return rgb ? _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, rgb) : fallback;
10400
+ return rgb ? _chunkEBSYZRSWcjs.effectColorHex.call(void 0, rgb) : fallback;
10401
10401
  }
10402
10402
  case "CMYC": {
10403
10403
  const inv = (k) => (1 - (_nullishCoalesce(g(k), () => ( 0))) / 100) * 65535;
10404
10404
  const rgb = decodePsdColor(2, [inv("Cyn "), inv("Mgnt"), inv("Ylw "), inv("Blck")]);
10405
- return rgb ? _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, rgb) : fallback;
10405
+ return rgb ? _chunkEBSYZRSWcjs.effectColorHex.call(void 0, rgb) : fallback;
10406
10406
  }
10407
10407
  case "LbCl": {
10408
10408
  const rgb = decodePsdColor(7, [(_nullishCoalesce(g("Lmnc"), () => ( 0))) * 100, Math.round((_nullishCoalesce(g("A "), () => ( 0))) * 100) & 65535, Math.round((_nullishCoalesce(g("B "), () => ( 0))) * 100) & 65535]);
10409
- return rgb ? _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, rgb) : fallback;
10409
+ return rgb ? _chunkEBSYZRSWcjs.effectColorHex.call(void 0, rgb) : fallback;
10410
10410
  }
10411
10411
  case "Grsc": {
10412
10412
  const v = 1 - (_nullishCoalesce(g("Gry "), () => ( 0))) / 100;
10413
- return _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, [v, v, v]);
10413
+ return _chunkEBSYZRSWcjs.effectColorHex.call(void 0, [v, v, v]);
10414
10414
  }
10415
10415
  }
10416
10416
  const r = g("Rd ");
10417
10417
  const gr = g("Grn ");
10418
10418
  const b = g("Bl ");
10419
10419
  if (r === void 0 || gr === void 0 || b === void 0) return fallback;
10420
- return _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, [r / 255, gr / 255, b / 255]);
10420
+ return _chunkEBSYZRSWcjs.effectColorHex.call(void 0, [r / 255, gr / 255, b / 255]);
10421
10421
  }
10422
10422
  function colorDesc(hex) {
10423
- const [r, g, b] = _nullishCoalesce(_chunkPAOWHJ5Ocjs.parseEffectColor.call(void 0, hex), () => ( [0, 0, 0]));
10423
+ const [r, g, b] = _nullishCoalesce(_chunkEBSYZRSWcjs.parseEffectColor.call(void 0, hex), () => ( [0, 0, 0]));
10424
10424
  return descriptor("RGBC", [
10425
10425
  ["Rd ", dbl3(r * 255)],
10426
10426
  ["Grn ", dbl3(g * 255)],
@@ -10503,9 +10503,9 @@ function gradientOf(d, notes) {
10503
10503
  raw.forEach((s, i) => {
10504
10504
  if (i > 0 && Math.abs(s.mid - 0.5) > 1e-3) {
10505
10505
  const a = raw[i - 1];
10506
- const ca = _chunkPAOWHJ5Ocjs.parseEffectColor.call(void 0, a.color);
10507
- const cb = _chunkPAOWHJ5Ocjs.parseEffectColor.call(void 0, s.color);
10508
- stops.push({ position: a.position + (s.position - a.position) * s.mid, color: _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, ca.map((v, k) => (v + cb[k]) / 2)) });
10506
+ const ca = _chunkEBSYZRSWcjs.parseEffectColor.call(void 0, a.color);
10507
+ const cb = _chunkEBSYZRSWcjs.parseEffectColor.call(void 0, s.color);
10508
+ stops.push({ position: a.position + (s.position - a.position) * s.mid, color: _chunkEBSYZRSWcjs.effectColorHex.call(void 0, ca.map((v, k) => (v + cb[k]) / 2)) });
10509
10509
  notes.add("gradient midpoints are drawn as straight segments");
10510
10510
  }
10511
10511
  stops.push({ position: s.position, color: s.color });
@@ -10617,8 +10617,8 @@ var KINDS = [
10617
10617
  ["FrFX", "frameFXMulti", "stroke"]
10618
10618
  ];
10619
10619
  function common(d, kind, notes) {
10620
- const def = _chunkPAOWHJ5Ocjs.defaultLayerEffect.call(void 0, kind, "x");
10621
- return { id: _chunkPAOWHJ5Ocjs.newEffectId.call(void 0, ), enabled: descBool(d, "enab") !== false, blend: blendOf(d, "Md ", def.blend, notes), opacity: clamp3(pct(d, "Opct", def.opacity), 0, 1) };
10620
+ const def = _chunkEBSYZRSWcjs.defaultLayerEffect.call(void 0, kind, "x");
10621
+ return { id: _chunkEBSYZRSWcjs.newEffectId.call(void 0, ), enabled: descBool(d, "enab") !== false, blend: blendOf(d, "Md ", def.blend, notes), opacity: clamp3(pct(d, "Opct", def.opacity), 0, 1) };
10622
10622
  }
10623
10623
  function readOne(kind, d, notes) {
10624
10624
  const size = (key, fallback) => clamp3(num3(d, key, fallback), 0, 250);
@@ -10661,7 +10661,7 @@ function readOne(kind, d, notes) {
10661
10661
  case "bevel-emboss": {
10662
10662
  const styles = { OtrB: "outer-bevel", InrB: "inner-bevel", Embs: "emboss", PlEb: "pillow-emboss", strokeEmboss: "stroke-emboss" };
10663
10663
  const out = {
10664
- id: _chunkPAOWHJ5Ocjs.newEffectId.call(void 0, ),
10664
+ id: _chunkEBSYZRSWcjs.newEffectId.call(void 0, ),
10665
10665
  enabled: descBool(d, "enab") !== false,
10666
10666
  kind,
10667
10667
  style: _nullishCoalesce(styles[_nullishCoalesce(enumOf3(d, "bvlS"), () => ( ""))], () => ( "inner-bevel")),
@@ -10872,10 +10872,10 @@ function writeLfx2(effects) {
10872
10872
  ["Scl ", unit3("#Prc", 100)],
10873
10873
  ["masterFXSwitch", boolV3(effects.enabled)]
10874
10874
  ];
10875
- const scale = _chunkPAOWHJ5Ocjs.effectsScale.call(void 0, effects);
10875
+ const scale = _chunkEBSYZRSWcjs.effectsScale.call(void 0, effects);
10876
10876
  let dropped = 0;
10877
10877
  for (const [single, multi, kind] of KINDS) {
10878
- const of = effects.items.filter((e) => e.kind === kind).map((e) => writeOne(_chunkPAOWHJ5Ocjs.scaleLayerEffect.call(void 0, e, scale)));
10878
+ const of = effects.items.filter((e) => e.kind === kind).map((e) => writeOne(_chunkEBSYZRSWcjs.scaleLayerEffect.call(void 0, e, scale)));
10879
10879
  if (!of.length) continue;
10880
10880
  if (of.length === 1) items.push([single, obj3(of[0])]);
10881
10881
  else if (multi) items.push([multi, { type: "VlLs", items: of.map(obj3) }]);
@@ -10907,7 +10907,7 @@ function parseLrfx(data) {
10907
10907
  const colorAt = (rd) => {
10908
10908
  rd.u16();
10909
10909
  const c = [rd.u16(), rd.u16(), rd.u16(), rd.u16()];
10910
- return _chunkPAOWHJ5Ocjs.effectColorHex.call(void 0, [c[0] >> 8, c[1] >> 8, c[2] >> 8].map((v) => v / 255));
10910
+ return _chunkEBSYZRSWcjs.effectColorHex.call(void 0, [c[0] >> 8, c[1] >> 8, c[2] >> 8].map((v) => v / 255));
10911
10911
  };
10912
10912
  const blendAt = (rd) => {
10913
10913
  rd.skip(4);
@@ -10926,7 +10926,7 @@ function parseLrfx(data) {
10926
10926
  const enabled = b.u8() !== 0;
10927
10927
  const useGlobalLight = b.u8() !== 0;
10928
10928
  const opacity = b.u8() / 255;
10929
- const base = { id: _chunkPAOWHJ5Ocjs.newEffectId.call(void 0, ), enabled, blend, opacity, color, angle, useGlobalLight, distance: clamp3(distance, 0, 3e4), size: clamp3(blur, 0, 250), antiAlias: false, noise: 0 };
10929
+ const base = { id: _chunkEBSYZRSWcjs.newEffectId.call(void 0, ), enabled, blend, opacity, color, angle, useGlobalLight, distance: clamp3(distance, 0, 3e4), size: clamp3(blur, 0, 250), antiAlias: false, noise: 0 };
10930
10930
  items.push(key === "dsdw" ? { ...base, kind: "drop-shadow", spread: 0, knocksOut: true } : { ...base, kind: "inner-shadow", choke: 0 });
10931
10931
  } else if (key === "oglw" || key === "iglw") {
10932
10932
  b.u32();
@@ -10936,7 +10936,7 @@ function parseLrfx(data) {
10936
10936
  const blend = blendAt(b);
10937
10937
  const enabled = b.u8() !== 0;
10938
10938
  const opacity = b.u8() / 255;
10939
- const base = { id: _chunkPAOWHJ5Ocjs.newEffectId.call(void 0, ), enabled, blend, opacity, fill: { type: "color", color }, technique: "softer", size: clamp3(blur, 0, 250), antiAlias: false, range: 0.5, jitter: 0, noise: 0 };
10939
+ const base = { id: _chunkEBSYZRSWcjs.newEffectId.call(void 0, ), enabled, blend, opacity, fill: { type: "color", color }, technique: "softer", size: clamp3(blur, 0, 250), antiAlias: false, range: 0.5, jitter: 0, noise: 0 };
10940
10940
  items.push(key === "oglw" ? { ...base, kind: "outer-glow", spread: 0 } : { ...base, kind: "inner-glow", choke: 0, source: "edge" });
10941
10941
  } else if (key === "sofi") {
10942
10942
  b.u32();
@@ -10944,7 +10944,7 @@ function parseLrfx(data) {
10944
10944
  const color = colorAt(b);
10945
10945
  const opacity = b.u8() / 255;
10946
10946
  const enabled = b.u8() !== 0;
10947
- items.push({ id: _chunkPAOWHJ5Ocjs.newEffectId.call(void 0, ), kind: "color-overlay", enabled, blend, opacity, color });
10947
+ items.push({ id: _chunkEBSYZRSWcjs.newEffectId.call(void 0, ), kind: "color-overlay", enabled, blend, opacity, color });
10948
10948
  } else if (key === "bevl") notes.add("legacy bevels are not read");
10949
10949
  }
10950
10950
  return { effects: { enabled: true, items }, notes: [...notes] };
@@ -10995,20 +10995,20 @@ function rleChannel(id, plane, width, height, psb, depth = 8) {
10995
10995
  }
10996
10996
  function surfacePlanes(surface, bounds, depth) {
10997
10997
  const n = bounds.width * bounds.height;
10998
- if (depth === 8) return rgbaToPlanes(_chunkTFOPHZ3Ucjs.readRegion.call(void 0, surface, bounds), n);
10999
- return deepToPlanes(_chunkPAOWHJ5Ocjs.readDeepRegion.call(void 0, surface, bounds, depth), n);
10998
+ if (depth === 8) return rgbaToPlanes(_chunk7ISPWEJAcjs.readRegion.call(void 0, surface, bounds), n);
10999
+ return deepToPlanes(_chunk7ISPWEJAcjs.readDeepRegion.call(void 0, surface, bounds, depth), n);
11000
11000
  }
11001
11001
  var emptyChannel = (id) => ({ id, compression: 0, data: new Uint8Array(0) });
11002
11002
  function maskChannel(mask, ox, oy, psb, depth = 8) {
11003
11003
  if (mask.source) throw new PsdError("A parametric mask must be baked before export.");
11004
- const bounds = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, mask.surface);
11004
+ const bounds = _chunk7ISPWEJAcjs.contentBounds.call(void 0, mask.surface);
11005
11005
  const def = mask.defaultValue;
11006
11006
  const flags = (mask.enabled === false ? MASK_FLAG_DISABLED : 0) | (mask.linked === false ? MASK_FLAG_UNLINKED : 0);
11007
11007
  const m = { rect: EMPTY_RECT, defaultColor: def, flags };
11008
11008
  if ((_nullishCoalesce(mask.density, () => ( 1))) < 1) m.userDensity = Math.round(Math.max(0, _nullishCoalesce(mask.density, () => ( 1))) * 255);
11009
11009
  if ((_nullishCoalesce(mask.feather, () => ( 0))) > 0) m.userFeather = mask.feather;
11010
11010
  if (!bounds) return { channel: emptyChannel(CHANNEL_USER_MASK), mask: m };
11011
- const plane = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, mask.surface, bounds);
11011
+ const plane = _chunk7ISPWEJAcjs.readRegion.call(void 0, mask.surface, bounds);
11012
11012
  m.rect = toRect({ ...bounds, x: bounds.x + ox, y: bounds.y + oy });
11013
11013
  const bytes = planeAtDepth(new Uint8Array(plane.buffer, plane.byteOffset, plane.length), depth);
11014
11014
  return { channel: rleChannel(CHANNEL_USER_MASK, bytes, bounds.width, bounds.height, psb, depth), mask: m };
@@ -11036,7 +11036,7 @@ function prepareNestedLayers(layers) {
11036
11036
  delete plain.effects;
11037
11037
  delete plain.fillOpacity;
11038
11038
  const data = new LayerCompositor().composite([plain], r, { width: r.x + r.width, height: r.y + r.height });
11039
- p.surface = _chunkTFOPHZ3Ucjs.surfaceFromPixels.call(void 0, { width: r.width, height: r.height, data }, 4, r.x - l.offset.x, r.y - l.offset.y);
11039
+ p.surface = _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width: r.width, height: r.height, data }, 4, r.x - l.offset.x, r.y - l.offset.y);
11040
11040
  }
11041
11041
  }
11042
11042
  delete p.filters;
@@ -11055,11 +11055,11 @@ function smartContentsFile(c) {
11055
11055
  const base = c.name.replace(/\.\w+$/, "") || "Contents";
11056
11056
  if (c.file) return { name: c.name, bytes: c.file.bytes };
11057
11057
  if (c.kind === "raster") {
11058
- const data = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, contentsSurface(c), { x: 0, y: 0, width: c.width, height: c.height });
11058
+ const data = _chunk7ISPWEJAcjs.readRegion.call(void 0, contentsSurface(c), { x: 0, y: 0, width: c.width, height: c.height });
11059
11059
  return { name: `${base}.png`, bytes: _chunkEJVDBITDcjs.encodePng.call(void 0, c.width, c.height, data) };
11060
11060
  }
11061
11061
  const doc = c.document;
11062
- const merged2 = _chunkTFOPHZ3Ucjs.readRegion.call(void 0, contentsSurface(c), { x: 0, y: 0, width: c.width, height: c.height });
11062
+ const merged2 = _chunk7ISPWEJAcjs.readRegion.call(void 0, contentsSurface(c), { x: 0, y: 0, width: c.width, height: c.height });
11063
11063
  const res = exportPsd({ width: c.width, height: c.height, layers: prepareNestedLayers(doc.layers), merged: merged2, patterns: doc.patterns, globalLight: doc.globalLight });
11064
11064
  return { name: `${base}.${res.psb ? "psb" : "psd"}`, bytes: res.bytes };
11065
11065
  }
@@ -11103,7 +11103,7 @@ function exportPsd(input) {
11103
11103
  return [rleChannel(CHANNEL_ALPHA, alpha, w, h, psb), ...colorPlanes(rgba, n2).map((p, i) => rleChannel(i, p, w, h, psb))];
11104
11104
  };
11105
11105
  const surfaceChannels = (surface, bounds) => {
11106
- if (mode !== "rgb") return pixelChannels(_chunkTFOPHZ3Ucjs.readRegion.call(void 0, surface, bounds), bounds.width, bounds.height);
11106
+ if (mode !== "rgb") return pixelChannels(_chunk7ISPWEJAcjs.readRegion.call(void 0, surface, bounds), bounds.width, bounds.height);
11107
11107
  const [r, g, b, a2] = surfacePlanes(surface, bounds, depth);
11108
11108
  return [CHANNEL_ALPHA, 0, 1, 2].map((id, i) => rleChannel(id, [a2, r, g, b][i], bounds.width, bounds.height, psb, depth));
11109
11109
  };
@@ -11123,7 +11123,7 @@ function exportPsd(input) {
11123
11123
  const key = layer.type === "group" ? "lfxs" : "lfx2";
11124
11124
  if (fx.psd) {
11125
11125
  const original = parseLfx2(fx.psd.data);
11126
- if (original ? _chunkPAOWHJ5Ocjs.effectsFingerprint.call(void 0, original.effects) === _chunkPAOWHJ5Ocjs.effectsFingerprint.call(void 0, fx) : !fx.items.length) return { key, data: padEven(fx.psd.data) };
11126
+ if (original ? _chunkEBSYZRSWcjs.effectsFingerprint.call(void 0, original.effects) === _chunkEBSYZRSWcjs.effectsFingerprint.call(void 0, fx) : !fx.items.length) return { key, data: padEven(fx.psd.data) };
11127
11127
  }
11128
11128
  if (!fx.items.length && fx.enabled && (_nullishCoalesce(fx.scale, () => ( 1))) === 1) return null;
11129
11129
  const { data, dropped } = writeLfx2(fx);
@@ -11203,7 +11203,7 @@ function exportPsd(input) {
11203
11203
  extra.push({ key: "iOpa", data: Uint8Array.from([Math.round(Math.max(0, layer.fillOpacity) * 255), 0, 0, 0]) });
11204
11204
  }
11205
11205
  const rec = { ...common2(layer, extra), rect: EMPTY_RECT, channels: [], blendKey: _nullishCoalesce(BLEND_TO_PSD[layer.blend], () => ( "norm")) };
11206
- const bounds = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, layer.surface);
11206
+ const bounds = _chunk7ISPWEJAcjs.contentBounds.call(void 0, layer.surface);
11207
11207
  if (bounds) {
11208
11208
  rec.rect = toRect({ ...bounds, x: bounds.x + layer.offset.x, y: bounds.y + layer.offset.y });
11209
11209
  rec.channels = surfaceChannels(layer.surface, bounds);
@@ -11247,7 +11247,7 @@ function exportPsd(input) {
11247
11247
  const fm = _optionalChain([layer, 'access', _267 => _267.smartFilters, 'optionalAccess', _268 => _268.mask]);
11248
11248
  if (fm && !fm.source) filterItems.push(filterMaskItem(placedId, fm, { x: 0, y: 0, width, height }));
11249
11249
  const rec = { ...common2(layer, extra), rect: EMPTY_RECT, channels: [], blendKey: _nullishCoalesce(BLEND_TO_PSD[layer.blend], () => ( "norm")) };
11250
- const bounds = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, layer.surface);
11250
+ const bounds = _chunk7ISPWEJAcjs.contentBounds.call(void 0, layer.surface);
11251
11251
  if (bounds) {
11252
11252
  rec.rect = toRect(bounds);
11253
11253
  rec.channels = surfaceChannels(layer.surface, bounds);
@@ -11278,7 +11278,7 @@ function exportPsd(input) {
11278
11278
  extra.push({ key: "TySh", data: padEven(tyShForLayer(layer)) });
11279
11279
  }
11280
11280
  const rec = { ...common2(layer, extra), rect: EMPTY_RECT, channels: [], blendKey: _nullishCoalesce(BLEND_TO_PSD[layer.blend], () => ( "norm")) };
11281
- const bounds = _chunkTFOPHZ3Ucjs.contentBounds.call(void 0, layer.surface);
11281
+ const bounds = _chunk7ISPWEJAcjs.contentBounds.call(void 0, layer.surface);
11282
11282
  if (bounds) {
11283
11283
  rec.rect = toRect(bounds);
11284
11284
  rec.channels = surfaceChannels(layer.surface, bounds);
@@ -11344,7 +11344,7 @@ function exportPsd(input) {
11344
11344
  const byId = new Map((_nullishCoalesce(input.patterns, () => ( []))).map((p) => [p.id, p]));
11345
11345
  const embed = [];
11346
11346
  for (const id of patternIds2) {
11347
- const p = _nullishCoalesce(byId.get(id), () => ( _chunkPAOWHJ5Ocjs.builtinPattern.call(void 0, id)));
11347
+ const p = _nullishCoalesce(byId.get(id), () => ( _chunkEBSYZRSWcjs.builtinPattern.call(void 0, id)));
11348
11348
  if (p) embed.push(p);
11349
11349
  else note(`Pattern "${id}" is not in the document and was not embedded`, id);
11350
11350
  }
@@ -11735,4 +11735,4 @@ function exportPsd(input) {
11735
11735
 
11736
11736
 
11737
11737
  exports.LEGACY_PROCESS_VERSION = LEGACY_PROCESS_VERSION; exports.LATEST_PROCESS_VERSION = LATEST_PROCESS_VERSION; exports.normalizeProcessVersion = normalizeProcessVersion; exports.srgbToLinear = srgbToLinear; exports.linearToSrgb = linearToSrgb; exports.LUMA_709 = LUMA_709; exports.IDENTITY_MATRIX3 = IDENTITY_MATRIX3; exports.mulMatrix3 = mulMatrix3; exports.applyMatrix3 = applyMatrix3; exports.invertMatrix3 = invertMatrix3; exports.D65 = D65; exports.bradfordAdaptation = bradfordAdaptation; exports.wbMatrix = wbMatrix; exports.linearSrgbToXy = linearSrgbToXy; exports.TINT_SCALE = TINT_SCALE; exports.MIN_KELVIN = MIN_KELVIN; exports.MAX_KELVIN = MAX_KELVIN; exports.xyToUv = xyToUv; exports.uvToXy = uvToXy; exports.tempTintToXy = tempTintToXy; exports.xyToTempTint = xyToTempTint; exports.AS_SHOT_KELVIN = AS_SHOT_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = MIRED_PER_TEMPERATURE_UNIT; exports.temperatureToKelvin = temperatureToKelvin; exports.kelvinToTemperature = kelvinToTemperature; exports.whiteBalanceMatrix = whiteBalanceMatrix; exports.whiteBalanceFromSample = whiteBalanceFromSample; exports.TONE_LUT_SIZE = TONE_LUT_SIZE; exports.toneCurve = toneCurve; exports.buildToneLut = buildToneLut; exports.sampleToneLut = sampleToneLut; exports.normalizeAngle = normalizeAngle; exports.isQuarterTurnSwapped = isQuarterTurnSwapped; exports.getRotatedSize = getRotatedSize; exports.projectImagePoint = projectImagePoint; exports.unprojectCanvasPoint = unprojectCanvasPoint; exports.applyImageProjectionToContext = applyImageProjectionToContext; exports.projectImageRect = projectImageRect; exports.clampCropToImage = clampCropToImage; exports.getViewportProjection = getViewportProjection; exports.getViewportMetrics = getViewportMetrics; exports.canvasToImagePoint = canvasToImagePoint; exports.imageToCanvasPoint = imageToCanvasPoint; exports.mapCropHandle = mapCropHandle; exports.hitTestCrop = hitTestCrop; exports.getCropCursor = getCropCursor; exports.calculateCropDrag = calculateCropDrag; exports.getAnnotationBounds = getAnnotationBounds; exports.hitTestAnnotation = hitTestAnnotation; exports.SELECTION_MODES = SELECTION_MODES; exports.isSelectionMode = isSelectionMode; exports.parseSelectionMode = parseSelectionMode; exports.computeSelectionBounds = computeSelectionBounds; exports.createSelectionMask = createSelectionMask; exports.fullSelection = fullSelection; exports.isSelectionEmpty = isSelectionEmpty; exports.selectionValueAt = selectionValueAt; exports.coverageToByte = coverageToByte; exports.selectionFromCoverage = selectionFromCoverage; exports.selectionToCoverage = selectionToCoverage; exports.selectionArea = selectionArea; exports.combineSelections = combineSelections; exports.invertSelection = invertSelection; exports.resizeSelection = resizeSelection; exports.selectionFromPixels = selectionFromPixels; exports.selectionToPixels = selectionToPixels; exports.encodeSelectionRle = encodeSelectionRle; exports.decodeSelectionRle = decodeSelectionRle; exports.serializeSelection = serializeSelection; exports.deserializeSelection = deserializeSelection; exports.hashMaskContent = hashMaskContent; exports.EMPTY_DISTANCE = EMPTY_DISTANCE; exports.distanceTransform = distanceTransform; exports.expandCoverage = expandCoverage; exports.contractCoverage = contractCoverage; exports.borderCoverage = borderCoverage; exports.smoothCoverage = smoothCoverage; exports.featherCoverage = featherCoverage; exports.greyMorphology = greyMorphology; exports.shiftCoverage = shiftCoverage; exports.SELECTION_MODIFY_OPS = SELECTION_MODIFY_OPS; exports.modifySelection = modifySelection; exports.normalizeLayerMask = normalizeLayerMask; exports.layerMaskFromSelection = layerMaskFromSelection; exports.updateLayerMaskProps = updateLayerMaskProps; exports.decodeLayerMask = decodeLayerMask; exports.layerMaskKey = layerMaskKey; exports.layerMaskCoverage = layerMaskCoverage; exports.projectMaskCoverage = projectMaskCoverage; exports.buildLayerMaskPlanes = buildLayerMaskPlanes; exports.ADJUSTMENT_LUT_SIZE = ADJUSTMENT_LUT_SIZE; exports.sampleLut = sampleLut; exports.ADJUSTMENT_KINDS = ADJUSTMENT_KINDS; exports.isAdjustmentKind = isAdjustmentKind; exports.adjustmentKindLabel = adjustmentKindLabel; exports.HUE_RANGE_LABELS = HUE_RANGE_LABELS; exports.neutralHueRange = neutralHueRange; exports.identityCurve = identityCurve; exports.identityLevels = identityLevels; exports.defaultAdjustmentParams = defaultAdjustmentParams; exports.createAdjustmentLayer = createAdjustmentLayer; exports.normalizeAdjustmentLayer = normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = normalizeAdjustmentLayers; exports.curveLutFromLevels = curveLutFromLevels; exports.levelsValue = levelsValue; exports.rgbToHsl = rgbToHsl; exports.hslToRgb = hslToRgb; exports.hueRangeWeight = hueRangeWeight; exports.hueRangeTables = hueRangeTables; exports.hueSaturation = hueSaturation; exports.rangeLightness = rangeLightness; exports.VIBRANCE_GREY = VIBRANCE_GREY; exports.vibranceLinear = vibranceLinear; exports.vibrancePixel = vibrancePixel; exports.colorBalanceChannel = colorBalanceChannel; exports.blackWhiteGray = blackWhiteGray; exports.D50 = D50; exports.XYZ_D50_TO_SRGB = XYZ_D50_TO_SRGB; exports.photoFilterMatrix = photoFilterMatrix; exports.posterizeValue = posterizeValue; exports.rgbToGray = rgbToGray; exports.hexToRgb = hexToRgb; exports.toneLuts = toneLuts; exports.compileAdjustmentLayer = compileAdjustmentLayer; exports.activeAdjustmentLayers = activeAdjustmentLayers; exports.evaluateAdjustmentLayers = evaluateAdjustmentLayers; exports.applyAdjustmentLayers = applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = applyAdjustmentLayersFloat; exports.adjustmentLayersKey = adjustmentLayersKey; exports.applyAdjustments = applyAdjustments; exports.applyLegacyAdjustments = applyLegacyAdjustments; exports.applyProcess2Adjustments = applyProcess2Adjustments; exports.applyBoxBlur = applyBoxBlur; exports.applyDepthMask = applyDepthMask; exports.removeAlpha = removeAlpha; exports.TEXT_ALIGNS = TEXT_ALIGNS; exports.SHAPE_OPERATIONS = SHAPE_OPERATIONS; exports.LIVE_SHAPE_KINDS = LIVE_SHAPE_KINDS; exports.newLayerId = newLayerId; exports.pixelLayers = pixelLayers; exports.developFilter = developFilter; exports.blurFilter = blurFilter; exports.isActiveFilter = isActiveFilter; exports.isSpatialFilter = isSpatialFilter; exports.pixelLayerBounds = pixelLayerBounds; exports.layerTypeLabel = layerTypeLabel; exports.hasSurface = hasSurface; exports.isRenderedLayer = isRenderedLayer; exports.shapeLayers = shapeLayers; exports.smartObjectLayers = smartObjectLayers; exports.adjustmentNodeAsLayer = adjustmentNodeAsLayer; exports.depthMaskAlpha = depthMaskAlpha; exports.runLayerFilters = runLayerFilters; exports.LayerCompositor = LayerCompositor; exports.compositeDeep = compositeDeep; exports.DEFAULT_ADJUSTMENTS_VALUES = DEFAULT_ADJUSTMENTS_VALUES; exports.DEFAULT_TRANSFORM_VALUES = DEFAULT_TRANSFORM_VALUES; exports.DEFAULT_DEPTH_MASK_VALUES = DEFAULT_DEPTH_MASK_VALUES; exports.flattenPath = flattenPath; exports.rasterizeCoverage = rasterizeCoverage; exports.parseCssColor = parseCssColor; exports.LayerOperationError = LayerOperationError; exports.requireLayer = requireLayer; exports.requireUnlocked = requireUnlocked; exports.placeLayer = placeLayer; exports.removeLayer = removeLayer; exports.moveLayer = moveLayer; exports.withNewIds = withNewIds; exports.duplicateLayer = duplicateLayer; exports.setLayerProperties = setLayerProperties; exports.groupLayers = groupLayers; exports.ungroupLayer = ungroupLayer; exports.offsetLayer = offsetLayer; exports.setLayerMask = setLayerMask; exports.normalizeFilter = normalizeFilter; exports.addLayerFilter = addLayerFilter; exports.updateLayerFilter = updateLayerFilter; exports.removeLayerFilter = removeLayerFilter; exports.layerEffectsOf = layerEffectsOf; exports.setLayerEffects = setLayerEffects; exports.addLayerEffect = addLayerEffect; exports.updateLayerEffect = updateLayerEffect; exports.removeLayerEffect = removeLayerEffect; exports.setLayerEffectsEnabled = setLayerEffectsEnabled; exports.parseBlend = parseBlend; exports.unionRect = unionRect; exports.SHAPE_RENDER_MARGIN = SHAPE_RENDER_MARGIN; exports.DEFAULT_MITER_LIMIT = DEFAULT_MITER_LIMIT; exports.mapSubpaths = mapSubpaths; exports.liveShapeSubpaths = liveShapeSubpaths; exports.liveComponent = liveComponent; exports.componentPath = componentPath; exports.shapeOutline = shapeOutline; exports.shapeGeometryBounds = shapeGeometryBounds; exports.shapeRenderClip = shapeRenderClip; exports.renderShapeRect = renderShapeRect; exports.renderShape = renderShape; exports.rerenderShape = rerenderShape; exports.normalizeShapePaint = normalizeShapePaint; exports.normalizeShapeStroke = normalizeShapeStroke; exports.normalizeLiveShape = normalizeLiveShape; exports.normalizeSubpaths = normalizeSubpaths; exports.requireOperation = requireOperation; exports.requireShapeLayer = requireShapeLayer; exports.createShapeLayer = createShapeLayer; exports.defaultShapeName = defaultShapeName; exports.updateShapeLayer = updateShapeLayer; exports.transformShapeComponents = transformShapeComponents; exports.offsetShape = offsetShape; exports.mergeShapeComponents = mergeShapeComponents; exports.shapeAsPixelLayer = shapeAsPixelLayer; exports.shapeFromAnnotation = shapeFromAnnotation; exports.annotationBlend = annotationBlend; exports.annotationOfShape = annotationOfShape; exports.TEXT_RENDER_MARGIN = TEXT_RENDER_MARGIN; exports.textMatrix = textMatrix; exports.textOutlines = textOutlines; exports.renderText = renderText; exports.rerenderText = rerenderText; exports.TEXT_STYLE_FIELDS = TEXT_STYLE_FIELDS; exports.patchTextStyle = patchTextStyle; exports.PARAGRAPH_STYLE_FIELDS = PARAGRAPH_STYLE_FIELDS; exports.patchParagraphStyle = patchParagraphStyle; exports.textRange = textRange; exports.requireTypeLayer = requireTypeLayer; exports.normalizeText = normalizeText; exports.typeLayerName = typeLayerName; exports.createTypeLayer = createTypeLayer; exports.updateTypeLayer = updateTypeLayer; exports.replaceTextRange = replaceTextRange; exports.transformTypeLayer = transformTypeLayer; exports.typeFrame = typeFrame; exports.typeAsPixelLayer = typeAsPixelLayer; exports.toTextSpace = toTextSpace; exports.typeFromAnnotation = typeFromAnnotation; exports.annotationOfType = annotationOfType; exports.BACKGROUND_LAYER_ID = BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = BACKGROUND_LAYER_NAME; exports.DEVELOP_FILTER_ID = DEVELOP_FILTER_ID; exports.BLUR_FILTER_ID = BLUR_FILTER_ID; exports.rasterMaskFromLegacy = rasterMaskFromLegacy; exports.hasResampledLegacyMask = hasResampledLegacyMask; exports.legacyMaskOf = legacyMaskOf; exports.isDefaultDepthMask = isDefaultDepthMask; exports.developFromAdjustments = developFromAdjustments; exports.annotationLayerName = annotationLayerName; exports.annotationLayerFor = annotationLayerFor; exports.annotationOfLayer = annotationOfLayer; exports.adjustmentNodeFromLegacy = adjustmentNodeFromLegacy; exports.backgroundLayer = backgroundLayer; exports.depthRasterMask = depthRasterMask; exports.layersFromLegacy = layersFromLegacy; exports.legacyAdjustmentLayer = legacyAdjustmentLayer; exports.developTarget = developTarget; exports.legacyView = legacyView; exports.isLegacyShape = isLegacyShape; exports.FREE_TRANSFORM_MODES = FREE_TRANSFORM_MODES; exports.TRANSFORM_ANCHORS = TRANSFORM_ANCHORS; exports.isTransformAnchor = isTransformAnchor; exports.identityTransform = identityTransform; exports.cornersFromMatrix = cornersFromMatrix; exports.matrixFromCorners = matrixFromCorners; exports.transformHomography = transformHomography; exports.hasWarp = hasWarp; exports.isIdentityTransform = isIdentityTransform; exports.transformMap = transformMap; exports.transformedPoint = transformedPoint; exports.anchorPoint = anchorPoint; exports.transformedBox = transformedBox; exports.referencePoint = referencePoint; exports.matrixFromParams = matrixFromParams; exports.describeTransform = describeTransform; exports.applyParams = applyParams; exports.flipCorners = flipCorners; exports.boxPointOf = boxPointOf; exports.presetWarp = presetWarp; exports.isValidWarp = isValidWarp; exports.geometryHomography = geometryHomography; exports.SMART_RENDER_MARGIN = SMART_RENDER_MARGIN; exports.newContentsId = newContentsId; exports.contentsBox = contentsBox; exports.placementGeometry = placementGeometry; exports.placementAt = placementAt; exports.isContentsDecoded = isContentsDecoded; exports.requireSmartObject = requireSmartObject; exports.contentsSurface = contentsSurface; exports.rasterContents = rasterContents; exports.documentContents = documentContents; exports.placeContents = placeContents; exports.activeSmartFilters = activeSmartFilters; exports.filterMaskCoverage = filterMaskCoverage; exports.applySmartFilters = applySmartFilters; exports.renderSmartObject = renderSmartObject; exports.rerender = rerender; exports.normalizePlacement = normalizePlacement; exports.setSmartPlacement = setSmartPlacement; exports.offsetSmartObject = offsetSmartObject; exports.convertToSmartObject = convertToSmartObject; exports.rasterizeSmartObject = rasterizeSmartObject; exports.copySmartObject = copySmartObject; exports.instancesOf = instancesOf; exports.replaceContents = replaceContents; exports.normalizeSmartFilter = normalizeSmartFilter; exports.addSmartFilter = addSmartFilter; exports.updateSmartFilter = updateSmartFilter; exports.removeSmartFilter = removeSmartFilter; exports.moveSmartFilter = moveSmartFilter; exports.setSmartFiltersEnabled = setSmartFiltersEnabled; exports.setSmartFilterMask = setSmartFilterMask; exports.withFilterMaskSurface = withFilterMaskSurface; exports.placementBounds = placementBounds; exports.LAYERED_SCHEMA_VERSION = LAYERED_SCHEMA_VERSION; exports.serializePatterns = serializePatterns; exports.deserializePatterns = deserializePatterns; exports.encodeSurface = encodeSurface; exports.encodeDeepSurface = encodeDeepSurface; exports.decodeDeepSurface = decodeDeepSurface; exports.serializeEffects = serializeEffects; exports.deserializeEffects = deserializeEffects; exports.serializeLayer = serializeLayer; exports.serializeContents = serializeContents; exports.serializeLayers = serializeLayers; exports.serializeLayersExternal = serializeLayersExternal; exports.resolveExternalAssets = resolveExternalAssets; exports.decodePngDataUrl = decodePngDataUrl; exports.deserializeLayer = deserializeLayer; exports.deserializeLayers = deserializeLayers; exports.PsdError = PsdError; exports.parseVersionedDescriptor = parseVersionedDescriptor; exports.versionedDescriptorBytes = versionedDescriptorBytes; exports.ADJUSTMENT_KEYS = ADJUSTMENT_KEYS; exports.SUPPORTED_ADJUSTMENT_KEYS = SUPPORTED_ADJUSTMENT_KEYS; exports.parseAdjustmentBlock = parseAdjustmentBlock; exports.writeAdjustmentBlock = writeAdjustmentBlock; exports.parseLfx2 = parseLfx2; exports.writeLfx2 = writeLfx2; exports.parseLrfx = parseLrfx; exports.decodePlanes = decodePlanes; exports.encodeRle = encodeRle; exports.BROWSER_IMAGE_TYPES = BROWSER_IMAGE_TYPES; exports.readPsd = readPsd; exports.layerName = layerName; exports.layerTree = layerTree; exports.decodeLayerChannel = decodeLayerChannel; exports.decodeMergedImage = decodeMergedImage; exports.writePsd = writePsd; exports.PATTERN_BLOCK_KEYS = PATTERN_BLOCK_KEYS; exports.parsePatternBlock = parsePatternBlock; exports.psdPatternToEffectPattern = psdPatternToEffectPattern; exports.writePatternBlock = writePatternBlock; exports.PSD_BLEND_KEYS = PSD_BLEND_KEYS; exports.psdToLayers = psdToLayers; exports.importPsd = importPsd; exports.smartContentsFile = smartContentsFile; exports.exportPsd = exportPsd;
11738
- //# sourceMappingURL=chunk-ZYZGEILO.cjs.map
11738
+ //# sourceMappingURL=chunk-2J3LS7JZ.cjs.map