pdf-factory 0.4.2 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/parser.cjs +1 -1
  2. package/dist/parser.cjs.map +1 -1
  3. package/dist/parser.js +89 -83
  4. package/dist/parser.js.map +1 -1
  5. package/dist/pdf-factory.cjs +4 -4
  6. package/dist/pdf-factory.cjs.map +1 -1
  7. package/dist/pdf-factory.js +2872 -2371
  8. package/dist/pdf-factory.js.map +1 -1
  9. package/dist/src/composition/composeOrderOfPlayOptions.d.ts +4 -0
  10. package/dist/src/composition/composeOrderOfPlayOptions.d.ts.map +1 -0
  11. package/dist/src/composition/editorTypes.d.ts +29 -21
  12. package/dist/src/composition/editorTypes.d.ts.map +1 -1
  13. package/dist/src/composition/printDispatcher.d.ts +4 -20
  14. package/dist/src/composition/printDispatcher.d.ts.map +1 -1
  15. package/dist/src/composition/printModalTypes.d.ts +6 -6
  16. package/dist/src/composition/printModalTypes.d.ts.map +1 -1
  17. package/dist/src/composition/resolveCompositionConfig.d.ts +44 -0
  18. package/dist/src/composition/resolveCompositionConfig.d.ts.map +1 -0
  19. package/dist/src/config/formatPresets.d.ts.map +1 -1
  20. package/dist/src/config/types.d.ts +2 -2
  21. package/dist/src/config/types.d.ts.map +1 -1
  22. package/dist/src/core/extractParticipantData.d.ts.map +1 -1
  23. package/dist/src/generators/{scheduleV2.d.ts → orderOfPlay.d.ts} +3 -3
  24. package/dist/src/generators/orderOfPlay.d.ts.map +1 -0
  25. package/dist/src/generators/report.d.ts.map +1 -1
  26. package/dist/src/index.d.ts +4 -2
  27. package/dist/src/index.d.ts.map +1 -1
  28. package/dist/src/renderers/formatEntry.d.ts.map +1 -1
  29. package/package.json +7 -7
  30. package/dist/src/generators/scheduleV2.d.ts.map +0 -1
package/dist/parser.js CHANGED
@@ -117873,7 +117873,7 @@ async function ud(e, t = {}) {
117873
117873
  };
117874
117874
  }
117875
117875
  //#endregion
117876
- //#region node_modules/.pnpm/pixelmatch@7.1.0/node_modules/pixelmatch/index.js
117876
+ //#region node_modules/.pnpm/pixelmatch@7.2.0/node_modules/pixelmatch/index.js
117877
117877
  function dd(e, t, n, r, i, a = {}) {
117878
117878
  let { threshold: o = .1, alpha: s = .1, aaColor: c = [
117879
117879
  255,
@@ -117883,42 +117883,42 @@ function dd(e, t, n, r, i, a = {}) {
117883
117883
  255,
117884
117884
  0,
117885
117885
  0
117886
- ], includeAA: u, diffColorAlt: d, diffMask: f } = a;
117886
+ ], checkerboard: u = !0, includeAA: d, diffColorAlt: f, diffMask: p } = a;
117887
117887
  if (!fd(e) || !fd(t) || n && !fd(n)) throw Error("Image data: Uint8Array, Uint8ClampedArray or Buffer expected.");
117888
- if (e.length !== t.length || n && n.length !== e.length) throw Error("Image sizes do not match.");
117889
- if (e.length !== r * i * 4) throw Error("Image data size does not match width/height.");
117890
- let p = r * i, m = new Uint32Array(e.buffer, e.byteOffset, p), h = new Uint32Array(t.buffer, t.byteOffset, p), g = !0;
117891
- for (let e = 0; e < p; e++) if (m[e] !== h[e]) {
117892
- g = !1;
117888
+ if (e.length !== t.length || n && n.length !== e.length) throw Error(`Image sizes do not match. Image 1 size: ${e.length}, image 2 size: ${t.length}`);
117889
+ if (e.length !== r * i * 4) throw Error(`Image data size does not match width/height. Expecting ${r * i * 4}. Got ${e.length}`);
117890
+ let m = r * i, h = new Uint32Array(e.buffer, e.byteOffset, m), g = new Uint32Array(t.buffer, t.byteOffset, m), _ = !0;
117891
+ for (let e = 0; e < m; e++) if (h[e] !== g[e]) {
117892
+ _ = !1;
117893
117893
  break;
117894
117894
  }
117895
- if (g) {
117896
- if (n && !f) for (let t = 0; t < p; t++) _d(e, 4 * t, s, n);
117895
+ if (_) {
117896
+ if (n && !p) for (let t = 0, r = 0; t < m; t++, r += 4) vd(e, r, s, n);
117897
117897
  return 0;
117898
117898
  }
117899
- let _ = 35215 * o * o, [v, y, b] = c, [x, S, C] = l, [w, T, E] = d || l, D = 0;
117900
- for (let a = 0; a < i; a++) for (let o = 0; o < r; o++) {
117901
- let c = a * r + o, l = c * 4, d = m[c] === h[c] ? 0 : hd(e, t, l, l, !1);
117902
- if (Math.abs(d) > _) {
117903
- let s = pd(e, o, a, r, i, m, h) || pd(t, o, a, r, i, h, m);
117904
- !u && s ? n && !f && gd(n, l, v, y, b) : (n && (d < 0 ? gd(n, l, w, T, E) : gd(n, l, x, S, C)), D++);
117905
- } else n && !f && _d(e, l, s, n);
117899
+ let v = 35215 * o * o, [y, b, x] = c, [S, C, w] = l, [T, E, D] = f || l, O = 0;
117900
+ for (let a = 0, o = 0; a < m; a++, o += 4) {
117901
+ let c = h[a] === g[a] ? 0 : hd(e, t, o, o, u);
117902
+ if (Math.abs(c) > v) {
117903
+ let s = a % r, l = a / r | 0;
117904
+ !d && (pd(e, s, l, r, i, h, g, u) || pd(t, s, l, r, i, g, h, u)) ? n && !p && _d(n, o, y, b, x) : (n && (c < 0 ? _d(n, o, T, E, D) : _d(n, o, S, C, w)), O++);
117905
+ } else n && !p && vd(e, o, s, n);
117906
117906
  }
117907
- return D;
117907
+ return O;
117908
117908
  }
117909
117909
  function fd(e) {
117910
117910
  return ArrayBuffer.isView(e) && e.BYTES_PER_ELEMENT === 1;
117911
117911
  }
117912
- function pd(e, t, n, r, i, a, o) {
117913
- let s = Math.max(t - 1, 0), c = Math.max(n - 1, 0), l = Math.min(t + 1, r - 1), u = Math.min(n + 1, i - 1), d = n * r + t, f = +(t === s || t === l || n === c || n === u), p = 0, m = 0, h = 0, g = 0, _ = 0, v = 0;
117914
- for (let i = s; i <= l; i++) for (let a = c; a <= u; a++) {
117912
+ function pd(e, t, n, r, i, a, o, s) {
117913
+ let c = Math.max(t - 1, 0), l = Math.max(n - 1, 0), u = Math.min(t + 1, r - 1), d = Math.min(n + 1, i - 1), f = (n * r + t) * 4, p = e[f], m = e[f + 1], h = e[f + 2], g = e[f + 3], _ = +(t === c || t === u || n === l || n === d), v = 0, y = 0, b = 0, x = 0, S = 0, C = 0;
117914
+ for (let i = c; i <= u; i++) for (let a = l; a <= d; a++) {
117915
117915
  if (i === t && a === n) continue;
117916
- let o = hd(e, e, d * 4, (a * r + i) * 4, !0);
117916
+ let o = gd(e, f, (a * r + i) * 4, p, m, h, g, s);
117917
117917
  if (o === 0) {
117918
- if (f++, f > 2) return !1;
117919
- } else o < p ? (p = o, h = i, g = a) : o > m && (m = o, _ = i, v = a);
117918
+ if (_++, _ > 2) return !1;
117919
+ } else o < v ? (v = o, b = i, x = a) : o > y && (y = o, S = i, C = a);
117920
117920
  }
117921
- return p === 0 || m === 0 ? !1 : md(a, h, g, r, i) && md(o, h, g, r, i) || md(a, _, v, r, i) && md(o, _, v, r, i);
117921
+ return v === 0 || y === 0 ? !1 : md(a, b, x, r, i) && md(o, b, x, r, i) || md(a, S, C, r, i) && md(o, S, C, r, i);
117922
117922
  }
117923
117923
  function md(e, t, n, r, i) {
117924
117924
  let a = Math.max(t - 1, 0), o = Math.max(n - 1, 0), s = Math.min(t + 1, r - 1), c = Math.min(n + 1, i - 1), l = e[n * r + t], u = +(t === a || t === s || n === o || n === c);
@@ -117927,26 +117927,32 @@ function md(e, t, n, r, i) {
117927
117927
  }
117928
117928
  function hd(e, t, n, r, i) {
117929
117929
  let a = e[n], o = e[n + 1], s = e[n + 2], c = e[n + 3], l = t[r], u = t[r + 1], d = t[r + 2], f = t[r + 3], p = a - l, m = o - u, h = s - d, g = c - f;
117930
- if (!p && !m && !h && !g) return 0;
117931
117930
  if (c < 255 || f < 255) {
117932
- let e = 48 + n % 2 * 159, t = 48 + 159 * ((n / 1.618033988749895 | 0) % 2), r = 48 + 159 * ((n / 2.618033988749895 | 0) % 2);
117933
- p = (a * c - l * f - e * g) / 255, m = (o * c - u * f - t * g) / 255, h = (s * c - d * f - r * g) / 255;
117931
+ let e = 255, t = 255, r = 255;
117932
+ i && (e = 48 + n % 2 * 159, t = 48 + 159 * ((n / 1.618033988749895 | 0) % 2), r = 48 + 159 * ((n / 2.618033988749895 | 0) % 2)), p = (a * c - l * f - e * g) / 255, m = (o * c - u * f - t * g) / 255, h = (s * c - d * f - r * g) / 255;
117934
117933
  }
117935
- let _ = p * .29889531 + m * .58662247 + h * .11448223;
117936
- if (i) return _;
117937
- let v = p * .59597799 - m * .2741761 - h * .32180189, y = p * .21147017 - m * .52261711 + h * .31114694, b = .5053 * _ * _ + .299 * v * v + .1957 * y * y;
117934
+ let _ = p * .29889531 + m * .58662247 + h * .11448223, v = p * .59597799 - m * .2741761 - h * .32180189, y = p * .21147017 - m * .52261711 + h * .31114694, b = .5053 * _ * _ + .299 * v * v + .1957 * y * y;
117938
117935
  return _ > 0 ? -b : b;
117939
117936
  }
117940
- function gd(e, t, n, r, i) {
117941
- e[t + 0] = n, e[t + 1] = r, e[t + 2] = i, e[t + 3] = 255;
117937
+ function gd(e, t, n, r, i, a, o, s) {
117938
+ let c = e[n], l = e[n + 1], u = e[n + 2], d = e[n + 3], f = r - c, p = i - l, m = a - u, h = o - d;
117939
+ if (!f && !p && !m && !h) return 0;
117940
+ if (o < 255 || d < 255) {
117941
+ let e = 255, n = 255, g = 255;
117942
+ s && (e = 48 + t % 2 * 159, n = 48 + 159 * ((t / 1.618033988749895 | 0) % 2), g = 48 + 159 * ((t / 2.618033988749895 | 0) % 2)), f = (r * o - c * d - e * h) / 255, p = (i * o - l * d - n * h) / 255, m = (a * o - u * d - g * h) / 255;
117943
+ }
117944
+ return f * .29889531 + p * .58662247 + m * .11448223;
117942
117945
  }
117943
- function _d(e, t, n, r) {
117946
+ function _d(e, t, n, r, i) {
117947
+ e[t] = n, e[t + 1] = r, e[t + 2] = i, e[t + 3] = 255;
117948
+ }
117949
+ function vd(e, t, n, r) {
117944
117950
  let i = 255 + (e[t] * .29889531 + e[t + 1] * .58662247 + e[t + 2] * .11448223 - 255) * n * e[t + 3] / 255;
117945
- gd(r, t, i, i, i);
117951
+ _d(r, t, i, i, i);
117946
117952
  }
117947
117953
  //#endregion
117948
117954
  //#region node_modules/.pnpm/pngjs@7.0.0/node_modules/pngjs/lib/chunkstream.js
117949
- var vd = /* @__PURE__ */ o(((e, t) => {
117955
+ var yd = /* @__PURE__ */ o(((e, t) => {
117950
117956
  var n = l(), r = l(), i = t.exports = function() {
117951
117957
  r.call(this), this._buffers = [], this._buffered = 0, this._reads = [], this._paused = !1, this._encoding = "utf8", this.writable = !0;
117952
117958
  };
@@ -117993,7 +117999,7 @@ var vd = /* @__PURE__ */ o(((e, t) => {
117993
117999
  this.emit("error", e);
117994
118000
  }
117995
118001
  };
117996
- })), yd = /* @__PURE__ */ o(((e) => {
118002
+ })), bd = /* @__PURE__ */ o(((e) => {
117997
118003
  var t = [
117998
118004
  {
117999
118005
  x: [0],
@@ -118072,13 +118078,13 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118072
118078
  return o * 4 + c * e * 4;
118073
118079
  };
118074
118080
  };
118075
- })), bd = /* @__PURE__ */ o(((e, t) => {
118081
+ })), xd = /* @__PURE__ */ o(((e, t) => {
118076
118082
  t.exports = function(e, t, n) {
118077
118083
  let r = e + t - n, i = Math.abs(r - e), a = Math.abs(r - t), o = Math.abs(r - n);
118078
118084
  return i <= a && i <= o ? e : a <= o ? t : n;
118079
118085
  };
118080
- })), xd = /* @__PURE__ */ o(((e, t) => {
118081
- var n = yd(), r = bd();
118086
+ })), Sd = /* @__PURE__ */ o(((e, t) => {
118087
+ var n = bd(), r = xd();
118082
118088
  function i(e, t, n) {
118083
118089
  let r = e * t;
118084
118090
  return n !== 8 && (r = Math.ceil(r / (8 / n))), r;
@@ -118139,8 +118145,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118139
118145
  }
118140
118146
  this.write(n), r.lineIndex++, r.lineIndex >= r.height ? (this._lastLine = null, this._imageIndex++, r = this._images[this._imageIndex]) : this._lastLine = n, r ? this.read(r.byteWidth + 1, this._reverseFilterLine.bind(this)) : (this._lastLine = null, this.complete());
118141
118147
  };
118142
- })), Sd = /* @__PURE__ */ o(((e, t) => {
118143
- var n = l(), r = vd(), i = xd(), a = t.exports = function(e) {
118148
+ })), Cd = /* @__PURE__ */ o(((e, t) => {
118149
+ var n = l(), r = yd(), i = Sd(), a = t.exports = function(e) {
118144
118150
  r.call(this);
118145
118151
  let t = [], n = this;
118146
118152
  this._filter = new i(e, {
@@ -118154,7 +118160,7 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118154
118160
  }), this._filter.start();
118155
118161
  };
118156
118162
  n.inherits(a, r);
118157
- })), Cd = /* @__PURE__ */ o(((e, t) => {
118163
+ })), wd = /* @__PURE__ */ o(((e, t) => {
118158
118164
  t.exports = {
118159
118165
  PNG_SIGNATURE: [
118160
118166
  137,
@@ -118187,7 +118193,7 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118187
118193
  },
118188
118194
  GAMMA_DIVISION: 1e5
118189
118195
  };
118190
- })), wd = /* @__PURE__ */ o(((e, t) => {
118196
+ })), Td = /* @__PURE__ */ o(((e, t) => {
118191
118197
  var n = [];
118192
118198
  (function() {
118193
118199
  for (let e = 0; e < 256; e++) {
@@ -118209,8 +118215,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118209
118215
  for (let r = 0; r < e.length; r++) t = n[(t ^ e[r]) & 255] ^ t >>> 8;
118210
118216
  return t ^ -1;
118211
118217
  };
118212
- })), Td = /* @__PURE__ */ o(((e, t) => {
118213
- var n = Cd(), r = wd(), i = t.exports = function(e, t) {
118218
+ })), Ed = /* @__PURE__ */ o(((e, t) => {
118219
+ var n = wd(), r = Td(), i = t.exports = function(e, t) {
118214
118220
  this._options = e, e.checkCRC = e.checkCRC !== !1, this._hasIHDR = !1, this._hasIEND = !1, this._emittedHeadersFinished = !1, this._palette = [], this._colorType = 0, this._chunks = {}, this._chunks[n.TYPE_IHDR] = this._handleIHDR.bind(this), this._chunks[n.TYPE_IEND] = this._handleIEND.bind(this), this._chunks[n.TYPE_IDAT] = this._handleIDAT.bind(this), this._chunks[n.TYPE_PLTE] = this._handlePLTE.bind(this), this._chunks[n.TYPE_tRNS] = this._handleTRNS.bind(this), this._chunks[n.TYPE_gAMA] = this._handleGAMA.bind(this), this.read = t.read, this.error = t.error, this.metadata = t.metadata, this.gamma = t.gamma, this.transColor = t.transColor, this.palette = t.palette, this.parsed = t.parsed, this.inflateData = t.inflateData, this.finished = t.finished, this.simpleTransparency = t.simpleTransparency, this.headersFinished = t.headersFinished || function() {};
118215
118221
  };
118216
118222
  i.prototype.start = function() {
@@ -118333,8 +118339,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118333
118339
  }, i.prototype._parseIEND = function(e) {
118334
118340
  this._crc.write(e), this._hasIEND = !0, this._handleChunkEnd(), this.finished && this.finished();
118335
118341
  };
118336
- })), Ed = /* @__PURE__ */ o(((e) => {
118337
- var t = yd(), n = [
118342
+ })), Dd = /* @__PURE__ */ o(((e) => {
118343
+ var t = bd(), n = [
118338
118344
  function() {},
118339
118345
  function(e, t, n, r) {
118340
118346
  if (r === t.length) throw Error("Ran out of data");
@@ -118449,7 +118455,7 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118449
118455
  } else d.end();
118450
118456
  return f;
118451
118457
  };
118452
- })), Dd = /* @__PURE__ */ o(((e, t) => {
118458
+ })), Od = /* @__PURE__ */ o(((e, t) => {
118453
118459
  function n(e, t, n, r, i) {
118454
118460
  let a = 0;
118455
118461
  for (let o = 0; o < r; o++) for (let r = 0; r < n; r++) {
@@ -118478,8 +118484,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118478
118484
  let o = t.depth, s = t.width, c = t.height, l = t.colorType, u = t.transColor, d = t.palette, f = e;
118479
118485
  return l === 3 ? n(e, f, s, c, d) : (u && r(e, f, s, c, u), o !== 8 && !a && (o === 16 && (f = Buffer.alloc(s * c * 4)), i(e, f, s, c, o))), f;
118480
118486
  };
118481
- })), Od = /* @__PURE__ */ o(((e, t) => {
118482
- var n = l(), r = l(), i = vd(), a = Sd(), o = Td(), s = Ed(), c = Dd(), u = t.exports = function(e) {
118487
+ })), kd = /* @__PURE__ */ o(((e, t) => {
118488
+ var n = l(), r = l(), i = yd(), a = Cd(), o = Ed(), s = Dd(), c = Od(), u = t.exports = function(e) {
118483
118489
  i.call(this), this._parser = new o(e, {
118484
118490
  read: this.read.bind(this),
118485
118491
  error: this._handleError.bind(this),
@@ -118534,8 +118540,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118534
118540
  }
118535
118541
  this.emit("parsed", t);
118536
118542
  };
118537
- })), kd = /* @__PURE__ */ o(((e, t) => {
118538
- var n = Cd();
118543
+ })), Ad = /* @__PURE__ */ o(((e, t) => {
118544
+ var n = wd();
118539
118545
  t.exports = function(e, t, r, i) {
118540
118546
  let a = [n.COLORTYPE_COLOR_ALPHA, n.COLORTYPE_ALPHA].indexOf(i.colorType) !== -1;
118541
118547
  if (i.colorType === i.inputColorType) {
@@ -118594,8 +118600,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118594
118600
  }
118595
118601
  return u;
118596
118602
  };
118597
- })), Ad = /* @__PURE__ */ o(((e, t) => {
118598
- var n = bd();
118603
+ })), jd = /* @__PURE__ */ o(((e, t) => {
118604
+ var n = xd();
118599
118605
  function r(e, t, n, r, i) {
118600
118606
  for (let a = 0; a < n; a++) r[i + a] = e[t + a];
118601
118607
  }
@@ -118698,8 +118704,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118698
118704
  }
118699
118705
  return l;
118700
118706
  };
118701
- })), jd = /* @__PURE__ */ o(((e, t) => {
118702
- var n = Cd(), r = wd(), i = kd(), a = Ad(), o = l(), s = t.exports = function(e) {
118707
+ })), Md = /* @__PURE__ */ o(((e, t) => {
118708
+ var n = wd(), r = Td(), i = Ad(), a = jd(), o = l(), s = t.exports = function(e) {
118703
118709
  if (this._options = e, e.deflateChunkSize = e.deflateChunkSize || 32 * 1024, e.deflateLevel = e.deflateLevel == null ? 9 : e.deflateLevel, e.deflateStrategy = e.deflateStrategy == null ? 3 : e.deflateStrategy, e.inputHasAlpha = e.inputHasAlpha == null ? !0 : e.inputHasAlpha, e.deflateFactory = e.deflateFactory || o.createDeflate, e.bitDepth = e.bitDepth || 8, e.colorType = typeof e.colorType == "number" ? e.colorType : n.COLORTYPE_COLOR_ALPHA, e.inputColorType = typeof e.inputColorType == "number" ? e.inputColorType : n.COLORTYPE_COLOR_ALPHA, [
118704
118710
  n.COLORTYPE_GRAYSCALE,
118705
118711
  n.COLORTYPE_COLOR,
@@ -118739,8 +118745,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118739
118745
  }, s.prototype.packIEND = function() {
118740
118746
  return this._packChunk(n.TYPE_IEND, null);
118741
118747
  };
118742
- })), Md = /* @__PURE__ */ o(((e, t) => {
118743
- var n = l(), r = l(), i = Cd(), a = jd(), o = t.exports = function(e) {
118748
+ })), Nd = /* @__PURE__ */ o(((e, t) => {
118749
+ var n = l(), r = l(), i = wd(), a = Md(), o = t.exports = function(e) {
118744
118750
  r.call(this);
118745
118751
  let t = e || {};
118746
118752
  this._packer = new a(t), this._deflate = this._packer.createDeflate(), this.readable = !0;
@@ -118754,7 +118760,7 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118754
118760
  this.emit("data", this._packer.packIEND()), this.emit("end");
118755
118761
  }.bind(this)), this._deflate.end(a);
118756
118762
  };
118757
- })), Nd = /* @__PURE__ */ o(((e, t) => {
118763
+ })), Pd = /* @__PURE__ */ o(((e, t) => {
118758
118764
  var n = l().ok, r = l(), i = l(), a = l().kMaxLength;
118759
118765
  function o(e) {
118760
118766
  if (!(this instanceof o)) return new o(e);
@@ -118800,7 +118806,7 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118800
118806
  return u(new o(t), e);
118801
118807
  }
118802
118808
  t.exports = e = d, e.Inflate = o, e.createInflate = s, e.inflateSync = d;
118803
- })), Pd = /* @__PURE__ */ o(((e, t) => {
118809
+ })), Fd = /* @__PURE__ */ o(((e, t) => {
118804
118810
  var n = t.exports = function(e) {
118805
118811
  this._buffer = e, this._reads = [];
118806
118812
  };
@@ -118822,8 +118828,8 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118822
118828
  if (this._reads.length > 0) throw Error("There are some read requests waitng on finished stream");
118823
118829
  if (this._buffer.length > 0) throw Error("unrecognised content at end of stream");
118824
118830
  };
118825
- })), Fd = /* @__PURE__ */ o(((e) => {
118826
- var t = Pd(), n = xd();
118831
+ })), Id = /* @__PURE__ */ o(((e) => {
118832
+ var t = Fd(), n = Sd();
118827
118833
  e.process = function(e, r) {
118828
118834
  let i = [], a = new t(e);
118829
118835
  return new n(r, {
@@ -118834,10 +118840,10 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118834
118840
  complete: function() {}
118835
118841
  }).start(), a.process(), Buffer.concat(i);
118836
118842
  };
118837
- })), Id = /* @__PURE__ */ o(((e, t) => {
118838
- var n = !0, r = l(), i = Nd();
118843
+ })), Ld = /* @__PURE__ */ o(((e, t) => {
118844
+ var n = !0, r = l(), i = Pd();
118839
118845
  r.deflateSync || (n = !1);
118840
- var a = Pd(), o = Fd(), s = Td(), c = Ed(), u = Dd();
118846
+ var a = Fd(), o = Id(), s = Ed(), c = Dd(), u = Od();
118841
118847
  t.exports = function(e, t) {
118842
118848
  if (!n) throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
118843
118849
  let l;
@@ -118895,10 +118901,10 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118895
118901
  let E = u(T, f, t.skipRescale);
118896
118902
  return f.data = E, f.gamma = _ || 0, f;
118897
118903
  };
118898
- })), Ld = /* @__PURE__ */ o(((e, t) => {
118904
+ })), Rd = /* @__PURE__ */ o(((e, t) => {
118899
118905
  var n = !0, r = l();
118900
118906
  r.deflateSync || (n = !1);
118901
- var i = Cd(), a = jd();
118907
+ var i = wd(), a = Md();
118902
118908
  t.exports = function(e, t) {
118903
118909
  if (!n) throw Error("To use the sync capability of this library in old node versions, please pin pngjs to v2.3.0");
118904
118910
  let o = new a(t || {}), s = [];
@@ -118907,15 +118913,15 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118907
118913
  if (c = null, !l || !l.length) throw Error("bad png - invalid compressed data response");
118908
118914
  return s.push(o.packIDAT(l)), s.push(o.packIEND()), Buffer.concat(s);
118909
118915
  };
118910
- })), Rd = /* @__PURE__ */ o(((e) => {
118911
- var t = Id(), n = Ld();
118916
+ })), zd = /* @__PURE__ */ o(((e) => {
118917
+ var t = Ld(), n = Rd();
118912
118918
  e.read = function(e, n) {
118913
118919
  return t(e, n || {});
118914
118920
  }, e.write = function(e, t) {
118915
118921
  return n(e, t);
118916
118922
  };
118917
- })), zd = (/* @__PURE__ */ o(((e) => {
118918
- var t = l(), n = l(), r = Od(), i = Md(), a = Rd(), o = e.PNG = function(e) {
118923
+ })), Bd = (/* @__PURE__ */ o(((e) => {
118924
+ var t = l(), n = l(), r = kd(), i = Nd(), a = zd(), o = e.PNG = function(e) {
118919
118925
  n.call(this), e ||= {}, this.width = e.width | 0, this.height = e.height | 0, this.data = this.width > 0 && this.height > 0 ? Buffer.alloc(4 * this.width * this.height) : null, e.fill && this.data && this.data.fill(0), this.gamma = 0, this.readable = this.writable = !0, this._parser = new r(e), this._parser.on("error", this.emit.bind(this, "error")), this._parser.on("close", this._handleClose.bind(this)), this._parser.on("metadata", this._metadata.bind(this)), this._parser.on("gamma", this._gamma.bind(this)), this._parser.on("parsed", function(e) {
118920
118926
  this.data = e, this.emit("parsed", e);
118921
118927
  }.bind(this)), this._packer = new i(e), this._packer.on("data", this.emit.bind(this, "data")), this._packer.on("end", this.emit.bind(this, "end")), this._parser.on("close", this._handleClose.bind(this)), this._packer.on("error", this.emit.bind(this, "error"));
@@ -118965,15 +118971,15 @@ var vd = /* @__PURE__ */ o(((e, t) => {
118965
118971
  o.adjustGamma(this);
118966
118972
  };
118967
118973
  })))();
118968
- async function Bd(e, t = 2) {
118974
+ async function Vd(e, t = 2) {
118969
118975
  let n = [], r = await ud(e, { scale: t });
118970
118976
  for await (let e of r) n.push(e);
118971
118977
  return n;
118972
118978
  }
118973
- async function Vd(e, t) {
118979
+ async function Hd(e, t) {
118974
118980
  let { scale: n = 2, threshold: r = .1, snapshotsDir: i, snapshotName: a, updateSnapshots: o = !1 } = t;
118975
118981
  (0, u.mkdirSync)(i, { recursive: !0 });
118976
- let s = await Bd(e, n), c = [];
118982
+ let s = await Vd(e, n), c = [];
118977
118983
  for (let e = 0; e < s.length; e++) {
118978
118984
  let t = e + 1, n = (0, u.resolve)(i, `${a}-page${t}.png`), l = (0, u.resolve)(i, `${a}-page${t}-diff.png`);
118979
118985
  if (!(0, u.existsSync)(n) || o) {
@@ -118986,7 +118992,7 @@ async function Vd(e, t) {
118986
118992
  });
118987
118993
  continue;
118988
118994
  }
118989
- let d = zd.PNG.sync.read(s[e]), f = zd.PNG.sync.read((0, u.readFileSync)(n));
118995
+ let d = Bd.PNG.sync.read(s[e]), f = Bd.PNG.sync.read((0, u.readFileSync)(n));
118990
118996
  if (d.width !== f.width || d.height !== f.height) {
118991
118997
  (0, u.writeFileSync)((0, u.resolve)(i, `${a}-page${t}-actual.png`), s[e]), c.push({
118992
118998
  page: t,
@@ -118997,11 +119003,11 @@ async function Vd(e, t) {
118997
119003
  });
118998
119004
  continue;
118999
119005
  }
119000
- let p = new zd.PNG({
119006
+ let p = new Bd.PNG({
119001
119007
  width: d.width,
119002
119008
  height: d.height
119003
119009
  }), m = dd(d.data, f.data, p.data, d.width, d.height, { threshold: r }), h = d.width * d.height, g = m / h * 100;
119004
- m > 0 && (0, u.writeFileSync)(l, zd.PNG.sync.write(p)), c.push({
119010
+ m > 0 && (0, u.writeFileSync)(l, Bd.PNG.sync.write(p)), c.push({
119005
119011
  page: t,
119006
119012
  mismatchedPixels: m,
119007
119013
  totalPixels: h,
@@ -119012,9 +119018,9 @@ async function Vd(e, t) {
119012
119018
  }
119013
119019
  return c;
119014
119020
  }
119015
- async function Hd(e, t, n, r = "a", i = "b", a = 2, o = .1) {
119021
+ async function Ud(e, t, n, r = "a", i = "b", a = 2, o = .1) {
119016
119022
  (0, u.mkdirSync)(n, { recursive: !0 });
119017
- let s = await Bd(e, a), c = await Bd(t, a), l = Math.max(s.length, c.length), d = [];
119023
+ let s = await Vd(e, a), c = await Vd(t, a), l = Math.max(s.length, c.length), d = [];
119018
119024
  for (let e = 0; e < l; e++) {
119019
119025
  let t = e + 1;
119020
119026
  if (!s[e] || !c[e]) {
@@ -119028,7 +119034,7 @@ async function Hd(e, t, n, r = "a", i = "b", a = 2, o = .1) {
119028
119034
  continue;
119029
119035
  }
119030
119036
  (0, u.writeFileSync)((0, u.resolve)(n, `${r}-page${t}.png`), s[e]), (0, u.writeFileSync)((0, u.resolve)(n, `${i}-page${t}.png`), c[e]);
119031
- let a = zd.PNG.sync.read(s[e]), l = zd.PNG.sync.read(c[e]), f = Math.min(a.width, l.width), p = Math.min(a.height, l.height);
119037
+ let a = Bd.PNG.sync.read(s[e]), l = Bd.PNG.sync.read(c[e]), f = Math.min(a.width, l.width), p = Math.min(a.height, l.height);
119032
119038
  if (a.width !== l.width || a.height !== l.height) {
119033
119039
  d.push({
119034
119040
  page: t,
@@ -119039,11 +119045,11 @@ async function Hd(e, t, n, r = "a", i = "b", a = 2, o = .1) {
119039
119045
  });
119040
119046
  continue;
119041
119047
  }
119042
- let m = new zd.PNG({
119048
+ let m = new Bd.PNG({
119043
119049
  width: f,
119044
119050
  height: p
119045
119051
  }), h = dd(a.data, l.data, m.data, f, p, { threshold: o }), g = f * p;
119046
- (0, u.writeFileSync)((0, u.resolve)(n, `diff-page${t}.png`), zd.PNG.sync.write(m)), d.push({
119052
+ (0, u.writeFileSync)((0, u.resolve)(n, `diff-page${t}.png`), Bd.PNG.sync.write(m)), d.push({
119047
119053
  page: t,
119048
119054
  mismatchedPixels: h,
119049
119055
  totalPixels: g,
@@ -119055,6 +119061,6 @@ async function Hd(e, t, n, r = "a", i = "b", a = 2, o = .1) {
119055
119061
  return d;
119056
119062
  }
119057
119063
  //#endregion
119058
- export { Qi as classifyText, ia as cleanMergedText, ji as clusterCoordinates, Vd as comparePdfToSnapshot, Hd as comparetwoPdfs, Pi as detectRegions, aa as extractDrawFromPage, fa as extractDrawMerged, ea as extractPlayerName, ta as extractSeedValue, Ni as findClusterIndex, na as mergeTextItems, ki as parsePdfBuffer, Bd as pdfToImages };
119064
+ export { Qi as classifyText, ia as cleanMergedText, ji as clusterCoordinates, Hd as comparePdfToSnapshot, Ud as comparetwoPdfs, Pi as detectRegions, aa as extractDrawFromPage, fa as extractDrawMerged, ea as extractPlayerName, ta as extractSeedValue, Ni as findClusterIndex, na as mergeTextItems, ki as parsePdfBuffer, Vd as pdfToImages };
119059
119065
 
119060
119066
  //# sourceMappingURL=parser.js.map