@pixerate/editor 0.207.0 → 0.209.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 (72) hide show
  1. package/dist/animation-editor/index.cjs +60 -59
  2. package/dist/animation-editor/index.js +6 -5
  3. package/dist/{brushstrokeRender-7LXCU7PD.js → brushstrokeRender-C3UU6GVC.js} +5 -4
  4. package/dist/{brushstrokeRender-VO4ZTWVA.cjs → brushstrokeRender-EAJNE6WP.cjs} +12 -11
  5. package/dist/canvas/index.cjs +8 -8
  6. package/dist/canvas/index.js +1 -1
  7. package/dist/{chunk-2N2QPO3H.js → chunk-2PBZBRP5.js} +9 -7
  8. package/dist/{chunk-7NW46N7I.cjs → chunk-3EHPLDFQ.cjs} +54 -52
  9. package/dist/{chunk-H367YTXI.js → chunk-42TWUPNJ.js} +13 -387
  10. package/dist/chunk-474IQG74.cjs +384 -0
  11. package/dist/{chunk-MLC7HUHO.js → chunk-BGOCAUXH.js} +1 -1
  12. package/dist/chunk-DWYQPL2A.js +2010 -0
  13. package/dist/{chunk-YXKLVD56.js → chunk-F7YA3MMC.js} +2 -2
  14. package/dist/{chunk-ZZGPYNS2.js → chunk-G4E6RUPC.js} +1 -1
  15. package/dist/chunk-HVVR5PZW.js +384 -0
  16. package/dist/{chunk-FR2Q2LVF.cjs → chunk-I7G3RSUJ.cjs} +35 -35
  17. package/dist/chunk-K6PXS6DO.cjs +102 -0
  18. package/dist/{chunk-ZIDUPSP4.js → chunk-KFIOEOCQ.js} +24 -761
  19. package/dist/{chunk-V7GWZIZK.cjs → chunk-KWNMBMKG.cjs} +23 -21
  20. package/dist/chunk-L3G23N5Y.js +763 -0
  21. package/dist/{chunk-GHCXLQ47.js → chunk-NDMXB4PR.js} +2 -2
  22. package/dist/{chunk-CWM3CUUX.cjs → chunk-OLNIPTB3.cjs} +39 -413
  23. package/dist/{chunk-EBDCRTZI.cjs → chunk-PQ3H2AAN.cjs} +92 -90
  24. package/dist/{chunk-BRKVNXDZ.cjs → chunk-QAUIZPYI.cjs} +7 -7
  25. package/dist/{chunk-UYXL6ZWQ.cjs → chunk-QE7D7TZR.cjs} +494 -1231
  26. package/dist/chunk-QYLWG22N.cjs +763 -0
  27. package/dist/{chunk-YQ5C5BVK.cjs → chunk-ROVK6AXX.cjs} +60 -60
  28. package/dist/{chunk-HGTDMKNE.cjs → chunk-UOGKSVRQ.cjs} +126 -221
  29. package/dist/{chunk-EL5PAHNP.js → chunk-USQCKRZG.js} +6 -4
  30. package/dist/{chunk-36OKQDCF.js → chunk-WJ2RBZMM.js} +5 -3
  31. package/dist/chunk-X4LUGTQX.cjs +2010 -0
  32. package/dist/{chunk-NQMP3CWF.js → chunk-YBJXCQTR.js} +15 -110
  33. package/dist/chunk-ZIF4UJJ6.js +102 -0
  34. package/dist/{chunk-WTW7QRTS.cjs → chunk-ZMHPQ6HP.cjs} +1 -1
  35. package/dist/image-editor/controller.d.cts +53 -5
  36. package/dist/image-editor/controller.d.ts +53 -5
  37. package/dist/image-editor/index.cjs +1806 -3356
  38. package/dist/image-editor/index.js +462 -2012
  39. package/dist/image-editor/selection/index.d.cts +1 -0
  40. package/dist/image-editor/selection/index.d.ts +1 -0
  41. package/dist/image-editor/selection/segment/focus.d.cts +2 -0
  42. package/dist/image-editor/selection/segment/focus.d.ts +2 -0
  43. package/dist/image-editor/selection/segment/grabcut.d.cts +4 -2
  44. package/dist/image-editor/selection/segment/grabcut.d.ts +4 -2
  45. package/dist/image-editor/selection/segment/sky.d.cts +2 -0
  46. package/dist/image-editor/selection/segment/sky.d.ts +2 -0
  47. package/dist/image-editor/selection/segment/subject.d.cts +2 -1
  48. package/dist/image-editor/selection/segment/subject.d.ts +2 -1
  49. package/dist/image-editor/selection/segment/work.d.cts +5 -0
  50. package/dist/image-editor/selection/segment/work.d.ts +5 -0
  51. package/dist/image-editor/selection/select-and-mask.d.cts +12 -2
  52. package/dist/image-editor/selection/select-and-mask.d.ts +12 -2
  53. package/dist/image-editor/selection/tool-options.d.cts +3 -1
  54. package/dist/image-editor/selection/tool-options.d.ts +3 -1
  55. package/dist/image-editor/selection/worker.d.cts +126 -0
  56. package/dist/image-editor/selection/worker.d.ts +126 -0
  57. package/dist/image-editor/selection-worker.cjs +14 -0
  58. package/dist/image-editor/selection-worker.d.cts +12 -0
  59. package/dist/image-editor/selection-worker.d.ts +12 -0
  60. package/dist/image-editor/selection-worker.js +14 -0
  61. package/dist/image-editor/types.d.cts +22 -0
  62. package/dist/image-editor/types.d.ts +22 -0
  63. package/dist/paint/index.cjs +6 -5
  64. package/dist/paint/index.js +5 -4
  65. package/dist/paint-editor/index.cjs +394 -390
  66. package/dist/paint-editor/index.js +18 -14
  67. package/dist/raster/index.cjs +22 -18
  68. package/dist/raster/index.js +29 -25
  69. package/dist/vector/index.cjs +986 -985
  70. package/dist/vector/index.js +6 -5
  71. package/package.json +11 -1
  72. package/skills/pixerate-image-editor/SKILL.md +1 -1
@@ -10,6 +10,7 @@
10
10
  var _chunkQT26RHKKcjs = require('./chunk-QT26RHKK.cjs');
11
11
 
12
12
 
13
+ var _chunkK6PXS6DOcjs = require('./chunk-K6PXS6DO.cjs');
13
14
 
14
15
 
15
16
 
@@ -25,6 +26,7 @@ var _chunkQT26RHKKcjs = require('./chunk-QT26RHKK.cjs');
25
26
 
26
27
 
27
28
 
29
+ var _chunkOLNIPTB3cjs = require('./chunk-OLNIPTB3.cjs');
28
30
 
29
31
 
30
32
 
@@ -34,7 +36,10 @@ var _chunkQT26RHKKcjs = require('./chunk-QT26RHKK.cjs');
34
36
 
35
37
 
36
38
 
37
- var _chunkCWM3CUUXcjs = require('./chunk-CWM3CUUX.cjs');
39
+
40
+
41
+
42
+ var _chunk474IQG74cjs = require('./chunk-474IQG74.cjs');
38
43
 
39
44
  // src/raster/effects/model.ts
40
45
  var DEFAULT_GLOBAL_LIGHT = { angle: 120, altitude: 30 };
@@ -223,7 +228,7 @@ function oneOf(r, key, path, values) {
223
228
  if (typeof r[key] !== "string" || !values.includes(r[key])) fail(`${path}.${key}`, `must be one of ${values.join(", ")}.`);
224
229
  }
225
230
  function blend(r, key, path) {
226
- if (!_chunkCWM3CUUXcjs.isBlendMode.call(void 0, r[key])) fail(`${path}.${key}`, `must be a blend mode such as normal, multiply or screen (got ${JSON.stringify(r[key])}).`);
231
+ if (!_chunkOLNIPTB3cjs.isBlendMode.call(void 0, r[key])) fail(`${path}.${key}`, `must be a blend mode such as normal, multiply or screen (got ${JSON.stringify(r[key])}).`);
227
232
  if (r[key] === "pigment") fail(`${path}.${key}`, "pigment is a layer blend mode only; effects cannot use it.");
228
233
  }
229
234
  function contour(v, path) {
@@ -1422,7 +1427,7 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1422
1427
  rgbScratchS[0] = sr;
1423
1428
  rgbScratchS[1] = sg;
1424
1429
  rgbScratchS[2] = sb;
1425
- _chunkCWM3CUUXcjs.mixPigmentRgb.call(void 0, rgbScratchB, rgbScratchS, sa / ao, rgbScratchM);
1430
+ _chunkOLNIPTB3cjs.mixPigmentRgb.call(void 0, rgbScratchB, rgbScratchS, sa / ao, rgbScratchM);
1426
1431
  dst[i] = rgbScratchM[0];
1427
1432
  dst[i + 1] = rgbScratchM[1];
1428
1433
  dst[i + 2] = rgbScratchM[2];
@@ -1437,9 +1442,9 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1437
1442
  m1 = sg;
1438
1443
  m2 = sb;
1439
1444
  } else if (separable) {
1440
- m0 = _chunkCWM3CUUXcjs.blendChannel.call(void 0, mode, b0, sr);
1441
- m1 = _chunkCWM3CUUXcjs.blendChannel.call(void 0, mode, b1, sg);
1442
- m2 = _chunkCWM3CUUXcjs.blendChannel.call(void 0, mode, b2, sb);
1445
+ m0 = _chunkOLNIPTB3cjs.blendChannel.call(void 0, mode, b0, sr);
1446
+ m1 = _chunkOLNIPTB3cjs.blendChannel.call(void 0, mode, b1, sg);
1447
+ m2 = _chunkOLNIPTB3cjs.blendChannel.call(void 0, mode, b2, sb);
1443
1448
  } else {
1444
1449
  rgbScratchB[0] = b0;
1445
1450
  rgbScratchB[1] = b1;
@@ -1447,7 +1452,7 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1447
1452
  rgbScratchS[0] = sr;
1448
1453
  rgbScratchS[1] = sg;
1449
1454
  rgbScratchS[2] = sb;
1450
- const m = _chunkCWM3CUUXcjs.blendRgb.call(void 0, mode, rgbScratchB, rgbScratchS);
1455
+ const m = _chunkOLNIPTB3cjs.blendRgb.call(void 0, mode, rgbScratchB, rgbScratchS);
1451
1456
  m0 = m[0];
1452
1457
  m1 = m[1];
1453
1458
  m2 = m[2];
@@ -1461,7 +1466,7 @@ function compositeAt(dst, i, mode, separable, sr, sg, sb, sa) {
1461
1466
  dst[i + 3] = ao;
1462
1467
  }
1463
1468
  function paint(dst, m, color2, mode, opacity) {
1464
- const sep = mode !== "normal" && _chunkCWM3CUUXcjs.isSeparableBlendMode.call(void 0, mode);
1469
+ const sep = mode !== "normal" && _chunkOLNIPTB3cjs.isSeparableBlendMode.call(void 0, mode);
1465
1470
  const c = [0, 0, 0, 1];
1466
1471
  const n = m.length;
1467
1472
  for (let i = 0; i < n; i++) {
@@ -1753,7 +1758,7 @@ function compositeLayerEffects(input) {
1753
1758
  }
1754
1759
  const premerge = !normalLike;
1755
1760
  if (premerge) {
1756
- const sep2 = _chunkCWM3CUUXcjs.isSeparableBlendMode.call(void 0, input.blend);
1761
+ const sep2 = _chunkOLNIPTB3cjs.isSeparableBlendMode.call(void 0, input.blend);
1757
1762
  for (let i = 0; i < n; i++) {
1758
1763
  const p = i * 4;
1759
1764
  const sr = lay[p];
@@ -1873,7 +1878,7 @@ function compositeLayerEffects(input) {
1873
1878
  paintColor(work, fx(i, 1), e.shadowColor, e.shadowBlend, e.shadowOpacity);
1874
1879
  }
1875
1880
  const mode = premerge ? "normal" : input.blend;
1876
- const sep = _chunkCWM3CUUXcjs.isSeparableBlendMode.call(void 0, mode);
1881
+ const sep = _chunkOLNIPTB3cjs.isSeparableBlendMode.call(void 0, mode);
1877
1882
  for (let i = 0; i < n; i++) {
1878
1883
  const p = i * 4;
1879
1884
  if (lay[p + 3] > 0) compositeAt(work, p, mode, sep, lay[p], lay[p + 1], lay[p + 2], lay[p + 3]);
@@ -2088,9 +2093,9 @@ var DeepCompositor = class {
2088
2093
  }
2089
2094
  if (!visible.length) return;
2090
2095
  if (this.deep.applyFilterRunDeep) {
2091
- if (this.linear) mapColour(acc, _chunkCWM3CUUXcjs.srgbEncode);
2096
+ if (this.linear) mapColour(acc, _chunkOLNIPTB3cjs.srgbEncode);
2092
2097
  this.deep.applyFilterRunDeep(visible, acc, r, masks, this.sources);
2093
- if (this.linear) mapColour(acc, _chunkCWM3CUUXcjs.srgbDecode);
2098
+ if (this.linear) mapColour(acc, _chunkOLNIPTB3cjs.srgbDecode);
2094
2099
  return;
2095
2100
  }
2096
2101
  const bytes = this.to8(acc);
@@ -2155,7 +2160,7 @@ var DeepCompositor = class {
2155
2160
  }
2156
2161
  /** A surface's samples over `rect` (layer space) in the working space. */
2157
2162
  samples(surface, rect) {
2158
- const samples = _chunkCWM3CUUXcjs.readDeepRegion.call(void 0, surface, rect, this.depth);
2163
+ const samples = _chunkOLNIPTB3cjs.readDeepRegion.call(void 0, surface, rect, this.depth);
2159
2164
  if (samples instanceof Float32Array) return samples;
2160
2165
  const out = new Float32Array(samples.length);
2161
2166
  for (let i = 0; i < samples.length; i++) out[i] = samples[i] / 65535;
@@ -2163,7 +2168,7 @@ var DeepCompositor = class {
2163
2168
  }
2164
2169
  /** 8-bit RGBA to the working space. */
2165
2170
  from8(bytes) {
2166
- if (this.linear) return _chunkCWM3CUUXcjs.to32From8.call(void 0, bytes, 4);
2171
+ if (this.linear) return _chunkOLNIPTB3cjs.to32From8.call(void 0, bytes, 4);
2167
2172
  const out = new Float32Array(bytes.length);
2168
2173
  for (let i = 0; i < bytes.length; i++) out[i] = bytes[i] / 255;
2169
2174
  return out;
@@ -2172,7 +2177,7 @@ var DeepCompositor = class {
2172
2177
  to8(acc) {
2173
2178
  const out = new Uint8ClampedArray(acc.length);
2174
2179
  for (let i = 0; i < acc.length; i += 4) {
2175
- for (let c = 0; c < 3; c++) out[i + c] = Math.round((this.linear ? _chunkCWM3CUUXcjs.srgbEncode.call(void 0, acc[i + c]) : acc[i + c]) * 255);
2180
+ for (let c = 0; c < 3; c++) out[i + c] = Math.round((this.linear ? _chunkOLNIPTB3cjs.srgbEncode.call(void 0, acc[i + c]) : acc[i + c]) * 255);
2176
2181
  out[i + 3] = Math.round(acc[i + 3] * 255);
2177
2182
  }
2178
2183
  return out;
@@ -2210,13 +2215,13 @@ var DeepCompositor = class {
2210
2215
  cs[c] = src[i + c];
2211
2216
  }
2212
2217
  if (pigment) {
2213
- if (this.linear) for (let c = 0; c < 3; c++) cb[c] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, cb[c]), cs[c] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, cs[c]);
2214
- _chunkCWM3CUUXcjs.mixPigmentRgb.call(void 0, cb, cs, as / ao, mix);
2215
- for (let c = 0; c < 3; c++) dst[i + c] = this.linear ? _chunkCWM3CUUXcjs.srgbDecode.call(void 0, mix[c]) : mix[c];
2218
+ if (this.linear) for (let c = 0; c < 3; c++) cb[c] = _chunkOLNIPTB3cjs.srgbEncode.call(void 0, cb[c]), cs[c] = _chunkOLNIPTB3cjs.srgbEncode.call(void 0, cs[c]);
2219
+ _chunkOLNIPTB3cjs.mixPigmentRgb.call(void 0, cb, cs, as / ao, mix);
2220
+ for (let c = 0; c < 3; c++) dst[i + c] = this.linear ? _chunkOLNIPTB3cjs.srgbDecode.call(void 0, mix[c]) : mix[c];
2216
2221
  dst[i + 3] = ao;
2217
2222
  continue;
2218
2223
  }
2219
- const m = normal ? cs : _chunkCWM3CUUXcjs.blendRgb.call(void 0, mode, cb, cs);
2224
+ const m = normal ? cs : _chunkOLNIPTB3cjs.blendRgb.call(void 0, mode, cb, cs);
2220
2225
  const wb = (1 - as) * ab;
2221
2226
  const ws = (1 - ab) * as;
2222
2227
  const wm = as * ab;
@@ -2250,115 +2255,17 @@ function workingToSamples(data, depth) {
2250
2255
  }
2251
2256
  function encodeInPlace(d) {
2252
2257
  for (let i = 0; i < d.length; i += 4) {
2253
- d[i] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, d[i]);
2254
- d[i + 1] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, d[i + 1]);
2255
- d[i + 2] = _chunkCWM3CUUXcjs.srgbEncode.call(void 0, d[i + 2]);
2258
+ d[i] = _chunkOLNIPTB3cjs.srgbEncode.call(void 0, d[i]);
2259
+ d[i + 1] = _chunkOLNIPTB3cjs.srgbEncode.call(void 0, d[i + 1]);
2260
+ d[i + 2] = _chunkOLNIPTB3cjs.srgbEncode.call(void 0, d[i + 2]);
2256
2261
  }
2257
2262
  }
2258
2263
  function decodeInPlace(d) {
2259
2264
  for (let i = 0; i < d.length; i += 4) {
2260
- d[i] = _chunkCWM3CUUXcjs.srgbDecode.call(void 0, d[i]);
2261
- d[i + 1] = _chunkCWM3CUUXcjs.srgbDecode.call(void 0, d[i + 1]);
2262
- d[i + 2] = _chunkCWM3CUUXcjs.srgbDecode.call(void 0, d[i + 2]);
2263
- }
2264
- }
2265
-
2266
- // src/raster/blur.ts
2267
- function gaussianKernel(sigma) {
2268
- const r = Math.ceil(sigma * 3);
2269
- const k = new Float32Array(2 * r + 1);
2270
- let s = 0;
2271
- for (let i = -r; i <= r; i++) {
2272
- const v = Math.exp(-(i * i) / (2 * sigma * sigma));
2273
- k[i + r] = v;
2274
- s += v;
2275
- }
2276
- for (let i = 0; i < k.length; i++) k[i] /= s;
2277
- return k;
2278
- }
2279
- var DIRECT_GAUSSIAN_MAX_SIGMA = 8;
2280
- function boxRadii(sigma) {
2281
- const n = 3;
2282
- const wIdeal = Math.sqrt(12 * sigma * sigma / n + 1);
2283
- let wl = Math.floor(wIdeal);
2284
- if (wl % 2 === 0) wl--;
2285
- const wu = wl + 2;
2286
- const mIdeal = (12 * sigma * sigma - n * wl * wl - 4 * n * wl - 3 * n) / (-4 * wl - 4);
2287
- const m = Math.round(mIdeal);
2288
- const sizes = [0, 1, 2].map((i) => i < m ? wl : wu);
2289
- return sizes.map((s) => (s - 1) / 2);
2290
- }
2291
- function convolveLine(src, off, stride, len, k, edge, dst) {
2292
- const r = (k.length - 1) / 2;
2293
- for (let i = 0; i < len; i++) {
2294
- let a = 0;
2295
- const lo = i - r;
2296
- for (let j = 0; j < k.length; j++) {
2297
- let x = lo + j;
2298
- if (x < 0 || x >= len) {
2299
- if (edge === "zero") continue;
2300
- x = x < 0 ? 0 : len - 1;
2301
- }
2302
- a += src[off + x * stride] * k[j];
2303
- }
2304
- dst[i] = a;
2305
- }
2306
- }
2307
- function boxesLine(src, off, stride, len, radii, edge, a, b, dst) {
2308
- const pad = radii.reduce((s, r) => s + r, 0);
2309
- const plen = len + 2 * pad;
2310
- for (let i = 0; i < plen; i++) {
2311
- const j = i - pad;
2312
- a[i] = j < 0 ? edge === "zero" ? 0 : src[off] : j >= len ? edge === "zero" ? 0 : src[off + (len - 1) * stride] : src[off + j * stride];
2313
- }
2314
- let from = a;
2315
- let to = b;
2316
- for (const r of radii) {
2317
- let sum = 0;
2318
- for (let i = 0; i <= Math.min(r, plen - 1); i++) sum += from[i];
2319
- const k = 2 * r + 1;
2320
- for (let i = 0; i < plen; i++) {
2321
- to[i] = sum / k;
2322
- const add = i + r + 1;
2323
- const drop = i - r;
2324
- if (add < plen) sum += from[add];
2325
- if (drop >= 0) sum -= from[drop];
2326
- }
2327
- const t = from;
2328
- from = to;
2329
- to = t;
2330
- }
2331
- for (let i = 0; i < len; i++) dst[i] = from[i + pad];
2332
- }
2333
- function gaussianBlur(src, w, h, sigma, edge = "zero") {
2334
- const out = Float32Array.from(src);
2335
- if (!(sigma >= 0.1) || w <= 0 || h <= 0) return out;
2336
- const s = Math.min(sigma, 4 * Math.max(w, h));
2337
- const line = new Float32Array(Math.max(w, h));
2338
- const passes = [];
2339
- if (s <= DIRECT_GAUSSIAN_MAX_SIGMA) {
2340
- const k = gaussianKernel(s);
2341
- passes.push((buf, off, stride, len) => convolveLine(buf, off, stride, len, k, edge, line));
2342
- } else {
2343
- const radii = boxRadii(s);
2344
- const plen = Math.max(w, h) + 2 * radii.reduce((a2, r) => a2 + r, 0);
2345
- const a = new Float32Array(plen);
2346
- const b = new Float32Array(plen);
2347
- passes.push((buf, off, stride, len) => boxesLine(buf, off, stride, len, radii, edge, a, b, line));
2348
- }
2349
- for (const pass of passes) {
2350
- for (let y = 0; y < h; y++) {
2351
- pass(out, y * w, 1, w);
2352
- out.set(line.subarray(0, w), y * w);
2353
- }
2354
- }
2355
- for (const pass of passes) {
2356
- for (let x = 0; x < w; x++) {
2357
- pass(out, x, w, h);
2358
- for (let y = 0; y < h; y++) out[y * w + x] = line[y];
2359
- }
2265
+ d[i] = _chunkOLNIPTB3cjs.srgbDecode.call(void 0, d[i]);
2266
+ d[i + 1] = _chunkOLNIPTB3cjs.srgbDecode.call(void 0, d[i + 1]);
2267
+ d[i + 2] = _chunkOLNIPTB3cjs.srgbDecode.call(void 0, d[i + 2]);
2360
2268
  }
2361
- return out;
2362
2269
  }
2363
2270
 
2364
2271
  // src/raster/layers.ts
@@ -2436,7 +2343,7 @@ function isLayerLocked(layer, what) {
2436
2343
  }
2437
2344
 
2438
2345
  // src/raster/compositor.ts
2439
- var TILE_PIXELS = _chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE;
2346
+ var TILE_PIXELS = _chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE;
2440
2347
  var TILE_BYTES = TILE_PIXELS * 4;
2441
2348
  function sameSig(a, b) {
2442
2349
  if (!a || a.key !== b.key || a.refs.length !== b.refs.length) return false;
@@ -2448,13 +2355,13 @@ function dirtyInTile(rects, tx, ty) {
2448
2355
  let y0 = Infinity;
2449
2356
  let x1 = -Infinity;
2450
2357
  let y1 = -Infinity;
2451
- const ox = tx * _chunkCWM3CUUXcjs.TILE;
2452
- const oy = ty * _chunkCWM3CUUXcjs.TILE;
2358
+ const ox = tx * _chunk474IQG74cjs.TILE;
2359
+ const oy = ty * _chunk474IQG74cjs.TILE;
2453
2360
  for (const r of rects) {
2454
2361
  const a = Math.max(ox, Math.floor(r.x));
2455
2362
  const b = Math.max(oy, Math.floor(r.y));
2456
- const c = Math.min(ox + _chunkCWM3CUUXcjs.TILE, Math.ceil(r.x + r.width));
2457
- const d = Math.min(oy + _chunkCWM3CUUXcjs.TILE, Math.ceil(r.y + r.height));
2363
+ const c = Math.min(ox + _chunk474IQG74cjs.TILE, Math.ceil(r.x + r.width));
2364
+ const d = Math.min(oy + _chunk474IQG74cjs.TILE, Math.ceil(r.y + r.height));
2458
2365
  if (c <= a || d <= b) continue;
2459
2366
  x0 = Math.min(x0, a);
2460
2367
  y0 = Math.min(y0, b);
@@ -2467,7 +2374,7 @@ function blendTile(dst, src, mode, alpha, coverage) {
2467
2374
  if (!(alpha > 0)) return;
2468
2375
  const normal = mode === "normal";
2469
2376
  const pigment = mode === "pigment";
2470
- const lut = !normal && _chunkCWM3CUUXcjs.isSeparableBlendMode.call(void 0, mode) ? separableLut(mode) : null;
2377
+ const lut = !normal && _chunkOLNIPTB3cjs.isSeparableBlendMode.call(void 0, mode) ? separableLut(mode) : null;
2471
2378
  const cb = [0, 0, 0];
2472
2379
  const cs = [0, 0, 0];
2473
2380
  const n = dst.length;
@@ -2494,7 +2401,7 @@ function blendTile(dst, src, mode, alpha, coverage) {
2494
2401
  const d1 = dst[i + 1];
2495
2402
  const d2 = dst[i + 2];
2496
2403
  if (pigment) {
2497
- _chunkCWM3CUUXcjs.mixPigment8.call(void 0, d0, d1, d2, src[i], src[i + 1], src[i + 2], as / ao, cb);
2404
+ _chunkOLNIPTB3cjs.mixPigment8.call(void 0, d0, d1, d2, src[i], src[i + 1], src[i + 2], as / ao, cb);
2498
2405
  dst[i] = Math.round(cb[0] * 255);
2499
2406
  dst[i + 1] = Math.round(cb[1] * 255);
2500
2407
  dst[i + 2] = Math.round(cb[2] * 255);
@@ -2525,7 +2432,7 @@ function blendTile(dst, src, mode, alpha, coverage) {
2525
2432
  cs[0] = s0;
2526
2433
  cs[1] = s1;
2527
2434
  cs[2] = s2;
2528
- const m = _chunkCWM3CUUXcjs.blendRgb.call(void 0, mode, cb, cs);
2435
+ const m = _chunkOLNIPTB3cjs.blendRgb.call(void 0, mode, cb, cs);
2529
2436
  m0 = m[0];
2530
2437
  m1 = m[1];
2531
2438
  m2 = m[2];
@@ -2544,7 +2451,7 @@ function separableLut(mode) {
2544
2451
  let lut = separableLuts.get(mode);
2545
2452
  if (!lut) {
2546
2453
  lut = new Float64Array(65536);
2547
- for (let b = 0; b < 256; b++) for (let c = 0; c < 256; c++) lut[b << 8 | c] = _chunkCWM3CUUXcjs.blendChannel.call(void 0, mode, b / 255, c / 255);
2454
+ for (let b = 0; b < 256; b++) for (let c = 0; c < 256; c++) lut[b << 8 | c] = _chunkOLNIPTB3cjs.blendChannel.call(void 0, mode, b / 255, c / 255);
2548
2455
  separableLuts.set(mode, lut);
2549
2456
  }
2550
2457
  return lut;
@@ -2567,7 +2474,7 @@ var isGroup2 = (l) => l.type === "group";
2567
2474
  var maskDepths = /* @__PURE__ */ new WeakMap();
2568
2475
  function maskDepth(surface) {
2569
2476
  let d = maskDepths.get(surface);
2570
- if (d === void 0) maskDepths.set(surface, d = _chunkCWM3CUUXcjs.surfaceDepth.call(void 0, surface));
2477
+ if (d === void 0) maskDepths.set(surface, d = _chunkOLNIPTB3cjs.surfaceDepth.call(void 0, surface));
2571
2478
  return d;
2572
2479
  }
2573
2480
  var RasterCompositor = (_class = class {
@@ -2624,15 +2531,15 @@ var RasterCompositor = (_class = class {
2624
2531
  composite(layers, rect, sources, options = {}) {
2625
2532
  const out = new Uint8ClampedArray(Math.max(0, rect.width * rect.height * 4));
2626
2533
  this.compositeTiles(layers, rect, sources, (tx, ty, data) => {
2627
- const ox = tx * _chunkCWM3CUUXcjs.TILE;
2628
- const oy = ty * _chunkCWM3CUUXcjs.TILE;
2534
+ const ox = tx * _chunk474IQG74cjs.TILE;
2535
+ const oy = ty * _chunk474IQG74cjs.TILE;
2629
2536
  const x0 = Math.max(rect.x, ox);
2630
2537
  const y0 = Math.max(rect.y, oy);
2631
- const x1 = Math.min(rect.x + rect.width, ox + _chunkCWM3CUUXcjs.TILE);
2632
- const y1 = Math.min(rect.y + rect.height, oy + _chunkCWM3CUUXcjs.TILE);
2538
+ const x1 = Math.min(rect.x + rect.width, ox + _chunk474IQG74cjs.TILE);
2539
+ const y1 = Math.min(rect.y + rect.height, oy + _chunk474IQG74cjs.TILE);
2633
2540
  const span = (x1 - x0) * 4;
2634
2541
  for (let y = y0; y < y1; y++) {
2635
- const s = ((y - oy) * _chunkCWM3CUUXcjs.TILE + (x0 - ox)) * 4;
2542
+ const s = ((y - oy) * _chunk474IQG74cjs.TILE + (x0 - ox)) * 4;
2636
2543
  out.set(data.subarray(s, s + span), ((y - rect.y) * rect.width + (x0 - rect.x)) * 4);
2637
2544
  }
2638
2545
  }, options);
@@ -2653,9 +2560,9 @@ var RasterCompositor = (_class = class {
2653
2560
  this.callStats = stats;
2654
2561
  const grow = options.dirty ? this.effectsReach(layers) : 0;
2655
2562
  const dirty = grow > 0 ? options.dirty.map((d) => inflateRect(d, grow)) : options.dirty;
2656
- for (const { tx, ty } of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, rect)) {
2563
+ for (const { tx, ty } of _chunk474IQG74cjs.tilesInRect.call(void 0, rect)) {
2657
2564
  stats.tiles++;
2658
- const before = _optionalChain([this, 'access', _31 => _31.tiles, 'access', _32 => _32.get, 'call', _33 => _33(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _34 => _34.result]);
2565
+ const before = _optionalChain([this, 'access', _31 => _31.tiles, 'access', _32 => _32.get, 'call', _33 => _33(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty)), 'optionalAccess', _34 => _34.result]);
2659
2566
  const data = this.compositeTile(layers, steps, tx, ty, stats, dirty ? dirtyInTile(dirty, tx, ty) : null);
2660
2567
  onTile(tx, ty, data, data !== before);
2661
2568
  }
@@ -2757,7 +2664,7 @@ var RasterCompositor = (_class = class {
2757
2664
  return key;
2758
2665
  }
2759
2666
  compositeTile(root, steps, tx, ty, stats, dirty = null) {
2760
- const key = _chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty);
2667
+ const key = _chunk474IQG74cjs.tileKey.call(void 0, tx, ty);
2761
2668
  const entry = this.tiles.get(key);
2762
2669
  const sigs = steps.map((s) => this.stepSig(s, tx, ty));
2763
2670
  let first = 0;
@@ -2780,20 +2687,20 @@ var RasterCompositor = (_class = class {
2780
2687
  }
2781
2688
  }
2782
2689
  }
2783
- const tileRect = { x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE };
2690
+ const tileRect = { x: tx * _chunk474IQG74cjs.TILE, y: ty * _chunk474IQG74cjs.TILE, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE };
2784
2691
  const hint = this.hint;
2785
2692
  const checkpoints = /* @__PURE__ */ new Map();
2786
2693
  if (entry) {
2787
2694
  for (const [index, cp] of entry.checkpoints) if (index <= start) checkpoints.set(index, cp);
2788
2695
  }
2789
2696
  let result;
2790
- if (entry && dirty && (dirty.width < _chunkCWM3CUUXcjs.TILE || dirty.height < _chunkCWM3CUUXcjs.TILE)) {
2697
+ if (entry && dirty && (dirty.width < _chunk474IQG74cjs.TILE || dirty.height < _chunk474IQG74cjs.TILE)) {
2791
2698
  const r = dirty;
2792
2699
  const sub = (data) => {
2793
2700
  const out = new Uint8ClampedArray(r.width * r.height * 4);
2794
2701
  if (!data) return out;
2795
2702
  for (let y = 0; y < r.height; y++) {
2796
- const s = ((r.y - tileRect.y + y) * _chunkCWM3CUUXcjs.TILE + (r.x - tileRect.x)) * 4;
2703
+ const s = ((r.y - tileRect.y + y) * _chunk474IQG74cjs.TILE + (r.x - tileRect.x)) * 4;
2797
2704
  out.set(data.subarray(s, s + r.width * 4), y * r.width * 4);
2798
2705
  }
2799
2706
  return out;
@@ -2806,7 +2713,7 @@ var RasterCompositor = (_class = class {
2806
2713
  }
2807
2714
  result = new Uint8ClampedArray(entry.result);
2808
2715
  for (let y = 0; y < r.height; y++) {
2809
- result.set(acc.subarray(y * r.width * 4, (y + 1) * r.width * 4), ((r.y - tileRect.y + y) * _chunkCWM3CUUXcjs.TILE + (r.x - tileRect.x)) * 4);
2716
+ result.set(acc.subarray(y * r.width * 4, (y + 1) * r.width * 4), ((r.y - tileRect.y + y) * _chunk474IQG74cjs.TILE + (r.x - tileRect.x)) * 4);
2810
2717
  }
2811
2718
  } else {
2812
2719
  const acc = base ? new Uint8ClampedArray(base.data) : new Uint8ClampedArray(TILE_BYTES);
@@ -2915,8 +2822,8 @@ var RasterCompositor = (_class = class {
2915
2822
  if (!this.isPixel(layer)) return { key, refs: this.maskRefs(layer, tx, ty, 0, 0) };
2916
2823
  const { surface, dx, dy } = this.layerPixels(layer);
2917
2824
  const refs = [surface.defaultValue];
2918
- const r = { x: tx * _chunkCWM3CUUXcjs.TILE - dx, y: ty * _chunkCWM3CUUXcjs.TILE - dy, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE };
2919
- for (const t of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, r)) refs.push(_nullishCoalesce(surface.getTile(t.tx, t.ty), () => ( null)));
2825
+ const r = { x: tx * _chunk474IQG74cjs.TILE - dx, y: ty * _chunk474IQG74cjs.TILE - dy, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE };
2826
+ for (const t of _chunk474IQG74cjs.tilesInRect.call(void 0, r)) refs.push(_nullishCoalesce(surface.getTile(t.tx, t.ty), () => ( null)));
2920
2827
  refs.push(...this.maskRefs(layer, tx, ty, _nullishCoalesce(_optionalChain([layer, 'access', _48 => _48.offset, 'optionalAccess', _49 => _49.x]), () => ( 0)), _nullishCoalesce(_optionalChain([layer, 'access', _50 => _50.offset, 'optionalAccess', _51 => _51.y]), () => ( 0))));
2921
2828
  return { key, refs };
2922
2829
  }
@@ -2978,8 +2885,8 @@ var RasterCompositor = (_class = class {
2978
2885
  const sigs = /* @__PURE__ */ new Map();
2979
2886
  if (region.width <= 0 || region.height <= 0) return sigs;
2980
2887
  const steps = isGroup2(layer) ? this.buildSteps(_nullishCoalesce(layer.children, () => ( []))) : null;
2981
- for (const t of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, region)) {
2982
- sigs.set(_chunkCWM3CUUXcjs.tileKey.call(void 0, t.tx, t.ty), steps ? this.plainGroupSig(layer, steps, t.tx, t.ty) : this.plainContentSig(layer, t.tx, t.ty));
2888
+ for (const t of _chunk474IQG74cjs.tilesInRect.call(void 0, region)) {
2889
+ sigs.set(_chunk474IQG74cjs.tileKey.call(void 0, t.tx, t.ty), steps ? this.plainGroupSig(layer, steps, t.tx, t.ty) : this.plainContentSig(layer, t.tx, t.ty));
2983
2890
  }
2984
2891
  return sigs;
2985
2892
  }
@@ -3003,7 +2910,7 @@ var RasterCompositor = (_class = class {
3003
2910
  const region = this.effectRegion(layer);
3004
2911
  const m = effectsMargin(layer.effects);
3005
2912
  if (effectsAreLocal(activeEffectItems(layer.effects))) {
3006
- return { key, refs: this.shapeRefs(layer, intersectRect({ x: tx * _chunkCWM3CUUXcjs.TILE - m, y: ty * _chunkCWM3CUUXcjs.TILE - m, width: _chunkCWM3CUUXcjs.TILE + 2 * m, height: _chunkCWM3CUUXcjs.TILE + 2 * m }, region)) };
2913
+ return { key, refs: this.shapeRefs(layer, intersectRect({ x: tx * _chunk474IQG74cjs.TILE - m, y: ty * _chunk474IQG74cjs.TILE - m, width: _chunk474IQG74cjs.TILE + 2 * m, height: _chunk474IQG74cjs.TILE + 2 * m }, region)) };
3007
2914
  }
3008
2915
  return { key, refs: [`${region.x},${region.y},${region.width},${region.height}`, ...this.shapeRefs(layer, region)] };
3009
2916
  }
@@ -3052,11 +2959,11 @@ var RasterCompositor = (_class = class {
3052
2959
  */
3053
2960
  shapeChanges(layer, prev, tiles, region) {
3054
2961
  const out = [];
3055
- for (const { tx, ty } of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, region)) {
3056
- const sig = tiles.get(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty));
3057
- const old = prev.tiles.get(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty));
2962
+ for (const { tx, ty } of _chunk474IQG74cjs.tilesInRect.call(void 0, region)) {
2963
+ const sig = tiles.get(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty));
2964
+ const old = prev.tiles.get(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty));
3058
2965
  if (old ? sameSig(old, sig) : sig.refs.every((r2) => r2 === null || r2 === 0)) continue;
3059
- const r = intersectRect({ x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, region);
2966
+ const r = intersectRect({ x: tx * _chunk474IQG74cjs.TILE, y: ty * _chunk474IQG74cjs.TILE, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE }, region);
3060
2967
  if (r.width > 0 && r.height > 0) out.push(r);
3061
2968
  }
3062
2969
  const dirty = this.callDirty;
@@ -3151,7 +3058,7 @@ var RasterCompositor = (_class = class {
3151
3058
  if (!mask || mask.enabled === false) return [];
3152
3059
  if (mask.source || (_nullishCoalesce(mask.feather, () => ( 0))) > 0) return [this.planeFor(mask, ox, oy)];
3153
3060
  const refs = [];
3154
- for (const t of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, { x: tx * _chunkCWM3CUUXcjs.TILE - ox, y: ty * _chunkCWM3CUUXcjs.TILE - oy, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE })) {
3061
+ for (const t of _chunk474IQG74cjs.tilesInRect.call(void 0, { x: tx * _chunk474IQG74cjs.TILE - ox, y: ty * _chunk474IQG74cjs.TILE - oy, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE })) {
3155
3062
  refs.push(_nullishCoalesce(mask.surface.getTile(t.tx, t.ty), () => ( null)));
3156
3063
  }
3157
3064
  return refs;
@@ -3186,12 +3093,12 @@ var RasterCompositor = (_class = class {
3186
3093
  if (!this.isPixel(layer)) return _nullishCoalesce(_optionalChain([this, 'access', _65 => _65.profile, 'access', _66 => _66.contentTile, 'optionalCall', _67 => _67(layer, r, this.sources)]), () => ( null));
3187
3094
  const { surface, dx, dy, perPixel } = this.layerPixels(layer);
3188
3095
  const src = { x: r.x - dx, y: r.y - dy, width: r.width, height: r.height };
3189
- const covered = _chunkCWM3CUUXcjs.tilesInRect.call(void 0, src).map((t) => surface.getTile(t.tx, t.ty));
3096
+ const covered = _chunk474IQG74cjs.tilesInRect.call(void 0, src).map((t) => surface.getTile(t.tx, t.ty));
3190
3097
  if (surface.defaultValue === 0 && covered.every((t) => !t)) return null;
3191
- const aligned = r.width === _chunkCWM3CUUXcjs.TILE && r.height === _chunkCWM3CUUXcjs.TILE && src.x % _chunkCWM3CUUXcjs.TILE === 0 && src.y % _chunkCWM3CUUXcjs.TILE === 0;
3098
+ const aligned = r.width === _chunk474IQG74cjs.TILE && r.height === _chunk474IQG74cjs.TILE && src.x % _chunk474IQG74cjs.TILE === 0 && src.y % _chunk474IQG74cjs.TILE === 0;
3192
3099
  if (!perPixel) {
3193
3100
  if (aligned && covered[0]) return covered[0].data;
3194
- return _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, src);
3101
+ return _chunk474IQG74cjs.readRegion.call(void 0, surface, src);
3195
3102
  }
3196
3103
  const fkey = `${dx},${dy}:${perPixel.key}`;
3197
3104
  const anchor = _nullishCoalesce(covered.find(Boolean), () => ( surface));
@@ -3201,7 +3108,7 @@ var RasterCompositor = (_class = class {
3201
3108
  const hit = _optionalChain([byKey, 'optionalAccess', _68 => _68.get, 'call', _69 => _69(refsKey)]);
3202
3109
  if (hit) return hit;
3203
3110
  }
3204
- const data = _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, src);
3111
+ const data = _chunk474IQG74cjs.readRegion.call(void 0, surface, src);
3205
3112
  perPixel.apply(data, r.width, r.height);
3206
3113
  if (aligned) {
3207
3114
  if (!byKey) {
@@ -3240,11 +3147,11 @@ var RasterCompositor = (_class = class {
3240
3147
  if (!generated || generated.length !== W * H) v.fill(1);
3241
3148
  else v.set(generated);
3242
3149
  } else {
3243
- const bytes = _chunkCWM3CUUXcjs.readRegion.call(void 0, mask.surface, { x: -ox, y: -oy, width: W, height: H });
3150
+ const bytes = _chunk474IQG74cjs.readRegion.call(void 0, mask.surface, { x: -ox, y: -oy, width: W, height: H });
3244
3151
  for (let i = 0; i < v.length; i++) v[i] = bytes[i] / 255;
3245
3152
  }
3246
3153
  const feather = _nullishCoalesce(mask.feather, () => ( 0));
3247
- if (feather > 0) v = gaussianBlur(v, W, H, feather, "clamp");
3154
+ if (feather > 0) v = _chunkK6PXS6DOcjs.gaussianBlur.call(void 0, v, W, H, feather, "clamp");
3248
3155
  const density = _nullishCoalesce(mask.density, () => ( 1));
3249
3156
  if (density !== 1) for (let i = 0; i < v.length; i++) v[i] = 1 - density * (1 - v[i]);
3250
3157
  plane = { data: v, width: W, height: H };
@@ -3279,14 +3186,14 @@ var RasterCompositor = (_class = class {
3279
3186
  const rect = { x: r.x - ox, y: r.y - oy, width: r.width, height: r.height };
3280
3187
  let all = true;
3281
3188
  if (maskDepth(mask.surface) !== 8) {
3282
- const d = _chunkCWM3CUUXcjs.readDeepRegion.call(void 0, mask.surface, rect, 32);
3189
+ const d = _chunkOLNIPTB3cjs.readDeepRegion.call(void 0, mask.surface, rect, 32);
3283
3190
  for (let i = 0; i < n; i++) {
3284
3191
  const v = d[i] <= 0 ? 0 : d[i] >= 1 ? 1 : d[i];
3285
3192
  out[i] = v;
3286
3193
  if (v !== 1) all = false;
3287
3194
  }
3288
3195
  } else {
3289
- const bytes = _chunkCWM3CUUXcjs.readRegion.call(void 0, mask.surface, rect);
3196
+ const bytes = _chunk474IQG74cjs.readRegion.call(void 0, mask.surface, rect);
3290
3197
  for (let i = 0; i < n; i++) {
3291
3198
  out[i] = bytes[i] / 255;
3292
3199
  if (bytes[i] !== 255) all = false;
@@ -3398,10 +3305,10 @@ var RasterCompositor = (_class = class {
3398
3305
  }
3399
3306
  }, _class);
3400
3307
  function filterOverCanvas(surface, ox, oy, filters, width, height) {
3401
- if (width <= 0 || height <= 0) return _chunkCWM3CUUXcjs.emptySurface.call(void 0, 4);
3402
- const data = _chunkCWM3CUUXcjs.readRegion.call(void 0, surface, { x: -ox, y: -oy, width, height });
3308
+ if (width <= 0 || height <= 0) return _chunk474IQG74cjs.emptySurface.call(void 0, 4);
3309
+ const data = _chunk474IQG74cjs.readRegion.call(void 0, surface, { x: -ox, y: -oy, width, height });
3403
3310
  filters.apply(data, width, height);
3404
- return _chunkCWM3CUUXcjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, 0, 0);
3311
+ return _chunk474IQG74cjs.surfaceFromPixels.call(void 0, { width, height, data }, 4, 0, 0);
3405
3312
  }
3406
3313
  function copyRect(data, r, a) {
3407
3314
  const out = new Uint8ClampedArray(a.width * a.height * 4);
@@ -3490,7 +3397,7 @@ function intersect(a, b) {
3490
3397
  return x1 > x && y1 > y ? { x, y, width: x1 - x, height: y1 - y } : null;
3491
3398
  }
3492
3399
  function hasTilesIn(src, r) {
3493
- for (const { tx, ty } of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, r)) if (src.getTile(tx, ty)) return true;
3400
+ for (const { tx, ty } of _chunk474IQG74cjs.tilesInRect.call(void 0, r)) if (src.getTile(tx, ty)) return true;
3494
3401
  return false;
3495
3402
  }
3496
3403
  function readWindow(src, srcRect, rect, depth = null) {
@@ -3499,7 +3406,7 @@ function readWindow(src, srcRect, rect, depth = null) {
3499
3406
  const win = { x: rect.x, y: rect.y, w: rect.width, h: rect.height, n, data };
3500
3407
  const r = intersect(rect, srcRect);
3501
3408
  if (!r) return win;
3502
- const px = depth ? readScaled(src, r, depth) : _chunkCWM3CUUXcjs.readRegion.call(void 0, src, r);
3409
+ const px = depth ? readScaled(src, r, depth) : _chunk474IQG74cjs.readRegion.call(void 0, src, r);
3503
3410
  for (let y = 0; y < r.height; y++) {
3504
3411
  let s = y * r.width * src.channels;
3505
3412
  let d = ((r.y - rect.y + y) * rect.width + (r.x - rect.x)) * n;
@@ -3635,11 +3542,11 @@ function store(out, o, acc, ch, def) {
3635
3542
  }
3636
3543
  function resampleDepth(src, step) {
3637
3544
  if (src.channels !== 4 || src.defaultValue !== 0 || step !== 1) return null;
3638
- const d = _chunkCWM3CUUXcjs.surfaceDepth.call(void 0, src);
3545
+ const d = _chunkOLNIPTB3cjs.surfaceDepth.call(void 0, src);
3639
3546
  return d === 8 ? null : d;
3640
3547
  }
3641
3548
  function readScaled(src, rect, depth) {
3642
- const d = _chunkCWM3CUUXcjs.readDeepRegion.call(void 0, src, rect, depth);
3549
+ const d = _chunkOLNIPTB3cjs.readDeepRegion.call(void 0, src, rect, depth);
3643
3550
  const out = new Float32Array(d.length);
3644
3551
  const k = depth === 16 ? 1 / 257 : 255;
3645
3552
  for (let i = 0; i < d.length; i++) out[i] = d[i] * k;
@@ -3678,13 +3585,13 @@ function boxReduce(src, srcRect, kx, ky, depth = null) {
3678
3585
  const ry1 = Math.ceil((srcRect.y + srcRect.height) / ky);
3679
3586
  const rw = rx1 - rx0;
3680
3587
  const rect = { x: rx0, y: ry0, width: rw, height: ry1 - ry0 };
3681
- let out = _chunkCWM3CUUXcjs.emptySurface.call(void 0, ch, src.defaultValue);
3682
- const rowsPer = Math.max(1, Math.floor(_chunkCWM3CUUXcjs.TILE / ky));
3588
+ let out = _chunk474IQG74cjs.emptySurface.call(void 0, ch, src.defaultValue);
3589
+ const rowsPer = Math.max(1, Math.floor(_chunk474IQG74cjs.TILE / ky));
3683
3590
  const area = kx * ky;
3684
3591
  for (let ry = ry0; ry < ry1; ry += rowsPer) {
3685
3592
  const rows = Math.min(rowsPer, ry1 - ry);
3686
3593
  const strip = { x: rx0 * kx, y: ry * ky, width: rw * kx, height: rows * ky };
3687
- const px = depth ? readScaled(src, strip, depth) : _chunkCWM3CUUXcjs.readRegion.call(void 0, src, strip);
3594
+ const px = depth ? readScaled(src, strip, depth) : _chunk474IQG74cjs.readRegion.call(void 0, src, strip);
3688
3595
  const red = depth ? new Float32Array(rw * rows * ch) : new Uint8ClampedArray(rw * rows * ch);
3689
3596
  for (let j = 0; j < rows; j++) {
3690
3597
  for (let i = 0; i < rw; i++) {
@@ -3721,13 +3628,13 @@ function boxReduce(src, srcRect, kx, ky, depth = null) {
3721
3628
  }
3722
3629
  }
3723
3630
  const region = { x: rx0, y: ry, width: rw, height: rows };
3724
- out = depth ? _chunkCWM3CUUXcjs.writeDeepRegion.call(void 0, out, region, fromScaled(red, depth)) : _chunkCWM3CUUXcjs.writeRegion.call(void 0, out, region, red);
3631
+ out = depth ? _chunkOLNIPTB3cjs.writeDeepRegion.call(void 0, out, region, fromScaled(red, depth)) : _chunk474IQG74cjs.writeRegion.call(void 0, out, region, red);
3725
3632
  }
3726
3633
  return { surface: out, rect };
3727
3634
  }
3728
3635
  function reduceSurface(src, factor) {
3729
3636
  const k = Math.max(1, Math.floor(factor));
3730
- const b = _chunkCWM3CUUXcjs.contentBounds.call(void 0, src);
3637
+ const b = _chunk474IQG74cjs.contentBounds.call(void 0, src);
3731
3638
  if (k === 1 || !b) return src;
3732
3639
  return boxReduce(src, b, k, k).surface;
3733
3640
  }
@@ -3755,7 +3662,7 @@ function checkBudget(dst, what = "result") {
3755
3662
  }
3756
3663
  }
3757
3664
  function assemble(src, tiles) {
3758
- return new (0, _chunkCWM3CUUXcjs.TiledSurface)(src.channels, tiles, src.defaultValue);
3665
+ return new (0, _chunk474IQG74cjs.TiledSurface)(src.channels, tiles, src.defaultValue);
3759
3666
  }
3760
3667
  function transformedBounds(source, h) {
3761
3668
  if (!(source.width > 0 && source.height > 0) || !_chunkQT26RHKKcjs.invertHomography.call(void 0, h)) return null;
@@ -3767,7 +3674,7 @@ function transformSurface(src, h, options = {}) {
3767
3674
  const interp = _nullishCoalesce(options.interpolation, () => ( "bicubic"));
3768
3675
  const ch = src.channels;
3769
3676
  const def = src.defaultValue;
3770
- const empty = _chunkCWM3CUUXcjs.emptySurface.call(void 0, ch, def);
3677
+ const empty = _chunk474IQG74cjs.emptySurface.call(void 0, ch, def);
3771
3678
  const given = options.source;
3772
3679
  const step = normalizeStep(options.step);
3773
3680
  const depth = resampleDepth(src, step);
@@ -3778,12 +3685,12 @@ function transformSurface(src, h, options = {}) {
3778
3685
  const mx = Math.round(dx);
3779
3686
  const my = Math.round(dy);
3780
3687
  const b = src.bounds;
3781
- if (depth && b && (mx % _chunkCWM3CUUXcjs.TILE !== 0 || my % _chunkCWM3CUUXcjs.TILE !== 0)) {
3782
- return _chunkCWM3CUUXcjs.writeDeepRegion.call(void 0, _chunkCWM3CUUXcjs.emptySurface.call(void 0, ch, def), { ...b, x: b.x + mx, y: b.y + my }, _chunkCWM3CUUXcjs.readDeepRegion.call(void 0, src, b, depth));
3688
+ if (depth && b && (mx % _chunk474IQG74cjs.TILE !== 0 || my % _chunk474IQG74cjs.TILE !== 0)) {
3689
+ return _chunkOLNIPTB3cjs.writeDeepRegion.call(void 0, _chunk474IQG74cjs.emptySurface.call(void 0, ch, def), { ...b, x: b.x + mx, y: b.y + my }, _chunkOLNIPTB3cjs.readDeepRegion.call(void 0, src, b, depth));
3783
3690
  }
3784
- return _chunkCWM3CUUXcjs.translateSurface.call(void 0, src, mx, my);
3691
+ return _chunk474IQG74cjs.translateSurface.call(void 0, src, mx, my);
3785
3692
  }
3786
- let srcRect = given ? intersect(given, given) : _chunkCWM3CUUXcjs.contentBounds.call(void 0, src);
3693
+ let srcRect = given ? intersect(given, given) : _chunk474IQG74cjs.contentBounds.call(void 0, src);
3787
3694
  if (!srcRect) return empty;
3788
3695
  let H = h;
3789
3696
  let S = src;
@@ -3833,8 +3740,8 @@ function transformSurface(src, h, options = {}) {
3833
3740
  const sy0 = sr.y;
3834
3741
  const sx1 = sr.x + sr.width - 1;
3835
3742
  const sy1 = sr.y + sr.height - 1;
3836
- for (const { tx, ty } of _chunkCWM3CUUXcjs.tilesInRect.call(void 0, dst)) {
3837
- const t = intersect({ x: tx * _chunkCWM3CUUXcjs.TILE, y: ty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, dst);
3743
+ for (const { tx, ty } of _chunk474IQG74cjs.tilesInRect.call(void 0, dst)) {
3744
+ const t = intersect({ x: tx * _chunk474IQG74cjs.TILE, y: ty * _chunk474IQG74cjs.TILE, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE }, dst);
3838
3745
  if (!t) continue;
3839
3746
  const tc = [
3840
3747
  { x: t.x, y: t.y },
@@ -3880,12 +3787,12 @@ function transformSurface(src, h, options = {}) {
3880
3787
  const readable = intersect(foot, sr);
3881
3788
  if (!readable || !hasTilesIn(S, readable)) continue;
3882
3789
  const win = readWindow(S, sr, foot, depth);
3883
- const out = new Uint8ClampedArray(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * ch);
3790
+ const out = new Uint8ClampedArray(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * ch);
3884
3791
  if (def) out.fill(def);
3885
- const deepOut = depth ? new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4) : null;
3792
+ const deepOut = depth ? new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4) : null;
3886
3793
  let any = false;
3887
- const ox = tx * _chunkCWM3CUUXcjs.TILE;
3888
- const oy = ty * _chunkCWM3CUUXcjs.TILE;
3794
+ const ox = tx * _chunk474IQG74cjs.TILE;
3795
+ const oy = ty * _chunk474IQG74cjs.TILE;
3889
3796
  let su = widen(su0);
3890
3797
  let sv = widen(sv0);
3891
3798
  const ystart = t.y - ((t.y - oy) % step + step) % step;
@@ -3912,7 +3819,7 @@ function transformSurface(src, h, options = {}) {
3912
3819
  }
3913
3820
  sample(win, interp, u, v, su, sv, acc);
3914
3821
  if (deepOut) {
3915
- if (storeScaled(deepOut, ((y - oy) * _chunkCWM3CUUXcjs.TILE + (x - ox)) * 4, acc)) any = true;
3822
+ if (storeScaled(deepOut, ((y - oy) * _chunk474IQG74cjs.TILE + (x - ox)) * 4, acc)) any = true;
3916
3823
  continue;
3917
3824
  }
3918
3825
  if (!store(scratch, 0, acc, ch, def)) continue;
@@ -3925,7 +3832,7 @@ function transformSurface(src, h, options = {}) {
3925
3832
  const y0 = Math.max(y, t.y);
3926
3833
  const y1 = Math.min(y + step, t.y + t.height);
3927
3834
  for (let yy = y0; yy < y1; yy++) {
3928
- const row = (yy - oy) * _chunkCWM3CUUXcjs.TILE - ox;
3835
+ const row = (yy - oy) * _chunk474IQG74cjs.TILE - ox;
3929
3836
  for (let bi = 0, x = xstart; bi < blocks; bi++, x += step) {
3930
3837
  if (!rowSet[bi]) continue;
3931
3838
  const x0 = Math.max(x, t.x);
@@ -3937,8 +3844,8 @@ function transformSurface(src, h, options = {}) {
3937
3844
  }
3938
3845
  }
3939
3846
  if (!any) continue;
3940
- const tile = deepOut ? _chunkCWM3CUUXcjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunkCWM3CUUXcjs.finishTile.call(void 0, out, ch, def);
3941
- if (tile) tiles.set(_chunkCWM3CUUXcjs.tileKey.call(void 0, tx, ty), tile);
3847
+ const tile = deepOut ? _chunkOLNIPTB3cjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunk474IQG74cjs.finishTile.call(void 0, out, ch, def);
3848
+ if (tile) tiles.set(_chunk474IQG74cjs.tileKey.call(void 0, tx, ty), tile);
3942
3849
  }
3943
3850
  return assemble(src, tiles);
3944
3851
  }
@@ -3949,8 +3856,8 @@ function warpSurface(src, f, options = {}) {
3949
3856
  const interp = _nullishCoalesce(options.interpolation, () => ( "bicubic"));
3950
3857
  const ch = src.channels;
3951
3858
  const def = src.defaultValue;
3952
- const empty = _chunkCWM3CUUXcjs.emptySurface.call(void 0, ch, def);
3953
- const sr = options.source ? intersect(options.source, options.source) : _chunkCWM3CUUXcjs.contentBounds.call(void 0, src);
3859
+ const empty = _chunk474IQG74cjs.emptySurface.call(void 0, ch, def);
3860
+ const sr = options.source ? intersect(options.source, options.source) : _chunk474IQG74cjs.contentBounds.call(void 0, src);
3954
3861
  if (!sr) return empty;
3955
3862
  const step = normalizeStep(options.step);
3956
3863
  const depth = resampleDepth(src, step);
@@ -4002,10 +3909,10 @@ function warpSurface(src, f, options = {}) {
4002
3909
  tris[t++] = a + w1;
4003
3910
  }
4004
3911
  }
4005
- const tx0 = Math.floor(dst.x / _chunkCWM3CUUXcjs.TILE);
4006
- const ty0 = Math.floor(dst.y / _chunkCWM3CUUXcjs.TILE);
4007
- const cols = Math.floor((dst.x + dst.width - 1) / _chunkCWM3CUUXcjs.TILE) - tx0 + 1;
4008
- const rows = Math.floor((dst.y + dst.height - 1) / _chunkCWM3CUUXcjs.TILE) - ty0 + 1;
3912
+ const tx0 = Math.floor(dst.x / _chunk474IQG74cjs.TILE);
3913
+ const ty0 = Math.floor(dst.y / _chunk474IQG74cjs.TILE);
3914
+ const cols = Math.floor((dst.x + dst.width - 1) / _chunk474IQG74cjs.TILE) - tx0 + 1;
3915
+ const rows = Math.floor((dst.y + dst.height - 1) / _chunk474IQG74cjs.TILE) - ty0 + 1;
4009
3916
  const bins = Array.from({ length: cols * rows }, () => []);
4010
3917
  for (let k = 0; k < triCount; k++) {
4011
3918
  const a = tris[3 * k];
@@ -4015,10 +3922,10 @@ function warpSurface(src, f, options = {}) {
4015
3922
  const tminy = Math.floor(Math.min(dvy[a], dvy[b], dvy[c]));
4016
3923
  const tmaxx = Math.ceil(Math.max(dvx[a], dvx[b], dvx[c]));
4017
3924
  const tmaxy = Math.ceil(Math.max(dvy[a], dvy[b], dvy[c]));
4018
- const cx0 = Math.max(0, Math.floor(Math.max(tminx, dst.x) / _chunkCWM3CUUXcjs.TILE) - tx0);
4019
- const cy0 = Math.max(0, Math.floor(Math.max(tminy, dst.y) / _chunkCWM3CUUXcjs.TILE) - ty0);
4020
- const cx1 = Math.min(cols - 1, Math.floor(Math.min(tmaxx, dst.x + dst.width - 1) / _chunkCWM3CUUXcjs.TILE) - tx0);
4021
- const cy1 = Math.min(rows - 1, Math.floor(Math.min(tmaxy, dst.y + dst.height - 1) / _chunkCWM3CUUXcjs.TILE) - ty0);
3925
+ const cx0 = Math.max(0, Math.floor(Math.max(tminx, dst.x) / _chunk474IQG74cjs.TILE) - tx0);
3926
+ const cy0 = Math.max(0, Math.floor(Math.max(tminy, dst.y) / _chunk474IQG74cjs.TILE) - ty0);
3927
+ const cx1 = Math.min(cols - 1, Math.floor(Math.min(tmaxx, dst.x + dst.width - 1) / _chunk474IQG74cjs.TILE) - tx0);
3928
+ const cy1 = Math.min(rows - 1, Math.floor(Math.min(tmaxy, dst.y + dst.height - 1) / _chunk474IQG74cjs.TILE) - ty0);
4022
3929
  for (let cy = cy0; cy <= cy1; cy++) for (let cx = cx0; cx <= cx1; cx++) bins[cy * cols + cx].push(k);
4023
3930
  }
4024
3931
  const tiles = /* @__PURE__ */ new Map();
@@ -4032,7 +3939,7 @@ function warpSurface(src, f, options = {}) {
4032
3939
  if (!list.length) continue;
4033
3940
  const ttx = tx0 + cx;
4034
3941
  const tty = ty0 + cy;
4035
- const t = intersect({ x: ttx * _chunkCWM3CUUXcjs.TILE, y: tty * _chunkCWM3CUUXcjs.TILE, width: _chunkCWM3CUUXcjs.TILE, height: _chunkCWM3CUUXcjs.TILE }, dst);
3942
+ const t = intersect({ x: ttx * _chunk474IQG74cjs.TILE, y: tty * _chunk474IQG74cjs.TILE, width: _chunk474IQG74cjs.TILE, height: _chunk474IQG74cjs.TILE }, dst);
4036
3943
  if (!t) continue;
4037
3944
  const tw = t.width;
4038
3945
  const th = t.height;
@@ -4122,12 +4029,12 @@ function warpSurface(src, f, options = {}) {
4122
4029
  const foot = intersect({ x: Math.floor(fx0) - 3, y: Math.floor(fy0) - 3, width: Math.ceil(fx1) - Math.floor(fx0) + 6, height: Math.ceil(fy1) - Math.floor(fy0) + 6 }, sr);
4123
4030
  if (!foot || !hasTilesIn(src, foot)) continue;
4124
4031
  const win = readWindow(src, sr, foot, depth);
4125
- const out = new Uint8ClampedArray(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * ch);
4032
+ const out = new Uint8ClampedArray(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * ch);
4126
4033
  if (def) out.fill(def);
4127
- const deepOut = depth ? new Float32Array(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * 4) : null;
4034
+ const deepOut = depth ? new Float32Array(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * 4) : null;
4128
4035
  let any = false;
4129
- const ox = ttx * _chunkCWM3CUUXcjs.TILE;
4130
- const oy = tty * _chunkCWM3CUUXcjs.TILE;
4036
+ const ox = ttx * _chunk474IQG74cjs.TILE;
4037
+ const oy = tty * _chunk474IQG74cjs.TILE;
4131
4038
  const pointAt = (o, into) => {
4132
4039
  const li = owner[o];
4133
4040
  const cnx = ssx[li];
@@ -4158,7 +4065,7 @@ function warpSurface(src, f, options = {}) {
4158
4065
  pointAt(o, acc);
4159
4066
  const x = t.x + o % tw;
4160
4067
  const y = t.y + Math.floor(o / tw);
4161
- const o4 = ((y - oy) * _chunkCWM3CUUXcjs.TILE + (x - ox)) * ch;
4068
+ const o4 = ((y - oy) * _chunk474IQG74cjs.TILE + (x - ox)) * ch;
4162
4069
  if (deepOut ? storeScaled(deepOut, o4, acc) : store(out, o4, acc, ch, def)) any = true;
4163
4070
  }
4164
4071
  } else {
@@ -4167,19 +4074,19 @@ function warpSurface(src, f, options = {}) {
4167
4074
  const o = by * tw + bx;
4168
4075
  if (Number.isNaN(us[o])) continue;
4169
4076
  pointAt(o, acc);
4170
- const first = ((t.y + by - oy) * _chunkCWM3CUUXcjs.TILE + (t.x + bx - ox)) * ch;
4077
+ const first = ((t.y + by - oy) * _chunk474IQG74cjs.TILE + (t.x + bx - ox)) * ch;
4171
4078
  if (!store(out, first, acc, ch, def)) continue;
4172
4079
  any = true;
4173
4080
  for (let yy = by; yy < Math.min(th, by + step); yy++) {
4174
- const row = ((t.y + yy - oy) * _chunkCWM3CUUXcjs.TILE + (t.x - ox)) * ch;
4081
+ const row = ((t.y + yy - oy) * _chunk474IQG74cjs.TILE + (t.x - ox)) * ch;
4175
4082
  for (let xx = bx; xx < Math.min(tw, bx + step); xx++) for (let c = 0; c < ch; c++) out[row + xx * ch + c] = out[first + c];
4176
4083
  }
4177
4084
  }
4178
4085
  }
4179
4086
  }
4180
4087
  if (!any) continue;
4181
- const tile = deepOut ? _chunkCWM3CUUXcjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunkCWM3CUUXcjs.finishTile.call(void 0, out, ch, def);
4182
- if (tile) tiles.set(_chunkCWM3CUUXcjs.tileKey.call(void 0, ttx, tty), tile);
4088
+ const tile = deepOut ? _chunkOLNIPTB3cjs.deepTile.call(void 0, fromScaled(deepOut, depth), 4, def) : _chunk474IQG74cjs.finishTile.call(void 0, out, ch, def);
4089
+ if (tile) tiles.set(_chunk474IQG74cjs.tileKey.call(void 0, ttx, tty), tile);
4183
4090
  }
4184
4091
  }
4185
4092
  return assemble(src, tiles);
@@ -4189,7 +4096,7 @@ function compositeSurfaceOver(base, top) {
4189
4096
  if (!top.tiles.size) return base;
4190
4097
  const ch = base.channels;
4191
4098
  const tiles = new Map(base.tiles);
4192
- const bd = ch === 4 && base.defaultValue === 0 ? Math.max(_chunkCWM3CUUXcjs.surfaceDepth.call(void 0, base), _chunkCWM3CUUXcjs.surfaceDepth.call(void 0, top)) : 8;
4099
+ const bd = ch === 4 && base.defaultValue === 0 ? Math.max(_chunkOLNIPTB3cjs.surfaceDepth.call(void 0, base), _chunkOLNIPTB3cjs.surfaceDepth.call(void 0, top)) : 8;
4193
4100
  const depth = bd === 8 ? null : bd;
4194
4101
  for (const [key, t] of top.tiles) {
4195
4102
  const under = base.tiles.get(key);
@@ -4199,8 +4106,8 @@ function compositeSurfaceOver(base, top) {
4199
4106
  }
4200
4107
  if (depth) {
4201
4108
  const k = depth === 16 ? 65535 : 1;
4202
- const d2 = _chunkCWM3CUUXcjs.tileSamples.call(void 0, under, 4, depth, 0).slice();
4203
- const sd = _chunkCWM3CUUXcjs.tileSamples.call(void 0, t, 4, depth, 0);
4109
+ const d2 = _chunkOLNIPTB3cjs.tileSamples.call(void 0, under, 4, depth, 0).slice();
4110
+ const sd = _chunkOLNIPTB3cjs.tileSamples.call(void 0, t, 4, depth, 0);
4204
4111
  for (let i = 0; i < d2.length; i += 4) {
4205
4112
  const ta = Math.min(1, sd[i + 3] / k);
4206
4113
  if (ta <= 0) continue;
@@ -4212,12 +4119,12 @@ function compositeSurfaceOver(base, top) {
4212
4119
  }
4213
4120
  d2[i + 3] = depth === 16 ? Math.round(oa * k) : oa;
4214
4121
  }
4215
- const tile2 = _chunkCWM3CUUXcjs.deepTile.call(void 0, d2, 4, 0);
4122
+ const tile2 = _chunkOLNIPTB3cjs.deepTile.call(void 0, d2, 4, 0);
4216
4123
  if (tile2) tiles.set(key, tile2);
4217
4124
  else tiles.delete(key);
4218
4125
  continue;
4219
4126
  }
4220
- const d = new Uint8ClampedArray(_chunkCWM3CUUXcjs.TILE * _chunkCWM3CUUXcjs.TILE * ch);
4127
+ const d = new Uint8ClampedArray(_chunk474IQG74cjs.TILE * _chunk474IQG74cjs.TILE * ch);
4221
4128
  if (under) d.set(under.data);
4222
4129
  else if (base.defaultValue) d.fill(base.defaultValue);
4223
4130
  const s = t.data;
@@ -4243,11 +4150,11 @@ function compositeSurfaceOver(base, top) {
4243
4150
  if (ta > 0) d[p] = s[i] * ta + d[p] * (1 - ta);
4244
4151
  }
4245
4152
  }
4246
- const tile = _chunkCWM3CUUXcjs.finishTile.call(void 0, d, ch, base.defaultValue);
4153
+ const tile = _chunk474IQG74cjs.finishTile.call(void 0, d, ch, base.defaultValue);
4247
4154
  if (tile) tiles.set(key, tile);
4248
4155
  else tiles.delete(key);
4249
4156
  }
4250
- return new (0, _chunkCWM3CUUXcjs.TiledSurface)(ch, tiles, base.defaultValue);
4157
+ return new (0, _chunk474IQG74cjs.TiledSurface)(ch, tiles, base.defaultValue);
4251
4158
  }
4252
4159
 
4253
4160
 
@@ -4311,6 +4218,4 @@ function compositeSurfaceOver(base, top) {
4311
4218
 
4312
4219
 
4313
4220
 
4314
-
4315
-
4316
- exports.DEFAULT_GLOBAL_LIGHT = DEFAULT_GLOBAL_LIGHT; exports.LAYER_EFFECT_KINDS = LAYER_EFFECT_KINDS; exports.layerEffectLabel = layerEffectLabel; exports.isLayerEffectKind = isLayerEffectKind; exports.defaultEffectGradient = defaultEffectGradient; exports.newEffectId = newEffectId; exports.defaultLayerEffect = defaultLayerEffect; exports.hasActiveEffects = hasActiveEffects; exports.MAX_EFFECT_REACH = MAX_EFFECT_REACH; exports.effectReach = effectReach; exports.effectsMargin = effectsMargin; exports.effectsScale = effectsScale; exports.scaleLayerEffect = scaleLayerEffect; exports.parseEffectColor = parseEffectColor; exports.effectColorHex = effectColorHex; exports.LayerEffectError = LayerEffectError; exports.validateEffectGradient = validateEffectGradient; exports.layerEffectFields = layerEffectFields; exports.validateLayerEffect = validateLayerEffect; exports.mergeLayerEffect = mergeLayerEffect; exports.validateLayerEffects = validateLayerEffects; exports.normalizeLayerEffects = normalizeLayerEffects; exports.effectsFingerprint = effectsFingerprint; exports.CURVE_LUT_SIZE = CURVE_LUT_SIZE; exports.curveLut = curveLut; exports.PatternTile = PatternTile; exports.PatternPlacement = PatternPlacement; exports.builtinPatternIds = builtinPatternIds; exports.builtinPattern = builtinPattern; exports.hashNoise = hashNoise; exports.STROKE_CHAMFER_MAX = STROKE_CHAMFER_MAX; exports.contourLut = contourLut; exports.activeEffectItems = activeEffectItems; exports.effectsAreLocal = effectsAreLocal; exports.buildEffectMaps = buildEffectMaps; exports.patchEffectMaps = patchEffectMaps; exports.gradientT = gradientT; exports.effectFillColors = effectFillColors; exports.compositeLayerEffects = compositeLayerEffects; exports.renderLayerEffects = renderLayerEffects; exports.DeepCompositor = DeepCompositor; exports.workingToSamples = workingToSamples; exports.DIRECT_GAUSSIAN_MAX_SIGMA = DIRECT_GAUSSIAN_MAX_SIGMA; exports.gaussianBlur = gaussianBlur; exports.flattenLayers = flattenLayers; exports.findLayer = findLayer; exports.mapLayer = mapLayer; exports.insertLayer = insertLayer; exports.isLayerLocked = isLayerLocked; exports.blendTile = blendTile; exports.RasterCompositor = RasterCompositor; exports.changedTiles = changedTiles; exports.INTERPOLATIONS = INTERPOLATIONS; exports.isInterpolation = isInterpolation; exports.MAX_TRANSFORM_PIXELS = MAX_TRANSFORM_PIXELS; exports.TransformTooLargeError = TransformTooLargeError; exports.keysWeight = keysWeight; exports.reduceSurface = reduceSurface; exports.transformedBounds = transformedBounds; exports.transformSurface = transformSurface; exports.warpSurface = warpSurface; exports.compositeSurfaceOver = compositeSurfaceOver;
4221
+ exports.DEFAULT_GLOBAL_LIGHT = DEFAULT_GLOBAL_LIGHT; exports.LAYER_EFFECT_KINDS = LAYER_EFFECT_KINDS; exports.layerEffectLabel = layerEffectLabel; exports.isLayerEffectKind = isLayerEffectKind; exports.defaultEffectGradient = defaultEffectGradient; exports.newEffectId = newEffectId; exports.defaultLayerEffect = defaultLayerEffect; exports.hasActiveEffects = hasActiveEffects; exports.MAX_EFFECT_REACH = MAX_EFFECT_REACH; exports.effectReach = effectReach; exports.effectsMargin = effectsMargin; exports.effectsScale = effectsScale; exports.scaleLayerEffect = scaleLayerEffect; exports.parseEffectColor = parseEffectColor; exports.effectColorHex = effectColorHex; exports.LayerEffectError = LayerEffectError; exports.validateEffectGradient = validateEffectGradient; exports.layerEffectFields = layerEffectFields; exports.validateLayerEffect = validateLayerEffect; exports.mergeLayerEffect = mergeLayerEffect; exports.validateLayerEffects = validateLayerEffects; exports.normalizeLayerEffects = normalizeLayerEffects; exports.effectsFingerprint = effectsFingerprint; exports.CURVE_LUT_SIZE = CURVE_LUT_SIZE; exports.curveLut = curveLut; exports.PatternTile = PatternTile; exports.PatternPlacement = PatternPlacement; exports.builtinPatternIds = builtinPatternIds; exports.builtinPattern = builtinPattern; exports.hashNoise = hashNoise; exports.STROKE_CHAMFER_MAX = STROKE_CHAMFER_MAX; exports.contourLut = contourLut; exports.activeEffectItems = activeEffectItems; exports.effectsAreLocal = effectsAreLocal; exports.buildEffectMaps = buildEffectMaps; exports.patchEffectMaps = patchEffectMaps; exports.gradientT = gradientT; exports.effectFillColors = effectFillColors; exports.compositeLayerEffects = compositeLayerEffects; exports.renderLayerEffects = renderLayerEffects; exports.DeepCompositor = DeepCompositor; exports.workingToSamples = workingToSamples; exports.flattenLayers = flattenLayers; exports.findLayer = findLayer; exports.mapLayer = mapLayer; exports.insertLayer = insertLayer; exports.isLayerLocked = isLayerLocked; exports.blendTile = blendTile; exports.RasterCompositor = RasterCompositor; exports.changedTiles = changedTiles; exports.INTERPOLATIONS = INTERPOLATIONS; exports.isInterpolation = isInterpolation; exports.MAX_TRANSFORM_PIXELS = MAX_TRANSFORM_PIXELS; exports.TransformTooLargeError = TransformTooLargeError; exports.keysWeight = keysWeight; exports.reduceSurface = reduceSurface; exports.transformedBounds = transformedBounds; exports.transformSurface = transformSurface; exports.warpSurface = warpSurface; exports.compositeSurfaceOver = compositeSurfaceOver;