pdf-factory 0.8.11 → 0.8.13
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.
- package/README.md +2 -1
- package/dist/parser.cjs +11 -11
- package/dist/parser.cjs.map +1 -1
- package/dist/parser.js +372 -380
- package/dist/parser.js.map +1 -1
- package/dist/pdf-factory.cjs +3 -3
- package/dist/pdf-factory.cjs.map +1 -1
- package/dist/pdf-factory.js +51 -51
- package/dist/pdf-factory.js.map +1 -1
- package/dist/{rolldown-runtime-C6qsp3rV.cjs → rolldown-runtime-CYJQrBu7.cjs} +1 -1
- package/package.json +10 -6
package/dist/parser.js
CHANGED
|
@@ -5,10 +5,10 @@ var e = Object.create, t = Object.defineProperty, n = Object.getOwnPropertyDescr
|
|
|
5
5
|
enumerable: !(s = n(i, d)) || s.enumerable
|
|
6
6
|
});
|
|
7
7
|
return e;
|
|
8
|
-
}, c = (n, r,
|
|
8
|
+
}, c = (n, r, o) => (o = n == null ? {} : e(i(n)), s(r || !n || !n.__esModule || !a.call(n, "default") ? t(o, "default", {
|
|
9
9
|
value: n,
|
|
10
10
|
enumerable: !0
|
|
11
|
-
}) :
|
|
11
|
+
}) : o, n)), l = /* @__PURE__ */ o(((e, t) => {
|
|
12
12
|
t.exports = {};
|
|
13
13
|
})), u = /* @__PURE__ */ c(l(), 1), d = class e {
|
|
14
14
|
constructor(e) {
|
|
@@ -3127,7 +3127,7 @@ var ut = function() {
|
|
|
3127
3127
|
var t = e.dict, n = this.data = {};
|
|
3128
3128
|
n.subtype = t.get("Subtype").name, n.annotationFlags = t.get("F"), this.getAndSetRectangle(t), n.rect = this.rectangle;
|
|
3129
3129
|
var r = t.get("C");
|
|
3130
|
-
if (G(r) && r.length === 3 ?
|
|
3130
|
+
if (n.color = G(r) && r.length === 3 ? r : [
|
|
3131
3131
|
0,
|
|
3132
3132
|
0,
|
|
3133
3133
|
0
|
|
@@ -3154,7 +3154,7 @@ var ut = function() {
|
|
|
3154
3154
|
}
|
|
3155
3155
|
return e.prototype = {
|
|
3156
3156
|
setRectangle: function(e) {
|
|
3157
|
-
G(e) && e.length === 4 ?
|
|
3157
|
+
this.rectangle = G(e) && e.length === 4 ? U.normalizeRect(e) : [
|
|
3158
3158
|
0,
|
|
3159
3159
|
0,
|
|
3160
3160
|
0,
|
|
@@ -3714,7 +3714,7 @@ var bt, xt, St, Ct = function() {
|
|
|
3714
3714
|
},
|
|
3715
3715
|
getAsync: function(e, t, n) {
|
|
3716
3716
|
var r, i, a = this.xref;
|
|
3717
|
-
return a ? a.fetchIfRefAsync(r) : ((i = new K()).resolve(r), i);
|
|
3717
|
+
return typeof (r = this.map[e]) !== void 0 || e in this.map || typeof (r = this.map[t]) !== void 0 || t in this.map || (r = this.map[n] || null), a ? a.fetchIfRefAsync(r) : ((i = new K()).resolve(r), i);
|
|
3718
3718
|
},
|
|
3719
3719
|
getRaw: function(e) {
|
|
3720
3720
|
return this.map[e];
|
|
@@ -4089,23 +4089,24 @@ var bt, xt, St, Ct = function() {
|
|
|
4089
4089
|
o.pos = 0;
|
|
4090
4090
|
for (var s, c = o.getBytes(), l = o.start, u = c.length, d = [], f = []; l < u;) {
|
|
4091
4091
|
var p = c[l];
|
|
4092
|
-
if (p !== 32 && p !== 9 && p !== 13 && p !== 10)
|
|
4093
|
-
|
|
4094
|
-
|
|
4095
|
-
|
|
4096
|
-
|
|
4097
|
-
|
|
4098
|
-
|
|
4099
|
-
|
|
4100
|
-
|
|
4101
|
-
|
|
4102
|
-
|
|
4103
|
-
|
|
4104
|
-
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4092
|
+
if (p !== 32 && p !== 9 && p !== 13 && p !== 10) {
|
|
4093
|
+
if (p !== 37) {
|
|
4094
|
+
var m, h = e(c, l);
|
|
4095
|
+
if (h === "xref") l += t(c, l, n), d.push(l), l += t(c, l, r);
|
|
4096
|
+
else if (m = /^(\d+)\s+(\d+)\s+obj\b/.exec(h)) {
|
|
4097
|
+
this.entries[m[1]] = {
|
|
4098
|
+
offset: l,
|
|
4099
|
+
gen: 0 | m[2],
|
|
4100
|
+
uncompressed: !0
|
|
4101
|
+
};
|
|
4102
|
+
var g = t(c, l, i) + 7, _ = c.subarray(l, l + g), v = t(_, 0, a);
|
|
4103
|
+
v < g && _[v + 5] < 64 && (f.push(l), this.xrefstms[l] = 1), l += g;
|
|
4104
|
+
} else l += h.length + 1;
|
|
4105
|
+
} else do {
|
|
4106
|
+
if (++l >= u) break;
|
|
4107
|
+
p = c[l];
|
|
4108
|
+
} while (p !== 13 && p !== 10);
|
|
4109
|
+
} else ++l;
|
|
4109
4110
|
}
|
|
4110
4111
|
for (var y = 0, b = f.length; y < b; ++y) this.startXRefQueue.push(f[y]), this.readXRef(!0);
|
|
4111
4112
|
for (y = 0, b = d.length; y < b; ++y) {
|
|
@@ -4215,15 +4216,17 @@ var bt, xt, St, Ct = function() {
|
|
|
4215
4216
|
n.put(this.root);
|
|
4216
4217
|
for (var r = [this.root]; r.length > 0;) {
|
|
4217
4218
|
var i, a, o = t.fetchIfRef(r.shift());
|
|
4218
|
-
if (W(o))
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4219
|
+
if (W(o)) {
|
|
4220
|
+
if (o.has("Kids")) {
|
|
4221
|
+
var s = o.get("Kids");
|
|
4222
|
+
for (i = 0, a = s.length; i < a; i++) {
|
|
4223
|
+
var c = s[i];
|
|
4224
|
+
n.has(c) && H("invalid destinations"), r.push(c), n.put(c);
|
|
4225
|
+
}
|
|
4226
|
+
} else {
|
|
4227
|
+
var l = o.get("Names");
|
|
4228
|
+
if (l) for (i = 0, a = l.length; i < a; i += 2) e[l[i]] = t.fetchIfRef(l[i + 1]);
|
|
4223
4229
|
}
|
|
4224
|
-
} else {
|
|
4225
|
-
var l = o.get("Names");
|
|
4226
|
-
if (l) for (i = 0, a = l.length; i < a; i += 2) e[l[i]] = t.fetchIfRef(l[i + 1]);
|
|
4227
4230
|
}
|
|
4228
4231
|
}
|
|
4229
4232
|
return e;
|
|
@@ -6585,12 +6588,14 @@ var bt, xt, St, Ct = function() {
|
|
|
6585
6588
|
var x = !0, S = o;
|
|
6586
6589
|
for (var C in a) {
|
|
6587
6590
|
var w = a[C];
|
|
6588
|
-
if (w)
|
|
6589
|
-
if (S
|
|
6590
|
-
|
|
6591
|
-
|
|
6592
|
-
|
|
6593
|
-
|
|
6591
|
+
if (w) {
|
|
6592
|
+
if (S) {
|
|
6593
|
+
if (S != w) {
|
|
6594
|
+
x = !1;
|
|
6595
|
+
break;
|
|
6596
|
+
}
|
|
6597
|
+
} else S = w;
|
|
6598
|
+
}
|
|
6594
6599
|
}
|
|
6595
6600
|
x && (r.flags |= en.FixedPitch), r.defaultWidth = o, r.widths = a, r.defaultVMetrics = i, r.vmetrics = s;
|
|
6596
6601
|
},
|
|
@@ -9440,40 +9445,46 @@ var xn = function() {
|
|
|
9440
9445
|
function _(e, t) {
|
|
9441
9446
|
for (var n, r = e.data, i = 0, a = 0, o = 0, s = [], c = [], l = [], u = t.tooComplexToFollowFunctions, d = !1, f = 0, p = 0, m = r.length; i < m;) {
|
|
9442
9447
|
var h = r[i++];
|
|
9443
|
-
if (h === 64)
|
|
9444
|
-
|
|
9445
|
-
|
|
9446
|
-
else
|
|
9447
|
-
|
|
9448
|
-
|
|
9449
|
-
|
|
9450
|
-
|
|
9451
|
-
else for (_ = 0; _ < n; _++) s.push(r[i++]);
|
|
9452
|
-
else if ((248 & h) == 184) if (n = h - 184 + 1, d || p) i += 2 * n;
|
|
9453
|
-
else for (_ = 0; _ < n; _++) v = r[i++], s.push(v << 8 | r[i++]);
|
|
9454
|
-
else if (h !== 43 || u) if (h !== 44 || u) {
|
|
9455
|
-
if (h === 45) if (d) d = !1, a = i;
|
|
9456
|
-
else {
|
|
9457
|
-
if (!(x = c.pop())) return V("TT: ENDF bad stack"), void (t.hintsValid = !1);
|
|
9458
|
-
b = l.pop(), r = x.data, i = x.i, t.functionsStackDeltas[b] = s.length - x.stackTop;
|
|
9448
|
+
if (h === 64) {
|
|
9449
|
+
if (n = r[i++], d || p) i += n;
|
|
9450
|
+
else for (var _ = 0; _ < n; _++) s.push(r[i++]);
|
|
9451
|
+
} else if (h === 65) {
|
|
9452
|
+
if (n = r[i++], d || p) i += 2 * n;
|
|
9453
|
+
else for (_ = 0; _ < n; _++) {
|
|
9454
|
+
var v = r[i++];
|
|
9455
|
+
s.push(v << 8 | r[i++]);
|
|
9459
9456
|
}
|
|
9460
|
-
|
|
9461
|
-
|
|
9462
|
-
else
|
|
9463
|
-
|
|
9464
|
-
|
|
9465
|
-
|
|
9466
|
-
|
|
9457
|
+
} else if ((248 & h) == 176) {
|
|
9458
|
+
if (n = h - 176 + 1, d || p) i += n;
|
|
9459
|
+
else for (_ = 0; _ < n; _++) s.push(r[i++]);
|
|
9460
|
+
} else if ((248 & h) == 184) {
|
|
9461
|
+
if (n = h - 184 + 1, d || p) i += 2 * n;
|
|
9462
|
+
else for (_ = 0; _ < n; _++) v = r[i++], s.push(v << 8 | r[i++]);
|
|
9463
|
+
} else if (h !== 43 || u) {
|
|
9464
|
+
if (h !== 44 || u) {
|
|
9465
|
+
if (h === 45) {
|
|
9466
|
+
if (d) d = !1, a = i;
|
|
9467
|
+
else {
|
|
9468
|
+
if (!(x = c.pop())) return V("TT: ENDF bad stack"), void (t.hintsValid = !1);
|
|
9469
|
+
b = l.pop(), r = x.data, i = x.i, t.functionsStackDeltas[b] = s.length - x.stackTop;
|
|
9470
|
+
}
|
|
9471
|
+
} else if (h === 137) (d || p) && (V("TT: nested IDEFs not allowed"), u = !0), d = !0, o = i;
|
|
9472
|
+
else if (h === 88) ++f;
|
|
9473
|
+
else if (h === 27) p = f;
|
|
9474
|
+
else if (h === 89) p === f && (p = 0), --f;
|
|
9475
|
+
else if (h === 28) {
|
|
9476
|
+
var y = s[s.length - 1];
|
|
9477
|
+
y > 0 && (i += y - 1);
|
|
9478
|
+
}
|
|
9479
|
+
} else {
|
|
9480
|
+
(d || p) && (V("TT: nested FDEFs not allowed"), u = !0), d = !0, o = i;
|
|
9481
|
+
var b = s.pop();
|
|
9482
|
+
t.functionsDefined[b] = {
|
|
9483
|
+
data: r,
|
|
9484
|
+
i
|
|
9485
|
+
};
|
|
9467
9486
|
}
|
|
9468
|
-
} else {
|
|
9469
|
-
(d || p) && (V("TT: nested FDEFs not allowed"), u = !0), d = !0, o = i;
|
|
9470
|
-
var b = s.pop();
|
|
9471
|
-
t.functionsDefined[b] = {
|
|
9472
|
-
data: r,
|
|
9473
|
-
i
|
|
9474
|
-
};
|
|
9475
|
-
}
|
|
9476
|
-
else if (!d && !p) {
|
|
9487
|
+
} else if (!d && !p) {
|
|
9477
9488
|
var b = s[s.length - 1];
|
|
9478
9489
|
if (t.functionsUsed[b] = !0, b in t.functionsStackDeltas) s.length += t.functionsStackDeltas[b];
|
|
9479
9490
|
else if (b in t.functionsDefined && l.indexOf(b) < 0) {
|
|
@@ -9628,11 +9639,12 @@ var xn = function() {
|
|
|
9628
9639
|
var y = s(u, v);
|
|
9629
9640
|
y > p ? (l(u, v, g), h = y) : (l(u, v, g += c(f, h, y, m, g, i)), h = y);
|
|
9630
9641
|
}
|
|
9631
|
-
if (g !== 0)
|
|
9632
|
-
|
|
9633
|
-
|
|
9634
|
-
|
|
9635
|
-
|
|
9642
|
+
if (g !== 0) {
|
|
9643
|
+
if (a) {
|
|
9644
|
+
var b = s(u, o);
|
|
9645
|
+
m.length > b + g ? t.data = m.subarray(0, b + g) : (t.data = new Uint8Array(b + g), t.data.set(m.subarray(0, g))), t.data.set(m.subarray(0, b), g), l(e.data, u.length - o, g + b);
|
|
9646
|
+
} else t.data = m.subarray(0, g);
|
|
9647
|
+
} else {
|
|
9636
9648
|
var x = new Uint8Array([
|
|
9637
9649
|
0,
|
|
9638
9650
|
1,
|
|
@@ -10534,13 +10546,14 @@ var Dn = function() {
|
|
|
10534
10546
|
},
|
|
10535
10547
|
getCharStrings: function() {
|
|
10536
10548
|
var e = this.cff, t = e.charset.charset, n = e.encoding ? e.encoding.encoding : null, r = [], i = [], a = [], o = [], s = 0;
|
|
10537
|
-
if (t[0] === ".notdef" && (s = 1), this.properties.subtype === "CIDFontType0C")
|
|
10538
|
-
|
|
10539
|
-
|
|
10540
|
-
|
|
10541
|
-
|
|
10542
|
-
|
|
10543
|
-
|
|
10549
|
+
if (t[0] === ".notdef" && (s = 1), this.properties.subtype === "CIDFontType0C") {
|
|
10550
|
+
if (this.cff.isCIDFont) o = t;
|
|
10551
|
+
else {
|
|
10552
|
+
o = [];
|
|
10553
|
+
for (var c = 0, l = e.charStrings.count; c < l; c++) o.push(c);
|
|
10554
|
+
t = o;
|
|
10555
|
+
}
|
|
10556
|
+
} else for (var u in n) {
|
|
10544
10557
|
var d = n[u];
|
|
10545
10558
|
if (d in o) {
|
|
10546
10559
|
var f = o[d];
|
|
@@ -11570,15 +11583,19 @@ var Dn = function() {
|
|
|
11570
11583
|
var u = l.trackers[0], d = this.compileStringIndex(e.strings.strings);
|
|
11571
11584
|
t.add(d);
|
|
11572
11585
|
var f = this.compileIndex(e.globalSubrIndex);
|
|
11573
|
-
if (t.add(f), e.encoding && e.topDict.hasName("Encoding"))
|
|
11574
|
-
|
|
11575
|
-
|
|
11576
|
-
|
|
11586
|
+
if (t.add(f), e.encoding && e.topDict.hasName("Encoding")) {
|
|
11587
|
+
if (e.encoding.predefined) u.setEntryLocation("Encoding", [e.encoding.format], t);
|
|
11588
|
+
else {
|
|
11589
|
+
var p = this.compileEncoding(e.encoding);
|
|
11590
|
+
u.setEntryLocation("Encoding", [t.length], t), t.add(p);
|
|
11591
|
+
}
|
|
11577
11592
|
}
|
|
11578
|
-
if (e.charset && e.topDict.hasName("charset"))
|
|
11579
|
-
|
|
11580
|
-
|
|
11581
|
-
|
|
11593
|
+
if (e.charset && e.topDict.hasName("charset")) {
|
|
11594
|
+
if (e.charset.predefined) u.setEntryLocation("charset", [e.charset.format], t);
|
|
11595
|
+
else {
|
|
11596
|
+
var m = this.compileCharset(e.charset);
|
|
11597
|
+
u.setEntryLocation("charset", [t.length], t), t.add(m);
|
|
11598
|
+
}
|
|
11582
11599
|
}
|
|
11583
11600
|
var h = this.compileCharStrings(e.charStrings);
|
|
11584
11601
|
if (u.setEntryLocation("CharStrings", [t.length], t), t.add(h), e.isCIDFont) {
|
|
@@ -16295,7 +16312,7 @@ var Dn = function() {
|
|
|
16295
16312
|
this.decodeCoefficients[p] = h - m, this.decodeAddends[p] = d * m;
|
|
16296
16313
|
}
|
|
16297
16314
|
}
|
|
16298
|
-
a ? this.smask = new n(e, t, a, !1) : o && (Ke(o) ?
|
|
16315
|
+
a ? this.smask = new n(e, t, a, !1) : o && (this.mask = Ke(o) ? new n(e, t, o, !1, null, null, !0) : o);
|
|
16299
16316
|
}
|
|
16300
16317
|
return n.buildImage = function(t, r, i, a, o, s) {
|
|
16301
16318
|
var c = new K(), l = new K(), u = new K();
|
|
@@ -16355,25 +16372,26 @@ var Dn = function() {
|
|
|
16355
16372
|
if (this.width, this.height, a) {
|
|
16356
16373
|
var s = a.width, c = a.height;
|
|
16357
16374
|
i = new Uint8Array(s * c), a.fillGrayBuffer(i), s == e && c == t || (i = n.resize(i, a.bpc, 1, s, c, e, t));
|
|
16358
|
-
} else if (o)
|
|
16359
|
-
|
|
16360
|
-
|
|
16361
|
-
|
|
16362
|
-
|
|
16363
|
-
|
|
16364
|
-
|
|
16365
|
-
|
|
16366
|
-
for (
|
|
16367
|
-
var
|
|
16368
|
-
|
|
16369
|
-
|
|
16370
|
-
|
|
16375
|
+
} else if (o) {
|
|
16376
|
+
if (o instanceof n) {
|
|
16377
|
+
s = o.width, c = o.height, i = new Uint8Array(s * c), o.numComps = 1, o.fillGrayBuffer(i);
|
|
16378
|
+
for (var l = 0, u = s * c; l < u; ++l) i[l] = 255 - i[l];
|
|
16379
|
+
s == e && c == t || (i = n.resize(i, o.bpc, 1, s, c, e, t));
|
|
16380
|
+
} else if (G(o)) {
|
|
16381
|
+
i = new Uint8Array(e * t);
|
|
16382
|
+
var d = this.numComps;
|
|
16383
|
+
for (l = 0, u = e * t; l < u; ++l) {
|
|
16384
|
+
for (var f = 0, p = l * d, m = 0; m < d; ++m) {
|
|
16385
|
+
var h = r[p + m], g = 2 * m;
|
|
16386
|
+
if (h < o[g] || h > o[g + 1]) {
|
|
16387
|
+
f = 255;
|
|
16388
|
+
break;
|
|
16389
|
+
}
|
|
16371
16390
|
}
|
|
16391
|
+
i[l] = f;
|
|
16372
16392
|
}
|
|
16373
|
-
|
|
16374
|
-
|
|
16375
|
-
} else H("Unknown mask format.");
|
|
16376
|
-
else for (i = new Uint8Array(e * t), l = 0, u = e * t; l < u; ++l) i[l] = 255;
|
|
16393
|
+
} else H("Unknown mask format.");
|
|
16394
|
+
} else for (i = new Uint8Array(e * t), l = 0, u = e * t; l < u; ++l) i[l] = 255;
|
|
16377
16395
|
return i;
|
|
16378
16396
|
},
|
|
16379
16397
|
undoPreblend: function(e, t, n) {
|
|
@@ -19775,13 +19793,14 @@ var Jn = function() {
|
|
|
19775
19793
|
return this.currentChar = this.stream.getByte();
|
|
19776
19794
|
},
|
|
19777
19795
|
getNumber: function() {
|
|
19778
|
-
for (var e = !1, t = this.currentChar, n = String.fromCharCode(t); (t = this.nextChar()) >= 0;) if (t !== 46 || e)
|
|
19779
|
-
|
|
19780
|
-
|
|
19781
|
-
|
|
19782
|
-
|
|
19783
|
-
|
|
19784
|
-
|
|
19796
|
+
for (var e = !1, t = this.currentChar, n = String.fromCharCode(t); (t = this.nextChar()) >= 0;) if (t !== 46 || e) {
|
|
19797
|
+
if (t === 45) V("Badly formated number");
|
|
19798
|
+
else if (t >= 48 && t <= 57) n += String.fromCharCode(t);
|
|
19799
|
+
else {
|
|
19800
|
+
if (t !== 69 && t !== 101) break;
|
|
19801
|
+
e = !0;
|
|
19802
|
+
}
|
|
19803
|
+
} else n += ".", e = !0;
|
|
19785
19804
|
var r = parseFloat(n);
|
|
19786
19805
|
return isNaN(r) && H("Invalid floating point number: " + r), r;
|
|
19787
19806
|
},
|
|
@@ -20025,11 +20044,7 @@ var Jn = function() {
|
|
|
20025
20044
|
isStream: !0
|
|
20026
20045
|
}, e;
|
|
20027
20046
|
}(), Qn = (function() {
|
|
20028
|
-
|
|
20029
|
-
for (var t = e.length, n = new Uint8Array(t), r = 0; r < t; ++r) n[r] = e.charCodeAt(r);
|
|
20030
|
-
Zn.call(this, n);
|
|
20031
|
-
}
|
|
20032
|
-
e.prototype = Zn.prototype;
|
|
20047
|
+
Zn.prototype;
|
|
20033
20048
|
}(), function() {
|
|
20034
20049
|
function e() {
|
|
20035
20050
|
this.pos = 0, this.bufferLength = 0, this.eof = !1, this.buffer = null;
|
|
@@ -22228,7 +22243,7 @@ var Jn = function() {
|
|
|
22228
22243
|
}
|
|
22229
22244
|
this.eatBits(12), this.encoding > 0 && (this.eatBits(1), this.nextLine2D = !(1 & a));
|
|
22230
22245
|
}
|
|
22231
|
-
r[0] > 0 ?
|
|
22246
|
+
this.outputBits = r[0] > 0 ? r[this.codingPos = 0] : r[this.codingPos = 1], this.row++;
|
|
22232
22247
|
}
|
|
22233
22248
|
if (this.outputBits >= 8) this.buf = 1 & this.codingPos ? 0 : 255, this.outputBits -= 8, this.outputBits === 0 && r[this.codingPos] < i && (this.codingPos++, this.outputBits = r[this.codingPos] - r[this.codingPos - 1]);
|
|
22234
22249
|
else {
|
|
@@ -23737,7 +23752,11 @@ var gr = function() {
|
|
|
23737
23752
|
if (g >= n) break;
|
|
23738
23753
|
if (!r[m] && a[m]) {
|
|
23739
23754
|
var _ = s[c[a[m]]];
|
|
23740
|
-
e.readBit(_)
|
|
23755
|
+
if (e.readBit(_)) {
|
|
23756
|
+
var v = this.decodeSignBit(g, p);
|
|
23757
|
+
i[m] = v, r[m] = 1, this.setNeighborsSignificance(g, p), o[m] |= 2;
|
|
23758
|
+
}
|
|
23759
|
+
l[m]++, o[m] |= 1;
|
|
23741
23760
|
}
|
|
23742
23761
|
}
|
|
23743
23762
|
},
|
|
@@ -24567,7 +24586,8 @@ var gr = function() {
|
|
|
24567
24586
|
var T = x + m[h], E = C + p[h];
|
|
24568
24587
|
T < 0 || E < 0 || E >= t ? w <<= 1 : w = w << 1 | _[T][E];
|
|
24569
24588
|
}
|
|
24570
|
-
|
|
24589
|
+
var D = v.readBit(y, w);
|
|
24590
|
+
S[C] = D;
|
|
24571
24591
|
}
|
|
24572
24592
|
}
|
|
24573
24593
|
return _;
|
|
@@ -24592,7 +24612,8 @@ var gr = function() {
|
|
|
24592
24612
|
j < 0 || M < 0 || M >= e ? A <<= 1 : A = A << 1 | C[j][M];
|
|
24593
24613
|
}
|
|
24594
24614
|
for (h = 0; h < _; h++) j = D + y[h] + a, M = k + v[h] + i, j < 0 || j >= x || M < 0 || M >= b ? A <<= 1 : A = A << 1 | r[j][M];
|
|
24595
|
-
|
|
24615
|
+
var N = w.readBit(T, A);
|
|
24616
|
+
O[k] = N;
|
|
24596
24617
|
}
|
|
24597
24618
|
}
|
|
24598
24619
|
return C;
|
|
@@ -24613,18 +24634,20 @@ var gr = function() {
|
|
|
24613
24634
|
var v = h == 1 ? e[u] : h == 2 ? p(e, u) : f(e, u);
|
|
24614
24635
|
g.push(v), u += h;
|
|
24615
24636
|
}
|
|
24616
|
-
if (n.referredTo = g, o ? (n.pageAssociation = f(e, u), u += 4) : n.pageAssociation = e[u++], n.length = f(e, u), u += 4, n.length == 4294967295)
|
|
24617
|
-
|
|
24618
|
-
|
|
24619
|
-
|
|
24620
|
-
for (var
|
|
24621
|
-
|
|
24622
|
-
|
|
24623
|
-
|
|
24637
|
+
if (n.referredTo = g, o ? (n.pageAssociation = f(e, u), u += 4) : n.pageAssociation = e[u++], n.length = f(e, u), u += 4, n.length == 4294967295) {
|
|
24638
|
+
if (i === 38) {
|
|
24639
|
+
var x = y(e, u), S = !!(1 & e[u + b]), C = /* @__PURE__ */ new Uint8Array(6);
|
|
24640
|
+
S || (C[0] = 255, C[1] = 172), C[2] = x.height >>> 24 & 255, C[3] = x.height >> 16 & 255, C[4] = x.height >> 8 & 255, C[5] = 255 & x.height, _ = u;
|
|
24641
|
+
for (var w = e.length; _ < w; _++) {
|
|
24642
|
+
for (var T = 0; T < 6 && C[T] === e[_ + T];) T++;
|
|
24643
|
+
if (T == 6) {
|
|
24644
|
+
n.length = _ + 6;
|
|
24645
|
+
break;
|
|
24646
|
+
}
|
|
24624
24647
|
}
|
|
24625
|
-
|
|
24626
|
-
|
|
24627
|
-
}
|
|
24648
|
+
n.length == 4294967295 && H("JBIG2 error: segment end was not found");
|
|
24649
|
+
} else H("JBIG2 error: invalid unknown segment length");
|
|
24650
|
+
}
|
|
24628
24651
|
return n.headerEnd = u, n;
|
|
24629
24652
|
}
|
|
24630
24653
|
function v(e, t, n, r) {
|
|
@@ -97107,7 +97130,7 @@ var Ar, jr = (Ar = {}, {
|
|
|
97107
97130
|
},
|
|
97108
97131
|
paintChar: function(e, t, n) {
|
|
97109
97132
|
var r, i = this.ctx, a = this.current, o = a.font, s = a.fontSize / a.fontSizeScale, c = a.textRenderingMode, l = c & me, u = !!(c & he);
|
|
97110
|
-
(
|
|
97133
|
+
(o.disableFontFace || u) && (r = o.getPathGenerator(this.commonObjs, e)), o.disableFontFace ? (i.save(), i.translate(t, n), i.beginPath(), r(i, s), l !== de && l !== pe || i.fill(), l !== fe && l !== pe || i.stroke(), i.restore()) : (l !== de && l !== pe || i.fillText(e, t, n), l !== fe && l !== pe || i.strokeText(e, t, n)), u && (this.pendingTextPaths ||= []).push({
|
|
97111
97134
|
transform: i.mozCurrentTransform,
|
|
97112
97135
|
x: t,
|
|
97113
97136
|
y: n,
|
|
@@ -97526,13 +97549,14 @@ var Ar, jr = (Ar = {}, {
|
|
|
97526
97549
|
endCompat: function() {},
|
|
97527
97550
|
consumePath: function() {
|
|
97528
97551
|
if (this.pendingClip) {
|
|
97529
|
-
if (this.pendingClip == a)
|
|
97530
|
-
|
|
97531
|
-
|
|
97532
|
-
|
|
97533
|
-
|
|
97534
|
-
|
|
97535
|
-
|
|
97552
|
+
if (this.pendingClip == a) {
|
|
97553
|
+
if ("mozFillRule" in this.ctx) this.ctx.mozFillRule = "evenodd", this.ctx.clip(), this.ctx.mozFillRule = "nonzero";
|
|
97554
|
+
else try {
|
|
97555
|
+
this.ctx.clip("evenodd");
|
|
97556
|
+
} catch {
|
|
97557
|
+
this.ctx.clip();
|
|
97558
|
+
}
|
|
97559
|
+
} else this.ctx.clip();
|
|
97536
97560
|
this.pendingClip = null;
|
|
97537
97561
|
}
|
|
97538
97562
|
this.ctx.beginPath();
|
|
@@ -97654,7 +97678,7 @@ var Pr = {
|
|
|
97654
97678
|
}();
|
|
97655
97679
|
L.Metadata = function() {
|
|
97656
97680
|
function e(e) {
|
|
97657
|
-
|
|
97681
|
+
this.metadata = {}, typeof e == "string" && (e = (e = function(e) {
|
|
97658
97682
|
return e.replace(/>\\376\\377([^<]+)/g, function(e, t) {
|
|
97659
97683
|
for (var n = t.replace(/\\([0-3])([0-7])([0-7])/g, function(e, t, n, r) {
|
|
97660
97684
|
return String.fromCharCode(64 * t + 8 * n + 1 * r);
|
|
@@ -97684,7 +97708,7 @@ L.Metadata = function() {
|
|
|
97684
97708
|
var i, a, o;
|
|
97685
97709
|
typeof e == "string" ? e = { url: e } : qe(e) ? e = { data: e } : typeof e != "object" && H("Invalid parameter in getDocument, need either Uint8Array, string or a parameter object"), e.url || e.data || H("Invalid parameter array, need either .data or .url");
|
|
97686
97710
|
var s = {};
|
|
97687
|
-
for (var c in e) c !== "url" || typeof window > "u" ?
|
|
97711
|
+
for (var c in e) s[c] = c !== "url" || typeof window > "u" ? e[c] : xe(window.location.href, e[c]);
|
|
97688
97712
|
return i = new L.Promise(), a = new L.Promise(), o = new Rr(i, a, t, r), i.then(function() {
|
|
97689
97713
|
o.passwordCallback = n, o.fetchDocument(s);
|
|
97690
97714
|
}), a;
|
|
@@ -98253,7 +98277,7 @@ var Ir = function() {
|
|
|
98253
98277
|
t = !0;
|
|
98254
98278
|
break;
|
|
98255
98279
|
case "Btn":
|
|
98256
|
-
32768 & e.fieldFlags ?
|
|
98280
|
+
e.fieldType = 32768 & e.fieldFlags ? "Rd" : 65536 & e.fieldFlags ? "Btn" : "Cb", t = !0;
|
|
98257
98281
|
break;
|
|
98258
98282
|
default: m.warn(`Unsupported: field.fieldType of ${e.fieldType}`);
|
|
98259
98283
|
}
|
|
@@ -98654,13 +98678,14 @@ var Ci = L, wi = class e {
|
|
|
98654
98678
|
});
|
|
98655
98679
|
for (let e = 0; e < n.Texts.length; e++) {
|
|
98656
98680
|
let r = n.Texts[e];
|
|
98657
|
-
if (t)
|
|
98658
|
-
|
|
98659
|
-
|
|
98660
|
-
|
|
98661
|
-
|
|
98681
|
+
if (t) {
|
|
98682
|
+
if (k.areAdjacentBlocks(t, r) && k.haveSameStyle(t, r)) {
|
|
98683
|
+
let e = t.R[0].T, n = r.R[0].T;
|
|
98684
|
+
t.R[0].T += r.R[0].T, t.w += r.w, r.merged = !0;
|
|
98685
|
+
let i = t.R[0].T;
|
|
98686
|
+
Ci.info(`merged text block: ${e} + ${n} => ${i}`), t = null;
|
|
98687
|
+
} else t = r;
|
|
98662
98688
|
} else t = r;
|
|
98663
|
-
else t = r;
|
|
98664
98689
|
}
|
|
98665
98690
|
n.Texts = n.Texts.filter((e) => !e.merged);
|
|
98666
98691
|
}
|
|
@@ -99244,9 +99269,7 @@ function la(e) {
|
|
|
99244
99269
|
case "seed":
|
|
99245
99270
|
o = ta(e.text) ?? void 0;
|
|
99246
99271
|
break;
|
|
99247
|
-
case "entry-code":
|
|
99248
|
-
s = e.text.replace(/[()]/g, "");
|
|
99249
|
-
break;
|
|
99272
|
+
case "entry-code": s = e.text.replace(/[()]/g, "");
|
|
99250
99273
|
}
|
|
99251
99274
|
}
|
|
99252
99275
|
if (c) return {
|
|
@@ -102033,7 +102056,7 @@ var pa = {
|
|
|
102033
102056
|
});
|
|
102034
102057
|
}), o(t, 1);
|
|
102035
102058
|
for (var i = a(e), s = a(n), c = 0, p = 0, m = !1, h = r.length, g; c < h;) g = r[c++], m || g.key === i ? (m = !0, u(this, g.key)) : p++;
|
|
102036
|
-
for (; p < h;) g = r[p++], g.key
|
|
102059
|
+
for (; p < h;) g = r[p++], (g.key !== i || g.value !== s) && l(this, g.key, g.value);
|
|
102037
102060
|
}, {
|
|
102038
102061
|
enumerable: !0,
|
|
102039
102062
|
unsafe: !0
|
|
@@ -102639,7 +102662,7 @@ var mo = class e {
|
|
|
102639
102662
|
return i(t), r;
|
|
102640
102663
|
}
|
|
102641
102664
|
static shouldBuildText(e) {
|
|
102642
|
-
return
|
|
102665
|
+
return e !== "textarea" && e !== "input" && e !== "option" && e !== "select";
|
|
102643
102666
|
}
|
|
102644
102667
|
}, ho = class {
|
|
102645
102668
|
static setupStorage(e, t, n, r, i) {
|
|
@@ -102673,7 +102696,6 @@ var mo = class e {
|
|
|
102673
102696
|
let n = e.target.options, i = n.selectedIndex === -1 ? "" : n[n.selectedIndex].value;
|
|
102674
102697
|
r.setValue(t, { value: i });
|
|
102675
102698
|
});
|
|
102676
|
-
break;
|
|
102677
102699
|
}
|
|
102678
102700
|
}
|
|
102679
102701
|
static setAttributes({ html: e, element: t, storage: n = null, intent: r, linkService: i }) {
|
|
@@ -103118,9 +103140,7 @@ function Ho(e, t) {
|
|
|
103118
103140
|
case r:
|
|
103119
103141
|
t[0] = ((i - n) / e + 2) * 60;
|
|
103120
103142
|
break;
|
|
103121
|
-
case i:
|
|
103122
|
-
t[0] = ((n - r) / e + 4) * 60;
|
|
103123
|
-
break;
|
|
103143
|
+
case i: t[0] = ((n - r) / e + 4) * 60;
|
|
103124
103144
|
}
|
|
103125
103145
|
}
|
|
103126
103146
|
t[2] = s;
|
|
@@ -103144,9 +103164,7 @@ function Uo(e, t) {
|
|
|
103144
103164
|
t[0] = o + s, t[1] = s, t[2] = a + s;
|
|
103145
103165
|
break;
|
|
103146
103166
|
case 5:
|
|
103147
|
-
case 6:
|
|
103148
|
-
t[0] = a + s, t[1] = s, t[2] = o + s;
|
|
103149
|
-
break;
|
|
103167
|
+
case 6: t[0] = a + s, t[1] = s, t[2] = o + s;
|
|
103150
103168
|
}
|
|
103151
103169
|
}
|
|
103152
103170
|
function Wo(e) {
|
|
@@ -103215,9 +103233,7 @@ function Yo(e) {
|
|
|
103215
103233
|
case Aa.closePath:
|
|
103216
103234
|
t.closePath();
|
|
103217
103235
|
break;
|
|
103218
|
-
default:
|
|
103219
|
-
X(`Unrecognized drawing path operator: ${e[n - 1]}`);
|
|
103220
|
-
break;
|
|
103236
|
+
default: X(`Unrecognized drawing path operator: ${e[n - 1]}`);
|
|
103221
103237
|
}
|
|
103222
103238
|
return t;
|
|
103223
103239
|
}
|
|
@@ -103316,11 +103332,7 @@ var Xo = class e {
|
|
|
103316
103332
|
this.#f(t), this.#r.append(t, this.#p);
|
|
103317
103333
|
}
|
|
103318
103334
|
removeButton(e) {
|
|
103319
|
-
|
|
103320
|
-
case "comment":
|
|
103321
|
-
this.#a?.removeToolbarCommentButton(), this.#a = null, this.#o?.remove(), this.#o = null;
|
|
103322
|
-
break;
|
|
103323
|
-
}
|
|
103335
|
+
e === "comment" && (this.#a?.removeToolbarCommentButton(), this.#a = null, this.#o?.remove(), this.#o = null);
|
|
103324
103336
|
}
|
|
103325
103337
|
async addButton(e, t) {
|
|
103326
103338
|
switch (e) {
|
|
@@ -103336,9 +103348,7 @@ var Xo = class e {
|
|
|
103336
103348
|
case "delete":
|
|
103337
103349
|
this.addDeleteButton();
|
|
103338
103350
|
break;
|
|
103339
|
-
case "comment":
|
|
103340
|
-
t && this.addComment(t);
|
|
103341
|
-
break;
|
|
103351
|
+
case "comment": t && this.addComment(t);
|
|
103342
103352
|
}
|
|
103343
103353
|
}
|
|
103344
103354
|
async addButtonBefore(e, t, n) {
|
|
@@ -103422,7 +103432,7 @@ var $o = class e {
|
|
|
103422
103432
|
return e.#e === t;
|
|
103423
103433
|
}
|
|
103424
103434
|
static isSamePointerIdOrRemove(t) {
|
|
103425
|
-
return e.#e === t
|
|
103435
|
+
return e.#e === t || (e.#t?.delete(t), !1);
|
|
103426
103436
|
}
|
|
103427
103437
|
static isSamePointerType(t) {
|
|
103428
103438
|
return e.#r === t;
|
|
@@ -103989,11 +103999,7 @@ var $o = class e {
|
|
|
103989
103999
|
});
|
|
103990
104000
|
}
|
|
103991
104001
|
onSetPreference({ name: e, value: t }) {
|
|
103992
|
-
|
|
103993
|
-
case "enableNewAltTextWhenAddingImage":
|
|
103994
|
-
this.#b = t;
|
|
103995
|
-
break;
|
|
103996
|
-
}
|
|
104002
|
+
e === "enableNewAltTextWhenAddingImage" && (this.#b = t);
|
|
103997
104003
|
}
|
|
103998
104004
|
onPageChanging({ pageNumber: e }) {
|
|
103999
104005
|
this.#p = e - 1;
|
|
@@ -104102,11 +104108,11 @@ var $o = class e {
|
|
|
104102
104108
|
this.#R && (this.#E?.hide(), this.#R = null, this.#ue({ hasSelectedText: !1 }));
|
|
104103
104109
|
return;
|
|
104104
104110
|
}
|
|
104105
|
-
if (this.#E?.hide(), this.#R = t, this.#ue({ hasSelectedText: !0 }),
|
|
104111
|
+
if (this.#E?.hide(), this.#R = t, this.#ue({ hasSelectedText: !0 }), (this.#I === Y.HIGHLIGHT || this.#I === Y.NONE) && (this.#I === Y.HIGHLIGHT && this.showAllEditors("highlight", !0, !0), this.#T = this.isShiftKeyDown, !this.isShiftKeyDown)) {
|
|
104106
104112
|
let e = this.#I === Y.HIGHLIGHT ? this.#Z(n) : null;
|
|
104107
104113
|
if (e?.toggleDrawing(), this.#k) {
|
|
104108
104114
|
let t = new AbortController(), n = this.combinedSignal(t), r = (n) => {
|
|
104109
|
-
n.type
|
|
104115
|
+
(n.type !== "pointerup" || n.button === 0) && (t.abort(), e?.toggleDrawing(!0), n.type === "pointerup" && this.#te("main_toolbar"));
|
|
104110
104116
|
};
|
|
104111
104117
|
window.addEventListener("pointerup", r, { signal: n }), window.addEventListener("blur", r, { signal: n });
|
|
104112
104118
|
} else e?.toggleDrawing(!0), this.#te("main_toolbar");
|
|
@@ -104253,9 +104259,7 @@ var $o = class e {
|
|
|
104253
104259
|
case "highlightSelection":
|
|
104254
104260
|
this.highlightSelection("context_menu");
|
|
104255
104261
|
break;
|
|
104256
|
-
case "commentSelection":
|
|
104257
|
-
this.commentSelection("context_menu");
|
|
104258
|
-
break;
|
|
104262
|
+
case "commentSelection": this.commentSelection("context_menu");
|
|
104259
104263
|
}
|
|
104260
104264
|
}
|
|
104261
104265
|
updatePageIndex(e, t) {
|
|
@@ -104374,18 +104378,16 @@ var $o = class e {
|
|
|
104374
104378
|
case xa.CREATE:
|
|
104375
104379
|
this.currentLayer.addNewEditor(t);
|
|
104376
104380
|
return;
|
|
104377
|
-
case xa.HIGHLIGHT_SHOW_ALL:
|
|
104378
|
-
this
|
|
104379
|
-
|
|
104380
|
-
|
|
104381
|
-
|
|
104382
|
-
|
|
104383
|
-
|
|
104384
|
-
action: "toggle_visibility"
|
|
104385
|
-
}
|
|
104381
|
+
case xa.HIGHLIGHT_SHOW_ALL: this._eventBus.dispatch("reporttelemetry", {
|
|
104382
|
+
source: this,
|
|
104383
|
+
details: {
|
|
104384
|
+
type: "editing",
|
|
104385
|
+
data: {
|
|
104386
|
+
type: "highlight",
|
|
104387
|
+
action: "toggle_visibility"
|
|
104386
104388
|
}
|
|
104387
|
-
}
|
|
104388
|
-
|
|
104389
|
+
}
|
|
104390
|
+
}), (this.#V ||= /* @__PURE__ */ new Map()).set(e, t), this.showAllEditors("highlight", t);
|
|
104389
104391
|
}
|
|
104390
104392
|
if (this.hasSelection) for (let n of this.#L) n.updateParams(e, t);
|
|
104391
104393
|
else for (let n of this.#g) n.updateDefaultParams(e, t);
|
|
@@ -104666,19 +104668,17 @@ var $o = class e {
|
|
|
104666
104668
|
height: o / i
|
|
104667
104669
|
});
|
|
104668
104670
|
break;
|
|
104669
|
-
default:
|
|
104670
|
-
|
|
104671
|
-
|
|
104672
|
-
|
|
104673
|
-
|
|
104674
|
-
|
|
104675
|
-
});
|
|
104676
|
-
break;
|
|
104671
|
+
default: o = (e, t, o, s) => ({
|
|
104672
|
+
x: (e - n) / i,
|
|
104673
|
+
y: (t - r) / a,
|
|
104674
|
+
width: o / i,
|
|
104675
|
+
height: s / a
|
|
104676
|
+
});
|
|
104677
104677
|
}
|
|
104678
104678
|
let s = [];
|
|
104679
104679
|
for (let e = 0, n = t.rangeCount; e < n; e++) {
|
|
104680
104680
|
let n = t.getRangeAt(e);
|
|
104681
|
-
if (!n.collapsed) for (let { x: e, y: t, width: r, height: i } of n.getClientRects()) r
|
|
104681
|
+
if (!n.collapsed) for (let { x: e, y: t, width: r, height: i } of n.getClientRects()) r !== 0 && i !== 0 && s.push(o(e, t, r, i));
|
|
104682
104682
|
}
|
|
104683
104683
|
return s.length === 0 ? null : s;
|
|
104684
104684
|
}
|
|
@@ -104794,7 +104794,7 @@ var $o = class e {
|
|
|
104794
104794
|
};
|
|
104795
104795
|
}
|
|
104796
104796
|
set data({ altText: e, decorative: t, guessedText: n, textWithDisclaimer: r, cancel: i = !1 }) {
|
|
104797
|
-
n && (this.#l = n, this.#u = r),
|
|
104797
|
+
n && (this.#l = n, this.#u = r), (this.#e !== e || this.#t !== t) && (i || (this.#e = e, this.#t = t), this.#m());
|
|
104798
104798
|
}
|
|
104799
104799
|
toggle(e = !1) {
|
|
104800
104800
|
this.#n && (!e && this.#a && (clearTimeout(this.#a), this.#a = null), this.#n.disabled = !e);
|
|
@@ -105236,9 +105236,7 @@ var $o = class e {
|
|
|
105236
105236
|
case 270:
|
|
105237
105237
|
this.x += this.height * t / (e * 2), this.y -= this.width * e / (t * 2);
|
|
105238
105238
|
break;
|
|
105239
|
-
default:
|
|
105240
|
-
this.x -= this.width / 2, this.y -= this.height / 2;
|
|
105241
|
-
break;
|
|
105239
|
+
default: this.x -= this.width / 2, this.y -= this.height / 2;
|
|
105242
105240
|
}
|
|
105243
105241
|
this.fixAndSetPosition();
|
|
105244
105242
|
}
|
|
@@ -105350,9 +105348,7 @@ var $o = class e {
|
|
|
105350
105348
|
case 180:
|
|
105351
105349
|
i = po(i, o, n), a = po(a, s, r);
|
|
105352
105350
|
break;
|
|
105353
|
-
case 270:
|
|
105354
|
-
i = po(i, s, n), a = po(a, 0, r - o);
|
|
105355
|
-
break;
|
|
105351
|
+
case 270: i = po(i, s, n), a = po(a, 0, r - o);
|
|
105356
105352
|
}
|
|
105357
105353
|
this.x = i /= n, this.y = a /= r;
|
|
105358
105354
|
let [c, l] = this.getBaseTranslation();
|
|
@@ -105484,7 +105480,7 @@ var $o = class e {
|
|
|
105484
105480
|
let { savedX: e, savedY: t, savedWidth: n, savedHeight: r } = this.#u;
|
|
105485
105481
|
this.#u = null;
|
|
105486
105482
|
let i = this.x, a = this.y, o = this.width, s = this.height;
|
|
105487
|
-
i
|
|
105483
|
+
(i !== e || a !== t || o !== n || s !== r) && this.addCommands({
|
|
105488
105484
|
cmd: this.#j.bind(this, i, a, o, s),
|
|
105489
105485
|
undo: this.#j.bind(this, e, t, n, r),
|
|
105490
105486
|
mustExec: !0
|
|
@@ -105517,9 +105513,7 @@ var $o = class e {
|
|
|
105517
105513
|
case "bottomLeft":
|
|
105518
105514
|
_ = !0, h = (e, t) => [0, t], g = (e, t) => [e, 0];
|
|
105519
105515
|
break;
|
|
105520
|
-
case "middleLeft":
|
|
105521
|
-
v = !0, h = (e, t) => [0, t / 2], g = (e, t) => [e, t / 2];
|
|
105522
|
-
break;
|
|
105516
|
+
case "middleLeft": v = !0, h = (e, t) => [0, t / 2], g = (e, t) => [e, t / 2];
|
|
105523
105517
|
}
|
|
105524
105518
|
let y = h(s, c), b = g(s, c), x = f(...b), S = e._round(a + x[0]), C = e._round(o + x[1]), w = 1, T = 1, E, D;
|
|
105525
105519
|
if (n.fromKeyboard) ({deltaX: E, deltaY: D} = n);
|
|
@@ -105867,7 +105861,7 @@ var $o = class e {
|
|
|
105867
105861
|
return !1;
|
|
105868
105862
|
}
|
|
105869
105863
|
enableEditMode() {
|
|
105870
|
-
return this.isInEditMode()
|
|
105864
|
+
return !this.isInEditMode() && (this.parent.setEditingState(!1), this.#_ = !0, !0);
|
|
105871
105865
|
}
|
|
105872
105866
|
disableEditMode() {
|
|
105873
105867
|
return this.isInEditMode() ? (this.parent.setEditingState(!0), this.#_ = !1, !0) : !1;
|
|
@@ -108316,9 +108310,11 @@ var hc = class {
|
|
|
108316
108310
|
let r = Q.transform(n, t.baseTransform);
|
|
108317
108311
|
this.matrix && (r = Q.transform(r, this.matrix));
|
|
108318
108312
|
let i = .001, a = Math.hypot(r[0], r[1]), o = Math.hypot(r[2], r[3]), s = (r[0] * r[2] + r[1] * r[3]) / (a * o);
|
|
108319
|
-
if (Math.abs(s) < i)
|
|
108320
|
-
if (
|
|
108321
|
-
|
|
108313
|
+
if (Math.abs(s) < i) {
|
|
108314
|
+
if (this.isRadial()) {
|
|
108315
|
+
if (Math.abs(a - o) < i) return this._createGradient(e, r);
|
|
108316
|
+
} else return this._createGradient(e, r);
|
|
108317
|
+
}
|
|
108322
108318
|
}
|
|
108323
108319
|
let a = t.current.getClippedPathBoundingBox(r, Po(e)) || [
|
|
108324
108320
|
0,
|
|
@@ -108766,11 +108762,13 @@ var Vc = [
|
|
|
108766
108762
|
continue;
|
|
108767
108763
|
}
|
|
108768
108764
|
}
|
|
108769
|
-
if (!i || i(s))
|
|
108770
|
-
|
|
108771
|
-
|
|
108772
|
-
|
|
108773
|
-
|
|
108765
|
+
if (!i || i(s)) {
|
|
108766
|
+
if (m = o[s], h = a[s] ?? null, m !== ka.dependency) h === null ? this[m](s) : this[m](s, ...h);
|
|
108767
|
+
else for (let e of h) {
|
|
108768
|
+
this.dependencyTracker?.recordNamedData(e, s);
|
|
108769
|
+
let t = e.startsWith("g_") ? f : p;
|
|
108770
|
+
if (!t.has(e)) return t.get(e, n), s;
|
|
108771
|
+
}
|
|
108774
108772
|
}
|
|
108775
108773
|
if (s++, s === c) return s;
|
|
108776
108774
|
if (l && ++d > Oc) {
|
|
@@ -108955,9 +108953,7 @@ var Vc = [
|
|
|
108955
108953
|
case "SMask":
|
|
108956
108954
|
this.dependencyTracker?.recordSimpleData("SMask", e), this.current.activeSMask = r ? this.tempSMask : null, this.tempSMask = null, this.checkSMaskState();
|
|
108957
108955
|
break;
|
|
108958
|
-
case "TR":
|
|
108959
|
-
this.dependencyTracker?.recordSimpleData("filter", e), this.ctx.filter = this.current.transferMaps = this.filterFactory.addFilter(r);
|
|
108960
|
-
break;
|
|
108956
|
+
case "TR": this.dependencyTracker?.recordSimpleData("filter", e), this.ctx.filter = this.current.transferMaps = this.filterFactory.addFilter(r);
|
|
108961
108957
|
}
|
|
108962
108958
|
}
|
|
108963
108959
|
get inSMaskMode() {
|
|
@@ -108991,18 +108987,20 @@ var Vc = [
|
|
|
108991
108987
|
}
|
|
108992
108988
|
composeSMask(e, t, n, r) {
|
|
108993
108989
|
let i = r[0], a = r[1], o = r[2] - i, s = r[3] - a;
|
|
108994
|
-
o
|
|
108990
|
+
o !== 0 && s !== 0 && (this.genericComposeSMask(t.context, n, o, s, t.subtype, t.backdrop, t.transferMap, i, a, t.offsetX, t.offsetY), e.save(), e.globalAlpha = 1, e.globalCompositeOperation = "source-over", e.setTransform(1, 0, 0, 1, 0, 0), e.drawImage(n.canvas, 0, 0), e.restore());
|
|
108995
108991
|
}
|
|
108996
108992
|
genericComposeSMask(e, t, n, r, i, a, o, s, c, l, u) {
|
|
108997
108993
|
let d = e.canvas, f = s - l, p = c - u, m = null;
|
|
108998
|
-
if (a)
|
|
108999
|
-
|
|
109000
|
-
|
|
109001
|
-
|
|
109002
|
-
|
|
109003
|
-
|
|
109004
|
-
|
|
109005
|
-
|
|
108994
|
+
if (a) {
|
|
108995
|
+
if (f < 0 || p < 0 || f + n > d.width || p + r > d.height) {
|
|
108996
|
+
m = this.canvasFactory.create(n, r);
|
|
108997
|
+
let e = m.context;
|
|
108998
|
+
e.drawImage(d, -f, -p), e.globalCompositeOperation = "destination-atop", e.fillStyle = a, e.fillRect(0, 0, n, r), e.globalCompositeOperation = "source-over", d = m.canvas, f = p = 0;
|
|
108999
|
+
} else {
|
|
109000
|
+
e.save(), e.globalAlpha = 1, e.setTransform(1, 0, 0, 1, 0, 0);
|
|
109001
|
+
let t = new Path2D();
|
|
109002
|
+
t.rect(f, p, n, r), e.clip(t), e.globalCompositeOperation = "destination-atop", e.fillStyle = a, e.fillRect(f, p, n, r), e.restore();
|
|
109003
|
+
}
|
|
109006
109004
|
}
|
|
109007
109005
|
t.save(), t.globalAlpha = 1, t.setTransform(1, 0, 0, 1, 0, 0), i === "Alpha" && o ? t.filter = this.filterFactory.addAlphaFilter(o) : i === "Luminosity" && (t.filter = this.filterFactory.addLuminosityFilter(o));
|
|
109008
109006
|
let h = new Path2D();
|
|
@@ -109040,14 +109038,16 @@ var Vc = [
|
|
|
109040
109038
|
}
|
|
109041
109039
|
stroke(e, t, n = !0) {
|
|
109042
109040
|
let r = this.ctx, i = this.current.strokeColor;
|
|
109043
|
-
if (r.globalAlpha = this.current.strokeAlpha, this.contentVisible)
|
|
109044
|
-
|
|
109045
|
-
|
|
109046
|
-
|
|
109047
|
-
|
|
109048
|
-
|
|
109049
|
-
|
|
109050
|
-
|
|
109041
|
+
if (r.globalAlpha = this.current.strokeAlpha, this.contentVisible) {
|
|
109042
|
+
if (typeof i == "object" && i?.getPattern) {
|
|
109043
|
+
let n = i.isModifyingCurrentTransform() ? r.getTransform() : null;
|
|
109044
|
+
if (r.save(), r.strokeStyle = i.getPattern(r, this, Fo(r), pc.STROKE, e), n) {
|
|
109045
|
+
let e = new Path2D();
|
|
109046
|
+
e.addPath(t, r.getTransform().invertSelf().multiplySelf(n)), t = e;
|
|
109047
|
+
}
|
|
109048
|
+
this.rescaleAndStroke(t, !1), r.restore();
|
|
109049
|
+
} else this.rescaleAndStroke(t, !0);
|
|
109050
|
+
}
|
|
109051
109051
|
this.dependencyTracker?.recordDependencies(e, Os.stroke), n && this.consumePath(e, t, this.current.getClippedPathBoundingBox(pc.STROKE, Po(this.ctx))), r.globalAlpha = this.current.fillAlpha;
|
|
109052
109052
|
}
|
|
109053
109053
|
closeStroke(e, t) {
|
|
@@ -109160,23 +109160,27 @@ var Vc = [
|
|
|
109160
109160
|
if ((c.disableFontFace || f || p || m) && !c.missingFile && (h = c.getPathGenerator(this.commonObjs, t)), h && (c.disableFontFace || p || m)) {
|
|
109161
109161
|
o.save(), o.translate(n, r), o.scale(u, -u), this.dependencyTracker?.recordCharacterBBox(e, o, c);
|
|
109162
109162
|
let t;
|
|
109163
|
-
if (d === wa.FILL || d === wa.FILL_STROKE)
|
|
109164
|
-
|
|
109165
|
-
|
|
109166
|
-
|
|
109167
|
-
|
|
109168
|
-
|
|
109169
|
-
|
|
109170
|
-
|
|
109171
|
-
|
|
109172
|
-
|
|
109173
|
-
r,
|
|
109174
|
-
|
|
109175
|
-
|
|
109176
|
-
|
|
109177
|
-
|
|
109178
|
-
|
|
109179
|
-
|
|
109163
|
+
if (d === wa.FILL || d === wa.FILL_STROKE) {
|
|
109164
|
+
if (i) {
|
|
109165
|
+
t = o.getTransform(), o.setTransform(...i);
|
|
109166
|
+
let e = this.#n(h, t, i);
|
|
109167
|
+
o.fill(e);
|
|
109168
|
+
} else o.fill(h);
|
|
109169
|
+
}
|
|
109170
|
+
if (d === wa.STROKE || d === wa.FILL_STROKE) {
|
|
109171
|
+
if (a) {
|
|
109172
|
+
t ||= o.getTransform(), o.setTransform(...a);
|
|
109173
|
+
let { a: e, b: n, c: r, d: i } = t, s = Q.inverseTransform(a), c = Q.transform([
|
|
109174
|
+
e,
|
|
109175
|
+
n,
|
|
109176
|
+
r,
|
|
109177
|
+
i,
|
|
109178
|
+
0,
|
|
109179
|
+
0
|
|
109180
|
+
], s);
|
|
109181
|
+
Q.singularValueDecompose2dScale(c, jc), o.lineWidth *= Math.max(jc[0], jc[1]) / u, o.stroke(this.#n(h, t, a));
|
|
109182
|
+
} else o.lineWidth /= u, o.stroke(h);
|
|
109183
|
+
}
|
|
109180
109184
|
o.restore();
|
|
109181
109185
|
} else (d === wa.FILL || d === wa.FILL_STROKE) && (o.fillText(t, n, r), this.dependencyTracker?.recordCharacterBBox(e, o, c, u, n, r, () => o.measureText(t))), (d === wa.STROKE || d === wa.FILL_STROKE) && (this.dependencyTracker && this.dependencyTracker?.recordCharacterBBox(e, o, c, u, n, r, () => o.measureText(t)).recordDependencies(e, Os.stroke), o.strokeText(t, n, r));
|
|
109182
109186
|
f && ((this.pendingTextPaths ||= []).push({
|
|
@@ -109610,12 +109614,13 @@ var Vc = [
|
|
|
109610
109614
|
let { lineWidth: e } = this.current, { a: t, b: n, c: r, d: i } = this.ctx.getTransform(), a, o;
|
|
109611
109615
|
if (n === 0 && r === 0) {
|
|
109612
109616
|
let n = Math.abs(t), r = Math.abs(i);
|
|
109613
|
-
if (n === r)
|
|
109614
|
-
|
|
109615
|
-
|
|
109616
|
-
|
|
109617
|
-
|
|
109618
|
-
|
|
109617
|
+
if (n === r) {
|
|
109618
|
+
if (e === 0) a = o = 1 / n;
|
|
109619
|
+
else {
|
|
109620
|
+
let t = n * e;
|
|
109621
|
+
a = o = t < 1 ? 1 / t : 1;
|
|
109622
|
+
}
|
|
109623
|
+
} else if (e === 0) a = 1 / n, o = 1 / r;
|
|
109619
109624
|
else {
|
|
109620
109625
|
let t = n * e, i = r * e;
|
|
109621
109626
|
a = t < 1 ? 1 / t : 1, o = i < 1 ? 1 / i : 1;
|
|
@@ -110383,19 +110388,22 @@ var wl = class {
|
|
|
110383
110388
|
if (this.#t.get(t).visible) return !0;
|
|
110384
110389
|
}
|
|
110385
110390
|
return !1;
|
|
110386
|
-
}
|
|
110391
|
+
}
|
|
110392
|
+
if (e.policy === "AllOn") {
|
|
110387
110393
|
for (let t of e.ids) {
|
|
110388
110394
|
if (!this.#t.has(t)) return X(`Optional content group not found: ${t}`), !0;
|
|
110389
110395
|
if (!this.#t.get(t).visible) return !1;
|
|
110390
110396
|
}
|
|
110391
110397
|
return !0;
|
|
110392
|
-
}
|
|
110398
|
+
}
|
|
110399
|
+
if (e.policy === "AnyOff") {
|
|
110393
110400
|
for (let t of e.ids) {
|
|
110394
110401
|
if (!this.#t.has(t)) return X(`Optional content group not found: ${t}`), !0;
|
|
110395
110402
|
if (!this.#t.get(t).visible) return !0;
|
|
110396
110403
|
}
|
|
110397
110404
|
return !1;
|
|
110398
|
-
}
|
|
110405
|
+
}
|
|
110406
|
+
if (e.policy === "AllOff") {
|
|
110399
110407
|
for (let t of e.ids) {
|
|
110400
110408
|
if (!this.#t.has(t)) return X(`Optional content group not found: ${t}`), !0;
|
|
110401
110409
|
if (this.#t.get(t).visible) return !1;
|
|
@@ -110433,9 +110441,7 @@ var wl = class {
|
|
|
110433
110441
|
case "OFF":
|
|
110434
110442
|
this.setVisibility(r, !1, t);
|
|
110435
110443
|
break;
|
|
110436
|
-
case "Toggle":
|
|
110437
|
-
this.setVisibility(r, !e.visible, t);
|
|
110438
|
-
break;
|
|
110444
|
+
case "Toggle": this.setVisibility(r, !e.visible, t);
|
|
110439
110445
|
}
|
|
110440
110446
|
}
|
|
110441
110447
|
this.#e = null;
|
|
@@ -110793,7 +110799,7 @@ var wl = class {
|
|
|
110793
110799
|
}
|
|
110794
110800
|
static #O(e, t, n) {
|
|
110795
110801
|
let r = this.#x.get(e);
|
|
110796
|
-
t
|
|
110802
|
+
(t !== r.size || n !== r.family) && (e.font = `${t}px ${n}`, r.size = t, r.family = n);
|
|
110797
110803
|
}
|
|
110798
110804
|
static #k() {
|
|
110799
110805
|
if (this.#S !== null) return;
|
|
@@ -110876,20 +110882,22 @@ function Ll(e = {}) {
|
|
|
110876
110882
|
if (t.destroyed) throw Error("Loading aborted");
|
|
110877
110883
|
if (u.destroyed) throw Error("Worker was destroyed");
|
|
110878
110884
|
let e = u.messageHandler.sendWithPromise("GetDocRequest", ae, i ? [i.buffer] : null), s;
|
|
110879
|
-
if (!i)
|
|
110880
|
-
|
|
110881
|
-
|
|
110882
|
-
|
|
110883
|
-
|
|
110884
|
-
|
|
110885
|
-
|
|
110886
|
-
|
|
110887
|
-
|
|
110888
|
-
|
|
110889
|
-
|
|
110890
|
-
|
|
110891
|
-
|
|
110892
|
-
|
|
110885
|
+
if (!i) {
|
|
110886
|
+
if (c) s = new ul({
|
|
110887
|
+
pdfDataRangeTransport: c,
|
|
110888
|
+
disableRange: O,
|
|
110889
|
+
disableStream: k
|
|
110890
|
+
});
|
|
110891
|
+
else if (r) s = new (Cl(r))({
|
|
110892
|
+
url: r,
|
|
110893
|
+
httpHeaders: a,
|
|
110894
|
+
withCredentials: o,
|
|
110895
|
+
rangeChunkSize: l,
|
|
110896
|
+
disableRange: O,
|
|
110897
|
+
disableStream: k
|
|
110898
|
+
});
|
|
110899
|
+
else throw Error("getDocument - expected either `data`, `range`, or `url` parameter.");
|
|
110900
|
+
}
|
|
110893
110901
|
return e.then((e) => {
|
|
110894
110902
|
if (t.destroyed) throw Error("Loading aborted");
|
|
110895
110903
|
if (u.destroyed) throw Error("Worker was destroyed");
|
|
@@ -112284,10 +112292,7 @@ var Ql = class {
|
|
|
112284
112292
|
case Da.INSET:
|
|
112285
112293
|
X("Unimplemented border style: inset");
|
|
112286
112294
|
break;
|
|
112287
|
-
case Da.UNDERLINE:
|
|
112288
|
-
a.borderBottomStyle = "solid";
|
|
112289
|
-
break;
|
|
112290
|
-
default: break;
|
|
112295
|
+
case Da.UNDERLINE: a.borderBottomStyle = "solid";
|
|
112291
112296
|
}
|
|
112292
112297
|
let r = t.borderColor || null;
|
|
112293
112298
|
r ? (this.#t = !0, a.borderColor = Q.makeHexColor(r[0] | 0, r[1] | 0, r[2] | 0)) : a.borderWidth = 0;
|
|
@@ -112760,15 +112765,16 @@ var Ql = class {
|
|
|
112760
112765
|
let { target: t } = e;
|
|
112761
112766
|
if (d && (t.type = l, u && (t.step = u)), s.userValue) {
|
|
112762
112767
|
let e = s.userValue;
|
|
112763
|
-
if (d)
|
|
112764
|
-
|
|
112765
|
-
|
|
112766
|
-
|
|
112767
|
-
|
|
112768
|
-
|
|
112769
|
-
|
|
112770
|
-
|
|
112771
|
-
|
|
112768
|
+
if (d) {
|
|
112769
|
+
if (l === "time") {
|
|
112770
|
+
let n = new Date(e);
|
|
112771
|
+
t.value = [
|
|
112772
|
+
n.getHours(),
|
|
112773
|
+
n.getMinutes(),
|
|
112774
|
+
n.getSeconds()
|
|
112775
|
+
].map((e) => e.toString().padStart(2, "0")).join(":");
|
|
112776
|
+
} else t.value = new Date(e - ru).toISOString().split(l === "date" ? "T" : ".", 1)[0];
|
|
112777
|
+
} else t.value = e;
|
|
112772
112778
|
}
|
|
112773
112779
|
s.lastCommittedValue = t.value, s.commitKey = 1, this.data.actions?.Focus || (s.focused = !0);
|
|
112774
112780
|
}), n.addEventListener("updatefromsandbox", (n) => {
|
|
@@ -112866,9 +112872,7 @@ var Ql = class {
|
|
|
112866
112872
|
case "deleteContentBackward":
|
|
112867
112873
|
a === o && --c;
|
|
112868
112874
|
break;
|
|
112869
|
-
case "deleteContentForward":
|
|
112870
|
-
a === o && (l += 1);
|
|
112871
|
-
break;
|
|
112875
|
+
case "deleteContentForward": a === o && (l += 1);
|
|
112872
112876
|
}
|
|
112873
112877
|
e.preventDefault(), this.linkService.eventBus?.dispatch("dispatcheventinsandbox", {
|
|
112874
112878
|
source: this,
|
|
@@ -113947,9 +113951,7 @@ var Ql = class {
|
|
|
113947
113951
|
case xa.FREETEXT_SIZE:
|
|
113948
113952
|
e._defaultFontSize = n;
|
|
113949
113953
|
break;
|
|
113950
|
-
case xa.FREETEXT_COLOR:
|
|
113951
|
-
e._defaultColor = n;
|
|
113952
|
-
break;
|
|
113954
|
+
case xa.FREETEXT_COLOR: e._defaultColor = n;
|
|
113953
113955
|
}
|
|
113954
113956
|
}
|
|
113955
113957
|
updateParams(e, t) {
|
|
@@ -113957,9 +113959,7 @@ var Ql = class {
|
|
|
113957
113959
|
case xa.FREETEXT_SIZE:
|
|
113958
113960
|
this.#i(t);
|
|
113959
113961
|
break;
|
|
113960
|
-
case xa.FREETEXT_COLOR:
|
|
113961
|
-
this.#a(t);
|
|
113962
|
-
break;
|
|
113962
|
+
case xa.FREETEXT_COLOR: this.#a(t);
|
|
113963
113963
|
}
|
|
113964
113964
|
}
|
|
113965
113965
|
static get defaultPropertiesToUpdate() {
|
|
@@ -114040,7 +114040,7 @@ var Ql = class {
|
|
|
114040
114040
|
let t = [];
|
|
114041
114041
|
this.editorDiv.normalize();
|
|
114042
114042
|
let n = null;
|
|
114043
|
-
for (let r of this.editorDiv.childNodes) n?.nodeType
|
|
114043
|
+
for (let r of this.editorDiv.childNodes) (n?.nodeType !== Node.TEXT_NODE || r.nodeName !== "BR") && (t.push(e.#c(r)), n = r);
|
|
114044
114044
|
return t.join("\n");
|
|
114045
114045
|
}
|
|
114046
114046
|
#s() {
|
|
@@ -114125,9 +114125,7 @@ var Ql = class {
|
|
|
114125
114125
|
case 180:
|
|
114126
114126
|
d = e - this.width + (i[0] - l) / s, f = t - (i[1] - u) / c, [a, o] = [-a, -o];
|
|
114127
114127
|
break;
|
|
114128
|
-
case 270:
|
|
114129
|
-
d = e + (i[0] - l - this.height * c) / s, f = t + (i[1] - u - this.width * s) / c, [a, o] = [-o, a];
|
|
114130
|
-
break;
|
|
114128
|
+
case 270: d = e + (i[0] - l - this.height * c) / s, f = t + (i[1] - u - this.width * s) / c, [a, o] = [-o, a];
|
|
114131
114129
|
}
|
|
114132
114130
|
this.setAt(d * n, f * r, a, o);
|
|
114133
114131
|
} else this._moveAfterPaste(e, t);
|
|
@@ -114542,9 +114540,7 @@ var Ql = class {
|
|
|
114542
114540
|
case 180:
|
|
114543
114541
|
s = $._rescale(this.#o, n, t, -a, o), c = $._rescale(this.#i, n, t, -a, o);
|
|
114544
114542
|
break;
|
|
114545
|
-
case 270:
|
|
114546
|
-
s = $._rescaleAndSwap(this.#o, n, r, -a, -o), c = $._rescaleAndSwap(this.#i, n, r, -a, -o);
|
|
114547
|
-
break;
|
|
114543
|
+
case 270: s = $._rescaleAndSwap(this.#o, n, r, -a, -o), c = $._rescaleAndSwap(this.#i, n, r, -a, -o);
|
|
114548
114544
|
}
|
|
114549
114545
|
return {
|
|
114550
114546
|
outline: Array.from(s),
|
|
@@ -114905,9 +114901,7 @@ var Ql = class {
|
|
|
114905
114901
|
case xa.HIGHLIGHT_COLOR:
|
|
114906
114902
|
e._defaultColor = n;
|
|
114907
114903
|
break;
|
|
114908
|
-
case xa.HIGHLIGHT_THICKNESS:
|
|
114909
|
-
e._defaultThickness = n;
|
|
114910
|
-
break;
|
|
114904
|
+
case xa.HIGHLIGHT_THICKNESS: e._defaultThickness = n;
|
|
114911
114905
|
}
|
|
114912
114906
|
}
|
|
114913
114907
|
translateInPage(e, t) {}
|
|
@@ -114922,9 +114916,7 @@ var Ql = class {
|
|
|
114922
114916
|
case xa.HIGHLIGHT_COLOR:
|
|
114923
114917
|
this.#b(t);
|
|
114924
114918
|
break;
|
|
114925
|
-
case xa.HIGHLIGHT_THICKNESS:
|
|
114926
|
-
this.#x(t);
|
|
114927
|
-
break;
|
|
114919
|
+
case xa.HIGHLIGHT_THICKNESS: this.#x(t);
|
|
114928
114920
|
}
|
|
114929
114921
|
}
|
|
114930
114922
|
static get defaultPropertiesToUpdate() {
|
|
@@ -115102,9 +115094,7 @@ var Ql = class {
|
|
|
115102
115094
|
this.#D(!0);
|
|
115103
115095
|
break;
|
|
115104
115096
|
case 1:
|
|
115105
|
-
case 3:
|
|
115106
|
-
this.#D(!1);
|
|
115107
|
-
break;
|
|
115097
|
+
case 3: this.#D(!1);
|
|
115108
115098
|
}
|
|
115109
115099
|
}
|
|
115110
115100
|
#D(e) {
|
|
@@ -115458,7 +115448,7 @@ var Ql = class {
|
|
|
115458
115448
|
this._drawId === null || !this.parent || (this.parent.drawLayer.remove(this._drawId), this._drawId = null, this._drawingOptions.reset());
|
|
115459
115449
|
}
|
|
115460
115450
|
#c(e = this.parent) {
|
|
115461
|
-
if (
|
|
115451
|
+
if (this._drawId === null || this.parent !== e) {
|
|
115462
115452
|
if (this._drawId !== null) {
|
|
115463
115453
|
this.parent.drawLayer.updateParent(this._drawId, e.drawLayer);
|
|
115464
115454
|
return;
|
|
@@ -115921,9 +115911,7 @@ var Ql = class {
|
|
|
115921
115911
|
case 180:
|
|
115922
115912
|
y = $._rescale, d = e + n, f = t, p = -n, m = r, h = e + (1 - s - l) * n, g = t + c * r, _ = e + (1 - s) * n, v = t + (c + u) * r;
|
|
115923
115913
|
break;
|
|
115924
|
-
case 270:
|
|
115925
|
-
y = $._rescaleAndSwap, d = e + n, f = t + r, p = -n, m = -r, h = e + (1 - c - u) * n, g = t + (1 - s - l) * r, _ = e + (1 - c) * n, v = t + (1 - s) * r;
|
|
115926
|
-
break;
|
|
115914
|
+
case 270: y = $._rescaleAndSwap, d = e + n, f = t + r, p = -n, m = -r, h = e + (1 - c - u) * n, g = t + (1 - s - l) * r, _ = e + (1 - c) * n, v = t + (1 - s) * r;
|
|
115927
115915
|
}
|
|
115928
115916
|
for (let { line: e, points: t } of this.#r) a.push(y(e, d, f, p, m, i ? Array(e.length) : null)), o.push(y(t, d, f, p, m, i ? Array(t.length) : null));
|
|
115929
115917
|
return {
|
|
@@ -115949,9 +115937,7 @@ var Ql = class {
|
|
|
115949
115937
|
case 180:
|
|
115950
115938
|
m = $._rescale, u = e / n + 1, d = -t / r, f = -1 / n, p = 1 / r;
|
|
115951
115939
|
break;
|
|
115952
|
-
case 270:
|
|
115953
|
-
m = $._rescaleAndSwap, u = t / r + 1, d = e / n + 1, f = -1 / r, p = -1 / n;
|
|
115954
|
-
break;
|
|
115940
|
+
case 270: m = $._rescaleAndSwap, u = t / r + 1, d = e / n + 1, f = -1 / r, p = -1 / n;
|
|
115955
115941
|
}
|
|
115956
115942
|
if (!a) {
|
|
115957
115943
|
a = [];
|
|
@@ -116382,7 +116368,7 @@ var Yu = 8, Xu = 3, Zu = class {
|
|
|
116382
116368
|
m = e;
|
|
116383
116369
|
break;
|
|
116384
116370
|
}
|
|
116385
|
-
m ? m.isHole ?
|
|
116371
|
+
p.parent = m ? m.isHole ? f ? m.parent : s : f ? s : m.parent : f ? s : 0;
|
|
116386
116372
|
let h = this.#r(a, t, e, n, l, u, 0);
|
|
116387
116373
|
if (h === -1) {
|
|
116388
116374
|
a[r] = -o, a[r] !== 1 && (s = Math.abs(a[r]));
|
|
@@ -116400,7 +116386,8 @@ var Yu = 8, Xu = 3, Zu = class {
|
|
|
116400
116386
|
if (a[p + 1] === 0 ? a[p] = -o : a[p] === 1 && (a[p] = o), c === e && f === n && b === v && x === y) {
|
|
116401
116387
|
a[r] !== 1 && (s = Math.abs(a[r]));
|
|
116402
116388
|
break;
|
|
116403
|
-
}
|
|
116389
|
+
}
|
|
116390
|
+
l = b, u = x, b = c, x = f;
|
|
116404
116391
|
}
|
|
116405
116392
|
}
|
|
116406
116393
|
}
|
|
@@ -116498,7 +116485,7 @@ var Yu = 8, Xu = 3, Zu = class {
|
|
|
116498
116485
|
c = new OffscreenCanvas(y, b), l = c.getContext("2d", {
|
|
116499
116486
|
alpha: !0,
|
|
116500
116487
|
willReadFrequently: !0
|
|
116501
|
-
}), l.font = u, l.filter = "grayscale(1)", l.fillStyle = "white", l.fillRect(0, 0, y, b), l.fillStyle = "black", l.fillText(e, y *
|
|
116488
|
+
}), l.font = u, l.filter = "grayscale(1)", l.fillStyle = "white", l.fillRect(0, 0, y, b), l.fillStyle = "black", l.fillText(e, y * .5 / 2, b * 1.5 / 2);
|
|
116502
116489
|
let x = this.#u(l.getImageData(0, 0, y, b).data), S = this.#l(x), C = this.#d(S), w = this.#a(x, y, b, C);
|
|
116503
116490
|
return this.processDrawnLines({
|
|
116504
116491
|
lines: {
|
|
@@ -116629,15 +116616,13 @@ var Yu = 8, Xu = 3, Zu = class {
|
|
|
116629
116616
|
case Int16Array.BYTES_PER_ELEMENT:
|
|
116630
116617
|
_ = new Int16Array(a.buffer, g);
|
|
116631
116618
|
break;
|
|
116632
|
-
case Int32Array.BYTES_PER_ELEMENT:
|
|
116633
|
-
_ = new Int32Array(a.buffer, g);
|
|
116634
|
-
break;
|
|
116619
|
+
case Int32Array.BYTES_PER_ELEMENT: _ = new Int32Array(a.buffer, g);
|
|
116635
116620
|
}
|
|
116636
116621
|
o = 0;
|
|
116637
116622
|
for (let e = 0; e < p; e++) {
|
|
116638
116623
|
let t = s[Xu * e + Yu], n = new Float32Array(t + 2);
|
|
116639
116624
|
h.push(n);
|
|
116640
|
-
for (let t = 0; t <
|
|
116625
|
+
for (let t = 0; t < 2; t++) n[t] = s[Xu * e + Yu + t + 1];
|
|
116641
116626
|
for (let e = 0; e < t; e++) n[e + 2] = n[e] + _[o++];
|
|
116642
116627
|
}
|
|
116643
116628
|
return {
|
|
@@ -116726,19 +116711,20 @@ var Yu = 8, Xu = 3, Zu = class {
|
|
|
116726
116711
|
render() {
|
|
116727
116712
|
if (this.div) return this.div;
|
|
116728
116713
|
let t, n, { _isCopy: r } = this;
|
|
116729
|
-
if (r && (this._isCopy = !1, t = this.x, n = this.y), super.render(), this._drawId === null)
|
|
116730
|
-
|
|
116731
|
-
lines: t,
|
|
116732
|
-
|
|
116733
|
-
|
|
116734
|
-
|
|
116735
|
-
|
|
116736
|
-
|
|
116737
|
-
|
|
116738
|
-
|
|
116739
|
-
|
|
116740
|
-
|
|
116741
|
-
|
|
116714
|
+
if (r && (this._isCopy = !1, t = this.x, n = this.y), super.render(), this._drawId === null) {
|
|
116715
|
+
if (this.#n) {
|
|
116716
|
+
let { lines: t, mustSmooth: n, areContours: r, description: i, uuid: a, heightInPage: o } = this.#n, { rawDims: { pageWidth: s, pageHeight: c }, rotation: l } = this.parent.viewport, u = Zu.processDrawnLines({
|
|
116717
|
+
lines: t,
|
|
116718
|
+
pageWidth: s,
|
|
116719
|
+
pageHeight: c,
|
|
116720
|
+
rotation: l,
|
|
116721
|
+
innerMargin: e._INNER_MARGIN,
|
|
116722
|
+
mustSmooth: n,
|
|
116723
|
+
areContours: r
|
|
116724
|
+
});
|
|
116725
|
+
this.addSignature(u, o, i, a);
|
|
116726
|
+
} else this.div.setAttribute("data-l10n-args", JSON.stringify({ description: "" })), this.div.hidden = !0, this._uiManager.getSignature(this);
|
|
116727
|
+
} else this.div.setAttribute("data-l10n-args", JSON.stringify({ description: this.#t || "" }));
|
|
116742
116728
|
return r && (this._isCopy = !0, this._moveAfterPaste(t, n)), this.div;
|
|
116743
116729
|
}
|
|
116744
116730
|
setUuid(e) {
|
|
@@ -117319,8 +117305,8 @@ var Yu = 8, Xu = 3, Zu = class {
|
|
|
117319
117305
|
if (t.serialize() !== null) {
|
|
117320
117306
|
e.set(t.annotationElementId, t);
|
|
117321
117307
|
continue;
|
|
117322
|
-
}
|
|
117323
|
-
this.getEditableAnnotation(t.annotationElementId)?.show(), t.remove();
|
|
117308
|
+
}
|
|
117309
|
+
r.set(t.annotationElementId, t), this.getEditableAnnotation(t.annotationElementId)?.show(), t.remove();
|
|
117324
117310
|
}
|
|
117325
117311
|
for (let n of t.getEditableAnnotations()) {
|
|
117326
117312
|
let { id: t } = n.data;
|
|
@@ -117929,7 +117915,7 @@ function pd(e, t, n, r, i, a, o, s) {
|
|
|
117929
117915
|
}
|
|
117930
117916
|
function md(e, t, n, r, i) {
|
|
117931
117917
|
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);
|
|
117932
|
-
for (let i = a; i <= s; i++) for (let a = o; a <= c; a++) if (
|
|
117918
|
+
for (let i = a; i <= s; i++) for (let a = o; a <= c; a++) if ((i !== t || a !== n) && (u += +(l === e[a * r + i]), u > 2)) return !0;
|
|
117933
117919
|
return !1;
|
|
117934
117920
|
}
|
|
117935
117921
|
function hd(e, t, n, r, i) {
|
|
@@ -118110,27 +118096,33 @@ var yd = /* @__PURE__ */ o(((e, t) => {
|
|
|
118110
118096
|
height: a,
|
|
118111
118097
|
lineIndex: 0
|
|
118112
118098
|
});
|
|
118113
|
-
c === 8 ?
|
|
118099
|
+
this._xComparison = c === 8 ? s : c === 16 ? s * 2 : 1;
|
|
118114
118100
|
};
|
|
118115
118101
|
a.prototype.start = function() {
|
|
118116
118102
|
this.read(this._images[this._imageIndex].byteWidth + 1, this._reverseFilterLine.bind(this));
|
|
118117
118103
|
}, a.prototype._unFilterType1 = function(e, t, n) {
|
|
118118
118104
|
let r = this._xComparison, i = r - 1;
|
|
118119
|
-
for (let a = 0; a < n; a++)
|
|
118105
|
+
for (let a = 0; a < n; a++) {
|
|
118106
|
+
let n = e[1 + a], o = a > i ? t[a - r] : 0;
|
|
118107
|
+
t[a] = n + o;
|
|
118108
|
+
}
|
|
118120
118109
|
}, a.prototype._unFilterType2 = function(e, t, n) {
|
|
118121
118110
|
let r = this._lastLine;
|
|
118122
|
-
for (let i = 0; i < n; i++)
|
|
118111
|
+
for (let i = 0; i < n; i++) {
|
|
118112
|
+
let n = e[1 + i], a = r ? r[i] : 0;
|
|
118113
|
+
t[i] = n + a;
|
|
118114
|
+
}
|
|
118123
118115
|
}, a.prototype._unFilterType3 = function(e, t, n) {
|
|
118124
118116
|
let r = this._xComparison, i = r - 1, a = this._lastLine;
|
|
118125
118117
|
for (let o = 0; o < n; o++) {
|
|
118126
|
-
let n = e[1 + o], s = a ? a[o] : 0, c = o > i ? t[o - r] : 0;
|
|
118127
|
-
t[o] = n +
|
|
118118
|
+
let n = e[1 + o], s = a ? a[o] : 0, c = o > i ? t[o - r] : 0, l = Math.floor((c + s) / 2);
|
|
118119
|
+
t[o] = n + l;
|
|
118128
118120
|
}
|
|
118129
118121
|
}, a.prototype._unFilterType4 = function(e, t, n) {
|
|
118130
118122
|
let i = this._xComparison, a = i - 1, o = this._lastLine;
|
|
118131
118123
|
for (let s = 0; s < n; s++) {
|
|
118132
|
-
let n = e[1 + s], c = o ? o[s] : 0;
|
|
118133
|
-
t[s] = n +
|
|
118124
|
+
let n = e[1 + s], c = o ? o[s] : 0, l = r(s > a ? t[s - i] : 0, c, s > a && o ? o[s - i] : 0);
|
|
118125
|
+
t[s] = n + l;
|
|
118134
118126
|
}
|
|
118135
118127
|
}, a.prototype._reverseFilterLine = function(e) {
|
|
118136
118128
|
let t = e[0], n, r = this._images[this._imageIndex], i = r.byteWidth;
|
|
@@ -118402,9 +118394,7 @@ var yd = /* @__PURE__ */ o(((e, t) => {
|
|
|
118402
118394
|
case 2:
|
|
118403
118395
|
l = i & 3, u = i >> 2 & 3, d = i >> 4 & 3, f = i >> 6 & 3, n.push(f, d, u, l);
|
|
118404
118396
|
break;
|
|
118405
|
-
case 1:
|
|
118406
|
-
a = i & 1, o = i >> 1 & 1, s = i >> 2 & 1, c = i >> 3 & 1, l = i >> 4 & 1, u = i >> 5 & 1, d = i >> 6 & 1, f = i >> 7 & 1, n.push(f, d, u, l, c, s, o, a);
|
|
118407
|
-
break;
|
|
118397
|
+
case 1: a = i & 1, o = i >> 1 & 1, s = i >> 2 & 1, c = i >> 3 & 1, l = i >> 4 & 1, u = i >> 5 & 1, d = i >> 6 & 1, f = i >> 7 & 1, n.push(f, d, u, l, c, s, o, a);
|
|
118408
118398
|
}
|
|
118409
118399
|
}
|
|
118410
118400
|
return {
|
|
@@ -118509,18 +118499,20 @@ var yd = /* @__PURE__ */ o(((e, t) => {
|
|
|
118509
118499
|
n.inherits(u, i), u.prototype._handleError = function(e) {
|
|
118510
118500
|
this.emit("error", e), this.writable = !1, this.destroy(), this._inflate && this._inflate.destroy && this._inflate.destroy(), this._filter && (this._filter.destroy(), this._filter.on("error", function() {})), this.errord = !0;
|
|
118511
118501
|
}, u.prototype._inflateData = function(e) {
|
|
118512
|
-
if (!this._inflate)
|
|
118513
|
-
|
|
118514
|
-
|
|
118515
|
-
|
|
118516
|
-
|
|
118517
|
-
|
|
118518
|
-
|
|
118519
|
-
|
|
118520
|
-
|
|
118521
|
-
|
|
118522
|
-
|
|
118523
|
-
|
|
118502
|
+
if (!this._inflate) {
|
|
118503
|
+
if (this._bitmapInfo.interlace) this._inflate = r.createInflate(), this._inflate.on("error", this.emit.bind(this, "error")), this._filter.on("complete", this._complete.bind(this)), this._inflate.pipe(this._filter);
|
|
118504
|
+
else {
|
|
118505
|
+
let e = ((this._bitmapInfo.width * this._bitmapInfo.bpp * this._bitmapInfo.depth + 7 >> 3) + 1) * this._bitmapInfo.height, t = Math.max(e, r.Z_MIN_CHUNK);
|
|
118506
|
+
this._inflate = r.createInflate({ chunkSize: t });
|
|
118507
|
+
let n = e, i = this.emit.bind(this, "error");
|
|
118508
|
+
this._inflate.on("error", function(e) {
|
|
118509
|
+
n && i(e);
|
|
118510
|
+
}), this._filter.on("complete", this._complete.bind(this));
|
|
118511
|
+
let a = this._filter.write.bind(this._filter);
|
|
118512
|
+
this._inflate.on("data", function(e) {
|
|
118513
|
+
n && (e.length > n && (e = e.slice(0, n)), n -= e.length, a(e));
|
|
118514
|
+
}), this._inflate.on("end", this._filter.end.bind(this._filter));
|
|
118515
|
+
}
|
|
118524
118516
|
}
|
|
118525
118517
|
this._inflate.write(e);
|
|
118526
118518
|
}, u.prototype._handleMetaData = function(e) {
|
|
@@ -118713,7 +118705,7 @@ var yd = /* @__PURE__ */ o(((e, t) => {
|
|
|
118713
118705
|
};
|
|
118714
118706
|
})), Md = /* @__PURE__ */ o(((e, t) => {
|
|
118715
118707
|
var n = wd(), r = Td(), i = Ad(), a = jd(), o = l(), s = t.exports = function(e) {
|
|
118716
|
-
if (this._options = e, e.deflateChunkSize = e.deflateChunkSize ||
|
|
118708
|
+
if (this._options = e, e.deflateChunkSize = e.deflateChunkSize || 32768, e.deflateLevel = e.deflateLevel == null ? 9 : e.deflateLevel, e.deflateStrategy = e.deflateStrategy == null ? 3 : e.deflateStrategy, e.inputHasAlpha = e.inputHasAlpha == null || 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, [
|
|
118717
118709
|
n.COLORTYPE_GRAYSCALE,
|
|
118718
118710
|
n.COLORTYPE_COLOR,
|
|
118719
118711
|
n.COLORTYPE_COLOR_ALPHA,
|
|
@@ -118792,7 +118784,7 @@ var yd = /* @__PURE__ */ o(((e, t) => {
|
|
|
118792
118784
|
let e = o._buffer.slice(o._offset, o._offset + r);
|
|
118793
118785
|
if (o._offset += r, e.length > u && (e = e.slice(0, u)), f.push(e), p += e.length, u -= e.length, u === 0) return !1;
|
|
118794
118786
|
}
|
|
118795
|
-
return (t === 0 || o._offset >= o._chunkSize) && (l = o._chunkSize, o._offset = 0, o._buffer = Buffer.allocUnsafe(o._chunkSize)), t === 0
|
|
118787
|
+
return (t === 0 || o._offset >= o._chunkSize) && (l = o._chunkSize, o._offset = 0, o._buffer = Buffer.allocUnsafe(o._chunkSize)), t === 0 && (d += s - e, s = e, !0);
|
|
118796
118788
|
}
|
|
118797
118789
|
n(this._handle, "zlib binding closed");
|
|
118798
118790
|
let g;
|