flipbookengine 0.1.0 → 0.1.2
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/dist/engine.d.ts +3 -0
- package/dist/flipbook-engine.css +1 -1
- package/dist/flipbook-engine.iife.js +22 -22
- package/dist/flipbook-engine.iife.js.map +1 -1
- package/dist/flipbook-engine.js +528 -458
- package/dist/flipbook-engine.js.map +1 -1
- package/dist/flipbook-engine.react.js +2 -2
- package/dist/flipbook-engine.react.js.map +1 -1
- package/dist/flipbook-engine.vue.js +7 -6
- package/dist/flipbook-engine.vue.js.map +1 -1
- package/dist/react/index.d.ts +1 -1
- package/dist/vue/index.d.ts +5 -2
- package/package.json +7 -3
- package/react/package.json +5 -0
- package/vue/package.json +5 -0
package/dist/flipbook-engine.js
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var Nh = Object.defineProperty;
|
|
2
2
|
var Fo = (b) => {
|
|
3
3
|
throw TypeError(b);
|
|
4
4
|
};
|
|
5
|
-
var
|
|
6
|
-
var
|
|
5
|
+
var Xh = (b, I, g) => I in b ? Nh(b, I, { enumerable: !0, configurable: !0, writable: !0, value: g }) : b[I] = g;
|
|
6
|
+
var M = (b, I, g) => Xh(b, typeof I != "symbol" ? I + "" : I, g), H0 = (b, I, g) => I.has(b) || Fo("Cannot " + g);
|
|
7
7
|
var l = (b, I, g) => (H0(b, I, "read from private field"), g ? g.call(b) : I.get(b)), w = (b, I, g) => I.has(b) ? Fo("Cannot add the same private member more than once") : I instanceof WeakSet ? I.add(b) : I.set(b, g), B = (b, I, g, C) => (H0(b, I, "write to private field"), C ? C.call(b, g) : I.set(b, g), g), Y = (b, I, g) => (H0(b, I, "access private method"), g);
|
|
8
8
|
var OI = (b, I, g, C) => ({
|
|
9
9
|
set _(A) {
|
|
@@ -51,7 +51,7 @@ const Mg = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
51
51
|
HIGHLIGHT_FREE: 33,
|
|
52
52
|
HIGHLIGHT_SHOW_ALL: 34,
|
|
53
53
|
DRAW_STEP: 41
|
|
54
|
-
},
|
|
54
|
+
}, Rh = {
|
|
55
55
|
PRINT: 4,
|
|
56
56
|
MODIFY_CONTENTS: 8,
|
|
57
57
|
COPY: 16,
|
|
@@ -209,15 +209,15 @@ const Mg = typeof process == "object" && process + "" == "[object process]" && !
|
|
|
209
209
|
curveTo: 2,
|
|
210
210
|
quadraticCurveTo: 3,
|
|
211
211
|
closePath: 4
|
|
212
|
-
},
|
|
212
|
+
}, yh = {
|
|
213
213
|
NEED_PASSWORD: 1,
|
|
214
214
|
INCORRECT_PASSWORD: 2
|
|
215
215
|
};
|
|
216
216
|
let e0 = t0.WARNINGS;
|
|
217
|
-
function
|
|
217
|
+
function uh(b) {
|
|
218
218
|
Number.isInteger(b) && (e0 = b);
|
|
219
219
|
}
|
|
220
|
-
function
|
|
220
|
+
function Hh() {
|
|
221
221
|
return e0;
|
|
222
222
|
}
|
|
223
223
|
function n0(b) {
|
|
@@ -232,7 +232,7 @@ function tI(b) {
|
|
|
232
232
|
function CI(b, I) {
|
|
233
233
|
b || tI(I);
|
|
234
234
|
}
|
|
235
|
-
function
|
|
235
|
+
function Mh(b) {
|
|
236
236
|
switch (b == null ? void 0 : b.protocol) {
|
|
237
237
|
case "http:":
|
|
238
238
|
case "https:":
|
|
@@ -254,12 +254,12 @@ function GB(b, I = null, g = null) {
|
|
|
254
254
|
}
|
|
255
255
|
if (g.tryConvertEncoding)
|
|
256
256
|
try {
|
|
257
|
-
b =
|
|
257
|
+
b = Fh(b);
|
|
258
258
|
} catch {
|
|
259
259
|
}
|
|
260
260
|
}
|
|
261
261
|
const C = I ? URL.parse(b, I) : URL.parse(b);
|
|
262
|
-
return
|
|
262
|
+
return Mh(C) ? C : null;
|
|
263
263
|
}
|
|
264
264
|
function bB(b, I, g = !1) {
|
|
265
265
|
const C = URL.parse(b);
|
|
@@ -299,7 +299,7 @@ class jb extends pZ {
|
|
|
299
299
|
super(I, "ResponseException"), this.status = g, this.missing = C;
|
|
300
300
|
}
|
|
301
301
|
}
|
|
302
|
-
class
|
|
302
|
+
class Dh extends pZ {
|
|
303
303
|
constructor(I) {
|
|
304
304
|
super(I, "FormatError");
|
|
305
305
|
}
|
|
@@ -328,14 +328,14 @@ function OG(b) {
|
|
|
328
328
|
g[C] = b.charCodeAt(C) & 255;
|
|
329
329
|
return g;
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function Kh(b) {
|
|
332
332
|
return String.fromCharCode(b >> 24 & 255, b >> 16 & 255, b >> 8 & 255, b & 255);
|
|
333
333
|
}
|
|
334
|
-
function
|
|
334
|
+
function Sh() {
|
|
335
335
|
const b = new Uint8Array(4);
|
|
336
336
|
return b[0] = 1, new Uint32Array(b.buffer, 0, 1)[0] === 1;
|
|
337
337
|
}
|
|
338
|
-
function
|
|
338
|
+
function ph() {
|
|
339
339
|
try {
|
|
340
340
|
return new Function(""), !0;
|
|
341
341
|
} catch {
|
|
@@ -344,10 +344,10 @@ function Sh() {
|
|
|
344
344
|
}
|
|
345
345
|
class _I {
|
|
346
346
|
static get isLittleEndian() {
|
|
347
|
-
return O(this, "isLittleEndian",
|
|
347
|
+
return O(this, "isLittleEndian", Sh());
|
|
348
348
|
}
|
|
349
349
|
static get isEvalSupported() {
|
|
350
|
-
return O(this, "isEvalSupported",
|
|
350
|
+
return O(this, "isEvalSupported", ph());
|
|
351
351
|
}
|
|
352
352
|
static get isOffscreenCanvasSupported() {
|
|
353
353
|
return O(this, "isOffscreenCanvasSupported", typeof OffscreenCanvas < "u");
|
|
@@ -467,11 +467,11 @@ sl = new WeakSet(), cb = function(I, g, C, A, i, Z, d, s, c, G) {
|
|
|
467
467
|
const t = Math.sqrt(a), e = 2 * c;
|
|
468
468
|
Y(this, sl, cb).call(this, I, g, C, A, i, Z, d, s, (-G + t) / e, W), Y(this, sl, cb).call(this, I, g, C, A, i, Z, d, s, (-G - t) / e, W);
|
|
469
469
|
}, w(p, sl);
|
|
470
|
-
function
|
|
470
|
+
function Fh(b) {
|
|
471
471
|
return decodeURIComponent(escape(b));
|
|
472
472
|
}
|
|
473
473
|
let S0 = null, zo = null;
|
|
474
|
-
function
|
|
474
|
+
function Jh(b) {
|
|
475
475
|
return S0 || (S0 = /([\u00a0\u00b5\u037e\u0eb3\u2000-\u200a\u202f\u2126\ufb00-\ufb04\ufb06\ufb20-\ufb36\ufb38-\ufb3c\ufb3e\ufb40-\ufb41\ufb43-\ufb44\ufb46-\ufba1\ufba4-\ufba9\ufbae-\ufbb1\ufbd3-\ufbdc\ufbde-\ufbe7\ufbea-\ufbf8\ufbfc-\ufbfd\ufc00-\ufc5d\ufc64-\ufcf1\ufcf5-\ufd3d\ufd88\ufdf4\ufdfa-\ufdfb\ufe71\ufe77\ufe79\ufe7b\ufe7d]+)|(\ufb05+)/gu, zo = /* @__PURE__ */ new Map([["ſt", "ſt"]])), b.replaceAll(S0, (I, g, C) => g ? g.normalize("NFKC") : zo.get(C));
|
|
476
476
|
}
|
|
477
477
|
function oB() {
|
|
@@ -481,7 +481,7 @@ function oB() {
|
|
|
481
481
|
return crypto.getRandomValues(b), mB(b);
|
|
482
482
|
}
|
|
483
483
|
const UZ = "pdfjs_internal_id_";
|
|
484
|
-
function
|
|
484
|
+
function zh(b, I, g) {
|
|
485
485
|
if (!Array.isArray(g) || g.length < 2)
|
|
486
486
|
return !1;
|
|
487
487
|
const [C, A, ...i] = g;
|
|
@@ -523,7 +523,7 @@ function Dg(b, I, g) {
|
|
|
523
523
|
function BB(b) {
|
|
524
524
|
return Uint8Array.prototype.toBase64 ? b.toBase64() : btoa(mB(b));
|
|
525
525
|
}
|
|
526
|
-
function
|
|
526
|
+
function kh(b) {
|
|
527
527
|
return Uint8Array.fromBase64 ? Uint8Array.fromBase64(b) : OG(atob(b));
|
|
528
528
|
}
|
|
529
529
|
typeof Promise.try != "function" && (Promise.try = function(b, ...I) {
|
|
@@ -715,7 +715,7 @@ class WB {
|
|
|
715
715
|
}
|
|
716
716
|
const nA = "http://www.w3.org/2000/svg", oi = class oi {
|
|
717
717
|
};
|
|
718
|
-
|
|
718
|
+
M(oi, "CSS", 96), M(oi, "PDF", 72), M(oi, "PDF_TO_CSS_UNITS", oi.CSS / oi.PDF);
|
|
719
719
|
let di = oi;
|
|
720
720
|
async function vG(b, I = "text") {
|
|
721
721
|
if (Ms(b, document.baseURI)) {
|
|
@@ -841,10 +841,10 @@ function V0(b) {
|
|
|
841
841
|
function to(b) {
|
|
842
842
|
return typeof b == "string" && /\.pdf$/i.test(b);
|
|
843
843
|
}
|
|
844
|
-
function
|
|
844
|
+
function Lh(b) {
|
|
845
845
|
return [b] = b.split(/[#?]/, 1), b.substring(b.lastIndexOf("/") + 1);
|
|
846
846
|
}
|
|
847
|
-
function
|
|
847
|
+
function Th(b, I = "document.pdf") {
|
|
848
848
|
if (typeof b != "string")
|
|
849
849
|
return I;
|
|
850
850
|
if (V0(b))
|
|
@@ -899,8 +899,8 @@ function Lh(b, I = "document.pdf") {
|
|
|
899
899
|
}
|
|
900
900
|
class ko {
|
|
901
901
|
constructor() {
|
|
902
|
-
|
|
903
|
-
|
|
902
|
+
M(this, "started", /* @__PURE__ */ Object.create(null));
|
|
903
|
+
M(this, "times", []);
|
|
904
904
|
}
|
|
905
905
|
time(I) {
|
|
906
906
|
I in this.started && U(`Timer is already running for ${I}`), this.started[I] = Date.now();
|
|
@@ -939,7 +939,7 @@ function MC(b) {
|
|
|
939
939
|
function LI(b) {
|
|
940
940
|
b.preventDefault(), b.stopPropagation();
|
|
941
941
|
}
|
|
942
|
-
function
|
|
942
|
+
function rh(b) {
|
|
943
943
|
console.log("Deprecated API usage: " + b);
|
|
944
944
|
}
|
|
945
945
|
var Cc;
|
|
@@ -972,7 +972,7 @@ class Qb {
|
|
|
972
972
|
}
|
|
973
973
|
}
|
|
974
974
|
Cc = new WeakMap(), w(Qb, Cc);
|
|
975
|
-
function
|
|
975
|
+
function jh(b, {
|
|
976
976
|
scale: I = 1,
|
|
977
977
|
rotation: g = 0
|
|
978
978
|
}) {
|
|
@@ -994,7 +994,7 @@ function PG(b) {
|
|
|
994
994
|
}
|
|
995
995
|
return b.startsWith("rgb(") ? b.slice(4, -1).split(",").map((I) => parseInt(I)) : b.startsWith("rgba(") ? b.slice(5, -1).split(",").map((I) => parseInt(I)).slice(0, 3) : (U(`Not a valid color format: "${b}"`), [0, 0, 0]);
|
|
996
996
|
}
|
|
997
|
-
function
|
|
997
|
+
function Qh(b) {
|
|
998
998
|
const I = document.createElement("span");
|
|
999
999
|
I.style.visibility = "hidden", I.style.colorScheme = "only light", document.body.append(I);
|
|
1000
1000
|
for (const g of b.keys()) {
|
|
@@ -1069,13 +1069,13 @@ class tA {
|
|
|
1069
1069
|
}
|
|
1070
1070
|
}
|
|
1071
1071
|
const O0 = ["image/apng", "image/avif", "image/bmp", "image/gif", "image/jpeg", "image/png", "image/svg+xml", "image/webp", "image/x-icon"];
|
|
1072
|
-
class
|
|
1072
|
+
class xh {
|
|
1073
1073
|
static get isDarkMode() {
|
|
1074
1074
|
var I;
|
|
1075
1075
|
return O(this, "isDarkMode", !!((I = window == null ? void 0 : window.matchMedia) != null && I.call(window, "(prefers-color-scheme: dark)").matches));
|
|
1076
1076
|
}
|
|
1077
1077
|
}
|
|
1078
|
-
class
|
|
1078
|
+
class Uh {
|
|
1079
1079
|
static get commentForegroundColor() {
|
|
1080
1080
|
const I = document.createElement("span");
|
|
1081
1081
|
I.classList.add("comment", "sidebar");
|
|
@@ -1089,7 +1089,7 @@ class xh {
|
|
|
1089
1089
|
return I.remove(), O(this, "commentForegroundColor", PG(C));
|
|
1090
1090
|
}
|
|
1091
1091
|
}
|
|
1092
|
-
function
|
|
1092
|
+
function Oh(b, I, g, C) {
|
|
1093
1093
|
C = Math.min(Math.max(C ?? 1, 0), 1);
|
|
1094
1094
|
const A = 255 * (1 - C);
|
|
1095
1095
|
return b = Math.round(b * C + A), I = Math.round(I * C + A), g = Math.round(g * C + A), [b, I, g];
|
|
@@ -1149,7 +1149,7 @@ function ro(b, I, g) {
|
|
|
1149
1149
|
return C > A ? (C + 0.05) / (A + 0.05) : (A + 0.05) / (C + 0.05);
|
|
1150
1150
|
}
|
|
1151
1151
|
const jo = /* @__PURE__ */ new Map();
|
|
1152
|
-
function
|
|
1152
|
+
function vh(b, I) {
|
|
1153
1153
|
const g = b[0] + b[1] * 256 + b[2] * 65536 + I[0] * 16777216 + I[1] * 4294967296 + I[2] * 1099511627776;
|
|
1154
1154
|
let C = jo.get(g);
|
|
1155
1155
|
if (C)
|
|
@@ -1372,7 +1372,7 @@ hl = new WeakMap(), wl = new WeakMap(), hC = new WeakMap(), wC = new WeakMap(),
|
|
|
1372
1372
|
}, w(XA, g0), w(XA, lc, null);
|
|
1373
1373
|
let E0 = XA;
|
|
1374
1374
|
var ic, hi, yA, bl, eB, nB, P0;
|
|
1375
|
-
class
|
|
1375
|
+
class Eh {
|
|
1376
1376
|
constructor(I) {
|
|
1377
1377
|
w(this, bl);
|
|
1378
1378
|
w(this, ic, null);
|
|
@@ -1477,7 +1477,7 @@ const GI = class GI {
|
|
|
1477
1477
|
wi = new WeakMap(), ai = new WeakMap(), Id = new WeakMap(), Yi = new WeakMap(), w(GI, wi, NaN), w(GI, ai, null), w(GI, Id, NaN), w(GI, Yi, null);
|
|
1478
1478
|
let ag = GI;
|
|
1479
1479
|
var C0;
|
|
1480
|
-
class
|
|
1480
|
+
class Ph {
|
|
1481
1481
|
constructor() {
|
|
1482
1482
|
w(this, C0, 0);
|
|
1483
1483
|
}
|
|
@@ -1606,7 +1606,7 @@ gd = new WeakMap(), Zc = new WeakMap(), Yg = new WeakMap(), Cd = new WeakSet(),
|
|
|
1606
1606
|
};
|
|
1607
1607
|
let f0 = uo;
|
|
1608
1608
|
var TI, Yl, dc, MI;
|
|
1609
|
-
class
|
|
1609
|
+
class fh {
|
|
1610
1610
|
constructor(I = 128) {
|
|
1611
1611
|
w(this, TI, []);
|
|
1612
1612
|
w(this, Yl, !1);
|
|
@@ -1728,7 +1728,7 @@ A0 = new WeakSet(), NB = function(I) {
|
|
|
1728
1728
|
const l0 = class l0 {
|
|
1729
1729
|
get _colors() {
|
|
1730
1730
|
const I = /* @__PURE__ */ new Map([["CanvasText", null], ["Canvas", null]]);
|
|
1731
|
-
return
|
|
1731
|
+
return Qh(I), O(this, "_colors", I);
|
|
1732
1732
|
}
|
|
1733
1733
|
convert(I) {
|
|
1734
1734
|
const g = PG(I);
|
|
@@ -1744,7 +1744,7 @@ const l0 = class l0 {
|
|
|
1744
1744
|
return g ? p.makeHexColor(...g) : I;
|
|
1745
1745
|
}
|
|
1746
1746
|
};
|
|
1747
|
-
|
|
1747
|
+
M(l0, "_colorsMapping", /* @__PURE__ */ new Map([["CanvasText", [0, 0, 0]], ["Canvas", [255, 255, 255]]]));
|
|
1748
1748
|
let q0 = l0;
|
|
1749
1749
|
var Ad, Ug, ld, pI, PI, id, aC, Zd, YC, tg, tl, el, dd, nl, qC, tC, ti, sc, cc, sd, Gc, _C, Vl, cd, Nl, $C, i0, Xl, Gd, bc, Rl, ei, bd, yl, mc, xI, sI, uA, ul, Hl, oc, md, Bc, Ml, IA, HA, Wc, hc, eC, S, bb, _0, XB, RB, Ks, yB, uB, HB, $0, MB, DB, KB, SB, Xg, VA, pB, FB, Im, JB, Ss, gm;
|
|
1750
1750
|
const vZ = class vZ {
|
|
@@ -1758,7 +1758,7 @@ const vZ = class vZ {
|
|
|
1758
1758
|
w(this, id, null);
|
|
1759
1759
|
w(this, aC, null);
|
|
1760
1760
|
w(this, Zd, null);
|
|
1761
|
-
w(this, YC, new
|
|
1761
|
+
w(this, YC, new fh());
|
|
1762
1762
|
w(this, tg, null);
|
|
1763
1763
|
w(this, tl, null);
|
|
1764
1764
|
w(this, el, null);
|
|
@@ -1767,7 +1767,7 @@ const vZ = class vZ {
|
|
|
1767
1767
|
w(this, qC, null);
|
|
1768
1768
|
w(this, tC, null);
|
|
1769
1769
|
w(this, ti, /* @__PURE__ */ new Set());
|
|
1770
|
-
|
|
1770
|
+
M(this, "_editorUndoBar", null);
|
|
1771
1771
|
w(this, sc, !1);
|
|
1772
1772
|
w(this, cc, !1);
|
|
1773
1773
|
w(this, sd, !1);
|
|
@@ -1777,7 +1777,7 @@ const vZ = class vZ {
|
|
|
1777
1777
|
w(this, cd, null);
|
|
1778
1778
|
w(this, Nl, !1);
|
|
1779
1779
|
w(this, $C, null);
|
|
1780
|
-
w(this, i0, new
|
|
1780
|
+
w(this, i0, new Ph());
|
|
1781
1781
|
w(this, Xl, !1);
|
|
1782
1782
|
w(this, Gd, !1);
|
|
1783
1783
|
w(this, bc, !1);
|
|
@@ -2755,7 +2755,7 @@ Ad = new WeakMap(), Ug = new WeakMap(), ld = new WeakMap(), pI = new WeakMap(),
|
|
|
2755
2755
|
if (!I || I.isCollapsed)
|
|
2756
2756
|
return;
|
|
2757
2757
|
const C = Y(this, S, bb).call(this, I).closest(".textLayer"), A = this.getSelectionBoxes(C);
|
|
2758
|
-
A && (l(this, $C) || B(this, $C, new
|
|
2758
|
+
A && (l(this, $C) || B(this, $C, new Eh(this)), l(this, $C).show(C, A, this.direction === "ltr"));
|
|
2759
2759
|
}, RB = function() {
|
|
2760
2760
|
var i, Z, d;
|
|
2761
2761
|
const I = document.getSelection();
|
|
@@ -2899,7 +2899,7 @@ Ad = new WeakMap(), Ug = new WeakMap(), ld = new WeakMap(), pI = new WeakMap(),
|
|
|
2899
2899
|
Y(this, S, Xg).call(this, {
|
|
2900
2900
|
hasSelectedEditor: this.hasSelection
|
|
2901
2901
|
});
|
|
2902
|
-
},
|
|
2902
|
+
}, M(vZ, "TRANSLATE_SMALL", 1), M(vZ, "TRANSLATE_BIG", 10);
|
|
2903
2903
|
let KZ = vZ;
|
|
2904
2904
|
var $I, gA, pC, od, CA, Og, Bd, AA, zg, MA, ni, lA, Dl, OC, ps, mb;
|
|
2905
2905
|
const Rg = class Rg {
|
|
@@ -3073,7 +3073,7 @@ $I = new WeakMap(), gA = new WeakMap(), pC = new WeakMap(), od = new WeakMap(),
|
|
|
3073
3073
|
l(this, gA) ? g.setAttribute("data-l10n-id", "pdfjs-editor-alt-text-decorative-tooltip") : (g.removeAttribute("data-l10n-id"), g.textContent = l(this, $I)), g.parentNode || I.append(g);
|
|
3074
3074
|
const C = l(this, zg).getElementForAltText();
|
|
3075
3075
|
C == null || C.setAttribute("aria-describedby", g.id);
|
|
3076
|
-
}, w(Rg, Dl, null),
|
|
3076
|
+
}, w(Rg, Dl, null), M(Rg, "_l10n", null);
|
|
3077
3077
|
let xb = Rg;
|
|
3078
3078
|
var dg, nC, Vi, VI, wc, Ni, FC, Xi, Ri, yi, ac, Cm;
|
|
3079
3079
|
class $G {
|
|
@@ -3411,14 +3411,14 @@ const v = class v {
|
|
|
3411
3411
|
w(this, ad, 0);
|
|
3412
3412
|
w(this, NC, null);
|
|
3413
3413
|
w(this, Fi, null);
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
3420
|
-
|
|
3421
|
-
|
|
3414
|
+
M(this, "isSelected", !1);
|
|
3415
|
+
M(this, "_isCopy", !1);
|
|
3416
|
+
M(this, "_editToolbar", null);
|
|
3417
|
+
M(this, "_initialOptions", /* @__PURE__ */ Object.create(null));
|
|
3418
|
+
M(this, "_initialData", null);
|
|
3419
|
+
M(this, "_isVisible", !0);
|
|
3420
|
+
M(this, "_uiManager", null);
|
|
3421
|
+
M(this, "_focusEventsAllowed", !0);
|
|
3422
3422
|
w(this, yc, !1);
|
|
3423
3423
|
w(this, Z0, v._zIndex++);
|
|
3424
3424
|
this.parent = I.parent, this.id = I.id, this.width = this.height = null, this.pageIndex = I.parent.pageIndex, this.name = I.name, this.div = null, this._uiManager = I.uiManager, this.annotationElementId = null, this._willKeepAspectRatio = !1, this._initialOptions.isCentered = I.isCentered, this._structTreeParentId = null, this.annotationElementId = I.annotationElementId || null, this.creationDate = I.creationDate || /* @__PURE__ */ new Date(), this.modificationDate = I.modificationDate || null, this.canAddComment = !0;
|
|
@@ -3468,7 +3468,7 @@ const v = class v {
|
|
|
3468
3468
|
return O(this, "_defaultLineColor", this._colorManager.getHexCode("CanvasText"));
|
|
3469
3469
|
}
|
|
3470
3470
|
static deleteAnnotationElement(I) {
|
|
3471
|
-
const g = new
|
|
3471
|
+
const g = new qh({
|
|
3472
3472
|
id: I.parent.getNextId(),
|
|
3473
3473
|
parent: I.parent,
|
|
3474
3474
|
uiManager: I._uiManager
|
|
@@ -4443,23 +4443,23 @@ Di = new WeakMap(), JC = new WeakMap(), yI = new WeakMap(), wI = new WeakMap(),
|
|
|
4443
4443
|
const N = e(d, s), o = X(d, s);
|
|
4444
4444
|
let h = W(...o);
|
|
4445
4445
|
const n = v._round(i + h[0]), R = v._round(Z + h[1]);
|
|
4446
|
-
let u = 1, H = 1, K,
|
|
4446
|
+
let u = 1, H = 1, K, D;
|
|
4447
4447
|
if (g.fromKeyboard)
|
|
4448
4448
|
({
|
|
4449
4449
|
deltaX: K,
|
|
4450
|
-
deltaY:
|
|
4450
|
+
deltaY: D
|
|
4451
4451
|
} = g);
|
|
4452
4452
|
else {
|
|
4453
4453
|
const {
|
|
4454
4454
|
screenX: r,
|
|
4455
4455
|
screenY: j
|
|
4456
4456
|
} = g, [iI, Ng] = l(this, Ki);
|
|
4457
|
-
[K,
|
|
4457
|
+
[K, D] = this.screenToPageTranslation(r - iI, j - Ng), l(this, Ki)[0] = r, l(this, Ki)[1] = j;
|
|
4458
4458
|
}
|
|
4459
|
-
if ([K,
|
|
4459
|
+
if ([K, D] = t(K / C, D / A), V) {
|
|
4460
4460
|
const r = Math.hypot(d, s);
|
|
4461
|
-
u = H = Math.max(Math.min(Math.hypot(o[0] - N[0] - K, o[1] - N[1] -
|
|
4462
|
-
} else y ? u = Dg(Math.abs(o[0] - N[0] - K), c, 1) / d : H = Dg(Math.abs(o[1] - N[1] -
|
|
4461
|
+
u = H = Math.max(Math.min(Math.hypot(o[0] - N[0] - K, o[1] - N[1] - D) / r, 1 / d, 1 / s), c / d, G / s);
|
|
4462
|
+
} else y ? u = Dg(Math.abs(o[0] - N[0] - K), c, 1) / d : H = Dg(Math.abs(o[1] - N[1] - D), G, 1) / s;
|
|
4463
4463
|
const z = v._round(d * u), L = v._round(s * H);
|
|
4464
4464
|
h = W(...X(z, L));
|
|
4465
4465
|
const T = n - h[0], x = R - h[1];
|
|
@@ -4556,9 +4556,9 @@ Di = new WeakMap(), JC = new WeakMap(), yI = new WeakMap(), wI = new WeakMap(),
|
|
|
4556
4556
|
g.tabIndex = I;
|
|
4557
4557
|
}, Fs = function() {
|
|
4558
4558
|
B(this, JA, !1), Y(this, Q, cm).call(this, -1), Y(this, Q, Bb).call(this);
|
|
4559
|
-
}, w(v, uc),
|
|
4559
|
+
}, w(v, uc), M(v, "_l10n", null), M(v, "_l10nResizer", null), M(v, "_borderLineWidth", -1), M(v, "_colorManager", new q0()), M(v, "_zIndex", 1), M(v, "_telemetryTimeout", 1e3);
|
|
4560
4560
|
let NI = v;
|
|
4561
|
-
class
|
|
4561
|
+
class qh extends NI {
|
|
4562
4562
|
constructor(I) {
|
|
4563
4563
|
super(I), this.annotationElementId = I.annotationElementId, this.deleted = !0;
|
|
4564
4564
|
}
|
|
@@ -4774,7 +4774,7 @@ class qB extends eo {
|
|
|
4774
4774
|
}
|
|
4775
4775
|
Hc = new WeakMap();
|
|
4776
4776
|
var Yd;
|
|
4777
|
-
class
|
|
4777
|
+
class _h {
|
|
4778
4778
|
constructor({
|
|
4779
4779
|
ownerDocument: I = globalThis.document,
|
|
4780
4780
|
styleElement: g = null
|
|
@@ -4909,7 +4909,7 @@ class qh {
|
|
|
4909
4909
|
let X = C(W, t);
|
|
4910
4910
|
for (i = 0, Z = m.length - 3; i < Z; i += 4)
|
|
4911
4911
|
X = X - e + C(m, i) | 0;
|
|
4912
|
-
i < m.length && (X = X - e + C(m + "XXX", i) | 0), W = A(W, t, 4,
|
|
4912
|
+
i < m.length && (X = X - e + C(m + "XXX", i) | 0), W = A(W, t, 4, Kh(X));
|
|
4913
4913
|
const V = `url(data:font/opentype;base64,${btoa(W)});`, y = `@font-face {font-family:"${m}";src:${V}}`;
|
|
4914
4914
|
this.insertRule(y);
|
|
4915
4915
|
const N = this._document.createElement("div");
|
|
@@ -4925,7 +4925,7 @@ class qh {
|
|
|
4925
4925
|
}
|
|
4926
4926
|
Yd = new WeakMap();
|
|
4927
4927
|
var bI;
|
|
4928
|
-
class
|
|
4928
|
+
class $h {
|
|
4929
4929
|
constructor(I, g = null, C, A) {
|
|
4930
4930
|
w(this, bI);
|
|
4931
4931
|
this.compiledGlyphs = /* @__PURE__ */ Object.create(null), B(this, bI, I), this._inspectFont = g, C && Object.assign(this, C), A && (this.charProcOperatorList = A);
|
|
@@ -5093,7 +5093,7 @@ td = new WeakMap(), ed = new WeakMap(), Mc = new WeakMap(), nd = new WeakSet(),
|
|
|
5093
5093
|
g += l(this, ed).getUint32(g) + 4;
|
|
5094
5094
|
const C = l(this, ed).getUint32(g);
|
|
5095
5095
|
return l(this, Mc).decode(new Uint8Array(l(this, td), g + 4, C));
|
|
5096
|
-
},
|
|
5096
|
+
}, M(EZ, "strings", ["fontFamily", "fontWeight", "italicAngle"]);
|
|
5097
5097
|
let Ob = EZ;
|
|
5098
5098
|
var pl, ZA, ki, Li, Js;
|
|
5099
5099
|
const PZ = class PZ {
|
|
@@ -5157,7 +5157,7 @@ pl = new WeakMap(), ZA = new WeakMap(), ki = new WeakMap(), Li = new WeakSet(),
|
|
|
5157
5157
|
g += l(this, ZA).getUint32(g) + 4;
|
|
5158
5158
|
const C = l(this, ZA).getUint32(g);
|
|
5159
5159
|
return l(this, ki).decode(new Uint8Array(l(this, pl), g + 4, C));
|
|
5160
|
-
},
|
|
5160
|
+
}, M(PZ, "strings", ["css", "loadedName", "baseFontName", "src"]);
|
|
5161
5161
|
let vb = PZ;
|
|
5162
5162
|
var Vd, Nd, Xd, Rd, Eg, dA, Dc, mI, kI, KC, hb, zs;
|
|
5163
5163
|
const f = class f {
|
|
@@ -5364,7 +5364,7 @@ Vd = new WeakMap(), Nd = new WeakMap(), Xd = new WeakMap(), Rd = new WeakMap(),
|
|
|
5364
5364
|
g += l(this, mI).getUint32(g) + 4;
|
|
5365
5365
|
const C = l(this, mI).getUint32(g), A = new Uint8Array(C);
|
|
5366
5366
|
return A.set(new Uint8Array(l(this, dA), g + 4, C)), l(this, Dc).decode(A);
|
|
5367
|
-
},
|
|
5367
|
+
}, M(f, "bools", ["black", "bold", "disableFontFace", "fontExtraProperties", "isInvalidPDFjsFont", "isType3Font", "italic", "missingFile", "remeasure", "vertical"]), M(f, "numbers", ["ascent", "defaultWidth", "descent"]), M(f, "strings", ["fallbackName", "loadedName", "mimetype", "name"]), w(f, Vd, Math.ceil(f.bools.length * 2 / 8)), w(f, Nd, l(f, Vd) + f.numbers.length * 8), w(f, Xd, l(f, Nd) + 1 + 2 * 4), w(f, Rd, l(f, Xd) + 1 + 8 * 6), w(f, Eg, l(f, Rd) + 1 + 2 * 3);
|
|
5368
5368
|
let bm = f;
|
|
5369
5369
|
var Kc, Sc, pc, Fc, Jc, zc, kc, Lc;
|
|
5370
5370
|
const nI = class nI {
|
|
@@ -5467,7 +5467,7 @@ const nI = class nI {
|
|
|
5467
5467
|
Kc = new WeakMap(), Sc = new WeakMap(), pc = new WeakMap(), Fc = new WeakMap(), Jc = new WeakMap(), zc = new WeakMap(), kc = new WeakMap(), Lc = new WeakMap(), w(nI, Kc, 0), w(nI, Sc, 1), w(nI, pc, 2), w(nI, Fc, 3), w(nI, Jc, 4), w(nI, zc, 8), w(nI, kc, 12), w(nI, Lc, 16);
|
|
5468
5468
|
let mm = nI;
|
|
5469
5469
|
var yd;
|
|
5470
|
-
class
|
|
5470
|
+
class Iw {
|
|
5471
5471
|
constructor(I) {
|
|
5472
5472
|
w(this, yd);
|
|
5473
5473
|
B(this, yd, I);
|
|
@@ -5481,7 +5481,7 @@ class $h {
|
|
|
5481
5481
|
}
|
|
5482
5482
|
}
|
|
5483
5483
|
yd = new WeakMap();
|
|
5484
|
-
function
|
|
5484
|
+
function gw(b) {
|
|
5485
5485
|
if (b instanceof URL)
|
|
5486
5486
|
return b.href;
|
|
5487
5487
|
if (typeof b == "string") {
|
|
@@ -5493,7 +5493,7 @@ function Iw(b) {
|
|
|
5493
5493
|
}
|
|
5494
5494
|
throw new Error("Invalid PDF url data: either string or URL-object is expected in the url property.");
|
|
5495
5495
|
}
|
|
5496
|
-
function
|
|
5496
|
+
function Cw(b) {
|
|
5497
5497
|
if (Mg && typeof Buffer < "u" && b instanceof Buffer)
|
|
5498
5498
|
throw new Error("Please provide binary data as `Uint8Array`, rather than `Buffer`.");
|
|
5499
5499
|
if (b instanceof Uint8Array && b.byteLength === b.buffer.byteLength)
|
|
@@ -5511,9 +5511,9 @@ function Ib(b) {
|
|
|
5511
5511
|
return b;
|
|
5512
5512
|
throw new Error(`Invalid factory url: "${b}" must include trailing slash.`);
|
|
5513
5513
|
}
|
|
5514
|
-
const om = (b) => typeof b == "object" && Number.isInteger(b == null ? void 0 : b.num) && b.num >= 0 && Number.isInteger(b == null ? void 0 : b.gen) && b.gen >= 0,
|
|
5514
|
+
const om = (b) => typeof b == "object" && Number.isInteger(b == null ? void 0 : b.num) && b.num >= 0 && Number.isInteger(b == null ? void 0 : b.gen) && b.gen >= 0, Aw = (b) => typeof b == "object" && typeof (b == null ? void 0 : b.name) == "string", lw = zh.bind(null, om, Aw);
|
|
5515
5515
|
var kA, s0;
|
|
5516
|
-
class
|
|
5516
|
+
class iw {
|
|
5517
5517
|
constructor() {
|
|
5518
5518
|
w(this, kA, /* @__PURE__ */ new Map());
|
|
5519
5519
|
w(this, s0, Promise.resolve());
|
|
@@ -5898,7 +5898,7 @@ class gW {
|
|
|
5898
5898
|
}
|
|
5899
5899
|
}
|
|
5900
5900
|
Tc = new WeakMap();
|
|
5901
|
-
class
|
|
5901
|
+
class Zw extends gW {
|
|
5902
5902
|
constructor({
|
|
5903
5903
|
ownerDocument: I = globalThis.document,
|
|
5904
5904
|
enableHWA: g = !1
|
|
@@ -5964,7 +5964,7 @@ class AW {
|
|
|
5964
5964
|
}
|
|
5965
5965
|
}
|
|
5966
5966
|
var Ti, Hd, LA, TA, eg, ri, ji, F, wg, Ls, LZ, ab, TZ, lW, Bm, rZ, Ts, rs, Wm, js;
|
|
5967
|
-
class
|
|
5967
|
+
class dw extends AW {
|
|
5968
5968
|
constructor({
|
|
5969
5969
|
docId: g,
|
|
5970
5970
|
ownerDocument: C = globalThis.document
|
|
@@ -6064,14 +6064,14 @@ class Zw extends AW {
|
|
|
6064
6064
|
const e = (N, o, h) => {
|
|
6065
6065
|
const n = new Array(256), R = (W - m) / h, u = N / 255, H = (o - N) / (255 * h);
|
|
6066
6066
|
let K = 0;
|
|
6067
|
-
for (let
|
|
6068
|
-
const z = Math.round(m +
|
|
6067
|
+
for (let D = 0; D <= h; D++) {
|
|
6068
|
+
const z = Math.round(m + D * R), L = u + D * H;
|
|
6069
6069
|
for (let T = K; T <= z; T++)
|
|
6070
6070
|
n[T] = L;
|
|
6071
6071
|
K = z + 1;
|
|
6072
6072
|
}
|
|
6073
|
-
for (let
|
|
6074
|
-
n[
|
|
6073
|
+
for (let D = K; D < 256; D++)
|
|
6074
|
+
n[D] = n[K - 1];
|
|
6075
6075
|
return n.join(",");
|
|
6076
6076
|
}, X = `g_${l(this, TA)}_hcm_${g}_filter`, V = s.filter = Y(this, F, rZ).call(this, X);
|
|
6077
6077
|
return Y(this, F, Bm).call(this, V), Y(this, F, rs).call(this, e(a[0], t[0], 5), e(a[1], t[1], 5), e(a[2], t[2], 5), V), s.url = Y(this, F, TZ).call(this, X), s.url;
|
|
@@ -6196,24 +6196,24 @@ async function no(b) {
|
|
|
6196
6196
|
const g = await process.getBuiltinModule("fs").promises.readFile(b);
|
|
6197
6197
|
return new Uint8Array(g);
|
|
6198
6198
|
}
|
|
6199
|
-
class
|
|
6199
|
+
class sw extends AW {
|
|
6200
6200
|
}
|
|
6201
|
-
class
|
|
6201
|
+
class cw extends gW {
|
|
6202
6202
|
_createCanvas(I, g) {
|
|
6203
6203
|
return process.getBuiltinModule("module").createRequire(import.meta.url)("@napi-rs/canvas").createCanvas(I, g);
|
|
6204
6204
|
}
|
|
6205
6205
|
}
|
|
6206
|
-
class
|
|
6206
|
+
class Gw extends CW {
|
|
6207
6207
|
async _fetch(I) {
|
|
6208
6208
|
return no(I);
|
|
6209
6209
|
}
|
|
6210
6210
|
}
|
|
6211
|
-
class
|
|
6211
|
+
class bw extends iW {
|
|
6212
6212
|
async _fetch(I) {
|
|
6213
6213
|
return no(I);
|
|
6214
6214
|
}
|
|
6215
6215
|
}
|
|
6216
|
-
class
|
|
6216
|
+
class mw extends ZW {
|
|
6217
6217
|
async _fetch(I) {
|
|
6218
6218
|
return no(I);
|
|
6219
6219
|
}
|
|
@@ -6227,7 +6227,7 @@ function Cb(b, I, g, C, A, i) {
|
|
|
6227
6227
|
}
|
|
6228
6228
|
const hm = new Uint32Array(new Uint8Array([255, 255, 0, 0]).buffer)[0];
|
|
6229
6229
|
var Md, Fl;
|
|
6230
|
-
class
|
|
6230
|
+
class ow {
|
|
6231
6231
|
constructor(I, g) {
|
|
6232
6232
|
w(this, Md);
|
|
6233
6233
|
w(this, Fl);
|
|
@@ -6263,7 +6263,7 @@ const Ab = (b, I) => {
|
|
|
6263
6263
|
}, b.set(I, g)), g;
|
|
6264
6264
|
};
|
|
6265
6265
|
var kg, Lg, Qi, zC, xi, rA, cI, oI, jA, Tg, rc, Dd, Ui, Oi, QA, ng, sA, jc, wm;
|
|
6266
|
-
class
|
|
6266
|
+
class Bw {
|
|
6267
6267
|
constructor(I, g, C = !1) {
|
|
6268
6268
|
w(this, jc);
|
|
6269
6269
|
w(this, kg, {
|
|
@@ -6466,7 +6466,7 @@ class ow {
|
|
|
6466
6466
|
l(this, Tg).add(g);
|
|
6467
6467
|
}
|
|
6468
6468
|
take() {
|
|
6469
|
-
return l(this, Dd).clear(), new
|
|
6469
|
+
return l(this, Dd).clear(), new ow(l(this, ng), l(this, QA));
|
|
6470
6470
|
}
|
|
6471
6471
|
takeDebugMetadata() {
|
|
6472
6472
|
return l(this, sA);
|
|
@@ -6611,7 +6611,7 @@ class Vo {
|
|
|
6611
6611
|
tI("Abstract method `getPattern` called.");
|
|
6612
6612
|
}
|
|
6613
6613
|
}
|
|
6614
|
-
class
|
|
6614
|
+
class Ww extends Vo {
|
|
6615
6615
|
constructor(I) {
|
|
6616
6616
|
super(), this._type = I[1], this._bbox = I[2], this._colorStops = I[3], this._p0 = I[4], this._p1 = I[5], this._r0 = I[6], this._r1 = I[7], this.matrix = null;
|
|
6617
6617
|
}
|
|
@@ -6667,7 +6667,7 @@ function p0(b, I, g, C, A, i, Z, d) {
|
|
|
6667
6667
|
const a = (s[g] + I.offsetX) * I.scaleX, t = (s[g + 1] + I.offsetY) * I.scaleY, e = (s[C] + I.offsetX) * I.scaleX, X = (s[C + 1] + I.offsetY) * I.scaleY, V = (s[A] + I.offsetX) * I.scaleX, y = (s[A + 1] + I.offsetY) * I.scaleY;
|
|
6668
6668
|
if (t >= y)
|
|
6669
6669
|
return;
|
|
6670
|
-
const N = c[i], o = c[i + 1], h = c[i + 2], n = c[Z], R = c[Z + 1], u = c[Z + 2], H = c[d], K = c[d + 1],
|
|
6670
|
+
const N = c[i], o = c[i + 1], h = c[i + 2], n = c[Z], R = c[Z + 1], u = c[Z + 2], H = c[d], K = c[d + 1], D = c[d + 2], z = Math.round(t), L = Math.round(y);
|
|
6671
6671
|
let T, x, r, j, iI, Ng, Wg, pg;
|
|
6672
6672
|
for (let hI = z; hI <= L; hI++) {
|
|
6673
6673
|
if (hI < X) {
|
|
@@ -6675,17 +6675,17 @@ function p0(b, I, g, C, A, i, Z, d) {
|
|
|
6675
6675
|
T = a - (a - e) * SI, x = N - (N - n) * SI, r = o - (o - R) * SI, j = h - (h - u) * SI;
|
|
6676
6676
|
} else {
|
|
6677
6677
|
let SI;
|
|
6678
|
-
hI > y ? SI = 1 : X === y ? SI = 0 : SI = (X - hI) / (X - y), T = e - (e - V) * SI, x = n - (n - H) * SI, r = R - (R - K) * SI, j = u - (u -
|
|
6678
|
+
hI > y ? SI = 1 : X === y ? SI = 0 : SI = (X - hI) / (X - y), T = e - (e - V) * SI, x = n - (n - H) * SI, r = R - (R - K) * SI, j = u - (u - D) * SI;
|
|
6679
6679
|
}
|
|
6680
6680
|
let eI;
|
|
6681
|
-
hI < t ? eI = 0 : hI > y ? eI = 1 : eI = (t - hI) / (t - y), iI = a - (a - V) * eI, Ng = N - (N - H) * eI, Wg = o - (o - K) * eI, pg = h - (h -
|
|
6681
|
+
hI < t ? eI = 0 : hI > y ? eI = 1 : eI = (t - hI) / (t - y), iI = a - (a - V) * eI, Ng = N - (N - H) * eI, Wg = o - (o - K) * eI, pg = h - (h - D) * eI;
|
|
6682
6682
|
const DC = Math.round(Math.min(T, iI)), HI = Math.round(Math.max(T, iI));
|
|
6683
6683
|
let hg = m * hI + DC * 4;
|
|
6684
6684
|
for (let SI = DC; SI <= HI; SI++)
|
|
6685
6685
|
eI = (T - SI) / (T - iI), eI < 0 ? eI = 0 : eI > 1 && (eI = 1), G[hg++] = x - (x - Ng) * eI | 0, G[hg++] = r - (r - Wg) * eI | 0, G[hg++] = j - (j - pg) * eI | 0, G[hg++] = 255;
|
|
6686
6686
|
}
|
|
6687
6687
|
}
|
|
6688
|
-
function
|
|
6688
|
+
function hw(b, I, g) {
|
|
6689
6689
|
const C = I.coords, A = I.colors;
|
|
6690
6690
|
let i, Z;
|
|
6691
6691
|
switch (I.type) {
|
|
@@ -6705,7 +6705,7 @@ function Ww(b, I, g) {
|
|
|
6705
6705
|
throw new Error("illegal figure");
|
|
6706
6706
|
}
|
|
6707
6707
|
}
|
|
6708
|
-
class
|
|
6708
|
+
class ww extends Vo {
|
|
6709
6709
|
constructor(I) {
|
|
6710
6710
|
super(), this._coords = I[2], this._colors = I[3], this._figures = I[4], this._bounds = I[5], this._bbox = I[6], this._background = I[7], this.matrix = null;
|
|
6711
6711
|
}
|
|
@@ -6724,7 +6724,7 @@ class hw extends Vo {
|
|
|
6724
6724
|
n[R] = g[0], n[R + 1] = g[1], n[R + 2] = g[2], n[R + 3] = 255;
|
|
6725
6725
|
}
|
|
6726
6726
|
for (const n of this._figures)
|
|
6727
|
-
|
|
6727
|
+
hw(o, n, e);
|
|
6728
6728
|
return N.putImageData(o, 2, 2), {
|
|
6729
6729
|
canvas: y.canvas,
|
|
6730
6730
|
offsetX: d - 2 * a,
|
|
@@ -6751,19 +6751,19 @@ class hw extends Vo {
|
|
|
6751
6751
|
return A !== mg.SHADING && (I.setTransform(...g.baseTransform), this.matrix && I.transform(...this.matrix)), I.translate(Z.offsetX, Z.offsetY), I.scale(Z.scaleX, Z.scaleY), I.createPattern(Z.canvas, "no-repeat");
|
|
6752
6752
|
}
|
|
6753
6753
|
}
|
|
6754
|
-
class
|
|
6754
|
+
class aw extends Vo {
|
|
6755
6755
|
getPattern() {
|
|
6756
6756
|
return "hotpink";
|
|
6757
6757
|
}
|
|
6758
6758
|
}
|
|
6759
|
-
function
|
|
6759
|
+
function Yw(b) {
|
|
6760
6760
|
switch (b[0]) {
|
|
6761
6761
|
case "RadialAxial":
|
|
6762
|
-
return new
|
|
6762
|
+
return new Ww(b);
|
|
6763
6763
|
case "Mesh":
|
|
6764
|
-
return new
|
|
6764
|
+
return new ww(b);
|
|
6765
6765
|
case "Dummy":
|
|
6766
|
-
return new
|
|
6766
|
+
return new aw();
|
|
6767
6767
|
}
|
|
6768
6768
|
throw new Error(`Unknown IR type: ${b[0]}`);
|
|
6769
6769
|
}
|
|
@@ -6795,8 +6795,8 @@ const fo = {
|
|
|
6795
6795
|
p.singularValueDecompose2dScale(this.baseTransform, V);
|
|
6796
6796
|
const o = y * V[0], h = N * V[1];
|
|
6797
6797
|
let n = e, R = X, u = !1, H = !1;
|
|
6798
|
-
const K = Math.ceil(c * o),
|
|
6799
|
-
K >= z ? n = c : u = !0,
|
|
6798
|
+
const K = Math.ceil(c * o), D = Math.ceil(G * h), z = Math.ceil(e * o), L = Math.ceil(X * h);
|
|
6799
|
+
K >= z ? n = c : u = !0, D >= L ? R = G : H = !0;
|
|
6800
6800
|
const T = this.getSizeAndScale(n, this.ctx.canvas.width, o), x = this.getSizeAndScale(R, this.ctx.canvas.height, h), r = I.cachedCanvases.getCanvas("pattern", T.size, x.size), j = r.context, iI = s.createCanvasGraphics(j, g);
|
|
6801
6801
|
if (iI.groupLevel = I.groupLevel, this.setFillAndStrokeStyleToContext(iI, i, d), j.translate(-T.scale * m, -x.scale * W), iI.transform(0, T.scale, 0, 0, x.scale, 0, 0), j.save(), (Ng = iI.dependencyTracker) == null || Ng.save(), this.clipBbox(iI, m, W, a, t), iI.baseTransform = DI(iI.ctx), iI.executeOperatorList(A), iI.endDrawing(), (Wg = iI.dependencyTracker) == null || Wg.restore(), j.restore(), u || H) {
|
|
6802
6802
|
const pg = r.canvas;
|
|
@@ -6847,7 +6847,7 @@ const fo = {
|
|
|
6847
6847
|
A.fillStyle = A.strokeStyle = C, i.fillColor = i.strokeColor = C;
|
|
6848
6848
|
break;
|
|
6849
6849
|
default:
|
|
6850
|
-
throw new
|
|
6850
|
+
throw new Dh(`Unsupported paint type: ${g}`);
|
|
6851
6851
|
}
|
|
6852
6852
|
}
|
|
6853
6853
|
isModifyingCurrentTransform() {
|
|
@@ -6863,9 +6863,9 @@ const fo = {
|
|
|
6863
6863
|
return c.setTransform(s), c;
|
|
6864
6864
|
}
|
|
6865
6865
|
};
|
|
6866
|
-
|
|
6866
|
+
M(c0, "MAX_PATTERN_SIZE", 3e3);
|
|
6867
6867
|
let Ym = c0;
|
|
6868
|
-
function
|
|
6868
|
+
function tw({
|
|
6869
6869
|
src: b,
|
|
6870
6870
|
srcPos: I = 0,
|
|
6871
6871
|
dest: g,
|
|
@@ -6893,8 +6893,8 @@ function Yw({
|
|
|
6893
6893
|
destPos: a
|
|
6894
6894
|
};
|
|
6895
6895
|
}
|
|
6896
|
-
const qo = 16, _o = 100,
|
|
6897
|
-
function
|
|
6896
|
+
const qo = 16, _o = 100, ew = 15, $o = 10, Qg = 16, F0 = new DOMMatrix(), bC = new Float32Array(2), OZ = new Float32Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]);
|
|
6897
|
+
function nw(b, I) {
|
|
6898
6898
|
if (b._removeMirroring)
|
|
6899
6899
|
throw new Error("Context is already forwarding operations.");
|
|
6900
6900
|
b.__originalSave = b.save, b.__originalRestore = b.restore, b.__originalRotate = b.rotate, b.__originalScale = b.scale, b.__originalTranslate = b.translate, b.__originalTransform = b.transform, b.__originalSetTransform = b.setTransform, b.__originalResetTransform = b.resetTransform, b.__originalClip = b.clip, b.__originalMoveTo = b.moveTo, b.__originalLineTo = b.lineTo, b.__originalBezierCurveTo = b.bezierCurveTo, b.__originalRect = b.rect, b.__originalClosePath = b.closePath, b.__originalBeginPath = b.beginPath, b._removeMirroring = () => {
|
|
@@ -6931,7 +6931,7 @@ function ew(b, I) {
|
|
|
6931
6931
|
I.beginPath(), this.__originalBeginPath();
|
|
6932
6932
|
};
|
|
6933
6933
|
}
|
|
6934
|
-
class
|
|
6934
|
+
class Vw {
|
|
6935
6935
|
constructor(I) {
|
|
6936
6936
|
this.canvasFactory = I, this.cache = /* @__PURE__ */ Object.create(null);
|
|
6937
6937
|
}
|
|
@@ -6965,31 +6965,31 @@ function lb(b, I, g, C, A, i, Z, d, s, c) {
|
|
|
6965
6965
|
}
|
|
6966
6966
|
class IB {
|
|
6967
6967
|
constructor(I, g, C) {
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
6973
|
-
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
6979
|
-
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
6985
|
-
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
6991
|
-
|
|
6992
|
-
|
|
6968
|
+
M(this, "alphaIsShape", !1);
|
|
6969
|
+
M(this, "fontSize", 0);
|
|
6970
|
+
M(this, "fontSizeScale", 1);
|
|
6971
|
+
M(this, "textMatrix", null);
|
|
6972
|
+
M(this, "textMatrixScale", 1);
|
|
6973
|
+
M(this, "fontMatrix", j0);
|
|
6974
|
+
M(this, "leading", 0);
|
|
6975
|
+
M(this, "x", 0);
|
|
6976
|
+
M(this, "y", 0);
|
|
6977
|
+
M(this, "lineX", 0);
|
|
6978
|
+
M(this, "lineY", 0);
|
|
6979
|
+
M(this, "charSpacing", 0);
|
|
6980
|
+
M(this, "wordSpacing", 0);
|
|
6981
|
+
M(this, "textHScale", 1);
|
|
6982
|
+
M(this, "textRenderingMode", vI.FILL);
|
|
6983
|
+
M(this, "textRise", 0);
|
|
6984
|
+
M(this, "fillColor", "#000000");
|
|
6985
|
+
M(this, "strokeColor", "#000000");
|
|
6986
|
+
M(this, "patternFill", !1);
|
|
6987
|
+
M(this, "patternStroke", !1);
|
|
6988
|
+
M(this, "fillAlpha", 1);
|
|
6989
|
+
M(this, "strokeAlpha", 1);
|
|
6990
|
+
M(this, "lineWidth", 1);
|
|
6991
|
+
M(this, "activeSMask", null);
|
|
6992
|
+
M(this, "transferMaps", "none");
|
|
6993
6993
|
C == null || C(this), this.clipBox = new Float32Array([0, 0, I, g]), this.minMax = OZ.slice();
|
|
6994
6994
|
}
|
|
6995
6995
|
clone() {
|
|
@@ -7035,11 +7035,11 @@ function gB(b, I) {
|
|
|
7035
7035
|
const n = X - s;
|
|
7036
7036
|
let R = 0;
|
|
7037
7037
|
const u = n > N ? C : n * 8 - 7, H = u & -8;
|
|
7038
|
-
let K = 0,
|
|
7038
|
+
let K = 0, D = 0;
|
|
7039
7039
|
for (; R < H; R += 8)
|
|
7040
|
-
|
|
7040
|
+
D = G[s++], V[c++] = D & 128 ? o : h, V[c++] = D & 64 ? o : h, V[c++] = D & 32 ? o : h, V[c++] = D & 16 ? o : h, V[c++] = D & 8 ? o : h, V[c++] = D & 4 ? o : h, V[c++] = D & 2 ? o : h, V[c++] = D & 1 ? o : h;
|
|
7041
7041
|
for (; R < u; R++)
|
|
7042
|
-
K === 0 && (
|
|
7042
|
+
K === 0 && (D = G[s++], K = 128), V[c++] = D & K ? o : h, K >>= 1;
|
|
7043
7043
|
}
|
|
7044
7044
|
for (; c < y; )
|
|
7045
7045
|
V[c++] = 0;
|
|
@@ -7070,7 +7070,7 @@ function CB(b, I) {
|
|
|
7070
7070
|
const W = m < i ? Qg : A;
|
|
7071
7071
|
({
|
|
7072
7072
|
srcPos: s
|
|
7073
|
-
} =
|
|
7073
|
+
} = tw({
|
|
7074
7074
|
src: c,
|
|
7075
7075
|
srcPos: s,
|
|
7076
7076
|
dest: G,
|
|
@@ -7100,7 +7100,7 @@ function AB(b, I) {
|
|
|
7100
7100
|
const g = Math.fround(tA.pixelRatio * di.PDF_TO_CSS_UNITS);
|
|
7101
7101
|
return bC[0] <= g && bC[1] <= g;
|
|
7102
7102
|
}
|
|
7103
|
-
const
|
|
7103
|
+
const Nw = ["butt", "round", "square"], Xw = ["miter", "round", "bevel"], Rw = {}, lB = {};
|
|
7104
7104
|
var vC, tm, em, nm;
|
|
7105
7105
|
const Do = class Do {
|
|
7106
7106
|
constructor(I, g, C, A, i, {
|
|
@@ -7108,7 +7108,7 @@ const Do = class Do {
|
|
|
7108
7108
|
markedContentStack: d = null
|
|
7109
7109
|
}, s, c, G) {
|
|
7110
7110
|
w(this, vC);
|
|
7111
|
-
this.ctx = I, this.current = new IB(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = g, this.objs = C, this.canvasFactory = A, this.filterFactory = i, this.groupStack = [], this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = d || [], this.optionalContentConfig = Z, this.cachedCanvases = new
|
|
7111
|
+
this.ctx = I, this.current = new IB(this.ctx.canvas.width, this.ctx.canvas.height), this.stateStack = [], this.pendingClip = null, this.pendingEOFill = !1, this.res = null, this.xobjs = null, this.commonObjs = g, this.objs = C, this.canvasFactory = A, this.filterFactory = i, this.groupStack = [], this.baseTransform = null, this.baseTransformStack = [], this.groupLevel = 0, this.smaskStack = [], this.smaskCounter = 0, this.tempSMask = null, this.suspendedCtx = null, this.contentVisible = !0, this.markedContentStack = d || [], this.optionalContentConfig = Z, this.cachedCanvases = new Vw(this.canvasFactory), this.cachedPatterns = /* @__PURE__ */ new Map(), this.annotationCanvasMap = s, this.viewportScale = 1, this.outputScaleX = 1, this.outputScaleY = 1, this.pageColors = c, this._cachedScaleForStroking = [-1, 0], this._cachedGetSinglePixelWidth = null, this._cachedBitmapsMap = /* @__PURE__ */ new Map(), this.dependencyTracker = G ?? null;
|
|
7112
7112
|
}
|
|
7113
7113
|
getObject(I, g, C = null) {
|
|
7114
7114
|
var A;
|
|
@@ -7134,7 +7134,7 @@ const Do = class Do {
|
|
|
7134
7134
|
const c = Z.length;
|
|
7135
7135
|
if (c === s)
|
|
7136
7136
|
return s;
|
|
7137
|
-
const G = c - s > $o && typeof C == "function", m = G ? Date.now() +
|
|
7137
|
+
const G = c - s > $o && typeof C == "function", m = G ? Date.now() + ew : 0;
|
|
7138
7138
|
let W = 0;
|
|
7139
7139
|
const a = this.commonObjs, t = this.objs;
|
|
7140
7140
|
let e, X;
|
|
@@ -7183,7 +7183,7 @@ const Do = class Do {
|
|
|
7183
7183
|
};
|
|
7184
7184
|
}
|
|
7185
7185
|
_createMaskCanvas(I, g) {
|
|
7186
|
-
var K,
|
|
7186
|
+
var K, D;
|
|
7187
7187
|
const C = this.ctx, {
|
|
7188
7188
|
width: A,
|
|
7189
7189
|
height: i
|
|
@@ -7211,7 +7211,7 @@ const Do = class Do {
|
|
|
7211
7211
|
const [e, X, V, y] = t, N = Math.round(V - e) || 1, o = Math.round(y - X) || 1, h = this.cachedCanvases.getCanvas("fillCanvas", N, o), n = h.context, R = e, u = X;
|
|
7212
7212
|
n.translate(-R, -u), n.transform(...a), m || (m = this._scaleImage(W.canvas, EC(n)), m = m.img, c && d && c.set(G, m)), n.imageSmoothingEnabled = AB(DI(n), g.interpolate), lb(n, m, 0, 0, m.width, m.height, 0, 0, A, i), n.globalCompositeOperation = "source-in";
|
|
7213
7213
|
const H = p.transform(EC(n), [1, 0, 0, 1, -R, -u]);
|
|
7214
|
-
return n.fillStyle = d ? Z.getPattern(C, this, H, mg.FILL, I) : Z, n.fillRect(0, 0, A, i), c && !d && (this.cachedCanvases.delete("fillCanvas"), c.set(G, h.canvas)), (
|
|
7214
|
+
return n.fillStyle = d ? Z.getPattern(C, this, H, mg.FILL, I) : Z, n.fillRect(0, 0, A, i), c && !d && (this.cachedCanvases.delete("fillCanvas"), c.set(G, h.canvas)), (D = this.dependencyTracker) == null || D.recordDependencies(I, WC.transformAndFill), {
|
|
7215
7215
|
canvas: h.canvas,
|
|
7216
7216
|
offsetX: Math.round(R),
|
|
7217
7217
|
offsetY: Math.round(u)
|
|
@@ -7223,11 +7223,11 @@ const Do = class Do {
|
|
|
7223
7223
|
}
|
|
7224
7224
|
setLineCap(I, g) {
|
|
7225
7225
|
var C;
|
|
7226
|
-
(C = this.dependencyTracker) == null || C.recordSimpleData("lineCap", I), this.ctx.lineCap =
|
|
7226
|
+
(C = this.dependencyTracker) == null || C.recordSimpleData("lineCap", I), this.ctx.lineCap = Nw[g];
|
|
7227
7227
|
}
|
|
7228
7228
|
setLineJoin(I, g) {
|
|
7229
7229
|
var C;
|
|
7230
|
-
(C = this.dependencyTracker) == null || C.recordSimpleData("lineJoin", I), this.ctx.lineJoin =
|
|
7230
|
+
(C = this.dependencyTracker) == null || C.recordSimpleData("lineJoin", I), this.ctx.lineJoin = Xw[g];
|
|
7231
7231
|
}
|
|
7232
7232
|
setMiterLimit(I, g) {
|
|
7233
7233
|
var C;
|
|
@@ -7301,7 +7301,7 @@ const Do = class Do {
|
|
|
7301
7301
|
const g = this.ctx.canvas.width, C = this.ctx.canvas.height, A = "smaskGroupAt" + this.groupLevel, i = this.cachedCanvases.getCanvas(A, g, C);
|
|
7302
7302
|
this.suspendedCtx = this.ctx;
|
|
7303
7303
|
const Z = this.ctx = i.context;
|
|
7304
|
-
Z.setTransform(this.suspendedCtx.getTransform()), Rs(this.suspendedCtx, Z),
|
|
7304
|
+
Z.setTransform(this.suspendedCtx.getTransform()), Rs(this.suspendedCtx, Z), nw(Z, this.suspendedCtx), this.setGState(I, [["BM", "source-over"]]);
|
|
7305
7305
|
}
|
|
7306
7306
|
endSMaskMode() {
|
|
7307
7307
|
if (!this.inSMaskMode)
|
|
@@ -7424,7 +7424,7 @@ const Do = class Do {
|
|
|
7424
7424
|
}
|
|
7425
7425
|
clip(I) {
|
|
7426
7426
|
var g;
|
|
7427
|
-
(g = this.dependencyTracker) == null || g.recordFutureForcedDependency("clipMode", I), this.pendingClip =
|
|
7427
|
+
(g = this.dependencyTracker) == null || g.recordFutureForcedDependency("clipMode", I), this.pendingClip = Rw;
|
|
7428
7428
|
}
|
|
7429
7429
|
eoClip(I) {
|
|
7430
7430
|
var g;
|
|
@@ -7536,8 +7536,8 @@ const Do = class Do {
|
|
|
7536
7536
|
b: R,
|
|
7537
7537
|
c: u,
|
|
7538
7538
|
d: H
|
|
7539
|
-
} = h, K = p.inverseTransform(Z),
|
|
7540
|
-
p.singularValueDecompose2dScale(
|
|
7539
|
+
} = h, K = p.inverseTransform(Z), D = p.transform([n, R, u, H, 0, 0], K);
|
|
7540
|
+
p.singularValueDecompose2dScale(D, bC), d.lineWidth *= Math.max(bC[0], bC[1]) / m, d.stroke(Y(this, vC, nm).call(this, X, h, Z));
|
|
7541
7541
|
} else
|
|
7542
7542
|
d.lineWidth /= m, d.stroke(X);
|
|
7543
7543
|
d.restore();
|
|
@@ -7566,11 +7566,11 @@ const Do = class Do {
|
|
|
7566
7566
|
return O(this, "isFontSubpixelAAEnabled", C);
|
|
7567
7567
|
}
|
|
7568
7568
|
showText(I, g) {
|
|
7569
|
-
var
|
|
7569
|
+
var D, z, L, T;
|
|
7570
7570
|
this.dependencyTracker && (this.dependencyTracker.recordDependencies(I, WC.showText).resetBBox(I), this.current.textRenderingMode & vI.ADD_TO_PATH_FLAG && this.dependencyTracker.recordFutureForcedDependency("textClip", I).inheritPendingDependenciesAsFutureForcedDependencies());
|
|
7571
7571
|
const C = this.current, A = C.font;
|
|
7572
7572
|
if (A.isType3Font) {
|
|
7573
|
-
this.showType3Text(I, g), (
|
|
7573
|
+
this.showType3Text(I, g), (D = this.dependencyTracker) == null || D.recordShowTextOperation(I);
|
|
7574
7574
|
return;
|
|
7575
7575
|
}
|
|
7576
7576
|
const i = C.fontSize;
|
|
@@ -7712,7 +7712,7 @@ const Do = class Do {
|
|
|
7712
7712
|
}
|
|
7713
7713
|
_getPattern(I, g, C = null) {
|
|
7714
7714
|
let A;
|
|
7715
|
-
return this.cachedPatterns.has(g) ? A = this.cachedPatterns.get(g) : (A =
|
|
7715
|
+
return this.cachedPatterns.has(g) ? A = this.cachedPatterns.get(g) : (A = Yw(this.getObject(I, g)), this.cachedPatterns.set(g, A)), C && (A.matrix = C), A;
|
|
7716
7716
|
}
|
|
7717
7717
|
shadingFill(I, g) {
|
|
7718
7718
|
var Z;
|
|
@@ -8111,7 +8111,7 @@ class YA {
|
|
|
8111
8111
|
}
|
|
8112
8112
|
Qc = new WeakMap(), xc = new WeakMap(), w(YA, Qc, null), w(YA, xc, "");
|
|
8113
8113
|
var pd, Uc;
|
|
8114
|
-
class
|
|
8114
|
+
class yw {
|
|
8115
8115
|
constructor({
|
|
8116
8116
|
parsedData: I,
|
|
8117
8117
|
rawData: g
|
|
@@ -8133,7 +8133,7 @@ class Rw {
|
|
|
8133
8133
|
pd = new WeakMap(), Uc = new WeakMap();
|
|
8134
8134
|
const jZ = Symbol("INTERNAL");
|
|
8135
8135
|
var Oc, vc, Ec, Fd;
|
|
8136
|
-
class
|
|
8136
|
+
class uw {
|
|
8137
8137
|
constructor(I, {
|
|
8138
8138
|
name: g,
|
|
8139
8139
|
intent: C,
|
|
@@ -8163,7 +8163,7 @@ class yw {
|
|
|
8163
8163
|
}
|
|
8164
8164
|
Oc = new WeakMap(), vc = new WeakMap(), Ec = new WeakMap(), Fd = new WeakMap();
|
|
8165
8165
|
var Jl, BI, Jd, zd, Pc, Vm;
|
|
8166
|
-
class
|
|
8166
|
+
class Hw {
|
|
8167
8167
|
constructor(I, g = GC.DISPLAY) {
|
|
8168
8168
|
w(this, Pc);
|
|
8169
8169
|
w(this, Jl, null);
|
|
@@ -8173,7 +8173,7 @@ class uw {
|
|
|
8173
8173
|
if (this.renderingIntent = g, this.name = null, this.creator = null, I !== null) {
|
|
8174
8174
|
this.name = I.name, this.creator = I.creator, B(this, zd, I.order);
|
|
8175
8175
|
for (const C of I.groups)
|
|
8176
|
-
l(this, BI).set(C.id, new
|
|
8176
|
+
l(this, BI).set(C.id, new uw(g, C));
|
|
8177
8177
|
if (I.baseState === "OFF")
|
|
8178
8178
|
for (const C of l(this, BI).values())
|
|
8179
8179
|
C._setVisible(jZ, !1);
|
|
@@ -8325,7 +8325,7 @@ Jl = new WeakMap(), BI = new WeakMap(), Jd = new WeakMap(), zd = new WeakMap(),
|
|
|
8325
8325
|
}
|
|
8326
8326
|
return C === "And";
|
|
8327
8327
|
};
|
|
8328
|
-
class
|
|
8328
|
+
class Mw {
|
|
8329
8329
|
constructor(I, {
|
|
8330
8330
|
disableRange: g = !1,
|
|
8331
8331
|
disableStream: C = !1
|
|
@@ -8397,12 +8397,12 @@ class Hw {
|
|
|
8397
8397
|
getFullReader() {
|
|
8398
8398
|
CI(!this._fullRequestReader, "PDFDataTransportStream.getFullReader can only be called once.");
|
|
8399
8399
|
const I = this._queuedChunks;
|
|
8400
|
-
return this._queuedChunks = null, new
|
|
8400
|
+
return this._queuedChunks = null, new Dw(this, I, this._progressiveDone, this._contentDispositionFilename);
|
|
8401
8401
|
}
|
|
8402
8402
|
getRangeReader(I, g) {
|
|
8403
8403
|
if (g <= this._progressiveDataLength)
|
|
8404
8404
|
return null;
|
|
8405
|
-
const C = new
|
|
8405
|
+
const C = new Kw(this, I, g);
|
|
8406
8406
|
return this._pdfDataRangeTransport.requestDataRange(I, g), this._rangeReaders.push(C), C;
|
|
8407
8407
|
}
|
|
8408
8408
|
cancelAllRequests(I) {
|
|
@@ -8413,7 +8413,7 @@ class Hw {
|
|
|
8413
8413
|
this._pdfDataRangeTransport.abort();
|
|
8414
8414
|
}
|
|
8415
8415
|
}
|
|
8416
|
-
class
|
|
8416
|
+
class Dw {
|
|
8417
8417
|
constructor(I, g, C = !1, A = null) {
|
|
8418
8418
|
this._stream = I, this._done = C || !1, this._filename = to(A) ? A : null, this._queuedChunks = g || [], this._loaded = 0;
|
|
8419
8419
|
for (const i of this._queuedChunks)
|
|
@@ -8468,7 +8468,7 @@ class Mw {
|
|
|
8468
8468
|
this._done || (this._done = !0);
|
|
8469
8469
|
}
|
|
8470
8470
|
}
|
|
8471
|
-
class
|
|
8471
|
+
class Kw {
|
|
8472
8472
|
constructor(I, g, C) {
|
|
8473
8473
|
this._stream = I, this._begin = g, this._end = C, this._queuedChunk = null, this._requests = [], this._done = !1, this.onProgress = null;
|
|
8474
8474
|
}
|
|
@@ -8520,7 +8520,7 @@ class Dw {
|
|
|
8520
8520
|
this._requests.length = 0, this._stream._removeRangeReader(this);
|
|
8521
8521
|
}
|
|
8522
8522
|
}
|
|
8523
|
-
function
|
|
8523
|
+
function Sw(b) {
|
|
8524
8524
|
let I = !0, g = C("filename\\*", "i").exec(b);
|
|
8525
8525
|
if (g) {
|
|
8526
8526
|
g = g[1];
|
|
@@ -8638,7 +8638,7 @@ function sW({
|
|
|
8638
8638
|
function cW(b) {
|
|
8639
8639
|
const I = b.get("Content-Disposition");
|
|
8640
8640
|
if (I) {
|
|
8641
|
-
let g =
|
|
8641
|
+
let g = Sw(I);
|
|
8642
8642
|
if (g.includes("%"))
|
|
8643
8643
|
try {
|
|
8644
8644
|
g = decodeURIComponent(g);
|
|
@@ -8668,9 +8668,9 @@ function bW(b, I, g) {
|
|
|
8668
8668
|
function mW(b) {
|
|
8669
8669
|
return b instanceof Uint8Array ? b.buffer : b instanceof ArrayBuffer ? b : (U(`getArrayBuffer - unexpected data format: ${b}`), new Uint8Array(b).buffer);
|
|
8670
8670
|
}
|
|
8671
|
-
class
|
|
8671
|
+
class pw {
|
|
8672
8672
|
constructor(I) {
|
|
8673
|
-
|
|
8673
|
+
M(this, "_responseOrigin", null);
|
|
8674
8674
|
this.source = I, this.isHttp = /^https?:/i.test(I.url), this.headers = dW(this.isHttp, I.httpHeaders), this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
8675
8675
|
}
|
|
8676
8676
|
get _progressiveDataLength() {
|
|
@@ -8678,12 +8678,12 @@ class Sw {
|
|
|
8678
8678
|
return ((I = this._fullRequestReader) == null ? void 0 : I._loaded) ?? 0;
|
|
8679
8679
|
}
|
|
8680
8680
|
getFullReader() {
|
|
8681
|
-
return CI(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
8681
|
+
return CI(!this._fullRequestReader, "PDFFetchStream.getFullReader can only be called once."), this._fullRequestReader = new Fw(this), this._fullRequestReader;
|
|
8682
8682
|
}
|
|
8683
8683
|
getRangeReader(I, g) {
|
|
8684
8684
|
if (g <= this._progressiveDataLength)
|
|
8685
8685
|
return null;
|
|
8686
|
-
const C = new
|
|
8686
|
+
const C = new Jw(this, I, g);
|
|
8687
8687
|
return this._rangeRequestReaders.push(C), C;
|
|
8688
8688
|
}
|
|
8689
8689
|
cancelAllRequests(I) {
|
|
@@ -8693,7 +8693,7 @@ class Sw {
|
|
|
8693
8693
|
C.cancel(I);
|
|
8694
8694
|
}
|
|
8695
8695
|
}
|
|
8696
|
-
class
|
|
8696
|
+
class Fw {
|
|
8697
8697
|
constructor(I) {
|
|
8698
8698
|
this._stream = I, this._reader = null, this._loaded = 0, this._filename = null;
|
|
8699
8699
|
const g = I.source;
|
|
@@ -8753,7 +8753,7 @@ class pw {
|
|
|
8753
8753
|
(g = this._reader) == null || g.cancel(I), this._abortController.abort();
|
|
8754
8754
|
}
|
|
8755
8755
|
}
|
|
8756
|
-
class
|
|
8756
|
+
class Jw {
|
|
8757
8757
|
constructor(I, g, C) {
|
|
8758
8758
|
this._stream = I, this._reader = null, this._loaded = 0;
|
|
8759
8759
|
const A = I.source;
|
|
@@ -8796,17 +8796,17 @@ class Fw {
|
|
|
8796
8796
|
}
|
|
8797
8797
|
}
|
|
8798
8798
|
const J0 = 200, z0 = 206;
|
|
8799
|
-
function
|
|
8799
|
+
function zw(b) {
|
|
8800
8800
|
const I = b.response;
|
|
8801
8801
|
return typeof I != "string" ? I : OG(I).buffer;
|
|
8802
8802
|
}
|
|
8803
|
-
class
|
|
8803
|
+
class kw {
|
|
8804
8804
|
constructor({
|
|
8805
8805
|
url: I,
|
|
8806
8806
|
httpHeaders: g,
|
|
8807
8807
|
withCredentials: C
|
|
8808
8808
|
}) {
|
|
8809
|
-
|
|
8809
|
+
M(this, "_responseOrigin", null);
|
|
8810
8810
|
this.url = I, this.isHttp = /^https?:/i.test(I), this.headers = dW(this.isHttp, g), this.withCredentials = C || !1, this.currXhrId = 0, this.pendingRequests = /* @__PURE__ */ Object.create(null);
|
|
8811
8811
|
}
|
|
8812
8812
|
request(I) {
|
|
@@ -8841,7 +8841,7 @@ class zw {
|
|
|
8841
8841
|
C.onError(A.status);
|
|
8842
8842
|
return;
|
|
8843
8843
|
}
|
|
8844
|
-
const d =
|
|
8844
|
+
const d = zw(A);
|
|
8845
8845
|
if (i === z0) {
|
|
8846
8846
|
const s = A.getResponseHeader("Content-Range"), c = /bytes (\d+)-(\d+)\/(\d+)/.exec(s);
|
|
8847
8847
|
c ? C.onDone({
|
|
@@ -8864,19 +8864,19 @@ class zw {
|
|
|
8864
8864
|
delete this.pendingRequests[I], g.abort();
|
|
8865
8865
|
}
|
|
8866
8866
|
}
|
|
8867
|
-
class
|
|
8867
|
+
class Lw {
|
|
8868
8868
|
constructor(I) {
|
|
8869
|
-
this._source = I, this._manager = new
|
|
8869
|
+
this._source = I, this._manager = new kw(I), this._rangeChunkSize = I.rangeChunkSize, this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
8870
8870
|
}
|
|
8871
8871
|
_onRangeRequestReaderClosed(I) {
|
|
8872
8872
|
const g = this._rangeRequestReaders.indexOf(I);
|
|
8873
8873
|
g >= 0 && this._rangeRequestReaders.splice(g, 1);
|
|
8874
8874
|
}
|
|
8875
8875
|
getFullReader() {
|
|
8876
|
-
return CI(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
8876
|
+
return CI(!this._fullRequestReader, "PDFNetworkStream.getFullReader can only be called once."), this._fullRequestReader = new Tw(this._manager, this._source), this._fullRequestReader;
|
|
8877
8877
|
}
|
|
8878
8878
|
getRangeReader(I, g) {
|
|
8879
|
-
const C = new
|
|
8879
|
+
const C = new rw(this._manager, I, g);
|
|
8880
8880
|
return C.onClosed = this._onRangeRequestReaderClosed.bind(this), this._rangeRequestReaders.push(C), C;
|
|
8881
8881
|
}
|
|
8882
8882
|
cancelAllRequests(I) {
|
|
@@ -8886,7 +8886,7 @@ class kw {
|
|
|
8886
8886
|
C.cancel(I);
|
|
8887
8887
|
}
|
|
8888
8888
|
}
|
|
8889
|
-
class
|
|
8889
|
+
class Tw {
|
|
8890
8890
|
constructor(I, g) {
|
|
8891
8891
|
this._manager = I, this._url = g.url, this._fullRequestId = I.request({
|
|
8892
8892
|
onHeadersReceived: this._onHeadersReceived.bind(this),
|
|
@@ -8979,7 +8979,7 @@ class Lw {
|
|
|
8979
8979
|
this._requests.length = 0, this._manager.isPendingRequest(this._fullRequestId) && this._manager.abortRequest(this._fullRequestId), this._fullRequestReader = null;
|
|
8980
8980
|
}
|
|
8981
8981
|
}
|
|
8982
|
-
class
|
|
8982
|
+
class rw {
|
|
8983
8983
|
constructor(I, g, C) {
|
|
8984
8984
|
this._manager = I, this._url = I.url, this._requestId = I.request({
|
|
8985
8985
|
begin: g,
|
|
@@ -9055,28 +9055,28 @@ class Tw {
|
|
|
9055
9055
|
this._requests.length = 0, this._manager.isPendingRequest(this._requestId) && this._manager.abortRequest(this._requestId), this._close();
|
|
9056
9056
|
}
|
|
9057
9057
|
}
|
|
9058
|
-
const
|
|
9059
|
-
function
|
|
9060
|
-
if (
|
|
9058
|
+
const jw = /^[a-z][a-z0-9\-+.]+:/i;
|
|
9059
|
+
function Qw(b) {
|
|
9060
|
+
if (jw.test(b))
|
|
9061
9061
|
return new URL(b);
|
|
9062
9062
|
const I = process.getBuiltinModule("url");
|
|
9063
9063
|
return new URL(I.pathToFileURL(b));
|
|
9064
9064
|
}
|
|
9065
|
-
class
|
|
9065
|
+
class xw {
|
|
9066
9066
|
constructor(I) {
|
|
9067
|
-
this.source = I, this.url =
|
|
9067
|
+
this.source = I, this.url = Qw(I.url), CI(this.url.protocol === "file:", "PDFNodeStream only supports file:// URLs."), this._fullRequestReader = null, this._rangeRequestReaders = [];
|
|
9068
9068
|
}
|
|
9069
9069
|
get _progressiveDataLength() {
|
|
9070
9070
|
var I;
|
|
9071
9071
|
return ((I = this._fullRequestReader) == null ? void 0 : I._loaded) ?? 0;
|
|
9072
9072
|
}
|
|
9073
9073
|
getFullReader() {
|
|
9074
|
-
return CI(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new
|
|
9074
|
+
return CI(!this._fullRequestReader, "PDFNodeStream.getFullReader can only be called once."), this._fullRequestReader = new Uw(this), this._fullRequestReader;
|
|
9075
9075
|
}
|
|
9076
9076
|
getRangeReader(I, g) {
|
|
9077
9077
|
if (g <= this._progressiveDataLength)
|
|
9078
9078
|
return null;
|
|
9079
|
-
const C = new
|
|
9079
|
+
const C = new Ow(this, I, g);
|
|
9080
9080
|
return this._rangeRequestReaders.push(C), C;
|
|
9081
9081
|
}
|
|
9082
9082
|
cancelAllRequests(I) {
|
|
@@ -9086,7 +9086,7 @@ class Qw {
|
|
|
9086
9086
|
C.cancel(I);
|
|
9087
9087
|
}
|
|
9088
9088
|
}
|
|
9089
|
-
class
|
|
9089
|
+
class Uw {
|
|
9090
9090
|
constructor(I) {
|
|
9091
9091
|
this._url = I.url, this._done = !1, this._storedError = null, this.onProgress = null;
|
|
9092
9092
|
const g = I.source;
|
|
@@ -9151,7 +9151,7 @@ class xw {
|
|
|
9151
9151
|
}), !this._isStreamingSupported && this._isRangeSupported && this._error(new Zi("streaming is disabled")), this._storedError && this._readableStream.destroy(this._storedError);
|
|
9152
9152
|
}
|
|
9153
9153
|
}
|
|
9154
|
-
class
|
|
9154
|
+
class Ow {
|
|
9155
9155
|
constructor(I, g, C) {
|
|
9156
9156
|
this._url = I.url, this._done = !1, this._storedError = null, this.onProgress = null, this._loaded = 0, this._readableStream = null, this._readCapability = Promise.withResolvers();
|
|
9157
9157
|
const A = I.source;
|
|
@@ -9257,7 +9257,7 @@ Pg = new WeakMap(), fc = new WeakSet(), Nm = function(I) {
|
|
|
9257
9257
|
data: ys
|
|
9258
9258
|
});
|
|
9259
9259
|
};
|
|
9260
|
-
const
|
|
9260
|
+
const vw = 1e5, iB = 30;
|
|
9261
9261
|
var cB, zl, fg, qc, _c, vi, xA, $c, IG, Ei, gG, kd, kl, Ld, CG, Td, Pi, AG, lG, rd, fi, iG, jd, Qd, ml, BW, WW, Xm, oC, Yb, Rm, hW, wW;
|
|
9262
9262
|
const Zg = class Zg {
|
|
9263
9263
|
constructor({
|
|
@@ -9382,7 +9382,7 @@ zl = new WeakMap(), fg = new WeakMap(), qc = new WeakMap(), _c = new WeakMap(),
|
|
|
9382
9382
|
(i = l(this, xA)).ctx ?? (i.ctx = Y(A = Zg, oC, Yb).call(A, l(this, vi)));
|
|
9383
9383
|
const g = l(this, Pi), C = l(this, CG);
|
|
9384
9384
|
for (const Z of I) {
|
|
9385
|
-
if (g.length >
|
|
9385
|
+
if (g.length > vw) {
|
|
9386
9386
|
U("Ignoring additional textDivs for performance reasons."), B(this, qc, !0);
|
|
9387
9387
|
return;
|
|
9388
9388
|
}
|
|
@@ -9483,8 +9483,8 @@ zl = new WeakMap(), fg = new WeakMap(), qc = new WeakMap(), _c = new WeakMap(),
|
|
|
9483
9483
|
return d ? c = d / (d + s) : (_I.platform.isFirefox && U("Enable the `dom.textMetrics.fontBoundingBox.enabled` preference in `about:config` to improve TextLayer rendering."), g.ascent ? c = g.ascent : g.descent && (c = 1 + g.descent)), l(this, rd).set(I, c), c;
|
|
9484
9484
|
}, w(Zg, oC), w(Zg, rd, /* @__PURE__ */ new Map()), w(Zg, fi, /* @__PURE__ */ new Map()), w(Zg, iG, /* @__PURE__ */ new WeakMap()), w(Zg, jd, null), w(Zg, Qd, /* @__PURE__ */ new Set());
|
|
9485
9485
|
let Ic = Zg;
|
|
9486
|
-
const
|
|
9487
|
-
function
|
|
9486
|
+
const Ew = 100;
|
|
9487
|
+
function aW(b = {}) {
|
|
9488
9488
|
typeof b == "string" || b instanceof URL ? b = {
|
|
9489
9489
|
url: b
|
|
9490
9490
|
} : (b instanceof ArrayBuffer || ArrayBuffer.isView(b)) && (b = {
|
|
@@ -9492,10 +9492,10 @@ function Ew(b = {}) {
|
|
|
9492
9492
|
});
|
|
9493
9493
|
const I = new ym(), {
|
|
9494
9494
|
docId: g
|
|
9495
|
-
} = I, C = b.url ?
|
|
9495
|
+
} = I, C = b.url ? gw(b.url) : null, A = b.data ? Cw(b.data) : null, i = b.httpHeaders || null, Z = b.withCredentials === !0, d = b.password ?? null, s = b.range instanceof YW ? b.range : null, c = Number.isInteger(b.rangeChunkSize) && b.rangeChunkSize > 0 ? b.rangeChunkSize : 2 ** 16;
|
|
9496
9496
|
let G = b.worker instanceof gc ? b.worker : null;
|
|
9497
|
-
const m = b.verbosity, W = typeof b.docBaseUrl == "string" && !V0(b.docBaseUrl) ? b.docBaseUrl : null, a = Ib(b.cMapUrl), t = b.cMapPacked !== !1, e = b.CMapReaderFactory || (Mg ?
|
|
9498
|
-
|
|
9497
|
+
const m = b.verbosity, W = typeof b.docBaseUrl == "string" && !V0(b.docBaseUrl) ? b.docBaseUrl : null, a = Ib(b.cMapUrl), t = b.cMapPacked !== !1, e = b.CMapReaderFactory || (Mg ? Gw : Uo), X = Ib(b.iccUrl), V = Ib(b.standardFontDataUrl), y = b.StandardFontDataFactory || (Mg ? bw : Oo), N = Ib(b.wasmUrl), o = b.WasmFactory || (Mg ? mw : vo), h = b.stopAtErrors !== !0, n = Number.isInteger(b.maxImageSize) && b.maxImageSize > -1 ? b.maxImageSize : -1, R = b.isEvalSupported !== !1, u = typeof b.isOffscreenCanvasSupported == "boolean" ? b.isOffscreenCanvasSupported : !Mg, H = typeof b.isImageDecoderSupported == "boolean" ? b.isImageDecoderSupported : !Mg && (_I.platform.isFirefox || !globalThis.chrome), K = Number.isInteger(b.canvasMaxAreaInBytes) ? b.canvasMaxAreaInBytes : -1, D = typeof b.disableFontFace == "boolean" ? b.disableFontFace : Mg, z = b.fontExtraProperties === !0, L = b.enableXfa === !0, T = b.ownerDocument || globalThis.document, x = b.disableRange === !0, r = b.disableStream === !0, j = b.disableAutoFetch === !0, iI = b.pdfBug === !0, Ng = b.CanvasFactory || (Mg ? cw : Zw), Wg = b.FilterFactory || (Mg ? sw : dw), pg = b.enableHWA === !0, hI = b.useWasm !== !1, eI = s ? s.length : b.length ?? NaN, DC = typeof b.useSystemFonts == "boolean" ? b.useSystemFonts : !Mg && !D, HI = typeof b.useWorkerFetch == "boolean" ? b.useWorkerFetch : !!(e === Uo && y === Oo && o === vo && a && V && N && Ms(a, document.baseURI) && Ms(V, document.baseURI) && Ms(N, document.baseURI)), hg = null;
|
|
9498
|
+
uh(m);
|
|
9499
9499
|
const SI = {
|
|
9500
9500
|
canvasFactory: new Ng({
|
|
9501
9501
|
ownerDocument: T,
|
|
@@ -9532,7 +9532,7 @@ function Ew(b = {}) {
|
|
|
9532
9532
|
enableXfa: L,
|
|
9533
9533
|
evaluatorOptions: {
|
|
9534
9534
|
maxImageSize: n,
|
|
9535
|
-
disableFontFace:
|
|
9535
|
+
disableFontFace: D,
|
|
9536
9536
|
ignoreErrors: h,
|
|
9537
9537
|
isEvalSupported: R,
|
|
9538
9538
|
isOffscreenCanvasSupported: u,
|
|
@@ -9564,14 +9564,14 @@ function Ew(b = {}) {
|
|
|
9564
9564
|
const Ns = G.messageHandler.sendWithPromise("GetDocRequest", R0, A ? [A.buffer] : null);
|
|
9565
9565
|
let ci;
|
|
9566
9566
|
if (s)
|
|
9567
|
-
ci = new
|
|
9567
|
+
ci = new Mw(s, {
|
|
9568
9568
|
disableRange: x,
|
|
9569
9569
|
disableStream: r
|
|
9570
9570
|
});
|
|
9571
9571
|
else if (!A) {
|
|
9572
9572
|
if (!C)
|
|
9573
9573
|
throw new Error("getDocument - no `url` parameter provided.");
|
|
9574
|
-
const u0 = Ms(C) ?
|
|
9574
|
+
const u0 = Ms(C) ? pw : Mg ? xw : Lw;
|
|
9575
9575
|
ci = new u0({
|
|
9576
9576
|
url: C,
|
|
9577
9577
|
length: eI,
|
|
@@ -9587,21 +9587,21 @@ function Ew(b = {}) {
|
|
|
9587
9587
|
throw new Error("Loading aborted");
|
|
9588
9588
|
if (G.destroyed)
|
|
9589
9589
|
throw new Error("Worker was destroyed");
|
|
9590
|
-
const po = new ks(g, u0, G.port),
|
|
9591
|
-
I._transport =
|
|
9590
|
+
const po = new ks(g, u0, G.port), Vh = new qw(po, I, ci, y0, SI, pg);
|
|
9591
|
+
I._transport = Vh, po.send("Ready", null);
|
|
9592
9592
|
});
|
|
9593
9593
|
}).catch(I._capability.reject), I;
|
|
9594
9594
|
}
|
|
9595
9595
|
var G0;
|
|
9596
9596
|
const b0 = class b0 {
|
|
9597
9597
|
constructor() {
|
|
9598
|
-
|
|
9599
|
-
|
|
9600
|
-
|
|
9601
|
-
|
|
9602
|
-
|
|
9603
|
-
|
|
9604
|
-
|
|
9598
|
+
M(this, "_capability", Promise.withResolvers());
|
|
9599
|
+
M(this, "_transport", null);
|
|
9600
|
+
M(this, "_worker", null);
|
|
9601
|
+
M(this, "docId", `d${OI(b0, G0)._++}`);
|
|
9602
|
+
M(this, "destroyed", !1);
|
|
9603
|
+
M(this, "onPassword", null);
|
|
9604
|
+
M(this, "onProgress", null);
|
|
9605
9605
|
}
|
|
9606
9606
|
get promise() {
|
|
9607
9607
|
return this._capability.promise;
|
|
@@ -9623,7 +9623,7 @@ const b0 = class b0 {
|
|
|
9623
9623
|
G0 = new WeakMap(), w(b0, G0, 0);
|
|
9624
9624
|
let ym = b0;
|
|
9625
9625
|
var qi, ZG, dG, sG, cG;
|
|
9626
|
-
class
|
|
9626
|
+
class YW {
|
|
9627
9627
|
constructor(I, g, C = !1, A = null) {
|
|
9628
9628
|
w(this, qi, Promise.withResolvers());
|
|
9629
9629
|
w(this, ZG, []);
|
|
@@ -9870,7 +9870,7 @@ class fw {
|
|
|
9870
9870
|
recordOperations: a = !1,
|
|
9871
9871
|
operationsFilter: t = null
|
|
9872
9872
|
}) {
|
|
9873
|
-
var H, K,
|
|
9873
|
+
var H, K, D;
|
|
9874
9874
|
(H = this._stats) == null || H.time("Overall");
|
|
9875
9875
|
const e = this._transport.getRenderingIntent(A, i, m, W), {
|
|
9876
9876
|
renderingIntent: X,
|
|
@@ -9886,7 +9886,7 @@ class fw {
|
|
|
9886
9886
|
lastChunk: !1,
|
|
9887
9887
|
separateAnnots: null
|
|
9888
9888
|
}, (K = this._stats) == null || K.time("Page Request"), this._pumpOperatorList(e));
|
|
9889
|
-
const o = !!(this._pdfBug && ((
|
|
9889
|
+
const o = !!(this._pdfBug && ((D = globalThis.StepperManager) != null && D.enabled)), h = !this.recordedBBoxes && (a || o), n = (z) => {
|
|
9890
9890
|
var L, T;
|
|
9891
9891
|
if (y.renderTasks.delete(R), h) {
|
|
9892
9892
|
const x = (L = R.gfx) == null ? void 0 : L.dependencyTracker.take();
|
|
@@ -9901,7 +9901,7 @@ class fw {
|
|
|
9901
9901
|
params: {
|
|
9902
9902
|
canvas: g,
|
|
9903
9903
|
canvasContext: I,
|
|
9904
|
-
dependencyTracker: h ? new
|
|
9904
|
+
dependencyTracker: h ? new Bw(g, y.operatorList.length, o) : null,
|
|
9905
9905
|
viewport: C,
|
|
9906
9906
|
transform: Z,
|
|
9907
9907
|
background: d
|
|
@@ -10086,7 +10086,7 @@ class fw {
|
|
|
10086
10086
|
if (I.renderTasks.size > 0)
|
|
10087
10087
|
return;
|
|
10088
10088
|
if (g instanceof Yo) {
|
|
10089
|
-
let A =
|
|
10089
|
+
let A = Ew;
|
|
10090
10090
|
g.extraDelay > 0 && g.extraDelay < 1e3 && (A += g.extraDelay), I.streamReaderCancelTimeout = setTimeout(() => {
|
|
10091
10091
|
I.streamReaderCancelTimeout = null, this._abortOperatorList({
|
|
10092
10092
|
intentState: I,
|
|
@@ -10123,12 +10123,12 @@ UA = new WeakMap(), _i = new WeakSet(), Qs = function() {
|
|
|
10123
10123
|
return !1;
|
|
10124
10124
|
return this._intentStates.clear(), this.objs.clear(), B(this, UA, !1), !0;
|
|
10125
10125
|
};
|
|
10126
|
-
var Ll, LC, OA, $i, m0, IZ, gZ, Kg, tb,
|
|
10126
|
+
var Ll, LC, OA, $i, m0, IZ, gZ, Kg, tb, tW, eW, xs, xd, eb;
|
|
10127
10127
|
const RI = class RI {
|
|
10128
10128
|
constructor({
|
|
10129
10129
|
name: I = null,
|
|
10130
10130
|
port: g = null,
|
|
10131
|
-
verbosity: C =
|
|
10131
|
+
verbosity: C = Hh()
|
|
10132
10132
|
} = {}) {
|
|
10133
10133
|
w(this, Kg);
|
|
10134
10134
|
w(this, Ll, Promise.withResolvers());
|
|
@@ -10138,9 +10138,9 @@ const RI = class RI {
|
|
|
10138
10138
|
if (this.name = I, this.destroyed = !1, this.verbosity = C, g) {
|
|
10139
10139
|
if (l(RI, gZ).has(g))
|
|
10140
10140
|
throw new Error("Cannot use more than one PDFWorker per port.");
|
|
10141
|
-
l(RI, gZ).set(g, this), Y(this, Kg,
|
|
10141
|
+
l(RI, gZ).set(g, this), Y(this, Kg, tW).call(this, g);
|
|
10142
10142
|
} else
|
|
10143
|
-
Y(this, Kg,
|
|
10143
|
+
Y(this, Kg, eW).call(this);
|
|
10144
10144
|
}
|
|
10145
10145
|
get promise() {
|
|
10146
10146
|
return l(this, Ll).promise;
|
|
@@ -10181,10 +10181,10 @@ Ll = new WeakMap(), LC = new WeakMap(), OA = new WeakMap(), $i = new WeakMap(),
|
|
|
10181
10181
|
l(this, Ll).resolve(), l(this, LC).send("configure", {
|
|
10182
10182
|
verbosity: this.verbosity
|
|
10183
10183
|
});
|
|
10184
|
-
},
|
|
10184
|
+
}, tW = function(I) {
|
|
10185
10185
|
B(this, OA, I), B(this, LC, new ks("main", "worker", I)), l(this, LC).on("ready", () => {
|
|
10186
10186
|
}), Y(this, Kg, tb).call(this);
|
|
10187
|
-
},
|
|
10187
|
+
}, eW = function() {
|
|
10188
10188
|
if (l(RI, IZ) || l(RI, xd, eb)) {
|
|
10189
10189
|
Y(this, Kg, xs).call(this);
|
|
10190
10190
|
return;
|
|
@@ -10236,7 +10236,7 @@ Ll = new WeakMap(), LC = new WeakMap(), OA = new WeakMap(), $i = new WeakMap(),
|
|
|
10236
10236
|
l(this, Ll).reject(new Error("Worker was destroyed"));
|
|
10237
10237
|
return;
|
|
10238
10238
|
}
|
|
10239
|
-
const g = new
|
|
10239
|
+
const g = new iw();
|
|
10240
10240
|
B(this, OA, g);
|
|
10241
10241
|
const C = `fake${OI(RI, m0)._++}`, A = new ks(C + "_worker", C, g);
|
|
10242
10242
|
I.setup(A, g), B(this, LC, new ks(C, C + "_worker", g)), Y(this, Kg, tb).call(this);
|
|
@@ -10262,7 +10262,7 @@ Ll = new WeakMap(), LC = new WeakMap(), OA = new WeakMap(), $i = new WeakMap(),
|
|
|
10262
10262
|
type: "text/javascript"
|
|
10263
10263
|
}));
|
|
10264
10264
|
}, RI.fromPort = (I) => {
|
|
10265
|
-
if (
|
|
10265
|
+
if (rh("`PDFWorker.fromPort` - please use `PDFWorker.create` instead."), !(I != null && I.port))
|
|
10266
10266
|
throw new Error("PDFWorker.fromPort - invalid method signature.");
|
|
10267
10267
|
return RI.create(I);
|
|
10268
10268
|
};
|
|
@@ -10276,7 +10276,7 @@ class qw {
|
|
|
10276
10276
|
w(this, Ud, /* @__PURE__ */ new Map());
|
|
10277
10277
|
w(this, Od, /* @__PURE__ */ new Map());
|
|
10278
10278
|
w(this, EA, null);
|
|
10279
|
-
this.messageHandler = I, this.loadingTask = g, this.commonObjs = new oW(), this.fontLoader = new
|
|
10279
|
+
this.messageHandler = I, this.loadingTask = g, this.commonObjs = new oW(), this.fontLoader = new _h({
|
|
10280
10280
|
ownerDocument: A.ownerDocument,
|
|
10281
10281
|
styleElement: A.styleElement
|
|
10282
10282
|
}), this.loadingParams = A.loadingParams, this._params = A, this.canvasFactory = i.canvasFactory, this.filterFactory = i.filterFactory, this.cMapReaderFactory = i.cMapReaderFactory, this.standardFontDataFactory = i.standardFontDataFactory, this.wasmFactory = i.wasmFactory, this.destroyed = !1, this.destroyCapability = null, this._networkStream = C, this._fullReader = null, this._lastProgress = null, this.downloadInfoCapability = Promise.withResolvers(), this.enableHWA = Z, this.setupMessageHandler();
|
|
@@ -10458,7 +10458,7 @@ class qw {
|
|
|
10458
10458
|
U(`Error during font loading: ${W}`), this.commonObjs.resolve(C, W);
|
|
10459
10459
|
break;
|
|
10460
10460
|
}
|
|
10461
|
-
const d = new bm(i), s = this._params.pdfBug && ((Z = globalThis.FontInspector) != null && Z.enabled) ? (W, a) => globalThis.FontInspector.fontAdded(W, a) : null, c = new
|
|
10461
|
+
const d = new bm(i), s = this._params.pdfBug && ((Z = globalThis.FontInspector) != null && Z.enabled) ? (W, a) => globalThis.FontInspector.fontAdded(W, a) : null, c = new $h(d, s, i.extra, i.charProcOperatorList);
|
|
10462
10462
|
this.fontLoader.bind(c).catch(() => I.sendWithPromise("FontFallback", {
|
|
10463
10463
|
id: C
|
|
10464
10464
|
})).finally(() => {
|
|
@@ -10476,7 +10476,7 @@ class qw {
|
|
|
10476
10476
|
return a.dataLen ? (this.commonObjs.resolve(C, structuredClone(a)), a.dataLen) : null;
|
|
10477
10477
|
break;
|
|
10478
10478
|
case "FontPath":
|
|
10479
|
-
this.commonObjs.resolve(C, new
|
|
10479
|
+
this.commonObjs.resolve(C, new Iw(i));
|
|
10480
10480
|
break;
|
|
10481
10481
|
case "Image":
|
|
10482
10482
|
this.commonObjs.resolve(C, i);
|
|
@@ -10634,7 +10634,7 @@ class qw {
|
|
|
10634
10634
|
return this.messageHandler.sendWithPromise("GetOutline", null);
|
|
10635
10635
|
}
|
|
10636
10636
|
getOptionalContentConfig(I) {
|
|
10637
|
-
return Y(this, CZ, Us).call(this, "GetOptionalContentConfig").then((g) => new
|
|
10637
|
+
return Y(this, CZ, Us).call(this, "GetOptionalContentConfig").then((g) => new Hw(g, I));
|
|
10638
10638
|
}
|
|
10639
10639
|
getPermissions() {
|
|
10640
10640
|
return this.messageHandler.sendWithPromise("GetPermissions", null);
|
|
@@ -10647,7 +10647,7 @@ class qw {
|
|
|
10647
10647
|
var i, Z;
|
|
10648
10648
|
return {
|
|
10649
10649
|
info: A[0],
|
|
10650
|
-
metadata: A[1] ? new
|
|
10650
|
+
metadata: A[1] ? new yw(A[1]) : null,
|
|
10651
10651
|
contentDispositionFilename: ((i = this._fullReader) == null ? void 0 : i.filename) ?? null,
|
|
10652
10652
|
contentLength: ((Z = this._fullReader) == null ? void 0 : Z.contentLength) ?? null,
|
|
10653
10653
|
hasStructTree: A[2]
|
|
@@ -10685,8 +10685,8 @@ var Tl;
|
|
|
10685
10685
|
class _w {
|
|
10686
10686
|
constructor(I) {
|
|
10687
10687
|
w(this, Tl, null);
|
|
10688
|
-
|
|
10689
|
-
|
|
10688
|
+
M(this, "onContinue", null);
|
|
10689
|
+
M(this, "onError", null);
|
|
10690
10690
|
B(this, Tl, I);
|
|
10691
10691
|
}
|
|
10692
10692
|
get promise() {
|
|
@@ -10791,7 +10791,7 @@ const Bi = class Bi {
|
|
|
10791
10791
|
rl = new WeakMap(), AZ = new WeakMap(), w(Bi, AZ, /* @__PURE__ */ new WeakSet());
|
|
10792
10792
|
let um = Bi;
|
|
10793
10793
|
const $w = "5.4.530", Ia = "50cc4adac";
|
|
10794
|
-
var qg, lZ, vd, fI, GG, Ed, PA, bG, jl, TC, mG, WI, Hm, Mm, Dm, Gi,
|
|
10794
|
+
var qg, lZ, vd, fI, GG, Ed, PA, bG, jl, TC, mG, WI, Hm, Mm, Dm, Gi, nW, ol;
|
|
10795
10795
|
const Jg = class Jg {
|
|
10796
10796
|
constructor({
|
|
10797
10797
|
editor: I = null,
|
|
@@ -10938,7 +10938,7 @@ qg = new WeakMap(), lZ = new WeakMap(), vd = new WeakMap(), fI = new WeakMap(),
|
|
|
10938
10938
|
this.hideDropdown();
|
|
10939
10939
|
return;
|
|
10940
10940
|
}
|
|
10941
|
-
if (B(this, GG, I.detail === 0), l(this, jl) || (B(this, jl, new AbortController()), window.addEventListener("pointerdown", Y(this, WI,
|
|
10941
|
+
if (B(this, GG, I.detail === 0), l(this, jl) || (B(this, jl, new AbortController()), window.addEventListener("pointerdown", Y(this, WI, nW).bind(this), {
|
|
10942
10942
|
signal: l(this, TC).combinedSignal(l(this, jl))
|
|
10943
10943
|
})), l(this, qg).ariaExpanded = "true", l(this, fI)) {
|
|
10944
10944
|
l(this, fI).classList.remove("hidden");
|
|
@@ -10946,7 +10946,7 @@ qg = new WeakMap(), lZ = new WeakMap(), vd = new WeakMap(), fI = new WeakMap(),
|
|
|
10946
10946
|
}
|
|
10947
10947
|
const g = B(this, fI, Y(this, WI, Hm).call(this));
|
|
10948
10948
|
l(this, qg).append(g);
|
|
10949
|
-
},
|
|
10949
|
+
}, nW = function(I) {
|
|
10950
10950
|
var g;
|
|
10951
10951
|
(g = l(this, fI)) != null && g.contains(I.target) || this.hideDropdown();
|
|
10952
10952
|
}, ol = function() {
|
|
@@ -11077,7 +11077,7 @@ class k0 {
|
|
|
11077
11077
|
case "Tx":
|
|
11078
11078
|
return new Za(I);
|
|
11079
11079
|
case "Btn":
|
|
11080
|
-
return I.data.radioButton ? new
|
|
11080
|
+
return I.data.radioButton ? new XW(I) : I.data.checkBox ? new sa(I) : new ca(I);
|
|
11081
11081
|
case "Ch":
|
|
11082
11082
|
return new Ga(I);
|
|
11083
11083
|
case "Sig":
|
|
@@ -11087,7 +11087,7 @@ class k0 {
|
|
|
11087
11087
|
case QI.POPUP:
|
|
11088
11088
|
return new Sm(I);
|
|
11089
11089
|
case QI.FREETEXT:
|
|
11090
|
-
return new
|
|
11090
|
+
return new MW(I);
|
|
11091
11091
|
case QI.LINE:
|
|
11092
11092
|
return new ma(I);
|
|
11093
11093
|
case QI.SQUARE:
|
|
@@ -11095,7 +11095,7 @@ class k0 {
|
|
|
11095
11095
|
case QI.CIRCLE:
|
|
11096
11096
|
return new Ba(I);
|
|
11097
11097
|
case QI.POLYLINE:
|
|
11098
|
-
return new
|
|
11098
|
+
return new DW(I);
|
|
11099
11099
|
case QI.CARET:
|
|
11100
11100
|
return new ha(I);
|
|
11101
11101
|
case QI.INK:
|
|
@@ -11103,7 +11103,7 @@ class k0 {
|
|
|
11103
11103
|
case QI.POLYGON:
|
|
11104
11104
|
return new Wa(I);
|
|
11105
11105
|
case QI.HIGHLIGHT:
|
|
11106
|
-
return new
|
|
11106
|
+
return new KW(I);
|
|
11107
11107
|
case QI.UNDERLINE:
|
|
11108
11108
|
return new wa(I);
|
|
11109
11109
|
case QI.SQUIGGLY:
|
|
@@ -11111,7 +11111,7 @@ class k0 {
|
|
|
11111
11111
|
case QI.STRIKEOUT:
|
|
11112
11112
|
return new Ya(I);
|
|
11113
11113
|
case QI.STAMP:
|
|
11114
|
-
return new
|
|
11114
|
+
return new SW(I);
|
|
11115
11115
|
case QI.FILEATTACHMENT:
|
|
11116
11116
|
return new ta(I);
|
|
11117
11117
|
default:
|
|
@@ -11271,7 +11271,7 @@ const Ko = class Ko {
|
|
|
11271
11271
|
if (e > 0 || X > 0) {
|
|
11272
11272
|
const y = `calc(${e}px * var(--total-scale-factor)) / calc(${X}px * var(--total-scale-factor))`;
|
|
11273
11273
|
Z.borderRadius = y;
|
|
11274
|
-
} else if (this instanceof
|
|
11274
|
+
} else if (this instanceof XW) {
|
|
11275
11275
|
const y = `calc(${d}px * var(--total-scale-factor)) / calc(${s}px * var(--total-scale-factor))`;
|
|
11276
11276
|
Z.borderRadius = y;
|
|
11277
11277
|
}
|
|
@@ -11631,7 +11631,7 @@ class la extends KI {
|
|
|
11631
11631
|
this.parent.removeAnnotation(this.data.id), this.container.remove(), this.container = null, this.removePopup();
|
|
11632
11632
|
}
|
|
11633
11633
|
}
|
|
11634
|
-
var mC, bi,
|
|
11634
|
+
var mC, bi, VW, NW;
|
|
11635
11635
|
class No extends KI {
|
|
11636
11636
|
constructor(g, C = null) {
|
|
11637
11637
|
super(g, {
|
|
@@ -11649,7 +11649,7 @@ class No extends KI {
|
|
|
11649
11649
|
} = this, A = document.createElement("a");
|
|
11650
11650
|
A.setAttribute("data-element-id", g.id);
|
|
11651
11651
|
let i = !1;
|
|
11652
|
-
return g.url ? (C.addLinkAttributes(A, g.url, g.newWindow), i = !0) : g.action ? (this._bindNamedAction(A, g.action, g.overlaidText), i = !0) : g.attachment ? (Y(this, mC,
|
|
11652
|
+
return g.url ? (C.addLinkAttributes(A, g.url, g.newWindow), i = !0) : g.action ? (this._bindNamedAction(A, g.action, g.overlaidText), i = !0) : g.attachment ? (Y(this, mC, VW).call(this, A, g.attachment, g.overlaidText, g.attachmentDest), i = !0) : g.setOCGState ? (Y(this, mC, NW).call(this, A, g.setOCGState, g.overlaidText), i = !0) : g.dest ? (this._bindLink(A, g.dest, g.overlaidText), i = !0) : (g.actions && (g.actions.Action || g.actions["Mouse Up"] || g.actions["Mouse Down"]) && this.enableScripting && this.hasJSActions && (this._bindJSAction(A, g), i = !0), g.resetForm ? (this._bindResetFormAction(A, g.resetForm), i = !0) : this.isTooltipOnly && !i && (this._bindLink(A, ""), i = !0)), this.container.classList.add("linkAnnotation"), i && (this.contentElement = A, this.container.append(A)), this.container;
|
|
11653
11653
|
}
|
|
11654
11654
|
_bindLink(g, C, A = "") {
|
|
11655
11655
|
g.href = this.linkService.getDestinationHash(C), g.onclick = () => (C && this.linkService.goToDestination(C), !1), (C || C === "") && Y(this, mC, bi).call(this), A && (g.title = A);
|
|
@@ -11758,12 +11758,12 @@ class No extends KI {
|
|
|
11758
11758
|
}
|
|
11759
11759
|
mC = new WeakSet(), bi = function() {
|
|
11760
11760
|
this.container.setAttribute("data-internal-link", "");
|
|
11761
|
-
},
|
|
11761
|
+
}, VW = function(g, C, A = "", i = null) {
|
|
11762
11762
|
g.href = this.linkService.getAnchorUrl(""), C.description ? g.title = C.description : A && (g.title = A), g.onclick = () => {
|
|
11763
11763
|
var Z;
|
|
11764
11764
|
return (Z = this.downloadManager) == null || Z.openOrDownloadData(C.content, C.filename, i), !1;
|
|
11765
11765
|
}, Y(this, mC, bi).call(this);
|
|
11766
|
-
},
|
|
11766
|
+
}, NW = function(g, C, A = "") {
|
|
11767
11767
|
g.href = this.linkService.getAnchorUrl(""), g.onclick = () => (this.linkService.executeSetOCGState(C), !1), A && (g.title = A), Y(this, mC, bi).call(this);
|
|
11768
11768
|
};
|
|
11769
11769
|
class ia extends KI {
|
|
@@ -12142,7 +12142,7 @@ class sa extends FZ {
|
|
|
12142
12142
|
}), this._setEventListeners(i, null, [["change", "Validate"], ["change", "Action"], ["focus", "Focus"], ["blur", "Blur"], ["mousedown", "Mouse Down"], ["mouseenter", "Mouse Enter"], ["mouseleave", "Mouse Exit"], ["mouseup", "Mouse Up"]], (Z) => Z.target.checked)), this._setBackgroundColor(i), this._setDefaultPropertiesFromJS(i), this.container.append(i), this.container;
|
|
12143
12143
|
}
|
|
12144
12144
|
}
|
|
12145
|
-
class
|
|
12145
|
+
class XW extends FZ {
|
|
12146
12146
|
constructor(I) {
|
|
12147
12147
|
super(I, {
|
|
12148
12148
|
isRenderable: I.renderForms
|
|
@@ -12398,7 +12398,7 @@ hG = new WeakSet(), pm = function() {
|
|
|
12398
12398
|
commentManager: this.parent._commentManager
|
|
12399
12399
|
});
|
|
12400
12400
|
};
|
|
12401
|
-
var _g, Ql, o0, B0, qd, _d, JI, bA, xl, ZZ, $d, Is, mA, $g, fA, qA, zI, _A, Ul, wG, $A, gs, dZ, Ol, Ig, vl, _, nb, Fm, Jm, zm, Vb, km,
|
|
12401
|
+
var _g, Ql, o0, B0, qd, _d, JI, bA, xl, ZZ, $d, Is, mA, $g, fA, qA, zI, _A, Ul, wG, $A, gs, dZ, Ol, Ig, vl, _, nb, Fm, Jm, zm, Vb, km, RW, yW, uW, HW, Nb, Xb, Lm;
|
|
12402
12402
|
class ba {
|
|
12403
12403
|
constructor({
|
|
12404
12404
|
container: I,
|
|
@@ -12416,7 +12416,7 @@ class ba {
|
|
|
12416
12416
|
}) {
|
|
12417
12417
|
w(this, _);
|
|
12418
12418
|
w(this, _g, null);
|
|
12419
|
-
w(this, Ql, Y(this, _,
|
|
12419
|
+
w(this, Ql, Y(this, _, uW).bind(this));
|
|
12420
12420
|
w(this, o0, Y(this, _, Lm).bind(this));
|
|
12421
12421
|
w(this, B0, Y(this, _, Xb).bind(this));
|
|
12422
12422
|
w(this, qd, Y(this, _, Nb).bind(this));
|
|
@@ -12628,7 +12628,7 @@ class ba {
|
|
|
12628
12628
|
Y(this, _, nb).call(this), l(this, dZ) || B(this, dZ, {
|
|
12629
12629
|
contentsObj: l(this, bA),
|
|
12630
12630
|
richText: l(this, $A)
|
|
12631
|
-
}), I && B(this, qA, null), g && g.text && (B(this, $A, Y(this, _,
|
|
12631
|
+
}), I && B(this, qA, null), g && g.text && (B(this, $A, Y(this, _, yW).call(this, g.text)), B(this, xl, Qb.toDateObject(g.date)), B(this, bA, null)), (A = l(this, $g)) == null || A.remove(), B(this, $g, null);
|
|
12632
12632
|
}
|
|
12633
12633
|
resetEdited() {
|
|
12634
12634
|
var I;
|
|
@@ -12692,10 +12692,10 @@ _g = new WeakMap(), Ql = new WeakMap(), o0 = new WeakMap(), B0 = new WeakMap(),
|
|
|
12692
12692
|
}, km = function() {
|
|
12693
12693
|
var I, g, C;
|
|
12694
12694
|
return ((C = (g = (I = l(this, _, Vb)) == null ? void 0 : I.attributes) == null ? void 0 : g.style) == null ? void 0 : C.fontSize) || 0;
|
|
12695
|
-
},
|
|
12695
|
+
}, RW = function() {
|
|
12696
12696
|
var I, g, C;
|
|
12697
12697
|
return ((C = (g = (I = l(this, _, Vb)) == null ? void 0 : I.attributes) == null ? void 0 : g.style) == null ? void 0 : C.color) || null;
|
|
12698
|
-
},
|
|
12698
|
+
}, yW = function(I) {
|
|
12699
12699
|
const g = [], C = {
|
|
12700
12700
|
str: I,
|
|
12701
12701
|
html: {
|
|
@@ -12710,7 +12710,7 @@ _g = new WeakMap(), Ql = new WeakMap(), o0 = new WeakMap(), B0 = new WeakMap(),
|
|
|
12710
12710
|
}
|
|
12711
12711
|
}, A = {
|
|
12712
12712
|
style: {
|
|
12713
|
-
color: l(this, _,
|
|
12713
|
+
color: l(this, _, RW),
|
|
12714
12714
|
fontSize: l(this, _, km) ? `calc(${l(this, _, km)}px * var(--total-scale-factor))` : ""
|
|
12715
12715
|
}
|
|
12716
12716
|
};
|
|
@@ -12722,9 +12722,9 @@ _g = new WeakMap(), Ql = new WeakMap(), o0 = new WeakMap(), B0 = new WeakMap(),
|
|
|
12722
12722
|
attributes: A
|
|
12723
12723
|
});
|
|
12724
12724
|
return C;
|
|
12725
|
-
},
|
|
12725
|
+
}, uW = function(I) {
|
|
12726
12726
|
I.altKey || I.shiftKey || I.ctrlKey || I.metaKey || (I.key === "Enter" || I.key === "Escape" && l(this, mA)) && Y(this, _, Nb).call(this);
|
|
12727
|
-
},
|
|
12727
|
+
}, HW = function() {
|
|
12728
12728
|
if (l(this, qA) !== null)
|
|
12729
12729
|
return;
|
|
12730
12730
|
const {
|
|
@@ -12759,11 +12759,11 @@ _g = new WeakMap(), Ql = new WeakMap(), o0 = new WeakMap(), B0 = new WeakMap(),
|
|
|
12759
12759
|
}
|
|
12760
12760
|
B(this, mA, !l(this, mA)), l(this, mA) ? (Y(this, _, Xb).call(this), l(this, JI).addEventListener("click", l(this, qd)), l(this, JI).addEventListener("keydown", l(this, Ql))) : (Y(this, _, Lm).call(this), l(this, JI).removeEventListener("click", l(this, qd)), l(this, JI).removeEventListener("keydown", l(this, Ql)));
|
|
12761
12761
|
}, Xb = function() {
|
|
12762
|
-
l(this, $g) || this.render(), this.isVisible ? l(this, mA) && l(this, JI).classList.add("focused") : (Y(this, _,
|
|
12762
|
+
l(this, $g) || this.render(), this.isVisible ? l(this, mA) && l(this, JI).classList.add("focused") : (Y(this, _, HW).call(this), l(this, JI).hidden = !1, l(this, JI).style.zIndex = parseInt(l(this, JI).style.zIndex) + 1e3);
|
|
12763
12763
|
}, Lm = function() {
|
|
12764
12764
|
l(this, JI).classList.remove("focused"), !(l(this, mA) || !this.isVisible) && (l(this, JI).hidden = !0, l(this, JI).style.zIndex = parseInt(l(this, JI).style.zIndex) - 1e3);
|
|
12765
12765
|
};
|
|
12766
|
-
class
|
|
12766
|
+
class MW extends KI {
|
|
12767
12767
|
constructor(I) {
|
|
12768
12768
|
super(I, {
|
|
12769
12769
|
isRenderable: !0,
|
|
@@ -12862,7 +12862,7 @@ class Ba extends KI {
|
|
|
12862
12862
|
}
|
|
12863
12863
|
tG = new WeakMap();
|
|
12864
12864
|
var eG;
|
|
12865
|
-
class
|
|
12865
|
+
class DW extends KI {
|
|
12866
12866
|
constructor(g) {
|
|
12867
12867
|
super(g, {
|
|
12868
12868
|
isRenderable: !0,
|
|
@@ -12903,7 +12903,7 @@ class MW extends KI {
|
|
|
12903
12903
|
}
|
|
12904
12904
|
}
|
|
12905
12905
|
eG = new WeakMap();
|
|
12906
|
-
class Wa extends
|
|
12906
|
+
class Wa extends DW {
|
|
12907
12907
|
constructor(I) {
|
|
12908
12908
|
super(I), this.containerClassName = "polygonAnnotation", this.svgElementName = "svg:polygon";
|
|
12909
12909
|
}
|
|
@@ -13007,7 +13007,7 @@ nG = new WeakMap(), sZ = new WeakMap(), VG = new WeakSet(), Tm = function(g, C)
|
|
|
13007
13007
|
};
|
|
13008
13008
|
}
|
|
13009
13009
|
};
|
|
13010
|
-
class
|
|
13010
|
+
class KW extends KI {
|
|
13011
13011
|
constructor(I) {
|
|
13012
13012
|
super(I, {
|
|
13013
13013
|
isRenderable: !0,
|
|
@@ -13095,7 +13095,7 @@ class Ya extends KI {
|
|
|
13095
13095
|
return this.container;
|
|
13096
13096
|
}
|
|
13097
13097
|
}
|
|
13098
|
-
class
|
|
13098
|
+
class SW extends KI {
|
|
13099
13099
|
constructor(I) {
|
|
13100
13100
|
super(I, {
|
|
13101
13101
|
isRenderable: !0,
|
|
@@ -13386,7 +13386,7 @@ cZ = new WeakMap(), GZ = new WeakMap(), Cs = new WeakMap(), El = new WeakMap(),
|
|
|
13386
13386
|
};
|
|
13387
13387
|
let jm = So;
|
|
13388
13388
|
const Zb = /\r\n?|\n/g;
|
|
13389
|
-
var gC, uG, mZ, CC, UI,
|
|
13389
|
+
var gC, uG, mZ, CC, UI, pW, FW, JW, yb, Gl, ub, Hb, zW, Um, kW;
|
|
13390
13390
|
const XI = class XI extends NI {
|
|
13391
13391
|
constructor(g) {
|
|
13392
13392
|
super({
|
|
@@ -13398,7 +13398,7 @@ const XI = class XI extends NI {
|
|
|
13398
13398
|
w(this, uG, `${this.id}-editor`);
|
|
13399
13399
|
w(this, mZ, null);
|
|
13400
13400
|
w(this, CC);
|
|
13401
|
-
|
|
13401
|
+
M(this, "_colorPicker", null);
|
|
13402
13402
|
this.color = g.color || XI._defaultColor || NI._defaultLineColor, B(this, CC, g.fontSize || XI._defaultFontSize), this.annotationElementId || this._uiManager.a11yAlert("pdfjs-editor-freetext-added-alert"), this.canAddComment = !1;
|
|
13403
13403
|
}
|
|
13404
13404
|
static get _keyboardManager() {
|
|
@@ -13449,10 +13449,10 @@ const XI = class XI extends NI {
|
|
|
13449
13449
|
updateParams(g, C) {
|
|
13450
13450
|
switch (g) {
|
|
13451
13451
|
case gI.FREETEXT_SIZE:
|
|
13452
|
-
Y(this, UI,
|
|
13452
|
+
Y(this, UI, pW).call(this, C);
|
|
13453
13453
|
break;
|
|
13454
13454
|
case gI.FREETEXT_COLOR:
|
|
13455
|
-
Y(this, UI,
|
|
13455
|
+
Y(this, UI, FW).call(this, C);
|
|
13456
13456
|
break;
|
|
13457
13457
|
}
|
|
13458
13458
|
}
|
|
@@ -13522,7 +13522,7 @@ const XI = class XI extends NI {
|
|
|
13522
13522
|
if (!this.isInEditMode())
|
|
13523
13523
|
return;
|
|
13524
13524
|
super.commit(), this.disableEditMode();
|
|
13525
|
-
const g = l(this, gC), C = B(this, gC, Y(this, UI,
|
|
13525
|
+
const g = l(this, gC), C = B(this, gC, Y(this, UI, JW).call(this).trimEnd());
|
|
13526
13526
|
if (g === C)
|
|
13527
13527
|
return;
|
|
13528
13528
|
const A = (i) => {
|
|
@@ -13684,7 +13684,7 @@ const XI = class XI extends NI {
|
|
|
13684
13684
|
static async deserialize(g, C, A) {
|
|
13685
13685
|
var d;
|
|
13686
13686
|
let i = null;
|
|
13687
|
-
if (g instanceof
|
|
13687
|
+
if (g instanceof MW) {
|
|
13688
13688
|
const {
|
|
13689
13689
|
data: {
|
|
13690
13690
|
defaultAppearanceData: {
|
|
@@ -13741,9 +13741,9 @@ const XI = class XI extends NI {
|
|
|
13741
13741
|
const C = NI._colorManager.convert(this.isAttachedToDOM ? getComputedStyle(this.editorDiv).color : this.color), A = Object.assign(super.serialize(g), {
|
|
13742
13742
|
color: C,
|
|
13743
13743
|
fontSize: l(this, CC),
|
|
13744
|
-
value: Y(this, UI,
|
|
13744
|
+
value: Y(this, UI, zW).call(this)
|
|
13745
13745
|
});
|
|
13746
|
-
return this.addComment(A), g ? (A.isCopy = !0, A) : this.annotationElementId && !Y(this, UI,
|
|
13746
|
+
return this.addComment(A), g ? (A.isCopy = !0, A) : this.annotationElementId && !Y(this, UI, kW).call(this, A) ? null : (A.id = this.annotationElementId, A);
|
|
13747
13747
|
}
|
|
13748
13748
|
renderAnnotationElement(g) {
|
|
13749
13749
|
const C = super.renderAnnotationElement(g);
|
|
@@ -13769,7 +13769,7 @@ const XI = class XI extends NI {
|
|
|
13769
13769
|
super.resetAnnotationElement(g), g.resetEdited();
|
|
13770
13770
|
}
|
|
13771
13771
|
};
|
|
13772
|
-
gC = new WeakMap(), uG = new WeakMap(), mZ = new WeakMap(), CC = new WeakMap(), UI = new WeakSet(),
|
|
13772
|
+
gC = new WeakMap(), uG = new WeakMap(), mZ = new WeakMap(), CC = new WeakMap(), UI = new WeakSet(), pW = function(g) {
|
|
13773
13773
|
const C = (i) => {
|
|
13774
13774
|
this.editorDiv.style.fontSize = `calc(${i}px * var(--total-scale-factor))`, this.translate(0, -(i - l(this, CC)) * this.parentScale), B(this, CC, i), Y(this, UI, yb).call(this);
|
|
13775
13775
|
}, A = l(this, CC);
|
|
@@ -13782,7 +13782,7 @@ gC = new WeakMap(), uG = new WeakMap(), mZ = new WeakMap(), CC = new WeakMap(),
|
|
|
13782
13782
|
overwriteIfSameType: !0,
|
|
13783
13783
|
keepUndo: !0
|
|
13784
13784
|
});
|
|
13785
|
-
},
|
|
13785
|
+
}, FW = function(g) {
|
|
13786
13786
|
const C = (i) => {
|
|
13787
13787
|
this.color = i, this.onUpdatedColor();
|
|
13788
13788
|
}, A = this.color;
|
|
@@ -13795,7 +13795,7 @@ gC = new WeakMap(), uG = new WeakMap(), mZ = new WeakMap(), CC = new WeakMap(),
|
|
|
13795
13795
|
overwriteIfSameType: !0,
|
|
13796
13796
|
keepUndo: !0
|
|
13797
13797
|
});
|
|
13798
|
-
},
|
|
13798
|
+
}, JW = function() {
|
|
13799
13799
|
var A;
|
|
13800
13800
|
const g = [];
|
|
13801
13801
|
this.editorDiv.normalize();
|
|
@@ -13826,11 +13826,11 @@ gC = new WeakMap(), uG = new WeakMap(), mZ = new WeakMap(), CC = new WeakMap(),
|
|
|
13826
13826
|
const C = document.createElement("div");
|
|
13827
13827
|
C.append(g ? document.createTextNode(g) : document.createElement("br")), this.editorDiv.append(C);
|
|
13828
13828
|
}
|
|
13829
|
-
},
|
|
13829
|
+
}, zW = function() {
|
|
13830
13830
|
return l(this, gC).replaceAll(" ", " ");
|
|
13831
13831
|
}, Um = function(g) {
|
|
13832
13832
|
return g.replaceAll(" ", " ");
|
|
13833
|
-
},
|
|
13833
|
+
}, kW = function(g) {
|
|
13834
13834
|
const {
|
|
13835
13835
|
value: C,
|
|
13836
13836
|
fontSize: A,
|
|
@@ -13838,7 +13838,7 @@ gC = new WeakMap(), uG = new WeakMap(), mZ = new WeakMap(), CC = new WeakMap(),
|
|
|
13838
13838
|
pageIndex: Z
|
|
13839
13839
|
} = this._initialData;
|
|
13840
13840
|
return this.hasEditedComment || this._hasBeenMoved || g.value !== C || g.fontSize !== A || g.color.some((d, s) => d !== i[s]) || g.pageIndex !== Z;
|
|
13841
|
-
}, w(XI, Gl),
|
|
13841
|
+
}, w(XI, Gl), M(XI, "_freeTextDefaultContent", ""), M(XI, "_internalPadding", 0), M(XI, "_defaultColor", null), M(XI, "_defaultFontSize", 10), M(XI, "_type", "freetext"), M(XI, "_editorType", P.FREETEXT);
|
|
13842
13842
|
let xm = XI;
|
|
13843
13843
|
class J {
|
|
13844
13844
|
toSVGPath() {
|
|
@@ -13899,8 +13899,8 @@ class J {
|
|
|
13899
13899
|
return [(I + 5 * C) / 6, (g + 5 * A) / 6, (5 * C + i) / 6, (5 * A + Z) / 6, (C + i) / 2, (A + Z) / 2];
|
|
13900
13900
|
}
|
|
13901
13901
|
}
|
|
13902
|
-
|
|
13903
|
-
var AC, rC, As, ls, oA, $, oZ, BZ, HG, MG, is, Zs, Pl, DG, W0, h0, qI, Os,
|
|
13902
|
+
M(J, "PRECISION", 1e-4);
|
|
13903
|
+
var AC, rC, As, ls, oA, $, oZ, BZ, HG, MG, is, Zs, Pl, DG, W0, h0, qI, Os, LW, TW, rW, jW, QW, xW;
|
|
13904
13904
|
const RA = class RA {
|
|
13905
13905
|
constructor({
|
|
13906
13906
|
x: I,
|
|
@@ -13947,18 +13947,18 @@ const RA = class RA {
|
|
|
13947
13947
|
return "";
|
|
13948
13948
|
const I = l(this, oA), g = l(this, rC);
|
|
13949
13949
|
if (isNaN(l(this, $)[6]) && !this.isEmpty())
|
|
13950
|
-
return Y(this, qI,
|
|
13950
|
+
return Y(this, qI, LW).call(this);
|
|
13951
13951
|
const C = [];
|
|
13952
13952
|
C.push(`M${I[4]} ${I[5]}`);
|
|
13953
13953
|
for (let A = 6; A < I.length; A += 6)
|
|
13954
13954
|
isNaN(I[A]) ? C.push(`L${I[A + 4]} ${I[A + 5]}`) : C.push(`C${I[A]} ${I[A + 1]} ${I[A + 2]} ${I[A + 3]} ${I[A + 4]} ${I[A + 5]}`);
|
|
13955
|
-
Y(this, qI,
|
|
13955
|
+
Y(this, qI, rW).call(this, C);
|
|
13956
13956
|
for (let A = g.length - 6; A >= 6; A -= 6)
|
|
13957
13957
|
isNaN(g[A]) ? C.push(`L${g[A + 4]} ${g[A + 5]}`) : C.push(`C${g[A]} ${g[A + 1]} ${g[A + 2]} ${g[A + 3]} ${g[A + 4]} ${g[A + 5]}`);
|
|
13958
|
-
return Y(this, qI,
|
|
13958
|
+
return Y(this, qI, TW).call(this, C), C.join(" ");
|
|
13959
13959
|
}
|
|
13960
13960
|
newFreeDrawOutline(I, g, C, A, i, Z) {
|
|
13961
|
-
return new
|
|
13961
|
+
return new UW(I, g, C, A, i, Z);
|
|
13962
13962
|
}
|
|
13963
13963
|
getOutlines() {
|
|
13964
13964
|
var m;
|
|
@@ -13966,7 +13966,7 @@ const RA = class RA {
|
|
|
13966
13966
|
for (let W = 0, a = s.length - 2; W < a; W += 2)
|
|
13967
13967
|
s[W] = (l(this, Pl)[W] - A) / Z, s[W + 1] = (l(this, Pl)[W + 1] - i) / d;
|
|
13968
13968
|
if (s[s.length - 2] = (l(this, oZ) - A) / Z, s[s.length - 1] = (l(this, BZ) - i) / d, isNaN(C[6]) && !this.isEmpty())
|
|
13969
|
-
return Y(this, qI,
|
|
13969
|
+
return Y(this, qI, jW).call(this, s);
|
|
13970
13970
|
const c = new Float32Array(l(this, oA).length + 24 + l(this, rC).length);
|
|
13971
13971
|
let G = I.length;
|
|
13972
13972
|
for (let W = 0; W < G; W += 2) {
|
|
@@ -13976,7 +13976,7 @@ const RA = class RA {
|
|
|
13976
13976
|
}
|
|
13977
13977
|
c[W] = I[W], c[W + 1] = I[W + 1];
|
|
13978
13978
|
}
|
|
13979
|
-
G = Y(this, qI,
|
|
13979
|
+
G = Y(this, qI, xW).call(this, c, G);
|
|
13980
13980
|
for (let W = g.length - 6; W >= 6; W -= 6)
|
|
13981
13981
|
for (let a = 0; a < 6; a += 2) {
|
|
13982
13982
|
if (isNaN(g[W + a])) {
|
|
@@ -13985,34 +13985,34 @@ const RA = class RA {
|
|
|
13985
13985
|
}
|
|
13986
13986
|
c[G] = g[W + a], c[G + 1] = g[W + a + 1], G += 2;
|
|
13987
13987
|
}
|
|
13988
|
-
return Y(this, qI,
|
|
13988
|
+
return Y(this, qI, QW).call(this, c, G), this.newFreeDrawOutline(c, s, l(this, AC), l(this, is), l(this, As), l(this, ls));
|
|
13989
13989
|
}
|
|
13990
13990
|
};
|
|
13991
13991
|
AC = new WeakMap(), rC = new WeakMap(), As = new WeakMap(), ls = new WeakMap(), oA = new WeakMap(), $ = new WeakMap(), oZ = new WeakMap(), BZ = new WeakMap(), HG = new WeakMap(), MG = new WeakMap(), is = new WeakMap(), Zs = new WeakMap(), Pl = new WeakMap(), DG = new WeakMap(), W0 = new WeakMap(), h0 = new WeakMap(), qI = new WeakSet(), Os = function() {
|
|
13992
13992
|
const I = l(this, $).subarray(4, 6), g = l(this, $).subarray(16, 18), [C, A, i, Z] = l(this, AC);
|
|
13993
13993
|
return [(l(this, oZ) + (I[0] - g[0]) / 2 - C) / i, (l(this, BZ) + (I[1] - g[1]) / 2 - A) / Z, (l(this, oZ) + (g[0] - I[0]) / 2 - C) / i, (l(this, BZ) + (g[1] - I[1]) / 2 - A) / Z];
|
|
13994
|
-
},
|
|
13994
|
+
}, LW = function() {
|
|
13995
13995
|
const [I, g, C, A] = l(this, AC), [i, Z, d, s] = Y(this, qI, Os).call(this);
|
|
13996
13996
|
return `M${(l(this, $)[2] - I) / C} ${(l(this, $)[3] - g) / A} L${(l(this, $)[4] - I) / C} ${(l(this, $)[5] - g) / A} L${i} ${Z} L${d} ${s} L${(l(this, $)[16] - I) / C} ${(l(this, $)[17] - g) / A} L${(l(this, $)[14] - I) / C} ${(l(this, $)[15] - g) / A} Z`;
|
|
13997
|
-
},
|
|
13997
|
+
}, TW = function(I) {
|
|
13998
13998
|
const g = l(this, rC);
|
|
13999
13999
|
I.push(`L${g[4]} ${g[5]} Z`);
|
|
14000
|
-
},
|
|
14000
|
+
}, rW = function(I) {
|
|
14001
14001
|
const [g, C, A, i] = l(this, AC), Z = l(this, $).subarray(4, 6), d = l(this, $).subarray(16, 18), [s, c, G, m] = Y(this, qI, Os).call(this);
|
|
14002
14002
|
I.push(`L${(Z[0] - g) / A} ${(Z[1] - C) / i} L${s} ${c} L${G} ${m} L${(d[0] - g) / A} ${(d[1] - C) / i}`);
|
|
14003
|
-
},
|
|
14003
|
+
}, jW = function(I) {
|
|
14004
14004
|
const g = l(this, $), [C, A, i, Z] = l(this, AC), [d, s, c, G] = Y(this, qI, Os).call(this), m = new Float32Array(36);
|
|
14005
14005
|
return m.set([NaN, NaN, NaN, NaN, (g[2] - C) / i, (g[3] - A) / Z, NaN, NaN, NaN, NaN, (g[4] - C) / i, (g[5] - A) / Z, NaN, NaN, NaN, NaN, d, s, NaN, NaN, NaN, NaN, c, G, NaN, NaN, NaN, NaN, (g[16] - C) / i, (g[17] - A) / Z, NaN, NaN, NaN, NaN, (g[14] - C) / i, (g[15] - A) / Z], 0), this.newFreeDrawOutline(m, I, l(this, AC), l(this, is), l(this, As), l(this, ls));
|
|
14006
|
-
},
|
|
14006
|
+
}, QW = function(I, g) {
|
|
14007
14007
|
const C = l(this, rC);
|
|
14008
14008
|
return I.set([NaN, NaN, NaN, NaN, C[4], C[5]], g), g += 6;
|
|
14009
|
-
},
|
|
14009
|
+
}, xW = function(I, g) {
|
|
14010
14010
|
const C = l(this, $).subarray(4, 6), A = l(this, $).subarray(16, 18), [i, Z, d, s] = l(this, AC), [c, G, m, W] = Y(this, qI, Os).call(this);
|
|
14011
14011
|
return I.set([NaN, NaN, NaN, NaN, (C[0] - i) / d, (C[1] - Z) / s, NaN, NaN, NaN, NaN, c, G, NaN, NaN, NaN, NaN, m, W, NaN, NaN, NaN, NaN, (A[0] - i) / d, (A[1] - Z) / s], g), g += 24;
|
|
14012
14012
|
}, w(RA, DG, 8), w(RA, W0, 2), w(RA, h0, l(RA, DG) + l(RA, W0));
|
|
14013
14013
|
let _b = RA;
|
|
14014
|
-
var ds, WZ, Il, KG, lC, SG, rI, w0,
|
|
14015
|
-
class
|
|
14014
|
+
var ds, WZ, Il, KG, lC, SG, rI, w0, OW;
|
|
14015
|
+
class UW extends J {
|
|
14016
14016
|
constructor(g, C, A, i, Z, d) {
|
|
14017
14017
|
super();
|
|
14018
14018
|
w(this, w0);
|
|
@@ -14023,7 +14023,7 @@ class xW extends J {
|
|
|
14023
14023
|
w(this, lC);
|
|
14024
14024
|
w(this, SG);
|
|
14025
14025
|
w(this, rI);
|
|
14026
|
-
B(this, rI, g), B(this, lC, C), B(this, ds, A), B(this, SG, i), B(this, Il, Z), B(this, KG, d), this.firstPoint = [NaN, NaN], this.lastPoint = [NaN, NaN], Y(this, w0,
|
|
14026
|
+
B(this, rI, g), B(this, lC, C), B(this, ds, A), B(this, SG, i), B(this, Il, Z), B(this, KG, d), this.firstPoint = [NaN, NaN], this.lastPoint = [NaN, NaN], Y(this, w0, OW).call(this, d);
|
|
14027
14027
|
const [s, c, G, m] = l(this, WZ);
|
|
14028
14028
|
for (let W = 0, a = g.length; W < a; W += 2)
|
|
14029
14029
|
g[W] = (g[W] - s) / G, g[W + 1] = (g[W + 1] - c) / m;
|
|
@@ -14082,7 +14082,7 @@ class xW extends J {
|
|
|
14082
14082
|
return X.getOutlines();
|
|
14083
14083
|
}
|
|
14084
14084
|
}
|
|
14085
|
-
ds = new WeakMap(), WZ = new WeakMap(), Il = new WeakMap(), KG = new WeakMap(), lC = new WeakMap(), SG = new WeakMap(), rI = new WeakMap(), w0 = new WeakSet(),
|
|
14085
|
+
ds = new WeakMap(), WZ = new WeakMap(), Il = new WeakMap(), KG = new WeakMap(), lC = new WeakMap(), SG = new WeakMap(), rI = new WeakMap(), w0 = new WeakSet(), OW = function(g) {
|
|
14086
14086
|
const C = l(this, rI);
|
|
14087
14087
|
let A = C[4], i = C[5];
|
|
14088
14088
|
const Z = [A, i, A, i];
|
|
@@ -14095,7 +14095,7 @@ ds = new WeakMap(), WZ = new WeakMap(), Il = new WeakMap(), KG = new WeakMap(),
|
|
|
14095
14095
|
const a = l(this, WZ);
|
|
14096
14096
|
a[0] = Z[0] - l(this, Il), a[1] = Z[1] - l(this, Il), a[2] = Z[2] - Z[0] + 2 * l(this, Il), a[3] = Z[3] - Z[1] + 2 * l(this, Il), this.firstPoint = [d, s], this.lastPoint = [c, G];
|
|
14097
14097
|
};
|
|
14098
|
-
var pG, FG, JG, fl, jC, Sg,
|
|
14098
|
+
var pG, FG, JG, fl, jC, Sg, vW, Mb, EW, PW, vm;
|
|
14099
14099
|
class Om {
|
|
14100
14100
|
constructor(I, g = 0, C = 0, A = !0) {
|
|
14101
14101
|
w(this, Sg);
|
|
@@ -14127,11 +14127,11 @@ class Om {
|
|
|
14127
14127
|
l(this, fl).sort((g, C) => g[0] - C[0] || g[1] - C[1] || g[2] - C[2]);
|
|
14128
14128
|
const I = [];
|
|
14129
14129
|
for (const g of l(this, fl))
|
|
14130
|
-
g[3] ? (I.push(...Y(this, Sg, vm).call(this, g)), Y(this, Sg,
|
|
14131
|
-
return Y(this, Sg,
|
|
14130
|
+
g[3] ? (I.push(...Y(this, Sg, vm).call(this, g)), Y(this, Sg, EW).call(this, g)) : (Y(this, Sg, PW).call(this, g), I.push(...Y(this, Sg, vm).call(this, g)));
|
|
14131
|
+
return Y(this, Sg, vW).call(this, I);
|
|
14132
14132
|
}
|
|
14133
14133
|
}
|
|
14134
|
-
pG = new WeakMap(), FG = new WeakMap(), JG = new WeakMap(), fl = new WeakMap(), jC = new WeakMap(), Sg = new WeakSet(),
|
|
14134
|
+
pG = new WeakMap(), FG = new WeakMap(), JG = new WeakMap(), fl = new WeakMap(), jC = new WeakMap(), Sg = new WeakSet(), vW = function(I) {
|
|
14135
14135
|
const g = [], C = /* @__PURE__ */ new Set();
|
|
14136
14136
|
for (const Z of I) {
|
|
14137
14137
|
const [d, s, c] = Z;
|
|
@@ -14172,10 +14172,10 @@ pG = new WeakMap(), FG = new WeakMap(), JG = new WeakMap(), fl = new WeakMap(),
|
|
|
14172
14172
|
Z < I ? C = i + 1 : A = i - 1;
|
|
14173
14173
|
}
|
|
14174
14174
|
return A + 1;
|
|
14175
|
-
},
|
|
14175
|
+
}, EW = function([, I, g]) {
|
|
14176
14176
|
const C = Y(this, Sg, Mb).call(this, I);
|
|
14177
14177
|
l(this, jC).splice(C, 0, [I, g]);
|
|
14178
|
-
},
|
|
14178
|
+
}, PW = function([, I, g]) {
|
|
14179
14179
|
const C = Y(this, Sg, Mb).call(this, I);
|
|
14180
14180
|
for (let A = C; A < l(this, jC).length; A++) {
|
|
14181
14181
|
const [i, Z] = l(this, jC)[A];
|
|
@@ -14262,12 +14262,12 @@ class Em extends _b {
|
|
|
14262
14262
|
return new na(I, g, C, A, i, Z);
|
|
14263
14263
|
}
|
|
14264
14264
|
}
|
|
14265
|
-
class na extends
|
|
14265
|
+
class na extends UW {
|
|
14266
14266
|
newOutliner(I, g, C, A, i, Z = 0) {
|
|
14267
14267
|
return new Em(I, g, C, A, i, Z);
|
|
14268
14268
|
}
|
|
14269
14269
|
}
|
|
14270
|
-
var cs, kG, gl, hZ, LG, rg, TG, rG, wZ, iC, ZC, Gg, Gs, bs, Vg, ms, RC, jG, q, Pm, Db,
|
|
14270
|
+
var cs, kG, gl, hZ, LG, rg, TG, rG, wZ, iC, ZC, Gg, Gs, bs, Vg, ms, RC, jG, q, Pm, Db, fW, qW, _W, fm, mi, uC, QZ, $W, Kb, Sb, Ih, gh, Ch, Ah, lh;
|
|
14271
14271
|
const ZI = class ZI extends NI {
|
|
14272
14272
|
constructor(g) {
|
|
14273
14273
|
super({
|
|
@@ -14352,10 +14352,10 @@ const ZI = class ZI extends NI {
|
|
|
14352
14352
|
updateParams(g, C) {
|
|
14353
14353
|
switch (g) {
|
|
14354
14354
|
case gI.HIGHLIGHT_COLOR:
|
|
14355
|
-
Y(this, q,
|
|
14355
|
+
Y(this, q, fW).call(this, C);
|
|
14356
14356
|
break;
|
|
14357
14357
|
case gI.HIGHLIGHT_THICKNESS:
|
|
14358
|
-
Y(this, q,
|
|
14358
|
+
Y(this, q, qW).call(this, C);
|
|
14359
14359
|
break;
|
|
14360
14360
|
}
|
|
14361
14361
|
}
|
|
@@ -14432,7 +14432,7 @@ const ZI = class ZI extends NI {
|
|
|
14432
14432
|
if (this.div)
|
|
14433
14433
|
return this.div;
|
|
14434
14434
|
const g = super.render();
|
|
14435
|
-
l(this, ms) && (g.setAttribute("aria-label", l(this, ms)), g.setAttribute("role", "mark")), l(this, Gg) ? g.classList.add("free") : this.div.addEventListener("keydown", Y(this, q,
|
|
14435
|
+
l(this, ms) && (g.setAttribute("aria-label", l(this, ms)), g.setAttribute("role", "mark")), l(this, Gg) ? g.classList.add("free") : this.div.addEventListener("keydown", Y(this, q, $W).bind(this), {
|
|
14436
14436
|
signal: this._uiManager._signal
|
|
14437
14437
|
});
|
|
14438
14438
|
const C = B(this, wZ, document.createElement("div"));
|
|
@@ -14508,7 +14508,7 @@ const ZI = class ZI extends NI {
|
|
|
14508
14508
|
width: c,
|
|
14509
14509
|
height: G
|
|
14510
14510
|
} = A.getBoundingClientRect(), m = new AbortController(), W = g.combinedSignal(m), a = (t) => {
|
|
14511
|
-
m.abort(), Y(this, uC,
|
|
14511
|
+
m.abort(), Y(this, uC, Ah).call(this, g, t);
|
|
14512
14512
|
};
|
|
14513
14513
|
window.addEventListener("blur", a, {
|
|
14514
14514
|
signal: W
|
|
@@ -14520,7 +14520,7 @@ const ZI = class ZI extends NI {
|
|
|
14520
14520
|
signal: W
|
|
14521
14521
|
}), window.addEventListener("contextmenu", MC, {
|
|
14522
14522
|
signal: W
|
|
14523
|
-
}), A.addEventListener("pointermove", Y(this, uC,
|
|
14523
|
+
}), A.addEventListener("pointermove", Y(this, uC, Ch).bind(this, g), {
|
|
14524
14524
|
signal: W
|
|
14525
14525
|
}), this._freeHighlight = new Em({
|
|
14526
14526
|
x: i,
|
|
@@ -14547,7 +14547,7 @@ const ZI = class ZI extends NI {
|
|
|
14547
14547
|
static async deserialize(g, C, A) {
|
|
14548
14548
|
var e, X, V, y;
|
|
14549
14549
|
let i = null;
|
|
14550
|
-
if (g instanceof
|
|
14550
|
+
if (g instanceof KW) {
|
|
14551
14551
|
const {
|
|
14552
14552
|
data: {
|
|
14553
14553
|
quadPoints: N,
|
|
@@ -14558,7 +14558,7 @@ const ZI = class ZI extends NI {
|
|
|
14558
14558
|
opacity: u,
|
|
14559
14559
|
popupRef: H,
|
|
14560
14560
|
richText: K,
|
|
14561
|
-
contentsObj:
|
|
14561
|
+
contentsObj: D,
|
|
14562
14562
|
creationDate: z,
|
|
14563
14563
|
modificationDate: L
|
|
14564
14564
|
},
|
|
@@ -14582,7 +14582,7 @@ const ZI = class ZI extends NI {
|
|
|
14582
14582
|
deleted: !1,
|
|
14583
14583
|
popupRef: H,
|
|
14584
14584
|
richText: K,
|
|
14585
|
-
comment: (
|
|
14585
|
+
comment: (D == null ? void 0 : D.str) || null,
|
|
14586
14586
|
creationDate: z,
|
|
14587
14587
|
modificationDate: L
|
|
14588
14588
|
};
|
|
@@ -14599,7 +14599,7 @@ const ZI = class ZI extends NI {
|
|
|
14599
14599
|
},
|
|
14600
14600
|
popupRef: H,
|
|
14601
14601
|
richText: K,
|
|
14602
|
-
contentsObj:
|
|
14602
|
+
contentsObj: D,
|
|
14603
14603
|
creationDate: z,
|
|
14604
14604
|
modificationDate: L
|
|
14605
14605
|
},
|
|
@@ -14623,7 +14623,7 @@ const ZI = class ZI extends NI {
|
|
|
14623
14623
|
deleted: !1,
|
|
14624
14624
|
popupRef: H,
|
|
14625
14625
|
richText: K,
|
|
14626
|
-
comment: (
|
|
14626
|
+
comment: (D == null ? void 0 : D.str) || null,
|
|
14627
14627
|
creationDate: z,
|
|
14628
14628
|
modificationDate: L
|
|
14629
14629
|
};
|
|
@@ -14690,9 +14690,9 @@ const ZI = class ZI extends NI {
|
|
|
14690
14690
|
color: C,
|
|
14691
14691
|
opacity: this.opacity,
|
|
14692
14692
|
thickness: l(this, RC),
|
|
14693
|
-
quadPoints: Y(this, q,
|
|
14694
|
-
outlines: Y(this, q,
|
|
14695
|
-
}), this.addComment(A), this.annotationElementId && !Y(this, q,
|
|
14693
|
+
quadPoints: Y(this, q, Ih).call(this),
|
|
14694
|
+
outlines: Y(this, q, gh).call(this, A.rect)
|
|
14695
|
+
}), this.addComment(A), this.annotationElementId && !Y(this, q, lh).call(this, A) ? null : (A.id = this.annotationElementId, A);
|
|
14696
14696
|
}
|
|
14697
14697
|
renderAnnotationElement(g) {
|
|
14698
14698
|
return this.deleted ? (g.hide(), null) : (g.updateEdited({
|
|
@@ -14780,7 +14780,7 @@ cs = new WeakMap(), kG = new WeakMap(), gl = new WeakMap(), hZ = new WeakMap(),
|
|
|
14780
14780
|
lastPoint: m
|
|
14781
14781
|
} = l(this, rg);
|
|
14782
14782
|
B(this, bs, [(m[0] - Z) / s, (m[1] - d) / c]);
|
|
14783
|
-
},
|
|
14783
|
+
}, fW = function(g) {
|
|
14784
14784
|
const C = (Z, d) => {
|
|
14785
14785
|
this.color = Z, this.opacity = d, this.onUpdatedColor();
|
|
14786
14786
|
}, A = this.color, i = this.opacity;
|
|
@@ -14796,9 +14796,9 @@ cs = new WeakMap(), kG = new WeakMap(), gl = new WeakMap(), hZ = new WeakMap(),
|
|
|
14796
14796
|
action: "color_changed",
|
|
14797
14797
|
color: this._uiManager.getNonHCMColorName(g)
|
|
14798
14798
|
}, !0);
|
|
14799
|
-
},
|
|
14799
|
+
}, qW = function(g) {
|
|
14800
14800
|
const C = l(this, RC), A = (i) => {
|
|
14801
|
-
B(this, RC, i), Y(this, q,
|
|
14801
|
+
B(this, RC, i), Y(this, q, _W).call(this, i);
|
|
14802
14802
|
};
|
|
14803
14803
|
this.addCommands({
|
|
14804
14804
|
cmd: A.bind(this, g),
|
|
@@ -14812,7 +14812,7 @@ cs = new WeakMap(), kG = new WeakMap(), gl = new WeakMap(), hZ = new WeakMap(),
|
|
|
14812
14812
|
action: "thickness_changed",
|
|
14813
14813
|
thickness: g
|
|
14814
14814
|
}, !0);
|
|
14815
|
-
},
|
|
14815
|
+
}, _W = function(g) {
|
|
14816
14816
|
l(this, Gg) && (Y(this, q, Db).call(this, {
|
|
14817
14817
|
highlightOutlines: l(this, iC).getNewOutline(g / 2)
|
|
14818
14818
|
}), this.fixAndSetPosition(), this.setDims());
|
|
@@ -14856,7 +14856,7 @@ cs = new WeakMap(), kG = new WeakMap(), gl = new WeakMap(), hZ = new WeakMap(),
|
|
|
14856
14856
|
return [C, 1 - g - A, i, A];
|
|
14857
14857
|
}
|
|
14858
14858
|
return [g, C, A, i];
|
|
14859
|
-
},
|
|
14859
|
+
}, $W = function(g) {
|
|
14860
14860
|
ZI._keyboardManager.exec(this, g);
|
|
14861
14861
|
}, Kb = function(g) {
|
|
14862
14862
|
if (!l(this, cs))
|
|
@@ -14865,7 +14865,7 @@ cs = new WeakMap(), kG = new WeakMap(), gl = new WeakMap(), hZ = new WeakMap(),
|
|
|
14865
14865
|
g ? C.setPosition(l(this, cs), l(this, kG)) : C.setPosition(l(this, TG), l(this, rG));
|
|
14866
14866
|
}, Sb = function() {
|
|
14867
14867
|
return l(this, Gg) ? this.rotation : 0;
|
|
14868
|
-
},
|
|
14868
|
+
}, Ih = function() {
|
|
14869
14869
|
if (l(this, Gg))
|
|
14870
14870
|
return null;
|
|
14871
14871
|
const [g, C] = this.pageDimensions, [A, i] = this.pageTranslation, Z = l(this, gl), d = new Float32Array(Z.length * 8);
|
|
@@ -14880,30 +14880,30 @@ cs = new WeakMap(), kG = new WeakMap(), gl = new WeakMap(), hZ = new WeakMap(),
|
|
|
14880
14880
|
d[s] = d[s + 4] = a, d[s + 1] = d[s + 3] = t, d[s + 2] = d[s + 6] = a + m * g, d[s + 5] = d[s + 7] = t - W * C, s += 8;
|
|
14881
14881
|
}
|
|
14882
14882
|
return d;
|
|
14883
|
-
},
|
|
14883
|
+
}, gh = function(g) {
|
|
14884
14884
|
return l(this, iC).serialize(g, Y(this, q, Sb).call(this));
|
|
14885
|
-
},
|
|
14885
|
+
}, Ch = function(g, C) {
|
|
14886
14886
|
this._freeHighlight.add(C) && g.drawLayer.updateProperties(this._freeHighlightId, {
|
|
14887
14887
|
path: {
|
|
14888
14888
|
d: this._freeHighlight.toSVGPath()
|
|
14889
14889
|
}
|
|
14890
14890
|
});
|
|
14891
|
-
},
|
|
14891
|
+
}, Ah = function(g, C) {
|
|
14892
14892
|
this._freeHighlight.isEmpty() ? g.drawLayer.remove(this._freeHighlightId) : g.createAndAddNewEditor(C, !1, {
|
|
14893
14893
|
highlightId: this._freeHighlightId,
|
|
14894
14894
|
highlightOutlines: this._freeHighlight.getOutlines(),
|
|
14895
14895
|
clipPathId: this._freeHighlightClipId,
|
|
14896
14896
|
methodOfCreation: "main_toolbar"
|
|
14897
14897
|
}), this._freeHighlightId = -1, this._freeHighlight = null, this._freeHighlightClipId = "";
|
|
14898
|
-
},
|
|
14898
|
+
}, lh = function(g) {
|
|
14899
14899
|
const {
|
|
14900
14900
|
color: C
|
|
14901
14901
|
} = this._initialData;
|
|
14902
14902
|
return this.hasEditedComment || g.color.some((A, i) => A !== C[i]);
|
|
14903
|
-
}, w(ZI, uC),
|
|
14903
|
+
}, w(ZI, uC), M(ZI, "_defaultColor", null), M(ZI, "_defaultOpacity", 1), M(ZI, "_defaultThickness", 12), M(ZI, "_type", "highlight"), M(ZI, "_editorType", P.HIGHLIGHT), M(ZI, "_freeHighlightId", -1), M(ZI, "_freeHighlight", null), M(ZI, "_freeHighlightClipId", "");
|
|
14904
14904
|
let $b = ZI;
|
|
14905
14905
|
var aZ;
|
|
14906
|
-
class
|
|
14906
|
+
class ih {
|
|
14907
14907
|
constructor() {
|
|
14908
14908
|
w(this, aZ, /* @__PURE__ */ Object.create(null));
|
|
14909
14909
|
}
|
|
@@ -14935,15 +14935,15 @@ class lh {
|
|
|
14935
14935
|
}
|
|
14936
14936
|
}
|
|
14937
14937
|
aZ = new WeakMap();
|
|
14938
|
-
var dC, os, gg, YZ, tZ, AI, qm, _m, $m, vs,
|
|
14938
|
+
var dC, os, gg, YZ, tZ, AI, qm, _m, $m, vs, Zh, pb, Es, xZ;
|
|
14939
14939
|
const II = class II extends NI {
|
|
14940
14940
|
constructor(g) {
|
|
14941
14941
|
super(g);
|
|
14942
14942
|
w(this, AI);
|
|
14943
14943
|
w(this, dC, null);
|
|
14944
14944
|
w(this, os);
|
|
14945
|
-
|
|
14946
|
-
|
|
14945
|
+
M(this, "_colorPicker", null);
|
|
14946
|
+
M(this, "_drawId", null);
|
|
14947
14947
|
B(this, os, g.mustBeCommitted || !1), this._addOutlines(g);
|
|
14948
14948
|
}
|
|
14949
14949
|
onUpdatedColor() {
|
|
@@ -15264,7 +15264,7 @@ dC = new WeakMap(), os = new WeakMap(), gg = new WeakMap(), YZ = new WeakMap(),
|
|
|
15264
15264
|
}
|
|
15265
15265
|
this._drawingOptions.updateAll(), this._drawId = Y(this, AI, _m).call(this, l(this, dC), g);
|
|
15266
15266
|
}
|
|
15267
|
-
},
|
|
15267
|
+
}, Zh = function([g, C, A, i]) {
|
|
15268
15268
|
const {
|
|
15269
15269
|
parentDimensions: [Z, d],
|
|
15270
15270
|
rotation: s
|
|
@@ -15299,7 +15299,7 @@ dC = new WeakMap(), os = new WeakMap(), gg = new WeakMap(), YZ = new WeakMap(),
|
|
|
15299
15299
|
return [g, C, A, i];
|
|
15300
15300
|
}
|
|
15301
15301
|
}, Es = function(g) {
|
|
15302
|
-
[this.x, this.y, this.width, this.height] = Y(this, AI,
|
|
15302
|
+
[this.x, this.y, this.width, this.height] = Y(this, AI, Zh).call(this, g), this.div && (this.fixAndSetPosition(), this.setDims()), this._onResized();
|
|
15303
15303
|
}, xZ = function() {
|
|
15304
15304
|
const {
|
|
15305
15305
|
x: g,
|
|
@@ -15344,7 +15344,7 @@ dC = new WeakMap(), os = new WeakMap(), gg = new WeakMap(), YZ = new WeakMap(),
|
|
|
15344
15344
|
default:
|
|
15345
15345
|
return [g, C, A, i];
|
|
15346
15346
|
}
|
|
15347
|
-
},
|
|
15347
|
+
}, M(II, "_currentDrawId", -1), M(II, "_currentParent", null), w(II, gg, null), w(II, YZ, null), w(II, tZ, null), M(II, "_INNER_MARGIN", 3);
|
|
15348
15348
|
let I0 = II;
|
|
15349
15349
|
var BA, Cg, Ag, eZ, Bs, yg, bg, yC, nZ, VZ, NZ, Ws, Fb;
|
|
15350
15350
|
class Va {
|
|
@@ -15474,7 +15474,7 @@ class Va {
|
|
|
15474
15474
|
BA = new WeakMap(), Cg = new WeakMap(), Ag = new WeakMap(), eZ = new WeakMap(), Bs = new WeakMap(), yg = new WeakMap(), bg = new WeakMap(), yC = new WeakMap(), nZ = new WeakMap(), VZ = new WeakMap(), NZ = new WeakMap(), Ws = new WeakSet(), Fb = function(I, g) {
|
|
15475
15475
|
return J._normalizePoint(I, g, l(this, VZ), l(this, NZ), l(this, eZ));
|
|
15476
15476
|
};
|
|
15477
|
-
var ug, QG, xG, sC, WA, hA, hs, ws, XZ, og, NA,
|
|
15477
|
+
var ug, QG, xG, sC, WA, hA, hs, ws, XZ, og, NA, dh, sh, ch;
|
|
15478
15478
|
class _G extends J {
|
|
15479
15479
|
constructor() {
|
|
15480
15480
|
super(...arguments);
|
|
@@ -15490,7 +15490,7 @@ class _G extends J {
|
|
|
15490
15490
|
w(this, XZ);
|
|
15491
15491
|
}
|
|
15492
15492
|
build(g, C, A, i, Z, d, s) {
|
|
15493
|
-
B(this, WA, C), B(this, hA, A), B(this, hs, i), B(this, ws, Z), B(this, XZ, d), B(this, xG, s ?? 0), B(this, sC, g), Y(this, og,
|
|
15493
|
+
B(this, WA, C), B(this, hA, A), B(this, hs, i), B(this, ws, Z), B(this, XZ, d), B(this, xG, s ?? 0), B(this, sC, g), Y(this, og, sh).call(this);
|
|
15494
15494
|
}
|
|
15495
15495
|
get thickness() {
|
|
15496
15496
|
return l(this, XZ);
|
|
@@ -15530,7 +15530,7 @@ class _G extends J {
|
|
|
15530
15530
|
return g.join("");
|
|
15531
15531
|
}
|
|
15532
15532
|
serialize([g, C, A, i], Z) {
|
|
15533
|
-
const d = [], s = [], [c, G, m, W] = Y(this, og,
|
|
15533
|
+
const d = [], s = [], [c, G, m, W] = Y(this, og, dh).call(this);
|
|
15534
15534
|
let a, t, e, X, V, y, N, o, h;
|
|
15535
15535
|
switch (l(this, ws)) {
|
|
15536
15536
|
case 0:
|
|
@@ -15598,8 +15598,8 @@ class _G extends J {
|
|
|
15598
15598
|
let [h, n, R, u] = y.subarray(0, 4);
|
|
15599
15599
|
o.set([NaN, NaN, NaN, NaN, h, n], 0);
|
|
15600
15600
|
for (let H = 4; H < N; H += 2) {
|
|
15601
|
-
const K = y[H],
|
|
15602
|
-
o.set(J.createBezierPoints(h, n, R, u, K,
|
|
15601
|
+
const K = y[H], D = y[H + 1];
|
|
15602
|
+
o.set(J.createBezierPoints(h, n, R, u, K, D), (H - 2) * 3), [h, n, R, u] = [R, u, K, D];
|
|
15603
15603
|
}
|
|
15604
15604
|
}
|
|
15605
15605
|
}
|
|
@@ -15615,7 +15615,7 @@ class _G extends J {
|
|
|
15615
15615
|
return l(this, ug);
|
|
15616
15616
|
}
|
|
15617
15617
|
updateProperty(g, C) {
|
|
15618
|
-
return g === "stroke-width" ? Y(this, og,
|
|
15618
|
+
return g === "stroke-width" ? Y(this, og, ch).call(this, C) : null;
|
|
15619
15619
|
}
|
|
15620
15620
|
updateParentDimensions([g, C], A) {
|
|
15621
15621
|
const [i, Z] = Y(this, og, NA).call(this);
|
|
@@ -15768,10 +15768,10 @@ class _G extends J {
|
|
|
15768
15768
|
ug = new WeakMap(), QG = new WeakMap(), xG = new WeakMap(), sC = new WeakMap(), WA = new WeakMap(), hA = new WeakMap(), hs = new WeakMap(), ws = new WeakMap(), XZ = new WeakMap(), og = new WeakSet(), NA = function(g = l(this, XZ)) {
|
|
15769
15769
|
const C = l(this, xG) + g / 2 * l(this, hs);
|
|
15770
15770
|
return l(this, ws) % 180 === 0 ? [C / l(this, WA), C / l(this, hA)] : [C / l(this, hA), C / l(this, WA)];
|
|
15771
|
-
},
|
|
15771
|
+
}, dh = function() {
|
|
15772
15772
|
const [g, C, A, i] = l(this, ug), [Z, d] = Y(this, og, NA).call(this, 0);
|
|
15773
15773
|
return [g + Z, C + d, A - 2 * Z, i - 2 * d];
|
|
15774
|
-
},
|
|
15774
|
+
}, sh = function() {
|
|
15775
15775
|
const g = B(this, ug, new Float32Array([1 / 0, 1 / 0, -1 / 0, -1 / 0]));
|
|
15776
15776
|
for (const {
|
|
15777
15777
|
line: i
|
|
@@ -15789,13 +15789,13 @@ ug = new WeakMap(), QG = new WeakMap(), xG = new WeakMap(), sC = new WeakMap(),
|
|
|
15789
15789
|
}
|
|
15790
15790
|
const [C, A] = Y(this, og, NA).call(this);
|
|
15791
15791
|
g[0] = Dg(g[0] - C, 0, 1), g[1] = Dg(g[1] - A, 0, 1), g[2] = Dg(g[2] + C, 0, 1), g[3] = Dg(g[3] + A, 0, 1), g[2] -= g[0], g[3] -= g[1];
|
|
15792
|
-
},
|
|
15792
|
+
}, ch = function(g) {
|
|
15793
15793
|
const [C, A] = Y(this, og, NA).call(this);
|
|
15794
15794
|
B(this, XZ, g);
|
|
15795
15795
|
const [i, Z] = Y(this, og, NA).call(this), [d, s] = [i - C, Z - A], c = l(this, ug);
|
|
15796
15796
|
return c[0] -= d, c[1] -= s, c[2] += 2 * d, c[3] += 2 * s, c;
|
|
15797
15797
|
};
|
|
15798
|
-
class X0 extends
|
|
15798
|
+
class X0 extends ih {
|
|
15799
15799
|
constructor(I) {
|
|
15800
15800
|
super(), this._viewParameters = I, super.updateProperties({
|
|
15801
15801
|
fill: "none",
|
|
@@ -15815,7 +15815,7 @@ class X0 extends lh {
|
|
|
15815
15815
|
return I.updateAll(this), I;
|
|
15816
15816
|
}
|
|
15817
15817
|
}
|
|
15818
|
-
var a0,
|
|
15818
|
+
var a0, Gh;
|
|
15819
15819
|
const fZ = class fZ extends I0 {
|
|
15820
15820
|
constructor(g) {
|
|
15821
15821
|
super({
|
|
@@ -15956,7 +15956,7 @@ const fZ = class fZ extends I0 {
|
|
|
15956
15956
|
points: A
|
|
15957
15957
|
}
|
|
15958
15958
|
});
|
|
15959
|
-
return this.addComment(s), g ? (s.isCopy = !0, s) : this.annotationElementId && !Y(this, a0,
|
|
15959
|
+
return this.addComment(s), g ? (s.isCopy = !0, s) : this.annotationElementId && !Y(this, a0, Gh).call(this, s) ? null : (s.id = this.annotationElementId, s);
|
|
15960
15960
|
}
|
|
15961
15961
|
renderAnnotationElement(g) {
|
|
15962
15962
|
if (this.deleted)
|
|
@@ -15973,7 +15973,7 @@ const fZ = class fZ extends I0 {
|
|
|
15973
15973
|
}), null;
|
|
15974
15974
|
}
|
|
15975
15975
|
};
|
|
15976
|
-
a0 = new WeakSet(),
|
|
15976
|
+
a0 = new WeakSet(), Gh = function(g) {
|
|
15977
15977
|
const {
|
|
15978
15978
|
color: C,
|
|
15979
15979
|
thickness: A,
|
|
@@ -15981,7 +15981,7 @@ a0 = new WeakSet(), ch = function(g) {
|
|
|
15981
15981
|
pageIndex: Z
|
|
15982
15982
|
} = this._initialData;
|
|
15983
15983
|
return this.hasEditedComment || this._hasBeenMoved || this._hasBeenResized || g.color.some((d, s) => d !== C[s]) || g.thickness !== A || g.opacity !== i || g.pageIndex !== Z;
|
|
15984
|
-
},
|
|
15984
|
+
}, M(fZ, "_type", "ink"), M(fZ, "_editorType", P.INK), M(fZ, "_defaultDrawingOptions", null);
|
|
15985
15985
|
let Io = fZ;
|
|
15986
15986
|
class go extends _G {
|
|
15987
15987
|
toSVGPath() {
|
|
@@ -15990,7 +15990,7 @@ class go extends _G {
|
|
|
15990
15990
|
}
|
|
15991
15991
|
}
|
|
15992
15992
|
const db = 8, Hs = 3;
|
|
15993
|
-
var RZ, dI, Co, QC,
|
|
15993
|
+
var RZ, dI, Co, QC, bh, mh, Ao, Jb, oh, Bh, Wh, lo, io, hh;
|
|
15994
15994
|
class dl {
|
|
15995
15995
|
static extractContoursFromText(I, {
|
|
15996
15996
|
fontFamily: g,
|
|
@@ -16013,7 +16013,7 @@ class dl {
|
|
|
16013
16013
|
alpha: !0,
|
|
16014
16014
|
willReadFrequently: !0
|
|
16015
16015
|
}), G.font = W, G.filter = "grayscale(1)", G.fillStyle = "white", G.fillRect(0, 0, h, n), G.fillStyle = "black", G.fillText(I, h * (o - 1) / 2, n * (3 - o) / 2);
|
|
16016
|
-
const R = Y(this, dI, lo).call(this, G.getImageData(0, 0, h, n).data), u = Y(this, dI,
|
|
16016
|
+
const R = Y(this, dI, lo).call(this, G.getImageData(0, 0, h, n).data), u = Y(this, dI, Wh).call(this, R), H = Y(this, dI, io).call(this, u), K = Y(this, dI, Ao).call(this, R, h, n, H);
|
|
16017
16017
|
return this.processDrawnLines({
|
|
16018
16018
|
lines: {
|
|
16019
16019
|
curves: K,
|
|
@@ -16029,7 +16029,7 @@ class dl {
|
|
|
16029
16029
|
});
|
|
16030
16030
|
}
|
|
16031
16031
|
static process(I, g, C, A, i) {
|
|
16032
|
-
const [Z, d, s] = Y(this, dI,
|
|
16032
|
+
const [Z, d, s] = Y(this, dI, hh).call(this, I), [c, G] = Y(this, dI, Bh).call(this, Z, d, s, Math.hypot(d, s) * l(this, RZ).sigmaSFactor, l(this, RZ).sigmaR, l(this, RZ).kernelSize), m = Y(this, dI, io).call(this, G), W = Y(this, dI, Ao).call(this, c, d, s, m);
|
|
16033
16033
|
return this.processDrawnLines({
|
|
16034
16034
|
lines: {
|
|
16035
16035
|
curves: W,
|
|
@@ -16062,7 +16062,7 @@ class dl {
|
|
|
16062
16062
|
for (const {
|
|
16063
16063
|
points: y
|
|
16064
16064
|
} of s) {
|
|
16065
|
-
const N = Z ? Y(this, dI,
|
|
16065
|
+
const N = Z ? Y(this, dI, oh).call(this, y) : y;
|
|
16066
16066
|
if (!N)
|
|
16067
16067
|
continue;
|
|
16068
16068
|
X.push(N);
|
|
@@ -16076,9 +16076,9 @@ class dl {
|
|
|
16076
16076
|
}
|
|
16077
16077
|
let [R, u, H, K] = N;
|
|
16078
16078
|
R *= t, u *= e, H *= t, K *= e, h.set([R, u, H, K], 0), n.set([NaN, NaN, NaN, NaN, R, u], 0);
|
|
16079
|
-
for (let
|
|
16080
|
-
const z = h[
|
|
16081
|
-
n.set(J.createBezierPoints(R, u, H, K, z, L), (
|
|
16079
|
+
for (let D = 4; D < o; D += 2) {
|
|
16080
|
+
const z = h[D] = N[D] * t, L = h[D + 1] = N[D + 1] * e;
|
|
16081
|
+
n.set(J.createBezierPoints(R, u, H, K, z, L), (D - 2) * 3), [R, u, H, K] = [H, K, z, L];
|
|
16082
16082
|
}
|
|
16083
16083
|
}
|
|
16084
16084
|
if (W.length === 0)
|
|
@@ -16130,7 +16130,7 @@ class dl {
|
|
|
16130
16130
|
}
|
|
16131
16131
|
static async decompressSignature(I) {
|
|
16132
16132
|
try {
|
|
16133
|
-
const g =
|
|
16133
|
+
const g = kh(I), {
|
|
16134
16134
|
readable: C,
|
|
16135
16135
|
writable: A
|
|
16136
16136
|
} = new DecompressionStream("deflate-raw"), i = A.getWriter();
|
|
@@ -16180,7 +16180,7 @@ class dl {
|
|
|
16180
16180
|
}
|
|
16181
16181
|
RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
16182
16182
|
return C -= I, A -= g, C === 0 ? A > 0 ? 0 : 4 : C === 1 ? A + 6 : 2 - A;
|
|
16183
|
-
}, QC = new WeakMap(),
|
|
16183
|
+
}, QC = new WeakMap(), bh = function(I, g, C, A, i, Z, d) {
|
|
16184
16184
|
const s = Y(this, dI, Co).call(this, C, A, i, Z);
|
|
16185
16185
|
for (let c = 0; c < 8; c++) {
|
|
16186
16186
|
const G = (-c + s - d + 16) % 8, m = l(this, QC)[2 * G], W = l(this, QC)[2 * G + 1];
|
|
@@ -16188,7 +16188,7 @@ RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
|
16188
16188
|
return G;
|
|
16189
16189
|
}
|
|
16190
16190
|
return -1;
|
|
16191
|
-
},
|
|
16191
|
+
}, mh = function(I, g, C, A, i, Z, d) {
|
|
16192
16192
|
const s = Y(this, dI, Co).call(this, C, A, i, Z);
|
|
16193
16193
|
for (let c = 0; c < 8; c++) {
|
|
16194
16194
|
const G = (c + s + d + 16) % 8, m = l(this, QC)[2 * G], W = l(this, QC)[2 * G + 1];
|
|
@@ -16229,13 +16229,13 @@ RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
|
16229
16229
|
};
|
|
16230
16230
|
c.push(y);
|
|
16231
16231
|
let N;
|
|
16232
|
-
for (const
|
|
16233
|
-
if (
|
|
16234
|
-
N =
|
|
16232
|
+
for (const D of c)
|
|
16233
|
+
if (D.id === s) {
|
|
16234
|
+
N = D;
|
|
16235
16235
|
break;
|
|
16236
16236
|
}
|
|
16237
16237
|
N ? N.isHole ? y.parent = V ? N.parent : s : y.parent = V ? s : N.parent : y.parent = V ? s : 0;
|
|
16238
|
-
const o = Y(this, dI,
|
|
16238
|
+
const o = Y(this, dI, bh).call(this, Z, g, G, m, t, e, 0);
|
|
16239
16239
|
if (o === -1) {
|
|
16240
16240
|
Z[W] = -d, Z[W] !== 1 && (s = Math.abs(Z[W]));
|
|
16241
16241
|
continue;
|
|
@@ -16245,8 +16245,8 @@ RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
|
16245
16245
|
t = R, e = u;
|
|
16246
16246
|
let H = G, K = m;
|
|
16247
16247
|
for (; ; ) {
|
|
16248
|
-
const
|
|
16249
|
-
h = l(this, QC)[2 *
|
|
16248
|
+
const D = Y(this, dI, mh).call(this, Z, g, H, K, t, e, 1);
|
|
16249
|
+
h = l(this, QC)[2 * D], n = l(this, QC)[2 * D + 1];
|
|
16250
16250
|
const z = H + h, L = K + n;
|
|
16251
16251
|
X.push(L, z);
|
|
16252
16252
|
const T = H * g + K;
|
|
@@ -16272,10 +16272,10 @@ RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
|
16272
16272
|
u > h && (n = R, h = u);
|
|
16273
16273
|
}
|
|
16274
16274
|
h > (c * o) ** 2 ? (Y(this, dI, Jb).call(this, I, g, n + 2, A), Y(this, dI, Jb).call(this, I, n, C, A)) : A.push(i, Z);
|
|
16275
|
-
},
|
|
16275
|
+
}, oh = function(I) {
|
|
16276
16276
|
const g = [], C = I.length;
|
|
16277
16277
|
return Y(this, dI, Jb).call(this, I, 0, C, g), g.push(I[C - 2], I[C - 1]), g.length <= 4 ? null : g;
|
|
16278
|
-
},
|
|
16278
|
+
}, Bh = function(I, g, C, A, i, Z) {
|
|
16279
16279
|
const d = new Float32Array(Z ** 2), s = -2 * A ** 2, c = Z >> 1;
|
|
16280
16280
|
for (let e = 0; e < Z; e++) {
|
|
16281
16281
|
const X = (e - c) ** 2;
|
|
@@ -16297,15 +16297,15 @@ RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
|
16297
16297
|
const H = X + u - c;
|
|
16298
16298
|
if (H < 0 || H >= g)
|
|
16299
16299
|
continue;
|
|
16300
|
-
const K = I[R * g + H],
|
|
16301
|
-
N += K *
|
|
16300
|
+
const K = I[R * g + H], D = d[n * Z + u] * G[Math.abs(K - y)];
|
|
16301
|
+
N += K * D, o += D;
|
|
16302
16302
|
}
|
|
16303
16303
|
}
|
|
16304
16304
|
const h = a[V] = Math.round(N / o);
|
|
16305
16305
|
t[h]++;
|
|
16306
16306
|
}
|
|
16307
16307
|
return [a, t];
|
|
16308
|
-
},
|
|
16308
|
+
}, Wh = function(I) {
|
|
16309
16309
|
const g = new Uint32Array(256);
|
|
16310
16310
|
for (const C of I)
|
|
16311
16311
|
g[C]++;
|
|
@@ -16332,7 +16332,7 @@ RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
|
16332
16332
|
for (g = d - 1; g >= 0 && !(I[g] > I[g + 1]); g--)
|
|
16333
16333
|
;
|
|
16334
16334
|
return g;
|
|
16335
|
-
},
|
|
16335
|
+
}, hh = function(I) {
|
|
16336
16336
|
const g = I, {
|
|
16337
16337
|
width: C,
|
|
16338
16338
|
height: A
|
|
@@ -16364,7 +16364,7 @@ RZ = new WeakMap(), dI = new WeakSet(), Co = function(I, g, C, A) {
|
|
|
16364
16364
|
sigmaR: 25,
|
|
16365
16365
|
kernelSize: 16
|
|
16366
16366
|
}), w(dl, QC, new Int32Array([0, 1, -1, 1, -1, 0, -1, -1, 0, -1, 1, -1, 1, 0, 1, 1]));
|
|
16367
|
-
class Ro extends
|
|
16367
|
+
class Ro extends ih {
|
|
16368
16368
|
constructor() {
|
|
16369
16369
|
super(), super.updateProperties({
|
|
16370
16370
|
fill: NI._defaultLineColor,
|
|
@@ -16630,9 +16630,9 @@ const xg = class xg extends I0 {
|
|
|
16630
16630
|
return B(i, ql, g.areContours), i.description = ((Z = g.accessibilityData) == null ? void 0 : Z.alt) || "", B(i, yZ, g.uuid), i;
|
|
16631
16631
|
}
|
|
16632
16632
|
};
|
|
16633
|
-
ql = new WeakMap(), wA = new WeakMap(), _l = new WeakMap(), yZ = new WeakMap(),
|
|
16633
|
+
ql = new WeakMap(), wA = new WeakMap(), _l = new WeakMap(), yZ = new WeakMap(), M(xg, "_type", "signature"), M(xg, "_editorType", P.SIGNATURE), M(xg, "_defaultDrawingOptions", null);
|
|
16634
16634
|
let Zo = xg;
|
|
16635
|
-
var uI, lg, $l, Cl, Ii, as, Al, uZ, aA, cC, Ys, lI, Ps, fs, zb, kb, Lb, co, Tb,
|
|
16635
|
+
var uI, lg, $l, Cl, Ii, as, Al, uZ, aA, cC, Ys, lI, Ps, fs, zb, kb, Lb, co, Tb, wh;
|
|
16636
16636
|
class so extends NI {
|
|
16637
16637
|
constructor(g) {
|
|
16638
16638
|
super({
|
|
@@ -16784,7 +16784,7 @@ class so extends NI {
|
|
|
16784
16784
|
const e = m.getContext("2d");
|
|
16785
16785
|
e.filter = this._uiManager.hcmFilter;
|
|
16786
16786
|
let X = "white", V = "#cfcfd8";
|
|
16787
|
-
this._uiManager.hcmFilter !== "none" ? V = "black" :
|
|
16787
|
+
this._uiManager.hcmFilter !== "none" ? V = "black" : xh.isDarkMode && (X = "#8f8f9d", V = "#42414d");
|
|
16788
16788
|
const y = 15, N = y * d.sx, o = y * d.sy, h = new OffscreenCanvas(N * 2, o * 2), n = h.getContext("2d");
|
|
16789
16789
|
n.fillStyle = X, n.fillRect(0, 0, N * 2, o * 2), n.fillStyle = V, n.fillRect(0, 0, N, o), n.fillRect(N, o, N, o), e.fillStyle = e.createPattern(h, "repeat"), e.fillRect(0, 0, a, t), e.drawImage(s, 0, 0, s.width, s.height, 0, 0, a, t);
|
|
16790
16790
|
}
|
|
@@ -16816,7 +16816,7 @@ class so extends NI {
|
|
|
16816
16816
|
static async deserialize(g, C, A) {
|
|
16817
16817
|
var X;
|
|
16818
16818
|
let i = null, Z = !1;
|
|
16819
|
-
if (g instanceof
|
|
16819
|
+
if (g instanceof SW) {
|
|
16820
16820
|
const {
|
|
16821
16821
|
data: {
|
|
16822
16822
|
rect: V,
|
|
@@ -16832,7 +16832,7 @@ class so extends NI {
|
|
|
16832
16832
|
container: K,
|
|
16833
16833
|
parent: {
|
|
16834
16834
|
page: {
|
|
16835
|
-
pageNumber:
|
|
16835
|
+
pageNumber: D
|
|
16836
16836
|
}
|
|
16837
16837
|
},
|
|
16838
16838
|
canvas: z
|
|
@@ -16847,7 +16847,7 @@ class so extends NI {
|
|
|
16847
16847
|
annotationType: P.STAMP,
|
|
16848
16848
|
bitmapId: L,
|
|
16849
16849
|
bitmap: T,
|
|
16850
|
-
pageIndex:
|
|
16850
|
+
pageIndex: D - 1,
|
|
16851
16851
|
rect: V.slice(0),
|
|
16852
16852
|
rotation: y,
|
|
16853
16853
|
annotationElementId: N,
|
|
@@ -16897,7 +16897,7 @@ class so extends NI {
|
|
|
16897
16897
|
type: "Figure",
|
|
16898
16898
|
alt: Z
|
|
16899
16899
|
}), this.annotationElementId) {
|
|
16900
|
-
const s = Y(this, lI,
|
|
16900
|
+
const s = Y(this, lI, wh).call(this, A);
|
|
16901
16901
|
return s.isSame ? null : (s.isSameAltText ? delete A.accessibilityData : A.accessibilityData.structParent = this._initialData.structParent ?? -1, A.id = this.annotationElementId, delete A.bitmapId, A);
|
|
16902
16902
|
}
|
|
16903
16903
|
if (C === null)
|
|
@@ -17054,7 +17054,7 @@ uI = new WeakMap(), lg = new WeakMap(), $l = new WeakMap(), Cl = new WeakMap(),
|
|
|
17054
17054
|
return d.getContext("2d").drawImage(l(this, uI), 0, 0, l(this, uI).width, l(this, uI).height, 0, 0, i, Z), d.transferToImageBitmap();
|
|
17055
17055
|
}
|
|
17056
17056
|
return structuredClone(l(this, uI));
|
|
17057
|
-
},
|
|
17057
|
+
}, wh = function(g) {
|
|
17058
17058
|
var d;
|
|
17059
17059
|
const {
|
|
17060
17060
|
pageIndex: C,
|
|
@@ -17066,8 +17066,8 @@ uI = new WeakMap(), lg = new WeakMap(), $l = new WeakMap(), Cl = new WeakMap(),
|
|
|
17066
17066
|
isSame: !this.hasEditedComment && !this._hasBeenMoved && !this._hasBeenResized && i && Z,
|
|
17067
17067
|
isSameAltText: Z
|
|
17068
17068
|
};
|
|
17069
|
-
},
|
|
17070
|
-
var HZ, ts, gi, Ci, ll, jg, Ai, es, ns, xC, il, ig, Zl, li, Vs, k, ii, YI, bo,
|
|
17069
|
+
}, M(so, "_type", "stamp"), M(so, "_editorType", P.STAMP);
|
|
17070
|
+
var HZ, ts, gi, Ci, ll, jg, Ai, es, ns, xC, il, ig, Zl, li, Vs, k, ii, YI, bo, ah, fC, mo, oo, rb;
|
|
17071
17071
|
const SC = class SC {
|
|
17072
17072
|
constructor({
|
|
17073
17073
|
uiManager: I,
|
|
@@ -17277,7 +17277,7 @@ const SC = class SC {
|
|
|
17277
17277
|
if (this.div.tabIndex = -1, (I = l(this, ig)) != null && I.div && !l(this, Zl)) {
|
|
17278
17278
|
B(this, Zl, new AbortController());
|
|
17279
17279
|
const g = l(this, k).combinedSignal(l(this, Zl));
|
|
17280
|
-
l(this, ig).div.addEventListener("pointerdown", Y(this, YI,
|
|
17280
|
+
l(this, ig).div.addEventListener("pointerdown", Y(this, YI, ah).bind(this), {
|
|
17281
17281
|
signal: g
|
|
17282
17282
|
}), l(this, ig).div.classList.add("highlighting");
|
|
17283
17283
|
}
|
|
@@ -17542,7 +17542,7 @@ const SC = class SC {
|
|
|
17542
17542
|
};
|
|
17543
17543
|
HZ = new WeakMap(), ts = new WeakMap(), gi = new WeakMap(), Ci = new WeakMap(), ll = new WeakMap(), jg = new WeakMap(), Ai = new WeakMap(), es = new WeakMap(), ns = new WeakMap(), xC = new WeakMap(), il = new WeakMap(), ig = new WeakMap(), Zl = new WeakMap(), li = new WeakMap(), Vs = new WeakMap(), k = new WeakMap(), ii = new WeakMap(), YI = new WeakSet(), bo = function() {
|
|
17544
17544
|
return l(this, jg).size !== 0 ? l(this, jg).values() : l(this, k).getEditors(this.pageIndex);
|
|
17545
|
-
},
|
|
17545
|
+
}, ah = function(I) {
|
|
17546
17546
|
l(this, k).unselectAll();
|
|
17547
17547
|
const {
|
|
17548
17548
|
target: g
|
|
@@ -17583,9 +17583,9 @@ HZ = new WeakMap(), ts = new WeakMap(), gi = new WeakMap(), Ci = new WeakMap(),
|
|
|
17583
17583
|
}, rb = function() {
|
|
17584
17584
|
for (const I of l(this, jg).values())
|
|
17585
17585
|
I.isEmpty() && I.remove();
|
|
17586
|
-
},
|
|
17586
|
+
}, M(SC, "_initialized", !1), w(SC, ii, new Map([xm, Io, so, $b, Zo].map((I) => [I._editorType, I])));
|
|
17587
17587
|
let Go = SC;
|
|
17588
|
-
var UC, Hg, MZ, UG, Y0,
|
|
17588
|
+
var UC, Hg, MZ, UG, Y0, Yh, eA, Wo, th, ho;
|
|
17589
17589
|
const EI = class EI {
|
|
17590
17590
|
constructor({
|
|
17591
17591
|
pageIndex: I
|
|
@@ -17618,7 +17618,7 @@ const EI = class EI {
|
|
|
17618
17618
|
Z.append(d);
|
|
17619
17619
|
const s = `path_p${this.pageIndex}_${A}`;
|
|
17620
17620
|
d.setAttribute("id", s), d.setAttribute("vector-effect", "non-scaling-stroke"), g && l(this, MZ).set(A, d);
|
|
17621
|
-
const c = C ? Y(this, eA,
|
|
17621
|
+
const c = C ? Y(this, eA, th).call(this, Z, s) : null, G = EI._svgFactory.createElement("use");
|
|
17622
17622
|
return i.append(G), G.setAttribute("href", `#${s}`), this.updateProperties(i, I), l(this, Hg).set(A, i), {
|
|
17623
17623
|
id: A,
|
|
17624
17624
|
clipPathId: `url(#${c})`
|
|
@@ -17659,7 +17659,7 @@ const EI = class EI {
|
|
|
17659
17659
|
path: Z
|
|
17660
17660
|
} = g, d = typeof I == "number" ? l(this, Hg).get(I) : I;
|
|
17661
17661
|
if (d) {
|
|
17662
|
-
if (C && Y(this, eA, ho).call(this, d, C), A && Y(s = EI, Y0,
|
|
17662
|
+
if (C && Y(this, eA, ho).call(this, d, C), A && Y(s = EI, Y0, Yh).call(s, d, A), i) {
|
|
17663
17663
|
const {
|
|
17664
17664
|
classList: c
|
|
17665
17665
|
} = d;
|
|
@@ -17688,7 +17688,7 @@ const EI = class EI {
|
|
|
17688
17688
|
l(this, Hg).clear(), l(this, MZ).clear();
|
|
17689
17689
|
}
|
|
17690
17690
|
};
|
|
17691
|
-
UC = new WeakMap(), Hg = new WeakMap(), MZ = new WeakMap(), UG = new WeakMap(), Y0 = new WeakSet(),
|
|
17691
|
+
UC = new WeakMap(), Hg = new WeakMap(), MZ = new WeakMap(), UG = new WeakMap(), Y0 = new WeakSet(), Yh = function(I, [g, C, A, i]) {
|
|
17692
17692
|
const {
|
|
17693
17693
|
style: Z
|
|
17694
17694
|
} = I;
|
|
@@ -17696,7 +17696,7 @@ UC = new WeakMap(), Hg = new WeakMap(), MZ = new WeakMap(), UG = new WeakMap(),
|
|
|
17696
17696
|
}, eA = new WeakSet(), Wo = function() {
|
|
17697
17697
|
const I = EI._svgFactory.create(1, 1, !0);
|
|
17698
17698
|
return l(this, UC).append(I), I.setAttribute("aria-hidden", !0), I;
|
|
17699
|
-
},
|
|
17699
|
+
}, th = function(I, g) {
|
|
17700
17700
|
const C = EI._svgFactory.createElement("clipPath");
|
|
17701
17701
|
I.append(C);
|
|
17702
17702
|
const A = `clip_${g}`;
|
|
@@ -17720,38 +17720,38 @@ globalThis.pdfjsLib = {
|
|
|
17720
17720
|
AnnotationLayer: jm,
|
|
17721
17721
|
AnnotationMode: Wl,
|
|
17722
17722
|
AnnotationType: QI,
|
|
17723
|
-
applyOpacity:
|
|
17723
|
+
applyOpacity: Oh,
|
|
17724
17724
|
build: Ia,
|
|
17725
17725
|
ColorPicker: Pb,
|
|
17726
17726
|
createValidAbsoluteUrl: GB,
|
|
17727
|
-
CSSConstants:
|
|
17727
|
+
CSSConstants: Uh,
|
|
17728
17728
|
DOMSVGFactory: qb,
|
|
17729
17729
|
DrawLayer: Bo,
|
|
17730
17730
|
FeatureTest: _I,
|
|
17731
17731
|
fetchData: vG,
|
|
17732
|
-
findContrastColor:
|
|
17733
|
-
getDocument:
|
|
17734
|
-
getFilenameFromUrl:
|
|
17735
|
-
getPdfFilenameFromUrl:
|
|
17732
|
+
findContrastColor: vh,
|
|
17733
|
+
getDocument: aW,
|
|
17734
|
+
getFilenameFromUrl: Lh,
|
|
17735
|
+
getPdfFilenameFromUrl: Th,
|
|
17736
17736
|
getRGB: PG,
|
|
17737
17737
|
getUuid: oB,
|
|
17738
|
-
getXfaPageViewport:
|
|
17738
|
+
getXfaPageViewport: jh,
|
|
17739
17739
|
GlobalWorkerOptions: YA,
|
|
17740
17740
|
ImageKind: sb,
|
|
17741
17741
|
InvalidPDFException: x0,
|
|
17742
17742
|
isDataScheme: V0,
|
|
17743
17743
|
isPdfFile: to,
|
|
17744
|
-
isValidExplicitDest:
|
|
17744
|
+
isValidExplicitDest: lw,
|
|
17745
17745
|
MathClamp: Dg,
|
|
17746
17746
|
noContextMenu: MC,
|
|
17747
|
-
normalizeUnicode:
|
|
17747
|
+
normalizeUnicode: Jh,
|
|
17748
17748
|
OPS: _s,
|
|
17749
17749
|
OutputScale: tA,
|
|
17750
|
-
PasswordResponses:
|
|
17751
|
-
PDFDataRangeTransport:
|
|
17750
|
+
PasswordResponses: yh,
|
|
17751
|
+
PDFDataRangeTransport: YW,
|
|
17752
17752
|
PDFDateString: Qb,
|
|
17753
17753
|
PDFWorker: gc,
|
|
17754
|
-
PermissionFlag:
|
|
17754
|
+
PermissionFlag: Rh,
|
|
17755
17755
|
PixelsPerInch: di,
|
|
17756
17756
|
RenderingCancelledException: Yo,
|
|
17757
17757
|
renderRichText: hB,
|
|
@@ -17959,26 +17959,26 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
17959
17959
|
static LimitPointToCircle(o, h, n) {
|
|
17960
17960
|
if (d.GetDistanceBetweenTwoPoint(o, n) <= h) return n;
|
|
17961
17961
|
const R = o.x, u = o.y, H = n.x, K = n.y;
|
|
17962
|
-
let
|
|
17963
|
-
n.x < 0 && (
|
|
17964
|
-
let z = (
|
|
17965
|
-
return R - H + u === 0 && (z = h), { x:
|
|
17962
|
+
let D = Math.sqrt(Math.pow(h, 2) * Math.pow(R - H, 2) / (Math.pow(R - H, 2) + Math.pow(u - K, 2))) + R;
|
|
17963
|
+
n.x < 0 && (D *= -1);
|
|
17964
|
+
let z = (D - R) * (u - K) / (R - H) + u;
|
|
17965
|
+
return R - H + u === 0 && (z = h), { x: D, y: z };
|
|
17966
17966
|
}
|
|
17967
17967
|
static GetIntersectBetweenTwoSegment(o, h, n) {
|
|
17968
17968
|
return d.PointInRect(o, d.GetIntersectBeetwenTwoLine(h, n));
|
|
17969
17969
|
}
|
|
17970
17970
|
static GetIntersectBeetwenTwoLine(o, h) {
|
|
17971
|
-
const n = o[0].y - o[1].y, R = h[0].y - h[1].y, u = o[1].x - o[0].x, H = h[1].x - h[0].x, K = o[0].x * o[1].y - o[1].x * o[0].y,
|
|
17971
|
+
const n = o[0].y - o[1].y, R = h[0].y - h[1].y, u = o[1].x - o[0].x, H = h[1].x - h[0].x, K = o[0].x * o[1].y - o[1].x * o[0].y, D = h[0].x * h[1].y - h[1].x * h[0].y, z = n * D - R * K, L = u * D - H * K, T = -(K * H - D * u) / (n * H - R * u), x = -(n * D - R * K) / (n * H - R * u);
|
|
17972
17972
|
if (isFinite(T) && isFinite(x)) return { x: T, y: x };
|
|
17973
17973
|
if (Math.abs(z - L) < 0.1) throw new Error("Segment included");
|
|
17974
17974
|
return null;
|
|
17975
17975
|
}
|
|
17976
17976
|
static GetCordsFromTwoPoint(o, h) {
|
|
17977
17977
|
const n = Math.abs(o.x - h.x), R = Math.abs(o.y - h.y), u = Math.max(n, R), H = [o];
|
|
17978
|
-
function K(
|
|
17979
|
-
return z >
|
|
17978
|
+
function K(D, z, L, T, x) {
|
|
17979
|
+
return z > D ? D + x * (L / T) : z < D ? D - x * (L / T) : D;
|
|
17980
17980
|
}
|
|
17981
|
-
for (let
|
|
17981
|
+
for (let D = 1; D <= u; D += 1) H.push({ x: K(o.x, h.x, n, u, D), y: K(o.y, h.y, R, u, D) });
|
|
17982
17982
|
return H;
|
|
17983
17983
|
}
|
|
17984
17984
|
}
|
|
@@ -18150,9 +18150,9 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18150
18150
|
const u = d.LimitPointToCircle(h, this.pageWidth, R);
|
|
18151
18151
|
R !== u && (R = u, this.updateAngleAndGeometry(R));
|
|
18152
18152
|
const H = Math.sqrt(Math.pow(this.pageWidth, 2) + Math.pow(this.pageHeight, 2));
|
|
18153
|
-
let K = this.rect.bottomRight,
|
|
18154
|
-
if (this.corner === "bottom" && (K = this.rect.topRight,
|
|
18155
|
-
const z = d.LimitPointToCircle(n, H,
|
|
18153
|
+
let K = this.rect.bottomRight, D = this.rect.topLeft;
|
|
18154
|
+
if (this.corner === "bottom" && (K = this.rect.topRight, D = this.rect.bottomLeft), K.x <= 0) {
|
|
18155
|
+
const z = d.LimitPointToCircle(n, H, D);
|
|
18156
18156
|
z !== R && (R = z, this.updateAngleAndGeometry(R));
|
|
18157
18157
|
}
|
|
18158
18158
|
return R;
|
|
@@ -18230,7 +18230,7 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18230
18230
|
}
|
|
18231
18231
|
animateFlippingTo(o, h, n, R = !0) {
|
|
18232
18232
|
const u = d.GetCordsFromTwoPoint(o, h), H = [];
|
|
18233
|
-
for (const
|
|
18233
|
+
for (const D of u) H.push(() => this.do(D));
|
|
18234
18234
|
const K = this.getAnimationDuration(u.length);
|
|
18235
18235
|
this.render.startAnimation(H, K, () => {
|
|
18236
18236
|
this.calc && (n && (this.calc.getDirection() === 1 ? this.app.turnToPrevPage() : this.app.turnToNextPage()), R && (this.render.setBottomPage(null), this.render.setFlippingPage(null), this.render.clearShadow(), this.setState("read"), this.reset()));
|
|
@@ -18308,8 +18308,8 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18308
18308
|
calculateBoundsRect() {
|
|
18309
18309
|
let o = "landscape";
|
|
18310
18310
|
const h = this.getBlockWidth(), n = h / 2, R = this.getBlockHeight() / 2, u = this.setting.width / this.setting.height;
|
|
18311
|
-
let H = this.setting.width, K = this.setting.height,
|
|
18312
|
-
return this.setting.size === "stretch" ? (h < 2 * this.setting.minWidth && this.app.getSettings().usePortrait && (o = "portrait"), H = o === "portrait" ? this.getBlockWidth() : this.getBlockWidth() / 2, H > this.setting.maxWidth && (H = this.setting.maxWidth), K = H / u, K > this.getBlockHeight() && (K = this.getBlockHeight(), H = K * u),
|
|
18311
|
+
let H = this.setting.width, K = this.setting.height, D = n - H;
|
|
18312
|
+
return this.setting.size === "stretch" ? (h < 2 * this.setting.minWidth && this.app.getSettings().usePortrait && (o = "portrait"), H = o === "portrait" ? this.getBlockWidth() : this.getBlockWidth() / 2, H > this.setting.maxWidth && (H = this.setting.maxWidth), K = H / u, K > this.getBlockHeight() && (K = this.getBlockHeight(), H = K * u), D = o === "portrait" ? n - H / 2 - H : n - H) : h < 2 * H && this.app.getSettings().usePortrait && (o = "portrait", D = n - H / 2 - H), this.boundsRect = { left: D, top: R - K / 2, width: 2 * H, height: K, pageWidth: H }, o;
|
|
18313
18313
|
}
|
|
18314
18314
|
setShadowData(o, h, n, R) {
|
|
18315
18315
|
if (!this.app.getSettings().drawShadow) return;
|
|
@@ -18450,12 +18450,12 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18450
18450
|
}, this.onTouchEnd = (u) => {
|
|
18451
18451
|
if (u.changedTouches.length > 0) {
|
|
18452
18452
|
const H = u.changedTouches[0], K = this.getMousePos(H.clientX, H.clientY);
|
|
18453
|
-
let
|
|
18453
|
+
let D = !1;
|
|
18454
18454
|
if (this.touchPoint !== null) {
|
|
18455
18455
|
const z = K.x - this.touchPoint.point.x, L = Math.abs(K.y - this.touchPoint.point.y);
|
|
18456
|
-
Math.abs(z) > this.swipeDistance && L < 2 * this.swipeDistance && Date.now() - this.touchPoint.time < this.swipeTimeout && (z > 0 ? this.app.flipPrev(this.touchPoint.point.y < this.app.getRender().getRect().height / 2 ? "top" : "bottom") : this.app.flipNext(this.touchPoint.point.y < this.app.getRender().getRect().height / 2 ? "top" : "bottom"),
|
|
18456
|
+
Math.abs(z) > this.swipeDistance && L < 2 * this.swipeDistance && Date.now() - this.touchPoint.time < this.swipeTimeout && (z > 0 ? this.app.flipPrev(this.touchPoint.point.y < this.app.getRender().getRect().height / 2 ? "top" : "bottom") : this.app.flipNext(this.touchPoint.point.y < this.app.getRender().getRect().height / 2 ? "top" : "bottom"), D = !0), this.touchPoint = null;
|
|
18457
18457
|
}
|
|
18458
|
-
this.app.userStop(K,
|
|
18458
|
+
this.app.userStop(K, D);
|
|
18459
18459
|
}
|
|
18460
18460
|
}, this.parentElement = o, o.classList.add("stf__parent"), o.insertAdjacentHTML("afterbegin", '<div class="stf__wrapper"></div>'), this.wrapper = o.querySelector(".stf__wrapper"), this.app = h;
|
|
18461
18461
|
const R = this.app.getSettings().usePortrait ? 1 : 2;
|
|
@@ -18570,12 +18570,12 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18570
18570
|
}
|
|
18571
18571
|
drawInnerShadow() {
|
|
18572
18572
|
const o = this.getRect(), h = 3 * this.shadow.width / 4, n = this.getDirection() === 0 ? h : 0, R = this.getDirection() === 0 ? "to left" : "to right", u = this.convertToGlobal(this.shadow.pos), H = this.shadow.angle + 3 * Math.PI / 2, K = [this.pageRect.topLeft, this.pageRect.topRight, this.pageRect.bottomRight, this.pageRect.bottomLeft];
|
|
18573
|
-
let
|
|
18573
|
+
let D = "polygon( ";
|
|
18574
18574
|
for (const L of K) {
|
|
18575
18575
|
let T = this.getDirection() === 1 ? { x: -L.x + this.shadow.pos.x, y: L.y - this.shadow.pos.y } : { x: L.x - this.shadow.pos.x, y: L.y - this.shadow.pos.y };
|
|
18576
|
-
T = d.GetRotatedPoint(T, { x: n, y: 100 }, H),
|
|
18576
|
+
T = d.GetRotatedPoint(T, { x: n, y: 100 }, H), D += T.x + "px " + T.y + "px, ";
|
|
18577
18577
|
}
|
|
18578
|
-
|
|
18578
|
+
D = D.slice(0, -2), D += ")";
|
|
18579
18579
|
const z = `
|
|
18580
18580
|
display: block;
|
|
18581
18581
|
z-index: ${(this.getSettings().startZIndex + 10).toString(10)};
|
|
@@ -18588,8 +18588,8 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18588
18588
|
rgba(0, 0, 0, 0) 100%);
|
|
18589
18589
|
transform-origin: ${n}px 100px;
|
|
18590
18590
|
transform: translate3d(${u.x - n}px, ${u.y - 100}px, 0) rotate(${H}rad);
|
|
18591
|
-
clip-path: ${
|
|
18592
|
-
-webkit-clip-path: ${
|
|
18591
|
+
clip-path: ${D};
|
|
18592
|
+
-webkit-clip-path: ${D};
|
|
18593
18593
|
`;
|
|
18594
18594
|
this.innerShadow.style.cssText = z;
|
|
18595
18595
|
}
|
|
@@ -18601,7 +18601,7 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18601
18601
|
L = d.GetRotatedPoint(L, { x: R, y: 100 }, n), K += L.x + "px " + L.y + "px, ";
|
|
18602
18602
|
}
|
|
18603
18603
|
K = K.slice(0, -2), K += ")";
|
|
18604
|
-
const
|
|
18604
|
+
const D = `
|
|
18605
18605
|
display: block;
|
|
18606
18606
|
z-index: ${(this.getSettings().startZIndex + 10).toString(10)};
|
|
18607
18607
|
width: ${this.shadow.width}px;
|
|
@@ -18612,7 +18612,7 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18612
18612
|
clip-path: ${K};
|
|
18613
18613
|
-webkit-clip-path: ${K};
|
|
18614
18614
|
`;
|
|
18615
|
-
this.outerShadow.style.cssText =
|
|
18615
|
+
this.outerShadow.style.cssText = D;
|
|
18616
18616
|
}
|
|
18617
18617
|
drawLeftPage() {
|
|
18618
18618
|
this.orientation !== "portrait" && this.leftPage !== null && (this.direction === 1 && this.flippingPage !== null && this.flippingPage.getDrawingDensity() === "hard" ? (this.leftPage.getElement().style.zIndex = (this.getSettings().startZIndex + 5).toString(10), this.leftPage.setHardDrawingAngle(180 + this.flippingPage.getHardAngle()), this.leftPage.draw(this.flippingPage.getDrawingDensity())) : this.leftPage.simpleDraw(0));
|
|
@@ -18833,7 +18833,7 @@ var Na = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
|
|
|
18833
18833
|
});
|
|
18834
18834
|
})(wo, wo.exports);
|
|
18835
18835
|
var Xa = wo.exports;
|
|
18836
|
-
const Ra = ':root{--flipbook-bg-main: var(--bs-body-bg, #f8f9fa);--flipbook-bg-surface: var(--bs-secondary-bg, #ffffff);--flipbook-bg-surface-alt: var(--bs-tertiary-bg, #f1f3f5);--flipbook-bg-panel: var(--bs-dark, #212529);--flipbook-bg-panel-soft: color-mix(in srgb, var(--flipbook-bg-panel) 88%, white 12%);--flipbook-text-main: var(--bs-body-color, #212529);--flipbook-text-muted: var(--bs-secondary-color, #6c757d);--flipbook-toolbar-text: #f8f9fa;--flipbook-toolbar-button-text: #f8f9fa;--flipbook-border: var(--bs-border-color, rgba(0, 0, 0, .15));--flipbook-accent: var(--bs-primary, #0d6efd);--flipbook-accent-text: #ffffff;--flipbook-thumbrail-bg: color-mix(in srgb, var(--flipbook-bg-panel) 95%, black 5%);--flipbook-thumb-bg: #ffffff;--flipbook-thumb-text: #ffffff;--flipbook-thumbscroll-track: rgba(0, 0, 0, .18);--flipbook-thumbscroll-thumb: rgba(255, 255, 255, .22);--flipbook-navbutton-bg: rgba(0, 0, 0, .6);--flipbook-navbutton-text: #ffffff;--flipbook-shadow: rgba(0, 0, 0, .35);--flipbook-bookpage-bg: #ffffff;--flipbook-emptycover-bg: var(--flipbook-bg-panel);--flipbook-download-bg: #198754;--flipbook-download-border: #198754;--flipbook-download-text: #ffffff;--flipbook-settings-bg: var(--flipbook-bg-surface);--flipbook-settings-text: var(--flipbook-text-main);--flipbook-radius-sm: .375rem;--flipbook-radius-md: .5rem;--flipbook-toolbar-height: 60px;--flipbook-thumbs-height: 110px;--flipbook-navbutton-size: 50px;--flipbook-page-padding: 20px;--flipbook-font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", sans-serif)}[data-bs-theme=dark]{--flipbook-bg-main: var(--bs-body-bg, #121826);--flipbook-bg-surface: var(--bs-secondary-bg, #1b2232);--flipbook-bg-surface-alt: var(--bs-tertiary-bg, #222b3c);--flipbook-bg-panel: #141927;--flipbook-bg-panel-soft: #1d2434;--flipbook-text-main: var(--bs-body-color, #f8f9fa);--flipbook-text-muted: var(--bs-secondary-color, #adb5bd);--flipbook-toolbar-text: #f8f9fa;--flipbook-toolbar-button-text: #f8f9fa;--flipbook-border: var(--bs-border-color, rgba(255, 255, 255, .12));--flipbook-thumbrail-bg: #101522;--flipbook-thumb-bg: #ffffff;--flipbook-settings-bg: #1d2434;--flipbook-settings-text: #f8f9fa;--flipbook-emptycover-bg: #101522;--flipbook-shadow: rgba(0, 0, 0, .5)}.bk-theme-light{color-scheme:light}.bk-theme-dark{color-scheme:dark}.bk-container,.bk-container *{box-sizing:border-box}.bk-container{color:var(--flipbook-text-main);font-family:var(--flipbook-font-family)}.bk-wrapper{position:relative;width:100%;height:100%;display:flex;flex-direction:column;background:var(--flipbook-bg-main);color:var(--flipbook-text-main);overflow:hidden;font-family:var(--flipbook-font-family);border-radius:var(--flipbook-radius-md)}.bk-main-area{flex:1;position:relative;overflow:hidden;width:100%;min-height:0;background:var(--flipbook-bg-main)}#bk-book-wrapper{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--flipbook-page-padding);display:flex;justify-content:center;align-items:center;transition:transform .3s ease;transform-origin:center center}#bk-book-wrapper.zoomed{transition:none;cursor:grab}#bk-book-wrapper.zoomed:active{cursor:grabbing}#bk-book-wrapper.zoomed #bk-book{pointer-events:none}#bk-book{width:100%;height:100%;box-shadow:0 0 20px var(--flipbook-shadow)}#bk-single-view{display:none;width:100%;height:100%;justify-content:center;align-items:center;overflow:hidden}#bk-single-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;box-shadow:0 5px 20px var(--flipbook-shadow);background:var(--flipbook-bookpage-bg);transition:transform .3s ease,opacity .3s ease;pointer-events:none}.slide-left{transform:translate(-100%);opacity:0}.slide-right{transform:translate(100%);opacity:0}.bz-page{background-color:var(--flipbook-bg-main);overflow:hidden}.page-content{width:100%;height:100%;object-fit:contain;pointer-events:none;background:var(--flipbook-bookpage-bg);display:block}.page-content--split{width:100%;max-width:none;height:100%;object-fit:cover;object-position:left center}.page-content--left{object-position:left center}.page-content--right{object-position:right center}#bk-single-img.page-content--split{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}.bk-toolbar{height:var(--flipbook-toolbar-height);background:var(--flipbook-bg-panel-soft);color:var(--flipbook-toolbar-text);display:flex;align-items:center;justify-content:space-between;padding:0 15px;z-index:10;flex-shrink:0;border-top:1px solid var(--flipbook-border);gap:.75rem}.bk-btn-group{display:flex;gap:8px;align-items:center}.bk-btn-group--center{flex-grow:1;justify-content:center}.bk-btn{background:color-mix(in srgb,var(--flipbook-bg-surface) 18%,transparent 82%);border:1px solid color-mix(in srgb,var(--flipbook-border) 80%,transparent 20%);color:var(--flipbook-toolbar-button-text);padding:0 15px;height:38px;border-radius:var(--flipbook-radius-sm);cursor:pointer;font-size:15px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.bk-btn:hover,.bk-btn.active{background:var(--flipbook-accent);border-color:var(--flipbook-accent);color:var(--flipbook-accent-text)}.bk-btn:focus-visible,.thumb-item:focus-visible,.nav-float:focus-visible{outline:2px solid var(--flipbook-accent);outline-offset:2px}.bk-btn--download{background:var(--flipbook-download-bg);border-color:var(--flipbook-download-border);color:var(--flipbook-download-text)}#bk-page-info{color:var(--flipbook-toolbar-text);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:14px;min-width:70px;text-align:center;font-weight:700}.bk-thumbs{height:var(--flipbook-thumbs-height);background:var(--flipbook-thumbrail-bg);overflow-x:auto;padding:15px;gap:15px;z-index:10;flex-shrink:0;align-items:center;border-top:1px solid var(--flipbook-border)}.bk-thumbs::-webkit-scrollbar{height:6px}.bk-thumbs::-webkit-scrollbar-track{background:var(--flipbook-thumbscroll-track);border-radius:999px}.bk-thumbs::-webkit-scrollbar-thumb{background:var(--flipbook-thumbscroll-thumb);border-radius:999px;transition:background-color .2s ease}.bk-thumbs::-webkit-scrollbar-thumb:hover{background:var(--flipbook-accent)}.thumb-item{display:flex;flex-direction:column;align-items:center;cursor:pointer;opacity:.68;transition:opacity .2s ease,transform .2s ease;flex-shrink:0;color:var(--flipbook-thumb-text)}.thumb-item:hover,.thumb-item.active{opacity:1}.thumb-item.active img{border-color:var(--flipbook-accent);transform:scale(1.05);box-shadow:0 0 15px color-mix(in srgb,var(--flipbook-accent) 45%,transparent 55%)}.thumb-img{height:60px;width:auto;border:2px solid transparent;border-radius:var(--flipbook-radius-sm);background:var(--flipbook-thumb-bg);transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease}.thumb-img--split{width:96px;max-width:none;object-fit:cover}.thumb-img--left{object-position:left center}.thumb-img--right{object-position:right center}.thumb-item span{color:var(--flipbook-thumb-text);font-size:11px;margin-top:6px;font-weight:700}.nav-float{position:absolute;z-index:10;background:var(--flipbook-navbutton-bg);border:none;border-radius:999px;width:var(--flipbook-navbutton-size);height:var(--flipbook-navbutton-size);color:var(--flipbook-navbutton-text);font-size:20px;cursor:pointer;transition:background-color .2s ease;top:50%;transform:translateY(-50%)}.nav-float:hover{background:var(--flipbook-accent)}#nav-prev{left:20px}#nav-next{right:20px}.bk-settings-panel{position:absolute;bottom:70px;right:15px;background:var(--flipbook-settings-bg);color:var(--flipbook-settings-text);border:1px solid var(--flipbook-border);border-radius:var(--flipbook-radius-md);padding:15px;display:none;z-index:20;min-width:200px;box-shadow:0 10px 30px var(--flipbook-shadow)}.setting-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;font-size:14px;margin-bottom:10px}.setting-item:last-child{margin-bottom:0}.bk-empty-state{display:grid;place-items:center;width:100%;min-height:240px;padding:1.5rem;background:var(--flipbook-bg-main);color:var(--flipbook-text-main);border:1px dashed var(--flipbook-border);border-radius:var(--flipbook-radius-md)}.bk-empty-state__title{margin:0;font-size:1.125rem;font-weight:600}.empty-cover{background-color:var(--flipbook-emptycover-bg)!important;box-shadow:none!important}.bk-attribution{position:absolute;bottom:15px;left:15px;background:#0f172abf;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fff;padding:6px 12px;border-radius:var(--flipbook-radius-sm);font-size:11px;text-decoration:none;z-index:20;display:flex;align-items:center;gap:6px;box-shadow:0 4px 12px #0006;border:1px solid rgba(255,255,255,.15);transition:all .2s ease;opacity:.85}.bk-attribution:hover{opacity:1;transform:translateY(-2px);box-shadow:0 6px 16px #0009;border-color:var(--flipbook-accent);color:#fff}.bk-attribution-icon{font-size:13px}.bk-attribution-img{height:24px;width:auto;object-fit:contain;display:block}@media (max-width: 768px){:root{--flipbook-toolbar-height: 50px;--flipbook-thumbs-height: 85px;--flipbook-navbutton-size: 35px;--flipbook-page-padding: 12px}.bk-toolbar{padding:0 5px}.bk-btn{padding:0 8px;font-size:12px;height:32px}.bk-btn-group{gap:4px}#bk-page-info{min-width:50px;font-size:12px}.nav-float{font-size:16px}#nav-prev{left:10px}#nav-next{right:10px}.bk-thumbs{padding:10px}.thumb-img{height:45px}.bk-settings-panel{bottom:60px}}';
|
|
18836
|
+
const Ra = ':root{--flipbook-bg-main: var(--bs-body-bg, #f8f9fa);--flipbook-bg-surface: var(--bs-secondary-bg, #ffffff);--flipbook-bg-surface-alt: var(--bs-tertiary-bg, #f1f3f5);--flipbook-bg-panel: var(--bs-dark, #212529);--flipbook-bg-panel-soft: color-mix(in srgb, var(--flipbook-bg-panel) 88%, white 12%);--flipbook-text-main: var(--bs-body-color, #212529);--flipbook-text-muted: var(--bs-secondary-color, #6c757d);--flipbook-toolbar-text: #f8f9fa;--flipbook-toolbar-button-text: #f8f9fa;--flipbook-border: var(--bs-border-color, rgba(0, 0, 0, .15));--flipbook-accent: var(--bs-primary, #0d6efd);--flipbook-accent-text: #ffffff;--flipbook-thumbrail-bg: color-mix(in srgb, var(--flipbook-bg-panel) 95%, black 5%);--flipbook-thumb-bg: #ffffff;--flipbook-thumb-text: #ffffff;--flipbook-thumbscroll-track: rgba(0, 0, 0, .18);--flipbook-thumbscroll-thumb: rgba(255, 255, 255, .22);--flipbook-navbutton-bg: rgba(0, 0, 0, .6);--flipbook-navbutton-text: #ffffff;--flipbook-shadow: rgba(0, 0, 0, .35);--flipbook-bookpage-bg: #ffffff;--flipbook-emptycover-bg: var(--flipbook-bg-panel);--flipbook-download-bg: #198754;--flipbook-download-border: #198754;--flipbook-download-text: #ffffff;--flipbook-settings-bg: var(--flipbook-bg-surface);--flipbook-settings-text: var(--flipbook-text-main);--flipbook-radius-sm: .375rem;--flipbook-radius-md: .5rem;--flipbook-toolbar-height: 60px;--flipbook-thumbs-height: 110px;--flipbook-navbutton-size: 50px;--flipbook-page-padding: 20px;--flipbook-font-family: var(--bs-body-font-family, system-ui, -apple-system, "Segoe UI", sans-serif)}[data-bs-theme=dark]{--flipbook-bg-main: var(--bs-body-bg, #121826);--flipbook-bg-surface: var(--bs-secondary-bg, #1b2232);--flipbook-bg-surface-alt: var(--bs-tertiary-bg, #222b3c);--flipbook-bg-panel: #141927;--flipbook-bg-panel-soft: #1d2434;--flipbook-text-main: var(--bs-body-color, #f8f9fa);--flipbook-text-muted: var(--bs-secondary-color, #adb5bd);--flipbook-toolbar-text: #f8f9fa;--flipbook-toolbar-button-text: #f8f9fa;--flipbook-border: var(--bs-border-color, rgba(255, 255, 255, .12));--flipbook-thumbrail-bg: #101522;--flipbook-thumb-bg: #ffffff;--flipbook-settings-bg: #1d2434;--flipbook-settings-text: #f8f9fa;--flipbook-emptycover-bg: #101522;--flipbook-shadow: rgba(0, 0, 0, .5)}.bk-theme-light{color-scheme:light;--flipbook-bg-main: #f8fafc;--flipbook-bg-surface: #ffffff;--flipbook-bg-surface-alt: #f1f5f9;--flipbook-bg-panel: #e2e8f0;--flipbook-bg-panel-soft: #f1f5f9;--flipbook-text-main: #0f172a;--flipbook-text-muted: #64748b;--flipbook-toolbar-text: #0f172a;--flipbook-toolbar-button-text: #334155;--flipbook-border: rgba(15, 23, 42, .1);--flipbook-accent: #4f46e5;--flipbook-accent-text: #ffffff;--flipbook-thumbrail-bg: #f8fafc;--flipbook-thumb-bg: #ffffff;--flipbook-thumb-text: #0f172a;--flipbook-thumbscroll-track: rgba(15, 23, 42, .08);--flipbook-thumbscroll-thumb: rgba(15, 23, 42, .18);--flipbook-navbutton-bg: rgba(15, 23, 42, .65);--flipbook-navbutton-text: #ffffff;--flipbook-shadow: rgba(15, 23, 42, .08);--flipbook-bookpage-bg: #ffffff;--flipbook-emptycover-bg: #e2e8f0;--flipbook-download-bg: #10b981;--flipbook-download-border: #10b981;--flipbook-download-text: #ffffff;--flipbook-settings-bg: #ffffff;--flipbook-settings-text: #0f172a}.bk-theme-dark{color-scheme:dark;--flipbook-bg-main: #0b0f19;--flipbook-bg-surface: #111827;--flipbook-bg-surface-alt: #1f2937;--flipbook-bg-panel: #111827;--flipbook-bg-panel-soft: #1f2937;--flipbook-text-main: #f9fafb;--flipbook-text-muted: #9ca3af;--flipbook-toolbar-text: #f9fafb;--flipbook-toolbar-button-text: #e5e7eb;--flipbook-border: rgba(255, 255, 255, .08);--flipbook-accent: #7367f0;--flipbook-accent-text: #ffffff;--flipbook-thumbrail-bg: #0b0f19;--flipbook-thumb-bg: #1f2937;--flipbook-thumb-text: #f9fafb;--flipbook-thumbscroll-track: rgba(255, 255, 255, .08);--flipbook-thumbscroll-thumb: rgba(255, 255, 255, .18);--flipbook-navbutton-bg: rgba(0, 0, 0, .6);--flipbook-navbutton-text: #ffffff;--flipbook-shadow: rgba(0, 0, 0, .5);--flipbook-bookpage-bg: #ffffff;--flipbook-emptycover-bg: #101522;--flipbook-download-bg: #10b981;--flipbook-download-border: #10b981;--flipbook-download-text: #ffffff;--flipbook-settings-bg: #1f2937;--flipbook-settings-text: #f9fafb}.bk-container,.bk-container *{box-sizing:border-box}.bk-container{color:var(--flipbook-text-main);font-family:var(--flipbook-font-family)}.bk-wrapper{position:relative;width:100%;height:100%;display:flex;flex-direction:column;background:var(--flipbook-bg-main);color:var(--flipbook-text-main);overflow:hidden;font-family:var(--flipbook-font-family);border-radius:var(--flipbook-radius-md)}.bk-main-area{flex:1;position:relative;overflow:hidden;width:100%;min-height:0;background:var(--flipbook-bg-main)}#bk-book-wrapper{position:absolute;top:0;right:0;bottom:0;left:0;padding:var(--flipbook-page-padding);display:flex;justify-content:center;align-items:center;transition:transform .3s ease;transform-origin:center center}#bk-book-wrapper.zoomed{transition:none;cursor:grab}#bk-book-wrapper.zoomed:active{cursor:grabbing}#bk-book-wrapper.zoomed #bk-book{pointer-events:none}#bk-book{width:100%;height:100%;box-shadow:0 0 20px var(--flipbook-shadow)}#bk-single-view{display:none;width:100%;height:100%;justify-content:center;align-items:center;overflow:hidden}#bk-single-img{max-width:100%;max-height:100%;width:auto;height:auto;object-fit:contain;box-shadow:0 5px 20px var(--flipbook-shadow);background:var(--flipbook-bookpage-bg);transition:transform .3s ease,opacity .3s ease;pointer-events:none}.slide-left{transform:translate(-100%);opacity:0}.slide-right{transform:translate(100%);opacity:0}.bz-page{background-color:var(--flipbook-bg-main);overflow:hidden}.page-content{width:100%;height:100%;object-fit:contain;pointer-events:none;background:var(--flipbook-bookpage-bg);display:block}.page-content--split{width:100%;max-width:none;height:100%;object-fit:cover;object-position:left center}.page-content--left{object-position:left center}.page-content--right{object-position:right center}#bk-single-img.page-content--split{width:100%;height:100%;max-width:none;max-height:none;object-fit:cover}.bk-toolbar{height:var(--flipbook-toolbar-height);background:var(--flipbook-bg-panel-soft);color:var(--flipbook-toolbar-text);display:flex;align-items:center;justify-content:space-between;padding:0 15px;z-index:10;flex-shrink:0;border-top:1px solid var(--flipbook-border);gap:.75rem}.bk-btn-group{display:flex;gap:8px;align-items:center}.bk-btn-group--center{flex-grow:1;justify-content:center}.bk-btn{background:color-mix(in srgb,var(--flipbook-bg-surface) 18%,transparent 82%);border:1px solid color-mix(in srgb,var(--flipbook-border) 80%,transparent 20%);color:var(--flipbook-toolbar-button-text);padding:0 15px;height:38px;border-radius:var(--flipbook-radius-sm);cursor:pointer;font-size:15px;display:flex;align-items:center;justify-content:center;transition:background-color .2s ease,border-color .2s ease,color .2s ease}.bk-btn:hover,.bk-btn.active{background:var(--flipbook-accent);border-color:var(--flipbook-accent);color:var(--flipbook-accent-text)}.bk-btn:focus-visible,.thumb-item:focus-visible,.nav-float:focus-visible{outline:2px solid var(--flipbook-accent);outline-offset:2px}.bk-btn--download{background:var(--flipbook-download-bg);border-color:var(--flipbook-download-border);color:var(--flipbook-download-text)}#bk-page-info{color:var(--flipbook-toolbar-text);font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,monospace;font-size:14px;min-width:70px;text-align:center;font-weight:700}.bk-thumbs{height:var(--flipbook-thumbs-height);background:var(--flipbook-thumbrail-bg);overflow-x:auto;padding:15px;gap:15px;z-index:10;flex-shrink:0;align-items:center;border-top:1px solid var(--flipbook-border)}.bk-thumbs::-webkit-scrollbar{height:6px}.bk-thumbs::-webkit-scrollbar-track{background:var(--flipbook-thumbscroll-track);border-radius:999px}.bk-thumbs::-webkit-scrollbar-thumb{background:var(--flipbook-thumbscroll-thumb);border-radius:999px;transition:background-color .2s ease}.bk-thumbs::-webkit-scrollbar-thumb:hover{background:var(--flipbook-accent)}.thumb-item{display:flex;flex-direction:column;align-items:center;cursor:pointer;opacity:.68;transition:opacity .2s ease,transform .2s ease;flex-shrink:0;color:var(--flipbook-thumb-text)}.thumb-item:hover,.thumb-item.active{opacity:1}.thumb-item.active img{border-color:var(--flipbook-accent);transform:scale(1.05);box-shadow:0 0 15px color-mix(in srgb,var(--flipbook-accent) 45%,transparent 55%)}.thumb-img{height:60px;width:auto;border:2px solid transparent;border-radius:var(--flipbook-radius-sm);background:var(--flipbook-thumb-bg);transition:border-color .2s ease,transform .2s ease,box-shadow .2s ease}.thumb-img--split{width:96px;max-width:none;object-fit:cover}.thumb-img--left{object-position:left center}.thumb-img--right{object-position:right center}.thumb-item span{color:var(--flipbook-thumb-text);font-size:11px;margin-top:6px;font-weight:700}.nav-float{position:absolute;z-index:10;background:var(--flipbook-navbutton-bg);border:none;border-radius:999px;width:var(--flipbook-navbutton-size);height:var(--flipbook-navbutton-size);color:var(--flipbook-navbutton-text);font-size:20px;cursor:pointer;transition:background-color .2s ease;top:50%;transform:translateY(-50%)}.nav-float:hover{background:var(--flipbook-accent)}#nav-prev{left:20px}#nav-next{right:20px}.bk-settings-panel{position:absolute;bottom:70px;right:15px;background:var(--flipbook-settings-bg);color:var(--flipbook-settings-text);border:1px solid var(--flipbook-border);border-radius:var(--flipbook-radius-md);padding:15px;display:none;z-index:20;min-width:200px;box-shadow:0 10px 30px var(--flipbook-shadow)}.setting-item{display:flex;align-items:center;justify-content:space-between;gap:1rem;font-size:14px;margin-bottom:10px}.setting-item:last-child{margin-bottom:0}.bk-empty-state{display:grid;place-items:center;width:100%;min-height:240px;padding:1.5rem;background:var(--flipbook-bg-main);color:var(--flipbook-text-main);border:1px dashed var(--flipbook-border);border-radius:var(--flipbook-radius-md)}.bk-empty-state__title{margin:0;font-size:1.125rem;font-weight:600}.empty-cover{background-color:var(--flipbook-emptycover-bg)!important;box-shadow:none!important}.bk-attribution{position:absolute;bottom:15px;left:15px;background:#0f172abf;-webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);color:#fff;padding:6px 12px;border-radius:var(--flipbook-radius-sm);font-size:11px;text-decoration:none;z-index:20;display:flex;align-items:center;gap:6px;box-shadow:0 4px 12px #0006;border:1px solid rgba(255,255,255,.15);transition:all .2s ease;opacity:.85}.bk-attribution:hover{opacity:1;transform:translateY(-2px);box-shadow:0 6px 16px #0009;border-color:var(--flipbook-accent);color:#fff}.bk-attribution-icon{font-size:13px}.bk-attribution-img{height:24px;width:auto;object-fit:contain;display:block}@media (max-width: 768px){:root{--flipbook-toolbar-height: 50px;--flipbook-thumbs-height: 85px;--flipbook-navbutton-size: 35px;--flipbook-page-padding: 12px}.bk-toolbar{padding:0 5px}.bk-btn{padding:0 8px;font-size:12px;height:32px}.bk-btn-group{gap:4px}#bk-page-info{min-width:50px;font-size:12px}.nav-float{font-size:16px}#nav-prev{left:10px}#nav-next{right:10px}.bk-thumbs{padding:10px}.thumb-img{height:45px}.bk-settings-panel{bottom:60px}}';
|
|
18837
18837
|
let L0 = !1;
|
|
18838
18838
|
function sB() {
|
|
18839
18839
|
if (typeof document > "u" || L0) return;
|
|
@@ -19022,33 +19022,60 @@ const Ja = new URL("data:text/javascript;base64,LyoqCiAqIEBsaWNzdGFydCBUaGUgZm9s
|
|
|
19022
19022
|
YA.workerSrc = Ja;
|
|
19023
19023
|
const Bl = class Bl {
|
|
19024
19024
|
constructor(I, g = {}) {
|
|
19025
|
-
|
|
19026
|
-
|
|
19027
|
-
|
|
19028
|
-
|
|
19029
|
-
|
|
19030
|
-
|
|
19031
|
-
|
|
19032
|
-
|
|
19033
|
-
|
|
19034
|
-
|
|
19035
|
-
|
|
19036
|
-
|
|
19037
|
-
|
|
19038
|
-
|
|
19039
|
-
|
|
19040
|
-
|
|
19041
|
-
|
|
19042
|
-
|
|
19025
|
+
M(this, "container", null);
|
|
19026
|
+
M(this, "ui");
|
|
19027
|
+
M(this, "pageFlip", null);
|
|
19028
|
+
M(this, "sourceAssets", []);
|
|
19029
|
+
M(this, "pages", []);
|
|
19030
|
+
M(this, "downloadUrl", "");
|
|
19031
|
+
M(this, "totalPages", 0);
|
|
19032
|
+
M(this, "pageViewport", { ...Bl.DEFAULT_PAGE_VIEWPORT });
|
|
19033
|
+
M(this, "pdfDoc", null);
|
|
19034
|
+
M(this, "pdfPagesCache", /* @__PURE__ */ new Map());
|
|
19035
|
+
M(this, "currentZoom", 1);
|
|
19036
|
+
M(this, "zoomState", { isActive: !1, translateX: 0, translateY: 0, isDragging: !1, startX: 0, startY: 0 });
|
|
19037
|
+
M(this, "messages", r0());
|
|
19038
|
+
M(this, "listeners", {});
|
|
19039
|
+
M(this, "domEventController", null);
|
|
19040
|
+
M(this, "orientationMediaQuery", null);
|
|
19041
|
+
M(this, "orientationChangeHandler", null);
|
|
19042
|
+
M(this, "initialized", !1);
|
|
19043
|
+
M(this, "state", { showThumbs: !0, isSingle: !1, currentPage: 0, orientation: "landscape" });
|
|
19044
|
+
M(this, "touchStartX", 0);
|
|
19043
19045
|
this.selector = I, this.options = g, this.options = { allowDownload: !0, showThumbs: !0, primaryColor: "#7367f0", theme: "auto", ...g }, this.messages = r0({ locale: this.options.locale, messages: this.options.messages }), this.options.showThumbs !== void 0 && (this.state.showThumbs = this.options.showThumbs);
|
|
19044
19046
|
}
|
|
19045
19047
|
async init(I, g) {
|
|
19046
19048
|
if (this.downloadUrl = I, typeof this.selector == "string" ? this.container = document.querySelector(this.selector) : this.container = this.selector, !!this.container) {
|
|
19047
|
-
if (this.destroy(!0),
|
|
19049
|
+
if (this.destroy(!0), g && g.length > 0)
|
|
19050
|
+
this.setResolvedPages(g);
|
|
19051
|
+
else if (I)
|
|
19052
|
+
try {
|
|
19053
|
+
this.pdfPagesCache = /* @__PURE__ */ new Map();
|
|
19054
|
+
const C = aW(I);
|
|
19055
|
+
this.pdfDoc = await C.promise, this.totalPages = this.pdfDoc.numPages;
|
|
19056
|
+
const A = [];
|
|
19057
|
+
for (let c = 1; c <= this.totalPages; c++)
|
|
19058
|
+
A.push({
|
|
19059
|
+
index: c - 1,
|
|
19060
|
+
assetId: `pdf-page-${c}`,
|
|
19061
|
+
pageNumber: c,
|
|
19062
|
+
cropMode: "full",
|
|
19063
|
+
normal: "",
|
|
19064
|
+
low: "",
|
|
19065
|
+
thumb: ""
|
|
19066
|
+
});
|
|
19067
|
+
this.pages = A;
|
|
19068
|
+
const Z = (await this.pdfDoc.getPage(1)).getViewport({ scale: 1 }), d = Z.width / Z.height, s = 420;
|
|
19069
|
+
this.pageViewport = d >= 1 ? { width: Math.round(s * d), height: s } : { width: s, height: Math.round(s / d) };
|
|
19070
|
+
} catch (C) {
|
|
19071
|
+
console.error("PDF load failed:", C), this.renderEmptyState();
|
|
19072
|
+
return;
|
|
19073
|
+
}
|
|
19074
|
+
if (!this.pages.length) {
|
|
19048
19075
|
this.renderEmptyState();
|
|
19049
19076
|
return;
|
|
19050
19077
|
}
|
|
19051
|
-
|
|
19078
|
+
this.mountViewer();
|
|
19052
19079
|
}
|
|
19053
19080
|
}
|
|
19054
19081
|
on(I, g) {
|
|
@@ -19092,7 +19119,12 @@ const Bl = class Bl {
|
|
|
19092
19119
|
I && (document.fullscreenElement ? document.exitFullscreen() : I.requestFullscreen().catch((C) => console.log(C)));
|
|
19093
19120
|
}
|
|
19094
19121
|
destroy(I = !0) {
|
|
19095
|
-
this.teardownMountedViewer(), this.currentZoom = 1, this.zoomState = { isActive: !1, translateX: 0, translateY: 0, isDragging: !1, startX: 0, startY: 0 }, this.state.currentPage = 0,
|
|
19122
|
+
this.teardownMountedViewer(), this.currentZoom = 1, this.zoomState = { isActive: !1, translateX: 0, translateY: 0, isDragging: !1, startX: 0, startY: 0 }, this.state.currentPage = 0, this.pdfPagesCache && (this.pdfPagesCache.forEach((g) => {
|
|
19123
|
+
try {
|
|
19124
|
+
URL.revokeObjectURL(g);
|
|
19125
|
+
} catch {
|
|
19126
|
+
}
|
|
19127
|
+
}), this.pdfPagesCache.clear()), this.pdfDoc = null, I && this.container && (this.container.innerHTML = ""), this.emit("destroy", void 0);
|
|
19096
19128
|
}
|
|
19097
19129
|
updateOptions(I) {
|
|
19098
19130
|
if (this.options = { ...this.options, ...I }, this.messages = r0({ locale: this.options.locale, messages: this.options.messages }), I.showThumbs !== void 0 && (this.state.showThumbs = I.showThumbs), this.container || (typeof this.selector == "string" ? this.container = document.querySelector(this.selector) : this.container = this.selector), !!this.container) {
|
|
@@ -19215,13 +19247,13 @@ const Bl = class Bl {
|
|
|
19215
19247
|
}), this.options.primaryColor && this.container.style.setProperty("--flipbook-accent", this.options.primaryColor), this.options.backgroundColor && this.container.style.setProperty("--flipbook-bg-main", this.options.backgroundColor), this.options.backgroundImage && this.ui && (this.ui.area.style.backgroundImage = `url('${this.options.backgroundImage}')`, this.ui.area.style.backgroundSize = "cover", this.ui.area.style.backgroundPosition = "center", this.container.style.setProperty("--flipbook-bg-panel", "rgba(0,0,0,0.7)")));
|
|
19216
19248
|
}
|
|
19217
19249
|
renderPagesIntoDOM() {
|
|
19218
|
-
const I = this.ui.book, g = this.ui.thumbs
|
|
19219
|
-
|
|
19220
|
-
const
|
|
19221
|
-
I.appendChild(
|
|
19222
|
-
const
|
|
19223
|
-
g.appendChild(
|
|
19224
|
-
}),
|
|
19250
|
+
const I = this.ui.book, g = this.ui.thumbs;
|
|
19251
|
+
I.appendChild(E("div", { class: "bz-page empty-cover" })), this.pages.forEach((C, A) => {
|
|
19252
|
+
const i = this.createPageImage(C, "low"), Z = E("div", { class: "bz-page", dataset: { idx: A.toString() } }, [i]);
|
|
19253
|
+
I.appendChild(Z);
|
|
19254
|
+
const d = this.createThumbnailImage(C), s = E("span", null, [C.pageNumber.toString()]), c = E("div", { class: `thumb-item ${A === 0 ? "active" : ""}`, dataset: { pageIndex: A.toString() } }, [d, s]);
|
|
19255
|
+
g.appendChild(c);
|
|
19256
|
+
}), this.pages.length % 2 === 0 && I.appendChild(E("div", { class: "bz-page empty-cover" }));
|
|
19225
19257
|
}
|
|
19226
19258
|
initPageFlip() {
|
|
19227
19259
|
const I = this.pageViewport.width, g = this.pageViewport.height;
|
|
@@ -19246,18 +19278,50 @@ const Bl = class Bl {
|
|
|
19246
19278
|
});
|
|
19247
19279
|
}
|
|
19248
19280
|
createPageImage(I, g) {
|
|
19249
|
-
|
|
19250
|
-
src: g === "normal" ? I.normal : I.low,
|
|
19281
|
+
const C = E("img", {
|
|
19251
19282
|
class: this.getPageImageClassName(I.cropMode),
|
|
19252
19283
|
dataset: { cropMode: I.cropMode }
|
|
19253
19284
|
});
|
|
19285
|
+
return this.ensurePageSrc(I, g, C), C;
|
|
19254
19286
|
}
|
|
19255
19287
|
createThumbnailImage(I) {
|
|
19256
|
-
|
|
19257
|
-
src: I.thumb || I.low,
|
|
19288
|
+
const g = E("img", {
|
|
19258
19289
|
class: this.getThumbnailImageClassName(I.cropMode),
|
|
19259
19290
|
dataset: { cropMode: I.cropMode }
|
|
19260
19291
|
});
|
|
19292
|
+
return this.ensurePageSrc(I, "thumb", g), g;
|
|
19293
|
+
}
|
|
19294
|
+
async ensurePageSrc(I, g, C) {
|
|
19295
|
+
var d;
|
|
19296
|
+
const A = g === "thumb" ? I.thumb || I.low : g === "normal" ? I.normal : I.low;
|
|
19297
|
+
if (A) {
|
|
19298
|
+
C.src = A;
|
|
19299
|
+
return;
|
|
19300
|
+
}
|
|
19301
|
+
if (!this.pdfDoc) return;
|
|
19302
|
+
const i = I.pageNumber, Z = `${i}-${g}`;
|
|
19303
|
+
if ((d = this.pdfPagesCache) != null && d.has(Z)) {
|
|
19304
|
+
C.src = this.pdfPagesCache.get(Z);
|
|
19305
|
+
return;
|
|
19306
|
+
}
|
|
19307
|
+
C.src = 'data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="100" height="141" viewBox="0 0 100 141"><rect width="100" height="141" fill="%231e293b"/><text x="50" y="75" fill="%2364748b" font-family="sans-serif" font-size="10" text-anchor="middle">Loading...</text></svg>';
|
|
19308
|
+
try {
|
|
19309
|
+
const s = await this.pdfDoc.getPage(i);
|
|
19310
|
+
let c = 1;
|
|
19311
|
+
g === "thumb" ? c = 0.25 : g === "low" ? c = 1.2 : c = 2.5;
|
|
19312
|
+
const G = s.getViewport({ scale: c }), m = document.createElement("canvas");
|
|
19313
|
+
m.width = G.width, m.height = G.height;
|
|
19314
|
+
const W = m.getContext("2d");
|
|
19315
|
+
W && (await s.render({ canvasContext: W, viewport: G }).promise, m.toBlob((a) => {
|
|
19316
|
+
if (a) {
|
|
19317
|
+
const t = URL.createObjectURL(a);
|
|
19318
|
+
this.pdfPagesCache || (this.pdfPagesCache = /* @__PURE__ */ new Map()), this.pdfPagesCache.set(Z, t), C.src = t;
|
|
19319
|
+
}
|
|
19320
|
+
m.width = 0, m.height = 0;
|
|
19321
|
+
}, "image/webp", 0.85));
|
|
19322
|
+
} catch (s) {
|
|
19323
|
+
console.error(`Error rendering PDF page ${i}:`, s);
|
|
19324
|
+
}
|
|
19261
19325
|
}
|
|
19262
19326
|
getPageImageClassName(I) {
|
|
19263
19327
|
return I === "full" ? "page-content" : `page-content page-content--split page-content--${I}`;
|
|
@@ -19270,18 +19334,24 @@ const Bl = class Bl {
|
|
|
19270
19334
|
const g = this.ui.book, C = this.ui.singleView, A = this.ui.toggleSingle;
|
|
19271
19335
|
if (A && (A.checked = I), I) {
|
|
19272
19336
|
if (this.pageFlip) {
|
|
19273
|
-
|
|
19274
|
-
this.
|
|
19337
|
+
const i = this.ui.book.querySelector(".empty-cover") !== null;
|
|
19338
|
+
let Z = this.pageFlip.getCurrentPageIndex();
|
|
19339
|
+
this.state.currentPage = i ? Z > 0 ? Z - 1 : 0 : Z;
|
|
19275
19340
|
}
|
|
19276
19341
|
g.style.display = "none", C.style.display = "flex", this.updateSingleView("left"), this.playSound();
|
|
19277
|
-
} else
|
|
19278
|
-
C.style.display = "none", g.style.display = "block", this.pageFlip
|
|
19342
|
+
} else {
|
|
19343
|
+
if (C.style.display = "none", g.style.display = "block", this.pageFlip) {
|
|
19344
|
+
const i = this.ui.book.querySelector(".empty-cover") !== null;
|
|
19345
|
+
this.pageFlip.turnToPage(i ? this.state.currentPage + 1 : this.state.currentPage);
|
|
19346
|
+
}
|
|
19347
|
+
this.syncUI();
|
|
19348
|
+
}
|
|
19279
19349
|
this.emit("singlePageModeChange", { isSingle: I }), this.emitPageChange();
|
|
19280
19350
|
}
|
|
19281
19351
|
updateSingleView(I = "right") {
|
|
19282
19352
|
const g = this.ui.singleImg, C = this.state.currentPage, A = this.pages[C];
|
|
19283
19353
|
A && (g.className = I === "right" ? "slide-left" : "slide-right", setTimeout(() => {
|
|
19284
|
-
g.src = this.zoomState.isActive ?
|
|
19354
|
+
g.src = "", this.ensurePageSrc(A, this.zoomState.isActive ? "normal" : "low", g);
|
|
19285
19355
|
const i = I === "right" ? "slide-right" : "slide-left";
|
|
19286
19356
|
g.className = `${this.getPageImageClassName(A.cropMode)} ${i}`, setTimeout(() => {
|
|
19287
19357
|
g.className = this.getPageImageClassName(A.cropMode), this.syncUI(), this.emitPageChange();
|
|
@@ -19330,7 +19400,7 @@ const Bl = class Bl {
|
|
|
19330
19400
|
loadHighResForVisiblePages() {
|
|
19331
19401
|
if (this.state.isSingle) {
|
|
19332
19402
|
const C = this.ui.singleImg, A = this.pages[this.state.currentPage];
|
|
19333
|
-
A && (
|
|
19403
|
+
A && this.ensurePageSrc(A, "normal", C);
|
|
19334
19404
|
return;
|
|
19335
19405
|
}
|
|
19336
19406
|
if (!this.pageFlip) return;
|
|
@@ -19340,7 +19410,7 @@ const Bl = class Bl {
|
|
|
19340
19410
|
const A = this.ui.book.querySelector(`.bz-page[data-idx="${C}"]`);
|
|
19341
19411
|
if (A) {
|
|
19342
19412
|
const i = A.querySelector("img");
|
|
19343
|
-
i && i.dataset.loadedHigh !== "true" && (
|
|
19413
|
+
i && i.dataset.loadedHigh !== "true" && (this.ensurePageSrc(this.pages[C], "normal", i), i.dataset.loadedHigh = "true");
|
|
19344
19414
|
}
|
|
19345
19415
|
}
|
|
19346
19416
|
});
|
|
@@ -19444,11 +19514,11 @@ const Bl = class Bl {
|
|
|
19444
19514
|
});
|
|
19445
19515
|
}
|
|
19446
19516
|
};
|
|
19447
|
-
|
|
19517
|
+
M(Bl, "DEFAULT_PAGE_VIEWPORT", { width: 420, height: 594 });
|
|
19448
19518
|
let ao = Bl;
|
|
19449
|
-
const
|
|
19450
|
-
|
|
19451
|
-
|
|
19519
|
+
const eh = globalThis, nh = eh.FlipbookEngine || {};
|
|
19520
|
+
nh.FlipbookEngine = ao;
|
|
19521
|
+
eh.FlipbookEngine = nh;
|
|
19452
19522
|
export {
|
|
19453
19523
|
ao as FlipbookEngine,
|
|
19454
19524
|
Ma as isFlipbookPageAsset,
|