@pixerate/editor 0.118.0 → 0.120.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 (74) hide show
  1. package/THIRD_PARTY_NOTICES.md +1 -0
  2. package/dist/animation-editor/index.cjs +54 -54
  3. package/dist/animation-editor/index.d.cts +3 -3
  4. package/dist/animation-editor/index.d.ts +3 -3
  5. package/dist/animation-editor/index.js +2 -2
  6. package/dist/{chunk-R2JE6SA7.js → chunk-BOWUU4LJ.js} +42 -7
  7. package/dist/chunk-BOWUU4LJ.js.map +1 -0
  8. package/dist/{chunk-M7O4BJRH.cjs → chunk-DFLJHLKA.cjs} +36 -36
  9. package/dist/{chunk-M7O4BJRH.cjs.map → chunk-DFLJHLKA.cjs.map} +1 -1
  10. package/dist/{chunk-2J3LS7JZ.cjs → chunk-HTAFDTNR.cjs} +221 -186
  11. package/dist/chunk-HTAFDTNR.cjs.map +1 -0
  12. package/dist/{chunk-L2T6EJ5S.cjs → chunk-L3PXFMOF.cjs} +38 -25
  13. package/dist/chunk-L3PXFMOF.cjs.map +1 -0
  14. package/dist/{chunk-IVSNUXW7.js → chunk-T7IZDNSL.js} +37 -24
  15. package/dist/chunk-T7IZDNSL.js.map +1 -0
  16. package/dist/{chunk-BYAWOAST.cjs → chunk-TS5IEUW6.cjs} +26 -25
  17. package/dist/chunk-TS5IEUW6.cjs.map +1 -0
  18. package/dist/{chunk-VD2UDVF7.js → chunk-UMVW2Q66.js} +21 -5
  19. package/dist/chunk-UMVW2Q66.js.map +1 -0
  20. package/dist/{chunk-FODKPD44.cjs → chunk-VYW7JBTM.cjs} +790 -549
  21. package/dist/chunk-VYW7JBTM.cjs.map +1 -0
  22. package/dist/{chunk-T2P5TIZ6.js → chunk-WAI6ATHC.js} +2 -2
  23. package/dist/{chunk-EBSYZRSW.cjs → chunk-WMRIG4XQ.cjs} +21 -5
  24. package/dist/chunk-WMRIG4XQ.cjs.map +1 -0
  25. package/dist/{chunk-7LNZAWSJ.js → chunk-WORWH5K5.js} +699 -458
  26. package/dist/chunk-WORWH5K5.js.map +1 -0
  27. package/dist/{chunk-JHXMNOMF.js → chunk-YHW26LS2.js} +14 -13
  28. package/dist/chunk-YHW26LS2.js.map +1 -0
  29. package/dist/{export-Dul1SbPv.d.ts → export-D2D8hb_u.d.ts} +18 -4
  30. package/dist/{export-DMOuzgZZ.d.cts → export-fP2hZYjm.d.cts} +18 -4
  31. package/dist/{flow-4-OC-UkQ.d.cts → flow-A2Dj-69w.d.cts} +21 -9
  32. package/dist/{flow-Cb7lkPm8.d.ts → flow-C95atNoQ.d.ts} +21 -9
  33. package/dist/image-editor/index.cjs +1104 -979
  34. package/dist/image-editor/index.cjs.map +1 -1
  35. package/dist/image-editor/index.d.cts +5 -5
  36. package/dist/image-editor/index.d.ts +5 -5
  37. package/dist/image-editor/index.js +157 -32
  38. package/dist/image-editor/index.js.map +1 -1
  39. package/dist/paint/index.cjs +5 -3
  40. package/dist/paint/index.cjs.map +1 -1
  41. package/dist/paint/index.d.cts +2 -2
  42. package/dist/paint/index.d.ts +2 -2
  43. package/dist/paint/index.js +4 -2
  44. package/dist/paint-editor/index.cjs +147 -147
  45. package/dist/paint-editor/index.d.cts +4 -4
  46. package/dist/paint-editor/index.d.ts +4 -4
  47. package/dist/paint-editor/index.js +4 -4
  48. package/dist/raster/index.cjs +2 -2
  49. package/dist/raster/index.js +1 -1
  50. package/dist/{svg-CVdFc80-.d.cts → svg-S9zzvqaZ.d.cts} +5 -1
  51. package/dist/{svg-DlEuhwoX.d.ts → svg-leZpRsJB.d.ts} +5 -1
  52. package/dist/{types-CDLGhAZp.d.ts → types-BgwxFWvn.d.ts} +59 -3
  53. package/dist/{types-Tfly4Aya.d.cts → types-DdRTDnza.d.cts} +59 -3
  54. package/dist/vector/index.cjs +1314 -1009
  55. package/dist/vector/index.cjs.map +1 -1
  56. package/dist/vector/index.d.cts +110 -5
  57. package/dist/vector/index.d.ts +110 -5
  58. package/dist/vector/index.js +319 -14
  59. package/dist/vector/index.js.map +1 -1
  60. package/package.json +1 -1
  61. package/skills/pixerate-image-editor/references/photoshop-files.md +5 -2
  62. package/skills/pixerate-vector/SKILL.md +13 -1
  63. package/skills/pixerate-vector/references/commands.md +2 -0
  64. package/dist/chunk-2J3LS7JZ.cjs.map +0 -1
  65. package/dist/chunk-7LNZAWSJ.js.map +0 -1
  66. package/dist/chunk-BYAWOAST.cjs.map +0 -1
  67. package/dist/chunk-EBSYZRSW.cjs.map +0 -1
  68. package/dist/chunk-FODKPD44.cjs.map +0 -1
  69. package/dist/chunk-IVSNUXW7.js.map +0 -1
  70. package/dist/chunk-JHXMNOMF.js.map +0 -1
  71. package/dist/chunk-L2T6EJ5S.cjs.map +0 -1
  72. package/dist/chunk-R2JE6SA7.js.map +0 -1
  73. package/dist/chunk-VD2UDVF7.js.map +0 -1
  74. /package/dist/{chunk-T2P5TIZ6.js.map → chunk-WAI6ATHC.js.map} +0 -0
@@ -7,7 +7,7 @@ var _chunkSMJGE7HMcjs = require('../chunk-SMJGE7HM.cjs');
7
7
 
8
8
 
9
9
 
10
- var _chunk2J3LS7JZcjs = require('../chunk-2J3LS7JZ.cjs');
10
+ var _chunkHTAFDTNRcjs = require('../chunk-HTAFDTNR.cjs');
11
11
 
12
12
 
13
13
 
@@ -15,7 +15,7 @@ var _chunk2J3LS7JZcjs = require('../chunk-2J3LS7JZ.cjs');
15
15
 
16
16
 
17
17
 
18
- var _chunkEBSYZRSWcjs = require('../chunk-EBSYZRSW.cjs');
18
+ var _chunkWMRIG4XQcjs = require('../chunk-WMRIG4XQ.cjs');
19
19
 
20
20
 
21
21
 
@@ -68,7 +68,7 @@ var _chunkEJVDBITDcjs = require('../chunk-EJVDBITD.cjs');
68
68
 
69
69
 
70
70
 
71
- var _chunkL2T6EJ5Scjs = require('../chunk-L2T6EJ5S.cjs');
71
+ var _chunkL3PXFMOFcjs = require('../chunk-L3PXFMOF.cjs');
72
72
 
73
73
 
74
74
 
@@ -102,7 +102,7 @@ var _chunkCOAMRKVIcjs = require('../chunk-COAMRKVI.cjs');
102
102
 
103
103
 
104
104
  var _chunkEGFUVXKKcjs = require('../chunk-EGFUVXKK.cjs');
105
- require('../chunk-FODKPD44.cjs');
105
+ require('../chunk-VYW7JBTM.cjs');
106
106
  require('../chunk-XGD3FSNC.cjs');
107
107
  require('../chunk-EMQWJA3G.cjs');
108
108
  require('../chunk-MR3Z4OQI.cjs');
@@ -717,7 +717,7 @@ var DryStroke = (_class5 = class {
717
717
  }
718
718
 
719
719
 
720
- __init12() {this.coverage = new (0, _chunkL2T6EJ5Scjs.CoverageMap)()}
720
+ __init12() {this.coverage = new (0, _chunkL3PXFMOFcjs.CoverageMap)()}
721
721
  __init13() {this.dabCount = 0}
722
722
 
723
723
 
@@ -751,11 +751,11 @@ var DryStroke = (_class5 = class {
751
751
  const hardness = this.brush.tip.hardness;
752
752
  const grain = this.options.grain;
753
753
  for (const d of dabs) {
754
- const rect = _chunkL2T6EJ5Scjs.dabRect.call(void 0, d, hardness);
754
+ const rect = _chunkL3PXFMOFcjs.dabRect.call(void 0, d, hardness);
755
755
  const n = rect.width * rect.height;
756
756
  if (this.buf.length < n) this.buf = new Float32Array(n);
757
757
  const vals = this.buf.subarray(0, n);
758
- _chunkL2T6EJ5Scjs.rasterizeDab.call(void 0, d, hardness, rect, vals);
758
+ _chunkL3PXFMOFcjs.rasterizeDab.call(void 0, d, hardness, rect, vals);
759
759
  if (this.depth > 0 && grain) {
760
760
  for (let yy = 0, k = 0; yy < rect.height; yy++) {
761
761
  const y = rect.y + yy + 0.5;
@@ -905,7 +905,7 @@ var StickerSpray = (_class6 = class {
905
905
  const spacing = Math.max(0.05, 1 / Math.max(0.05, b.sticker.density * 4));
906
906
  const walk = { ...b, tip: { ...b.tip, spacing }, dynamics: { ...b.dynamics, scatter: 0, sizeJitter: 0, angleJitter: 0 } };
907
907
  this.walkers = this.copies.map((c, i) => new PenDabWalker(walk, init.seed + i * 7919 | 0, c.linear));
908
- this.medium = new (0, _chunkL2T6EJ5Scjs.TileMedium)(init.target, {});
908
+ this.medium = new (0, _chunkL3PXFMOFcjs.TileMedium)(init.target, {});
909
909
  this.next = init.nextId;
910
910
  }
911
911
 
@@ -969,7 +969,7 @@ var StickerSpray = (_class6 = class {
969
969
  }
970
970
  }, _class6);
971
971
  function renderStickers(stickers, target) {
972
- const medium = new (0, _chunkL2T6EJ5Scjs.TileMedium)(target, {});
972
+ const medium = new (0, _chunkL3PXFMOFcjs.TileMedium)(target, {});
973
973
  for (const s of stickers) drawSticker(medium, s);
974
974
  }
975
975
  function normalizeStickerUpdate(u) {
@@ -1038,7 +1038,7 @@ var MarkStroke = (_class7 = class {
1038
1038
  }
1039
1039
 
1040
1040
 
1041
- __init21() {this.coverage = new (0, _chunkL2T6EJ5Scjs.CoverageMap)()}
1041
+ __init21() {this.coverage = new (0, _chunkL3PXFMOFcjs.CoverageMap)()}
1042
1042
  __init22() {this.dabCount = 0}
1043
1043
 
1044
1044
 
@@ -1079,12 +1079,12 @@ var MarkStroke = (_class7 = class {
1079
1079
  if (!(r > 0.05) || !(alpha > 0)) return;
1080
1080
  const dab = { x, y, radius: Math.max(0.5, r), alpha: Math.min(1, alpha), opacity: Math.min(1, opacity), angle: 0, roundness: 1 };
1081
1081
  const hardness = this.brush.tip.hardness;
1082
- const rect = _chunkL2T6EJ5Scjs.dabRect.call(void 0, dab, hardness);
1082
+ const rect = _chunkL3PXFMOFcjs.dabRect.call(void 0, dab, hardness);
1083
1083
  const n = rect.width * rect.height;
1084
1084
  if (n <= 0) return;
1085
1085
  if (this.buf.length < n) this.buf = new Float32Array(n);
1086
1086
  const vals = this.buf.subarray(0, n);
1087
- _chunkL2T6EJ5Scjs.rasterizeDab.call(void 0, dab, hardness, rect, vals);
1087
+ _chunkL3PXFMOFcjs.rasterizeDab.call(void 0, dab, hardness, rect, vals);
1088
1088
  const grain = this.options.grain;
1089
1089
  if (this.depth > 0 && grain) {
1090
1090
  for (let yy = 0, k = 0; yy < rect.height; yy++)
@@ -1438,7 +1438,7 @@ function normalizePaintBrush(raw = {}, base) {
1438
1438
  if (rb.dirty !== void 0) mixerIn.cleanEachStroke = !rb.dirty;
1439
1439
  if (rb.mixing !== void 0) mixerIn.mixing = rb.mixing;
1440
1440
  }
1441
- const mixer = _chunkL2T6EJ5Scjs.normalizeMixer.call(void 0, mixerIn);
1441
+ const mixer = _chunkL3PXFMOFcjs.normalizeMixer.call(void 0, mixerIn);
1442
1442
  let behavior = normalizeBehavior(rb, b.behavior);
1443
1443
  if (engine === "mixer") behavior = { ...behavior, pickup: mixer.wet, mix: mixer.mix, dirty: !mixer.cleanEachStroke, mixing: mixer.mixing };
1444
1444
  return {
@@ -1446,7 +1446,7 @@ function normalizePaintBrush(raw = {}, base) {
1446
1446
  name: typeof raw.name === "string" && raw.name.trim() ? raw.name.trim().slice(0, 80) : b.name,
1447
1447
  category: PAINT_BRUSH_CATEGORIES.includes(raw.category) ? raw.category : b.category,
1448
1448
  engine,
1449
- tip: _chunkL2T6EJ5Scjs.normalizeBrush.call(void 0, { ...b.tip, ..._nullishCoalesce(raw.tip, () => ( {})) }),
1449
+ tip: _chunkL3PXFMOFcjs.normalizeBrush.call(void 0, { ...b.tip, ..._nullishCoalesce(raw.tip, () => ( {})) }),
1450
1450
  grain: unit4(raw.grain, b.grain),
1451
1451
  pressureSmoothing: range(raw.pressureSmoothing, 0, 0.95, b.pressureSmoothing),
1452
1452
  rotation: BRUSH_ROTATIONS.includes(raw.rotation) ? raw.rotation : b.rotation,
@@ -1454,8 +1454,8 @@ function normalizePaintBrush(raw = {}, base) {
1454
1454
  mixer,
1455
1455
  loadsColor: typeof raw.loadsColor === "boolean" ? raw.loadsColor : b.loadsColor,
1456
1456
  behavior,
1457
- blender: _chunkL2T6EJ5Scjs.normalizeBlender.call(void 0, _nullishCoalesce(raw.blender, () => ( {})), b.blender),
1458
- smudge: _chunkL2T6EJ5Scjs.normalizeSmudge.call(void 0, _nullishCoalesce(raw.smudge, () => ( {})), b.smudge),
1457
+ blender: _chunkL3PXFMOFcjs.normalizeBlender.call(void 0, _nullishCoalesce(raw.blender, () => ( {})), b.blender),
1458
+ smudge: _chunkL3PXFMOFcjs.normalizeSmudge.call(void 0, _nullishCoalesce(raw.smudge, () => ( {})), b.smudge),
1459
1459
  wet: normalizeWetBrush(_nullishCoalesce(raw.wet, () => ( {})), _nullishCoalesce(b.wet, () => ( DEFAULT_WET_BRUSH))),
1460
1460
  impasto: normalizeImpasto(_nullishCoalesce(raw.impasto, () => ( {})), _nullishCoalesce(b.impasto, () => ( DEFAULT_IMPASTO))),
1461
1461
  particle: normalizeParticle(_nullishCoalesce(raw.particle, () => ( {})), _nullishCoalesce(b.particle, () => ( DEFAULT_PARTICLE))),
@@ -1469,16 +1469,16 @@ var BASE_BRUSH = {
1469
1469
  name: "Round",
1470
1470
  category: "custom",
1471
1471
  engine: "dab",
1472
- tip: { ..._chunkL2T6EJ5Scjs.DEFAULT_BRUSH },
1472
+ tip: { ..._chunkL3PXFMOFcjs.DEFAULT_BRUSH },
1473
1473
  grain: 0,
1474
1474
  pressureSmoothing: 0,
1475
1475
  rotation: "fixed",
1476
1476
  dynamics: { ...DEFAULT_DYNAMICS },
1477
- mixer: { ..._chunkL2T6EJ5Scjs.DEFAULT_MIXER },
1477
+ mixer: { ..._chunkL3PXFMOFcjs.DEFAULT_MIXER },
1478
1478
  loadsColor: true,
1479
1479
  behavior: { ...DEFAULT_BEHAVIOR, multicolor: { ...DEFAULT_MULTI_COLOR, colors: [] } },
1480
- blender: { ..._chunkL2T6EJ5Scjs.DEFAULT_BLENDER },
1481
- smudge: { ..._chunkL2T6EJ5Scjs.DEFAULT_SMUDGE },
1480
+ blender: { ..._chunkL3PXFMOFcjs.DEFAULT_BLENDER },
1481
+ smudge: { ..._chunkL3PXFMOFcjs.DEFAULT_SMUDGE },
1482
1482
  wet: { ...DEFAULT_WET_BRUSH },
1483
1483
  impasto: { ...DEFAULT_IMPASTO },
1484
1484
  particle: { ...DEFAULT_PARTICLE },
@@ -2027,20 +2027,20 @@ var PaintDabStroke = (_class9 = class {
2027
2027
  this.smoother = new PenSmoother(brush.tip.smoothing, brush.pressureSmoothing);
2028
2028
  this.copies = _optionalChain([options, 'access', _7 => _7.copies, 'optionalAccess', _8 => _8.length]) ? options.copies : [IDENTITY_COPY];
2029
2029
  const exchanging = brush.engine === "mixer" || brush.engine === "dab";
2030
- const rates = brush.engine === "mixer" ? _chunkL2T6EJ5Scjs.mixerRates.call(void 0, brush.mixer) : _chunkL2T6EJ5Scjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, 1, brush.behavior.mixing);
2030
+ const rates = brush.engine === "mixer" ? _chunkL3PXFMOFcjs.mixerRates.call(void 0, brush.mixer) : _chunkL3PXFMOFcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, 1, brush.behavior.mixing);
2031
2031
  this.mixing = brush.engine === "mixer" ? brush.mixer.mixing : brush.behavior.mixing;
2032
2032
  this.states = this.copies.map((c, i) => ({
2033
2033
  walker: new PenDabWalker(brush, (_nullishCoalesce(options.seed, () => ( 0))) + i * 7919 | 0, c.linear),
2034
- exchange: exchanging ? new (0, _chunkL2T6EJ5Scjs.PaintExchange)(rates, options.load) : null,
2035
- smudge: brush.engine === "smudge" ? new (0, _chunkL2T6EJ5Scjs.SmudgeTip)(brush.smudge, brush.tip.size * (1 + brush.dynamics.tiltSize * 1.5)) : null
2034
+ exchange: exchanging ? new (0, _chunkL3PXFMOFcjs.PaintExchange)(rates, options.load) : null,
2035
+ smudge: brush.engine === "smudge" ? new (0, _chunkL3PXFMOFcjs.SmudgeTip)(brush.smudge, brush.tip.size * (1 + brush.dynamics.tiltSize * 1.5)) : null
2036
2036
  }));
2037
- this.medium = new (0, _chunkL2T6EJ5Scjs.TileMedium)(options.target, brush.engine === "dab" ? { blend: brush.tip.blend } : {});
2037
+ this.medium = new (0, _chunkL3PXFMOFcjs.TileMedium)(options.target, brush.engine === "dab" ? { blend: brush.tip.blend } : {});
2038
2038
  this.depth = options.grain && !options.grain.flat ? Math.min(1, Math.max(0, options.paperDepth * brush.grain)) : 0;
2039
- this.coverage = brush.engine === "dab" ? new (0, _chunkL2T6EJ5Scjs.CoverageMap)() : null;
2039
+ this.coverage = brush.engine === "dab" ? new (0, _chunkL3PXFMOFcjs.CoverageMap)() : null;
2040
2040
  const mc = brush.behavior.multicolor;
2041
2041
  this.palette = exchanging && mc.mode !== "off" ? multiColorPalette(mc, options.color, options.secondary) : null;
2042
2042
  this.gradient = this.palette && mc.mode === "tip" ? multiColorGradient(this.palette, mc.softness, this.mixing) : null;
2043
- this.scratch = brush.engine === "blender" ? _chunkL2T6EJ5Scjs.createBlenderScratch.call(void 0, ) : null;
2043
+ this.scratch = brush.engine === "blender" ? _chunkL3PXFMOFcjs.createBlenderScratch.call(void 0, ) : null;
2044
2044
  }
2045
2045
 
2046
2046
 
@@ -2095,7 +2095,7 @@ var PaintDabStroke = (_class9 = class {
2095
2095
  }
2096
2096
  paintDabs(copy, dabs, rects) {
2097
2097
  for (const d of dabs) {
2098
- const rect = _chunkL2T6EJ5Scjs.dabRect.call(void 0, d, this.brush.tip.hardness);
2098
+ const rect = _chunkL3PXFMOFcjs.dabRect.call(void 0, d, this.brush.tip.hardness);
2099
2099
  if (rect.width <= 0 || rect.height <= 0) continue;
2100
2100
  this.dab(copy, d, rect);
2101
2101
  rects.push(rect);
@@ -2111,7 +2111,7 @@ var PaintDabStroke = (_class9 = class {
2111
2111
  }
2112
2112
  const tip = this.tip.subarray(0, n);
2113
2113
  tip.fill(0);
2114
- _chunkL2T6EJ5Scjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.brush.tip.hardness, rect, tip);
2114
+ _chunkL3PXFMOFcjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.brush.tip.hardness, rect, tip);
2115
2115
  if (!(this.depth > 0 && this.options.grain)) return { tip, cov: tip };
2116
2116
  const cov = this.cov.subarray(0, n);
2117
2117
  const grain = this.options.grain;
@@ -2126,7 +2126,7 @@ var PaintDabStroke = (_class9 = class {
2126
2126
  const { tip, cov } = this.rasterize(d, rect);
2127
2127
  const st = this.states[copy];
2128
2128
  if (brush.engine === "blender") {
2129
- _chunkL2T6EJ5Scjs.blenderDab.call(void 0, this.medium, rect, cov, d.opacity * d.alpha * brush.tip.opacity, d.radius, brush.blender, this.scratch);
2129
+ _chunkL3PXFMOFcjs.blenderDab.call(void 0, this.medium, rect, cov, d.opacity * d.alpha * brush.tip.opacity, d.radius, brush.blender, this.scratch);
2130
2130
  return;
2131
2131
  }
2132
2132
  if (brush.engine === "smudge") {
@@ -2280,10 +2280,10 @@ function lightTile(color, height, heightAround, material, light) {
2280
2280
  const nh = Math.max(0, nx * hx + ny * hy + nz * hz);
2281
2281
  const spec = Math.max(0, Math.pow(nh, shininess) - Math.pow(hz, shininess)) * (0.25 + 0.75 * gloss) * light.relief;
2282
2282
  for (let c = 0; c < 3; c++) {
2283
- const a = _chunkL2T6EJ5Scjs.SRGB_TO_LINEAR[color[i + c]];
2283
+ const a = _chunkL3PXFMOFcjs.SRGB_TO_LINEAR[color[i + c]];
2284
2284
  const tint = metal * a + (1 - metal);
2285
2285
  const v = a * shade * (1 - 0.35 * metal) + spec * tint * (1 + metal);
2286
- out[i + c] = _chunkL2T6EJ5Scjs.linearToSrgb8.call(void 0, v);
2286
+ out[i + c] = _chunkL3PXFMOFcjs.linearToSrgb8.call(void 0, v);
2287
2287
  }
2288
2288
  }
2289
2289
  }
@@ -2346,15 +2346,15 @@ var ThickStrokeDriver = (_class11 = class {
2346
2346
  this.smoother = new PenSmoother(b.tip.smoothing, b.pressureSmoothing);
2347
2347
  const copies = init.copies.length ? init.copies : [IDENTITY_COPY];
2348
2348
  this.copies = copies;
2349
- const rates = _chunkL2T6EJ5Scjs.exchangeRates.call(void 0, b.behavior.pickup, b.behavior.mix, 1, b.behavior.mixing);
2349
+ const rates = _chunkL3PXFMOFcjs.exchangeRates.call(void 0, b.behavior.pickup, b.behavior.mix, 1, b.behavior.mixing);
2350
2350
  this.states = copies.map((c, i) => ({
2351
2351
  walker: new PenDabWalker(b, init.seed + i * 7919 | 0, c.linear),
2352
- exchange: new (0, _chunkL2T6EJ5Scjs.PaintExchange)(rates, init.load),
2353
- smudge: b.impasto.tool === "knife" ? new (0, _chunkL2T6EJ5Scjs.SmudgeTip)({ strength: 0.85, length: 0.6 + 0.38 * b.impasto.drag, mixing: b.behavior.mixing }, b.tip.size * 1.2) : null,
2352
+ exchange: new (0, _chunkL3PXFMOFcjs.PaintExchange)(rates, init.load),
2353
+ smudge: b.impasto.tool === "knife" ? new (0, _chunkL3PXFMOFcjs.SmudgeTip)({ strength: 0.85, length: 0.6 + 0.38 * b.impasto.drag, mixing: b.behavior.mixing }, b.tip.size * 1.2) : null,
2354
2354
  carried: null,
2355
2355
  amount: 1
2356
2356
  }));
2357
- this.medium = new (0, _chunkL2T6EJ5Scjs.TileMedium)(init.target, {});
2357
+ this.medium = new (0, _chunkL3PXFMOFcjs.TileMedium)(init.target, {});
2358
2358
  }
2359
2359
 
2360
2360
  __init36() {this.dabCount = 0}
@@ -2448,7 +2448,7 @@ var ThickStrokeDriver = (_class11 = class {
2448
2448
  }
2449
2449
  applyDabs(copy, dabs, rects) {
2450
2450
  for (const d of dabs) {
2451
- const rect = _chunkL2T6EJ5Scjs.dabRect.call(void 0, d, this.init.brush.tip.hardness);
2451
+ const rect = _chunkL3PXFMOFcjs.dabRect.call(void 0, d, this.init.brush.tip.hardness);
2452
2452
  if (rect.width <= 0 || rect.height <= 0) continue;
2453
2453
  this.dab(copy, d, rect);
2454
2454
  rects.push(rect);
@@ -2463,7 +2463,7 @@ var ThickStrokeDriver = (_class11 = class {
2463
2463
  const n = rect.width * rect.height;
2464
2464
  if (this.tip.length < n) this.tip = new Float32Array(n);
2465
2465
  const tip = this.tip.subarray(0, n);
2466
- _chunkL2T6EJ5Scjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, b.tip.hardness, rect, tip);
2466
+ _chunkL3PXFMOFcjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, b.tip.hardness, rect, tip);
2467
2467
  const sel = this.init.target.selection;
2468
2468
  if (sel) {
2469
2469
  for (let yy = 0, p = 0; yy < rect.height; yy++)
@@ -2760,7 +2760,7 @@ var PaintStrokeSession = (_class12 = class {
2760
2760
  const changed = d.dabCount > 0;
2761
2761
  this.result = { layerId: this.layerId, bounds: changed ? d.bounds : null, dabs: d.dabCount, strokeId: null, wet: true };
2762
2762
  const carried = d.load;
2763
- if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried : _chunkL2T6EJ5Scjs.cleanMixer.call(void 0, carried);
2763
+ if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried : _chunkL3PXFMOFcjs.cleanMixer.call(void 0, carried);
2764
2764
  this.host.commit(this, changed ? this.init.wet.surface() : null, false);
2765
2765
  }
2766
2766
  update(rects) {
@@ -2786,7 +2786,7 @@ var PaintStrokeSession = (_class12 = class {
2786
2786
  const src = _nullishCoalesce(_optionalChain([this, 'access', _30 => _30.base, 'access', _31 => _31.tiles, 'access', _32 => _32.get, 'call', _33 => _33(key), 'optionalAccess', _34 => _34.data]), () => ( defaultTile(this.base)));
2787
2787
  const prev = this.touched.has(key) ? _optionalChain([this, 'access', _35 => _35.live, 'access', _36 => _36.get, 'call', _37 => _37(key), 'optionalAccess', _38 => _38.data]) : void 0;
2788
2788
  this.touched.add(key);
2789
- const data = _chunkL2T6EJ5Scjs.applyStrokeToTile.call(void 0, this.dry.coverage, src, ch, tx, ty, this.apply, prev ? { into: prev, region: r } : {});
2789
+ const data = _chunkL3PXFMOFcjs.applyStrokeToTile.call(void 0, this.dry.coverage, src, ch, tx, ty, this.apply, prev ? { into: prev, region: r } : {});
2790
2790
  this.live.set(key, { data, uniform: null });
2791
2791
  }
2792
2792
  this.host.update(this.layerId, new (0, _chunk7ISPWEJAcjs.TiledSurface)(ch, new Map(this.live), this.base.defaultValue), rects);
@@ -2821,7 +2821,7 @@ var PaintStrokeSession = (_class12 = class {
2821
2821
  const dabs = this.dry ? this.dry.dabCount : this.thickDriver ? this.thickDriver.dabCount : this.stickerSpray ? this.stickerSpray.dabCount : this.wet.dabCount;
2822
2822
  this.result = { layerId: this.layerId, bounds: changed ? this.bounds : null, dabs, strokeId: null };
2823
2823
  const carried = _nullishCoalesce(_optionalChain([this, 'access', _39 => _39.wet, 'optionalAccess', _40 => _40.load]), () => ( _optionalChain([this, 'access', _41 => _41.thickDriver, 'optionalAccess', _42 => _42.load])));
2824
- if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried : _chunkL2T6EJ5Scjs.cleanMixer.call(void 0, carried);
2824
+ if (carried) this.result.mixerLoad = this.init.brush.behavior.dirty ? carried : _chunkL3PXFMOFcjs.cleanMixer.call(void 0, carried);
2825
2825
  this.host.commit(this, surface, false);
2826
2826
  return this.result;
2827
2827
  }
@@ -2834,15 +2834,15 @@ var PaintStrokeSession = (_class12 = class {
2834
2834
  }, _class12);
2835
2835
  function mixerLoadForStroke(brush, current, color) {
2836
2836
  if (!brush.loadsColor) return { reservoir: null, amount: 0, pickup: brush.mixer.cleanEachStroke ? null : current.pickup };
2837
- if (brush.mixer.loadEachStroke || !current.reservoir) return _chunkL2T6EJ5Scjs.loadMixer.call(void 0, current, color);
2837
+ if (brush.mixer.loadEachStroke || !current.reservoir) return _chunkL3PXFMOFcjs.loadMixer.call(void 0, current, color);
2838
2838
  return current;
2839
2839
  }
2840
2840
  function brushLoadForStroke(brush, current, color) {
2841
2841
  if (brush.engine === "mixer") return mixerLoadForStroke(brush, current, color);
2842
2842
  if (brush.engine === "impasto") return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
2843
- if (brush.engine === "wet") return brush.wet.tool === "paint" ? { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null } : _chunkL2T6EJ5Scjs.EMPTY_MIXER_LOAD;
2843
+ if (brush.engine === "wet") return brush.wet.tool === "paint" ? { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null } : _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD;
2844
2844
  if (usesPaintExchange(brush)) return { reservoir: [color[0], color[1], color[2]], amount: 1, pickup: brush.behavior.dirty ? current.pickup : null };
2845
- return _chunkL2T6EJ5Scjs.EMPTY_MIXER_LOAD;
2845
+ return _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD;
2846
2846
  }
2847
2847
 
2848
2848
  // src/paint-editor/stencils.ts
@@ -3223,7 +3223,7 @@ var PROFILE = {
3223
3223
  }
3224
3224
  };
3225
3225
  function createPaintCompositor() {
3226
- return new (0, _chunkEBSYZRSWcjs.RasterCompositor)(PROFILE);
3226
+ return new (0, _chunkWMRIG4XQcjs.RasterCompositor)(PROFILE);
3227
3227
  }
3228
3228
  function downsampleRgba(data, width, height, tw, th) {
3229
3229
  tw = Math.max(1, Math.round(tw));
@@ -3298,11 +3298,11 @@ function header(state, options) {
3298
3298
  return out;
3299
3299
  }
3300
3300
  function serializePaintDocument(state, options = {}) {
3301
- const { layers, assets } = _chunk2J3LS7JZcjs.serializeLayers.call(void 0, state.layers);
3301
+ const { layers, assets } = _chunkHTAFDTNRcjs.serializeLayers.call(void 0, state.layers);
3302
3302
  return { ...header(state, options), layers, assets };
3303
3303
  }
3304
3304
  async function serializePaintDocumentExternal(state, store, options = {}) {
3305
- const { layers, assets } = await _chunk2J3LS7JZcjs.serializeLayersExternal.call(void 0, state.layers, store);
3305
+ const { layers, assets } = await _chunkHTAFDTNRcjs.serializeLayersExternal.call(void 0, state.layers, store);
3306
3306
  return { ...header(state, options), layers, assets };
3307
3307
  }
3308
3308
  function paintLayersOnly(layers, problems) {
@@ -3339,9 +3339,9 @@ function deserializePaintDocument(raw) {
3339
3339
  const canvas = normalizeCanvas({ width: r.width, height: r.height, dpi: _nullishCoalesce(r.dpi, () => ( void 0)) });
3340
3340
  const paper = normalizePaper(_nullishCoalesce(r.paper, () => ( {})));
3341
3341
  const assets = r.assets && typeof r.assets === "object" ? r.assets : {};
3342
- const layers = paintLayersOnly(_chunk2J3LS7JZcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
3342
+ const layers = paintLayersOnly(_chunkHTAFDTNRcjs.deserializeLayers.call(void 0, r.layers, { assets, problems }), problems);
3343
3343
  const wanted = typeof r.activeLayerId === "string" ? r.activeLayerId : null;
3344
- const activeLayerId = wanted && _chunkEBSYZRSWcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers), 'access', _73 => _73.filter, 'call', _74 => _74((l) => l.type === "pixel"), 'access', _75 => _75.pop, 'call', _76 => _76(), 'optionalAccess', _77 => _77.id]), () => ( null));
3344
+ const activeLayerId = wanted && _chunkWMRIG4XQcjs.findLayer.call(void 0, layers, wanted) ? wanted : _nullishCoalesce(_optionalChain([_chunkWMRIG4XQcjs.flattenLayers.call(void 0, layers), 'access', _73 => _73.filter, 'call', _74 => _74((l) => l.type === "pixel"), 'access', _75 => _75.pop, 'call', _76 => _76(), 'optionalAccess', _77 => _77.id]), () => ( null));
3345
3345
  const wetEvents = Array.isArray(r.wetEvents) ? r.wetEvents.filter((e) => e && typeof e === "object" && Number.isInteger(e.clock) && typeof e.kind === "string") : [];
3346
3346
  const state = { canvas, paper, layers, activeLayerId, strokes: readStrokes(r.strokes, problems) };
3347
3347
  if (wetEvents.length) state.wetEvents = wetEvents;
@@ -3353,7 +3353,7 @@ async function deserializePaintDocumentAsync(raw, store) {
3353
3353
  if (!raw || typeof raw !== "object") throw new Error("Not a paint document: expected a JSON object.");
3354
3354
  const r = raw;
3355
3355
  const problems = [];
3356
- const assets = await _chunk2J3LS7JZcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
3356
+ const assets = await _chunkHTAFDTNRcjs.resolveExternalAssets.call(void 0, _nullishCoalesce(r.assets, () => ( {})), store, problems);
3357
3357
  const loaded = deserializePaintDocument({ ...r, assets });
3358
3358
  return { ...loaded, problems: [...problems, ...loaded.problems] };
3359
3359
  }
@@ -3501,7 +3501,7 @@ function downloadBytes(bytes, fileName, mimeType) {
3501
3501
 
3502
3502
  // src/paint-editor/wet.ts
3503
3503
  var STROKE_WATER = 0.9;
3504
- var STROKE_MASS = _chunkL2T6EJ5Scjs.PIGMENT_UNIT * 2.5;
3504
+ var STROKE_MASS = _chunkL3PXFMOFcjs.PIGMENT_UNIT * 2.5;
3505
3505
  var COVERAGE_STEPS = 4096;
3506
3506
  function union2(a, b) {
3507
3507
  if (!a) return { ...b };
@@ -3530,15 +3530,15 @@ var WetStrokeDriver = (_class13 = class {
3530
3530
  const spacing = Math.max(0.02, brush.tip.spacing);
3531
3531
  const perDab = Math.min(1, spacing * 1.2);
3532
3532
  const thin = wet.thinner;
3533
- this.medium = new (0, _chunkL2T6EJ5Scjs.WetMedium)(init.world, init.laneId, {
3533
+ this.medium = new (0, _chunkL3PXFMOFcjs.WetMedium)(init.world, init.laneId, {
3534
3534
  water: STROKE_WATER * Math.min(1, wet.water * (1 + thin)) * perDab,
3535
3535
  mass: STROKE_MASS * wet.pigment * (1 - 0.6 * thin) * perDab,
3536
3536
  body: wet.body * (1 - thin)
3537
3537
  });
3538
- const rates = _chunkL2T6EJ5Scjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, wet.load, brush.behavior.mixing);
3538
+ const rates = _chunkL3PXFMOFcjs.exchangeRates.call(void 0, brush.behavior.pickup, brush.behavior.mix, wet.load, brush.behavior.mixing);
3539
3539
  this.states = copies.map((c, i) => ({
3540
3540
  walker: new PenDabWalker(brush, init.seed + i * 7919 | 0, c.linear),
3541
- exchange: wet.tool === "paint" ? new (0, _chunkL2T6EJ5Scjs.PaintExchange)(rates, init.load) : null,
3541
+ exchange: wet.tool === "paint" ? new (0, _chunkL3PXFMOFcjs.PaintExchange)(rates, init.load) : null,
3542
3542
  last: null
3543
3543
  }));
3544
3544
  this.copies = copies;
@@ -3612,7 +3612,7 @@ var WetStrokeDriver = (_class13 = class {
3612
3612
  }
3613
3613
  applyDabs(copy, dabs, rects) {
3614
3614
  for (const d of dabs) {
3615
- const rect = _chunkL2T6EJ5Scjs.dabRect.call(void 0, d, this.init.brush.tip.hardness);
3615
+ const rect = _chunkL3PXFMOFcjs.dabRect.call(void 0, d, this.init.brush.tip.hardness);
3616
3616
  if (rect.width <= 0 || rect.height <= 0) continue;
3617
3617
  this.dab(copy, d, rect);
3618
3618
  rects.push(rect);
@@ -3629,7 +3629,7 @@ var WetStrokeDriver = (_class13 = class {
3629
3629
  const tip = this.tip.subarray(0, n);
3630
3630
  const cov = this.cov.subarray(0, n);
3631
3631
  tip.fill(0);
3632
- _chunkL2T6EJ5Scjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.init.brush.tip.hardness, rect, tip);
3632
+ _chunkL3PXFMOFcjs.rasterizeDab.call(void 0, { ...d, alpha: 1 }, this.init.brush.tip.hardness, rect, tip);
3633
3633
  const grain = this.depth > 0 ? this.init.grain : null;
3634
3634
  const mask = this.init.mask;
3635
3635
  for (let yy = 0, k = 0; yy < rect.height; yy++) {
@@ -3708,7 +3708,7 @@ var PaintWetLayers = (_class14 = class {
3708
3708
 
3709
3709
 
3710
3710
  __init69() {this.world = null}
3711
- __init70() {this.tilt = { ..._chunkL2T6EJ5Scjs.FLAT }}
3711
+ __init70() {this.tilt = { ..._chunkL3PXFMOFcjs.FLAT }}
3712
3712
  __init71() {this.settings = /* @__PURE__ */ new Map()}
3713
3713
  __init72() {this.paused = false}
3714
3714
  /** Wet strokes dry as soon as they end (one undo step with the stroke). */
@@ -3726,7 +3726,7 @@ var PaintWetLayers = (_class14 = class {
3726
3726
  const { width, height } = this.host.canvas();
3727
3727
  if (this.world && (this.world.width !== width || this.world.height !== height)) throw new Error("The wet world is the wrong size; dry the paint before resizing the canvas.");
3728
3728
  if (!this.world) {
3729
- this.world = new (0, _chunkL2T6EJ5Scjs.WetWorld)(width, height, wetPaperInput(this.host.paper()), { kernel: this.options.kernel, threads: this.options.threads });
3729
+ this.world = new (0, _chunkL3PXFMOFcjs.WetWorld)(width, height, wetPaperInput(this.host.paper()), { kernel: this.options.kernel, threads: this.options.threads });
3730
3730
  this.world.setTilt(this.tilt);
3731
3731
  }
3732
3732
  return this.world;
@@ -3753,7 +3753,7 @@ var PaintWetLayers = (_class14 = class {
3753
3753
  settingsOf(layerId, medium = "watercolor") {
3754
3754
  let s = this.settings.get(layerId);
3755
3755
  if (!s) {
3756
- s = { params: _chunkL2T6EJ5Scjs.normalizeWetParams.call(void 0, WET_MEDIUM_PARAMS[medium], _chunkL2T6EJ5Scjs.DEFAULT_WET_PARAMS), flow: { ..._chunkL2T6EJ5Scjs.DEFAULT_FLOW } };
3756
+ s = { params: _chunkL3PXFMOFcjs.normalizeWetParams.call(void 0, WET_MEDIUM_PARAMS[medium], _chunkL3PXFMOFcjs.DEFAULT_WET_PARAMS), flow: { ..._chunkL3PXFMOFcjs.DEFAULT_FLOW } };
3757
3757
  this.settings.set(layerId, s);
3758
3758
  }
3759
3759
  return s;
@@ -3766,27 +3766,27 @@ var PaintWetLayers = (_class14 = class {
3766
3766
  const s = this.settingsOf(layerId, medium);
3767
3767
  w.ensureLane(layerId, { params: s.params, base });
3768
3768
  const { width, height } = this.host.canvas();
3769
- if (s.flow.kind !== "none") w.setFlow(layerId, _chunkL2T6EJ5Scjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
3769
+ if (s.flow.kind !== "none") w.setFlow(layerId, _chunkL3PXFMOFcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
3770
3770
  }
3771
3771
  return w;
3772
3772
  }
3773
3773
  setParams(layerId, update) {
3774
3774
  const s = this.settingsOf(layerId);
3775
- s.params = _chunkL2T6EJ5Scjs.normalizeWetParams.call(void 0, update, s.params);
3775
+ s.params = _chunkL3PXFMOFcjs.normalizeWetParams.call(void 0, update, s.params);
3776
3776
  if (_optionalChain([this, 'access', _89 => _89.world, 'optionalAccess', _90 => _90.hasLane, 'call', _91 => _91(layerId)])) this.world.setParams(layerId, s.params);
3777
3777
  return { ...s.params };
3778
3778
  }
3779
3779
  setFlow(layerId, update) {
3780
3780
  const s = this.settingsOf(layerId);
3781
- s.flow = _chunkL2T6EJ5Scjs.normalizeFlow.call(void 0, update, s.flow);
3781
+ s.flow = _chunkL3PXFMOFcjs.normalizeFlow.call(void 0, update, s.flow);
3782
3782
  if (_optionalChain([this, 'access', _92 => _92.world, 'optionalAccess', _93 => _93.hasLane, 'call', _94 => _94(layerId)])) {
3783
3783
  const { width, height } = this.host.canvas();
3784
- this.world.setFlow(layerId, _chunkL2T6EJ5Scjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
3784
+ this.world.setFlow(layerId, _chunkL3PXFMOFcjs.flowField.call(void 0, s.flow, width, height), s.flow.strength);
3785
3785
  }
3786
3786
  return { ...s.flow };
3787
3787
  }
3788
3788
  setTilt(update) {
3789
- this.tilt = _chunkL2T6EJ5Scjs.normalizeTilt.call(void 0, update, this.tilt);
3789
+ this.tilt = _chunkL3PXFMOFcjs.normalizeTilt.call(void 0, update, this.tilt);
3790
3790
  _optionalChain([this, 'access', _95 => _95.world, 'optionalAccess', _96 => _96.setTilt, 'call', _97 => _97(this.tilt)]);
3791
3791
  return { ...this.tilt };
3792
3792
  }
@@ -3980,7 +3980,7 @@ var PaintWetLayers = (_class14 = class {
3980
3980
  }, _class14);
3981
3981
  function wetPigmentOf(hex, body) {
3982
3982
  const [r, g, b] = hexToRgb8(hex);
3983
- return Array.from(_chunkL2T6EJ5Scjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], body));
3983
+ return Array.from(_chunkL3PXFMOFcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], body));
3984
3984
  }
3985
3985
 
3986
3986
  // src/paint-editor/thumbnails.ts
@@ -3988,7 +3988,7 @@ var thumbWorld = null;
3988
3988
  function paintWetTestStroke(brush, paper, color, width, height) {
3989
3989
  if (!thumbWorld || thumbWorld.width !== width || thumbWorld.height !== height) {
3990
3990
  _optionalChain([thumbWorld, 'optionalAccess', _123 => _123.destroy, 'call', _124 => _124()]);
3991
- thumbWorld = new (0, _chunkL2T6EJ5Scjs.WetWorld)(width, height, wetPaperInput(paper), { kernel: "typescript", threads: 0 });
3991
+ thumbWorld = new (0, _chunkL3PXFMOFcjs.WetWorld)(width, height, wetPaperInput(paper), { kernel: "typescript", threads: 0 });
3992
3992
  } else thumbWorld.setPaper(wetPaperInput(paper));
3993
3993
  const w = thumbWorld;
3994
3994
  if (w.hasLane("thumb")) w.removeLane("thumb");
@@ -3996,15 +3996,15 @@ function paintWetTestStroke(brush, paper, color, width, height) {
3996
3996
  const [r, g, b] = hexToRgb8(color);
3997
3997
  if (brush.wet.tool !== "paint" && brush.wet.tool !== "water") {
3998
3998
  const half = Math.ceil(height / 2);
3999
- w.paint("thumb", { x: 0, y: 0, width, height: half }, null, 0.4, Array.from(_chunkL2T6EJ5Scjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], 0), (v) => v * 0.05));
4000
- w.paint("thumb", { x: 0, y: half, width, height: height - half }, null, 0.4, Array.from(_chunkL2T6EJ5Scjs.pigmentOf.call(void 0, [232 / 255, 196 / 255, 64 / 255], 0), (v) => v * 0.05));
3999
+ w.paint("thumb", { x: 0, y: 0, width, height: half }, null, 0.4, Array.from(_chunkL3PXFMOFcjs.pigmentOf.call(void 0, [r / 255, g / 255, b / 255], 0), (v) => v * 0.05));
4000
+ w.paint("thumb", { x: 0, y: half, width, height: height - half }, null, 0.4, Array.from(_chunkL3PXFMOFcjs.pigmentOf.call(void 0, [232 / 255, 196 / 255, 64 / 255], 0), (v) => v * 0.05));
4001
4001
  }
4002
4002
  const driver = new WetStrokeDriver({
4003
4003
  world: w,
4004
4004
  laneId: "thumb",
4005
4005
  brush,
4006
4006
  color: [r / 255, g / 255, b / 255],
4007
- load: brushLoadForStroke(brush, _chunkL2T6EJ5Scjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
4007
+ load: brushLoadForStroke(brush, _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
4008
4008
  grain: paperGrain(paper),
4009
4009
  paperDepth: paper.depth,
4010
4010
  paperColor: hexToRgb8(paper.color),
@@ -4055,7 +4055,7 @@ function paintTestStroke(surface, brush, paper, color, width, height) {
4055
4055
  colorHex: color,
4056
4056
  affineCopies: [],
4057
4057
  copies: [IDENTITY_COPY],
4058
- mixerLoad: brushLoadForStroke(brush, _chunkL2T6EJ5Scjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
4058
+ mixerLoad: brushLoadForStroke(brush, _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255]),
4059
4059
  thick: brush.engine === "impasto" ? { channels: emptyThickChannels() } : void 0,
4060
4060
  sticker: brush.engine === "sticker" ? { nextId: 1 } : void 0
4061
4061
  }
@@ -4450,7 +4450,7 @@ var MixingPad = (_class16 = class {constructor() { _class16.prototype.__init82.c
4450
4450
  colorHex: color,
4451
4451
  affineCopies: [],
4452
4452
  copies: [IDENTITY_COPY],
4453
- mixerLoad: brushLoadForStroke(brush, _chunkL2T6EJ5Scjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255])
4453
+ mixerLoad: brushLoadForStroke(brush, _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD, [r / 255, g / 255, b / 255])
4454
4454
  }
4455
4455
  );
4456
4456
  session.push(points);
@@ -4591,7 +4591,7 @@ function replayItems(doc) {
4591
4591
  }
4592
4592
  function emptiedLayers(layers) {
4593
4593
  let out = [...layers];
4594
- for (const l of _chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers)) if (l.type === "pixel") out = _chunkEBSYZRSWcjs.mapLayer.call(void 0, out, l.id, () => ({ ...l, surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4), offset: { x: 0, y: 0 } }));
4594
+ for (const l of _chunkWMRIG4XQcjs.flattenLayers.call(void 0, layers)) if (l.type === "pixel") out = _chunkWMRIG4XQcjs.mapLayer.call(void 0, out, l.id, () => ({ ...l, surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4), offset: { x: 0, y: 0 } }));
4595
4595
  return out;
4596
4596
  }
4597
4597
  async function replayPainting(source, target, options = {}) {
@@ -4802,7 +4802,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
4802
4802
  __init89() {this.library = null}
4803
4803
 
4804
4804
  __init90() {this.secondaryColor = "#ffffff"}
4805
- __init91() {this.mixerLoad = _chunkL2T6EJ5Scjs.EMPTY_MIXER_LOAD}
4805
+ __init91() {this.mixerLoad = _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD}
4806
4806
  __init92() {this.view = { ...DEFAULT_VIEW, pan: { ...DEFAULT_VIEW.pan } }}
4807
4807
 
4808
4808
 
@@ -4852,12 +4852,12 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
4852
4852
  canvas: () => this.doc.canvas,
4853
4853
  paper: () => this.doc.paper,
4854
4854
  layerSurface: (id) => {
4855
- const l = _optionalChain([_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id), 'optionalAccess', _143 => _143.layer]);
4855
+ const l = _optionalChain([_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id), 'optionalAccess', _143 => _143.layer]);
4856
4856
  return isPixelLayer(l) ? l.surface : null;
4857
4857
  },
4858
4858
  updateSurfaces: (surfaces, rects) => {
4859
4859
  let layers = this.doc.layers;
4860
- for (const [id, surface] of surfaces) if (_chunkEBSYZRSWcjs.findLayer.call(void 0, layers, id)) layers = _chunkEBSYZRSWcjs.mapLayer.call(void 0, layers, id, (l) => ({ ...l, surface }));
4860
+ for (const [id, surface] of surfaces) if (_chunkWMRIG4XQcjs.findLayer.call(void 0, layers, id)) layers = _chunkWMRIG4XQcjs.mapLayer.call(void 0, layers, id, (l) => ({ ...l, surface }));
4861
4861
  this.doc = { ...this.doc, layers };
4862
4862
  this.emit(rects.length ? rects : "all");
4863
4863
  },
@@ -5098,7 +5098,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5098
5098
  }
5099
5099
  // --- Layers --------------------------------------------------------------------
5100
5100
  getLayer(id) {
5101
- return _optionalChain([_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id), 'optionalAccess', _155 => _155.layer]);
5101
+ return _optionalChain([_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id), 'optionalAccess', _155 => _155.layer]);
5102
5102
  }
5103
5103
  /** The active pixel layer (or `undefined`). */
5104
5104
  getActiveLayer() {
@@ -5117,12 +5117,12 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5117
5117
  walk(this.doc.layers, null, 0);
5118
5118
  return out;
5119
5119
  }
5120
- describeLayer(l, parentId = _nullishCoalesce(_optionalChain([_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, l.id), 'optionalAccess', _156 => _156.parent, 'optionalAccess', _157 => _157.id]), () => ( null)), depth = _nullishCoalesce(_optionalChain([_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, l.id), 'optionalAccess', _158 => _158.path, 'access', _159 => _159.length]), () => ( 0))) {
5120
+ describeLayer(l, parentId = _nullishCoalesce(_optionalChain([_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, l.id), 'optionalAccess', _156 => _156.parent, 'optionalAccess', _157 => _157.id]), () => ( null)), depth = _nullishCoalesce(_optionalChain([_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, l.id), 'optionalAccess', _158 => _158.path, 'access', _159 => _159.length]), () => ( 0))) {
5121
5121
  let bounds = null;
5122
5122
  if (l.type === "pixel") {
5123
5123
  const b = _chunk7ISPWEJAcjs.contentBounds.call(void 0, l.surface);
5124
5124
  bounds = b ? { ...b, x: b.x + l.offset.x, y: b.y + l.offset.y } : null;
5125
- } else for (const c of _chunkEBSYZRSWcjs.flattenLayers.call(void 0, l.children)) if (c.type === "pixel") bounds = unionRect(bounds, this.describeLayer(c, l.id, depth + 1).bounds);
5125
+ } else for (const c of _chunkWMRIG4XQcjs.flattenLayers.call(void 0, l.children)) if (c.type === "pixel") bounds = unionRect(bounds, this.describeLayer(c, l.id, depth + 1).bounds);
5126
5126
  return {
5127
5127
  id: l.id,
5128
5128
  name: l.name,
@@ -5149,7 +5149,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5149
5149
  if (!id) throw new PaintEditorError(`There is no active layer to ${what}; add one with add_layer.`);
5150
5150
  const l = this.requireLayer(id);
5151
5151
  if (!isPixelLayer(l)) throw new PaintEditorError(`Layer "${l.name}" is a group; ${what} a pixel layer inside it.`);
5152
- if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, l, "pixels")) throw new PaintEditorError(`Layer "${l.name}" has its pixels locked; unlock it (update_layer locks) before you ${what} it.`);
5152
+ if (_chunkWMRIG4XQcjs.isLayerLocked.call(void 0, l, "pixels")) throw new PaintEditorError(`Layer "${l.name}" has its pixels locked; unlock it (update_layer locks) before you ${what} it.`);
5153
5153
  if (!l.visible) throw new PaintEditorError(`Layer "${l.name}" is hidden; show it (update_layer visible true) before you ${what} it.`);
5154
5154
  return l;
5155
5155
  }
@@ -5162,7 +5162,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5162
5162
  /** Adds an empty pixel layer or group above `aboveId` (default: the active layer) and makes it active. */
5163
5163
  addLayer(options = {}) {
5164
5164
  this.requireIdle("adding a layer");
5165
- const count = _chunkEBSYZRSWcjs.flattenLayers.call(void 0, this.doc.layers).length;
5165
+ const count = _chunkWMRIG4XQcjs.flattenLayers.call(void 0, this.doc.layers).length;
5166
5166
  const type = _nullishCoalesce(options.type, () => ( "pixel"));
5167
5167
  const name = _optionalChain([options, 'access', _160 => _160.name, 'optionalAccess', _161 => _161.trim, 'call', _162 => _162()]) || (type === "group" ? `Group ${count + 1}` : `Layer ${count + 1}`);
5168
5168
  const layer = type === "group" ? { type: "group", id: newPaintLayerId(), name, visible: true, opacity: 1, blend: "pass-through", children: [] } : createPaintLayer(name);
@@ -5174,19 +5174,19 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5174
5174
  if (g.type !== "group") throw new PaintEditorError(`Layer "${g.name}" is not a group; pass a group id as parentId.`);
5175
5175
  parentId = g.id;
5176
5176
  } else if (above) {
5177
- const loc = _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, above);
5177
+ const loc = _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, above);
5178
5178
  if (!loc) throw new PaintEditorError(`Unknown layer "${above}". Call list_layers for the ids.`);
5179
5179
  parentId = _nullishCoalesce(_optionalChain([loc, 'access', _163 => _163.parent, 'optionalAccess', _164 => _164.id]), () => ( null));
5180
5180
  index = loc.index + 1;
5181
5181
  }
5182
- const layers = _chunkEBSYZRSWcjs.insertLayer.call(void 0, this.doc.layers, layer, parentId, index);
5182
+ const layers = _chunkWMRIG4XQcjs.insertLayer.call(void 0, this.doc.layers, layer, parentId, index);
5183
5183
  this.commit(type === "group" ? "Add group" : "Add layer", { ...this.doc, layers, activeLayerId: layer.id });
5184
5184
  return this.describeLayer(layer);
5185
5185
  }
5186
5186
  updateLayer(id, update) {
5187
5187
  this.requireIdle("changing a layer");
5188
5188
  const l = this.requireLayer(id);
5189
- if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, l, "all") && Object.keys(update).some((k) => k !== "locks")) throw new PaintEditorError(`Layer "${l.name}" is fully locked; unlock it first (locks {all: false}).`);
5189
+ if (_chunkWMRIG4XQcjs.isLayerLocked.call(void 0, l, "all") && Object.keys(update).some((k) => k !== "locks")) throw new PaintEditorError(`Layer "${l.name}" is fully locked; unlock it first (locks {all: false}).`);
5190
5190
  if (update.opacity !== void 0 && !(update.opacity >= 0 && update.opacity <= 1)) throw new PaintEditorError(`opacity ${update.opacity} is out of range; use 0..1.`);
5191
5191
  if (update.blend !== void 0 && !_chunk7ISPWEJAcjs.isBlendMode.call(void 0, update.blend) && !(l.type === "group" && update.blend === "pass-through")) {
5192
5192
  throw new PaintEditorError(`Unknown blend mode "${update.blend}". Call get_canvas_info for the blend modes.`);
@@ -5202,31 +5202,31 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5202
5202
  const locks = { ..._nullishCoalesce(l.locks, () => ( {})), ...update.locks };
5203
5203
  next.locks = Object.values(locks).some(Boolean) ? locks : void 0;
5204
5204
  }
5205
- this.commit("Layer properties", { ...this.doc, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, id, () => next) });
5205
+ this.commit("Layer properties", { ...this.doc, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, id, () => next) });
5206
5206
  return this.describeLayer(next);
5207
5207
  }
5208
5208
  removeLayer(id) {
5209
5209
  this.requireIdle("removing a layer");
5210
5210
  const l = this.requireLayer(id);
5211
- if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, l, "all")) throw new PaintEditorError(`Layer "${l.name}" is fully locked; unlock it before removing it.`);
5212
- const wetIds = this.wet.wetLayerIds().filter((x) => x === id || l.type === "group" && _chunkEBSYZRSWcjs.findLayer.call(void 0, l.children, x));
5211
+ if (_chunkWMRIG4XQcjs.isLayerLocked.call(void 0, l, "all")) throw new PaintEditorError(`Layer "${l.name}" is fully locked; unlock it before removing it.`);
5212
+ const wetIds = this.wet.wetLayerIds().filter((x) => x === id || l.type === "group" && _chunkWMRIG4XQcjs.findLayer.call(void 0, l.children, x));
5213
5213
  if (wetIds.length) {
5214
5214
  this.beginWetOp();
5215
5215
  for (const x of wetIds) this.wet.world.removeLane(x);
5216
5216
  }
5217
- const layers = _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, id, () => null);
5217
+ const layers = _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, id, () => null);
5218
5218
  let active = this.doc.activeLayerId;
5219
- if (active && !_chunkEBSYZRSWcjs.findLayer.call(void 0, layers, active)) active = _nullishCoalesce(_optionalChain([_chunkEBSYZRSWcjs.flattenLayers.call(void 0, layers), 'access', _165 => _165.filter, 'call', _166 => _166((x) => x.type === "pixel"), 'access', _167 => _167.pop, 'call', _168 => _168(), 'optionalAccess', _169 => _169.id]), () => ( null));
5220
- this.commit("Remove layer", { ...this.doc, layers, activeLayerId: active, ...this.thickWithout(_chunkEBSYZRSWcjs.flattenLayers.call(void 0, [l]).map((x) => x.id)), ...this.stickersWithout(_chunkEBSYZRSWcjs.flattenLayers.call(void 0, [l]).map((x) => x.id)) });
5219
+ if (active && !_chunkWMRIG4XQcjs.findLayer.call(void 0, layers, active)) active = _nullishCoalesce(_optionalChain([_chunkWMRIG4XQcjs.flattenLayers.call(void 0, layers), 'access', _165 => _165.filter, 'call', _166 => _166((x) => x.type === "pixel"), 'access', _167 => _167.pop, 'call', _168 => _168(), 'optionalAccess', _169 => _169.id]), () => ( null));
5220
+ this.commit("Remove layer", { ...this.doc, layers, activeLayerId: active, ...this.thickWithout(_chunkWMRIG4XQcjs.flattenLayers.call(void 0, [l]).map((x) => x.id)), ...this.stickersWithout(_chunkWMRIG4XQcjs.flattenLayers.call(void 0, [l]).map((x) => x.id)) });
5221
5221
  return { removed: id, activeLayerId: active };
5222
5222
  }
5223
5223
  duplicateLayer(id) {
5224
5224
  this.requireIdle("duplicating a layer");
5225
- if (_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id)) {
5225
+ if (_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id)) {
5226
5226
  const inside = (l) => l.type === "group" ? l.children.flatMap(inside) : [l.id];
5227
- this.dryLayersFirst(inside(_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id).layer));
5227
+ this.dryLayersFirst(inside(_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id).layer));
5228
5228
  }
5229
- const loc = _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id);
5229
+ const loc = _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id);
5230
5230
  if (!loc) throw new PaintEditorError(`Unknown layer "${id}". Call list_layers for the ids.`);
5231
5231
  const thick = { ..._nullishCoalesce(this.doc.thick, () => ( {})) };
5232
5232
  const stickers = { ..._nullishCoalesce(this.doc.stickers, () => ( {})) };
@@ -5237,43 +5237,43 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5237
5237
  return l.type === "group" ? { ...l, id: id2, children: l.children.map(copy) } : { ...l, id: id2 };
5238
5238
  };
5239
5239
  const dup = { ...copy(loc.layer), name: `${loc.layer.name} copy` };
5240
- const layers = _chunkEBSYZRSWcjs.insertLayer.call(void 0, this.doc.layers, dup, _nullishCoalesce(_optionalChain([loc, 'access', _170 => _170.parent, 'optionalAccess', _171 => _171.id]), () => ( null)), loc.index + 1);
5240
+ const layers = _chunkWMRIG4XQcjs.insertLayer.call(void 0, this.doc.layers, dup, _nullishCoalesce(_optionalChain([loc, 'access', _170 => _170.parent, 'optionalAccess', _171 => _171.id]), () => ( null)), loc.index + 1);
5241
5241
  this.commit("Duplicate layer", this.withWetEvents({ ...this.doc, layers, activeLayerId: dup.id, ...this.doc.thick ? { thick } : {}, ...this.doc.stickers ? { stickers } : {} }));
5242
5242
  return this.describeLayer(dup);
5243
5243
  }
5244
5244
  /** Moves a layer to `index` (0 = bottom) within `parentId` (default its own parent; `null` = top level). */
5245
5245
  moveLayer(id, index, parentId) {
5246
5246
  this.requireIdle("moving a layer");
5247
- const loc = _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id);
5247
+ const loc = _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id);
5248
5248
  if (!loc) throw new PaintEditorError(`Unknown layer "${id}". Call list_layers for the ids.`);
5249
5249
  const target = parentId === void 0 ? _nullishCoalesce(_optionalChain([loc, 'access', _172 => _172.parent, 'optionalAccess', _173 => _173.id]), () => ( null)) : parentId;
5250
5250
  if (target) {
5251
5251
  const g = this.requireLayer(target);
5252
5252
  if (g.type !== "group") throw new PaintEditorError(`Layer "${g.name}" is not a group; pass a group id as parentId.`);
5253
- if (target === id || loc.layer.type === "group" && _chunkEBSYZRSWcjs.findLayer.call(void 0, loc.layer.children, target)) throw new PaintEditorError("A group cannot move into itself.");
5253
+ if (target === id || loc.layer.type === "group" && _chunkWMRIG4XQcjs.findLayer.call(void 0, loc.layer.children, target)) throw new PaintEditorError("A group cannot move into itself.");
5254
5254
  }
5255
- const without = _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, id, () => null);
5256
- const siblings = target ? _chunkEBSYZRSWcjs.findLayer.call(void 0, without, target).layer.children : without;
5255
+ const without = _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, id, () => null);
5256
+ const siblings = target ? _chunkWMRIG4XQcjs.findLayer.call(void 0, without, target).layer.children : without;
5257
5257
  if (!Number.isInteger(index) || index < 0 || index > siblings.length) throw new PaintEditorError(`index ${index} is out of range; use 0..${siblings.length} (0 is the bottom).`);
5258
- const layers = _chunkEBSYZRSWcjs.insertLayer.call(void 0, without, loc.layer, target, index);
5258
+ const layers = _chunkWMRIG4XQcjs.insertLayer.call(void 0, without, loc.layer, target, index);
5259
5259
  this.commit("Move layer", { ...this.doc, layers });
5260
5260
  return this.describeLayer(loc.layer);
5261
5261
  }
5262
5262
  /** Merges a pixel layer into the pixel layer below it (keeping the lower one's settings). */
5263
5263
  mergeDown(id) {
5264
5264
  this.requireIdle("merging");
5265
- const pre = _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id);
5265
+ const pre = _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id);
5266
5266
  if (pre) {
5267
5267
  const sib = pre.parent ? pre.parent.children : this.doc.layers;
5268
5268
  this.dryLayersFirst([id, _optionalChain([sib, 'access', _174 => _174[pre.index - 1], 'optionalAccess', _175 => _175.id])].filter((x) => Boolean(x)));
5269
5269
  }
5270
- const loc = _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id);
5270
+ const loc = _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id);
5271
5271
  if (!loc) throw new PaintEditorError(`Unknown layer "${id}". Call list_layers for the ids.`);
5272
5272
  const siblings = loc.parent ? loc.parent.children : this.doc.layers;
5273
5273
  const below = siblings[loc.index - 1];
5274
5274
  const upper = loc.layer;
5275
5275
  if (!isPixelLayer(upper) || !isPixelLayer(below)) throw new PaintEditorError("Merge down needs a pixel layer directly above another pixel layer in the same group.");
5276
- if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, below, "pixels")) throw new PaintEditorError(`Layer "${below.name}" has its pixels locked; unlock it to merge into it.`);
5276
+ if (_chunkWMRIG4XQcjs.isLayerLocked.call(void 0, below, "pixels")) throw new PaintEditorError(`Layer "${below.name}" has its pixels locked; unlock it to merge into it.`);
5277
5277
  const rect = unionRect(this.describeLayer(below).bounds, this.describeLayer(upper).bounds);
5278
5278
  let surface = _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4);
5279
5279
  if (rect) {
@@ -5283,7 +5283,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5283
5283
  surface = _chunk7ISPWEJAcjs.surfaceFromPixels.call(void 0, { width: rect.width, height: rect.height, data: px }, 4, rect.x, rect.y);
5284
5284
  }
5285
5285
  const merged = { ...below, surface, offset: { x: 0, y: 0 } };
5286
- const layers = _chunkEBSYZRSWcjs.mapLayer.call(void 0, _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, upper.id, () => null), below.id, () => merged);
5286
+ const layers = _chunkWMRIG4XQcjs.mapLayer.call(void 0, _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, upper.id, () => null), below.id, () => merged);
5287
5287
  this.commit("Merge down", this.withWetEvents({ ...this.doc, layers, activeLayerId: below.id, ...this.thickWithout([upper.id]), ...this.stickersWithout([upper.id, below.id]) }));
5288
5288
  return this.describeLayer(merged);
5289
5289
  }
@@ -5296,7 +5296,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5296
5296
  this.wet.world.removeLane(l.id);
5297
5297
  }
5298
5298
  const bounds = this.describeLayer(l).bounds;
5299
- this.commit("Clear layer", this.withPaintEvent({ ...this.doc, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, l.id, () => ({ ...l, surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4) })), ...this.thickWithout([l.id]), ...this.stickersWithout([l.id]) }, { kind: "clear", layerId: l.id }));
5299
+ this.commit("Clear layer", this.withPaintEvent({ ...this.doc, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, l.id, () => ({ ...l, surface: _chunk7ISPWEJAcjs.emptySurface.call(void 0, 4) })), ...this.thickWithout([l.id]), ...this.stickersWithout([l.id]) }, { kind: "clear", layerId: l.id }));
5300
5300
  return { layerId: l.id, bounds };
5301
5301
  }
5302
5302
  /**
@@ -5319,7 +5319,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5319
5319
  if (!_chunk7ISPWEJAcjs.isBlendMode.call(void 0, blend)) throw new PaintEditorError(`Unknown blend mode "${blend}".`);
5320
5320
  const { width, height } = this.doc.canvas;
5321
5321
  const rect = { x: 0, y: 0, width, height };
5322
- const coverage = new (0, _chunkL2T6EJ5Scjs.CoverageMap)();
5322
+ const coverage = new (0, _chunkL3PXFMOFcjs.CoverageMap)();
5323
5323
  const depth = grainAmount * this.doc.paper.depth;
5324
5324
  const grain = depth > 0 ? paperGrain(this.doc.paper) : null;
5325
5325
  for (const { tx, ty } of _chunk7ISPWEJAcjs.tilesInRect.call(void 0, rect)) {
@@ -5334,12 +5334,12 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5334
5334
  background: rgbaOf(this.doc.paper.color),
5335
5335
  opacity,
5336
5336
  blend,
5337
- lockTransparency: _chunkEBSYZRSWcjs.isLayerLocked.call(void 0, l, "transparency"),
5337
+ lockTransparency: _chunkWMRIG4XQcjs.isLayerLocked.call(void 0, l, "transparency"),
5338
5338
  selection: null,
5339
5339
  offset: l.offset
5340
5340
  };
5341
5341
  const surface = this.applyCoverage(l, coverage, rect, apply);
5342
- this.commit("Fill layer", this.withPaintEvent(this.withWetEvents({ ...this.doc, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, l.id, () => ({ ...l, surface })) }), { kind: "fill", layerId: l.id, data: { color, opacity, grain: grainAmount, pressure, blend } }));
5342
+ this.commit("Fill layer", this.withPaintEvent(this.withWetEvents({ ...this.doc, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, l.id, () => ({ ...l, surface })) }), { kind: "fill", layerId: l.id, data: { color, opacity, grain: grainAmount, pressure, blend } }));
5343
5343
  return { layerId: l.id, bounds: rect };
5344
5344
  }
5345
5345
  applyCoverage(l, coverage, rect, apply) {
@@ -5348,7 +5348,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5348
5348
  for (const { tx, ty } of _chunk7ISPWEJAcjs.tilesInRect.call(void 0, { x: rect.x - l.offset.x, y: rect.y - l.offset.y, width: rect.width, height: rect.height })) {
5349
5349
  const key = _chunk7ISPWEJAcjs.tileKey.call(void 0, tx, ty);
5350
5350
  const src = _nullishCoalesce(_optionalChain([base, 'access', _180 => _180.tiles, 'access', _181 => _181.get, 'call', _182 => _182(key), 'optionalAccess', _183 => _183.data]), () => ( new Uint8ClampedArray(_chunk7ISPWEJAcjs.TILE * _chunk7ISPWEJAcjs.TILE * 4)));
5351
- const tile = _chunk7ISPWEJAcjs.finishTile.call(void 0, _chunkL2T6EJ5Scjs.applyStrokeToTile.call(void 0, coverage, src, 4, tx, ty, apply), 4, 0);
5351
+ const tile = _chunk7ISPWEJAcjs.finishTile.call(void 0, _chunkL3PXFMOFcjs.applyStrokeToTile.call(void 0, coverage, src, 4, tx, ty, apply), 4, 0);
5352
5352
  if (tile) tiles.set(key, tile);
5353
5353
  else tiles.delete(key);
5354
5354
  }
@@ -5487,13 +5487,13 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5487
5487
  /** Fills the Mixer Brush reservoir with a colour (default the editor colour). */
5488
5488
  loadMixerBrush(color) {
5489
5489
  const [r, g, b] = hexToRgb8(color === void 0 ? this.color : parseColor(color));
5490
- this.mixerLoad = _chunkL2T6EJ5Scjs.loadMixer.call(void 0, this.mixerLoad, [r / 255, g / 255, b / 255]);
5490
+ this.mixerLoad = _chunkL3PXFMOFcjs.loadMixer.call(void 0, this.mixerLoad, [r / 255, g / 255, b / 255]);
5491
5491
  this.emit([]);
5492
5492
  return this.mixerLoad;
5493
5493
  }
5494
5494
  /** Empties the pickup well (and with `emptyReservoir` the loaded paint too). */
5495
5495
  cleanMixerBrush(emptyReservoir = false) {
5496
- this.mixerLoad = emptyReservoir ? _chunkL2T6EJ5Scjs.EMPTY_MIXER_LOAD : _chunkL2T6EJ5Scjs.cleanMixer.call(void 0, this.mixerLoad);
5496
+ this.mixerLoad = emptyReservoir ? _chunkL3PXFMOFcjs.EMPTY_MIXER_LOAD : _chunkL3PXFMOFcjs.cleanMixer.call(void 0, this.mixerLoad);
5497
5497
  this.emit([]);
5498
5498
  return this.mixerLoad;
5499
5499
  }
@@ -5535,11 +5535,11 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5535
5535
  let layer = (() => {
5536
5536
  const id = _nullishCoalesce(init.layerId, () => ( doc.activeLayerId));
5537
5537
  if (!id) throw new PaintEditorError("There is no active layer to paint on; add one with add_layer.");
5538
- const loc = _chunkEBSYZRSWcjs.findLayer.call(void 0, doc.layers, id);
5538
+ const loc = _chunkWMRIG4XQcjs.findLayer.call(void 0, doc.layers, id);
5539
5539
  if (!loc) throw new PaintEditorError(`Unknown layer "${id}". Call list_layers for the ids.`);
5540
5540
  const l = loc.layer;
5541
5541
  if (!isPixelLayer(l)) throw new PaintEditorError(`Layer "${l.name}" is a group; paint on a pixel layer inside it.`);
5542
- if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, l, "pixels")) throw new PaintEditorError(`Layer "${l.name}" has its pixels locked; unlock it (update_layer locks) to paint on it.`);
5542
+ if (_chunkWMRIG4XQcjs.isLayerLocked.call(void 0, l, "pixels")) throw new PaintEditorError(`Layer "${l.name}" has its pixels locked; unlock it (update_layer locks) to paint on it.`);
5543
5543
  if (!l.visible) throw new PaintEditorError(`Layer "${l.name}" is hidden; show it (update_layer visible true) to paint on it.`);
5544
5544
  return l;
5545
5545
  })();
@@ -5555,12 +5555,12 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5555
5555
  this.requireWetIdle("painting");
5556
5556
  if (layer.offset.x || layer.offset.y) {
5557
5557
  const moved = { ...layer, surface: _chunk7ISPWEJAcjs.translateSurface.call(void 0, layer.surface, layer.offset.x, layer.offset.y), offset: { x: 0, y: 0 } };
5558
- this.doc = { ...this.doc, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, layer.id, () => moved) };
5559
- if (doc !== this.doc) doc = { ...doc, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, doc.layers, layer.id, () => moved) };
5558
+ this.doc = { ...this.doc, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, layer.id, () => moved) };
5559
+ if (doc !== this.doc) doc = { ...doc, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, doc.layers, layer.id, () => moved) };
5560
5560
  layer = moved;
5561
5561
  }
5562
- if (!this.wet.wetLayerIds().includes(layer.id) && this.wet.wetLayerIds().length >= _chunkL2T6EJ5Scjs.MAX_WET_LANES) {
5563
- throw new PaintEditorError(`At most ${_chunkL2T6EJ5Scjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
5562
+ if (!this.wet.wetLayerIds().includes(layer.id) && this.wet.wetLayerIds().length >= _chunkL3PXFMOFcjs.MAX_WET_LANES) {
5563
+ throw new PaintEditorError(`At most ${_chunkL3PXFMOFcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
5564
5564
  }
5565
5565
  this.beginWetOp();
5566
5566
  const world = this.wet.ensureLane(layer.id, brush.wet.medium);
@@ -5586,7 +5586,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5586
5586
  wet = { driver, surface: () => world.display(id).surface };
5587
5587
  } else if (this.wet.wetLayerIds().includes(layer.id)) {
5588
5588
  this.dryLayersFirst([layer.id]);
5589
- const dried = _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, layer.id).layer;
5589
+ const dried = _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, layer.id).layer;
5590
5590
  layer = dried;
5591
5591
  }
5592
5592
  let color = init.color === void 0 ? this.color : parseColor(init.color);
@@ -5605,7 +5605,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5605
5605
  layerId: layer.id,
5606
5606
  surface: layer.surface,
5607
5607
  offset: layer.offset,
5608
- lockTransparency: _chunkEBSYZRSWcjs.isLayerLocked.call(void 0, layer, "transparency"),
5608
+ lockTransparency: _chunkWMRIG4XQcjs.isLayerLocked.call(void 0, layer, "transparency"),
5609
5609
  brush,
5610
5610
  color: rgba,
5611
5611
  background: rgbaOf(doc.paper.color),
@@ -5698,7 +5698,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5698
5698
  const thick = ch ? { ..._nullishCoalesce(this.doc.thick, () => ( {})), [l.id]: ch } : this.doc.thick;
5699
5699
  const sprayed = s.stickers();
5700
5700
  const stickers = sprayed ? { ..._nullishCoalesce(this.doc.stickers, () => ( {})), [l.id]: [..._nullishCoalesce(_optionalChain([this, 'access', _198 => _198.doc, 'access', _199 => _199.stickers, 'optionalAccess', _200 => _200[l.id]]), () => ( [])), ...sprayed] } : this.doc.stickers;
5701
- this.commit(`${brush.name} stroke`, this.withWetEvents({ ...this.doc, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, l.id, () => ({ ...l, surface })), strokes: [...this.doc.strokes, stroke], ...thick ? { thick } : {}, ...stickers ? { stickers } : {} }), wetStroke ? before : this.doc);
5701
+ this.commit(`${brush.name} stroke`, this.withWetEvents({ ...this.doc, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, l.id, () => ({ ...l, surface })), strokes: [...this.doc.strokes, stroke], ...thick ? { thick } : {}, ...stickers ? { stickers } : {} }), wetStroke ? before : this.doc);
5702
5702
  }
5703
5703
  };
5704
5704
  let session;
@@ -5726,13 +5726,13 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5726
5726
  if (cancelled || !surface) return;
5727
5727
  const stroke = this.record(s);
5728
5728
  s.result.strokeId = stroke.id;
5729
- const l = _chunkEBSYZRSWcjs.findLayer.call(void 0, out.layers, s.layerId).layer;
5729
+ const l = _chunkWMRIG4XQcjs.findLayer.call(void 0, out.layers, s.layerId).layer;
5730
5730
  const offset = s.init.wet ? { x: 0, y: 0 } : l.offset;
5731
5731
  const ch = s.thickChannels();
5732
5732
  const sprayed = s.stickers();
5733
5733
  out = {
5734
5734
  ...out,
5735
- layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, out.layers, l.id, () => ({ ...l, surface, offset })),
5735
+ layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, out.layers, l.id, () => ({ ...l, surface, offset })),
5736
5736
  strokes: [...out.strokes, stroke],
5737
5737
  ...ch ? { thick: { ..._nullishCoalesce(out.thick, () => ( {})), [l.id]: ch } } : {},
5738
5738
  ...sprayed ? { stickers: { ..._nullishCoalesce(out.stickers, () => ( {})), [l.id]: [..._nullishCoalesce(_optionalChain([out, 'access', _201 => _201.stickers, 'optionalAccess', _202 => _202[l.id]]), () => ( [])), ...sprayed] } } : {}
@@ -5747,8 +5747,8 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5747
5747
  if (this.wet.instantDry && result.strokeId) {
5748
5748
  this.wet.dry(session.layerId);
5749
5749
  this.logWet({ kind: "dry", layerId: session.layerId, at: out.strokes.length });
5750
- const dried = _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, session.layerId).layer.surface;
5751
- out = { ...out, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, out.layers, session.layerId, (l) => ({ ...l, surface: dried })) };
5750
+ const dried = _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, session.layerId).layer.surface;
5751
+ out = { ...out, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, out.layers, session.layerId, (l) => ({ ...l, surface: dried })) };
5752
5752
  }
5753
5753
  result.wet = this.wet.isWet(session.layerId);
5754
5754
  }
@@ -5826,7 +5826,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5826
5826
  brush = normalizePaintBrush({ tip: { ...b.tip, size: b.tip.size * (v.brush.tip.size / s.brush.tip.size) } }, b);
5827
5827
  }
5828
5828
  const layerId = _nullishCoalesce(options.layerId, () => ( s.layerId));
5829
- if (!_chunkEBSYZRSWcjs.findLayer.call(void 0, doc.layers, layerId)) throw new PaintEditorError(`Stroke "${s.id}" was painted on layer "${layerId}", which no longer exists; pass layerId to replay it elsewhere.`);
5829
+ if (!_chunkWMRIG4XQcjs.findLayer.call(void 0, doc.layers, layerId)) throw new PaintEditorError(`Stroke "${s.id}" was painted on layer "${layerId}", which no longer exists; pass layerId to replay it elsewhere.`);
5830
5830
  let load = s.load;
5831
5831
  if (load && options.color !== void 0 && load.reservoir) {
5832
5832
  const [r, g, b] = hexToRgb8(options.color);
@@ -5972,7 +5972,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
5972
5972
  wetState() {
5973
5973
  const st = this.getState().wet;
5974
5974
  const backend = this.wet.backend();
5975
- return { ...st, layers: this.wet.wetLayerIds().map((id) => this.wet.info(id)), backend, message: _nullishCoalesce(_optionalChain([backend, 'optionalAccess', _208 => _208.message]), () => ( _chunkL2T6EJ5Scjs.wetSupport.call(void 0, ).message)) };
5975
+ return { ...st, layers: this.wet.wetLayerIds().map((id) => this.wet.info(id)), backend, message: _nullishCoalesce(_optionalChain([backend, 'optionalAccess', _208 => _208.message]), () => ( _chunkL3PXFMOFcjs.wetSupport.call(void 0, ).message)) };
5976
5976
  }
5977
5977
  /** One layer's wet settings and state. */
5978
5978
  wetLayerInfo(layerId) {
@@ -6017,11 +6017,11 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6017
6017
  wetPaper(options = {}) {
6018
6018
  this.requireIdle("wetting the paper");
6019
6019
  const l = this.wetLayer(options.layerId, "wet the paper of");
6020
- if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, l, "pixels")) throw new PaintEditorError(`Layer "${l.name}" has its pixels locked; unlock it first.`);
6020
+ if (_chunkWMRIG4XQcjs.isLayerLocked.call(void 0, l, "pixels")) throw new PaintEditorError(`Layer "${l.name}" has its pixels locked; unlock it first.`);
6021
6021
  const amount = _nullishCoalesce(options.amount, () => ( 1));
6022
6022
  if (!(amount > 0 && amount <= 1)) throw new PaintEditorError(`amount ${amount} is out of range; use above 0 up to 1.`);
6023
6023
  const rect = _nullishCoalesce(this.checkRect(options.rect), () => ( { x: 0, y: 0, width: this.doc.canvas.width, height: this.doc.canvas.height }));
6024
- if (!this.wet.wetLayerIds().includes(l.id) && this.wet.wetLayerIds().length >= _chunkL2T6EJ5Scjs.MAX_WET_LANES) throw new PaintEditorError(`At most ${_chunkL2T6EJ5Scjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
6024
+ if (!this.wet.wetLayerIds().includes(l.id) && this.wet.wetLayerIds().length >= _chunkL3PXFMOFcjs.MAX_WET_LANES) throw new PaintEditorError(`At most ${_chunkL3PXFMOFcjs.MAX_WET_LANES} layers can hold wet paint at once; dry one first (dry_paint).`);
6025
6025
  const before = this.doc;
6026
6026
  this.beginWetOp();
6027
6027
  const world = this.wet.ensureLane(l.id);
@@ -6101,7 +6101,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6101
6101
  const live = this.live;
6102
6102
  if (!live) return this.doc.layers;
6103
6103
  if (_optionalChain([this, 'access', _212 => _212.liveLayers, 'optionalAccess', _213 => _213.key]) === live.surface) return this.liveLayers.layers;
6104
- const layers = _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, live.layerId, (l) => ({ ...l, surface: live.surface }));
6104
+ const layers = _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, live.layerId, (l) => ({ ...l, surface: live.surface }));
6105
6105
  this.liveLayers = { key: live.surface, layers };
6106
6106
  return layers;
6107
6107
  }
@@ -6130,7 +6130,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6130
6130
  let out = layers;
6131
6131
  for (const id of ids) {
6132
6132
  const baked = this.wet.bakedSurface(id);
6133
- if (baked && _chunkEBSYZRSWcjs.findLayer.call(void 0, out, id)) out = _chunkEBSYZRSWcjs.mapLayer.call(void 0, out, id, (l) => ({ ...l, surface: baked }));
6133
+ if (baked && _chunkWMRIG4XQcjs.findLayer.call(void 0, out, id)) out = _chunkWMRIG4XQcjs.mapLayer.call(void 0, out, id, (l) => ({ ...l, surface: baked }));
6134
6134
  }
6135
6135
  return out;
6136
6136
  }
@@ -6143,12 +6143,12 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6143
6143
  const ids = /* @__PURE__ */ new Set([...Object.keys(_nullishCoalesce(thick, () => ( {}))), ...live ? [live.layerId] : []]);
6144
6144
  for (const id of ids) {
6145
6145
  const ch = _optionalChain([live, 'optionalAccess', _216 => _216.layerId]) === id ? live.channels : _optionalChain([thick, 'optionalAccess', _217 => _217[id]]);
6146
- const l = ch && _optionalChain([_chunkEBSYZRSWcjs.findLayer.call(void 0, out, id), 'optionalAccess', _218 => _218.layer]);
6146
+ const l = ch && _optionalChain([_chunkWMRIG4XQcjs.findLayer.call(void 0, out, id), 'optionalAccess', _218 => _218.layer]);
6147
6147
  if (!ch || !isPixelLayer(l)) continue;
6148
6148
  let cache = this.litCaches.get(id);
6149
6149
  if (!cache) this.litCaches.set(id, cache = new LitCache());
6150
6150
  const lit = cache.lit(l.surface, ch, this.lighting);
6151
- if (lit !== l.surface) out = _chunkEBSYZRSWcjs.mapLayer.call(void 0, out, id, () => ({ ...l, surface: lit }));
6151
+ if (lit !== l.surface) out = _chunkWMRIG4XQcjs.mapLayer.call(void 0, out, id, () => ({ ...l, surface: lit }));
6152
6152
  }
6153
6153
  return out;
6154
6154
  }
@@ -6156,7 +6156,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6156
6156
  let layers = this.litLayers((_nullishCoalesce(options.wet, () => ( "display"))) === "dried" ? this.driedLayers() : this.currentLayers());
6157
6157
  if (options.layerIds) {
6158
6158
  const picked = [];
6159
- for (const id of options.layerIds) picked.push(_nullishCoalesce(_optionalChain([_chunkEBSYZRSWcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _219 => _219.layer]), () => ( this.requireLayer(id))));
6159
+ for (const id of options.layerIds) picked.push(_nullishCoalesce(_optionalChain([_chunkWMRIG4XQcjs.findLayer.call(void 0, layers, id), 'optionalAccess', _219 => _219.layer]), () => ( this.requireLayer(id))));
6160
6160
  layers = picked.map((l) => ({ ...l, visible: true }));
6161
6161
  }
6162
6162
  const under = options.paper === false ? [] : [paperNode(this.doc.paper, this.lighting)];
@@ -6198,7 +6198,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6198
6198
  /** Wet settings saved with the document (`null` when they are all defaults). */
6199
6199
  wetJSON() {
6200
6200
  const layers = {};
6201
- for (const [id, set] of this.wet.settings) if (_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id)) layers[id] = { params: { ...set.params }, flow: { ...set.flow } };
6201
+ for (const [id, set] of this.wet.settings) if (_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id)) layers[id] = { params: { ...set.params }, flow: { ...set.flow } };
6202
6202
  const flat = this.wet.tilt.angle === 0;
6203
6203
  if (!Object.keys(layers).length && flat) return void 0;
6204
6204
  return { tilt: { ...this.wet.tilt }, layers };
@@ -6207,7 +6207,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6207
6207
  this.wet.reset();
6208
6208
  if (!raw || typeof raw !== "object") return;
6209
6209
  const r = raw;
6210
- this.wet.setTilt(_chunkL2T6EJ5Scjs.normalizeTilt.call(void 0, _nullishCoalesce(r.tilt, () => ( {}))));
6210
+ this.wet.setTilt(_chunkL3PXFMOFcjs.normalizeTilt.call(void 0, _nullishCoalesce(r.tilt, () => ( {}))));
6211
6211
  if (r.layers && typeof r.layers === "object") {
6212
6212
  for (const [id, v] of Object.entries(r.layers)) {
6213
6213
  if (!v || typeof v !== "object") {
@@ -6215,7 +6215,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6215
6215
  continue;
6216
6216
  }
6217
6217
  const x = v;
6218
- this.wet.settings.set(id, { params: _chunkL2T6EJ5Scjs.normalizeWetParams.call(void 0, _nullishCoalesce(x.params, () => ( {}))), flow: _chunkL2T6EJ5Scjs.normalizeFlow.call(void 0, _nullishCoalesce(x.flow, () => ( {}))) });
6218
+ this.wet.settings.set(id, { params: _chunkL3PXFMOFcjs.normalizeWetParams.call(void 0, _nullishCoalesce(x.params, () => ( {}))), flow: _chunkL3PXFMOFcjs.normalizeFlow.call(void 0, _nullishCoalesce(x.flow, () => ( {}))) });
6219
6219
  }
6220
6220
  }
6221
6221
  }
@@ -6224,14 +6224,14 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6224
6224
  const ext = { ...this.extensions };
6225
6225
  const channels = {};
6226
6226
  for (const [id, ch] of Object.entries(_nullishCoalesce(this.doc.thick, () => ( {})))) {
6227
- if (!_chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id)) continue;
6227
+ if (!_chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id)) continue;
6228
6228
  const saved = thickToJSON(ch);
6229
6229
  if (saved) channels[id] = saved;
6230
6230
  }
6231
6231
  if (Object.keys(channels).length) ext.layerChannels = channels;
6232
6232
  else delete ext.layerChannels;
6233
6233
  const stickers = {};
6234
- for (const [id, list] of Object.entries(_nullishCoalesce(this.doc.stickers, () => ( {})))) if (list.length && _chunkEBSYZRSWcjs.findLayer.call(void 0, this.doc.layers, id)) stickers[id] = list.map((x) => ({ ...x }));
6234
+ for (const [id, list] of Object.entries(_nullishCoalesce(this.doc.stickers, () => ( {})))) if (list.length && _chunkWMRIG4XQcjs.findLayer.call(void 0, this.doc.layers, id)) stickers[id] = list.map((x) => ({ ...x }));
6235
6235
  if (Object.keys(stickers).length) ext.stickers = stickers;
6236
6236
  else delete ext.stickers;
6237
6237
  if (this.lighting.azimuth !== DEFAULT_LIGHTING.azimuth || this.lighting.elevation !== DEFAULT_LIGHTING.elevation || this.lighting.relief !== DEFAULT_LIGHTING.relief) ext.lighting = { ...this.lighting };
@@ -6245,7 +6245,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6245
6245
  if (ext.stickers && typeof ext.stickers === "object") {
6246
6246
  const stickers = {};
6247
6247
  for (const [id, list] of Object.entries(ext.stickers)) {
6248
- if (!_chunkEBSYZRSWcjs.findLayer.call(void 0, state.layers, id) || !Array.isArray(list)) continue;
6248
+ if (!_chunkWMRIG4XQcjs.findLayer.call(void 0, state.layers, id) || !Array.isArray(list)) continue;
6249
6249
  const ok = list.filter((x) => x && typeof x.id === "string" && STAMP_KINDS.includes(x.stamp) && Number.isFinite(x.x) && Number.isFinite(x.y) && x.size > 0);
6250
6250
  if (ok.length !== list.length) problems.push(`Some stickers of layer "${id}" could not be read; they were dropped.`);
6251
6251
  stickers[id] = ok.map((x) => ({ ...x }));
@@ -6256,7 +6256,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6256
6256
  if (!raw || typeof raw !== "object") return state;
6257
6257
  const thick = {};
6258
6258
  for (const [id, v] of Object.entries(raw)) {
6259
- if (!_chunkEBSYZRSWcjs.findLayer.call(void 0, state.layers, id)) continue;
6259
+ if (!_chunkWMRIG4XQcjs.findLayer.call(void 0, state.layers, id)) continue;
6260
6260
  try {
6261
6261
  thick[id] = thickFromJSON(v);
6262
6262
  } catch (e) {
@@ -6370,7 +6370,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6370
6370
  return next.type === "group" ? { ...next, children: toStandard(next.children) } : next;
6371
6371
  });
6372
6372
  const layers = toStandard(dried);
6373
- const result = _chunk2J3LS7JZcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
6373
+ const result = _chunkHTAFDTNRcjs.exportPsd.call(void 0, { width, height, layers: [paperLayer, ...layers], merged, resolution: dpi });
6374
6374
  for (const [mode, names] of changed) {
6375
6375
  const label = _nullishCoalesce(_optionalChain([_chunk7ISPWEJAcjs.BLEND_MODES, 'access', _225 => _225.find, 'call', _226 => _226((m) => m.id === mode), 'optionalAccess', _227 => _227.label]), () => ( mode));
6376
6376
  const std = _nullishCoalesce(_optionalChain([_chunk7ISPWEJAcjs.BLEND_MODES, 'access', _228 => _228.find, 'call', _229 => _229((m) => m.id === _chunk7ISPWEJAcjs.standardBlendMode.call(void 0, mode)), 'optionalAccess', _230 => _230.label]), () => ( _chunk7ISPWEJAcjs.standardBlendMode.call(void 0, mode)));
@@ -6620,9 +6620,9 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6620
6620
  }
6621
6621
  /** Replaces a layer's stickers and redraws its pixels from them (one undo step). */
6622
6622
  commitStickers(label, layer, stickers) {
6623
- if (_chunkEBSYZRSWcjs.isLayerLocked.call(void 0, layer, "pixels")) throw new PaintEditorError(`Layer "${layer.name}" has its pixels locked; unlock it first.`);
6623
+ if (_chunkWMRIG4XQcjs.isLayerLocked.call(void 0, layer, "pixels")) throw new PaintEditorError(`Layer "${layer.name}" has its pixels locked; unlock it first.`);
6624
6624
  const surface = stickerSurface(stickers);
6625
- const doc = { ...this.doc, layers: _chunkEBSYZRSWcjs.mapLayer.call(void 0, this.doc.layers, layer.id, () => ({ ...layer, surface, offset: { x: 0, y: 0 } })), stickers: { ..._nullishCoalesce(this.doc.stickers, () => ( {})), [layer.id]: stickers } };
6625
+ const doc = { ...this.doc, layers: _chunkWMRIG4XQcjs.mapLayer.call(void 0, this.doc.layers, layer.id, () => ({ ...layer, surface, offset: { x: 0, y: 0 } })), stickers: { ..._nullishCoalesce(this.doc.stickers, () => ( {})), [layer.id]: stickers } };
6626
6626
  this.commit(label, this.withPaintEvent(doc, { kind: "stickers", layerId: layer.id, data: { stickers: stickers.map((s) => ({ ...s })) } }));
6627
6627
  }
6628
6628
  /** Moves, turns, resizes, recolours or restamps one sticker (one undo step). Returns it. */
@@ -6868,7 +6868,7 @@ var PaintEditorController = (_class17 = class _PaintEditorController {
6868
6868
  }
6869
6869
  /** A layer's tile surface (live while stroking), for thumbnails. */
6870
6870
  layerSurface(id) {
6871
- const l = _optionalChain([_chunkEBSYZRSWcjs.findLayer.call(void 0, this.currentLayers(), id), 'optionalAccess', _253 => _253.layer]);
6871
+ const l = _optionalChain([_chunkWMRIG4XQcjs.findLayer.call(void 0, this.currentLayers(), id), 'optionalAccess', _253 => _253.layer]);
6872
6872
  return isPixelLayer(l) ? l.surface : null;
6873
6873
  }
6874
6874
  }, _class17);
@@ -7674,7 +7674,7 @@ function createPaintWetTools(c) {
7674
7674
  type: "object",
7675
7675
  properties: {
7676
7676
  layerId: LAYER_ID2,
7677
- kind: { type: "string", enum: [..._chunkL2T6EJ5Scjs.WET_FLOW_KINDS], description: "none, linear, swirl, radial or turbulent." },
7677
+ kind: { type: "string", enum: [..._chunkL3PXFMOFcjs.WET_FLOW_KINDS], description: "none, linear, swirl, radial or turbulent." },
7678
7678
  strength: UNIT("How hard it pushes, 0..1 (1 is about a 25\xB0 tilt; default 0.5)."),
7679
7679
  angle: { type: "number", minimum: -360, maximum: 360, description: "linear: direction in degrees clockwise from canvas down (default 0)." },
7680
7680
  center: {
@@ -7872,7 +7872,7 @@ var TIP = {
7872
7872
  type: "object",
7873
7873
  description: "The tip (the shared brush engine). Missing fields keep their current values.",
7874
7874
  properties: {
7875
- size: { type: "number", minimum: 1, maximum: _chunkL2T6EJ5Scjs.MAX_BRUSH_SIZE, description: "Diameter in document pixels." },
7875
+ size: { type: "number", minimum: 1, maximum: _chunkL3PXFMOFcjs.MAX_BRUSH_SIZE, description: "Diameter in document pixels." },
7876
7876
  hardness: { type: "number", minimum: 0, maximum: 1, description: "Edge hardness, 0 (soft) .. 1 (hard)." },
7877
7877
  spacing: { type: "number", minimum: 0.01, maximum: 10, description: "Dab spacing as a fraction of the diameter (0.05 is smooth, 1 is dotted)." },
7878
7878
  angle: { type: "number", minimum: -360, maximum: 360, description: "Tip angle in degrees, counter-clockwise; with rotation stroke or barrel it is added to the stroke direction or pen rotation." },
@@ -7917,11 +7917,11 @@ var MIXER = {
7917
7917
  mix: { type: "number", minimum: 0, maximum: 1, description: "Mix ratio: how far each dab's paint moves from the reservoir towards the picked-up colour." },
7918
7918
  loadEachStroke: { type: "boolean", description: "Refill the reservoir with the colour before each stroke." },
7919
7919
  cleanEachStroke: { type: "boolean", description: "Empty the pickup well after each stroke." },
7920
- mixing: { type: "string", enum: [..._chunkL2T6EJ5Scjs.MIXING_MODELS], description: "rgb: RGB averages. pigment: mixes like paint (Kubelka-Munk)." }
7920
+ mixing: { type: "string", enum: [..._chunkL3PXFMOFcjs.MIXING_MODELS], description: "rgb: RGB averages. pigment: mixes like paint (Kubelka-Munk)." }
7921
7921
  },
7922
7922
  additionalProperties: false
7923
7923
  };
7924
- var MIXING = { type: "string", enum: [..._chunkL2T6EJ5Scjs.MIXING_MODELS], description: "pigment: mixes like paint (Kubelka-Munk, blue and yellow make green); rgb: straight RGB averages." };
7924
+ var MIXING = { type: "string", enum: [..._chunkL3PXFMOFcjs.MIXING_MODELS], description: "pigment: mixes like paint (Kubelka-Munk, blue and yellow make green); rgb: straight RGB averages." };
7925
7925
  var BEHAVIOR = {
7926
7926
  type: "object",
7927
7927
  description: "How the brush handles paint on the canvas (dab and mixer engines; on a mixer brush pickup, mix, dirty and mixing are its mixer wet, mix, !cleanEachStroke and mixing). Missing fields keep their current values.",
@@ -8803,7 +8803,7 @@ function createPaintEditorToolProvider(controller, options = {}) {
8803
8803
  tools.push(...createPaintThickTools(c));
8804
8804
  tools.push(...createPaintReplayTools(c));
8805
8805
  tools.push(...createPaintStickerTools(c));
8806
- tools.push(..._chunkL2T6EJ5Scjs.createPigmentTools.call(void 0, ));
8806
+ tools.push(..._chunkL3PXFMOFcjs.createPigmentTools.call(void 0, ));
8807
8807
  return { id: _nullishCoalesce(options.id, () => ( "paint-editor")), namespace: options.namespace, tools };
8808
8808
  }
8809
8809
 
@@ -9578,5 +9578,5 @@ function quickStencil(kind, canvas) {
9578
9578
 
9579
9579
 
9580
9580
 
9581
- exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunk7ISPWEJAcjs.BLEND_MODES; exports.BRUSH_ID = BRUSH_ID; exports.BRUSH_ROTATIONS = BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = BUILTIN_BRUSHES; exports.BristleStroke = BristleStroke; exports.DEFAULT_BEHAVIOR = DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkL2T6EJ5Scjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = DEFAULT_MULTI_COLOR; exports.DEFAULT_PAPER = DEFAULT_PAPER; exports.DEFAULT_PARTICLE = DEFAULT_PARTICLE; exports.DEFAULT_STICKER = DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkL2T6EJ5Scjs.DEFAULT_WET_PARAMS; exports.DryStroke = DryStroke; exports.GRAIN_PATTERNS = GRAIN_PATTERNS; exports.GRAIN_TILE = GRAIN_TILE; exports.HARMONY_KINDS = HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = IDENTITY_COPY; exports.IMPASTO_TOOLS = IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunkL2T6EJ5Scjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_SIDE = MAX_CANVAS_SIDE; exports.MAX_COORDINATE = MAX_COORDINATE; exports.MAX_IMAGE_SIDE = MAX_IMAGE_SIDE; exports.MAX_ZOOM = MAX_ZOOM; exports.MIN_CANVAS_SIDE = MIN_CANVAS_SIDE; exports.MIN_ZOOM = MIN_ZOOM; exports.MIXING_PAD_HEIGHT = MIXING_PAD_HEIGHT; exports.MIXING_PAD_WIDTH = MIXING_PAD_WIDTH; exports.MULTI_COLOR_MODES = MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunk7ISPWEJAcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = PAINT_BRUSH_ENGINES; exports.PAINT_FORMAT = PAINT_FORMAT; exports.PAINT_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_FAMILIES = PAPER_FAMILIES; exports.PAPER_LIBRARY = PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PARTICLE_KINDS = PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = PARTICLE_RENDERS; exports.PARTICLE_RENDER_LABELS = PARTICLE_RENDER_LABELS; exports.PaintCanvasPresenter = PaintCanvasPresenter; exports.PaintDabStroke = PaintDabStroke; exports.PaintDirector = PaintDirector; exports.PaintDocumentError = PaintDocumentError; exports.PaintEditorController = PaintEditorController; exports.PaintEditorError = PaintEditorError; exports.PaintGesture = PaintGesture; exports.PaintPresence = PaintPresence; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = PaperGrain; exports.ParticleStroke = ParticleStroke; exports.PenDabWalker = PenDabWalker; exports.PenSmoother = PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = STAMP_KINDS; exports.STAMP_LABELS = STAMP_LABELS; exports.STENCIL_KINDS = STENCIL_KINDS; exports.STENCIL_SHAPES = STENCIL_SHAPES; exports.STICKER_SLIDERS = STICKER_SLIDERS; exports.SYMMETRY_MODES = SYMMETRY_MODES; exports.StencilSnapper = StencilSnapper; exports.StickerSpray = StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = TileableNoise; exports.WET_FLOW_KINDS = _chunkL2T6EJ5Scjs.WET_FLOW_KINDS; exports.WET_MEDIA = WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkL2T6EJ5Scjs.WET_PARAM_KEYS; exports.WET_PARAM_SCHEMA = WET_PARAM_SCHEMA; exports.WET_PARAM_SLIDERS = WET_PARAM_SLIDERS; exports.WET_SPEED_SLIDER = WET_SPEED_SLIDER; exports.WET_TILT_SLIDERS = WET_TILT_SLIDERS; exports.WET_TOOLS = WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushToJSON = brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.clonePaper = clonePaper; exports.colorHarmony = colorHarmony; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorToolProvider = createPaintEditorToolProvider; exports.createPaintLayer = createPaintLayer; exports.createPaintReplayTools = createPaintReplayTools; exports.createPaintStickerTools = createPaintStickerTools; exports.createPaintThickTools = createPaintThickTools; exports.createPaintWetTools = createPaintWetTools; exports.decodeImageBlob = decodeImageBlob; exports.defaultGuides = defaultGuides; exports.defaultImageEncoder = defaultImageEncoder; exports.deserializePaintDocument = deserializePaintDocument; exports.deserializePaintDocumentAsync = deserializePaintDocumentAsync; exports.documentExtensions = documentExtensions; exports.documentToScreen = documentToScreen; exports.downloadBytes = downloadBytes; exports.downsampleRgba = downsampleRgba; exports.drawSticker = drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = grainCatch; exports.grainHeights = grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = hash2; exports.hexToRgb8 = hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunk7ISPWEJAcjs.isBlendMode; exports.isPainterlyBlendMode = _chunk7ISPWEJAcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = isWetBrush; exports.isWetCapable = isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = mix32; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.newPaintLayerId = newPaintLayerId; exports.normalizeBehavior = normalizeBehavior; exports.normalizeBristle = normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = normalizeDynamics; exports.normalizeFlow = _chunkL2T6EJ5Scjs.normalizeFlow; exports.normalizeImpasto = normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = normalizeMultiColor; exports.normalizePaintBrush = normalizePaintBrush; exports.normalizePaper = normalizePaper; exports.normalizeParticle = normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = normalizeStickerSettings; exports.normalizeStickerUpdate = normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = normalizeWetBrush; exports.normalizeWetParams = _chunkL2T6EJ5Scjs.normalizeWetParams; exports.padSampleRadius = padSampleRadius; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = paperPreset; exports.parseBrushLibrary = parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = rand01; exports.randSigned = randSigned; exports.readPath = readPath; exports.reliefInfo = reliefInfo; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = renderPaper; exports.renderStickers = renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.stampCoverage = stampCoverage; exports.standardBlendMode = _chunk7ISPWEJAcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = stickerRect; exports.stickerSurface = stickerSurface; exports.strokeBounds = strokeBounds; exports.strokeDuration = strokeDuration; exports.strokeSchedule = strokeSchedule; exports.sweepPath = sweepPath; exports.symmetryAxisAngles = symmetryAxisAngles; exports.symmetryAxisSegments = symmetryAxisSegments; exports.symmetryCopies = symmetryCopies; exports.thickFromJSON = thickFromJSON; exports.thickToJSON = thickToJSON; exports.thumbnailStroke = thumbnailStroke; exports.tiltToOrientation = tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = toStrokePoint; exports.toggleStamp = toggleStamp; exports.usesPaintExchange = usesPaintExchange; exports.variationAffine = variationAffine; exports.varyStroke = varyStroke; exports.viewCssTransform = viewCssTransform; exports.viewMatrix = viewMatrix; exports.viewPenToDocument = viewPenToDocument; exports.wetPaperInput = wetPaperInput; exports.wetPigmentOf = wetPigmentOf; exports.wetSupport = _chunkL2T6EJ5Scjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = wheelToHue;
9581
+ exports.BLEND_MENU_GROUPS = BLEND_MENU_GROUPS; exports.BLEND_MODES = _chunk7ISPWEJAcjs.BLEND_MODES; exports.BRUSH_ID = BRUSH_ID; exports.BRUSH_ROTATIONS = BRUSH_ROTATIONS; exports.BRUSH_SLIDERS = BRUSH_SLIDERS; exports.BUILTIN_BRUSHES = BUILTIN_BRUSHES; exports.BristleStroke = BristleStroke; exports.DEFAULT_BEHAVIOR = DEFAULT_BEHAVIOR; exports.DEFAULT_BRISTLE = DEFAULT_BRISTLE; exports.DEFAULT_BRUSH_ID = DEFAULT_BRUSH_ID; exports.DEFAULT_DPI = DEFAULT_DPI; exports.DEFAULT_DYNAMICS = DEFAULT_DYNAMICS; exports.DEFAULT_FLOW = _chunkL3PXFMOFcjs.DEFAULT_FLOW; exports.DEFAULT_IMPASTO = DEFAULT_IMPASTO; exports.DEFAULT_LIGHTING = DEFAULT_LIGHTING; exports.DEFAULT_MULTI_COLOR = DEFAULT_MULTI_COLOR; exports.DEFAULT_PAPER = DEFAULT_PAPER; exports.DEFAULT_PARTICLE = DEFAULT_PARTICLE; exports.DEFAULT_STICKER = DEFAULT_STICKER; exports.DEFAULT_SWATCHES = DEFAULT_SWATCHES; exports.DEFAULT_VIEW = DEFAULT_VIEW; exports.DEFAULT_WET_BRUSH = DEFAULT_WET_BRUSH; exports.DEFAULT_WET_PARAMS = _chunkL3PXFMOFcjs.DEFAULT_WET_PARAMS; exports.DryStroke = DryStroke; exports.GRAIN_PATTERNS = GRAIN_PATTERNS; exports.GRAIN_TILE = GRAIN_TILE; exports.HARMONY_KINDS = HARMONY_KINDS; exports.IDENTITY_AFFINE = IDENTITY_AFFINE; exports.IDENTITY_COPY = IDENTITY_COPY; exports.IMPASTO_TOOLS = IMPASTO_TOOLS; exports.IMPASTO_TOOL_LABELS = IMPASTO_TOOL_LABELS; exports.LIGHT_SLIDERS = LIGHT_SLIDERS; exports.LitCache = LitCache; exports.MAX_BRUSH_SIZE = _chunkL3PXFMOFcjs.MAX_BRUSH_SIZE; exports.MAX_CANVAS_SIDE = MAX_CANVAS_SIDE; exports.MAX_COORDINATE = MAX_COORDINATE; exports.MAX_IMAGE_SIDE = MAX_IMAGE_SIDE; exports.MAX_ZOOM = MAX_ZOOM; exports.MIN_CANVAS_SIDE = MIN_CANVAS_SIDE; exports.MIN_ZOOM = MIN_ZOOM; exports.MIXING_PAD_HEIGHT = MIXING_PAD_HEIGHT; exports.MIXING_PAD_WIDTH = MIXING_PAD_WIDTH; exports.MULTI_COLOR_MODES = MULTI_COLOR_MODES; exports.MixingPad = MixingPad; exports.PAD_SAMPLE_SIZES = PAD_SAMPLE_SIZES; exports.PAINTERLY_BLEND_MODES = _chunk7ISPWEJAcjs.PAINTERLY_BLEND_MODES; exports.PAINT_BRUSH_CATEGORIES = PAINT_BRUSH_CATEGORIES; exports.PAINT_BRUSH_ENGINES = PAINT_BRUSH_ENGINES; exports.PAINT_FORMAT = PAINT_FORMAT; exports.PAINT_SCHEMA_VERSION = PAINT_SCHEMA_VERSION; exports.PAINT_TOOLS = PAINT_TOOLS; exports.PAPER_FAMILIES = PAPER_FAMILIES; exports.PAPER_LIBRARY = PAPER_LIBRARY; exports.PAPER_NODE_ID = PAPER_NODE_ID; exports.PAPER_SLIDERS = PAPER_SLIDERS; exports.PARTICLE_KINDS = PARTICLE_KINDS; exports.PARTICLE_KIND_LABELS = PARTICLE_KIND_LABELS; exports.PARTICLE_RENDERS = PARTICLE_RENDERS; exports.PARTICLE_RENDER_LABELS = PARTICLE_RENDER_LABELS; exports.PaintCanvasPresenter = PaintCanvasPresenter; exports.PaintDabStroke = PaintDabStroke; exports.PaintDirector = PaintDirector; exports.PaintDocumentError = PaintDocumentError; exports.PaintEditorController = PaintEditorController; exports.PaintEditorError = PaintEditorError; exports.PaintGesture = PaintGesture; exports.PaintPresence = PaintPresence; exports.PaintStrokeSession = PaintStrokeSession; exports.PaintWetLayers = PaintWetLayers; exports.PaperGrain = PaperGrain; exports.ParticleStroke = ParticleStroke; exports.PenDabWalker = PenDabWalker; exports.PenSmoother = PenSmoother; exports.PerspectiveSnapper = PerspectiveSnapper; exports.SNAP_DECIDE_DISTANCE = SNAP_DECIDE_DISTANCE; exports.STAMP_KINDS = STAMP_KINDS; exports.STAMP_LABELS = STAMP_LABELS; exports.STENCIL_KINDS = STENCIL_KINDS; exports.STENCIL_SHAPES = STENCIL_SHAPES; exports.STICKER_SLIDERS = STICKER_SLIDERS; exports.SYMMETRY_MODES = SYMMETRY_MODES; exports.StencilSnapper = StencilSnapper; exports.StickerSpray = StickerSpray; exports.TRACING_NODE_ID = TRACING_NODE_ID; exports.ThickStrokeDriver = ThickStrokeDriver; exports.TileableNoise = TileableNoise; exports.WET_FLOW_KINDS = _chunkL3PXFMOFcjs.WET_FLOW_KINDS; exports.WET_MEDIA = WET_MEDIA; exports.WET_MEDIUM_LABELS = WET_MEDIUM_LABELS; exports.WET_MEDIUM_PARAMS = WET_MEDIUM_PARAMS; exports.WET_PARAM_KEYS = _chunkL3PXFMOFcjs.WET_PARAM_KEYS; exports.WET_PARAM_SCHEMA = WET_PARAM_SCHEMA; exports.WET_PARAM_SLIDERS = WET_PARAM_SLIDERS; exports.WET_SPEED_SLIDER = WET_SPEED_SLIDER; exports.WET_TILT_SLIDERS = WET_TILT_SLIDERS; exports.WET_TOOLS = WET_TOOLS; exports.WET_TOOL_LABELS = WET_TOOL_LABELS; exports.WetStrokeDriver = WetStrokeDriver; exports.affineCopy = affineCopy; exports.applyAffine = applyAffine; exports.brushEngineControls = brushEngineControls; exports.brushLoadColor = brushLoadColor; exports.brushLoadForStroke = brushLoadForStroke; exports.brushToJSON = brushToJSON; exports.buildTimeLapse = buildTimeLapse; exports.clonePaper = clonePaper; exports.colorHarmony = colorHarmony; exports.composeAffine = composeAffine; exports.contactSheet = contactSheet; exports.createPaintCompositor = createPaintCompositor; exports.createPaintDocument = createPaintDocument; exports.createPaintEditorToolProvider = createPaintEditorToolProvider; exports.createPaintLayer = createPaintLayer; exports.createPaintReplayTools = createPaintReplayTools; exports.createPaintStickerTools = createPaintStickerTools; exports.createPaintThickTools = createPaintThickTools; exports.createPaintWetTools = createPaintWetTools; exports.decodeImageBlob = decodeImageBlob; exports.defaultGuides = defaultGuides; exports.defaultImageEncoder = defaultImageEncoder; exports.deserializePaintDocument = deserializePaintDocument; exports.deserializePaintDocumentAsync = deserializePaintDocumentAsync; exports.documentExtensions = documentExtensions; exports.documentToScreen = documentToScreen; exports.downloadBytes = downloadBytes; exports.downsampleRgba = downsampleRgba; exports.drawSticker = drawSticker; exports.drawWaterOverlay = drawWaterOverlay; exports.emptiedLayers = emptiedLayers; exports.emptyThickChannels = emptyThickChannels; exports.fitZoom = fitZoom; exports.grainCatch = grainCatch; exports.grainHeights = grainHeights; exports.guideOverlay = guideOverlay; exports.handlePaintShortcut = handlePaintShortcut; exports.hash2 = hash2; exports.hexToRgb8 = hexToRgb8; exports.hslToRgb = hslToRgb; exports.hsvToRgb = hsvToRgb; exports.hueToWheel = hueToWheel; exports.invertAffine = invertAffine; exports.isBlendMode = _chunk7ISPWEJAcjs.isBlendMode; exports.isPainterlyBlendMode = _chunk7ISPWEJAcjs.isPainterlyBlendMode; exports.isPalmTouch = isPalmTouch; exports.isWetBrush = isWetBrush; exports.isWetCapable = isWetCapable; exports.lightTile = lightTile; exports.lightingKey = lightingKey; exports.mapPenPoint = mapPenPoint; exports.mix32 = mix32; exports.mixerLoadForStroke = mixerLoadForStroke; exports.mixerTip = mixerTip; exports.multiColorForDab = multiColorForDab; exports.multiColorGradient = multiColorGradient; exports.multiColorPalette = multiColorPalette; exports.multiColorSliders = multiColorSliders; exports.newPaintLayerId = newPaintLayerId; exports.normalizeBehavior = normalizeBehavior; exports.normalizeBristle = normalizeBristle; exports.normalizeBrushStroke = normalizeBrushStroke; exports.normalizeCanvas = normalizeCanvas; exports.normalizeDynamics = normalizeDynamics; exports.normalizeFlow = _chunkL3PXFMOFcjs.normalizeFlow; exports.normalizeImpasto = normalizeImpasto; exports.normalizeLighting = normalizeLighting; exports.normalizeMultiColor = normalizeMultiColor; exports.normalizePaintBrush = normalizePaintBrush; exports.normalizePaper = normalizePaper; exports.normalizeParticle = normalizeParticle; exports.normalizePerspective = normalizePerspective; exports.normalizeRotation = normalizeRotation; exports.normalizeStencil = normalizeStencil; exports.normalizeStickerSettings = normalizeStickerSettings; exports.normalizeStickerUpdate = normalizeStickerUpdate; exports.normalizeSymmetry = normalizeSymmetry; exports.normalizeView = normalizeView; exports.normalizeWetBrush = normalizeWetBrush; exports.normalizeWetParams = _chunkL3PXFMOFcjs.normalizeWetParams; exports.padSampleRadius = padSampleRadius; exports.paperGrain = paperGrain; exports.paperKey = paperKey; exports.paperNode = paperNode; exports.paperPreset = paperPreset; exports.parseBrushLibrary = parseBrushLibrary; exports.parseHexColor = parseHexColor; exports.patchBrushValue = patchBrushValue; exports.patchPath = patchPath; exports.penOrientation = penOrientation; exports.perspectiveDirections = perspectiveDirections; exports.perspectiveGuideLines = perspectiveGuideLines; exports.pointerToPenPoint = pointerToPenPoint; exports.quickStencil = quickStencil; exports.rand01 = rand01; exports.randSigned = randSigned; exports.readPath = readPath; exports.reliefInfo = reliefInfo; exports.renderBrushThumbnail = renderBrushThumbnail; exports.renderColorWheel = renderColorWheel; exports.renderPaper = renderPaper; exports.renderStickers = renderStickers; exports.replayFrame = replayFrame; exports.replayItems = replayItems; exports.replayPainting = replayPainting; exports.rgbToHexColor = rgbToHexColor; exports.rgbToHsl = rgbToHsl; exports.rgbToHsv = rgbToHsv; exports.samplePressure = samplePressure; exports.scaleStencil = scaleStencil; exports.screenToDocument = screenToDocument; exports.seedFromString = seedFromString; exports.serializePaintDocument = serializePaintDocument; exports.serializePaintDocumentExternal = serializePaintDocumentExternal; exports.stampCoverage = stampCoverage; exports.standardBlendMode = _chunk7ISPWEJAcjs.standardBlendMode; exports.startWetClock = startWetClock; exports.stencilMask = stencilMask; exports.stencilOutline = stencilOutline; exports.stickerRect = stickerRect; exports.stickerSurface = stickerSurface; exports.strokeBounds = strokeBounds; exports.strokeDuration = strokeDuration; exports.strokeSchedule = strokeSchedule; exports.sweepPath = sweepPath; exports.symmetryAxisAngles = symmetryAxisAngles; exports.symmetryAxisSegments = symmetryAxisSegments; exports.symmetryCopies = symmetryCopies; exports.thickFromJSON = thickFromJSON; exports.thickToJSON = thickToJSON; exports.thumbnailStroke = thumbnailStroke; exports.tiltToOrientation = tiltToOrientation; exports.timeLapseVideo = timeLapseVideo; exports.timeLapseZip = timeLapseZip; exports.toStrokePoint = toStrokePoint; exports.toggleStamp = toggleStamp; exports.usesPaintExchange = usesPaintExchange; exports.variationAffine = variationAffine; exports.varyStroke = varyStroke; exports.viewCssTransform = viewCssTransform; exports.viewMatrix = viewMatrix; exports.viewPenToDocument = viewPenToDocument; exports.wetPaperInput = wetPaperInput; exports.wetPigmentOf = wetPigmentOf; exports.wetSupport = _chunkL3PXFMOFcjs.wetSupport; exports.wheelAngle = wheelAngle; exports.wheelPick = wheelPick; exports.wheelPoint = wheelPoint; exports.wheelToHue = wheelToHue;
9582
9582
  //# sourceMappingURL=index.cjs.map