ooxml-core 1.27.2 → 1.28.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PptxHandler-WRJXTPGV.mjs → PptxHandler-AFVUHNJO.mjs} +3 -3
- package/dist/PptxHandler-EZW4YAWL.mjs +4 -0
- package/dist/{PptxHandler-FRQKHTCM.cjs → PptxHandler-WI23AJHM.cjs} +3 -3
- package/dist/{PresentationBuilder-POXKHTV7.mjs → PresentationBuilder-DYEHCRHX.mjs} +2 -2
- package/dist/{PresentationBuilder-YO5YOTA3.cjs → PresentationBuilder-KUNPJTRL.cjs} +5 -5
- package/dist/{PresentationBuilder-LWR5X3JA.mjs → PresentationBuilder-WGTZPVOG.mjs} +3 -3
- package/dist/automation/index.cjs +16 -7
- package/dist/automation/index.mjs +16 -7
- package/dist/chart/index.cjs +16 -7
- package/dist/chart/index.mjs +16 -7
- package/dist/{chunk-36TR3PER.cjs → chunk-A2PC3CBO.cjs} +28 -7
- package/dist/{chunk-XW4XB6P4.mjs → chunk-D7CAHL6J.mjs} +1 -1
- package/dist/{chunk-JJ37PCNR.mjs → chunk-EYCM7RVL.mjs} +28 -7
- package/dist/{chunk-K6DNX3YC.cjs → chunk-IQ7CB7BJ.cjs} +1581 -1232
- package/dist/{chunk-G67MARDL.mjs → chunk-LGSBK3BV.mjs} +258 -258
- package/dist/{chunk-I57SMSU6.mjs → chunk-LNPVKKR5.mjs} +28 -7
- package/dist/{chunk-RNUYMB73.mjs → chunk-N5ROEHEQ.mjs} +509 -160
- package/dist/{chunk-TIQWSSGI.mjs → chunk-RCEHCVLC.mjs} +1 -1
- package/dist/{chunk-3VIPI6IA.mjs → chunk-V33RUK4D.mjs} +5 -5
- package/dist/{chunk-6LCBTFNL.mjs → chunk-YNGMSNF4.mjs} +528 -159
- package/dist/docx/embedded.cjs +16 -7
- package/dist/docx/embedded.mjs +16 -7
- package/dist/docx/index.cjs +16 -7
- package/dist/docx/index.mjs +16 -7
- package/dist/docx/load/index.cjs +16 -7
- package/dist/docx/load/index.mjs +16 -7
- package/dist/index.cjs +16 -7
- package/dist/index.mjs +16 -7
- package/dist/opc/index.cjs +16 -7
- package/dist/opc/index.mjs +16 -7
- package/dist/opc/zip-limits.d.ts +8 -1
- package/dist/opc/zip-limits.d.ts.map +1 -1
- package/dist/pptx/automation/index.cjs +807 -418
- package/dist/pptx/automation/index.d.ts +4 -4
- package/dist/pptx/automation/index.mjs +6 -6
- package/dist/pptx/chunks/{index-D_d4NTVP.d.ts → index-0slnMhMO.d.ts} +126 -10
- package/dist/pptx/chunks/index-0slnMhMO.d.ts.map +1 -0
- package/dist/pptx/chunks/{index-CdRlUz-v.d.ts → index-DP-R2qY1.d.ts} +3 -3
- package/dist/pptx/chunks/{index-CdRlUz-v.d.ts.map → index-DP-R2qY1.d.ts.map} +1 -1
- package/dist/pptx/chunks/{index-lwMA6pP5.d.ts → index-OQwOyNYK.d.ts} +4 -4
- package/dist/pptx/chunks/{index-lwMA6pP5.d.ts.map → index-OQwOyNYK.d.ts.map} +1 -1
- package/dist/pptx/chunks/{text-operations-CNfUj45U.d.ts → text-operations-dyvh8gyE.d.ts} +23 -1
- package/dist/pptx/chunks/{text-operations-CNfUj45U.d.ts.map → text-operations-dyvh8gyE.d.ts.map} +1 -1
- package/dist/pptx/cli/index.cjs +632 -246
- package/dist/pptx/cli/index.d.ts +1 -1
- package/dist/pptx/cli/index.mjs +5 -5
- package/dist/pptx/converter/index.d.ts +1 -1
- package/dist/pptx/converter/index.mjs +3 -3
- package/dist/pptx/editor/render/find-replace.cjs +14 -14
- package/dist/pptx/editor/render/find-replace.d.ts +2 -2
- package/dist/pptx/editor/render/find-replace.mjs +1 -1
- package/dist/pptx/editor/render/slide-operations.cjs +8 -8
- package/dist/pptx/editor/render/slide-operations.mjs +2 -2
- package/dist/pptx/index.cjs +1047 -639
- package/dist/pptx/index.d.ts +5 -5
- package/dist/pptx/index.mjs +6 -6
- package/dist/pptx/node/index.d.ts +1 -1
- package/dist/pptx/signature-node/index.cjs +28 -7
- package/dist/pptx/signature-node/index.mjs +2 -2
- package/dist/visio/index.cjs +14 -6
- package/dist/visio/index.mjs +14 -6
- package/dist/visio/ui/index.cjs +14 -6
- package/dist/visio/ui/index.mjs +14 -6
- package/dist/xlsx/index.cjs +14 -6
- package/dist/xlsx/index.mjs +14 -6
- package/dist/xlsx/load/index.cjs +14 -6
- package/dist/xlsx/load/index.mjs +14 -6
- package/dist/xlsx/ui/index.cjs +14 -6
- package/dist/xlsx/ui/index.mjs +14 -6
- package/package.json +5 -5
- package/dist/PptxHandler-RETSKQ5E.mjs +0 -4
- package/dist/pptx/chunks/index-D_d4NTVP.d.ts.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { PptxHandler } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { PptxHandler } from './chunk-YNGMSNF4.mjs';
|
|
2
|
+
import './chunk-LGSBK3BV.mjs';
|
|
3
|
+
import './chunk-EYCM7RVL.mjs';
|
|
4
4
|
import './chunk-3GXV5MPC.mjs';
|
|
5
5
|
import './chunk-54S5A5PZ.mjs';
|
|
6
6
|
import './chunk-KII4AAYH.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkIQ7CB7BJ_cjs = require('./chunk-IQ7CB7BJ.cjs');
|
|
4
|
+
require('./chunk-A2PC3CBO.cjs');
|
|
5
5
|
require('./chunk-XZPZHXV4.cjs');
|
|
6
6
|
require('./chunk-5W2QL4SB.cjs');
|
|
7
7
|
|
|
@@ -9,5 +9,5 @@ require('./chunk-5W2QL4SB.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "PptxHandler", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkIQ7CB7BJ_cjs.PptxHandler; }
|
|
13
13
|
});
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-
|
|
2
|
-
import './chunk-
|
|
1
|
+
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-N5ROEHEQ.mjs';
|
|
2
|
+
import './chunk-LNPVKKR5.mjs';
|
|
3
3
|
import './chunk-GXHKNSZX.mjs';
|
|
4
4
|
import './chunk-CA7KCNL3.mjs';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('./chunk-
|
|
3
|
+
var chunkIQ7CB7BJ_cjs = require('./chunk-IQ7CB7BJ.cjs');
|
|
4
|
+
require('./chunk-A2PC3CBO.cjs');
|
|
5
5
|
require('./chunk-XZPZHXV4.cjs');
|
|
6
6
|
require('./chunk-5W2QL4SB.cjs');
|
|
7
7
|
|
|
@@ -9,13 +9,13 @@ require('./chunk-5W2QL4SB.cjs');
|
|
|
9
9
|
|
|
10
10
|
Object.defineProperty(exports, "PresentationBuilder", {
|
|
11
11
|
enumerable: true,
|
|
12
|
-
get: function () { return
|
|
12
|
+
get: function () { return chunkIQ7CB7BJ_cjs.PresentationBuilder; }
|
|
13
13
|
});
|
|
14
14
|
Object.defineProperty(exports, "STANDARD_LAYOUTS", {
|
|
15
15
|
enumerable: true,
|
|
16
|
-
get: function () { return
|
|
16
|
+
get: function () { return chunkIQ7CB7BJ_cjs.STANDARD_LAYOUTS; }
|
|
17
17
|
});
|
|
18
18
|
Object.defineProperty(exports, "buildBlankPresentationArchive", {
|
|
19
19
|
enumerable: true,
|
|
20
|
-
get: function () { return
|
|
20
|
+
get: function () { return chunkIQ7CB7BJ_cjs.buildBlankPresentationArchive; }
|
|
21
21
|
});
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-
|
|
2
|
-
import './chunk-
|
|
3
|
-
import './chunk-
|
|
1
|
+
export { PresentationBuilder, STANDARD_LAYOUTS, buildBlankPresentationArchive } from './chunk-YNGMSNF4.mjs';
|
|
2
|
+
import './chunk-LGSBK3BV.mjs';
|
|
3
|
+
import './chunk-EYCM7RVL.mjs';
|
|
4
4
|
import './chunk-3GXV5MPC.mjs';
|
|
5
5
|
import './chunk-54S5A5PZ.mjs';
|
|
6
6
|
import './chunk-KII4AAYH.mjs';
|
|
@@ -1500,11 +1500,14 @@ var ZipLimitError = class extends Error {
|
|
|
1500
1500
|
limit;
|
|
1501
1501
|
/** The check that failed (absent when the error was built without one). */
|
|
1502
1502
|
kind;
|
|
1503
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
1504
|
+
actual;
|
|
1503
1505
|
constructor(message, details) {
|
|
1504
1506
|
super(message);
|
|
1505
1507
|
this.name = "ZipLimitError";
|
|
1506
1508
|
this.limit = details.limit;
|
|
1507
1509
|
this.kind = details.kind;
|
|
1510
|
+
this.actual = details.actual;
|
|
1508
1511
|
}
|
|
1509
1512
|
};
|
|
1510
1513
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -1527,7 +1530,7 @@ function resolveLimits(limits) {
|
|
|
1527
1530
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
1528
1531
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
1529
1532
|
label: limits.label ?? "ZIP",
|
|
1530
|
-
fail: (message, limit3, kind) => create3 ? create3(message, { limit: limit3, kind }) : new ZipLimitError(message, { limit: limit3, kind })
|
|
1533
|
+
fail: (message, limit3, kind, actual) => create3 ? create3(message, { limit: limit3, kind, actual }) : new ZipLimitError(message, { limit: limit3, kind, actual })
|
|
1531
1534
|
};
|
|
1532
1535
|
}
|
|
1533
1536
|
async function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
@@ -1582,7 +1585,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
1582
1585
|
r.fail(
|
|
1583
1586
|
`${r.label} part ${entry3.name} inflates past its declared size`,
|
|
1584
1587
|
r.maxEntryBytes,
|
|
1585
|
-
size3 > declared ? "declaredSize" : "maxEntryBytes"
|
|
1588
|
+
size3 > declared ? "declaredSize" : "maxEntryBytes",
|
|
1589
|
+
size3
|
|
1586
1590
|
)
|
|
1587
1591
|
);
|
|
1588
1592
|
if (alreadyRead + size3 > r.maxTotalBytes)
|
|
@@ -1590,7 +1594,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
1590
1594
|
r.fail(
|
|
1591
1595
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
1592
1596
|
r.maxTotalBytes,
|
|
1593
|
-
"maxTotalBytes"
|
|
1597
|
+
"maxTotalBytes",
|
|
1598
|
+
alreadyRead + size3
|
|
1594
1599
|
)
|
|
1595
1600
|
);
|
|
1596
1601
|
queue.push(chunk);
|
|
@@ -1637,7 +1642,8 @@ function guardZip(zip, limits = {}) {
|
|
|
1637
1642
|
throw r.fail(
|
|
1638
1643
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
1639
1644
|
r.maxEntries,
|
|
1640
|
-
"maxEntries"
|
|
1645
|
+
"maxEntries",
|
|
1646
|
+
entries.length
|
|
1641
1647
|
);
|
|
1642
1648
|
let declared = 0;
|
|
1643
1649
|
for (const entry3 of entries) {
|
|
@@ -1650,7 +1656,8 @@ function guardZip(zip, limits = {}) {
|
|
|
1650
1656
|
throw r.fail(
|
|
1651
1657
|
`${r.label} part ${entry3.name} exceeds the uncompressed part size limit`,
|
|
1652
1658
|
r.maxEntryBytes,
|
|
1653
|
-
"maxEntryBytes"
|
|
1659
|
+
"maxEntryBytes",
|
|
1660
|
+
size3
|
|
1654
1661
|
);
|
|
1655
1662
|
declared += size3;
|
|
1656
1663
|
}
|
|
@@ -1658,7 +1665,8 @@ function guardZip(zip, limits = {}) {
|
|
|
1658
1665
|
throw r.fail(
|
|
1659
1666
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
1660
1667
|
r.maxTotalBytes,
|
|
1661
|
-
"maxTotalBytes"
|
|
1668
|
+
"maxTotalBytes",
|
|
1669
|
+
declared
|
|
1662
1670
|
);
|
|
1663
1671
|
const produced = /* @__PURE__ */ new Map();
|
|
1664
1672
|
let total2 = 0;
|
|
@@ -1697,7 +1705,8 @@ async function openZip(input2, limits = {}) {
|
|
|
1697
1705
|
throw r.fail(
|
|
1698
1706
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
1699
1707
|
maxInput,
|
|
1700
|
-
"maxInputBytes"
|
|
1708
|
+
"maxInputBytes",
|
|
1709
|
+
bytes.byteLength
|
|
1701
1710
|
);
|
|
1702
1711
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
1703
1712
|
}
|
|
@@ -1494,11 +1494,14 @@ var ZipLimitError = class extends Error {
|
|
|
1494
1494
|
limit;
|
|
1495
1495
|
/** The check that failed (absent when the error was built without one). */
|
|
1496
1496
|
kind;
|
|
1497
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
1498
|
+
actual;
|
|
1497
1499
|
constructor(message, details) {
|
|
1498
1500
|
super(message);
|
|
1499
1501
|
this.name = "ZipLimitError";
|
|
1500
1502
|
this.limit = details.limit;
|
|
1501
1503
|
this.kind = details.kind;
|
|
1504
|
+
this.actual = details.actual;
|
|
1502
1505
|
}
|
|
1503
1506
|
};
|
|
1504
1507
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -1521,7 +1524,7 @@ function resolveLimits(limits) {
|
|
|
1521
1524
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
1522
1525
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
1523
1526
|
label: limits.label ?? "ZIP",
|
|
1524
|
-
fail: (message, limit3, kind) => create3 ? create3(message, { limit: limit3, kind }) : new ZipLimitError(message, { limit: limit3, kind })
|
|
1527
|
+
fail: (message, limit3, kind, actual) => create3 ? create3(message, { limit: limit3, kind, actual }) : new ZipLimitError(message, { limit: limit3, kind, actual })
|
|
1525
1528
|
};
|
|
1526
1529
|
}
|
|
1527
1530
|
async function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
@@ -1576,7 +1579,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
1576
1579
|
r.fail(
|
|
1577
1580
|
`${r.label} part ${entry3.name} inflates past its declared size`,
|
|
1578
1581
|
r.maxEntryBytes,
|
|
1579
|
-
size3 > declared ? "declaredSize" : "maxEntryBytes"
|
|
1582
|
+
size3 > declared ? "declaredSize" : "maxEntryBytes",
|
|
1583
|
+
size3
|
|
1580
1584
|
)
|
|
1581
1585
|
);
|
|
1582
1586
|
if (alreadyRead + size3 > r.maxTotalBytes)
|
|
@@ -1584,7 +1588,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
1584
1588
|
r.fail(
|
|
1585
1589
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
1586
1590
|
r.maxTotalBytes,
|
|
1587
|
-
"maxTotalBytes"
|
|
1591
|
+
"maxTotalBytes",
|
|
1592
|
+
alreadyRead + size3
|
|
1588
1593
|
)
|
|
1589
1594
|
);
|
|
1590
1595
|
queue.push(chunk);
|
|
@@ -1631,7 +1636,8 @@ function guardZip(zip, limits = {}) {
|
|
|
1631
1636
|
throw r.fail(
|
|
1632
1637
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
1633
1638
|
r.maxEntries,
|
|
1634
|
-
"maxEntries"
|
|
1639
|
+
"maxEntries",
|
|
1640
|
+
entries.length
|
|
1635
1641
|
);
|
|
1636
1642
|
let declared = 0;
|
|
1637
1643
|
for (const entry3 of entries) {
|
|
@@ -1644,7 +1650,8 @@ function guardZip(zip, limits = {}) {
|
|
|
1644
1650
|
throw r.fail(
|
|
1645
1651
|
`${r.label} part ${entry3.name} exceeds the uncompressed part size limit`,
|
|
1646
1652
|
r.maxEntryBytes,
|
|
1647
|
-
"maxEntryBytes"
|
|
1653
|
+
"maxEntryBytes",
|
|
1654
|
+
size3
|
|
1648
1655
|
);
|
|
1649
1656
|
declared += size3;
|
|
1650
1657
|
}
|
|
@@ -1652,7 +1659,8 @@ function guardZip(zip, limits = {}) {
|
|
|
1652
1659
|
throw r.fail(
|
|
1653
1660
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
1654
1661
|
r.maxTotalBytes,
|
|
1655
|
-
"maxTotalBytes"
|
|
1662
|
+
"maxTotalBytes",
|
|
1663
|
+
declared
|
|
1656
1664
|
);
|
|
1657
1665
|
const produced = /* @__PURE__ */ new Map();
|
|
1658
1666
|
let total2 = 0;
|
|
@@ -1691,7 +1699,8 @@ async function openZip(input2, limits = {}) {
|
|
|
1691
1699
|
throw r.fail(
|
|
1692
1700
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
1693
1701
|
maxInput,
|
|
1694
|
-
"maxInputBytes"
|
|
1702
|
+
"maxInputBytes",
|
|
1703
|
+
bytes.byteLength
|
|
1695
1704
|
);
|
|
1696
1705
|
return guardZip(await JSZip.loadAsync(bytes), limits);
|
|
1697
1706
|
}
|
package/dist/chart/index.cjs
CHANGED
|
@@ -11334,11 +11334,14 @@ var ZipLimitError = class extends Error {
|
|
|
11334
11334
|
limit;
|
|
11335
11335
|
/** The check that failed (absent when the error was built without one). */
|
|
11336
11336
|
kind;
|
|
11337
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
11338
|
+
actual;
|
|
11337
11339
|
constructor(message, details) {
|
|
11338
11340
|
super(message);
|
|
11339
11341
|
this.name = "ZipLimitError";
|
|
11340
11342
|
this.limit = details.limit;
|
|
11341
11343
|
this.kind = details.kind;
|
|
11344
|
+
this.actual = details.actual;
|
|
11342
11345
|
}
|
|
11343
11346
|
};
|
|
11344
11347
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -11361,7 +11364,7 @@ function resolveLimits(limits) {
|
|
|
11361
11364
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
11362
11365
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
11363
11366
|
label: limits.label ?? "ZIP",
|
|
11364
|
-
fail: (message, limit, kind) => create2 ? create2(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
11367
|
+
fail: (message, limit, kind, actual) => create2 ? create2(message, { limit, kind, actual }) : new ZipLimitError(message, { limit, kind, actual })
|
|
11365
11368
|
};
|
|
11366
11369
|
}
|
|
11367
11370
|
async function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
@@ -11416,7 +11419,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
11416
11419
|
r.fail(
|
|
11417
11420
|
`${r.label} part ${entry3.name} inflates past its declared size`,
|
|
11418
11421
|
r.maxEntryBytes,
|
|
11419
|
-
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
11422
|
+
size > declared ? "declaredSize" : "maxEntryBytes",
|
|
11423
|
+
size
|
|
11420
11424
|
)
|
|
11421
11425
|
);
|
|
11422
11426
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
@@ -11424,7 +11428,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
11424
11428
|
r.fail(
|
|
11425
11429
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
11426
11430
|
r.maxTotalBytes,
|
|
11427
|
-
"maxTotalBytes"
|
|
11431
|
+
"maxTotalBytes",
|
|
11432
|
+
alreadyRead + size
|
|
11428
11433
|
)
|
|
11429
11434
|
);
|
|
11430
11435
|
queue.push(chunk);
|
|
@@ -11471,7 +11476,8 @@ function guardZip(zip, limits = {}) {
|
|
|
11471
11476
|
throw r.fail(
|
|
11472
11477
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
11473
11478
|
r.maxEntries,
|
|
11474
|
-
"maxEntries"
|
|
11479
|
+
"maxEntries",
|
|
11480
|
+
entries.length
|
|
11475
11481
|
);
|
|
11476
11482
|
let declared = 0;
|
|
11477
11483
|
for (const entry3 of entries) {
|
|
@@ -11484,7 +11490,8 @@ function guardZip(zip, limits = {}) {
|
|
|
11484
11490
|
throw r.fail(
|
|
11485
11491
|
`${r.label} part ${entry3.name} exceeds the uncompressed part size limit`,
|
|
11486
11492
|
r.maxEntryBytes,
|
|
11487
|
-
"maxEntryBytes"
|
|
11493
|
+
"maxEntryBytes",
|
|
11494
|
+
size
|
|
11488
11495
|
);
|
|
11489
11496
|
declared += size;
|
|
11490
11497
|
}
|
|
@@ -11492,7 +11499,8 @@ function guardZip(zip, limits = {}) {
|
|
|
11492
11499
|
throw r.fail(
|
|
11493
11500
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
11494
11501
|
r.maxTotalBytes,
|
|
11495
|
-
"maxTotalBytes"
|
|
11502
|
+
"maxTotalBytes",
|
|
11503
|
+
declared
|
|
11496
11504
|
);
|
|
11497
11505
|
const produced = /* @__PURE__ */ new Map();
|
|
11498
11506
|
let total = 0;
|
|
@@ -11531,7 +11539,8 @@ async function openZip(input, limits = {}) {
|
|
|
11531
11539
|
throw r.fail(
|
|
11532
11540
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
11533
11541
|
maxInput,
|
|
11534
|
-
"maxInputBytes"
|
|
11542
|
+
"maxInputBytes",
|
|
11543
|
+
bytes.byteLength
|
|
11535
11544
|
);
|
|
11536
11545
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
11537
11546
|
}
|
package/dist/chart/index.mjs
CHANGED
|
@@ -11328,11 +11328,14 @@ var ZipLimitError = class extends Error {
|
|
|
11328
11328
|
limit;
|
|
11329
11329
|
/** The check that failed (absent when the error was built without one). */
|
|
11330
11330
|
kind;
|
|
11331
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
11332
|
+
actual;
|
|
11331
11333
|
constructor(message, details) {
|
|
11332
11334
|
super(message);
|
|
11333
11335
|
this.name = "ZipLimitError";
|
|
11334
11336
|
this.limit = details.limit;
|
|
11335
11337
|
this.kind = details.kind;
|
|
11338
|
+
this.actual = details.actual;
|
|
11336
11339
|
}
|
|
11337
11340
|
};
|
|
11338
11341
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -11355,7 +11358,7 @@ function resolveLimits(limits) {
|
|
|
11355
11358
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
11356
11359
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
11357
11360
|
label: limits.label ?? "ZIP",
|
|
11358
|
-
fail: (message, limit, kind) => create2 ? create2(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
11361
|
+
fail: (message, limit, kind, actual) => create2 ? create2(message, { limit, kind, actual }) : new ZipLimitError(message, { limit, kind, actual })
|
|
11359
11362
|
};
|
|
11360
11363
|
}
|
|
11361
11364
|
async function inflateEntryGuarded(entry3, alreadyRead, limits) {
|
|
@@ -11410,7 +11413,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
11410
11413
|
r.fail(
|
|
11411
11414
|
`${r.label} part ${entry3.name} inflates past its declared size`,
|
|
11412
11415
|
r.maxEntryBytes,
|
|
11413
|
-
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
11416
|
+
size > declared ? "declaredSize" : "maxEntryBytes",
|
|
11417
|
+
size
|
|
11414
11418
|
)
|
|
11415
11419
|
);
|
|
11416
11420
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
@@ -11418,7 +11422,8 @@ async function* streamEntryGuarded(entry3, alreadyRead, limits) {
|
|
|
11418
11422
|
r.fail(
|
|
11419
11423
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
11420
11424
|
r.maxTotalBytes,
|
|
11421
|
-
"maxTotalBytes"
|
|
11425
|
+
"maxTotalBytes",
|
|
11426
|
+
alreadyRead + size
|
|
11422
11427
|
)
|
|
11423
11428
|
);
|
|
11424
11429
|
queue.push(chunk);
|
|
@@ -11465,7 +11470,8 @@ function guardZip(zip, limits = {}) {
|
|
|
11465
11470
|
throw r.fail(
|
|
11466
11471
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
11467
11472
|
r.maxEntries,
|
|
11468
|
-
"maxEntries"
|
|
11473
|
+
"maxEntries",
|
|
11474
|
+
entries.length
|
|
11469
11475
|
);
|
|
11470
11476
|
let declared = 0;
|
|
11471
11477
|
for (const entry3 of entries) {
|
|
@@ -11478,7 +11484,8 @@ function guardZip(zip, limits = {}) {
|
|
|
11478
11484
|
throw r.fail(
|
|
11479
11485
|
`${r.label} part ${entry3.name} exceeds the uncompressed part size limit`,
|
|
11480
11486
|
r.maxEntryBytes,
|
|
11481
|
-
"maxEntryBytes"
|
|
11487
|
+
"maxEntryBytes",
|
|
11488
|
+
size
|
|
11482
11489
|
);
|
|
11483
11490
|
declared += size;
|
|
11484
11491
|
}
|
|
@@ -11486,7 +11493,8 @@ function guardZip(zip, limits = {}) {
|
|
|
11486
11493
|
throw r.fail(
|
|
11487
11494
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
11488
11495
|
r.maxTotalBytes,
|
|
11489
|
-
"maxTotalBytes"
|
|
11496
|
+
"maxTotalBytes",
|
|
11497
|
+
declared
|
|
11490
11498
|
);
|
|
11491
11499
|
const produced = /* @__PURE__ */ new Map();
|
|
11492
11500
|
let total = 0;
|
|
@@ -11525,7 +11533,8 @@ async function openZip(input, limits = {}) {
|
|
|
11525
11533
|
throw r.fail(
|
|
11526
11534
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
11527
11535
|
maxInput,
|
|
11528
|
-
"maxInputBytes"
|
|
11536
|
+
"maxInputBytes",
|
|
11537
|
+
bytes.byteLength
|
|
11529
11538
|
);
|
|
11530
11539
|
return guardZip(await JSZip.loadAsync(bytes), limits);
|
|
11531
11540
|
}
|
|
@@ -2850,11 +2850,14 @@ var ZipLimitError = class extends Error {
|
|
|
2850
2850
|
limit;
|
|
2851
2851
|
/** The check that failed (absent when the error was built without one). */
|
|
2852
2852
|
kind;
|
|
2853
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
2854
|
+
actual;
|
|
2853
2855
|
constructor(message, details) {
|
|
2854
2856
|
super(message);
|
|
2855
2857
|
this.name = "ZipLimitError";
|
|
2856
2858
|
this.limit = details.limit;
|
|
2857
2859
|
this.kind = details.kind;
|
|
2860
|
+
this.actual = details.actual;
|
|
2858
2861
|
}
|
|
2859
2862
|
};
|
|
2860
2863
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -2877,7 +2880,7 @@ function resolveLimits(limits) {
|
|
|
2877
2880
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
2878
2881
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
2879
2882
|
label: limits.label ?? "ZIP",
|
|
2880
|
-
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
2883
|
+
fail: (message, limit, kind, actual) => create ? create(message, { limit, kind, actual }) : new ZipLimitError(message, { limit, kind, actual })
|
|
2881
2884
|
};
|
|
2882
2885
|
}
|
|
2883
2886
|
async function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
@@ -2932,7 +2935,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
2932
2935
|
r.fail(
|
|
2933
2936
|
`${r.label} part ${entry.name} inflates past its declared size`,
|
|
2934
2937
|
r.maxEntryBytes,
|
|
2935
|
-
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
2938
|
+
size > declared ? "declaredSize" : "maxEntryBytes",
|
|
2939
|
+
size
|
|
2936
2940
|
)
|
|
2937
2941
|
);
|
|
2938
2942
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
@@ -2940,7 +2944,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
2940
2944
|
r.fail(
|
|
2941
2945
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
2942
2946
|
r.maxTotalBytes,
|
|
2943
|
-
"maxTotalBytes"
|
|
2947
|
+
"maxTotalBytes",
|
|
2948
|
+
alreadyRead + size
|
|
2944
2949
|
)
|
|
2945
2950
|
);
|
|
2946
2951
|
queue.push(chunk2);
|
|
@@ -2987,7 +2992,8 @@ function guardZip(zip, limits = {}) {
|
|
|
2987
2992
|
throw r.fail(
|
|
2988
2993
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
2989
2994
|
r.maxEntries,
|
|
2990
|
-
"maxEntries"
|
|
2995
|
+
"maxEntries",
|
|
2996
|
+
entries.length
|
|
2991
2997
|
);
|
|
2992
2998
|
let declared = 0;
|
|
2993
2999
|
for (const entry of entries) {
|
|
@@ -3000,7 +3006,8 @@ function guardZip(zip, limits = {}) {
|
|
|
3000
3006
|
throw r.fail(
|
|
3001
3007
|
`${r.label} part ${entry.name} exceeds the uncompressed part size limit`,
|
|
3002
3008
|
r.maxEntryBytes,
|
|
3003
|
-
"maxEntryBytes"
|
|
3009
|
+
"maxEntryBytes",
|
|
3010
|
+
size
|
|
3004
3011
|
);
|
|
3005
3012
|
declared += size;
|
|
3006
3013
|
}
|
|
@@ -3008,7 +3015,8 @@ function guardZip(zip, limits = {}) {
|
|
|
3008
3015
|
throw r.fail(
|
|
3009
3016
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
3010
3017
|
r.maxTotalBytes,
|
|
3011
|
-
"maxTotalBytes"
|
|
3018
|
+
"maxTotalBytes",
|
|
3019
|
+
declared
|
|
3012
3020
|
);
|
|
3013
3021
|
const produced = /* @__PURE__ */ new Map();
|
|
3014
3022
|
let total = 0;
|
|
@@ -3047,7 +3055,8 @@ async function openZip(input, limits = {}) {
|
|
|
3047
3055
|
throw r.fail(
|
|
3048
3056
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
3049
3057
|
maxInput,
|
|
3050
|
-
"maxInputBytes"
|
|
3058
|
+
"maxInputBytes",
|
|
3059
|
+
bytes.byteLength
|
|
3051
3060
|
);
|
|
3052
3061
|
return guardZip(await JSZip__default.default.loadAsync(bytes), limits);
|
|
3053
3062
|
}
|
|
@@ -3057,15 +3066,27 @@ var DEFAULT_MAX_UNCOMPRESSED_BYTES = 500 * 1024 * 1024;
|
|
|
3057
3066
|
var MAX_ZIP_ENTRY_COUNT = 65536;
|
|
3058
3067
|
var ZipBombError = class extends Error {
|
|
3059
3068
|
code = "ZIP_BOMB";
|
|
3069
|
+
/** Inflated bytes declared or read when a size limit failed (a lower bound while streaming). */
|
|
3060
3070
|
uncompressedBytes;
|
|
3071
|
+
/** The value of the limit that failed. */
|
|
3061
3072
|
limit;
|
|
3073
|
+
/** Number of archive entries, when the entry-count limit failed. */
|
|
3062
3074
|
entryCount;
|
|
3075
|
+
/**
|
|
3076
|
+
* The `PptxLoadLimits` field behind this error (`maxUncompressedBytes` or
|
|
3077
|
+
* `maxEntries`); `undefined` for a forged size or an unsafe part name.
|
|
3078
|
+
*/
|
|
3079
|
+
loadLimit;
|
|
3080
|
+
/** The observed value for {@link loadLimit}, when known. */
|
|
3081
|
+
actual;
|
|
3063
3082
|
constructor(message, details) {
|
|
3064
3083
|
super(message);
|
|
3065
3084
|
this.name = "ZipBombError";
|
|
3066
3085
|
this.uncompressedBytes = details.uncompressedBytes;
|
|
3067
3086
|
this.limit = details.limit;
|
|
3068
3087
|
this.entryCount = details.entryCount;
|
|
3088
|
+
this.loadLimit = details.loadLimit;
|
|
3089
|
+
this.actual = details.actual;
|
|
3069
3090
|
}
|
|
3070
3091
|
};
|
|
3071
3092
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-
|
|
1
|
+
import { hasTextProperties, isImageLikeElement, blobUrlToDataUrl, getSubstituteFontFamily, stripXmlOrderSuffix } from './chunk-LGSBK3BV.mjs';
|
|
2
2
|
|
|
3
3
|
// pptx/converter/media-context.ts
|
|
4
4
|
var MIME_TO_EXT = {
|
|
@@ -5,15 +5,27 @@ var DEFAULT_MAX_UNCOMPRESSED_BYTES = 500 * 1024 * 1024;
|
|
|
5
5
|
var MAX_ZIP_ENTRY_COUNT = 65536;
|
|
6
6
|
var ZipBombError = class extends Error {
|
|
7
7
|
code = "ZIP_BOMB";
|
|
8
|
+
/** Inflated bytes declared or read when a size limit failed (a lower bound while streaming). */
|
|
8
9
|
uncompressedBytes;
|
|
10
|
+
/** The value of the limit that failed. */
|
|
9
11
|
limit;
|
|
12
|
+
/** Number of archive entries, when the entry-count limit failed. */
|
|
10
13
|
entryCount;
|
|
14
|
+
/**
|
|
15
|
+
* The `PptxLoadLimits` field behind this error (`maxUncompressedBytes` or
|
|
16
|
+
* `maxEntries`); `undefined` for a forged size or an unsafe part name.
|
|
17
|
+
*/
|
|
18
|
+
loadLimit;
|
|
19
|
+
/** The observed value for {@link loadLimit}, when known. */
|
|
20
|
+
actual;
|
|
11
21
|
constructor(message, details) {
|
|
12
22
|
super(message);
|
|
13
23
|
this.name = "ZipBombError";
|
|
14
24
|
this.uncompressedBytes = details.uncompressedBytes;
|
|
15
25
|
this.limit = details.limit;
|
|
16
26
|
this.entryCount = details.entryCount;
|
|
27
|
+
this.loadLimit = details.loadLimit;
|
|
28
|
+
this.actual = details.actual;
|
|
17
29
|
}
|
|
18
30
|
};
|
|
19
31
|
|
|
@@ -220,11 +232,14 @@ var ZipLimitError = class extends Error {
|
|
|
220
232
|
limit;
|
|
221
233
|
/** The check that failed (absent when the error was built without one). */
|
|
222
234
|
kind;
|
|
235
|
+
/** The observed value, when known (a lower bound for a size found while inflating). */
|
|
236
|
+
actual;
|
|
223
237
|
constructor(message, details) {
|
|
224
238
|
super(message);
|
|
225
239
|
this.name = "ZipLimitError";
|
|
226
240
|
this.limit = details.limit;
|
|
227
241
|
this.kind = details.kind;
|
|
242
|
+
this.actual = details.actual;
|
|
228
243
|
}
|
|
229
244
|
};
|
|
230
245
|
var mib = (bytes) => Math.round(bytes / 1048576);
|
|
@@ -247,7 +262,7 @@ function resolveLimits(limits) {
|
|
|
247
262
|
maxEntryBytes: limits.maxEntryBytes ?? DEFAULT_ZIP_LIMITS.maxEntryBytes,
|
|
248
263
|
maxTotalBytes: limits.maxTotalBytes ?? DEFAULT_ZIP_LIMITS.maxTotalBytes,
|
|
249
264
|
label: limits.label ?? "ZIP",
|
|
250
|
-
fail: (message, limit, kind) => create ? create(message, { limit, kind }) : new ZipLimitError(message, { limit, kind })
|
|
265
|
+
fail: (message, limit, kind, actual) => create ? create(message, { limit, kind, actual }) : new ZipLimitError(message, { limit, kind, actual })
|
|
251
266
|
};
|
|
252
267
|
}
|
|
253
268
|
async function inflateEntryGuarded(entry, alreadyRead, limits) {
|
|
@@ -302,7 +317,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
302
317
|
r.fail(
|
|
303
318
|
`${r.label} part ${entry.name} inflates past its declared size`,
|
|
304
319
|
r.maxEntryBytes,
|
|
305
|
-
size > declared ? "declaredSize" : "maxEntryBytes"
|
|
320
|
+
size > declared ? "declaredSize" : "maxEntryBytes",
|
|
321
|
+
size
|
|
306
322
|
)
|
|
307
323
|
);
|
|
308
324
|
if (alreadyRead + size > r.maxTotalBytes)
|
|
@@ -310,7 +326,8 @@ async function* streamEntryGuarded(entry, alreadyRead, limits) {
|
|
|
310
326
|
r.fail(
|
|
311
327
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
312
328
|
r.maxTotalBytes,
|
|
313
|
-
"maxTotalBytes"
|
|
329
|
+
"maxTotalBytes",
|
|
330
|
+
alreadyRead + size
|
|
314
331
|
)
|
|
315
332
|
);
|
|
316
333
|
queue.push(chunk);
|
|
@@ -357,7 +374,8 @@ function guardZip(zip, limits = {}) {
|
|
|
357
374
|
throw r.fail(
|
|
358
375
|
`${r.label} package exceeds the ${r.maxEntries.toLocaleString("en-US")} part limit`,
|
|
359
376
|
r.maxEntries,
|
|
360
|
-
"maxEntries"
|
|
377
|
+
"maxEntries",
|
|
378
|
+
entries.length
|
|
361
379
|
);
|
|
362
380
|
let declared = 0;
|
|
363
381
|
for (const entry of entries) {
|
|
@@ -370,7 +388,8 @@ function guardZip(zip, limits = {}) {
|
|
|
370
388
|
throw r.fail(
|
|
371
389
|
`${r.label} part ${entry.name} exceeds the uncompressed part size limit`,
|
|
372
390
|
r.maxEntryBytes,
|
|
373
|
-
"maxEntryBytes"
|
|
391
|
+
"maxEntryBytes",
|
|
392
|
+
size
|
|
374
393
|
);
|
|
375
394
|
declared += size;
|
|
376
395
|
}
|
|
@@ -378,7 +397,8 @@ function guardZip(zip, limits = {}) {
|
|
|
378
397
|
throw r.fail(
|
|
379
398
|
`${r.label} package exceeds the ${mib(r.maxTotalBytes)} MiB uncompressed content limit`,
|
|
380
399
|
r.maxTotalBytes,
|
|
381
|
-
"maxTotalBytes"
|
|
400
|
+
"maxTotalBytes",
|
|
401
|
+
declared
|
|
382
402
|
);
|
|
383
403
|
const produced = /* @__PURE__ */ new Map();
|
|
384
404
|
let total = 0;
|
|
@@ -417,7 +437,8 @@ async function openZip(input, limits = {}) {
|
|
|
417
437
|
throw r.fail(
|
|
418
438
|
`${r.label} package exceeds the ${mib(maxInput)} MiB compressed input limit`,
|
|
419
439
|
maxInput,
|
|
420
|
-
"maxInputBytes"
|
|
440
|
+
"maxInputBytes",
|
|
441
|
+
bytes.byteLength
|
|
421
442
|
);
|
|
422
443
|
return guardZip(await JSZip.loadAsync(bytes), limits);
|
|
423
444
|
}
|