@poe-platform/safe-bash 0.1.760 → 0.1.761
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/image-ast/index.browser.js +48 -6
- package/dist/image-ast/index.js +48 -6
- package/dist/pdf-ast/index.js +50 -6
- package/dist/safe-bash/command-chunks/{chunk-MC4XXPQJ.js → chunk-6VX5ZQL5.js} +2 -2
- package/dist/safe-bash/command-chunks/{chunk-UCI6ZQFB.js → chunk-GR725WRX.js} +1 -1
- package/dist/safe-bash/command-chunks/{chunk-S3SCPBHC.js → chunk-OSMLVM7P.js} +53 -6
- package/dist/safe-bash/commands/htmlq/index.d.ts +1 -1
- package/dist/safe-bash/commands/htmlq/index.js +4 -1
- package/dist/safe-bash/core.browser.js +3 -2
- package/dist/safe-bash/shell/runtime.js +1 -1
- package/dist/safe-bash-command-ffmpeg/index.js +207 -175
- package/dist/safe-bash-command-git/LICENSE +21 -0
- package/dist/safe-bash-command-imagemagick/index.js +2 -2
- package/dist/safe-bash-command-pandoc/command.js +3 -3
- package/dist/safe-bash-command-pandoc/index.js +3 -3
- package/dist/safe-bash-command-pdfimages/index.js +48 -6
- package/dist/safe-bash-command-pdfinfo/index.js +48 -6
- package/dist/safe-bash-command-pdftk/index.js +48 -6
- package/dist/safe-bash-command-pdftoppm/index.js +48 -6
- package/dist/safe-bash-command-pdftotext/index.js +48 -6
- package/dist/safe-bash-command-qpdf/index.js +48 -6
- package/dist/safe-bash-command-sips/index.js +2 -2
- package/dist/safe-bash-command-soffice/index.js +1 -1
- package/dist/safe-bash-command-ssconvert/index.js +48 -6
- package/dist/safe-bash-command-wkhtmltopdf/index.js +48 -6
- package/package.json +2 -2
- package/third-party/pdf-ast/THIRD_PARTY_NOTICES.md +22 -0
- package/third-party/pdf-ast/licenses/AGG-2.3.txt +7 -0
- package/third-party/pdf-ast/licenses/MIT.txt +21 -0
|
@@ -6,7 +6,7 @@ import {
|
|
|
6
6
|
init_buffer();
|
|
7
7
|
import { writeFileOutput as to } from "../safe-bash-contracts/filesystem-output-budget.js";
|
|
8
8
|
import { commandRuntimeIdentity as eu, getCommandArguments as tu } from "../safe-bash-contracts/command.js";
|
|
9
|
-
import { readBytes as
|
|
9
|
+
import { readBytes as ew, writeBytes as Ot } from "../safe-bash-contracts/io.js";
|
|
10
10
|
var Rl = { black: [0, 0, 0, 255], white: [255, 255, 255, 255], transparent: [0, 0, 0, 0], none: [0, 0, 0, 0], red: [255, 0, 0, 255], green: [0, 128, 0, 255], lime: [0, 255, 0, 255], blue: [0, 0, 255, 255], yellow: [255, 255, 0, 255], cyan: [0, 255, 255, 255], aqua: [0, 255, 255, 255], magenta: [255, 0, 255, 255], fuchsia: [255, 0, 255, 255], gray: [128, 128, 128, 255], grey: [128, 128, 128, 255], silver: [192, 192, 192, 255], maroon: [128, 0, 0, 255], olive: [128, 128, 0, 255], purple: [128, 0, 128, 255], teal: [0, 128, 128, 255], navy: [0, 0, 128, 255], orange: [255, 165, 0, 255] };
|
|
11
11
|
function St(e) {
|
|
12
12
|
return Number.isFinite(e) ? Math.max(0, Math.min(255, Math.round(e))) : 0;
|
|
@@ -4380,13 +4380,13 @@ var Rm = class {
|
|
|
4380
4380
|
return true;
|
|
4381
4381
|
}
|
|
4382
4382
|
};
|
|
4383
|
-
var
|
|
4383
|
+
var sw = (typeof PDFJSDev > "u" || PDFJSDev.test("GENERIC")) && false;
|
|
4384
4384
|
var qm = [1 / 0, 1 / 0, -1 / 0, -1 / 0];
|
|
4385
|
-
var
|
|
4385
|
+
var ow = new Float32Array(qm);
|
|
4386
4386
|
var zm = [1e-3, 0, 0, 1e-3, 0, 0];
|
|
4387
4387
|
var Ym = 1.35;
|
|
4388
4388
|
var jm = 0.35;
|
|
4389
|
-
var
|
|
4389
|
+
var cw = jm / Ym;
|
|
4390
4390
|
var cl = { ERRORS: 0, WARNINGS: 1, INFOS: 5 };
|
|
4391
4391
|
var On = { moveTo: 0, lineTo: 1, curveTo: 2, quadraticCurveTo: 3, closePath: 4 };
|
|
4392
4392
|
var Do = { NEED_PASSWORD: 1, INCORRECT_PASSWORD: 2 };
|
|
@@ -5336,7 +5336,7 @@ var _0 = class $0 {
|
|
|
5336
5336
|
return l;
|
|
5337
5337
|
}
|
|
5338
5338
|
};
|
|
5339
|
-
var
|
|
5339
|
+
var lw = class {
|
|
5340
5340
|
static bools = ["black", "bold", "disableFontFace", "fontExtraProperties", "isInvalidPDFjsFont", "isType3Font", "italic", "missingFile", "remeasure", "vertical"];
|
|
5341
5341
|
static numbers = ["ascent", "defaultWidth", "descent"];
|
|
5342
5342
|
static strings = ["fallbackName", "loadedName", "mimetype", "name"];
|
|
@@ -5574,7 +5574,7 @@ var n1 = class a1 {
|
|
|
5574
5574
|
return this.stream?.getOriginalStream() || this;
|
|
5575
5575
|
}
|
|
5576
5576
|
};
|
|
5577
|
-
var
|
|
5577
|
+
var fw = 2 ** 31 - 1;
|
|
5578
5578
|
function Ct(e, t = false) {
|
|
5579
5579
|
let n;
|
|
5580
5580
|
return function() {
|
|
@@ -5840,7 +5840,7 @@ var g2 = class extends u2 {
|
|
|
5840
5840
|
vc(e, t, this, n);
|
|
5841
5841
|
}
|
|
5842
5842
|
};
|
|
5843
|
-
var
|
|
5843
|
+
var dw = Ct(function(e) {
|
|
5844
5844
|
e[63721] = 169, e[63193] = 169, e[63720] = 174, e[63194] = 174, e[63722] = 8482, e[63195] = 8482, e[63718] = 9168, e[63719] = 9135, e[63733] = 9134, e[63729] = 9127, e[63730] = 9128, e[63731] = 9129, e[63740] = 9131, e[63741] = 9132, e[63742] = 9133, e[63726] = 9121, e[63727] = 9122, e[63728] = 9123, e[63737] = 9124, e[63738] = 9125, e[63739] = 9126, e[63723] = 9115, e[63724] = 9116, e[63725] = 9117, e[63734] = 9118, e[63735] = 9119, e[63736] = 9120;
|
|
5845
5845
|
});
|
|
5846
5846
|
function m2(e, t) {
|
|
@@ -5891,7 +5891,7 @@ function v2(e, t, n) {
|
|
|
5891
5891
|
}
|
|
5892
5892
|
return a;
|
|
5893
5893
|
}
|
|
5894
|
-
var
|
|
5894
|
+
var hw = Ct((e) => {
|
|
5895
5895
|
e[8211] = 65074, e[8212] = 65073, e[8229] = 65072, e[8230] = 65049, e[12289] = 65041, e[12290] = 65042, e[12296] = 65087, e[12297] = 65088, e[12298] = 65085, e[12299] = 65086, e[12300] = 65089, e[12301] = 65090, e[12302] = 65091, e[12303] = 65092, e[12304] = 65083, e[12305] = 65084, e[12308] = 65081, e[12309] = 65082, e[12310] = 65047, e[12311] = 65048, e[65103] = 65076, e[65281] = 65045, e[65288] = 65077, e[65289] = 65078, e[65292] = 65040, e[65306] = 65043, e[65307] = 65044, e[65311] = 65046, e[65339] = 65095, e[65341] = 65096, e[65343] = 65075, e[65371] = 65079, e[65373] = 65080;
|
|
5896
5896
|
});
|
|
5897
5897
|
var Di = false;
|
|
@@ -7326,7 +7326,7 @@ var J2 = Ct(function(e) {
|
|
|
7326
7326
|
t.space = 278, t.a1 = 974, t.a2 = 961, t.a202 = 974, t.a3 = 980, t.a4 = 719, t.a5 = 789, t.a119 = 790, t.a118 = 791, t.a117 = 690, t.a11 = 960, t.a12 = 939, t.a13 = 549, t.a14 = 855, t.a15 = 911, t.a16 = 933, t.a105 = 911, t.a17 = 945, t.a18 = 974, t.a19 = 755, t.a20 = 846, t.a21 = 762, t.a22 = 761, t.a23 = 571, t.a24 = 677, t.a25 = 763, t.a26 = 760, t.a27 = 759, t.a28 = 754, t.a6 = 494, t.a7 = 552, t.a8 = 537, t.a9 = 577, t.a10 = 692, t.a29 = 786, t.a30 = 788, t.a31 = 788, t.a32 = 790, t.a33 = 793, t.a34 = 794, t.a35 = 816, t.a36 = 823, t.a37 = 789, t.a38 = 841, t.a39 = 823, t.a40 = 833, t.a41 = 816, t.a42 = 831, t.a43 = 923, t.a44 = 744, t.a45 = 723, t.a46 = 749, t.a47 = 790, t.a48 = 792, t.a49 = 695, t.a50 = 776, t.a51 = 768, t.a52 = 792, t.a53 = 759, t.a54 = 707, t.a55 = 708, t.a56 = 682, t.a57 = 701, t.a58 = 826, t.a59 = 815, t.a60 = 789, t.a61 = 789, t.a62 = 707, t.a63 = 687, t.a64 = 696, t.a65 = 689, t.a66 = 786, t.a67 = 787, t.a68 = 713, t.a69 = 791, t.a70 = 785, t.a71 = 791, t.a72 = 873, t.a73 = 761, t.a74 = 762, t.a203 = 762, t.a75 = 759, t.a204 = 759, t.a76 = 892, t.a77 = 892, t.a78 = 788, t.a79 = 784, t.a81 = 438, t.a82 = 138, t.a83 = 277, t.a84 = 415, t.a97 = 392, t.a98 = 392, t.a99 = 668, t.a100 = 668, t.a89 = 390, t.a90 = 390, t.a93 = 317, t.a94 = 317, t.a91 = 276, t.a92 = 276, t.a205 = 509, t.a85 = 509, t.a206 = 410, t.a86 = 410, t.a87 = 234, t.a88 = 234, t.a95 = 334, t.a96 = 334, t.a101 = 732, t.a102 = 544, t.a103 = 544, t.a104 = 910, t.a106 = 667, t.a107 = 760, t.a108 = 760, t.a112 = 776, t.a111 = 595, t.a110 = 694, t.a109 = 626, t.a120 = 788, t.a121 = 788, t.a122 = 788, t.a123 = 788, t.a124 = 788, t.a125 = 788, t.a126 = 788, t.a127 = 788, t.a128 = 788, t.a129 = 788, t.a130 = 788, t.a131 = 788, t.a132 = 788, t.a133 = 788, t.a134 = 788, t.a135 = 788, t.a136 = 788, t.a137 = 788, t.a138 = 788, t.a139 = 788, t.a140 = 788, t.a141 = 788, t.a142 = 788, t.a143 = 788, t.a144 = 788, t.a145 = 788, t.a146 = 788, t.a147 = 788, t.a148 = 788, t.a149 = 788, t.a150 = 788, t.a151 = 788, t.a152 = 788, t.a153 = 788, t.a154 = 788, t.a155 = 788, t.a156 = 788, t.a157 = 788, t.a158 = 788, t.a159 = 788, t.a160 = 894, t.a161 = 838, t.a163 = 1016, t.a164 = 458, t.a196 = 748, t.a165 = 924, t.a192 = 748, t.a166 = 918, t.a167 = 927, t.a168 = 928, t.a169 = 928, t.a170 = 834, t.a171 = 873, t.a172 = 828, t.a173 = 924, t.a162 = 924, t.a174 = 917, t.a175 = 930, t.a176 = 931, t.a177 = 463, t.a178 = 883, t.a179 = 836, t.a193 = 836, t.a180 = 867, t.a199 = 867, t.a181 = 696, t.a200 = 696, t.a182 = 874, t.a201 = 874, t.a183 = 760, t.a184 = 946, t.a197 = 771, t.a185 = 865, t.a194 = 771, t.a198 = 888, t.a186 = 967, t.a195 = 888, t.a187 = 831, t.a188 = 873, t.a189 = 927, t.a190 = 970, t.a191 = 918;
|
|
7327
7327
|
});
|
|
7328
7328
|
});
|
|
7329
|
-
var
|
|
7329
|
+
var uw = Ct(function(e) {
|
|
7330
7330
|
e.Courier = { ascent: 629, descent: -157, capHeight: 562, xHeight: -426 }, e["Courier-Bold"] = { ascent: 629, descent: -157, capHeight: 562, xHeight: 439 }, e["Courier-Oblique"] = { ascent: 629, descent: -157, capHeight: 562, xHeight: 426 }, e["Courier-BoldOblique"] = { ascent: 629, descent: -157, capHeight: 562, xHeight: 426 }, e.Helvetica = { ascent: 718, descent: -207, capHeight: 718, xHeight: 523 }, e["Helvetica-Bold"] = { ascent: 718, descent: -207, capHeight: 718, xHeight: 532 }, e["Helvetica-Oblique"] = { ascent: 718, descent: -207, capHeight: 718, xHeight: 523 }, e["Helvetica-BoldOblique"] = { ascent: 718, descent: -207, capHeight: 718, xHeight: 532 }, e["Times-Roman"] = { ascent: 683, descent: -217, capHeight: 662, xHeight: 450 }, e["Times-Bold"] = { ascent: 683, descent: -217, capHeight: 676, xHeight: 461 }, e["Times-Italic"] = { ascent: 683, descent: -217, capHeight: 653, xHeight: 441 }, e["Times-BoldItalic"] = { ascent: 683, descent: -217, capHeight: 669, xHeight: 462 }, e.Symbol = { ascent: Math.NaN, descent: Math.NaN, capHeight: Math.NaN, xHeight: Math.NaN }, e.ZapfDingbats = { ascent: Math.NaN, descent: Math.NaN, capHeight: Math.NaN, xHeight: Math.NaN };
|
|
7331
7331
|
});
|
|
7332
7332
|
var fe = class extends Error {
|
|
@@ -8058,7 +8058,7 @@ function fa(e) {
|
|
|
8058
8058
|
let u = new Uint8Array(16), d = new DataView(u.buffer);
|
|
8059
8059
|
return d.setUint32(0, o, true), d.setUint32(4, s, true), d.setUint32(8, l, true), d.setUint32(12, c, true), u;
|
|
8060
8060
|
}
|
|
8061
|
-
var
|
|
8061
|
+
var gw = new Uint32Array([1116352408, 1899447441, 3049323471, 3921009573, 961987163, 1508970993, 2453635748, 2870763221, 3624381080, 310598401, 607225278, 1426881987, 1925078388, 2162078206, 2614888103, 3248222580, 3835390401, 4022224774, 264347078, 604807628, 770255983, 1249150122, 1555081692, 1996064986, 2554220882, 2821834349, 2952996808, 3210313671, 3336571891, 3584528711, 113926993, 338241895, 666307205, 773529912, 1294757372, 1396182291, 1695183700, 1986661051, 2177026350, 2456956037, 2730485921, 2820302411, 3259730800, 3345764771, 3516065817, 3600352804, 4094571909, 275423344, 430227734, 506948616, 659060556, 883997877, 958139571, 1322822218, 1537002063, 1747873779, 1955562222, 2024104815, 2227730452, 2361852424, 2428436474, 2756734187, 3204031479, 3329325298]);
|
|
8062
8062
|
var Me = new Uint8Array(256);
|
|
8063
8063
|
var De = new Uint8Array(256);
|
|
8064
8064
|
var h5 = new Uint8Array([0, 1, 2, 4, 8, 16, 32, 64, 128, 27, 54]);
|
|
@@ -9997,7 +9997,7 @@ var Ma = {};
|
|
|
9997
9997
|
Zi.d(Ma, { Jbig2Image: () => G9, JpegImage: () => X9, JpxImage: () => L9, VerbosityLevel: () => Vs, getVerbosityLevel: () => i9, setVerbosityLevel: () => a9 });
|
|
9998
9998
|
var t9 = 1.35;
|
|
9999
9999
|
var n9 = 0.35;
|
|
10000
|
-
var
|
|
10000
|
+
var pw = n9 / t9;
|
|
10001
10001
|
var Vs = { ERRORS: 0, WARNINGS: 1, INFOS: 5 };
|
|
10002
10002
|
var Os = Vs.WARNINGS;
|
|
10003
10003
|
function a9(e) {
|
|
@@ -10057,7 +10057,7 @@ var c9 = class {
|
|
|
10057
10057
|
return Zn(this, "isCSSRoundSupported", globalThis.CSS?.supports?.("width: round(1.5px, 1px)"));
|
|
10058
10058
|
}
|
|
10059
10059
|
};
|
|
10060
|
-
var
|
|
10060
|
+
var ww = Array.from(Array(256).keys(), (e) => e.toString(16).padStart(2, "0"));
|
|
10061
10061
|
function di(e) {
|
|
10062
10062
|
return e <= 0 ? 0 : Math.ceil(Math.log2(e));
|
|
10063
10063
|
}
|
|
@@ -12355,9 +12355,9 @@ var ip = class extends V1 {
|
|
|
12355
12355
|
var rp = Ma.Jbig2Image;
|
|
12356
12356
|
var sp = Ma.JpegImage;
|
|
12357
12357
|
var op = Ma.JpxImage;
|
|
12358
|
-
var
|
|
12359
|
-
var
|
|
12360
|
-
var
|
|
12358
|
+
var vw = Ma.VerbosityLevel;
|
|
12359
|
+
var bw = Ma.getVerbosityLevel;
|
|
12360
|
+
var Aw = Ma.setVerbosityLevel;
|
|
12361
12361
|
function ts(e, t, n) {
|
|
12362
12362
|
if (!t) return { colorSpace: "rgb", colorSpaceLabel: "rgb", components: 3 };
|
|
12363
12363
|
let a = e.resolve(t);
|
|
@@ -14871,7 +14871,27 @@ function Gp(e) {
|
|
|
14871
14871
|
return e.measureTextWidth(t, n);
|
|
14872
14872
|
} };
|
|
14873
14873
|
}
|
|
14874
|
-
function Ep(e) {
|
|
14874
|
+
function Ep(e, t, n, a, i, r, o, s) {
|
|
14875
|
+
let l = [[e, t]], c = (f, u, d, h, m, w, v, A, b) => {
|
|
14876
|
+
if (b > 16) return;
|
|
14877
|
+
let g = (f + d) / 2, p = (u + h) / 2, x = (d + m) / 2, B = (h + w) / 2, C = (m + v) / 2, F = (w + A) / 2, y = (g + x) / 2, k = (p + B) / 2, H = (x + C) / 2, M = (B + F) / 2, E = (y + H) / 2, G = (k + M) / 2, P = v - f, I = A - u, D = Math.abs((d - v) * I - (h - A) * P), X = Math.abs((m - v) * I - (w - A) * P), S = D > 1e-30, U = X > 1e-30;
|
|
14878
|
+
if (!S && !U) {
|
|
14879
|
+
if (Math.abs(f + m - 2 * d) + Math.abs(u + w - 2 * h) + Math.abs(d + v - 2 * m) + Math.abs(h + A - 2 * w) <= 4) {
|
|
14880
|
+
l.push([E, G]);
|
|
14881
|
+
return;
|
|
14882
|
+
}
|
|
14883
|
+
} else {
|
|
14884
|
+
let K = (S ? D : 0) + (U ? X : 0);
|
|
14885
|
+
if (K * K <= 0.25 * (P * P + I * I)) {
|
|
14886
|
+
l.push([x, B]);
|
|
14887
|
+
return;
|
|
14888
|
+
}
|
|
14889
|
+
}
|
|
14890
|
+
c(f, u, g, p, y, k, E, G, b + 1), c(E, G, H, M, C, F, v, A, b + 1);
|
|
14891
|
+
};
|
|
14892
|
+
return c(e, t, n, a, i, r, o, s, 0), l.push([o, s]), l;
|
|
14893
|
+
}
|
|
14894
|
+
function Dp(e) {
|
|
14875
14895
|
if (e.length < 24 || e[0] !== 137 || e[1] !== 80 || e[2] !== 78 || e[3] !== 71) throw new Error("Invalid PNG signature");
|
|
14876
14896
|
let t = new DataView(e.buffer, e.byteOffset, e.byteLength), n = 0, a = 0, i = 8, r = 2, o, s, l = [], c = 8;
|
|
14877
14897
|
for (; c + 8 <= e.length; ) {
|
|
@@ -14935,12 +14955,12 @@ function Ep(e) {
|
|
|
14935
14955
|
}
|
|
14936
14956
|
return { width: n, height: a, data: v };
|
|
14937
14957
|
}
|
|
14938
|
-
var
|
|
14939
|
-
var
|
|
14940
|
-
var
|
|
14941
|
-
var
|
|
14942
|
-
var
|
|
14943
|
-
var
|
|
14958
|
+
var xw = new Uint8Array([16, 11, 10, 16, 24, 40, 51, 61, 12, 12, 14, 19, 26, 58, 60, 55, 14, 13, 16, 24, 40, 57, 69, 56, 14, 17, 22, 29, 51, 87, 80, 62, 18, 22, 37, 56, 68, 109, 103, 77, 24, 35, 55, 64, 81, 104, 113, 92, 49, 64, 78, 87, 103, 121, 120, 101, 72, 92, 95, 98, 112, 100, 103, 99]);
|
|
14959
|
+
var Bw = new Uint8Array([0, 1, 5, 6, 14, 15, 27, 28, 2, 4, 7, 13, 16, 26, 29, 42, 3, 8, 12, 17, 25, 30, 41, 43, 9, 11, 18, 24, 31, 40, 44, 53, 10, 19, 23, 32, 39, 45, 52, 54, 20, 22, 33, 38, 46, 51, 55, 60, 21, 34, 37, 47, 50, 56, 59, 61, 35, 36, 48, 49, 57, 58, 62, 63]);
|
|
14960
|
+
var Ip = Uint8Array.from([0, 1, 5, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0]);
|
|
14961
|
+
var Sp = Uint8Array.from([0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]);
|
|
14962
|
+
var Tp = Uint8Array.from([0, 2, 1, 3, 3, 2, 4, 3, 5, 5, 4, 4, 0, 0, 1, 125]);
|
|
14963
|
+
var Xp = Uint8Array.from([1, 2, 3, 0, 4, 17, 5, 18, 33, 49, 65, 6, 19, 81, 97, 7, 34, 113, 20, 50, 129, 145, 161, 8, 35, 66, 177, 193, 21, 82, 209, 240, 36, 51, 98, 114, 130, 9, 10, 22, 23, 24, 25, 26, 37, 38, 39, 40, 41, 42, 52, 53, 54, 55, 56, 57, 58, 67, 68, 69, 70, 71, 72, 73, 74, 83, 84, 85, 86, 87, 88, 89, 90, 99, 100, 101, 102, 103, 104, 105, 106, 115, 116, 117, 118, 119, 120, 121, 122, 131, 132, 133, 134, 135, 136, 137, 138, 146, 147, 148, 149, 150, 151, 152, 153, 154, 162, 163, 164, 165, 166, 167, 168, 169, 170, 178, 179, 180, 181, 182, 183, 184, 185, 186, 194, 195, 196, 197, 198, 199, 200, 201, 202, 210, 211, 212, 213, 214, 215, 216, 217, 218, 225, 226, 227, 228, 229, 230, 231, 232, 233, 234, 241, 242, 243, 244, 245, 246, 247, 248, 249, 250]);
|
|
14944
14964
|
function q1(e, t) {
|
|
14945
14965
|
let n = /* @__PURE__ */ new Map(), a = 0, i = 0;
|
|
14946
14966
|
for (let r = 1; r <= 16; r++) {
|
|
@@ -14953,8 +14973,8 @@ function q1(e, t) {
|
|
|
14953
14973
|
}
|
|
14954
14974
|
return n;
|
|
14955
14975
|
}
|
|
14956
|
-
var
|
|
14957
|
-
var
|
|
14976
|
+
var yw = q1(Ip, Sp);
|
|
14977
|
+
var kw = q1(Tp, Xp);
|
|
14958
14978
|
function z1(e, t) {
|
|
14959
14979
|
let n = (Math.round(t / 90) * 90 % 360 + 360) % 360;
|
|
14960
14980
|
if (n === 0) return e;
|
|
@@ -14982,7 +15002,7 @@ function Qc(e, t) {
|
|
|
14982
15002
|
}
|
|
14983
15003
|
return { width: o, height: s, data: l };
|
|
14984
15004
|
}
|
|
14985
|
-
var
|
|
15005
|
+
var Up = (() => {
|
|
14986
15006
|
let e = new Uint32Array(256);
|
|
14987
15007
|
for (let t = 0; t < 256; t++) {
|
|
14988
15008
|
let n = t;
|
|
@@ -14991,9 +15011,9 @@ var Xp = (() => {
|
|
|
14991
15011
|
}
|
|
14992
15012
|
return e;
|
|
14993
15013
|
})();
|
|
14994
|
-
function
|
|
15014
|
+
function Lp(e) {
|
|
14995
15015
|
let t = 4294967295;
|
|
14996
|
-
for (let n = 0; n < e.length; n++) t =
|
|
15016
|
+
for (let n = 0; n < e.length; n++) t = Up[(t ^ e[n]) & 255] ^ t >>> 8;
|
|
14997
15017
|
return (t ^ 4294967295) >>> 0;
|
|
14998
15018
|
}
|
|
14999
15019
|
function zo(e, t) {
|
|
@@ -15001,7 +15021,7 @@ function zo(e, t) {
|
|
|
15001
15021
|
a.setUint32(0, t.length, false);
|
|
15002
15022
|
for (let r = 0; r < 4; r++) n[4 + r] = e.charCodeAt(r);
|
|
15003
15023
|
n.set(t, 8);
|
|
15004
|
-
let i =
|
|
15024
|
+
let i = Lp(n.subarray(4, 8 + t.length));
|
|
15005
15025
|
return a.setUint32(8 + t.length, i, false), n;
|
|
15006
15026
|
}
|
|
15007
15027
|
function Y1(e, t, n) {
|
|
@@ -15050,13 +15070,13 @@ function Yo(e, t, n) {
|
|
|
15050
15070
|
function za(e, t, n) {
|
|
15051
15071
|
return 0.3 * e + 0.59 * t + 0.11 * n;
|
|
15052
15072
|
}
|
|
15053
|
-
function
|
|
15073
|
+
function Kp(e, t, n) {
|
|
15054
15074
|
let a = za(e, t, n), i = Math.min(e, t, n), r = Math.max(e, t, n), o = e, s = t, l = n;
|
|
15055
15075
|
return i < 0 && a - i > 1e-7 && (o = a + (o - a) * a / (a - i), s = a + (s - a) * a / (a - i), l = a + (l - a) * a / (a - i)), r > 1 && r - a > 1e-7 && (o = a + (o - a) * (1 - a) / (r - a), s = a + (s - a) * (1 - a) / (r - a), l = a + (l - a) * (1 - a) / (r - a)), [Math.max(0, Math.min(1, o)), Math.max(0, Math.min(1, s)), Math.max(0, Math.min(1, l))];
|
|
15056
15076
|
}
|
|
15057
15077
|
function qr(e, t, n, a) {
|
|
15058
15078
|
let i = a - za(e, t, n);
|
|
15059
|
-
return
|
|
15079
|
+
return Kp(e + i, t + i, n + i);
|
|
15060
15080
|
}
|
|
15061
15081
|
function gh(e, t, n) {
|
|
15062
15082
|
return Math.max(e, t, n) - Math.min(e, t, n);
|
|
@@ -15065,7 +15085,7 @@ function mh(e, t, n, a) {
|
|
|
15065
15085
|
let i = [{ idx: 0, val: e }, { idx: 1, val: t }, { idx: 2, val: n }].sort((c, f) => c.val - f.val), r = i[0].val, o = i[1].val, s = i[2].val, l = [0, 0, 0];
|
|
15066
15086
|
return s > r && (l[i[1].idx] = (o - r) * a / (s - r), l[i[2].idx] = a), l[i[0].idx] = 0, [l[0], l[1], l[2]];
|
|
15067
15087
|
}
|
|
15068
|
-
function
|
|
15088
|
+
function Vp(e, t, n, a, i, r, o) {
|
|
15069
15089
|
if (!o || o === "Normal" || o === "Compatible") return [a, i, r];
|
|
15070
15090
|
if (o === "Hue") {
|
|
15071
15091
|
let [s, l, c] = mh(a, i, r, gh(e, t, n));
|
|
@@ -15081,7 +15101,7 @@ function Bs(e, t, n, a, i, r, o, s, l) {
|
|
|
15081
15101
|
if (a < 0 || i < 0 || a >= t || i >= n || o <= 0) return;
|
|
15082
15102
|
let c = Math.min(1, Math.max(0, o)) * (l ? l[(i * t + a) * 4 + 3] / 255 : 1), f = (i * t + a) * 4, u = Math.min(1, Math.max(0, r.r)), d = Math.min(1, Math.max(0, r.g)), h = Math.min(1, Math.max(0, r.b)), m = e[f + 3] / 255, w = c + m * (1 - c);
|
|
15083
15103
|
if (w <= 0) return;
|
|
15084
|
-
let v = e[f] / 255, A = e[f + 1] / 255, b = e[f + 2] / 255, [g, p, x] =
|
|
15104
|
+
let v = e[f] / 255, A = e[f + 1] / 255, b = e[f + 2] / 255, [g, p, x] = Vp(v, A, b, u, d, h, s), B = (1 - m) * u + m * g, C = (1 - m) * d + m * p, F = (1 - m) * h + m * x;
|
|
15085
15105
|
e[f] = Math.round((B * c + v * m * (1 - c)) / w * 255), e[f + 1] = Math.round((C * c + A * m * (1 - c)) / w * 255), e[f + 2] = Math.round((F * c + b * m * (1 - c)) / w * 255), e[f + 3] = Math.round(w * 255);
|
|
15086
15106
|
}
|
|
15087
15107
|
function ph(e, t, n, a, i, r, o, s, l, c = 1, f = 0, u = true, d, h) {
|
|
@@ -15112,10 +15132,10 @@ function jo(e, t, n, a = false) {
|
|
|
15112
15132
|
let [d, h] = f(u.x, u.y);
|
|
15113
15133
|
i.push({ x0: r, y0: o, x1: d, y1: h }), r = d, o = h, c = true;
|
|
15114
15134
|
} else if (u.kind === "cubic") {
|
|
15115
|
-
let [d, h] = f(u.x1, u.y1), [m, w] = f(u.x2, u.y2), [v, A] = f(u.x, u.y), b =
|
|
15116
|
-
for (let x = 1; x
|
|
15117
|
-
let B
|
|
15118
|
-
i.push({ x0: g, y0: p, x1:
|
|
15135
|
+
let [d, h] = f(u.x1, u.y1), [m, w] = f(u.x2, u.y2), [v, A] = f(u.x, u.y), b = Ep(r, o, d, h, m, w, v, A), g = r, p = o;
|
|
15136
|
+
for (let x = 1; x < b.length; x++) {
|
|
15137
|
+
let [B, C] = b[x];
|
|
15138
|
+
i.push({ x0: g, y0: p, x1: B, y1: C }), g = B, p = C;
|
|
15119
15139
|
}
|
|
15120
15140
|
r = v, o = A, c = true;
|
|
15121
15141
|
} else if (u.kind === "close") (r !== s || o !== l) && (i.push({ x0: r, y0: o, x1: s, y1: l }), r = s, o = l), c = false;
|
|
@@ -15167,7 +15187,7 @@ function wh(e, t, n, a, i, r = 1, o = "nonzero", s, l = true, c, f) {
|
|
|
15167
15187
|
}
|
|
15168
15188
|
}
|
|
15169
15189
|
}
|
|
15170
|
-
function
|
|
15190
|
+
function Op(e) {
|
|
15171
15191
|
if (e.outline) return { ...e.outline, ...e.clipPaths ? { clipPaths: e.clipPaths } : {} };
|
|
15172
15192
|
let t = e.unicode.codePointAt(0), n = t === void 0 ? [] : As(e.fontName).getGlyphOutline(t), [a, i, r, o, s, l] = e.matrix, c = e.fontSize / (Math.hypot(a, i) || 1), f = (h, m) => [c * (a * h + r * m) + s, c * (i * h + o * m) + l], u = n.map((h) => {
|
|
15173
15193
|
if (h.kind === "move" || h.kind === "line") {
|
|
@@ -15182,16 +15202,16 @@ function Vp(e) {
|
|
|
15182
15202
|
}), d = e.renderMode ?? 0;
|
|
15183
15203
|
return { segments: u, strokeWidth: d === 1 || d === 2 ? 1 : 0, ...d !== 1 ? { fillColor: e.color } : {}, ...d === 1 || d === 2 ? { strokeColor: e.color } : {}, ...e.clipPaths ? { clipPaths: e.clipPaths } : {}, ...e.clipRect ? { clipRect: e.clipRect } : {}, ...e.blendMode ? { blendMode: e.blendMode } : {} };
|
|
15184
15204
|
}
|
|
15185
|
-
function
|
|
15205
|
+
function Qp(e) {
|
|
15186
15206
|
return e.operations ?? [...e.paths.map((t) => ({ kind: "path", value: t })), ...e.images.map((t) => ({ kind: "image", value: t })), ...e.glyphs.map((t) => ({ kind: "glyph", value: t }))];
|
|
15187
15207
|
}
|
|
15188
15208
|
function qs(e, t = {}) {
|
|
15189
15209
|
let n = t.scale ?? (t.dpi ? t.dpi / 72 : 1.5), a = t.dpiX !== void 0 ? t.dpiX / 72 : n, i = t.dpiY !== void 0 ? t.dpiY / 72 : n, r = a, o = Math.max(1, Math.round(e.width * r)), s = Math.max(1, Math.round(e.height * r)), l = new Uint8Array(o * s * 4), c = t.background ?? { r: 1, g: 1, b: 1 }, f = t.transparent ? 0 : Math.round(c.r * 255), u = t.transparent ? 0 : Math.round(c.g * 255), d = t.transparent ? 0 : Math.round(c.b * 255), h = t.transparent ? 0 : 255;
|
|
15190
15210
|
for (let p = 0; p < o * s; p++) l[p * 4] = f, l[p * 4 + 1] = u, l[p * 4 + 2] = d, l[p * 4 + 3] = h;
|
|
15191
15211
|
let m = t.antialiasVector !== false, w = t.antialiasText !== false, v, A, b = /* @__PURE__ */ new Map();
|
|
15192
|
-
for (let p of
|
|
15212
|
+
for (let p of Qp(e)) {
|
|
15193
15213
|
if (p.kind === "glyph" && (p.value.renderMode === 3 || !p.value.outline && !p.value.unicode.trim())) continue;
|
|
15194
|
-
let x = p.kind === "glyph" ? { kind: "path", value:
|
|
15214
|
+
let x = p.kind === "glyph" ? { kind: "path", value: Op(p.value) } : p, B = p.value.clipPaths, C = B && B === v ? A : void 0;
|
|
15195
15215
|
if (B && !C) {
|
|
15196
15216
|
C = new Uint8Array(o * s * 4).fill(255);
|
|
15197
15217
|
for (let y of B) {
|
|
@@ -15311,7 +15331,7 @@ function vh(e, t, n) {
|
|
|
15311
15331
|
a = e.resolveDict(V(a, "Parent"));
|
|
15312
15332
|
}
|
|
15313
15333
|
}
|
|
15314
|
-
function
|
|
15334
|
+
function Rp(e, t = 0, n) {
|
|
15315
15335
|
let a = e instanceof Uint8Array ? Fc(e) : e, i = a.resolveDict(a.rootRef), r = W1(a, i ? V(i, "Pages") : void 0), o = r[t] ?? (t >= 1 ? r[t - 1] : void 0);
|
|
15316
15336
|
if (!o) throw new Error(`Page index ${t} out of bounds`);
|
|
15317
15337
|
let s = r.indexOf(o), l = new is(a, o.ref, o.dict, s), { cropRect: c, ...f } = n ?? {}, u = qs({ ...l.evaluateDisplayList({ hideAnnotations: n?.hideAnnotations }), rotation: 0 }, f);
|
|
@@ -15325,11 +15345,11 @@ function Qp(e, t = 0, n) {
|
|
|
15325
15345
|
let d = l.getRotation();
|
|
15326
15346
|
return (d === 90 || d === 180 || d === 270) && (u = z1(u, d)), c && (u = Qc(u, c)), u;
|
|
15327
15347
|
}
|
|
15328
|
-
function
|
|
15329
|
-
let a =
|
|
15348
|
+
function qp(e, t = 0, n) {
|
|
15349
|
+
let a = Rp(e, t, n);
|
|
15330
15350
|
return Y1(a.width, a.height, a.data);
|
|
15331
15351
|
}
|
|
15332
|
-
function
|
|
15352
|
+
function zp(e) {
|
|
15333
15353
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), a = [e.rootRef];
|
|
15334
15354
|
for (e.infoRef && a.push(e.infoRef), e.idArray && a.push(e.idArray); a.length > 0; ) {
|
|
15335
15355
|
let i = a.pop();
|
|
@@ -15343,7 +15363,7 @@ function qp(e) {
|
|
|
15343
15363
|
}
|
|
15344
15364
|
for (let i of e.objects.keys()) t.has(i) || e.objects.delete(i);
|
|
15345
15365
|
}
|
|
15346
|
-
function
|
|
15366
|
+
function Yp(e, t) {
|
|
15347
15367
|
let n = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), i = [], r = { CS: "ColorSpace", cs: "ColorSpace", gs: "ExtGState", SCN: "Pattern", scn: "Pattern", sh: "Shading" }, o = (l, c) => {
|
|
15348
15368
|
let f = e.resolve(l);
|
|
15349
15369
|
if (f?.kind !== "stream") return;
|
|
@@ -15595,7 +15615,7 @@ var Al = class Rc {
|
|
|
15595
15615
|
embedPng(t) {
|
|
15596
15616
|
let n;
|
|
15597
15617
|
try {
|
|
15598
|
-
n =
|
|
15618
|
+
n = Dp(t);
|
|
15599
15619
|
} catch (f) {
|
|
15600
15620
|
throw new fe("E_PARSE", f.message);
|
|
15601
15621
|
}
|
|
@@ -15706,31 +15726,31 @@ var Al = class Rc {
|
|
|
15706
15726
|
return bp(t, n, a);
|
|
15707
15727
|
}
|
|
15708
15728
|
save(t = {}) {
|
|
15709
|
-
if (this.syncPageTree(), this.cos.requiresFullRewrite && (
|
|
15729
|
+
if (this.syncPageTree(), this.cos.requiresFullRewrite && (Yp(this.cos, this.pages), zp(this.cos)), t.encrypt) return B5(this.cos, t.encrypt);
|
|
15710
15730
|
let n = [...this.cos.objects.values()].sort((a, i) => a.objectNumber - i.objectNumber);
|
|
15711
15731
|
return t.incremental && !this.cos.requiresFullRewrite && this.cos.bytes.length > 0 ? m5(this.cos.bytes, this.cos, n) : kc({ objects: n, rootRef: this.cos.rootRef, infoRef: this.cos.infoRef, idArray: this.cos.idArray, version: this.cos.version, normalizeContent: t.normalizeContent, objectStreams: t.objectStreams, linearize: t.linearize });
|
|
15712
15732
|
}
|
|
15713
15733
|
};
|
|
15714
|
-
function
|
|
15734
|
+
function jp(e) {
|
|
15715
15735
|
if (e.length < 5) return false;
|
|
15716
15736
|
let t = Math.min(e.length - 5, 1024);
|
|
15717
15737
|
for (let n = 0; n <= t; n++) if (e[n] === 37 && e[n + 1] === 80 && e[n + 2] === 68 && e[n + 3] === 70 && e[n + 4] === 45) return true;
|
|
15718
15738
|
return false;
|
|
15719
15739
|
}
|
|
15720
|
-
function
|
|
15740
|
+
function Wp(e) {
|
|
15721
15741
|
if (e.length < 5) return false;
|
|
15722
15742
|
let t = new TextDecoder("utf-8", { fatal: false }).decode(e.subarray(0, Math.min(e.length, 512))).trimStart();
|
|
15723
15743
|
return t.startsWith("<svg") || t.startsWith("<?xml") && t.includes("<svg");
|
|
15724
15744
|
}
|
|
15725
|
-
function
|
|
15745
|
+
function Np(e, t) {
|
|
15726
15746
|
let n = Al.load(e), a = Math.max(0, Math.min(n.pageCount - 1, t?.page ?? 0)), i = n.getPage(a), r = t?.density ?? 72, o = r / 72, s = Math.max(1, Math.round(i.width * o)), l = Math.max(1, Math.round(i.height * o));
|
|
15727
15747
|
return { format: "pdf", width: s, height: l, space: "srgb", channels: 4, depth: "uchar", density: r, hasAlpha: true, pages: n.pageCount, pagePrimary: a, size: e.byteLength };
|
|
15728
15748
|
}
|
|
15729
|
-
function
|
|
15730
|
-
let n = Al.load(e), a = Math.max(0, Math.min(n.pageCount - 1, t?.page ?? 0)), i = t?.density ?? 72, r = i / 72, o =
|
|
15749
|
+
function Zp(e, t) {
|
|
15750
|
+
let n = Al.load(e), a = Math.max(0, Math.min(n.pageCount - 1, t?.page ?? 0)), i = t?.density ?? 72, r = i / 72, o = qp(e, a, { scale: r });
|
|
15731
15751
|
return { ...Jc(o), format: "pdf", density: i, pages: n.pageCount };
|
|
15732
15752
|
}
|
|
15733
|
-
function
|
|
15753
|
+
function Jp(e) {
|
|
15734
15754
|
let t = Al.create(), n = Zh(e), a = t.embedPng(n);
|
|
15735
15755
|
return t.addPage([e.width, e.height]).drawImage(a, { x: 0, y: 0, width: e.width, height: e.height }), t.save();
|
|
15736
15756
|
}
|
|
@@ -15795,7 +15815,7 @@ function Z1(e, t) {
|
|
|
15795
15815
|
let l = t?.density ?? 72, c = l / 72, f = Math.max(1, Math.round(o * c)), u = Math.max(1, Math.round(s * c));
|
|
15796
15816
|
return { format: "svg", width: f, height: u, space: "srgb", channels: 4, depth: "uchar", density: l, hasAlpha: true, size: e.byteLength };
|
|
15797
15817
|
}
|
|
15798
|
-
function
|
|
15818
|
+
function _p(e, t) {
|
|
15799
15819
|
let n = Z1(e, t), { width: a, height: i, density: r } = n, o = new Uint8Array(a * i * 4), s = new TextDecoder().decode(e), c = /<svg\b[^>]*>/i.exec(s)?.[0] ?? "", f = Xe(c, "viewBox"), u = 0, d = 0, h = a / (r / 72), m = i / (r / 72);
|
|
15800
15820
|
if (f) {
|
|
15801
15821
|
let P = f.trim().split(/[\s,]+/).map(Number);
|
|
@@ -15945,13 +15965,13 @@ function Jp(e, t) {
|
|
|
15945
15965
|
}
|
|
15946
15966
|
return { width: a, height: i, data: o, format: "svg", space: "srgb", channels: 4, depth: "uchar", density: r, hasAlpha: true };
|
|
15947
15967
|
}
|
|
15948
|
-
var
|
|
15968
|
+
var $p = 1 / 0;
|
|
15949
15969
|
function _i(e, t, n) {
|
|
15950
|
-
let a = n?.limitInputPixels === false || n?.limitInputPixels === 0 || n?.unlimited === true && n?.limitInputPixels === void 0 ? 1 / 0 : typeof n?.limitInputPixels == "number" ? n.limitInputPixels :
|
|
15970
|
+
let a = n?.limitInputPixels === false || n?.limitInputPixels === 0 || n?.unlimited === true && n?.limitInputPixels === void 0 ? 1 / 0 : typeof n?.limitInputPixels == "number" ? n.limitInputPixels : $p;
|
|
15951
15971
|
if (e * t > a) throw new Error(`Input image exceeds pixel limit (${e}x${t} > ${a})`);
|
|
15952
15972
|
}
|
|
15953
15973
|
var bh = /* @__PURE__ */ new WeakMap();
|
|
15954
|
-
function
|
|
15974
|
+
function e4(e) {
|
|
15955
15975
|
if (Zc(e)) return "png";
|
|
15956
15976
|
if ($c(e)) return "jpeg";
|
|
15957
15977
|
if (s0(e)) return "webp";
|
|
@@ -15963,8 +15983,8 @@ function $p(e) {
|
|
|
15963
15983
|
}
|
|
15964
15984
|
if (Gg(e)) return "bmp";
|
|
15965
15985
|
if (Eg(e)) return "tiff";
|
|
15966
|
-
if (
|
|
15967
|
-
if (
|
|
15986
|
+
if (jp(e)) return "pdf";
|
|
15987
|
+
if (Wp(e)) return "svg";
|
|
15968
15988
|
throw new Error("Input buffer contains unsupported image format");
|
|
15969
15989
|
}
|
|
15970
15990
|
function J1(e, t) {
|
|
@@ -16007,7 +16027,7 @@ function J1(e, t) {
|
|
|
16007
16027
|
}
|
|
16008
16028
|
return { width: w, height: v, data: b, format: "raw", space: n ? "srgb" : "b-w", channels: n ? 4 : 1, depth: "uchar", density: A, hasAlpha: n, textAutofitDpi: A };
|
|
16009
16029
|
}
|
|
16010
|
-
function
|
|
16030
|
+
function t4(e, t) {
|
|
16011
16031
|
if (t?.text) {
|
|
16012
16032
|
let i = J1(t.text, t.density);
|
|
16013
16033
|
return { format: "raw", width: i.width, height: i.height, space: i.space, channels: i.channels, depth: "uchar", density: i.density, hasAlpha: i.hasAlpha, size: i.width * i.height * i.channels };
|
|
@@ -16023,7 +16043,7 @@ function e4(e, t) {
|
|
|
16023
16043
|
return { format: "raw", width: i, height: r, space: c === "ushort" || c === "short" || c === "uint" || c === "int" || c === "float" || c === "double" ? o < 3 ? "grey16" : "rgb16" : o < 3 ? "b-w" : "srgb", channels: o, depth: c, density: t.density ?? 72, hasAlpha: o === 2 || o === 4, ...s !== void 0 ? { pageHeight: s, pages: Math.max(1, Math.floor(r / s)) } : {}, size: e.byteLength };
|
|
16024
16044
|
}
|
|
16025
16045
|
if (!e || e.length === 0) throw new Error(e ? "Input buffer contains unsupported image format" : "Input file is missing:");
|
|
16026
|
-
let n =
|
|
16046
|
+
let n = e4(e), a;
|
|
16027
16047
|
switch (n) {
|
|
16028
16048
|
case "png":
|
|
16029
16049
|
a = Nh(e);
|
|
@@ -16056,7 +16076,7 @@ function e4(e, t) {
|
|
|
16056
16076
|
break;
|
|
16057
16077
|
}
|
|
16058
16078
|
case "pdf":
|
|
16059
|
-
a =
|
|
16079
|
+
a = Np(e, t);
|
|
16060
16080
|
break;
|
|
16061
16081
|
case "svg":
|
|
16062
16082
|
a = Z1(e, t);
|
|
@@ -16145,7 +16165,7 @@ function hr(e, t) {
|
|
|
16145
16165
|
let r = bh.get(e);
|
|
16146
16166
|
if (r) return _i(r.width, r.height, t), r;
|
|
16147
16167
|
}
|
|
16148
|
-
let a =
|
|
16168
|
+
let a = t4(e, t), i;
|
|
16149
16169
|
switch (a.format) {
|
|
16150
16170
|
case "png":
|
|
16151
16171
|
i = Jc(e);
|
|
@@ -16176,10 +16196,10 @@ function hr(e, t) {
|
|
|
16176
16196
|
i = u0(e);
|
|
16177
16197
|
break;
|
|
16178
16198
|
case "pdf":
|
|
16179
|
-
i =
|
|
16199
|
+
i = Zp(e, t);
|
|
16180
16200
|
break;
|
|
16181
16201
|
case "svg":
|
|
16182
|
-
i =
|
|
16202
|
+
i = _p(e, t);
|
|
16183
16203
|
break;
|
|
16184
16204
|
default:
|
|
16185
16205
|
throw new Error(`Unsupported format: ${a.format}`);
|
|
@@ -16220,7 +16240,7 @@ function hi(e, t) {
|
|
|
16220
16240
|
return { data: Kg(e, { density: t.density ?? e.density, ...a !== void 0 ? { orientation: a } : {} }), format: "tiff", channels: 4 };
|
|
16221
16241
|
}
|
|
16222
16242
|
case "pdf":
|
|
16223
|
-
return { data:
|
|
16243
|
+
return { data: Jp(e), format: "pdf", channels: e.hasAlpha ? 4 : 3 };
|
|
16224
16244
|
case "raw": {
|
|
16225
16245
|
let a, i = e.channels;
|
|
16226
16246
|
if (e.channels === 4) a = new Uint8Array(e.data), i = 4;
|
|
@@ -16291,7 +16311,7 @@ function zr(e) {
|
|
|
16291
16311
|
let t = Math.PI * e;
|
|
16292
16312
|
return Math.sin(t) / t;
|
|
16293
16313
|
}
|
|
16294
|
-
function
|
|
16314
|
+
function n4(e, t) {
|
|
16295
16315
|
let n = Math.abs(e);
|
|
16296
16316
|
switch (t) {
|
|
16297
16317
|
case "nearest":
|
|
@@ -16341,7 +16361,7 @@ function Yr(e, t, n, a, i, r, o = 3, s = false) {
|
|
|
16341
16361
|
}
|
|
16342
16362
|
return v;
|
|
16343
16363
|
}
|
|
16344
|
-
function
|
|
16364
|
+
function a4(e, t, n, a, i, r = 3, o = false) {
|
|
16345
16365
|
let s = 0, l = 0, c = t, f = n, u = Math.max(1, Math.max(Math.ceil((t - a) / 8), Math.ceil((n - i) / 8)));
|
|
16346
16366
|
for (; c > a || f > i; ) {
|
|
16347
16367
|
let d = Math.min(c - a, u), h = Math.min(f - i, u);
|
|
@@ -16356,7 +16376,7 @@ function n4(e, t, n, a, i, r = 3, o = false) {
|
|
|
16356
16376
|
}
|
|
16357
16377
|
return { x: s, y: l };
|
|
16358
16378
|
}
|
|
16359
|
-
function
|
|
16379
|
+
function i4(e, t, n, a, i, r = false) {
|
|
16360
16380
|
let o = 32 / t, s = 32 / n, l = _1(e, t, n, 32, 32, "lanczos3", o, s), c = new Float32Array(1024), f = new Float32Array(1024), u = new Float32Array(1024), d = (G) => {
|
|
16361
16381
|
let P = G / 255;
|
|
16362
16382
|
return P <= 0.04045 ? P / 12.92 : Math.pow((P + 0.055) / 1.055, 2.4);
|
|
@@ -16418,7 +16438,7 @@ function Xt(e, t, n) {
|
|
|
16418
16438
|
let i = e * t, r = 134217729 * e, o = r - (r - e), s = e - o, l = 134217729 * t, c = l - (l - t), f = t - c, u = o * c - i + o * f + s * c + s * f;
|
|
16419
16439
|
return i + n + u;
|
|
16420
16440
|
}
|
|
16421
|
-
function
|
|
16441
|
+
function r4(e, t, n, a, i, r) {
|
|
16422
16442
|
let o = i ?? 1 / (e / n), s = r ?? 1 / (t / a), l = Math.trunc(Xt(e, o, 0.5)), c = Math.trunc(Xt(t, s, 0.5)), f = Math.max(1, Math.floor(e / l / 2)), u = Math.max(1, Math.floor(t / c / 2)), d = e, h = t, m = 1, w = 1;
|
|
16423
16443
|
(f > 1 || u > 1) && (m = f, w = u, d = Math.floor(e / m), h = Math.floor(t / w), o *= m, s *= w), o = Math.max(o, 1 / d), s = Math.max(s, 1 / h);
|
|
16424
16444
|
let v = s, A = new Int32Array(a);
|
|
@@ -16468,16 +16488,16 @@ function i4(e, t, n, a, i, r) {
|
|
|
16468
16488
|
}
|
|
16469
16489
|
return { xs: g, ys: A };
|
|
16470
16490
|
}
|
|
16471
|
-
function
|
|
16491
|
+
function s4(e) {
|
|
16472
16492
|
let t = Math.round(e);
|
|
16473
16493
|
return Math.abs(e - t) === 0.5 ? t % 2 === 0 ? t : t - 1 : t;
|
|
16474
16494
|
}
|
|
16475
16495
|
function xh(e, t) {
|
|
16476
|
-
let a = 2 *
|
|
16496
|
+
let a = 2 * s4((t === "linear" || t === "bilinear" ? 1 : t === "lanczos3" ? 3 : 2) * e) + 1, i = new Int32Array(65 * a), r = new Float64Array(a);
|
|
16477
16497
|
for (let o = 0; o < 65; o++) {
|
|
16478
16498
|
let s = Math.fround(o * Math.fround(0.015625)), l = a * 0.5 + s - 1, c = 0;
|
|
16479
16499
|
for (let f = 0; f < a; f++) {
|
|
16480
|
-
let u = (f - l) / e, d =
|
|
16500
|
+
let u = (f - l) / e, d = n4(u, t);
|
|
16481
16501
|
r[f] = d, c += d;
|
|
16482
16502
|
}
|
|
16483
16503
|
for (let f = 0; f < a; f++) i[o * a + f] = Math.trunc(r[f] / c * 4096);
|
|
@@ -16492,7 +16512,7 @@ var Nn = (() => {
|
|
|
16492
16512
|
}
|
|
16493
16513
|
return e[256] = 0, e[257] = 0, e[258] = 4096, e[259] = 0, e;
|
|
16494
16514
|
})();
|
|
16495
|
-
function
|
|
16515
|
+
function o4(e, t, n, a) {
|
|
16496
16516
|
let i = Math.ceil(n / a), r = new Uint8Array(t * i * 4), o = a >> 1;
|
|
16497
16517
|
for (let s = 0; s < i; s++) for (let l = 0; l < t; l++) for (let c = 0; c < 4; c++) {
|
|
16498
16518
|
let f = 0;
|
|
@@ -16504,7 +16524,7 @@ function s4(e, t, n, a) {
|
|
|
16504
16524
|
}
|
|
16505
16525
|
return { data: r, h: i };
|
|
16506
16526
|
}
|
|
16507
|
-
function
|
|
16527
|
+
function c4(e, t, n, a) {
|
|
16508
16528
|
let i = Math.ceil(t / a), r = new Uint8Array(i * n * 4), o = a >> 1;
|
|
16509
16529
|
for (let s = 0; s < n; s++) for (let l = 0; l < i; l++) for (let c = 0; c < 4; c++) {
|
|
16510
16530
|
let f = 0;
|
|
@@ -16535,7 +16555,7 @@ function _1(e, t, n, a, i, r = "lanczos3", o, s, l = false) {
|
|
|
16535
16555
|
f = u;
|
|
16536
16556
|
}
|
|
16537
16557
|
if (r === "nearest") {
|
|
16538
|
-
let u = new Uint8Array(a * i * 4), { xs: d, ys: h } =
|
|
16558
|
+
let u = new Uint8Array(a * i * 4), { xs: d, ys: h } = r4(t, n, a, i, o, s);
|
|
16539
16559
|
for (let m = 0; m < i; m++) {
|
|
16540
16560
|
let w = h[m];
|
|
16541
16561
|
for (let v = 0; v < a; v++) {
|
|
@@ -16549,7 +16569,7 @@ function _1(e, t, n, a, i, r = "lanczos3", o, s, l = false) {
|
|
|
16549
16569
|
if (m < 1) {
|
|
16550
16570
|
let g = 1 / m, p = Xt(v, g, -d), x = Math.max(1, Math.floor(d / v / 2));
|
|
16551
16571
|
if (x > 1) {
|
|
16552
|
-
let B =
|
|
16572
|
+
let B = o4(f, u, d, x);
|
|
16553
16573
|
f = B.data, d = B.h, g /= x, p /= x;
|
|
16554
16574
|
}
|
|
16555
16575
|
if (g > 1) {
|
|
@@ -16574,7 +16594,7 @@ function _1(e, t, n, a, i, r = "lanczos3", o, s, l = false) {
|
|
|
16574
16594
|
if (h < 1) {
|
|
16575
16595
|
let g = 1 / h, p = Xt(w, g, -u), x = Math.max(1, Math.floor(u / w / 2));
|
|
16576
16596
|
if (x > 1) {
|
|
16577
|
-
let B =
|
|
16597
|
+
let B = c4(f, u, d, x);
|
|
16578
16598
|
f = B.data, u = B.w, g /= x, p /= x;
|
|
16579
16599
|
}
|
|
16580
16600
|
if (g > 1) {
|
|
@@ -16661,7 +16681,7 @@ function xl(e, t, n) {
|
|
|
16661
16681
|
t.withoutEnlargement && (m > a || w > i) && (m = Math.min(m, a), w = Math.min(w, i)), t.withoutReduction && (m < a || w < i) && (m = Math.max(m, a), w = Math.max(w, i));
|
|
16662
16682
|
let v = Math.min(u, m), A = Math.min(d, w);
|
|
16663
16683
|
if (v < u || A < d) {
|
|
16664
|
-
let b = typeof t.position == "string" ? t.position.toLowerCase() : t.position, g = b === "entropy" || b === 16 ?
|
|
16684
|
+
let b = typeof t.position == "string" ? t.position.toLowerCase() : t.position, g = b === "entropy" || b === 16 ? a4(h, u, d, v, A, e.channels, e.hasAlpha) : b === "attention" || b === 17 ? i4(h, u, d, v, A, e.hasAlpha) : Ah(u, d, v, A, t.position, true), p = new Uint8Array(v * A * 4);
|
|
16665
16685
|
for (let x = 0; x < A; x++) {
|
|
16666
16686
|
let B = ((g.y + x) * u + g.x) * 4;
|
|
16667
16687
|
p.set(h.subarray(B, B + v * 4), x * v * 4);
|
|
@@ -16702,7 +16722,7 @@ function e3(e) {
|
|
|
16702
16722
|
}
|
|
16703
16723
|
return { ...e, data: i };
|
|
16704
16724
|
}
|
|
16705
|
-
function
|
|
16725
|
+
function l4(e) {
|
|
16706
16726
|
let { width: t, height: n, data: a } = e, i = n, r = t, o = new Uint8Array(a.length);
|
|
16707
16727
|
for (let s = 0; s < n; s++) for (let l = 0; l < t; l++) {
|
|
16708
16728
|
let c = (s * t + l) * 4, f = n - 1 - s, d = (l * i + f) * 4;
|
|
@@ -16710,7 +16730,7 @@ function c4(e) {
|
|
|
16710
16730
|
}
|
|
16711
16731
|
return { ...e, width: i, height: r, data: o };
|
|
16712
16732
|
}
|
|
16713
|
-
function
|
|
16733
|
+
function f4(e) {
|
|
16714
16734
|
let { width: t, height: n, data: a } = e, i = new Uint8Array(a.length), r = t * n;
|
|
16715
16735
|
for (let o = 0; o < r; o++) {
|
|
16716
16736
|
let s = o * 4, l = (r - 1 - o) * 4;
|
|
@@ -16718,7 +16738,7 @@ function l4(e) {
|
|
|
16718
16738
|
}
|
|
16719
16739
|
return { ...e, data: i };
|
|
16720
16740
|
}
|
|
16721
|
-
function
|
|
16741
|
+
function d4(e) {
|
|
16722
16742
|
let { width: t, height: n, data: a } = e, i = n, r = t, o = new Uint8Array(a.length);
|
|
16723
16743
|
for (let s = 0; s < n; s++) for (let l = 0; l < t; l++) {
|
|
16724
16744
|
let c = (s * t + l) * 4, f = s, d = ((t - 1 - l) * i + f) * 4;
|
|
@@ -16730,11 +16750,11 @@ function t3(e, t, n = { r: 0, g: 0, b: 0, a: 255 }) {
|
|
|
16730
16750
|
let a = (t % 360 + 360) % 360;
|
|
16731
16751
|
if (Math.abs(a) < 1e-6) return e;
|
|
16732
16752
|
if (e.pages && e.pages > 1 && e.pageHeight && e.height === e.pages * e.pageHeight && Math.abs(a - 180) >= 1e-6) throw new Error("Rotate is not supported for multi-page images");
|
|
16733
|
-
if (Math.abs(a - 90) < 1e-6) return
|
|
16734
|
-
if (Math.abs(a - 180) < 1e-6) return
|
|
16735
|
-
if (Math.abs(a - 270) < 1e-6) return
|
|
16753
|
+
if (Math.abs(a - 90) < 1e-6) return l4(e);
|
|
16754
|
+
if (Math.abs(a - 180) < 1e-6) return f4(e);
|
|
16755
|
+
if (Math.abs(a - 270) < 1e-6) return d4(e);
|
|
16736
16756
|
let i = a * Math.PI / 180, r = Math.cos(i), o = Math.sin(i);
|
|
16737
|
-
return
|
|
16757
|
+
return g4(e, { matrix: [r, -o, o, r], background: n, interpolator: "bilinear" });
|
|
16738
16758
|
}
|
|
16739
16759
|
function n3(e, t) {
|
|
16740
16760
|
let n = Math.round(t.left), a = Math.round(t.top), i = Math.round(t.width), r = Math.round(t.height);
|
|
@@ -16795,21 +16815,21 @@ for (let e = 0; e <= 256; e++) {
|
|
|
16795
16815
|
let t = e / 255, n = t <= 31308e-7 ? 12.92 * t : 1.055 * Math.pow(t, 1 / 2.4) - 0.055;
|
|
16796
16816
|
ss[e] = Math.min(255, Math.max(0, Math.round(n * 255)));
|
|
16797
16817
|
}
|
|
16798
|
-
function
|
|
16818
|
+
function h4(e) {
|
|
16799
16819
|
if (e <= 0) return 0;
|
|
16800
16820
|
if (e >= 1) return 255;
|
|
16801
16821
|
let t = e * 255, n = t | 0, a = t - n;
|
|
16802
16822
|
return Math.round(ss[n] + (ss[n + 1] - ss[n]) * a);
|
|
16803
16823
|
}
|
|
16804
|
-
function
|
|
16824
|
+
function u4(e, t, n) {
|
|
16805
16825
|
if (e === t && t === n) return e;
|
|
16806
16826
|
let a = Math.fround(Math.fround(0.2126) * Math.fround(rs[e]) + Math.fround(0.7152) * Math.fround(rs[t]) + Math.fround(0.0722) * Math.fround(rs[n]));
|
|
16807
|
-
return
|
|
16827
|
+
return h4(a);
|
|
16808
16828
|
}
|
|
16809
16829
|
function a3(e) {
|
|
16810
16830
|
let t = new Uint8Array(e.data.length);
|
|
16811
16831
|
for (let n = 0; n < e.width * e.height; n++) {
|
|
16812
|
-
let a = n * 4, i =
|
|
16832
|
+
let a = n * 4, i = u4(e.data[a], e.data[a + 1], e.data[a + 2]);
|
|
16813
16833
|
t[a] = i, t[a + 1] = i, t[a + 2] = i, t[a + 3] = e.data[a + 3];
|
|
16814
16834
|
}
|
|
16815
16835
|
return { ...e, data: t, space: "b-w", channels: 1 };
|
|
@@ -16822,7 +16842,7 @@ function i3(e, t) {
|
|
|
16822
16842
|
}
|
|
16823
16843
|
return { ...e, data: n };
|
|
16824
16844
|
}
|
|
16825
|
-
function
|
|
16845
|
+
function g4(e, t) {
|
|
16826
16846
|
let [n, a, i, r] = t.matrix, o = t.idx ?? 0, s = t.idy ?? 0, l = t.odx ?? 0, c = t.ody ?? 0, f = n * r - a * i;
|
|
16827
16847
|
if (Math.abs(f) < 1e-8) return e;
|
|
16828
16848
|
let u = [[0, 0], [e.width, 0], [0, e.height], [e.width, e.height]], d = 1 / 0, h = -1 / 0, m = 1 / 0, w = -1 / 0;
|
|
@@ -16871,7 +16891,7 @@ function u4(e, t) {
|
|
|
16871
16891
|
let B = e.hasAlpha || t.background.a < 255;
|
|
16872
16892
|
return { ...e, width: v, height: A, data: p, hasAlpha: B, channels: B ? e.channels < 3 ? 2 : 4 : e.channels };
|
|
16873
16893
|
}
|
|
16874
|
-
function
|
|
16894
|
+
function m4(e = {}) {
|
|
16875
16895
|
return { maxInputBytes: 64 * 1024 * 1024, maxOutputBytes: 64 * 1024 * 1024, maxMemoryBytes: 96 * 1024 * 1024, maxFrames: 900, maxPixelsPerFrame: 1920 * 1080, maxDurationSeconds: 3600, maxStreams: 32, maxSamplesPerTrack: 2e5, maxConcatInputs: 128, maxBoxDepth: 32, maxCpuMs: 25e3, ...e };
|
|
16876
16896
|
}
|
|
16877
16897
|
var Kt = class extends Error {
|
|
@@ -16934,13 +16954,13 @@ var bt = class {
|
|
|
16934
16954
|
return { currentMemoryBytes: this.allocatedBytes, peakMemoryBytes: this.peakAllocatedBytes, decodedFrames: this.decodedFrames, elapsedMs: Date.now() - this.startTimeMs };
|
|
16935
16955
|
}
|
|
16936
16956
|
};
|
|
16937
|
-
var
|
|
16938
|
-
var
|
|
16957
|
+
var p4 = new TextDecoder("utf-8", { fatal: false });
|
|
16958
|
+
var w4 = new TextEncoder();
|
|
16939
16959
|
function Ke(e) {
|
|
16940
|
-
return
|
|
16960
|
+
return w4.encode(e);
|
|
16941
16961
|
}
|
|
16942
16962
|
function Ne(e) {
|
|
16943
|
-
return
|
|
16963
|
+
return p4.decode(e);
|
|
16944
16964
|
}
|
|
16945
16965
|
function $e(e, t = 0) {
|
|
16946
16966
|
return String.fromCharCode(e[t] ?? 32, e[t + 1] ?? 32, e[t + 2] ?? 32, e[t + 3] ?? 32);
|
|
@@ -17295,10 +17315,10 @@ function js(e, t, n, a, i) {
|
|
|
17295
17315
|
}
|
|
17296
17316
|
return r;
|
|
17297
17317
|
}
|
|
17298
|
-
var
|
|
17318
|
+
var v4 = { 66: "Baseline", 77: "Main", 88: "Extended", 100: "High", 110: "High 10", 122: "High 4:2:2", 244: "High 4:4:4 Predictive" };
|
|
17299
17319
|
var Cl = [[1, 1], [1, 1], [12, 11], [10, 11], [16, 11], [40, 33], [24, 11], [20, 11], [32, 11], [80, 33], [18, 11], [15, 11], [64, 33], [160, 99], [4, 3], [3, 2], [2, 1]];
|
|
17300
17320
|
var Rn = [96e3, 88200, 64e3, 48e3, 44100, 32e3, 24e3, 22050, 16e3, 12e3, 11025, 8e3, 7350];
|
|
17301
|
-
function
|
|
17321
|
+
function b4(e, t) {
|
|
17302
17322
|
let n = 8, a = 8;
|
|
17303
17323
|
for (let i = 0; i < t; i++) {
|
|
17304
17324
|
if (a !== 0) {
|
|
@@ -17312,7 +17332,7 @@ function ra(e) {
|
|
|
17312
17332
|
let t = yl(e), n = (t[0] & 31) === 7 ? 1 : 0, a = new ui(t, n * 8), i = a.readBits(8), r = a.readBits(8), o = a.readBits(8), s = a.readUE(), l = 1, c = 8, f = 8, u = 0;
|
|
17313
17333
|
if ((i === 100 || i === 110 || i === 122 || i === 244 || i === 44 || i === 83 || i === 86 || i === 118 || i === 128 || i === 138 || i === 139 || i === 134 || i === 135) && (l = a.readUE(), l === 3 && (u = a.readBit()), c = a.readUE() + 8, f = a.readUE() + 8, a.readBit(), a.readBit())) {
|
|
17314
17334
|
let U = l !== 3 ? 8 : 12;
|
|
17315
|
-
for (let K = 0; K < U; K++) a.readBit() &&
|
|
17335
|
+
for (let K = 0; K < U; K++) a.readBit() && b4(a, K < 6 ? 16 : 64);
|
|
17316
17336
|
}
|
|
17317
17337
|
a.readUE();
|
|
17318
17338
|
let d = a.readUE();
|
|
@@ -17339,7 +17359,7 @@ function ra(e) {
|
|
|
17339
17359
|
Q > 0 && J > 0 && (P = J / (2 * Q));
|
|
17340
17360
|
}
|
|
17341
17361
|
}
|
|
17342
|
-
let D =
|
|
17362
|
+
let D = v4[i] ?? `Profile ${i}`;
|
|
17343
17363
|
i === 66 && (r & 64) !== 0 && (D = "Constrained Baseline");
|
|
17344
17364
|
let X = l === 0 ? "gray" : l === 2 ? c > 8 ? "yuv422p10le" : "yuv422p" : l === 3 ? c > 8 ? "yuv444p10le" : "yuv444p" : c > 8 ? "yuv420p10le" : "yuv420p";
|
|
17345
17365
|
return { profileIdc: i, profileName: D, constraintFlags: r, levelIdc: o, spsId: s, chromaFormatIdc: l, pixFmt: X, bitDepthLuma: c, bitDepthChroma: f, width: H, height: M, codedWidth: B, codedHeight: C, sarWidth: E, sarHeight: G, fps: P, maxNumRefFrames: h };
|
|
@@ -17626,7 +17646,7 @@ function Js(e) {
|
|
|
17626
17646
|
}
|
|
17627
17647
|
return { frames: t, sampleRate: n, channels: a || 2, audioObjectType: i };
|
|
17628
17648
|
}
|
|
17629
|
-
var
|
|
17649
|
+
var A4 = /* @__PURE__ */ new Set(["moov", "trak", "edts", "mdia", "minf", "dinf", "stbl", "mvex", "moof", "traf", "mfra", "udta", "ilst", "sinf", "schi", "tref", "gmhd"]);
|
|
17630
17650
|
function g3(e) {
|
|
17631
17651
|
if (e.byteLength < 8) return false;
|
|
17632
17652
|
let t = $e(e, 4);
|
|
@@ -17647,7 +17667,7 @@ function Ga(e, t = 0, n = 0, a) {
|
|
|
17647
17667
|
let f;
|
|
17648
17668
|
l === "uuid" && c + 16 <= s && (f = e.subarray(r + c, r + c + 16), c += 16);
|
|
17649
17669
|
let u = e.subarray(r + c, r + s), d;
|
|
17650
|
-
if (
|
|
17670
|
+
if (A4.has(l)) d = Ga(u, t + r + c, n + 1, a);
|
|
17651
17671
|
else if (l === "meta" && u.byteLength >= 12) {
|
|
17652
17672
|
let h = $e(u, 8);
|
|
17653
17673
|
h === "hdlr" || h === "ilst" || h === "keys" || h === "free" ? d = Ga(u.subarray(4), t + r + c + 4, n + 1, a) : d = Ga(u, t + r + c, n + 1, a);
|
|
@@ -17662,7 +17682,7 @@ function Ve(e, t) {
|
|
|
17662
17682
|
function gr(e, t) {
|
|
17663
17683
|
return e ? e.filter((n) => n.type === t) : [];
|
|
17664
17684
|
}
|
|
17665
|
-
function
|
|
17685
|
+
function x4(e) {
|
|
17666
17686
|
let t = new Le(e);
|
|
17667
17687
|
if (t.remaining < 8) return [];
|
|
17668
17688
|
t.skip(4);
|
|
@@ -17714,7 +17734,7 @@ function A4(e) {
|
|
|
17714
17734
|
}
|
|
17715
17735
|
return a;
|
|
17716
17736
|
}
|
|
17717
|
-
function
|
|
17737
|
+
function B4(e) {
|
|
17718
17738
|
let t = Ve(e.children, "udta"), n = Ve(t?.children, "meta") ?? Ve(e.children, "meta"), a = Ve(n?.children, "ilst");
|
|
17719
17739
|
if (!a || !a.children) return {};
|
|
17720
17740
|
let i = { custom: {} };
|
|
@@ -17773,7 +17793,7 @@ function x4(e) {
|
|
|
17773
17793
|
}
|
|
17774
17794
|
return i;
|
|
17775
17795
|
}
|
|
17776
|
-
function
|
|
17796
|
+
function y4(e, t) {
|
|
17777
17797
|
let n = Ve(e.children, "udta"), a = Ve(n?.children, "chpl");
|
|
17778
17798
|
if (!a || a.payload.byteLength < 9) return [];
|
|
17779
17799
|
let i = new Le(a.payload);
|
|
@@ -17843,7 +17863,7 @@ function Mn(e, t = {}) {
|
|
|
17843
17863
|
let re = new Le(T.payload);
|
|
17844
17864
|
re.skip(8), z = re.readFourCC(), re.skip(12), j = re.readNullTerminatedString();
|
|
17845
17865
|
}
|
|
17846
|
-
let N = Ve(q?.children, "minf"), Y = Ve(N?.children, "stbl"), R = Ve(Y?.children, "stsd"), W = R ?
|
|
17866
|
+
let N = Ve(q?.children, "minf"), Y = Ve(N?.children, "stbl"), R = Ve(Y?.children, "stsd"), W = R ? x4(R.payload) : [], _ = W[0];
|
|
17847
17867
|
_?.width && !I && (I = _.width), _?.height && !D && (D = _.height);
|
|
17848
17868
|
let $ = z === "vide" ? "video" : z === "soun" ? "audio" : z === "sbtl" || z === "text" || z === "subp" ? "subtitle" : "data", ae = Ve(Y?.children, "stts"), Z = [];
|
|
17849
17869
|
if (ae && ae.payload.byteLength >= 8) {
|
|
@@ -17977,10 +17997,10 @@ function Mn(e, t = {}) {
|
|
|
17977
17997
|
k > x && (x = k);
|
|
17978
17998
|
}
|
|
17979
17999
|
n.checkDuration(x);
|
|
17980
|
-
let B = r === "qt " || s.includes("qt "), C =
|
|
18000
|
+
let B = r === "qt " || s.includes("qt "), C = B4(l), F = y4(l, x);
|
|
17981
18001
|
return { containerFormat: B ? "mov" : "mp4", majorBrand: r, minorVersion: o, compatibleBrands: s, timescale: h, duration: Math.round(x * h), durationSeconds: x, creationTime: w, modificationTime: v, isFragmented: f.length > 0, faststart: u, tracks: p, metadata: C, chapters: F.length > 0 ? F : void 0, boxes: a, byteLength: e.byteLength };
|
|
17982
18002
|
}
|
|
17983
|
-
function
|
|
18003
|
+
function k4(e, t, n) {
|
|
17984
18004
|
if (e.rawStsdEntryBytes && e.rawStsdEntryBytes.byteLength >= 86) return e.rawStsdEntryBytes;
|
|
17985
18005
|
let a = new Ce(256);
|
|
17986
18006
|
if (a.writeZeros(6), a.writeU16BE(1), a.writeU16BE(0), a.writeU16BE(0), a.writeZeros(12), a.writeU16BE(t), a.writeU16BE(n), a.writeU32BE(4718592), a.writeU32BE(4718592), a.writeU32BE(0), a.writeU16BE(1), a.writeZeros(32), a.writeU16BE(24), a.writeI16BE(-1), e.formatFourCC === "avc1" || e.codecName === "h264") {
|
|
@@ -17992,14 +18012,14 @@ function y4(e, t, n) {
|
|
|
17992
18012
|
} else e.hvcC ? a.writeBytes(Te("hvcC", e.hvcC.rawBytes)) : e.av1C ? a.writeBytes(Te("av1C", e.av1C.rawBytes)) : e.vpcC && a.writeBytes(Te("vpcC", e.vpcC.rawBytes));
|
|
17993
18013
|
return Te(e.formatFourCC || "avc1", a.toUint8Array());
|
|
17994
18014
|
}
|
|
17995
|
-
function
|
|
18015
|
+
function C4(e) {
|
|
17996
18016
|
if (e.rawStsdEntryBytes) return e.rawStsdEntryBytes;
|
|
17997
18017
|
let t = new Ce(16);
|
|
17998
18018
|
t.writeU16BE(1), t.writeU16BE(1), t.writeU8(5), t.writeBytes(new TextEncoder().encode("Serif"));
|
|
17999
18019
|
let n = Te("ftab", t.toUint8Array()), a = new Ce(38 + n.byteLength);
|
|
18000
18020
|
return a.writeZeros(6), a.writeU16BE(1), a.writeU32BE(0), a.writeU8(1), a.writeU8(255), a.writeU32BE(255), a.writeU16BE(0), a.writeU16BE(0), a.writeU16BE(0), a.writeU16BE(0), a.writeU16BE(0), a.writeU16BE(0), a.writeU16BE(1), a.writeU8(0), a.writeU8(16), a.writeU32BE(4294967295), a.writeBytes(n), Te("tx3g", a.toUint8Array());
|
|
18001
18021
|
}
|
|
18002
|
-
function
|
|
18022
|
+
function F4(e) {
|
|
18003
18023
|
if (e.rawStsdEntryBytes && e.rawStsdEntryBytes.byteLength >= 36) return e.rawStsdEntryBytes;
|
|
18004
18024
|
let t = e.sampleRate ?? 44100, n = e.channels ?? 2, a = e.bitsPerSample ?? 16, i = new Ce(128);
|
|
18005
18025
|
if (i.writeZeros(6), i.writeU16BE(1), i.writeU16BE(0), i.writeZeros(6), i.writeU16BE(n), i.writeU16BE(a), i.writeU16BE(0), i.writeU16BE(0), i.writeU32BE(Math.min(65535, t) << 16 >>> 0), e.formatFourCC === "mp4a" || e.codecName === "aac") {
|
|
@@ -18014,7 +18034,7 @@ function Pn(e, t) {
|
|
|
18014
18034
|
let i = Te("data", a.toUint8Array());
|
|
18015
18035
|
return Te(e, i);
|
|
18016
18036
|
}
|
|
18017
|
-
function
|
|
18037
|
+
function H4(e, t) {
|
|
18018
18038
|
let n = [];
|
|
18019
18039
|
if (t && t.length > 0) {
|
|
18020
18040
|
let i = new Ce(16 + t.length * 64);
|
|
@@ -18101,7 +18121,7 @@ function _s(e, t, n, a = false) {
|
|
|
18101
18121
|
let b = Je("url ", 0, 1, new Uint8Array(0)), g = new Ce(4 + b.byteLength);
|
|
18102
18122
|
g.writeU32BE(1), g.writeBytes(b);
|
|
18103
18123
|
let p = Te("dinf", Je("dref", 0, 0, g.toUint8Array())), x = [];
|
|
18104
|
-
for (let T of o) e.type === "video" ? x.push(
|
|
18124
|
+
for (let T of o) e.type === "video" ? x.push(k4(T, e.width ?? T.width ?? 320, e.height ?? T.height ?? 240)) : e.type === "audio" ? x.push(F4(T)) : e.type === "subtitle" ? x.push(C4(T)) : T.rawStsdEntryBytes && x.push(T.rawStsdEntryBytes);
|
|
18105
18125
|
let B = new Ce(64);
|
|
18106
18126
|
B.writeU32BE(x.length);
|
|
18107
18127
|
for (let T of x) B.writeBytes(T);
|
|
@@ -18175,7 +18195,7 @@ function Fl(e, t = {}) {
|
|
|
18175
18195
|
d.writeU32BE(0), d.writeU32BE(0), d.writeU32BE(l), d.writeU32BE(t.fragmented ? 0 : u), d.writeFixed16_16(1), d.writeFixed8_8(1), d.writeZeros(10);
|
|
18176
18196
|
for (let G of mi) d.writeI32BE(G);
|
|
18177
18197
|
d.writeZeros(24), d.writeU32BE(e.tracks.length + 1);
|
|
18178
|
-
let h = Je("mvhd", 0, 0, d.toUint8Array()), m = { ...e.metadata, ...t.metadata ?? {} }, w =
|
|
18198
|
+
let h = Je("mvhd", 0, 0, d.toUint8Array()), m = { ...e.metadata, ...t.metadata ?? {} }, w = H4(m, e.chapters);
|
|
18179
18199
|
if (t.fragmented) {
|
|
18180
18200
|
let G = c.map((T) => _s({ ...T.track, samples: T.samples, codecDescriptions: T.codecDescriptions }, l, [], true)), P = c.map((T) => {
|
|
18181
18201
|
let z = new Ce(20);
|
|
@@ -18355,11 +18375,11 @@ function pr(e, t = {}) {
|
|
|
18355
18375
|
let r = t.shortest ? n.map((o) => Oe({ ...a, tracks: [o] }, { startSeconds: 0, endSeconds: i }).tracks[0]) : n;
|
|
18356
18376
|
return { ...a, faststart: t.faststart ?? a.faststart ?? true, duration: Math.round(i * (a.timescale || 1e3)), durationSeconds: i, tracks: r, chapters: e.flatMap((o) => o.chapters ?? []), metadata: Object.assign({}, ...e.map((o) => o.metadata), t.metadata ?? {}) };
|
|
18357
18377
|
}
|
|
18358
|
-
var
|
|
18378
|
+
var P4 = { h264: "H.264 / AVC / MPEG-4 AVC / MPEG-4 part 10", hevc: "H.265 / HEVC (High Efficiency Video Coding)", av1: "Alliance for Open Media AV1", vp8: "On2 VP8", vp9: "Google VP9", mpeg4: "MPEG-4 part 2", mjpeg: "Motion JPEG", png: "PNG (Portable Network Graphics) image", gif: "GIF (Graphics Interchange Format)", webp: "WebP image", rawvideo: "raw video", aac: "AAC (Advanced Audio Coding)", mp3: "MP3 (MPEG audio layer 3)", opus: "Opus (Opus Interactive Audio Codec)", vorbis: "Vorbis", flac: "FLAC (Free Lossless Audio Codec)", alac: "ALAC (Apple Lossless Audio Codec)", pcm_s16le: "PCM signed 16-bit little-endian", pcm_s16be: "PCM signed 16-bit big-endian", mov_text: "3GPP Timed Text subtitle", webvtt: "WebVTT subtitle", subrip: "SubRip subtitle" };
|
|
18359
18379
|
function lt(e, t, n = "input.mp4", a = {}) {
|
|
18360
18380
|
let i = [], r = [], o = [];
|
|
18361
18381
|
for (let c = 0; c < e.tracks.length; c++) {
|
|
18362
|
-
let f = e.tracks[c], u = mr(f), d = u.codecDescriptions[0], h = d?.codecName ?? (f.type === "video" ? "h264" : "aac"), m =
|
|
18382
|
+
let f = e.tracks[c], u = mr(f), d = u.codecDescriptions[0], h = d?.codecName ?? (f.type === "video" ? "h264" : "aac"), m = P4[h] ?? h, w = d?.formatFourCC ?? (f.type === "video" ? "avc1" : "mp4a"), v = "0x" + Array.from(w.padEnd(4, " ").slice(0, 4)).map((M) => M.charCodeAt(0).toString(16).padStart(2, "0")).join(""), A = f.duration / Math.max(1, f.timescale), b = u.samples.reduce((M, E) => M + E.size, 0), g = A > 0 ? String(Math.round(b * 8 / A)) : "0", p = u.samples.length, x = A > 0 ? Math.round(p / A * 1e3) : 3e4, B = kl(x, 1e3), C = f.type === "video" ? `${x / B}/${1e3 / B}` : "0/0", F = f.width ?? d?.width, y = f.height ?? d?.height, k = F && y ? kl(F, y) : 1, H = { language: f.language || "und" };
|
|
18363
18383
|
if (f.handlerName && (H.handler_name = f.handlerName), f.rotation && (H.rotate = String(f.rotation)), i.push({ index: c, id: `0x${f.id.toString(16)}`, codec_name: h, codec_long_name: m, profile: d?.profile, codec_type: f.type, codec_tag_string: w, codec_tag: v, width: F, height: y, coded_width: F ? Math.ceil(F / 16) * 16 : void 0, coded_height: y ? Math.ceil(y / 16) * 16 : void 0, has_b_frames: u.samples.some((M) => M.cts !== 0) ? 1 : 0, sample_aspect_ratio: f.type === "video" ? `${d?.sarWidth ?? 1}:${d?.sarHeight ?? 1}` : void 0, display_aspect_ratio: f.type === "video" && F && y ? `${F / k}:${y / k}` : void 0, pix_fmt: f.type === "video" ? d?.pixFmt ?? "yuv420p" : void 0, level: d?.level, color_range: f.type === "video" ? "tv" : void 0, color_space: f.type === "video" ? "bt709" : void 0, sample_fmt: f.type === "audio" ? "fltp" : void 0, sample_rate: f.type === "audio" ? String(d?.sampleRate ?? f.timescale) : void 0, channels: f.type === "audio" ? d?.channels ?? 2 : void 0, channel_layout: f.type === "audio" ? (d?.channels ?? 2) === 1 ? "mono" : "stereo" : void 0, bits_per_sample: f.type === "audio" ? d?.bitsPerSample ?? 16 : void 0, r_frame_rate: C, avg_frame_rate: C, time_base: `1/${f.timescale}`, start_pts: u.samples[0]?.pts ?? 0, start_time: ((u.samples[0]?.pts ?? 0) / Math.max(1, f.timescale)).toFixed(6), duration_ts: f.duration, duration: A.toFixed(6), bit_rate: g, nb_frames: String(p), disposition: { default: f.enabled ? 1 : 0, dub: 0, original: 0, comment: 0, lyrics: 0, karaoke: 0, forced: 0, hearing_impaired: 0, visual_impaired: 0, clean_effects: 0, attached_pic: 0, timed_thumbnails: 0 }, tags: H, side_data_list: f.rotation ? [{ side_data_type: "Display Matrix", rotation: -f.rotation }] : void 0 }), a.showPackets || a.showFrames) {
|
|
18364
18384
|
let M = 0;
|
|
18365
18385
|
for (let E of u.samples) {
|
|
@@ -18449,14 +18469,14 @@ function It(e, t, n) {
|
|
|
18449
18469
|
for (let s = 1; s < i; s++) o = o * 256 + e[t + s];
|
|
18450
18470
|
return { value: o, length: i };
|
|
18451
18471
|
}
|
|
18452
|
-
function
|
|
18472
|
+
function M4(e) {
|
|
18453
18473
|
return e < 127 ? new Uint8Array([128 | e]) : e < 16383 ? new Uint8Array([64 | e >>> 8 & 63, e & 255]) : e < 2097151 ? new Uint8Array([32 | e >>> 16 & 31, e >>> 8 & 255, e & 255]) : new Uint8Array([16 | e >>> 24 & 15, e >>> 16 & 255, e >>> 8 & 255, e & 255]);
|
|
18454
18474
|
}
|
|
18455
|
-
function
|
|
18475
|
+
function G4(e) {
|
|
18456
18476
|
return e <= 255 ? new Uint8Array([e]) : e <= 65535 ? new Uint8Array([e >>> 8 & 255, e & 255]) : e <= 16777215 ? new Uint8Array([e >>> 16 & 255, e >>> 8 & 255, e & 255]) : new Uint8Array([e >>> 24 & 255, e >>> 16 & 255, e >>> 8 & 255, e & 255]);
|
|
18457
18477
|
}
|
|
18458
18478
|
function ft(e, t) {
|
|
18459
|
-
let n =
|
|
18479
|
+
let n = G4(e), a = M4(t.byteLength);
|
|
18460
18480
|
return He([n, a, t]);
|
|
18461
18481
|
}
|
|
18462
18482
|
function Ht(e, t) {
|
|
@@ -18877,7 +18897,7 @@ function P3(e, t = {}) {
|
|
|
18877
18897
|
}
|
|
18878
18898
|
return { containerFormat: "mpegts", timescale: 9e4, duration: Math.round(d * 9e4), durationSeconds: d, tracks: f, metadata: {}, byteLength: e.byteLength };
|
|
18879
18899
|
}
|
|
18880
|
-
function
|
|
18900
|
+
function E4(e, t = {}) {
|
|
18881
18901
|
let n = [], a = /* @__PURE__ */ new Map(), i = (B) => {
|
|
18882
18902
|
let C = a.get(B) ?? 0;
|
|
18883
18903
|
return a.set(B, C + 1 & 15), C;
|
|
@@ -18937,7 +18957,7 @@ function G4(e, t = {}) {
|
|
|
18937
18957
|
}
|
|
18938
18958
|
return He(n);
|
|
18939
18959
|
}
|
|
18940
|
-
function
|
|
18960
|
+
function D4(e, t = {}) {
|
|
18941
18961
|
let n = P3(e, t);
|
|
18942
18962
|
return lt(n, e.byteLength, t.filename ?? "input.ts", { ...t, formatName: "mpegts", formatLongName: "MPEG-TS (MPEG-2 Transport Stream)" });
|
|
18943
18963
|
}
|
|
@@ -18952,9 +18972,9 @@ function M3() {
|
|
|
18952
18972
|
}, parse(e, t) {
|
|
18953
18973
|
return P3(e, t);
|
|
18954
18974
|
}, serialize(e, t) {
|
|
18955
|
-
return G4(e, t);
|
|
18956
|
-
}, probe(e, t) {
|
|
18957
18975
|
return E4(e, t);
|
|
18976
|
+
}, probe(e, t) {
|
|
18977
|
+
return D4(e, t);
|
|
18958
18978
|
}, concat(e, t) {
|
|
18959
18979
|
return Ye(e, t);
|
|
18960
18980
|
}, slice(e, t) {
|
|
@@ -19069,7 +19089,7 @@ function $s(e, t) {
|
|
|
19069
19089
|
let a = He([n, ...t]);
|
|
19070
19090
|
return Gn("LIST", a);
|
|
19071
19091
|
}
|
|
19072
|
-
function
|
|
19092
|
+
function I4(e, t = {}) {
|
|
19073
19093
|
let n = e.tracks.find((F) => F.type === "video"), a = e.tracks.find((F) => F.type === "audio"), i = n?.width ?? 320, r = n?.height ?? 240, o = n?.samples ?? [];
|
|
19074
19094
|
o.length === 0 && n?.decodedVideoFrames?.length && (o = n.decodedVideoFrames.map((F, y) => {
|
|
19075
19095
|
let k = zn(F.data, i, r, y);
|
|
@@ -19105,7 +19125,7 @@ function D4(e, t = {}) {
|
|
|
19105
19125
|
let x = $s("movi", d), B = Gn("idx1", h.toUint8Array()), C = He([Ke("AVI "), u, x, B]);
|
|
19106
19126
|
return Gn("RIFF", C);
|
|
19107
19127
|
}
|
|
19108
|
-
function
|
|
19128
|
+
function S4(e, t = {}) {
|
|
19109
19129
|
let n = G3(e, t);
|
|
19110
19130
|
return lt(n, e.byteLength, t.filename ?? "input.avi", { ...t, formatName: "avi", formatLongName: "AVI (Audio Video Interleaved)" });
|
|
19111
19131
|
}
|
|
@@ -19115,9 +19135,9 @@ function E3() {
|
|
|
19115
19135
|
}, parse(e, t) {
|
|
19116
19136
|
return G3(e, t);
|
|
19117
19137
|
}, serialize(e, t) {
|
|
19118
|
-
return D4(e, t);
|
|
19119
|
-
}, probe(e, t) {
|
|
19120
19138
|
return I4(e, t);
|
|
19139
|
+
}, probe(e, t) {
|
|
19140
|
+
return S4(e, t);
|
|
19121
19141
|
}, concat(e, t) {
|
|
19122
19142
|
return Ye(e, t);
|
|
19123
19143
|
}, slice(e, t) {
|
|
@@ -19171,7 +19191,7 @@ function D3(e, t = {}) {
|
|
|
19171
19191
|
}
|
|
19172
19192
|
return { containerFormat: "flv", timescale: 1e3, duration: Math.round(d * 1e3), durationSeconds: d, tracks: u, metadata: {}, byteLength: e.byteLength };
|
|
19173
19193
|
}
|
|
19174
|
-
function
|
|
19194
|
+
function T4(e, t = {}) {
|
|
19175
19195
|
let n = e.tracks.find((o) => o.type === "video"), a = e.tracks.find((o) => o.type === "audio"), i = new Ce(4096);
|
|
19176
19196
|
i.writeU8(70), i.writeU8(76), i.writeU8(86), i.writeU8(1), i.writeU8((n ? 1 : 0) | (a ? 4 : 0)), i.writeU32BE(9), i.writeU32BE(0);
|
|
19177
19197
|
let r = (o, s, l) => {
|
|
@@ -19206,7 +19226,7 @@ function S4(e, t = {}) {
|
|
|
19206
19226
|
}
|
|
19207
19227
|
return i.toUint8Array();
|
|
19208
19228
|
}
|
|
19209
|
-
function
|
|
19229
|
+
function X4(e, t = {}) {
|
|
19210
19230
|
let n = D3(e, t);
|
|
19211
19231
|
return lt(n, e.byteLength, t.filename ?? "input.flv", { ...t, formatName: "flv", formatLongName: "FLV (Flash Video)" });
|
|
19212
19232
|
}
|
|
@@ -19216,9 +19236,9 @@ function I3() {
|
|
|
19216
19236
|
}, parse(e, t) {
|
|
19217
19237
|
return D3(e, t);
|
|
19218
19238
|
}, serialize(e, t) {
|
|
19219
|
-
return S4(e, t);
|
|
19220
|
-
}, probe(e, t) {
|
|
19221
19239
|
return T4(e, t);
|
|
19240
|
+
}, probe(e, t) {
|
|
19241
|
+
return X4(e, t);
|
|
19222
19242
|
}, concat(e, t) {
|
|
19223
19243
|
return Ye(e, t);
|
|
19224
19244
|
}, slice(e, t) {
|
|
@@ -19261,7 +19281,7 @@ function S3(e) {
|
|
|
19261
19281
|
let v = 9e4, A = Math.max(1, Math.round(v / s)), b = h.map((g, p) => ({ data: g.data, dts: p * A, pts: p * A, cts: 0, duration: A, size: d, isKeyframe: true, sampleDescriptionIndex: 1 }));
|
|
19262
19282
|
return { containerFormat: "yuv4mpegpipe", timescale: 1e3, duration: Math.round(h.length / s * 1e3), durationSeconds: h.length / s, tracks: [{ id: 1, type: "video", handlerType: "vide", timescale: v, duration: h.length * A, language: "und", enabled: true, width: a, height: i, codecDescriptions: [{ formatFourCC: "raw ", codecName: "rawvideo", width: a, height: i, pixFmt: "yuv420p" }], samples: b, decodedVideoFrames: h }], metadata: {}, byteLength: e.byteLength };
|
|
19263
19283
|
}
|
|
19264
|
-
function
|
|
19284
|
+
function U4(e) {
|
|
19265
19285
|
let { frames: t, width: n, height: a, fps: i } = Il(e), r = Ke(`YUV4MPEG2 W${n} H${a} F${i}:1 Ip A1:1 C420jpeg
|
|
19266
19286
|
`), o = Ke(`FRAME
|
|
19267
19287
|
`), s = [r];
|
|
@@ -19271,13 +19291,13 @@ function X4(e) {
|
|
|
19271
19291
|
}
|
|
19272
19292
|
return He(s);
|
|
19273
19293
|
}
|
|
19274
|
-
function
|
|
19294
|
+
function L4() {
|
|
19275
19295
|
return { id: "y4m", formatName: "yuv4mpegpipe", formatLongName: "YUV4MPEG pipe", extensions: ["y4m"], mimeTypes: ["video/x-yuv4mpeg"], canDemux: true, canMux: true, supportedVideoCodecs: ["rawvideo"], supportedAudioCodecs: [], detect(e, t) {
|
|
19276
19296
|
return El(e) ? true : t && t.toLowerCase().endsWith(".y4m") ? El(e) : false;
|
|
19277
19297
|
}, parse(e) {
|
|
19278
19298
|
return S3(e);
|
|
19279
19299
|
}, serialize(e) {
|
|
19280
|
-
return
|
|
19300
|
+
return U4(e);
|
|
19281
19301
|
}, probe(e, t) {
|
|
19282
19302
|
let n = S3(e);
|
|
19283
19303
|
return lt(n, e.byteLength, t?.filename ?? "input.y4m", { ...t, formatName: "yuv4mpegpipe", formatLongName: "YUV4MPEG pipe" });
|
|
@@ -19287,24 +19307,24 @@ function U4() {
|
|
|
19287
19307
|
return Oe(e, t);
|
|
19288
19308
|
} };
|
|
19289
19309
|
}
|
|
19290
|
-
function
|
|
19310
|
+
function K4(e) {
|
|
19291
19311
|
return e.byteLength >= 7 && e[0] === 255 && (e[1] & 246) === 240;
|
|
19292
19312
|
}
|
|
19293
19313
|
function T3(e) {
|
|
19294
19314
|
let t = Js(e), n = t.sampleRate || 44100, a = t.channels || 2, i = t.frames.map((s, l) => ({ data: s, dts: l * 1024, pts: l * 1024, cts: 0, duration: 1024, size: s.byteLength, isKeyframe: true, sampleDescriptionIndex: 1 })), r = tn(n, a, t.audioObjectType || 2), o = i.length * 1024 / n;
|
|
19295
19315
|
return { containerFormat: "aac", timescale: n, duration: i.length * 1024, durationSeconds: o, tracks: [{ id: 1, type: "audio", handlerType: "soun", timescale: n, duration: i.length * 1024, language: "und", enabled: true, codecDescriptions: [{ formatFourCC: "mp4a", codecName: "aac", profile: "LC", sampleRate: n, channels: a, bitsPerSample: 16, esds: { objectTypeIndication: 64, audioObjectType: 2, sampleRate: n, channelCount: a, maxBitrate: 128e3, avgBitrate: 128e3, decoderSpecificInfo: r, rawEsdsBytes: qn(n, a, 128e3, r).subarray(8) } }], samples: i }], metadata: {}, byteLength: e.byteLength };
|
|
19296
19316
|
}
|
|
19297
|
-
function
|
|
19317
|
+
function V4(e) {
|
|
19298
19318
|
let t = e.tracks.find((o) => o.type === "audio"), n = t?.codecDescriptions[0]?.sampleRate ?? 44100, a = t?.codecDescriptions[0]?.channels ?? 2, r = (t && t.samples.length > 0 ? t.samples : [{ data: hn(a), dts: 0, pts: 0, cts: 0, duration: 1024, size: 6, isKeyframe: true, sampleDescriptionIndex: 1 }]).map((o) => o.data.byteLength >= 7 && o.data[0] === 255 && (o.data[1] & 240) === 240 ? o.data : Zs(o.data, n, a));
|
|
19299
19319
|
return He(r);
|
|
19300
19320
|
}
|
|
19301
|
-
function
|
|
19321
|
+
function O4() {
|
|
19302
19322
|
return { id: "aac", formatName: "aac", formatLongName: "raw ADTS AAC (Advanced Audio Coding)", extensions: ["aac"], mimeTypes: ["audio/aac", "audio/x-hx-aac-adts"], canDemux: true, canMux: true, supportedVideoCodecs: [], supportedAudioCodecs: ["aac"], detect(e, t) {
|
|
19303
|
-
return
|
|
19323
|
+
return K4(e) ? true : t && t.toLowerCase().endsWith(".aac") ? e.byteLength >= 7 : false;
|
|
19304
19324
|
}, parse(e) {
|
|
19305
19325
|
return T3(e);
|
|
19306
19326
|
}, serialize(e) {
|
|
19307
|
-
return
|
|
19327
|
+
return V4(e);
|
|
19308
19328
|
}, probe(e, t) {
|
|
19309
19329
|
let n = T3(e);
|
|
19310
19330
|
return lt(n, e.byteLength, t?.filename ?? "input.aac", { ...t, formatName: "aac", formatLongName: "raw ADTS AAC (Advanced Audio Coding)" });
|
|
@@ -19337,7 +19357,7 @@ function X3(e) {
|
|
|
19337
19357
|
let h = l / Math.max(1, a);
|
|
19338
19358
|
return { containerFormat: "wav", timescale: a, duration: l, durationSeconds: h, tracks: [{ id: 1, type: "audio", handlerType: "soun", timescale: a, duration: l, language: "und", enabled: true, codecDescriptions: [{ formatFourCC: "sowt", codecName: "pcm_s16le", sampleRate: a, channels: n, bitsPerSample: i }], samples: u, decodedAudio: { sampleRate: a, channels: n, channelData: c } }], metadata: {}, byteLength: e.byteLength };
|
|
19339
19359
|
}
|
|
19340
|
-
function
|
|
19360
|
+
function Q4(e) {
|
|
19341
19361
|
let t = e.tracks.find((s) => s.type === "audio"), n = t?.codecDescriptions[0]?.sampleRate ?? t?.timescale ?? 44100, a = t?.codecDescriptions[0]?.channels ?? 2, i = 16, r;
|
|
19342
19362
|
if (t?.decodedAudio) {
|
|
19343
19363
|
let s = t.decodedAudio.channelData, l = s[0]?.length ?? Math.round(e.durationSeconds * n);
|
|
@@ -19355,13 +19375,13 @@ function O4(e) {
|
|
|
19355
19375
|
let o = new Ce(44 + r.byteLength);
|
|
19356
19376
|
return o.writeFourCC("RIFF"), o.writeU32LE(36 + r.byteLength), o.writeFourCC("WAVE"), o.writeFourCC("fmt "), o.writeU32LE(16), o.writeU16LE(1), o.writeU16LE(a), o.writeU32LE(n), o.writeU32LE(n * a * (i >>> 3)), o.writeU16LE(a * (i >>> 3)), o.writeU16LE(i), o.writeFourCC("data"), o.writeU32LE(r.byteLength), o.writeBytes(r), o.toUint8Array();
|
|
19357
19377
|
}
|
|
19358
|
-
function
|
|
19378
|
+
function R4() {
|
|
19359
19379
|
return { id: "wav", formatName: "wav", formatLongName: "WAV / WAVE (Waveform Audio)", extensions: ["wav", "wave"], mimeTypes: ["audio/wav", "audio/x-wav"], canDemux: true, canMux: true, supportedVideoCodecs: [], supportedAudioCodecs: ["pcm_s16le", "pcm_u8"], detect(e, t) {
|
|
19360
19380
|
return Dl(e) ? true : t && t.toLowerCase().endsWith(".wav") ? Dl(e) : false;
|
|
19361
19381
|
}, parse(e) {
|
|
19362
19382
|
return X3(e);
|
|
19363
19383
|
}, serialize(e) {
|
|
19364
|
-
return
|
|
19384
|
+
return Q4(e);
|
|
19365
19385
|
}, probe(e, t) {
|
|
19366
19386
|
let n = X3(e);
|
|
19367
19387
|
return lt(n, e.byteLength, t?.filename ?? "input.wav", { ...t, formatName: "wav", formatLongName: "WAV / WAVE (Waveform Audio)" });
|
|
@@ -19371,12 +19391,12 @@ function Q4() {
|
|
|
19371
19391
|
return Oe(e, t);
|
|
19372
19392
|
} };
|
|
19373
19393
|
}
|
|
19374
|
-
function
|
|
19394
|
+
function q4(e) {
|
|
19375
19395
|
return e.byteLength < 4 ? false : e[0] === 73 && e[1] === 68 && e[2] === 51 ? true : e[0] === 255 && (e[1] & 224) === 224 && (e[1] & 6) !== 0;
|
|
19376
19396
|
}
|
|
19377
|
-
function
|
|
19397
|
+
function z4() {
|
|
19378
19398
|
return { id: "mp3", formatName: "mp3", formatLongName: "MP2/3 (MPEG audio layer 2/3)", extensions: ["mp3"], mimeTypes: ["audio/mpeg"], canDemux: true, canMux: true, supportedVideoCodecs: [], supportedAudioCodecs: ["mp3"], detect(e, t) {
|
|
19379
|
-
return !!(
|
|
19399
|
+
return !!(q4(e) || t && t.toLowerCase().endsWith(".mp3") && e.byteLength >= 4);
|
|
19380
19400
|
}, parse(e) {
|
|
19381
19401
|
let a = Math.max(1, Math.floor(e.byteLength / 417)), i = [];
|
|
19382
19402
|
for (let r = 0; r < a; r++) {
|
|
@@ -19396,7 +19416,7 @@ function q4() {
|
|
|
19396
19416
|
return Oe(e, t);
|
|
19397
19417
|
} };
|
|
19398
19418
|
}
|
|
19399
|
-
function
|
|
19419
|
+
function Y4() {
|
|
19400
19420
|
return { id: "flac", formatName: "flac", formatLongName: "raw FLAC", extensions: ["flac"], mimeTypes: ["audio/flac"], canDemux: true, canMux: true, supportedVideoCodecs: [], supportedAudioCodecs: ["flac"], detect(e, t) {
|
|
19401
19421
|
return e.byteLength >= 4 && $e(e, 0) === "fLaC" ? true : t && t.toLowerCase().endsWith(".flac") && e.byteLength >= 4 ? $e(e, 0) === "fLaC" : false;
|
|
19402
19422
|
}, parse(e) {
|
|
@@ -19420,7 +19440,7 @@ function z4() {
|
|
|
19420
19440
|
return Oe(e, t);
|
|
19421
19441
|
} };
|
|
19422
19442
|
}
|
|
19423
|
-
function
|
|
19443
|
+
function j4() {
|
|
19424
19444
|
return { id: "ogg", formatName: "ogg", formatLongName: "Ogg", extensions: ["ogg", "oga", "ogv", "opus"], mimeTypes: ["audio/ogg", "video/ogg"], canDemux: true, canMux: true, supportedVideoCodecs: ["theora", "vp8"], supportedAudioCodecs: ["opus", "vorbis", "flac"], detect(e, t) {
|
|
19425
19445
|
return e.byteLength >= 4 && $e(e, 0) === "OggS" ? true : t && /\.(ogg|oga|ogv|opus)$/i.test(t) && e.byteLength >= 4 ? $e(e, 0) === "OggS" : false;
|
|
19426
19446
|
}, parse(e) {
|
|
@@ -19437,7 +19457,7 @@ function Y4() {
|
|
|
19437
19457
|
return Oe(e, t);
|
|
19438
19458
|
} };
|
|
19439
19459
|
}
|
|
19440
|
-
function
|
|
19460
|
+
function W4(e) {
|
|
19441
19461
|
return e.byteLength >= 6 && e[0] === 71 && e[1] === 73 && e[2] === 70 && e[3] === 56;
|
|
19442
19462
|
}
|
|
19443
19463
|
function U3(e) {
|
|
@@ -19455,9 +19475,9 @@ function V3(e) {
|
|
|
19455
19475
|
function q3(e, t, n) {
|
|
19456
19476
|
return { width: e, height: t, channels: 4, data: n, format: "png", space: "srgb", depth: "uchar", density: 72, hasAlpha: true };
|
|
19457
19477
|
}
|
|
19458
|
-
function
|
|
19478
|
+
function N4() {
|
|
19459
19479
|
return { id: "gif", formatName: "gif", formatLongName: "CompuServe Graphics Interchange Format (GIF)", extensions: ["gif"], mimeTypes: ["image/gif"], canDemux: true, canMux: true, supportedVideoCodecs: ["gif"], supportedAudioCodecs: [], detect(e, t) {
|
|
19460
|
-
return !!(
|
|
19480
|
+
return !!(W4(e) || t && t.toLowerCase().endsWith(".gif") && e.byteLength >= 6);
|
|
19461
19481
|
}, parse(e) {
|
|
19462
19482
|
let t = 64, n = 64, a = new Uint8Array(4096 * 4).fill(200);
|
|
19463
19483
|
try {
|
|
@@ -19480,7 +19500,7 @@ function W4() {
|
|
|
19480
19500
|
return Oe(e, t);
|
|
19481
19501
|
} };
|
|
19482
19502
|
}
|
|
19483
|
-
function
|
|
19503
|
+
function Z4() {
|
|
19484
19504
|
return { id: "image2", formatName: "image2", formatLongName: "image2 sequence", extensions: ["png", "jpg", "jpeg", "webp", "bmp", "ppm", "pgm", "tga", "tiff", "tif"], mimeTypes: ["image/png", "image/jpeg", "image/webp", "image/bmp", "image/x-portable-pixmap"], canDemux: true, canMux: true, supportedVideoCodecs: ["png", "mjpeg", "webp", "bmp", "ppm"], supportedAudioCodecs: [], detect(e, t) {
|
|
19485
19505
|
return !!(U3(e) || L3(e) || K3(e) || V3(e) || t && /\.(png|jpe?g|webp|bmp|pp[gm]|tga|tiff?)$/i.test(t) && e.byteLength >= 4);
|
|
19486
19506
|
}, parse(e) {
|
|
@@ -19524,13 +19544,13 @@ function Q3(e, t) {
|
|
|
19524
19544
|
let n = Math.max(0, Math.round(e)), a = Math.floor(n / 36e5), i = Math.floor(n % 36e5 / 6e4), r = Math.floor(n % 6e4 / 1e3), o = n % 1e3;
|
|
19525
19545
|
return String(a).padStart(2, "0") + ":" + String(i).padStart(2, "0") + ":" + String(r).padStart(2, "0") + t + String(o).padStart(3, "0");
|
|
19526
19546
|
}
|
|
19527
|
-
function
|
|
19547
|
+
function J4(e, t) {
|
|
19528
19548
|
if (t && t.toLowerCase().endsWith(".srt")) return true;
|
|
19529
19549
|
if (e.byteLength < 15) return false;
|
|
19530
19550
|
let n = Ne(e.subarray(0, Math.min(256, e.byteLength))).trimStart();
|
|
19531
19551
|
return /^\d+\r?\n\d{2}:\d{2}:\d{2}[,.]\d{3}\s*-->\s*\d{2}:\d{2}:\d{2}[,.]\d{3}/.test(n);
|
|
19532
19552
|
}
|
|
19533
|
-
function
|
|
19553
|
+
function _4(e, t) {
|
|
19534
19554
|
return t && /\.(vtt|webvtt)$/i.test(t) ? true : e.byteLength < 6 ? false : Ne(e.subarray(0, Math.min(64, e.byteLength))).replace(/^\uFEFF/, "").trimStart().startsWith("WEBVTT");
|
|
19535
19555
|
}
|
|
19536
19556
|
function wi(e, t) {
|
|
@@ -19570,7 +19590,7 @@ function z3(e, t) {
|
|
|
19570
19590
|
}
|
|
19571
19591
|
function Y3() {
|
|
19572
19592
|
return { id: "srt", formatName: "srt", formatLongName: "SubRip subtitle", extensions: ["srt"], mimeTypes: ["application/x-subrip", "text/srt"], canDemux: true, canMux: true, supportedVideoCodecs: [], supportedAudioCodecs: [], detect(e, t) {
|
|
19573
|
-
return
|
|
19593
|
+
return J4(e, t);
|
|
19574
19594
|
}, parse(e) {
|
|
19575
19595
|
return wi(e, "srt");
|
|
19576
19596
|
}, serialize(e) {
|
|
@@ -19586,7 +19606,7 @@ function Y3() {
|
|
|
19586
19606
|
}
|
|
19587
19607
|
function j3() {
|
|
19588
19608
|
return { id: "webvtt", formatName: "webvtt", formatLongName: "WebVTT subtitle", extensions: ["vtt", "webvtt"], mimeTypes: ["text/vtt"], canDemux: true, canMux: true, supportedVideoCodecs: [], supportedAudioCodecs: [], detect(e, t) {
|
|
19589
|
-
return
|
|
19609
|
+
return _4(e, t);
|
|
19590
19610
|
}, parse(e) {
|
|
19591
19611
|
return wi(e, "webvtt");
|
|
19592
19612
|
}, serialize(e) {
|
|
@@ -19632,7 +19652,7 @@ function R3(e) {
|
|
|
19632
19652
|
}
|
|
19633
19653
|
return u(), { containerFormat: "ffmetadata", timescale: 1e3, duration: Math.round((i[i.length - 1]?.endTimeSeconds ?? 0) * 1e3), durationSeconds: i[i.length - 1]?.endTimeSeconds ?? 0, tracks: [], metadata: { title: a.title, artist: a.artist, album: a.album, date: a.date ?? a.year, comment: a.comment, genre: a.genre, encoder: a.encoder }, chapters: i.length > 0 ? i : void 0, byteLength: e.byteLength };
|
|
19634
19654
|
}
|
|
19635
|
-
function
|
|
19655
|
+
function $4(e) {
|
|
19636
19656
|
let t = [";FFMETADATA1"], n = e.metadata;
|
|
19637
19657
|
if (n.title && t.push(`title=${n.title}`), n.artist && t.push(`artist=${n.artist}`), n.album && t.push(`album=${n.album}`), n.date && t.push(`date=${n.date}`), n.comment && t.push(`comment=${n.comment}`), n.genre && t.push(`genre=${n.genre}`), n.encoder && t.push(`encoder=${n.encoder}`), e.chapters && e.chapters.length > 0) for (let a of e.chapters) t.push("", "[CHAPTER]", "TIMEBASE=1/1000"), t.push(`START=${Math.round(a.startTimeSeconds * 1e3)}`), t.push(`END=${Math.round(a.endTimeSeconds * 1e3)}`), t.push(`title=${a.title}`);
|
|
19638
19658
|
return t.push(""), Ke(t.join(`
|
|
@@ -19644,7 +19664,7 @@ function W3() {
|
|
|
19644
19664
|
}, parse(e) {
|
|
19645
19665
|
return R3(e);
|
|
19646
19666
|
}, serialize(e) {
|
|
19647
|
-
return
|
|
19667
|
+
return $4(e);
|
|
19648
19668
|
}, probe(e, t) {
|
|
19649
19669
|
let n = R3(e);
|
|
19650
19670
|
return lt(n, e.byteLength, t?.filename ?? "input.ffmeta", { ...t, formatName: "ffmetadata", formatLongName: "FFmpeg metadata in text" });
|
|
@@ -19699,7 +19719,7 @@ function Z3() {
|
|
|
19699
19719
|
} };
|
|
19700
19720
|
}
|
|
19701
19721
|
function Sl() {
|
|
19702
|
-
return [p3(), w3(), B3(), y3(), M3(), E3(), I3(),
|
|
19722
|
+
return [p3(), w3(), B3(), y3(), M3(), E3(), I3(), L4(), O4(), R4(), z4(), Y4(), j4(), N4(), Z4(), Y3(), j3(), W3(), N3(), Z3()];
|
|
19703
19723
|
}
|
|
19704
19724
|
function eo(e) {
|
|
19705
19725
|
return { plugins: e, findById(t) {
|
|
@@ -19726,7 +19746,7 @@ function eo(e) {
|
|
|
19726
19746
|
}
|
|
19727
19747
|
async function nu(e) {
|
|
19728
19748
|
let t = [], n = 0;
|
|
19729
|
-
for await (let r of
|
|
19749
|
+
for await (let r of ew(e.stdin, e.signal)) t.push(r), n += r.byteLength;
|
|
19730
19750
|
let a = new Uint8Array(n), i = 0;
|
|
19731
19751
|
for (let r of t) a.set(r, i), i += r.byteLength;
|
|
19732
19752
|
return a;
|
|
@@ -19739,7 +19759,7 @@ function J3(e) {
|
|
|
19739
19759
|
for (let a of t) !a || a === "." || (a === ".." ? n.pop() : n.push(a));
|
|
19740
19760
|
return "/" + n.join("/");
|
|
19741
19761
|
}
|
|
19742
|
-
function
|
|
19762
|
+
function tw(e) {
|
|
19743
19763
|
let t = e.lastIndexOf("/");
|
|
19744
19764
|
return t <= 0 ? "/" : e.slice(0, t);
|
|
19745
19765
|
}
|
|
@@ -20132,7 +20152,7 @@ var Tl;
|
|
|
20132
20152
|
function ao() {
|
|
20133
20153
|
return (!no || !Tl) && (no = Sl(), Tl = eo(no)), { astPlugins: no, registry: Tl };
|
|
20134
20154
|
}
|
|
20135
|
-
function
|
|
20155
|
+
function Vv(e, t, n, a) {
|
|
20136
20156
|
let i = Array.isArray(e) ? void 0 : e, r = Array.isArray(e) ? e : t ?? [];
|
|
20137
20157
|
if (r.length === 0) return;
|
|
20138
20158
|
let { astPlugins: o, registry: s } = ao();
|
|
@@ -20265,7 +20285,7 @@ function Kv(e, t, n, a) {
|
|
|
20265
20285
|
return;
|
|
20266
20286
|
}
|
|
20267
20287
|
}
|
|
20268
|
-
function
|
|
20288
|
+
function Ov(e, t, n) {
|
|
20269
20289
|
if (t.length === 0) return;
|
|
20270
20290
|
let { astPlugins: a, registry: i } = ao();
|
|
20271
20291
|
for (let b = 0; b < t.length; b++) {
|
|
@@ -20305,7 +20325,7 @@ function Vv(e, t, n) {
|
|
|
20305
20325
|
return;
|
|
20306
20326
|
}
|
|
20307
20327
|
}
|
|
20308
|
-
function
|
|
20328
|
+
function nw(e = {}) {
|
|
20309
20329
|
let t = e.asts ?? ao().astPlugins, n = e.asts ? eo(t) : ao().registry;
|
|
20310
20330
|
return { name: "ffprobe", runtimeIdentity: eu, description: "Multimedia stream analyzer powered by pluggable ASTs", async execute(a) {
|
|
20311
20331
|
let i = new bt(e.limits), o = tu(a).args;
|
|
@@ -20344,7 +20364,7 @@ usage: ffprobe [OPTIONS] INPUT_FILE
|
|
|
20344
20364
|
}
|
|
20345
20365
|
} };
|
|
20346
20366
|
}
|
|
20347
|
-
function
|
|
20367
|
+
function aw(e = {}) {
|
|
20348
20368
|
let t = e.asts ?? Sl(), n = eo(t), a = e.features ?? {};
|
|
20349
20369
|
return { name: "ffmpeg", runtimeIdentity: eu, description: "Multimedia converter, merger, and stream processor powered by pluggable ASTs", async execute(i) {
|
|
20350
20370
|
let r = new bt(e.limits), s = tu(i).args;
|
|
@@ -20492,7 +20512,7 @@ function nw(e = {}) {
|
|
|
20492
20512
|
ce = await i.fs.readFile(ee, { signal: i.signal });
|
|
20493
20513
|
}
|
|
20494
20514
|
if (r.checkInputBytes(ce.byteLength), ne === "concat") {
|
|
20495
|
-
let ee = new TextDecoder().decode(ce), ie = Z === "-" ? i.cwd :
|
|
20515
|
+
let ee = new TextDecoder().decode(ce), ie = Z === "-" ? i.cwd : tw(Jt(i.cwd, Z)), de = [], ge, he, me, we = ee.split(/\r?\n/);
|
|
20496
20516
|
for (let pe = 0; pe < we.length; pe++) {
|
|
20497
20517
|
let xe = we[pe].trim();
|
|
20498
20518
|
if (!(!xe || xe.startsWith("#") || xe.startsWith("ffconcat")) && xe.startsWith("file ")) {
|
|
@@ -20708,12 +20728,12 @@ function nw(e = {}) {
|
|
|
20708
20728
|
}
|
|
20709
20729
|
} };
|
|
20710
20730
|
}
|
|
20711
|
-
function
|
|
20712
|
-
let t =
|
|
20731
|
+
function iw(e = {}) {
|
|
20732
|
+
let t = aw(e), n = nw(e);
|
|
20713
20733
|
return Object.assign([t, n], { ffmpeg: t, ffprobe: n });
|
|
20714
20734
|
}
|
|
20715
|
-
function
|
|
20716
|
-
let t =
|
|
20735
|
+
function Qv(e = {}) {
|
|
20736
|
+
let t = iw(e);
|
|
20717
20737
|
return { name: "ffmpeg-commands", setup(n) {
|
|
20718
20738
|
if (!e.replace) {
|
|
20719
20739
|
for (let a of t) if (n.commands.has(a.name)) throw new Error(`Command already registered: ${a.name}`);
|
|
@@ -20725,15 +20745,15 @@ export {
|
|
|
20725
20745
|
bt as MediaBudgetTracker,
|
|
20726
20746
|
Kt as MediaLimitExceededError,
|
|
20727
20747
|
Sl as allMediaAsts,
|
|
20728
|
-
|
|
20729
|
-
|
|
20730
|
-
|
|
20731
|
-
|
|
20748
|
+
m4 as cloudflareWorkerLimits,
|
|
20749
|
+
aw as createFfmpegCommand,
|
|
20750
|
+
iw as createFfmpegCommands,
|
|
20751
|
+
nw as createFfprobeCommand,
|
|
20732
20752
|
Z3 as dashAst,
|
|
20733
|
-
|
|
20734
|
-
|
|
20753
|
+
Vv as evalSyncFfmpeg,
|
|
20754
|
+
Ov as evalSyncFfprobe,
|
|
20735
20755
|
W3 as ffmetadataAst,
|
|
20736
|
-
|
|
20756
|
+
Qv as ffmpegCommands,
|
|
20737
20757
|
N3 as hlsAst,
|
|
20738
20758
|
an as parseFfmpegTimestamp,
|
|
20739
20759
|
Y3 as srtAst,
|
|
@@ -20743,3 +20763,15 @@ export {
|
|
|
20743
20763
|
* Copyright 2017 Mozilla Foundation. Licensed under Apache-2.0.
|
|
20744
20764
|
* See licenses/PDFJS-APACHE-2.0.txt and THIRD_PARTY_NOTICES.md.
|
|
20745
20765
|
*/
|
|
20766
|
+
/*!
|
|
20767
|
+
* Anti-Grain Geometry - Version 2.3
|
|
20768
|
+
* Copyright (C) 2002-2005 Maxim Shemanarev (http://www.antigrain.com)
|
|
20769
|
+
*
|
|
20770
|
+
* Permission to copy, use, modify, sell and distribute this software
|
|
20771
|
+
* is granted provided this copyright notice appears in all copies.
|
|
20772
|
+
* This software is provided "as is" without express or implied
|
|
20773
|
+
* warranty, and with no claim as to its suitability for any purpose.
|
|
20774
|
+
*
|
|
20775
|
+
* Adapted from PDFium third_party/agg23/agg_curves.cpp, curve4_div.
|
|
20776
|
+
* See THIRD_PARTY_NOTICES.md for the pinned revision and adaptations.
|
|
20777
|
+
*/
|