Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated react-pdf dependency #3342

Merged
merged 1 commit into from
May 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions web-app/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,18 @@
"private": true,
"dependencies": {
"@reduxjs/toolkit": "^1.9.6",
"@types/pdfjs-dist": "^2.10.378",
"kbar": "^0.1.0-beta.39",
"local-storage-fallback": "^4.1.1",
"lodash": "^4.17.21",
"luxon": "^3.4.3",
"mds": "https://github.com/minio/mds.git#v1.0.2",
"pdfjs-dist": "4.2.67",
"react": "^18.3.1",
"react-component-export-image": "^1.0.6",
"react-copy-to-clipboard": "^5.0.2",
"react-dom": "^18.3.1",
"react-dropzone": "^14.2.3",
"react-markdown": "8.0.7",
"react-pdf": "7.7.3",
"react-pdf": "^8.0.2",
"react-redux": "^8.1.3",
"react-router-dom": "6.23.0",
"react-use-websocket": "^4.8.1",
Expand Down
99 changes: 22 additions & 77 deletions web-app/public/scripts/pdf.worker.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,9 +512,7 @@
finishWorkerTask(i);
s &&
(0, r.info)(
`page=${n + 1} - getOperatorList: time=${
Date.now() - s
}ms, len=${e.length}`,
`page=${n + 1} - getOperatorList: time=${Date.now() - s}ms, len=${e.length}`,
);
t.close();
},
Expand Down Expand Up @@ -5086,10 +5084,7 @@
this.backgroundColor &&
(s = `${(0, i.getPdfColor)(this.backgroundColor, !0)} ${n} f `);
if (this.borderColor) {
s += `${this.borderStyle.width || 1} w ${(0, i.getPdfColor)(
this.borderColor,
!1,
)} ${n} S `;
s += `${this.borderStyle.width || 1} w ${(0, i.getPdfColor)(this.borderColor, !1)} ${n} S `;
}
return s;
}
Expand Down Expand Up @@ -5372,23 +5367,12 @@
return (
`/Tx BMC q ${h}BT ` +
p +
` 1 0 0 1 ${(0, n.numberToString)(2)} ${(0, n.numberToString)(
v,
)} Tm (${(0, n.escapeString)(w[0])}) Tj ET Q EMC`
` 1 0 0 1 ${(0, n.numberToString)(2)} ${(0, n.numberToString)(v)} Tm (${(0, n.escapeString)(w[0])}) Tj ET Q EMC`
);
return (
`/Tx BMC q ${h}BT ` +
p +
` 1 0 0 1 0 0 Tm ${this._renderText(
w[0],
y,
m,
g,
k,
{ shift: 0 },
2,
v,
)} ET Q EMC`
` 1 0 0 1 0 0 Tm ${this._renderText(w[0], y, m, g, k, { shift: 0 }, 2, v)} ET Q EMC`
);
}
static async _getFontData(e, t, a, r) {
Expand Down Expand Up @@ -5470,8 +5454,7 @@
} else l = o;
const h = (0, n.numberToString)(l - s.shift);
s.shift = l;
return `${h} ${(c = (0, n.numberToString)(c))} Td (${(0,
n.escapeString)(e)}) Tj`;
return `${h} ${(c = (0, n.numberToString)(c))} Td (${(0, n.escapeString)(e)}) Tj`;
}
_getSaveFieldResources(e) {
const {
Expand Down Expand Up @@ -5547,9 +5530,7 @@
return (
`/Tx BMC q ${f}BT ` +
e +
` 1 0 0 1 ${(0, n.numberToString)(o)} ${(0, n.numberToString)(
c + l,
)} Tm ${m} ET Q EMC`
` 1 0 0 1 ${(0, n.numberToString)(o)} ${(0, n.numberToString)(c + l)} Tm ${m} ET Q EMC`
);
}
_getMultilineAppearance(e, t, a, r, i, s, o, c, l, h, u, d) {
Expand Down Expand Up @@ -5788,11 +5769,7 @@
(0, r.unreachable)(
`_getDefaultCheckedAppearance - unsupported type: ${t}`,
);
const d = `q BT /PdfJsZaDb ${l} Tf 0 g ${(0, n.numberToString)(
(a - h.width) / 2,
)} ${(0, n.numberToString)(
(i - h.height) / 2,
)} Td (${u}) Tj ET Q`,
const d = `q BT /PdfJsZaDb ${l} Tf 0 g ${(0, n.numberToString)((a - h.width) / 2)} ${(0, n.numberToString)((i - h.height) / 2)} Td (${u}) Tj ET Q`,
f = new s.Dict(e.xref);
f.set("FormType", 1);
f.set("Subtype", s.Name.get("Form"));
Expand Down Expand Up @@ -6631,9 +6608,7 @@
for (const { bezier: e } of l) {
f.length = 0;
f.push(
`${(0, n.numberToString)(e[0])} ${(0, n.numberToString)(
e[1],
)} m`,
`${(0, n.numberToString)(e[0])} ${(0, n.numberToString)(e[1])} m`,
);
for (let t = 2, a = e.length; t < a; t += 6) {
const a = e
Expand Down Expand Up @@ -7280,13 +7255,9 @@
const v = s * Math.min(w, S),
F = [
"q",
`0 0 ${(0, n.numberToString)(b)} ${(0, n.numberToString)(
y,
)} re W n`,
`0 0 ${(0, n.numberToString)(b)} ${(0, n.numberToString)(y)} re W n`,
"BT",
`1 0 0 1 0 ${(0, n.numberToString)(
y + C,
)} Tm 0 Tc ${getPdfColor(o, !0)}`,
`1 0 0 1 0 ${(0, n.numberToString)(y + C)} Tm 0 Tc ${getPdfColor(o, !0)}`,
`/${this.fontName.name} ${(0, n.numberToString)(v)} Tf`,
],
{ resources: O } = this;
Expand Down Expand Up @@ -12816,9 +12787,7 @@
const e = s.peekBytes(a + 1)[a];
if (!(0, i.isWhiteSpace)(e)) break;
(0, r.info)(
`Found "${(0, r.bytesToString)(
c,
)}" when searching for endstream command.`,
`Found "${(0, r.bytesToString)(c)}" when searching for endstream command.`,
);
t = l;
break;
Expand Down Expand Up @@ -12977,9 +12946,7 @@
e = this.nextChar();
}
if (e < 48 || e > 57) {
const t = `Invalid number: ${String.fromCharCode(
e,
)} (charCode ${e})`;
const t = `Invalid number: ${String.fromCharCode(e)} (charCode ${e})`;
if ((0, i.isWhiteSpace)(e) || -1 === e) {
(0, r.info)(`Lexer.getNumber - "${t}".`);
return 0;
Expand Down Expand Up @@ -13126,9 +13093,7 @@
const i = toHexDigit(e);
if (-1 === i) {
(0, r.warn)(
`Lexer_getName: Illegal digit (${String.fromCharCode(
e,
)}) in hexadecimal number.`,
`Lexer_getName: Illegal digit (${String.fromCharCode(e)}) in hexadecimal number.`,
);
a.push("#", String.fromCharCode(t));
if (b[e]) break;
Expand Down Expand Up @@ -46911,9 +46876,7 @@
} else
this.nodeValue
? e.push(
`>${(0, r.encodeToXmlString)(this.nodeValue)}</${
this.nodeName
}>`,
`>${(0, r.encodeToXmlString)(this.nodeValue)}</${this.nodeName}>`,
)
: e.push("/>");
} else e.push((0, r.encodeToXmlString)(this.nodeValue));
Expand Down Expand Up @@ -51254,9 +51217,7 @@
const t = (0, s.toStyle)(this, "border", "margin"),
a = this[r.$getParent]()[r.$getParent](),
n = {
fontSize: `calc(${
a.font?.size || 10
}px * var(--scale-factor))`,
fontSize: `calc(${a.font?.size || 10}px * var(--scale-factor))`,
},
i = [];
if (a.items.children.length > 0) {
Expand Down Expand Up @@ -53129,11 +53090,7 @@
}
[r.$toStyle](e) {
e = e ? e[r.$toStyle]() : "#FFFFFF";
return `linear-gradient(${this.type
.replace(/([RBLT])/, " $1")
.toLowerCase()}, ${e}, ${
this.color ? this.color[r.$toStyle]() : "#000000"
})`;
return `linear-gradient(${this.type.replace(/([RBLT])/, " $1").toLowerCase()}, ${e}, ${this.color ? this.color[r.$toStyle]() : "#000000"})`;
}
}
class LockDocument extends o.ContentObject {
Expand Down Expand Up @@ -53872,9 +53829,7 @@
[r.$toStyle](e) {
e = e ? e[r.$toStyle]() : "#FFFFFF";
const t = this.color ? this.color[r.$toStyle]() : "#000000";
return `radial-gradient(circle at center, ${
"toEdge" === this.type ? `${e},${t}` : `${t},${e}`
})`;
return `radial-gradient(circle at center, ${"toEdge" === this.type ? `${e},${t}` : `${t},${e}`})`;
}
}
class Reason extends o.StringObject {
Expand Down Expand Up @@ -56767,9 +56722,7 @@
? (n = ` (id: ${this.id})`)
: this.name && (n = ` (name: ${this.name} ${this.h.value})`);
(0, i.warn)(
`XFA - node "${
this[r.$nodeName]
}"${n} has already enough "${t}"!`,
`XFA - node "${this[r.$nodeName]}"${n} has already enough "${t}"!`,
);
return !1;
}
Expand Down Expand Up @@ -56990,9 +56943,7 @@
}
if (s[r.$nodeName] !== this[r.$nodeName]) {
(0, i.warn)(
`XFA - Incompatible prototype: ${s[r.$nodeName]} !== ${
this[r.$nodeName]
}.`,
`XFA - Incompatible prototype: ${s[r.$nodeName]} !== ${this[r.$nodeName]}.`,
);
return null;
}
Expand Down Expand Up @@ -57123,9 +57074,7 @@
return !0;
}
(0, i.warn)(
`XFA - node "${e[r.$nodeName]}" accepts no more than ${
this[S]
} children`,
`XFA - node "${e[r.$nodeName]}" accepts no more than ${this[S]} children`,
);
return !1;
}
Expand Down Expand Up @@ -60108,16 +60057,12 @@
[
"xfa-font-horizontal-scale",
(e) =>
`scaleX(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(
2,
)})`,
`scaleX(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`,
],
[
"xfa-font-vertical-scale",
(e) =>
`scaleY(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(
2,
)})`,
`scaleY(${Math.max(0, Math.min(parseInt(e) / 100)).toFixed(2)})`,
],
["xfa-spacerun", ""],
["xfa-tab-stops", ""],
Expand Down
Loading
Loading