@blazediff/cli 2.1.4 → 3.1.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.
@@ -219,8 +219,8 @@ var require_interlace = __commonJS({
219
219
  let yLeftOver = height % 8;
220
220
  let xRepeats = (width - xLeftOver) / 8;
221
221
  let yRepeats = (height - yLeftOver) / 8;
222
- for (let i2 = 0; i2 < imagePasses.length; i2++) {
223
- let pass = imagePasses[i2];
222
+ for (let i3 = 0; i3 < imagePasses.length; i3++) {
223
+ let pass = imagePasses[i3];
224
224
  let passWidth = xRepeats * pass.x.length;
225
225
  let passHeight = yRepeats * pass.y.length;
226
226
  for (let j2 = 0; j2 < pass.x.length; j2++) {
@@ -238,7 +238,7 @@ var require_interlace = __commonJS({
238
238
  }
239
239
  }
240
240
  if (passWidth > 0 && passHeight > 0) {
241
- images.push({ width: passWidth, height: passHeight, index: i2 });
241
+ images.push({ width: passWidth, height: passHeight, index: i3 });
242
242
  }
243
243
  }
244
244
  return images;
@@ -301,10 +301,10 @@ var require_filter_parse = __commonJS({
301
301
  this._images = [];
302
302
  if (interlace) {
303
303
  let passes = interlaceUtils.getImagePasses(width, height);
304
- for (let i2 = 0; i2 < passes.length; i2++) {
304
+ for (let i3 = 0; i3 < passes.length; i3++) {
305
305
  this._images.push({
306
- byteWidth: getByteWidth(passes[i2].width, bpp, depth),
307
- height: passes[i2].height,
306
+ byteWidth: getByteWidth(passes[i3].width, bpp, depth),
307
+ height: passes[i3].height,
308
308
  lineIndex: 0
309
309
  });
310
310
  }
@@ -483,8 +483,8 @@ var require_crc = __commonJS({
483
483
  "use strict";
484
484
  var crcTable = [];
485
485
  (function() {
486
- for (let i2 = 0; i2 < 256; i2++) {
487
- let currentCrc = i2;
486
+ for (let i3 = 0; i3 < 256; i3++) {
487
+ let currentCrc = i3;
488
488
  for (let j2 = 0; j2 < 8; j2++) {
489
489
  if (currentCrc & 1) {
490
490
  currentCrc = 3988292384 ^ currentCrc >>> 1;
@@ -492,15 +492,15 @@ var require_crc = __commonJS({
492
492
  currentCrc = currentCrc >>> 1;
493
493
  }
494
494
  }
495
- crcTable[i2] = currentCrc;
495
+ crcTable[i3] = currentCrc;
496
496
  }
497
497
  })();
498
498
  var CrcCalculator = module2.exports = function() {
499
499
  this._crc = -1;
500
500
  };
501
501
  CrcCalculator.prototype.write = function(data) {
502
- for (let i2 = 0; i2 < data.length; i2++) {
503
- this._crc = crcTable[(this._crc ^ data[i2]) & 255] ^ this._crc >>> 8;
502
+ for (let i3 = 0; i3 < data.length; i3++) {
503
+ this._crc = crcTable[(this._crc ^ data[i3]) & 255] ^ this._crc >>> 8;
504
504
  }
505
505
  return true;
506
506
  };
@@ -509,8 +509,8 @@ var require_crc = __commonJS({
509
509
  };
510
510
  CrcCalculator.crc32 = function(buf) {
511
511
  let crc = -1;
512
- for (let i2 = 0; i2 < buf.length; i2++) {
513
- crc = crcTable[(crc ^ buf[i2]) & 255] ^ crc >>> 8;
512
+ for (let i3 = 0; i3 < buf.length; i3++) {
513
+ crc = crcTable[(crc ^ buf[i3]) & 255] ^ crc >>> 8;
514
514
  }
515
515
  return crc ^ -1;
516
516
  };
@@ -556,8 +556,8 @@ var require_parser = __commonJS({
556
556
  };
557
557
  Parser.prototype._parseSignature = function(data) {
558
558
  let signature = constants.PNG_SIGNATURE;
559
- for (let i2 = 0; i2 < signature.length; i2++) {
560
- if (data[i2] !== signature[i2]) {
559
+ for (let i3 = 0; i3 < signature.length; i3++) {
560
+ if (data[i3] !== signature[i3]) {
561
561
  this.error(new Error("Invalid file signature"));
562
562
  return;
563
563
  }
@@ -568,8 +568,8 @@ var require_parser = __commonJS({
568
568
  let length = data.readUInt32BE(0);
569
569
  let type = data.readUInt32BE(4);
570
570
  let name = "";
571
- for (let i2 = 4; i2 < 8; i2++) {
572
- name += String.fromCharCode(data[i2]);
571
+ for (let i3 = 4; i3 < 8; i3++) {
572
+ name += String.fromCharCode(data[i3]);
573
573
  }
574
574
  let ancillary = Boolean(data[4] & 32);
575
575
  if (!this._hasIHDR && type !== constants.TYPE_IHDR) {
@@ -658,8 +658,8 @@ var require_parser = __commonJS({
658
658
  Parser.prototype._parsePLTE = function(data) {
659
659
  this._crc.write(data);
660
660
  let entries = Math.floor(data.length / 3);
661
- for (let i2 = 0; i2 < entries; i2++) {
662
- this._palette.push([data[i2 * 3], data[i2 * 3 + 1], data[i2 * 3 + 2], 255]);
661
+ for (let i3 = 0; i3 < entries; i3++) {
662
+ this._palette.push([data[i3 * 3], data[i3 * 3 + 1], data[i3 * 3 + 2], 255]);
663
663
  }
664
664
  this.palette(this._palette);
665
665
  this._handleChunkEnd();
@@ -679,8 +679,8 @@ var require_parser = __commonJS({
679
679
  this.error(new Error("More transparent colors than palette size"));
680
680
  return;
681
681
  }
682
- for (let i2 = 0; i2 < data.length; i2++) {
683
- this._palette[i2][3] = data[i2];
682
+ for (let i3 = 0; i3 < data.length; i3++) {
683
+ this._palette[i3][3] = data[i3];
684
684
  }
685
685
  this.palette(this._palette);
686
686
  }
@@ -835,20 +835,20 @@ var require_bitmapper = __commonJS({
835
835
  ];
836
836
  function bitRetriever(data, depth) {
837
837
  let leftOver = [];
838
- let i2 = 0;
838
+ let i3 = 0;
839
839
  function split() {
840
- if (i2 === data.length) {
840
+ if (i3 === data.length) {
841
841
  throw new Error("Ran out of data");
842
842
  }
843
- let byte = data[i2];
844
- i2++;
843
+ let byte = data[i3];
844
+ i3++;
845
845
  let byte8, byte7, byte6, byte5, byte4, byte3, byte2, byte1;
846
846
  switch (depth) {
847
847
  default:
848
848
  throw new Error("unrecognised depth");
849
849
  case 16:
850
- byte2 = data[i2];
851
- i2++;
850
+ byte2 = data[i3];
851
+ i3++;
852
852
  leftOver.push((byte << 8) + byte2);
853
853
  break;
854
854
  case 4:
@@ -889,7 +889,7 @@ var require_bitmapper = __commonJS({
889
889
  leftOver.length = 0;
890
890
  },
891
891
  end: function() {
892
- if (i2 !== data.length) {
892
+ if (i3 !== data.length) {
893
893
  throw new Error("extra data found");
894
894
  }
895
895
  }
@@ -998,8 +998,8 @@ var require_format_normaliser = __commonJS({
998
998
  if (!color) {
999
999
  throw new Error("index " + indata[pxPos] + " not in palette");
1000
1000
  }
1001
- for (let i2 = 0; i2 < 4; i2++) {
1002
- outdata[pxPos + i2] = color[i2];
1001
+ for (let i3 = 0; i3 < 4; i3++) {
1002
+ outdata[pxPos + i3] = color[i3];
1003
1003
  }
1004
1004
  pxPos += 4;
1005
1005
  }
@@ -1018,8 +1018,8 @@ var require_format_normaliser = __commonJS({
1018
1018
  makeTrans = true;
1019
1019
  }
1020
1020
  if (makeTrans) {
1021
- for (let i2 = 0; i2 < 4; i2++) {
1022
- outdata[pxPos + i2] = 0;
1021
+ for (let i3 = 0; i3 < 4; i3++) {
1022
+ outdata[pxPos + i3] = 0;
1023
1023
  }
1024
1024
  }
1025
1025
  pxPos += 4;
@@ -1032,9 +1032,9 @@ var require_format_normaliser = __commonJS({
1032
1032
  let pxPos = 0;
1033
1033
  for (let y = 0; y < height; y++) {
1034
1034
  for (let x = 0; x < width; x++) {
1035
- for (let i2 = 0; i2 < 4; i2++) {
1036
- outdata[pxPos + i2] = Math.floor(
1037
- indata[pxPos + i2] * maxOutSample / maxInSample + 0.5
1035
+ for (let i3 = 0; i3 < 4; i3++) {
1036
+ outdata[pxPos + i3] = Math.floor(
1037
+ indata[pxPos + i3] * maxOutSample / maxInSample + 0.5
1038
1038
  );
1039
1039
  }
1040
1040
  pxPos += 4;
@@ -1360,8 +1360,8 @@ var require_filter_pack = __commonJS({
1360
1360
  function filterSumNone(pxData, pxPos, byteWidth) {
1361
1361
  let sum = 0;
1362
1362
  let length = pxPos + byteWidth;
1363
- for (let i2 = pxPos; i2 < length; i2++) {
1364
- sum += Math.abs(pxData[i2]);
1363
+ for (let i3 = pxPos; i3 < length; i3++) {
1364
+ sum += Math.abs(pxData[i3]);
1365
1365
  }
1366
1366
  return sum;
1367
1367
  }
@@ -1470,10 +1470,10 @@ var require_filter_pack = __commonJS({
1470
1470
  for (let y = 0; y < height; y++) {
1471
1471
  if (filterTypes.length > 1) {
1472
1472
  let min = Infinity;
1473
- for (let i2 = 0; i2 < filterTypes.length; i2++) {
1474
- let sum = filterSums[filterTypes[i2]](pxData, pxPos, byteWidth, bpp);
1473
+ for (let i3 = 0; i3 < filterTypes.length; i3++) {
1474
+ let sum = filterSums[filterTypes[i3]](pxData, pxPos, byteWidth, bpp);
1475
1475
  if (sum < min) {
1476
- sel = filterTypes[i2];
1476
+ sel = filterTypes[i3];
1477
1477
  min = sum;
1478
1478
  }
1479
1479
  }
@@ -1670,7 +1670,7 @@ var require_sync_inflate = __commonJS({
1670
1670
  if (typeof asyncCb === "function") {
1671
1671
  return zlib.Inflate._processChunk.call(this, chunk, flushFlag, asyncCb);
1672
1672
  }
1673
- let self = this;
1673
+ let self2 = this;
1674
1674
  let availInBefore = chunk && chunk.length;
1675
1675
  let availOutBefore = this._chunkSize - this._offset;
1676
1676
  let leftToInflate = this._maxLength;
@@ -1682,14 +1682,14 @@ var require_sync_inflate = __commonJS({
1682
1682
  error = err;
1683
1683
  });
1684
1684
  function handleChunk(availInAfter, availOutAfter) {
1685
- if (self._hadError) {
1685
+ if (self2._hadError) {
1686
1686
  return;
1687
1687
  }
1688
1688
  let have = availOutBefore - availOutAfter;
1689
1689
  assert(have >= 0, "have should not go down");
1690
1690
  if (have > 0) {
1691
- let out = self._buffer.slice(self._offset, self._offset + have);
1692
- self._offset += have;
1691
+ let out = self2._buffer.slice(self2._offset, self2._offset + have);
1692
+ self2._offset += have;
1693
1693
  if (out.length > leftToInflate) {
1694
1694
  out = out.slice(0, leftToInflate);
1695
1695
  }
@@ -1700,10 +1700,10 @@ var require_sync_inflate = __commonJS({
1700
1700
  return false;
1701
1701
  }
1702
1702
  }
1703
- if (availOutAfter === 0 || self._offset >= self._chunkSize) {
1704
- availOutBefore = self._chunkSize;
1705
- self._offset = 0;
1706
- self._buffer = Buffer.allocUnsafe(self._chunkSize);
1703
+ if (availOutAfter === 0 || self2._offset >= self2._chunkSize) {
1704
+ availOutBefore = self2._chunkSize;
1705
+ self2._offset = 0;
1706
+ self2._buffer = Buffer.allocUnsafe(self2._chunkSize);
1707
1707
  }
1708
1708
  if (availOutAfter === 0) {
1709
1709
  inOff += availInBefore - availInAfter;
@@ -2106,10 +2106,10 @@ var require_png = __commonJS({
2106
2106
  for (let y = 0; y < src.height; y++) {
2107
2107
  for (let x = 0; x < src.width; x++) {
2108
2108
  let idx = src.width * y + x << 2;
2109
- for (let i2 = 0; i2 < 3; i2++) {
2110
- let sample = src.data[idx + i2] / 255;
2109
+ for (let i3 = 0; i3 < 3; i3++) {
2110
+ let sample = src.data[idx + i3] / 255;
2111
2111
  sample = Math.pow(sample, 1 / 2.2 / src.gamma);
2112
- src.data[idx + i2] = Math.round(sample * 255);
2112
+ src.data[idx + i3] = Math.round(sample * 255);
2113
2113
  }
2114
2114
  }
2115
2115
  }
@@ -2125,37 +2125,37 @@ var require_png = __commonJS({
2125
2125
  // ../codec-pngjs/dist/index.mjs
2126
2126
  var dist_exports = {};
2127
2127
  __export(dist_exports, {
2128
- default: () => m,
2129
- pngjsTransformer: () => c
2128
+ codecPngjs: () => h,
2129
+ default: () => m
2130
2130
  });
2131
2131
  async function d(r) {
2132
- return new Promise((n2, a2) => {
2132
+ return new Promise((i3, n3) => {
2133
2133
  try {
2134
2134
  let t = typeof r == "string" ? (0, import_fs.readFileSync)(r) : r, e = import_pngjs.PNG.sync.read(t);
2135
- n2({ data: e.data, width: e.width, height: e.height });
2135
+ i3({ data: e.data, width: e.width, height: e.height });
2136
2136
  } catch (t) {
2137
- a2(new Error(`Failed to read PNG file ${r}: ${t}`));
2137
+ n3(new Error(`Failed to read PNG file ${r}: ${t}`));
2138
2138
  }
2139
2139
  });
2140
2140
  }
2141
- async function s(r, n2) {
2142
- return new Promise((a2, t) => {
2141
+ async function c(r, i3) {
2142
+ return new Promise((n3, t) => {
2143
2143
  try {
2144
2144
  let e = new import_pngjs.PNG({ width: r.width, height: r.height });
2145
- e.data = Buffer.isBuffer(r.data) ? r.data : Buffer.from(r.data.buffer), (0, import_fs.writeFileSync)(n2, import_pngjs.PNG.sync.write(e)), a2();
2145
+ e.data = Buffer.isBuffer(r.data) ? r.data : Buffer.from(r.data.buffer), (0, import_fs.writeFileSync)(i3, import_pngjs.PNG.sync.write(e)), n3();
2146
2146
  } catch (e) {
2147
- t(new Error(`Failed to write PNG file ${n2}: ${e}`));
2147
+ t(new Error(`Failed to write PNG file ${i3}: ${e}`));
2148
2148
  }
2149
2149
  });
2150
2150
  }
2151
- var import_fs, import_pngjs, c, m;
2151
+ var import_fs, import_pngjs, h, m;
2152
2152
  var init_dist = __esm({
2153
2153
  "../codec-pngjs/dist/index.mjs"() {
2154
2154
  "use strict";
2155
2155
  import_fs = require("fs");
2156
2156
  import_pngjs = __toESM(require_png(), 1);
2157
- c = { read: d, write: s };
2158
- m = c;
2157
+ h = { read: d, write: c };
2158
+ m = h;
2159
2159
  }
2160
2160
  });
2161
2161
 
@@ -2250,7 +2250,7 @@ var require_filesystem = __commonJS({
2250
2250
  var LDD_PATH = "/usr/bin/ldd";
2251
2251
  var SELF_PATH = "/proc/self/exe";
2252
2252
  var MAX_LENGTH = 2048;
2253
- var readFileSync2 = (path) => {
2253
+ var readFileSync3 = (path) => {
2254
2254
  const fd = fs.openSync(path, "r");
2255
2255
  const buffer = Buffer.alloc(MAX_LENGTH);
2256
2256
  const bytesRead = fs.readSync(fd, buffer, 0, MAX_LENGTH, 0);
@@ -2275,7 +2275,7 @@ var require_filesystem = __commonJS({
2275
2275
  module2.exports = {
2276
2276
  LDD_PATH,
2277
2277
  SELF_PATH,
2278
- readFileSync: readFileSync2,
2278
+ readFileSync: readFileSync3,
2279
2279
  readFile
2280
2280
  };
2281
2281
  }
@@ -2301,8 +2301,8 @@ var require_elf = __commonJS({
2301
2301
  const offset = elf.readUInt32LE(32);
2302
2302
  const size = elf.readUInt16LE(54);
2303
2303
  const count = elf.readUInt16LE(56);
2304
- for (let i2 = 0; i2 < count; i2++) {
2305
- const headerOffset = offset + i2 * size;
2304
+ for (let i3 = 0; i3 < count; i3++) {
2305
+ const headerOffset = offset + i3 * size;
2306
2306
  const type = elf.readUInt32LE(headerOffset);
2307
2307
  if (type === 3) {
2308
2308
  const fileOffset = elf.readUInt32LE(headerOffset + 8);
@@ -2324,7 +2324,7 @@ var require_detect_libc = __commonJS({
2324
2324
  "use strict";
2325
2325
  var childProcess = require("child_process");
2326
2326
  var { isLinux, getReport } = require_process();
2327
- var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync2 } = require_filesystem();
2327
+ var { LDD_PATH, SELF_PATH, readFile, readFileSync: readFileSync3 } = require_filesystem();
2328
2328
  var { interpreterPath } = require_elf();
2329
2329
  var cachedFamilyInterpreter;
2330
2330
  var cachedFamilyFilesystem;
@@ -2416,7 +2416,7 @@ var require_detect_libc = __commonJS({
2416
2416
  }
2417
2417
  cachedFamilyFilesystem = null;
2418
2418
  try {
2419
- const lddContent = readFileSync2(LDD_PATH);
2419
+ const lddContent = readFileSync3(LDD_PATH);
2420
2420
  cachedFamilyFilesystem = getFamilyFromLddContent(lddContent);
2421
2421
  } catch (e) {
2422
2422
  }
@@ -2441,7 +2441,7 @@ var require_detect_libc = __commonJS({
2441
2441
  }
2442
2442
  cachedFamilyInterpreter = null;
2443
2443
  try {
2444
- const selfContent = readFileSync2(SELF_PATH);
2444
+ const selfContent = readFileSync3(SELF_PATH);
2445
2445
  const path = interpreterPath(selfContent);
2446
2446
  cachedFamilyInterpreter = familyFromInterpreterPath(path);
2447
2447
  } catch (e) {
@@ -2505,7 +2505,7 @@ var require_detect_libc = __commonJS({
2505
2505
  }
2506
2506
  cachedVersionFilesystem = null;
2507
2507
  try {
2508
- const lddContent = readFileSync2(LDD_PATH);
2508
+ const lddContent = readFileSync3(LDD_PATH);
2509
2509
  const versionMatch = lddContent.match(RE_GLIBC_VERSION);
2510
2510
  if (versionMatch) {
2511
2511
  cachedVersionFilesystem = versionMatch[1];
@@ -2521,7 +2521,7 @@ var require_detect_libc = __commonJS({
2521
2521
  }
2522
2522
  return null;
2523
2523
  };
2524
- var versionSuffix = (s2) => s2.trim().split(/\s+/)[1];
2524
+ var versionSuffix = (s) => s.trim().split(/\s+/)[1];
2525
2525
  var versionFromCommand = (out) => {
2526
2526
  const [getconf, ldd1, ldd2] = out.split(/[\r\n]+/);
2527
2527
  if (getconf && getconf.includes(GLIBC)) {
@@ -2777,14 +2777,14 @@ var require_semver = __commonJS({
2777
2777
  this.options = options;
2778
2778
  this.loose = !!options.loose;
2779
2779
  this.includePrerelease = !!options.includePrerelease;
2780
- const m2 = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
2781
- if (!m2) {
2780
+ const m3 = version.trim().match(options.loose ? re[t.LOOSE] : re[t.FULL]);
2781
+ if (!m3) {
2782
2782
  throw new TypeError(`Invalid Version: ${version}`);
2783
2783
  }
2784
2784
  this.raw = version;
2785
- this.major = +m2[1];
2786
- this.minor = +m2[2];
2787
- this.patch = +m2[3];
2785
+ this.major = +m3[1];
2786
+ this.minor = +m3[2];
2787
+ this.patch = +m3[3];
2788
2788
  if (this.major > MAX_SAFE_INTEGER || this.major < 0) {
2789
2789
  throw new TypeError("Invalid major version");
2790
2790
  }
@@ -2794,10 +2794,10 @@ var require_semver = __commonJS({
2794
2794
  if (this.patch > MAX_SAFE_INTEGER || this.patch < 0) {
2795
2795
  throw new TypeError("Invalid patch version");
2796
2796
  }
2797
- if (!m2[4]) {
2797
+ if (!m3[4]) {
2798
2798
  this.prerelease = [];
2799
2799
  } else {
2800
- this.prerelease = m2[4].split(".").map((id) => {
2800
+ this.prerelease = m3[4].split(".").map((id) => {
2801
2801
  if (/^[0-9]+$/.test(id)) {
2802
2802
  const num = +id;
2803
2803
  if (num >= 0 && num < MAX_SAFE_INTEGER) {
@@ -2807,7 +2807,7 @@ var require_semver = __commonJS({
2807
2807
  return id;
2808
2808
  });
2809
2809
  }
2810
- this.build = m2[5] ? m2[5].split(".") : [];
2810
+ this.build = m3[5] ? m3[5].split(".") : [];
2811
2811
  this.format();
2812
2812
  }
2813
2813
  format() {
@@ -2868,11 +2868,11 @@ var require_semver = __commonJS({
2868
2868
  } else if (!this.prerelease.length && !other.prerelease.length) {
2869
2869
  return 0;
2870
2870
  }
2871
- let i2 = 0;
2871
+ let i3 = 0;
2872
2872
  do {
2873
- const a2 = this.prerelease[i2];
2874
- const b = other.prerelease[i2];
2875
- debug("prerelease compare", i2, a2, b);
2873
+ const a2 = this.prerelease[i3];
2874
+ const b = other.prerelease[i3];
2875
+ debug("prerelease compare", i3, a2, b);
2876
2876
  if (a2 === void 0 && b === void 0) {
2877
2877
  return 0;
2878
2878
  } else if (b === void 0) {
@@ -2884,17 +2884,17 @@ var require_semver = __commonJS({
2884
2884
  } else {
2885
2885
  return compareIdentifiers(a2, b);
2886
2886
  }
2887
- } while (++i2);
2887
+ } while (++i3);
2888
2888
  }
2889
2889
  compareBuild(other) {
2890
2890
  if (!(other instanceof _SemVer)) {
2891
2891
  other = new _SemVer(other, this.options);
2892
2892
  }
2893
- let i2 = 0;
2893
+ let i3 = 0;
2894
2894
  do {
2895
- const a2 = this.build[i2];
2896
- const b = other.build[i2];
2897
- debug("build compare", i2, a2, b);
2895
+ const a2 = this.build[i3];
2896
+ const b = other.build[i3];
2897
+ debug("build compare", i3, a2, b);
2898
2898
  if (a2 === void 0 && b === void 0) {
2899
2899
  return 0;
2900
2900
  } else if (b === void 0) {
@@ -2906,7 +2906,7 @@ var require_semver = __commonJS({
2906
2906
  } else {
2907
2907
  return compareIdentifiers(a2, b);
2908
2908
  }
2909
- } while (++i2);
2909
+ } while (++i3);
2910
2910
  }
2911
2911
  // preminor will bump the version up to the next minor release, and immediately
2912
2912
  // down to pre-release. premajor and prepatch work the same way.
@@ -2983,14 +2983,14 @@ var require_semver = __commonJS({
2983
2983
  if (this.prerelease.length === 0) {
2984
2984
  this.prerelease = [base];
2985
2985
  } else {
2986
- let i2 = this.prerelease.length;
2987
- while (--i2 >= 0) {
2988
- if (typeof this.prerelease[i2] === "number") {
2989
- this.prerelease[i2]++;
2990
- i2 = -2;
2986
+ let i3 = this.prerelease.length;
2987
+ while (--i3 >= 0) {
2988
+ if (typeof this.prerelease[i3] === "number") {
2989
+ this.prerelease[i3]++;
2990
+ i3 = -2;
2991
2991
  }
2992
2992
  }
2993
- if (i2 === -1) {
2993
+ if (i3 === -1) {
2994
2994
  if (identifier === this.prerelease.join(".") && identifierBase === false) {
2995
2995
  throw new Error("invalid increment argument: identifier already exists");
2996
2996
  }
@@ -3284,18 +3284,18 @@ var require_comparator = __commonJS({
3284
3284
  }
3285
3285
  parse(comp) {
3286
3286
  const r = this.options.loose ? re[t.COMPARATORLOOSE] : re[t.COMPARATOR];
3287
- const m2 = comp.match(r);
3288
- if (!m2) {
3287
+ const m3 = comp.match(r);
3288
+ if (!m3) {
3289
3289
  throw new TypeError(`Invalid comparator: ${comp}`);
3290
3290
  }
3291
- this.operator = m2[1] !== void 0 ? m2[1] : "";
3291
+ this.operator = m3[1] !== void 0 ? m3[1] : "";
3292
3292
  if (this.operator === "=") {
3293
3293
  this.operator = "";
3294
3294
  }
3295
- if (!m2[2]) {
3295
+ if (!m3[2]) {
3296
3296
  this.semver = ANY;
3297
3297
  } else {
3298
- this.semver = new SemVer(m2[2], this.options.loose);
3298
+ this.semver = new SemVer(m3[2], this.options.loose);
3299
3299
  }
3300
3300
  }
3301
3301
  toString() {
@@ -3390,19 +3390,19 @@ var require_range = __commonJS({
3390
3390
  this.loose = !!options.loose;
3391
3391
  this.includePrerelease = !!options.includePrerelease;
3392
3392
  this.raw = range.trim().replace(SPACE_CHARACTERS, " ");
3393
- this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c2) => c2.length);
3393
+ this.set = this.raw.split("||").map((r) => this.parseRange(r.trim())).filter((c3) => c3.length);
3394
3394
  if (!this.set.length) {
3395
3395
  throw new TypeError(`Invalid SemVer Range: ${this.raw}`);
3396
3396
  }
3397
3397
  if (this.set.length > 1) {
3398
3398
  const first = this.set[0];
3399
- this.set = this.set.filter((c2) => !isNullSet(c2[0]));
3399
+ this.set = this.set.filter((c3) => !isNullSet(c3[0]));
3400
3400
  if (this.set.length === 0) {
3401
3401
  this.set = [first];
3402
3402
  } else if (this.set.length > 1) {
3403
- for (const c2 of this.set) {
3404
- if (c2.length === 1 && isAny(c2[0])) {
3405
- this.set = [c2];
3403
+ for (const c3 of this.set) {
3404
+ if (c3.length === 1 && isAny(c3[0])) {
3405
+ this.set = [c3];
3406
3406
  break;
3407
3407
  }
3408
3408
  }
@@ -3413,11 +3413,11 @@ var require_range = __commonJS({
3413
3413
  get range() {
3414
3414
  if (this.formatted === void 0) {
3415
3415
  this.formatted = "";
3416
- for (let i2 = 0; i2 < this.set.length; i2++) {
3417
- if (i2 > 0) {
3416
+ for (let i3 = 0; i3 < this.set.length; i3++) {
3417
+ if (i3 > 0) {
3418
3418
  this.formatted += "||";
3419
3419
  }
3420
- const comps = this.set[i2];
3420
+ const comps = this.set[i3];
3421
3421
  for (let k = 0; k < comps.length; k++) {
3422
3422
  if (k > 0) {
3423
3423
  this.formatted += " ";
@@ -3500,8 +3500,8 @@ var require_range = __commonJS({
3500
3500
  return false;
3501
3501
  }
3502
3502
  }
3503
- for (let i2 = 0; i2 < this.set.length; i2++) {
3504
- if (testSet(this.set[i2], version, this.options)) {
3503
+ for (let i3 = 0; i3 < this.set.length; i3++) {
3504
+ if (testSet(this.set[i3], version, this.options)) {
3505
3505
  return true;
3506
3506
  }
3507
3507
  }
@@ -3523,8 +3523,8 @@ var require_range = __commonJS({
3523
3523
  caretTrimReplace
3524
3524
  } = require_re();
3525
3525
  var { FLAG_INCLUDE_PRERELEASE, FLAG_LOOSE } = require_constants2();
3526
- var isNullSet = (c2) => c2.value === "<0.0.0-0";
3527
- var isAny = (c2) => c2.value === "";
3526
+ var isNullSet = (c3) => c3.value === "<0.0.0-0";
3527
+ var isAny = (c3) => c3.value === "";
3528
3528
  var isSatisfiable = (comparators, options) => {
3529
3529
  let result = true;
3530
3530
  const remainingComparators = comparators.slice();
@@ -3552,70 +3552,70 @@ var require_range = __commonJS({
3552
3552
  };
3553
3553
  var isX = (id) => !id || id.toLowerCase() === "x" || id === "*";
3554
3554
  var replaceTildes = (comp, options) => {
3555
- return comp.trim().split(/\s+/).map((c2) => replaceTilde(c2, options)).join(" ");
3555
+ return comp.trim().split(/\s+/).map((c3) => replaceTilde(c3, options)).join(" ");
3556
3556
  };
3557
3557
  var replaceTilde = (comp, options) => {
3558
3558
  const r = options.loose ? re[t.TILDELOOSE] : re[t.TILDE];
3559
- return comp.replace(r, (_2, M, m2, p, pr) => {
3560
- debug("tilde", comp, _2, M, m2, p, pr);
3559
+ return comp.replace(r, (_2, M, m3, p2, pr) => {
3560
+ debug("tilde", comp, _2, M, m3, p2, pr);
3561
3561
  let ret;
3562
3562
  if (isX(M)) {
3563
3563
  ret = "";
3564
- } else if (isX(m2)) {
3564
+ } else if (isX(m3)) {
3565
3565
  ret = `>=${M}.0.0 <${+M + 1}.0.0-0`;
3566
- } else if (isX(p)) {
3567
- ret = `>=${M}.${m2}.0 <${M}.${+m2 + 1}.0-0`;
3566
+ } else if (isX(p2)) {
3567
+ ret = `>=${M}.${m3}.0 <${M}.${+m3 + 1}.0-0`;
3568
3568
  } else if (pr) {
3569
3569
  debug("replaceTilde pr", pr);
3570
- ret = `>=${M}.${m2}.${p}-${pr} <${M}.${+m2 + 1}.0-0`;
3570
+ ret = `>=${M}.${m3}.${p2}-${pr} <${M}.${+m3 + 1}.0-0`;
3571
3571
  } else {
3572
- ret = `>=${M}.${m2}.${p} <${M}.${+m2 + 1}.0-0`;
3572
+ ret = `>=${M}.${m3}.${p2} <${M}.${+m3 + 1}.0-0`;
3573
3573
  }
3574
3574
  debug("tilde return", ret);
3575
3575
  return ret;
3576
3576
  });
3577
3577
  };
3578
3578
  var replaceCarets = (comp, options) => {
3579
- return comp.trim().split(/\s+/).map((c2) => replaceCaret(c2, options)).join(" ");
3579
+ return comp.trim().split(/\s+/).map((c3) => replaceCaret(c3, options)).join(" ");
3580
3580
  };
3581
3581
  var replaceCaret = (comp, options) => {
3582
3582
  debug("caret", comp, options);
3583
3583
  const r = options.loose ? re[t.CARETLOOSE] : re[t.CARET];
3584
3584
  const z = options.includePrerelease ? "-0" : "";
3585
- return comp.replace(r, (_2, M, m2, p, pr) => {
3586
- debug("caret", comp, _2, M, m2, p, pr);
3585
+ return comp.replace(r, (_2, M, m3, p2, pr) => {
3586
+ debug("caret", comp, _2, M, m3, p2, pr);
3587
3587
  let ret;
3588
3588
  if (isX(M)) {
3589
3589
  ret = "";
3590
- } else if (isX(m2)) {
3590
+ } else if (isX(m3)) {
3591
3591
  ret = `>=${M}.0.0${z} <${+M + 1}.0.0-0`;
3592
- } else if (isX(p)) {
3592
+ } else if (isX(p2)) {
3593
3593
  if (M === "0") {
3594
- ret = `>=${M}.${m2}.0${z} <${M}.${+m2 + 1}.0-0`;
3594
+ ret = `>=${M}.${m3}.0${z} <${M}.${+m3 + 1}.0-0`;
3595
3595
  } else {
3596
- ret = `>=${M}.${m2}.0${z} <${+M + 1}.0.0-0`;
3596
+ ret = `>=${M}.${m3}.0${z} <${+M + 1}.0.0-0`;
3597
3597
  }
3598
3598
  } else if (pr) {
3599
3599
  debug("replaceCaret pr", pr);
3600
3600
  if (M === "0") {
3601
- if (m2 === "0") {
3602
- ret = `>=${M}.${m2}.${p}-${pr} <${M}.${m2}.${+p + 1}-0`;
3601
+ if (m3 === "0") {
3602
+ ret = `>=${M}.${m3}.${p2}-${pr} <${M}.${m3}.${+p2 + 1}-0`;
3603
3603
  } else {
3604
- ret = `>=${M}.${m2}.${p}-${pr} <${M}.${+m2 + 1}.0-0`;
3604
+ ret = `>=${M}.${m3}.${p2}-${pr} <${M}.${+m3 + 1}.0-0`;
3605
3605
  }
3606
3606
  } else {
3607
- ret = `>=${M}.${m2}.${p}-${pr} <${+M + 1}.0.0-0`;
3607
+ ret = `>=${M}.${m3}.${p2}-${pr} <${+M + 1}.0.0-0`;
3608
3608
  }
3609
3609
  } else {
3610
3610
  debug("no pr");
3611
3611
  if (M === "0") {
3612
- if (m2 === "0") {
3613
- ret = `>=${M}.${m2}.${p}${z} <${M}.${m2}.${+p + 1}-0`;
3612
+ if (m3 === "0") {
3613
+ ret = `>=${M}.${m3}.${p2}${z} <${M}.${m3}.${+p2 + 1}-0`;
3614
3614
  } else {
3615
- ret = `>=${M}.${m2}.${p}${z} <${M}.${+m2 + 1}.0-0`;
3615
+ ret = `>=${M}.${m3}.${p2}${z} <${M}.${+m3 + 1}.0-0`;
3616
3616
  }
3617
3617
  } else {
3618
- ret = `>=${M}.${m2}.${p} <${+M + 1}.0.0-0`;
3618
+ ret = `>=${M}.${m3}.${p2} <${+M + 1}.0.0-0`;
3619
3619
  }
3620
3620
  }
3621
3621
  debug("caret return", ret);
@@ -3624,16 +3624,16 @@ var require_range = __commonJS({
3624
3624
  };
3625
3625
  var replaceXRanges = (comp, options) => {
3626
3626
  debug("replaceXRanges", comp, options);
3627
- return comp.split(/\s+/).map((c2) => replaceXRange(c2, options)).join(" ");
3627
+ return comp.split(/\s+/).map((c3) => replaceXRange(c3, options)).join(" ");
3628
3628
  };
3629
3629
  var replaceXRange = (comp, options) => {
3630
3630
  comp = comp.trim();
3631
3631
  const r = options.loose ? re[t.XRANGELOOSE] : re[t.XRANGE];
3632
- return comp.replace(r, (ret, gtlt, M, m2, p, pr) => {
3633
- debug("xRange", comp, ret, gtlt, M, m2, p, pr);
3632
+ return comp.replace(r, (ret, gtlt, M, m3, p2, pr) => {
3633
+ debug("xRange", comp, ret, gtlt, M, m3, p2, pr);
3634
3634
  const xM = isX(M);
3635
- const xm = xM || isX(m2);
3636
- const xp = xm || isX(p);
3635
+ const xm = xM || isX(m3);
3636
+ const xp = xm || isX(p2);
3637
3637
  const anyX = xp;
3638
3638
  if (gtlt === "=" && anyX) {
3639
3639
  gtlt = "";
@@ -3647,35 +3647,35 @@ var require_range = __commonJS({
3647
3647
  }
3648
3648
  } else if (gtlt && anyX) {
3649
3649
  if (xm) {
3650
- m2 = 0;
3650
+ m3 = 0;
3651
3651
  }
3652
- p = 0;
3652
+ p2 = 0;
3653
3653
  if (gtlt === ">") {
3654
3654
  gtlt = ">=";
3655
3655
  if (xm) {
3656
3656
  M = +M + 1;
3657
- m2 = 0;
3658
- p = 0;
3657
+ m3 = 0;
3658
+ p2 = 0;
3659
3659
  } else {
3660
- m2 = +m2 + 1;
3661
- p = 0;
3660
+ m3 = +m3 + 1;
3661
+ p2 = 0;
3662
3662
  }
3663
3663
  } else if (gtlt === "<=") {
3664
3664
  gtlt = "<";
3665
3665
  if (xm) {
3666
3666
  M = +M + 1;
3667
3667
  } else {
3668
- m2 = +m2 + 1;
3668
+ m3 = +m3 + 1;
3669
3669
  }
3670
3670
  }
3671
3671
  if (gtlt === "<") {
3672
3672
  pr = "-0";
3673
3673
  }
3674
- ret = `${gtlt + M}.${m2}.${p}${pr}`;
3674
+ ret = `${gtlt + M}.${m3}.${p2}${pr}`;
3675
3675
  } else if (xm) {
3676
3676
  ret = `>=${M}.0.0${pr} <${+M + 1}.0.0-0`;
3677
3677
  } else if (xp) {
3678
- ret = `>=${M}.${m2}.0${pr} <${M}.${+m2 + 1}.0-0`;
3678
+ ret = `>=${M}.${m3}.0${pr} <${M}.${+m3 + 1}.0-0`;
3679
3679
  }
3680
3680
  debug("xRange return", ret);
3681
3681
  return ret;
@@ -3717,19 +3717,19 @@ var require_range = __commonJS({
3717
3717
  return `${from} ${to}`.trim();
3718
3718
  };
3719
3719
  var testSet = (set, version, options) => {
3720
- for (let i2 = 0; i2 < set.length; i2++) {
3721
- if (!set[i2].test(version)) {
3720
+ for (let i3 = 0; i3 < set.length; i3++) {
3721
+ if (!set[i3].test(version)) {
3722
3722
  return false;
3723
3723
  }
3724
3724
  }
3725
3725
  if (version.prerelease.length && !options.includePrerelease) {
3726
- for (let i2 = 0; i2 < set.length; i2++) {
3727
- debug(set[i2].semver);
3728
- if (set[i2].semver === Comparator.ANY) {
3726
+ for (let i3 = 0; i3 < set.length; i3++) {
3727
+ debug(set[i3].semver);
3728
+ if (set[i3].semver === Comparator.ANY) {
3729
3729
  continue;
3730
3730
  }
3731
- if (set[i2].semver.prerelease.length > 0) {
3732
- const allowed = set[i2].semver;
3731
+ if (set[i3].semver.prerelease.length > 0) {
3732
+ const allowed = set[i3].semver;
3733
3733
  if (allowed.major === version.major && allowed.minor === version.minor && allowed.patch === version.patch) {
3734
3734
  return true;
3735
3735
  }
@@ -4063,7 +4063,7 @@ var require_libvips = __commonJS({
4063
4063
  }
4064
4064
  return false;
4065
4065
  };
4066
- var sha512 = (s2) => createHash("sha512").update(s2).digest("hex");
4066
+ var sha512 = (s) => createHash("sha512").update(s).digest("hex");
4067
4067
  var yarnLocator = () => {
4068
4068
  try {
4069
4069
  const identHash = sha512(`imgsharp-libvips-${buildPlatformArch()}`);
@@ -4537,7 +4537,7 @@ var require_input = __commonJS({
4537
4537
  "tiffSubifd"
4538
4538
  ];
4539
4539
  function _inputOptionsFromObject(obj) {
4540
- const params = inputStreamParameters.filter((p) => is.defined(obj[p])).map((p) => [p, obj[p]]);
4540
+ const params = inputStreamParameters.filter((p2) => is.defined(obj[p2])).map((p2) => [p2, obj[p2]]);
4541
4541
  return params.length ? Object.fromEntries(params) : void 0;
4542
4542
  }
4543
4543
  function _createInputDescriptor(input, inputOptions, containerOptions) {
@@ -4577,7 +4577,7 @@ var require_input = __commonJS({
4577
4577
  if (input.length > 1) {
4578
4578
  if (!this.options.joining) {
4579
4579
  this.options.joining = true;
4580
- this.options.join = input.map((i2) => this._createInputDescriptor(i2));
4580
+ this.options.join = input.map((i3) => this._createInputDescriptor(i3));
4581
4581
  } else {
4582
4582
  throw new Error("Recursive join is unsupported");
4583
4583
  }
@@ -6179,14 +6179,14 @@ var require_color = __commonJS({
6179
6179
  const keyword = /^(\w+)$/;
6180
6180
  let rgb = [0, 0, 0, 1];
6181
6181
  let match;
6182
- let i2;
6182
+ let i3;
6183
6183
  let hexAlpha;
6184
6184
  if (match = string.match(hex)) {
6185
6185
  hexAlpha = match[2];
6186
6186
  match = match[1];
6187
- for (i2 = 0; i2 < 3; i2++) {
6188
- const i22 = i2 * 2;
6189
- rgb[i2] = Number.parseInt(match.slice(i22, i22 + 2), 16);
6187
+ for (i3 = 0; i3 < 3; i3++) {
6188
+ const i22 = i3 * 2;
6189
+ rgb[i3] = Number.parseInt(match.slice(i22, i22 + 2), 16);
6190
6190
  }
6191
6191
  if (hexAlpha) {
6192
6192
  rgb[3] = Number.parseInt(hexAlpha, 16) / 255;
@@ -6194,22 +6194,22 @@ var require_color = __commonJS({
6194
6194
  } else if (match = string.match(abbr)) {
6195
6195
  match = match[1];
6196
6196
  hexAlpha = match[3];
6197
- for (i2 = 0; i2 < 3; i2++) {
6198
- rgb[i2] = Number.parseInt(match[i2] + match[i2], 16);
6197
+ for (i3 = 0; i3 < 3; i3++) {
6198
+ rgb[i3] = Number.parseInt(match[i3] + match[i3], 16);
6199
6199
  }
6200
6200
  if (hexAlpha) {
6201
6201
  rgb[3] = Number.parseInt(hexAlpha + hexAlpha, 16) / 255;
6202
6202
  }
6203
6203
  } else if (match = string.match(rgba)) {
6204
- for (i2 = 0; i2 < 3; i2++) {
6205
- rgb[i2] = Number.parseInt(match[i2 + 1], 10);
6204
+ for (i3 = 0; i3 < 3; i3++) {
6205
+ rgb[i3] = Number.parseInt(match[i3 + 1], 10);
6206
6206
  }
6207
6207
  if (match[4]) {
6208
6208
  rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
6209
6209
  }
6210
6210
  } else if (match = string.match(per)) {
6211
- for (i2 = 0; i2 < 3; i2++) {
6212
- rgb[i2] = Math.round(Number.parseFloat(match[i2 + 1]) * 2.55);
6211
+ for (i3 = 0; i3 < 3; i3++) {
6212
+ rgb[i3] = Math.round(Number.parseFloat(match[i3 + 1]) * 2.55);
6213
6213
  }
6214
6214
  if (match[4]) {
6215
6215
  rgb[3] = match[5] ? Number.parseFloat(match[4]) * 0.01 : Number.parseFloat(match[4]);
@@ -6227,8 +6227,8 @@ var require_color = __commonJS({
6227
6227
  } else {
6228
6228
  return null;
6229
6229
  }
6230
- for (i2 = 0; i2 < 3; i2++) {
6231
- rgb[i2] = clamp(rgb[i2], 0, 255);
6230
+ for (i3 = 0; i3 < 3; i3++) {
6231
+ rgb[i3] = clamp(rgb[i3], 0, 255);
6232
6232
  }
6233
6233
  rgb[3] = clamp(rgb[3], 0, 1);
6234
6234
  return rgb;
@@ -6241,11 +6241,11 @@ var require_color = __commonJS({
6241
6241
  const match = string.match(hsl);
6242
6242
  if (match) {
6243
6243
  const alpha = Number.parseFloat(match[4]);
6244
- const h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6245
- const s2 = clamp(Number.parseFloat(match[2]), 0, 100);
6246
- const l = clamp(Number.parseFloat(match[3]), 0, 100);
6244
+ const h3 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6245
+ const s = clamp(Number.parseFloat(match[2]), 0, 100);
6246
+ const l2 = clamp(Number.parseFloat(match[3]), 0, 100);
6247
6247
  const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
6248
- return [h, s2, l, a2];
6248
+ return [h3, s, l2, a2];
6249
6249
  }
6250
6250
  return null;
6251
6251
  };
@@ -6257,11 +6257,11 @@ var require_color = __commonJS({
6257
6257
  const match = string.match(hwb);
6258
6258
  if (match) {
6259
6259
  const alpha = Number.parseFloat(match[4]);
6260
- const h = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6260
+ const h3 = (Number.parseFloat(match[1]) % 360 + 360) % 360;
6261
6261
  const w = clamp(Number.parseFloat(match[2]), 0, 100);
6262
6262
  const b = clamp(Number.parseFloat(match[3]), 0, 100);
6263
6263
  const a2 = clamp(Number.isNaN(alpha) ? 1 : alpha, 0, 1);
6264
- return [h, w, b, a2];
6264
+ return [h3, w, b, a2];
6265
6265
  }
6266
6266
  return null;
6267
6267
  };
@@ -6323,12 +6323,12 @@ var require_color = __commonJS({
6323
6323
  };
6324
6324
  var conversions_default = convert;
6325
6325
  var LAB_FT = (6 / 29) ** 3;
6326
- function srgbNonlinearTransform(c2) {
6327
- const cc = c2 > 31308e-7 ? 1.055 * c2 ** (1 / 2.4) - 0.055 : c2 * 12.92;
6326
+ function srgbNonlinearTransform(c3) {
6327
+ const cc = c3 > 31308e-7 ? 1.055 * c3 ** (1 / 2.4) - 0.055 : c3 * 12.92;
6328
6328
  return Math.min(Math.max(0, cc), 1);
6329
6329
  }
6330
- function srgbNonlinearTransformInv(c2) {
6331
- return c2 > 0.04045 ? ((c2 + 0.055) / 1.055) ** 2.4 : c2 / 12.92;
6330
+ function srgbNonlinearTransformInv(c3) {
6331
+ return c3 > 0.04045 ? ((c3 + 0.055) / 1.055) ** 2.4 : c3 / 12.92;
6332
6332
  }
6333
6333
  for (const model of Object.keys(convert)) {
6334
6334
  if (!("channels" in convert[model])) {
@@ -6353,85 +6353,85 @@ var require_color = __commonJS({
6353
6353
  const min = Math.min(r, g2, b);
6354
6354
  const max = Math.max(r, g2, b);
6355
6355
  const delta = max - min;
6356
- let h;
6357
- let s2;
6356
+ let h3;
6357
+ let s;
6358
6358
  switch (max) {
6359
6359
  case min: {
6360
- h = 0;
6360
+ h3 = 0;
6361
6361
  break;
6362
6362
  }
6363
6363
  case r: {
6364
- h = (g2 - b) / delta;
6364
+ h3 = (g2 - b) / delta;
6365
6365
  break;
6366
6366
  }
6367
6367
  case g2: {
6368
- h = 2 + (b - r) / delta;
6368
+ h3 = 2 + (b - r) / delta;
6369
6369
  break;
6370
6370
  }
6371
6371
  case b: {
6372
- h = 4 + (r - g2) / delta;
6372
+ h3 = 4 + (r - g2) / delta;
6373
6373
  break;
6374
6374
  }
6375
6375
  }
6376
- h = Math.min(h * 60, 360);
6377
- if (h < 0) {
6378
- h += 360;
6376
+ h3 = Math.min(h3 * 60, 360);
6377
+ if (h3 < 0) {
6378
+ h3 += 360;
6379
6379
  }
6380
- const l = (min + max) / 2;
6380
+ const l2 = (min + max) / 2;
6381
6381
  if (max === min) {
6382
- s2 = 0;
6383
- } else if (l <= 0.5) {
6384
- s2 = delta / (max + min);
6382
+ s = 0;
6383
+ } else if (l2 <= 0.5) {
6384
+ s = delta / (max + min);
6385
6385
  } else {
6386
- s2 = delta / (2 - max - min);
6386
+ s = delta / (2 - max - min);
6387
6387
  }
6388
- return [h, s2 * 100, l * 100];
6388
+ return [h3, s * 100, l2 * 100];
6389
6389
  };
6390
6390
  convert.rgb.hsv = function(rgb) {
6391
6391
  let rdif;
6392
6392
  let gdif;
6393
6393
  let bdif;
6394
- let h;
6395
- let s2;
6394
+ let h3;
6395
+ let s;
6396
6396
  const r = rgb[0] / 255;
6397
6397
  const g2 = rgb[1] / 255;
6398
6398
  const b = rgb[2] / 255;
6399
6399
  const v = Math.max(r, g2, b);
6400
6400
  const diff = v - Math.min(r, g2, b);
6401
- const diffc = function(c2) {
6402
- return (v - c2) / 6 / diff + 1 / 2;
6401
+ const diffc = function(c3) {
6402
+ return (v - c3) / 6 / diff + 1 / 2;
6403
6403
  };
6404
6404
  if (diff === 0) {
6405
- h = 0;
6406
- s2 = 0;
6405
+ h3 = 0;
6406
+ s = 0;
6407
6407
  } else {
6408
- s2 = diff / v;
6408
+ s = diff / v;
6409
6409
  rdif = diffc(r);
6410
6410
  gdif = diffc(g2);
6411
6411
  bdif = diffc(b);
6412
6412
  switch (v) {
6413
6413
  case r: {
6414
- h = bdif - gdif;
6414
+ h3 = bdif - gdif;
6415
6415
  break;
6416
6416
  }
6417
6417
  case g2: {
6418
- h = 1 / 3 + rdif - bdif;
6418
+ h3 = 1 / 3 + rdif - bdif;
6419
6419
  break;
6420
6420
  }
6421
6421
  case b: {
6422
- h = 2 / 3 + gdif - rdif;
6422
+ h3 = 2 / 3 + gdif - rdif;
6423
6423
  break;
6424
6424
  }
6425
6425
  }
6426
- if (h < 0) {
6427
- h += 1;
6428
- } else if (h > 1) {
6429
- h -= 1;
6426
+ if (h3 < 0) {
6427
+ h3 += 1;
6428
+ } else if (h3 > 1) {
6429
+ h3 -= 1;
6430
6430
  }
6431
6431
  }
6432
6432
  return [
6433
- h * 360,
6434
- s2 * 100,
6433
+ h3 * 360,
6434
+ s * 100,
6435
6435
  v * 100
6436
6436
  ];
6437
6437
  };
@@ -6439,10 +6439,10 @@ var require_color = __commonJS({
6439
6439
  const r = rgb[0];
6440
6440
  const g2 = rgb[1];
6441
6441
  let b = rgb[2];
6442
- const h = convert.rgb.hsl(rgb)[0];
6442
+ const h3 = convert.rgb.hsl(rgb)[0];
6443
6443
  const w = 1 / 255 * Math.min(r, Math.min(g2, b));
6444
6444
  b = 1 - 1 / 255 * Math.max(r, Math.max(g2, b));
6445
- return [h, w * 100, b * 100];
6445
+ return [h3, w * 100, b * 100];
6446
6446
  };
6447
6447
  convert.rgb.oklab = function(rgb) {
6448
6448
  const r = srgbNonlinearTransformInv(rgb[0] / 255);
@@ -6451,20 +6451,20 @@ var require_color = __commonJS({
6451
6451
  const lp = Math.cbrt(0.4122214708 * r + 0.5363325363 * g2 + 0.0514459929 * b);
6452
6452
  const mp = Math.cbrt(0.2119034982 * r + 0.6806995451 * g2 + 0.1073969566 * b);
6453
6453
  const sp = Math.cbrt(0.0883024619 * r + 0.2817188376 * g2 + 0.6299787005 * b);
6454
- const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6454
+ const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6455
6455
  const aa = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
6456
6456
  const bb = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
6457
- return [l * 100, aa * 100, bb * 100];
6457
+ return [l2 * 100, aa * 100, bb * 100];
6458
6458
  };
6459
6459
  convert.rgb.cmyk = function(rgb) {
6460
6460
  const r = rgb[0] / 255;
6461
6461
  const g2 = rgb[1] / 255;
6462
6462
  const b = rgb[2] / 255;
6463
6463
  const k = Math.min(1 - r, 1 - g2, 1 - b);
6464
- const c2 = (1 - r - k) / (1 - k) || 0;
6465
- const m2 = (1 - g2 - k) / (1 - k) || 0;
6464
+ const c3 = (1 - r - k) / (1 - k) || 0;
6465
+ const m3 = (1 - g2 - k) / (1 - k) || 0;
6466
6466
  const y = (1 - b - k) / (1 - k) || 0;
6467
- return [c2 * 100, m2 * 100, y * 100, k * 100];
6467
+ return [c3 * 100, m3 * 100, y * 100, k * 100];
6468
6468
  };
6469
6469
  function comparativeDistance(x, y) {
6470
6470
  return (x[0] - y[0]) ** 2 + (x[1] - y[1]) ** 2 + (x[2] - y[2]) ** 2;
@@ -6509,26 +6509,26 @@ var require_color = __commonJS({
6509
6509
  x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6510
6510
  y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6511
6511
  z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
6512
- const l = 116 * y - 16;
6512
+ const l2 = 116 * y - 16;
6513
6513
  const a2 = 500 * (x - y);
6514
6514
  const b = 200 * (y - z);
6515
- return [l, a2, b];
6515
+ return [l2, a2, b];
6516
6516
  };
6517
6517
  convert.hsl.rgb = function(hsl) {
6518
- const h = hsl[0] / 360;
6519
- const s2 = hsl[1] / 100;
6520
- const l = hsl[2] / 100;
6518
+ const h3 = hsl[0] / 360;
6519
+ const s = hsl[1] / 100;
6520
+ const l2 = hsl[2] / 100;
6521
6521
  let t3;
6522
6522
  let value;
6523
- if (s2 === 0) {
6524
- value = l * 255;
6523
+ if (s === 0) {
6524
+ value = l2 * 255;
6525
6525
  return [value, value, value];
6526
6526
  }
6527
- const t2 = l < 0.5 ? l * (1 + s2) : l + s2 - l * s2;
6528
- const t1 = 2 * l - t2;
6527
+ const t2 = l2 < 0.5 ? l2 * (1 + s) : l2 + s - l2 * s;
6528
+ const t1 = 2 * l2 - t2;
6529
6529
  const rgb = [0, 0, 0];
6530
- for (let i2 = 0; i2 < 3; i2++) {
6531
- t3 = h + 1 / 3 * -(i2 - 1);
6530
+ for (let i3 = 0; i3 < 3; i3++) {
6531
+ t3 = h3 + 1 / 3 * -(i3 - 1);
6532
6532
  if (t3 < 0) {
6533
6533
  t3++;
6534
6534
  }
@@ -6544,71 +6544,71 @@ var require_color = __commonJS({
6544
6544
  } else {
6545
6545
  value = t1;
6546
6546
  }
6547
- rgb[i2] = value * 255;
6547
+ rgb[i3] = value * 255;
6548
6548
  }
6549
6549
  return rgb;
6550
6550
  };
6551
6551
  convert.hsl.hsv = function(hsl) {
6552
- const h = hsl[0];
6553
- let s2 = hsl[1] / 100;
6554
- let l = hsl[2] / 100;
6555
- let smin = s2;
6556
- const lmin = Math.max(l, 0.01);
6557
- l *= 2;
6558
- s2 *= l <= 1 ? l : 2 - l;
6552
+ const h3 = hsl[0];
6553
+ let s = hsl[1] / 100;
6554
+ let l2 = hsl[2] / 100;
6555
+ let smin = s;
6556
+ const lmin = Math.max(l2, 0.01);
6557
+ l2 *= 2;
6558
+ s *= l2 <= 1 ? l2 : 2 - l2;
6559
6559
  smin *= lmin <= 1 ? lmin : 2 - lmin;
6560
- const v = (l + s2) / 2;
6561
- const sv = l === 0 ? 2 * smin / (lmin + smin) : 2 * s2 / (l + s2);
6562
- return [h, sv * 100, v * 100];
6560
+ const v = (l2 + s) / 2;
6561
+ const sv = l2 === 0 ? 2 * smin / (lmin + smin) : 2 * s / (l2 + s);
6562
+ return [h3, sv * 100, v * 100];
6563
6563
  };
6564
6564
  convert.hsv.rgb = function(hsv) {
6565
- const h = hsv[0] / 60;
6566
- const s2 = hsv[1] / 100;
6565
+ const h3 = hsv[0] / 60;
6566
+ const s = hsv[1] / 100;
6567
6567
  let v = hsv[2] / 100;
6568
- const hi = Math.floor(h) % 6;
6569
- const f2 = h - Math.floor(h);
6570
- const p = 255 * v * (1 - s2);
6571
- const q2 = 255 * v * (1 - s2 * f2);
6572
- const t = 255 * v * (1 - s2 * (1 - f2));
6568
+ const hi = Math.floor(h3) % 6;
6569
+ const f2 = h3 - Math.floor(h3);
6570
+ const p2 = 255 * v * (1 - s);
6571
+ const q2 = 255 * v * (1 - s * f2);
6572
+ const t = 255 * v * (1 - s * (1 - f2));
6573
6573
  v *= 255;
6574
6574
  switch (hi) {
6575
6575
  case 0: {
6576
- return [v, t, p];
6576
+ return [v, t, p2];
6577
6577
  }
6578
6578
  case 1: {
6579
- return [q2, v, p];
6579
+ return [q2, v, p2];
6580
6580
  }
6581
6581
  case 2: {
6582
- return [p, v, t];
6582
+ return [p2, v, t];
6583
6583
  }
6584
6584
  case 3: {
6585
- return [p, q2, v];
6585
+ return [p2, q2, v];
6586
6586
  }
6587
6587
  case 4: {
6588
- return [t, p, v];
6588
+ return [t, p2, v];
6589
6589
  }
6590
6590
  case 5: {
6591
- return [v, p, q2];
6591
+ return [v, p2, q2];
6592
6592
  }
6593
6593
  }
6594
6594
  };
6595
6595
  convert.hsv.hsl = function(hsv) {
6596
- const h = hsv[0];
6597
- const s2 = hsv[1] / 100;
6596
+ const h3 = hsv[0];
6597
+ const s = hsv[1] / 100;
6598
6598
  const v = hsv[2] / 100;
6599
6599
  const vmin = Math.max(v, 0.01);
6600
6600
  let sl;
6601
- let l;
6602
- l = (2 - s2) * v;
6603
- const lmin = (2 - s2) * vmin;
6604
- sl = s2 * vmin;
6601
+ let l2;
6602
+ l2 = (2 - s) * v;
6603
+ const lmin = (2 - s) * vmin;
6604
+ sl = s * vmin;
6605
6605
  sl /= lmin <= 1 ? lmin : 2 - lmin;
6606
6606
  sl = sl || 0;
6607
- l /= 2;
6608
- return [h, sl * 100, l * 100];
6607
+ l2 /= 2;
6608
+ return [h3, sl * 100, l2 * 100];
6609
6609
  };
6610
6610
  convert.hwb.rgb = function(hwb) {
6611
- const h = hwb[0] / 360;
6611
+ const h3 = hwb[0] / 360;
6612
6612
  let wh = hwb[1] / 100;
6613
6613
  let bl = hwb[2] / 100;
6614
6614
  const ratio = wh + bl;
@@ -6617,27 +6617,27 @@ var require_color = __commonJS({
6617
6617
  wh /= ratio;
6618
6618
  bl /= ratio;
6619
6619
  }
6620
- const i2 = Math.floor(6 * h);
6620
+ const i3 = Math.floor(6 * h3);
6621
6621
  const v = 1 - bl;
6622
- f2 = 6 * h - i2;
6623
- if ((i2 & 1) !== 0) {
6622
+ f2 = 6 * h3 - i3;
6623
+ if ((i3 & 1) !== 0) {
6624
6624
  f2 = 1 - f2;
6625
6625
  }
6626
- const n2 = wh + f2 * (v - wh);
6626
+ const n3 = wh + f2 * (v - wh);
6627
6627
  let r;
6628
6628
  let g2;
6629
6629
  let b;
6630
- switch (i2) {
6630
+ switch (i3) {
6631
6631
  default:
6632
6632
  case 6:
6633
6633
  case 0: {
6634
6634
  r = v;
6635
- g2 = n2;
6635
+ g2 = n3;
6636
6636
  b = wh;
6637
6637
  break;
6638
6638
  }
6639
6639
  case 1: {
6640
- r = n2;
6640
+ r = n3;
6641
6641
  g2 = v;
6642
6642
  b = wh;
6643
6643
  break;
@@ -6645,17 +6645,17 @@ var require_color = __commonJS({
6645
6645
  case 2: {
6646
6646
  r = wh;
6647
6647
  g2 = v;
6648
- b = n2;
6648
+ b = n3;
6649
6649
  break;
6650
6650
  }
6651
6651
  case 3: {
6652
6652
  r = wh;
6653
- g2 = n2;
6653
+ g2 = n3;
6654
6654
  b = v;
6655
6655
  break;
6656
6656
  }
6657
6657
  case 4: {
6658
- r = n2;
6658
+ r = n3;
6659
6659
  g2 = wh;
6660
6660
  b = v;
6661
6661
  break;
@@ -6663,19 +6663,19 @@ var require_color = __commonJS({
6663
6663
  case 5: {
6664
6664
  r = v;
6665
6665
  g2 = wh;
6666
- b = n2;
6666
+ b = n3;
6667
6667
  break;
6668
6668
  }
6669
6669
  }
6670
6670
  return [r * 255, g2 * 255, b * 255];
6671
6671
  };
6672
6672
  convert.cmyk.rgb = function(cmyk) {
6673
- const c2 = cmyk[0] / 100;
6674
- const m2 = cmyk[1] / 100;
6673
+ const c3 = cmyk[0] / 100;
6674
+ const m3 = cmyk[1] / 100;
6675
6675
  const y = cmyk[2] / 100;
6676
6676
  const k = cmyk[3] / 100;
6677
- const r = 1 - Math.min(1, c2 * (1 - k) + k);
6678
- const g2 = 1 - Math.min(1, m2 * (1 - k) + k);
6677
+ const r = 1 - Math.min(1, c3 * (1 - k) + k);
6678
+ const g2 = 1 - Math.min(1, m3 * (1 - k) + k);
6679
6679
  const b = 1 - Math.min(1, y * (1 - k) + k);
6680
6680
  return [r * 255, g2 * 255, b * 255];
6681
6681
  };
@@ -6704,10 +6704,10 @@ var require_color = __commonJS({
6704
6704
  x = x > LAB_FT ? x ** (1 / 3) : 7.787 * x + 16 / 116;
6705
6705
  y = y > LAB_FT ? y ** (1 / 3) : 7.787 * y + 16 / 116;
6706
6706
  z = z > LAB_FT ? z ** (1 / 3) : 7.787 * z + 16 / 116;
6707
- const l = 116 * y - 16;
6707
+ const l2 = 116 * y - 16;
6708
6708
  const a2 = 500 * (x - y);
6709
6709
  const b = 200 * (y - z);
6710
- return [l, a2, b];
6710
+ return [l2, a2, b];
6711
6711
  };
6712
6712
  convert.xyz.oklab = function(xyz) {
6713
6713
  const x = xyz[0] / 100;
@@ -6716,10 +6716,10 @@ var require_color = __commonJS({
6716
6716
  const lp = Math.cbrt(0.8189330101 * x + 0.3618667424 * y - 0.1288597137 * z);
6717
6717
  const mp = Math.cbrt(0.0329845436 * x + 0.9293118715 * y + 0.0361456387 * z);
6718
6718
  const sp = Math.cbrt(0.0482003018 * x + 0.2643662691 * y + 0.633851707 * z);
6719
- const l = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6719
+ const l2 = 0.2104542553 * lp + 0.793617785 * mp - 0.0040720468 * sp;
6720
6720
  const a2 = 1.9779984951 * lp - 2.428592205 * mp + 0.4505937099 * sp;
6721
6721
  const b = 0.0259040371 * lp + 0.7827717662 * mp - 0.808675766 * sp;
6722
- return [l * 100, a2 * 100, b * 100];
6722
+ return [l2 * 100, a2 * 100, b * 100];
6723
6723
  };
6724
6724
  convert.oklab.oklch = function(oklab) {
6725
6725
  return convert.lab.lch(oklab);
@@ -6728,37 +6728,37 @@ var require_color = __commonJS({
6728
6728
  const ll = oklab[0] / 100;
6729
6729
  const a2 = oklab[1] / 100;
6730
6730
  const b = oklab[2] / 100;
6731
- const l = (0.999999998 * ll + 0.396337792 * a2 + 0.215803758 * b) ** 3;
6732
- const m2 = (1.000000008 * ll - 0.105561342 * a2 - 0.063854175 * b) ** 3;
6733
- const s2 = (1.000000055 * ll - 0.089484182 * a2 - 1.291485538 * b) ** 3;
6734
- const x = 1.227013851 * l - 0.55779998 * m2 + 0.281256149 * s2;
6735
- const y = -0.040580178 * l + 1.11225687 * m2 - 0.071676679 * s2;
6736
- const z = -0.076381285 * l - 0.421481978 * m2 + 1.58616322 * s2;
6731
+ const l2 = (0.999999998 * ll + 0.396337792 * a2 + 0.215803758 * b) ** 3;
6732
+ const m3 = (1.000000008 * ll - 0.105561342 * a2 - 0.063854175 * b) ** 3;
6733
+ const s = (1.000000055 * ll - 0.089484182 * a2 - 1.291485538 * b) ** 3;
6734
+ const x = 1.227013851 * l2 - 0.55779998 * m3 + 0.281256149 * s;
6735
+ const y = -0.040580178 * l2 + 1.11225687 * m3 - 0.071676679 * s;
6736
+ const z = -0.076381285 * l2 - 0.421481978 * m3 + 1.58616322 * s;
6737
6737
  return [x * 100, y * 100, z * 100];
6738
6738
  };
6739
6739
  convert.oklab.rgb = function(oklab) {
6740
6740
  const ll = oklab[0] / 100;
6741
6741
  const aa = oklab[1] / 100;
6742
6742
  const bb = oklab[2] / 100;
6743
- const l = (ll + 0.3963377774 * aa + 0.2158037573 * bb) ** 3;
6744
- const m2 = (ll - 0.1055613458 * aa - 0.0638541728 * bb) ** 3;
6745
- const s2 = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
6746
- const r = srgbNonlinearTransform(4.0767416621 * l - 3.3077115913 * m2 + 0.2309699292 * s2);
6747
- const g2 = srgbNonlinearTransform(-1.2684380046 * l + 2.6097574011 * m2 - 0.3413193965 * s2);
6748
- const b = srgbNonlinearTransform(-0.0041960863 * l - 0.7034186147 * m2 + 1.707614701 * s2);
6743
+ const l2 = (ll + 0.3963377774 * aa + 0.2158037573 * bb) ** 3;
6744
+ const m3 = (ll - 0.1055613458 * aa - 0.0638541728 * bb) ** 3;
6745
+ const s = (ll - 0.0894841775 * aa - 1.291485548 * bb) ** 3;
6746
+ const r = srgbNonlinearTransform(4.0767416621 * l2 - 3.3077115913 * m3 + 0.2309699292 * s);
6747
+ const g2 = srgbNonlinearTransform(-1.2684380046 * l2 + 2.6097574011 * m3 - 0.3413193965 * s);
6748
+ const b = srgbNonlinearTransform(-0.0041960863 * l2 - 0.7034186147 * m3 + 1.707614701 * s);
6749
6749
  return [r * 255, g2 * 255, b * 255];
6750
6750
  };
6751
6751
  convert.oklch.oklab = function(oklch) {
6752
6752
  return convert.lch.lab(oklch);
6753
6753
  };
6754
6754
  convert.lab.xyz = function(lab) {
6755
- const l = lab[0];
6755
+ const l2 = lab[0];
6756
6756
  const a2 = lab[1];
6757
6757
  const b = lab[2];
6758
6758
  let x;
6759
6759
  let y;
6760
6760
  let z;
6761
- y = (l + 16) / 116;
6761
+ y = (l2 + 16) / 116;
6762
6762
  x = a2 / 500 + y;
6763
6763
  z = y - b / 200;
6764
6764
  const y2 = y ** 3;
@@ -6773,26 +6773,26 @@ var require_color = __commonJS({
6773
6773
  return [x, y, z];
6774
6774
  };
6775
6775
  convert.lab.lch = function(lab) {
6776
- const l = lab[0];
6776
+ const l2 = lab[0];
6777
6777
  const a2 = lab[1];
6778
6778
  const b = lab[2];
6779
- let h;
6779
+ let h3;
6780
6780
  const hr = Math.atan2(b, a2);
6781
- h = hr * 360 / 2 / Math.PI;
6782
- if (h < 0) {
6783
- h += 360;
6781
+ h3 = hr * 360 / 2 / Math.PI;
6782
+ if (h3 < 0) {
6783
+ h3 += 360;
6784
6784
  }
6785
- const c2 = Math.sqrt(a2 * a2 + b * b);
6786
- return [l, c2, h];
6785
+ const c3 = Math.sqrt(a2 * a2 + b * b);
6786
+ return [l2, c3, h3];
6787
6787
  };
6788
6788
  convert.lch.lab = function(lch) {
6789
- const l = lch[0];
6790
- const c2 = lch[1];
6791
- const h = lch[2];
6792
- const hr = h / 360 * 2 * Math.PI;
6793
- const a2 = c2 * Math.cos(hr);
6794
- const b = c2 * Math.sin(hr);
6795
- return [l, a2, b];
6789
+ const l2 = lch[0];
6790
+ const c3 = lch[1];
6791
+ const h3 = lch[2];
6792
+ const hr = h3 / 360 * 2 * Math.PI;
6793
+ const a2 = c3 * Math.cos(hr);
6794
+ const b = c3 * Math.sin(hr);
6795
+ return [l2, a2, b];
6796
6796
  };
6797
6797
  convert.rgb.ansi16 = function(args, saturation = null) {
6798
6798
  const [r, g2, b] = args;
@@ -6845,8 +6845,8 @@ var require_color = __commonJS({
6845
6845
  convert.ansi256.rgb = function(args) {
6846
6846
  args = args[0];
6847
6847
  if (args >= 232) {
6848
- const c2 = (args - 232) * 10 + 8;
6849
- return [c2, c2, c2];
6848
+ const c3 = (args - 232) * 10 + 8;
6849
+ return [c3, c3, c3];
6850
6850
  }
6851
6851
  args -= 16;
6852
6852
  let rem;
@@ -6898,34 +6898,34 @@ var require_color = __commonJS({
6898
6898
  return [hue * 360, chroma * 100, grayscale * 100];
6899
6899
  };
6900
6900
  convert.hsl.hcg = function(hsl) {
6901
- const s2 = hsl[1] / 100;
6902
- const l = hsl[2] / 100;
6903
- const c2 = l < 0.5 ? 2 * s2 * l : 2 * s2 * (1 - l);
6901
+ const s = hsl[1] / 100;
6902
+ const l2 = hsl[2] / 100;
6903
+ const c3 = l2 < 0.5 ? 2 * s * l2 : 2 * s * (1 - l2);
6904
6904
  let f2 = 0;
6905
- if (c2 < 1) {
6906
- f2 = (l - 0.5 * c2) / (1 - c2);
6905
+ if (c3 < 1) {
6906
+ f2 = (l2 - 0.5 * c3) / (1 - c3);
6907
6907
  }
6908
- return [hsl[0], c2 * 100, f2 * 100];
6908
+ return [hsl[0], c3 * 100, f2 * 100];
6909
6909
  };
6910
6910
  convert.hsv.hcg = function(hsv) {
6911
- const s2 = hsv[1] / 100;
6911
+ const s = hsv[1] / 100;
6912
6912
  const v = hsv[2] / 100;
6913
- const c2 = s2 * v;
6913
+ const c3 = s * v;
6914
6914
  let f2 = 0;
6915
- if (c2 < 1) {
6916
- f2 = (v - c2) / (1 - c2);
6915
+ if (c3 < 1) {
6916
+ f2 = (v - c3) / (1 - c3);
6917
6917
  }
6918
- return [hsv[0], c2 * 100, f2 * 100];
6918
+ return [hsv[0], c3 * 100, f2 * 100];
6919
6919
  };
6920
6920
  convert.hcg.rgb = function(hcg) {
6921
- const h = hcg[0] / 360;
6922
- const c2 = hcg[1] / 100;
6921
+ const h3 = hcg[0] / 360;
6922
+ const c3 = hcg[1] / 100;
6923
6923
  const g2 = hcg[2] / 100;
6924
- if (c2 === 0) {
6924
+ if (c3 === 0) {
6925
6925
  return [g2 * 255, g2 * 255, g2 * 255];
6926
6926
  }
6927
6927
  const pure = [0, 0, 0];
6928
- const hi = h % 1 * 6;
6928
+ const hi = h3 % 1 * 6;
6929
6929
  const v = hi % 1;
6930
6930
  const w = 1 - v;
6931
6931
  let mg = 0;
@@ -6966,51 +6966,51 @@ var require_color = __commonJS({
6966
6966
  pure[2] = w;
6967
6967
  }
6968
6968
  }
6969
- mg = (1 - c2) * g2;
6969
+ mg = (1 - c3) * g2;
6970
6970
  return [
6971
- (c2 * pure[0] + mg) * 255,
6972
- (c2 * pure[1] + mg) * 255,
6973
- (c2 * pure[2] + mg) * 255
6971
+ (c3 * pure[0] + mg) * 255,
6972
+ (c3 * pure[1] + mg) * 255,
6973
+ (c3 * pure[2] + mg) * 255
6974
6974
  ];
6975
6975
  };
6976
6976
  convert.hcg.hsv = function(hcg) {
6977
- const c2 = hcg[1] / 100;
6977
+ const c3 = hcg[1] / 100;
6978
6978
  const g2 = hcg[2] / 100;
6979
- const v = c2 + g2 * (1 - c2);
6979
+ const v = c3 + g2 * (1 - c3);
6980
6980
  let f2 = 0;
6981
6981
  if (v > 0) {
6982
- f2 = c2 / v;
6982
+ f2 = c3 / v;
6983
6983
  }
6984
6984
  return [hcg[0], f2 * 100, v * 100];
6985
6985
  };
6986
6986
  convert.hcg.hsl = function(hcg) {
6987
- const c2 = hcg[1] / 100;
6987
+ const c3 = hcg[1] / 100;
6988
6988
  const g2 = hcg[2] / 100;
6989
- const l = g2 * (1 - c2) + 0.5 * c2;
6990
- let s2 = 0;
6991
- if (l > 0 && l < 0.5) {
6992
- s2 = c2 / (2 * l);
6993
- } else if (l >= 0.5 && l < 1) {
6994
- s2 = c2 / (2 * (1 - l));
6989
+ const l2 = g2 * (1 - c3) + 0.5 * c3;
6990
+ let s = 0;
6991
+ if (l2 > 0 && l2 < 0.5) {
6992
+ s = c3 / (2 * l2);
6993
+ } else if (l2 >= 0.5 && l2 < 1) {
6994
+ s = c3 / (2 * (1 - l2));
6995
6995
  }
6996
- return [hcg[0], s2 * 100, l * 100];
6996
+ return [hcg[0], s * 100, l2 * 100];
6997
6997
  };
6998
6998
  convert.hcg.hwb = function(hcg) {
6999
- const c2 = hcg[1] / 100;
6999
+ const c3 = hcg[1] / 100;
7000
7000
  const g2 = hcg[2] / 100;
7001
- const v = c2 + g2 * (1 - c2);
7002
- return [hcg[0], (v - c2) * 100, (1 - v) * 100];
7001
+ const v = c3 + g2 * (1 - c3);
7002
+ return [hcg[0], (v - c3) * 100, (1 - v) * 100];
7003
7003
  };
7004
7004
  convert.hwb.hcg = function(hwb) {
7005
7005
  const w = hwb[1] / 100;
7006
7006
  const b = hwb[2] / 100;
7007
7007
  const v = 1 - b;
7008
- const c2 = v - w;
7008
+ const c3 = v - w;
7009
7009
  let g2 = 0;
7010
- if (c2 < 1) {
7011
- g2 = (v - c2) / (1 - c2);
7010
+ if (c3 < 1) {
7011
+ g2 = (v - c3) / (1 - c3);
7012
7012
  }
7013
- return [hwb[0], c2 * 100, g2 * 100];
7013
+ return [hwb[0], c3 * 100, g2 * 100];
7014
7014
  };
7015
7015
  convert.apple.rgb = function(apple) {
7016
7016
  return [apple[0] / 65535 * 255, apple[1] / 65535 * 255, apple[2] / 65535 * 255];
@@ -7047,8 +7047,8 @@ var require_color = __commonJS({
7047
7047
  function buildGraph() {
7048
7048
  const graph = {};
7049
7049
  const models2 = Object.keys(conversions_default);
7050
- for (let { length } = models2, i2 = 0; i2 < length; i2++) {
7051
- graph[models2[i2]] = {
7050
+ for (let { length } = models2, i3 = 0; i3 < length; i3++) {
7051
+ graph[models2[i3]] = {
7052
7052
  // http://jsperf.com/1-vs-infinity
7053
7053
  // micro-opt, but this is simple.
7054
7054
  distance: -1,
@@ -7064,8 +7064,8 @@ var require_color = __commonJS({
7064
7064
  while (queue.length > 0) {
7065
7065
  const current = queue.pop();
7066
7066
  const adjacents = Object.keys(conversions_default[current]);
7067
- for (let { length } = adjacents, i2 = 0; i2 < length; i2++) {
7068
- const adjacent = adjacents[i2];
7067
+ for (let { length } = adjacents, i3 = 0; i3 < length; i3++) {
7068
+ const adjacent = adjacents[i3];
7069
7069
  const node = graph[adjacent];
7070
7070
  if (node.distance === -1) {
7071
7071
  node.distance = graph[current].distance + 1;
@@ -7097,8 +7097,8 @@ var require_color = __commonJS({
7097
7097
  const graph = deriveBFS(fromModel);
7098
7098
  const conversion = {};
7099
7099
  const models2 = Object.keys(graph);
7100
- for (let { length } = models2, i2 = 0; i2 < length; i2++) {
7101
- const toModel = models2[i2];
7100
+ for (let { length } = models2, i3 = 0; i3 < length; i3++) {
7101
+ const toModel = models2[i3];
7102
7102
  const node = graph[toModel];
7103
7103
  if (node.parent === null) {
7104
7104
  continue;
@@ -7137,8 +7137,8 @@ var require_color = __commonJS({
7137
7137
  }
7138
7138
  const result = fn(args);
7139
7139
  if (typeof result === "object") {
7140
- for (let { length } = result, i2 = 0; i2 < length; i2++) {
7141
- result[i2] = Math.round(result[i2]);
7140
+ for (let { length } = result, i3 = 0; i3 < length; i3++) {
7141
+ result[i3] = Math.round(result[i3]);
7142
7142
  }
7143
7143
  }
7144
7144
  return result;
@@ -7184,7 +7184,7 @@ var require_color = __commonJS({
7184
7184
  if (model && !(model in color_convert_default)) {
7185
7185
  throw new Error("Unknown model: " + model);
7186
7186
  }
7187
- let i2;
7187
+ let i3;
7188
7188
  let channels;
7189
7189
  if (object == null) {
7190
7190
  this.model = "rgb";
@@ -7231,17 +7231,17 @@ var require_color = __commonJS({
7231
7231
  this.model = hashedModelKeys[hashedKeys];
7232
7232
  const { labels } = color_convert_default[this.model];
7233
7233
  const color = [];
7234
- for (i2 = 0; i2 < labels.length; i2++) {
7235
- color.push(object[labels[i2]]);
7234
+ for (i3 = 0; i3 < labels.length; i3++) {
7235
+ color.push(object[labels[i3]]);
7236
7236
  }
7237
7237
  this.color = zeroArray(color);
7238
7238
  }
7239
7239
  if (limiters[this.model]) {
7240
7240
  channels = color_convert_default[this.model].channels;
7241
- for (i2 = 0; i2 < channels; i2++) {
7242
- const limit = limiters[this.model][i2];
7241
+ for (i3 = 0; i3 < channels; i3++) {
7242
+ const limit = limiters[this.model][i3];
7243
7243
  if (limit) {
7244
- this.color[i2] = limit(this.color[i2]);
7244
+ this.color[i3] = limit(this.color[i3]);
7245
7245
  }
7246
7246
  }
7247
7247
  }
@@ -7258,14 +7258,14 @@ var require_color = __commonJS({
7258
7258
  return this[this.model]();
7259
7259
  },
7260
7260
  string(places) {
7261
- let self = this.model in color_string_default.to ? this : this.rgb();
7262
- self = self.round(typeof places === "number" ? places : 1);
7263
- const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7264
- return color_string_default.to[self.model](...arguments_);
7261
+ let self2 = this.model in color_string_default.to ? this : this.rgb();
7262
+ self2 = self2.round(typeof places === "number" ? places : 1);
7263
+ const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
7264
+ return color_string_default.to[self2.model](...arguments_);
7265
7265
  },
7266
7266
  percentString(places) {
7267
- const self = this.rgb().round(typeof places === "number" ? places : 1);
7268
- const arguments_ = self.valpha === 1 ? self.color : [...self.color, this.valpha];
7267
+ const self2 = this.rgb().round(typeof places === "number" ? places : 1);
7268
+ const arguments_ = self2.valpha === 1 ? self2.color : [...self2.color, this.valpha];
7269
7269
  return color_string_default.to.rgb.percent(...arguments_);
7270
7270
  },
7271
7271
  array() {
@@ -7275,8 +7275,8 @@ var require_color = __commonJS({
7275
7275
  const result = {};
7276
7276
  const { channels } = color_convert_default[this.model];
7277
7277
  const { labels } = color_convert_default[this.model];
7278
- for (let i2 = 0; i2 < channels; i2++) {
7279
- result[labels[i2]] = this.color[i2];
7278
+ for (let i3 = 0; i3 < channels; i3++) {
7279
+ result[labels[i3]] = this.color[i3];
7280
7280
  }
7281
7281
  if (this.valpha !== 1) {
7282
7282
  result.alpha = this.valpha;
@@ -7366,9 +7366,9 @@ var require_color = __commonJS({
7366
7366
  luminosity() {
7367
7367
  const rgb = this.rgb().color;
7368
7368
  const lum = [];
7369
- for (const [i2, element] of rgb.entries()) {
7369
+ for (const [i3, element] of rgb.entries()) {
7370
7370
  const chan = element / 255;
7371
- lum[i2] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
7371
+ lum[i3] = chan <= 0.04045 ? chan / 12.92 : ((chan + 0.055) / 1.055) ** 2.4;
7372
7372
  }
7373
7373
  return 0.2126 * lum[0] + 0.7152 * lum[1] + 0.0722 * lum[2];
7374
7374
  },
@@ -7397,8 +7397,8 @@ var require_color = __commonJS({
7397
7397
  },
7398
7398
  negate() {
7399
7399
  const rgb = this.rgb();
7400
- for (let i2 = 0; i2 < 3; i2++) {
7401
- rgb.color[i2] = 255 - rgb.color[i2];
7400
+ for (let i3 = 0; i3 < 3; i3++) {
7401
+ rgb.color[i3] = 255 - rgb.color[i3];
7402
7402
  }
7403
7403
  return rgb;
7404
7404
  },
@@ -7457,8 +7457,8 @@ var require_color = __commonJS({
7457
7457
  }
7458
7458
  const color1 = mixinColor.rgb();
7459
7459
  const color2 = this.rgb();
7460
- const p = weight === void 0 ? 0.5 : weight;
7461
- const w = 2 * p - 1;
7460
+ const p2 = weight === void 0 ? 0.5 : weight;
7461
+ const w = 2 * p2 - 1;
7462
7462
  const a2 = color1.alpha() - color2.alpha();
7463
7463
  const w1 = ((w * a2 === -1 ? w : (w + a2) / (1 + w * a2)) + 1) / 2;
7464
7464
  const w2 = 1 - w1;
@@ -7466,7 +7466,7 @@ var require_color = __commonJS({
7466
7466
  w1 * color1.red() + w2 * color2.red(),
7467
7467
  w1 * color1.green() + w2 * color2.green(),
7468
7468
  w1 * color1.blue() + w2 * color2.blue(),
7469
- color1.alpha() * p + color2.alpha() * (1 - p)
7469
+ color1.alpha() * p2 + color2.alpha() * (1 - p2)
7470
7470
  );
7471
7471
  }
7472
7472
  };
@@ -7502,8 +7502,8 @@ var require_color = __commonJS({
7502
7502
  }
7503
7503
  function getset(model, channel, modifier) {
7504
7504
  model = Array.isArray(model) ? model : [model];
7505
- for (const m2 of model) {
7506
- (limiters[m2] || (limiters[m2] = []))[channel] = modifier;
7505
+ for (const m3 of model) {
7506
+ (limiters[m3] || (limiters[m3] = []))[channel] = modifier;
7507
7507
  }
7508
7508
  model = model[0];
7509
7509
  return function(value) {
@@ -7532,9 +7532,9 @@ var require_color = __commonJS({
7532
7532
  return Array.isArray(value) ? value : [value];
7533
7533
  }
7534
7534
  function zeroArray(array, length) {
7535
- for (let i2 = 0; i2 < length; i2++) {
7536
- if (typeof array[i2] !== "number") {
7537
- array[i2] = 0;
7535
+ for (let i3 = 0; i3 < length; i3++) {
7536
+ if (typeof array[i3] !== "number") {
7537
+ array[i3] = 0;
7538
7538
  }
7539
7539
  }
7540
7540
  return array;
@@ -8723,24 +8723,24 @@ var require_lib = __commonJS({
8723
8723
  // ../codec-sharp/dist/index.mjs
8724
8724
  var dist_exports2 = {};
8725
8725
  __export(dist_exports2, {
8726
- default: () => f,
8727
- sharpTransformer: () => o
8726
+ codecSharp: () => o,
8727
+ default: () => f
8728
8728
  });
8729
- async function a(e) {
8729
+ async function a(r) {
8730
8730
  try {
8731
- let r = await (0, import_sharp.default)(e).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
8732
- if (!r.info.width || !r.info.height) throw new Error(`Invalid image dimensions: ${e}`);
8733
- return { data: r.data, width: r.info.width, height: r.info.height };
8734
- } catch (r) {
8735
- throw new Error(`Failed to read image file ${e}: ${r}`);
8731
+ let e = await (0, import_sharp.default)(r).ensureAlpha().raw().toBuffer({ resolveWithObject: true });
8732
+ if (!e.info.width || !e.info.height) throw new Error(`Invalid image dimensions: ${r}`);
8733
+ return { data: e.data, width: e.info.width, height: e.info.height };
8734
+ } catch (e) {
8735
+ throw new Error(`Failed to read image file ${r}: ${e}`);
8736
8736
  }
8737
8737
  }
8738
- async function n(e, r) {
8738
+ async function n(r, e) {
8739
8739
  try {
8740
- let t = (0, import_sharp.default)(e.data, { raw: { width: e.width, height: e.height, channels: 4 } });
8741
- typeof r == "string" ? await t.png().toFile(r) : r.set(await t.png().toBuffer());
8740
+ let t = (0, import_sharp.default)(r.data, { raw: { width: r.width, height: r.height, channels: 4 } });
8741
+ typeof e == "string" ? await t.png().toFile(e) : e.set(await t.png().toBuffer());
8742
8742
  } catch (t) {
8743
- throw new Error(`Failed to write image file ${r}: ${t}`);
8743
+ throw new Error(`Failed to write image file ${e}: ${t}`);
8744
8744
  }
8745
8745
  }
8746
8746
  var import_sharp, o, f;
@@ -8753,6 +8753,366 @@ var init_dist2 = __esm({
8753
8753
  }
8754
8754
  });
8755
8755
 
8756
+ // ../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/codec/pkg/squoosh_png.js
8757
+ function addHeapObject(obj) {
8758
+ if (heap_next === heap.length) heap.push(heap.length + 1);
8759
+ const idx = heap_next;
8760
+ heap_next = heap[idx];
8761
+ heap[idx] = obj;
8762
+ return idx;
8763
+ }
8764
+ function getObject(idx) {
8765
+ return heap[idx];
8766
+ }
8767
+ function dropObject(idx) {
8768
+ if (idx < 132) return;
8769
+ heap[idx] = heap_next;
8770
+ heap_next = idx;
8771
+ }
8772
+ function takeObject(idx) {
8773
+ const ret = getObject(idx);
8774
+ dropObject(idx);
8775
+ return ret;
8776
+ }
8777
+ function getUint8Memory0() {
8778
+ if (cachedUint8Memory0 === null || cachedUint8Memory0.byteLength === 0) {
8779
+ cachedUint8Memory0 = new Uint8Array(wasm.memory.buffer);
8780
+ }
8781
+ return cachedUint8Memory0;
8782
+ }
8783
+ function getStringFromWasm0(ptr, len) {
8784
+ ptr = ptr >>> 0;
8785
+ return cachedTextDecoder.decode(getUint8Memory0().subarray(ptr, ptr + len));
8786
+ }
8787
+ function getUint8ClampedMemory0() {
8788
+ if (cachedUint8ClampedMemory0 === null || cachedUint8ClampedMemory0.byteLength === 0) {
8789
+ cachedUint8ClampedMemory0 = new Uint8ClampedArray(wasm.memory.buffer);
8790
+ }
8791
+ return cachedUint8ClampedMemory0;
8792
+ }
8793
+ function getClampedArrayU8FromWasm0(ptr, len) {
8794
+ ptr = ptr >>> 0;
8795
+ return getUint8ClampedMemory0().subarray(ptr / 1, ptr / 1 + len);
8796
+ }
8797
+ function passArray8ToWasm0(arg, malloc) {
8798
+ const ptr = malloc(arg.length * 1, 1) >>> 0;
8799
+ getUint8Memory0().set(arg, ptr / 1);
8800
+ WASM_VECTOR_LEN = arg.length;
8801
+ return ptr;
8802
+ }
8803
+ function getInt32Memory0() {
8804
+ if (cachedInt32Memory0 === null || cachedInt32Memory0.byteLength === 0) {
8805
+ cachedInt32Memory0 = new Int32Array(wasm.memory.buffer);
8806
+ }
8807
+ return cachedInt32Memory0;
8808
+ }
8809
+ function getArrayU8FromWasm0(ptr, len) {
8810
+ ptr = ptr >>> 0;
8811
+ return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
8812
+ }
8813
+ function encode(data, width, height, bit_depth) {
8814
+ try {
8815
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
8816
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
8817
+ const len0 = WASM_VECTOR_LEN;
8818
+ wasm.encode(retptr, ptr0, len0, width, height, bit_depth);
8819
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
8820
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
8821
+ var v2 = getArrayU8FromWasm0(r0, r1).slice();
8822
+ wasm.__wbindgen_free(r0, r1 * 1, 1);
8823
+ return v2;
8824
+ } finally {
8825
+ wasm.__wbindgen_add_to_stack_pointer(16);
8826
+ }
8827
+ }
8828
+ function decode(data) {
8829
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
8830
+ const len0 = WASM_VECTOR_LEN;
8831
+ const ret = wasm.decode(ptr0, len0);
8832
+ return takeObject(ret);
8833
+ }
8834
+ function decode_rgba16(data) {
8835
+ const ptr0 = passArray8ToWasm0(data, wasm.__wbindgen_malloc);
8836
+ const len0 = WASM_VECTOR_LEN;
8837
+ const ret = wasm.decode_rgba16(ptr0, len0);
8838
+ return ImageDataRGBA16.__wrap(ret);
8839
+ }
8840
+ async function __wbg_load(module2, imports) {
8841
+ if (typeof Response === "function" && module2 instanceof Response) {
8842
+ if (typeof WebAssembly.instantiateStreaming === "function") {
8843
+ try {
8844
+ return await WebAssembly.instantiateStreaming(module2, imports);
8845
+ } catch (e) {
8846
+ if (module2.headers.get("Content-Type") != "application/wasm") {
8847
+ console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n", e);
8848
+ } else {
8849
+ throw e;
8850
+ }
8851
+ }
8852
+ }
8853
+ const bytes = await module2.arrayBuffer();
8854
+ return await WebAssembly.instantiate(bytes, imports);
8855
+ } else {
8856
+ const instance = await WebAssembly.instantiate(module2, imports);
8857
+ if (instance instanceof WebAssembly.Instance) {
8858
+ return { instance, module: module2 };
8859
+ } else {
8860
+ return instance;
8861
+ }
8862
+ }
8863
+ }
8864
+ function __wbg_get_imports() {
8865
+ const imports = {};
8866
+ imports.wbg = {};
8867
+ imports.wbg.__wbindgen_memory = function() {
8868
+ const ret = wasm.memory;
8869
+ return addHeapObject(ret);
8870
+ };
8871
+ imports.wbg.__wbg_buffer_a448f833075b71ba = function(arg0) {
8872
+ const ret = getObject(arg0).buffer;
8873
+ return addHeapObject(ret);
8874
+ };
8875
+ imports.wbg.__wbg_newwithbyteoffsetandlength_099217381c451830 = function(arg0, arg1, arg2) {
8876
+ const ret = new Uint16Array(getObject(arg0), arg1 >>> 0, arg2 >>> 0);
8877
+ return addHeapObject(ret);
8878
+ };
8879
+ imports.wbg.__wbindgen_object_drop_ref = function(arg0) {
8880
+ takeObject(arg0);
8881
+ };
8882
+ imports.wbg.__wbg_newwithownedu8clampedarrayandsh_91db5987993a08fb = function(arg0, arg1, arg2, arg3) {
8883
+ var v0 = getClampedArrayU8FromWasm0(arg0, arg1).slice();
8884
+ wasm.__wbindgen_free(arg0, arg1 * 1, 1);
8885
+ const ret = new ImageData(v0, arg2 >>> 0, arg3 >>> 0);
8886
+ return addHeapObject(ret);
8887
+ };
8888
+ imports.wbg.__wbindgen_throw = function(arg0, arg1) {
8889
+ throw new Error(getStringFromWasm0(arg0, arg1));
8890
+ };
8891
+ return imports;
8892
+ }
8893
+ function __wbg_init_memory(imports, maybe_memory) {
8894
+ }
8895
+ function __wbg_finalize_init(instance, module2) {
8896
+ wasm = instance.exports;
8897
+ __wbg_init.__wbindgen_wasm_module = module2;
8898
+ cachedInt32Memory0 = null;
8899
+ cachedUint8Memory0 = null;
8900
+ cachedUint8ClampedMemory0 = null;
8901
+ return wasm;
8902
+ }
8903
+ async function __wbg_init(input) {
8904
+ if (wasm !== void 0) return wasm;
8905
+ if (typeof input === "undefined") {
8906
+ input = new URL("squoosh_png_bg.wasm", import_meta.url);
8907
+ }
8908
+ const imports = __wbg_get_imports();
8909
+ if (typeof input === "string" || typeof Request === "function" && input instanceof Request || typeof URL === "function" && input instanceof URL) {
8910
+ input = fetch(input);
8911
+ }
8912
+ __wbg_init_memory(imports);
8913
+ const { instance, module: module2 } = await __wbg_load(await input, imports);
8914
+ return __wbg_finalize_init(instance, module2);
8915
+ }
8916
+ var import_meta, wasm, heap, heap_next, cachedTextDecoder, cachedUint8Memory0, cachedUint8ClampedMemory0, WASM_VECTOR_LEN, cachedInt32Memory0, ImageDataRGBA16, squoosh_png_default, isServiceWorker, isRunningInCloudFlareWorkers, isRunningInNode;
8917
+ var init_squoosh_png = __esm({
8918
+ "../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/codec/pkg/squoosh_png.js"() {
8919
+ "use strict";
8920
+ import_meta = {};
8921
+ heap = new Array(128).fill(void 0);
8922
+ heap.push(void 0, null, true, false);
8923
+ heap_next = heap.length;
8924
+ cachedTextDecoder = typeof TextDecoder !== "undefined" ? new TextDecoder("utf-8", { ignoreBOM: true, fatal: true }) : { decode: () => {
8925
+ throw Error("TextDecoder not available");
8926
+ } };
8927
+ if (typeof TextDecoder !== "undefined") {
8928
+ cachedTextDecoder.decode();
8929
+ }
8930
+ cachedUint8Memory0 = null;
8931
+ cachedUint8ClampedMemory0 = null;
8932
+ WASM_VECTOR_LEN = 0;
8933
+ cachedInt32Memory0 = null;
8934
+ ImageDataRGBA16 = class _ImageDataRGBA16 {
8935
+ static __wrap(ptr) {
8936
+ ptr = ptr >>> 0;
8937
+ const obj = Object.create(_ImageDataRGBA16.prototype);
8938
+ obj.__wbg_ptr = ptr;
8939
+ return obj;
8940
+ }
8941
+ __destroy_into_raw() {
8942
+ const ptr = this.__wbg_ptr;
8943
+ this.__wbg_ptr = 0;
8944
+ return ptr;
8945
+ }
8946
+ free() {
8947
+ const ptr = this.__destroy_into_raw();
8948
+ wasm.__wbg_imagedatargba16_free(ptr);
8949
+ }
8950
+ /**
8951
+ * @returns {number}
8952
+ */
8953
+ get width() {
8954
+ const ret = wasm.imagedatargba16_width(this.__wbg_ptr);
8955
+ return ret >>> 0;
8956
+ }
8957
+ /**
8958
+ * @returns {number}
8959
+ */
8960
+ get height() {
8961
+ const ret = wasm.imagedatargba16_height(this.__wbg_ptr);
8962
+ return ret >>> 0;
8963
+ }
8964
+ /**
8965
+ * @returns {Uint16Array}
8966
+ */
8967
+ get data() {
8968
+ const ret = wasm.imagedatargba16_data(this.__wbg_ptr);
8969
+ return takeObject(ret);
8970
+ }
8971
+ };
8972
+ squoosh_png_default = __wbg_init;
8973
+ isServiceWorker = globalThis.ServiceWorkerGlobalScope !== void 0;
8974
+ isRunningInCloudFlareWorkers = isServiceWorker && typeof self !== "undefined" && globalThis.caches && globalThis.caches.default !== void 0;
8975
+ isRunningInNode = typeof process === "object" && process.release && process.release.name === "node";
8976
+ if (isRunningInCloudFlareWorkers || isRunningInNode) {
8977
+ if (!globalThis.ImageData) {
8978
+ globalThis.ImageData = class ImageData {
8979
+ constructor(data, width, height) {
8980
+ this.data = data;
8981
+ this.width = width;
8982
+ this.height = height;
8983
+ }
8984
+ };
8985
+ }
8986
+ if (import_meta.url === void 0) {
8987
+ import_meta.url = "https://localhost";
8988
+ }
8989
+ if (typeof self !== "undefined" && self.location === void 0) {
8990
+ self.location = { href: "" };
8991
+ }
8992
+ }
8993
+ }
8994
+ });
8995
+
8996
+ // ../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/decode.js
8997
+ var decode_exports = {};
8998
+ __export(decode_exports, {
8999
+ decode: () => decode2,
9000
+ default: () => decode_default,
9001
+ init: () => init
9002
+ });
9003
+ async function init(moduleOrPath) {
9004
+ if (!pngModule) {
9005
+ pngModule = squoosh_png_default(moduleOrPath);
9006
+ }
9007
+ return pngModule;
9008
+ }
9009
+ async function decode2(data, options = {}) {
9010
+ await init();
9011
+ const { bitDepth = 8 } = options;
9012
+ if (bitDepth === 16) {
9013
+ const imageData2 = await decode_rgba16(new Uint8Array(data));
9014
+ if (!imageData2)
9015
+ throw new Error("Encoding error.");
9016
+ return imageData2;
9017
+ }
9018
+ const imageData = await decode(new Uint8Array(data));
9019
+ if (!imageData)
9020
+ throw new Error("Encoding error.");
9021
+ return imageData;
9022
+ }
9023
+ var pngModule, decode_default;
9024
+ var init_decode = __esm({
9025
+ "../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/decode.js"() {
9026
+ "use strict";
9027
+ init_squoosh_png();
9028
+ decode_default = decode2;
9029
+ }
9030
+ });
9031
+
9032
+ // ../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/encode.js
9033
+ var encode_exports = {};
9034
+ __export(encode_exports, {
9035
+ default: () => encode2,
9036
+ init: () => init2
9037
+ });
9038
+ async function init2(moduleOrPath) {
9039
+ if (!pngModule2) {
9040
+ pngModule2 = squoosh_png_default(moduleOrPath);
9041
+ }
9042
+ return pngModule2;
9043
+ }
9044
+ async function encode2(data, options = {}) {
9045
+ var _a;
9046
+ await init2();
9047
+ const bitDepth = (_a = options === null || options === void 0 ? void 0 : options.bitDepth) !== null && _a !== void 0 ? _a : 8;
9048
+ if (bitDepth !== 8 && bitDepth !== 16) {
9049
+ throw new Error("Invalid bit depth. Must be either 8 or 16.");
9050
+ }
9051
+ const isUint16Array = data.data instanceof Uint16Array;
9052
+ if (isUint16Array && bitDepth !== 16) {
9053
+ throw new Error("Invalid bit depth, must be 16 for Uint16Array or manually convert to RGB8 values with Uint8Array.");
9054
+ }
9055
+ if (!isUint16Array && bitDepth === 16) {
9056
+ throw new Error("Invalid bit depth, must be 8 for Uint8Array or manually convert to RGB16 values with Uint16Array.");
9057
+ }
9058
+ const encodeData = new Uint8Array(data.data.buffer);
9059
+ const output = await encode(encodeData, data.width, data.height, bitDepth);
9060
+ if (!output)
9061
+ throw new Error("Encoding error.");
9062
+ return output.buffer;
9063
+ }
9064
+ var pngModule2;
9065
+ var init_encode = __esm({
9066
+ "../../node_modules/.pnpm/@jsquash+png@3.1.1/node_modules/@jsquash/png/encode.js"() {
9067
+ "use strict";
9068
+ init_squoosh_png();
9069
+ }
9070
+ });
9071
+
9072
+ // ../codec-jsquash-png/dist/index.mjs
9073
+ var dist_exports3 = {};
9074
+ __export(dist_exports3, {
9075
+ codecJsquashPng: () => l,
9076
+ default: () => p
9077
+ });
9078
+ function c2() {
9079
+ return n2 || (n2 = (async () => {
9080
+ let e = (0, import_path.dirname)(i2.resolve("@jsquash/png")), t = (0, import_path.join)(e, "codec", "pkg", "squoosh_png_bg.wasm"), a2 = (0, import_fs2.readFileSync)(t), o2 = await Promise.resolve().then(() => (init_decode(), decode_exports)), r = await Promise.resolve().then(() => (init_encode(), encode_exports));
9081
+ return await Promise.all([o2.init(a2), r.init(a2)]), { decode: o2.default, encode: r.default };
9082
+ })(), n2);
9083
+ }
9084
+ async function h2(e) {
9085
+ try {
9086
+ let { decode: t } = await c2(), a2 = typeof e == "string" ? (0, import_fs2.readFileSync)(e) : e, o2 = new Uint8Array(a2).buffer, r = await t(o2);
9087
+ return { data: r.data, width: r.width, height: r.height };
9088
+ } catch (t) {
9089
+ throw new Error(`Failed to read PNG file ${e}: ${t}`);
9090
+ }
9091
+ }
9092
+ async function m2(e, t) {
9093
+ try {
9094
+ let { encode: a2 } = await c2(), o2 = { data: new Uint8ClampedArray(e.data.buffer, e.data.byteOffset, e.data.byteLength), width: e.width, height: e.height, colorSpace: "srgb" }, r = await a2(o2);
9095
+ (0, import_fs2.writeFileSync)(t, Buffer.from(r));
9096
+ } catch (a2) {
9097
+ throw new Error(`Failed to write PNG file ${t}: ${a2}`);
9098
+ }
9099
+ }
9100
+ var import_fs2, import_path, i2, n2, l, p;
9101
+ var init_dist3 = __esm({
9102
+ "../codec-jsquash-png/dist/index.mjs"() {
9103
+ "use strict";
9104
+ import_fs2 = require("fs");
9105
+ import_path = require("path");
9106
+ i2 = ((e) => typeof require < "u" ? require : typeof Proxy < "u" ? new Proxy(e, { get: (t, a2) => (typeof require < "u" ? require : t)[a2] }) : e)(function(e) {
9107
+ if (typeof require < "u") return require.apply(this, arguments);
9108
+ throw Error('Dynamic require of "' + e + '" is not supported');
9109
+ });
9110
+ n2 = null;
9111
+ l = { read: h2, write: m2 };
9112
+ p = l;
9113
+ }
9114
+ });
9115
+
8756
9116
  // src/commands/core.ts
8757
9117
  var core_exports = {};
8758
9118
  __export(core_exports, {
@@ -8761,120 +9121,120 @@ __export(core_exports, {
8761
9121
  module.exports = __toCommonJS(core_exports);
8762
9122
 
8763
9123
  // ../core/dist/index.mjs
8764
- function g(n2, r, t, e, o2, { threshold: f2 = 0.1, alpha: c2 = 0.1, aaColor: s2 = [255, 255, 0], diffColor: a2 = [255, 0, 0], includeAA: U, diffColorAlt: O, diffMask: b, fastBufferCheck: y = true } = {}) {
8765
- if (!_(n2) || !_(r) || t && !_(t)) throw new Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");
8766
- if (n2.length !== r.length || t && t.length !== n2.length) throw new Error(`Image sizes do not match. Image 1 size: ${n2.length}, image 2 size: ${r.length}`);
8767
- if (n2.length !== e * o2 * 4) throw new Error(`Image data size does not match width/height. Expecting ${e * o2 * 4}. Got ${n2.length}`);
8768
- if (y && typeof Buffer < "u" && Buffer.compare && n2 instanceof Uint8Array && r instanceof Uint8Array && Buffer.compare(n2, r) === 0) {
8769
- if (t && !b) for (let A = 0; A < e * o2; A++) L(n2, A * 4, c2, t);
9124
+ function g(n3, r, t, e, o2, { threshold: f2 = 0.1, alpha: c3 = 0.1, aaColor: s = [255, 255, 0], diffColor: a2 = [255, 0, 0], includeAA: U, diffColorAlt: O, diffMask: b, fastBufferCheck: y = true } = {}) {
9125
+ if (!_(n3) || !_(r) || t && !_(t)) throw new Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");
9126
+ if (n3.length !== r.length || t && t.length !== n3.length) throw new Error(`Image sizes do not match. Image 1 size: ${n3.length}, image 2 size: ${r.length}`);
9127
+ if (n3.length !== e * o2 * 4) throw new Error(`Image data size does not match width/height. Expecting ${e * o2 * 4}. Got ${n3.length}`);
9128
+ if (y && typeof Buffer < "u" && Buffer.compare && n3 instanceof Uint8Array && r instanceof Uint8Array && Buffer.compare(n3, r) === 0) {
9129
+ if (t && !b) for (let A = 0; A < e * o2; A++) L(n3, A * 4, c3, t);
8770
9130
  return 0;
8771
9131
  }
8772
- let m2 = e * o2, u = new Uint32Array(n2.buffer, n2.byteOffset, m2), d2 = new Uint32Array(r.buffer, r.byteOffset, m2), l = tn(e, o2), i2 = Math.ceil(e / l), I = Math.ceil(o2 / l), z = i2 * I, x = new Uint16Array(z), M = 35215 * f2 * f2, B = 0;
8773
- for (let A = 0; A < I; A++) for (let R = 0; R < i2; R++) {
8774
- let p = R * l, v = A * l, D = Math.min(p + l, e), P = Math.min(v + l, o2), $ = false;
9132
+ let m3 = e * o2, u = new Uint32Array(n3.buffer, n3.byteOffset, m3), d2 = new Uint32Array(r.buffer, r.byteOffset, m3), l2 = tn(e, o2), i3 = Math.ceil(e / l2), I = Math.ceil(o2 / l2), z = i3 * I, x = new Uint16Array(z), M = 35215 * f2 * f2, B = 0;
9133
+ for (let A = 0; A < I; A++) for (let R = 0; R < i3; R++) {
9134
+ let p2 = R * l2, v = A * l2, D = Math.min(p2 + l2, e), P = Math.min(v + l2, o2), $ = false;
8775
9135
  n: for (let C = v; C < P; C++) {
8776
9136
  let Y = C * e;
8777
- for (let G = p; G < D; G++) {
9137
+ for (let G = p2; G < D; G++) {
8778
9138
  let E = Y + G;
8779
9139
  if (u[E] === d2[E]) continue;
8780
- let S = E * 4, X = N(n2, r, S, S);
9140
+ let S = E * 4, X = N(n3, r, S, S);
8781
9141
  if (Math.abs(X) > M) {
8782
9142
  $ = true;
8783
9143
  break n;
8784
9144
  }
8785
9145
  }
8786
9146
  }
8787
- if ($) x[B++] = A * i2 + R;
9147
+ if ($) x[B++] = A * i3 + R;
8788
9148
  else if (t && !b) for (let C = v; C < P; C++) {
8789
9149
  let Y = C * e;
8790
- for (let G = p; G < D; G++) {
9150
+ for (let G = p2; G < D; G++) {
8791
9151
  let E = Y + G;
8792
- L(n2, E * 4, c2, t);
9152
+ L(n3, E * 4, c3, t);
8793
9153
  }
8794
9154
  }
8795
9155
  }
8796
9156
  if (B === 0) return 0;
8797
- let [F, J, K] = s2, [Q, W, Z] = a2, [k, w, h] = O || a2, T = 0;
9157
+ let [F, J, K] = s, [Q, W, Z] = a2, [k, w, h3] = O || a2, T = 0;
8798
9158
  for (let A = 0; A < B; A++) {
8799
- let R = x[A], p = R % i2, v = R / i2 | 0, D = p * l, P = v * l, $ = Math.min(D + l, e), C = Math.min(P + l, o2);
9159
+ let R = x[A], p2 = R % i3, v = R / i3 | 0, D = p2 * l2, P = v * l2, $ = Math.min(D + l2, e), C = Math.min(P + l2, o2);
8800
9160
  for (let Y = P; Y < C; Y++) {
8801
9161
  let G = Y * e;
8802
9162
  for (let E = D; E < $; E++) {
8803
9163
  let S = G + E, X = S * 4;
8804
9164
  if (u[S] === d2[S]) {
8805
- t && !b && L(n2, X, c2, t);
9165
+ t && !b && L(n3, X, c3, t);
8806
9166
  continue;
8807
9167
  }
8808
- let H = N(n2, r, X, X);
8809
- Math.abs(H) > M ? !U && (j(n2, E, Y, e, o2, u, d2) || j(r, E, Y, e, o2, d2, u)) ? t && !b && V(t, X, F, J, K) : (t && (H < 0 ? V(t, X, k, w, h) : V(t, X, Q, W, Z)), T++) : t && !b && L(n2, X, c2, t);
9168
+ let H = N(n3, r, X, X);
9169
+ Math.abs(H) > M ? !U && (j(n3, E, Y, e, o2, u, d2) || j(r, E, Y, e, o2, d2, u)) ? t && !b && V(t, X, F, J, K) : (t && (H < 0 ? V(t, X, k, w, h3) : V(t, X, Q, W, Z)), T++) : t && !b && L(n3, X, c3, t);
8810
9170
  }
8811
9171
  }
8812
9172
  }
8813
9173
  return T;
8814
9174
  }
8815
- function _(n2) {
8816
- return ArrayBuffer.isView(n2) && n2.BYTES_PER_ELEMENT === 1;
9175
+ function _(n3) {
9176
+ return ArrayBuffer.isView(n3) && n3.BYTES_PER_ELEMENT === 1;
8817
9177
  }
8818
9178
  var nn = Math.LOG2E;
8819
- function tn(n2, r) {
8820
- let t = n2 * r, e = Math.sqrt(t) / 100, o2 = 16 * Math.sqrt(e), f2 = Math.log(o2) * nn;
9179
+ function tn(n3, r) {
9180
+ let t = n3 * r, e = Math.sqrt(t) / 100, o2 = 16 * Math.sqrt(e), f2 = Math.log(o2) * nn;
8821
9181
  return 1 << Math.round(f2);
8822
9182
  }
8823
- function N(n2, r, t, e) {
8824
- let o2 = n2[t], f2 = n2[t + 1], c2 = n2[t + 2], s2 = n2[t + 3], a2 = r[e], U = r[e + 1], O = r[e + 2], b = r[e + 3], y = o2 - a2, m2 = f2 - U, u = c2 - O, d2 = s2 - b;
8825
- if (!y && !m2 && !u && !d2) return 0;
8826
- if (s2 < 255 || b < 255) {
9183
+ function N(n3, r, t, e) {
9184
+ let o2 = n3[t], f2 = n3[t + 1], c3 = n3[t + 2], s = n3[t + 3], a2 = r[e], U = r[e + 1], O = r[e + 2], b = r[e + 3], y = o2 - a2, m3 = f2 - U, u = c3 - O, d2 = s - b;
9185
+ if (!y && !m3 && !u && !d2) return 0;
9186
+ if (s < 255 || b < 255) {
8827
9187
  let x = 48 + 159 * (t % 2), M = 48 + 159 * ((t / 1.618033988749895 | 0) & 1), B = 48 + 159 * ((t / 2.618033988749895 | 0) & 1);
8828
- y = (o2 * s2 - a2 * b - x * d2) / 255, m2 = (f2 * s2 - U * b - M * d2) / 255, u = (c2 * s2 - O * b - B * d2) / 255;
9188
+ y = (o2 * s - a2 * b - x * d2) / 255, m3 = (f2 * s - U * b - M * d2) / 255, u = (c3 * s - O * b - B * d2) / 255;
8829
9189
  }
8830
- let l = y * 0.29889531 + m2 * 0.58662247 + u * 0.11448223, i2 = y * 0.59597799 - m2 * 0.2741761 - u * 0.32180189, I = y * 0.21147017 - m2 * 0.52261711 + u * 0.31114694, z = 0.5053 * l * l + 0.299 * i2 * i2 + 0.1957 * I * I;
8831
- return l > 0 ? -z : z;
9190
+ let l2 = y * 0.29889531 + m3 * 0.58662247 + u * 0.11448223, i3 = y * 0.59597799 - m3 * 0.2741761 - u * 0.32180189, I = y * 0.21147017 - m3 * 0.52261711 + u * 0.31114694, z = 0.5053 * l2 * l2 + 0.299 * i3 * i3 + 0.1957 * I * I;
9191
+ return l2 > 0 ? -z : z;
8832
9192
  }
8833
- function rn(n2, r, t, e) {
8834
- let o2 = n2[t], f2 = n2[t + 1], c2 = n2[t + 2], s2 = n2[t + 3], a2 = r[e], U = r[e + 1], O = r[e + 2], b = r[e + 3], y = o2 - a2, m2 = f2 - U, u = c2 - O, d2 = s2 - b;
8835
- if (!y && !m2 && !u && !d2) return 0;
8836
- if (s2 < 255 || b < 255) {
8837
- let i2 = 48 + 159 * (t % 2), I = 48 + 159 * ((t / 1.618033988749895 | 0) & 1), z = 48 + 159 * ((t / 2.618033988749895 | 0) & 1);
8838
- y = (o2 * s2 - a2 * b - i2 * d2) / 255, m2 = (f2 * s2 - U * b - I * d2) / 255, u = (c2 * s2 - O * b - z * d2) / 255;
9193
+ function rn(n3, r, t, e) {
9194
+ let o2 = n3[t], f2 = n3[t + 1], c3 = n3[t + 2], s = n3[t + 3], a2 = r[e], U = r[e + 1], O = r[e + 2], b = r[e + 3], y = o2 - a2, m3 = f2 - U, u = c3 - O, d2 = s - b;
9195
+ if (!y && !m3 && !u && !d2) return 0;
9196
+ if (s < 255 || b < 255) {
9197
+ let i3 = 48 + 159 * (t % 2), I = 48 + 159 * ((t / 1.618033988749895 | 0) & 1), z = 48 + 159 * ((t / 2.618033988749895 | 0) & 1);
9198
+ y = (o2 * s - a2 * b - i3 * d2) / 255, m3 = (f2 * s - U * b - I * d2) / 255, u = (c3 * s - O * b - z * d2) / 255;
8839
9199
  }
8840
- return y * 0.29889531 + m2 * 0.58662247 + u * 0.11448223;
9200
+ return y * 0.29889531 + m3 * 0.58662247 + u * 0.11448223;
8841
9201
  }
8842
- function j(n2, r, t, e, o2, f2, c2) {
8843
- let s2 = Math.max(r - 1, 0), a2 = Math.max(t - 1, 0), U = Math.min(r + 1, e - 1), O = Math.min(t + 1, o2 - 1), y = (t * e + r) * 4, m2 = r === s2 || r === U || t === a2 || t === O ? 1 : 0, u = 0, d2 = 0, l = 0, i2 = 0, I = 0, z = 0;
8844
- for (let x = s2; x <= U; x++) for (let M = a2; M <= O; M++) {
9202
+ function j(n3, r, t, e, o2, f2, c3) {
9203
+ let s = Math.max(r - 1, 0), a2 = Math.max(t - 1, 0), U = Math.min(r + 1, e - 1), O = Math.min(t + 1, o2 - 1), y = (t * e + r) * 4, m3 = r === s || r === U || t === a2 || t === O ? 1 : 0, u = 0, d2 = 0, l2 = 0, i3 = 0, I = 0, z = 0;
9204
+ for (let x = s; x <= U; x++) for (let M = a2; M <= O; M++) {
8845
9205
  if (x === r && M === t) continue;
8846
- let B = rn(n2, n2, y, (M * e + x) * 4);
9206
+ let B = rn(n3, n3, y, (M * e + x) * 4);
8847
9207
  if (B === 0) {
8848
- if (m2++, m2 > 2) return false;
8849
- } else B < u ? (u = B, l = x, i2 = M) : B > d2 && (d2 = B, I = x, z = M);
9208
+ if (m3++, m3 > 2) return false;
9209
+ } else B < u ? (u = B, l2 = x, i3 = M) : B > d2 && (d2 = B, I = x, z = M);
8850
9210
  }
8851
- return u === 0 || d2 === 0 ? false : q(f2, l, i2, e, o2) && q(c2, l, i2, e, o2) || q(f2, I, z, e, o2) && q(c2, I, z, e, o2);
9211
+ return u === 0 || d2 === 0 ? false : q(f2, l2, i3, e, o2) && q(c3, l2, i3, e, o2) || q(f2, I, z, e, o2) && q(c3, I, z, e, o2);
8852
9212
  }
8853
- function q(n2, r, t, e, o2) {
8854
- let f2 = t * e + r, c2 = n2[f2], s2 = r === 0 || r === e - 1 || t === 0 || t === o2 - 1 ? 1 : 0;
9213
+ function q(n3, r, t, e, o2) {
9214
+ let f2 = t * e + r, c3 = n3[f2], s = r === 0 || r === e - 1 || t === 0 || t === o2 - 1 ? 1 : 0;
8855
9215
  if (t > 0) {
8856
9216
  let a2 = f2 - e;
8857
- r > 0 && n2[a2 - 1] === c2 && s2++, n2[a2] === c2 && s2++, r < e - 1 && n2[a2 + 1] === c2 && s2++;
9217
+ r > 0 && n3[a2 - 1] === c3 && s++, n3[a2] === c3 && s++, r < e - 1 && n3[a2 + 1] === c3 && s++;
8858
9218
  }
8859
- if (r > 0 && n2[f2 - 1] === c2 && s2++, r < e - 1 && n2[f2 + 1] === c2 && s2++, t < o2 - 1) {
9219
+ if (r > 0 && n3[f2 - 1] === c3 && s++, r < e - 1 && n3[f2 + 1] === c3 && s++, t < o2 - 1) {
8860
9220
  let a2 = f2 + e;
8861
- r > 0 && n2[a2 - 1] === c2 && s2++, n2[a2] === c2 && s2++, r < e - 1 && n2[a2 + 1] === c2 && s2++;
9221
+ r > 0 && n3[a2 - 1] === c3 && s++, n3[a2] === c3 && s++, r < e - 1 && n3[a2 + 1] === c3 && s++;
8862
9222
  }
8863
- return s2 > 2;
9223
+ return s > 2;
8864
9224
  }
8865
- function L(n2, r, t, e) {
8866
- let o2 = 255 + (n2[r] * 0.29889531 + n2[r + 1] * 0.58662247 + n2[r + 2] * 0.11448223 - 255) * t * n2[r + 3] / 255;
9225
+ function L(n3, r, t, e) {
9226
+ let o2 = 255 + (n3[r] * 0.29889531 + n3[r + 1] * 0.58662247 + n3[r + 2] * 0.11448223 - 255) * t * n3[r + 3] / 255;
8867
9227
  V(e, r, o2, o2, o2);
8868
9228
  }
8869
- function V(n2, r, t, e, o2) {
8870
- n2[r + 0] = t, n2[r + 1] = e, n2[r + 2] = o2, n2[r + 3] = 255;
9229
+ function V(n3, r, t, e, o2) {
9230
+ n3[r + 0] = t, n3[r + 1] = e, n3[r + 2] = o2, n3[r + 3] = 255;
8871
9231
  }
8872
9232
  var on = g;
8873
9233
 
8874
9234
  // src/commands/core.ts
8875
9235
  function parseRGB(colorStr) {
8876
- const parts = colorStr.split(",").map((s2) => parseInt(s2.trim(), 10));
8877
- if (parts.length !== 3 || parts.some((p) => Number.isNaN(p) || p < 0 || p > 255)) {
9236
+ const parts = colorStr.split(",").map((s) => parseInt(s.trim(), 10));
9237
+ if (parts.length !== 3 || parts.some((p2) => Number.isNaN(p2) || p2 < 0 || p2 > 255)) {
8878
9238
  throw new Error(
8879
9239
  `Invalid RGB color format: ${colorStr}. Expected format: r,g,b (e.g., 255,0,0)`
8880
9240
  );
@@ -8898,7 +9258,7 @@ Options:
8898
9258
  --diff-color-alt <r,g,b> Alternative color for dark differences (default: same as diff-color)
8899
9259
  --include-aa Include anti-aliasing detection
8900
9260
  --diff-mask Draw diff over transparent background
8901
- --transformer <name> Specify transformer to use (e.g. pngjs, sharp)
9261
+ --codec <name> Specify codec to use (pngjs, sharp, jsquash-png)
8902
9262
  -h, --help Show this help message
8903
9263
 
8904
9264
  Examples:
@@ -8907,16 +9267,20 @@ Examples:
8907
9267
  blazediff diff image1.png image2.png --threshold 0.2 --alpha 0.3
8908
9268
  `);
8909
9269
  }
8910
- var getTransformer = async (transformer) => {
8911
- if (!transformer || transformer === "pngjs") {
8912
- const { default: transformer2 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
8913
- return transformer2;
9270
+ var getCodec = async (codec) => {
9271
+ if (!codec || codec === "pngjs") {
9272
+ const { default: c3 } = await Promise.resolve().then(() => (init_dist(), dist_exports));
9273
+ return c3;
8914
9274
  }
8915
- if (transformer === "sharp") {
8916
- const { default: transformer2 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
8917
- return transformer2;
9275
+ if (codec === "sharp") {
9276
+ const { default: c3 } = await Promise.resolve().then(() => (init_dist2(), dist_exports2));
9277
+ return c3;
8918
9278
  }
8919
- throw new Error(`Unknown transformer: ${transformer}`);
9279
+ if (codec === "jsquash-png") {
9280
+ const { default: c3 } = await Promise.resolve().then(() => (init_dist3(), dist_exports3));
9281
+ return c3;
9282
+ }
9283
+ throw new Error(`Unknown codec: ${codec}`);
8920
9284
  };
8921
9285
  async function main() {
8922
9286
  try {
@@ -8933,15 +9297,15 @@ async function main() {
8933
9297
  const image1 = args[0];
8934
9298
  const image2 = args[1];
8935
9299
  const options = {};
8936
- for (let i2 = 2; i2 < args.length; i2++) {
8937
- const arg = args[i2];
8938
- const nextArg = args[i2 + 1];
9300
+ for (let i3 = 2; i3 < args.length; i3++) {
9301
+ const arg = args[i3];
9302
+ const nextArg = args[i3 + 1];
8939
9303
  switch (arg) {
8940
9304
  case "-o":
8941
9305
  case "--output":
8942
9306
  if (nextArg) {
8943
9307
  options.outputPath = nextArg;
8944
- i2++;
9308
+ i3++;
8945
9309
  }
8946
9310
  break;
8947
9311
  case "-t":
@@ -8954,7 +9318,7 @@ async function main() {
8954
9318
  );
8955
9319
  }
8956
9320
  options.threshold = threshold;
8957
- i2++;
9321
+ i3++;
8958
9322
  }
8959
9323
  break;
8960
9324
  case "-a":
@@ -8967,25 +9331,25 @@ async function main() {
8967
9331
  );
8968
9332
  }
8969
9333
  options.alpha = alpha;
8970
- i2++;
9334
+ i3++;
8971
9335
  }
8972
9336
  break;
8973
9337
  case "--aa-color":
8974
9338
  if (nextArg) {
8975
9339
  options.aaColor = parseRGB(nextArg);
8976
- i2++;
9340
+ i3++;
8977
9341
  }
8978
9342
  break;
8979
9343
  case "--diff-color":
8980
9344
  if (nextArg) {
8981
9345
  options.diffColor = parseRGB(nextArg);
8982
- i2++;
9346
+ i3++;
8983
9347
  }
8984
9348
  break;
8985
9349
  case "--diff-color-alt":
8986
9350
  if (nextArg) {
8987
9351
  options.diffColorAlt = parseRGB(nextArg);
8988
- i2++;
9352
+ i3++;
8989
9353
  }
8990
9354
  break;
8991
9355
  case "--include-aa":
@@ -8994,10 +9358,10 @@ async function main() {
8994
9358
  case "--diff-mask":
8995
9359
  options.diffMask = true;
8996
9360
  break;
8997
- case "--transformer":
9361
+ case "--codec":
8998
9362
  if (nextArg) {
8999
- options.transformer = nextArg;
9000
- i2++;
9363
+ options.codec = nextArg;
9364
+ i3++;
9001
9365
  }
9002
9366
  break;
9003
9367
  default:
@@ -9006,12 +9370,10 @@ async function main() {
9006
9370
  process.exit(1);
9007
9371
  }
9008
9372
  }
9009
- const transformer = await getTransformer(
9010
- options.transformer
9011
- );
9373
+ const codec = await getCodec(options.codec);
9012
9374
  const [img1, img2] = await Promise.all([
9013
- transformer.read(image1),
9014
- transformer.read(image2)
9375
+ codec.read(image1),
9376
+ codec.read(image2)
9015
9377
  ]);
9016
9378
  if (img1.width !== img2.width || img1.height !== img2.height) {
9017
9379
  throw new Error(
@@ -9042,7 +9404,7 @@ async function main() {
9042
9404
  );
9043
9405
  const duration = performance.now() - startTime;
9044
9406
  if (diffCount > 0 && options.outputPath && outputData) {
9045
- await transformer.write(
9407
+ await codec.write(
9046
9408
  {
9047
9409
  data: outputData,
9048
9410
  width: img1.width,