pptx-react-viewer 1.1.6 → 1.1.7
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/{PowerPointViewer-CX0a7wz_.d.mts → PowerPointViewer-C5jGuKGB.d.mts} +3 -1
- package/dist/{PowerPointViewer-CX0a7wz_.d.ts → PowerPointViewer-C5jGuKGB.d.ts} +3 -1
- package/dist/index.d.mts +3 -2
- package/dist/index.d.ts +3 -2
- package/dist/index.js +1224 -454
- package/dist/index.mjs +1225 -455
- package/dist/pptx-viewer.css +1 -1
- package/dist/viewer/index.d.mts +6 -25
- package/dist/viewer/index.d.ts +6 -25
- package/dist/viewer/index.js +1224 -454
- package/dist/viewer/index.mjs +1225 -455
- package/node_modules/emf-converter/package.json +1 -1
- package/node_modules/mtx-decompressor/package.json +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-CTDG-t_z.d.ts → SvgExporter-BtZczTlB.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-BTkk4oNQ.d.mts → SvgExporter-D4mBWJHE.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
- package/node_modules/pptx-viewer-core/dist/cli/index.js +0 -0
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +0 -0
- package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
- package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
- package/node_modules/pptx-viewer-core/dist/index.d.mts +108 -19
- package/node_modules/pptx-viewer-core/dist/index.d.ts +108 -19
- package/node_modules/pptx-viewer-core/dist/index.js +532 -306
- package/node_modules/pptx-viewer-core/dist/index.mjs +524 -307
- package/node_modules/pptx-viewer-core/dist/{presentation-4fhI3din.d.mts → presentation-nZxgWvXq.d.mts} +40 -1
- package/node_modules/pptx-viewer-core/dist/{presentation-4fhI3din.d.ts → presentation-nZxgWvXq.d.ts} +40 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-C89Jn6S0.d.mts → text-operations-DCTGMltY.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-B9EwbptL.d.ts → text-operations-DYmhoi7U.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/package.json +1 -1
- package/package.json +4 -4
|
@@ -4271,6 +4271,96 @@ var PptxColorTransformCodec = class {
|
|
|
4271
4271
|
}
|
|
4272
4272
|
};
|
|
4273
4273
|
|
|
4274
|
+
// src/core/utils/xml-access.ts
|
|
4275
|
+
var ATTR_PREFIX = "@_";
|
|
4276
|
+
var TEXT_KEY = "#text";
|
|
4277
|
+
function isXmlObject(value) {
|
|
4278
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
4279
|
+
}
|
|
4280
|
+
function coerceString(value) {
|
|
4281
|
+
if (typeof value === "string") {
|
|
4282
|
+
return value;
|
|
4283
|
+
}
|
|
4284
|
+
if (typeof value === "number" || typeof value === "boolean") {
|
|
4285
|
+
return String(value);
|
|
4286
|
+
}
|
|
4287
|
+
return void 0;
|
|
4288
|
+
}
|
|
4289
|
+
function xmlChild(node, key) {
|
|
4290
|
+
if (!isXmlObject(node)) {
|
|
4291
|
+
return void 0;
|
|
4292
|
+
}
|
|
4293
|
+
const value = node[key];
|
|
4294
|
+
if (Array.isArray(value)) {
|
|
4295
|
+
const first = value[0];
|
|
4296
|
+
return isXmlObject(first) ? first : void 0;
|
|
4297
|
+
}
|
|
4298
|
+
return isXmlObject(value) ? value : void 0;
|
|
4299
|
+
}
|
|
4300
|
+
function xmlChildren(node, key) {
|
|
4301
|
+
if (!isXmlObject(node)) {
|
|
4302
|
+
return [];
|
|
4303
|
+
}
|
|
4304
|
+
const value = node[key];
|
|
4305
|
+
if (value === void 0 || value === null) {
|
|
4306
|
+
return [];
|
|
4307
|
+
}
|
|
4308
|
+
if (Array.isArray(value)) {
|
|
4309
|
+
return value.filter(isXmlObject);
|
|
4310
|
+
}
|
|
4311
|
+
return isXmlObject(value) ? [value] : [];
|
|
4312
|
+
}
|
|
4313
|
+
function xmlAttr(node, name) {
|
|
4314
|
+
if (!isXmlObject(node)) {
|
|
4315
|
+
return void 0;
|
|
4316
|
+
}
|
|
4317
|
+
return coerceString(node[ATTR_PREFIX + name]);
|
|
4318
|
+
}
|
|
4319
|
+
function xmlAttrNumber(node, name) {
|
|
4320
|
+
const raw = xmlAttr(node, name);
|
|
4321
|
+
if (raw === void 0) {
|
|
4322
|
+
return void 0;
|
|
4323
|
+
}
|
|
4324
|
+
const parsed = Number(raw);
|
|
4325
|
+
return Number.isFinite(parsed) ? parsed : void 0;
|
|
4326
|
+
}
|
|
4327
|
+
function xmlAttrBool(node, name) {
|
|
4328
|
+
const raw = xmlAttr(node, name);
|
|
4329
|
+
if (raw === void 0) {
|
|
4330
|
+
return void 0;
|
|
4331
|
+
}
|
|
4332
|
+
const normalized = raw.trim().toLowerCase();
|
|
4333
|
+
if (normalized === "1" || normalized === "true") {
|
|
4334
|
+
return true;
|
|
4335
|
+
}
|
|
4336
|
+
if (normalized === "0" || normalized === "false") {
|
|
4337
|
+
return false;
|
|
4338
|
+
}
|
|
4339
|
+
return void 0;
|
|
4340
|
+
}
|
|
4341
|
+
function xmlText(node) {
|
|
4342
|
+
if (typeof node === "string") {
|
|
4343
|
+
return node;
|
|
4344
|
+
}
|
|
4345
|
+
if (!isXmlObject(node)) {
|
|
4346
|
+
return void 0;
|
|
4347
|
+
}
|
|
4348
|
+
return coerceString(node[TEXT_KEY]);
|
|
4349
|
+
}
|
|
4350
|
+
function xmlPath(node, ...keys) {
|
|
4351
|
+
let current = isXmlObject(node) ? node : void 0;
|
|
4352
|
+
for (const key of keys) {
|
|
4353
|
+
if (!current) {
|
|
4354
|
+
return void 0;
|
|
4355
|
+
}
|
|
4356
|
+
current = xmlChild(current, key);
|
|
4357
|
+
}
|
|
4358
|
+
return current;
|
|
4359
|
+
}
|
|
4360
|
+
function isXmlNode(value) {
|
|
4361
|
+
return isXmlObject(value);
|
|
4362
|
+
}
|
|
4363
|
+
|
|
4274
4364
|
// src/core/core/builders/PptxGradientStyleCodec.ts
|
|
4275
4365
|
var PptxGradientStyleCodec = class {
|
|
4276
4366
|
context;
|
|
@@ -4278,7 +4368,9 @@ var PptxGradientStyleCodec = class {
|
|
|
4278
4368
|
this.context = context;
|
|
4279
4369
|
}
|
|
4280
4370
|
extractGradientOpacity(gradFill) {
|
|
4281
|
-
const gradientStops = this.context.ensureArray(
|
|
4371
|
+
const gradientStops = this.context.ensureArray(
|
|
4372
|
+
xmlChild(gradFill, "a:gsLst")?.["a:gs"]
|
|
4373
|
+
);
|
|
4282
4374
|
if (gradientStops.length === 0) {
|
|
4283
4375
|
return void 0;
|
|
4284
4376
|
}
|
|
@@ -4290,7 +4382,9 @@ var PptxGradientStyleCodec = class {
|
|
|
4290
4382
|
return this.context.clampUnitInterval(opacityTotal / opacities.length);
|
|
4291
4383
|
}
|
|
4292
4384
|
extractGradientStops(gradFill) {
|
|
4293
|
-
const gradientStops = this.context.ensureArray(
|
|
4385
|
+
const gradientStops = this.context.ensureArray(
|
|
4386
|
+
xmlChild(gradFill, "a:gsLst")?.["a:gs"]
|
|
4387
|
+
);
|
|
4294
4388
|
if (gradientStops.length === 0) {
|
|
4295
4389
|
return [];
|
|
4296
4390
|
}
|
|
@@ -4581,7 +4675,9 @@ var PptxGradientStyleCodec = class {
|
|
|
4581
4675
|
);
|
|
4582
4676
|
}
|
|
4583
4677
|
extractStopsSorted(gradFill) {
|
|
4584
|
-
const gradientStops = this.context.ensureArray(
|
|
4678
|
+
const gradientStops = this.context.ensureArray(
|
|
4679
|
+
xmlChild(gradFill, "a:gsLst")?.["a:gs"]
|
|
4680
|
+
);
|
|
4585
4681
|
if (gradientStops.length === 0) {
|
|
4586
4682
|
return [];
|
|
4587
4683
|
}
|
|
@@ -6346,7 +6442,9 @@ function applyCellFillStyle(cellProperties, style, context) {
|
|
|
6346
6442
|
if (context.extractGradientFillCss) {
|
|
6347
6443
|
style.gradientFillCss = context.extractGradientFillCss(gradFill);
|
|
6348
6444
|
}
|
|
6349
|
-
const gradStops = context.ensureArray(
|
|
6445
|
+
const gradStops = context.ensureArray(
|
|
6446
|
+
gradFill?.["a:gsLst"]?.["a:gs"]
|
|
6447
|
+
);
|
|
6350
6448
|
if (gradStops.length > 0 && !style.backgroundColor) {
|
|
6351
6449
|
const firstStopColor = context.parseColor(gradStops[0]);
|
|
6352
6450
|
if (firstStopColor) {
|
|
@@ -6556,11 +6654,11 @@ function applyCellTextFormat(tableCell, style, context) {
|
|
|
6556
6654
|
}
|
|
6557
6655
|
function applyRunProperties(runProperties, style, context) {
|
|
6558
6656
|
let hasStyle = false;
|
|
6559
|
-
if (runProperties["@_b"] === "1"
|
|
6657
|
+
if (runProperties["@_b"] === "1") {
|
|
6560
6658
|
style.bold = true;
|
|
6561
6659
|
hasStyle = true;
|
|
6562
6660
|
}
|
|
6563
|
-
if (runProperties["@_i"] === "1"
|
|
6661
|
+
if (runProperties["@_i"] === "1") {
|
|
6564
6662
|
style.italic = true;
|
|
6565
6663
|
hasStyle = true;
|
|
6566
6664
|
}
|
|
@@ -6666,8 +6764,8 @@ var PptxTableDataParser = class {
|
|
|
6666
6764
|
style: this.extractTableCellStyleFromXml(cellNode),
|
|
6667
6765
|
gridSpan: cellNode["@_gridSpan"] ? parseInt(String(cellNode["@_gridSpan"]), 10) : void 0,
|
|
6668
6766
|
rowSpan: cellNode["@_rowSpan"] ? parseInt(String(cellNode["@_rowSpan"]), 10) : void 0,
|
|
6669
|
-
vMerge: cellNode["@_vMerge"] === "1"
|
|
6670
|
-
hMerge: cellNode["@_hMerge"] === "1"
|
|
6767
|
+
vMerge: cellNode["@_vMerge"] === "1",
|
|
6768
|
+
hMerge: cellNode["@_hMerge"] === "1",
|
|
6671
6769
|
...extraAttributes ? { extraAttributes } : {}
|
|
6672
6770
|
};
|
|
6673
6771
|
})
|
|
@@ -6675,16 +6773,16 @@ var PptxTableDataParser = class {
|
|
|
6675
6773
|
});
|
|
6676
6774
|
const bandRowCycle = this.extractBandCycle(tableProperties, "bandRowCycle");
|
|
6677
6775
|
const bandColCycle = this.extractBandCycle(tableProperties, "bandColCycle");
|
|
6678
|
-
const rtl = tableProperties["@_rtl"] === "1"
|
|
6776
|
+
const rtl = tableProperties["@_rtl"] === "1";
|
|
6679
6777
|
return {
|
|
6680
6778
|
rows,
|
|
6681
6779
|
columnWidths,
|
|
6682
|
-
bandedRows: tableProperties["@_bandRow"] === "1"
|
|
6683
|
-
firstRowHeader: tableProperties["@_firstRow"] === "1"
|
|
6684
|
-
bandedColumns: tableProperties["@_bandCol"] === "1"
|
|
6685
|
-
lastRow: tableProperties["@_lastRow"] === "1"
|
|
6686
|
-
firstCol: tableProperties["@_firstCol"] === "1"
|
|
6687
|
-
lastCol: tableProperties["@_lastCol"] === "1"
|
|
6780
|
+
bandedRows: tableProperties["@_bandRow"] === "1",
|
|
6781
|
+
firstRowHeader: tableProperties["@_firstRow"] === "1",
|
|
6782
|
+
bandedColumns: tableProperties["@_bandCol"] === "1",
|
|
6783
|
+
lastRow: tableProperties["@_lastRow"] === "1",
|
|
6784
|
+
firstCol: tableProperties["@_firstCol"] === "1",
|
|
6785
|
+
lastCol: tableProperties["@_lastCol"] === "1",
|
|
6688
6786
|
tableStyleId,
|
|
6689
6787
|
bandRowCycle: bandRowCycle ?? 1,
|
|
6690
6788
|
bandColCycle: bandColCycle ?? 1,
|
|
@@ -6769,7 +6867,9 @@ var PptxTableDataParser = class {
|
|
|
6769
6867
|
return Object.keys(result).length > 0 ? result : void 0;
|
|
6770
6868
|
}
|
|
6771
6869
|
extractTableCellText(tableCell) {
|
|
6772
|
-
const paragraphs = this.context.ensureArray(
|
|
6870
|
+
const paragraphs = this.context.ensureArray(
|
|
6871
|
+
tableCell?.["a:txBody"]?.["a:p"]
|
|
6872
|
+
);
|
|
6773
6873
|
const lines = [];
|
|
6774
6874
|
for (const paragraph of paragraphs) {
|
|
6775
6875
|
const runs = this.context.ensureArray(paragraph["a:r"]);
|
|
@@ -7277,7 +7377,9 @@ var PptxConnectorParser = class {
|
|
|
7277
7377
|
if (!offset || !extent) {
|
|
7278
7378
|
return null;
|
|
7279
7379
|
}
|
|
7280
|
-
const shapeType = String(
|
|
7380
|
+
const shapeType = String(
|
|
7381
|
+
shapeProperties?.["a:prstGeom"]?.["@_prst"] || "straightConnector1"
|
|
7382
|
+
);
|
|
7281
7383
|
const shapeAdjustments = this.context.parseGeometryAdjustments(
|
|
7282
7384
|
shapeProperties?.["a:prstGeom"]
|
|
7283
7385
|
);
|
|
@@ -9270,7 +9372,7 @@ function extractChildMotionValues(childTnList) {
|
|
|
9270
9372
|
}
|
|
9271
9373
|
const zoom = scaleNode["@_zoomContents"];
|
|
9272
9374
|
if (zoom !== void 0) {
|
|
9273
|
-
scaleZoomContents = zoom === "1" || zoom === "true"
|
|
9375
|
+
scaleZoomContents = zoom === "1" || zoom === "true";
|
|
9274
9376
|
}
|
|
9275
9377
|
}
|
|
9276
9378
|
return {
|
|
@@ -9347,7 +9449,7 @@ function decodeKeyframeValue(valNode) {
|
|
|
9347
9449
|
const boolVal = valNode["p:boolVal"];
|
|
9348
9450
|
if (boolVal && boolVal["@_val"] !== void 0) {
|
|
9349
9451
|
const raw = boolVal["@_val"];
|
|
9350
|
-
const value = raw ===
|
|
9452
|
+
const value = raw === "1" || raw === "true";
|
|
9351
9453
|
return { value, valueType: "bool" };
|
|
9352
9454
|
}
|
|
9353
9455
|
const intVal = valNode["p:intVal"];
|
|
@@ -9400,7 +9502,7 @@ function extractRepeatInfo(cTn) {
|
|
|
9400
9502
|
const repeatToken = String(rawRepeat);
|
|
9401
9503
|
repeatCount = repeatToken === "indefinite" ? Infinity : Number.parseInt(repeatToken, 10) / 1e3;
|
|
9402
9504
|
}
|
|
9403
|
-
if (cTn["@_autoRev"] === "1"
|
|
9505
|
+
if (cTn["@_autoRev"] === "1") {
|
|
9404
9506
|
autoReverse = true;
|
|
9405
9507
|
}
|
|
9406
9508
|
return { repeatCount, autoReverse };
|
|
@@ -9557,10 +9659,10 @@ function extractAfterEffect(cTn) {
|
|
|
9557
9659
|
if (raw === void 0) {
|
|
9558
9660
|
return void 0;
|
|
9559
9661
|
}
|
|
9560
|
-
if (raw === "1" || raw ===
|
|
9662
|
+
if (raw === "1" || raw === "true") {
|
|
9561
9663
|
return true;
|
|
9562
9664
|
}
|
|
9563
|
-
if (raw === "0" || raw ===
|
|
9665
|
+
if (raw === "0" || raw === "false") {
|
|
9564
9666
|
return false;
|
|
9565
9667
|
}
|
|
9566
9668
|
return void 0;
|
|
@@ -9570,11 +9672,11 @@ function ensureArray2(value) {
|
|
|
9570
9672
|
return [];
|
|
9571
9673
|
}
|
|
9572
9674
|
if (!Array.isArray(value)) {
|
|
9573
|
-
return
|
|
9675
|
+
return isXmlObject2(value) ? [value] : [];
|
|
9574
9676
|
}
|
|
9575
|
-
return value.filter((entry) =>
|
|
9677
|
+
return value.filter((entry) => isXmlObject2(entry));
|
|
9576
9678
|
}
|
|
9577
|
-
function
|
|
9679
|
+
function isXmlObject2(value) {
|
|
9578
9680
|
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
9579
9681
|
}
|
|
9580
9682
|
var VALID_CONDITION_EVENTS = /* @__PURE__ */ new Set([
|
|
@@ -9825,7 +9927,7 @@ function extractIterate(cTn) {
|
|
|
9825
9927
|
}
|
|
9826
9928
|
const rawType = String(iterate["@_type"] || "el").toLowerCase();
|
|
9827
9929
|
const type = rawType === "lt" ? "lt" : rawType === "wd" ? "wd" : "el";
|
|
9828
|
-
const backwards = iterate["@_backwards"] === "1"
|
|
9930
|
+
const backwards = iterate["@_backwards"] === "1" ? true : void 0;
|
|
9829
9931
|
const tmPctNode = iterate["p:tmPct"];
|
|
9830
9932
|
const tmAbsNode = iterate["p:tmAbs"];
|
|
9831
9933
|
let tmPct;
|
|
@@ -9880,7 +9982,7 @@ function extractOleChartBuilds(bldLst) {
|
|
|
9880
9982
|
spid: String(e["@_spid"]),
|
|
9881
9983
|
grpId: String(e["@_grpId"] || "0"),
|
|
9882
9984
|
bld: String(e["@_bld"] || "allAtOnce"),
|
|
9883
|
-
animBg: e["@_animBg"] === "1"
|
|
9985
|
+
animBg: e["@_animBg"] === "1" ? true : void 0
|
|
9884
9986
|
}));
|
|
9885
9987
|
}
|
|
9886
9988
|
|
|
@@ -11068,7 +11170,7 @@ function updateEffectNodeAttributes(cTn, anim, currentPresetClass) {
|
|
|
11068
11170
|
if (stCondList && anim.delayMs !== void 0) {
|
|
11069
11171
|
const conditions = ensureArray2(stCondList["p:cond"]);
|
|
11070
11172
|
for (const cond of conditions) {
|
|
11071
|
-
if (
|
|
11173
|
+
if (isXmlObject2(cond)) {
|
|
11072
11174
|
cond["@_delay"] = String(anim.delayMs);
|
|
11073
11175
|
}
|
|
11074
11176
|
}
|
|
@@ -12140,6 +12242,59 @@ ${nextText}` : nextText;
|
|
|
12140
12242
|
}
|
|
12141
12243
|
};
|
|
12142
12244
|
|
|
12245
|
+
// src/core/utils/layout-display-name.ts
|
|
12246
|
+
var TYPE_LABELS = {
|
|
12247
|
+
title: "Title Slide",
|
|
12248
|
+
tx: "Title and Text",
|
|
12249
|
+
twoColTx: "Two Column Text",
|
|
12250
|
+
tbl: "Title and Table",
|
|
12251
|
+
txOverObj: "Text Over Object",
|
|
12252
|
+
obj: "Title and Content",
|
|
12253
|
+
txAndObj: "Text and Content",
|
|
12254
|
+
objAndTx: "Content and Text",
|
|
12255
|
+
objOverTx: "Object Over Text",
|
|
12256
|
+
twoObj: "Two Content",
|
|
12257
|
+
twoObjAndObj: "Two Content and Content",
|
|
12258
|
+
objAndTwoObj: "Content and Two Content",
|
|
12259
|
+
twoObjAndTx: "Two Content and Text",
|
|
12260
|
+
twoObjOverTx: "Two Content Over Text",
|
|
12261
|
+
fourObj: "Four Content",
|
|
12262
|
+
twoTxTwoObj: "Comparison",
|
|
12263
|
+
blank: "Blank",
|
|
12264
|
+
vertTx: "Vertical Text",
|
|
12265
|
+
clipArtAndTx: "Clip Art and Text",
|
|
12266
|
+
clipArtAndVertTx: "Clip Art and Vertical Text",
|
|
12267
|
+
vertTitleAndTx: "Vertical Title and Text",
|
|
12268
|
+
vertTitleAndTxOverChart: "Vertical Title and Text Over Chart",
|
|
12269
|
+
titleOnly: "Title Only",
|
|
12270
|
+
objTx: "Content with Caption",
|
|
12271
|
+
picTx: "Picture with Caption",
|
|
12272
|
+
secHead: "Section Header",
|
|
12273
|
+
objOnly: "Object Only",
|
|
12274
|
+
mediaAndTx: "Media and Text",
|
|
12275
|
+
dgm: "Diagram",
|
|
12276
|
+
chart: "Chart",
|
|
12277
|
+
cust: "Custom"
|
|
12278
|
+
};
|
|
12279
|
+
function looksLikePath(value) {
|
|
12280
|
+
return /[\\/]/.test(value) || /\.xml$/i.test(value);
|
|
12281
|
+
}
|
|
12282
|
+
function fallbackFromPath(path) {
|
|
12283
|
+
const match = /slideLayout(\d+)\.xml$/i.exec(path);
|
|
12284
|
+
return match ? `Slide Layout ${match[1]}` : "Slide Layout";
|
|
12285
|
+
}
|
|
12286
|
+
function resolveLayoutDisplayName(input) {
|
|
12287
|
+
const trimmed = (input.name ?? "").trim();
|
|
12288
|
+
if (trimmed && !looksLikePath(trimmed)) {
|
|
12289
|
+
return trimmed;
|
|
12290
|
+
}
|
|
12291
|
+
const type = (input.type ?? "").trim();
|
|
12292
|
+
if (type && TYPE_LABELS[type]) {
|
|
12293
|
+
return TYPE_LABELS[type];
|
|
12294
|
+
}
|
|
12295
|
+
return fallbackFromPath(input.path);
|
|
12296
|
+
}
|
|
12297
|
+
|
|
12143
12298
|
// src/core/utils/signature-constants.ts
|
|
12144
12299
|
var DIGITAL_SIGNATURE_ORIGIN_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/origin";
|
|
12145
12300
|
var DIGITAL_SIGNATURE_REL_TYPE = "http://schemas.openxmlformats.org/package/2006/relationships/digital-signature/signature";
|
|
@@ -14128,11 +14283,11 @@ function parseSeriesTrendlines(seriesNode, xmlLookup, colorParser) {
|
|
|
14128
14283
|
result.intercept = interceptVal;
|
|
14129
14284
|
}
|
|
14130
14285
|
const dispRSq = xmlLookup.getChildByLocalName(node, "dispRSqr");
|
|
14131
|
-
if (dispRSq?.["@_val"] === "1"
|
|
14286
|
+
if (dispRSq?.["@_val"] === "1") {
|
|
14132
14287
|
result.displayRSq = true;
|
|
14133
14288
|
}
|
|
14134
14289
|
const dispEq = xmlLookup.getChildByLocalName(node, "dispEq");
|
|
14135
|
-
if (dispEq?.["@_val"] === "1"
|
|
14290
|
+
if (dispEq?.["@_val"] === "1") {
|
|
14136
14291
|
result.displayEq = true;
|
|
14137
14292
|
}
|
|
14138
14293
|
const spPr = xmlLookup.getChildByLocalName(node, "spPr");
|
|
@@ -14190,22 +14345,22 @@ function parseDataTable(plotArea, xmlLookup) {
|
|
|
14190
14345
|
const result = {};
|
|
14191
14346
|
let hasProps = false;
|
|
14192
14347
|
const hBorder = xmlLookup.getChildByLocalName(dTable, "showHorzBorder");
|
|
14193
|
-
if (hBorder?.["@_val"] === "1"
|
|
14348
|
+
if (hBorder?.["@_val"] === "1") {
|
|
14194
14349
|
result.showHorzBorder = true;
|
|
14195
14350
|
hasProps = true;
|
|
14196
14351
|
}
|
|
14197
14352
|
const vBorder = xmlLookup.getChildByLocalName(dTable, "showVertBorder");
|
|
14198
|
-
if (vBorder?.["@_val"] === "1"
|
|
14353
|
+
if (vBorder?.["@_val"] === "1") {
|
|
14199
14354
|
result.showVertBorder = true;
|
|
14200
14355
|
hasProps = true;
|
|
14201
14356
|
}
|
|
14202
14357
|
const outline = xmlLookup.getChildByLocalName(dTable, "showOutline");
|
|
14203
|
-
if (outline?.["@_val"] === "1"
|
|
14358
|
+
if (outline?.["@_val"] === "1") {
|
|
14204
14359
|
result.showOutline = true;
|
|
14205
14360
|
hasProps = true;
|
|
14206
14361
|
}
|
|
14207
14362
|
const keys = xmlLookup.getChildByLocalName(dTable, "showKeys");
|
|
14208
|
-
if (keys?.["@_val"] === "1"
|
|
14363
|
+
if (keys?.["@_val"] === "1") {
|
|
14209
14364
|
result.showKeys = true;
|
|
14210
14365
|
hasProps = true;
|
|
14211
14366
|
}
|
|
@@ -14346,7 +14501,7 @@ function parseSeriesDataPoints(seriesNode, xmlLookup, colorParser) {
|
|
|
14346
14501
|
result.explosion = explosion;
|
|
14347
14502
|
}
|
|
14348
14503
|
const invertNode = xmlLookup.getChildByLocalName(node, "invertIfNegative");
|
|
14349
|
-
if (invertNode?.["@_val"] === "1"
|
|
14504
|
+
if (invertNode?.["@_val"] === "1") {
|
|
14350
14505
|
result.invertIfNegative = true;
|
|
14351
14506
|
}
|
|
14352
14507
|
const markerResult = parseMarker(
|
|
@@ -14382,9 +14537,9 @@ function parseSeriesDataLabels(seriesNode, xmlLookup) {
|
|
|
14382
14537
|
];
|
|
14383
14538
|
for (const [xmlName, propName] of boolFields) {
|
|
14384
14539
|
const child = xmlLookup.getChildByLocalName(node, xmlName);
|
|
14385
|
-
if (child?.["@_val"] === "1"
|
|
14540
|
+
if (child?.["@_val"] === "1") {
|
|
14386
14541
|
result[propName] = true;
|
|
14387
|
-
} else if (child?.["@_val"] === "0"
|
|
14542
|
+
} else if (child?.["@_val"] === "0") {
|
|
14388
14543
|
result[propName] = false;
|
|
14389
14544
|
}
|
|
14390
14545
|
}
|
|
@@ -14489,7 +14644,7 @@ function parseSingleAxis(axisNode, axisType, xmlLookup, colorParser) {
|
|
|
14489
14644
|
if (formatCode) {
|
|
14490
14645
|
result.numFmt = {
|
|
14491
14646
|
formatCode,
|
|
14492
|
-
sourceLinked: numFmtNode["@_sourceLinked"] === "1"
|
|
14647
|
+
sourceLinked: numFmtNode["@_sourceLinked"] === "1"
|
|
14493
14648
|
};
|
|
14494
14649
|
}
|
|
14495
14650
|
}
|
|
@@ -14527,7 +14682,7 @@ function parseSingleAxis(axisNode, axisType, xmlLookup, colorParser) {
|
|
|
14527
14682
|
const deleteNode = xmlLookup.getChildByLocalName(axisNode, "delete");
|
|
14528
14683
|
if (deleteNode) {
|
|
14529
14684
|
const delVal = deleteNode["@_val"];
|
|
14530
|
-
if (delVal === "1"
|
|
14685
|
+
if (delVal === "1") {
|
|
14531
14686
|
result.deleted = true;
|
|
14532
14687
|
}
|
|
14533
14688
|
}
|
|
@@ -14652,7 +14807,7 @@ function parseTxPr(txPrNode, xmlLookup, colorParser, target) {
|
|
|
14652
14807
|
if (sz !== void 0) {
|
|
14653
14808
|
target.fontSize = sz / 100;
|
|
14654
14809
|
}
|
|
14655
|
-
if (defRPr["@_b"] === "1"
|
|
14810
|
+
if (defRPr["@_b"] === "1") {
|
|
14656
14811
|
target.fontBold = true;
|
|
14657
14812
|
}
|
|
14658
14813
|
const latin = xmlLookup.getChildByLocalName(defRPr, "latin");
|
|
@@ -16107,7 +16262,7 @@ function parseViewProperties(viewPrRoot) {
|
|
|
16107
16262
|
}
|
|
16108
16263
|
const showComments = viewPrRoot["@_showComments"];
|
|
16109
16264
|
if (showComments !== void 0) {
|
|
16110
|
-
props.showComments = showComments !== "0"
|
|
16265
|
+
props.showComments = showComments !== "0";
|
|
16111
16266
|
}
|
|
16112
16267
|
const normalViewPr = viewPrRoot["p:normalViewPr"];
|
|
16113
16268
|
if (normalViewPr) {
|
|
@@ -16154,11 +16309,11 @@ function parseNormalViewPr(node) {
|
|
|
16154
16309
|
const result = {};
|
|
16155
16310
|
const showOutlineIcons = node["@_showOutlineIcons"];
|
|
16156
16311
|
if (showOutlineIcons !== void 0) {
|
|
16157
|
-
result.showOutlineIcons = showOutlineIcons !== "0"
|
|
16312
|
+
result.showOutlineIcons = showOutlineIcons !== "0";
|
|
16158
16313
|
}
|
|
16159
16314
|
const snapVertSplitter = node["@_snapVertSplitter"];
|
|
16160
16315
|
if (snapVertSplitter !== void 0) {
|
|
16161
|
-
result.snapVertSplitter = snapVertSplitter === "1"
|
|
16316
|
+
result.snapVertSplitter = snapVertSplitter === "1";
|
|
16162
16317
|
}
|
|
16163
16318
|
const vertBarState = String(node["@_vertBarState"] || "").trim();
|
|
16164
16319
|
if (vertBarState.length > 0) {
|
|
@@ -16170,7 +16325,7 @@ function parseNormalViewPr(node) {
|
|
|
16170
16325
|
}
|
|
16171
16326
|
const preferSingleView = node["@_preferSingleView"];
|
|
16172
16327
|
if (preferSingleView !== void 0) {
|
|
16173
|
-
result.preferSingleView = preferSingleView === "1"
|
|
16328
|
+
result.preferSingleView = preferSingleView === "1";
|
|
16174
16329
|
}
|
|
16175
16330
|
const restoredLeft = node["p:restoredLeft"];
|
|
16176
16331
|
if (restoredLeft) {
|
|
@@ -16187,22 +16342,22 @@ function parseRestoredRegion(node) {
|
|
|
16187
16342
|
const autoAdjust = node["@_autoAdjust"];
|
|
16188
16343
|
return {
|
|
16189
16344
|
sz: Number.isFinite(sz) ? sz : 0,
|
|
16190
|
-
autoAdjust: autoAdjust !== void 0 ? autoAdjust !== "0"
|
|
16345
|
+
autoAdjust: autoAdjust !== void 0 ? autoAdjust !== "0" : void 0
|
|
16191
16346
|
};
|
|
16192
16347
|
}
|
|
16193
16348
|
function parseCommonSlideViewPr(node) {
|
|
16194
16349
|
const result = {};
|
|
16195
16350
|
const snapToGrid = node["@_snapToGrid"];
|
|
16196
16351
|
if (snapToGrid !== void 0) {
|
|
16197
|
-
result.snapToGrid = snapToGrid !== "0"
|
|
16352
|
+
result.snapToGrid = snapToGrid !== "0";
|
|
16198
16353
|
}
|
|
16199
16354
|
const snapToObjects = node["@_snapToObjects"];
|
|
16200
16355
|
if (snapToObjects !== void 0) {
|
|
16201
|
-
result.snapToObjects = snapToObjects !== "0"
|
|
16356
|
+
result.snapToObjects = snapToObjects !== "0";
|
|
16202
16357
|
}
|
|
16203
16358
|
const showGuides = node["@_showGuides"];
|
|
16204
16359
|
if (showGuides !== void 0) {
|
|
16205
|
-
result.showGuides = showGuides !== "0"
|
|
16360
|
+
result.showGuides = showGuides !== "0";
|
|
16206
16361
|
}
|
|
16207
16362
|
const origin = node["p:origin"];
|
|
16208
16363
|
if (origin) {
|
|
@@ -26850,15 +27005,15 @@ async function repairPptx(buffer) {
|
|
|
26850
27005
|
}
|
|
26851
27006
|
await addMissingRelationships(zip, parser, repairs);
|
|
26852
27007
|
const xmlPaths = Object.keys(zip.files).filter((p) => p.endsWith(".xml") && !zip.files[p].dir);
|
|
26853
|
-
for (const
|
|
26854
|
-
const xml = await readZipText(zip,
|
|
27008
|
+
for (const xmlPath2 of xmlPaths) {
|
|
27009
|
+
const xml = await readZipText(zip, xmlPath2);
|
|
26855
27010
|
if (!xml) {
|
|
26856
27011
|
continue;
|
|
26857
27012
|
}
|
|
26858
27013
|
const { fixed, didFix } = fixMalformedXml(xml);
|
|
26859
27014
|
if (didFix) {
|
|
26860
|
-
zip.file(
|
|
26861
|
-
repairs.push(`Fixed malformed XML in "${
|
|
27015
|
+
zip.file(xmlPath2, fixed);
|
|
27016
|
+
repairs.push(`Fixed malformed XML in "${xmlPath2}"`);
|
|
26862
27017
|
}
|
|
26863
27018
|
}
|
|
26864
27019
|
const repairedBuffer = await zip.generateAsync({ type: "arraybuffer" });
|
|
@@ -30119,7 +30274,7 @@ function parseShowProperties(showPr) {
|
|
|
30119
30274
|
}
|
|
30120
30275
|
}
|
|
30121
30276
|
}
|
|
30122
|
-
props.loopContinuously = showPr["@_loop"] === "1"
|
|
30277
|
+
props.loopContinuously = showPr["@_loop"] === "1";
|
|
30123
30278
|
props.showWithNarration = showPr["@_showNarration"] !== "0";
|
|
30124
30279
|
props.showWithAnimation = showPr["@_showAnimation"] !== "0";
|
|
30125
30280
|
if (showPr["@_useTimings"] === "0") {
|
|
@@ -30850,15 +31005,15 @@ var PptxHandlerRuntime3 = class extends PptxHandlerRuntime2 {
|
|
|
30850
31005
|
}
|
|
30851
31006
|
getCnvPrNode(shape, key) {
|
|
30852
31007
|
if (key === "p:pic") {
|
|
30853
|
-
return shape
|
|
31008
|
+
return xmlPath(shape, "p:nvPicPr", "p:cNvPr");
|
|
30854
31009
|
}
|
|
30855
31010
|
if (key === "p:cxnSp") {
|
|
30856
|
-
return shape
|
|
31011
|
+
return xmlPath(shape, "p:nvCxnSpPr", "p:cNvPr");
|
|
30857
31012
|
}
|
|
30858
31013
|
if (key === "p:graphicFrame") {
|
|
30859
|
-
return shape
|
|
31014
|
+
return xmlPath(shape, "p:nvGraphicFramePr", "p:cNvPr");
|
|
30860
31015
|
}
|
|
30861
|
-
return shape
|
|
31016
|
+
return xmlPath(shape, "p:nvSpPr", "p:cNvPr");
|
|
30862
31017
|
}
|
|
30863
31018
|
/**
|
|
30864
31019
|
* Serialize shape-level actions back onto the `p:cNvPr` node, updating
|
|
@@ -30888,13 +31043,13 @@ var PptxHandlerRuntime3 = class extends PptxHandlerRuntime2 {
|
|
|
30888
31043
|
let container;
|
|
30889
31044
|
let lockTag;
|
|
30890
31045
|
if (key === "p:pic") {
|
|
30891
|
-
container = shape
|
|
31046
|
+
container = xmlPath(shape, "p:nvPicPr", "p:cNvPicPr");
|
|
30892
31047
|
lockTag = "a:picLocks";
|
|
30893
31048
|
} else if (key === "p:cxnSp") {
|
|
30894
|
-
container = shape
|
|
31049
|
+
container = xmlPath(shape, "p:nvCxnSpPr", "p:cNvCxnSpPr");
|
|
30895
31050
|
lockTag = "a:cxnSpLocks";
|
|
30896
31051
|
} else if (key === "p:sp") {
|
|
30897
|
-
container = shape
|
|
31052
|
+
container = xmlPath(shape, "p:nvSpPr", "p:cNvSpPr");
|
|
30898
31053
|
lockTag = "a:spLocks";
|
|
30899
31054
|
} else {
|
|
30900
31055
|
return;
|
|
@@ -31315,13 +31470,13 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
31315
31470
|
effects.blur = blurEffect;
|
|
31316
31471
|
hasAny = true;
|
|
31317
31472
|
}
|
|
31318
|
-
const extLst = blip
|
|
31473
|
+
const extLst = xmlChild(blip, "a:extLst");
|
|
31319
31474
|
if (extLst) {
|
|
31320
31475
|
const exts = this.ensureArray(extLst["a:ext"]);
|
|
31321
31476
|
for (const ext of exts) {
|
|
31322
|
-
const uri =
|
|
31477
|
+
const uri = xmlAttr(ext, "uri") || "";
|
|
31323
31478
|
if (uri === "{BEBA8EAE-BF5A-486C-A8C5-ECC9F3942E4B}") {
|
|
31324
|
-
const imgEffect = ext
|
|
31479
|
+
const imgEffect = xmlChild(ext, "a14:imgEffect") || xmlChild(ext, "a14:imgLayer");
|
|
31325
31480
|
if (imgEffect) {
|
|
31326
31481
|
const keys = Object.keys(imgEffect).filter((k) => k.startsWith("a14:artistic"));
|
|
31327
31482
|
if (keys.length > 0) {
|
|
@@ -31356,17 +31511,17 @@ var PptxHandlerRuntime5 = class extends PptxHandlerRuntime4 {
|
|
|
31356
31511
|
if (!blip) {
|
|
31357
31512
|
return void 0;
|
|
31358
31513
|
}
|
|
31359
|
-
const extLst = blip
|
|
31514
|
+
const extLst = xmlChild(blip, "a:extLst");
|
|
31360
31515
|
if (!extLst) {
|
|
31361
31516
|
return void 0;
|
|
31362
31517
|
}
|
|
31363
31518
|
const exts = this.ensureArray(extLst["a:ext"]);
|
|
31364
31519
|
for (const ext of exts) {
|
|
31365
|
-
const uri =
|
|
31520
|
+
const uri = xmlAttr(ext, "uri") || "";
|
|
31366
31521
|
if (uri === "{96DAC541-7B7A-43D3-8B79-37D633B846F1}") {
|
|
31367
|
-
const svgBlip = ext
|
|
31522
|
+
const svgBlip = xmlChild(ext, "asvg:svgBlip") || xmlChild(ext, "a16:svgBlip");
|
|
31368
31523
|
if (svgBlip) {
|
|
31369
|
-
return
|
|
31524
|
+
return xmlAttr(svgBlip, "r:embed") || xmlAttr(svgBlip, "r:link") || "";
|
|
31370
31525
|
}
|
|
31371
31526
|
}
|
|
31372
31527
|
}
|
|
@@ -31495,7 +31650,7 @@ function parseCtnMediaTiming(cTn, mediaTag) {
|
|
|
31495
31650
|
loop = true;
|
|
31496
31651
|
}
|
|
31497
31652
|
const nodeType = cTn["@_nodeType"];
|
|
31498
|
-
if (nodeType === "1" || nodeType === "2"
|
|
31653
|
+
if (nodeType === "1" || nodeType === "2") {
|
|
31499
31654
|
autoPlay = true;
|
|
31500
31655
|
}
|
|
31501
31656
|
const dur = cTn["@_dur"];
|
|
@@ -31616,7 +31771,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
31616
31771
|
}
|
|
31617
31772
|
const cTn2 = cMediaNode["p:cTn"];
|
|
31618
31773
|
const timing = parseCtnMediaTiming(cTn2, mediaTag);
|
|
31619
|
-
const fullScreen = cMediaNode["@_fullScrn"] === "1"
|
|
31774
|
+
const fullScreen = cMediaNode["@_fullScrn"] === "1";
|
|
31620
31775
|
let volume;
|
|
31621
31776
|
const volRaw = cMediaNode["@_vol"];
|
|
31622
31777
|
if (volRaw !== void 0) {
|
|
@@ -31625,7 +31780,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
|
|
|
31625
31780
|
volume = Math.max(0, Math.min(1, volVal / 1e5));
|
|
31626
31781
|
}
|
|
31627
31782
|
}
|
|
31628
|
-
const hideWhenNotPlaying = cMediaNode["@_showWhenStopped"] === "0"
|
|
31783
|
+
const hideWhenNotPlaying = cMediaNode["@_showWhenStopped"] === "0";
|
|
31629
31784
|
let posterFramePath;
|
|
31630
31785
|
const posterRId = cMediaNode["@_posterFrame"];
|
|
31631
31786
|
if (posterRId) {
|
|
@@ -32258,11 +32413,11 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32258
32413
|
if (!bg) {
|
|
32259
32414
|
return void 0;
|
|
32260
32415
|
}
|
|
32261
|
-
const bgPr = bg
|
|
32416
|
+
const bgPr = xmlChild(bg, "p:bgPr");
|
|
32262
32417
|
if (bgPr) {
|
|
32263
|
-
return this.parseColor(bgPr
|
|
32418
|
+
return this.parseColor(xmlChild(bgPr, "a:solidFill"));
|
|
32264
32419
|
}
|
|
32265
|
-
const bgRef = bg
|
|
32420
|
+
const bgRef = xmlChild(bg, "p:bgRef");
|
|
32266
32421
|
if (bgRef) {
|
|
32267
32422
|
return this.parseColor(bgRef);
|
|
32268
32423
|
}
|
|
@@ -32278,13 +32433,12 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32278
32433
|
const shapes = this.ensureArray(spTree["p:sp"]);
|
|
32279
32434
|
const result = [];
|
|
32280
32435
|
for (const sp of shapes) {
|
|
32281
|
-
const
|
|
32282
|
-
const ph = nvPr?.["p:ph"];
|
|
32436
|
+
const ph = xmlPath(sp, "p:nvSpPr", "p:nvPr", "p:ph");
|
|
32283
32437
|
if (!ph) {
|
|
32284
32438
|
continue;
|
|
32285
32439
|
}
|
|
32286
|
-
const type =
|
|
32287
|
-
const idx = ph
|
|
32440
|
+
const type = (xmlAttr(ph, "type") ?? "body").trim();
|
|
32441
|
+
const idx = xmlAttr(ph, "idx");
|
|
32288
32442
|
result.push({ type, idx });
|
|
32289
32443
|
}
|
|
32290
32444
|
return result;
|
|
@@ -32375,7 +32529,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32375
32529
|
const relsXml = await relsFile.async("string");
|
|
32376
32530
|
const relsData = this.parser.parse(relsXml);
|
|
32377
32531
|
const rels = this.ensureArray(
|
|
32378
|
-
relsData
|
|
32532
|
+
xmlChild(relsData, "Relationships")?.["Relationship"]
|
|
32379
32533
|
);
|
|
32380
32534
|
for (const rel of rels) {
|
|
32381
32535
|
const relType = String(rel["@_Type"] || "");
|
|
@@ -32390,7 +32544,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32390
32544
|
const relsXml = await relsFile.async("string");
|
|
32391
32545
|
const relsData = this.parser.parse(relsXml);
|
|
32392
32546
|
const rels = this.ensureArray(
|
|
32393
|
-
relsData
|
|
32547
|
+
xmlChild(relsData, "Relationships")?.["Relationship"]
|
|
32394
32548
|
);
|
|
32395
32549
|
for (const rel of rels) {
|
|
32396
32550
|
const relType = String(rel["@_Type"] || "");
|
|
@@ -32436,9 +32590,9 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32436
32590
|
if (!master) {
|
|
32437
32591
|
return void 0;
|
|
32438
32592
|
}
|
|
32439
|
-
const bg = master
|
|
32593
|
+
const bg = xmlPath(master, "p:cSld", "p:bg");
|
|
32440
32594
|
const bgColor = this.parseBackgroundColor(bg);
|
|
32441
|
-
const spTree = master
|
|
32595
|
+
const spTree = xmlPath(master, "p:cSld", "p:spTree");
|
|
32442
32596
|
const placeholders = this.extractPlaceholderList(spTree);
|
|
32443
32597
|
const result = { path, backgroundColor: bgColor, placeholders };
|
|
32444
32598
|
const hf = parseHeaderFooterFlags(master["p:hf"]);
|
|
@@ -32467,9 +32621,9 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32467
32621
|
if (!master) {
|
|
32468
32622
|
return void 0;
|
|
32469
32623
|
}
|
|
32470
|
-
const bg = master
|
|
32624
|
+
const bg = xmlPath(master, "p:cSld", "p:bg");
|
|
32471
32625
|
const bgColor = this.parseBackgroundColor(bg);
|
|
32472
|
-
const spTree = master
|
|
32626
|
+
const spTree = xmlPath(master, "p:cSld", "p:spTree");
|
|
32473
32627
|
const placeholders = this.extractPlaceholderList(spTree);
|
|
32474
32628
|
const result = { path, backgroundColor: bgColor, placeholders };
|
|
32475
32629
|
const hf = parseHeaderFooterFlags(master["p:hf"]);
|
|
@@ -32501,7 +32655,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32501
32655
|
this.layoutXmlMap.set(layoutPath, data);
|
|
32502
32656
|
}
|
|
32503
32657
|
const layout = { path: layoutPath };
|
|
32504
|
-
const cSldName =
|
|
32658
|
+
const cSldName = (xmlAttr(xmlChild(sldLayout, "p:cSld"), "name") ?? "").trim();
|
|
32505
32659
|
if (cSldName) {
|
|
32506
32660
|
layout.name = cSldName;
|
|
32507
32661
|
}
|
|
@@ -32558,12 +32712,12 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32558
32712
|
}
|
|
32559
32713
|
}
|
|
32560
32714
|
}
|
|
32561
|
-
const bg = sldLayout
|
|
32715
|
+
const bg = xmlPath(sldLayout, "p:cSld", "p:bg");
|
|
32562
32716
|
const bgColor = this.parseBackgroundColor(bg);
|
|
32563
32717
|
if (bgColor) {
|
|
32564
32718
|
layout.backgroundColor = bgColor;
|
|
32565
32719
|
}
|
|
32566
|
-
const spTree = sldLayout
|
|
32720
|
+
const spTree = xmlPath(sldLayout, "p:cSld", "p:spTree");
|
|
32567
32721
|
const placeholders = this.extractPlaceholderList(spTree);
|
|
32568
32722
|
if (placeholders.length > 0) {
|
|
32569
32723
|
layout.placeholders = placeholders;
|
|
@@ -32579,7 +32733,7 @@ var PptxHandlerRuntime9 = class _PptxHandlerRuntime extends PptxHandlerRuntime8
|
|
|
32579
32733
|
*/
|
|
32580
32734
|
parseCustomShows() {
|
|
32581
32735
|
try {
|
|
32582
|
-
const custShowLst = this.presentationData
|
|
32736
|
+
const custShowLst = xmlPath(this.presentationData, "p:presentation", "p:custShowLst");
|
|
32583
32737
|
if (!custShowLst) {
|
|
32584
32738
|
return void 0;
|
|
32585
32739
|
}
|
|
@@ -32637,7 +32791,7 @@ var PptxHandlerRuntime10 = class extends PptxHandlerRuntime9 {
|
|
|
32637
32791
|
}
|
|
32638
32792
|
const prnPr = presProps["p:prnPr"];
|
|
32639
32793
|
if (prnPr) {
|
|
32640
|
-
props.printFrameSlides = prnPr["@_frameSlides"] === "1"
|
|
32794
|
+
props.printFrameSlides = prnPr["@_frameSlides"] === "1";
|
|
32641
32795
|
const slidesPerPageRaw = prnPr["@_sldPerPg"] ?? prnPr["@_slidesPerPage"];
|
|
32642
32796
|
if (slidesPerPageRaw !== void 0) {
|
|
32643
32797
|
const slidesPerPage = Number.parseInt(String(slidesPerPageRaw), 10);
|
|
@@ -32901,7 +33055,11 @@ var PptxHandlerRuntime11 = class extends PptxHandlerRuntime10 {
|
|
|
32901
33055
|
}
|
|
32902
33056
|
const cSld = pSld["p:cSld"];
|
|
32903
33057
|
if (!cSld["p:spTree"]) {
|
|
32904
|
-
|
|
33058
|
+
const emptySlide = this.createEmptySlideXml();
|
|
33059
|
+
const emptyTree = emptySlide["p:sld"]?.["p:cSld"]?.["p:spTree"];
|
|
33060
|
+
if (emptyTree) {
|
|
33061
|
+
cSld["p:spTree"] = emptyTree;
|
|
33062
|
+
}
|
|
32905
33063
|
}
|
|
32906
33064
|
pSld["p:cSld"] = cSld;
|
|
32907
33065
|
xmlObj["p:sld"] = pSld;
|
|
@@ -33506,7 +33664,7 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
|
|
|
33506
33664
|
resolveHyperlinkRelationshipId
|
|
33507
33665
|
);
|
|
33508
33666
|
}
|
|
33509
|
-
brNode
|
|
33667
|
+
brNode["__isLineBreak"] = true;
|
|
33510
33668
|
currentRuns.push(brNode);
|
|
33511
33669
|
return;
|
|
33512
33670
|
}
|
|
@@ -34803,7 +34961,7 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
34803
34961
|
}
|
|
34804
34962
|
}
|
|
34805
34963
|
if (runProperties["a:highlight"]) {
|
|
34806
|
-
const highlightHex = this.parseColor(runProperties
|
|
34964
|
+
const highlightHex = this.parseColor(xmlChild(runProperties, "a:highlight"));
|
|
34807
34965
|
if (highlightHex) {
|
|
34808
34966
|
style.highlightColor = highlightHex;
|
|
34809
34967
|
}
|
|
@@ -34824,29 +34982,23 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
34824
34982
|
if (runRtl !== void 0) {
|
|
34825
34983
|
style.rtl = runRtl;
|
|
34826
34984
|
}
|
|
34827
|
-
const latin = runProperties
|
|
34828
|
-
const eastAsian = runProperties
|
|
34829
|
-
const complexScript = runProperties
|
|
34830
|
-
const chosenTypeface = latin
|
|
34831
|
-
const resolvedTypeface = this.resolveThemeTypeface(
|
|
34832
|
-
typeof chosenTypeface === "string" ? chosenTypeface : void 0
|
|
34833
|
-
);
|
|
34985
|
+
const latin = xmlChild(runProperties, "a:latin");
|
|
34986
|
+
const eastAsian = xmlChild(runProperties, "a:ea");
|
|
34987
|
+
const complexScript = xmlChild(runProperties, "a:cs");
|
|
34988
|
+
const chosenTypeface = xmlAttr(latin, "typeface") || xmlAttr(eastAsian, "typeface") || xmlAttr(complexScript, "typeface");
|
|
34989
|
+
const resolvedTypeface = this.resolveThemeTypeface(chosenTypeface);
|
|
34834
34990
|
if (resolvedTypeface) {
|
|
34835
34991
|
style.fontFamily = resolvedTypeface;
|
|
34836
34992
|
}
|
|
34837
|
-
const eaTypeface = this.resolveThemeTypeface(
|
|
34838
|
-
typeof eastAsian?.["@_typeface"] === "string" ? eastAsian["@_typeface"] : void 0
|
|
34839
|
-
);
|
|
34993
|
+
const eaTypeface = this.resolveThemeTypeface(xmlAttr(eastAsian, "typeface"));
|
|
34840
34994
|
if (eaTypeface) {
|
|
34841
34995
|
style.eastAsiaFont = eaTypeface;
|
|
34842
34996
|
}
|
|
34843
|
-
const csTypeface = this.resolveThemeTypeface(
|
|
34844
|
-
typeof complexScript?.["@_typeface"] === "string" ? complexScript["@_typeface"] : void 0
|
|
34845
|
-
);
|
|
34997
|
+
const csTypeface = this.resolveThemeTypeface(xmlAttr(complexScript, "typeface"));
|
|
34846
34998
|
if (csTypeface) {
|
|
34847
34999
|
style.complexScriptFont = csTypeface;
|
|
34848
35000
|
}
|
|
34849
|
-
const solidFill = runProperties
|
|
35001
|
+
const solidFill = xmlChild(runProperties, "a:solidFill");
|
|
34850
35002
|
if (solidFill) {
|
|
34851
35003
|
style.color = this.parseColor(solidFill);
|
|
34852
35004
|
const colorXml = extractColorChoiceXml(solidFill);
|
|
@@ -34859,11 +35011,9 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
34859
35011
|
if (capAttr === "all" || capAttr === "small") {
|
|
34860
35012
|
style.textCaps = capAttr;
|
|
34861
35013
|
}
|
|
34862
|
-
const symNode = runProperties
|
|
35014
|
+
const symNode = xmlChild(runProperties, "a:sym");
|
|
34863
35015
|
if (symNode) {
|
|
34864
|
-
const symTypeface = this.normalizeTypefaceToken(
|
|
34865
|
-
typeof symNode["@_typeface"] === "string" ? symNode["@_typeface"] : ""
|
|
34866
|
-
);
|
|
35016
|
+
const symTypeface = this.normalizeTypefaceToken(xmlAttr(symNode, "typeface") || "");
|
|
34867
35017
|
if (symTypeface) {
|
|
34868
35018
|
style.symbolFont = symTypeface;
|
|
34869
35019
|
}
|
|
@@ -34913,7 +35063,7 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
34913
35063
|
this.applyTextFontMetadata(style, latin, "latin");
|
|
34914
35064
|
this.applyTextFontMetadata(style, eastAsian, "eastAsia");
|
|
34915
35065
|
this.applyTextFontMetadata(style, complexScript, "complexScript");
|
|
34916
|
-
this.applyTextFontMetadata(style,
|
|
35066
|
+
this.applyTextFontMetadata(style, symNode, "symbol");
|
|
34917
35067
|
const runEffectList = runProperties["a:effectLst"];
|
|
34918
35068
|
if (runEffectList) {
|
|
34919
35069
|
this.applyTextRunEffects(style, runEffectList);
|
|
@@ -35201,7 +35351,7 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
35201
35351
|
if (!raw) {
|
|
35202
35352
|
return null;
|
|
35203
35353
|
}
|
|
35204
|
-
const nvPr = raw
|
|
35354
|
+
const nvPr = xmlPath(raw, "p:nvSpPr", "p:nvPr") ?? xmlPath(raw, "p:nvPicPr", "p:nvPr") ?? xmlPath(raw, "p:nvGraphicFramePr", "p:nvPr");
|
|
35205
35355
|
return this.readPlaceholderInfoFromNvPr(nvPr);
|
|
35206
35356
|
}
|
|
35207
35357
|
// ── Layout placeholder extraction ───────────────────────────────────
|
|
@@ -35210,15 +35360,14 @@ var PptxHandlerRuntime21 = class extends PptxHandlerRuntime20 {
|
|
|
35210
35360
|
* their placeholder info and their transform (position/size in EMU).
|
|
35211
35361
|
*/
|
|
35212
35362
|
extractLayoutPlaceholders(layoutXml) {
|
|
35213
|
-
const
|
|
35214
|
-
const spTree = sldLayout?.["p:cSld"]?.["p:spTree"];
|
|
35363
|
+
const spTree = xmlPath(layoutXml, "p:sldLayout", "p:cSld", "p:spTree");
|
|
35215
35364
|
if (!spTree) {
|
|
35216
35365
|
return [];
|
|
35217
35366
|
}
|
|
35218
35367
|
const result = [];
|
|
35219
35368
|
const shapes = this.ensureArray(spTree["p:sp"]);
|
|
35220
35369
|
for (const shape of shapes) {
|
|
35221
|
-
const nvPr = shape
|
|
35370
|
+
const nvPr = xmlPath(shape, "p:nvSpPr", "p:nvPr");
|
|
35222
35371
|
const phInfo = this.readPlaceholderInfoFromNvPr(nvPr);
|
|
35223
35372
|
if (!phInfo) {
|
|
35224
35373
|
continue;
|
|
@@ -35541,7 +35690,9 @@ function writeCellTextFormatting(xmlCell, style, ensureArray7) {
|
|
|
35541
35690
|
if (style.bold === void 0 && style.italic === void 0 && style.underline === void 0 && style.fontSize === void 0 && style.color === void 0) {
|
|
35542
35691
|
return;
|
|
35543
35692
|
}
|
|
35544
|
-
const paragraphs = ensureArray7(
|
|
35693
|
+
const paragraphs = ensureArray7(
|
|
35694
|
+
xmlCell["a:txBody"]?.["a:p"]
|
|
35695
|
+
);
|
|
35545
35696
|
for (const paragraph of paragraphs) {
|
|
35546
35697
|
const runs = ensureArray7(paragraph?.["a:r"]);
|
|
35547
35698
|
const rebuiltRuns = [];
|
|
@@ -35644,7 +35795,9 @@ var PptxHandlerRuntime22 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
35644
35795
|
tcPr["@_vert"] = style.textDirection;
|
|
35645
35796
|
}
|
|
35646
35797
|
if (style.align) {
|
|
35647
|
-
const firstP = this.ensureArray(
|
|
35798
|
+
const firstP = this.ensureArray(
|
|
35799
|
+
xmlCell["a:txBody"]?.["a:p"]
|
|
35800
|
+
)[0];
|
|
35648
35801
|
if (firstP) {
|
|
35649
35802
|
if (!firstP["a:pPr"]) {
|
|
35650
35803
|
firstP["a:pPr"] = {};
|
|
@@ -36008,14 +36161,14 @@ var PptxHandlerRuntime23 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
36008
36161
|
*/
|
|
36009
36162
|
serializeTableDataToXml(shape, tableData) {
|
|
36010
36163
|
try {
|
|
36011
|
-
const graphicData = shape
|
|
36012
|
-
const tbl = graphicData
|
|
36164
|
+
const graphicData = xmlPath(shape, "a:graphic", "a:graphicData");
|
|
36165
|
+
const tbl = xmlChild(graphicData, "a:tbl");
|
|
36013
36166
|
if (!tbl) {
|
|
36014
36167
|
return;
|
|
36015
36168
|
}
|
|
36016
36169
|
serializeTablePropertyFlags(tbl, tableData);
|
|
36017
36170
|
const xmlRows = this.ensureArray(tbl["a:tr"]);
|
|
36018
|
-
const xmlColCount = this.ensureArray(tbl
|
|
36171
|
+
const xmlColCount = this.ensureArray(xmlChild(tbl, "a:tblGrid")?.["a:gridCol"]).length;
|
|
36019
36172
|
const dataRowCount = tableData.rows.length;
|
|
36020
36173
|
const dataColCount = tableData.columnWidths.length;
|
|
36021
36174
|
const structureChanged = dataRowCount !== xmlRows.length || dataColCount !== xmlColCount;
|
|
@@ -37188,12 +37341,12 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
37188
37341
|
if (!file) {
|
|
37189
37342
|
continue;
|
|
37190
37343
|
}
|
|
37191
|
-
const
|
|
37192
|
-
if (!
|
|
37344
|
+
const xmlText2 = await file.async("string");
|
|
37345
|
+
if (!xmlText2.trim()) {
|
|
37193
37346
|
continue;
|
|
37194
37347
|
}
|
|
37195
37348
|
try {
|
|
37196
|
-
const parsed = parse(
|
|
37349
|
+
const parsed = parse(xmlText2);
|
|
37197
37350
|
if (typeof parsed !== "object" || parsed === null) {
|
|
37198
37351
|
continue;
|
|
37199
37352
|
}
|
|
@@ -37217,7 +37370,9 @@ var PptxHandlerRuntime25 = class extends PptxHandlerRuntime24 {
|
|
|
37217
37370
|
if (relsXml) {
|
|
37218
37371
|
try {
|
|
37219
37372
|
const relsData = this.parser.parse(relsXml);
|
|
37220
|
-
const relNodes = this.ensureArray(
|
|
37373
|
+
const relNodes = this.ensureArray(
|
|
37374
|
+
relsData?.Relationships?.Relationship
|
|
37375
|
+
);
|
|
37221
37376
|
const relNode = relNodes.find((node) => {
|
|
37222
37377
|
const relType = String(node?.["@_Type"] || "");
|
|
37223
37378
|
const relTarget = String(node?.["@_Target"] || "");
|
|
@@ -37591,7 +37746,9 @@ var PptxHandlerRuntime27 = class extends PptxHandlerRuntime26 {
|
|
|
37591
37746
|
if (!rawExts) {
|
|
37592
37747
|
continue;
|
|
37593
37748
|
}
|
|
37594
|
-
const extsArray = Array.isArray(rawExts) ? rawExts : [rawExts]
|
|
37749
|
+
const extsArray = (Array.isArray(rawExts) ? rawExts : [rawExts]).filter(
|
|
37750
|
+
(ext) => typeof ext === "object" && ext !== null
|
|
37751
|
+
);
|
|
37595
37752
|
if (extsArray.length <= 1) {
|
|
37596
37753
|
continue;
|
|
37597
37754
|
}
|
|
@@ -38103,13 +38260,13 @@ var PptxHandlerRuntime29 = class extends PptxHandlerRuntime28 {
|
|
|
38103
38260
|
if (s3d.cameraRotX !== void 0 || s3d.cameraRotY !== void 0 || s3d.cameraRotZ !== void 0) {
|
|
38104
38261
|
const rot = {};
|
|
38105
38262
|
if (s3d.cameraRotX !== void 0) {
|
|
38106
|
-
rot["@_lat"] = s3d.cameraRotX;
|
|
38263
|
+
rot["@_lat"] = String(s3d.cameraRotX);
|
|
38107
38264
|
}
|
|
38108
38265
|
if (s3d.cameraRotY !== void 0) {
|
|
38109
|
-
rot["@_lon"] = s3d.cameraRotY;
|
|
38266
|
+
rot["@_lon"] = String(s3d.cameraRotY);
|
|
38110
38267
|
}
|
|
38111
38268
|
if (s3d.cameraRotZ !== void 0) {
|
|
38112
|
-
rot["@_rev"] = s3d.cameraRotZ;
|
|
38269
|
+
rot["@_rev"] = String(s3d.cameraRotZ);
|
|
38113
38270
|
}
|
|
38114
38271
|
cameraObj["a:rot"] = rot;
|
|
38115
38272
|
}
|
|
@@ -38129,9 +38286,9 @@ var PptxHandlerRuntime29 = class extends PptxHandlerRuntime28 {
|
|
|
38129
38286
|
const backdropObj = {};
|
|
38130
38287
|
if (s3d.backdropAnchorX !== void 0 || s3d.backdropAnchorY !== void 0 || s3d.backdropAnchorZ !== void 0) {
|
|
38131
38288
|
backdropObj["a:anchor"] = {
|
|
38132
|
-
"@_x": s3d.backdropAnchorX ?? 0,
|
|
38133
|
-
"@_y": s3d.backdropAnchorY ?? 0,
|
|
38134
|
-
"@_z": s3d.backdropAnchorZ ?? 0
|
|
38289
|
+
"@_x": String(s3d.backdropAnchorX ?? 0),
|
|
38290
|
+
"@_y": String(s3d.backdropAnchorY ?? 0),
|
|
38291
|
+
"@_z": String(s3d.backdropAnchorZ ?? 0)
|
|
38135
38292
|
};
|
|
38136
38293
|
}
|
|
38137
38294
|
scene3dXml["a:backdrop"] = backdropObj;
|
|
@@ -38149,10 +38306,10 @@ var PptxHandlerRuntime29 = class extends PptxHandlerRuntime28 {
|
|
|
38149
38306
|
if (hasData) {
|
|
38150
38307
|
const sp3dXml = {};
|
|
38151
38308
|
if (sh3d.extrusionHeight !== void 0) {
|
|
38152
|
-
sp3dXml["@_extrusionH"] = sh3d.extrusionHeight;
|
|
38309
|
+
sp3dXml["@_extrusionH"] = String(sh3d.extrusionHeight);
|
|
38153
38310
|
}
|
|
38154
38311
|
if (sh3d.contourWidth !== void 0) {
|
|
38155
|
-
sp3dXml["@_contourW"] = sh3d.contourWidth;
|
|
38312
|
+
sp3dXml["@_contourW"] = String(sh3d.contourWidth);
|
|
38156
38313
|
}
|
|
38157
38314
|
if (sh3d.presetMaterial) {
|
|
38158
38315
|
sp3dXml["@_prstMaterial"] = sh3d.presetMaterial;
|
|
@@ -38160,20 +38317,20 @@ var PptxHandlerRuntime29 = class extends PptxHandlerRuntime28 {
|
|
|
38160
38317
|
if (sh3d.bevelTopType) {
|
|
38161
38318
|
const bevelT = { "@_prst": sh3d.bevelTopType };
|
|
38162
38319
|
if (sh3d.bevelTopWidth !== void 0) {
|
|
38163
|
-
bevelT["@_w"] = sh3d.bevelTopWidth;
|
|
38320
|
+
bevelT["@_w"] = String(sh3d.bevelTopWidth);
|
|
38164
38321
|
}
|
|
38165
38322
|
if (sh3d.bevelTopHeight !== void 0) {
|
|
38166
|
-
bevelT["@_h"] = sh3d.bevelTopHeight;
|
|
38323
|
+
bevelT["@_h"] = String(sh3d.bevelTopHeight);
|
|
38167
38324
|
}
|
|
38168
38325
|
sp3dXml["a:bevelT"] = bevelT;
|
|
38169
38326
|
}
|
|
38170
38327
|
if (sh3d.bevelBottomType) {
|
|
38171
38328
|
const bevelB = { "@_prst": sh3d.bevelBottomType };
|
|
38172
38329
|
if (sh3d.bevelBottomWidth !== void 0) {
|
|
38173
|
-
bevelB["@_w"] = sh3d.bevelBottomWidth;
|
|
38330
|
+
bevelB["@_w"] = String(sh3d.bevelBottomWidth);
|
|
38174
38331
|
}
|
|
38175
38332
|
if (sh3d.bevelBottomHeight !== void 0) {
|
|
38176
|
-
bevelB["@_h"] = sh3d.bevelBottomHeight;
|
|
38333
|
+
bevelB["@_h"] = String(sh3d.bevelBottomHeight);
|
|
38177
38334
|
}
|
|
38178
38335
|
sp3dXml["a:bevelB"] = bevelB;
|
|
38179
38336
|
}
|
|
@@ -38395,7 +38552,7 @@ var PptxHandlerRuntime30 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
38395
38552
|
if (t3d && Object.keys(t3d).length > 0) {
|
|
38396
38553
|
const sp3dXml = {};
|
|
38397
38554
|
if (t3d.extrusionHeight) {
|
|
38398
|
-
sp3dXml["@_extrusionH"] = t3d.extrusionHeight;
|
|
38555
|
+
sp3dXml["@_extrusionH"] = String(t3d.extrusionHeight);
|
|
38399
38556
|
}
|
|
38400
38557
|
if (t3d.presetMaterial) {
|
|
38401
38558
|
sp3dXml["@_prstMaterial"] = t3d.presetMaterial;
|
|
@@ -38403,20 +38560,20 @@ var PptxHandlerRuntime30 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
38403
38560
|
if (t3d.bevelTopType && t3d.bevelTopType !== "none") {
|
|
38404
38561
|
const bvt = { "@_prst": t3d.bevelTopType };
|
|
38405
38562
|
if (t3d.bevelTopWidth) {
|
|
38406
|
-
bvt["@_w"] = t3d.bevelTopWidth;
|
|
38563
|
+
bvt["@_w"] = String(t3d.bevelTopWidth);
|
|
38407
38564
|
}
|
|
38408
38565
|
if (t3d.bevelTopHeight) {
|
|
38409
|
-
bvt["@_h"] = t3d.bevelTopHeight;
|
|
38566
|
+
bvt["@_h"] = String(t3d.bevelTopHeight);
|
|
38410
38567
|
}
|
|
38411
38568
|
sp3dXml["a:bevelT"] = bvt;
|
|
38412
38569
|
}
|
|
38413
38570
|
if (t3d.bevelBottomType && t3d.bevelBottomType !== "none") {
|
|
38414
38571
|
const bvb = { "@_prst": t3d.bevelBottomType };
|
|
38415
38572
|
if (t3d.bevelBottomWidth) {
|
|
38416
|
-
bvb["@_w"] = t3d.bevelBottomWidth;
|
|
38573
|
+
bvb["@_w"] = String(t3d.bevelBottomWidth);
|
|
38417
38574
|
}
|
|
38418
38575
|
if (t3d.bevelBottomHeight) {
|
|
38419
|
-
bvb["@_h"] = t3d.bevelBottomHeight;
|
|
38576
|
+
bvb["@_h"] = String(t3d.bevelBottomHeight);
|
|
38420
38577
|
}
|
|
38421
38578
|
sp3dXml["a:bevelB"] = bvb;
|
|
38422
38579
|
}
|
|
@@ -39631,7 +39788,9 @@ var PptxHandlerRuntime39 = class extends PptxHandlerRuntime38 {
|
|
|
39631
39788
|
}
|
|
39632
39789
|
try {
|
|
39633
39790
|
const relsData = this.parser.parse(relsXml);
|
|
39634
|
-
const relNodes = this.ensureArray(
|
|
39791
|
+
const relNodes = this.ensureArray(
|
|
39792
|
+
relsData?.Relationships?.Relationship
|
|
39793
|
+
);
|
|
39635
39794
|
const relNode = relNodes.find((node) => {
|
|
39636
39795
|
const relType = String(node?.["@_Type"] || "");
|
|
39637
39796
|
const relTarget = String(node?.["@_Target"] || "");
|
|
@@ -40215,9 +40374,7 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
|
|
|
40215
40374
|
}
|
|
40216
40375
|
const shapes = this.ensureArray(spTree["p:sp"]);
|
|
40217
40376
|
for (const shape of shapes) {
|
|
40218
|
-
const info = this.extractPlaceholderInfo(
|
|
40219
|
-
shape?.["p:nvSpPr"]?.["p:nvPr"]
|
|
40220
|
-
);
|
|
40377
|
+
const info = this.extractPlaceholderInfo(xmlPath(shape, "p:nvSpPr", "p:nvPr"));
|
|
40221
40378
|
if (!this.placeholderMatches(expected, info)) {
|
|
40222
40379
|
continue;
|
|
40223
40380
|
}
|
|
@@ -40225,9 +40382,7 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
|
|
|
40225
40382
|
}
|
|
40226
40383
|
const pictures = this.ensureArray(spTree["p:pic"]);
|
|
40227
40384
|
for (const picture of pictures) {
|
|
40228
|
-
const info = this.extractPlaceholderInfo(
|
|
40229
|
-
picture?.["p:nvPicPr"]?.["p:nvPr"]
|
|
40230
|
-
);
|
|
40385
|
+
const info = this.extractPlaceholderInfo(xmlPath(picture, "p:nvPicPr", "p:nvPr"));
|
|
40231
40386
|
if (!this.placeholderMatches(expected, info)) {
|
|
40232
40387
|
continue;
|
|
40233
40388
|
}
|
|
@@ -40242,7 +40397,7 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
|
|
|
40242
40397
|
}
|
|
40243
40398
|
const layoutXmlObj = this.layoutXmlMap.get(layoutPath);
|
|
40244
40399
|
const layoutContext = this.findPlaceholderInShapeTree(
|
|
40245
|
-
layoutXmlObj
|
|
40400
|
+
xmlPath(layoutXmlObj, "p:sldLayout", "p:cSld", "p:spTree"),
|
|
40246
40401
|
expected
|
|
40247
40402
|
);
|
|
40248
40403
|
if (layoutContext) {
|
|
@@ -40254,7 +40409,7 @@ var PptxHandlerRuntime42 = class extends PptxHandlerRuntime41 {
|
|
|
40254
40409
|
}
|
|
40255
40410
|
const masterXmlObj = this.masterXmlMap.get(masterPath);
|
|
40256
40411
|
return this.findPlaceholderInShapeTree(
|
|
40257
|
-
masterXmlObj
|
|
40412
|
+
xmlPath(masterXmlObj, "p:sldMaster", "p:cSld", "p:spTree"),
|
|
40258
40413
|
expected
|
|
40259
40414
|
);
|
|
40260
40415
|
}
|
|
@@ -40379,7 +40534,9 @@ var PptxHandlerRuntime43 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
40379
40534
|
if (!prstGeom) {
|
|
40380
40535
|
return void 0;
|
|
40381
40536
|
}
|
|
40382
|
-
const gdNodes = this.ensureArray(
|
|
40537
|
+
const gdNodes = this.ensureArray(
|
|
40538
|
+
prstGeom?.["a:avLst"]?.["a:gd"]
|
|
40539
|
+
);
|
|
40383
40540
|
if (gdNodes.length === 0) {
|
|
40384
40541
|
return void 0;
|
|
40385
40542
|
}
|
|
@@ -40803,10 +40960,8 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
40803
40960
|
*/
|
|
40804
40961
|
async parseShapeWithImageFill(shape, id, slidePath) {
|
|
40805
40962
|
try {
|
|
40806
|
-
const spPr = shape
|
|
40807
|
-
const placeholderInfo = this.extractPlaceholderInfo(
|
|
40808
|
-
shape?.["p:nvSpPr"]?.["p:nvPr"]
|
|
40809
|
-
);
|
|
40963
|
+
const spPr = xmlChild(shape, "p:spPr");
|
|
40964
|
+
const placeholderInfo = this.extractPlaceholderInfo(xmlPath(shape, "p:nvSpPr", "p:nvPr"));
|
|
40810
40965
|
const inheritedPlaceholder = placeholderInfo ? this.findPlaceholderContext(slidePath, placeholderInfo) : void 0;
|
|
40811
40966
|
const inheritedSpPr = inheritedPlaceholder?.shape?.["p:spPr"] || inheritedPlaceholder?.picture?.["p:spPr"];
|
|
40812
40967
|
const effectiveSpPr = this.mergeXmlObjects(inheritedSpPr, spPr);
|
|
@@ -40814,20 +40969,22 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
40814
40969
|
if (!xfrm) {
|
|
40815
40970
|
return null;
|
|
40816
40971
|
}
|
|
40817
|
-
const off = xfrm
|
|
40818
|
-
const ext = xfrm
|
|
40972
|
+
const off = xmlChild(xfrm, "a:off");
|
|
40973
|
+
const ext = xmlChild(xfrm, "a:ext");
|
|
40819
40974
|
if (!off || !ext) {
|
|
40820
40975
|
return null;
|
|
40821
40976
|
}
|
|
40822
|
-
const x = Math.round(parseInt(off
|
|
40823
|
-
const y = Math.round(parseInt(off
|
|
40824
|
-
const width = Math.round(parseInt(ext
|
|
40825
|
-
const height = Math.round(
|
|
40977
|
+
const x = Math.round(parseInt(xmlAttr(off, "x") || "0") / _PptxHandlerRuntime.EMU_PER_PX);
|
|
40978
|
+
const y = Math.round(parseInt(xmlAttr(off, "y") || "0") / _PptxHandlerRuntime.EMU_PER_PX);
|
|
40979
|
+
const width = Math.round(parseInt(xmlAttr(ext, "cx") || "0") / _PptxHandlerRuntime.EMU_PER_PX);
|
|
40980
|
+
const height = Math.round(
|
|
40981
|
+
parseInt(xmlAttr(ext, "cy") || "0") / _PptxHandlerRuntime.EMU_PER_PX
|
|
40982
|
+
);
|
|
40826
40983
|
const rotation = xfrm["@_rot"] ? parseInt(xfrm["@_rot"]) / 6e4 : void 0;
|
|
40827
40984
|
const skewX = xfrm["@_skewX"] ? parseInt(String(xfrm["@_skewX"]), 10) / 6e4 : void 0;
|
|
40828
40985
|
const skewY = xfrm["@_skewY"] ? parseInt(String(xfrm["@_skewY"]), 10) / 6e4 : void 0;
|
|
40829
40986
|
const { flipHorizontal, flipVertical } = this.readFlipState(xfrm);
|
|
40830
|
-
const prstGeom = effectiveSpPr
|
|
40987
|
+
const prstGeom = xmlAttr(xmlChild(effectiveSpPr, "a:prstGeom"), "prst");
|
|
40831
40988
|
const shapeAdjustments = this.parseGeometryAdjustments(
|
|
40832
40989
|
effectiveSpPr?.["a:prstGeom"]
|
|
40833
40990
|
);
|
|
@@ -40853,9 +41010,9 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
40853
41010
|
shapeAdjustments
|
|
40854
41011
|
);
|
|
40855
41012
|
const blipFill = effectiveSpPr?.["a:blipFill"] || spPr?.["a:blipFill"];
|
|
40856
|
-
const blip = blipFill
|
|
40857
|
-
const rEmbed = blip
|
|
40858
|
-
const rLink = blip
|
|
41013
|
+
const blip = xmlChild(blipFill, "a:blip");
|
|
41014
|
+
const rEmbed = xmlAttr(blip, "r:embed");
|
|
41015
|
+
const rLink = xmlAttr(blip, "r:link");
|
|
40859
41016
|
const crop = this.readImageCropFromBlipFill(blipFill);
|
|
40860
41017
|
const tileNode = blipFill?.["a:tile"];
|
|
40861
41018
|
const tileProps = {};
|
|
@@ -40894,9 +41051,10 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
40894
41051
|
);
|
|
40895
41052
|
let imageData;
|
|
40896
41053
|
let imagePath;
|
|
40897
|
-
|
|
41054
|
+
const relId = rEmbed || rLink;
|
|
41055
|
+
if (relId) {
|
|
40898
41056
|
const slideRels = this.slideRelsMap.get(slidePath);
|
|
40899
|
-
const target = slideRels?.get(
|
|
41057
|
+
const target = slideRels?.get(relId);
|
|
40900
41058
|
if (target) {
|
|
40901
41059
|
if (target.startsWith("http://") || target.startsWith("https://") || target.startsWith("data:")) {
|
|
40902
41060
|
imagePath = target;
|
|
@@ -40910,7 +41068,7 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
40910
41068
|
}
|
|
40911
41069
|
}
|
|
40912
41070
|
const styleNode = shape["p:style"] || inheritedPlaceholder?.shape?.["p:style"] || inheritedPlaceholder?.picture?.["p:style"];
|
|
40913
|
-
const sifCNvPr = shape
|
|
41071
|
+
const sifCNvPr = xmlPath(shape, "p:nvSpPr", "p:cNvPr");
|
|
40914
41072
|
const sifSlideRels = this.slideRelsMap.get(slidePath);
|
|
40915
41073
|
const { actionClick: sifActionClick, actionHover: sifActionHover } = this.parseElementActions(
|
|
40916
41074
|
sifCNvPr,
|
|
@@ -41132,10 +41290,10 @@ var PptxHandlerRuntime46 = class extends PptxHandlerRuntime45 {
|
|
|
41132
41290
|
const level = Number.parseInt(String(paragraphProps?.["@_lvl"] || "0"), 10);
|
|
41133
41291
|
const normalizedLevel = Number.isFinite(level) ? Math.min(Math.max(level + 1, 1), 9) : 1;
|
|
41134
41292
|
const levelKey = `a:lvl${normalizedLevel}pPr`;
|
|
41135
|
-
const inheritedLevelProps = inheritedTxBody
|
|
41136
|
-
const bodyLevelProps = txBody
|
|
41137
|
-
const defaultBodyProps = txBody
|
|
41138
|
-
const inheritedDefaultBodyProps = inheritedTxBody
|
|
41293
|
+
const inheritedLevelProps = xmlChild(xmlChild(inheritedTxBody, "a:lstStyle"), levelKey);
|
|
41294
|
+
const bodyLevelProps = xmlChild(xmlChild(txBody, "a:lstStyle"), levelKey);
|
|
41295
|
+
const defaultBodyProps = xmlPath(txBody, "a:lstStyle", "a:defPPr");
|
|
41296
|
+
const inheritedDefaultBodyProps = xmlPath(inheritedTxBody, "a:lstStyle", "a:defPPr");
|
|
41139
41297
|
const bulletPropsCandidates = [
|
|
41140
41298
|
paragraphProps,
|
|
41141
41299
|
bodyLevelProps,
|
|
@@ -41885,11 +42043,7 @@ var PptxHandlerRuntime49 = class extends PptxHandlerRuntime48 {
|
|
|
41885
42043
|
const appendRun = (runText, runProps) => {
|
|
41886
42044
|
const runStyle = {
|
|
41887
42045
|
...mergedDefaultRunStyle,
|
|
41888
|
-
...this.extractTextRunStyle(
|
|
41889
|
-
runProps,
|
|
41890
|
-
paraAlign,
|
|
41891
|
-
ctx.slideRelationshipMap
|
|
41892
|
-
)
|
|
42046
|
+
...this.extractTextRunStyle(runProps, paraAlign, ctx.slideRelationshipMap)
|
|
41893
42047
|
};
|
|
41894
42048
|
parts.push(runText);
|
|
41895
42049
|
segments.push({ text: runText, style: runStyle });
|
|
@@ -42068,10 +42222,11 @@ var PptxHandlerRuntime49 = class extends PptxHandlerRuntime48 {
|
|
|
42068
42222
|
* </a:ruby>
|
|
42069
42223
|
* ```
|
|
42070
42224
|
*/
|
|
42071
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
42072
42225
|
parseRubyElement(rubyNode, runProps, paraAlign, mergedDefaultRunStyle, slideRelationshipMap) {
|
|
42073
42226
|
const rubyPr = rubyNode["a:rubyPr"];
|
|
42074
|
-
const rubyAlign = String(
|
|
42227
|
+
const rubyAlign = String(
|
|
42228
|
+
rubyPr?.["@_algn"] ?? rubyPr?.["a:rubyAlign"]?.["@_val"] ?? "ctr"
|
|
42229
|
+
).trim() || "ctr";
|
|
42075
42230
|
const rtNode = rubyNode["a:rt"];
|
|
42076
42231
|
let rubyText = "";
|
|
42077
42232
|
let rubyFontSize;
|
|
@@ -42176,20 +42331,22 @@ var PptxHandlerRuntime50 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
42176
42331
|
if (!xfrm) {
|
|
42177
42332
|
return null;
|
|
42178
42333
|
}
|
|
42179
|
-
const off = xfrm
|
|
42180
|
-
const ext = xfrm
|
|
42334
|
+
const off = xmlChild(xfrm, "a:off");
|
|
42335
|
+
const ext = xmlChild(xfrm, "a:ext");
|
|
42181
42336
|
if (!off || !ext) {
|
|
42182
42337
|
return null;
|
|
42183
42338
|
}
|
|
42184
|
-
const x = Math.round(parseInt(off
|
|
42185
|
-
const y = Math.round(parseInt(off
|
|
42186
|
-
const width = Math.round(parseInt(ext
|
|
42187
|
-
const height = Math.round(
|
|
42339
|
+
const x = Math.round(parseInt(xmlAttr(off, "x") || "0") / _PptxHandlerRuntime.EMU_PER_PX);
|
|
42340
|
+
const y = Math.round(parseInt(xmlAttr(off, "y") || "0") / _PptxHandlerRuntime.EMU_PER_PX);
|
|
42341
|
+
const width = Math.round(parseInt(xmlAttr(ext, "cx") || "0") / _PptxHandlerRuntime.EMU_PER_PX);
|
|
42342
|
+
const height = Math.round(
|
|
42343
|
+
parseInt(xmlAttr(ext, "cy") || "0") / _PptxHandlerRuntime.EMU_PER_PX
|
|
42344
|
+
);
|
|
42188
42345
|
const rotation = xfrm["@_rot"] ? parseInt(xfrm["@_rot"]) / 6e4 : void 0;
|
|
42189
42346
|
const skewX = xfrm["@_skewX"] ? parseInt(String(xfrm["@_skewX"]), 10) / 6e4 : void 0;
|
|
42190
42347
|
const skewY = xfrm["@_skewY"] ? parseInt(String(xfrm["@_skewY"]), 10) / 6e4 : void 0;
|
|
42191
42348
|
const { flipHorizontal, flipVertical } = this.readFlipState(xfrm);
|
|
42192
|
-
const prstGeom = effectiveSpPr
|
|
42349
|
+
const prstGeom = xmlAttr(xmlChild(effectiveSpPr, "a:prstGeom"), "prst");
|
|
42193
42350
|
const shapeAdjustments = this.parseGeometryAdjustments(
|
|
42194
42351
|
effectiveSpPr?.["a:prstGeom"]
|
|
42195
42352
|
);
|
|
@@ -42245,14 +42402,14 @@ var PptxHandlerRuntime50 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
42245
42402
|
const textSegments = [];
|
|
42246
42403
|
const paragraphIndents = [];
|
|
42247
42404
|
const inheritedBodyDefaultRunStyle = this.extractTextRunStyle(
|
|
42248
|
-
inheritedTxBody
|
|
42405
|
+
xmlPath(inheritedTxBody, "a:lstStyle", "a:defPPr", "a:defRPr"),
|
|
42249
42406
|
"left",
|
|
42250
42407
|
slideRelationshipMap
|
|
42251
42408
|
);
|
|
42252
42409
|
const bodyDefaultRunStyle = {
|
|
42253
42410
|
...inheritedBodyDefaultRunStyle,
|
|
42254
42411
|
...this.extractTextRunStyle(
|
|
42255
|
-
txBody
|
|
42412
|
+
xmlPath(txBody, "a:lstStyle", "a:defPPr", "a:defRPr"),
|
|
42256
42413
|
"left",
|
|
42257
42414
|
slideRelationshipMap
|
|
42258
42415
|
)
|
|
@@ -42285,13 +42442,14 @@ var PptxHandlerRuntime50 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
42285
42442
|
if (this.presentationDefaultTextStyle) {
|
|
42286
42443
|
this.applyPlaceholderBodyDefaults(textStyle, this.presentationDefaultTextStyle);
|
|
42287
42444
|
}
|
|
42288
|
-
|
|
42289
|
-
|
|
42445
|
+
const txBodyObj = txBody;
|
|
42446
|
+
if (txBodyObj?.["a:p"]) {
|
|
42447
|
+
const paras = this.ensureArray(txBodyObj["a:p"]);
|
|
42290
42448
|
const textParts = [];
|
|
42291
42449
|
let didSeedPrimaryTextStyle = false;
|
|
42292
42450
|
const effectiveLevelStyles = phDefaults?.levelStyles ?? this.presentationDefaultTextStyle?.levelStyles;
|
|
42293
42451
|
const ctx = {
|
|
42294
|
-
txBody,
|
|
42452
|
+
txBody: txBodyObj,
|
|
42295
42453
|
inheritedTxBody,
|
|
42296
42454
|
bodyDefaultRunStyle,
|
|
42297
42455
|
slideRelationshipMap,
|
|
@@ -42338,7 +42496,7 @@ var PptxHandlerRuntime50 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
42338
42496
|
const cNvSpPr = shape?.["p:nvSpPr"]?.["p:cNvSpPr"];
|
|
42339
42497
|
const spLocksNode = cNvSpPr?.["a:spLocks"];
|
|
42340
42498
|
const slideLocks = this.parseShapeLocks(spLocksNode);
|
|
42341
|
-
const inheritedCNvSpPr = inheritedPlaceholder?.shape
|
|
42499
|
+
const inheritedCNvSpPr = xmlPath(inheritedPlaceholder?.shape, "p:nvSpPr", "p:cNvSpPr") ?? xmlPath(inheritedPlaceholder?.picture, "p:nvPicPr", "p:cNvPicPr");
|
|
42342
42500
|
const inheritedLockNode = inheritedCNvSpPr?.["a:spLocks"] ?? inheritedCNvSpPr?.["a:picLocks"];
|
|
42343
42501
|
const inheritedLocks = this.parseShapeLocks(inheritedLockNode);
|
|
42344
42502
|
const locks = inheritedLocks ? { ...inheritedLocks, ...slideLocks } : slideLocks;
|
|
@@ -42425,15 +42583,15 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
42425
42583
|
if (!xfrm) {
|
|
42426
42584
|
return null;
|
|
42427
42585
|
}
|
|
42428
|
-
const off = xfrm
|
|
42429
|
-
const ext = xfrm
|
|
42586
|
+
const off = xmlChild(xfrm, "a:off");
|
|
42587
|
+
const ext = xmlChild(xfrm, "a:ext");
|
|
42430
42588
|
if (!off || !ext) {
|
|
42431
42589
|
return null;
|
|
42432
42590
|
}
|
|
42433
|
-
const x = Math.round(parseEmuInt(off
|
|
42434
|
-
const y = Math.round(parseEmuInt(off
|
|
42435
|
-
const width = Math.round(parseEmuInt(ext
|
|
42436
|
-
const height = Math.round(parseEmuInt(ext
|
|
42591
|
+
const x = Math.round(parseEmuInt(xmlAttr(off, "x")) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
42592
|
+
const y = Math.round(parseEmuInt(xmlAttr(off, "y")) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
42593
|
+
const width = Math.round(parseEmuInt(xmlAttr(ext, "cx")) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
42594
|
+
const height = Math.round(parseEmuInt(xmlAttr(ext, "cy")) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
42437
42595
|
const rotation = xfrm["@_rot"] ? parseEmuInt(xfrm["@_rot"]) / 6e4 : void 0;
|
|
42438
42596
|
const skewX = xfrm["@_skewX"] ? parseEmuInt(xfrm["@_skewX"]) / 6e4 : void 0;
|
|
42439
42597
|
const skewY = xfrm["@_skewY"] ? parseEmuInt(xfrm["@_skewY"]) / 6e4 : void 0;
|
|
@@ -42459,9 +42617,10 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
42459
42617
|
const posterBlip = posterBlipFill?.["a:blip"];
|
|
42460
42618
|
const posterREmbed = posterBlip?.["@_r:embed"];
|
|
42461
42619
|
const posterRLink = posterBlip?.["@_r:link"];
|
|
42462
|
-
|
|
42620
|
+
const posterRelId = posterREmbed || posterRLink;
|
|
42621
|
+
if (posterRelId) {
|
|
42463
42622
|
const slideRels = this.slideRelsMap.get(slidePath);
|
|
42464
|
-
const posterTarget = slideRels?.get(
|
|
42623
|
+
const posterTarget = slideRels?.get(posterRelId);
|
|
42465
42624
|
if (posterTarget) {
|
|
42466
42625
|
const isExternal = posterTarget.startsWith("http://") || posterTarget.startsWith("https://");
|
|
42467
42626
|
if (isExternal) {
|
|
@@ -42500,7 +42659,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
42500
42659
|
rawXml: pic
|
|
42501
42660
|
};
|
|
42502
42661
|
}
|
|
42503
|
-
const prstGeom = effectiveSpPr
|
|
42662
|
+
const prstGeom = xmlAttr(xmlChild(effectiveSpPr, "a:prstGeom"), "prst");
|
|
42504
42663
|
const shapeAdjustments = this.parseGeometryAdjustments(
|
|
42505
42664
|
effectiveSpPr?.["a:prstGeom"]
|
|
42506
42665
|
);
|
|
@@ -42533,6 +42692,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
42533
42692
|
const blip = blipFill?.["a:blip"];
|
|
42534
42693
|
const rEmbed = blip?.["@_r:embed"];
|
|
42535
42694
|
const rLink = blip?.["@_r:link"];
|
|
42695
|
+
const relId = rEmbed || rLink;
|
|
42536
42696
|
const crop = this.readImageCropFromBlipFill(blipFill);
|
|
42537
42697
|
const tileNode = blipFill?.["a:tile"];
|
|
42538
42698
|
const tileProps = {};
|
|
@@ -42585,9 +42745,9 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
42585
42745
|
}
|
|
42586
42746
|
let imageData;
|
|
42587
42747
|
let imagePath;
|
|
42588
|
-
if (
|
|
42748
|
+
if (relId) {
|
|
42589
42749
|
const slideRels = this.slideRelsMap.get(slidePath);
|
|
42590
|
-
const target = slideRels?.get(
|
|
42750
|
+
const target = slideRels?.get(relId);
|
|
42591
42751
|
if (target) {
|
|
42592
42752
|
const isExternal = target.startsWith("http://") || target.startsWith("https://");
|
|
42593
42753
|
if (isExternal) {
|
|
@@ -42607,7 +42767,9 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
42607
42767
|
}
|
|
42608
42768
|
}
|
|
42609
42769
|
const styleNode = pic["p:style"] || inheritedPlaceholder?.picture?.["p:style"] || inheritedPlaceholder?.shape?.["p:style"];
|
|
42610
|
-
const altTextRaw = String(
|
|
42770
|
+
const altTextRaw = String(
|
|
42771
|
+
pic?.["p:nvPicPr"]?.["p:cNvPr"]?.["@_descr"] || ""
|
|
42772
|
+
).trim();
|
|
42611
42773
|
const imageEffects = this.extractImageEffects(blip);
|
|
42612
42774
|
const picCNvPr = pic?.["p:nvPicPr"]?.["p:cNvPr"];
|
|
42613
42775
|
const picSlideRels = this.slideRelsMap.get(slidePath);
|
|
@@ -43063,21 +43225,25 @@ var PptxHandlerRuntime53 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
43063
43225
|
let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
|
|
43064
43226
|
let chX = 0, chY = 0, chW = 0, chH = 0;
|
|
43065
43227
|
if (xfrm) {
|
|
43066
|
-
|
|
43067
|
-
|
|
43068
|
-
|
|
43228
|
+
const off = xfrm["a:off"];
|
|
43229
|
+
if (off) {
|
|
43230
|
+
parentX = Math.round(parseEmuInt2(off["@_x"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43231
|
+
parentY = Math.round(parseEmuInt2(off["@_y"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43069
43232
|
}
|
|
43070
|
-
|
|
43071
|
-
|
|
43072
|
-
|
|
43233
|
+
const ext = xfrm["a:ext"];
|
|
43234
|
+
if (ext) {
|
|
43235
|
+
parentW = Math.round(parseEmuInt2(ext["@_cx"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43236
|
+
parentH = Math.round(parseEmuInt2(ext["@_cy"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43073
43237
|
}
|
|
43074
|
-
|
|
43075
|
-
|
|
43076
|
-
|
|
43238
|
+
const chOff = xfrm["a:chOff"];
|
|
43239
|
+
if (chOff) {
|
|
43240
|
+
chX = Math.round(parseEmuInt2(chOff["@_x"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43241
|
+
chY = Math.round(parseEmuInt2(chOff["@_y"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43077
43242
|
}
|
|
43078
|
-
|
|
43079
|
-
|
|
43080
|
-
|
|
43243
|
+
const chExt = xfrm["a:chExt"];
|
|
43244
|
+
if (chExt) {
|
|
43245
|
+
chW = Math.round(parseEmuInt2(chExt["@_cx"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43246
|
+
chH = Math.round(parseEmuInt2(chExt["@_cy"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43081
43247
|
}
|
|
43082
43248
|
}
|
|
43083
43249
|
const scaleX = chW > 0 ? parentW / chW : 1;
|
|
@@ -43155,13 +43321,15 @@ var PptxHandlerRuntime53 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
43155
43321
|
const xfrm = grpSpPr?.["a:xfrm"];
|
|
43156
43322
|
let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
|
|
43157
43323
|
if (xfrm) {
|
|
43158
|
-
|
|
43159
|
-
|
|
43160
|
-
|
|
43324
|
+
const off = xfrm["a:off"];
|
|
43325
|
+
if (off) {
|
|
43326
|
+
parentX = Math.round(parseEmuInt2(off["@_x"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43327
|
+
parentY = Math.round(parseEmuInt2(off["@_y"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43161
43328
|
}
|
|
43162
|
-
|
|
43163
|
-
|
|
43164
|
-
|
|
43329
|
+
const ext = xfrm["a:ext"];
|
|
43330
|
+
if (ext) {
|
|
43331
|
+
parentW = Math.round(parseEmuInt2(ext["@_cx"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43332
|
+
parentH = Math.round(parseEmuInt2(ext["@_cy"]) / _PptxHandlerRuntime.EMU_PER_PX);
|
|
43165
43333
|
}
|
|
43166
43334
|
}
|
|
43167
43335
|
const grpFillStyle = grpSpPr ? this.extractShapeStyle(grpSpPr) : void 0;
|
|
@@ -43274,11 +43442,7 @@ var PptxHandlerRuntime54 = class extends PptxHandlerRuntime53 {
|
|
|
43274
43442
|
const appendRun = (runText, runProps) => {
|
|
43275
43443
|
const runStyle = {
|
|
43276
43444
|
...mergedDefaultRunStyle,
|
|
43277
|
-
...this.extractTextRunStyle(
|
|
43278
|
-
runProps,
|
|
43279
|
-
paraAlign,
|
|
43280
|
-
slideRelationshipMap
|
|
43281
|
-
)
|
|
43445
|
+
...this.extractTextRunStyle(runProps, paraAlign, slideRelationshipMap)
|
|
43282
43446
|
};
|
|
43283
43447
|
textParts.push(runText);
|
|
43284
43448
|
textSegments.push({ text: runText, style: runStyle });
|
|
@@ -43480,29 +43644,32 @@ var PptxHandlerRuntime55 = class extends PptxHandlerRuntime54 {
|
|
|
43480
43644
|
var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
43481
43645
|
async extractBackgroundImage(slideXml2, slidePath, rootElement = "p:sld") {
|
|
43482
43646
|
try {
|
|
43483
|
-
const
|
|
43484
|
-
|
|
43647
|
+
const blip = xmlPath(
|
|
43648
|
+
slideXml2,
|
|
43649
|
+
rootElement,
|
|
43650
|
+
"p:cSld",
|
|
43651
|
+
"p:bg",
|
|
43652
|
+
"p:bgPr",
|
|
43653
|
+
"a:blipFill",
|
|
43654
|
+
"a:blip"
|
|
43655
|
+
);
|
|
43656
|
+
const rEmbed = xmlAttr(blip, "r:embed");
|
|
43657
|
+
if (!rEmbed) {
|
|
43485
43658
|
return void 0;
|
|
43486
43659
|
}
|
|
43487
|
-
const
|
|
43488
|
-
|
|
43489
|
-
|
|
43490
|
-
|
|
43491
|
-
|
|
43492
|
-
|
|
43493
|
-
|
|
43494
|
-
|
|
43495
|
-
if (target.startsWith("http://") || target.startsWith("https://")) {
|
|
43496
|
-
if (this.allowExternalImages !== true) {
|
|
43497
|
-
return void 0;
|
|
43498
|
-
}
|
|
43499
|
-
return target;
|
|
43500
|
-
}
|
|
43501
|
-
const imagePath = this.resolveImagePath(slidePath, target);
|
|
43502
|
-
return this.getImageData(imagePath);
|
|
43503
|
-
}
|
|
43660
|
+
const slideRels = this.slideRelsMap.get(slidePath);
|
|
43661
|
+
const target = slideRels?.get(rEmbed);
|
|
43662
|
+
if (!target) {
|
|
43663
|
+
return void 0;
|
|
43664
|
+
}
|
|
43665
|
+
if (target.startsWith("http://") || target.startsWith("https://")) {
|
|
43666
|
+
if (this.allowExternalImages !== true) {
|
|
43667
|
+
return void 0;
|
|
43504
43668
|
}
|
|
43669
|
+
return target;
|
|
43505
43670
|
}
|
|
43671
|
+
const imagePath = this.resolveImagePath(slidePath, target);
|
|
43672
|
+
return this.getImageData(imagePath);
|
|
43506
43673
|
} catch (e) {
|
|
43507
43674
|
console.warn("Failed to extract background image:", e);
|
|
43508
43675
|
}
|
|
@@ -43510,29 +43677,29 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
43510
43677
|
}
|
|
43511
43678
|
extractBackgroundColor(slideXml2, rootElement = "p:sld") {
|
|
43512
43679
|
try {
|
|
43513
|
-
const bg = slideXml2
|
|
43680
|
+
const bg = xmlPath(slideXml2, rootElement, "p:cSld", "p:bg");
|
|
43514
43681
|
if (!bg) {
|
|
43515
43682
|
return void 0;
|
|
43516
43683
|
}
|
|
43517
|
-
const bgPr = bg
|
|
43684
|
+
const bgPr = xmlChild(bg, "p:bgPr");
|
|
43518
43685
|
if (bgPr) {
|
|
43519
|
-
const solidFill = bgPr
|
|
43686
|
+
const solidFill = xmlChild(bgPr, "a:solidFill");
|
|
43520
43687
|
if (solidFill) {
|
|
43521
43688
|
return this.parseColor(solidFill);
|
|
43522
43689
|
}
|
|
43523
|
-
const pattFill = bgPr
|
|
43690
|
+
const pattFill = xmlChild(bgPr, "a:pattFill");
|
|
43524
43691
|
if (pattFill) {
|
|
43525
|
-
const fgClr = this.parseColor(pattFill
|
|
43692
|
+
const fgClr = this.parseColor(xmlChild(pattFill, "a:fgClr"));
|
|
43526
43693
|
if (fgClr) {
|
|
43527
43694
|
return fgClr;
|
|
43528
43695
|
}
|
|
43529
|
-
const bgClr = this.parseColor(pattFill
|
|
43696
|
+
const bgClr = this.parseColor(xmlChild(pattFill, "a:bgClr"));
|
|
43530
43697
|
if (bgClr) {
|
|
43531
43698
|
return bgClr;
|
|
43532
43699
|
}
|
|
43533
43700
|
}
|
|
43534
43701
|
}
|
|
43535
|
-
const bgRef = bg
|
|
43702
|
+
const bgRef = xmlChild(bg, "p:bgRef");
|
|
43536
43703
|
if (bgRef) {
|
|
43537
43704
|
return this.resolveBackgroundRefColor(bgRef);
|
|
43538
43705
|
}
|
|
@@ -43557,17 +43724,16 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
43557
43724
|
* referenced fill definition.
|
|
43558
43725
|
*/
|
|
43559
43726
|
resolveBackgroundRefColor(bgRef) {
|
|
43560
|
-
const
|
|
43561
|
-
|
|
43562
|
-
if (Number.isFinite(idx) && idx === 0) {
|
|
43727
|
+
const idx = xmlAttrNumber(bgRef, "idx") ?? 0;
|
|
43728
|
+
if (idx === 0) {
|
|
43563
43729
|
return void 0;
|
|
43564
43730
|
}
|
|
43565
|
-
const solidFill = bgRef
|
|
43731
|
+
const solidFill = xmlChild(bgRef, "a:solidFill");
|
|
43566
43732
|
if (solidFill) {
|
|
43567
43733
|
return this.parseColor(solidFill);
|
|
43568
43734
|
}
|
|
43569
43735
|
const overrideColor = this.parseColor(bgRef);
|
|
43570
|
-
if (
|
|
43736
|
+
if (this.themeFormatScheme) {
|
|
43571
43737
|
let fillDef = void 0;
|
|
43572
43738
|
if (idx >= 1 && idx <= 999) {
|
|
43573
43739
|
fillDef = this.themeFormatScheme.fillStyles[idx - 1];
|
|
@@ -43590,7 +43756,7 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
43590
43756
|
if (overrideColor) {
|
|
43591
43757
|
return overrideColor;
|
|
43592
43758
|
}
|
|
43593
|
-
if (
|
|
43759
|
+
if (idx !== 0) {
|
|
43594
43760
|
console.warn(
|
|
43595
43761
|
`bgRef @idx=${idx} did not resolve to a fill style (theme has ${this.themeFormatScheme?.fillStyles.length ?? 0} fillStyleLst / ${this.themeFormatScheme?.backgroundFillStyles.length ?? 0} bgFillStyleLst entries); falling back to #FFFFFF.`
|
|
43596
43762
|
);
|
|
@@ -43606,17 +43772,16 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
43606
43772
|
*/
|
|
43607
43773
|
extractBackgroundPattern(slideXml2, rootElement = "p:sld") {
|
|
43608
43774
|
try {
|
|
43609
|
-
const
|
|
43610
|
-
const pattFill = bg?.["p:bgPr"]?.["a:pattFill"];
|
|
43775
|
+
const pattFill = xmlPath(slideXml2, rootElement, "p:cSld", "p:bg", "p:bgPr", "a:pattFill");
|
|
43611
43776
|
if (!pattFill) {
|
|
43612
43777
|
return void 0;
|
|
43613
43778
|
}
|
|
43614
|
-
const preset =
|
|
43779
|
+
const preset = (xmlAttr(pattFill, "prst") ?? "").trim();
|
|
43615
43780
|
if (!preset) {
|
|
43616
43781
|
return void 0;
|
|
43617
43782
|
}
|
|
43618
|
-
const fgColor = this.parseColor(pattFill
|
|
43619
|
-
const bgColor = this.parseColor(pattFill
|
|
43783
|
+
const fgColor = this.parseColor(xmlChild(pattFill, "a:fgClr"));
|
|
43784
|
+
const bgColor = this.parseColor(xmlChild(pattFill, "a:bgClr"));
|
|
43620
43785
|
return {
|
|
43621
43786
|
preset,
|
|
43622
43787
|
fgColor,
|
|
@@ -43636,16 +43801,15 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
43636
43801
|
*/
|
|
43637
43802
|
extractBackgroundShadeToTitle(slideXml2, rootElement = "p:sld") {
|
|
43638
43803
|
try {
|
|
43639
|
-
const
|
|
43640
|
-
const bgPr = bg?.["p:bgPr"];
|
|
43804
|
+
const bgPr = xmlPath(slideXml2, rootElement, "p:cSld", "p:bg", "p:bgPr");
|
|
43641
43805
|
if (!bgPr) {
|
|
43642
43806
|
return void 0;
|
|
43643
43807
|
}
|
|
43644
|
-
const raw = bgPr
|
|
43808
|
+
const raw = xmlAttr(bgPr, "shadeToTitle");
|
|
43645
43809
|
if (raw === void 0) {
|
|
43646
43810
|
return void 0;
|
|
43647
43811
|
}
|
|
43648
|
-
const normalized =
|
|
43812
|
+
const normalized = raw.trim().toLowerCase();
|
|
43649
43813
|
return normalized === "1" || normalized === "true";
|
|
43650
43814
|
} catch {
|
|
43651
43815
|
return void 0;
|
|
@@ -43657,20 +43821,17 @@ var PptxHandlerRuntime56 = class extends PptxHandlerRuntime55 {
|
|
|
43657
43821
|
*/
|
|
43658
43822
|
extractBackgroundGradient(slideXml2, rootElement = "p:sld") {
|
|
43659
43823
|
try {
|
|
43660
|
-
const bg = slideXml2
|
|
43824
|
+
const bg = xmlPath(slideXml2, rootElement, "p:cSld", "p:bg");
|
|
43661
43825
|
if (!bg) {
|
|
43662
43826
|
return void 0;
|
|
43663
43827
|
}
|
|
43664
|
-
const
|
|
43665
|
-
if (
|
|
43666
|
-
|
|
43667
|
-
if (gradFill) {
|
|
43668
|
-
return this.extractGradientFillCss(gradFill);
|
|
43669
|
-
}
|
|
43828
|
+
const gradFill = xmlPath(bg, "p:bgPr", "a:gradFill");
|
|
43829
|
+
if (gradFill) {
|
|
43830
|
+
return this.extractGradientFillCss(gradFill);
|
|
43670
43831
|
}
|
|
43671
|
-
const bgRef = bg
|
|
43832
|
+
const bgRef = xmlChild(bg, "p:bgRef");
|
|
43672
43833
|
if (bgRef && this.themeFormatScheme) {
|
|
43673
|
-
const idx =
|
|
43834
|
+
const idx = xmlAttrNumber(bgRef, "idx") ?? 0;
|
|
43674
43835
|
if (idx >= 1001) {
|
|
43675
43836
|
const offset = idx - 1001;
|
|
43676
43837
|
const fillDef = this.themeFormatScheme.backgroundFillStyles[offset];
|
|
@@ -43964,7 +44125,9 @@ var PptxHandlerRuntime57 = class extends PptxHandlerRuntime56 {
|
|
|
43964
44125
|
return normalized !== "0" && normalized !== "false";
|
|
43965
44126
|
}
|
|
43966
44127
|
isSlideHidden(slideXmlObj, slideIdEntry) {
|
|
43967
|
-
const slideShowValue = String(
|
|
44128
|
+
const slideShowValue = String(
|
|
44129
|
+
slideXmlObj?.["p:sld"]?.["@_show"] ?? ""
|
|
44130
|
+
).toLowerCase();
|
|
43968
44131
|
if (slideShowValue === "0" || slideShowValue === "false") {
|
|
43969
44132
|
return true;
|
|
43970
44133
|
}
|
|
@@ -44208,10 +44371,10 @@ var PptxHandlerRuntime58 = class _PptxHandlerRuntime extends PptxHandlerRuntime5
|
|
|
44208
44371
|
}
|
|
44209
44372
|
}
|
|
44210
44373
|
if (defRPr["@_b"] !== void 0) {
|
|
44211
|
-
style.bold = defRPr["@_b"] === "1"
|
|
44374
|
+
style.bold = defRPr["@_b"] === "1";
|
|
44212
44375
|
}
|
|
44213
44376
|
if (defRPr["@_i"] !== void 0) {
|
|
44214
|
-
style.italic = defRPr["@_i"] === "1"
|
|
44377
|
+
style.italic = defRPr["@_i"] === "1";
|
|
44215
44378
|
}
|
|
44216
44379
|
const color = this.parseColor(defRPr["a:solidFill"]);
|
|
44217
44380
|
if (color) {
|
|
@@ -44684,8 +44847,7 @@ var PptxHandlerRuntime61 = class extends PptxHandlerRuntime60 {
|
|
|
44684
44847
|
const placeholderShapeIndices = /* @__PURE__ */ new Set();
|
|
44685
44848
|
for (let idx = 0; idx < shapes.length; idx++) {
|
|
44686
44849
|
const shape = shapes[idx];
|
|
44687
|
-
const
|
|
44688
|
-
const ph = nvSpPr?.["p:nvPr"]?.["p:ph"];
|
|
44850
|
+
const ph = xmlPath(shape, "p:nvSpPr", "p:nvPr", "p:ph");
|
|
44689
44851
|
if (ph) {
|
|
44690
44852
|
placeholderShapeIndices.add(idx);
|
|
44691
44853
|
const phDefaults = this.extractPlaceholderDefaultsFromShape(shape);
|
|
@@ -44717,9 +44879,9 @@ var PptxHandlerRuntime61 = class extends PptxHandlerRuntime60 {
|
|
|
44717
44879
|
if (!shape) {
|
|
44718
44880
|
continue;
|
|
44719
44881
|
}
|
|
44720
|
-
const spPr = shape
|
|
44882
|
+
const spPr = xmlChild(shape, "p:spPr");
|
|
44721
44883
|
let element = null;
|
|
44722
|
-
if (spPr
|
|
44884
|
+
if (spPr && xmlChild(spPr, "a:blipFill")) {
|
|
44723
44885
|
element = await this.parseShapeWithImageFill(
|
|
44724
44886
|
shape,
|
|
44725
44887
|
`layout-shape-img-${entry.indexInType}`,
|
|
@@ -44764,8 +44926,11 @@ var PptxHandlerRuntime61 = class extends PptxHandlerRuntime60 {
|
|
|
44764
44926
|
}
|
|
44765
44927
|
}
|
|
44766
44928
|
}
|
|
44767
|
-
const layoutShowMasterSp =
|
|
44768
|
-
|
|
44929
|
+
const layoutShowMasterSp = xmlAttr(
|
|
44930
|
+
xmlChild(layoutXmlObj, "p:sldLayout"),
|
|
44931
|
+
"showMasterSp"
|
|
44932
|
+
);
|
|
44933
|
+
const showMasterSp = layoutShowMasterSp === void 0 || layoutShowMasterSp.trim().toLowerCase() !== "0" && layoutShowMasterSp.trim().toLowerCase() !== "false";
|
|
44769
44934
|
const masterElements = showMasterSp ? await this.getMasterElements(layoutPath) : [];
|
|
44770
44935
|
this.currentSlideClrMapOverride = prevClrMapOverride;
|
|
44771
44936
|
const allElements = [...masterElements, ...elements];
|
|
@@ -45586,7 +45751,9 @@ var PptxHandlerRuntime65 = class extends PptxHandlerRuntime64 {
|
|
|
45586
45751
|
// eslint-disable-next-line no-await-in-loop
|
|
45587
45752
|
await relsXml.async("string")
|
|
45588
45753
|
);
|
|
45589
|
-
const relNodes = this.ensureArray(
|
|
45754
|
+
const relNodes = this.ensureArray(
|
|
45755
|
+
relsData?.Relationships?.Relationship
|
|
45756
|
+
);
|
|
45590
45757
|
for (const rel of relNodes) {
|
|
45591
45758
|
const target = String(rel["@_Target"] || "");
|
|
45592
45759
|
if (!target.includes("theme")) {
|
|
@@ -45904,7 +46071,9 @@ var PptxHandlerRuntime65 = class extends PptxHandlerRuntime64 {
|
|
|
45904
46071
|
return void 0;
|
|
45905
46072
|
}
|
|
45906
46073
|
const relsData = this.parser.parse(await relsXml.async("string"));
|
|
45907
|
-
const relNodes = this.ensureArray(
|
|
46074
|
+
const relNodes = this.ensureArray(
|
|
46075
|
+
relsData?.Relationships?.Relationship
|
|
46076
|
+
);
|
|
45908
46077
|
for (const rel of relNodes) {
|
|
45909
46078
|
const target = String(rel["@_Target"] || "");
|
|
45910
46079
|
if (!target.includes("theme")) {
|
|
@@ -46140,7 +46309,9 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
46140
46309
|
return [];
|
|
46141
46310
|
}
|
|
46142
46311
|
const relsData = this.parser.parse(relsXml);
|
|
46143
|
-
const rels = this.ensureArray(
|
|
46312
|
+
const rels = this.ensureArray(
|
|
46313
|
+
xmlChild(relsData, "Relationships")?.Relationship
|
|
46314
|
+
);
|
|
46144
46315
|
const modernCommentRels = rels.filter((rel) => {
|
|
46145
46316
|
const type = String(rel?.["@_Type"] || "").toLowerCase();
|
|
46146
46317
|
return type.includes("comments-extended") || type.includes("comments/authors") || type.includes("/p188/") || type.includes("/p15/");
|
|
@@ -46178,7 +46349,7 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
46178
46349
|
const txBodyKey = Object.keys(cm2 || {}).find((k) => k.endsWith("txBody"));
|
|
46179
46350
|
let text = "";
|
|
46180
46351
|
if (txBodyKey) {
|
|
46181
|
-
const paragraphs = this.ensureArray(cm2
|
|
46352
|
+
const paragraphs = this.ensureArray(xmlChild(cm2, txBodyKey)?.["a:p"]);
|
|
46182
46353
|
const lines = [];
|
|
46183
46354
|
for (const p of paragraphs) {
|
|
46184
46355
|
const runs = this.ensureArray(p?.["a:r"]);
|
|
@@ -46241,7 +46412,9 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime extends PptxHandlerRuntime6
|
|
|
46241
46412
|
}
|
|
46242
46413
|
try {
|
|
46243
46414
|
const relsData = this.parser.parse(relsXml);
|
|
46244
|
-
const rels = this.ensureArray(
|
|
46415
|
+
const rels = this.ensureArray(
|
|
46416
|
+
xmlChild(relsData, "Relationships")?.Relationship
|
|
46417
|
+
);
|
|
46245
46418
|
const commentRelation = rels.find((relation) => {
|
|
46246
46419
|
const relationType = String(relation?.["@_Type"] || "").toLowerCase();
|
|
46247
46420
|
return relationType.endsWith("/comments");
|
|
@@ -46979,7 +47152,7 @@ function parseBoolVal(node) {
|
|
|
46979
47152
|
if (val === void 0 || val === null || val === "") {
|
|
46980
47153
|
return true;
|
|
46981
47154
|
}
|
|
46982
|
-
if (val === "0" || val === "false"
|
|
47155
|
+
if (val === "0" || val === "false") {
|
|
46983
47156
|
return false;
|
|
46984
47157
|
}
|
|
46985
47158
|
return true;
|
|
@@ -47014,7 +47187,7 @@ var PptxHandlerRuntime72 = class extends PptxHandlerRuntime71 {
|
|
|
47014
47187
|
return void 0;
|
|
47015
47188
|
}
|
|
47016
47189
|
const val = plotVisOnlyNode["@_val"];
|
|
47017
|
-
if (val === "0" || val === "false"
|
|
47190
|
+
if (val === "0" || val === "false") {
|
|
47018
47191
|
return false;
|
|
47019
47192
|
}
|
|
47020
47193
|
return true;
|
|
@@ -47994,7 +48167,7 @@ var PptxHandlerRuntime76 = class extends PptxHandlerRuntime75 {
|
|
|
47994
48167
|
var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
47995
48168
|
async getEmbeddedFonts() {
|
|
47996
48169
|
const embeddedFontEntries = this.ensureArray(
|
|
47997
|
-
this.presentationData
|
|
48170
|
+
xmlPath(this.presentationData, "p:presentation", "p:embeddedFontLst")?.["p:embeddedFont"]
|
|
47998
48171
|
);
|
|
47999
48172
|
if (embeddedFontEntries.length === 0) {
|
|
48000
48173
|
return [];
|
|
@@ -48005,7 +48178,7 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
48005
48178
|
}
|
|
48006
48179
|
const results = [];
|
|
48007
48180
|
for (const entry of embeddedFontEntries) {
|
|
48008
|
-
const typeface =
|
|
48181
|
+
const typeface = (xmlAttr(xmlChild(entry, "p:font"), "typeface") || "").trim();
|
|
48009
48182
|
if (!typeface) {
|
|
48010
48183
|
continue;
|
|
48011
48184
|
}
|
|
@@ -48049,7 +48222,9 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
48049
48222
|
return map;
|
|
48050
48223
|
}
|
|
48051
48224
|
const relsData = this.parser.parse(relsXml);
|
|
48052
|
-
const rels = this.ensureArray(
|
|
48225
|
+
const rels = this.ensureArray(
|
|
48226
|
+
xmlChild(relsData, "Relationships")?.Relationship
|
|
48227
|
+
);
|
|
48053
48228
|
for (const rel of rels) {
|
|
48054
48229
|
const type = String(rel?.["@_Type"] || "");
|
|
48055
48230
|
if (!type.includes("/font")) {
|
|
@@ -48154,12 +48329,44 @@ var PptxHandlerRuntime77 = class extends PptxHandlerRuntime76 {
|
|
|
48154
48329
|
const options = [];
|
|
48155
48330
|
for (const [path, xmlObj] of this.layoutXmlMap.entries()) {
|
|
48156
48331
|
const sldLayout = xmlObj["p:sldLayout"];
|
|
48157
|
-
const
|
|
48332
|
+
const rawName = (xmlAttr(xmlChild(sldLayout, "p:cSld"), "name") || "").trim();
|
|
48158
48333
|
const type = sldLayout?.["@_type"] !== void 0 ? String(sldLayout["@_type"]).trim() : void 0;
|
|
48159
|
-
|
|
48334
|
+
const name = resolveLayoutDisplayName({ name: rawName, type, path });
|
|
48335
|
+
const masterPath = this.resolveMasterPathForLayout(path);
|
|
48336
|
+
options.push({
|
|
48337
|
+
path,
|
|
48338
|
+
name,
|
|
48339
|
+
...type ? { type } : {},
|
|
48340
|
+
...masterPath ? { masterPath } : {}
|
|
48341
|
+
});
|
|
48160
48342
|
}
|
|
48161
48343
|
return options;
|
|
48162
48344
|
}
|
|
48345
|
+
resolveMasterPathForLayout(layoutPath) {
|
|
48346
|
+
const layoutRels = this.slideRelsMap.get(layoutPath);
|
|
48347
|
+
if (!layoutRels) {
|
|
48348
|
+
return void 0;
|
|
48349
|
+
}
|
|
48350
|
+
for (const [, target] of layoutRels.entries()) {
|
|
48351
|
+
if (target.includes("slideMaster")) {
|
|
48352
|
+
const layoutDir = layoutPath.substring(0, layoutPath.lastIndexOf("/") + 1);
|
|
48353
|
+
if (target.startsWith("..")) {
|
|
48354
|
+
const segments = (layoutDir + target).split("/");
|
|
48355
|
+
const stack = [];
|
|
48356
|
+
for (const seg of segments) {
|
|
48357
|
+
if (seg === "..") {
|
|
48358
|
+
stack.pop();
|
|
48359
|
+
} else if (seg && seg !== ".") {
|
|
48360
|
+
stack.push(seg);
|
|
48361
|
+
}
|
|
48362
|
+
}
|
|
48363
|
+
return stack.join("/");
|
|
48364
|
+
}
|
|
48365
|
+
return `ppt/${target.replace("../", "")}`;
|
|
48366
|
+
}
|
|
48367
|
+
}
|
|
48368
|
+
return void 0;
|
|
48369
|
+
}
|
|
48163
48370
|
};
|
|
48164
48371
|
|
|
48165
48372
|
// src/core/core/runtime/PptxHandlerRuntimeLoadSession.ts
|
|
@@ -48690,20 +48897,14 @@ var PptxHandlerRuntime79 = class extends PptxHandlerRuntime78 {
|
|
|
48690
48897
|
for (const lp of masterLayoutPaths) {
|
|
48691
48898
|
const xmlObj = this.layoutXmlMap.get(lp);
|
|
48692
48899
|
if (xmlObj) {
|
|
48693
|
-
|
|
48694
|
-
const name = String(sldLayout?.["p:cSld"]?.["@_name"] || "").trim() || lp;
|
|
48695
|
-
const type = sldLayout?.["@_type"] !== null ? String(sldLayout["@_type"]).trim() : void 0;
|
|
48696
|
-
options.push({ path: lp, name, ...type ? { type } : {} });
|
|
48900
|
+
options.push(this.buildLayoutOption(lp, xmlObj));
|
|
48697
48901
|
} else {
|
|
48698
48902
|
try {
|
|
48699
48903
|
const layoutXmlStr = await this.zip.file(lp)?.async("string");
|
|
48700
48904
|
if (layoutXmlStr) {
|
|
48701
48905
|
const layoutXmlObj = this.parser.parse(layoutXmlStr);
|
|
48702
48906
|
this.layoutXmlMap.set(lp, layoutXmlObj);
|
|
48703
|
-
|
|
48704
|
-
const name = String(sldLayout?.["p:cSld"]?.["@_name"] || "").trim() || lp;
|
|
48705
|
-
const type = sldLayout?.["@_type"] !== null ? String(sldLayout["@_type"]).trim() : void 0;
|
|
48706
|
-
options.push({ path: lp, name, ...type ? { type } : {} });
|
|
48907
|
+
options.push(this.buildLayoutOption(lp, layoutXmlObj));
|
|
48707
48908
|
}
|
|
48708
48909
|
} catch {
|
|
48709
48910
|
}
|
|
@@ -48711,6 +48912,22 @@ var PptxHandlerRuntime79 = class extends PptxHandlerRuntime78 {
|
|
|
48711
48912
|
}
|
|
48712
48913
|
return options;
|
|
48713
48914
|
}
|
|
48915
|
+
buildLayoutOption(path, xmlObj) {
|
|
48916
|
+
const sldLayout = xmlObj["p:sldLayout"];
|
|
48917
|
+
const rawName = String(
|
|
48918
|
+
sldLayout?.["p:cSld"]?.["@_name"] || ""
|
|
48919
|
+
).trim();
|
|
48920
|
+
const typeAttr = sldLayout?.["@_type"];
|
|
48921
|
+
const type = typeAttr !== void 0 && typeAttr !== null ? String(typeAttr).trim() : void 0;
|
|
48922
|
+
const name = resolveLayoutDisplayName({ name: rawName, type, path });
|
|
48923
|
+
const masterPath = this.findMasterPathForLayout(path);
|
|
48924
|
+
return {
|
|
48925
|
+
path,
|
|
48926
|
+
name,
|
|
48927
|
+
...type ? { type } : {},
|
|
48928
|
+
...masterPath ? { masterPath } : {}
|
|
48929
|
+
};
|
|
48930
|
+
}
|
|
48714
48931
|
/**
|
|
48715
48932
|
* Apply a different layout to an existing slide.
|
|
48716
48933
|
*
|
|
@@ -66200,4 +66417,4 @@ var SvgExporter = class _SvgExporter {
|
|
|
66200
66417
|
* `<p:extLst>` (optional)
|
|
66201
66418
|
*/
|
|
66202
66419
|
|
|
66203
|
-
export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL2 as EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime81 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertEmfToDataUrl, convertWmfToDataUrl, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableElement, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, ooxmlArcToSvg, ooxmlToPresetName, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseChart3DSurfaces, parseChartAxes, parseCondition, parseConditionList, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSvgPath, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeSvgPath, setChartCategories, setChartGrouping, setChartTitle, setChartType, shouldRenderFallbackLabel, shouldReturnToZoomSlide, subtractPolygons, subtractShapes, subtractSvgPaths, svgPathToPolygons, switchSmartArtLayout, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, updateChartDataPoint, updateChartSeriesValues, updateSmartArtNodeText, validatePptx, verifyModifyPassword, verifyPassword, verifySignatureDigests, writeBodyPrBooleanAttrs };
|
|
66420
|
+
export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL2 as EMU_PER_PIXEL, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime81 as PptxHandlerRuntime, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, PptxSaveState as PptxSaveSession, PptxSaveStateBuilder as PptxSaveSessionBuilder, PptxSaveState, PptxSaveStateBuilder, PptxShapeIdValidator, PptxShapeStyleExtractor, PptxSlideBackgroundBuilder, PptxSlideBuilder, PptxSlideCommentPartWriter, PptxSlideCommentsXmlFactory, PptxSlideElementsBuilder, PptxSlideLoaderService, PptxSlideMediaRelationshipBuilder, PptxSlideNotesBuilder, PptxSlideNotesPartUpdater, PptxSlideRelationshipRegistry, PptxSlideTransitionService, PptxTableDataParser, PptxTemplateBackgroundService, PptxXmlBuilder, PptxXmlFactoryProvider, PptxXmlLookupService, Presentation, PresentationBuilder, SHAPE_TREE_ELEMENT_TAGS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64 as computeDigestBase64WebCrypto, computeHierarchyLayout, computeLinearLayout, computeMatrixLayout, computePyramidLayout, computeSmartArtLayout, computeSnakeLayout, computeVerificationStatus, convertEmfToDataUrl, convertWmfToDataUrl, convertXmlToStrict, createArrayBufferCopy, createBuiltinVariables, createChartElement, createConnectorElement, createDefaultPptxHandlerRuntime, createEditorId, createFreeformElement, createGroupElement, createImageElement, createLayout, createLayouts, createMediaElement, createModifyVerifier, createPptxSaveConstants, createShapeElement, createTableElement, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, ooxmlArcToSvg, ooxmlToPresetName, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseChart3DSurfaces, parseChartAxes, parseCondition, parseConditionList, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSvgPath, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeSvgPath, setChartCategories, setChartGrouping, setChartTitle, setChartType, shouldRenderFallbackLabel, shouldReturnToZoomSlide, subtractPolygons, subtractShapes, subtractSvgPaths, svgPathToPolygons, switchSmartArtLayout, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, updateChartDataPoint, updateChartSeriesValues, updateSmartArtNodeText, validatePptx, verifyModifyPassword, verifyPassword, verifySignatureDigests, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };
|