@pixerate/editor 0.164.0 → 0.166.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 (146) hide show
  1. package/dist/agent/index.cjs +54 -39
  2. package/dist/agent/index.js +24 -9
  3. package/dist/animation/index.cjs +6 -5
  4. package/dist/animation/index.js +5 -4
  5. package/dist/animation-editor/index.cjs +65 -64
  6. package/dist/animation-editor/index.js +8 -7
  7. package/dist/bridge/cli.cjs +3 -3
  8. package/dist/bridge/cli.js +2 -2
  9. package/dist/bridge/index.cjs +3 -3
  10. package/dist/bridge/index.js +2 -2
  11. package/dist/canvas/index.cjs +89 -87
  12. package/dist/canvas/index.js +11 -9
  13. package/dist/chart/controller.d.cts +60 -2
  14. package/dist/chart/controller.d.ts +60 -2
  15. package/dist/chart/index.cjs +657 -163
  16. package/dist/chart/index.d.cts +3 -0
  17. package/dist/chart/index.d.ts +3 -0
  18. package/dist/chart/index.js +512 -18
  19. package/dist/chart/layout-families.d.cts +14 -0
  20. package/dist/chart/layout-families.d.ts +14 -0
  21. package/dist/chart/layout-shared.d.cts +5 -0
  22. package/dist/chart/layout-shared.d.ts +5 -0
  23. package/dist/chart/links.d.cts +34 -0
  24. package/dist/chart/links.d.ts +34 -0
  25. package/dist/chart/mermaid.d.cts +9 -6
  26. package/dist/chart/mermaid.d.ts +9 -6
  27. package/dist/chart/race.d.cts +26 -0
  28. package/dist/chart/race.d.ts +26 -0
  29. package/dist/chart/schemas.d.cts +5 -0
  30. package/dist/chart/schemas.d.ts +5 -0
  31. package/dist/chart/spec.d.cts +3 -2
  32. package/dist/chart/spec.d.ts +3 -2
  33. package/dist/chart/style.d.cts +33 -0
  34. package/dist/chart/style.d.ts +33 -0
  35. package/dist/chart/types.d.cts +28 -2
  36. package/dist/chart/types.d.ts +28 -2
  37. package/dist/{chunk-ZVNAMTFO.cjs → chunk-3FSUJIXN.cjs} +18 -174
  38. package/dist/{chunk-RQCMSEM5.cjs → chunk-4QUUHTGJ.cjs} +2 -2
  39. package/dist/{chunk-CIPIESX4.cjs → chunk-4ZC5QJE2.cjs} +3 -3
  40. package/dist/{chunk-S6X2QRVU.cjs → chunk-5UEFBM2M.cjs} +1 -138
  41. package/dist/{chunk-5FNGLV2D.js → chunk-5UNQDC3Q.js} +18 -3
  42. package/dist/{chunk-YSAGBIRW.cjs → chunk-6FYIFGBW.cjs} +16 -16
  43. package/dist/{chunk-QYZGBVNC.js → chunk-7272D3K2.js} +10 -8
  44. package/dist/{chunk-462WGGXX.cjs → chunk-AMX23CSN.cjs} +27 -16
  45. package/dist/{chunk-3VLOOO3G.js → chunk-BDIM6NVW.js} +1 -1
  46. package/dist/{chunk-R3P2M7HU.cjs → chunk-BPX4Z3N3.cjs} +355 -207
  47. package/dist/{chunk-D54JHQK2.cjs → chunk-CHLV7UFP.cjs} +51 -51
  48. package/dist/{chunk-OXERWBKE.js → chunk-DFCAR7AW.js} +3 -3
  49. package/dist/{chunk-GZ2FM3ZB.js → chunk-DKNEQX7T.js} +6 -162
  50. package/dist/{chunk-JCXMJUQO.cjs → chunk-EGZM52EO.cjs} +3 -3
  51. package/dist/{chunk-ES3UEVUT.cjs → chunk-EUIDTZNQ.cjs} +112 -110
  52. package/dist/{chunk-H3OEM3Q2.js → chunk-F6R67I3A.js} +1 -1
  53. package/dist/{chunk-3NEZJCBY.js → chunk-FR432ROA.js} +349 -201
  54. package/dist/chunk-HIDFL5LQ.js +484 -0
  55. package/dist/{chunk-22KLZZGH.cjs → chunk-HXOBOHH2.cjs} +8 -8
  56. package/dist/{chunk-MKTDELCD.js → chunk-I5MRJW7B.js} +1 -1
  57. package/dist/{chunk-SDHZG5TF.js → chunk-ILP77UD6.js} +160 -2
  58. package/dist/{chunk-Z4P2RBMJ.js → chunk-ITANXMZD.js} +177 -3
  59. package/dist/chunk-KGRZMHZB.js +204 -0
  60. package/dist/{chunk-SET6KJOP.js → chunk-LPIKXPBM.js} +1 -1
  61. package/dist/{chunk-BQWGN5WH.js → chunk-M2TPMYJE.js} +1 -1
  62. package/dist/{chunk-GTELFJRE.cjs → chunk-M5GLQQWG.cjs} +2 -2
  63. package/dist/{chunk-4VU4CP7R.js → chunk-MHLU6GRJ.js} +1 -138
  64. package/dist/{chunk-NZD2MZJC.cjs → chunk-MZFZSVUJ.cjs} +38 -23
  65. package/dist/{chunk-DAPQGA55.js → chunk-NQQDGGXY.js} +2 -2
  66. package/dist/chunk-O6OGNDND.js +164 -0
  67. package/dist/{chunk-PA3IMPPS.cjs → chunk-OVYQAYGH.cjs} +81 -81
  68. package/dist/{chunk-YXOW456B.js → chunk-PPEDZ5WR.js} +1 -1
  69. package/dist/{chunk-24M7VD6M.cjs → chunk-S4EIAIEW.cjs} +7 -7
  70. package/dist/{chunk-M4MIZPQI.cjs → chunk-SJ2CPTQC.cjs} +189 -15
  71. package/dist/{chunk-YGG7WDWT.cjs → chunk-SZWVMB3B.cjs} +24 -18
  72. package/dist/chunk-TFF2GTGN.cjs +153 -0
  73. package/dist/chunk-TTCJPX4U.cjs +204 -0
  74. package/dist/{chunk-SBQVEBSU.cjs → chunk-UUUTEVX6.cjs} +242 -68
  75. package/dist/{chunk-WI7QJA7A.cjs → chunk-UXETV2NC.cjs} +161 -3
  76. package/dist/{chunk-GKNEJ6EN.cjs → chunk-V5L2G22R.cjs} +321 -107
  77. package/dist/{chunk-TALQONZ5.js → chunk-VB2CY6EG.js} +3 -3
  78. package/dist/{chunk-QY4KUDMY.js → chunk-VRXXAXUT.js} +2 -2
  79. package/dist/chunk-VU6WQSMB.cjs +164 -0
  80. package/dist/{chunk-NHLYK3AX.js → chunk-XBQX76CT.js} +182 -8
  81. package/dist/{chunk-5AARIS3R.cjs → chunk-XCDGM7TD.cjs} +37 -37
  82. package/dist/{chunk-POR54B55.js → chunk-XNU45TYA.js} +7 -1
  83. package/dist/{chunk-EVXQNQND.js → chunk-XZB3TJ6K.js} +16 -5
  84. package/dist/chunk-YBAPT7NL.js +153 -0
  85. package/dist/{chunk-SZA42R4N.js → chunk-YUFTVNLX.js} +230 -16
  86. package/dist/chunk-Z2UQYMPS.cjs +484 -0
  87. package/dist/color/index.cjs +5 -3
  88. package/dist/color/index.js +12 -10
  89. package/dist/diagram/index.cjs +55 -243
  90. package/dist/diagram/index.js +12 -200
  91. package/dist/export/index.cjs +7 -6
  92. package/dist/export/index.js +6 -5
  93. package/dist/extensions/index.cjs +12 -9
  94. package/dist/extensions/index.js +11 -8
  95. package/dist/gradient/index.cjs +29 -27
  96. package/dist/gradient/index.js +6 -4
  97. package/dist/image-editor/index.cjs +644 -643
  98. package/dist/image-editor/index.js +7 -6
  99. package/dist/index.cjs +21 -18
  100. package/dist/index.js +14 -11
  101. package/dist/paint-editor/index.cjs +19 -18
  102. package/dist/paint-editor/index.js +7 -6
  103. package/dist/parameters/index.cjs +2 -2
  104. package/dist/parameters/index.js +1 -1
  105. package/dist/persistence/assetWrites.d.cts +22 -0
  106. package/dist/persistence/assetWrites.d.ts +22 -0
  107. package/dist/persistence/assets.d.cts +71 -0
  108. package/dist/persistence/assets.d.ts +71 -0
  109. package/dist/persistence/documentStore.d.cts +17 -1
  110. package/dist/persistence/documentStore.d.ts +17 -1
  111. package/dist/persistence/documentTools.d.cts +5 -1
  112. package/dist/persistence/documentTools.d.ts +5 -1
  113. package/dist/persistence/editorAutosave.d.cts +7 -0
  114. package/dist/persistence/editorAutosave.d.ts +7 -0
  115. package/dist/persistence/index.cjs +141 -21
  116. package/dist/persistence/index.js +130 -10
  117. package/dist/persistence/storage.d.cts +13 -1
  118. package/dist/persistence/storage.d.ts +13 -1
  119. package/dist/spreadsheet/index.cjs +3 -3
  120. package/dist/spreadsheet/index.js +2 -2
  121. package/dist/tokens/index.cjs +11 -3
  122. package/dist/tokens/index.d.cts +1 -0
  123. package/dist/tokens/index.d.ts +1 -0
  124. package/dist/tokens/index.js +10 -2
  125. package/dist/tokens/style.d.cts +36 -0
  126. package/dist/tokens/style.d.ts +36 -0
  127. package/dist/tools/index.cjs +15 -3
  128. package/dist/tools/index.d.cts +2 -0
  129. package/dist/tools/index.d.ts +2 -0
  130. package/dist/tools/index.js +14 -2
  131. package/dist/tools/style-tools.d.cts +19 -0
  132. package/dist/tools/style-tools.d.ts +19 -0
  133. package/dist/tools/style.d.cts +212 -0
  134. package/dist/tools/style.d.ts +212 -0
  135. package/dist/tools/view.d.cts +6 -0
  136. package/dist/tools/view.d.ts +6 -0
  137. package/dist/typography/index.cjs +8 -6
  138. package/dist/typography/index.js +5 -3
  139. package/dist/vector/index.cjs +953 -952
  140. package/dist/vector/index.js +7 -6
  141. package/dist/video-editor/index.cjs +8 -7
  142. package/dist/video-editor/index.js +6 -5
  143. package/package.json +1 -1
  144. package/skills/pixerate-chart/SKILL.md +20 -2
  145. package/dist/chunk-ERAGQL2N.cjs +0 -68
  146. package/dist/chunk-KMU6QJB7.js +0 -68
@@ -369,7 +369,7 @@ var _chunk5UEFNX24cjs = require('../chunk-5UEFNX24.cjs');
369
369
 
370
370
 
371
371
 
372
- var _chunkPA3IMPPScjs = require('../chunk-PA3IMPPS.cjs');
372
+ var _chunkOVYQAYGHcjs = require('../chunk-OVYQAYGH.cjs');
373
373
 
374
374
 
375
375
  var _chunkA2IS7EHEcjs = require('../chunk-A2IS7EHE.cjs');
@@ -624,7 +624,7 @@ var _chunkBROJYMWUcjs = require('../chunk-BROJYMWU.cjs');
624
624
 
625
625
 
626
626
 
627
- var _chunkJCXMJUQOcjs = require('../chunk-JCXMJUQO.cjs');
627
+ var _chunkEGZM52EOcjs = require('../chunk-EGZM52EO.cjs');
628
628
  require('../chunk-YQ5C5BVK.cjs');
629
629
  require('../chunk-CVFAAZXE.cjs');
630
630
  require('../chunk-GF2RBSDM.cjs');
@@ -838,12 +838,13 @@ require('../chunk-UWEQ55MY.cjs');
838
838
 
839
839
 
840
840
 
841
- var _chunkM4MIZPQIcjs = require('../chunk-M4MIZPQI.cjs');
841
+ var _chunkSJ2CPTQCcjs = require('../chunk-SJ2CPTQC.cjs');
842
842
  require('../chunk-2BSBFBOA.cjs');
843
- require('../chunk-CIPIESX4.cjs');
843
+ require('../chunk-4ZC5QJE2.cjs');
844
844
  require('../chunk-A6QWKBJP.cjs');
845
- require('../chunk-ES3UEVUT.cjs');
846
- require('../chunk-S6X2QRVU.cjs');
845
+ require('../chunk-EUIDTZNQ.cjs');
846
+ require('../chunk-TFF2GTGN.cjs');
847
+ require('../chunk-5UEFBM2M.cjs');
847
848
  require('../chunk-IPJ3TEYR.cjs');
848
849
 
849
850
  // src/image-editor/histogram.ts
@@ -949,7 +950,7 @@ function quickMaskPixels(mask, style = {}) {
949
950
 
950
951
  // src/image-editor/layers/render.ts
951
952
  function isQuarterTurn(rotate) {
952
- return _chunkPA3IMPPScjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
953
+ return _chunkOVYQAYGHcjs.normalizeAngle.call(void 0, rotate) % 90 === 0;
953
954
  }
954
955
  function isIntegerRect(r) {
955
956
  return Number.isInteger(r.x) && Number.isInteger(r.y) && Number.isInteger(r.width) && Number.isInteger(r.height);
@@ -957,7 +958,7 @@ function isIntegerRect(r) {
957
958
  function baseProjection(region, transform, baseW, baseH) {
958
959
  return {
959
960
  region,
960
- angle: _chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate),
961
+ angle: _chunkOVYQAYGHcjs.normalizeAngle.call(void 0, transform.rotate),
961
962
  flipH: transform.flipH,
962
963
  flipV: transform.flipV,
963
964
  scale: 1,
@@ -966,14 +967,14 @@ function baseProjection(region, transform, baseW, baseH) {
966
967
  };
967
968
  }
968
969
  function projectQuarterTurn(src, srcRect, region, transform) {
969
- const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
970
+ const rotated = _chunkOVYQAYGHcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
970
971
  const w = Math.max(1, Math.round(rotated.width));
971
972
  const h = Math.max(1, Math.round(rotated.height));
972
973
  const out = new Uint8ClampedArray(w * h * 4);
973
974
  const p = baseProjection(region, transform, w, h);
974
- const o = _chunkPA3IMPPScjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
975
- const ox = _chunkPA3IMPPScjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
976
- const oy = _chunkPA3IMPPScjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
975
+ const o = _chunkOVYQAYGHcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 0.5 }, p);
976
+ const ox = _chunkOVYQAYGHcjs.unprojectCanvasPoint.call(void 0, { x: 1.5, y: 0.5 }, p);
977
+ const oy = _chunkOVYQAYGHcjs.unprojectCanvasPoint.call(void 0, { x: 0.5, y: 1.5 }, p);
977
978
  const ux = Math.round(ox.x - o.x);
978
979
  const vx = Math.round(ox.y - o.y);
979
980
  const uy = Math.round(oy.x - o.x);
@@ -1002,23 +1003,23 @@ function applyOutputStage(img, opacity, legacyOutputBlur) {
1002
1003
  const d = img.data;
1003
1004
  for (let i = 3; i < d.length; i += 4) d[i] = d[i] * opacity;
1004
1005
  }
1005
- if (legacyOutputBlur && legacyOutputBlur > 0) _chunkPA3IMPPScjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
1006
+ if (legacyOutputBlur && legacyOutputBlur > 0) _chunkOVYQAYGHcjs.applyBoxBlur.call(void 0, img, Math.min(Math.round(legacyOutputBlur), 40));
1006
1007
  }
1007
1008
  function needsLegacyBase(input) {
1008
1009
  const { stack, region, canvas, transform } = input;
1009
- if (!_chunkPA3IMPPScjs.isLegacyShape.call(void 0, stack)) return false;
1010
+ if (!_chunkOVYQAYGHcjs.isLegacyShape.call(void 0, stack)) return false;
1010
1011
  const bg = stack.layers[0];
1011
1012
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) return true;
1012
1013
  if (_optionalChain([bg, 'access', _2 => _2.mask, 'optionalAccess', _3 => _3.source, 'optionalAccess', _4 => _4.enabled]) && bg.mask.source.maskSource) return true;
1013
1014
  if (stack.outputOpacity < 1) return true;
1014
- const blur = _chunkPA3IMPPScjs.blurFilter.call(void 0, bg);
1015
+ const blur = _chunkOVYQAYGHcjs.blurFilter.call(void 0, bg);
1015
1016
  if (blur && blur.enabled && blur.radius > 0) {
1016
1017
  const full = region.x === 0 && region.y === 0 && region.width === canvas.width && region.height === canvas.height;
1017
- const angle = _chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate);
1018
+ const angle = _chunkOVYQAYGHcjs.normalizeAngle.call(void 0, transform.rotate);
1018
1019
  if (!full || angle === 90 || angle === 270) return true;
1019
1020
  }
1020
1021
  if ((_nullishCoalesce(stack.legacyOutputBlur, () => ( 0))) > 0 && !input.sourceOpaque) return true;
1021
- if (_chunkPA3IMPPScjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
1022
+ if (_chunkOVYQAYGHcjs.hasResampledLegacyMask.call(void 0, stack.layers, canvas.width, canvas.height)) return true;
1022
1023
  return false;
1023
1024
  }
1024
1025
  var isPlainAnnotation = (l) => l.type === "annotation" ? l.opacity === 1 && l.blend === "normal" && !l.clipped && !l.mask : (l.type === "shape" || l.type === "type") && Boolean(l.annotation) && l.opacity === 1 && l.blend === (_nullishCoalesce(l.annotation.blend, () => ( "normal"))) && !l.clipped && !l.mask && !l.effects && (_nullishCoalesce(l.fillOpacity, () => ( 1))) === 1;
@@ -1050,7 +1051,7 @@ function coveringRect(region) {
1050
1051
  const y = Math.floor(region.y);
1051
1052
  return { x, y, width: Math.ceil(region.x + region.width) - x, height: Math.ceil(region.y + region.height) - y };
1052
1053
  }
1053
- function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)()) {
1054
+ function renderLayeredBase(stack, region, transform, sources, compositor = new (0, _chunkOVYQAYGHcjs.LayerCompositor)()) {
1054
1055
  if (!isQuarterTurn(transform.rotate) || !isIntegerRect(region)) {
1055
1056
  throw new Error("renderLayeredBase needs an integer region and a quarter-turn rotation.");
1056
1057
  }
@@ -1184,8 +1185,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1184
1185
  * The viewport's compositor. It only ever composites the viewport's stack, so its tile cache can
1185
1186
  * trust dirty rectangles; exports use `exportCompositor`.
1186
1187
  */
1187
- __init8() {this.compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)()}
1188
- __init9() {this.exportCompositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1188
+ __init8() {this.compositor = new (0, _chunkOVYQAYGHcjs.LayerCompositor)()}
1189
+ __init9() {this.exportCompositor = new (0, _chunkOVYQAYGHcjs.LayerCompositor)({ maxCacheBytes: 64 * 1024 * 1024 })}
1189
1190
  /** How the host resolves layer pixels (set by the controller). */
1190
1191
 
1191
1192
  /**
@@ -1264,9 +1265,9 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1264
1265
  return;
1265
1266
  }
1266
1267
  const isActivelyCropping = Boolean(options.showCropOverlay || state.activeTool === "crop");
1267
- const projection = _chunkPA3IMPPScjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1268
+ const projection = _chunkOVYQAYGHcjs.getViewportProjection.call(void 0, geoState, vpWidth, vpHeight, isActivelyCropping);
1268
1269
  const { region } = projection;
1269
- const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1270
+ const rotated = _chunkOVYQAYGHcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1270
1271
  const route = this.chooseRoute(state, region, naturalWidth, naturalHeight);
1271
1272
  let overlay = annotations;
1272
1273
  if (route === "legacy") {
@@ -1276,8 +1277,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1276
1277
  `${naturalWidth}x${naturalHeight}`,
1277
1278
  `${region.x},${region.y},${region.width},${region.height}`,
1278
1279
  `${projection.angle},${transform.flipH},${transform.flipV}`,
1279
- `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1280
- _chunkPA3IMPPScjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1280
+ `${adjustments.brightness},${adjustments.contrast},${adjustments.saturation},${adjustments.exposure},${adjustments.temperature},${_nullishCoalesce(adjustments.tint, () => ( 0))},${adjustments.blur},${adjustments.opacity},p${_chunkOVYQAYGHcjs.normalizeProcessVersion.call(void 0, adjustments.process)}`,
1281
+ _chunkOVYQAYGHcjs.adjustmentLayersKey.call(void 0, adjustments.layers),
1281
1282
  `${depthMask.enabled},${depthMask.maskSource},${_optionalChain([depthMask, 'access', _5 => _5.depthRange, 'optionalAccess', _6 => _6[0]])}-${_optionalChain([depthMask, 'access', _7 => _7.depthRange, 'optionalAccess', _8 => _8[1]])},${depthMask.softness},${depthMask.invert},${depthMask.mode}`,
1282
1283
  `d${this.displayKey}`
1283
1284
  ].join("|");
@@ -1311,7 +1312,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1311
1312
  }
1312
1313
  if (overlay.length > 0 || options.draftAnnotation) {
1313
1314
  ctx.save();
1314
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1315
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1315
1316
  ctx.beginPath();
1316
1317
  ctx.rect(region.x, region.y, region.width, region.height);
1317
1318
  ctx.clip();
@@ -1334,7 +1335,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1334
1335
  if (_optionalChain([state, 'access', _15 => _15.selection, 'optionalAccess', _16 => _16.bounds]) && display !== "none" || _optionalChain([options, 'access', _17 => _17.draftSelectionPath, 'optionalAccess', _18 => _18.length])) {
1335
1336
  ctx.save();
1336
1337
  try {
1337
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1338
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1338
1339
  ctx.beginPath();
1339
1340
  ctx.rect(region.x, region.y, region.width, region.height);
1340
1341
  ctx.clip();
@@ -1349,7 +1350,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1349
1350
  const b = options.brushCursor;
1350
1351
  ctx.save();
1351
1352
  try {
1352
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1353
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, ctx, projection);
1353
1354
  const px2 = 1 / (projection.scale || 1);
1354
1355
  ctx.beginPath();
1355
1356
  ctx.arc(b.x, b.y, Math.max(px2, b.diameter / 2), 0, Math.PI * 2);
@@ -1364,7 +1365,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1364
1365
  ctx.restore();
1365
1366
  }
1366
1367
  if (options.cloneSourceMarker) {
1367
- const m = _chunkPA3IMPPScjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1368
+ const m = _chunkOVYQAYGHcjs.projectImagePoint.call(void 0, options.cloneSourceMarker, projection);
1368
1369
  ctx.save();
1369
1370
  try {
1370
1371
  const r = 7;
@@ -1388,7 +1389,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1388
1389
  const t = options.textEdit;
1389
1390
  ctx.save();
1390
1391
  try {
1391
- const scr = (p) => _chunkPA3IMPPScjs.projectImagePoint.call(void 0, p, projection);
1392
+ const scr = (p) => _chunkOVYQAYGHcjs.projectImagePoint.call(void 0, p, projection);
1392
1393
  const poly = (pts) => {
1393
1394
  ctx.beginPath();
1394
1395
  pts.map(scr).forEach((p, i) => i ? ctx.lineTo(p.x, p.y) : ctx.moveTo(p.x, p.y));
@@ -1427,7 +1428,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1427
1428
  const t = options.freeTransform;
1428
1429
  ctx.save();
1429
1430
  try {
1430
- const scr = (p) => _chunkPA3IMPPScjs.projectImagePoint.call(void 0, p, projection);
1431
+ const scr = (p) => _chunkOVYQAYGHcjs.projectImagePoint.call(void 0, p, projection);
1431
1432
  ctx.beginPath();
1432
1433
  if (t.warp) {
1433
1434
  for (const c of t.warp.curves) {
@@ -1485,7 +1486,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1485
1486
  }
1486
1487
  if (isActivelyCropping) {
1487
1488
  const activeCrop = options.draftCrop !== void 0 && options.draftCrop !== null ? options.draftCrop : _nullishCoalesce(crop, () => ( { x: 0, y: 0, width: naturalWidth, height: naturalHeight }));
1488
- this.drawCropOverlay(ctx, _chunkPA3IMPPScjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1489
+ this.drawCropOverlay(ctx, _chunkOVYQAYGHcjs.getViewportMetrics.call(void 0, geoState, vpWidth, vpHeight, true, activeCrop));
1489
1490
  }
1490
1491
  }
1491
1492
  /**
@@ -1494,7 +1495,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1494
1495
  */
1495
1496
  async renderBaseImage(img, naturalWidth, naturalHeight, region, transform, state, onPixels) {
1496
1497
  const { adjustments, depthMask } = state;
1497
- const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1498
+ const rotated = _chunkOVYQAYGHcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1498
1499
  const baseW = Math.max(1, Math.round(rotated.width));
1499
1500
  const baseH = Math.max(1, Math.round(rotated.height));
1500
1501
  const baseCanvas = this.createCanvas(baseW, baseH);
@@ -1502,7 +1503,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1502
1503
  if (!baseCtx) return baseCanvas;
1503
1504
  const projection = getBaseProjection(region, transform, baseW, baseH);
1504
1505
  baseCtx.save();
1505
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1506
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, baseCtx, projection);
1506
1507
  baseCtx.drawImage(
1507
1508
  img,
1508
1509
  region.x,
@@ -1517,8 +1518,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1517
1518
  baseCtx.restore();
1518
1519
  const imageData = baseCtx.getImageData(0, 0, baseW, baseH);
1519
1520
  if (imageData) {
1520
- const layerMasks = _chunkPA3IMPPScjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1521
- _chunkPA3IMPPScjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1521
+ const layerMasks = _chunkOVYQAYGHcjs.buildLayerMaskPlanes.call(void 0, adjustments.layers, naturalWidth, naturalHeight, projection, baseW, baseH);
1522
+ _chunkOVYQAYGHcjs.applyAdjustments.call(void 0, imageData, adjustments, layerMasks ? { layerMasks } : {});
1522
1523
  if (depthMask.enabled && depthMask.maskSource) {
1523
1524
  try {
1524
1525
  const maskImg = await this.imageCache.get(depthMask.maskSource);
@@ -1529,7 +1530,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1529
1530
  const maskCtx = maskCanvas.getContext("2d");
1530
1531
  if (maskCtx) {
1531
1532
  maskCtx.save();
1532
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1533
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, maskCtx, projection);
1533
1534
  maskCtx.drawImage(
1534
1535
  maskImg,
1535
1536
  region.x * sx,
@@ -1544,7 +1545,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1544
1545
  maskCtx.restore();
1545
1546
  const maskData = maskCtx.getImageData(0, 0, baseW, baseH);
1546
1547
  if (maskData) {
1547
- _chunkPA3IMPPScjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1548
+ _chunkOVYQAYGHcjs.applyDepthMask.call(void 0, imageData, maskData, depthMask);
1548
1549
  }
1549
1550
  }
1550
1551
  } catch (e8) {
@@ -1563,7 +1564,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1563
1564
  else if (this.baseRoute === "layers") route = "layers";
1564
1565
  else {
1565
1566
  const stack = { layers: state.layers, outputOpacity: _nullishCoalesce(state.outputOpacity, () => ( 1)), legacyOutputBlur: state.legacyOutputBlur };
1566
- const shaped = this.baseRoute === "legacy" && _chunkPA3IMPPScjs.isLegacyShape.call(void 0, stack);
1567
+ const shaped = this.baseRoute === "legacy" && _chunkOVYQAYGHcjs.isLegacyShape.call(void 0, stack);
1567
1568
  route = shaped || needsLegacyBase({
1568
1569
  stack,
1569
1570
  region,
@@ -1698,17 +1699,17 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1698
1699
  if (!comp) return null;
1699
1700
  const opacity = _nullishCoalesce(state.outputOpacity, () => ( 1));
1700
1701
  const blur = _nullishCoalesce(state.legacyOutputBlur, () => ( 0));
1701
- const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1702
+ const rotated = _chunkOVYQAYGHcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
1702
1703
  const baseW = Math.max(1, Math.round(rotated.width));
1703
1704
  const baseH = Math.max(1, Math.round(rotated.height));
1704
- const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1705
+ const key = `${this.displayKey}:${comp.version}|${region.x},${region.y},${region.width},${region.height}|${_chunkOVYQAYGHcjs.normalizeAngle.call(void 0, transform.rotate)},${transform.flipH},${transform.flipV}|${opacity}|${blur}`;
1705
1706
  if (this.cachedPostCanvas && this.cachedPostKey === key) return { canvas: this.cachedPostCanvas, histogram: this.cachedPostHistogram };
1706
1707
  const canvas = this.cachedPostCanvas && this.cachedPostCanvas.width === baseW && this.cachedPostCanvas.height === baseH ? this.cachedPostCanvas : this.createCanvas(baseW, baseH);
1707
1708
  const ctx = canvas.getContext("2d");
1708
1709
  if (!ctx) return null;
1709
1710
  ctx.clearRect(0, 0, baseW, baseH);
1710
1711
  ctx.save();
1711
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1712
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, ctx, baseProjection(region, transform, baseW, baseH));
1712
1713
  ctx.beginPath();
1713
1714
  ctx.rect(region.x, region.y, region.width, region.height);
1714
1715
  ctx.clip();
@@ -1980,7 +1981,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
1980
1981
  ctx.strokeStyle = "#3b82f6";
1981
1982
  ctx.lineWidth = 1.5;
1982
1983
  ctx.setLineDash([4, 4]);
1983
- const bounds = _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, ann);
1984
+ const bounds = _chunkOVYQAYGHcjs.getAnnotationBounds.call(void 0, ann);
1984
1985
  const pad = 4;
1985
1986
  ctx.strokeRect(bounds.x - pad, bounds.y - pad, bounds.width + pad * 2, bounds.height + pad * 2);
1986
1987
  ctx.fillStyle = "#ffffff";
@@ -2001,7 +2002,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2001
2002
  }
2002
2003
  /** @deprecated Use the standalone `getAnnotationBounds` from the geometry module. */
2003
2004
  getAnnotationBounds(ann) {
2004
- return _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, ann);
2005
+ return _chunkOVYQAYGHcjs.getAnnotationBounds.call(void 0, ann);
2005
2006
  }
2006
2007
  /**
2007
2008
  * Draws a rule-of-thirds crop grid overlay. All rectangles come from
@@ -2083,8 +2084,8 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2083
2084
  }
2084
2085
  const { width: naturalWidth, height: naturalHeight } = getSourceSize(img);
2085
2086
  const { crop, transform, annotations } = state;
2086
- const region = crop ? _chunkPA3IMPPScjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2087
- const rotated = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2087
+ const region = crop ? _chunkOVYQAYGHcjs.clampCropToImage.call(void 0, crop, naturalWidth, naturalHeight) : { x: 0, y: 0, width: naturalWidth, height: naturalHeight };
2088
+ const rotated = _chunkOVYQAYGHcjs.getRotatedSize.call(void 0, region.width, region.height, transform);
2088
2089
  const baseW = Math.max(1, Math.round(rotated.width));
2089
2090
  const baseH = Math.max(1, Math.round(rotated.height));
2090
2091
  const exportW = options.width || baseW;
@@ -2113,7 +2114,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2113
2114
  const bctx = baseCanvas.getContext("2d");
2114
2115
  if (bctx) {
2115
2116
  bctx.save();
2116
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2117
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, bctx, baseProjection(region, transform, baseW, baseH));
2117
2118
  bctx.beginPath();
2118
2119
  bctx.rect(region.x, region.y, region.width, region.height);
2119
2120
  bctx.clip();
@@ -2126,7 +2127,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2126
2127
  if (options.includeAnnotations !== false && overlay.length > 0) {
2127
2128
  ctx.save();
2128
2129
  ctx.scale(exportW / baseW, exportH / baseH);
2129
- _chunkPA3IMPPScjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2130
+ _chunkOVYQAYGHcjs.applyImageProjectionToContext.call(void 0, ctx, getBaseProjection(region, transform, baseW, baseH));
2130
2131
  for (const ann of overlay) {
2131
2132
  await this.drawAnnotation(ctx, ann);
2132
2133
  }
@@ -2216,7 +2217,7 @@ var ImageEditorRenderer = (_class2 = class {constructor() { _class2.prototype.__
2216
2217
  case "rect":
2217
2218
  case "image":
2218
2219
  case "text": {
2219
- const b = _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, ann);
2220
+ const b = _chunkOVYQAYGHcjs.getAnnotationBounds.call(void 0, ann);
2220
2221
  ctx.fillRect(b.x, b.y, b.width, b.height);
2221
2222
  break;
2222
2223
  }
@@ -2236,7 +2237,7 @@ function getSourceSize(img, fallbackW = 800, fallbackH = 600) {
2236
2237
  function getBaseProjection(region, transform, baseW, baseH) {
2237
2238
  return {
2238
2239
  region,
2239
- angle: _chunkPA3IMPPScjs.normalizeAngle.call(void 0, transform.rotate),
2240
+ angle: _chunkOVYQAYGHcjs.normalizeAngle.call(void 0, transform.rotate),
2240
2241
  flipH: transform.flipH,
2241
2242
  flipV: transform.flipV,
2242
2243
  scale: 1,
@@ -2513,7 +2514,7 @@ var TextEditSession = (_class5 = class {
2513
2514
  else {
2514
2515
  const layout = this.layout();
2515
2516
  if (layout && layout.lines.length) {
2516
- const c = _chunkJCXMJUQOcjs.caretAt.call(void 0, layout, f);
2517
+ const c = _chunkEGZM52EOcjs.caretAt.call(void 0, layout, f);
2517
2518
  const line = layout.lines[c.line];
2518
2519
  if (to === "home") f = line.start;
2519
2520
  else if (to === "end") {
@@ -2608,7 +2609,7 @@ var TextEditSession = (_class5 = class {
2608
2609
  styleHere() {
2609
2610
  const layer = this.layer;
2610
2611
  const at = this.start > 0 && this.start === this.end ? this.start - 1 : this.start;
2611
- return _chunkJCXMJUQOcjs.styleAt.call(void 0, layer.runs, at, _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE);
2612
+ return _chunkEGZM52EOcjs.styleAt.call(void 0, layer.runs, at, _chunkEGZM52EOcjs.DEFAULT_TEXT_STYLE);
2612
2613
  }
2613
2614
  info() {
2614
2615
  return this.controller.getTextLayer(this.layerId);
@@ -2617,8 +2618,8 @@ var TextEditSession = (_class5 = class {
2617
2618
  overlay() {
2618
2619
  const layer = this.layer;
2619
2620
  const layout = this.layout();
2620
- const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
2621
- const at = (x, y) => _chunkJCXMJUQOcjs.applyMatrix.call(void 0, m, { x, y });
2621
+ const m = _chunkOVYQAYGHcjs.textMatrix.call(void 0, layer);
2622
+ const at = (x, y) => _chunkEGZM52EOcjs.applyMatrix.call(void 0, m, { x, y });
2622
2623
  let frame = null;
2623
2624
  if (layer.frame.kind === "box") frame = [at(0, 0), at(layer.frame.width, 0), at(layer.frame.width, layer.frame.height), at(0, layer.frame.height)];
2624
2625
  else if (layout) {
@@ -2638,7 +2639,7 @@ var TextEditSession = (_class5 = class {
2638
2639
  selection.push([at(x0, top), at(x1, top), at(x1, bottom), at(x0, bottom)]);
2639
2640
  }
2640
2641
  }
2641
- const c = _chunkJCXMJUQOcjs.caretAt.call(void 0, layout, this.focus);
2642
+ const c = _chunkEGZM52EOcjs.caretAt.call(void 0, layout, this.focus);
2642
2643
  return { caret: [at(c.x, c.top), at(c.x, c.bottom)], selection, frame };
2643
2644
  }
2644
2645
  /** Ends editing: an empty layer made for this session is deleted (as Photoshop does). Returns whether the layer remains. */
@@ -2653,7 +2654,7 @@ var TextEditSession = (_class5 = class {
2653
2654
  }
2654
2655
  if (this.layer.name === "Text" && this.changed) {
2655
2656
  try {
2656
- this.controller.setLayerProperties(this.layerId, { name: _chunkPA3IMPPScjs.typeLayerName.call(void 0, this.text) }, false);
2657
+ this.controller.setLayerProperties(this.layerId, { name: _chunkOVYQAYGHcjs.typeLayerName.call(void 0, this.text) }, false);
2657
2658
  } catch (e15) {
2658
2659
  }
2659
2660
  }
@@ -2664,8 +2665,8 @@ function typeLayerAt(controller, p, slop = 4) {
2664
2665
  const layers = [...flattenTypeLayers(controller.getLayers())].reverse();
2665
2666
  for (const l of layers) {
2666
2667
  if (!l.visible) continue;
2667
- const inv = invert(_chunkPA3IMPPScjs.textMatrix.call(void 0, l));
2668
- const q = _chunkJCXMJUQOcjs.applyMatrix.call(void 0, inv, p);
2668
+ const inv = invert(_chunkOVYQAYGHcjs.textMatrix.call(void 0, l));
2669
+ const q = _chunkEGZM52EOcjs.applyMatrix.call(void 0, inv, p);
2669
2670
  let b = null;
2670
2671
  if (l.frame.kind === "box") b = { x: 0, y: 0, width: l.frame.width, height: l.frame.height };
2671
2672
  else {
@@ -2804,8 +2805,8 @@ function polygonCoverage(points, width, height, antiAlias = true) {
2804
2805
  }
2805
2806
  function toMask(width, height, coverage) {
2806
2807
  const out = new Uint8Array(coverage.length);
2807
- for (let i = 0; i < out.length; i++) out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, coverage[i]);
2808
- return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height, out);
2808
+ for (let i = 0; i < out.length; i++) out[i] = _chunkOVYQAYGHcjs.coverageToByte.call(void 0, coverage[i]);
2809
+ return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, width, height, out);
2809
2810
  }
2810
2811
  function polygonSelection(width, height, points, options = {}) {
2811
2812
  return toMask(width, height, polygonCoverage(points, width, height, _nullishCoalesce(options.antiAlias, () => ( true))));
@@ -2932,7 +2933,7 @@ function magicWand(pixels, seed, options = {}) {
2932
2933
  const { width: w, height: h } = pixels;
2933
2934
  const sx = Math.floor(seed.x);
2934
2935
  const sy = Math.floor(seed.y);
2935
- if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h);
2936
+ if (!(sx >= 0 && sy >= 0 && sx < w && sy < h)) return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, w, h);
2936
2937
  const similar = similarity(pixels, sy * w + sx, _nullishCoalesce(options.tolerance, () => ( 32)), _nullishCoalesce(options.distance, () => ( "rgb")));
2937
2938
  const marks = new Uint8Array(n);
2938
2939
  let bx0 = w;
@@ -2980,9 +2981,9 @@ function magicWand(pixels, seed, options = {}) {
2980
2981
  }
2981
2982
  }
2982
2983
  }
2983
- if (bx1 < 0) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h);
2984
- if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h, marks);
2985
- return _chunkPA3IMPPScjs.createSelectionMask.call(void 0,
2984
+ if (bx1 < 0) return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, w, h);
2985
+ if (!(_nullishCoalesce(options.antiAlias, () => ( true)))) return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, w, h, marks);
2986
+ return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0,
2986
2987
  w,
2987
2988
  h,
2988
2989
  antialiasMarks(marks, w, h, Math.max(0, bx0 - 1), Math.max(0, by0 - 1), Math.min(w, bx1 + 2), Math.min(h, by1 + 2))
@@ -3004,7 +3005,7 @@ function colorRange(pixels, samples, options = {}) {
3004
3005
  const parsed = samples.map((s) => ({ c: sampleColor(s.color), at: s.at }));
3005
3006
  const radius = options.localized !== void 0 ? Math.max(1, options.localized) : void 0;
3006
3007
  const out = new Uint8Array(n);
3007
- if (!parsed.length) return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h, out);
3008
+ if (!parsed.length) return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, w, h, out);
3008
3009
  for (let i = 0; i < n; i++) {
3009
3010
  const p = i * 4;
3010
3011
  if (data[p + 3] <= 0) continue;
@@ -3020,9 +3021,9 @@ function colorRange(pixels, samples, options = {}) {
3020
3021
  }
3021
3022
  if (k > best) best = k;
3022
3023
  }
3023
- out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, best);
3024
+ out[i] = _chunkOVYQAYGHcjs.coverageToByte.call(void 0, best);
3024
3025
  }
3025
- return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, w, h, out);
3026
+ return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, w, h, out);
3026
3027
  }
3027
3028
  var TONE_RANGE_PRESETS = {
3028
3029
  shadows: [0, 65],
@@ -3040,9 +3041,9 @@ function toneRange(pixels, range, falloff = 20) {
3040
3041
  if (d[p + 3] <= 0) continue;
3041
3042
  const l = Math.min(255, Math.max(0, 0.299 * d[p] + 0.587 * d[p + 1] + 0.114 * d[p + 2]));
3042
3043
  const outside = l < lo ? lo - l : l > hi ? l - hi : 0;
3043
- out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, 1 - outside / ramp);
3044
+ out[i] = _chunkOVYQAYGHcjs.coverageToByte.call(void 0, 1 - outside / ramp);
3044
3045
  }
3045
- return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
3046
+ return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
3046
3047
  }
3047
3048
  function hueRange(pixels, center) {
3048
3049
  const n = checkPixels(pixels);
@@ -3065,9 +3066,9 @@ function hueRange(pixels, center) {
3065
3066
  hue *= 60;
3066
3067
  let dh = ((hue - center) % 360 + 360) % 360;
3067
3068
  dh = Math.min(dh, 360 - dh);
3068
- out[i] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
3069
+ out[i] = _chunkOVYQAYGHcjs.coverageToByte.call(void 0, Math.min(1, Math.max(0, 1 - dh / 60)) * chroma * (2 - mx));
3069
3070
  }
3070
- return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
3071
+ return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, pixels.width, pixels.height, out);
3071
3072
  }
3072
3073
 
3073
3074
  // src/image-editor/selection/refine.ts
@@ -3201,9 +3202,9 @@ function edgeWidth(guide, w, h, r) {
3201
3202
  g[yy * w + xx] = Math.sqrt(gx * gx + gy * gy);
3202
3203
  }
3203
3204
  }
3204
- const gm = _chunkPA3IMPPScjs.greyMorphology.call(void 0, g, w, h, r, true);
3205
- const hi = _chunkPA3IMPPScjs.greyMorphology.call(void 0, y, w, h, r, true);
3206
- const lo = _chunkPA3IMPPScjs.greyMorphology.call(void 0, y, w, h, r, false);
3205
+ const gm = _chunkOVYQAYGHcjs.greyMorphology.call(void 0, g, w, h, r, true);
3206
+ const hi = _chunkOVYQAYGHcjs.greyMorphology.call(void 0, y, w, h, r, true);
3207
+ const lo = _chunkOVYQAYGHcjs.greyMorphology.call(void 0, y, w, h, r, false);
3207
3208
  const out = new Float32Array(n);
3208
3209
  for (let i = 0; i < n; i++) out[i] = (hi[i] - lo[i]) / Math.max(gm[i], 1e-4);
3209
3210
  return out;
@@ -3227,7 +3228,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
3227
3228
  }
3228
3229
  }
3229
3230
  if (any) {
3230
- const dist = _chunkPA3IMPPScjs.distanceTransform.call(void 0, boundary, w, h);
3231
+ const dist = _chunkOVYQAYGHcjs.distanceTransform.call(void 0, boundary, w, h);
3231
3232
  const r = gfRadius(p);
3232
3233
  const q = guidedFilterColor(guide, m, w, h, r);
3233
3234
  const widths = p.smartRadius ? edgeWidth(guide, w, h, r) : null;
@@ -3253,7 +3254,7 @@ function refineCoverage(guide, m, w, h, params = {}) {
3253
3254
  for (let i = 0; i < a.length; i++) a[i] = Math.min(1, Math.max(0, (a[i] - 0.5) * gain + 0.5));
3254
3255
  }
3255
3256
  const amount = shiftAmount(p);
3256
- if (Math.abs(amount) >= 1e-4) a = _chunkPA3IMPPScjs.shiftCoverage.call(void 0, a, w, h, amount);
3257
+ if (Math.abs(amount) >= 1e-4) a = _chunkOVYQAYGHcjs.shiftCoverage.call(void 0, a, w, h, amount);
3257
3258
  return a;
3258
3259
  }
3259
3260
  function guidePlanes(pixels, win) {
@@ -3297,9 +3298,9 @@ function refineSelection(pixels, mask, params = {}) {
3297
3298
  const out = new Uint8Array(mask.width * mask.height);
3298
3299
  for (let y = 0; y < wh; y++) {
3299
3300
  const dst = (y0 + y) * mask.width + x0;
3300
- for (let x = 0; x < ww; x++) out[dst + x] = _chunkPA3IMPPScjs.coverageToByte.call(void 0, refined[y * ww + x]);
3301
+ for (let x = 0; x < ww; x++) out[dst + x] = _chunkOVYQAYGHcjs.coverageToByte.call(void 0, refined[y * ww + x]);
3301
3302
  }
3302
- return _chunkPA3IMPPScjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
3303
+ return _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, mask.width, mask.height, out);
3303
3304
  }
3304
3305
 
3305
3306
  // src/image-editor/effects.ts
@@ -3469,7 +3470,7 @@ var ImageEffectsEngine = (_class7 = class {
3469
3470
  // src/image-editor/free-transform.ts
3470
3471
  var FREE_TRANSFORM_CONTENTS = ["auto", "layer", "selection", "selection-copy", "selection-outline"];
3471
3472
  var fail = (message) => {
3472
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(message);
3473
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(message);
3473
3474
  };
3474
3475
  var T = (x, y) => [1, 0, x, 0, 1, y, 0, 0, 1];
3475
3476
  function previewStep(scale) {
@@ -3578,7 +3579,7 @@ var FreeTransformSession = (_class8 = class {
3578
3579
  } else {
3579
3580
  const id = _nullishCoalesce(init.layerId, () => ( host.activeLayerId()));
3580
3581
  if (!id) fail("No layer given and none is active; pass layerId (see list_layers).");
3581
- const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, layers, id).layer;
3582
+ const layer = _chunkOVYQAYGHcjs.requireLayer.call(void 0, layers, id).layer;
3582
3583
  this.layerId = layer.id;
3583
3584
  const mask = layer.mask && !layer.mask.source ? layer.mask : void 0;
3584
3585
  const channel = _nullishCoalesce(init.channel, () => ( (layer.id === host.activeLayerId() ? host.activeTarget() : "pixels")));
@@ -3589,20 +3590,20 @@ var FreeTransformSession = (_class8 = class {
3589
3590
  if (!maskAlone && layer.type !== "pixel" && layer.type !== "smart" && layer.type !== "shape" && layer.type !== "type") fail(`Layer "${layer.name || id}" is a ${layer.type} layer; Free Transform works on pixel, shape, type and smart object layers, layer masks (channel mask) and selections.`);
3590
3591
  if (!layer.visible && content !== "selection-copy") fail(`Layer "${layer.name || id}" is hidden; show it before you transform it.`);
3591
3592
  if (content !== "selection-copy") {
3592
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3593
- if (!maskAlone) _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3593
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "position", "transform it");
3594
+ if (!maskAlone) _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "pixels", "transform it");
3594
3595
  }
3595
3596
  const o = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
3596
3597
  const pixels = layer.type === "pixel" ? host.pixelsOf(layer) : null;
3597
3598
  if (layer.type === "smart" && !maskAlone) {
3598
3599
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a smart object, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3599
- if (!_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, layer.contents)) fail(`The contents of "${layer.name || id}" are not decoded here, so it cannot be transformed; run prepareSmartObjects() first.`);
3600
+ if (!_chunkOVYQAYGHcjs.isContentsDecoded.call(void 0, layer.contents)) fail(`The contents of "${layer.name || id}" are not decoded here, so it cannot be transformed; run prepareSmartObjects() first.`);
3600
3601
  this.smart = layer;
3601
3602
  this.smartObject = true;
3602
- this.startGeometry = _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer);
3603
+ this.startGeometry = _chunkOVYQAYGHcjs.placementGeometry.call(void 0, layer);
3603
3604
  if (init.interpolation === void 0 && layer.placement.interpolation) this.interp = layer.placement.interpolation;
3604
3605
  this.startInterp = this.interp;
3605
- this.box = _chunkPA3IMPPScjs.contentsBox.call(void 0, layer.contents);
3606
+ this.box = _chunkOVYQAYGHcjs.contentsBox.call(void 0, layer.contents);
3606
3607
  this.moves = mask && linked ? ["pixels", "mask"] : ["pixels"];
3607
3608
  this.geometryValue = this.startGeometry;
3608
3609
  this.shown = this.startLayers;
@@ -3610,8 +3611,8 @@ var FreeTransformSession = (_class8 = class {
3610
3611
  }
3611
3612
  if (layer.type === "type" && !maskAlone) {
3612
3613
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a type layer, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3613
- const frame = _chunkPA3IMPPScjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3614
- const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
3614
+ const frame = _chunkOVYQAYGHcjs.typeFrame.call(void 0, layer, host.textEnv().shaper);
3615
+ const m = _chunkOVYQAYGHcjs.textMatrix.call(void 0, layer);
3615
3616
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
3616
3617
  this.typeTarget = layer;
3617
3618
  this.typeLayer = true;
@@ -3630,7 +3631,7 @@ var FreeTransformSession = (_class8 = class {
3630
3631
  }
3631
3632
  if (layer.type === "shape" && !maskAlone) {
3632
3633
  if (content !== "layer") fail(`Layer "${layer.name || id}" is a shape layer, which transforms as a whole; use content layer (or rasterize it to transform part of it).`);
3633
- const g = _chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer);
3634
+ const g = _chunkOVYQAYGHcjs.shapeGeometryBounds.call(void 0, layer);
3634
3635
  if (!g) fail(`Shape layer "${layer.name || id}" has no path to transform.`);
3635
3636
  const w = Math.max(g.width, 1);
3636
3637
  const h = Math.max(g.height, 1);
@@ -3678,7 +3679,7 @@ var FreeTransformSession = (_class8 = class {
3678
3679
  if (box) {
3679
3680
  const copy = {
3680
3681
  type: "pixel",
3681
- id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
3682
+ id: _chunkOVYQAYGHcjs.newLayerId.call(void 0, ),
3682
3683
  name: `${layer.name || "Layer"} copy`,
3683
3684
  visible: true,
3684
3685
  opacity: 1,
@@ -3702,7 +3703,7 @@ var FreeTransformSession = (_class8 = class {
3702
3703
  if (!box) fail(content === "layer" ? "The layer has no pixels to transform." : "The selection holds no pixels of this layer; select some, or transform the outline (content selection-outline).");
3703
3704
  this.box = box;
3704
3705
  this.moves = moves;
3705
- this.startGeometry = _chunkPA3IMPPScjs.identityTransform.call(void 0, box);
3706
+ this.startGeometry = _chunkOVYQAYGHcjs.identityTransform.call(void 0, box);
3706
3707
  this.startInterp = this.interp;
3707
3708
  this.geometryValue = this.startGeometry;
3708
3709
  this.shown = this.startLayers;
@@ -3780,8 +3781,8 @@ var FreeTransformSession = (_class8 = class {
3780
3781
  warp: changes.warp === void 0 ? _nullishCoalesce(this.geometryValue.warp, () => ( null)) : changes.warp
3781
3782
  };
3782
3783
  if (next.corners.length !== 4 || !next.corners.every((p) => Number.isFinite(p.x) && Number.isFinite(p.y))) fail("corners must be four finite points: top-left, top-right, bottom-right, bottom-left.");
3783
- if (!_chunkPA3IMPPScjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3784
- if (this.typeTarget && (_chunkPA3IMPPScjs.hasWarp.call(void 0, next) || !_chunkPA3IMPPScjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3784
+ if (!_chunkOVYQAYGHcjs.transformMap.call(void 0, next)) fail("These corners fold the frame over itself or through the horizon; keep the quad convex.");
3785
+ if (this.typeTarget && (_chunkOVYQAYGHcjs.hasWarp.call(void 0, next) || !_chunkOVYQAYGHcjs.matrixFromCorners.call(void 0, next.box, next.corners))) {
3785
3786
  fail("Type layers take scale, rotate, skew and flips only (the corners must stay a parallelogram, no warp); rasterize the layer (rasterize_layer) for distort, perspective or warp.");
3786
3787
  }
3787
3788
  this.geometryValue = next;
@@ -3793,10 +3794,10 @@ var FreeTransformSession = (_class8 = class {
3793
3794
  if (this.smart) return { layers: this.resampleSmart(final, preview), selection: this.startSelection };
3794
3795
  if (this.typeTarget) return { layers: this.resampleType(), selection: this.startSelection };
3795
3796
  const g = this.geometryValue;
3796
- const identity = _chunkPA3IMPPScjs.isIdentityTransform.call(void 0, g);
3797
- const warp = _chunkPA3IMPPScjs.hasWarp.call(void 0, g);
3798
- const h = warp ? null : _chunkPA3IMPPScjs.geometryHomography.call(void 0, g);
3799
- const f = warp ? _chunkPA3IMPPScjs.transformMap.call(void 0, g) : null;
3797
+ const identity = _chunkOVYQAYGHcjs.isIdentityTransform.call(void 0, g);
3798
+ const warp = _chunkOVYQAYGHcjs.hasWarp.call(void 0, g);
3799
+ const h = warp ? null : _chunkOVYQAYGHcjs.geometryHomography.call(void 0, g);
3800
+ const f = warp ? _chunkOVYQAYGHcjs.transformMap.call(void 0, g) : null;
3800
3801
  const step = final ? 1 : previewStep(preview.scale);
3801
3802
  const interpolation = final ? this.interp : this.interp === "nearest" ? "nearest" : "bilinear";
3802
3803
  let layers = this.startLayers;
@@ -3840,7 +3841,7 @@ var FreeTransformSession = (_class8 = class {
3840
3841
  if (part.what === "selection") {
3841
3842
  const { width, height } = this.host.canvas();
3842
3843
  const data = new Uint8Array(_chunkCWM3CUUXcjs.readRegion.call(void 0, result, { x: 0, y: 0, width, height }).buffer);
3843
- const next = _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height, data);
3844
+ const next = _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, width, height, data);
3844
3845
  selection = next.bounds ? next : null;
3845
3846
  } else if (part.what === "pixels") {
3846
3847
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, targetId, (l) => {
@@ -3862,14 +3863,14 @@ var FreeTransformSession = (_class8 = class {
3862
3863
  resampleShape(final, preview, warpMap, h) {
3863
3864
  const layer = this.shape;
3864
3865
  let components = layer.components;
3865
- if (!_chunkPA3IMPPScjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3866
+ if (!_chunkOVYQAYGHcjs.isIdentityTransform.call(void 0, this.geometryValue)) {
3866
3867
  const affine = !warpMap && h && Math.abs(h[6]) < 1e-12 && Math.abs(h[7]) < 1e-12 && Math.abs(h[8] - 1) < 1e-12 ? [h[0], h[3], h[1], h[4], h[2], h[5]] : void 0;
3867
3868
  const map = _nullishCoalesce(warpMap, () => ( ((p) => h ? _chunkQT26RHKKcjs.applyHomography.call(void 0, h, p) : p)));
3868
- components = _chunkPA3IMPPScjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3869
+ components = _chunkOVYQAYGHcjs.transformShapeComponents.call(void 0, layer.components, (p) => _nullishCoalesce(map(p), () => ( p)), affine);
3869
3870
  }
3870
3871
  const moved = { ...layer, components };
3871
3872
  delete moved.annotation;
3872
- const surface = _chunkPA3IMPPScjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3873
+ const surface = _chunkOVYQAYGHcjs.renderShape.call(void 0, moved, this.host.shapeEnv(), final ? {} : { clip: preview.clip });
3873
3874
  return _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => ({ ...moved, surface }));
3874
3875
  }
3875
3876
  /**
@@ -3879,13 +3880,13 @@ var FreeTransformSession = (_class8 = class {
3879
3880
  resampleType() {
3880
3881
  const layer = this.typeTarget;
3881
3882
  const g = this.geometryValue;
3882
- if (_chunkPA3IMPPScjs.hasWarp.call(void 0, g)) fail("Type layers cannot be warped here; rasterize the layer first (rasterize_layer), or transform it with scale, rotate and skew.");
3883
- const m = _chunkPA3IMPPScjs.matrixFromCorners.call(void 0, g.box, g.corners);
3883
+ if (_chunkOVYQAYGHcjs.hasWarp.call(void 0, g)) fail("Type layers cannot be warped here; rasterize the layer first (rasterize_layer), or transform it with scale, rotate and skew.");
3884
+ const m = _chunkOVYQAYGHcjs.matrixFromCorners.call(void 0, g.box, g.corners);
3884
3885
  if (!m) fail("Type layers take scale, rotate, skew and flips only (the corners must stay a parallelogram); rasterize the layer for distort or perspective.");
3885
3886
  const next = { ...layer, transform: m };
3886
3887
  delete next.annotation;
3887
- let layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkPA3IMPPScjs.rerenderText.call(void 0, next, this.host.textEnv()));
3888
- const change = _chunkQT26RHKKcjs.multiplyHomographies.call(void 0, _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, _chunkJCXMJUQOcjs.invertMatrix.call(void 0, _chunkPA3IMPPScjs.textMatrix.call(void 0, layer))), _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, m));
3888
+ let layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, () => _chunkOVYQAYGHcjs.rerenderText.call(void 0, next, this.host.textEnv()));
3889
+ const change = _chunkQT26RHKKcjs.multiplyHomographies.call(void 0, _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, _chunkEGZM52EOcjs.invertMatrix.call(void 0, _chunkOVYQAYGHcjs.textMatrix.call(void 0, layer))), _chunkQT26RHKKcjs.homographyFromAffine.call(void 0, m));
3889
3890
  for (const part of this.parts) {
3890
3891
  if (part.what !== "mask") continue;
3891
3892
  const surface = _chunkHGTDMKNEcjs.transformSurface.call(void 0, part.moving, change, { interpolation: this.interp === "nearest" ? "nearest" : "bilinear" });
@@ -3901,12 +3902,12 @@ var FreeTransformSession = (_class8 = class {
3901
3902
  const canvas = this.host.canvas();
3902
3903
  try {
3903
3904
  if (final) {
3904
- const res = _chunkPA3IMPPScjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3905
+ const res = _chunkOVYQAYGHcjs.setSmartPlacement.call(void 0, this.startLayers, layer.id, placement, canvas);
3905
3906
  this.smartMasksMoved = res.masksMoved;
3906
3907
  return res.layers;
3907
3908
  }
3908
3909
  const step = previewStep(preview.scale);
3909
- const surface = _chunkPA3IMPPScjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3910
+ const surface = _chunkOVYQAYGHcjs.renderSmartObject.call(void 0, { ...layer, placement }, canvas, { step, clip: preview.clip, skipFilters: true, reduced: this.smartReduced });
3910
3911
  return _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.startLayers, layer.id, (l) => ({ ...l, placement, surface }));
3911
3912
  } catch (e) {
3912
3913
  if (e instanceof _chunkHGTDMKNEcjs.TransformTooLargeError) fail(e.message);
@@ -3916,10 +3917,10 @@ var FreeTransformSession = (_class8 = class {
3916
3917
  /** Whether the geometry (or the interpolation of a smart object) differs from where it started. */
3917
3918
  isChanged() {
3918
3919
  const g = this.geometryValue;
3919
- if (!this.smart && !this.typeTarget) return !_chunkPA3IMPPScjs.isIdentityTransform.call(void 0, g);
3920
+ if (!this.smart && !this.typeTarget) return !_chunkOVYQAYGHcjs.isIdentityTransform.call(void 0, g);
3920
3921
  const a = this.startGeometry;
3921
3922
  const same = g.corners.every((c, i) => Math.abs(c.x - a.corners[i].x) < 1e-9 && Math.abs(c.y - a.corners[i].y) < 1e-9);
3922
- const warp = (w, box) => w && _chunkPA3IMPPScjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3923
+ const warp = (w, box) => w && _chunkOVYQAYGHcjs.hasWarp.call(void 0, { box, corners: a.corners, warp: w }) ? JSON.stringify(w) : "";
3923
3924
  return !same || warp(g.warp, g.box) !== warp(a.warp, a.box) || this.interp !== this.startInterp;
3924
3925
  }
3925
3926
  render(preview) {
@@ -4179,7 +4180,7 @@ function convertSurfaceColors(surface, t) {
4179
4180
  }
4180
4181
 
4181
4182
  // src/image-editor/controller.ts
4182
- var IMAGE_EDITOR_SCHEMA_VERSION = _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION;
4183
+ var IMAGE_EDITOR_SCHEMA_VERSION = _chunkOVYQAYGHcjs.LAYERED_SCHEMA_VERSION;
4183
4184
  var RETOUCH_TOOLS = ["clone", "heal", "spot-heal", "smudge", "dodge", "burn", "sponge", "blur", "sharpen", "history"];
4184
4185
  var isRetouchTool = (tool) => RETOUCH_TOOLS.includes(tool);
4185
4186
  var STROKE_TOOLS = ["brush", "eraser", "mixer", ...RETOUCH_TOOLS];
@@ -4373,7 +4374,7 @@ var PaintStrokeSession = (_class9 = class {
4373
4374
  for (const t of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, { x: r.x - this.apply.offset.x, y: r.y - this.apply.offset.y, width: r.width, height: r.height })) {
4374
4375
  const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, t.tx, t.ty);
4375
4376
  const cur = regions.get(key);
4376
- regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkPA3IMPPScjs.unionRect.call(void 0, cur.r, r) : r });
4377
+ regions.set(key, { tx: t.tx, ty: t.ty, r: cur ? _chunkOVYQAYGHcjs.unionRect.call(void 0, cur.r, r) : r });
4377
4378
  }
4378
4379
  }
4379
4380
  for (const [key, { tx, ty, r }] of regions) {
@@ -4405,7 +4406,7 @@ var PaintStrokeSession = (_class9 = class {
4405
4406
  }
4406
4407
  /** Finishes the stroke (one undo step) and returns what changed. */
4407
4408
  end() {
4408
- if (this.closed) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("This stroke has already ended.");
4409
+ if (this.closed) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("This stroke has already ended.");
4409
4410
  const last = _nullishCoalesce(this.last, () => ( void 0));
4410
4411
  const rects = this.mixer ? this.mixer.finish(last) : this.stroke.finish(last);
4411
4412
  _optionalChain([this, 'access', _122 => _122.flushView, 'optionalCall', _123 => _123()]);
@@ -4541,20 +4542,20 @@ function sameTile(a, b) {
4541
4542
  for (let i = 0; i < a.data.length; i++) if (a.data[i] !== b.data[i]) return false;
4542
4543
  return true;
4543
4544
  }
4544
- var DEFAULT_ADJUSTMENTS = _chunkPA3IMPPScjs.DEFAULT_ADJUSTMENTS_VALUES;
4545
+ var DEFAULT_ADJUSTMENTS = _chunkOVYQAYGHcjs.DEFAULT_ADJUSTMENTS_VALUES;
4545
4546
  function normalizeStoredAdjustments(stored) {
4546
4547
  if (!stored) return { ...DEFAULT_ADJUSTMENTS };
4547
4548
  const out = {
4548
4549
  ...DEFAULT_ADJUSTMENTS,
4549
4550
  ...stored,
4550
- process: _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, stored.process)
4551
+ process: _chunkOVYQAYGHcjs.normalizeProcessVersion.call(void 0, stored.process)
4551
4552
  };
4552
- const layers = _chunkPA3IMPPScjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4553
+ const layers = _chunkOVYQAYGHcjs.normalizeAdjustmentLayers.call(void 0, stored.layers);
4553
4554
  if (layers.length) out.layers = layers;
4554
4555
  else delete out.layers;
4555
4556
  return out;
4556
4557
  }
4557
- var isLayered = (data) => Boolean(data && data.version === _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4558
+ var isLayered = (data) => Boolean(data && data.version === _chunkOVYQAYGHcjs.LAYERED_SCHEMA_VERSION && Array.isArray(data.layers));
4558
4559
  function migrateSerializedImageEditorState(data) {
4559
4560
  if (isLayered(data)) {
4560
4561
  const out = {
@@ -4586,10 +4587,10 @@ function migrateSerializedImageEditorState(data) {
4586
4587
  function migrateToLayeredState(data, size) {
4587
4588
  const clean = migrateSerializedImageEditorState(data);
4588
4589
  if (isLayered(clean)) return clean;
4589
- const stack = _chunkPA3IMPPScjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4590
- const { layers, assets } = _chunkPA3IMPPScjs.serializeLayers.call(void 0, stack.layers);
4590
+ const stack = _chunkOVYQAYGHcjs.layersFromLegacy.call(void 0, clean, Math.round(size.width), Math.round(size.height));
4591
+ const { layers, assets } = _chunkOVYQAYGHcjs.serializeLayers.call(void 0, stack.layers);
4591
4592
  const out = {
4592
- version: _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION,
4593
+ version: _chunkOVYQAYGHcjs.LAYERED_SCHEMA_VERSION,
4593
4594
  width: Math.round(size.width),
4594
4595
  height: Math.round(size.height),
4595
4596
  layers,
@@ -4603,8 +4604,8 @@ function migrateToLayeredState(data, size) {
4603
4604
  if (clean.selection) out.selection = clean.selection;
4604
4605
  return out;
4605
4606
  }
4606
- var DEFAULT_TRANSFORM = _chunkPA3IMPPScjs.DEFAULT_TRANSFORM_VALUES;
4607
- var DEFAULT_DEPTH_MASK = _chunkPA3IMPPScjs.DEFAULT_DEPTH_MASK_VALUES;
4607
+ var DEFAULT_TRANSFORM = _chunkOVYQAYGHcjs.DEFAULT_TRANSFORM_VALUES;
4608
+ var DEFAULT_DEPTH_MASK = _chunkOVYQAYGHcjs.DEFAULT_DEPTH_MASK_VALUES;
4608
4609
  var DEVELOP_KEYS = ["brightness", "contrast", "saturation", "exposure", "temperature", "tint"];
4609
4610
  var ImageEditorController = (_class10 = class {
4610
4611
 
@@ -4627,7 +4628,7 @@ var ImageEditorController = (_class10 = class {
4627
4628
  __init71() {this.sourceSurfaces = /* @__PURE__ */ new WeakMap()}
4628
4629
  __init72() {this.viewKey = []}
4629
4630
  /** For `compositePixels` and mask evaluation (the renderer keeps its own for the viewport). */
4630
- __init73() {this.compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)()}
4631
+ __init73() {this.compositor = new (0, _chunkOVYQAYGHcjs.LayerCompositor)()}
4631
4632
  /** The effects provider slot (see `setEffectsProvider`). */
4632
4633
  __init74() {this.effects = new (0, _chunkRUZQMYXHcjs.EffectsSlot)()}
4633
4634
  /** Renders provider effects: effect smart filter results and effect layers. */
@@ -4685,7 +4686,7 @@ var ImageEditorController = (_class10 = class {
4685
4686
  this.applyStored(_nullishCoalesce(options.initialState, () => ( {})));
4686
4687
  if (_optionalChain([options, 'access', _139 => _139.initialState, 'optionalAccess', _140 => _140.selection])) {
4687
4688
  try {
4688
- this.state.selection = normalizeSelection(_chunkPA3IMPPScjs.deserializeSelection.call(void 0, options.initialState.selection));
4689
+ this.state.selection = normalizeSelection(_chunkOVYQAYGHcjs.deserializeSelection.call(void 0, options.initialState.selection));
4689
4690
  } catch (e17) {
4690
4691
  }
4691
4692
  }
@@ -4798,10 +4799,10 @@ var ImageEditorController = (_class10 = class {
4798
4799
  if (l.type === "group") {
4799
4800
  const children = walk(l.children);
4800
4801
  if (children !== l.children) next2 = { ...l, children };
4801
- } else if (l.type === "smart" && _optionalChain([l, 'access', _143 => _143.smartFilters, 'optionalAccess', _144 => _144.filters, 'access', _145 => _145.some, 'call', _146 => _146((f) => f.kind === "effect")]) && (all || _chunkPA3IMPPScjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4802
+ } else if (l.type === "smart" && _optionalChain([l, 'access', _143 => _143.smartFilters, 'optionalAccess', _144 => _144.filters, 'access', _145 => _145.some, 'call', _146 => _146((f) => f.kind === "effect")]) && (all || _chunkOVYQAYGHcjs.isSmartSurfaceIncomplete.call(void 0, l.surface))) {
4802
4803
  try {
4803
- const r = _chunkPA3IMPPScjs.rerender.call(void 0, l, canvas);
4804
- if (all || !_chunkPA3IMPPScjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4804
+ const r = _chunkOVYQAYGHcjs.rerender.call(void 0, l, canvas);
4805
+ if (all || !_chunkOVYQAYGHcjs.isSmartSurfaceIncomplete.call(void 0, r.surface)) next2 = r;
4805
4806
  } catch (e19) {
4806
4807
  }
4807
4808
  }
@@ -4857,19 +4858,19 @@ var ImageEditorController = (_class10 = class {
4857
4858
  const d = await this.describeEffect(effect, "filter");
4858
4859
  const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
4859
4860
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
4860
- if (!found) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4861
+ if (!found) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`There is no layer "${layerId}"; call list_layers for the layer ids.`);
4861
4862
  let layers = this.state.layers;
4862
4863
  let id = layerId;
4863
4864
  let converted = false;
4864
4865
  if (found.layer.type !== "smart") {
4865
- if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${found.layer.name || layerId}" is ${found.layer.type === "adjustment" ? "an adjustment layer" : "an annotation"}, which has no pixels to filter; apply the effect to a pixel layer or smart object.`);
4866
- const res2 = _chunkPA3IMPPScjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4866
+ if (found.layer.type === "adjustment" || found.layer.type === "annotation") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${found.layer.name || layerId}" is ${found.layer.type === "adjustment" ? "an adjustment layer" : "an annotation"}, which has no pixels to filter; apply the effect to a pixel layer or smart object.`);
4867
+ const res2 = _chunkOVYQAYGHcjs.convertToSmartObject.call(void 0, layers, [layerId], this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l) });
4867
4868
  layers = res2.layers;
4868
4869
  id = res2.layer.id;
4869
4870
  converted = true;
4870
4871
  }
4871
- const filter = _chunkPA3IMPPScjs.normalizeSmartFilter.call(void 0, { kind: "effect", effect: d.id, provider: this.effects.require().id, name: d.name, values, enabled: options.enabled !== false, blend: options.blend, opacity: options.opacity });
4872
- const res = _chunkPA3IMPPScjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4872
+ const filter = _chunkOVYQAYGHcjs.normalizeSmartFilter.call(void 0, { kind: "effect", effect: d.id, provider: this.effects.require().id, name: d.name, values, enabled: options.enabled !== false, blend: options.blend, opacity: options.opacity });
4873
+ const res = _chunkOVYQAYGHcjs.addSmartFilter.call(void 0, layers, id, filter, this.canvasSize, options.index);
4873
4874
  this.commitLayers(res.layers);
4874
4875
  return { layerId: id, filter: res.filter, converted };
4875
4876
  }
@@ -4880,9 +4881,9 @@ var ImageEditorController = (_class10 = class {
4880
4881
  * false, during a drag).
4881
4882
  */
4882
4883
  async updateEffectFilter(layerId, filterId, changes, commitToHistory = true) {
4883
- const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4884
+ const layer = _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, layerId);
4884
4885
  const was = _optionalChain([layer, 'access', _147 => _147.smartFilters, 'optionalAccess', _148 => _148.filters, 'access', _149 => _149.find, 'call', _150 => _150((f) => f.id === filterId)]);
4885
- if (!was || was.kind !== "effect") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _151 => _151.smartFilters, 'optionalAccess', _152 => _152.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
4886
+ if (!was || was.kind !== "effect") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Smart object "${layer.name || layerId}" has no effect filter "${filterId}"; its filters are ${(_nullishCoalesce(_optionalChain([layer, 'access', _151 => _151.smartFilters, 'optionalAccess', _152 => _152.filters]), () => ( []))).map((f) => `${f.id} (${f.kind === "effect" ? _nullishCoalesce(f.name, () => ( f.effect)) : f.kind})`).join(", ") || "none"}.`);
4886
4887
  const update = {};
4887
4888
  if (changes.values) {
4888
4889
  const d = await this.describeEffect(was.effect);
@@ -4891,15 +4892,15 @@ var ImageEditorController = (_class10 = class {
4891
4892
  for (const [k, v] of Object.entries(changes.values)) {
4892
4893
  if (v !== null) given[k] = v;
4893
4894
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4894
- else throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4895
+ else throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4895
4896
  }
4896
4897
  update.values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4897
4898
  }
4898
4899
  for (const k of ["enabled", "blend", "opacity"]) if (changes[k] !== void 0) update[k] = changes[k];
4899
- let res = _chunkPA3IMPPScjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4900
- if (changes.index !== void 0) res = { ...res, layers: _chunkPA3IMPPScjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4900
+ let res = _chunkOVYQAYGHcjs.updateSmartFilter.call(void 0, this.state.layers, layerId, filterId, update, this.canvasSize);
4901
+ if (changes.index !== void 0) res = { ...res, layers: _chunkOVYQAYGHcjs.moveSmartFilter.call(void 0, res.layers, layerId, filterId, changes.index, this.canvasSize).layers };
4901
4902
  this.commitLayers(res.layers, void 0, commitToHistory);
4902
- return _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4903
+ return _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, layerId).smartFilters.filters.find((f) => f.id === filterId);
4903
4904
  }
4904
4905
  /**
4905
4906
  * Adds an effect layer: a pixel layer drawn by a provider generator, overlay or title effect at
@@ -4911,12 +4912,12 @@ var ImageEditorController = (_class10 = class {
4911
4912
  const values = _chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, d, options.values);
4912
4913
  const { width, height } = this.naturalSize;
4913
4914
  const pixels = await this.effectsEngine.renderLayer(d.id, values, { width, height, depth: this.bitDepth, time: options.time });
4914
- const blend = _chunkPA3IMPPScjs.parseBlend.call(void 0, options.blend);
4915
- if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be from 0 to 1.");
4915
+ const blend = _chunkOVYQAYGHcjs.parseBlend.call(void 0, options.blend);
4916
+ if (options.opacity !== void 0 && !(options.opacity >= 0 && options.opacity <= 1)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("opacity must be from 0 to 1.");
4916
4917
  const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
4917
4918
  const layer = {
4918
4919
  type: "pixel",
4919
- id: options.id && !ids.has(options.id) ? options.id : _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
4920
+ id: options.id && !ids.has(options.id) ? options.id : _chunkOVYQAYGHcjs.newLayerId.call(void 0, ),
4920
4921
  name: _optionalChain([options, 'access', _153 => _153.name, 'optionalAccess', _154 => _154.trim, 'call', _155 => _155()]) || d.name,
4921
4922
  visible: true,
4922
4923
  opacity: _nullishCoalesce(options.opacity, () => ( 1)),
@@ -4925,7 +4926,7 @@ var ImageEditorController = (_class10 = class {
4925
4926
  offset: { x: 0, y: 0 },
4926
4927
  generator: { effect: d.id, provider: this.effects.require().id, name: d.name, values, ...options.time ? { time: options.time } : {} }
4927
4928
  };
4928
- const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4929
+ const next = _chunkOVYQAYGHcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(options));
4929
4930
  this.commitLayers(next, () => {
4930
4931
  this.state.activeLayerId = layer.id;
4931
4932
  this.state.activeTarget = "pixels";
@@ -4940,8 +4941,8 @@ var ImageEditorController = (_class10 = class {
4940
4941
  async updateEffectLayer(layerId, changes, commitToHistory = true) {
4941
4942
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
4942
4943
  const layer = _optionalChain([found, 'optionalAccess', _156 => _156.layer]);
4943
- if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4944
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4944
+ if (!layer || layer.type !== "pixel" || !layer.generator) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`"${layerId}" is not an effect layer; add one with add_effect_layer.`);
4945
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "pixels", "draw its effect again");
4945
4946
  const g = layer.generator;
4946
4947
  const d = await this.describeEffect(g.effect);
4947
4948
  const base = { ...g.values };
@@ -4949,7 +4950,7 @@ var ImageEditorController = (_class10 = class {
4949
4950
  for (const [k, v] of Object.entries(_nullishCoalesce(changes.values, () => ( {})))) {
4950
4951
  if (v !== null) given[k] = v;
4951
4952
  else if (k in d.controls.properties) base[k] = d.defaults[k];
4952
- else throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4953
+ else throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`"${k}" is not a control of "${d.id}"; its controls are ${Object.keys(d.controls.properties).join(", ")}.`);
4953
4954
  }
4954
4955
  const values = { ...base, ..._chunkRUZQMYXHcjs.resolveEffectValues.call(void 0, { ...d, defaults: base }, given) };
4955
4956
  const time = _nullishCoalesce(_nullishCoalesce(changes.time, () => ( g.time)), () => ( 0));
@@ -4964,7 +4965,7 @@ var ImageEditorController = (_class10 = class {
4964
4965
  /** Turns an effect layer into a plain pixel layer keeping its pixels (one undo step). */
4965
4966
  rasterizeEffectLayer(layerId) {
4966
4967
  const found = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, layerId);
4967
- if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4968
+ if (!found || found.layer.type !== "pixel" || !found.layer.generator) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`"${layerId}" is not an effect layer.`);
4968
4969
  this.commitLayers(
4969
4970
  _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, layerId, (l) => {
4970
4971
  const { generator: _g, ...rest } = l;
@@ -4992,7 +4993,7 @@ var ImageEditorController = (_class10 = class {
4992
4993
  if (key.length === this.viewKey.length && key.every((v, i) => v === this.viewKey[i])) return;
4993
4994
  this.viewKey = key;
4994
4995
  const { width, height } = this.naturalSize;
4995
- const view = _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4996
+ const view = _chunkOVYQAYGHcjs.legacyView.call(void 0, this.stack(), width, height, s.activeLayerId);
4996
4997
  s.adjustments = view.adjustments;
4997
4998
  s.depthMask = view.depthMask;
4998
4999
  s.annotations = view.annotations;
@@ -5163,7 +5164,7 @@ var ImageEditorController = (_class10 = class {
5163
5164
  applyCropPreset(ratio) {
5164
5165
  this.recordHistory();
5165
5166
  const { width, height } = this.state.imageDimensions;
5166
- if (ratio && _chunkPA3IMPPScjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
5167
+ if (ratio && _chunkOVYQAYGHcjs.isQuarterTurnSwapped.call(void 0, this.state.transform)) {
5167
5168
  ratio = 1 / ratio;
5168
5169
  }
5169
5170
  if (!ratio) {
@@ -5245,7 +5246,7 @@ var ImageEditorController = (_class10 = class {
5245
5246
  */
5246
5247
  getLayerPixels(id) {
5247
5248
  const layer = this.getLayer(id);
5248
- if (!layer || !_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return null;
5249
+ if (!layer || !_chunkOVYQAYGHcjs.hasSurface.call(void 0, layer)) return null;
5249
5250
  const surface = this.surfaceOf(layer);
5250
5251
  const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, surface);
5251
5252
  if (!b) return null;
@@ -5258,7 +5259,7 @@ var ImageEditorController = (_class10 = class {
5258
5259
  */
5259
5260
  getLayerBounds(id) {
5260
5261
  const layer = this.getLayer(id);
5261
- if (!layer || !_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return null;
5262
+ if (!layer || !_chunkOVYQAYGHcjs.hasSurface.call(void 0, layer)) return null;
5262
5263
  const surface = this.surfaceOf(layer);
5263
5264
  let b = this.boundsCache.get(surface);
5264
5265
  if (b === void 0) {
@@ -5282,15 +5283,15 @@ var ImageEditorController = (_class10 = class {
5282
5283
  { x: b2.x + b2.width, y: b2.y + b2.height },
5283
5284
  { x: b2.x, y: b2.y + b2.height }
5284
5285
  ];
5285
- if (layer.type === "smart") return _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer).corners.map((p) => ({ x: p.x, y: p.y }));
5286
+ if (layer.type === "smart") return _chunkOVYQAYGHcjs.placementGeometry.call(void 0, layer).corners.map((p) => ({ x: p.x, y: p.y }));
5286
5287
  if (layer.type === "type") {
5287
- const f = _chunkPA3IMPPScjs.typeFrame.call(void 0, layer, this.textEnv().shaper);
5288
- const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
5288
+ const f = _chunkOVYQAYGHcjs.typeFrame.call(void 0, layer, this.textEnv().shaper);
5289
+ const m = _chunkOVYQAYGHcjs.textMatrix.call(void 0, layer);
5289
5290
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
5290
5291
  return [at(f.x, f.y), at(f.x + f.width, f.y), at(f.x + f.width, f.y + f.height), at(f.x, f.y + f.height)];
5291
5292
  }
5292
5293
  if (layer.type === "shape") {
5293
- const g = _chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer);
5294
+ const g = _chunkOVYQAYGHcjs.shapeGeometryBounds.call(void 0, layer);
5294
5295
  return g ? rect(g) : null;
5295
5296
  }
5296
5297
  const b = this.getLayerBounds(id);
@@ -5322,7 +5323,7 @@ var ImageEditorController = (_class10 = class {
5322
5323
  return null;
5323
5324
  }
5324
5325
  if (layer.type === "annotation") {
5325
- if (_chunkPA3IMPPScjs.hitTestAnnotation.call(void 0, point, layer.annotation)) return layer.id;
5326
+ if (_chunkOVYQAYGHcjs.hitTestAnnotation.call(void 0, point, layer.annotation)) return layer.id;
5326
5327
  return null;
5327
5328
  }
5328
5329
  if (layer.type === "shape") {
@@ -5365,9 +5366,9 @@ var ImageEditorController = (_class10 = class {
5365
5366
  */
5366
5367
  getLayerDataURL(id) {
5367
5368
  const layer = this.getLayer(id);
5368
- if (!layer || !_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return null;
5369
+ if (!layer || !_chunkOVYQAYGHcjs.hasSurface.call(void 0, layer)) return null;
5369
5370
  const surface = this.surfaceOf(layer);
5370
- const enc = _chunkPA3IMPPScjs.encodeSurface.call(void 0, surface);
5371
+ const enc = _chunkOVYQAYGHcjs.encodeSurface.call(void 0, surface);
5371
5372
  return enc ? enc.url : null;
5372
5373
  }
5373
5374
  /**
@@ -5487,7 +5488,7 @@ var ImageEditorController = (_class10 = class {
5487
5488
  _optionalChain([extra, 'optionalCall', _167 => _167()]);
5488
5489
  if (depth !== 8 && this.bitDepth === depth) this.state.layers = keepDeepLayers(prev, this.state.layers);
5489
5490
  if (this.state.activeLayerId && !_chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, this.state.activeLayerId)) {
5490
- this.state.activeLayerId = _chunkPA3IMPPScjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
5491
+ this.state.activeLayerId = _chunkOVYQAYGHcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, this.state.activeLayerId);
5491
5492
  this.state.activeTarget = "pixels";
5492
5493
  }
5493
5494
  this.notify();
@@ -5509,19 +5510,19 @@ var ImageEditorController = (_class10 = class {
5509
5510
  if (init.pixels) {
5510
5511
  const px2 = init.pixels;
5511
5512
  if (!(px2.width > 0 && px2.height > 0) || px2.data.length < px2.width * px2.height * 4) {
5512
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
5513
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("pixels must be RGBA with width \xD7 height \xD7 4 bytes.");
5513
5514
  }
5514
5515
  surface = _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, px2, 4);
5515
5516
  } else if (init.color !== void 0) {
5516
5517
  const c = parseColor(init.color);
5517
5518
  surface = _chunkCWM3CUUXcjs.solidSurface.call(void 0, 4, { x: 0, y: 0, width, height }, _chunkCWM3CUUXcjs.packRgba.call(void 0, c[0], c[1], c[2], c[3]));
5518
5519
  }
5519
- const blend = _chunkPA3IMPPScjs.parseBlend.call(void 0, init.blend);
5520
- if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be from 0 to 1.");
5520
+ const blend = _chunkOVYQAYGHcjs.parseBlend.call(void 0, init.blend);
5521
+ if (init.opacity !== void 0 && !(init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("opacity must be from 0 to 1.");
5521
5522
  const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
5522
5523
  const layer = {
5523
5524
  type: "pixel",
5524
- id: init.id && !ids.has(init.id) ? init.id : _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
5525
+ id: init.id && !ids.has(init.id) ? init.id : _chunkOVYQAYGHcjs.newLayerId.call(void 0, ),
5525
5526
  name: _optionalChain([init, 'access', _168 => _168.name, 'optionalAccess', _169 => _169.trim, 'call', _170 => _170()]) || this.nextLayerName(),
5526
5527
  visible: _nullishCoalesce(init.visible, () => ( true)),
5527
5528
  opacity: _nullishCoalesce(init.opacity, () => ( 1)),
@@ -5530,7 +5531,7 @@ var ImageEditorController = (_class10 = class {
5530
5531
  offset: { x: Math.round(_nullishCoalesce(init.x, () => ( 0))), y: Math.round(_nullishCoalesce(init.y, () => ( 0))) }
5531
5532
  };
5532
5533
  if (init.fillOpacity !== void 0 && init.fillOpacity !== 1) layer.fillOpacity = init.fillOpacity;
5533
- const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
5534
+ const next = _chunkOVYQAYGHcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
5534
5535
  this.commitLayers(next, () => {
5535
5536
  this.state.activeLayerId = layer.id;
5536
5537
  this.state.activeTarget = "pixels";
@@ -5570,12 +5571,12 @@ var ImageEditorController = (_class10 = class {
5570
5571
  try {
5571
5572
  img = await this.renderer.imageCache.get(src);
5572
5573
  } catch (e24) {
5573
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
5574
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The image could not be decoded here. Pass a PNG (data URL or base64), or run in a browser for other formats and URLs.");
5574
5575
  }
5575
5576
  const w = img.naturalWidth || img.width;
5576
5577
  const h = img.naturalHeight || img.height;
5577
5578
  const ctx = this.renderer.createCanvas(w, h).getContext("2d");
5578
- if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
5579
+ if (!ctx || typeof ctx.getImageData !== "function") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Decoding this image needs a canvas; pass a PNG instead.");
5579
5580
  ctx.drawImage(img, 0, 0, w, h);
5580
5581
  const data = ctx.getImageData(0, 0, w, h);
5581
5582
  return { width: w, height: h, data: data.data };
@@ -5588,7 +5589,7 @@ var ImageEditorController = (_class10 = class {
5588
5589
  }
5589
5590
  /** Duplicates a layer (with its children) directly above it, as one undo step. Returns the copy's id. */
5590
5591
  duplicateLayer(id, name) {
5591
- const res = _chunkPA3IMPPScjs.duplicateLayer.call(void 0, this.state.layers, id, name);
5592
+ const res = _chunkOVYQAYGHcjs.duplicateLayer.call(void 0, this.state.layers, id, name);
5592
5593
  this.commitLayers(res.layers, () => {
5593
5594
  this.state.activeLayerId = res.id;
5594
5595
  });
@@ -5596,16 +5597,16 @@ var ImageEditorController = (_class10 = class {
5596
5597
  }
5597
5598
  /** Deletes a layer (refused when locked), as one undo step. */
5598
5599
  removeLayer(id) {
5599
- const next = _chunkPA3IMPPScjs.removeLayer.call(void 0, this.state.layers, id);
5600
+ const next = _chunkOVYQAYGHcjs.removeLayer.call(void 0, this.state.layers, id);
5600
5601
  this.commitLayers(next, () => {
5601
- if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkPA3IMPPScjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _172 => _172.id]) === this.state.selectedAnnotationId)) {
5602
+ if (this.state.selectedAnnotationId && !_chunkHGTDMKNEcjs.flattenLayers.call(void 0, next).some((l) => _optionalChain([_chunkOVYQAYGHcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _172 => _172.id]) === this.state.selectedAnnotationId)) {
5602
5603
  this.state.selectedAnnotationId = null;
5603
5604
  }
5604
5605
  });
5605
5606
  }
5606
5607
  /** Moves a layer above / below another, or into a group, as one undo step. Returns its new parent and index. */
5607
5608
  moveLayer(id, placement) {
5608
- const next = _chunkPA3IMPPScjs.moveLayer.call(void 0, this.state.layers, id, placement);
5609
+ const next = _chunkOVYQAYGHcjs.moveLayer.call(void 0, this.state.layers, id, placement);
5609
5610
  const loc = _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id);
5610
5611
  if (next === this.state.layers) return { parentId: _nullishCoalesce(_optionalChain([loc, 'access', _173 => _173.parent, 'optionalAccess', _174 => _174.id]), () => ( null)), index: loc.index };
5611
5612
  this.commitLayers(next);
@@ -5616,23 +5617,23 @@ var ImageEditorController = (_class10 = class {
5616
5617
  * one undo step (`commitToHistory = false` for the moves of a slider drag). Returns the layer.
5617
5618
  */
5618
5619
  setLayerProperties(id, props, commitToHistory = true) {
5619
- const next = _chunkPA3IMPPScjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5620
+ const next = _chunkOVYQAYGHcjs.setLayerProperties.call(void 0, this.state.layers, id, props);
5620
5621
  this.commitLayers(next, void 0, commitToHistory);
5621
5622
  return _chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer;
5622
5623
  }
5623
5624
  /** Adds an empty pass-through group above the active layer (or at `placement`) and makes it active. Returns its id. */
5624
5625
  addGroup(init = {}) {
5625
- const blend = init.blend === void 0 ? "pass-through" : _chunkPA3IMPPScjs.parseBlend.call(void 0, init.blend, true);
5626
+ const blend = init.blend === void 0 ? "pass-through" : _chunkOVYQAYGHcjs.parseBlend.call(void 0, init.blend, true);
5626
5627
  const group = {
5627
5628
  type: "group",
5628
- id: _chunkPA3IMPPScjs.newLayerId.call(void 0, "group"),
5629
+ id: _chunkOVYQAYGHcjs.newLayerId.call(void 0, "group"),
5629
5630
  name: _optionalChain([init, 'access', _177 => _177.name, 'optionalAccess', _178 => _178.trim, 'call', _179 => _179()]) || "Group",
5630
5631
  visible: true,
5631
5632
  opacity: 1,
5632
5633
  blend,
5633
5634
  children: []
5634
5635
  };
5635
- const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5636
+ const next = _chunkOVYQAYGHcjs.placeLayer.call(void 0, this.state.layers, group, this.newLayerPlacement(init));
5636
5637
  this.commitLayers(next, () => {
5637
5638
  this.state.activeLayerId = group.id;
5638
5639
  this.state.activeTarget = "pixels";
@@ -5641,7 +5642,7 @@ var ImageEditorController = (_class10 = class {
5641
5642
  }
5642
5643
  /** Puts sibling layers into a new group (one undo step). Returns the group id. */
5643
5644
  groupLayers(ids, name) {
5644
- const res = _chunkPA3IMPPScjs.groupLayers.call(void 0, this.state.layers, ids, name);
5645
+ const res = _chunkOVYQAYGHcjs.groupLayers.call(void 0, this.state.layers, ids, name);
5645
5646
  this.commitLayers(res.layers, () => {
5646
5647
  this.state.activeLayerId = res.id;
5647
5648
  });
@@ -5649,7 +5650,7 @@ var ImageEditorController = (_class10 = class {
5649
5650
  }
5650
5651
  /** Replaces a group by its children (one undo step). Returns the child ids, bottom to top. */
5651
5652
  ungroupLayer(id) {
5652
- const res = _chunkPA3IMPPScjs.ungroupLayer.call(void 0, this.state.layers, id);
5653
+ const res = _chunkOVYQAYGHcjs.ungroupLayer.call(void 0, this.state.layers, id);
5653
5654
  this.commitLayers(res.layers);
5654
5655
  return res.ids;
5655
5656
  }
@@ -5658,38 +5659,38 @@ var ImageEditorController = (_class10 = class {
5658
5659
  * (`commitToHistory = false` for the moves of a drag). Returns the offset and document bounds.
5659
5660
  */
5660
5661
  offsetLayer(id, move, commitToHistory = true) {
5661
- const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
5662
+ const layer = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5662
5663
  if (layer.type === "smart") {
5663
5664
  const tl = layer.placement.corners[0];
5664
5665
  const dx = move.x !== void 0 ? move.x - tl.x : _nullishCoalesce(move.dx, () => ( 0));
5665
5666
  const dy = move.y !== void 0 ? move.y - tl.y : _nullishCoalesce(move.dy, () => ( 0));
5666
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers.");
5667
- this.commitLayers(_chunkPA3IMPPScjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5667
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("x and y must be numbers.");
5668
+ this.commitLayers(_chunkOVYQAYGHcjs.offsetSmartObject.call(void 0, this.state.layers, id, dx, dy, this.canvasSize), void 0, commitToHistory);
5668
5669
  const moved = _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, id).layer;
5669
5670
  return { offset: { x: Math.round(moved.placement.corners[0].x), y: Math.round(moved.placement.corners[0].y) }, bounds: this.getLayerBounds(id) };
5670
5671
  }
5671
5672
  if (layer.type === "shape") {
5672
- const g = _nullishCoalesce(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5673
+ const g = _nullishCoalesce(_chunkOVYQAYGHcjs.shapeGeometryBounds.call(void 0, layer), () => ( { x: 0, y: 0 }));
5673
5674
  const dx = move.x !== void 0 ? move.x - g.x : _nullishCoalesce(move.dx, () => ( 0));
5674
5675
  const dy = move.y !== void 0 ? move.y - g.y : _nullishCoalesce(move.dy, () => ( 0));
5675
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers.");
5676
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "position", "move it");
5677
- let moved = _chunkPA3IMPPScjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5676
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("x and y must be numbers.");
5677
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5678
+ let moved = _chunkOVYQAYGHcjs.offsetShape.call(void 0, layer, dx, dy, this.shapeEnv());
5678
5679
  const mask = layer.mask;
5679
5680
  if (mask && mask.linked !== false && !mask.source && (Math.round(dx) || Math.round(dy))) moved = { ...moved, mask: { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, Math.round(dx), Math.round(dy)) } };
5680
5681
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
5681
- const b = _nullishCoalesce(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5682
+ const b = _nullishCoalesce(_chunkOVYQAYGHcjs.shapeGeometryBounds.call(void 0, moved), () => ( { x: 0, y: 0 }));
5682
5683
  return { offset: { x: Math.round(b.x), y: Math.round(b.y) }, bounds: this.getLayerBounds(id) };
5683
5684
  }
5684
5685
  if (layer.type === "type") {
5685
5686
  const m = _nullishCoalesce(layer.transform, () => ( [1, 0, 0, 1, 0, 0]));
5686
5687
  const dx = move.x !== void 0 ? move.x - m[4] : _nullishCoalesce(move.dx, () => ( 0));
5687
5688
  const dy = move.y !== void 0 ? move.y - m[5] : _nullishCoalesce(move.dy, () => ( 0));
5688
- if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers.");
5689
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "position", "move it");
5689
+ if (!Number.isFinite(dx) || !Number.isFinite(dy)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("x and y must be numbers.");
5690
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "position", "move it");
5690
5691
  const mx = Math.round(dx);
5691
5692
  const my = Math.round(dy);
5692
- let moved = { ..._chunkPA3IMPPScjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, mx, my) };
5693
+ let moved = { ..._chunkOVYQAYGHcjs.transformTypeLayer.call(void 0, layer, [1, 0, 0, 1, mx, my]), surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, layer.surface, mx, my) };
5693
5694
  const mask = layer.mask;
5694
5695
  if (mask && mask.linked !== false && !mask.source && (mx || my)) moved = { ...moved, mask: { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, mx, my) } };
5695
5696
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => moved), void 0, commitToHistory);
@@ -5699,7 +5700,7 @@ var ImageEditorController = (_class10 = class {
5699
5700
  const current = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
5700
5701
  const x = _nullishCoalesce(move.x, () => ( current.x + (_nullishCoalesce(move.dx, () => ( 0)))));
5701
5702
  const y = _nullishCoalesce(move.y, () => ( current.y + (_nullishCoalesce(move.dy, () => ( 0)))));
5702
- const next = _chunkPA3IMPPScjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5703
+ const next = _chunkOVYQAYGHcjs.offsetLayer.call(void 0, this.state.layers, id, { x, y });
5703
5704
  this.commitLayers(next, void 0, commitToHistory);
5704
5705
  return { offset: { x: Math.round(x), y: Math.round(y) }, bounds: this.getLayerBounds(id) };
5705
5706
  }
@@ -5709,11 +5710,11 @@ var ImageEditorController = (_class10 = class {
5709
5710
  * target when the layer is active.
5710
5711
  */
5711
5712
  addLayerMask(id, from = "reveal-all", props = {}) {
5712
- const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
5713
+ const layer = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5713
5714
  let mask;
5714
5715
  if (from === "selection") {
5715
5716
  const sel = this.state.selection;
5716
- if (!_optionalChain([sel, 'optionalAccess', _180 => _180.bounds])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5717
+ if (!_optionalChain([sel, 'optionalAccess', _180 => _180.bounds])) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
5717
5718
  mask = this.maskFromSelection(sel, props);
5718
5719
  if (layer.type === "pixel" && (layer.offset.x || layer.offset.y)) {
5719
5720
  mask = { ...mask, surface: _chunkCWM3CUUXcjs.translateSurface.call(void 0, mask.surface, -layer.offset.x, -layer.offset.y) };
@@ -5722,7 +5723,7 @@ var ImageEditorController = (_class10 = class {
5722
5723
  const v = from === "reveal-all" ? 255 : 0;
5723
5724
  mask = withMaskProps({ surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
5724
5725
  }
5725
- const next = _chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5726
+ const next = _chunkOVYQAYGHcjs.setLayerMask.call(void 0, this.state.layers, id, mask);
5726
5727
  this.commitLayers(next, () => {
5727
5728
  if (this.state.activeLayerId === id) this.state.activeTarget = "mask";
5728
5729
  });
@@ -5730,18 +5731,18 @@ var ImageEditorController = (_class10 = class {
5730
5731
  }
5731
5732
  /** Removes a layer's mask (one undo step). */
5732
5733
  removeLayerMask(id) {
5733
- const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
5734
- if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5735
- this.commitLayers(_chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5734
+ const layer = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5735
+ if (!layer.mask) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5736
+ this.commitLayers(_chunkOVYQAYGHcjs.setLayerMask.call(void 0, this.state.layers, id, null), () => {
5736
5737
  if (this.state.activeLayerId === id) this.state.activeTarget = "pixels";
5737
5738
  });
5738
5739
  }
5739
5740
  /** Changes any layer mask's density, feather, enabled or linked flag (pixels kept). Returns the mask. */
5740
5741
  setLayerMaskProps(id, props, commitToHistory = true) {
5741
- const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
5742
- if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5742
+ const layer = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id).layer;
5743
+ if (!layer.mask) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
5743
5744
  const mask = withMaskProps(layer.mask, props);
5744
- this.commitLayers(_chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5745
+ this.commitLayers(_chunkOVYQAYGHcjs.setLayerMask.call(void 0, this.state.layers, id, mask), void 0, commitToHistory);
5745
5746
  return mask;
5746
5747
  }
5747
5748
  /**
@@ -5749,11 +5750,11 @@ var ImageEditorController = (_class10 = class {
5749
5750
  * the depth map) and removes the mask, as one undo step.
5750
5751
  */
5751
5752
  async applyLayerMask(id) {
5752
- const loc = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id);
5753
+ const loc = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id);
5753
5754
  const layer = loc.layer;
5754
- if (layer.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Only a pixel layer's mask can be applied to its pixels; "${id}" is a ${layer.type} layer. Remove the mask or keep it.`);
5755
- if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5756
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5755
+ if (layer.type !== "pixel") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Only a pixel layer's mask can be applied to its pixels; "${id}" is a ${layer.type} layer. Remove the mask or keep it.`);
5756
+ if (!layer.mask) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask.`);
5757
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "pixels", "apply its mask");
5757
5758
  const { width, height } = this.naturalSize;
5758
5759
  await this.renderer.prepareLayerAssets([layer], width, height);
5759
5760
  const sources = this.renderer.compositorSources(width, height);
@@ -5786,13 +5787,13 @@ var ImageEditorController = (_class10 = class {
5786
5787
  */
5787
5788
  layerViaCopy(options = {}) {
5788
5789
  const id = _nullishCoalesce(options.layerId, () => ( this.state.activeLayerId));
5789
- if (!id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5790
- const loc = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id);
5790
+ if (!id) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("No layer given and none is active; pass layerId (see list_layers).");
5791
+ const loc = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id);
5791
5792
  const layer = loc.layer;
5792
- if (layer.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5793
+ if (layer.type !== "pixel") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer via copy needs a pixel layer; "${id}" is a ${layer.type} layer.`);
5793
5794
  const sel = this.state.selection;
5794
- if (!_optionalChain([sel, 'optionalAccess', _181 => _181.bounds])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5795
- if (options.cut) _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5795
+ if (!_optionalChain([sel, 'optionalAccess', _181 => _181.bounds])) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Nothing is selected; select the pixels to copy first.");
5796
+ if (options.cut) _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "pixels", "cut from it");
5796
5797
  const surface = this.surfaceOf(layer);
5797
5798
  const sb = sel.bounds;
5798
5799
  const src = { x: sb.x - layer.offset.x, y: sb.y - layer.offset.y, width: sb.width, height: sb.height };
@@ -5808,7 +5809,7 @@ var ImageEditorController = (_class10 = class {
5808
5809
  }
5809
5810
  const copy = {
5810
5811
  type: "pixel",
5811
- id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
5812
+ id: _chunkOVYQAYGHcjs.newLayerId.call(void 0, ),
5812
5813
  name: _optionalChain([options, 'access', _182 => _182.name, 'optionalAccess', _183 => _183.trim, 'call', _184 => _184()]) || `${layer.name || "Layer"} ${options.cut ? "cut" : "copy"}`,
5813
5814
  visible: true,
5814
5815
  opacity: 1,
@@ -5881,7 +5882,7 @@ var ImageEditorController = (_class10 = class {
5881
5882
  * Refused while another transform is open.
5882
5883
  */
5883
5884
  beginFreeTransform(init = {}) {
5884
- if (this.getFreeTransform()) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5885
+ if (this.getFreeTransform()) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("A Free Transform is already open; commit or cancel it first.");
5885
5886
  const session = new FreeTransformSession(this.transformHost(), init);
5886
5887
  this.openTransform = session;
5887
5888
  this.notify();
@@ -5895,26 +5896,26 @@ var ImageEditorController = (_class10 = class {
5895
5896
  */
5896
5897
  transformLayer(spec) {
5897
5898
  const given = [spec.matrix, spec.corners, spec.params].filter((v) => v !== void 0).length;
5898
- if (given > 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give only one of matrix, corners and params.");
5899
- if (!given && spec.warp === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5899
+ if (given > 1) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give only one of matrix, corners and params.");
5900
+ if (!given && spec.warp === void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give matrix, corners or params (or a warp).");
5900
5901
  if (spec.matrix && !(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) {
5901
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5902
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
5902
5903
  }
5903
5904
  if (spec.matrix) {
5904
5905
  const [a, b, c, d] = spec.matrix;
5905
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5906
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("matrix is singular (it collapses the layer to a line); its determinant a\xB7d \u2212 b\xB7c must not be 0.");
5906
5907
  }
5907
5908
  const session = this.beginFreeTransform(spec);
5908
5909
  try {
5909
5910
  const g = session.startGeometry;
5910
- const corners = spec.matrix ? g.corners.map((p) => _chunkJCXMJUQOcjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkPA3IMPPScjs.applyParams.call(void 0, g, spec.params) : g.corners;
5911
+ const corners = spec.matrix ? g.corners.map((p) => _chunkEGZM52EOcjs.applyMatrix.call(void 0, spec.matrix, p)) : spec.corners ? spec.corners : spec.params ? _chunkOVYQAYGHcjs.applyParams.call(void 0, g, spec.params) : g.corners;
5911
5912
  let warp = spec.warp === void 0 ? _nullishCoalesce(g.warp, () => ( null)) : null;
5912
5913
  if (spec.warp) {
5913
5914
  if ("style" in spec.warp) {
5914
- if (!_chunkJCXMJUQOcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkJCXMJUQOcjs.WARP_STYLES.join(", ")}.`);
5915
- warp = _chunkPA3IMPPScjs.presetWarp.call(void 0, session.box, spec.warp);
5915
+ if (!_chunkEGZM52EOcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkEGZM52EOcjs.WARP_STYLES.join(", ")}.`);
5916
+ warp = _chunkOVYQAYGHcjs.presetWarp.call(void 0, session.box, spec.warp);
5916
5917
  } else {
5917
- if (!_chunkPA3IMPPScjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points, row by row.");
5918
+ if (!_chunkOVYQAYGHcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points, row by row.");
5918
5919
  warp = spec.warp;
5919
5920
  }
5920
5921
  }
@@ -5927,10 +5928,10 @@ var ImageEditorController = (_class10 = class {
5927
5928
  }
5928
5929
  /** Flips the layer (or its selected pixels, or the outline) about the frame's centre, exactly (one undo step). */
5929
5930
  flipLayer(axis, init = {}) {
5930
- if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5931
+ if (axis !== "horizontal" && axis !== "vertical") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`axis must be horizontal or vertical, got "${String(axis)}".`);
5931
5932
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5932
5933
  try {
5933
- session.update({ corners: _chunkPA3IMPPScjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5934
+ session.update({ corners: _chunkOVYQAYGHcjs.flipCorners.call(void 0, session.startGeometry, axis) }, false);
5934
5935
  return session.commit();
5935
5936
  } catch (e) {
5936
5937
  session.cancel();
@@ -5942,16 +5943,16 @@ var ImageEditorController = (_class10 = class {
5942
5943
  * centre, snapped so pixels land on whole pixels: exact, no resampling (one undo step).
5943
5944
  */
5944
5945
  rotateLayer90(turn, init = {}) {
5945
- if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5946
+ if (turn !== 90 && turn !== -90 && turn !== 180) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`turn must be 90, -90 or 180, got ${String(turn)}.`);
5946
5947
  const session = this.beginFreeTransform({ interpolation: "nearest", ...init });
5947
5948
  try {
5948
- const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkPA3IMPPScjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5949
+ const b = session.smartObject || session.typeLayer ? _nullishCoalesce(_chunkOVYQAYGHcjs.transformedBox.call(void 0, session.startGeometry), () => ( session.box)) : session.box;
5949
5950
  const cx = b.x + b.width / 2;
5950
5951
  const cy = b.y + b.height / 2;
5951
5952
  const ox = turn === 180 ? 0 : Math.round(cx - b.height / 2) - (cx - b.height / 2);
5952
5953
  const oy = turn === 180 ? 0 : Math.round(cy - b.width / 2) - (cy - b.width / 2);
5953
5954
  const m = turn === 90 ? [0, 1, -1, 0, cx + cy + ox, cy - cx + oy] : turn === -90 ? [0, -1, 1, 0, cx - cy + ox, cy + cx + oy] : [-1, 0, 0, -1, 2 * cx, 2 * cy];
5954
- session.update({ corners: session.startGeometry.corners.map((p) => _chunkJCXMJUQOcjs.applyMatrix.call(void 0, m, p)) }, false);
5955
+ session.update({ corners: session.startGeometry.corners.map((p) => _chunkEGZM52EOcjs.applyMatrix.call(void 0, m, p)) }, false);
5955
5956
  return session.commit();
5956
5957
  } catch (e) {
5957
5958
  session.cancel();
@@ -5960,20 +5961,20 @@ var ImageEditorController = (_class10 = class {
5960
5961
  }
5961
5962
  /** Adds a `develop` or `blur` filter to a pixel layer (one undo step). Returns the layer's filters. */
5962
5963
  addLayerFilter(id, filter) {
5963
- const f = _chunkPA3IMPPScjs.normalizeFilter.call(void 0, filter);
5964
- const next = _chunkPA3IMPPScjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5964
+ const f = _chunkOVYQAYGHcjs.normalizeFilter.call(void 0, filter);
5965
+ const next = _chunkOVYQAYGHcjs.addLayerFilter.call(void 0, this.state.layers, id, f);
5965
5966
  this.commitLayers(next);
5966
5967
  return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5967
5968
  }
5968
5969
  /** Changes one filter (one undo step, or none with `commitToHistory = false` during a drag). Returns the filters. */
5969
5970
  updateLayerFilter(id, filterId, changes, commitToHistory = true) {
5970
- const next = _chunkPA3IMPPScjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5971
+ const next = _chunkOVYQAYGHcjs.updateLayerFilter.call(void 0, this.state.layers, id, filterId, changes);
5971
5972
  this.commitLayers(next, void 0, commitToHistory);
5972
5973
  return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5973
5974
  }
5974
5975
  /** Removes one filter (one undo step). Returns the remaining filters. */
5975
5976
  removeLayerFilter(id, filterId) {
5976
- const next = _chunkPA3IMPPScjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5977
+ const next = _chunkOVYQAYGHcjs.removeLayerFilter.call(void 0, this.state.layers, id, filterId);
5977
5978
  this.commitLayers(next);
5978
5979
  return _nullishCoalesce(_chunkHGTDMKNEcjs.findLayer.call(void 0, next, id).layer.filters, () => ( []));
5979
5980
  }
@@ -5989,8 +5990,8 @@ var ImageEditorController = (_class10 = class {
5989
5990
  */
5990
5991
  convertToSmartObject(ids, options = {}) {
5991
5992
  const list = _optionalChain([ids, 'optionalAccess', _190 => _190.length]) ? ids : this.state.activeLayerId ? [this.state.activeLayerId] : [];
5992
- if (!list.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5993
- const res = _chunkPA3IMPPScjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5993
+ if (!list.length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("No layers given and none is active; pass layerIds (see list_layers).");
5994
+ const res = _chunkOVYQAYGHcjs.convertToSmartObject.call(void 0, this.state.layers, list, this.canvasSize, { surfaceOf: (l) => this.surfaceOf(l), name: options.name });
5994
5995
  this.commitLayers(res.layers, () => {
5995
5996
  this.state.activeLayerId = res.layer.id;
5996
5997
  this.state.activeTarget = "pixels";
@@ -5999,7 +6000,7 @@ var ImageEditorController = (_class10 = class {
5999
6000
  }
6000
6001
  /** Layer › Smart Objects › Rasterize (one undo step): the smart object becomes a pixel layer holding what it renders. */
6001
6002
  rasterizeSmartObject(id) {
6002
- const res = _chunkPA3IMPPScjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
6003
+ const res = _chunkOVYQAYGHcjs.rasterizeSmartObject.call(void 0, this.state.layers, id);
6003
6004
  this.commitLayers(res.layers, () => {
6004
6005
  if (this.state.activeLayerId === id && this.state.activeTarget === "filter-mask") this.state.activeTarget = "pixels";
6005
6006
  });
@@ -6007,10 +6008,10 @@ var ImageEditorController = (_class10 = class {
6007
6008
  }
6008
6009
  /** A smart object's contents, placement and smart filters as plain data (see `SmartObjectInfo`). */
6009
6010
  getSmartObject(id) {
6010
- const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
6011
+ const layer = _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, id);
6011
6012
  const c = layer.contents;
6012
- const g = _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer);
6013
- const readout = _chunkPA3IMPPScjs.describeTransform.call(void 0, g);
6013
+ const g = _chunkOVYQAYGHcjs.placementGeometry.call(void 0, layer);
6014
+ const readout = _chunkOVYQAYGHcjs.describeTransform.call(void 0, g);
6014
6015
  const stack = layer.smartFilters;
6015
6016
  return {
6016
6017
  layerId: layer.id,
@@ -6020,10 +6021,10 @@ var ImageEditorController = (_class10 = class {
6020
6021
  kind: c.kind,
6021
6022
  width: c.width,
6022
6023
  height: c.height,
6023
- decoded: _chunkPA3IMPPScjs.isContentsDecoded.call(void 0, c),
6024
+ decoded: _chunkOVYQAYGHcjs.isContentsDecoded.call(void 0, c),
6024
6025
  fileType: _nullishCoalesce(_optionalChain([c, 'access', _191 => _191.file, 'optionalAccess', _192 => _192.type]), () => ( null)),
6025
6026
  linkedPath: _nullishCoalesce(_optionalChain([c, 'access', _193 => _193.linked, 'optionalAccess', _194 => _194.path]), () => ( null)),
6026
- instances: _chunkPA3IMPPScjs.instancesOf.call(void 0, this.state.layers, c.id),
6027
+ instances: _chunkOVYQAYGHcjs.instancesOf.call(void 0, this.state.layers, c.id),
6027
6028
  layerCount: c.document ? _chunkHGTDMKNEcjs.flattenLayers.call(void 0, c.document.layers).length : 0
6028
6029
  },
6029
6030
  placement: {
@@ -6035,8 +6036,8 @@ var ImageEditorController = (_class10 = class {
6035
6036
  scaleY: readout.scaleY,
6036
6037
  rotate: readout.rotate,
6037
6038
  skewX: readout.skewX,
6038
- center: _chunkPA3IMPPScjs.anchorPoint.call(void 0, g, "center"),
6039
- bounds: _chunkPA3IMPPScjs.transformedBox.call(void 0, g)
6039
+ center: _chunkOVYQAYGHcjs.anchorPoint.call(void 0, g, "center"),
6040
+ bounds: _chunkOVYQAYGHcjs.transformedBox.call(void 0, g)
6040
6041
  },
6041
6042
  smartFilters: {
6042
6043
  enabled: _nullishCoalesce(_optionalChain([stack, 'optionalAccess', _195 => _195.enabled]), () => ( true)),
@@ -6053,7 +6054,7 @@ var ImageEditorController = (_class10 = class {
6053
6054
  * change. Returns the new placement summary.
6054
6055
  */
6055
6056
  setSmartObjectPlacement(id, placement, commitToHistory = true) {
6056
- const res = _chunkPA3IMPPScjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
6057
+ const res = _chunkOVYQAYGHcjs.setSmartPlacement.call(void 0, this.state.layers, id, placement, this.canvasSize);
6057
6058
  this.commitLayers(res.layers, void 0, commitToHistory);
6058
6059
  return { ...this.getSmartObject(id).placement, masksMoved: res.masksMoved };
6059
6060
  }
@@ -6066,23 +6067,23 @@ var ImageEditorController = (_class10 = class {
6066
6067
  * nothing is relative to the current transform.
6067
6068
  */
6068
6069
  setSmartObjectTransform(id, spec) {
6069
- const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
6070
- const g = _chunkPA3IMPPScjs.placementGeometry.call(void 0, layer);
6070
+ const layer = _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, id);
6071
+ const g = _chunkOVYQAYGHcjs.placementGeometry.call(void 0, layer);
6071
6072
  const numeric = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y"].filter((k) => spec[k] !== void 0);
6072
6073
  const ways = [spec.corners !== void 0, spec.matrix !== void 0, numeric.length > 0].filter(Boolean).length;
6073
- if (ways > 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
6074
+ if (ways > 1) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give the transform only one way: corners, matrix, or the numbers (scaleX, scaleY, rotate, skewX, skewY, x, y).");
6074
6075
  let corners = g.corners;
6075
6076
  if (spec.corners) corners = spec.corners;
6076
6077
  else if (spec.matrix) {
6077
- if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
6078
+ if (!(Array.isArray(spec.matrix) && spec.matrix.length === 6 && spec.matrix.every(Number.isFinite))) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("matrix must be six finite numbers [a, b, c, d, e, f] (x' = a\xB7x + c\xB7y + e, y' = b\xB7x + d\xB7y + f).");
6078
6079
  const [a, b, c, d] = spec.matrix;
6079
- if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
6080
- corners = _chunkPA3IMPPScjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
6080
+ if (Math.abs(a * d - b * c) < 1e-9) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("matrix is singular (it collapses the contents to a line); a\xB7d \u2212 b\xB7c must not be 0.");
6081
+ corners = _chunkOVYQAYGHcjs.cornersFromMatrix.call(void 0, g.box, spec.matrix);
6081
6082
  } else if (numeric.length) {
6082
- if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
6083
- for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${k} must be a finite number.`);
6084
- const now = _chunkPA3IMPPScjs.describeTransform.call(void 0, g);
6085
- const centre = _chunkPA3IMPPScjs.anchorPoint.call(void 0, g, "center");
6083
+ if (spec.scaleX === 0 || spec.scaleY === 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the contents to a line).");
6084
+ for (const k of numeric) if (!Number.isFinite(spec[k])) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`${k} must be a finite number.`);
6085
+ const now = _chunkOVYQAYGHcjs.describeTransform.call(void 0, g);
6086
+ const centre = _chunkOVYQAYGHcjs.anchorPoint.call(void 0, g, "center");
6086
6087
  const params = {
6087
6088
  scaleX: _nullishCoalesce(spec.scaleX, () => ( (now.affine ? now.scaleX : 100))),
6088
6089
  scaleY: _nullishCoalesce(spec.scaleY, () => ( (now.affine ? now.scaleY : 100))),
@@ -6090,20 +6091,20 @@ var ImageEditorController = (_class10 = class {
6090
6091
  skewX: _nullishCoalesce(spec.skewX, () => ( (now.affine ? now.skewX : 0))),
6091
6092
  skewY: _nullishCoalesce(spec.skewY, () => ( 0))
6092
6093
  };
6093
- const m = _chunkPA3IMPPScjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
6094
+ const m = _chunkOVYQAYGHcjs.matrixFromParams.call(void 0, g.box, { ...params, reference: "center" });
6094
6095
  const cx = g.box.width / 2;
6095
6096
  const cy = g.box.height / 2;
6096
6097
  const to = { x: _nullishCoalesce(spec.x, () => ( centre.x)), y: _nullishCoalesce(spec.y, () => ( centre.y)) };
6097
- corners = _chunkPA3IMPPScjs.cornersFromMatrix.call(void 0, g.box, _chunkJCXMJUQOcjs.multiplyMatrices.call(void 0, m, _chunkJCXMJUQOcjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
6098
+ corners = _chunkOVYQAYGHcjs.cornersFromMatrix.call(void 0, g.box, _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, m, _chunkEGZM52EOcjs.translateMatrix.call(void 0, to.x - cx, to.y - cy)));
6098
6099
  }
6099
6100
  let warp = _nullishCoalesce(layer.placement.warp, () => ( null));
6100
6101
  if (spec.warp === null) warp = null;
6101
6102
  else if (spec.warp) {
6102
6103
  if ("style" in spec.warp) {
6103
- if (!_chunkJCXMJUQOcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkJCXMJUQOcjs.WARP_STYLES.join(", ")}.`);
6104
- warp = _chunkPA3IMPPScjs.presetWarp.call(void 0, g.box, spec.warp);
6104
+ if (!_chunkEGZM52EOcjs.WARP_STYLES.includes(spec.warp.style)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown warp style "${String(spec.warp.style)}". Styles: ${_chunkEGZM52EOcjs.WARP_STYLES.join(", ")}.`);
6105
+ warp = _chunkOVYQAYGHcjs.presetWarp.call(void 0, g.box, spec.warp);
6105
6106
  } else {
6106
- if (!_chunkPA3IMPPScjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels, row by row.");
6107
+ if (!_chunkOVYQAYGHcjs.isValidWarp.call(void 0, spec.warp)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("mesh must have us and vs (knots from 0 to 1, increasing) and (3\xB7columns + 1) \xD7 (3\xB7rows + 1) finite points in contents pixels, row by row.");
6107
6108
  warp = spec.warp;
6108
6109
  }
6109
6110
  }
@@ -6117,16 +6118,16 @@ var ImageEditorController = (_class10 = class {
6117
6118
  * the layers that changed.
6118
6119
  */
6119
6120
  replaceSmartObjectContents(id, source) {
6120
- const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
6121
+ const layer = _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, id);
6121
6122
  let contents;
6122
6123
  if ("contents" in source) contents = source.contents;
6123
- else if ("pixels" in source) contents = _chunkPA3IMPPScjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
6124
+ else if ("pixels" in source) contents = _chunkOVYQAYGHcjs.rasterContents.call(void 0, source.pixels, _nullishCoalesce(source.name, () => ( layer.contents.name.replace(/\.\w+$/, ".png"))));
6124
6125
  else {
6125
- const psd = _chunkPA3IMPPScjs.importPsd.call(void 0, source.psd, { newId: () => _chunkPA3IMPPScjs.newLayerId.call(void 0, ) });
6126
- contents = _chunkPA3IMPPScjs.documentContents.call(void 0, { layers: psd.layers, globalLight: psd.globalLight, patterns: psd.patterns.length ? psd.patterns : void 0 }, psd.width, psd.height, _nullishCoalesce(source.name, () => ( `${layer.name || "Contents"}.psb`)));
6126
+ const psd = _chunkOVYQAYGHcjs.importPsd.call(void 0, source.psd, { newId: () => _chunkOVYQAYGHcjs.newLayerId.call(void 0, ) });
6127
+ contents = _chunkOVYQAYGHcjs.documentContents.call(void 0, { layers: psd.layers, globalLight: psd.globalLight, patterns: psd.patterns.length ? psd.patterns : void 0 }, psd.width, psd.height, _nullishCoalesce(source.name, () => ( `${layer.name || "Contents"}.psb`)));
6127
6128
  contents.file = { bytes: source.psd.slice(), type: psd.info.psb ? "psb" : "psd" };
6128
6129
  }
6129
- const res = _chunkPA3IMPPScjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
6130
+ const res = _chunkOVYQAYGHcjs.replaceContents.call(void 0, this.state.layers, layer.contents.id, contents, this.canvasSize);
6130
6131
  this.commitLayers(res.layers);
6131
6132
  return { contentsId: layer.contents.id, width: contents.width, height: contents.height, layerIds: res.ids };
6132
6133
  }
@@ -6141,16 +6142,16 @@ var ImageEditorController = (_class10 = class {
6141
6142
  * and bytes.
6142
6143
  */
6143
6144
  exportSmartObjectContents(id) {
6144
- const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
6145
+ const layer = _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, id);
6145
6146
  const c = layer.contents;
6146
6147
  const base = c.name.replace(/\.\w+$/, "") || "Contents";
6147
6148
  if (c.file) {
6148
- const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkPA3IMPPScjs.BROWSER_IMAGE_TYPES };
6149
+ const mime = { psd: "image/vnd.adobe.photoshop", psb: "image/vnd.adobe.photoshop", pdf: "application/pdf", ..._chunkOVYQAYGHcjs.BROWSER_IMAGE_TYPES };
6149
6150
  const ext = c.file.type.toLowerCase();
6150
6151
  return { name: /\.\w+$/.test(c.name) ? c.name : `${base}.${ext}`, mimeType: _nullishCoalesce(mime[ext], () => ( "application/octet-stream")), bytes: c.file.bytes };
6151
6152
  }
6152
- if (!_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
6153
- const f = _chunkPA3IMPPScjs.smartContentsFile.call(void 0, c);
6153
+ if (!_chunkOVYQAYGHcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`The contents of "${layer.name || id}" are not available here.`);
6154
+ const f = _chunkOVYQAYGHcjs.smartContentsFile.call(void 0, c);
6154
6155
  return { name: f.name, mimeType: f.name.endsWith(".png") ? "image/png" : "image/vnd.adobe.photoshop", bytes: f.bytes };
6155
6156
  }
6156
6157
  /**
@@ -6159,7 +6160,7 @@ var ImageEditorController = (_class10 = class {
6159
6160
  * undo step. Returns the copy's id.
6160
6161
  */
6161
6162
  copySmartObject(id, linked = false, name) {
6162
- const res = _chunkPA3IMPPScjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
6163
+ const res = _chunkOVYQAYGHcjs.copySmartObject.call(void 0, this.state.layers, id, linked, name);
6163
6164
  this.commitLayers(res.layers, () => {
6164
6165
  this.state.activeLayerId = res.layer.id;
6165
6166
  this.state.activeTarget = "pixels";
@@ -6168,31 +6169,31 @@ var ImageEditorController = (_class10 = class {
6168
6169
  }
6169
6170
  /** Adds a smart filter (`develop` or `blur`, with `blend` and `opacity`) at `index` (default the top), as one undo step. */
6170
6171
  addSmartFilter(id, filter, index) {
6171
- const res = _chunkPA3IMPPScjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkPA3IMPPScjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
6172
+ const res = _chunkOVYQAYGHcjs.addSmartFilter.call(void 0, this.state.layers, id, _chunkOVYQAYGHcjs.normalizeSmartFilter.call(void 0, filter), this.canvasSize, index);
6172
6173
  this.commitLayers(res.layers);
6173
6174
  return res.filter;
6174
6175
  }
6175
6176
  /** Changes one smart filter (one undo step, or none with `commitToHistory = false` during a drag). */
6176
6177
  updateSmartFilter(id, filterId, changes, commitToHistory = true) {
6177
- const res = _chunkPA3IMPPScjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
6178
+ const res = _chunkOVYQAYGHcjs.updateSmartFilter.call(void 0, this.state.layers, id, filterId, changes, this.canvasSize);
6178
6179
  this.commitLayers(res.layers, void 0, commitToHistory);
6179
6180
  return res.filter;
6180
6181
  }
6181
6182
  /** Removes one smart filter (one undo step). Returns the remaining filters. */
6182
6183
  removeSmartFilter(id, filterId) {
6183
- const res = _chunkPA3IMPPScjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
6184
+ const res = _chunkOVYQAYGHcjs.removeSmartFilter.call(void 0, this.state.layers, id, filterId, this.canvasSize);
6184
6185
  this.commitLayers(res.layers);
6185
6186
  return _nullishCoalesce(_optionalChain([res, 'access', _198 => _198.layer, 'access', _199 => _199.smartFilters, 'optionalAccess', _200 => _200.filters]), () => ( []));
6186
6187
  }
6187
6188
  /** Moves one smart filter to `index` (0 = bottom, applied first), as one undo step. Returns the filters. */
6188
6189
  moveSmartFilter(id, filterId, index) {
6189
- const res = _chunkPA3IMPPScjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
6190
+ const res = _chunkOVYQAYGHcjs.moveSmartFilter.call(void 0, this.state.layers, id, filterId, index, this.canvasSize);
6190
6191
  this.commitLayers(res.layers);
6191
6192
  return _nullishCoalesce(_optionalChain([res, 'access', _201 => _201.layer, 'access', _202 => _202.smartFilters, 'optionalAccess', _203 => _203.filters]), () => ( []));
6192
6193
  }
6193
6194
  /** Turns a smart object's whole filter stack on or off (one undo step). */
6194
6195
  setSmartFiltersEnabled(id, enabled) {
6195
- const res = _chunkPA3IMPPScjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
6196
+ const res = _chunkOVYQAYGHcjs.setSmartFiltersEnabled.call(void 0, this.state.layers, id, enabled, this.canvasSize);
6196
6197
  this.commitLayers(res.layers);
6197
6198
  return _nullishCoalesce(_optionalChain([res, 'access', _204 => _204.layer, 'access', _205 => _205.smartFilters, 'optionalAccess', _206 => _206.enabled]), () => ( true));
6198
6199
  }
@@ -6202,21 +6203,21 @@ var ImageEditorController = (_class10 = class {
6202
6203
  * Painting it targets channel `filter-mask`. Returns the mask, or `null` when removed.
6203
6204
  */
6204
6205
  setSmartFilterMask(id, from, props = {}, commitToHistory = true) {
6205
- const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
6206
+ const layer = _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, id);
6206
6207
  let mask;
6207
6208
  if (from === "none") mask = null;
6208
6209
  else if (from === "keep") {
6209
- if (!_optionalChain([layer, 'access', _207 => _207.smartFilters, 'optionalAccess', _208 => _208.mask])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
6210
+ if (!_optionalChain([layer, 'access', _207 => _207.smartFilters, 'optionalAccess', _208 => _208.mask])) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Smart object "${layer.name || id}" has no filter mask; add one with from reveal-all, hide-all or selection.`);
6210
6211
  mask = withMaskProps(layer.smartFilters.mask, props);
6211
6212
  } else if (from === "selection") {
6212
6213
  const sel = this.state.selection;
6213
- if (!_optionalChain([sel, 'optionalAccess', _209 => _209.bounds])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
6214
+ if (!_optionalChain([sel, 'optionalAccess', _209 => _209.bounds])) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Nothing is selected; select first, or use reveal-all / hide-all.");
6214
6215
  mask = this.maskFromSelection(sel, props);
6215
6216
  } else {
6216
6217
  const v = from === "reveal-all" ? 255 : 0;
6217
6218
  mask = withMaskProps({ surface: _chunkCWM3CUUXcjs.emptySurface.call(void 0, 1, v), defaultValue: v }, props);
6218
6219
  }
6219
- const res = _chunkPA3IMPPScjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
6220
+ const res = _chunkOVYQAYGHcjs.setSmartFilterMask.call(void 0, this.state.layers, id, mask, this.canvasSize);
6220
6221
  this.commitLayers(res.layers, () => {
6221
6222
  if (this.state.activeLayerId !== id) return;
6222
6223
  if (mask && from !== "keep") this.state.activeTarget = "filter-mask";
@@ -6232,14 +6233,14 @@ var ImageEditorController = (_class10 = class {
6232
6233
  async prepareSmartObjects() {
6233
6234
  const pending = /* @__PURE__ */ new Map();
6234
6235
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers)) {
6235
- if (l.type === "smart" && !_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkPA3IMPPScjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
6236
+ if (l.type === "smart" && !_chunkOVYQAYGHcjs.isContentsDecoded.call(void 0, l.contents) && l.contents.file && _chunkOVYQAYGHcjs.BROWSER_IMAGE_TYPES[l.contents.file.type]) pending.set(l.contents.id, l.contents);
6236
6237
  }
6237
6238
  const left = [];
6238
6239
  for (const [cid, c] of pending) {
6239
6240
  try {
6240
- const url = `data:${_chunkPA3IMPPScjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkCWM3CUUXcjs.bytesToBase64.call(void 0, c.file.bytes)}`;
6241
+ const url = `data:${_chunkOVYQAYGHcjs.BROWSER_IMAGE_TYPES[c.file.type]};base64,${_chunkCWM3CUUXcjs.bytesToBase64.call(void 0, c.file.bytes)}`;
6241
6242
  const px2 = await this.decodeImage(url);
6242
- const decoded = { ...c, kind: "raster", raster: _chunkPA3IMPPScjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
6243
+ const decoded = { ...c, kind: "raster", raster: _chunkOVYQAYGHcjs.rasterContents.call(void 0, px2, c.name, cid).raster, width: px2.width, height: px2.height };
6243
6244
  const swap = (layers) => {
6244
6245
  let out = layers;
6245
6246
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) if (l.type === "smart" && l.contents.id === cid) out = _chunkHGTDMKNEcjs.mapLayer.call(void 0, out, l.id, (x) => ({ ...x, contents: decoded }));
@@ -6267,10 +6268,10 @@ var ImageEditorController = (_class10 = class {
6267
6268
  * Contents can nest. Returns the contents' size and layer ids.
6268
6269
  */
6269
6270
  editSmartObjectContents(id) {
6270
- if (this.getFreeTransform()) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
6271
- const layer = _chunkPA3IMPPScjs.requireSmartObject.call(void 0, this.state.layers, id);
6271
+ if (this.getFreeTransform()) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("A Free Transform is open; commit or cancel it first.");
6272
+ const layer = _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, this.state.layers, id);
6272
6273
  const c = layer.contents;
6273
- if (!_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _213 => _213.file, 'optionalAccess', _214 => _214.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
6274
+ if (!_chunkOVYQAYGHcjs.isContentsDecoded.call(void 0, c)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`The contents of "${layer.name || id}" are a ${_nullishCoalesce(_optionalChain([c, 'access', _213 => _213.file, 'optionalAccess', _214 => _214.type]), () => ( "file"))} that could not be decoded here; run prepareSmartObjects() in a browser first.`);
6274
6275
  const saved = {
6275
6276
  state: { ...this.state },
6276
6277
  undo: this.undoStack,
@@ -6281,7 +6282,7 @@ var ImageEditorController = (_class10 = class {
6281
6282
  samplePixelsOverride: this.samplePixelsOverride,
6282
6283
  psdResolution: this.psdResolution
6283
6284
  };
6284
- const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
6285
+ const layers = c.kind === "document" ? c.document.layers : [{ type: "pixel", id: _chunkOVYQAYGHcjs.newLayerId.call(void 0, ), name: "Layer 0", visible: true, opacity: 1, blend: "normal", surface: c.raster, offset: { x: 0, y: 0 } }];
6285
6286
  this.contentsStack.push({ layerId: layer.id, contentsId: c.id, name: layer.name || c.name, saved });
6286
6287
  const s = this.state;
6287
6288
  this.state = {
@@ -6289,7 +6290,7 @@ var ImageEditorController = (_class10 = class {
6289
6290
  sourceUrl: null,
6290
6291
  imageDimensions: { width: c.width, height: c.height },
6291
6292
  crop: null,
6292
- transform: { ..._chunkPA3IMPPScjs.DEFAULT_TRANSFORM_VALUES },
6293
+ transform: { ..._chunkOVYQAYGHcjs.DEFAULT_TRANSFORM_VALUES },
6293
6294
  layers,
6294
6295
  activeLayerId: layers.length ? layers[layers.length - 1].id : null,
6295
6296
  activeTarget: "pixels",
@@ -6322,7 +6323,7 @@ var ImageEditorController = (_class10 = class {
6322
6323
  */
6323
6324
  closeSmartObjectContents(save = true) {
6324
6325
  const top = this.contentsStack.pop();
6325
- if (!top) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
6326
+ if (!top) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("No smart object contents are open; open them with edit_smart_object_contents.");
6326
6327
  if (_optionalChain([this, 'access', _220 => _220.openTransform, 'optionalAccess', _221 => _221.isOpen])) this.openTransform.cancel();
6327
6328
  this.openTransform = null;
6328
6329
  const edited = this.state;
@@ -6336,10 +6337,10 @@ var ImageEditorController = (_class10 = class {
6336
6337
  const plain3 = _optionalChain([only, 'optionalAccess', _224 => _224.type]) === "pixel" && only.visible && only.opacity === 1 && only.blend === "normal" && !only.mask && !only.effects && !_optionalChain([only, 'access', _225 => _225.filters, 'optionalAccess', _226 => _226.length]) && !only.clipped && (_nullishCoalesce(only.fillOpacity, () => ( 1))) === 1 && only.source !== "document";
6337
6338
  if (_optionalChain([old, 'optionalAccess', _227 => _227.kind]) === "raster" && plain3) {
6338
6339
  const px2 = _chunkCWM3CUUXcjs.readRegion.call(void 0, only.surface, { x: -only.offset.x, y: -only.offset.y, width, height });
6339
- next = _chunkPA3IMPPScjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
6340
+ next = _chunkOVYQAYGHcjs.rasterContents.call(void 0, { width, height, data: px2 }, old.name, old.id);
6340
6341
  } else {
6341
6342
  const doc = { layers: edited.layers, globalLight: edited.globalLight, patterns: edited.patterns };
6342
- next = _chunkPA3IMPPScjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _228 => _228.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _229 => _229.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
6343
+ next = _chunkOVYQAYGHcjs.documentContents.call(void 0, doc, width, height, _optionalChain([old, 'optionalAccess', _228 => _228.kind]) === "document" ? old.name : `${(_nullishCoalesce(_optionalChain([old, 'optionalAccess', _229 => _229.name]), () => ( "Contents"))).replace(/\.\w+$/, "")}.psb`, top.contentsId);
6343
6344
  }
6344
6345
  }
6345
6346
  const saved = top.saved;
@@ -6358,7 +6359,7 @@ var ImageEditorController = (_class10 = class {
6358
6359
  this.notify();
6359
6360
  return { layerId: top.layerId, changed: false, layerIds: [] };
6360
6361
  }
6361
- const res = _chunkPA3IMPPScjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
6362
+ const res = _chunkOVYQAYGHcjs.replaceContents.call(void 0, this.state.layers, top.contentsId, next, this.canvasSize);
6362
6363
  this.commitLayers(res.layers);
6363
6364
  return { layerId: top.layerId, changed: true, layerIds: res.ids };
6364
6365
  }
@@ -6373,35 +6374,35 @@ var ImageEditorController = (_class10 = class {
6373
6374
  // --- Layer effects ---
6374
6375
  /** A layer's effects (an empty, enabled list when it has none). */
6375
6376
  getLayerEffects(id) {
6376
- return _chunkPA3IMPPScjs.layerEffectsOf.call(void 0, _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer);
6377
+ return _chunkOVYQAYGHcjs.layerEffectsOf.call(void 0, _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id).layer);
6377
6378
  }
6378
6379
  /**
6379
6380
  * Adds an effect of `kind` with Photoshop's defaults and `params` applied (one undo step), at
6380
6381
  * `index` in the layer's effect list (default the end). Returns the new effect and the effects.
6381
6382
  */
6382
6383
  addLayerEffect(id, kind, params = {}, index) {
6383
- const res = _chunkPA3IMPPScjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
6384
+ const res = _chunkOVYQAYGHcjs.addLayerEffect.call(void 0, this.state.layers, id, kind, params, index);
6384
6385
  this.commitLayers(res.layers);
6385
6386
  return { effect: res.effect, effects: this.getLayerEffects(id) };
6386
6387
  }
6387
6388
  /** Changes one effect (one undo step, or none with `commitToHistory = false` during a drag). Returns the effects. */
6388
6389
  updateLayerEffect(id, effectId, changes, commitToHistory = true) {
6389
- this.commitLayers(_chunkPA3IMPPScjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
6390
+ this.commitLayers(_chunkOVYQAYGHcjs.updateLayerEffect.call(void 0, this.state.layers, id, effectId, changes), void 0, commitToHistory);
6390
6391
  return this.getLayerEffects(id);
6391
6392
  }
6392
6393
  /** Removes one effect (one undo step). Returns the remaining effects. */
6393
6394
  removeLayerEffect(id, effectId) {
6394
- this.commitLayers(_chunkPA3IMPPScjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
6395
+ this.commitLayers(_chunkOVYQAYGHcjs.removeLayerEffect.call(void 0, this.state.layers, id, effectId));
6395
6396
  return this.getLayerEffects(id);
6396
6397
  }
6397
6398
  /** Turns a layer's effects on or off as a whole and, when given, sets Scale Effects (one undo step). */
6398
6399
  setLayerEffectsEnabled(id, enabled, scale, commitToHistory = true) {
6399
- this.commitLayers(_chunkPA3IMPPScjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
6400
+ this.commitLayers(_chunkOVYQAYGHcjs.setLayerEffectsEnabled.call(void 0, this.state.layers, id, enabled, scale), void 0, commitToHistory);
6400
6401
  return this.getLayerEffects(id);
6401
6402
  }
6402
6403
  /** Replaces a layer's effects (one undo step; `null` removes them). Returns the effects. */
6403
6404
  setLayerEffects(id, effects, commitToHistory = true) {
6404
- this.commitLayers(_chunkPA3IMPPScjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
6405
+ this.commitLayers(_chunkOVYQAYGHcjs.setLayerEffects.call(void 0, this.state.layers, id, effects), void 0, commitToHistory);
6405
6406
  return this.getLayerEffects(id);
6406
6407
  }
6407
6408
  __init86() {this.patternIds = /* @__PURE__ */ new WeakMap()}
@@ -6427,8 +6428,8 @@ var ImageEditorController = (_class10 = class {
6427
6428
  /** Sets the global light (one undo step). `angle` -360..360°, `altitude` 0..90°. Returns it. */
6428
6429
  setGlobalLight(light, commitToHistory = true) {
6429
6430
  const next = { ...this.getGlobalLight(), ...light };
6430
- if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
6431
- if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
6431
+ if (!(Number.isFinite(next.angle) && next.angle >= -360 && next.angle <= 360)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`angle must be from -360 to 360 degrees, got ${next.angle}.`);
6432
+ if (!(Number.isFinite(next.altitude) && next.altitude >= 0 && next.altitude <= 90)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`altitude must be from 0 to 90 degrees, got ${next.altitude}.`);
6432
6433
  if (commitToHistory) this.recordHistory();
6433
6434
  if (next.angle === _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT.angle && next.altitude === _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT.altitude) delete this.state.globalLight;
6434
6435
  else this.state.globalLight = next;
@@ -6439,16 +6440,16 @@ var ImageEditorController = (_class10 = class {
6439
6440
  async compositeToSurface(layers, rect) {
6440
6441
  const { width, height } = this.naturalSize;
6441
6442
  if (_chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers).some((l) => l.type === "annotation" && l.visible) && !this.renderer.canRasterize()) {
6442
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
6443
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Merging annotation layers needs a canvas (a browser); hide or delete them first, or merge in the browser.");
6443
6444
  }
6444
6445
  await this.renderer.prepareLayerAssets(layers, width, height);
6445
6446
  const sources = this.renderer.compositorSources(width, height);
6446
6447
  const depth = this.bitDepth;
6447
6448
  if (depth !== 8) {
6448
- const samples = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkPA3IMPPScjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
6449
+ const samples = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkOVYQAYGHcjs.compositeDeep.call(void 0, layers, rect, sources, depth), depth);
6449
6450
  return _chunkCWM3CUUXcjs.surfaceFromDeepPixels.call(void 0, { width: rect.width, height: rect.height, data: samples }, 4, rect.x, rect.y);
6450
6451
  }
6451
- const data = new (0, _chunkPA3IMPPScjs.LayerCompositor)().composite(layers, rect, sources);
6452
+ const data = new (0, _chunkOVYQAYGHcjs.LayerCompositor)().composite(layers, rect, sources);
6452
6453
  return _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width: rect.width, height: rect.height, data }, 4, rect.x, rect.y);
6453
6454
  }
6454
6455
  /**
@@ -6461,22 +6462,22 @@ var ImageEditorController = (_class10 = class {
6461
6462
  const r = _nullishCoalesce(rect, () => ( { x: 0, y: 0, width, height }));
6462
6463
  const depth = this.bitDepth;
6463
6464
  if (depth === 8) return { width: r.width, height: r.height, depth: 16, data: _chunkCWM3CUUXcjs.to16From8.call(void 0, this.compositePixels(r).data) };
6464
- const data = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkPA3IMPPScjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
6465
+ const data = _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkOVYQAYGHcjs.compositeDeep.call(void 0, this.state.layers, r, this.compositorSources(), depth), depth);
6465
6466
  return { width: r.width, height: r.height, depth, data };
6466
6467
  }
6467
6468
  /** Document bounds a layer can paint into (pixel content, annotations, or the canvas for the rest). */
6468
6469
  paintBounds(layer) {
6469
6470
  const { width, height } = this.naturalSize;
6470
6471
  const canvas = { x: 0, y: 0, width, height };
6471
- if (_chunkPA3IMPPScjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
6472
+ if (_chunkOVYQAYGHcjs.hasSurface.call(void 0, layer)) return _nullishCoalesce(this.getLayerBounds(layer.id), () => ( { x: 0, y: 0, width: 0, height: 0 }));
6472
6473
  if (layer.type === "annotation") {
6473
- const b = _chunkPA3IMPPScjs.getAnnotationBounds.call(void 0, layer.annotation);
6474
+ const b = _chunkOVYQAYGHcjs.getAnnotationBounds.call(void 0, layer.annotation);
6474
6475
  const pad = 4 + ("strokeWidth" in layer.annotation ? layer.annotation.strokeWidth : 0);
6475
6476
  return coveringRect({ x: b.x - pad, y: b.y - pad, width: b.width + 2 * pad, height: b.height + 2 * pad });
6476
6477
  }
6477
6478
  if (layer.type === "group") {
6478
6479
  let r = null;
6479
- for (const c of layer.children) r = _chunkPA3IMPPScjs.unionRect.call(void 0, r, this.paintBounds(c));
6480
+ for (const c of layer.children) r = _chunkOVYQAYGHcjs.unionRect.call(void 0, r, this.paintBounds(c));
6480
6481
  return _nullishCoalesce(r, () => ( canvas));
6481
6482
  }
6482
6483
  return canvas;
@@ -6487,16 +6488,16 @@ var ImageEditorController = (_class10 = class {
6487
6488
  * Returns the merged id.
6488
6489
  */
6489
6490
  async mergeDown(id) {
6490
- const loc = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id);
6491
+ const loc = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id);
6491
6492
  const upper = loc.layer;
6492
6493
  const siblings = loc.parent ? loc.parent.children : this.state.layers;
6493
6494
  const lower = siblings[loc.index - 1];
6494
- if (!lower) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
6495
- if (lower.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Merge Down needs a pixel layer below; "${lower.name || lower.id}" is a ${lower.type} layer. Move the layer or merge into another one.`);
6496
- if (!upper.visible) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
6497
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, upper, "all", "merge it");
6498
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
6499
- let rect = _nullishCoalesce(_chunkPA3IMPPScjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
6495
+ if (!lower) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${upper.name || id}" is the bottom of its group; there is nothing below to merge into.`);
6496
+ if (lower.type !== "pixel") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Merge Down needs a pixel layer below; "${lower.name || lower.id}" is a ${lower.type} layer. Move the layer or merge into another one.`);
6497
+ if (!upper.visible) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${upper.name || id}" is hidden; show it or delete it instead of merging.`);
6498
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, upper, "all", "merge it");
6499
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, lower, "pixels", "merge into it");
6500
+ let rect = _nullishCoalesce(_chunkOVYQAYGHcjs.unionRect.call(void 0, this.paintBounds(lower), upper.type === "adjustment" ? null : this.paintBounds(upper)), () => ( { x: 0, y: 0, width: 1, height: 1 }));
6500
6501
  const reach = Math.max(_chunkHGTDMKNEcjs.effectsMargin.call(void 0, lower.effects), upper.type === "adjustment" ? 0 : _chunkHGTDMKNEcjs.effectsMargin.call(void 0, upper.effects));
6501
6502
  if (reach) rect = { x: rect.x - reach, y: rect.y - reach, width: rect.width + 2 * reach, height: rect.height + 2 * reach };
6502
6503
  const base = { ...lower, blend: "normal", opacity: 1 };
@@ -6522,12 +6523,12 @@ var ImageEditorController = (_class10 = class {
6522
6523
  */
6523
6524
  async mergeVisible() {
6524
6525
  const visible = this.state.layers.filter((l) => l.visible);
6525
- if (!visible.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("No layer is visible.");
6526
+ if (!visible.length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("No layer is visible.");
6526
6527
  const { width, height } = this.naturalSize;
6527
6528
  const surface = await this.compositeToSurface(visible, { x: 0, y: 0, width, height });
6528
6529
  const merged = {
6529
6530
  type: "pixel",
6530
- id: _chunkPA3IMPPScjs.newLayerId.call(void 0, ),
6531
+ id: _chunkOVYQAYGHcjs.newLayerId.call(void 0, ),
6531
6532
  name: "Merged",
6532
6533
  visible: true,
6533
6534
  opacity: 1,
@@ -6551,8 +6552,8 @@ var ImageEditorController = (_class10 = class {
6551
6552
  const surface = await this.compositeToSurface(this.state.layers, { x: 0, y: 0, width, height });
6552
6553
  const bg = {
6553
6554
  type: "pixel",
6554
- id: _chunkPA3IMPPScjs.BACKGROUND_LAYER_ID,
6555
- name: _chunkPA3IMPPScjs.BACKGROUND_LAYER_NAME,
6555
+ id: _chunkOVYQAYGHcjs.BACKGROUND_LAYER_ID,
6556
+ name: _chunkOVYQAYGHcjs.BACKGROUND_LAYER_NAME,
6556
6557
  visible: true,
6557
6558
  opacity: 1,
6558
6559
  blend: "normal",
@@ -6579,7 +6580,7 @@ var ImageEditorController = (_class10 = class {
6579
6580
  const k = Math.min(1, side / Math.max(width, height));
6580
6581
  const tw = Math.max(1, Math.round(width * k));
6581
6582
  const th = Math.max(1, Math.round(height * k));
6582
- const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkPA3IMPPScjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
6583
+ const surface = options.mask ? layer.mask && !layer.mask.source ? layer.mask.surface : null : _chunkOVYQAYGHcjs.hasSurface.call(void 0, layer) ? this.surfaceOf(layer) : null;
6583
6584
  if (!surface) return null;
6584
6585
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
6585
6586
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
@@ -6675,7 +6676,7 @@ var ImageEditorController = (_class10 = class {
6675
6676
  * pixels. The next stroke fixes the offset from its first point. View state, no undo.
6676
6677
  */
6677
6678
  setCloneSource(point) {
6678
- if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6679
+ if (point && (!Number.isFinite(point.x) || !Number.isFinite(point.y))) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The clone source needs finite x and y (document pixels).");
6679
6680
  const source = point ? { x: Math.round(point.x), y: Math.round(point.y), offset: null } : null;
6680
6681
  this.state.paint = { ...this.state.paint, cloneSource: source };
6681
6682
  this.notify();
@@ -6691,9 +6692,9 @@ var ImageEditorController = (_class10 = class {
6691
6692
  const next = t ? { ...cur, ...t } : { ..._chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM };
6692
6693
  for (const k of ["scaleX", "scaleY"]) {
6693
6694
  const v = next[k];
6694
- if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
6695
+ if (!Number.isFinite(v) || Math.abs(v) < 0.01 || Math.abs(v) > 10) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`${k} must be a scale factor between 0.01 and 10 in size (negative flips), not ${String(v)}.`);
6695
6696
  }
6696
- if (!Number.isFinite(next.rotate)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("rotate must be a number of degrees.");
6697
+ if (!Number.isFinite(next.rotate)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("rotate must be a number of degrees.");
6697
6698
  next.rotate = ((next.rotate + 180) % 360 + 360) % 360 - 180;
6698
6699
  this.state.paint = { ...this.state.paint, cloneTransform: next };
6699
6700
  this.notify();
@@ -6711,28 +6712,28 @@ var ImageEditorController = (_class10 = class {
6711
6712
  /** Resolves and validates what a stroke, fill or clear paints into. */
6712
6713
  paintTarget(layerId, channel, action) {
6713
6714
  const id = _nullishCoalesce(layerId, () => ( this.state.activeLayerId));
6714
- if (!id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`, `Pick a layer to ${action} on in the Layers panel.`);
6715
- const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
6715
+ if (!id) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`No layer given and none is active; pass layerId (see list_layers) to ${action}.`, `Pick a layer to ${action} on in the Layers panel.`);
6716
+ const layer = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id).layer;
6716
6717
  const name = layer.name || id;
6717
6718
  const ch = _nullishCoalesce(channel, () => ( (id === this.state.activeLayerId ? this.state.activeTarget : "pixels")));
6718
6719
  if (ch === "mask") {
6719
- if (!layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`, `Layer "${name}" has no mask; add a mask or ${action} on its pixels.`);
6720
- if (layer.mask.source) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
6721
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", action);
6720
+ if (!layer.mask) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" has no mask to ${action}; add one with add_layer_mask, or target pixels.`, `Layer "${name}" has no mask; add a mask or ${action} on its pixels.`);
6721
+ if (layer.mask.source) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" has a depth mask, which is generated, not painted.`);
6722
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "all", action);
6722
6723
  } else if (ch === "filter-mask") {
6723
6724
  if (layer.type !== "smart" || !_optionalChain([layer, 'access', _237 => _237.smartFilters, 'optionalAccess', _238 => _238.mask])) {
6724
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
6725
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" has no smart filter mask to ${action}; add one with set_smart_filter_mask, or target pixels or mask.`, `Layer "${name}" has no smart filter mask to ${action}.`);
6725
6726
  }
6726
- if (!_chunkPA3IMPPScjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
6727
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", action);
6727
+ if (!_chunkOVYQAYGHcjs.isContentsDecoded.call(void 0, layer.contents)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`The contents of "${name}" are not decoded here, so its filter mask cannot be painted; run prepareSmartObjects() first.`, `The smart object "${name}" is still loading; try again in a moment.`);
6728
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "all", action);
6728
6729
  } else {
6729
- if (layer.type === "smart") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is a smart object; its pixels come from its contents. Rasterize it (rasterize_smart_object), edit its contents (edit_smart_object_contents), or ${action} on its mask or filter mask.`, `"${name}" is a smart object; rasterize it or edit its contents to ${action} on it.`);
6730
- if (layer.type === "shape") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is a shape layer; its pixels are drawn from its paths. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`, `"${name}" is a shape layer; rasterize it to ${action} on it.`);
6731
- if (layer.type === "type") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is a type layer; its pixels are drawn from its text. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`, `"${name}" is a type layer; rasterize it to ${action} on it.`);
6732
- if (layer.type !== "pixel") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`, `"${name}" is not a pixel layer; pick a pixel layer to ${action} on.`);
6733
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", action);
6730
+ if (layer.type === "smart") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" is a smart object; its pixels come from its contents. Rasterize it (rasterize_smart_object), edit its contents (edit_smart_object_contents), or ${action} on its mask or filter mask.`, `"${name}" is a smart object; rasterize it or edit its contents to ${action} on it.`);
6731
+ if (layer.type === "shape") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" is a shape layer; its pixels are drawn from its paths. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`, `"${name}" is a shape layer; rasterize it to ${action} on it.`);
6732
+ if (layer.type === "type") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" is a type layer; its pixels are drawn from its text. Rasterize it first (rasterize_layer), or ${action} on its mask (channel mask).`, `"${name}" is a type layer; rasterize it to ${action} on it.`);
6733
+ if (layer.type !== "pixel") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" is a ${layer.type} layer; ${action} on a pixel layer, or on this layer's mask (channel mask).`, `"${name}" is not a pixel layer; pick a pixel layer to ${action} on.`);
6734
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "pixels", action);
6734
6735
  }
6735
- if (!layer.visible) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
6736
+ if (!layer.visible) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${name}" is hidden; show it before you ${action}.`);
6736
6737
  const offset = layer.type === "pixel" ? layer.offset : { x: 0, y: 0 };
6737
6738
  const surface = ch === "mask" ? layer.mask.surface : ch === "filter-mask" ? layer.smartFilters.mask.surface : this.surfaceOf(layer);
6738
6739
  const lockTransparency = ch === "pixels" && Boolean(_optionalChain([layer, 'access', _239 => _239.locks, 'optionalAccess', _240 => _240.transparency]));
@@ -6741,7 +6742,7 @@ var ImageEditorController = (_class10 = class {
6741
6742
  /** The layer with its pixels (or mask) replaced by `surface`. */
6742
6743
  withSurface(layer, channel, surface) {
6743
6744
  if (channel === "mask") return { ...layer, mask: { ...layer.mask, surface } };
6744
- if (channel === "filter-mask") return _chunkPA3IMPPScjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6745
+ if (channel === "filter-mask") return _chunkOVYQAYGHcjs.withFilterMaskSurface.call(void 0, layer, surface, this.canvasSize);
6745
6746
  const next = { ...layer, surface };
6746
6747
  delete next.source;
6747
6748
  return next;
@@ -6754,10 +6755,10 @@ var ImageEditorController = (_class10 = class {
6754
6755
  */
6755
6756
  beginStroke(init = {}) {
6756
6757
  const tool = _nullishCoalesce(init.tool, () => ( "brush"));
6757
- if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6758
+ if (!STROKE_TOOLS.includes(tool)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown paint tool "${String(tool)}"; use one of ${STROKE_TOOLS.join(", ")}.`);
6758
6759
  const target = this.paintTarget(init.layerId, init.channel, tool === "eraser" ? "erase" : isRetouchTool(tool) ? "retouch" : "paint");
6759
6760
  if (tool === "mixer" && target.channel !== "pixels") {
6760
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.", "The Mixer Brush paints on pixels, not masks; target the layer's pixels, or paint the mask with the Brush.");
6761
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The Mixer Brush paints colour on pixels, not on masks; target pixels (channel pixels), or paint the mask with the brush.", "The Mixer Brush paints on pixels, not masks; target the layer's pixels, or paint the mask with the Brush.");
6761
6762
  }
6762
6763
  const brush = _chunkEBDCRTZIcjs.normalizeBrush.call(void 0, { ...this.state.paint.brush, ..._nullishCoalesce(init.brush, () => ( {})) });
6763
6764
  let strokePaint = null;
@@ -6791,7 +6792,7 @@ var ImageEditorController = (_class10 = class {
6791
6792
  retouchStroke(tool, init, brush, target, apply) {
6792
6793
  const settings = _chunk7NW46N7Icjs.normalizeRetouch.call(void 0, _nullishCoalesce(init.retouch, () => ( {})), this.state.paint.retouch);
6793
6794
  const mask = target.channel !== "pixels";
6794
- if (tool === "sponge" && mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6795
+ if (tool === "sponge" && mask) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The Sponge changes saturation, and a mask has none; target pixels (channel pixels), or use dodge or burn on the mask.");
6795
6796
  if (tool === "smudge") return { kind: "dabs", create: (pixels) => new (0, _chunk7NW46N7Icjs.RetouchDabStroke)(brush, pixels, _chunk7NW46N7Icjs.smudgeEffect.call(void 0, brush, settings.strength)) };
6796
6797
  if (tool === "sponge") return { kind: "dabs", create: (pixels) => new (0, _chunk7NW46N7Icjs.RetouchDabStroke)(brush, pixels, _chunk7NW46N7Icjs.spongeEffect.call(void 0, brush, settings.spongeMode === "saturate", settings.vibrance)) };
6797
6798
  const retouchApply = {
@@ -6830,11 +6831,11 @@ var ImageEditorController = (_class10 = class {
6830
6831
  if (tool === "history") {
6831
6832
  const steps = settings.historySteps;
6832
6833
  const entry = steps > 0 ? _nullishCoalesce(this.undoStack[this.undoStack.length - steps], () => ( this.undoStack[0])) : this.undoStack[0];
6833
- if (!entry) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
6834
+ if (!entry) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("There is no earlier state to paint from yet: the History Brush paints a layer as it was some undo steps back. Make a change first.");
6834
6835
  const then = _optionalChain([_chunkHGTDMKNEcjs.findLayer.call(void 0, entry.layers, target.id), 'optionalAccess', _245 => _245.layer]);
6835
- if (!then) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6836
+ if (!then) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${target.id}" did not exist ${steps > 0 ? `${steps} steps back` : "in the oldest state"}; choose fewer history steps (historySteps).`);
6836
6837
  const surface = target.channel === "mask" ? _optionalChain([then, 'access', _246 => _246.mask, 'optionalAccess', _247 => _247.surface]) : then.type === "pixel" ? then.surface : void 0;
6837
- if (!surface) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6838
+ if (!surface) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${target.id}" had no ${target.channel === "mask" ? "mask" : "pixels"} in that state.`);
6838
6839
  const offset2 = then.type === "pixel" ? then.offset : { x: 0, y: 0 };
6839
6840
  const depth = !mask && this.bitDepth !== 8 ? this.bitDepth : null;
6840
6841
  const source2 = depth ? new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => workTileOf(surface.tiles.get(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty))), 4, offset2) : this.surfaceSource(surface, offset2);
@@ -6879,7 +6880,7 @@ var ImageEditorController = (_class10 = class {
6879
6880
  }
6880
6881
  if (init.source) this.setCloneSource(init.source);
6881
6882
  const cs = this.state.paint.cloneSource;
6882
- if (!cs) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`The ${tool === "clone" ? "Clone Stamp" : "Healing Brush"} needs a source point; Alt-click the canvas, call set_clone_source, or pass source { x, y }.`);
6883
+ if (!cs) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`The ${tool === "clone" ? "Clone Stamp" : "Healing Brush"} needs a source point; Alt-click the canvas, call set_clone_source, or pass source { x, y }.`);
6883
6884
  let offset = { x: 0, y: 0 };
6884
6885
  let first = { x: 0, y: 0 };
6885
6886
  const xf = this.state.paint.cloneTransform;
@@ -6916,7 +6917,7 @@ var ImageEditorController = (_class10 = class {
6916
6917
  const sources = this.compositorSources();
6917
6918
  if (depth) {
6918
6919
  return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => {
6919
- const w = _chunkPA3IMPPScjs.compositeDeep.call(void 0, layers, { x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, sources, depth);
6920
+ const w = _chunkOVYQAYGHcjs.compositeDeep.call(void 0, layers, { x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, sources, depth);
6920
6921
  for (let i = 0; i < w.length; i += 4) {
6921
6922
  if (depth === 32) for (let c = 0; c < 3; c++) w[i + c] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, w[i + c]);
6922
6923
  for (let c = 0; c < 4; c++) w[i + c] *= 255;
@@ -6924,7 +6925,7 @@ var ImageEditorController = (_class10 = class {
6924
6925
  return w;
6925
6926
  }, 4);
6926
6927
  }
6927
- const compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)();
6928
+ const compositor = new (0, _chunkOVYQAYGHcjs.LayerCompositor)();
6928
6929
  return new (0, _chunk7NW46N7Icjs.TilePixelSource)((tx, ty) => compositor.tile(layers, tx, ty, sources), 4);
6929
6930
  }
6930
6931
  /** A Mixer Brush stroke's start: the settings, and the load (refilled when asked or set to). */
@@ -6974,9 +6975,9 @@ var ImageEditorController = (_class10 = class {
6974
6975
  * document bounds and the number of dabs.
6975
6976
  */
6976
6977
  paintStroke(init) {
6977
- if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("points must hold at least one { x, y } point.");
6978
+ if (!Array.isArray(init.points) || !init.points.length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("points must hold at least one { x, y } point.");
6978
6979
  for (const p of init.points) {
6979
- if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _252 => _252.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _253 => _253.y]))) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6980
+ if (!Number.isFinite(_optionalChain([p, 'optionalAccess', _252 => _252.x])) || !Number.isFinite(_optionalChain([p, 'optionalAccess', _253 => _253.y]))) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Every point needs finite x and y (document pixels).");
6980
6981
  }
6981
6982
  const session = this.beginStroke(init);
6982
6983
  session.push(init.points);
@@ -7002,8 +7003,8 @@ var ImageEditorController = (_class10 = class {
7002
7003
  const target = this.paintTarget(options.layerId, options.channel, mode === "paint" ? "fill" : "clear");
7003
7004
  const { width, height } = this.naturalSize;
7004
7005
  const opacity = _nullishCoalesce(options.opacity, () => ( 1));
7005
- if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be from 0 to 1.");
7006
- const blend = _nullishCoalesce(_chunkPA3IMPPScjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
7006
+ if (!(opacity >= 0 && opacity <= 1)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("opacity must be from 0 to 1.");
7007
+ const blend = _nullishCoalesce(_chunkOVYQAYGHcjs.parseBlend.call(void 0, options.blend), () => ( "normal"));
7007
7008
  const sel = options.useSelection !== false && _optionalChain([this, 'access', _254 => _254.state, 'access', _255 => _255.selection, 'optionalAccess', _256 => _256.bounds]) ? this.state.selection : null;
7008
7009
  const region = _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _257 => _257.bounds]), () => ( { x: 0, y: 0, width, height }));
7009
7010
  const coverage = new (0, _chunkEBDCRTZIcjs.CoverageMap)();
@@ -7039,7 +7040,7 @@ var ImageEditorController = (_class10 = class {
7039
7040
  // --- Adjustments ---
7040
7041
  /** The pixel layer the base sliders edit: the active pixel layer, else the Background. */
7041
7042
  developLayer() {
7042
- return _chunkPA3IMPPScjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
7043
+ return _chunkOVYQAYGHcjs.developTarget.call(void 0, this.state.layers, this.state.activeLayerId);
7043
7044
  }
7044
7045
  /**
7045
7046
  * Sets base adjustment values as one undo step (unless `commitToHistory` is false). The base
@@ -7065,7 +7066,7 @@ var ImageEditorController = (_class10 = class {
7065
7066
  this.state.outputOpacity = Math.min(1, Math.max(0, partial.opacity));
7066
7067
  }
7067
7068
  if ("layers" in partial) {
7068
- layers = this.replaceAdjustmentNodes(layers, _chunkPA3IMPPScjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
7069
+ layers = this.replaceAdjustmentNodes(layers, _chunkOVYQAYGHcjs.normalizeAdjustmentLayers.call(void 0, partial.layers));
7069
7070
  }
7070
7071
  this.state.layers = layers;
7071
7072
  this.notify();
@@ -7073,7 +7074,7 @@ var ImageEditorController = (_class10 = class {
7073
7074
  /** True when the adjustments use an older rendering process than {@link LATEST_PROCESS_VERSION}. */
7074
7075
  get isProcessOutdated() {
7075
7076
  this.syncViews();
7076
- return _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION;
7077
+ return _chunkOVYQAYGHcjs.normalizeProcessVersion.call(void 0, this.state.adjustments.process) < _chunkOVYQAYGHcjs.LATEST_PROCESS_VERSION;
7077
7078
  }
7078
7079
  /**
7079
7080
  * Update to Current Process: re-interprets the current adjustment values with the latest
@@ -7081,7 +7082,7 @@ var ImageEditorController = (_class10 = class {
7081
7082
  */
7082
7083
  upgradeProcess() {
7083
7084
  if (!this.isProcessOutdated) return false;
7084
- this.setAdjustments({ process: _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION });
7085
+ this.setAdjustments({ process: _chunkOVYQAYGHcjs.LATEST_PROCESS_VERSION });
7085
7086
  return true;
7086
7087
  }
7087
7088
  /** Resets the base sliders (latest process). Adjustment layers are kept; see `clearAdjustmentLayers`. */
@@ -7092,7 +7093,7 @@ var ImageEditorController = (_class10 = class {
7092
7093
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0,
7093
7094
  this.state.layers,
7094
7095
  target.id,
7095
- (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION }), 0)
7096
+ (l) => withBlur(withDevelop(l, { ...DEFAULT_ADJUSTMENTS, process: _chunkOVYQAYGHcjs.LATEST_PROCESS_VERSION }), 0)
7096
7097
  );
7097
7098
  }
7098
7099
  delete this.state.legacyOutputBlur;
@@ -7156,7 +7157,7 @@ var ImageEditorController = (_class10 = class {
7156
7157
  const existing = new Set(this.adjustmentNodes(out).map((n) => n.id));
7157
7158
  for (const l of next) {
7158
7159
  if (existing.has(l.id)) continue;
7159
- out = this.placeLayer(out, _chunkPA3IMPPScjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
7160
+ out = this.placeLayer(out, _chunkOVYQAYGHcjs.adjustmentNodeFromLegacy.call(void 0, l, width, height), { adjustmentIndex: Infinity });
7160
7161
  }
7161
7162
  const order = next.map((l) => l.id);
7162
7163
  for (let to = 0; to < order.length; to++) out = this.moveAdjustmentNode(out, order[to], to);
@@ -7171,7 +7172,7 @@ var ImageEditorController = (_class10 = class {
7171
7172
  addAdjustmentLayer(init, index) {
7172
7173
  const spec = typeof init === "string" ? { kind: init } : init;
7173
7174
  const ids = new Set(_chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).map((l) => l.id));
7174
- const layer = _chunkPA3IMPPScjs.createAdjustmentLayer.call(void 0, spec.kind, {
7175
+ const layer = _chunkOVYQAYGHcjs.createAdjustmentLayer.call(void 0, spec.kind, {
7175
7176
  id: spec.id && !ids.has(spec.id) ? spec.id : void 0,
7176
7177
  name: spec.name,
7177
7178
  params: spec.params,
@@ -7180,10 +7181,10 @@ var ImageEditorController = (_class10 = class {
7180
7181
  blend: spec.blend,
7181
7182
  mask: _nullishCoalesce(spec.mask, () => ( void 0))
7182
7183
  });
7183
- while (ids.has(layer.id)) layer.id = _chunkPA3IMPPScjs.newLayerId.call(void 0, "adj");
7184
+ while (ids.has(layer.id)) layer.id = _chunkOVYQAYGHcjs.newLayerId.call(void 0, "adj");
7184
7185
  const { width, height } = this.naturalSize;
7185
7186
  this.recordHistory();
7186
- const node = _chunkPA3IMPPScjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
7187
+ const node = _chunkOVYQAYGHcjs.adjustmentNodeFromLegacy.call(void 0, layer, width, height);
7187
7188
  const positioned = Boolean(spec.aboveId || spec.parentId);
7188
7189
  this.state.layers = this.placeLayer(this.state.layers, node, {
7189
7190
  aboveId: spec.aboveId,
@@ -7203,7 +7204,7 @@ var ImageEditorController = (_class10 = class {
7203
7204
  if (!loc || loc.layer.type !== "adjustment") return false;
7204
7205
  const { width, height } = this.naturalSize;
7205
7206
  const node = loc.layer;
7206
- const merged = _chunkPA3IMPPScjs.normalizeAdjustmentLayer.call(void 0, {
7207
+ const merged = _chunkOVYQAYGHcjs.normalizeAdjustmentLayer.call(void 0, {
7207
7208
  id: node.id,
7208
7209
  kind: node.kind,
7209
7210
  enabled: _nullishCoalesce(update.enabled, () => ( node.visible)),
@@ -7223,7 +7224,7 @@ var ImageEditorController = (_class10 = class {
7223
7224
  params: merged.params
7224
7225
  };
7225
7226
  if (update.mask !== void 0) {
7226
- const mask = update.mask ? _chunkPA3IMPPScjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
7227
+ const mask = update.mask ? _chunkOVYQAYGHcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height) : null;
7227
7228
  if (mask) next.mask = mask;
7228
7229
  else delete next.mask;
7229
7230
  }
@@ -7239,7 +7240,7 @@ var ImageEditorController = (_class10 = class {
7239
7240
  const prev = this.state.layers;
7240
7241
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, prev, id, () => null);
7241
7242
  if (this.state.activeLayerId === id) {
7242
- this.state.activeLayerId = _chunkPA3IMPPScjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, id);
7243
+ this.state.activeLayerId = _chunkOVYQAYGHcjs.activeLayerAfterRemoval.call(void 0, prev, this.state.layers, id);
7243
7244
  this.state.activeTarget = "pixels";
7244
7245
  }
7245
7246
  this.notify();
@@ -7285,7 +7286,7 @@ var ImageEditorController = (_class10 = class {
7285
7286
  this.state.layers = layers;
7286
7287
  const active = this.state.activeLayerId;
7287
7288
  if (active && nodes.some((n) => n.id === active)) {
7288
- this.state.activeLayerId = _chunkPA3IMPPScjs.activeLayerAfterRemoval.call(void 0, prev, layers, active);
7289
+ this.state.activeLayerId = _chunkOVYQAYGHcjs.activeLayerAfterRemoval.call(void 0, prev, layers, active);
7289
7290
  this.state.activeTarget = "pixels";
7290
7291
  }
7291
7292
  this.notify();
@@ -7309,14 +7310,14 @@ var ImageEditorController = (_class10 = class {
7309
7310
  resizeCanvas(options) {
7310
7311
  const { width, height, anchor = "center" } = options;
7311
7312
  if (!Number.isFinite(width) || width < 1 || !Number.isFinite(height) || height < 1) {
7312
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Canvas width and height must be numbers at least 1 pixel.");
7313
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Canvas width and height must be numbers at least 1 pixel.");
7313
7314
  }
7314
7315
  const targetWidth = Math.round(width);
7315
7316
  const targetHeight = Math.round(height);
7316
7317
  const prev = this.naturalSize;
7317
7318
  if (prev.width === targetWidth && prev.height === targetHeight) return;
7318
7319
  this.recordHistory();
7319
- const [fx, fy] = _chunkPA3IMPPScjs.ANCHOR_FRACTION[anchor];
7320
+ const [fx, fy] = _chunkOVYQAYGHcjs.ANCHOR_FRACTION[anchor];
7320
7321
  const dx = Math.round((targetWidth - prev.width) * fx);
7321
7322
  const dy = Math.round((targetHeight - prev.height) * fy);
7322
7323
  this.state.layers = this.state.layers.map((l) => {
@@ -7352,10 +7353,10 @@ var ImageEditorController = (_class10 = class {
7352
7353
  }
7353
7354
  }
7354
7355
  this.state.selection = normalizeSelection(
7355
- _chunkPA3IMPPScjs.createSelectionMask.call(void 0, targetWidth, targetHeight, nextData)
7356
+ _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, targetWidth, targetHeight, nextData)
7356
7357
  );
7357
7358
  }
7358
- this.state.layers = this.state.layers.map((l) => _chunkPA3IMPPScjs.translateLayer.call(void 0, l, dx, dy));
7359
+ this.state.layers = this.state.layers.map((l) => _chunkOVYQAYGHcjs.translateLayer.call(void 0, l, dx, dy));
7359
7360
  this.docRevision++;
7360
7361
  this.notify();
7361
7362
  }
@@ -7380,8 +7381,8 @@ var ImageEditorController = (_class10 = class {
7380
7381
  const { width, height } = this.naturalSize;
7381
7382
  let next = null;
7382
7383
  if (mask) {
7383
- const sized = mask.width === width && mask.height === height ? mask : _chunkPA3IMPPScjs.resizeSelection.call(void 0, mask, width, height);
7384
- next = _chunkPA3IMPPScjs.combineSelections.call(void 0, this.state.selection, sized, mode);
7384
+ const sized = mask.width === width && mask.height === height ? mask : _chunkOVYQAYGHcjs.resizeSelection.call(void 0, mask, width, height);
7385
+ next = _chunkOVYQAYGHcjs.combineSelections.call(void 0, this.state.selection, sized, mode);
7385
7386
  } else if (mode !== "replace") {
7386
7387
  return false;
7387
7388
  }
@@ -7395,7 +7396,7 @@ var ImageEditorController = (_class10 = class {
7395
7396
  /** Select › All. */
7396
7397
  selectAll() {
7397
7398
  const { width, height } = this.naturalSize;
7398
- return this.setSelection(_chunkPA3IMPPScjs.fullSelection.call(void 0, width, height));
7399
+ return this.setSelection(_chunkOVYQAYGHcjs.fullSelection.call(void 0, width, height));
7399
7400
  }
7400
7401
  /** Select › Deselect. */
7401
7402
  deselect() {
@@ -7404,11 +7405,11 @@ var ImageEditorController = (_class10 = class {
7404
7405
  /** Select › Inverse (with nothing selected, selects everything). */
7405
7406
  invertSelection() {
7406
7407
  const { width, height } = this.naturalSize;
7407
- const current = _nullishCoalesce(this.state.selection, () => ( _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height)));
7408
- return this.setSelection(_chunkPA3IMPPScjs.invertSelection.call(void 0, current));
7408
+ const current = _nullishCoalesce(this.state.selection, () => ( _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, width, height)));
7409
+ return this.setSelection(_chunkOVYQAYGHcjs.invertSelection.call(void 0, current));
7409
7410
  }
7410
7411
  shapeCommand(mask, options) {
7411
- const shaped = options.feather && options.feather > 0 ? _chunkPA3IMPPScjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
7412
+ const shaped = options.feather && options.feather > 0 ? _chunkOVYQAYGHcjs.modifySelection.call(void 0, mask, "feather", options.feather) : mask;
7412
7413
  return this.setSelection(shaped, _nullishCoalesce(options.mode, () => ( "replace")));
7413
7414
  }
7414
7415
  /** Rectangular marquee in natural image pixels. */
@@ -7462,11 +7463,11 @@ var ImageEditorController = (_class10 = class {
7462
7463
  if (!this.samplePixelsOverride && !options.pixels) this.samplePixels = null;
7463
7464
  return null;
7464
7465
  }
7465
- const legacy = _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
7466
+ const legacy = _chunkOVYQAYGHcjs.legacyView.call(void 0, this.stack(), width, height, null).exact;
7466
7467
  if (options.sample === "active-layer") {
7467
7468
  const layer = this.getActiveLayer();
7468
7469
  if (!layer || layer.type !== "pixel") {
7469
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
7470
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Sampling the active layer needs an active pixel layer; select one, or sample the composite.");
7470
7471
  }
7471
7472
  const surface = layer.source === "document" && options.pixels ? _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, options.pixels, 4) : this.surfaceOf(layer);
7472
7473
  return { width, height, data: _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, { x: -layer.offset.x, y: -layer.offset.y, width, height }) };
@@ -7475,7 +7476,7 @@ var ImageEditorController = (_class10 = class {
7475
7476
  this.syncViews();
7476
7477
  if (legacy && !options.pixels) {
7477
7478
  const copy = { width: base.width, height: base.height, data: new Uint8ClampedArray(base.data) };
7478
- _chunkPA3IMPPScjs.applyAdjustments.call(void 0, copy, _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
7479
+ _chunkOVYQAYGHcjs.applyAdjustments.call(void 0, copy, _chunkOVYQAYGHcjs.legacyView.call(void 0, this.stack(), width, height, null).adjustments);
7479
7480
  return copy;
7480
7481
  }
7481
7482
  const pixels = options.pixels;
@@ -7487,7 +7488,7 @@ var ImageEditorController = (_class10 = class {
7487
7488
  };
7488
7489
  const stack = withoutAnnotations(this.state.layers);
7489
7490
  const layers = options.sampleMerged ? stack : pixelsOnly(stack);
7490
- const data = new (0, _chunkPA3IMPPScjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
7491
+ const data = new (0, _chunkOVYQAYGHcjs.LayerCompositor)().composite(layers, { x: 0, y: 0, width, height }, sources);
7491
7492
  return { width, height, data };
7492
7493
  }
7493
7494
  async requirePixels(options) {
@@ -7514,7 +7515,7 @@ var ImageEditorController = (_class10 = class {
7514
7515
  modifySelection(op, radius) {
7515
7516
  const sel = this.state.selection;
7516
7517
  if (!_optionalChain([sel, 'optionalAccess', _271 => _271.bounds])) return false;
7517
- return this.setSelection(_chunkPA3IMPPScjs.modifySelection.call(void 0, sel, op, radius));
7518
+ return this.setSelection(_chunkOVYQAYGHcjs.modifySelection.call(void 0, sel, op, radius));
7518
7519
  }
7519
7520
  /**
7520
7521
  * Refine Edge: snaps the selection (e.g. a coarse AI mask loaded with `loadSelectionFromImage`)
@@ -7545,7 +7546,7 @@ var ImageEditorController = (_class10 = class {
7545
7546
  } else {
7546
7547
  pixels = source;
7547
7548
  }
7548
- this.setSelection(_chunkPA3IMPPScjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
7549
+ this.setSelection(_chunkOVYQAYGHcjs.selectionFromPixels.call(void 0, pixels, options), _nullishCoalesce(options.mode, () => ( "replace")));
7549
7550
  return this.getSelection();
7550
7551
  }
7551
7552
  /** Quick Mask view (tints the unselected area). View state: no undo step. */
@@ -7557,7 +7558,7 @@ var ImageEditorController = (_class10 = class {
7557
7558
  // --- Layer masks ---
7558
7559
  maskFromSelection(sel, props = {}) {
7559
7560
  const { width, height } = this.naturalSize;
7560
- const sized = sel.width === width && sel.height === height ? sel : _chunkPA3IMPPScjs.resizeSelection.call(void 0, sel, width, height);
7561
+ const sized = sel.width === width && sel.height === height ? sel : _chunkOVYQAYGHcjs.resizeSelection.call(void 0, sel, width, height);
7561
7562
  const mask = { surface: _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data: sized.data }, 1, 0, 0, 0), defaultValue: 0 };
7562
7563
  return withMaskProps(mask, props);
7563
7564
  }
@@ -7603,7 +7604,7 @@ var ImageEditorController = (_class10 = class {
7603
7604
  const ox = layer.type === "pixel" ? layer.offset.x : 0;
7604
7605
  const oy = layer.type === "pixel" ? layer.offset.y : 0;
7605
7606
  const data = _chunkCWM3CUUXcjs.readRegion.call(void 0, layer.mask.surface, { x: -ox, y: -oy, width, height });
7606
- const sel = _chunkPA3IMPPScjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
7607
+ const sel = _chunkOVYQAYGHcjs.createSelectionMask.call(void 0, width, height, new Uint8Array(data.buffer, data.byteOffset, data.length));
7607
7608
  return this.setSelection(sel, mode);
7608
7609
  }
7609
7610
  // --- Histogram ---
@@ -7633,9 +7634,9 @@ var ImageEditorController = (_class10 = class {
7633
7634
  merged.depthRange = [...merged.depthRange];
7634
7635
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, target.id, (l) => {
7635
7636
  const next = { ...l };
7636
- if (_chunkPA3IMPPScjs.isDefaultDepthMask.call(void 0, merged)) {
7637
+ if (_chunkOVYQAYGHcjs.isDefaultDepthMask.call(void 0, merged)) {
7637
7638
  if (_optionalChain([next, 'access', _277 => _277.mask, 'optionalAccess', _278 => _278.source])) delete next.mask;
7638
- } else next.mask = _chunkPA3IMPPScjs.depthRasterMask.call(void 0, merged);
7639
+ } else next.mask = _chunkOVYQAYGHcjs.depthRasterMask.call(void 0, merged);
7639
7640
  return next;
7640
7641
  });
7641
7642
  }
@@ -7656,7 +7657,7 @@ var ImageEditorController = (_class10 = class {
7656
7657
  // --- Annotations & Layers ---
7657
7658
  /** The layer showing annotation `id`: an annotation layer, or a shape layer migrated from it. */
7658
7659
  annotationLayer(id) {
7659
- return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkPA3IMPPScjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _281 => _281.id]) === id);
7660
+ return _chunkHGTDMKNEcjs.flattenLayers.call(void 0, this.state.layers).find((l) => (l.type === "annotation" || l.type === "shape" || l.type === "type") && _optionalChain([_chunkOVYQAYGHcjs.annotationOfLayer.call(void 0, l), 'optionalAccess', _281 => _281.id]) === id);
7660
7661
  }
7661
7662
  /** What migrating an annotation needs: the canvas size, patterns and the text shaper. */
7662
7663
  annotationEnv() {
@@ -7672,7 +7673,7 @@ var ImageEditorController = (_class10 = class {
7672
7673
  this.recordHistory();
7673
7674
  const id = `ann_${Date.now()}_${Math.random().toString(36).slice(2, 7)}`;
7674
7675
  const fullAnnotation = { ...annotation, id };
7675
- const layer = _chunkPA3IMPPScjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
7676
+ const layer = _chunkOVYQAYGHcjs.annotationLayerFor.call(void 0, fullAnnotation, this.annotationEnv());
7676
7677
  const loc = placement.aboveId ? _chunkHGTDMKNEcjs.findLayer.call(void 0, this.state.layers, placement.aboveId) : null;
7677
7678
  this.state.layers = loc ? _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, _nullishCoalesce(_optionalChain([loc, 'access', _282 => _282.parent, 'optionalAccess', _283 => _283.id]), () => ( null)), loc.index + 1) : _chunkHGTDMKNEcjs.insertLayer.call(void 0, this.state.layers, layer, null);
7678
7679
  this.state.selectedAnnotationId = id;
@@ -7684,17 +7685,17 @@ var ImageEditorController = (_class10 = class {
7684
7685
  this.recordHistory();
7685
7686
  }
7686
7687
  const layer = this.annotationLayer(id);
7687
- const current = layer ? _chunkPA3IMPPScjs.annotationOfLayer.call(void 0, layer) : null;
7688
+ const current = layer ? _chunkOVYQAYGHcjs.annotationOfLayer.call(void 0, layer) : null;
7688
7689
  if (layer && current) {
7689
7690
  const annotation = { ...current, ...partial, id };
7690
- const name = layer.name === _chunkPA3IMPPScjs.annotationLayerName.call(void 0, current) ? _chunkPA3IMPPScjs.annotationLayerName.call(void 0, annotation) : layer.name;
7691
+ const name = layer.name === _chunkOVYQAYGHcjs.annotationLayerName.call(void 0, current) ? _chunkOVYQAYGHcjs.annotationLayerName.call(void 0, annotation) : layer.name;
7691
7692
  this.state.layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, layer.id, () => this.layerForAnnotation(layer, annotation, name));
7692
7693
  }
7693
7694
  this.notify();
7694
7695
  }
7695
7696
  /** `layer` (an annotation, or a shape or type layer migrated from one) showing `annotation` instead, keeping its other properties. */
7696
7697
  layerForAnnotation(layer, annotation, name) {
7697
- const fresh = _chunkPA3IMPPScjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7698
+ const fresh = _chunkOVYQAYGHcjs.annotationLayerFor.call(void 0, annotation, this.annotationEnv());
7698
7699
  const keep = { id: layer.id, visible: layer.visible, opacity: layer.opacity };
7699
7700
  for (const k of ["clipped", "mask", "locks", "effects"]) if (layer[k] !== void 0) keep[k] = layer[k];
7700
7701
  if (fresh.type !== "annotation" && layer.type !== "annotation" && layer.fillOpacity !== void 0) keep.fillOpacity = layer.fillOpacity;
@@ -7981,8 +7982,8 @@ var ImageEditorController = (_class10 = class {
7981
7982
  return;
7982
7983
  }
7983
7984
  const target = this.developLayer();
7984
- if (!target) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("There is no pixel layer to mask.");
7985
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, target, "all", "mask it");
7985
+ if (!target) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("There is no pixel layer to mask.");
7986
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, target, "all", "mask it");
7986
7987
  const { width, height } = this.naturalSize;
7987
7988
  let px2 = await this.decodeImage(newDataUrl);
7988
7989
  if (px2.width !== width || px2.height !== height) px2 = resizePixels(px2, width, height);
@@ -7990,14 +7991,14 @@ var ImageEditorController = (_class10 = class {
7990
7991
  for (let p = 0; p < alpha.length; p++) alpha[p] = px2.data[p * 4 + 3];
7991
7992
  let surface = _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data: alpha }, 1, 0, 0, 0);
7992
7993
  if (target.offset.x || target.offset.y) surface = _chunkCWM3CUUXcjs.translateSurface.call(void 0, surface, -target.offset.x, -target.offset.y);
7993
- this.commitLayers(_chunkPA3IMPPScjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7994
+ this.commitLayers(_chunkOVYQAYGHcjs.setLayerMask.call(void 0, this.state.layers, target.id, { surface, defaultValue: 0 }));
7994
7995
  return target.id;
7995
7996
  }
7996
7997
  // --- Type layers ---
7997
7998
 
7998
7999
  /** The shaper that lays out and draws type layers (`null` when there is none here). */
7999
8000
  getTextShaper() {
8000
- if (this.textShaperValue === void 0) this.textShaperValue = _chunkJCXMJUQOcjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
8001
+ if (this.textShaperValue === void 0) this.textShaperValue = _chunkEGZM52EOcjs.createCanvasTextShaper.call(void 0, { createCanvas: (w, h) => this.renderer.createCanvas(w, h) });
8001
8002
  return this.textShaperValue;
8002
8003
  }
8003
8004
  /** Sets the text shaper (fonts) type layers lay out and draw with; existing layers redraw on their next edit. */
@@ -8014,7 +8015,7 @@ var ImageEditorController = (_class10 = class {
8014
8015
  return _nullishCoalesce(_optionalChain([this, 'access', _290 => _290.getTextShaper, 'call', _291 => _291(), 'optionalAccess', _292 => _292.families, 'optionalCall', _293 => _293()]), () => ( ["sans-serif", "serif", "monospace"]));
8015
8016
  }
8016
8017
  typeInfo(id) {
8017
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8018
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8018
8019
  const ranges = (runs) => {
8019
8020
  let at = 0;
8020
8021
  return runs.map((r) => {
@@ -8027,7 +8028,7 @@ var ImageEditorController = (_class10 = class {
8027
8028
  let lines = [];
8028
8029
  let missing = _nullishCoalesce(layer.missingFonts, () => ( []));
8029
8030
  if (shaper) {
8030
- const layout = _chunkJCXMJUQOcjs.layoutText.call(void 0, layer, shaper);
8031
+ const layout = _chunkEGZM52EOcjs.layoutText.call(void 0, layer, shaper);
8031
8032
  const r = (n) => Math.round(n * 1e3) / 1e3;
8032
8033
  lines = layout.lines.map((l) => ({ start: l.start, end: l.end, baseline: r(l.baseline), width: r(l.width) }));
8033
8034
  if (layer.rendering === "stored") missing = layout.missingFonts;
@@ -8057,25 +8058,25 @@ var ImageEditorController = (_class10 = class {
8057
8058
  * text wrapped in `box`. Refused without a text shaper. Returns its id.
8058
8059
  */
8059
8060
  addTextLayer(init) {
8060
- const text = _chunkPA3IMPPScjs.normalizeText.call(void 0, init.text);
8061
- if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("x and y must be numbers (document pixels).");
8062
- const style = _chunkPA3IMPPScjs.patchTextStyle.call(void 0, { ..._chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
8063
- const paragraph = _chunkPA3IMPPScjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
8061
+ const text = _chunkOVYQAYGHcjs.normalizeText.call(void 0, init.text);
8062
+ if (!Number.isFinite(init.x) || !Number.isFinite(init.y)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("x and y must be numbers (document pixels).");
8063
+ const style = _chunkOVYQAYGHcjs.patchTextStyle.call(void 0, { ..._chunkEGZM52EOcjs.DEFAULT_TEXT_STYLE, color: this.state.paint.foreground }, _nullishCoalesce(init.style, () => ( {})));
8064
+ const paragraph = _chunkOVYQAYGHcjs.patchParagraphStyle.call(void 0, {}, _nullishCoalesce(init.paragraph, () => ( {})));
8064
8065
  let frame = { kind: "point" };
8065
8066
  if (init.box) {
8066
8067
  const { width, height } = init.box;
8067
- if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
8068
+ if (!(Number.isFinite(width) && width >= 1 && Number.isFinite(height) && height >= 1)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("box.width and box.height must be at least 1 pixel.");
8068
8069
  frame = { kind: "box", width, height };
8069
8070
  }
8070
- if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("rotation must be a number of degrees.");
8071
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be between 0 and 1.");
8072
- if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
8071
+ if (init.rotation !== void 0 && !Number.isFinite(init.rotation)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("rotation must be a number of degrees.");
8072
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("opacity must be between 0 and 1.");
8073
+ if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
8073
8074
  const t = [1, 0, 0, 1, init.x, init.y];
8074
- const transform = init.rotation ? _chunkJCXMJUQOcjs.multiplyMatrices.call(void 0, t, _chunkJCXMJUQOcjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
8075
- const layer = _chunkPA3IMPPScjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkPA3IMPPScjs.typeLayerName.call(void 0, text))) }, this.textEnv());
8075
+ const transform = init.rotation ? _chunkEGZM52EOcjs.multiplyMatrices.call(void 0, t, _chunkEGZM52EOcjs.rotateMatrix.call(void 0, init.rotation, { x: init.x, y: init.y })) : t;
8076
+ const layer = _chunkOVYQAYGHcjs.createTypeLayer.call(void 0, { text, runs: [{ length: text.length, style }], paragraphs: [{ length: text.length, style: paragraph }], frame, transform, name: _nullishCoalesce(init.name, () => ( _chunkOVYQAYGHcjs.typeLayerName.call(void 0, text))) }, this.textEnv());
8076
8077
  if (init.opacity !== void 0) layer.opacity = init.opacity;
8077
8078
  if (init.blend !== void 0) layer.blend = init.blend;
8078
- const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
8079
+ const next = _chunkOVYQAYGHcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
8079
8080
  this.commitLayers(next, () => {
8080
8081
  this.state.activeLayerId = layer.id;
8081
8082
  this.state.activeTarget = "pixels";
@@ -8087,28 +8088,28 @@ var ImageEditorController = (_class10 = class {
8087
8088
  * `start`. One undo step unless `commitToHistory` is false (typing). Returns the layer.
8088
8089
  */
8089
8090
  setText(id, text, range = {}, commitToHistory = true) {
8090
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8091
- const insert = _chunkPA3IMPPScjs.normalizeText.call(void 0, text);
8092
- const [start, end] = _chunkPA3IMPPScjs.textRange.call(void 0, layer.text, range.start, range.end);
8093
- const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkPA3IMPPScjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
8091
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8092
+ const insert = _chunkOVYQAYGHcjs.normalizeText.call(void 0, text);
8093
+ const [start, end] = _chunkOVYQAYGHcjs.textRange.call(void 0, layer.text, range.start, range.end);
8094
+ const { layers } = _chunkOVYQAYGHcjs.updateTypeLayer.call(void 0, this.state.layers, id, (l) => _chunkOVYQAYGHcjs.replaceTextRange.call(void 0, l, start, end, insert), this.textEnv(), "edit its text");
8094
8095
  this.commitLayers(layers, void 0, commitToHistory);
8095
8096
  return this.typeInfo(id);
8096
8097
  }
8097
8098
  /** Sets character style fields over [start, end) (default all), one undo step. Returns the layer. */
8098
8099
  setTextStyle(id, style, range = {}, commitToHistory = true) {
8099
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8100
- const [start, end] = _chunkPA3IMPPScjs.textRange.call(void 0, layer.text, range.start, range.end);
8101
- if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one style field to set.");
8102
- _chunkPA3IMPPScjs.patchTextStyle.call(void 0, _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE, style);
8103
- const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0,
8100
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8101
+ const [start, end] = _chunkOVYQAYGHcjs.textRange.call(void 0, layer.text, range.start, range.end);
8102
+ if (!Object.keys(style).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give at least one style field to set.");
8103
+ _chunkOVYQAYGHcjs.patchTextStyle.call(void 0, _chunkEGZM52EOcjs.DEFAULT_TEXT_STYLE, style);
8104
+ const { layers } = _chunkOVYQAYGHcjs.updateTypeLayer.call(void 0,
8104
8105
  this.state.layers,
8105
8106
  id,
8106
8107
  (l) => {
8107
8108
  if (start === end) {
8108
- if (l.text.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
8109
- return { runs: [{ length: 0, style: _chunkPA3IMPPScjs.patchTextStyle.call(void 0, _chunkJCXMJUQOcjs.styleAt.call(void 0, l.runs, 0, _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE), style) }] };
8109
+ if (l.text.length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The range is empty; give start < end (or leave both out for the whole text).");
8110
+ return { runs: [{ length: 0, style: _chunkOVYQAYGHcjs.patchTextStyle.call(void 0, _chunkEGZM52EOcjs.styleAt.call(void 0, l.runs, 0, _chunkEGZM52EOcjs.DEFAULT_TEXT_STYLE), style) }] };
8110
8111
  }
8111
- return { runs: _chunkJCXMJUQOcjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkPA3IMPPScjs.patchTextStyle.call(void 0, s, style)) };
8112
+ return { runs: _chunkEGZM52EOcjs.restyleRange.call(void 0, l.runs, start, end, (s) => _chunkOVYQAYGHcjs.patchTextStyle.call(void 0, s, style)) };
8112
8113
  },
8113
8114
  this.textEnv(),
8114
8115
  "restyle its text"
@@ -8118,11 +8119,11 @@ var ImageEditorController = (_class10 = class {
8118
8119
  }
8119
8120
  /** Sets paragraph style fields on every paragraph that [start, end) touches (default all), one undo step. */
8120
8121
  setParagraphStyle(id, style, range = {}, commitToHistory = true) {
8121
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8122
- const [start, end] = _chunkPA3IMPPScjs.textRange.call(void 0, layer.text, range.start, range.end);
8123
- if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one paragraph field to set.");
8124
- _chunkPA3IMPPScjs.patchParagraphStyle.call(void 0, {}, style);
8125
- const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0,
8122
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8123
+ const [start, end] = _chunkOVYQAYGHcjs.textRange.call(void 0, layer.text, range.start, range.end);
8124
+ if (!Object.keys(style).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give at least one paragraph field to set.");
8125
+ _chunkOVYQAYGHcjs.patchParagraphStyle.call(void 0, {}, style);
8126
+ const { layers } = _chunkOVYQAYGHcjs.updateTypeLayer.call(void 0,
8126
8127
  this.state.layers,
8127
8128
  id,
8128
8129
  (l) => {
@@ -8131,7 +8132,7 @@ var ImageEditorController = (_class10 = class {
8131
8132
  const a = at;
8132
8133
  at += p.length;
8133
8134
  const touches = a < end && at > start || start === end && start >= a && (start < at || at === l.text.length);
8134
- return touches || !l.text.length ? { length: p.length, style: _chunkPA3IMPPScjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
8135
+ return touches || !l.text.length ? { length: p.length, style: _chunkOVYQAYGHcjs.patchParagraphStyle.call(void 0, p.style, style) } : p;
8135
8136
  });
8136
8137
  return { paragraphs };
8137
8138
  },
@@ -8147,21 +8148,21 @@ var ImageEditorController = (_class10 = class {
8147
8148
  * paragraph. Also resizes a box. One undo step.
8148
8149
  */
8149
8150
  setTextFrame(id, frame, commitToHistory = true) {
8150
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8151
- if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("width and height must be at least 1 pixel.");
8152
- if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("kind must be point or box.");
8151
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8152
+ if (frame.kind === "box" && !(Number.isFinite(frame.width) && frame.width >= 1 && Number.isFinite(frame.height) && frame.height >= 1)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("width and height must be at least 1 pixel.");
8153
+ if (frame.kind !== "box" && frame.kind !== "point") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("kind must be point or box.");
8153
8154
  const shaper = this.getTextShaper();
8154
- const { layers } = _chunkPA3IMPPScjs.updateTypeLayer.call(void 0,
8155
+ const { layers } = _chunkOVYQAYGHcjs.updateTypeLayer.call(void 0,
8155
8156
  this.state.layers,
8156
8157
  id,
8157
8158
  (l) => {
8158
8159
  if (frame.kind === "box" && l.frame.kind === "box") return { frame: { kind: "box", width: frame.width, height: frame.height } };
8159
- if (!shaper) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
8160
- const lines = _chunkJCXMJUQOcjs.layoutText.call(void 0, l, shaper).lines;
8160
+ if (!shaper) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Changing between point and paragraph text needs a text shaper to measure the text.");
8161
+ const lines = _chunkEGZM52EOcjs.layoutText.call(void 0, l, shaper).lines;
8161
8162
  const first = lines[0];
8162
8163
  const dx = frame.kind === "box" ? first ? first.x : 0 : 0;
8163
8164
  const dy = frame.kind === "box" ? first ? first.baseline - first.ascent : 0 : first ? first.baseline : 0;
8164
- const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, l);
8165
+ const m = _chunkOVYQAYGHcjs.textMatrix.call(void 0, l);
8165
8166
  const shifted = [m[0], m[1], m[2], m[3], m[0] * dx + m[2] * dy + m[4], m[1] * dx + m[3] * dy + m[5]];
8166
8167
  const nextFrame = frame.kind === "box" ? { kind: "box", width: frame.width, height: frame.height } : { kind: "point" };
8167
8168
  return { frame: nextFrame, transform: shifted };
@@ -8178,21 +8179,21 @@ var ImageEditorController = (_class10 = class {
8178
8179
  * `warnings` says when other colours were dropped. One undo step.
8179
8180
  */
8180
8181
  convertTextToShape(id) {
8181
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8182
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", "convert it");
8182
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8183
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "all", "convert it");
8183
8184
  const shaper = this.getTextShaper();
8184
- if (!shaper) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
8185
- const parts = _chunkPA3IMPPScjs.textOutlines.call(void 0, layer, shaper);
8186
- const subpaths = parts.flatMap((p) => _chunkJCXMJUQOcjs.bezierToSubpaths.call(void 0, p.path));
8187
- if (!subpaths.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
8185
+ if (!shaper) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Convert to Shape needs a text shaper that gives glyph outlines; none is set here.");
8186
+ const parts = _chunkOVYQAYGHcjs.textOutlines.call(void 0, layer, shaper);
8187
+ const subpaths = parts.flatMap((p) => _chunkEGZM52EOcjs.bezierToSubpaths.call(void 0, p.path));
8188
+ if (!subpaths.length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The text draws nothing (it is empty or only spaces), so there is no shape to make.");
8188
8189
  const warnings = [];
8189
8190
  const colors = new Set(layer.runs.filter((r) => r.length > 0).map((r) => `${r.style.color}/${_nullishCoalesce(r.style.opacity, () => ( 1))}`));
8190
8191
  if (colors.size > 1) warnings.push("The text had several colours; the shape takes the first one.");
8191
- const missing = _chunkJCXMJUQOcjs.layoutText.call(void 0, layer, shaper).missingFonts;
8192
+ const missing = _chunkEGZM52EOcjs.layoutText.call(void 0, layer, shaper).missingFonts;
8192
8193
  if (missing.length) warnings.push(`Missing fonts were drawn with a fallback: ${missing.join(", ")}.`);
8193
- const first = _nullishCoalesce(_optionalChain([layer, 'access', _294 => _294.runs, 'access', _295 => _295.find, 'call', _296 => _296((r) => r.length > 0), 'optionalAccess', _297 => _297.style]), () => ( _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE));
8194
+ const first = _nullishCoalesce(_optionalChain([layer, 'access', _294 => _294.runs, 'access', _295 => _295.find, 'call', _296 => _296((r) => r.length > 0), 'optionalAccess', _297 => _297.style]), () => ( _chunkEGZM52EOcjs.DEFAULT_TEXT_STYLE));
8194
8195
  const fill = first.opacity !== void 0 && first.opacity !== 1 ? { type: "color", color: first.color, opacity: first.opacity } : { type: "color", color: first.color };
8195
- const shape = _chunkPA3IMPPScjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
8196
+ const shape = _chunkOVYQAYGHcjs.createShapeLayer.call(void 0, { components: [{ op: "combine", subpaths }], fill, stroke: null, name: layer.name }, this.shapeEnv(), layer.id);
8196
8197
  const keep = { visible: layer.visible, opacity: layer.opacity, blend: layer.blend };
8197
8198
  for (const k of ["clipped", "mask", "locks", "effects", "fillOpacity"]) if (layer[k] !== void 0) keep[k] = layer[k];
8198
8199
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => ({ ...shape, ...keep })));
@@ -8200,23 +8201,23 @@ var ImageEditorController = (_class10 = class {
8200
8201
  }
8201
8202
  /** The layout of a type layer (lines, characters, bounds in text space), or `null` without a shaper. */
8202
8203
  getTextLayout(id) {
8203
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8204
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8204
8205
  const shaper = this.getTextShaper();
8205
- return shaper ? _chunkJCXMJUQOcjs.layoutText.call(void 0, layer, shaper) : null;
8206
+ return shaper ? _chunkEGZM52EOcjs.layoutText.call(void 0, layer, shaper) : null;
8206
8207
  }
8207
8208
  /** The text index nearest a document point (for clicks on a type layer). */
8208
8209
  textIndexAt(id, point) {
8209
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8210
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8210
8211
  const layout = this.getTextLayout(id);
8211
- return layout ? _chunkJCXMJUQOcjs.textIndexAt.call(void 0, layout, _chunkPA3IMPPScjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
8212
+ return layout ? _chunkEGZM52EOcjs.textIndexAt.call(void 0, layout, _chunkOVYQAYGHcjs.toTextSpace.call(void 0, layer, point)) : layer.text.length;
8212
8213
  }
8213
8214
  /** The caret at text index `index` as a document-space segment (top to bottom), for drawing it. */
8214
8215
  textCaret(id, index) {
8215
- const layer = _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, this.state.layers, id);
8216
+ const layer = _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, this.state.layers, id);
8216
8217
  const layout = this.getTextLayout(id);
8217
8218
  if (!layout) return null;
8218
- const c = _chunkJCXMJUQOcjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
8219
- const m = _chunkPA3IMPPScjs.textMatrix.call(void 0, layer);
8219
+ const c = _chunkEGZM52EOcjs.caretAt.call(void 0, layout, Math.max(0, Math.min(layer.text.length, index)));
8220
+ const m = _chunkOVYQAYGHcjs.textMatrix.call(void 0, layer);
8220
8221
  const at = (x, y) => ({ x: m[0] * x + m[2] * y + m[4], y: m[1] * x + m[3] * y + m[5] });
8221
8222
  return { top: at(c.x, c.top), bottom: at(c.x, c.bottom), line: c.line };
8222
8223
  }
@@ -8227,14 +8228,14 @@ var ImageEditorController = (_class10 = class {
8227
8228
  }
8228
8229
  /** One component from tool or UI input (validated). */
8229
8230
  componentFrom(spec, path) {
8230
- const op = _chunkPA3IMPPScjs.requireOperation.call(void 0, spec.op, `${path}op`);
8231
- if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
8232
- if (spec.shape !== void 0) return _chunkPA3IMPPScjs.liveComponent.call(void 0, _chunkPA3IMPPScjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
8233
- if (spec.subpaths !== void 0) return { op, subpaths: _chunkPA3IMPPScjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
8234
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
8231
+ const op = _chunkOVYQAYGHcjs.requireOperation.call(void 0, spec.op, `${path}op`);
8232
+ if (spec.shape !== void 0 && spec.subpaths !== void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Give ${path}shape or ${path}subpaths, not both.`);
8233
+ if (spec.shape !== void 0) return _chunkOVYQAYGHcjs.liveComponent.call(void 0, _chunkOVYQAYGHcjs.normalizeLiveShape.call(void 0, spec.shape, `${path}shape`), op);
8234
+ if (spec.subpaths !== void 0) return { op, subpaths: _chunkOVYQAYGHcjs.normalizeSubpaths.call(void 0, spec.subpaths, `${path}subpaths`) };
8235
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`${path}shape (a live shape: { kind: rect | ellipse | polygon | star | line, \u2026 }) or ${path}subpaths (anchors or SVG path data) is required.`);
8235
8236
  }
8236
8237
  shapeInfo(id) {
8237
- const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
8238
+ const layer = _chunkOVYQAYGHcjs.requireShapeLayer.call(void 0, this.state.layers, id);
8238
8239
  const r = (n) => Math.round(n * 1e3) / 1e3;
8239
8240
  const box = (b) => b ? { x: r(b.x), y: r(b.y), width: r(b.width), height: r(b.height) } : null;
8240
8241
  const info = {
@@ -8244,13 +8245,13 @@ var ImageEditorController = (_class10 = class {
8244
8245
  index,
8245
8246
  op: c.op,
8246
8247
  live: c.live ? JSON.parse(JSON.stringify(c.live)) : null,
8247
- subpaths: _chunkJCXMJUQOcjs.roundSubpaths.call(void 0, c.subpaths),
8248
- bounds: box(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, { components: [c] }))
8248
+ subpaths: _chunkEGZM52EOcjs.roundSubpaths.call(void 0, c.subpaths),
8249
+ bounds: box(_chunkOVYQAYGHcjs.shapeGeometryBounds.call(void 0, { components: [c] }))
8249
8250
  })),
8250
8251
  fillRule: _nullishCoalesce(layer.fillRule, () => ( "nonzero")),
8251
8252
  fill: layer.fill ? JSON.parse(JSON.stringify(layer.fill)) : null,
8252
8253
  stroke: layer.stroke ? JSON.parse(JSON.stringify(layer.stroke)) : null,
8253
- geometryBounds: box(_chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer)),
8254
+ geometryBounds: box(_chunkOVYQAYGHcjs.shapeGeometryBounds.call(void 0, layer)),
8254
8255
  bounds: this.getLayerBounds(id)
8255
8256
  };
8256
8257
  if (layer.annotation) info.annotationId = layer.annotation.id;
@@ -8267,17 +8268,17 @@ var ImageEditorController = (_class10 = class {
8267
8268
  */
8268
8269
  addShapeLayer(init) {
8269
8270
  const specs = _optionalChain([init, 'access', _302 => _302.components, 'optionalAccess', _303 => _303.length]) ? init.components : [init];
8270
- if (_optionalChain([init, 'access', _304 => _304.components, 'optionalAccess', _305 => _305.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
8271
+ if (_optionalChain([init, 'access', _304 => _304.components, 'optionalAccess', _305 => _305.length]) && (init.shape !== void 0 || init.subpaths !== void 0)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give components, or shape / subpaths, not both.");
8271
8272
  const components = specs.map((c, i) => this.componentFrom(c, _optionalChain([init, 'access', _306 => _306.components, 'optionalAccess', _307 => _307.length]) ? `components[${i}].` : ""));
8272
- const stroke = init.stroke ? _chunkPA3IMPPScjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
8273
+ const stroke = init.stroke ? _chunkOVYQAYGHcjs.normalizeShapeStroke.call(void 0, init.stroke, "stroke") : null;
8273
8274
  const openOnly = components.every((c) => !c.live && c.subpaths.every((sp) => !sp.closed));
8274
- const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkPA3IMPPScjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkPA3IMPPScjs.normalizeShapePaint.call(void 0, init.fill, "fill");
8275
- if (!fill && !stroke) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
8276
- if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
8277
- if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("opacity must be between 0 and 1.");
8278
- if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
8279
- const layer = _chunkPA3IMPPScjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
8280
- const next = _chunkPA3IMPPScjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
8275
+ const fill = init.fill === void 0 ? stroke && openOnly ? null : _chunkOVYQAYGHcjs.normalizeShapePaint.call(void 0, this.state.paint.foreground, "fill") : init.fill === null ? null : _chunkOVYQAYGHcjs.normalizeShapePaint.call(void 0, init.fill, "fill");
8276
+ if (!fill && !stroke) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("A shape with neither fill nor stroke draws nothing; give fill or stroke.");
8277
+ if (init.fillRule !== void 0 && init.fillRule !== "nonzero" && init.fillRule !== "evenodd") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
8278
+ if (init.opacity !== void 0 && !(Number.isFinite(init.opacity) && init.opacity >= 0 && init.opacity <= 1)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("opacity must be between 0 and 1.");
8279
+ if (init.blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, init.blend)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown blend mode "${String(init.blend)}".`);
8280
+ const layer = _chunkOVYQAYGHcjs.createShapeLayer.call(void 0, { components, fill, stroke, fillRule: init.fillRule, name: init.name, opacity: init.opacity, blend: init.blend }, this.shapeEnv());
8281
+ const next = _chunkOVYQAYGHcjs.placeLayer.call(void 0, this.state.layers, layer, this.newLayerPlacement(init));
8281
8282
  this.commitLayers(next, () => {
8282
8283
  this.state.activeLayerId = layer.id;
8283
8284
  this.state.activeTarget = "pixels";
@@ -8290,18 +8291,18 @@ var ImageEditorController = (_class10 = class {
8290
8291
  * only those settings of the current stroke. Returns the shape.
8291
8292
  */
8292
8293
  setShapeStyle(id, changes, commitToHistory = true) {
8293
- const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
8294
- const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkPA3IMPPScjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
8295
- const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkPA3IMPPScjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
8296
- if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
8294
+ const layer = _chunkOVYQAYGHcjs.requireShapeLayer.call(void 0, this.state.layers, id);
8295
+ const fill = changes.fill === void 0 ? layer.fill : changes.fill === null ? null : _chunkOVYQAYGHcjs.normalizeShapePaint.call(void 0, changes.fill, "fill");
8296
+ const stroke = changes.stroke === void 0 ? layer.stroke : changes.stroke === null ? null : _chunkOVYQAYGHcjs.normalizeShapeStroke.call(void 0, changes.stroke, "stroke", layer.stroke);
8297
+ if (changes.fillRule !== void 0 && changes.fillRule !== "nonzero" && changes.fillRule !== "evenodd") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("fillRule must be nonzero or evenodd.");
8297
8298
  const fillRule = _nullishCoalesce(_nullishCoalesce(changes.fillRule, () => ( layer.fillRule)), () => ( "nonzero"));
8298
- const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
8299
+ const { layers } = _chunkOVYQAYGHcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ fill, stroke, fillRule: fillRule === "nonzero" ? void 0 : fillRule }), this.shapeEnv(), "restyle it");
8299
8300
  this.commitLayers(layers, void 0, commitToHistory);
8300
8301
  return this.shapeInfo(id);
8301
8302
  }
8302
8303
  componentIndex(layer, index) {
8303
8304
  if (!Number.isInteger(index) || index < 0 || index >= layer.components.length) {
8304
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
8305
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`componentIndex must be 0..${layer.components.length - 1} (get_shape_layer lists the components), got ${String(index)}.`);
8305
8306
  }
8306
8307
  return index;
8307
8308
  }
@@ -8311,36 +8312,36 @@ var ImageEditorController = (_class10 = class {
8311
8312
  * the live shape) or its operation. Returns the shape.
8312
8313
  */
8313
8314
  setShapeComponent(id, index, change, commitToHistory = true) {
8314
- const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
8315
+ const layer = _chunkOVYQAYGHcjs.requireShapeLayer.call(void 0, this.state.layers, id);
8315
8316
  const i = this.componentIndex(layer, index);
8316
8317
  const current = layer.components[i];
8317
8318
  let shape = change.shape;
8318
8319
  if (shape && current.live && shape.kind === void 0) shape = { ...current.live, ...shape };
8319
8320
  else if (shape && current.live && shape.kind === current.live.kind) shape = { ...current.live, ...shape };
8320
- const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkPA3IMPPScjs.requireOperation.call(void 0, change.op) };
8321
+ const next = shape !== void 0 || change.subpaths !== void 0 ? this.componentFrom({ ...change, shape, op: _nullishCoalesce(change.op, () => ( current.op)) }, "") : { ...current, op: _chunkOVYQAYGHcjs.requireOperation.call(void 0, change.op) };
8321
8322
  const components = layer.components.map((c, k) => k === i ? next : c);
8322
- const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
8323
+ const { layers } = _chunkOVYQAYGHcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
8323
8324
  this.commitLayers(layers, void 0, commitToHistory);
8324
8325
  return this.shapeInfo(id);
8325
8326
  }
8326
8327
  /** Adds a component to a shape (path operations), on top unless `index` is given (one undo step). Returns the shape. */
8327
8328
  addShapeComponent(id, spec, index) {
8328
- const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
8329
+ const layer = _chunkOVYQAYGHcjs.requireShapeLayer.call(void 0, this.state.layers, id);
8329
8330
  const c = this.componentFrom(spec, "");
8330
8331
  const at = index === void 0 ? layer.components.length : index;
8331
- if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
8332
+ if (!Number.isInteger(at) || at < 0 || at > layer.components.length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`index must be 0..${layer.components.length}, got ${String(index)}.`);
8332
8333
  const components = [...layer.components.slice(0, at), c, ...layer.components.slice(at)];
8333
- const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
8334
+ const { layers } = _chunkOVYQAYGHcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
8334
8335
  this.commitLayers(layers);
8335
8336
  return this.shapeInfo(id);
8336
8337
  }
8337
8338
  /** Removes one component of a shape (one undo step); the last one cannot go (delete the layer instead). Returns the shape. */
8338
8339
  removeShapeComponent(id, index) {
8339
- const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
8340
+ const layer = _chunkOVYQAYGHcjs.requireShapeLayer.call(void 0, this.state.layers, id);
8340
8341
  const i = this.componentIndex(layer, index);
8341
- if (layer.components.length === 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
8342
+ if (layer.components.length === 1) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("This is the shape's only component; delete the layer instead (delete_layer).");
8342
8343
  const components = layer.components.filter((_, k) => k !== i);
8343
- const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
8344
+ const { layers } = _chunkOVYQAYGHcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components }), this.shapeEnv(), "edit its path");
8344
8345
  this.commitLayers(layers);
8345
8346
  return this.shapeInfo(id);
8346
8347
  }
@@ -8349,10 +8350,10 @@ var ImageEditorController = (_class10 = class {
8349
8350
  * shapes become paths), as one undo step. Returns the shape.
8350
8351
  */
8351
8352
  mergeShapeComponents(id) {
8352
- const layer = _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, this.state.layers, id);
8353
- if (layer.components.length < 2) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
8354
- const components = _chunkPA3IMPPScjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
8355
- const { layers } = _chunkPA3IMPPScjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
8353
+ const layer = _chunkOVYQAYGHcjs.requireShapeLayer.call(void 0, this.state.layers, id);
8354
+ if (layer.components.length < 2) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The shape has one component; there is nothing to merge.");
8355
+ const components = _chunkOVYQAYGHcjs.mergeShapeComponents.call(void 0, layer.components, layer.fillRule);
8356
+ const { layers } = _chunkOVYQAYGHcjs.updateShapeLayer.call(void 0, this.state.layers, id, () => ({ components, fillRule: void 0 }), this.shapeEnv(), "edit its path");
8356
8357
  this.commitLayers(layers);
8357
8358
  return this.shapeInfo(id);
8358
8359
  }
@@ -8362,8 +8363,8 @@ var ImageEditorController = (_class10 = class {
8362
8363
  * step. Returns the layer id.
8363
8364
  */
8364
8365
  async rasterizeLayer(id) {
8365
- const layer = _chunkPA3IMPPScjs.requireLayer.call(void 0, this.state.layers, id).layer;
8366
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
8366
+ const layer = _chunkOVYQAYGHcjs.requireLayer.call(void 0, this.state.layers, id).layer;
8367
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "all", "rasterize it");
8367
8368
  const { width, height } = this.naturalSize;
8368
8369
  const canvas = { x: 0, y: 0, width, height };
8369
8370
  let next;
@@ -8379,8 +8380,8 @@ var ImageEditorController = (_class10 = class {
8379
8380
  if (layer.locks) next.locks = layer.locks;
8380
8381
  if (this.state.selectedAnnotationId === layer.annotation.id) this.state.selectedAnnotationId = null;
8381
8382
  } else if (layer.type === "pixel") {
8382
- if (!_optionalChain([layer, 'access', _308 => _308.filters, 'optionalAccess', _309 => _309.length])) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
8383
- _chunkPA3IMPPScjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
8383
+ if (!_optionalChain([layer, 'access', _308 => _308.filters, 'optionalAccess', _309 => _309.length])) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${layer.name || id}" is already pixels with no filters to bake.`);
8384
+ _chunkOVYQAYGHcjs.requireUnlocked.call(void 0, layer, "pixels", "rasterize it");
8384
8385
  const spatial = layer.filters.some((f) => f.enabled && f.kind === "blur");
8385
8386
  const content = { ...layer, visible: true, opacity: 1, blend: "normal" };
8386
8387
  delete content.mask;
@@ -8397,10 +8398,10 @@ var ImageEditorController = (_class10 = class {
8397
8398
  } else if (layer.type === "smart") {
8398
8399
  return this.rasterizeSmartObject(id);
8399
8400
  } else if (layer.type === "shape" || layer.type === "type") {
8400
- next = layer.type === "shape" ? _chunkPA3IMPPScjs.shapeAsPixelLayer.call(void 0, layer) : _chunkPA3IMPPScjs.typeAsPixelLayer.call(void 0, layer);
8401
+ next = layer.type === "shape" ? _chunkOVYQAYGHcjs.shapeAsPixelLayer.call(void 0, layer) : _chunkOVYQAYGHcjs.typeAsPixelLayer.call(void 0, layer);
8401
8402
  if (this.state.selectedAnnotationId && this.state.selectedAnnotationId === _optionalChain([layer, 'access', _310 => _310.annotation, 'optionalAccess', _311 => _311.id])) this.state.selectedAnnotationId = null;
8402
8403
  } else {
8403
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
8404
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Only shape, type and annotation layers, smart objects and pixel layers with filters rasterize; "${layer.name || id}" is a ${layer.type} layer. Merge it down or flatten instead.`);
8404
8405
  }
8405
8406
  this.commitLayers(_chunkHGTDMKNEcjs.mapLayer.call(void 0, this.state.layers, id, () => next));
8406
8407
  return id;
@@ -8425,7 +8426,7 @@ var ImageEditorController = (_class10 = class {
8425
8426
  setColorMode(mode, options = {}) {
8426
8427
  let next;
8427
8428
  if (mode === "rgb") {
8428
- if (options.profile !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
8429
+ if (options.profile !== void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("An RGB document takes no CMYK profile; use assign_profile for its working space.");
8429
8430
  next = null;
8430
8431
  } else if (mode === "lab") next = { mode: "lab" };
8431
8432
  else if (mode === "cmyk") {
@@ -8433,14 +8434,14 @@ var ImageEditorController = (_class10 = class {
8433
8434
  try {
8434
8435
  doc = documentProfile(_nullishCoalesce(options.profile, () => ( "coated-cmyk")));
8435
8436
  } catch (e) {
8436
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8437
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8437
8438
  }
8438
8439
  const cs = resolveProfile(doc).colorSpace;
8439
- if (cs !== "cmyk") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
8440
+ if (cs !== "cmyk") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`CMYK mode needs a CMYK profile; "${doc.name}" is ${cs.toUpperCase()}.`);
8440
8441
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
8441
- if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
8442
+ if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
8442
8443
  next = { mode: "cmyk", profile: doc, intent };
8443
- } else throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
8444
+ } else throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown colour mode "${String(mode)}"; use rgb, cmyk or lab.`);
8444
8445
  this.recordHistory();
8445
8446
  if (next) this.state.colorMode = next;
8446
8447
  else delete this.state.colorMode;
@@ -8453,10 +8454,10 @@ var ImageEditorController = (_class10 = class {
8453
8454
  try {
8454
8455
  doc = documentProfile(profile);
8455
8456
  } catch (e) {
8456
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8457
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8457
8458
  }
8458
8459
  const cs = resolveProfile(doc).colorSpace;
8459
- if (cs !== "rgb") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${action} needs an RGB profile; "${doc.name}" is ${cs.toUpperCase()}. The document is RGB: soft-proof CMYK with set_proof_setup, or export to it.`);
8460
+ if (cs !== "rgb") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`${action} needs an RGB profile; "${doc.name}" is ${cs.toUpperCase()}. The document is RGB: soft-proof CMYK with set_proof_setup, or export to it.`);
8460
8461
  return doc;
8461
8462
  }
8462
8463
  /**
@@ -8482,7 +8483,7 @@ var ImageEditorController = (_class10 = class {
8482
8483
  convertToProfile(profile, options = {}) {
8483
8484
  const doc = this.rgbProfileArg(profile, "Convert to Profile");
8484
8485
  const intent = _nullishCoalesce(options.intent, () => ( "relative"));
8485
- if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
8486
+ if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
8486
8487
  const t = _chunkBROJYMWUcjs.Transform.create(resolveProfile(this.state.colorProfile), resolveProfile(doc), { intent, bpc: _nullishCoalesce(options.bpc, () => ( true)) });
8487
8488
  const converted = [];
8488
8489
  const unconverted = [];
@@ -8512,11 +8513,11 @@ var ImageEditorController = (_class10 = class {
8512
8513
  else if (l.type === "pixel") next2 = { ...next2, surface: convertSurfaceColors(this.surfaceOf(l), t), source: void 0 };
8513
8514
  else if (l.type === "shape") {
8514
8515
  const s = next2;
8515
- next2 = _chunkPA3IMPPScjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
8516
+ next2 = _chunkOVYQAYGHcjs.rerenderShape.call(void 0, { ...s, fill: convertColorFields(s.fill, hex), stroke: convertColorFields(s.stroke, hex), ...s.annotation ? { annotation: convertColorFields(s.annotation, hex) } : {} }, shapeEnv);
8516
8517
  } else if (l.type === "type") {
8517
8518
  const recoloured = { ...next2, runs: convertColorFields(l.runs, hex) };
8518
8519
  try {
8519
- next2 = _chunkPA3IMPPScjs.rerenderText.call(void 0, recoloured, textEnv);
8520
+ next2 = _chunkOVYQAYGHcjs.rerenderText.call(void 0, recoloured, textEnv);
8520
8521
  } catch (e29) {
8521
8522
  next2 = { ...recoloured, surface: convertSurfaceColors(l.surface, t) };
8522
8523
  }
@@ -8546,12 +8547,12 @@ var ImageEditorController = (_class10 = class {
8546
8547
  try {
8547
8548
  doc = documentProfile(setup.profile);
8548
8549
  } catch (e) {
8549
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8550
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8550
8551
  }
8551
8552
  const intent = _nullishCoalesce(setup.intent, () => ( DEFAULT_PROOF.intent));
8552
- if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
8553
+ if (!_chunkBROJYMWUcjs.INTENTS.includes(intent)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown rendering intent "${String(intent)}"; use ${_chunkBROJYMWUcjs.INTENTS.join(", ")}.`);
8553
8554
  const next = { ...DEFAULT_PROOF, ...setup, intent, profile: doc };
8554
- if (!_chunkBROJYMWUcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
8555
+ if (!_chunkBROJYMWUcjs.canBeDestination.call(void 0, resolveProfile(doc))) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`"${doc.name}" describes a source only, so colours cannot be proofed through it.`);
8555
8556
  this.state.proofSetup = next;
8556
8557
  this.notify();
8557
8558
  return next;
@@ -8568,14 +8569,14 @@ var ImageEditorController = (_class10 = class {
8568
8569
  src = options.from !== void 0 ? resolveProfile(documentProfile(options.from)) : resolveProfile(this.state.colorProfile);
8569
8570
  dst = resolveProfile(documentProfile(to));
8570
8571
  } catch (e) {
8571
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8572
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(e instanceof Error ? e.message : String(e));
8572
8573
  }
8573
- if (src.colorSpace !== "rgb") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
8574
+ if (src.colorSpace !== "rgb") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Colours are given as #rrggbb, so the source profile must be RGB.");
8574
8575
  const t = _chunkBROJYMWUcjs.Transform.create(src, dst, { intent: _nullishCoalesce(options.intent, () => ( "relative")), bpc: _nullishCoalesce(options.bpc, () => ( true)) });
8575
8576
  const toLab = _chunkBROJYMWUcjs.Transform.create(src, _chunkBROJYMWUcjs.builtinProfile.call(void 0, "lab-d50"), { intent: "relative", bpc: false });
8576
8577
  return colors.map((input) => {
8577
8578
  const m = /^#?([0-9a-f]{6})$/i.exec(input.trim());
8578
- if (!m) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
8579
+ if (!m) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Invalid colour "${input}"; use #rrggbb.`);
8579
8580
  const n = parseInt(m[1], 16);
8580
8581
  const rgb = [(n >> 16 & 255) / 255, (n >> 8 & 255) / 255, (n & 255) / 255];
8581
8582
  const out = new Float32Array(16);
@@ -8601,7 +8602,7 @@ var ImageEditorController = (_class10 = class {
8601
8602
  * the ids of the layers whose pixels changed.
8602
8603
  */
8603
8604
  setBitDepth(depth) {
8604
- if (!_chunkCWM3CUUXcjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
8605
+ if (!_chunkCWM3CUUXcjs.isBitDepth.call(void 0, depth)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Bit depth must be 8, 16 or 32, not ${String(depth)}.`);
8605
8606
  const changed = [];
8606
8607
  const withMask = (l) => {
8607
8608
  const m = l.mask;
@@ -8650,7 +8651,7 @@ var ImageEditorController = (_class10 = class {
8650
8651
  * Throws `PsdError` for files that cannot be read at all.
8651
8652
  */
8652
8653
  loadPsd(bytes) {
8653
- const result = _chunkPA3IMPPScjs.importPsd.call(void 0, bytes, { newId: () => _chunkPA3IMPPScjs.newLayerId.call(void 0, ) });
8654
+ const result = _chunkOVYQAYGHcjs.importPsd.call(void 0, bytes, { newId: () => _chunkOVYQAYGHcjs.newLayerId.call(void 0, ) });
8654
8655
  this.abandonContents();
8655
8656
  this.recordHistory();
8656
8657
  const s = this.state;
@@ -8660,12 +8661,12 @@ var ImageEditorController = (_class10 = class {
8660
8661
  if (!this.samplePixelsOverride) this.samplePixels = null;
8661
8662
  s.layers = this.checkPsdFonts(result);
8662
8663
  s.crop = null;
8663
- s.transform = { ..._chunkPA3IMPPScjs.DEFAULT_TRANSFORM_VALUES };
8664
+ s.transform = { ..._chunkOVYQAYGHcjs.DEFAULT_TRANSFORM_VALUES };
8664
8665
  s.outputOpacity = 1;
8665
8666
  delete s.legacyOutputBlur;
8666
8667
  s.selection = null;
8667
8668
  s.selectedAnnotationId = null;
8668
- s.activeLayerId = _chunkPA3IMPPScjs.defaultActiveLayerId.call(void 0, s.layers);
8669
+ s.activeLayerId = _chunkOVYQAYGHcjs.defaultActiveLayerId.call(void 0, s.layers);
8669
8670
  s.activeTarget = "pixels";
8670
8671
  this.psdResolution = result.resolution;
8671
8672
  if (result.patterns.length) s.patterns = result.patterns;
@@ -8710,7 +8711,7 @@ var ImageEditorController = (_class10 = class {
8710
8711
  let layers = result.layers;
8711
8712
  const missing = /* @__PURE__ */ new Map();
8712
8713
  for (const l of types) {
8713
- const fonts = shaper ? _chunkJCXMJUQOcjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8714
+ const fonts = shaper ? _chunkEGZM52EOcjs.layoutText.call(void 0, l, shaper).missingFonts : [...new Set(l.runs.map((r) => r.style.fontFamily))];
8714
8715
  if (!fonts.length) continue;
8715
8716
  layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => ({ ...l, missingFonts: fonts }));
8716
8717
  for (const f of fonts) missing.set(f, [..._nullishCoalesce(missing.get(f), () => ( [])), l.name]);
@@ -8738,7 +8739,7 @@ var ImageEditorController = (_class10 = class {
8738
8739
  const canRasterize = this.renderer.canRasterize();
8739
8740
  await this.renderer.prepareLayerAssets(this.state.layers, width, height);
8740
8741
  const sources = this.renderer.compositorSources(width, height);
8741
- const compositor = new (0, _chunkPA3IMPPScjs.LayerCompositor)();
8742
+ const compositor = new (0, _chunkOVYQAYGHcjs.LayerCompositor)();
8742
8743
  const bakeMask = (layer) => {
8743
8744
  const mask = layer.mask;
8744
8745
  if (!_optionalChain([mask, 'optionalAccess', _322 => _322.source])) return mask;
@@ -8820,7 +8821,7 @@ var ImageEditorController = (_class10 = class {
8820
8821
  out.surface = this.surfaceOf(layer);
8821
8822
  delete out.source;
8822
8823
  }
8823
- const active = _nullishCoalesce(_optionalChain([layer, 'access', _326 => _326.filters, 'optionalAccess', _327 => _327.filter, 'call', _328 => _328(_chunkPA3IMPPScjs.isActiveFilter)]), () => ( []));
8824
+ const active = _nullishCoalesce(_optionalChain([layer, 'access', _326 => _326.filters, 'optionalAccess', _327 => _327.filter, 'call', _328 => _328(_chunkOVYQAYGHcjs.isActiveFilter)]), () => ( []));
8824
8825
  if (active.length) {
8825
8826
  add2("Layer filters (develop, blur) were baked into the pixels", layer.name);
8826
8827
  const content = { ...out, visible: true, opacity: 1, blend: "normal" };
@@ -8853,8 +8854,8 @@ var ImageEditorController = (_class10 = class {
8853
8854
  const color = this.psdColorOptions(warnings);
8854
8855
  if (color.colorMode && this.bitDepth === 32) warnings.push(`${color.colorMode.toUpperCase()} files are written at 16 bits per channel at most; the 32-bit samples were converted (colour above 1 clipped).`);
8855
8856
  const depth = color.colorMode && this.bitDepth === 32 ? 16 : this.bitDepth;
8856
- const mergedDeep = depth === 8 ? void 0 : _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkPA3IMPPScjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8857
- const result = _chunkPA3IMPPScjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8857
+ const mergedDeep = depth === 8 ? void 0 : _chunkHGTDMKNEcjs.workingToSamples.call(void 0, _chunkOVYQAYGHcjs.compositeDeep.call(void 0, prepared, canvas, sources, depth), depth);
8858
+ const result = _chunkOVYQAYGHcjs.exportPsd.call(void 0, { width, height, layers: prepared, merged, mergedDeep, resolution: this.psdResolution, patterns: this.state.patterns, globalLight: this.state.globalLight, depth, ...color });
8858
8859
  warnings.push(...result.warnings);
8859
8860
  return { bytes: result.bytes, warnings, psb: result.psb, width, height };
8860
8861
  }
@@ -8870,13 +8871,13 @@ var ImageEditorController = (_class10 = class {
8870
8871
  if (!this.samplePixelsOverride) this.samplePixels = null;
8871
8872
  if (this.state.selection && (sx !== 1 || sy !== 1)) {
8872
8873
  this.state.selection = normalizeSelection(
8873
- _chunkPA3IMPPScjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8874
+ _chunkOVYQAYGHcjs.resizeSelection.call(void 0, this.state.selection, Math.round(next.dimensions.width), Math.round(next.dimensions.height))
8874
8875
  );
8875
8876
  }
8876
8877
  let layers = this.state.layers;
8877
8878
  if (sx !== 1 || sy !== 1) {
8878
8879
  if (this.state.crop) {
8879
- this.state.crop = _chunkPA3IMPPScjs.clampCropToImage.call(void 0,
8880
+ this.state.crop = _chunkOVYQAYGHcjs.clampCropToImage.call(void 0,
8880
8881
  {
8881
8882
  x: Math.round(this.state.crop.x * sx),
8882
8883
  y: Math.round(this.state.crop.y * sy),
@@ -8895,17 +8896,17 @@ var ImageEditorController = (_class10 = class {
8895
8896
  } else if (l.type === "shape") {
8896
8897
  const a = l.annotation;
8897
8898
  const scaled = a ? scaleAnnotation(a, sx, sy) : null;
8898
- const fromAnnotation = scaled ? _chunkPA3IMPPScjs.shapeFromAnnotation.call(void 0, scaled) : null;
8899
+ const fromAnnotation = scaled ? _chunkOVYQAYGHcjs.shapeFromAnnotation.call(void 0, scaled) : null;
8899
8900
  const m = [sx, 0, 0, sy, 0, 0];
8900
- const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _336 => _336.components]), () => ( _chunkPA3IMPPScjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8901
+ const components = _nullishCoalesce(_optionalChain([fromAnnotation, 'optionalAccess', _336 => _336.components]), () => ( _chunkOVYQAYGHcjs.transformShapeComponents.call(void 0, l.components, (p) => ({ x: p.x * sx, y: p.y * sy }), m)));
8901
8902
  const moved = { ...l, components, ...fromAnnotation ? { fill: fromAnnotation.fill, stroke: fromAnnotation.stroke } : {} };
8902
8903
  if (scaled && fromAnnotation) moved.annotation = scaled;
8903
8904
  else delete moved.annotation;
8904
- layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkPA3IMPPScjs.rerenderShape.call(void 0, moved, env));
8905
+ layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => _chunkOVYQAYGHcjs.rerenderShape.call(void 0, moved, env));
8905
8906
  }
8906
8907
  }
8907
8908
  }
8908
- const bg = _chunkPA3IMPPScjs.developTarget.call(void 0, layers, null);
8909
+ const bg = _chunkOVYQAYGHcjs.developTarget.call(void 0, layers, null);
8909
8910
  if (bg && bg.source !== "document") layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, bg.id, () => ({ ...bg, source: "document" }));
8910
8911
  if (clearAnnotations) {
8911
8912
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) if (l.type === "annotation" || (l.type === "shape" || l.type === "type") && l.annotation) layers = _chunkHGTDMKNEcjs.mapLayer.call(void 0, layers, l.id, () => null);
@@ -8926,7 +8927,7 @@ var ImageEditorController = (_class10 = class {
8926
8927
  let out;
8927
8928
  try {
8928
8929
  out = this.serializeState();
8929
- if (_optionalChain([this, 'access', _340 => _340.state, 'access', _341 => _341.selection, 'optionalAccess', _342 => _342.bounds])) out.selection = _chunkPA3IMPPScjs.serializeSelection.call(void 0, this.state.selection);
8930
+ if (_optionalChain([this, 'access', _340 => _340.state, 'access', _341 => _341.selection, 'optionalAccess', _342 => _342.bounds])) out.selection = _chunkOVYQAYGHcjs.serializeSelection.call(void 0, this.state.selection);
8930
8931
  } finally {
8931
8932
  if (root) {
8932
8933
  this.state = current;
@@ -8934,8 +8935,8 @@ var ImageEditorController = (_class10 = class {
8934
8935
  this.viewKey = [];
8935
8936
  }
8936
8937
  }
8937
- if (!options || out.version !== _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8938
- return _chunkPA3IMPPScjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8938
+ if (!options || out.version !== _chunkOVYQAYGHcjs.LAYERED_SCHEMA_VERSION) return options ? Promise.resolve(out) : out;
8939
+ return _chunkOVYQAYGHcjs.serializeLayersExternal.call(void 0, this.rootLayers(), options.store).then(({ layers, assets, smartContents }) => smartContents ? { ...out, layers, assets, smartContents } : { ...out, layers, assets });
8939
8940
  }
8940
8941
  /**
8941
8942
  * Loads a stored state whose v3 assets may live in an asset store (references other than data
@@ -8943,12 +8944,12 @@ var ImageEditorController = (_class10 = class {
8943
8944
  * out and listed in `lastLoadProblems`.
8944
8945
  */
8945
8946
  async loadJSONAsync(data, options = {}) {
8946
- if (data.version !== _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8947
+ if (data.version !== _chunkOVYQAYGHcjs.LAYERED_SCHEMA_VERSION || !data.assets) {
8947
8948
  this.loadJSON(data);
8948
8949
  return;
8949
8950
  }
8950
8951
  const problems = [];
8951
- const assets = await _chunkPA3IMPPScjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8952
+ const assets = await _chunkOVYQAYGHcjs.resolveExternalAssets.call(void 0, data.assets, options.store, problems);
8952
8953
  this.loadJSON({ ...data, assets });
8953
8954
  this.lastLoadProblems = [...problems, ...this.lastLoadProblems];
8954
8955
  }
@@ -8960,7 +8961,7 @@ var ImageEditorController = (_class10 = class {
8960
8961
  let selection = null;
8961
8962
  if (data.selection) {
8962
8963
  try {
8963
- selection = normalizeSelection(_chunkPA3IMPPScjs.deserializeSelection.call(void 0, data.selection));
8964
+ selection = normalizeSelection(_chunkOVYQAYGHcjs.deserializeSelection.call(void 0, data.selection));
8964
8965
  } catch (e30) {
8965
8966
  selection = null;
8966
8967
  }
@@ -8978,8 +8979,8 @@ var ImageEditorController = (_class10 = class {
8978
8979
  if (isLayered(data)) {
8979
8980
  const problems = [];
8980
8981
  const canvas = typeof data.width === "number" && data.width > 0 && typeof data.height === "number" && data.height > 0 ? { width: data.width, height: data.height } : this.naturalSize;
8981
- const storedPatterns = _chunkPA3IMPPScjs.deserializePatterns.call(void 0, data.patterns, []);
8982
- s.layers = _chunkPA3IMPPScjs.deserializeLayers.call(void 0, data.layers, {
8982
+ const storedPatterns = _chunkOVYQAYGHcjs.deserializePatterns.call(void 0, data.patterns, []);
8983
+ s.layers = _chunkOVYQAYGHcjs.deserializeLayers.call(void 0, data.layers, {
8983
8984
  assets: _nullishCoalesce(data.assets, () => ( {})),
8984
8985
  problems,
8985
8986
  smartContents: Array.isArray(data.smartContents) ? data.smartContents : [],
@@ -8993,11 +8994,11 @@ var ImageEditorController = (_class10 = class {
8993
8994
  s.outputOpacity = data.opacity;
8994
8995
  if (typeof data.legacyOutputBlur === "number" && data.legacyOutputBlur >= 0) s.legacyOutputBlur = data.legacyOutputBlur;
8995
8996
  else delete s.legacyOutputBlur;
8996
- s.activeLayerId = data.activeLayerId && _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, data.activeLayerId) ? data.activeLayerId : _chunkPA3IMPPScjs.defaultActiveLayerId.call(void 0, s.layers);
8997
+ s.activeLayerId = data.activeLayerId && _chunkHGTDMKNEcjs.findLayer.call(void 0, s.layers, data.activeLayerId) ? data.activeLayerId : _chunkOVYQAYGHcjs.defaultActiveLayerId.call(void 0, s.layers);
8997
8998
  const light = data.globalLight;
8998
8999
  if (light && Number.isFinite(light.angle) && Number.isFinite(light.altitude)) s.globalLight = { angle: light.angle, altitude: Math.min(90, Math.max(0, light.altitude)) };
8999
9000
  else delete s.globalLight;
9000
- const patterns = _chunkPA3IMPPScjs.deserializePatterns.call(void 0, data.patterns, problems);
9001
+ const patterns = _chunkOVYQAYGHcjs.deserializePatterns.call(void 0, data.patterns, problems);
9001
9002
  if (patterns.length) s.patterns = patterns;
9002
9003
  else delete s.patterns;
9003
9004
  if (data.bitDepth === 16 || data.bitDepth === 32) s.bitDepth = data.bitDepth;
@@ -9013,14 +9014,14 @@ var ImageEditorController = (_class10 = class {
9013
9014
  }
9014
9015
  } else {
9015
9016
  const { width, height } = this.naturalSize;
9016
- const stack = _chunkPA3IMPPScjs.layersFromLegacy.call(void 0, data, width, height);
9017
+ const stack = _chunkOVYQAYGHcjs.layersFromLegacy.call(void 0, data, width, height);
9017
9018
  s.layers = stack.layers;
9018
9019
  s.outputOpacity = stack.outputOpacity;
9019
9020
  if (stack.legacyOutputBlur !== void 0) s.legacyOutputBlur = stack.legacyOutputBlur;
9020
9021
  else delete s.legacyOutputBlur;
9021
9022
  s.crop = data.crop ? { ...data.crop } : null;
9022
9023
  s.transform = { ...data.transform };
9023
- s.activeLayerId = _chunkPA3IMPPScjs.defaultActiveLayerId.call(void 0, s.layers);
9024
+ s.activeLayerId = _chunkOVYQAYGHcjs.defaultActiveLayerId.call(void 0, s.layers);
9024
9025
  delete s.globalLight;
9025
9026
  delete s.patterns;
9026
9027
  delete s.bitDepth;
@@ -9034,7 +9035,7 @@ var ImageEditorController = (_class10 = class {
9034
9035
  }
9035
9036
  serializeState() {
9036
9037
  const { width, height } = this.naturalSize;
9037
- const view = _chunkPA3IMPPScjs.legacyView.call(void 0, this.stack(), width, height, null);
9038
+ const view = _chunkOVYQAYGHcjs.legacyView.call(void 0, this.stack(), width, height, null);
9038
9039
  if (view.exact && !this.state.globalLight && !_optionalChain([this, 'access', _343 => _343.state, 'access', _344 => _344.patterns, 'optionalAccess', _345 => _345.length]) && this.bitDepth === 8 && !this.state.colorProfile && !this.state.colorMode) {
9039
9040
  return {
9040
9041
  // States without adjustment layers keep schema 1, so they round-trip unchanged.
@@ -9049,9 +9050,9 @@ var ImageEditorController = (_class10 = class {
9049
9050
  annotations: JSON.parse(JSON.stringify(view.annotations))
9050
9051
  };
9051
9052
  }
9052
- const { layers, assets, smartContents } = _chunkPA3IMPPScjs.serializeLayers.call(void 0, this.state.layers);
9053
+ const { layers, assets, smartContents } = _chunkOVYQAYGHcjs.serializeLayers.call(void 0, this.state.layers);
9053
9054
  const out = {
9054
- version: _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION,
9055
+ version: _chunkOVYQAYGHcjs.LAYERED_SCHEMA_VERSION,
9055
9056
  width,
9056
9057
  height,
9057
9058
  layers,
@@ -9063,7 +9064,7 @@ var ImageEditorController = (_class10 = class {
9063
9064
  };
9064
9065
  if (this.state.legacyOutputBlur !== void 0) out.legacyOutputBlur = this.state.legacyOutputBlur;
9065
9066
  if (this.state.globalLight) out.globalLight = { ...this.state.globalLight };
9066
- if (_optionalChain([this, 'access', _349 => _349.state, 'access', _350 => _350.patterns, 'optionalAccess', _351 => _351.length])) out.patterns = _chunkPA3IMPPScjs.serializePatterns.call(void 0, this.state.patterns);
9067
+ if (_optionalChain([this, 'access', _349 => _349.state, 'access', _350 => _350.patterns, 'optionalAccess', _351 => _351.length])) out.patterns = _chunkOVYQAYGHcjs.serializePatterns.call(void 0, this.state.patterns);
9067
9068
  if (smartContents) out.smartContents = smartContents;
9068
9069
  if (this.state.bitDepth === 16 || this.state.bitDepth === 32) out.bitDepth = this.state.bitDepth;
9069
9070
  if (this.state.colorProfile) out.colorProfile = serializeColorProfile(this.state.colorProfile);
@@ -9075,7 +9076,7 @@ function serializeAdjustments(adjustments) {
9075
9076
  const out = { ...adjustments };
9076
9077
  if (_optionalChain([out, 'access', _352 => _352.layers, 'optionalAccess', _353 => _353.length])) out.layers = JSON.parse(JSON.stringify(out.layers));
9077
9078
  else delete out.layers;
9078
- if (_chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, out.process) === _chunkPA3IMPPScjs.LEGACY_PROCESS_VERSION) {
9079
+ if (_chunkOVYQAYGHcjs.normalizeProcessVersion.call(void 0, out.process) === _chunkOVYQAYGHcjs.LEGACY_PROCESS_VERSION) {
9079
9080
  delete out.process;
9080
9081
  if (!out.tint) delete out.tint;
9081
9082
  }
@@ -9086,7 +9087,7 @@ function withDevelop(layer, partial) {
9086
9087
  let i = filters.findIndex((f) => f.kind === "develop");
9087
9088
  if (i === -1) {
9088
9089
  filters.unshift({
9089
- id: layer.source === "document" ? _chunkPA3IMPPScjs.DEVELOP_FILTER_ID : _chunkPA3IMPPScjs.newLayerId.call(void 0, "flt"),
9090
+ id: layer.source === "document" ? _chunkOVYQAYGHcjs.DEVELOP_FILTER_ID : _chunkOVYQAYGHcjs.newLayerId.call(void 0, "flt"),
9090
9091
  kind: "develop",
9091
9092
  enabled: true,
9092
9093
  brightness: 0,
@@ -9095,7 +9096,7 @@ function withDevelop(layer, partial) {
9095
9096
  exposure: 0,
9096
9097
  temperature: 0,
9097
9098
  tint: 0,
9098
- process: _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION
9099
+ process: _chunkOVYQAYGHcjs.LATEST_PROCESS_VERSION
9099
9100
  });
9100
9101
  i = 0;
9101
9102
  }
@@ -9104,7 +9105,7 @@ function withDevelop(layer, partial) {
9104
9105
  const v = partial[k];
9105
9106
  if (typeof v === "number" && Number.isFinite(v)) next[k] = v;
9106
9107
  }
9107
- if ("process" in partial) next.process = _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, partial.process);
9108
+ if ("process" in partial) next.process = _chunkOVYQAYGHcjs.normalizeProcessVersion.call(void 0, partial.process);
9108
9109
  filters[i] = next;
9109
9110
  return { ...layer, filters };
9110
9111
  }
@@ -9113,7 +9114,7 @@ function withBlur(layer, radius) {
9113
9114
  const filters = (_nullishCoalesce(layer.filters, () => ( []))).filter((f) => f.kind !== "blur");
9114
9115
  if (radius > 0) {
9115
9116
  filters.push({
9116
- id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _357 => _357.id]), () => ( (layer.source === "document" ? _chunkPA3IMPPScjs.BLUR_FILTER_ID : _chunkPA3IMPPScjs.newLayerId.call(void 0, "flt")))),
9117
+ id: _nullishCoalesce(_optionalChain([existing, 'optionalAccess', _357 => _357.id]), () => ( (layer.source === "document" ? _chunkOVYQAYGHcjs.BLUR_FILTER_ID : _chunkOVYQAYGHcjs.newLayerId.call(void 0, "flt")))),
9117
9118
  kind: "blur",
9118
9119
  enabled: true,
9119
9120
  radius
@@ -9137,7 +9138,7 @@ function mergeAdjustmentNode(node, update, width, height) {
9137
9138
  if (!update.mask) delete next.mask;
9138
9139
  else {
9139
9140
  const current = node.mask && !node.mask.source ? node.mask : null;
9140
- const memo = current ? _chunkPA3IMPPScjs.legacyMaskOf.call(void 0, current, width, height) : null;
9141
+ const memo = current ? _chunkOVYQAYGHcjs.legacyMaskOf.call(void 0, current, width, height) : null;
9141
9142
  if (current && memo && memo.width === update.mask.width && memo.height === update.mask.height && memo.rle === update.mask.rle) {
9142
9143
  next.mask = withMaskProps(current, {
9143
9144
  density: _nullishCoalesce(update.mask.density, () => ( 1)),
@@ -9145,7 +9146,7 @@ function mergeAdjustmentNode(node, update, width, height) {
9145
9146
  enabled: update.mask.enabled !== false
9146
9147
  });
9147
9148
  } else {
9148
- const m = _chunkPA3IMPPScjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
9149
+ const m = _chunkOVYQAYGHcjs.rasterMaskFromLegacy.call(void 0, update.mask, width, height);
9149
9150
  if (m) next.mask = m;
9150
9151
  else delete next.mask;
9151
9152
  }
@@ -9184,7 +9185,7 @@ function resizeLegacyMasks(layers, from, to) {
9184
9185
  for (const l of _chunkHGTDMKNEcjs.flattenLayers.call(void 0, layers)) {
9185
9186
  if (l.type !== "adjustment" || !l.mask || l.mask.source) continue;
9186
9187
  const old = l.mask;
9187
- const mask = _chunkPA3IMPPScjs.rasterMaskFromLegacy.call(void 0, _chunkPA3IMPPScjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
9188
+ const mask = _chunkOVYQAYGHcjs.rasterMaskFromLegacy.call(void 0, _chunkOVYQAYGHcjs.legacyMaskOf.call(void 0, old, fw, fh), tw, th);
9188
9189
  if (!mask) continue;
9189
9190
  out = _chunkHGTDMKNEcjs.mapLayer.call(void 0, out, l.id, (n) => ({ ...n, mask: { ...mask, density: old.density, feather: old.feather, enabled: old.enabled } }));
9190
9191
  }
@@ -9280,12 +9281,12 @@ function withoutAnnotations(layers) {
9280
9281
  function parseColor(value) {
9281
9282
  if (Array.isArray(value)) {
9282
9283
  if (value.length < 3 || value.length > 4 || !value.every((v) => typeof v === "number" && v >= 0 && v <= 255)) {
9283
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
9284
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("A colour array is [r, g, b] or [r, g, b, a] with values 0..255.");
9284
9285
  }
9285
9286
  return [Math.round(value[0]), Math.round(value[1]), Math.round(value[2]), Math.round(_nullishCoalesce(value[3], () => ( 255)))];
9286
9287
  }
9287
9288
  const m = /^#([0-9a-f]{3}|[0-9a-f]{6}|[0-9a-f]{8})$/i.exec(String(value).trim());
9288
- if (!m) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
9289
+ if (!m) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Invalid colour "${value}"; use #rrggbb or #rrggbbaa.`);
9289
9290
  let hex = m[1];
9290
9291
  if (hex.length === 3) hex = hex.split("").map((c) => c + c).join("");
9291
9292
  const n = (i) => parseInt(hex.slice(i, i + 2), 16);
@@ -9295,7 +9296,7 @@ function readImagePaint(raw) {
9295
9296
  try {
9296
9297
  return _chunkEBDCRTZIcjs.parsePaintSource.call(void 0, raw);
9297
9298
  } catch (e) {
9298
- if (e instanceof _chunkEBDCRTZIcjs.PaintSourceError) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(e.message);
9299
+ if (e instanceof _chunkEBDCRTZIcjs.PaintSourceError) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(e.message);
9299
9300
  throw e;
9300
9301
  }
9301
9302
  }
@@ -9460,7 +9461,7 @@ function loadImageEditorDocument(input) {
9460
9461
  if (isV2) parsed = { ...parsed, version: 1 };
9461
9462
  const newer = isObject(parsed) && typeof parsed.version === "number" && parsed.version > IMAGE_EDITOR_STATE_VERSION;
9462
9463
  let dropped = 0;
9463
- const result = _chunkM4MIZPQIcjs.loadDocument.call(void 0,
9464
+ const result = _chunkSJ2CPTQCcjs.loadDocument.call(void 0,
9464
9465
  parsed,
9465
9466
  {
9466
9467
  crop: { parse: parseCrop, defaults: null },
@@ -9486,7 +9487,7 @@ function loadImageEditorDocument(input) {
9486
9487
  // Optional: only present when something was selected when saving.
9487
9488
  selection: {
9488
9489
  parse: (value) => {
9489
- const mask = _chunkPA3IMPPScjs.deserializeSelection.call(void 0, value);
9490
+ const mask = _chunkOVYQAYGHcjs.deserializeSelection.call(void 0, value);
9490
9491
  const v = value;
9491
9492
  return { width: mask.width, height: mask.height, rle: v.rle };
9492
9493
  },
@@ -9530,7 +9531,7 @@ function cleanLayers(value, dropped) {
9530
9531
  }
9531
9532
  function loadLayeredDocument(doc) {
9532
9533
  const dropped = { count: 0 };
9533
- const result = _chunkM4MIZPQIcjs.loadDocument.call(void 0,
9534
+ const result = _chunkSJ2CPTQCcjs.loadDocument.call(void 0,
9534
9535
  doc,
9535
9536
  {
9536
9537
  width: { parse: (v) => isNumber(v) && v > 0 ? v : (() => {
@@ -9574,7 +9575,7 @@ function loadLayeredDocument(doc) {
9574
9575
  },
9575
9576
  selection: {
9576
9577
  parse: (value) => {
9577
- const mask = _chunkPA3IMPPScjs.deserializeSelection.call(void 0, value);
9578
+ const mask = _chunkOVYQAYGHcjs.deserializeSelection.call(void 0, value);
9578
9579
  const v = value;
9579
9580
  return { width: mask.width, height: mask.height, rle: v.rle };
9580
9581
  },
@@ -10086,14 +10087,14 @@ function describeSelection(mask) {
10086
10087
  // src/image-editor/selection-tools.ts
10087
10088
  var modeSchema = {
10088
10089
  type: "string",
10089
- enum: [..._chunkPA3IMPPScjs.SELECTION_MODES],
10090
+ enum: [..._chunkOVYQAYGHcjs.SELECTION_MODES],
10090
10091
  description: "How the result combines with the current selection (default replace)."
10091
10092
  };
10092
10093
  var num2 = (v, d) => typeof v === "number" && Number.isFinite(v) ? v : d;
10093
10094
  function summary(controller) {
10094
10095
  const sel = controller.getSelection();
10095
10096
  const { width, height } = controller.getState().imageDimensions;
10096
- const area = _chunkPA3IMPPScjs.selectionArea.call(void 0, sel);
10097
+ const area = _chunkOVYQAYGHcjs.selectionArea.call(void 0, sel);
10097
10098
  return {
10098
10099
  empty: !sel,
10099
10100
  bounds: _nullishCoalesce(_optionalChain([sel, 'optionalAccess', _369 => _369.bounds]), () => ( null)),
@@ -10139,7 +10140,7 @@ function createImageSelectionTools(controller) {
10139
10140
  },
10140
10141
  annotations: writeAnnotations("Select a region", true),
10141
10142
  handler: ({ shape, x, y, width, height, mode, feather }) => {
10142
- const opts = { mode: _chunkPA3IMPPScjs.parseSelectionMode.call(void 0, mode), feather: num2(feather, 0) };
10143
+ const opts = { mode: _chunkOVYQAYGHcjs.parseSelectionMode.call(void 0, mode), feather: num2(feather, 0) };
10143
10144
  switch (shape) {
10144
10145
  case "all":
10145
10146
  controller.selectAll();
@@ -10192,7 +10193,7 @@ function createImageSelectionTools(controller) {
10192
10193
  annotations: writeAnnotations("Select by colour", true),
10193
10194
  handler: async ({ x, y, color, tolerance, contiguous, fuzziness, sampleMerged, sample, mode }) => {
10194
10195
  const common = {
10195
- mode: _chunkPA3IMPPScjs.parseSelectionMode.call(void 0, mode),
10196
+ mode: _chunkOVYQAYGHcjs.parseSelectionMode.call(void 0, mode),
10196
10197
  sampleMerged: sampleMerged === true,
10197
10198
  sample: _nullishCoalesce(sample, () => ( "composite"))
10198
10199
  };
@@ -10213,7 +10214,7 @@ function createImageSelectionTools(controller) {
10213
10214
  inputSchema: {
10214
10215
  type: "object",
10215
10216
  properties: {
10216
- op: { type: "string", enum: [..._chunkPA3IMPPScjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
10217
+ op: { type: "string", enum: [..._chunkOVYQAYGHcjs.SELECTION_MODIFY_OPS], description: "How to modify the selection." },
10217
10218
  radius: { type: "number", minimum: 0, maximum: 500, description: "Radius in pixels." }
10218
10219
  },
10219
10220
  required: ["op", "radius"],
@@ -10221,7 +10222,7 @@ function createImageSelectionTools(controller) {
10221
10222
  },
10222
10223
  annotations: writeAnnotations("Modify the selection"),
10223
10224
  handler: ({ op, radius }) => {
10224
- if (!_chunkPA3IMPPScjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
10225
+ if (!_chunkOVYQAYGHcjs.SELECTION_MODIFY_OPS.includes(op)) throw new Error(`Unknown op "${String(op)}".`);
10225
10226
  if (!controller.getSelection()) throw new Error("Nothing is selected.");
10226
10227
  controller.modifySelection(op, Math.min(500, Math.max(0, num2(radius, 0))));
10227
10228
  return summary(controller);
@@ -10265,7 +10266,7 @@ function createImageSelectionTools(controller) {
10265
10266
  type: "object",
10266
10267
  properties: {
10267
10268
  layerId: { type: "string", description: "Existing adjustment layer to mask." },
10268
- kind: { type: "string", enum: _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
10269
+ kind: { type: "string", enum: _chunkOVYQAYGHcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Kind of a new layer to add and mask (instead of layerId)." },
10269
10270
  params: { type: "object", description: "Parameters for the new layer (see list_controls)." },
10270
10271
  density: { type: "number", minimum: 0, maximum: 1, description: "Mask density 0-1." },
10271
10272
  feather: { type: "number", minimum: 0, maximum: 1e3, description: "Mask feather in pixels." }
@@ -10285,11 +10286,11 @@ function createImageSelectionTools(controller) {
10285
10286
  if (!controller.getAdjustmentLayer(layerId)) throw new Error(`No adjustment layer "${layerId}".`);
10286
10287
  controller.applySelectionAsLayerMask(layerId, props);
10287
10288
  id = layerId;
10288
- } else if (_chunkPA3IMPPScjs.isAdjustmentKind.call(void 0, kind)) {
10289
+ } else if (_chunkOVYQAYGHcjs.isAdjustmentKind.call(void 0, kind)) {
10289
10290
  id = controller.addAdjustmentLayer({
10290
10291
  kind,
10291
10292
  params,
10292
- mask: _chunkPA3IMPPScjs.layerMaskFromSelection.call(void 0, sel, props)
10293
+ mask: _chunkOVYQAYGHcjs.layerMaskFromSelection.call(void 0, sel, props)
10293
10294
  });
10294
10295
  } else {
10295
10296
  throw new Error("Pass layerId (an existing layer) or kind (a new adjustment layer).");
@@ -10426,11 +10427,11 @@ function createImageEditTools(controller) {
10426
10427
  const geometry2 = () => {
10427
10428
  const s = controller.getState();
10428
10429
  const region = _nullishCoalesce(s.crop, () => ( { x: 0, y: 0, ...s.imageDimensions }));
10429
- const out = _chunkPA3IMPPScjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
10430
+ const out = _chunkOVYQAYGHcjs.getRotatedSize.call(void 0, region.width, region.height, s.transform);
10430
10431
  return {
10431
10432
  image: { ...s.imageDimensions },
10432
10433
  crop: s.crop ? { ...s.crop } : null,
10433
- rotation: _chunkPA3IMPPScjs.normalizeAngle.call(void 0, s.transform.rotate),
10434
+ rotation: _chunkOVYQAYGHcjs.normalizeAngle.call(void 0, s.transform.rotate),
10434
10435
  flipH: s.transform.flipH,
10435
10436
  flipV: s.transform.flipV,
10436
10437
  output: { width: Math.round(out.width), height: Math.round(out.height) }
@@ -10665,7 +10666,7 @@ function describeLayer(layer, activeId, boundsOf) {
10665
10666
  const out = {
10666
10667
  id: layer.id,
10667
10668
  type: layer.type,
10668
- name: layer.name || (layer.type === "adjustment" ? _chunkPA3IMPPScjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
10669
+ name: layer.name || (layer.type === "adjustment" ? _chunkOVYQAYGHcjs.adjustmentKindLabel.call(void 0, layer.kind) : ""),
10669
10670
  visible: layer.visible,
10670
10671
  opacity: round3(layer.opacity),
10671
10672
  blend: layer.blend,
@@ -10754,8 +10755,8 @@ function createImageLayerTools(controller) {
10754
10755
  };
10755
10756
  };
10756
10757
  const exists = (id, what = "layerId") => {
10757
- if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
10758
- _chunkPA3IMPPScjs.requireLayer.call(void 0, controller.getLayers(), id);
10758
+ if (typeof id !== "string" || !id) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`${what} is required (a layer id from list_layers).`);
10759
+ _chunkOVYQAYGHcjs.requireLayer.call(void 0, controller.getLayers(), id);
10759
10760
  return id;
10760
10761
  };
10761
10762
  const listLayers = {
@@ -10791,7 +10792,7 @@ function createImageLayerTools(controller) {
10791
10792
  handler: ({ layerId, target }) => {
10792
10793
  const id = exists(layerId);
10793
10794
  const layer = controller.getLayer(id);
10794
- if (target === "mask" && !layer.mask) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
10795
+ if (target === "mask" && !layer.mask) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Layer "${layer.name || id}" has no mask; add one with add_layer_mask.`);
10795
10796
  controller.setActiveLayer(id, _nullishCoalesce(target, () => ( "pixels")));
10796
10797
  return { layer: describe(id), activeTarget: controller.getState().activeTarget };
10797
10798
  }
@@ -10816,7 +10817,7 @@ function createImageLayerTools(controller) {
10816
10817
  },
10817
10818
  annotations: { title: "Add a pixel layer", ...WRITE2 },
10818
10819
  handler: async (args) => {
10819
- if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give color or image, not both.");
10820
+ if (args.color !== void 0 && args.image !== void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give color or image, not both.");
10820
10821
  for (const k of ["aboveId", "belowId", "parentId"]) if (args[k] !== void 0) exists(args[k], k);
10821
10822
  const init = {
10822
10823
  name: args.name,
@@ -10906,7 +10907,7 @@ function createImageLayerTools(controller) {
10906
10907
  const id = exists(args.layerId);
10907
10908
  const props = {};
10908
10909
  for (const k of ["name", "visible", "opacity", "fillOpacity", "blend", "clipped", "locks", "collapsed"]) if (args[k] !== void 0) props[k] = args[k];
10909
- if (!Object.keys(props).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one property to change.");
10910
+ if (!Object.keys(props).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give at least one property to change.");
10910
10911
  controller.setLayerProperties(id, props);
10911
10912
  return { layer: describe(id) };
10912
10913
  }
@@ -11000,8 +11001,8 @@ function createImageLayerTools(controller) {
11000
11001
  annotations: { title: "Move a layer's pixels", ...WRITE2 },
11001
11002
  handler: ({ layerId, x, y, dx, dy }) => {
11002
11003
  const id = exists(layerId);
11003
- if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give x and y, or dx and dy.");
11004
- if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give x / y or dx / dy, not both.");
11004
+ if ([x, y, dx, dy].every((v) => v === void 0)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give x and y, or dx and dy.");
11005
+ if ((x !== void 0 || y !== void 0) && (dx !== void 0 || dy !== void 0)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give x / y or dx / dy, not both.");
11005
11006
  return { layerId: id, ...controller.offsetLayer(id, { x, y, dx, dy }) };
11006
11007
  }
11007
11008
  };
@@ -11073,7 +11074,7 @@ function createImageLayerTools(controller) {
11073
11074
  annotations: { title: "Set layer mask properties", ...WRITE_IDEMPOTENT2 },
11074
11075
  handler: ({ layerId, density, feather, enabled, linked }) => {
11075
11076
  const id = exists(layerId);
11076
- if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give density, feather, enabled or linked.");
11077
+ if ([density, feather, enabled, linked].every((v) => v === void 0)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give density, feather, enabled or linked.");
11077
11078
  const mask = controller.setLayerMaskProps(id, {
11078
11079
  density,
11079
11080
  feather,
@@ -11156,7 +11157,7 @@ function createImageLayerTools(controller) {
11156
11157
  handler: (args) => {
11157
11158
  const id = exists(args.layerId);
11158
11159
  const changes = filterValues(args);
11159
- if (!Object.keys(changes).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one value to change.");
11160
+ if (!Object.keys(changes).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give at least one value to change.");
11160
11161
  return { layerId: id, filters: controller.updateLayerFilter(id, args.filterId, changes) };
11161
11162
  }
11162
11163
  };
@@ -11420,8 +11421,8 @@ function describeLayerEffects(effects) {
11420
11421
  }
11421
11422
  function createImageEffectTools(controller) {
11422
11423
  const layerArg = (id) => {
11423
- if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
11424
- _chunkPA3IMPPScjs.requireLayer.call(void 0, controller.getLayers(), id);
11424
+ if (typeof id !== "string" || !id) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("layerId is required (a layer id from list_layers).");
11425
+ _chunkOVYQAYGHcjs.requireLayer.call(void 0, controller.getLayers(), id);
11425
11426
  return id;
11426
11427
  };
11427
11428
  const result = (layerId, extra = {}) => ({ layerId, ...extra, ...describeLayerEffects(controller.getLayerEffects(layerId)) });
@@ -11452,7 +11453,7 @@ function createImageEffectTools(controller) {
11452
11453
  annotations: { title: "Add a layer effect", ...WRITE3 },
11453
11454
  handler: ({ layerId, kind, settings, index }) => {
11454
11455
  const id = layerArg(layerId);
11455
- if (!_chunkHGTDMKNEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`kind must be one of ${_chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
11456
+ if (!_chunkHGTDMKNEcjs.isLayerEffectKind.call(void 0, kind)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`kind must be one of ${_chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS.join(", ")}.`);
11456
11457
  const { effect } = controller.addLayerEffect(id, kind, _nullishCoalesce(settings, () => ( {})), index);
11457
11458
  return result(id, { effectId: effect.id });
11458
11459
  }
@@ -11472,7 +11473,7 @@ function createImageEffectTools(controller) {
11472
11473
  handler: ({ layerId, effectId, settings }) => {
11473
11474
  const id = layerArg(layerId);
11474
11475
  const changes = _nullishCoalesce(settings, () => ( {}));
11475
- if (!Object.keys(changes).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one setting to change.");
11476
+ if (!Object.keys(changes).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give at least one setting to change.");
11476
11477
  controller.updateLayerEffect(id, effectId, changes);
11477
11478
  return result(id);
11478
11479
  }
@@ -11524,7 +11525,7 @@ function createImageEffectTools(controller) {
11524
11525
  },
11525
11526
  annotations: { title: "Set the global light", ...WRITE_IDEMPOTENT3 },
11526
11527
  handler: ({ angle, altitude }) => {
11527
- if (angle === void 0 && altitude === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give angle, altitude or both.");
11528
+ if (angle === void 0 && altitude === void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give angle, altitude or both.");
11528
11529
  const next = {};
11529
11530
  if (angle !== void 0) next.angle = angle;
11530
11531
  if (altitude !== void 0) next.altitude = altitude;
@@ -11737,7 +11738,7 @@ var PaintGesture = (_class11 = class {
11737
11738
  if (layer.type !== "pixel" && layer.type !== "shape" && layer.type !== "smart") throw new Error(`Only pixel, shape and smart object layers move; "${layer.name}" is a ${layer.type} layer.`);
11738
11739
  if (_optionalChain([layer, 'access', _383 => _383.locks, 'optionalAccess', _384 => _384.all]) || _optionalChain([layer, 'access', _385 => _385.locks, 'optionalAccess', _386 => _386.position])) throw new Error(`Layer "${layer.name}" has its position locked.`);
11739
11740
  const origin = layer.type === "pixel" ? { ...layer.offset } : layer.type === "smart" ? { ...layer.placement.corners[0] } : (() => {
11740
- const b = _chunkPA3IMPPScjs.shapeGeometryBounds.call(void 0, layer);
11741
+ const b = _chunkOVYQAYGHcjs.shapeGeometryBounds.call(void 0, layer);
11741
11742
  return b ? { x: b.x, y: b.y } : { x: 0, y: 0 };
11742
11743
  })();
11743
11744
  this.move = { id: layer.id, start: { x: sample.x, y: sample.y }, origin, moved: false };
@@ -11753,7 +11754,7 @@ var PaintGesture = (_class11 = class {
11753
11754
  return null;
11754
11755
  }
11755
11756
  } catch (err) {
11756
- this.error = _chunkPA3IMPPScjs.userErrorMessage.call(void 0, err);
11757
+ this.error = _chunkOVYQAYGHcjs.userErrorMessage.call(void 0, err);
11757
11758
  this.stroke = null;
11758
11759
  this.move = null;
11759
11760
  }
@@ -11775,7 +11776,7 @@ var PaintGesture = (_class11 = class {
11775
11776
  this.controller.offsetLayer(m.id, { x, y }, !m.moved);
11776
11777
  m.moved = true;
11777
11778
  } catch (err) {
11778
- this.error = _chunkPA3IMPPScjs.userErrorMessage.call(void 0, err);
11779
+ this.error = _chunkOVYQAYGHcjs.userErrorMessage.call(void 0, err);
11779
11780
  this.move = null;
11780
11781
  }
11781
11782
  }
@@ -11785,7 +11786,7 @@ var PaintGesture = (_class11 = class {
11785
11786
  try {
11786
11787
  this.stroke.end();
11787
11788
  } catch (err) {
11788
- this.error = _chunkPA3IMPPScjs.userErrorMessage.call(void 0, err);
11789
+ this.error = _chunkOVYQAYGHcjs.userErrorMessage.call(void 0, err);
11789
11790
  }
11790
11791
  }
11791
11792
  this.stroke = null;
@@ -11895,9 +11896,9 @@ function createImagePaintTools(controller) {
11895
11896
  annotations: { title: "Paint a brush stroke", ...WRITE4 },
11896
11897
  handler: (args) => {
11897
11898
  const tool = args.tool;
11898
- if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11899
- if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11900
- if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give color or paint, not both.");
11899
+ if (args.mixer !== void 0 && tool !== "mixer") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)('mixer settings apply to the Mixer Brush only; pass tool "mixer", or drop mixer.');
11900
+ if (args.paint !== void 0 && (_nullishCoalesce(tool, () => ( "brush"))) !== "brush") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)('paint applies to the brush only (the eraser removes paint; the Mixer Brush loads color); drop paint or use tool "brush".');
11901
+ if (args.paint !== void 0 && args.color !== void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give color or paint, not both.");
11901
11902
  const result = controller.paintStroke({
11902
11903
  tool,
11903
11904
  points: args.points,
@@ -12028,7 +12029,7 @@ function profileArg(v) {
12028
12029
  try {
12029
12030
  return _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, s.slice(4));
12030
12031
  } catch (e32) {
12031
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("The icc: value is not valid base64.");
12032
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("The icc: value is not valid base64.");
12032
12033
  }
12033
12034
  }
12034
12035
  return s;
@@ -12093,10 +12094,10 @@ function createImageColorTools(controller) {
12093
12094
  annotations: { title: "Set up soft proofing", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
12094
12095
  handler: (args) => {
12095
12096
  if (args.off === true) {
12096
- if (args.profile !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give either off true or a profile, not both.");
12097
+ if (args.profile !== void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give either off true or a profile, not both.");
12097
12098
  return controller.setProofSetup(null);
12098
12099
  }
12099
- if (args.profile === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
12100
+ if (args.profile === void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Pass the profile to proof with (e.g. coated-cmyk), or off true.");
12100
12101
  const s = controller.setProofSetup({
12101
12102
  profile: profileArg(args.profile),
12102
12103
  ...args.intent !== void 0 ? { intent: args.intent } : {},
@@ -12148,7 +12149,7 @@ function createImageColorTools(controller) {
12148
12149
  },
12149
12150
  annotations: { title: "Set the colour mode", readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: false },
12150
12151
  handler: (args) => {
12151
- if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
12152
+ if (args.mode !== "cmyk" && (args.profile !== void 0 || args.intent !== void 0)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("profile and intent apply to CMYK mode only.");
12152
12153
  return controller.setColorMode(args.mode, {
12153
12154
  ...args.profile !== void 0 ? { profile: profileArg(args.profile) } : {},
12154
12155
  ...args.intent !== void 0 ? { intent: args.intent } : {}
@@ -12213,7 +12214,7 @@ function checkSource(controller, source) {
12213
12214
  const p = source;
12214
12215
  const { width, height } = controller.getState().imageDimensions;
12215
12216
  if (!(p.x >= 0 && p.y >= 0 && p.x < width && p.y < height)) {
12216
- throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
12217
+ throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`source (${p.x}, ${p.y}) is outside the ${width} \xD7 ${height} canvas; pick a point on the image to sample.`);
12217
12218
  }
12218
12219
  return p;
12219
12220
  }
@@ -12453,10 +12454,10 @@ function createImageRetouchTools(controller) {
12453
12454
  annotations: { title: "Set the clone source", ...WRITE5, idempotentHint: true },
12454
12455
  handler: (args) => {
12455
12456
  if (args.clear === true) {
12456
- if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give either clear true or x and y, not both.");
12457
+ if (args.x !== void 0 || args.y !== void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give either clear true or x and y, not both.");
12457
12458
  return controller.setCloneSource(null);
12458
12459
  }
12459
- if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
12460
+ if (typeof args.x !== "number" || typeof args.y !== "number") throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Pass x and y (document pixels) for the source point, or clear true to remove it.");
12460
12461
  return controller.setCloneSource(checkSource(controller, { x: args.x, y: args.y }));
12461
12462
  }
12462
12463
  };
@@ -12479,7 +12480,7 @@ function createImageRetouchTools(controller) {
12479
12480
  annotations: { title: "Transform the clone source", ...WRITE5, idempotentHint: false },
12480
12481
  handler: (args) => {
12481
12482
  if (args.reset === true) {
12482
- if (Object.keys(args).some((k) => k !== "reset")) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give either reset true or transform values, not both.");
12483
+ if (Object.keys(args).some((k) => k !== "reset")) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give either reset true or transform values, not both.");
12483
12484
  return controller.setCloneTransform(null);
12484
12485
  }
12485
12486
  const cur = controller.getState().paint.cloneTransform;
@@ -12489,7 +12490,7 @@ function createImageRetouchTools(controller) {
12489
12490
  if (args.rotate !== void 0) next.rotate = args.rotate;
12490
12491
  if (args.flipHorizontal === true) next.scaleX = -(_nullishCoalesce(next.scaleX, () => ( cur.scaleX)));
12491
12492
  if (args.flipVertical === true) next.scaleY = -(_nullishCoalesce(next.scaleY, () => ( cur.scaleY)));
12492
- if (!Object.keys(next).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Pass scaleX, scaleY, rotate, flipHorizontal or flipVertical, or reset true.");
12493
+ if (!Object.keys(next).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Pass scaleX, scaleY, rotate, flipHorizontal or flipVertical, or reset true.");
12493
12494
  return controller.setCloneTransform(next);
12494
12495
  }
12495
12496
  };
@@ -12510,11 +12511,11 @@ var DATA = {
12510
12511
  description: "The PSD or PSB file as base64 (a `data:` URL prefix is accepted)."
12511
12512
  };
12512
12513
  function psdBytesFromBase64(data) {
12513
- if (typeof data !== "string" || !data.trim()) throw new (0, _chunkPA3IMPPScjs.PsdError)("data is required: the PSD file as base64.");
12514
+ if (typeof data !== "string" || !data.trim()) throw new (0, _chunkOVYQAYGHcjs.PsdError)("data is required: the PSD file as base64.");
12514
12515
  const body = data.trim().replace(/^data:[^,]*;base64,/i, "");
12515
- if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkPA3IMPPScjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
12516
+ if (!/^[A-Za-z0-9+/=_\s-]+$/.test(body)) throw new (0, _chunkOVYQAYGHcjs.PsdError)("data is not base64; send the PSD file bytes base64-encoded.");
12516
12517
  const bytes = _chunkCWM3CUUXcjs.base64ToBytes.call(void 0, body);
12517
- if (bytes.length < 26) throw new (0, _chunkPA3IMPPScjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
12518
+ if (bytes.length < 26) throw new (0, _chunkOVYQAYGHcjs.PsdError)(`data decodes to ${bytes.length} bytes, too short for a PSD (at least 26).`);
12518
12519
  return bytes;
12519
12520
  }
12520
12521
  function createImagePsdTools(controller) {
@@ -12525,7 +12526,7 @@ function createImagePsdTools(controller) {
12525
12526
  inputSchema: { type: "object", properties: { data: DATA }, required: ["data"], additionalProperties: false },
12526
12527
  annotations: { title: "Inspect a PSD", ...READ7 },
12527
12528
  handler: ({ data }) => {
12528
- const res = _chunkPA3IMPPScjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
12529
+ const res = _chunkOVYQAYGHcjs.importPsd.call(void 0, psdBytesFromBase64(data), { skipPixels: true });
12529
12530
  return {
12530
12531
  width: res.width,
12531
12532
  height: res.height,
@@ -12612,7 +12613,7 @@ var GEOMETRY = {
12612
12613
  dy: { type: "number", description: "Move down after scaling and rotating, in document pixels (default 0)." },
12613
12614
  reference: {
12614
12615
  description: "Fixed point of scale, skew and rotate: an anchor of the frame (top-left, top, top-right, left, center, right, bottom-left, bottom, bottom-right; default center) or a document point {x, y}.",
12615
- anyOf: [{ type: "string", enum: _chunkPA3IMPPScjs.TRANSFORM_ANCHORS }, POINT]
12616
+ anyOf: [{ type: "string", enum: _chunkOVYQAYGHcjs.TRANSFORM_ANCHORS }, POINT]
12616
12617
  },
12617
12618
  matrix: {
12618
12619
  type: "array",
@@ -12633,14 +12634,14 @@ var NUMERIC = ["scaleX", "scaleY", "rotate", "skewX", "skewY", "dx", "dy", "refe
12633
12634
  function geometryFrom(args) {
12634
12635
  const numeric = NUMERIC.filter((k) => args[k] !== void 0);
12635
12636
  const ways = [numeric.length > 0, args.matrix !== void 0, args.corners !== void 0].filter(Boolean).length;
12636
- if (ways === 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
12637
- if (ways > 1) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
12637
+ if (ways === 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give the transform one way: numeric fields (scaleX, scaleY, rotate, skewX, skewY, dx, dy, reference), matrix, or corners.");
12638
+ if (ways > 1) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give the transform only one way: numeric fields, matrix or corners, not a mix.");
12638
12639
  if (args.matrix !== void 0) return { matrix: args.matrix };
12639
12640
  if (args.corners !== void 0) return { corners: args.corners };
12640
12641
  const params = {};
12641
12642
  for (const k of NUMERIC) if (args[k] !== void 0) params[k] = args[k];
12642
- if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
12643
- if (typeof params.reference === "string" && !_chunkPA3IMPPScjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkPA3IMPPScjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
12643
+ if (params.scaleX === 0 || params.scaleY === 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("scaleX and scaleY must not be 0 (that collapses the layer to a line).");
12644
+ if (typeof params.reference === "string" && !_chunkOVYQAYGHcjs.isTransformAnchor.call(void 0, params.reference)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Unknown reference "${params.reference}". Use ${_chunkOVYQAYGHcjs.TRANSFORM_ANCHORS.join(", ")} or {x, y}.`);
12644
12645
  return { params };
12645
12646
  }
12646
12647
  function targetFrom(args) {
@@ -12689,15 +12690,15 @@ function createImageTransformTools(controller) {
12689
12690
  moved: [...s.moves],
12690
12691
  frame: { ...s.box },
12691
12692
  corners: s.startGeometry.corners.map(roundPoint),
12692
- center: roundPoint(_chunkPA3IMPPScjs.anchorPoint.call(void 0, s.startGeometry, "center"))
12693
+ center: roundPoint(_chunkOVYQAYGHcjs.anchorPoint.call(void 0, s.startGeometry, "center"))
12693
12694
  };
12694
12695
  if (s.smartObject) out.smartObject = true;
12695
12696
  s.cancel();
12696
12697
  if (args.meshColumns !== void 0) {
12697
12698
  const cols = args.meshColumns;
12698
12699
  const rows = _nullishCoalesce(args.meshRows, () => ( cols));
12699
- const mesh = _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box, cols, rows);
12700
- out.mesh = { columns: cols, rows, pointsPerRow: _chunkJCXMJUQOcjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkJCXMJUQOcjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
12700
+ const mesh = _chunkEGZM52EOcjs.identityWarpMesh.call(void 0, s.box, cols, rows);
12701
+ out.mesh = { columns: cols, rows, pointsPerRow: _chunkEGZM52EOcjs.warpMeshColumns.call(void 0, mesh), pointRows: _chunkEGZM52EOcjs.warpMeshRows.call(void 0, mesh), points: mesh.points.map(roundPoint) };
12701
12702
  }
12702
12703
  return out;
12703
12704
  }
@@ -12722,7 +12723,7 @@ function createImageTransformTools(controller) {
12722
12723
  type: "object",
12723
12724
  properties: {
12724
12725
  ...TARGET3,
12725
- style: { type: "string", enum: _chunkJCXMJUQOcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
12726
+ style: { type: "string", enum: _chunkEGZM52EOcjs.WARP_STYLES, description: "Preset warp (Photoshop\u2019s menu): arc, arcLower, arcUpper, arch, bulge, shellLower, shellUpper, flag, wave, fish, rise, fisheye, inflate, squeeze, twist." },
12726
12727
  bend: { type: "number", minimum: -100, maximum: 100, description: "Preset bend in percent, \u2212100..100 (default 50)." },
12727
12728
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Preset horizontal distortion in percent, \u2212100..100 (default 0)." },
12728
12729
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Preset vertical distortion in percent, \u2212100..100 (default 0)." },
@@ -12744,11 +12745,11 @@ function createImageTransformTools(controller) {
12744
12745
  annotations: { title: "Warp a layer", ...WRITE6 },
12745
12746
  handler: (args) => {
12746
12747
  const hasPreset = ["style", "bend", "horizontal", "vertical", "orientation"].some((k) => args[k] !== void 0);
12747
- if (hasPreset && args.mesh !== void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
12748
- if (!hasPreset && args.mesh === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give a preset style or a mesh.");
12748
+ if (hasPreset && args.mesh !== void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give a preset (style, bend, horizontal, vertical, orientation) or a mesh, not both.");
12749
+ if (!hasPreset && args.mesh === void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give a preset style or a mesh.");
12749
12750
  let warp;
12750
12751
  if (hasPreset) {
12751
- if (args.style === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkJCXMJUQOcjs.WARP_STYLES.join(", ")}.`);
12752
+ if (args.style === void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`style is required with a preset. Styles: ${_chunkEGZM52EOcjs.WARP_STYLES.join(", ")}.`);
12752
12753
  warp = {
12753
12754
  style: args.style,
12754
12755
  bend: _nullishCoalesce(args.bend, () => ( 50)),
@@ -12759,7 +12760,7 @@ function createImageTransformTools(controller) {
12759
12760
  } else {
12760
12761
  const m = args.mesh;
12761
12762
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
12762
- if (m.points.length !== want) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
12763
+ if (m.points.length !== want) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
12763
12764
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
12764
12765
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
12765
12766
  }
@@ -12854,13 +12855,13 @@ function settingsFrom(args) {
12854
12855
  return out;
12855
12856
  }
12856
12857
  function imageArg(image) {
12857
- if (typeof image !== "string" || !image.trim()) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
12858
+ if (typeof image !== "string" || !image.trim()) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("image is required: a PNG as a data URL or base64 (other formats need a browser).");
12858
12859
  return image.trim();
12859
12860
  }
12860
12861
  function createImageSmartObjectTools(controller) {
12861
12862
  const smartId = (id) => {
12862
- if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
12863
- _chunkPA3IMPPScjs.requireSmartObject.call(void 0, controller.getLayers(), id);
12863
+ if (typeof id !== "string" || !id) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("layerId is required (a smart object id from list_layers).");
12864
+ _chunkOVYQAYGHcjs.requireSmartObject.call(void 0, controller.getLayers(), id);
12864
12865
  return id;
12865
12866
  };
12866
12867
  const info = (id) => {
@@ -12897,7 +12898,7 @@ function createImageSmartObjectTools(controller) {
12897
12898
  },
12898
12899
  annotations: { title: "Convert to Smart Object", ...WRITE7 },
12899
12900
  handler: ({ layerIds, name }) => {
12900
- for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkPA3IMPPScjs.requireLayer.call(void 0, controller.getLayers(), id2);
12901
+ for (const id2 of _nullishCoalesce(layerIds, () => ( []))) _chunkOVYQAYGHcjs.requireLayer.call(void 0, controller.getLayers(), id2);
12901
12902
  const id = controller.convertToSmartObject(layerIds, { name });
12902
12903
  return { layer: layerSummary(id), smartObject: info(id) };
12903
12904
  }
@@ -12934,7 +12935,7 @@ function createImageSmartObjectTools(controller) {
12934
12935
  {
12935
12936
  type: "object",
12936
12937
  properties: {
12937
- style: { type: "string", enum: _chunkJCXMJUQOcjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12938
+ style: { type: "string", enum: _chunkEGZM52EOcjs.WARP_STYLES, description: "Preset (Photoshop\u2019s menu)." },
12938
12939
  bend: { type: "number", minimum: -100, maximum: 100, description: "Bend in percent (default 50)." },
12939
12940
  horizontal: { type: "number", minimum: -100, maximum: 100, description: "Horizontal distortion in percent (default 0)." },
12940
12941
  vertical: { type: "number", minimum: -100, maximum: 100, description: "Vertical distortion in percent (default 0)." },
@@ -12970,12 +12971,12 @@ function createImageSmartObjectTools(controller) {
12970
12971
  else if (w) {
12971
12972
  const m = w;
12972
12973
  const want = (3 * m.columns + 1) * (3 * m.rows + 1);
12973
- if (m.points.length !== want) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
12974
+ if (m.points.length !== want) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`A ${m.columns} \xD7 ${m.rows} mesh needs (3\xB7${m.columns} + 1) \xD7 (3\xB7${m.rows} + 1) = ${want} points, got ${m.points.length}.`);
12974
12975
  const knots = (n) => Array.from({ length: n + 1 }, (_, i) => i / n);
12975
12976
  warp = { us: knots(m.columns), vs: knots(m.rows), points: m.points.map((p) => ({ x: p.x, y: p.y })) };
12976
12977
  }
12977
12978
  const keys = ["corners", "matrix", "scaleX", "scaleY", "rotate", "skewX", "skewY", "x", "y", "warp", "interpolation"];
12978
- if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12979
+ if (!keys.some((k) => args[k] !== void 0)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Give something to set: ${keys.join(", ")}.`);
12979
12980
  const res = controller.setSmartObjectTransform(id, {
12980
12981
  corners: args.corners,
12981
12982
  matrix: args.matrix,
@@ -13100,7 +13101,7 @@ function createImageSmartObjectTools(controller) {
13100
13101
  handler: (args) => {
13101
13102
  const id = smartId(args.layerId);
13102
13103
  const changes = settingsFrom(args);
13103
- if (!Object.keys(changes).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give at least one value to change.");
13104
+ if (!Object.keys(changes).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give at least one value to change.");
13104
13105
  const filter = controller.updateSmartFilter(id, args.filterId, changes);
13105
13106
  return { layerId: id, filter, smartFilters: info(id).smartFilters };
13106
13107
  }
@@ -13421,8 +13422,8 @@ function geometry(args) {
13421
13422
  }
13422
13423
  function createImageShapeTools(controller) {
13423
13424
  const shapeId = (id) => {
13424
- if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
13425
- _chunkPA3IMPPScjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
13425
+ if (typeof id !== "string" || !id) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("layerId is required (a shape layer id from list_layers).");
13426
+ _chunkOVYQAYGHcjs.requireShapeLayer.call(void 0, controller.getLayers(), id);
13426
13427
  return id;
13427
13428
  };
13428
13429
  const layerSummary = (id) => {
@@ -13497,7 +13498,7 @@ function createImageShapeTools(controller) {
13497
13498
  annotations: { title: "Restyle a shape", ...WRITE_IDEMPOTENT5 },
13498
13499
  handler: ({ layerId, fill, stroke, fillRule }) => {
13499
13500
  const id = shapeId(layerId);
13500
- if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
13501
+ if (fill === void 0 && stroke === void 0 && fillRule === void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give fill, stroke or fillRule to change.");
13501
13502
  return controller.setShapeStyle(id, { fill, stroke, fillRule });
13502
13503
  }
13503
13504
  };
@@ -13546,7 +13547,7 @@ function createImageShapeTools(controller) {
13546
13547
  handler: ({ layerId, componentIndex, ...rest }) => {
13547
13548
  const id = shapeId(layerId);
13548
13549
  const change = geometry(rest);
13549
- if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("Give shape, subpaths or op to change.");
13550
+ if (change.shape === void 0 && change.subpaths === void 0 && change.op === void 0) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("Give shape, subpaths or op to change.");
13550
13551
  return controller.setShapeComponent(id, componentIndex, change);
13551
13552
  }
13552
13553
  };
@@ -13620,8 +13621,8 @@ function pick2(args, keys) {
13620
13621
  }
13621
13622
  function createImageTypeTools(controller) {
13622
13623
  const typeId = (id) => {
13623
- if (typeof id !== "string" || !id) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
13624
- _chunkPA3IMPPScjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
13624
+ if (typeof id !== "string" || !id) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("layerId is required (a type layer id from list_layers).");
13625
+ _chunkOVYQAYGHcjs.requireTypeLayer.call(void 0, controller.getLayers(), id);
13625
13626
  return id;
13626
13627
  };
13627
13628
  const layerSummary = (id) => {
@@ -13701,7 +13702,7 @@ function createImageTypeTools(controller) {
13701
13702
  annotations: { title: "Style a range of text", ...WRITE_IDEMPOTENT6 },
13702
13703
  handler: (args) => {
13703
13704
  const style = pick2(args, Object.keys(STYLE));
13704
- if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
13705
+ if (!Object.keys(style).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Give at least one style field: ${Object.keys(STYLE).join(", ")}.`);
13705
13706
  return controller.setTextStyle(typeId(args.layerId), style, range(args));
13706
13707
  }
13707
13708
  };
@@ -13713,7 +13714,7 @@ function createImageTypeTools(controller) {
13713
13714
  annotations: { title: "Style paragraphs", ...WRITE_IDEMPOTENT6 },
13714
13715
  handler: (args) => {
13715
13716
  const style = pick2(args, Object.keys(PARAGRAPH));
13716
- if (!Object.keys(style).length) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
13717
+ if (!Object.keys(style).length) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)(`Give at least one paragraph field: ${Object.keys(PARAGRAPH).join(", ")}.`);
13717
13718
  return controller.setParagraphStyle(typeId(args.layerId), style, range(args));
13718
13719
  }
13719
13720
  };
@@ -13735,7 +13736,7 @@ function createImageTypeTools(controller) {
13735
13736
  annotations: { title: "Point or paragraph text", ...WRITE_IDEMPOTENT6 },
13736
13737
  handler: ({ layerId, kind, width, height }) => {
13737
13738
  const id = typeId(layerId);
13738
- if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkPA3IMPPScjs.LayerOperationError)("kind box needs width and height in pixels.");
13739
+ if (kind === "box" && (width === void 0 || height === void 0)) throw new (0, _chunkOVYQAYGHcjs.LayerOperationError)("kind box needs width and height in pixels.");
13739
13740
  return controller.setTextFrame(id, kind === "box" ? { kind: "box", width, height } : { kind: "point" });
13740
13741
  }
13741
13742
  };
@@ -13757,7 +13758,7 @@ function createImageTypeTools(controller) {
13757
13758
  var LAYER_PATH = /^layers\.([^.]+)\.(.+)$/;
13758
13759
  function adjustmentsSummary(adjustments) {
13759
13760
  return {
13760
- process: _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, adjustments.process),
13761
+ process: _chunkOVYQAYGHcjs.normalizeProcessVersion.call(void 0, adjustments.process),
13761
13762
  values: readAdjustmentControls(adjustments),
13762
13763
  layers: (_nullishCoalesce(adjustments.layers, () => ( []))).map((l) => JSON.parse(JSON.stringify(l)))
13763
13764
  };
@@ -13800,7 +13801,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13800
13801
  default: def,
13801
13802
  ...requiresProcess ? { requiresProcess } : {}
13802
13803
  })),
13803
- layerKinds: _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
13804
+ layerKinds: _chunkOVYQAYGHcjs.ADJUSTMENT_KINDS.map(({ kind, label }) => ({
13804
13805
  kind,
13805
13806
  label,
13806
13807
  controls: [...ADJUSTMENT_LAYER_CONTROLS[kind], ADJUSTMENT_LAYER_OPACITY_CONTROL].map(({ id, label: l, min, max, step, default: def }) => ({
@@ -13886,7 +13887,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13886
13887
  const result = { applied, clamped };
13887
13888
  if (typeof label === "string" && label) result.label = label;
13888
13889
  const notes = [];
13889
- if ("tint" in applied && _chunkPA3IMPPScjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
13890
+ if ("tint" in applied && _chunkOVYQAYGHcjs.normalizeProcessVersion.call(void 0, controller.getState().adjustments.process) < 2) {
13890
13891
  notes.push("Tint has no effect on process 1 edits.");
13891
13892
  }
13892
13893
  if (notes.length) result.notes = notes;
@@ -13896,11 +13897,11 @@ function createImageEditorToolProvider(controller, options = {}) {
13896
13897
  const addLayer = {
13897
13898
  name: "add_adjustment_layer",
13898
13899
  title: "Add an adjustment layer",
13899
- description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
13900
+ description: "Adds a non-destructive adjustment layer on top of the stack (one undoable step) and returns it. Kinds: " + _chunkOVYQAYGHcjs.ADJUSTMENT_KINDS.map((k) => k.kind).join(", ") + ". Omitted params are neutral.",
13900
13901
  inputSchema: {
13901
13902
  type: "object",
13902
13903
  properties: {
13903
- kind: { type: "string", enum: _chunkPA3IMPPScjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
13904
+ kind: { type: "string", enum: _chunkOVYQAYGHcjs.ADJUSTMENT_KINDS.map((k) => k.kind), description: "Adjustment kind." },
13904
13905
  params: { type: "object", description: "Initial parameters (see list_controls); merged with neutral defaults." },
13905
13906
  opacity: { type: "number", minimum: 0, maximum: 1, description: "Layer opacity 0-1 (default 1)." },
13906
13907
  blend: { type: "string", enum: _chunkCWM3CUUXcjs.BLEND_MODES.map((m) => m.id), description: "Blend mode (default normal)." },
@@ -13919,7 +13920,7 @@ function createImageEditorToolProvider(controller, options = {}) {
13919
13920
  openWorldHint: false
13920
13921
  },
13921
13922
  handler: ({ kind, params, opacity, blend, name, aboveId, parentId }) => {
13922
- if (!_chunkPA3IMPPScjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13923
+ if (!_chunkOVYQAYGHcjs.isAdjustmentKind.call(void 0, kind)) throw new Error(`Unknown adjustment kind "${kind}".`);
13923
13924
  if (blend !== void 0 && !_chunkCWM3CUUXcjs.isBlendMode.call(void 0, blend)) throw new Error(`Unknown blend mode "${blend}".`);
13924
13925
  if (aboveId !== void 0 && parentId !== void 0) throw new Error("Give aboveId or parentId, not both.");
13925
13926
  for (const ref of [aboveId, parentId]) {
@@ -14016,7 +14017,7 @@ function boxToCurvePoint(x, y, width, height) {
14016
14017
  return { input: clampLevel(x / (width || 1) * 255), output: clampLevel((height - y) / (height || 1) * 255) };
14017
14018
  }
14018
14019
  function curveSvgPath(points, width, height, samples = 64) {
14019
- const lut = _chunkPA3IMPPScjs.curveLutFromLevels.call(void 0, points);
14020
+ const lut = _chunkOVYQAYGHcjs.curveLutFromLevels.call(void 0, points);
14020
14021
  const n = lut.length - 1;
14021
14022
  let d = "";
14022
14023
  for (let i = 0; i <= samples; i++) {
@@ -14324,7 +14325,7 @@ function layerPanelRows(layers, activeId) {
14324
14325
  }
14325
14326
  function layerLabel(layer) {
14326
14327
  if (layer.name) return layer.name;
14327
- if (layer.type === "adjustment") return _chunkPA3IMPPScjs.adjustmentKindLabel.call(void 0, layer.kind);
14328
+ if (layer.type === "adjustment") return _chunkOVYQAYGHcjs.adjustmentKindLabel.call(void 0, layer.kind);
14328
14329
  return layer.type === "group" ? "Group" : "Layer";
14329
14330
  }
14330
14331
  function layerBadge(layer) {
@@ -14544,7 +14545,7 @@ function newLayerOptions(_controller) {
14544
14545
  { id: "shape-ellipse", label: "Ellipse Shape", icon: "circle", group: "Shapes" },
14545
14546
  { id: "group", label: "Group Folder", icon: "folder", group: "Basic" }
14546
14547
  ];
14547
- for (const { kind, label } of _chunkPA3IMPPScjs.ADJUSTMENT_KINDS) {
14548
+ for (const { kind, label } of _chunkOVYQAYGHcjs.ADJUSTMENT_KINDS) {
14548
14549
  options.push({
14549
14550
  id: `adjustment-${kind}`,
14550
14551
  label,
@@ -14610,7 +14611,7 @@ async function addLayerOfKind(controller, id, init) {
14610
14611
  }
14611
14612
  if (id.startsWith("adjustment-")) {
14612
14613
  const kind = id.slice("adjustment-".length);
14613
- if (_chunkPA3IMPPScjs.isAdjustmentKind.call(void 0, kind)) {
14614
+ if (_chunkOVYQAYGHcjs.isAdjustmentKind.call(void 0, kind)) {
14614
14615
  return controller.addAdjustmentLayer({
14615
14616
  kind,
14616
14617
  ...init
@@ -14633,7 +14634,7 @@ function layerPanels(layer) {
14633
14634
  panels.push({ id: "paint", title: "Brush Options" });
14634
14635
  panels.push({ id: "effects", title: "Layer Effects" });
14635
14636
  } else if (layer.type === "adjustment") {
14636
- panels.push({ id: "adjustment", title: _chunkPA3IMPPScjs.adjustmentKindLabel.call(void 0, layer.kind) });
14637
+ panels.push({ id: "adjustment", title: _chunkOVYQAYGHcjs.adjustmentKindLabel.call(void 0, layer.kind) });
14637
14638
  } else if (layer.type === "type") {
14638
14639
  panels.push({ id: "type", title: "Typography" });
14639
14640
  panels.push({ id: "effects", title: "Layer Effects" });
@@ -14909,7 +14910,7 @@ var FREE_TRANSFORM_MODE_OPTIONS = [
14909
14910
  ];
14910
14911
  var WARP_STYLE_OPTIONS = [
14911
14912
  { id: "custom", label: "Custom" },
14912
- ..._chunkJCXMJUQOcjs.WARP_STYLES.map((id) => ({ id, label: _chunkJCXMJUQOcjs.WARP_STYLE_LABELS[id] }))
14913
+ ..._chunkEGZM52EOcjs.WARP_STYLES.map((id) => ({ id, label: _chunkEGZM52EOcjs.WARP_STYLE_LABELS[id] }))
14913
14914
  ];
14914
14915
  var WARP_GRID_OPTIONS = [
14915
14916
  { id: "1x1", label: "Default", columns: 1, rows: 1 },
@@ -15091,7 +15092,7 @@ var FreeTransformTool = (_class13 = class {
15091
15092
  setMode(mode) {
15092
15093
  this.modeValue = mode;
15093
15094
  const s = this.session;
15094
- if (mode === "warp" && s && !this.mesh) this.mesh = _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
15095
+ if (mode === "warp" && s && !this.mesh) this.mesh = _chunkEGZM52EOcjs.identityWarpMesh.call(void 0, s.box, this.warpSettings.columns, this.warpSettings.rows);
15095
15096
  this.changed();
15096
15097
  }
15097
15098
  /** The Warp options bar's settings. */
@@ -15113,13 +15114,13 @@ var FreeTransformTool = (_class13 = class {
15113
15114
  this.modeValue = "warp";
15114
15115
  const next = { ...this.warpSettings, ...changes };
15115
15116
  this.warpSettings = next;
15116
- let mesh = _nullishCoalesce(this.mesh, () => ( _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
15117
+ let mesh = _nullishCoalesce(this.mesh, () => ( _chunkEGZM52EOcjs.identityWarpMesh.call(void 0, s.box, next.columns, next.rows)));
15117
15118
  if (next.style !== "custom" && ("style" in changes || "bend" in changes || "horizontal" in changes || "vertical" in changes || "orientation" in changes)) {
15118
15119
  const preset = { style: next.style, bend: next.bend, horizontal: next.horizontal, vertical: next.vertical, orientation: next.orientation };
15119
- mesh = _nullishCoalesce(_chunkJCXMJUQOcjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkJCXMJUQOcjs.identityWarpMesh.call(void 0, s.box)));
15120
- mesh = _chunkJCXMJUQOcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
15120
+ mesh = _nullishCoalesce(_chunkEGZM52EOcjs.warpPresetMesh.call(void 0, preset, s.box), () => ( _chunkEGZM52EOcjs.identityWarpMesh.call(void 0, s.box)));
15121
+ mesh = _chunkEGZM52EOcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
15121
15122
  }
15122
- if ("columns" in changes || "rows" in changes) mesh = _chunkJCXMJUQOcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
15123
+ if ("columns" in changes || "rows" in changes) mesh = _chunkEGZM52EOcjs.resizeWarpMesh.call(void 0, mesh, next.columns, next.rows);
15123
15124
  this.mesh = mesh;
15124
15125
  this.changed();
15125
15126
  this.preview();
@@ -15166,11 +15167,11 @@ var FreeTransformTool = (_class13 = class {
15166
15167
  const m = this.mesh;
15167
15168
  const at = (p) => _nullishCoalesce(_chunkQT26RHKKcjs.applyHomography.call(void 0, h, p), () => ( p));
15168
15169
  const pts = m.points.map(at);
15169
- const edit = _chunkJCXMJUQOcjs.warpMeshEditPoints.call(void 0, m);
15170
+ const edit = _chunkEGZM52EOcjs.warpMeshEditPoints.call(void 0, m);
15170
15171
  out.handles = [];
15171
- out.outline = _chunkJCXMJUQOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
15172
+ out.outline = _chunkEGZM52EOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }).length ? this.meshOutline(pts, m) : out.outline;
15172
15173
  out.warp = {
15173
- curves: _chunkJCXMJUQOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
15174
+ curves: _chunkEGZM52EOcjs.warpMeshGridCurves.call(void 0, { ...m, points: pts }),
15174
15175
  anchors: edit.anchors.map((i) => pts[i]),
15175
15176
  handles: edit.handles.map((e) => ({ point: pts[e.index], anchor: pts[e.anchor] }))
15176
15177
  };
@@ -15194,7 +15195,7 @@ var FreeTransformTool = (_class13 = class {
15194
15195
  if (!o) return null;
15195
15196
  if (this.modeValue === "warp" && this.mesh) {
15196
15197
  const h = this.homography();
15197
- const edit = _chunkJCXMJUQOcjs.warpMeshEditPoints.call(void 0, this.mesh);
15198
+ const edit = _chunkEGZM52EOcjs.warpMeshEditPoints.call(void 0, this.mesh);
15198
15199
  let best2 = -1;
15199
15200
  let bestD2 = tolerance;
15200
15201
  for (const i of [...edit.anchors, ...edit.handles.map((e) => e.index)]) {
@@ -15243,7 +15244,7 @@ var FreeTransformTool = (_class13 = class {
15243
15244
  if (this.modeValue === "warp" && this.mesh && handle === "inside") {
15244
15245
  const q = this.toFrame(p, this.corners);
15245
15246
  if (q) {
15246
- const r = _chunkJCXMJUQOcjs.warpMeshParamAt.call(void 0, this.mesh, q);
15247
+ const r = _chunkEGZM52EOcjs.warpMeshParamAt.call(void 0, this.mesh, q);
15247
15248
  st = { s: r.s, t: r.t };
15248
15249
  }
15249
15250
  }
@@ -15276,8 +15277,8 @@ var FreeTransformTool = (_class13 = class {
15276
15277
  if (!a || !b) return;
15277
15278
  const delta = { x: b.x - a.x, y: b.y - a.y };
15278
15279
  const i = meshIndex(d.handle);
15279
- if (i >= 0) this.mesh = _chunkJCXMJUQOcjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
15280
- else if (d.handle === "inside" && d.st) this.mesh = _chunkJCXMJUQOcjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
15280
+ if (i >= 0) this.mesh = _chunkEGZM52EOcjs.dragWarpMeshPoint.call(void 0, d.mesh, i, delta);
15281
+ else if (d.handle === "inside" && d.st) this.mesh = _chunkEGZM52EOcjs.pullWarpMesh.call(void 0, d.mesh, d.st.s, d.st.t, delta);
15281
15282
  else return;
15282
15283
  this.warpSettings = { ...this.warpSettings, style: "custom" };
15283
15284
  this.changed();
@@ -15401,7 +15402,7 @@ var FreeTransformTool = (_class13 = class {
15401
15402
  bar() {
15402
15403
  const s = this.session;
15403
15404
  if (!s || !this.corners) return null;
15404
- const read = _chunkPA3IMPPScjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
15405
+ const read = _chunkOVYQAYGHcjs.describeTransform.call(void 0, { box: s.box, corners: this.corners }, this.refBox);
15405
15406
  return {
15406
15407
  affine: read.affine,
15407
15408
  x: _nullishCoalesce(this.typed.x, () => ( read.x)),
@@ -15426,7 +15427,7 @@ var FreeTransformTool = (_class13 = class {
15426
15427
  this.changed();
15427
15428
  return;
15428
15429
  }
15429
- const m = _chunkPA3IMPPScjs.matrixFromParams.call(void 0, s.box, {
15430
+ const m = _chunkOVYQAYGHcjs.matrixFromParams.call(void 0, s.box, {
15430
15431
  scaleX: next.scaleX,
15431
15432
  scaleY: next.scaleY,
15432
15433
  rotate: next.rotate,
@@ -15436,7 +15437,7 @@ var FreeTransformTool = (_class13 = class {
15436
15437
  dx: next.x - this.refBox.x,
15437
15438
  dy: next.y - this.refBox.y
15438
15439
  });
15439
- this.setCorners(_chunkPA3IMPPScjs.cornersFromMatrix.call(void 0, s.box, m));
15440
+ this.setCorners(_chunkOVYQAYGHcjs.cornersFromMatrix.call(void 0, s.box, m));
15440
15441
  this.typed = { scaleX: next.scaleX, scaleY: next.scaleY, rotate: next.rotate, skewX: next.skewX, skewY: next.skewY, x: next.x, y: next.y };
15441
15442
  this.changed();
15442
15443
  }
@@ -15605,9 +15606,9 @@ function createImageEffectsToolProvider(controller, options = {}) {
15605
15606
 
15606
15607
  // src/image-editor/editorDocument.ts
15607
15608
  function createImageEditorDocument(controller, options = {}) {
15608
- return _chunkM4MIZPQIcjs.defineEditorDocument.call(void 0, {
15609
+ return _chunkSJ2CPTQCcjs.defineEditorDocument.call(void 0, {
15609
15610
  kind: "image",
15610
- assets: _nullishCoalesce(options.assets, () => ( _chunkM4MIZPQIcjs.createEditorAssetRegistry.call(void 0, ))),
15611
+ assets: _nullishCoalesce(options.assets, () => ( _chunkSJ2CPTQCcjs.createEditorAssetRegistry.call(void 0, ))),
15611
15612
  get: () => controller.toJSON(),
15612
15613
  load: (document2, { history }) => {
15613
15614
  const { state, report } = loadImageEditorDocument(document2);
@@ -16602,4 +16603,4 @@ function createImageEditorDocument(controller, options = {}) {
16602
16603
 
16603
16604
 
16604
16605
 
16605
- exports.ADJUSTMENT_KEYS = _chunkPA3IMPPScjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkPA3IMPPScjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkPA3IMPPScjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkPA3IMPPScjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkPA3IMPPScjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkPA3IMPPScjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkPA3IMPPScjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkPA3IMPPScjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkPA3IMPPScjs.D50; exports.D65 = _chunkPA3IMPPScjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkJCXMJUQOcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkPA3IMPPScjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkJCXMJUQOcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkPA3IMPPScjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EMPTY_DISTANCE = _chunkPA3IMPPScjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkPA3IMPPScjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkPA3IMPPScjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkPA3IMPPScjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkPA3IMPPScjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkPA3IMPPScjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkPA3IMPPScjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkPA3IMPPScjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkPA3IMPPScjs.LUMA_709; exports.LayerCompositor = _chunkPA3IMPPScjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkPA3IMPPScjs.LayerOperationError; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkPA3IMPPScjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkPA3IMPPScjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkPA3IMPPScjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkPA3IMPPScjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkPA3IMPPScjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkPA3IMPPScjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkPA3IMPPScjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkPA3IMPPScjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkPA3IMPPScjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkPA3IMPPScjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkPA3IMPPScjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkPA3IMPPScjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkPA3IMPPScjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkPA3IMPPScjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkPA3IMPPScjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkPA3IMPPScjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkPA3IMPPScjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkPA3IMPPScjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkPA3IMPPScjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkPA3IMPPScjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkJCXMJUQOcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkJCXMJUQOcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkPA3IMPPScjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkPA3IMPPScjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkPA3IMPPScjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkPA3IMPPScjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkPA3IMPPScjs.activeSmartFilters; exports.addLayerEffect = _chunkPA3IMPPScjs.addLayerEffect; exports.addLayerFilter = _chunkPA3IMPPScjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkPA3IMPPScjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkPA3IMPPScjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkPA3IMPPScjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkPA3IMPPScjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkPA3IMPPScjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkPA3IMPPScjs.anchorPoint; exports.annotationBlend = _chunkPA3IMPPScjs.annotationBlend; exports.annotationLayerFor = _chunkPA3IMPPScjs.annotationLayerFor; exports.annotationLayerName = _chunkPA3IMPPScjs.annotationLayerName; exports.annotationOfLayer = _chunkPA3IMPPScjs.annotationOfLayer; exports.annotationOfShape = _chunkPA3IMPPScjs.annotationOfShape; exports.annotationOfType = _chunkPA3IMPPScjs.annotationOfType; exports.applyAdjustmentLayers = _chunkPA3IMPPScjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkPA3IMPPScjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkPA3IMPPScjs.applyAdjustments; exports.applyBoxBlur = _chunkPA3IMPPScjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkPA3IMPPScjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkPA3IMPPScjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkPA3IMPPScjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkPA3IMPPScjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkPA3IMPPScjs.applyLegacyFloat; exports.applyMatrix3 = _chunkPA3IMPPScjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkPA3IMPPScjs.applyParams; exports.applyProcess2Adjustments = _chunkPA3IMPPScjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkPA3IMPPScjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkPA3IMPPScjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkPA3IMPPScjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkPA3IMPPScjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkPA3IMPPScjs.blurFilter; exports.borderCoverage = _chunkPA3IMPPScjs.borderCoverage; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkPA3IMPPScjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkPA3IMPPScjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkPA3IMPPScjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkPA3IMPPScjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkPA3IMPPScjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkPA3IMPPScjs.canvasToImagePoint; exports.caretAt = _chunkJCXMJUQOcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkPA3IMPPScjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkPA3IMPPScjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkPA3IMPPScjs.combineSelections; exports.compileAdjustmentLayer = _chunkPA3IMPPScjs.compileAdjustmentLayer; exports.componentPath = _chunkPA3IMPPScjs.componentPath; exports.compositeDeep = _chunkPA3IMPPScjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkPA3IMPPScjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkPA3IMPPScjs.contentsBox; exports.contentsSurface = _chunkPA3IMPPScjs.contentsSurface; exports.contractCoverage = _chunkPA3IMPPScjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkPA3IMPPScjs.convertToSmartObject; exports.copySmartObject = _chunkPA3IMPPScjs.copySmartObject; exports.cornersFromMatrix = _chunkPA3IMPPScjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkPA3IMPPScjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkPA3IMPPScjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkJCXMJUQOcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkJCXMJUQOcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkJCXMJUQOcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkPA3IMPPScjs.createSelectionMask; exports.createShapeLayer = _chunkPA3IMPPScjs.createShapeLayer; exports.createTypeLayer = _chunkPA3IMPPScjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkJCXMJUQOcjs.cssFont; exports.cssFontFamily = _chunkJCXMJUQOcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkPA3IMPPScjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkPA3IMPPScjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkPA3IMPPScjs.decodeLayerChannel; exports.decodeLayerMask = _chunkPA3IMPPScjs.decodeLayerMask; exports.decodeMergedImage = _chunkPA3IMPPScjs.decodeMergedImage; exports.decodePlanes = _chunkPA3IMPPScjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkPA3IMPPScjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkPA3IMPPScjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkPA3IMPPScjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkPA3IMPPScjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkPA3IMPPScjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkPA3IMPPScjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkPA3IMPPScjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkPA3IMPPScjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkPA3IMPPScjs.deserializeEffects; exports.deserializeLayer = _chunkPA3IMPPScjs.deserializeLayer; exports.deserializeLayers = _chunkPA3IMPPScjs.deserializeLayers; exports.deserializePatterns = _chunkPA3IMPPScjs.deserializePatterns; exports.deserializeSelection = _chunkPA3IMPPScjs.deserializeSelection; exports.developFilter = _chunkPA3IMPPScjs.developFilter; exports.developFromAdjustments = _chunkPA3IMPPScjs.developFromAdjustments; exports.developTarget = _chunkPA3IMPPScjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkPA3IMPPScjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkPA3IMPPScjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkJCXMJUQOcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkPA3IMPPScjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkPA3IMPPScjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkPA3IMPPScjs.encodeRle; exports.encodeSelectionRle = _chunkPA3IMPPScjs.encodeSelectionRle; exports.encodeSurface = _chunkPA3IMPPScjs.encodeSurface; exports.evalWarpMesh = _chunkJCXMJUQOcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkPA3IMPPScjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkPA3IMPPScjs.expandCoverage; exports.exportPsd = _chunkPA3IMPPScjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkPA3IMPPScjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkPA3IMPPScjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkJCXMJUQOcjs.fitParagraphRuns; exports.fitRuns = _chunkJCXMJUQOcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkPA3IMPPScjs.flattenPath; exports.flipCorners = _chunkPA3IMPPScjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.fontOf = _chunkJCXMJUQOcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkPA3IMPPScjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkPA3IMPPScjs.geometryHomography; exports.getAnnotationBounds = _chunkPA3IMPPScjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkPA3IMPPScjs.getCropCursor; exports.getRotatedSize = _chunkPA3IMPPScjs.getRotatedSize; exports.getViewportMetrics = _chunkPA3IMPPScjs.getViewportMetrics; exports.getViewportProjection = _chunkPA3IMPPScjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkPA3IMPPScjs.greyMorphology; exports.groupLayers = _chunkPA3IMPPScjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkPA3IMPPScjs.hasResampledLegacyMask; exports.hasSurface = _chunkPA3IMPPScjs.hasSurface; exports.hasWarp = _chunkPA3IMPPScjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkPA3IMPPScjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkPA3IMPPScjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkPA3IMPPScjs.hitTestAnnotation; exports.hitTestCrop = _chunkPA3IMPPScjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkPA3IMPPScjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkPA3IMPPScjs.hueRangeTables; exports.hueRangeWeight = _chunkPA3IMPPScjs.hueRangeWeight; exports.hueSaturation = _chunkPA3IMPPScjs.hueSaturation; exports.identityCurve = _chunkPA3IMPPScjs.identityCurve; exports.identityLevels = _chunkPA3IMPPScjs.identityLevels; exports.identityTransform = _chunkPA3IMPPScjs.identityTransform; exports.identityWarpMesh = _chunkJCXMJUQOcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkPA3IMPPScjs.imageToCanvasPoint; exports.importPsd = _chunkPA3IMPPScjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkPA3IMPPScjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkPA3IMPPScjs.invertMatrix3; exports.invertSelection = _chunkPA3IMPPScjs.invertSelection; exports.isActiveFilter = _chunkPA3IMPPScjs.isActiveFilter; exports.isAdjustmentKind = _chunkPA3IMPPScjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkPA3IMPPScjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkPA3IMPPScjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkPA3IMPPScjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkPA3IMPPScjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkPA3IMPPScjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkPA3IMPPScjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkPA3IMPPScjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkPA3IMPPScjs.isSelectionEmpty; exports.isSelectionMode = _chunkPA3IMPPScjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkPA3IMPPScjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkPA3IMPPScjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkPA3IMPPScjs.isTransformAnchor; exports.isValidWarp = _chunkPA3IMPPScjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkPA3IMPPScjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkPA3IMPPScjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkPA3IMPPScjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkPA3IMPPScjs.layerMaskFromSelection; exports.layerMaskKey = _chunkPA3IMPPScjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkPA3IMPPScjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerTree = _chunkPA3IMPPScjs.layerTree; exports.layerTypeLabel = _chunkPA3IMPPScjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkPA3IMPPScjs.layersFromLegacy; exports.layoutText = _chunkJCXMJUQOcjs.layoutText; exports.legacyAdjustmentLayer = _chunkPA3IMPPScjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkPA3IMPPScjs.legacyMaskOf; exports.legacyView = _chunkPA3IMPPScjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkPA3IMPPScjs.levelsValue; exports.linearSrgbToXy = _chunkPA3IMPPScjs.linearSrgbToXy; exports.linearToSrgb = _chunkPA3IMPPScjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkPA3IMPPScjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkPA3IMPPScjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkPA3IMPPScjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkPA3IMPPScjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkPA3IMPPScjs.matrixFromCorners; exports.matrixFromParams = _chunkPA3IMPPScjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkPA3IMPPScjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkPA3IMPPScjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkPA3IMPPScjs.moveLayer; exports.moveSmartFilter = _chunkPA3IMPPScjs.moveSmartFilter; exports.mulMatrix3 = _chunkPA3IMPPScjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkPA3IMPPScjs.neutralHueRange; exports.newContentsId = _chunkPA3IMPPScjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkPA3IMPPScjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkPA3IMPPScjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkPA3IMPPScjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkPA3IMPPScjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkPA3IMPPScjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkPA3IMPPScjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkPA3IMPPScjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkPA3IMPPScjs.normalizePlacement; exports.normalizeProcessVersion = _chunkPA3IMPPScjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkPA3IMPPScjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkPA3IMPPScjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkPA3IMPPScjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkPA3IMPPScjs.normalizeSubpaths; exports.normalizeText = _chunkPA3IMPPScjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkPA3IMPPScjs.offsetLayer; exports.offsetShape = _chunkPA3IMPPScjs.offsetShape; exports.offsetSmartObject = _chunkPA3IMPPScjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkJCXMJUQOcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkPA3IMPPScjs.parseAdjustmentBlock; exports.parseBlend = _chunkPA3IMPPScjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkPA3IMPPScjs.parseLfx2; exports.parseLrfx = _chunkPA3IMPPScjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkPA3IMPPScjs.parsePatternBlock; exports.parseSelectionMode = _chunkPA3IMPPScjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkPA3IMPPScjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkPA3IMPPScjs.patchParagraphStyle; exports.patchTextStyle = _chunkPA3IMPPScjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkPA3IMPPScjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkPA3IMPPScjs.pixelLayerBounds; exports.pixelLayers = _chunkPA3IMPPScjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkPA3IMPPScjs.placeContents; exports.placeLayer = _chunkPA3IMPPScjs.placeLayer; exports.placementAt = _chunkPA3IMPPScjs.placementAt; exports.placementBounds = _chunkPA3IMPPScjs.placementBounds; exports.placementGeometry = _chunkPA3IMPPScjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkPA3IMPPScjs.posterizeValue; exports.presetWarp = _chunkPA3IMPPScjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkPA3IMPPScjs.projectImagePoint; exports.projectImageRect = _chunkPA3IMPPScjs.projectImageRect; exports.projectMaskCoverage = _chunkPA3IMPPScjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkPA3IMPPScjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkPA3IMPPScjs.psdToLayers; exports.pullWarpMesh = _chunkJCXMJUQOcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkPA3IMPPScjs.rangeLightness; exports.rasterContents = _chunkPA3IMPPScjs.rasterContents; exports.rasterMaskFromLegacy = _chunkPA3IMPPScjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkPA3IMPPScjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkPA3IMPPScjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkPA3IMPPScjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkPA3IMPPScjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkPA3IMPPScjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkPA3IMPPScjs.removeLayer; exports.removeLayerEffect = _chunkPA3IMPPScjs.removeLayerEffect; exports.removeLayerFilter = _chunkPA3IMPPScjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkPA3IMPPScjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkPA3IMPPScjs.renderShape; exports.renderShapeRect = _chunkPA3IMPPScjs.renderShapeRect; exports.renderSmartObject = _chunkPA3IMPPScjs.renderSmartObject; exports.renderText = _chunkPA3IMPPScjs.renderText; exports.replaceContents = _chunkPA3IMPPScjs.replaceContents; exports.replaceTextRange = _chunkPA3IMPPScjs.replaceTextRange; exports.requireLayer = _chunkPA3IMPPScjs.requireLayer; exports.requireOperation = _chunkPA3IMPPScjs.requireOperation; exports.requireShapeLayer = _chunkPA3IMPPScjs.requireShapeLayer; exports.requireSmartObject = _chunkPA3IMPPScjs.requireSmartObject; exports.requireTypeLayer = _chunkPA3IMPPScjs.requireTypeLayer; exports.requireUnlocked = _chunkPA3IMPPScjs.requireUnlocked; exports.rerender = _chunkPA3IMPPScjs.rerender; exports.rerenderShape = _chunkPA3IMPPScjs.rerenderShape; exports.rerenderText = _chunkPA3IMPPScjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkPA3IMPPScjs.resizeSelection; exports.resizeWarpMesh = _chunkJCXMJUQOcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkPA3IMPPScjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkJCXMJUQOcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkPA3IMPPScjs.rgbToGray; exports.rgbToHsl = _chunkPA3IMPPScjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkPA3IMPPScjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkPA3IMPPScjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkPA3IMPPScjs.sampleLut; exports.sampleToneLut = _chunkPA3IMPPScjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.selectionArea = _chunkPA3IMPPScjs.selectionArea; exports.selectionFromCoverage = _chunkPA3IMPPScjs.selectionFromCoverage; exports.selectionFromPixels = _chunkPA3IMPPScjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkPA3IMPPScjs.selectionToCoverage; exports.selectionToPixels = _chunkPA3IMPPScjs.selectionToPixels; exports.selectionValueAt = _chunkPA3IMPPScjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkPA3IMPPScjs.serializeContents; exports.serializeEffects = _chunkPA3IMPPScjs.serializeEffects; exports.serializeLayer = _chunkPA3IMPPScjs.serializeLayer; exports.serializeLayers = _chunkPA3IMPPScjs.serializeLayers; exports.serializeLayersExternal = _chunkPA3IMPPScjs.serializeLayersExternal; exports.serializePatterns = _chunkPA3IMPPScjs.serializePatterns; exports.serializeSelection = _chunkPA3IMPPScjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkPA3IMPPScjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkPA3IMPPScjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkPA3IMPPScjs.setLayerMask; exports.setLayerProperties = _chunkPA3IMPPScjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkPA3IMPPScjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkPA3IMPPScjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkPA3IMPPScjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkPA3IMPPScjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkPA3IMPPScjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkPA3IMPPScjs.shapeGeometryBounds; exports.shapeLayers = _chunkPA3IMPPScjs.shapeLayers; exports.shapeOutline = _chunkPA3IMPPScjs.shapeOutline; exports.shapeRenderClip = _chunkPA3IMPPScjs.shapeRenderClip; exports.shiftCoverage = _chunkPA3IMPPScjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkPA3IMPPScjs.smartObjectLayers; exports.smoothCoverage = _chunkPA3IMPPScjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkJCXMJUQOcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkPA3IMPPScjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkJCXMJUQOcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkPA3IMPPScjs.tempTintToXy; exports.temperatureToKelvin = _chunkPA3IMPPScjs.temperatureToKelvin; exports.textIndexAt = _chunkJCXMJUQOcjs.textIndexAt; exports.textMatrix = _chunkPA3IMPPScjs.textMatrix; exports.textOutlines = _chunkPA3IMPPScjs.textOutlines; exports.textRange = _chunkPA3IMPPScjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkPA3IMPPScjs.toTextSpace; exports.toneCurve = _chunkPA3IMPPScjs.toneCurve; exports.toneLuts = _chunkPA3IMPPScjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkPA3IMPPScjs.transformHomography; exports.transformMap = _chunkPA3IMPPScjs.transformMap; exports.transformShapeComponents = _chunkPA3IMPPScjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkPA3IMPPScjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkPA3IMPPScjs.transformedBox; exports.transformedPoint = _chunkPA3IMPPScjs.transformedPoint; exports.translateLayer = _chunkPA3IMPPScjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkPA3IMPPScjs.typeAsPixelLayer; exports.typeFrame = _chunkPA3IMPPScjs.typeFrame; exports.typeFromAnnotation = _chunkPA3IMPPScjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkPA3IMPPScjs.typeLayerName; exports.ungroupLayer = _chunkPA3IMPPScjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkPA3IMPPScjs.unionRect; exports.unprojectCanvasPoint = _chunkPA3IMPPScjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkPA3IMPPScjs.updateLayerEffect; exports.updateLayerFilter = _chunkPA3IMPPScjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkPA3IMPPScjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkPA3IMPPScjs.updateShapeLayer; exports.updateSmartFilter = _chunkPA3IMPPScjs.updateSmartFilter; exports.updateTypeLayer = _chunkPA3IMPPScjs.updateTypeLayer; exports.userErrorMessage = _chunkPA3IMPPScjs.userErrorMessage; exports.uvToXy = _chunkPA3IMPPScjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkPA3IMPPScjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkPA3IMPPScjs.vibranceLinear; exports.vibrancePixel = _chunkPA3IMPPScjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkJCXMJUQOcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkJCXMJUQOcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkJCXMJUQOcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkJCXMJUQOcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkPA3IMPPScjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkPA3IMPPScjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkPA3IMPPScjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkPA3IMPPScjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkPA3IMPPScjs.withNewIds; exports.writeAdjustmentBlock = _chunkPA3IMPPScjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkPA3IMPPScjs.writeLfx2; exports.writePatternBlock = _chunkPA3IMPPScjs.writePatternBlock; exports.writePsd = _chunkPA3IMPPScjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkPA3IMPPScjs.xyToTempTint; exports.xyToUv = _chunkPA3IMPPScjs.xyToUv;
16606
+ exports.ADJUSTMENT_KEYS = _chunkOVYQAYGHcjs.ADJUSTMENT_KEYS; exports.ADJUSTMENT_KINDS = _chunkOVYQAYGHcjs.ADJUSTMENT_KINDS; exports.ADJUSTMENT_LAYER_CONTROLS = ADJUSTMENT_LAYER_CONTROLS; exports.ADJUSTMENT_LAYER_OPACITY_CONTROL = ADJUSTMENT_LAYER_OPACITY_CONTROL; exports.ADJUSTMENT_LUT_SIZE = _chunkOVYQAYGHcjs.ADJUSTMENT_LUT_SIZE; exports.ANCHOR_FRACTION = _chunkOVYQAYGHcjs.ANCHOR_FRACTION; exports.AS_SHOT_KELVIN = _chunkOVYQAYGHcjs.AS_SHOT_KELVIN; exports.BACKGROUND_LAYER_ID = _chunkOVYQAYGHcjs.BACKGROUND_LAYER_ID; exports.BACKGROUND_LAYER_NAME = _chunkOVYQAYGHcjs.BACKGROUND_LAYER_NAME; exports.BIT_DEPTHS = _chunkCWM3CUUXcjs.BIT_DEPTHS; exports.BIT_DEPTH_OPTIONS = BIT_DEPTH_OPTIONS; exports.BLEND_MODES = _chunkCWM3CUUXcjs.BLEND_MODES; exports.BLUR_FILTER_ID = _chunkOVYQAYGHcjs.BLUR_FILTER_ID; exports.BODY_SCATTER = _chunkV7GWZIZKcjs.BODY_SCATTER; exports.BRUSHSTROKE_MAX_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MAX_SCALE; exports.BRUSHSTROKE_MIN_SCALE = _chunkYQGCPL5Xcjs.BRUSHSTROKE_MIN_SCALE; exports.BRUSH_OPTION_CONTROLS = BRUSH_OPTION_CONTROLS; exports.BUILTIN_PROFILES = _chunkBROJYMWUcjs.BUILTIN_PROFILES; exports.BrushstrokeCache = _chunkEBDCRTZIcjs.BrushstrokeCache; exports.CANVAS_SIZE_PRESETS = CANVAS_SIZE_PRESETS; exports.CLONE_TRANSFORM_CONTROLS = CLONE_TRANSFORM_CONTROLS; exports.COLOR_MODE_OPTIONS = COLOR_MODE_OPTIONS; exports.CoverageMap = _chunkEBDCRTZIcjs.CoverageMap; exports.D50 = _chunkOVYQAYGHcjs.D50; exports.D65 = _chunkOVYQAYGHcjs.D65; exports.DEFAULT_ADJUSTMENTS = DEFAULT_ADJUSTMENTS; exports.DEFAULT_AUTO_LEADING = _chunkEGZM52EOcjs.DEFAULT_AUTO_LEADING; exports.DEFAULT_BLENDER = _chunkEBDCRTZIcjs.DEFAULT_BLENDER; exports.DEFAULT_BRUSH = _chunkEBDCRTZIcjs.DEFAULT_BRUSH; exports.DEFAULT_CANVAS_VIEWPORT = DEFAULT_CANVAS_VIEWPORT; exports.DEFAULT_DEPTH_MASK = DEFAULT_DEPTH_MASK; exports.DEFAULT_FLOW = _chunkV7GWZIZKcjs.DEFAULT_FLOW; exports.DEFAULT_GLOBAL_LIGHT = _chunkHGTDMKNEcjs.DEFAULT_GLOBAL_LIGHT; exports.DEFAULT_MITER_LIMIT = _chunkOVYQAYGHcjs.DEFAULT_MITER_LIMIT; exports.DEFAULT_MIXER = _chunkEBDCRTZIcjs.DEFAULT_MIXER; exports.DEFAULT_PAINT_GRADIENT = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT; exports.DEFAULT_PAINT_GRADIENT_MAPPING = _chunkEBDCRTZIcjs.DEFAULT_PAINT_GRADIENT_MAPPING; exports.DEFAULT_PROOF = DEFAULT_PROOF; exports.DEFAULT_REFINE_EDGE_PARAMS = DEFAULT_REFINE_EDGE_PARAMS; exports.DEFAULT_RETOUCH = _chunk7NW46N7Icjs.DEFAULT_RETOUCH; exports.DEFAULT_SELECTION_TOOL_OPTIONS = DEFAULT_SELECTION_TOOL_OPTIONS; exports.DEFAULT_SHAPE_TOOL_OPTIONS = DEFAULT_SHAPE_TOOL_OPTIONS; exports.DEFAULT_SMUDGE = _chunkEBDCRTZIcjs.DEFAULT_SMUDGE; exports.DEFAULT_TEXT_STYLE = _chunkEGZM52EOcjs.DEFAULT_TEXT_STYLE; exports.DEFAULT_TRANSFORM = DEFAULT_TRANSFORM; exports.DEFAULT_TYPE_TOOL_OPTIONS = DEFAULT_TYPE_TOOL_OPTIONS; exports.DEFAULT_WET_PAPER = _chunkV7GWZIZKcjs.DEFAULT_WET_PAPER; exports.DEFAULT_WET_PARAMS = _chunkV7GWZIZKcjs.DEFAULT_WET_PARAMS; exports.DEPTH_MASK_CONTROLS = DEPTH_MASK_CONTROLS; exports.DEVELOP_FILTER_ID = _chunkOVYQAYGHcjs.DEVELOP_FILTER_ID; exports.DIRECT_GAUSSIAN_MAX_SIGMA = _chunkHGTDMKNEcjs.DIRECT_GAUSSIAN_MAX_SIGMA; exports.DRY_EPS = _chunkV7GWZIZKcjs.DRY_EPS; exports.DabWalker = _chunkEBDCRTZIcjs.DabWalker; exports.EMPTY_DISTANCE = _chunkOVYQAYGHcjs.EMPTY_DISTANCE; exports.EMPTY_MIXER_LOAD = _chunkEBDCRTZIcjs.EMPTY_MIXER_LOAD; exports.EX = _chunkV7GWZIZKcjs.EX; exports.EY = _chunkV7GWZIZKcjs.EY; exports.FLAG_ALIVE = _chunkV7GWZIZKcjs.FLAG_ALIVE; exports.FLAG_BOTTOM = _chunkV7GWZIZKcjs.FLAG_BOTTOM; exports.FLAG_LEFT = _chunkV7GWZIZKcjs.FLAG_LEFT; exports.FLAG_RIGHT = _chunkV7GWZIZKcjs.FLAG_RIGHT; exports.FLAG_TOP = _chunkV7GWZIZKcjs.FLAG_TOP; exports.FLAG_WET = _chunkV7GWZIZKcjs.FLAG_WET; exports.FLAT = _chunkV7GWZIZKcjs.FLAT; exports.FREE_INTERVAL = _chunkV7GWZIZKcjs.FREE_INTERVAL; exports.FREE_TRANSFORM_CONTENTS = FREE_TRANSFORM_CONTENTS; exports.FREE_TRANSFORM_FIELDS = FREE_TRANSFORM_FIELDS; exports.FREE_TRANSFORM_MODES = _chunkOVYQAYGHcjs.FREE_TRANSFORM_MODES; exports.FREE_TRANSFORM_MODE_OPTIONS = FREE_TRANSFORM_MODE_OPTIONS; exports.FreeTransformSession = FreeTransformSession; exports.FreeTransformTool = FreeTransformTool; exports.GRAIN_PATTERNS = _chunkEBDCRTZIcjs.GRAIN_PATTERNS; exports.GRAIN_TILE = _chunkEBDCRTZIcjs.GRAIN_TILE; exports.GUIDED_FILTER_EPS = GUIDED_FILTER_EPS; exports.HIDE = _chunkV7GWZIZKcjs.HIDE; exports.HISTOGRAM_BINS = HISTOGRAM_BINS; exports.HUE_RANGE_LABELS = _chunkOVYQAYGHcjs.HUE_RANGE_LABELS; exports.IDENTITY_CLONE_TRANSFORM = _chunk7NW46N7Icjs.IDENTITY_CLONE_TRANSFORM; exports.IDENTITY_MATRIX3 = _chunkOVYQAYGHcjs.IDENTITY_MATRIX3; exports.IMAGE_ADJUSTMENT_CONTROLS = IMAGE_ADJUSTMENT_CONTROLS; exports.IMAGE_CROP_PRESETS = IMAGE_CROP_PRESETS; exports.IMAGE_EDITOR_SCHEMA_VERSION = IMAGE_EDITOR_SCHEMA_VERSION; exports.IMAGE_EDITOR_STATE_VERSION = IMAGE_EDITOR_STATE_VERSION; exports.IMAGE_EFFECT_PLACES = IMAGE_EFFECT_PLACES; exports.IMAGE_FILTER_PRESETS = IMAGE_FILTER_PRESETS; exports.IMAGE_PLAYBACK_KIND = IMAGE_PLAYBACK_KIND; exports.INTENTS = _chunkBROJYMWUcjs.INTENTS; exports.INTENT_OPTIONS = INTENT_OPTIONS; exports.INTERPOLATIONS = _chunkHGTDMKNEcjs.INTERPOLATIONS; exports.ImageEditorController = ImageEditorController; exports.ImageEditorRenderer = ImageEditorRenderer; exports.ImageEffectsEngine = ImageEffectsEngine; exports.LATEST_PROCESS_VERSION = _chunkOVYQAYGHcjs.LATEST_PROCESS_VERSION; exports.LAYERED_SCHEMA_VERSION = _chunkOVYQAYGHcjs.LAYERED_SCHEMA_VERSION; exports.LAYER_EFFECT_KINDS = _chunkHGTDMKNEcjs.LAYER_EFFECT_KINDS; exports.LAYER_EFFECT_MENU = LAYER_EFFECT_MENU; exports.LEGACY_PROCESS_VERSION = _chunkOVYQAYGHcjs.LEGACY_PROCESS_VERSION; exports.LIVE_SHAPE_KINDS = _chunkOVYQAYGHcjs.LIVE_SHAPE_KINDS; exports.LUMA_709 = _chunkOVYQAYGHcjs.LUMA_709; exports.LayerCompositor = _chunkOVYQAYGHcjs.LayerCompositor; exports.LayerEffectError = _chunkHGTDMKNEcjs.LayerEffectError; exports.LayerOperationError = _chunkOVYQAYGHcjs.LayerOperationError; exports.MAX_BATCH = _chunkV7GWZIZKcjs.MAX_BATCH; exports.MAX_BRUSH_SIZE = _chunkEBDCRTZIcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_BACKING_SIDE = MAX_CANVAS_BACKING_SIDE; exports.MAX_EFFECT_REACH = _chunkHGTDMKNEcjs.MAX_EFFECT_REACH; exports.MAX_KELVIN = _chunkOVYQAYGHcjs.MAX_KELVIN; exports.MAX_TILT_ACCEL = _chunkV7GWZIZKcjs.MAX_TILT_ACCEL; exports.MAX_TRANSFORM_PIXELS = _chunkHGTDMKNEcjs.MAX_TRANSFORM_PIXELS; exports.MAX_WET_LANES = _chunkV7GWZIZKcjs.MAX_WET_LANES; exports.MAX_WET_SLOTS = _chunkV7GWZIZKcjs.MAX_WET_SLOTS; exports.MIN_KELVIN = _chunkOVYQAYGHcjs.MIN_KELVIN; exports.MIRED_PER_TEMPERATURE_UNIT = _chunkOVYQAYGHcjs.MIRED_PER_TEMPERATURE_UNIT; exports.MIXER_DRAIN = _chunkEBDCRTZIcjs.MIXER_DRAIN; exports.MIXER_MIXING_OPTIONS = MIXER_MIXING_OPTIONS; exports.MIXER_OPTION_CONTROLS = MIXER_OPTION_CONTROLS; exports.MIXER_PICKUP_RATE = _chunkEBDCRTZIcjs.MIXER_PICKUP_RATE; exports.MIXING_MODELS = _chunkEBDCRTZIcjs.MIXING_MODELS; exports.MixerStroke = _chunkEBDCRTZIcjs.MixerStroke; exports.OPP = _chunkV7GWZIZKcjs.OPP; exports.PAINTERLY_BLEND_MODES = _chunkCWM3CUUXcjs.PAINTERLY_BLEND_MODES; exports.PAINT_COLOR_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_COLOR_JSON_SCHEMA; exports.PAINT_GRADIENT_FULL_SPEED = _chunkEBDCRTZIcjs.PAINT_GRADIENT_FULL_SPEED; exports.PAINT_GRADIENT_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_GRADIENT_JSON_SCHEMA; exports.PAINT_GRADIENT_KIT = _chunkEBDCRTZIcjs.PAINT_GRADIENT_KIT; exports.PAINT_GRADIENT_MAPPINGS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPINGS; exports.PAINT_GRADIENT_MAPPING_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_MAPPING_LABELS; exports.PAINT_GRADIENT_PRESETS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_PRESETS; exports.PAINT_GRADIENT_REPEATS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEATS; exports.PAINT_GRADIENT_REPEAT_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_REPEAT_LABELS; exports.PAINT_GRADIENT_SPACES = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACES; exports.PAINT_GRADIENT_SPACE_LABELS = _chunkEBDCRTZIcjs.PAINT_GRADIENT_SPACE_LABELS; exports.PAINT_SOURCE_JSON_SCHEMA = _chunkEBDCRTZIcjs.PAINT_SOURCE_JSON_SCHEMA; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_CAPACITY = _chunkV7GWZIZKcjs.PAPER_CAPACITY; exports.PARAGRAPH_STYLE_FIELDS = _chunkOVYQAYGHcjs.PARAGRAPH_STYLE_FIELDS; exports.PARAM = _chunkV7GWZIZKcjs.PARAM; exports.PARAM_FLOATS = _chunkV7GWZIZKcjs.PARAM_FLOATS; exports.PATTERN_BLOCK_KEYS = _chunkOVYQAYGHcjs.PATTERN_BLOCK_KEYS; exports.PIGMENT_BANDS = _chunkCWM3CUUXcjs.PIGMENT_BANDS; exports.PIGMENT_CHANNELS = _chunkV7GWZIZKcjs.PIGMENT_CHANNELS; exports.PIGMENT_LAMBDA_MIN = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_MIN; exports.PIGMENT_LAMBDA_STEP = _chunkCWM3CUUXcjs.PIGMENT_LAMBDA_STEP; exports.PIGMENT_UNIT = _chunkV7GWZIZKcjs.PIGMENT_UNIT; exports.PIGMENT_WAVELENGTHS = _chunkCWM3CUUXcjs.PIGMENT_WAVELENGTHS; exports.PLANE = _chunkV7GWZIZKcjs.PLANE; exports.PLANE_BYTES = _chunkV7GWZIZKcjs.PLANE_BYTES; exports.PROOF_PROFILE_OPTIONS = PROOF_PROFILE_OPTIONS; exports.PSD_BLEND_KEYS = _chunkOVYQAYGHcjs.PSD_BLEND_KEYS; exports.PSD_FILE_ACCEPT = PSD_FILE_ACCEPT; exports.P_D0 = _chunkV7GWZIZKcjs.P_D0; exports.P_EDGE = _chunkV7GWZIZKcjs.P_EDGE; exports.P_FX = _chunkV7GWZIZKcjs.P_FX; exports.P_FY = _chunkV7GWZIZKcjs.P_FY; exports.P_H = _chunkV7GWZIZKcjs.P_H; exports.P_P0 = _chunkV7GWZIZKcjs.P_P0; exports.P_RHO = _chunkV7GWZIZKcjs.P_RHO; exports.P_SW = _chunkV7GWZIZKcjs.P_SW; exports.P_UX = _chunkV7GWZIZKcjs.P_UX; exports.P_UY = _chunkV7GWZIZKcjs.P_UY; exports.PaintExchange = _chunkEBDCRTZIcjs.PaintExchange; exports.PaintGesture = PaintGesture; exports.PaintGradientSampler = _chunkEBDCRTZIcjs.PaintGradientSampler; exports.PaintSourceError = _chunkEBDCRTZIcjs.PaintSourceError; exports.PaintStrokeSession = PaintStrokeSession; exports.PaperGrain = _chunkEBDCRTZIcjs.PaperGrain; exports.PatternPlacement = _chunkHGTDMKNEcjs.PatternPlacement; exports.PatternTile = _chunkHGTDMKNEcjs.PatternTile; exports.PsdError = _chunkOVYQAYGHcjs.PsdError; exports.REFINE_EDGE_CONTROLS = REFINE_EDGE_CONTROLS; exports.RETOUCH_CHOICES = RETOUCH_CHOICES; exports.RETOUCH_OPTION_CONTROLS = RETOUCH_OPTION_CONTROLS; exports.RETOUCH_SAMPLES = _chunk7NW46N7Icjs.RETOUCH_SAMPLES; exports.RETOUCH_TOGGLES = RETOUCH_TOGGLES; exports.RETOUCH_TOOLS = RETOUCH_TOOLS; exports.RegionPixelSource = _chunk7NW46N7Icjs.RegionPixelSource; exports.RetouchDabStroke = _chunk7NW46N7Icjs.RetouchDabStroke; exports.SELECTION_MODES = _chunkOVYQAYGHcjs.SELECTION_MODES; exports.SELECTION_MODE_LABELS = SELECTION_MODE_LABELS; exports.SELECTION_MODIFY_OPS = _chunkOVYQAYGHcjs.SELECTION_MODIFY_OPS; exports.SELECTION_TOOLS = SELECTION_TOOLS; exports.SET_PLANES = _chunkV7GWZIZKcjs.SET_PLANES; exports.SHADOW_AMBIENT = _chunkCWM3CUUXcjs.SHADOW_AMBIENT; exports.SHAPE_KIND_LABELS = SHAPE_KIND_LABELS; exports.SHAPE_OPERATIONS = _chunkOVYQAYGHcjs.SHAPE_OPERATIONS; exports.SHAPE_RENDER_MARGIN = _chunkOVYQAYGHcjs.SHAPE_RENDER_MARGIN; exports.SLOT_BYTES = _chunkV7GWZIZKcjs.SLOT_BYTES; exports.SLOT_PLANES = _chunkV7GWZIZKcjs.SLOT_PLANES; exports.SLOT_SIDE = _chunkV7GWZIZKcjs.SLOT_SIDE; exports.SMART_RENDER_MARGIN = _chunkOVYQAYGHcjs.SMART_RENDER_MARGIN; exports.SPOT_HEAL_TYPES = _chunk7NW46N7Icjs.SPOT_HEAL_TYPES; exports.SRGB_TO_LINEAR = _chunkV7GWZIZKcjs.SRGB_TO_LINEAR; exports.STRIP = _chunkV7GWZIZKcjs.STRIP; exports.SUPPORTED_ADJUSTMENT_KEYS = _chunkOVYQAYGHcjs.SUPPORTED_ADJUSTMENT_KEYS; exports.SelectionGesture = SelectionGesture; exports.ShapeDrawGesture = ShapeDrawGesture; exports.SmudgeTip = _chunkEBDCRTZIcjs.SmudgeTip; exports.StrokeCoverage = _chunkEBDCRTZIcjs.StrokeCoverage; exports.SurfaceDraft = _chunkCWM3CUUXcjs.SurfaceDraft; exports.TEXT_ALIGNS = _chunkOVYQAYGHcjs.TEXT_ALIGNS; exports.TEXT_RENDER_MARGIN = _chunkOVYQAYGHcjs.TEXT_RENDER_MARGIN; exports.TEXT_STYLE_FIELDS = _chunkOVYQAYGHcjs.TEXT_STYLE_FIELDS; exports.TILE = _chunkCWM3CUUXcjs.TILE; exports.TILE_SHIFT = _chunkCWM3CUUXcjs.TILE_SHIFT; exports.TINT_SCALE = _chunkOVYQAYGHcjs.TINT_SCALE; exports.TIP_GRADIENT_STEPS = _chunkEBDCRTZIcjs.TIP_GRADIENT_STEPS; exports.TONE_LUT_SIZE = _chunkOVYQAYGHcjs.TONE_LUT_SIZE; exports.TONE_RANGES = _chunk7NW46N7Icjs.TONE_RANGES; exports.TONE_RANGE_PRESETS = TONE_RANGE_PRESETS; exports.TRANSFORM_ANCHORS = _chunkOVYQAYGHcjs.TRANSFORM_ANCHORS; exports.TextEditSession = TextEditSession; exports.TileMedium = _chunkEBDCRTZIcjs.TileMedium; exports.TilePixelSource = _chunk7NW46N7Icjs.TilePixelSource; exports.TileableNoise = _chunkEBDCRTZIcjs.TileableNoise; exports.TiledSurface = _chunkCWM3CUUXcjs.TiledSurface; exports.TransformTooLargeError = _chunkHGTDMKNEcjs.TransformTooLargeError; exports.TransformedPixelSource = _chunk7NW46N7Icjs.TransformedPixelSource; exports.TypeToolGesture = TypeToolGesture; exports.U_MAX = _chunkV7GWZIZKcjs.U_MAX; exports.VIBRANCE_GREY = _chunkOVYQAYGHcjs.VIBRANCE_GREY; exports.W9 = _chunkV7GWZIZKcjs.W9; exports.WARP_GRID_OPTIONS = WARP_GRID_OPTIONS; exports.WARP_STYLES = _chunkEGZM52EOcjs.WARP_STYLES; exports.WARP_STYLE_LABELS = _chunkEGZM52EOcjs.WARP_STYLE_LABELS; exports.WARP_STYLE_OPTIONS = WARP_STYLE_OPTIONS; exports.WET_FLOW_KINDS = _chunkV7GWZIZKcjs.WET_FLOW_KINDS; exports.WET_PARAM_KEYS = _chunkV7GWZIZKcjs.WET_PARAM_KEYS; exports.WET_TILE = _chunkV7GWZIZKcjs.WET_TILE; exports.WGSL_HALO = _chunkV7GWZIZKcjs.WGSL_HALO; exports.WGSL_SHADE = _chunkV7GWZIZKcjs.WGSL_SHADE; exports.WGSL_STEP = _chunkV7GWZIZKcjs.WGSL_STEP; exports.WORKING_SPACE_OPTIONS = WORKING_SPACE_OPTIONS; exports.WetGpuEngine = _chunkV7GWZIZKcjs.WetGpuEngine; exports.WetMedium = _chunkV7GWZIZKcjs.WetMedium; exports.WetWorkerPool = _chunkV7GWZIZKcjs.WetWorkerPool; exports.WetWorld = _chunkV7GWZIZKcjs.WetWorld; exports.WetWorldError = _chunkV7GWZIZKcjs.WetWorldError; exports.XYZ_D50_TO_SRGB = _chunkOVYQAYGHcjs.XYZ_D50_TO_SRGB; exports.ZlibError = _chunkXFM3OCHUcjs.ZlibError; exports.activeAdjustmentLayers = _chunkOVYQAYGHcjs.activeAdjustmentLayers; exports.activeEffectSmartFilters = _chunkOVYQAYGHcjs.activeEffectSmartFilters; exports.activeLayerAfterRemoval = _chunkOVYQAYGHcjs.activeLayerAfterRemoval; exports.activeSmartFilters = _chunkOVYQAYGHcjs.activeSmartFilters; exports.addLayerEffect = _chunkOVYQAYGHcjs.addLayerEffect; exports.addLayerFilter = _chunkOVYQAYGHcjs.addLayerFilter; exports.addLayerOfKind = addLayerOfKind; exports.addPaintGradientStop = _chunkEBDCRTZIcjs.addPaintGradientStop; exports.addSmartFilter = _chunkOVYQAYGHcjs.addSmartFilter; exports.addToHistogram = addToHistogram; exports.adjustmentKindLabel = _chunkOVYQAYGHcjs.adjustmentKindLabel; exports.adjustmentLayersKey = _chunkOVYQAYGHcjs.adjustmentLayersKey; exports.adjustmentNodeAsLayer = _chunkOVYQAYGHcjs.adjustmentNodeAsLayer; exports.adjustmentNodeFromLegacy = _chunkOVYQAYGHcjs.adjustmentNodeFromLegacy; exports.adler32 = _chunkXFM3OCHUcjs.adler32; exports.agentDragDraft = agentDragDraft; exports.anchorPoint = _chunkOVYQAYGHcjs.anchorPoint; exports.annotationBlend = _chunkOVYQAYGHcjs.annotationBlend; exports.annotationLayerFor = _chunkOVYQAYGHcjs.annotationLayerFor; exports.annotationLayerName = _chunkOVYQAYGHcjs.annotationLayerName; exports.annotationOfLayer = _chunkOVYQAYGHcjs.annotationOfLayer; exports.annotationOfShape = _chunkOVYQAYGHcjs.annotationOfShape; exports.annotationOfType = _chunkOVYQAYGHcjs.annotationOfType; exports.applyAdjustmentLayers = _chunkOVYQAYGHcjs.applyAdjustmentLayers; exports.applyAdjustmentLayersFloat = _chunkOVYQAYGHcjs.applyAdjustmentLayersFloat; exports.applyAdjustments = _chunkOVYQAYGHcjs.applyAdjustments; exports.applyBoxBlur = _chunkOVYQAYGHcjs.applyBoxBlur; exports.applyBoxBlurFloat = _chunkOVYQAYGHcjs.applyBoxBlurFloat; exports.applyDepthMask = _chunkOVYQAYGHcjs.applyDepthMask; exports.applyHomography = _chunkQT26RHKKcjs.applyHomography; exports.applyImageProjectionToContext = _chunkOVYQAYGHcjs.applyImageProjectionToContext; exports.applyLegacyAdjustments = _chunkOVYQAYGHcjs.applyLegacyAdjustments; exports.applyLegacyFloat = _chunkOVYQAYGHcjs.applyLegacyFloat; exports.applyMatrix3 = _chunkOVYQAYGHcjs.applyMatrix3; exports.applyOutputStage = applyOutputStage; exports.applyParams = _chunkOVYQAYGHcjs.applyParams; exports.applyProcess2Adjustments = _chunkOVYQAYGHcjs.applyProcess2Adjustments; exports.applyProcess2Float = _chunkOVYQAYGHcjs.applyProcess2Float; exports.applyRegionBlur = applyRegionBlur; exports.applyRegionMosaic = applyRegionMosaic; exports.applyRetouchToTile = _chunk7NW46N7Icjs.applyRetouchToTile; exports.applyShapeOptions = applyShapeOptions; exports.applySmartFilters = _chunkOVYQAYGHcjs.applySmartFilters; exports.applyStrokeToDeepTile = _chunkEBDCRTZIcjs.applyStrokeToDeepTile; exports.applyStrokeToTile = _chunkEBDCRTZIcjs.applyStrokeToTile; exports.applyToneToDeepTile = _chunk7NW46N7Icjs.applyToneToDeepTile; exports.backgroundLayer = _chunkOVYQAYGHcjs.backgroundLayer; exports.base64ToBytes = _chunkCWM3CUUXcjs.base64ToBytes; exports.baseProjection = baseProjection; exports.bestOffset = _chunk7NW46N7Icjs.bestOffset; exports.blackWhiteGray = _chunkOVYQAYGHcjs.blackWhiteGray; exports.blendChannel = _chunkCWM3CUUXcjs.blendChannel; exports.blendImageData = _chunkCWM3CUUXcjs.blendImageData; exports.blendLum = _chunkCWM3CUUXcjs.blendLum; exports.blendPixel = _chunkCWM3CUUXcjs.blendPixel; exports.blendRadius = _chunkEBDCRTZIcjs.blendRadius; exports.blendRgb = _chunkCWM3CUUXcjs.blendRgb; exports.blendTile = _chunkHGTDMKNEcjs.blendTile; exports.blenderDab = _chunkEBDCRTZIcjs.blenderDab; exports.blurFilter = _chunkOVYQAYGHcjs.blurFilter; exports.borderCoverage = _chunkOVYQAYGHcjs.borderCoverage; exports.boxBlurPixels = _chunk7NW46N7Icjs.boxBlurPixels; exports.boxFrameHit = boxFrameHit; exports.boxFrameOverlay = boxFrameOverlay; exports.boxMean = boxMean; exports.boxPointOf = _chunkOVYQAYGHcjs.boxPointOf; exports.boxQuad = _chunkQT26RHKKcjs.boxQuad; exports.boxToCurvePoint = boxToCurvePoint; exports.bradfordAdaptation = _chunkOVYQAYGHcjs.bradfordAdaptation; exports.brushstrokeDataUrl = _chunkEBDCRTZIcjs.brushstrokeDataUrl; exports.brushstrokeKey = _chunkEBDCRTZIcjs.brushstrokeKey; exports.brushstrokeSamples = _chunkEBDCRTZIcjs.brushstrokeSamples; exports.brushstrokeScaleBucket = _chunkYQGCPL5Xcjs.brushstrokeScaleBucket; exports.brushstrokeStrokeOptions = _chunkEBDCRTZIcjs.brushstrokeStrokeOptions; exports.brushstrokeToCanvas = _chunkEBDCRTZIcjs.brushstrokeToCanvas; exports.buildLayerMaskPlanes = _chunkOVYQAYGHcjs.buildLayerMaskPlanes; exports.buildToneLut = _chunkOVYQAYGHcjs.buildToneLut; exports.builtinPattern = _chunkHGTDMKNEcjs.builtinPattern; exports.builtinPatternIds = _chunkHGTDMKNEcjs.builtinPatternIds; exports.bytesToBase64 = _chunkCWM3CUUXcjs.bytesToBase64; exports.calculateCropDrag = _chunkOVYQAYGHcjs.calculateCropDrag; exports.canShareMemory = _chunkV7GWZIZKcjs.canShareMemory; exports.canvasCompositeOperation = _chunkCWM3CUUXcjs.canvasCompositeOperation; exports.canvasToImagePoint = _chunkOVYQAYGHcjs.canvasToImagePoint; exports.caretAt = _chunkEGZM52EOcjs.caretAt; exports.changedTiles = _chunkHGTDMKNEcjs.changedTiles; exports.checkImageEffectPlace = checkImageEffectPlace; exports.clampControlValue = clampControlValue; exports.clampCropToImage = _chunkOVYQAYGHcjs.clampCropToImage; exports.cleanMixer = _chunkEBDCRTZIcjs.cleanMixer; exports.cloneSamplePoint = _chunk7NW46N7Icjs.cloneSamplePoint; exports.cloneSourceLabel = cloneSourceLabel; exports.cloneTransformView = cloneTransformView; exports.collectTiles = _chunkCWM3CUUXcjs.collectTiles; exports.colorBalanceChannel = _chunkOVYQAYGHcjs.colorBalanceChannel; exports.colorModePlanes = colorModePlanes; exports.colorModePlanes16 = colorModePlanes16; exports.colorPanelView = colorPanelView; exports.colorRange = colorRange; exports.combineSelections = _chunkOVYQAYGHcjs.combineSelections; exports.compileAdjustmentLayer = _chunkOVYQAYGHcjs.compileAdjustmentLayer; exports.componentPath = _chunkOVYQAYGHcjs.componentPath; exports.compositeDeep = _chunkOVYQAYGHcjs.compositeDeep; exports.compositeSurfaceOver = _chunkHGTDMKNEcjs.compositeSurfaceOver; exports.computeHistogram = computeHistogram; exports.computeSelectionBounds = _chunkOVYQAYGHcjs.computeSelectionBounds; exports.contentAwareFill = _chunk7NW46N7Icjs.contentAwareFill; exports.contentBounds = _chunkCWM3CUUXcjs.contentBounds; exports.contentsBox = _chunkOVYQAYGHcjs.contentsBox; exports.contentsSurface = _chunkOVYQAYGHcjs.contentsSurface; exports.contractCoverage = _chunkOVYQAYGHcjs.contractCoverage; exports.controlPosition = controlPosition; exports.controlTrackBackground = controlTrackBackground; exports.convertColorFields = convertColorFields; exports.convertHex = convertHex; exports.convertSurfaceColors = convertSurfaceColors; exports.convertSurfaceDepth = _chunkCWM3CUUXcjs.convertSurfaceDepth; exports.convertToSmartObject = _chunkOVYQAYGHcjs.convertToSmartObject; exports.copySmartObject = _chunkOVYQAYGHcjs.copySmartObject; exports.cornersFromMatrix = _chunkOVYQAYGHcjs.cornersFromMatrix; exports.coverageTileCoord = _chunkEBDCRTZIcjs.coverageTileCoord; exports.coverageToByte = _chunkOVYQAYGHcjs.coverageToByte; exports.coveringRect = coveringRect; exports.createAdjustmentLayer = _chunkOVYQAYGHcjs.createAdjustmentLayer; exports.createBlenderScratch = _chunkEBDCRTZIcjs.createBlenderScratch; exports.createCanvasTextShaper = _chunkEGZM52EOcjs.createCanvasTextShaper; exports.createImageCaptureSurface = createImageCaptureSurface; exports.createImageColorTools = createImageColorTools; exports.createImageEditTools = createImageEditTools; exports.createImageEditorDocument = createImageEditorDocument; exports.createImageEditorToolProvider = createImageEditorToolProvider; exports.createImageEffectTools = createImageEffectTools; exports.createImageEffectsToolProvider = createImageEffectsToolProvider; exports.createImageLayerTools = createImageLayerTools; exports.createImagePaintTools = createImagePaintTools; exports.createImagePlaybackLocator = createImagePlaybackLocator; exports.createImagePsdTools = createImagePsdTools; exports.createImageRetouchTools = createImageRetouchTools; exports.createImageSelectionTools = createImageSelectionTools; exports.createImageShapeTools = createImageShapeTools; exports.createImageSmartObjectTools = createImageSmartObjectTools; exports.createImageTransformTools = createImageTransformTools; exports.createImageTypeTools = createImageTypeTools; exports.createMetricTextShaper = _chunkEGZM52EOcjs.createMetricTextShaper; exports.createOutlineTextShaper = _chunkEGZM52EOcjs.createOutlineTextShaper; exports.createPigment = _chunkCWM3CUUXcjs.createPigment; exports.createPigmentTools = _chunkV7GWZIZKcjs.createPigmentTools; exports.createSelectionMask = _chunkOVYQAYGHcjs.createSelectionMask; exports.createShapeLayer = _chunkOVYQAYGHcjs.createShapeLayer; exports.createTypeLayer = _chunkOVYQAYGHcjs.createTypeLayer; exports.createWetGpuEngine = _chunkV7GWZIZKcjs.createWetGpuEngine; exports.cssFont = _chunkEGZM52EOcjs.cssFont; exports.cssFontFamily = _chunkEGZM52EOcjs.cssFontFamily; exports.curveLut = _chunkHGTDMKNEcjs.curveLut; exports.curveLutFromLevels = _chunkOVYQAYGHcjs.curveLutFromLevels; exports.curvePointToBox = curvePointToBox; exports.curveSvgPath = curveSvgPath; exports.dabCoverage = _chunkEBDCRTZIcjs.dabCoverage; exports.dabRect = _chunkEBDCRTZIcjs.dabRect; exports.decodeDeepSurface = _chunkOVYQAYGHcjs.decodeDeepSurface; exports.decodeLayerChannel = _chunkOVYQAYGHcjs.decodeLayerChannel; exports.decodeLayerMask = _chunkOVYQAYGHcjs.decodeLayerMask; exports.decodeMergedImage = _chunkOVYQAYGHcjs.decodeMergedImage; exports.decodePlanes = _chunkOVYQAYGHcjs.decodePlanes; exports.decodePng = _chunkCWM3CUUXcjs.decodePng; exports.decodePngDataUrl = _chunkOVYQAYGHcjs.decodePngDataUrl; exports.decodeSelectionRle = _chunkOVYQAYGHcjs.decodeSelectionRle; exports.deepBytes = _chunkCWM3CUUXcjs.deepBytes; exports.deepTile = _chunkCWM3CUUXcjs.deepTile; exports.defaultActiveLayerId = _chunkOVYQAYGHcjs.defaultActiveLayerId; exports.defaultAdjustmentParams = _chunkOVYQAYGHcjs.defaultAdjustmentParams; exports.defaultEffectGradient = _chunkHGTDMKNEcjs.defaultEffectGradient; exports.defaultLayerEffect = _chunkHGTDMKNEcjs.defaultLayerEffect; exports.defaultShapeName = _chunkOVYQAYGHcjs.defaultShapeName; exports.deflate = _chunkXFM3OCHUcjs.deflate; exports.deflateRaw = _chunkXFM3OCHUcjs.deflateRaw; exports.depthMaskAlpha = _chunkOVYQAYGHcjs.depthMaskAlpha; exports.depthOf = _chunkCWM3CUUXcjs.depthOf; exports.depthRasterMask = _chunkOVYQAYGHcjs.depthRasterMask; exports.describeLayer = describeLayer; exports.describeLayerEffects = describeLayerEffects; exports.describeSelection = describeSelection; exports.describeTransform = _chunkOVYQAYGHcjs.describeTransform; exports.deserializeColorMode = deserializeColorMode; exports.deserializeColorProfile = deserializeColorProfile; exports.deserializeEffects = _chunkOVYQAYGHcjs.deserializeEffects; exports.deserializeLayer = _chunkOVYQAYGHcjs.deserializeLayer; exports.deserializeLayers = _chunkOVYQAYGHcjs.deserializeLayers; exports.deserializePatterns = _chunkOVYQAYGHcjs.deserializePatterns; exports.deserializeSelection = _chunkOVYQAYGHcjs.deserializeSelection; exports.developFilter = _chunkOVYQAYGHcjs.developFilter; exports.developFromAdjustments = _chunkOVYQAYGHcjs.developFromAdjustments; exports.developTarget = _chunkOVYQAYGHcjs.developTarget; exports.dexp = _chunkV7GWZIZKcjs.dexp; exports.dilateMask = _chunk7NW46N7Icjs.dilateMask; exports.displayTransform = displayTransform; exports.distanceTransform = _chunkOVYQAYGHcjs.distanceTransform; exports.dlog = _chunkV7GWZIZKcjs.dlog; exports.documentContents = _chunkOVYQAYGHcjs.documentContents; exports.documentProfile = documentProfile; exports.dodgeBurn = _chunk7NW46N7Icjs.dodgeBurn; exports.dodgeBurnCurve = _chunk7NW46N7Icjs.dodgeBurnCurve; exports.downloadPsd = downloadPsd; exports.dpow = _chunkV7GWZIZKcjs.dpow; exports.dragWarpMeshPoint = _chunkEGZM52EOcjs.dragWarpMeshPoint; exports.dropPlacement = dropPlacement; exports.dropZone = dropZone; exports.dsincos = _chunkV7GWZIZKcjs.dsincos; exports.duplicateLayer = _chunkOVYQAYGHcjs.duplicateLayer; exports.edgeBits = _chunkV7GWZIZKcjs.edgeBits; exports.edgeWidth = edgeWidth; exports.effectColorHex = _chunkHGTDMKNEcjs.effectColorHex; exports.effectControlChange = effectControlChange; exports.effectPixelsToSurface = effectPixelsToSurface; exports.effectReach = _chunkHGTDMKNEcjs.effectReach; exports.effectiveProof = effectiveProof; exports.effectsFingerprint = _chunkHGTDMKNEcjs.effectsFingerprint; exports.effectsMargin = _chunkHGTDMKNEcjs.effectsMargin; exports.effectsScale = _chunkHGTDMKNEcjs.effectsScale; exports.ellipsePoints = ellipsePoints; exports.ellipseSelection = ellipseSelection; exports.emptyHistogram = emptyHistogram; exports.emptySurface = _chunkCWM3CUUXcjs.emptySurface; exports.encodeDeepSurface = _chunkOVYQAYGHcjs.encodeDeepSurface; exports.encodePng = _chunkCWM3CUUXcjs.encodePng; exports.encodeRle = _chunkOVYQAYGHcjs.encodeRle; exports.encodeSelectionRle = _chunkOVYQAYGHcjs.encodeSelectionRle; exports.encodeSurface = _chunkOVYQAYGHcjs.encodeSurface; exports.evalWarpMesh = _chunkEGZM52EOcjs.evalWarpMesh; exports.evaluateAdjustmentLayers = _chunkOVYQAYGHcjs.evaluateAdjustmentLayers; exports.exchangeRates = _chunkEBDCRTZIcjs.exchangeRates; exports.expNeg = _chunkV7GWZIZKcjs.expNeg; exports.expandCoverage = _chunkOVYQAYGHcjs.expandCoverage; exports.exportPsd = _chunkOVYQAYGHcjs.exportPsd; exports.extractNormalizedLayerItems = extractNormalizedLayerItems; exports.featherCoverage = _chunkOVYQAYGHcjs.featherCoverage; exports.fillRect = _chunkCWM3CUUXcjs.fillRect; exports.filmPixel = _chunkV7GWZIZKcjs.filmPixel; exports.filmReflectance = _chunkV7GWZIZKcjs.filmReflectance; exports.filterMaskCoverage = _chunkOVYQAYGHcjs.filterMaskCoverage; exports.findAdjustmentControl = findAdjustmentControl; exports.findLayer = _chunkHGTDMKNEcjs.findLayer; exports.findLayerControl = findLayerControl; exports.findWebGpu = _chunkV7GWZIZKcjs.findWebGpu; exports.finishTile = _chunkCWM3CUUXcjs.finishTile; exports.fitParagraphRuns = _chunkEGZM52EOcjs.fitParagraphRuns; exports.fitRuns = _chunkEGZM52EOcjs.fitRuns; exports.flattenLayers = _chunkHGTDMKNEcjs.flattenLayers; exports.flattenPath = _chunkOVYQAYGHcjs.flattenPath; exports.flipCorners = _chunkOVYQAYGHcjs.flipCorners; exports.flowField = _chunkV7GWZIZKcjs.flowField; exports.fontOf = _chunkEGZM52EOcjs.fontOf; exports.formatControlValue = formatControlValue; exports.fullSelection = _chunkOVYQAYGHcjs.fullSelection; exports.gaussianBlur = _chunkHGTDMKNEcjs.gaussianBlur; exports.geometryHomography = _chunkOVYQAYGHcjs.geometryHomography; exports.getAnnotationBounds = _chunkOVYQAYGHcjs.getAnnotationBounds; exports.getControlPath = getControlPath; exports.getCropCursor = _chunkOVYQAYGHcjs.getCropCursor; exports.getRotatedSize = _chunkOVYQAYGHcjs.getRotatedSize; exports.getViewportMetrics = _chunkOVYQAYGHcjs.getViewportMetrics; exports.getViewportProjection = _chunkOVYQAYGHcjs.getViewportProjection; exports.globalImageCache = globalImageCache; exports.gradientDabColor = _chunkEBDCRTZIcjs.gradientDabColor; exports.grainCatch = _chunkEBDCRTZIcjs.grainCatch; exports.grainHeights = _chunkEBDCRTZIcjs.grainHeights; exports.greyMorphology = _chunkOVYQAYGHcjs.greyMorphology; exports.groupLayers = _chunkOVYQAYGHcjs.groupLayers; exports.guidePlanes = guidePlanes; exports.guidedFilterColor = guidedFilterColor; exports.handlePaintShortcut = handlePaintShortcut; exports.hasActiveEffects = _chunkHGTDMKNEcjs.hasActiveEffects; exports.hasResampledLegacyMask = _chunkOVYQAYGHcjs.hasResampledLegacyMask; exports.hasSurface = _chunkOVYQAYGHcjs.hasSurface; exports.hasWarp = _chunkOVYQAYGHcjs.hasWarp; exports.hash2 = _chunkEBDCRTZIcjs.hash2; exports.hashMaskContent = _chunkOVYQAYGHcjs.hashMaskContent; exports.hashNoise = _chunkHGTDMKNEcjs.hashNoise; exports.healPixels = _chunk7NW46N7Icjs.healPixels; exports.hexToPaintRgb = _chunkEBDCRTZIcjs.hexToPaintRgb; exports.hexToRgb = _chunkOVYQAYGHcjs.hexToRgb; exports.histogramPath = histogramPath; exports.hitTestAnnotation = _chunkOVYQAYGHcjs.hitTestAnnotation; exports.hitTestCrop = _chunkOVYQAYGHcjs.hitTestCrop; exports.hitTestCurvePoint = hitTestCurvePoint; exports.homographyFromAffine = _chunkQT26RHKKcjs.homographyFromAffine; exports.homographyFromPoints = _chunkQT26RHKKcjs.homographyFromPoints; exports.hslToRgb = _chunkOVYQAYGHcjs.hslToRgb; exports.hueRange = hueRange; exports.hueRangeTables = _chunkOVYQAYGHcjs.hueRangeTables; exports.hueRangeWeight = _chunkOVYQAYGHcjs.hueRangeWeight; exports.hueSaturation = _chunkOVYQAYGHcjs.hueSaturation; exports.identityCurve = _chunkOVYQAYGHcjs.identityCurve; exports.identityLevels = _chunkOVYQAYGHcjs.identityLevels; exports.identityTransform = _chunkOVYQAYGHcjs.identityTransform; exports.identityWarpMesh = _chunkEGZM52EOcjs.identityWarpMesh; exports.imageEditorStateMigrations = imageEditorStateMigrations; exports.imageLayerAppliedEffects = imageLayerAppliedEffects; exports.imagePlaybackPanel = imagePlaybackPanel; exports.imageToCanvasPoint = _chunkOVYQAYGHcjs.imageToCanvasPoint; exports.importPsd = _chunkOVYQAYGHcjs.importPsd; exports.inflate = _chunkXFM3OCHUcjs.inflate; exports.inflateRaw = _chunkXFM3OCHUcjs.inflateRaw; exports.insertCurvePoint = insertCurvePoint; exports.insertLayer = _chunkHGTDMKNEcjs.insertLayer; exports.instancesOf = _chunkOVYQAYGHcjs.instancesOf; exports.invertHomography = _chunkQT26RHKKcjs.invertHomography; exports.invertMatrix3 = _chunkOVYQAYGHcjs.invertMatrix3; exports.invertSelection = _chunkOVYQAYGHcjs.invertSelection; exports.isActiveFilter = _chunkOVYQAYGHcjs.isActiveFilter; exports.isAdjustmentKind = _chunkOVYQAYGHcjs.isAdjustmentKind; exports.isBitDepth = _chunkCWM3CUUXcjs.isBitDepth; exports.isBlendMode = _chunkCWM3CUUXcjs.isBlendMode; exports.isBrushstrokeBrush = _chunkEBDCRTZIcjs.isBrushstrokeBrush; exports.isContentsDecoded = _chunkOVYQAYGHcjs.isContentsDecoded; exports.isDefaultDepthMask = _chunkOVYQAYGHcjs.isDefaultDepthMask; exports.isGradientPaint = _chunkEBDCRTZIcjs.isGradientPaint; exports.isIdentityCloneTransform = _chunk7NW46N7Icjs.isIdentityCloneTransform; exports.isIdentityTransform = _chunkOVYQAYGHcjs.isIdentityTransform; exports.isInterpolation = _chunkHGTDMKNEcjs.isInterpolation; exports.isLayerEffectKind = _chunkHGTDMKNEcjs.isLayerEffectKind; exports.isLayerLocked = _chunkHGTDMKNEcjs.isLayerLocked; exports.isLegacyShape = _chunkOVYQAYGHcjs.isLegacyShape; exports.isPaintTool = isPaintTool; exports.isPaintableLayer = _chunkOVYQAYGHcjs.isPaintableLayer; exports.isPainterlyBlendMode = _chunkCWM3CUUXcjs.isPainterlyBlendMode; exports.isPng = _chunkCWM3CUUXcjs.isPng; exports.isQuarterTurn = isQuarterTurn; exports.isQuarterTurnSwapped = _chunkOVYQAYGHcjs.isQuarterTurnSwapped; exports.isRenderedLayer = _chunkOVYQAYGHcjs.isRenderedLayer; exports.isRetouchPaintTool = isRetouchPaintTool; exports.isRetouchTool = isRetouchTool; exports.isSelectionEmpty = _chunkOVYQAYGHcjs.isSelectionEmpty; exports.isSelectionMode = _chunkOVYQAYGHcjs.isSelectionMode; exports.isSeparableBlendMode = _chunkCWM3CUUXcjs.isSeparableBlendMode; exports.isSmartSurfaceIncomplete = _chunkOVYQAYGHcjs.isSmartSurfaceIncomplete; exports.isSpatialFilter = _chunkOVYQAYGHcjs.isSpatialFilter; exports.isSrgb = isSrgb; exports.isTransformAnchor = _chunkOVYQAYGHcjs.isTransformAnchor; exports.isValidWarp = _chunkOVYQAYGHcjs.isValidWarp; exports.keepDeepSamples = _chunkCWM3CUUXcjs.keepDeepSamples; exports.kelvinToTemperature = _chunkOVYQAYGHcjs.kelvinToTemperature; exports.keysWeight = _chunkHGTDMKNEcjs.keysWeight; exports.latticeViscosity = _chunkV7GWZIZKcjs.latticeViscosity; exports.layerBadge = layerBadge; exports.layerEffectControls = layerEffectControls; exports.layerEffectFields = _chunkHGTDMKNEcjs.layerEffectFields; exports.layerEffectLabel = _chunkHGTDMKNEcjs.layerEffectLabel; exports.layerEffectsBadge = layerEffectsBadge; exports.layerEffectsOf = _chunkOVYQAYGHcjs.layerEffectsOf; exports.layerEffectsPanel = layerEffectsPanel; exports.layerHasThumbnail = layerHasThumbnail; exports.layerLabel = layerLabel; exports.layerMaskCoverage = _chunkOVYQAYGHcjs.layerMaskCoverage; exports.layerMaskFromSelection = _chunkOVYQAYGHcjs.layerMaskFromSelection; exports.layerMaskKey = _chunkOVYQAYGHcjs.layerMaskKey; exports.layerMenu = layerMenu; exports.layerName = _chunkOVYQAYGHcjs.layerName; exports.layerPanelRows = layerPanelRows; exports.layerPanels = layerPanels; exports.layerTree = _chunkOVYQAYGHcjs.layerTree; exports.layerTypeLabel = _chunkOVYQAYGHcjs.layerTypeLabel; exports.layerWarning = layerWarning; exports.layersFromLegacy = _chunkOVYQAYGHcjs.layersFromLegacy; exports.layoutText = _chunkEGZM52EOcjs.layoutText; exports.legacyAdjustmentLayer = _chunkOVYQAYGHcjs.legacyAdjustmentLayer; exports.legacyMaskOf = _chunkOVYQAYGHcjs.legacyMaskOf; exports.legacyView = _chunkOVYQAYGHcjs.legacyView; exports.lerpPigment = _chunkCWM3CUUXcjs.lerpPigment; exports.lerpPigmentInto = _chunkCWM3CUUXcjs.lerpPigmentInto; exports.levelsValue = _chunkOVYQAYGHcjs.levelsValue; exports.linearSrgbToXy = _chunkOVYQAYGHcjs.linearSrgbToXy; exports.linearToSrgb = _chunkOVYQAYGHcjs.linearToSrgb; exports.linearToSrgb8 = _chunkV7GWZIZKcjs.linearToSrgb8; exports.liveComponent = _chunkOVYQAYGHcjs.liveComponent; exports.liveShapeForDrag = liveShapeForDrag; exports.liveShapeSubpaths = _chunkOVYQAYGHcjs.liveShapeSubpaths; exports.loadImageEditorDocument = loadImageEditorDocument; exports.loadMixer = _chunkEBDCRTZIcjs.loadMixer; exports.loadOpenTypeFont = _chunk5UEFNX24cjs.loadOpenTypeFont; exports.loadWetKernel = _chunkV7GWZIZKcjs.loadWetKernel; exports.luma = _chunk7NW46N7Icjs.luma; exports.magicWand = magicWand; exports.mapCropHandle = _chunkOVYQAYGHcjs.mapCropHandle; exports.mapLayer = _chunkHGTDMKNEcjs.mapLayer; exports.mapSubpaths = _chunkOVYQAYGHcjs.mapSubpaths; exports.maskBounds = _chunk7NW46N7Icjs.maskBounds; exports.maskSummary = maskSummary; exports.matrixFromCorners = _chunkOVYQAYGHcjs.matrixFromCorners; exports.matrixFromParams = _chunkOVYQAYGHcjs.matrixFromParams; exports.measureCanvasViewport = measureCanvasViewport; exports.membraneFill = _chunk7NW46N7Icjs.membraneFill; exports.mergeLayerEffect = _chunkHGTDMKNEcjs.mergeLayerEffect; exports.mergeShapeComponents = _chunkOVYQAYGHcjs.mergeShapeComponents; exports.migrateSerializedImageEditorState = migrateSerializedImageEditorState; exports.migrateToLayeredState = migrateToLayeredState; exports.mix32 = _chunkEBDCRTZIcjs.mix32; exports.mixPigment8 = _chunkCWM3CUUXcjs.mixPigment8; exports.mixPigmentRgb = _chunkCWM3CUUXcjs.mixPigmentRgb; exports.mixPigments = _chunkCWM3CUUXcjs.mixPigments; exports.mixerLoadResult = mixerLoadResult; exports.mixerRates = _chunkEBDCRTZIcjs.mixerRates; exports.modifySelection = _chunkOVYQAYGHcjs.modifySelection; exports.moveCurvePoint = moveCurvePoint; exports.moveLayer = _chunkOVYQAYGHcjs.moveLayer; exports.moveSmartFilter = _chunkOVYQAYGHcjs.moveSmartFilter; exports.mulMatrix3 = _chunkOVYQAYGHcjs.mulMatrix3; exports.needsLegacyBase = needsLegacyBase; exports.neutralHueRange = _chunkOVYQAYGHcjs.neutralHueRange; exports.newContentsId = _chunkOVYQAYGHcjs.newContentsId; exports.newEffectId = _chunkHGTDMKNEcjs.newEffectId; exports.newLayerId = _chunkOVYQAYGHcjs.newLayerId; exports.newLayerOptions = newLayerOptions; exports.normalizeAdjustmentLayer = _chunkOVYQAYGHcjs.normalizeAdjustmentLayer; exports.normalizeAdjustmentLayers = _chunkOVYQAYGHcjs.normalizeAdjustmentLayers; exports.normalizeAngle = _chunkOVYQAYGHcjs.normalizeAngle; exports.normalizeBlendMode = _chunkCWM3CUUXcjs.normalizeBlendMode; exports.normalizeBlender = _chunkEBDCRTZIcjs.normalizeBlender; exports.normalizeBrush = _chunkEBDCRTZIcjs.normalizeBrush; exports.normalizeFilter = _chunkOVYQAYGHcjs.normalizeFilter; exports.normalizeFlow = _chunkV7GWZIZKcjs.normalizeFlow; exports.normalizeHexColor = _chunkEBDCRTZIcjs.normalizeHexColor; exports.normalizeLayerEffects = _chunkHGTDMKNEcjs.normalizeLayerEffects; exports.normalizeLayerMask = _chunkOVYQAYGHcjs.normalizeLayerMask; exports.normalizeLiveShape = _chunkOVYQAYGHcjs.normalizeLiveShape; exports.normalizeMixer = _chunkEBDCRTZIcjs.normalizeMixer; exports.normalizePlacement = _chunkOVYQAYGHcjs.normalizePlacement; exports.normalizeProcessVersion = _chunkOVYQAYGHcjs.normalizeProcessVersion; exports.normalizeRect = normalizeRect; exports.normalizeRefineEdgeParams = normalizeRefineEdgeParams; exports.normalizeRetouch = _chunk7NW46N7Icjs.normalizeRetouch; exports.normalizeShapePaint = _chunkOVYQAYGHcjs.normalizeShapePaint; exports.normalizeShapeStroke = _chunkOVYQAYGHcjs.normalizeShapeStroke; exports.normalizeSmartFilter = _chunkOVYQAYGHcjs.normalizeSmartFilter; exports.normalizeSmudge = _chunkEBDCRTZIcjs.normalizeSmudge; exports.normalizeStoredAdjustments = normalizeStoredAdjustments; exports.normalizeSubpaths = _chunkOVYQAYGHcjs.normalizeSubpaths; exports.normalizeText = _chunkOVYQAYGHcjs.normalizeText; exports.normalizeTilt = _chunkV7GWZIZKcjs.normalizeTilt; exports.normalizeWetParams = _chunkV7GWZIZKcjs.normalizeWetParams; exports.offsetLayer = _chunkOVYQAYGHcjs.offsetLayer; exports.offsetShape = _chunkOVYQAYGHcjs.offsetShape; exports.offsetSmartObject = _chunkOVYQAYGHcjs.offsetSmartObject; exports.openPsdFile = openPsdFile; exports.packRgba = _chunkCWM3CUUXcjs.packRgba; exports.packWetParams = _chunkV7GWZIZKcjs.packWetParams; exports.paintGradientMappingFor = _chunkEBDCRTZIcjs.paintGradientMappingFor; exports.paintPathStroke = _chunkEBDCRTZIcjs.paintPathStroke; exports.paintSourceColor = _chunkEBDCRTZIcjs.paintSourceColor; exports.paintSourceCss = _chunkEBDCRTZIcjs.paintSourceCss; exports.paragraphRanges = _chunkEGZM52EOcjs.paragraphRanges; exports.parseAdjustmentBlock = _chunkOVYQAYGHcjs.parseAdjustmentBlock; exports.parseBlend = _chunkOVYQAYGHcjs.parseBlend; exports.parseColor = parseColor; exports.parseCssColor = _chunkA2IS7EHEcjs.parseCssColor; exports.parseDataUrl = _chunkCWM3CUUXcjs.parseDataUrl; exports.parseEffectColor = _chunkHGTDMKNEcjs.parseEffectColor; exports.parseLfx2 = _chunkOVYQAYGHcjs.parseLfx2; exports.parseLrfx = _chunkOVYQAYGHcjs.parseLrfx; exports.parseOpenTypeFont = _chunk5UEFNX24cjs.parseOpenTypeFont; exports.parsePaintSource = _chunkEBDCRTZIcjs.parsePaintSource; exports.parsePatternBlock = _chunkOVYQAYGHcjs.parsePatternBlock; exports.parseSelectionMode = _chunkOVYQAYGHcjs.parseSelectionMode; exports.parseVersionedDescriptor = _chunkOVYQAYGHcjs.parseVersionedDescriptor; exports.patchParagraphStyle = _chunkOVYQAYGHcjs.patchParagraphStyle; exports.patchTextStyle = _chunkOVYQAYGHcjs.patchTextStyle; exports.pathStrokeCoverage = _chunkEBDCRTZIcjs.pathStrokeCoverage; exports.pathStrokeDabs = _chunkEBDCRTZIcjs.pathStrokeDabs; exports.perDabStrength = _chunk7NW46N7Icjs.perDabStrength; exports.photoFilterMatrix = _chunkOVYQAYGHcjs.photoFilterMatrix; exports.pigment8 = _chunkCWM3CUUXcjs.pigment8; exports.pigmentColor = _chunkV7GWZIZKcjs.pigmentColor; exports.pigmentOf = _chunkV7GWZIZKcjs.pigmentOf; exports.pixelLayerBounds = _chunkOVYQAYGHcjs.pixelLayerBounds; exports.pixelLayers = _chunkOVYQAYGHcjs.pixelLayers; exports.pixelPigment = _chunkV7GWZIZKcjs.pixelPigment; exports.placeContents = _chunkOVYQAYGHcjs.placeContents; exports.placeLayer = _chunkOVYQAYGHcjs.placeLayer; exports.placementAt = _chunkOVYQAYGHcjs.placementAt; exports.placementBounds = _chunkOVYQAYGHcjs.placementBounds; exports.placementGeometry = _chunkOVYQAYGHcjs.placementGeometry; exports.planImageToolPlayback = planImageToolPlayback; exports.pngDataUrl = _chunkCWM3CUUXcjs.pngDataUrl; exports.pointerPressure = _chunkV7GWZIZKcjs.pointerPressure; exports.pointerStrokeSample = _chunkV7GWZIZKcjs.pointerStrokeSample; exports.pointerStrokeSamples = _chunkV7GWZIZKcjs.pointerStrokeSamples; exports.polygonCoverage = polygonCoverage; exports.polygonSelection = polygonSelection; exports.posterizeValue = _chunkOVYQAYGHcjs.posterizeValue; exports.presetWarp = _chunkOVYQAYGHcjs.presetWarp; exports.previewStep = previewStep; exports.profileBytes = profileBytes; exports.projectImagePoint = _chunkOVYQAYGHcjs.projectImagePoint; exports.projectImageRect = _chunkOVYQAYGHcjs.projectImageRect; exports.projectMaskCoverage = _chunkOVYQAYGHcjs.projectMaskCoverage; exports.projectQuarterTurn = projectQuarterTurn; exports.proxyOf = _chunkCWM3CUUXcjs.proxyOf; exports.psdBytesFromBase64 = psdBytesFromBase64; exports.psdFileName = psdFileName; exports.psdPatternToEffectPattern = _chunkOVYQAYGHcjs.psdPatternToEffectPattern; exports.psdToLayers = _chunkOVYQAYGHcjs.psdToLayers; exports.pullWarpMesh = _chunkEGZM52EOcjs.pullWarpMesh; exports.put255 = _chunkEBDCRTZIcjs.put255; exports.quadFrameOverlay = quadFrameOverlay; exports.quickMaskPixels = quickMaskPixels; exports.rand01 = _chunkEBDCRTZIcjs.rand01; exports.randSigned = _chunkEBDCRTZIcjs.randSigned; exports.rangeLightness = _chunkOVYQAYGHcjs.rangeLightness; exports.rasterContents = _chunkOVYQAYGHcjs.rasterContents; exports.rasterMaskFromLegacy = _chunkOVYQAYGHcjs.rasterMaskFromLegacy; exports.rasterizeCoverage = _chunkOVYQAYGHcjs.rasterizeCoverage; exports.rasterizeDab = _chunkEBDCRTZIcjs.rasterizeDab; exports.rasterizeSmartObject = _chunkOVYQAYGHcjs.rasterizeSmartObject; exports.readAdjustmentControls = readAdjustmentControls; exports.readDeepRegion = _chunkCWM3CUUXcjs.readDeepRegion; exports.readPaintSource = _chunkEBDCRTZIcjs.readPaintSource; exports.readPixel = _chunkCWM3CUUXcjs.readPixel; exports.readPsd = _chunkOVYQAYGHcjs.readPsd; exports.readRegion = _chunkCWM3CUUXcjs.readRegion; exports.readSourceRegion = _chunk7NW46N7Icjs.readSourceRegion; exports.rectSelection = rectSelection; exports.rectToQuad = _chunkQT26RHKKcjs.rectToQuad; exports.reduceSurface = _chunkHGTDMKNEcjs.reduceSurface; exports.referencePoint = _chunkOVYQAYGHcjs.referencePoint; exports.refineCoverage = refineCoverage; exports.refineEdgeHalo = refineEdgeHalo; exports.refineSelection = refineSelection; exports.reflectanceToRgb = _chunkCWM3CUUXcjs.reflectanceToRgb; exports.removeAlpha = _chunkOVYQAYGHcjs.removeAlpha; exports.removeCurvePoint = removeCurvePoint; exports.removeLayer = _chunkOVYQAYGHcjs.removeLayer; exports.removeLayerEffect = _chunkOVYQAYGHcjs.removeLayerEffect; exports.removeLayerFilter = _chunkOVYQAYGHcjs.removeLayerFilter; exports.removePaintGradientStop = _chunkEBDCRTZIcjs.removePaintGradientStop; exports.removeSmartFilter = _chunkOVYQAYGHcjs.removeSmartFilter; exports.renderBrushstroke = _chunkEBDCRTZIcjs.renderBrushstroke; exports.renderLayerEffects = _chunkHGTDMKNEcjs.renderLayerEffects; exports.renderLayeredBase = renderLayeredBase; exports.renderShape = _chunkOVYQAYGHcjs.renderShape; exports.renderShapeRect = _chunkOVYQAYGHcjs.renderShapeRect; exports.renderSmartObject = _chunkOVYQAYGHcjs.renderSmartObject; exports.renderText = _chunkOVYQAYGHcjs.renderText; exports.replaceContents = _chunkOVYQAYGHcjs.replaceContents; exports.replaceTextRange = _chunkOVYQAYGHcjs.replaceTextRange; exports.requireLayer = _chunkOVYQAYGHcjs.requireLayer; exports.requireOperation = _chunkOVYQAYGHcjs.requireOperation; exports.requireShapeLayer = _chunkOVYQAYGHcjs.requireShapeLayer; exports.requireSmartObject = _chunkOVYQAYGHcjs.requireSmartObject; exports.requireTypeLayer = _chunkOVYQAYGHcjs.requireTypeLayer; exports.requireUnlocked = _chunkOVYQAYGHcjs.requireUnlocked; exports.rerender = _chunkOVYQAYGHcjs.rerender; exports.rerenderShape = _chunkOVYQAYGHcjs.rerenderShape; exports.rerenderText = _chunkOVYQAYGHcjs.rerenderText; exports.resizePixels = resizePixels; exports.resizeSelection = _chunkOVYQAYGHcjs.resizeSelection; exports.resizeWarpMesh = _chunkEGZM52EOcjs.resizeWarpMesh; exports.resolveExternalAssets = _chunkOVYQAYGHcjs.resolveExternalAssets; exports.resolveMosaicRegionBounds = resolveMosaicRegionBounds; exports.resolvePaintGradient = _chunkEBDCRTZIcjs.resolvePaintGradient; exports.resolveProfile = resolveProfile; exports.restyleRange = _chunkEGZM52EOcjs.restyleRange; exports.retouchFilter = _chunk7NW46N7Icjs.retouchFilter; exports.reversePaintGradient = _chunkEBDCRTZIcjs.reversePaintGradient; exports.rgbToGray = _chunkOVYQAYGHcjs.rgbToGray; exports.rgbToHsl = _chunkOVYQAYGHcjs.rgbToHsl; exports.rgbToReflectance = _chunkCWM3CUUXcjs.rgbToReflectance; exports.rgbUnitToHex = rgbUnitToHex; exports.rgbaViewOfGrey = _chunk7NW46N7Icjs.rgbaViewOfGrey; exports.runLayerFilters = _chunkOVYQAYGHcjs.runLayerFilters; exports.runLayerFiltersFloat = _chunkOVYQAYGHcjs.runLayerFiltersFloat; exports.runLayerMenuAction = runLayerMenuAction; exports.sameCanvasViewport = sameCanvasViewport; exports.sampleLut = _chunkOVYQAYGHcjs.sampleLut; exports.sampleToneLut = _chunkOVYQAYGHcjs.sampleToneLut; exports.saturationOf = _chunk7NW46N7Icjs.saturationOf; exports.scaleLayerEffect = _chunkHGTDMKNEcjs.scaleLayerEffect; exports.scalePaintGradient = _chunkEBDCRTZIcjs.scalePaintGradient; exports.seamlessClone = _chunk7NW46N7Icjs.seamlessClone; exports.seedFromString = _chunkEBDCRTZIcjs.seedFromString; exports.selectionArea = _chunkOVYQAYGHcjs.selectionArea; exports.selectionFromCoverage = _chunkOVYQAYGHcjs.selectionFromCoverage; exports.selectionFromPixels = _chunkOVYQAYGHcjs.selectionFromPixels; exports.selectionModeFromModifiers = selectionModeFromModifiers; exports.selectionOutline = selectionOutline; exports.selectionToCoverage = _chunkOVYQAYGHcjs.selectionToCoverage; exports.selectionToPixels = _chunkOVYQAYGHcjs.selectionToPixels; exports.selectionValueAt = _chunkOVYQAYGHcjs.selectionValueAt; exports.serializeColorMode = serializeColorMode; exports.serializeColorProfile = serializeColorProfile; exports.serializeContents = _chunkOVYQAYGHcjs.serializeContents; exports.serializeEffects = _chunkOVYQAYGHcjs.serializeEffects; exports.serializeLayer = _chunkOVYQAYGHcjs.serializeLayer; exports.serializeLayers = _chunkOVYQAYGHcjs.serializeLayers; exports.serializeLayersExternal = _chunkOVYQAYGHcjs.serializeLayersExternal; exports.serializePatterns = _chunkOVYQAYGHcjs.serializePatterns; exports.serializeSelection = _chunkOVYQAYGHcjs.serializeSelection; exports.setCloneTransformValue = setCloneTransformValue; exports.setControlPath = setControlPath; exports.setLayerEffects = _chunkOVYQAYGHcjs.setLayerEffects; exports.setLayerEffectsEnabled = _chunkOVYQAYGHcjs.setLayerEffectsEnabled; exports.setLayerMask = _chunkOVYQAYGHcjs.setLayerMask; exports.setLayerProperties = _chunkOVYQAYGHcjs.setLayerProperties; exports.setLum = _chunkCWM3CUUXcjs.setLum; exports.setPigmentColor = _chunkCWM3CUUXcjs.setPigmentColor; exports.setRetouchChoice = setRetouchChoice; exports.setSmartFilterMask = _chunkOVYQAYGHcjs.setSmartFilterMask; exports.setSmartFiltersEnabled = _chunkOVYQAYGHcjs.setSmartFiltersEnabled; exports.setSmartPlacement = _chunkOVYQAYGHcjs.setSmartPlacement; exports.shadeTile = _chunkV7GWZIZKcjs.shadeTile; exports.shapeAsPixelLayer = _chunkOVYQAYGHcjs.shapeAsPixelLayer; exports.shapeFromAnnotation = _chunkOVYQAYGHcjs.shapeFromAnnotation; exports.shapeGeometryBounds = _chunkOVYQAYGHcjs.shapeGeometryBounds; exports.shapeLayers = _chunkOVYQAYGHcjs.shapeLayers; exports.shapeOutline = _chunkOVYQAYGHcjs.shapeOutline; exports.shapeRenderClip = _chunkOVYQAYGHcjs.shapeRenderClip; exports.shiftCoverage = _chunkOVYQAYGHcjs.shiftCoverage; exports.smartFilterRows = smartFilterRows; exports.smartObjectLayers = _chunkOVYQAYGHcjs.smartObjectLayers; exports.smoothCoverage = _chunkOVYQAYGHcjs.smoothCoverage; exports.smoothPoints = _chunkEBDCRTZIcjs.smoothPoints; exports.smudgeEffect = _chunk7NW46N7Icjs.smudgeEffect; exports.solidPaint = _chunkEBDCRTZIcjs.solidPaint; exports.solidSurface = _chunkCWM3CUUXcjs.solidSurface; exports.solveMembrane = _chunk7NW46N7Icjs.solveMembrane; exports.spliceRuns = _chunkEGZM52EOcjs.spliceRuns; exports.splitOverlayAnnotations = splitOverlayAnnotations; exports.sponge = _chunk7NW46N7Icjs.sponge; exports.spongeEffect = _chunk7NW46N7Icjs.spongeEffect; exports.spotHealPixels = _chunk7NW46N7Icjs.spotHealPixels; exports.spotHealWindow = _chunk7NW46N7Icjs.spotHealWindow; exports.srgb8ToLab = srgb8ToLab; exports.srgbByteToLinear = _chunkV7GWZIZKcjs.srgbByteToLinear; exports.srgbDecode = _chunkCWM3CUUXcjs.srgbDecode; exports.srgbEncode = _chunkCWM3CUUXcjs.srgbEncode; exports.srgbToLinear = _chunkOVYQAYGHcjs.srgbToLinear; exports.standardBlendMode = _chunkCWM3CUUXcjs.standardBlendMode; exports.stepSlotTs = _chunkV7GWZIZKcjs.stepSlotTs; exports.strokeGrainCatch = _chunkEBDCRTZIcjs.strokeGrainCatch; exports.styleAt = _chunkEGZM52EOcjs.styleAt; exports.sumHistograms = sumHistograms; exports.surfaceBytes = _chunkCWM3CUUXcjs.surfaceBytes; exports.surfaceDepth = _chunkCWM3CUUXcjs.surfaceDepth; exports.surfaceFromDeepPixels = _chunkCWM3CUUXcjs.surfaceFromDeepPixels; exports.surfaceFromPixels = _chunkCWM3CUUXcjs.surfaceFromPixels; exports.surfacesEqual = _chunkCWM3CUUXcjs.surfacesEqual; exports.tempTintToXy = _chunkOVYQAYGHcjs.tempTintToXy; exports.temperatureToKelvin = _chunkOVYQAYGHcjs.temperatureToKelvin; exports.textIndexAt = _chunkEGZM52EOcjs.textIndexAt; exports.textMatrix = _chunkOVYQAYGHcjs.textMatrix; exports.textOutlines = _chunkOVYQAYGHcjs.textOutlines; exports.textRange = _chunkOVYQAYGHcjs.textRange; exports.tileCoord = _chunkCWM3CUUXcjs.tileCoord; exports.tileKey = _chunkCWM3CUUXcjs.tileKey; exports.tileRect = _chunkCWM3CUUXcjs.tileRect; exports.tileSamples = _chunkCWM3CUUXcjs.tileSamples; exports.tileSamples16 = _chunkCWM3CUUXcjs.tileSamples16; exports.tileSamples32 = _chunkCWM3CUUXcjs.tileSamples32; exports.tilesInRect = _chunkCWM3CUUXcjs.tilesInRect; exports.tipFalloff = _chunkEBDCRTZIcjs.tipFalloff; exports.tipReach = _chunkEBDCRTZIcjs.tipReach; exports.tipShape = _chunkEBDCRTZIcjs.tipShape; exports.to16From32 = _chunkCWM3CUUXcjs.to16From32; exports.to16From8 = _chunkCWM3CUUXcjs.to16From8; exports.to32From16 = _chunkCWM3CUUXcjs.to32From16; exports.to32From8 = _chunkCWM3CUUXcjs.to32From8; exports.to8From16 = _chunkCWM3CUUXcjs.to8From16; exports.to8From32 = _chunkCWM3CUUXcjs.to8From32; exports.toHex = toHex; exports.toTextSpace = _chunkOVYQAYGHcjs.toTextSpace; exports.toneCurve = _chunkOVYQAYGHcjs.toneCurve; exports.toneLuts = _chunkOVYQAYGHcjs.toneLuts; exports.toneOf = _chunk7NW46N7Icjs.toneOf; exports.toneRange = toneRange; exports.transformHomography = _chunkOVYQAYGHcjs.transformHomography; exports.transformMap = _chunkOVYQAYGHcjs.transformMap; exports.transformShapeComponents = _chunkOVYQAYGHcjs.transformShapeComponents; exports.transformSurface = _chunkHGTDMKNEcjs.transformSurface; exports.transformTypeLayer = _chunkOVYQAYGHcjs.transformTypeLayer; exports.transformedBounds = _chunkHGTDMKNEcjs.transformedBounds; exports.transformedBox = _chunkOVYQAYGHcjs.transformedBox; exports.transformedPoint = _chunkOVYQAYGHcjs.transformedPoint; exports.translateLayer = _chunkOVYQAYGHcjs.translateLayer; exports.translateSurface = _chunkCWM3CUUXcjs.translateSurface; exports.typeAsPixelLayer = _chunkOVYQAYGHcjs.typeAsPixelLayer; exports.typeFrame = _chunkOVYQAYGHcjs.typeFrame; exports.typeFromAnnotation = _chunkOVYQAYGHcjs.typeFromAnnotation; exports.typeLayerAt = typeLayerAt; exports.typeLayerName = _chunkOVYQAYGHcjs.typeLayerName; exports.ungroupLayer = _chunkOVYQAYGHcjs.ungroupLayer; exports.uniformTile = _chunkCWM3CUUXcjs.uniformTile; exports.unionRect = _chunkOVYQAYGHcjs.unionRect; exports.unprojectCanvasPoint = _chunkOVYQAYGHcjs.unprojectCanvasPoint; exports.updateLayerEffect = _chunkOVYQAYGHcjs.updateLayerEffect; exports.updateLayerFilter = _chunkOVYQAYGHcjs.updateLayerFilter; exports.updateLayerMaskProps = _chunkOVYQAYGHcjs.updateLayerMaskProps; exports.updatePaintGradientStop = _chunkEBDCRTZIcjs.updatePaintGradientStop; exports.updateShapeLayer = _chunkOVYQAYGHcjs.updateShapeLayer; exports.updateSmartFilter = _chunkOVYQAYGHcjs.updateSmartFilter; exports.updateTypeLayer = _chunkOVYQAYGHcjs.updateTypeLayer; exports.userErrorMessage = _chunkOVYQAYGHcjs.userErrorMessage; exports.uvToXy = _chunkOVYQAYGHcjs.uvToXy; exports.validateEffectGradient = _chunkHGTDMKNEcjs.validateEffectGradient; exports.validateLayerEffect = _chunkHGTDMKNEcjs.validateLayerEffect; exports.validateLayerEffects = _chunkHGTDMKNEcjs.validateLayerEffects; exports.versionedDescriptorBytes = _chunkOVYQAYGHcjs.versionedDescriptorBytes; exports.vibranceLinear = _chunkOVYQAYGHcjs.vibranceLinear; exports.vibrancePixel = _chunkOVYQAYGHcjs.vibrancePixel; exports.walkDabs = _chunkEBDCRTZIcjs.walkDabs; exports.warpMeshEditPoints = _chunkEGZM52EOcjs.warpMeshEditPoints; exports.warpMeshGridCurves = _chunkEGZM52EOcjs.warpMeshGridCurves; exports.warpMeshParamAt = _chunkEGZM52EOcjs.warpMeshParamAt; exports.warpPresetMesh = _chunkEGZM52EOcjs.warpPresetMesh; exports.warpSurface = _chunkHGTDMKNEcjs.warpSurface; exports.watchCanvasViewport = watchCanvasViewport; exports.wbMatrix = _chunkOVYQAYGHcjs.wbMatrix; exports.wetGpuSupport = _chunkV7GWZIZKcjs.wetGpuSupport; exports.wetSimdSupported = _chunkV7GWZIZKcjs.wetSimdSupported; exports.wetSupport = _chunkV7GWZIZKcjs.wetSupport; exports.whiteBalanceFromSample = _chunkOVYQAYGHcjs.whiteBalanceFromSample; exports.whiteBalanceMatrix = _chunkOVYQAYGHcjs.whiteBalanceMatrix; exports.withFilterMaskSurface = _chunkOVYQAYGHcjs.withFilterMaskSurface; exports.withImagePlayback = withImagePlayback; exports.withNewIds = _chunkOVYQAYGHcjs.withNewIds; exports.writeAdjustmentBlock = _chunkOVYQAYGHcjs.writeAdjustmentBlock; exports.writeDeepRegion = _chunkCWM3CUUXcjs.writeDeepRegion; exports.writeLfx2 = _chunkOVYQAYGHcjs.writeLfx2; exports.writePatternBlock = _chunkOVYQAYGHcjs.writePatternBlock; exports.writePsd = _chunkOVYQAYGHcjs.writePsd; exports.writeRegion = _chunkCWM3CUUXcjs.writeRegion; exports.xyToTempTint = _chunkOVYQAYGHcjs.xyToTempTint; exports.xyToUv = _chunkOVYQAYGHcjs.xyToUv;