pptx-react-viewer 1.1.1 → 1.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{PowerPointViewer-DtLlYf0r.d.mts → PowerPointViewer-CX0a7wz_.d.mts} +2 -0
- package/dist/{PowerPointViewer-DtLlYf0r.d.ts → PowerPointViewer-CX0a7wz_.d.ts} +2 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +373 -64
- package/dist/index.mjs +373 -64
- package/dist/pptx-viewer.css +1 -1
- package/dist/viewer/index.d.mts +11 -3
- package/dist/viewer/index.d.ts +11 -3
- package/dist/viewer/index.js +373 -64
- package/dist/viewer/index.mjs +373 -64
- package/node_modules/emf-converter/package.json +1 -1
- package/node_modules/mtx-decompressor/dist/index.d.mts +2 -1
- package/node_modules/mtx-decompressor/dist/index.d.ts +2 -1
- package/node_modules/mtx-decompressor/dist/index.js +85 -93
- package/node_modules/mtx-decompressor/dist/index.mjs +85 -93
- package/node_modules/mtx-decompressor/package.json +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-CPr1npgo.d.ts → SvgExporter--H1PDfAY.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{SvgExporter-B4-1_Hjp.d.mts → SvgExporter-Dq_2eV_r.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 +339 -235
- package/node_modules/pptx-viewer-core/dist/cli/index.mjs +339 -235
- 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 +297 -6
- package/node_modules/pptx-viewer-core/dist/index.d.ts +297 -6
- package/node_modules/pptx-viewer-core/dist/index.js +1309 -235
- package/node_modules/pptx-viewer-core/dist/index.mjs +1285 -236
- package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.mts → presentation-BozkirFp.d.mts} +17 -1
- package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.ts → presentation-BozkirFp.d.ts} +17 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-dYKZp3zE.d.mts → text-operations-B2JbPA5H.d.mts} +1 -1
- package/node_modules/pptx-viewer-core/dist/{text-operations-B6U6XxWt.d.ts → text-operations-zwF6i4eH.d.ts} +1 -1
- package/node_modules/pptx-viewer-core/package.json +1 -1
- package/package.json +4 -4
|
@@ -2540,33 +2540,10 @@ var PptxPresentationSaveBuilder = class {
|
|
|
2540
2540
|
init.presentationData["p:presentation"] = presentation;
|
|
2541
2541
|
return init.presentationData;
|
|
2542
2542
|
}
|
|
2543
|
-
applyHeaderFooter(presentation,
|
|
2544
|
-
if (
|
|
2545
|
-
|
|
2546
|
-
}
|
|
2547
|
-
const hf = presentation["p:hf"] || {};
|
|
2548
|
-
if (headerFooter.hasHeader !== void 0) {
|
|
2549
|
-
hf["@_hdr"] = headerFooter.hasHeader ? "1" : "0";
|
|
2550
|
-
}
|
|
2551
|
-
if (headerFooter.hasFooter !== void 0) {
|
|
2552
|
-
hf["@_ftr"] = headerFooter.hasFooter ? "1" : "0";
|
|
2553
|
-
}
|
|
2554
|
-
if (headerFooter.hasDateTime !== void 0) {
|
|
2555
|
-
hf["@_dt"] = headerFooter.hasDateTime ? "1" : "0";
|
|
2556
|
-
}
|
|
2557
|
-
if (headerFooter.hasSlideNumber !== void 0) {
|
|
2558
|
-
hf["@_sldNum"] = headerFooter.hasSlideNumber ? "1" : "0";
|
|
2559
|
-
}
|
|
2560
|
-
if (headerFooter.footerText !== void 0) {
|
|
2561
|
-
hf["@_ftrText"] = headerFooter.footerText;
|
|
2562
|
-
}
|
|
2563
|
-
if (headerFooter.dateTimeText !== void 0) {
|
|
2564
|
-
hf["@_dtText"] = headerFooter.dateTimeText;
|
|
2565
|
-
}
|
|
2566
|
-
if (headerFooter.dateFormat !== void 0) {
|
|
2567
|
-
hf["@_dtFmt"] = headerFooter.dateFormat;
|
|
2543
|
+
applyHeaderFooter(presentation, _headerFooter) {
|
|
2544
|
+
if (presentation["p:hf"] !== void 0) {
|
|
2545
|
+
delete presentation["p:hf"];
|
|
2568
2546
|
}
|
|
2569
|
-
presentation["p:hf"] = hf;
|
|
2570
2547
|
}
|
|
2571
2548
|
applySlideDimensions(presentation, rawSlideWidthEmu, rawSlideHeightEmu, rawSlideSizeType) {
|
|
2572
2549
|
const slideSize = presentation["p:sldSz"];
|
|
@@ -3242,7 +3219,9 @@ var PptxSlideNotesPartUpdater = class {
|
|
|
3242
3219
|
var PptxSlideBackgroundBuilder = class {
|
|
3243
3220
|
applyBackground(init) {
|
|
3244
3221
|
const hasBackgroundColor = typeof init.slide.backgroundColor === "string" && init.slide.backgroundColor.length > 0 && init.slide.backgroundColor !== "transparent";
|
|
3245
|
-
const
|
|
3222
|
+
const rawBackgroundImage = typeof init.slide.backgroundImage === "string" ? init.slide.backgroundImage : "";
|
|
3223
|
+
const hasBackgroundImage = rawBackgroundImage.length > 0;
|
|
3224
|
+
const hasDataUrlBackgroundImage = hasBackgroundImage && rawBackgroundImage.startsWith("data:");
|
|
3246
3225
|
const hasBackgroundGradient = typeof init.slide.backgroundGradient === "string" && init.slide.backgroundGradient.length > 0;
|
|
3247
3226
|
const cSld = init.slideNode["p:cSld"] || {};
|
|
3248
3227
|
if (!(hasBackgroundColor || hasBackgroundImage || hasBackgroundGradient)) {
|
|
@@ -3250,9 +3229,17 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
3250
3229
|
init.slideNode["p:cSld"] = cSld;
|
|
3251
3230
|
return;
|
|
3252
3231
|
}
|
|
3232
|
+
const existingBg = cSld["p:bg"];
|
|
3233
|
+
const existingBgPr = existingBg?.["p:bgPr"];
|
|
3234
|
+
const existingHasBlipFill = existingBgPr?.["a:blipFill"] !== void 0;
|
|
3235
|
+
if (!hasDataUrlBackgroundImage && existingHasBlipFill) {
|
|
3236
|
+
this.reorderCSldBgFirst(cSld, existingBg);
|
|
3237
|
+
init.slideNode["p:cSld"] = cSld;
|
|
3238
|
+
return;
|
|
3239
|
+
}
|
|
3253
3240
|
const backgroundProperties = {};
|
|
3254
|
-
if (
|
|
3255
|
-
const parsedBackgroundImage = init.parseDataUrlToBytes(
|
|
3241
|
+
if (hasDataUrlBackgroundImage) {
|
|
3242
|
+
const parsedBackgroundImage = init.parseDataUrlToBytes(rawBackgroundImage);
|
|
3256
3243
|
if (parsedBackgroundImage) {
|
|
3257
3244
|
const backgroundImagePath = init.saveState.nextMediaPath(parsedBackgroundImage.extension);
|
|
3258
3245
|
init.zip.file(backgroundImagePath, parsedBackgroundImage.bytes);
|
|
@@ -3275,9 +3262,42 @@ var PptxSlideBackgroundBuilder = class {
|
|
|
3275
3262
|
}
|
|
3276
3263
|
};
|
|
3277
3264
|
}
|
|
3278
|
-
backgroundProperties["a:
|
|
3279
|
-
|
|
3280
|
-
|
|
3265
|
+
const hasFillChild = backgroundProperties["a:blipFill"] !== void 0 || backgroundProperties["a:solidFill"] !== void 0 || backgroundProperties["a:gradFill"] !== void 0 || backgroundProperties["a:pattFill"] !== void 0 || backgroundProperties["a:noFill"] !== void 0 || backgroundProperties["a:grpFill"] !== void 0;
|
|
3266
|
+
if (hasFillChild) {
|
|
3267
|
+
backgroundProperties["a:effectLst"] = {};
|
|
3268
|
+
}
|
|
3269
|
+
if (!hasFillChild) {
|
|
3270
|
+
delete cSld["p:bg"];
|
|
3271
|
+
init.slideNode["p:cSld"] = cSld;
|
|
3272
|
+
return;
|
|
3273
|
+
}
|
|
3274
|
+
const rebuiltCSld = { "p:bg": { "p:bgPr": backgroundProperties } };
|
|
3275
|
+
for (const key of Object.keys(cSld)) {
|
|
3276
|
+
if (key === "p:bg") {
|
|
3277
|
+
continue;
|
|
3278
|
+
}
|
|
3279
|
+
rebuiltCSld[key] = cSld[key];
|
|
3280
|
+
}
|
|
3281
|
+
init.slideNode["p:cSld"] = rebuiltCSld;
|
|
3282
|
+
}
|
|
3283
|
+
reorderCSldBgFirst(cSld, bg) {
|
|
3284
|
+
const keys = Object.keys(cSld);
|
|
3285
|
+
if (keys.length > 0 && keys[0] === "p:bg") {
|
|
3286
|
+
return;
|
|
3287
|
+
}
|
|
3288
|
+
const reordered = { "p:bg": bg };
|
|
3289
|
+
for (const key of keys) {
|
|
3290
|
+
if (key === "p:bg") {
|
|
3291
|
+
continue;
|
|
3292
|
+
}
|
|
3293
|
+
reordered[key] = cSld[key];
|
|
3294
|
+
}
|
|
3295
|
+
for (const key of Object.keys(cSld)) {
|
|
3296
|
+
delete cSld[key];
|
|
3297
|
+
}
|
|
3298
|
+
for (const key of Object.keys(reordered)) {
|
|
3299
|
+
cSld[key] = reordered[key];
|
|
3300
|
+
}
|
|
3281
3301
|
}
|
|
3282
3302
|
};
|
|
3283
3303
|
|
|
@@ -6250,6 +6270,7 @@ var PptxConnectorParser = class {
|
|
|
6250
6270
|
slideRelationships,
|
|
6251
6271
|
this.context.getOrderedSlidePaths()
|
|
6252
6272
|
);
|
|
6273
|
+
const connElementName = cNvPr?.["@_name"] ? String(cNvPr["@_name"]).trim() : void 0;
|
|
6253
6274
|
const locks = this.context.parseShapeLocks(
|
|
6254
6275
|
cNvConnectionShapeProperties?.["a:cxnSpLocks"] ?? cNvConnectionShapeProperties?.["a:spLocks"]
|
|
6255
6276
|
);
|
|
@@ -6257,6 +6278,7 @@ var PptxConnectorParser = class {
|
|
|
6257
6278
|
const textResult = this.context.parseConnectorTextBody?.(txBody, slidePath);
|
|
6258
6279
|
return {
|
|
6259
6280
|
id,
|
|
6281
|
+
name: connElementName || void 0,
|
|
6260
6282
|
type: "connector",
|
|
6261
6283
|
x: Math.round(parseInt(String(offset["@_x"] || "0"), 10) / this.context.emuPerPx),
|
|
6262
6284
|
y: Math.round(parseInt(String(offset["@_y"] || "0"), 10) / this.context.emuPerPx),
|
|
@@ -9827,7 +9849,16 @@ var PptxRuntimeDependencyFactory = class {
|
|
|
9827
9849
|
return new fastXmlParser.XMLParser({
|
|
9828
9850
|
ignoreAttributes: false,
|
|
9829
9851
|
attributeNamePrefix: "@_",
|
|
9830
|
-
parseAttributeValue: false
|
|
9852
|
+
parseAttributeValue: false,
|
|
9853
|
+
// Keep element text as strings. When true (the fast-xml-parser
|
|
9854
|
+
// default), `<AppVersion>16.0000</AppVersion>` is coerced to the
|
|
9855
|
+
// JS number 16, losing the trailing zeros. On save we write back
|
|
9856
|
+
// "16", which fails PowerPoint's strict `[0-9]+\.[0-9]{4}` match
|
|
9857
|
+
// on AppVersion — the loader rejects the package with HRESULT
|
|
9858
|
+
// 0x80070570 (ERROR_FILE_CORRUPT) and shows the repair dialog.
|
|
9859
|
+
// More generally, OOXML element text is always an untyped string;
|
|
9860
|
+
// downstream callers coerce where needed.
|
|
9861
|
+
parseTagValue: false
|
|
9831
9862
|
});
|
|
9832
9863
|
}
|
|
9833
9864
|
createBuilder() {
|
|
@@ -10695,7 +10726,7 @@ var TRIPLET_ENCODINGS = [
|
|
|
10695
10726
|
{ byteCount: 2, xBits: 4, yBits: 4, deltaX: 49, deltaY: 49, xSign: 1, ySign: -1 },
|
|
10696
10727
|
{ byteCount: 2, xBits: 4, yBits: 4, deltaX: 49, deltaY: 49, xSign: -1, ySign: 1 },
|
|
10697
10728
|
{ byteCount: 2, xBits: 4, yBits: 4, deltaX: 49, deltaY: 49, xSign: 1, ySign: 1 },
|
|
10698
|
-
// Indices 84-
|
|
10729
|
+
// Indices 84-119: 8-bit X + 8-bit Y (3 bytes total)
|
|
10699
10730
|
{ byteCount: 3, xBits: 8, yBits: 8, deltaX: 1, deltaY: 1, xSign: -1, ySign: -1 },
|
|
10700
10731
|
{ byteCount: 3, xBits: 8, yBits: 8, deltaX: 1, deltaY: 1, xSign: 1, ySign: -1 },
|
|
10701
10732
|
{ byteCount: 3, xBits: 8, yBits: 8, deltaX: 1, deltaY: 1, xSign: -1, ySign: 1 },
|
|
@@ -10732,12 +10763,12 @@ var TRIPLET_ENCODINGS = [
|
|
|
10732
10763
|
{ byteCount: 3, xBits: 8, yBits: 8, deltaX: 513, deltaY: 513, xSign: 1, ySign: -1 },
|
|
10733
10764
|
{ byteCount: 3, xBits: 8, yBits: 8, deltaX: 513, deltaY: 513, xSign: -1, ySign: 1 },
|
|
10734
10765
|
{ byteCount: 3, xBits: 8, yBits: 8, deltaX: 513, deltaY: 513, xSign: 1, ySign: 1 },
|
|
10735
|
-
// Indices
|
|
10766
|
+
// Indices 120-123: 12-bit X + 12-bit Y (4 bytes total)
|
|
10736
10767
|
{ byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: -1, ySign: -1 },
|
|
10737
10768
|
{ byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: 1, ySign: -1 },
|
|
10738
10769
|
{ byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: -1, ySign: 1 },
|
|
10739
10770
|
{ byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: 1, ySign: 1 },
|
|
10740
|
-
// Indices
|
|
10771
|
+
// Indices 124-127: 16-bit X + 16-bit Y (5 bytes total)
|
|
10741
10772
|
{ byteCount: 5, xBits: 16, yBits: 16, deltaX: 0, deltaY: 0, xSign: -1, ySign: -1 },
|
|
10742
10773
|
{ byteCount: 5, xBits: 16, yBits: 16, deltaX: 0, deltaY: 0, xSign: 1, ySign: -1 },
|
|
10743
10774
|
{ byteCount: 5, xBits: 16, yBits: 16, deltaX: 0, deltaY: 0, xSign: -1, ySign: 1 },
|
|
@@ -10826,14 +10857,15 @@ function decodePushInstructions(sIn, sOut, pushCount) {
|
|
|
10826
10857
|
if (pushCount === 0) {
|
|
10827
10858
|
return;
|
|
10828
10859
|
}
|
|
10829
|
-
const
|
|
10830
|
-
let isShort = false;
|
|
10860
|
+
const data = [];
|
|
10831
10861
|
let remaining = pushCount;
|
|
10862
|
+
let isShort = false;
|
|
10863
|
+
const runValues = [];
|
|
10832
10864
|
function flush() {
|
|
10833
|
-
if (
|
|
10865
|
+
if (runValues.length === 0) {
|
|
10834
10866
|
return;
|
|
10835
10867
|
}
|
|
10836
|
-
const count =
|
|
10868
|
+
const count = runValues.length;
|
|
10837
10869
|
if (isShort) {
|
|
10838
10870
|
if (count < 8) {
|
|
10839
10871
|
sOut.writeU8(PUSHW + (count - 1));
|
|
@@ -10841,7 +10873,7 @@ function decodePushInstructions(sIn, sOut, pushCount) {
|
|
|
10841
10873
|
sOut.writeU8(NPUSHW);
|
|
10842
10874
|
sOut.writeU8(count);
|
|
10843
10875
|
}
|
|
10844
|
-
for (const v of
|
|
10876
|
+
for (const v of runValues) {
|
|
10845
10877
|
sOut.writeS16(v);
|
|
10846
10878
|
}
|
|
10847
10879
|
} else {
|
|
@@ -10851,54 +10883,50 @@ function decodePushInstructions(sIn, sOut, pushCount) {
|
|
|
10851
10883
|
sOut.writeU8(NPUSHB);
|
|
10852
10884
|
sOut.writeU8(count);
|
|
10853
10885
|
}
|
|
10854
|
-
for (const v of
|
|
10886
|
+
for (const v of runValues) {
|
|
10855
10887
|
sOut.writeU8(v & 255);
|
|
10856
10888
|
}
|
|
10857
10889
|
}
|
|
10858
|
-
|
|
10890
|
+
runValues.length = 0;
|
|
10859
10891
|
}
|
|
10860
|
-
function
|
|
10892
|
+
function put(v) {
|
|
10893
|
+
data.push(v);
|
|
10861
10894
|
const needsShort = v < 0 || v > 255;
|
|
10862
|
-
if (
|
|
10895
|
+
if (runValues.length > 0 && needsShort !== isShort) {
|
|
10863
10896
|
flush();
|
|
10864
10897
|
}
|
|
10865
|
-
if (
|
|
10898
|
+
if (runValues.length === 0) {
|
|
10866
10899
|
isShort = needsShort;
|
|
10867
10900
|
}
|
|
10868
|
-
|
|
10869
|
-
if (
|
|
10901
|
+
runValues.push(v);
|
|
10902
|
+
if (runValues.length >= 255) {
|
|
10870
10903
|
flush();
|
|
10871
10904
|
}
|
|
10872
10905
|
}
|
|
10873
10906
|
while (remaining > 0) {
|
|
10874
|
-
const code = sIn.
|
|
10875
|
-
if (code === 251 && remaining >=
|
|
10876
|
-
|
|
10877
|
-
const
|
|
10878
|
-
|
|
10879
|
-
|
|
10880
|
-
|
|
10881
|
-
|
|
10882
|
-
|
|
10883
|
-
|
|
10884
|
-
|
|
10885
|
-
|
|
10886
|
-
|
|
10887
|
-
const b = read255Short(sIn);
|
|
10907
|
+
const code = sIn.peekU8();
|
|
10908
|
+
if (code === 251 && remaining >= 3 && data.length >= 2) {
|
|
10909
|
+
sIn.readU8();
|
|
10910
|
+
const prev = data[data.length - 2];
|
|
10911
|
+
put(prev);
|
|
10912
|
+
const val = read255Short(sIn);
|
|
10913
|
+
put(val);
|
|
10914
|
+
put(prev);
|
|
10915
|
+
remaining -= 3;
|
|
10916
|
+
} else if (code === 252 && remaining >= 5 && data.length >= 2) {
|
|
10917
|
+
sIn.readU8();
|
|
10918
|
+
const prev = data[data.length - 2];
|
|
10919
|
+
put(prev);
|
|
10888
10920
|
const c = read255Short(sIn);
|
|
10921
|
+
put(c);
|
|
10922
|
+
put(prev);
|
|
10889
10923
|
const d = read255Short(sIn);
|
|
10890
|
-
|
|
10891
|
-
|
|
10892
|
-
|
|
10893
|
-
addValue(c);
|
|
10894
|
-
addValue(a);
|
|
10895
|
-
addValue(d);
|
|
10896
|
-
addValue(a);
|
|
10897
|
-
remaining -= 7;
|
|
10924
|
+
put(d);
|
|
10925
|
+
put(prev);
|
|
10926
|
+
remaining -= 5;
|
|
10898
10927
|
} else {
|
|
10899
|
-
sIn.seekRelative(-1);
|
|
10900
10928
|
const v = read255Short(sIn);
|
|
10901
|
-
|
|
10929
|
+
put(v);
|
|
10902
10930
|
remaining -= 1;
|
|
10903
10931
|
}
|
|
10904
10932
|
}
|
|
@@ -10926,6 +10954,9 @@ function makeGlyphFlags(x, y, onCurve, firstTime) {
|
|
|
10926
10954
|
return flags;
|
|
10927
10955
|
}
|
|
10928
10956
|
function decodeSimpleGlyph(numContours, streams, out, calcBBox, minX, minY, maxX, maxY) {
|
|
10957
|
+
if (numContours === 0) {
|
|
10958
|
+
return;
|
|
10959
|
+
}
|
|
10929
10960
|
const sGlyph = streams[0];
|
|
10930
10961
|
out.writeS16(numContours);
|
|
10931
10962
|
const bboxPos = out.pos;
|
|
@@ -10946,13 +10977,12 @@ function decodeSimpleGlyph(numContours, streams, out, calcBBox, minX, minY, maxX
|
|
|
10946
10977
|
}
|
|
10947
10978
|
let totalPoints = 0;
|
|
10948
10979
|
for (let c = 0; c < numContours; c++) {
|
|
10949
|
-
const pointsInContour = read255UShort(sGlyph);
|
|
10950
|
-
totalPoints += pointsInContour;
|
|
10951
10980
|
if (c === 0) {
|
|
10952
|
-
|
|
10953
|
-
} else {
|
|
10954
|
-
out.writeU16(totalPoints - 1);
|
|
10981
|
+
totalPoints = 1;
|
|
10955
10982
|
}
|
|
10983
|
+
const pointsInContour = read255UShort(sGlyph);
|
|
10984
|
+
totalPoints += pointsInContour;
|
|
10985
|
+
out.writeU16(totalPoints - 1);
|
|
10956
10986
|
}
|
|
10957
10987
|
const flagBytes = new Uint8Array(totalPoints);
|
|
10958
10988
|
for (let i = 0; i < totalPoints; i++) {
|
|
@@ -10965,7 +10995,7 @@ function decodeSimpleGlyph(numContours, streams, out, calcBBox, minX, minY, maxX
|
|
|
10965
10995
|
let cumulativeY = 0;
|
|
10966
10996
|
for (let i = 0; i < totalPoints; i++) {
|
|
10967
10997
|
const flag = flagBytes[i];
|
|
10968
|
-
onCurve[i] = flag
|
|
10998
|
+
onCurve[i] = flag & 128 ? 0 : 1;
|
|
10969
10999
|
const enc = TRIPLET_ENCODINGS[flag & 127];
|
|
10970
11000
|
const extraBytes = enc.byteCount - 1;
|
|
10971
11001
|
const subBuf = new Uint8Array(extraBytes);
|
|
@@ -11304,7 +11334,10 @@ var AHuff = class _AHuff {
|
|
|
11304
11334
|
this.bio = bio;
|
|
11305
11335
|
this.range = range;
|
|
11306
11336
|
this.bitCount = bitsUsed(range - 1);
|
|
11307
|
-
this.bitCount2 =
|
|
11337
|
+
this.bitCount2 = 0;
|
|
11338
|
+
if (range > 256 && range < 512) {
|
|
11339
|
+
this.bitCount2 = bitsUsed(range - 256 - 1) + 1;
|
|
11340
|
+
}
|
|
11308
11341
|
const treeSize = 2 * range;
|
|
11309
11342
|
this.tree = Array.from({ length: treeSize });
|
|
11310
11343
|
for (let i = 0; i < treeSize; i++) {
|
|
@@ -11312,6 +11345,7 @@ var AHuff = class _AHuff {
|
|
|
11312
11345
|
}
|
|
11313
11346
|
for (let i = 2; i < treeSize; i++) {
|
|
11314
11347
|
this.tree[i].up = i >> 1;
|
|
11348
|
+
this.tree[i].weight = 1;
|
|
11315
11349
|
}
|
|
11316
11350
|
for (let i = 1; i < range; i++) {
|
|
11317
11351
|
this.tree[i].left = 2 * i;
|
|
@@ -11321,7 +11355,8 @@ var AHuff = class _AHuff {
|
|
|
11321
11355
|
for (let i = 0; i < range; i++) {
|
|
11322
11356
|
const leafIdx = range + i;
|
|
11323
11357
|
this.tree[leafIdx].code = i;
|
|
11324
|
-
this.tree[leafIdx].
|
|
11358
|
+
this.tree[leafIdx].left = -1;
|
|
11359
|
+
this.tree[leafIdx].right = -1;
|
|
11325
11360
|
}
|
|
11326
11361
|
this.symbolIndex = Array.from({ length: range });
|
|
11327
11362
|
for (let i = 0; i < range; i++) {
|
|
@@ -11361,15 +11396,13 @@ var AHuff = class _AHuff {
|
|
|
11361
11396
|
*/
|
|
11362
11397
|
readSymbol() {
|
|
11363
11398
|
let a = _AHuff.ROOT;
|
|
11364
|
-
|
|
11365
|
-
|
|
11366
|
-
|
|
11367
|
-
|
|
11368
|
-
|
|
11369
|
-
}
|
|
11370
|
-
}
|
|
11399
|
+
let symbol;
|
|
11400
|
+
do {
|
|
11401
|
+
a = this.bio.inputBit() ? this.tree[a].right : this.tree[a].left;
|
|
11402
|
+
symbol = this.tree[a].code;
|
|
11403
|
+
} while (symbol < 0);
|
|
11371
11404
|
this.updateWeight(a);
|
|
11372
|
-
return
|
|
11405
|
+
return symbol;
|
|
11373
11406
|
}
|
|
11374
11407
|
// --------------------------------------------------------------------
|
|
11375
11408
|
// Private helpers
|
|
@@ -11393,17 +11426,19 @@ var AHuff = class _AHuff {
|
|
|
11393
11426
|
updateWeight(a) {
|
|
11394
11427
|
const tree = this.tree;
|
|
11395
11428
|
for (; a !== _AHuff.ROOT; a = tree[a].up) {
|
|
11429
|
+
const weightA = tree[a].weight;
|
|
11396
11430
|
let b = a - 1;
|
|
11397
|
-
if (
|
|
11398
|
-
|
|
11431
|
+
if (tree[b].weight === weightA) {
|
|
11432
|
+
do {
|
|
11399
11433
|
b--;
|
|
11400
|
-
}
|
|
11401
|
-
|
|
11434
|
+
} while (tree[b].weight === weightA);
|
|
11435
|
+
b++;
|
|
11436
|
+
if (b > _AHuff.ROOT) {
|
|
11402
11437
|
this.swapNodes(a, b);
|
|
11403
11438
|
a = b;
|
|
11404
11439
|
}
|
|
11405
11440
|
}
|
|
11406
|
-
tree[a].weight
|
|
11441
|
+
tree[a].weight = weightA + 1;
|
|
11407
11442
|
}
|
|
11408
11443
|
tree[_AHuff.ROOT].weight++;
|
|
11409
11444
|
}
|
|
@@ -11423,38 +11458,26 @@ var AHuff = class _AHuff {
|
|
|
11423
11458
|
*/
|
|
11424
11459
|
swapNodes(a, b) {
|
|
11425
11460
|
const tree = this.tree;
|
|
11426
|
-
const
|
|
11427
|
-
const
|
|
11428
|
-
|
|
11429
|
-
|
|
11430
|
-
|
|
11431
|
-
|
|
11432
|
-
|
|
11433
|
-
|
|
11434
|
-
|
|
11435
|
-
|
|
11436
|
-
|
|
11437
|
-
|
|
11438
|
-
|
|
11439
|
-
na.weight = nb.weight;
|
|
11440
|
-
nb.weight = tmp;
|
|
11441
|
-
if (na.left) {
|
|
11442
|
-
tree[na.left].up = a;
|
|
11443
|
-
}
|
|
11444
|
-
if (na.right) {
|
|
11445
|
-
tree[na.right].up = a;
|
|
11446
|
-
}
|
|
11447
|
-
if (nb.left) {
|
|
11448
|
-
tree[nb.left].up = b;
|
|
11449
|
-
}
|
|
11450
|
-
if (nb.right) {
|
|
11451
|
-
tree[nb.right].up = b;
|
|
11452
|
-
}
|
|
11453
|
-
if (na.code >= 0) {
|
|
11454
|
-
this.symbolIndex[na.code] = a;
|
|
11461
|
+
const upa = tree[a].up;
|
|
11462
|
+
const upb = tree[b].up;
|
|
11463
|
+
const tmp = tree[a];
|
|
11464
|
+
tree[a] = tree[b];
|
|
11465
|
+
tree[b] = tmp;
|
|
11466
|
+
tree[a].up = upa;
|
|
11467
|
+
tree[b].up = upb;
|
|
11468
|
+
let code = tree[a].code;
|
|
11469
|
+
if (code < 0) {
|
|
11470
|
+
tree[tree[a].left].up = a;
|
|
11471
|
+
tree[tree[a].right].up = a;
|
|
11472
|
+
} else {
|
|
11473
|
+
this.symbolIndex[code] = a;
|
|
11455
11474
|
}
|
|
11456
|
-
|
|
11457
|
-
|
|
11475
|
+
code = tree[b].code;
|
|
11476
|
+
if (code < 0) {
|
|
11477
|
+
tree[tree[b].left].up = b;
|
|
11478
|
+
tree[tree[b].right].up = b;
|
|
11479
|
+
} else {
|
|
11480
|
+
this.symbolIndex[code] = b;
|
|
11458
11481
|
}
|
|
11459
11482
|
}
|
|
11460
11483
|
/**
|
|
@@ -11833,12 +11856,12 @@ function unpackMtx(data, size) {
|
|
|
11833
11856
|
const offset2 = data[4] << 16 | data[5] << 8 | data[6];
|
|
11834
11857
|
const offset3 = data[7] << 16 | data[8] << 8 | data[9];
|
|
11835
11858
|
const offsets = [10, offset2, offset3];
|
|
11836
|
-
const
|
|
11859
|
+
const blockSizes = [offset2 - 10, offset3 - offset2, size - offset3];
|
|
11837
11860
|
const streams = [];
|
|
11838
11861
|
const decompressedSizes = [];
|
|
11839
11862
|
for (let i = 0; i < 3; i++) {
|
|
11840
11863
|
const block = data.subarray(offsets[i]);
|
|
11841
|
-
const decompressed = lzcompDecompress(block,
|
|
11864
|
+
const decompressed = lzcompDecompress(block, blockSizes[i], versionMagic);
|
|
11842
11865
|
streams.push(decompressed);
|
|
11843
11866
|
decompressedSizes.push(decompressed.length);
|
|
11844
11867
|
}
|
|
@@ -11930,6 +11953,15 @@ function parseEotHeader(data) {
|
|
|
11930
11953
|
const fullName = readNameString();
|
|
11931
11954
|
if (version >= 131074) {
|
|
11932
11955
|
readNameString();
|
|
11956
|
+
offset += 8;
|
|
11957
|
+
if (offset + 4 <= data.length) {
|
|
11958
|
+
const signatureSize = readUint16LE(data, offset + 2);
|
|
11959
|
+
offset += 4 + signatureSize;
|
|
11960
|
+
}
|
|
11961
|
+
if (offset + 8 <= data.length) {
|
|
11962
|
+
const eudcFontSize = readUint32LE(data, offset + 4);
|
|
11963
|
+
offset += 8 + eudcFontSize;
|
|
11964
|
+
}
|
|
11933
11965
|
}
|
|
11934
11966
|
return {
|
|
11935
11967
|
eotSize,
|
|
@@ -24484,6 +24516,943 @@ function applyThemeToData(data, newColorScheme, newFontScheme, themeName) {
|
|
|
24484
24516
|
};
|
|
24485
24517
|
}
|
|
24486
24518
|
|
|
24519
|
+
// src/core/utils/accessibility-checker.ts
|
|
24520
|
+
function parseHexColor(hex) {
|
|
24521
|
+
const cleaned = hex.replace(/^#/, "");
|
|
24522
|
+
if (!/^[\da-fA-F]+$/.test(cleaned)) {
|
|
24523
|
+
return null;
|
|
24524
|
+
}
|
|
24525
|
+
if (cleaned.length === 3) {
|
|
24526
|
+
const r = Number.parseInt(cleaned[0] + cleaned[0], 16);
|
|
24527
|
+
const g = Number.parseInt(cleaned[1] + cleaned[1], 16);
|
|
24528
|
+
const b = Number.parseInt(cleaned[2] + cleaned[2], 16);
|
|
24529
|
+
return [r, g, b];
|
|
24530
|
+
}
|
|
24531
|
+
if (cleaned.length === 6) {
|
|
24532
|
+
const r = Number.parseInt(cleaned.slice(0, 2), 16);
|
|
24533
|
+
const g = Number.parseInt(cleaned.slice(2, 4), 16);
|
|
24534
|
+
const b = Number.parseInt(cleaned.slice(4, 6), 16);
|
|
24535
|
+
return [r, g, b];
|
|
24536
|
+
}
|
|
24537
|
+
return null;
|
|
24538
|
+
}
|
|
24539
|
+
function relativeLuminance(r, g, b) {
|
|
24540
|
+
const [rs, gs, bs] = [r, g, b].map((c) => {
|
|
24541
|
+
const s = c / 255;
|
|
24542
|
+
return s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
|
|
24543
|
+
});
|
|
24544
|
+
return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
|
|
24545
|
+
}
|
|
24546
|
+
function computeContrastRatio(fg, bg) {
|
|
24547
|
+
const fgRgb = parseHexColor(fg);
|
|
24548
|
+
const bgRgb = parseHexColor(bg);
|
|
24549
|
+
if (!fgRgb || !bgRgb) {
|
|
24550
|
+
return 21;
|
|
24551
|
+
}
|
|
24552
|
+
const l1 = relativeLuminance(...fgRgb);
|
|
24553
|
+
const l2 = relativeLuminance(...bgRgb);
|
|
24554
|
+
const lighter = Math.max(l1, l2);
|
|
24555
|
+
const darker = Math.min(l1, l2);
|
|
24556
|
+
return (lighter + 0.05) / (darker + 0.05);
|
|
24557
|
+
}
|
|
24558
|
+
var IMAGE_LIKE_TYPES = /* @__PURE__ */ new Set(["image", "picture"]);
|
|
24559
|
+
var VISUAL_CONTENT_TYPES = /* @__PURE__ */ new Set(["image", "picture", "chart", "smartArt", "media"]);
|
|
24560
|
+
function getElementText(el) {
|
|
24561
|
+
if ("text" in el && typeof el.text === "string") {
|
|
24562
|
+
return el.text;
|
|
24563
|
+
}
|
|
24564
|
+
if ("textSegments" in el && Array.isArray(el.textSegments)) {
|
|
24565
|
+
return el.textSegments.map((s) => s.text || "").join("");
|
|
24566
|
+
}
|
|
24567
|
+
return "";
|
|
24568
|
+
}
|
|
24569
|
+
function getAltText(el) {
|
|
24570
|
+
if ("altText" in el) {
|
|
24571
|
+
return el.altText;
|
|
24572
|
+
}
|
|
24573
|
+
return void 0;
|
|
24574
|
+
}
|
|
24575
|
+
function getTextColor(el) {
|
|
24576
|
+
if ("textStyle" in el && el.textStyle) {
|
|
24577
|
+
return el.textStyle.color;
|
|
24578
|
+
}
|
|
24579
|
+
if ("textSegments" in el && Array.isArray(el.textSegments) && el.textSegments.length > 0) {
|
|
24580
|
+
const firstStyle = el.textSegments[0]?.style;
|
|
24581
|
+
return firstStyle?.color;
|
|
24582
|
+
}
|
|
24583
|
+
return void 0;
|
|
24584
|
+
}
|
|
24585
|
+
function getBackgroundColor(el) {
|
|
24586
|
+
if ("shapeStyle" in el && el.shapeStyle) {
|
|
24587
|
+
return el.shapeStyle.fillColor;
|
|
24588
|
+
}
|
|
24589
|
+
return void 0;
|
|
24590
|
+
}
|
|
24591
|
+
function isTitleElement(el) {
|
|
24592
|
+
const id = el.id.toLowerCase();
|
|
24593
|
+
return id.includes("title") || id.startsWith("ctr") || id.includes("ctrtitle");
|
|
24594
|
+
}
|
|
24595
|
+
function isVisibleElement(el) {
|
|
24596
|
+
if ("hidden" in el && el.hidden) {
|
|
24597
|
+
return false;
|
|
24598
|
+
}
|
|
24599
|
+
if ("opacity" in el && typeof el.opacity === "number" && el.opacity <= 0) {
|
|
24600
|
+
return false;
|
|
24601
|
+
}
|
|
24602
|
+
return true;
|
|
24603
|
+
}
|
|
24604
|
+
function checkMissingAltText(slide, slideIndex) {
|
|
24605
|
+
const issues = [];
|
|
24606
|
+
for (const el of slide.elements) {
|
|
24607
|
+
if (!isVisibleElement(el)) {
|
|
24608
|
+
continue;
|
|
24609
|
+
}
|
|
24610
|
+
if (!VISUAL_CONTENT_TYPES.has(el.type)) {
|
|
24611
|
+
continue;
|
|
24612
|
+
}
|
|
24613
|
+
const alt = getAltText(el);
|
|
24614
|
+
if (!alt || alt.trim() === "") {
|
|
24615
|
+
const label = IMAGE_LIKE_TYPES.has(el.type) ? "Image" : el.type === "chart" ? "Chart" : el.type === "smartArt" ? "SmartArt" : "Media";
|
|
24616
|
+
issues.push({
|
|
24617
|
+
type: "missingAltText",
|
|
24618
|
+
severity: "error",
|
|
24619
|
+
slideIndex,
|
|
24620
|
+
elementId: el.id,
|
|
24621
|
+
message: `${label} is missing alternative text.`,
|
|
24622
|
+
suggestion: `Add a description to the ${label.toLowerCase()} so screen readers can describe it.`
|
|
24623
|
+
});
|
|
24624
|
+
}
|
|
24625
|
+
}
|
|
24626
|
+
return issues;
|
|
24627
|
+
}
|
|
24628
|
+
function checkMissingSlideTitle(slide, slideIndex) {
|
|
24629
|
+
const titleElement = slide.elements.find((el) => isTitleElement(el) && isVisibleElement(el));
|
|
24630
|
+
if (!titleElement) {
|
|
24631
|
+
return [
|
|
24632
|
+
{
|
|
24633
|
+
type: "missingSlideTitle",
|
|
24634
|
+
severity: "warning",
|
|
24635
|
+
slideIndex,
|
|
24636
|
+
message: "Slide is missing a title.",
|
|
24637
|
+
suggestion: "Add a title element so screen readers can navigate between slides."
|
|
24638
|
+
}
|
|
24639
|
+
];
|
|
24640
|
+
}
|
|
24641
|
+
const text = getElementText(titleElement).trim();
|
|
24642
|
+
if (text === "") {
|
|
24643
|
+
return [
|
|
24644
|
+
{
|
|
24645
|
+
type: "missingSlideTitle",
|
|
24646
|
+
severity: "warning",
|
|
24647
|
+
slideIndex,
|
|
24648
|
+
elementId: titleElement.id,
|
|
24649
|
+
message: "Slide title is empty.",
|
|
24650
|
+
suggestion: "Add text to the title element."
|
|
24651
|
+
}
|
|
24652
|
+
];
|
|
24653
|
+
}
|
|
24654
|
+
return [];
|
|
24655
|
+
}
|
|
24656
|
+
function checkLowContrast(slide, slideIndex, minRatio, slideBg) {
|
|
24657
|
+
const issues = [];
|
|
24658
|
+
const defaultBg = slideBg || "#FFFFFF";
|
|
24659
|
+
for (const el of slide.elements) {
|
|
24660
|
+
if (!isVisibleElement(el)) {
|
|
24661
|
+
continue;
|
|
24662
|
+
}
|
|
24663
|
+
const text = getElementText(el);
|
|
24664
|
+
if (!text.trim()) {
|
|
24665
|
+
continue;
|
|
24666
|
+
}
|
|
24667
|
+
const fg = getTextColor(el);
|
|
24668
|
+
if (!fg) {
|
|
24669
|
+
continue;
|
|
24670
|
+
}
|
|
24671
|
+
const bg = getBackgroundColor(el) || defaultBg;
|
|
24672
|
+
const ratio = computeContrastRatio(fg, bg);
|
|
24673
|
+
if (ratio < minRatio) {
|
|
24674
|
+
issues.push({
|
|
24675
|
+
type: "lowContrast",
|
|
24676
|
+
severity: "warning",
|
|
24677
|
+
slideIndex,
|
|
24678
|
+
elementId: el.id,
|
|
24679
|
+
message: `Text contrast ratio is ${ratio.toFixed(1)}:1 (minimum ${minRatio}:1).`,
|
|
24680
|
+
suggestion: "Increase contrast between text colour and background."
|
|
24681
|
+
});
|
|
24682
|
+
}
|
|
24683
|
+
}
|
|
24684
|
+
return issues;
|
|
24685
|
+
}
|
|
24686
|
+
function checkComplexTables(slide, slideIndex) {
|
|
24687
|
+
const issues = [];
|
|
24688
|
+
for (const el of slide.elements) {
|
|
24689
|
+
if (el.type !== "table") {
|
|
24690
|
+
continue;
|
|
24691
|
+
}
|
|
24692
|
+
const tableData = el.tableData;
|
|
24693
|
+
if (!tableData) {
|
|
24694
|
+
continue;
|
|
24695
|
+
}
|
|
24696
|
+
let mergeCount = 0;
|
|
24697
|
+
for (const row of tableData.rows) {
|
|
24698
|
+
for (const cell of row.cells) {
|
|
24699
|
+
if (cell.gridSpan && cell.gridSpan > 1 || cell.rowSpan && cell.rowSpan > 1) {
|
|
24700
|
+
mergeCount++;
|
|
24701
|
+
}
|
|
24702
|
+
}
|
|
24703
|
+
}
|
|
24704
|
+
if (mergeCount > 2) {
|
|
24705
|
+
issues.push({
|
|
24706
|
+
type: "complexTable",
|
|
24707
|
+
severity: "warning",
|
|
24708
|
+
slideIndex,
|
|
24709
|
+
elementId: el.id,
|
|
24710
|
+
message: `Table has ${mergeCount} merged cell regions, which can confuse screen readers.`,
|
|
24711
|
+
suggestion: "Simplify the table structure or split into multiple simpler tables."
|
|
24712
|
+
});
|
|
24713
|
+
}
|
|
24714
|
+
}
|
|
24715
|
+
return issues;
|
|
24716
|
+
}
|
|
24717
|
+
function checkDuplicateTitles(slides) {
|
|
24718
|
+
const issues = [];
|
|
24719
|
+
const titleMap = /* @__PURE__ */ new Map();
|
|
24720
|
+
for (let i = 0; i < slides.length; i++) {
|
|
24721
|
+
const slide = slides[i];
|
|
24722
|
+
const titleEl = slide.elements.find((el) => isTitleElement(el) && isVisibleElement(el));
|
|
24723
|
+
if (!titleEl) {
|
|
24724
|
+
continue;
|
|
24725
|
+
}
|
|
24726
|
+
const text = getElementText(titleEl).trim().toLowerCase();
|
|
24727
|
+
if (!text) {
|
|
24728
|
+
continue;
|
|
24729
|
+
}
|
|
24730
|
+
const existing = titleMap.get(text);
|
|
24731
|
+
if (existing) {
|
|
24732
|
+
existing.push(i);
|
|
24733
|
+
} else {
|
|
24734
|
+
titleMap.set(text, [i]);
|
|
24735
|
+
}
|
|
24736
|
+
}
|
|
24737
|
+
for (const [title, indices] of titleMap) {
|
|
24738
|
+
if (indices.length > 1) {
|
|
24739
|
+
for (const idx of indices) {
|
|
24740
|
+
issues.push({
|
|
24741
|
+
type: "duplicateTitle",
|
|
24742
|
+
severity: "tip",
|
|
24743
|
+
slideIndex: idx,
|
|
24744
|
+
message: `Slide title "${title}" is duplicated across ${indices.length} slides.`,
|
|
24745
|
+
suggestion: "Use unique titles to help screen reader users distinguish slides."
|
|
24746
|
+
});
|
|
24747
|
+
}
|
|
24748
|
+
}
|
|
24749
|
+
}
|
|
24750
|
+
return issues;
|
|
24751
|
+
}
|
|
24752
|
+
function checkBlankSlide(slide, slideIndex) {
|
|
24753
|
+
const hasVisibleContent = slide.elements.some((el) => {
|
|
24754
|
+
if (!isVisibleElement(el)) {
|
|
24755
|
+
return false;
|
|
24756
|
+
}
|
|
24757
|
+
if (el.type === "text" || el.type === "shape") {
|
|
24758
|
+
return getElementText(el).trim() !== "";
|
|
24759
|
+
}
|
|
24760
|
+
return true;
|
|
24761
|
+
});
|
|
24762
|
+
if (!hasVisibleContent) {
|
|
24763
|
+
return [
|
|
24764
|
+
{
|
|
24765
|
+
type: "blankSlide",
|
|
24766
|
+
severity: "tip",
|
|
24767
|
+
slideIndex,
|
|
24768
|
+
message: "Slide appears to have no visible content.",
|
|
24769
|
+
suggestion: "Add content or remove the blank slide."
|
|
24770
|
+
}
|
|
24771
|
+
];
|
|
24772
|
+
}
|
|
24773
|
+
return [];
|
|
24774
|
+
}
|
|
24775
|
+
function checkPresentation(data, options = {}) {
|
|
24776
|
+
const { minContrastRatio = 4.5, skipContrast = false, skipBlankSlide = false } = options;
|
|
24777
|
+
const issues = [];
|
|
24778
|
+
for (let i = 0; i < data.slides.length; i++) {
|
|
24779
|
+
const slide = data.slides[i];
|
|
24780
|
+
issues.push(...checkMissingAltText(slide, i));
|
|
24781
|
+
issues.push(...checkMissingSlideTitle(slide, i));
|
|
24782
|
+
if (!skipContrast) {
|
|
24783
|
+
issues.push(...checkLowContrast(slide, i, minContrastRatio, slide.backgroundColor));
|
|
24784
|
+
}
|
|
24785
|
+
issues.push(...checkComplexTables(slide, i));
|
|
24786
|
+
if (!skipBlankSlide) {
|
|
24787
|
+
issues.push(...checkBlankSlide(slide, i));
|
|
24788
|
+
}
|
|
24789
|
+
}
|
|
24790
|
+
issues.push(...checkDuplicateTitles(data.slides));
|
|
24791
|
+
const severityOrder = { error: 0, warning: 1, tip: 2 };
|
|
24792
|
+
issues.sort(
|
|
24793
|
+
(a, b) => a.slideIndex - b.slideIndex || severityOrder[a.severity] - severityOrder[b.severity]
|
|
24794
|
+
);
|
|
24795
|
+
return issues;
|
|
24796
|
+
}
|
|
24797
|
+
|
|
24798
|
+
// src/core/utils/custom-show-utils.ts
|
|
24799
|
+
function findCustomShow(customShows, nameOrId) {
|
|
24800
|
+
if (!customShows || customShows.length === 0) {
|
|
24801
|
+
return void 0;
|
|
24802
|
+
}
|
|
24803
|
+
const lower = nameOrId.toLowerCase();
|
|
24804
|
+
return customShows.find((s) => s.id === nameOrId) || customShows.find((s) => s.name.toLowerCase() === lower);
|
|
24805
|
+
}
|
|
24806
|
+
function resolveCustomShowSlideIndices(customShow, slides) {
|
|
24807
|
+
const rIdToIndex = /* @__PURE__ */ new Map();
|
|
24808
|
+
for (let i = 0; i < slides.length; i++) {
|
|
24809
|
+
rIdToIndex.set(slides[i].rId, i);
|
|
24810
|
+
}
|
|
24811
|
+
const indices = [];
|
|
24812
|
+
for (const rId of customShow.slideRIds) {
|
|
24813
|
+
const idx = rIdToIndex.get(rId);
|
|
24814
|
+
if (idx !== void 0) {
|
|
24815
|
+
indices.push(idx);
|
|
24816
|
+
}
|
|
24817
|
+
}
|
|
24818
|
+
return indices;
|
|
24819
|
+
}
|
|
24820
|
+
function getCustomShowNames(customShows) {
|
|
24821
|
+
if (!customShows) {
|
|
24822
|
+
return [];
|
|
24823
|
+
}
|
|
24824
|
+
return customShows.map((s) => s.name);
|
|
24825
|
+
}
|
|
24826
|
+
function navigateCustomShow(currentSlideIndex, direction, filteredIndices, wrap = false) {
|
|
24827
|
+
if (filteredIndices.length === 0) {
|
|
24828
|
+
return currentSlideIndex;
|
|
24829
|
+
}
|
|
24830
|
+
const posInShow = filteredIndices.indexOf(currentSlideIndex);
|
|
24831
|
+
if (posInShow === -1) {
|
|
24832
|
+
return filteredIndices[0];
|
|
24833
|
+
}
|
|
24834
|
+
const nextPos = posInShow + direction;
|
|
24835
|
+
if (nextPos < 0) {
|
|
24836
|
+
return wrap ? filteredIndices[filteredIndices.length - 1] : currentSlideIndex;
|
|
24837
|
+
}
|
|
24838
|
+
if (nextPos >= filteredIndices.length) {
|
|
24839
|
+
return wrap ? filteredIndices[0] : currentSlideIndex;
|
|
24840
|
+
}
|
|
24841
|
+
return filteredIndices[nextPos];
|
|
24842
|
+
}
|
|
24843
|
+
function getCustomShowPositionLabel(currentSlideIndex, filteredIndices) {
|
|
24844
|
+
const pos2 = filteredIndices.indexOf(currentSlideIndex);
|
|
24845
|
+
if (pos2 === -1) {
|
|
24846
|
+
return "";
|
|
24847
|
+
}
|
|
24848
|
+
return `${pos2 + 1} of ${filteredIndices.length}`;
|
|
24849
|
+
}
|
|
24850
|
+
|
|
24851
|
+
// src/core/utils/table-style-resolver.ts
|
|
24852
|
+
function mergeBorder(base, override) {
|
|
24853
|
+
if (!base && !override) {
|
|
24854
|
+
return void 0;
|
|
24855
|
+
}
|
|
24856
|
+
if (!base) {
|
|
24857
|
+
return override;
|
|
24858
|
+
}
|
|
24859
|
+
if (!override) {
|
|
24860
|
+
return base;
|
|
24861
|
+
}
|
|
24862
|
+
return {
|
|
24863
|
+
width: override.width ?? base.width,
|
|
24864
|
+
color: override.color ?? base.color,
|
|
24865
|
+
dash: override.dash ?? base.dash
|
|
24866
|
+
};
|
|
24867
|
+
}
|
|
24868
|
+
function mergeStyleParts(base, override) {
|
|
24869
|
+
if (!base && !override) {
|
|
24870
|
+
return void 0;
|
|
24871
|
+
}
|
|
24872
|
+
if (!base) {
|
|
24873
|
+
return override;
|
|
24874
|
+
}
|
|
24875
|
+
if (!override) {
|
|
24876
|
+
return base;
|
|
24877
|
+
}
|
|
24878
|
+
const merged = {};
|
|
24879
|
+
if (override.fill || base.fill) {
|
|
24880
|
+
merged.fill = {
|
|
24881
|
+
color: override.fill?.color ?? base.fill?.color,
|
|
24882
|
+
gradient: override.fill?.gradient ?? base.fill?.gradient,
|
|
24883
|
+
pattern: override.fill?.pattern ?? base.fill?.pattern
|
|
24884
|
+
};
|
|
24885
|
+
}
|
|
24886
|
+
if (override.borders || base.borders) {
|
|
24887
|
+
merged.borders = {
|
|
24888
|
+
top: mergeBorder(base.borders?.top, override.borders?.top),
|
|
24889
|
+
bottom: mergeBorder(base.borders?.bottom, override.borders?.bottom),
|
|
24890
|
+
left: mergeBorder(base.borders?.left, override.borders?.left),
|
|
24891
|
+
right: mergeBorder(base.borders?.right, override.borders?.right)
|
|
24892
|
+
};
|
|
24893
|
+
}
|
|
24894
|
+
if (override.text || base.text) {
|
|
24895
|
+
merged.text = {
|
|
24896
|
+
bold: override.text?.bold ?? base.text?.bold,
|
|
24897
|
+
italic: override.text?.italic ?? base.text?.italic,
|
|
24898
|
+
color: override.text?.color ?? base.text?.color,
|
|
24899
|
+
fontSize: override.text?.fontSize ?? base.text?.fontSize
|
|
24900
|
+
};
|
|
24901
|
+
}
|
|
24902
|
+
return merged;
|
|
24903
|
+
}
|
|
24904
|
+
function resolveTableCellStyle(rowIndex, colIndex, totalRows, totalCols, flags, style) {
|
|
24905
|
+
let effective = style.wholeTbl ? { ...style.wholeTbl } : void 0;
|
|
24906
|
+
if (flags.bandedRows) {
|
|
24907
|
+
const cycle = flags.bandRowCycle ?? 1;
|
|
24908
|
+
const bandRow = flags.firstRow ? rowIndex - 1 : rowIndex;
|
|
24909
|
+
if (bandRow >= 0) {
|
|
24910
|
+
const bandIndex = Math.floor(bandRow / cycle) % 2;
|
|
24911
|
+
const bandPart = bandIndex === 0 ? style.band1H : style.band2H;
|
|
24912
|
+
if (bandPart) {
|
|
24913
|
+
effective = mergeStyleParts(effective, bandPart);
|
|
24914
|
+
}
|
|
24915
|
+
}
|
|
24916
|
+
}
|
|
24917
|
+
if (flags.bandedColumns) {
|
|
24918
|
+
const cycle = flags.bandColCycle ?? 1;
|
|
24919
|
+
const bandCol = flags.firstCol ? colIndex - 1 : colIndex;
|
|
24920
|
+
if (bandCol >= 0) {
|
|
24921
|
+
const bandIndex = Math.floor(bandCol / cycle) % 2;
|
|
24922
|
+
const bandPart = bandIndex === 0 ? style.band1V : style.band2V;
|
|
24923
|
+
if (bandPart) {
|
|
24924
|
+
effective = mergeStyleParts(effective, bandPart);
|
|
24925
|
+
}
|
|
24926
|
+
}
|
|
24927
|
+
}
|
|
24928
|
+
if (flags.lastRow && rowIndex === totalRows - 1 && style.lastRow) {
|
|
24929
|
+
effective = mergeStyleParts(effective, style.lastRow);
|
|
24930
|
+
}
|
|
24931
|
+
if (flags.firstRow && rowIndex === 0 && style.firstRow) {
|
|
24932
|
+
effective = mergeStyleParts(effective, style.firstRow);
|
|
24933
|
+
}
|
|
24934
|
+
if (flags.lastCol && colIndex === totalCols - 1 && style.lastCol) {
|
|
24935
|
+
effective = mergeStyleParts(effective, style.lastCol);
|
|
24936
|
+
}
|
|
24937
|
+
if (flags.firstCol && colIndex === 0 && style.firstCol) {
|
|
24938
|
+
effective = mergeStyleParts(effective, style.firstCol);
|
|
24939
|
+
}
|
|
24940
|
+
const isFirstRow = flags.firstRow && rowIndex === 0;
|
|
24941
|
+
const isLastRow = flags.lastRow && rowIndex === totalRows - 1;
|
|
24942
|
+
const isFirstCol = flags.firstCol && colIndex === 0;
|
|
24943
|
+
const isLastCol = flags.lastCol && colIndex === totalCols - 1;
|
|
24944
|
+
if (isLastRow && isLastCol && style.seCell) {
|
|
24945
|
+
effective = mergeStyleParts(effective, style.seCell);
|
|
24946
|
+
}
|
|
24947
|
+
if (isLastRow && isFirstCol && style.swCell) {
|
|
24948
|
+
effective = mergeStyleParts(effective, style.swCell);
|
|
24949
|
+
}
|
|
24950
|
+
if (isFirstRow && isLastCol && style.neCell) {
|
|
24951
|
+
effective = mergeStyleParts(effective, style.neCell);
|
|
24952
|
+
}
|
|
24953
|
+
if (isFirstRow && isFirstCol && style.nwCell) {
|
|
24954
|
+
effective = mergeStyleParts(effective, style.nwCell);
|
|
24955
|
+
}
|
|
24956
|
+
return partToCellStyle(effective);
|
|
24957
|
+
}
|
|
24958
|
+
function partToCellStyle(part) {
|
|
24959
|
+
if (!part) {
|
|
24960
|
+
return {};
|
|
24961
|
+
}
|
|
24962
|
+
const result = {};
|
|
24963
|
+
if (part.fill) {
|
|
24964
|
+
if (part.fill.color) {
|
|
24965
|
+
result.backgroundColor = part.fill.color;
|
|
24966
|
+
result.fillMode = "solid";
|
|
24967
|
+
}
|
|
24968
|
+
if (part.fill.gradient) {
|
|
24969
|
+
result.fillMode = "gradient";
|
|
24970
|
+
}
|
|
24971
|
+
if (part.fill.pattern) {
|
|
24972
|
+
result.fillMode = "pattern";
|
|
24973
|
+
}
|
|
24974
|
+
}
|
|
24975
|
+
if (part.borders) {
|
|
24976
|
+
if (part.borders.top) {
|
|
24977
|
+
if (part.borders.top.width !== void 0) {
|
|
24978
|
+
result.borderTopWidth = part.borders.top.width;
|
|
24979
|
+
}
|
|
24980
|
+
if (part.borders.top.color) {
|
|
24981
|
+
result.borderTopColor = part.borders.top.color;
|
|
24982
|
+
}
|
|
24983
|
+
if (part.borders.top.dash) {
|
|
24984
|
+
result.borderTopDash = part.borders.top.dash;
|
|
24985
|
+
}
|
|
24986
|
+
}
|
|
24987
|
+
if (part.borders.bottom) {
|
|
24988
|
+
if (part.borders.bottom.width !== void 0) {
|
|
24989
|
+
result.borderBottomWidth = part.borders.bottom.width;
|
|
24990
|
+
}
|
|
24991
|
+
if (part.borders.bottom.color) {
|
|
24992
|
+
result.borderBottomColor = part.borders.bottom.color;
|
|
24993
|
+
}
|
|
24994
|
+
if (part.borders.bottom.dash) {
|
|
24995
|
+
result.borderBottomDash = part.borders.bottom.dash;
|
|
24996
|
+
}
|
|
24997
|
+
}
|
|
24998
|
+
if (part.borders.left) {
|
|
24999
|
+
if (part.borders.left.width !== void 0) {
|
|
25000
|
+
result.borderLeftWidth = part.borders.left.width;
|
|
25001
|
+
}
|
|
25002
|
+
if (part.borders.left.color) {
|
|
25003
|
+
result.borderLeftColor = part.borders.left.color;
|
|
25004
|
+
}
|
|
25005
|
+
if (part.borders.left.dash) {
|
|
25006
|
+
result.borderLeftDash = part.borders.left.dash;
|
|
25007
|
+
}
|
|
25008
|
+
}
|
|
25009
|
+
if (part.borders.right) {
|
|
25010
|
+
if (part.borders.right.width !== void 0) {
|
|
25011
|
+
result.borderRightWidth = part.borders.right.width;
|
|
25012
|
+
}
|
|
25013
|
+
if (part.borders.right.color) {
|
|
25014
|
+
result.borderRightColor = part.borders.right.color;
|
|
25015
|
+
}
|
|
25016
|
+
if (part.borders.right.dash) {
|
|
25017
|
+
result.borderRightDash = part.borders.right.dash;
|
|
25018
|
+
}
|
|
25019
|
+
}
|
|
25020
|
+
}
|
|
25021
|
+
if (part.text) {
|
|
25022
|
+
if (part.text.bold !== void 0) {
|
|
25023
|
+
result.bold = part.text.bold;
|
|
25024
|
+
}
|
|
25025
|
+
if (part.text.italic !== void 0) {
|
|
25026
|
+
result.italic = part.text.italic;
|
|
25027
|
+
}
|
|
25028
|
+
if (part.text.color) {
|
|
25029
|
+
result.color = part.text.color;
|
|
25030
|
+
}
|
|
25031
|
+
if (part.text.fontSize !== void 0) {
|
|
25032
|
+
result.fontSize = part.text.fontSize;
|
|
25033
|
+
}
|
|
25034
|
+
}
|
|
25035
|
+
return result;
|
|
25036
|
+
}
|
|
25037
|
+
|
|
25038
|
+
// src/core/utils/animation-preset-catalog.ts
|
|
25039
|
+
var ENTRANCE_PRESETS = [
|
|
25040
|
+
{
|
|
25041
|
+
presetId: "entr.1",
|
|
25042
|
+
label: "Appear",
|
|
25043
|
+
category: "entrance",
|
|
25044
|
+
defaultDurationMs: 0,
|
|
25045
|
+
hasDirection: false,
|
|
25046
|
+
hasTextBuild: true
|
|
25047
|
+
},
|
|
25048
|
+
{
|
|
25049
|
+
presetId: "entr.10",
|
|
25050
|
+
label: "Fade",
|
|
25051
|
+
category: "entrance",
|
|
25052
|
+
defaultDurationMs: 500,
|
|
25053
|
+
hasDirection: false,
|
|
25054
|
+
hasTextBuild: true
|
|
25055
|
+
},
|
|
25056
|
+
{
|
|
25057
|
+
presetId: "entr.2",
|
|
25058
|
+
label: "Fly In",
|
|
25059
|
+
category: "entrance",
|
|
25060
|
+
defaultDurationMs: 500,
|
|
25061
|
+
hasDirection: true,
|
|
25062
|
+
directions: [
|
|
25063
|
+
"fromBottom",
|
|
25064
|
+
"fromLeft",
|
|
25065
|
+
"fromRight",
|
|
25066
|
+
"fromTop",
|
|
25067
|
+
"fromBottomLeft",
|
|
25068
|
+
"fromBottomRight",
|
|
25069
|
+
"fromTopLeft",
|
|
25070
|
+
"fromTopRight"
|
|
25071
|
+
],
|
|
25072
|
+
hasTextBuild: true
|
|
25073
|
+
},
|
|
25074
|
+
{
|
|
25075
|
+
presetId: "entr.53",
|
|
25076
|
+
label: "Grow & Turn",
|
|
25077
|
+
category: "entrance",
|
|
25078
|
+
defaultDurationMs: 500,
|
|
25079
|
+
hasDirection: false,
|
|
25080
|
+
hasTextBuild: true
|
|
25081
|
+
},
|
|
25082
|
+
{
|
|
25083
|
+
presetId: "entr.23",
|
|
25084
|
+
label: "Zoom",
|
|
25085
|
+
category: "entrance",
|
|
25086
|
+
defaultDurationMs: 500,
|
|
25087
|
+
hasDirection: true,
|
|
25088
|
+
directions: ["inFromScreenCenter", "inSlightly", "objectCenter"],
|
|
25089
|
+
hasTextBuild: true
|
|
25090
|
+
},
|
|
25091
|
+
{
|
|
25092
|
+
presetId: "entr.14",
|
|
25093
|
+
label: "Bounce",
|
|
25094
|
+
category: "entrance",
|
|
25095
|
+
defaultDurationMs: 1e3,
|
|
25096
|
+
hasDirection: false,
|
|
25097
|
+
hasTextBuild: true
|
|
25098
|
+
},
|
|
25099
|
+
{
|
|
25100
|
+
presetId: "entr.22",
|
|
25101
|
+
label: "Wipe",
|
|
25102
|
+
category: "entrance",
|
|
25103
|
+
defaultDurationMs: 500,
|
|
25104
|
+
hasDirection: true,
|
|
25105
|
+
directions: ["fromBottom", "fromLeft", "fromRight", "fromTop"],
|
|
25106
|
+
hasTextBuild: true
|
|
25107
|
+
},
|
|
25108
|
+
{
|
|
25109
|
+
presetId: "entr.16",
|
|
25110
|
+
label: "Split",
|
|
25111
|
+
category: "entrance",
|
|
25112
|
+
defaultDurationMs: 500,
|
|
25113
|
+
hasDirection: true,
|
|
25114
|
+
directions: ["horizontalIn", "horizontalOut", "verticalIn", "verticalOut"],
|
|
25115
|
+
hasTextBuild: true
|
|
25116
|
+
},
|
|
25117
|
+
{
|
|
25118
|
+
presetId: "entr.9",
|
|
25119
|
+
label: "Dissolve In",
|
|
25120
|
+
category: "entrance",
|
|
25121
|
+
defaultDurationMs: 700,
|
|
25122
|
+
hasDirection: false,
|
|
25123
|
+
hasTextBuild: true
|
|
25124
|
+
},
|
|
25125
|
+
{
|
|
25126
|
+
presetId: "entr.21",
|
|
25127
|
+
label: "Wheel",
|
|
25128
|
+
category: "entrance",
|
|
25129
|
+
defaultDurationMs: 1e3,
|
|
25130
|
+
hasDirection: true,
|
|
25131
|
+
directions: ["1spoke", "2spoke", "3spoke", "4spoke", "8spoke"],
|
|
25132
|
+
hasTextBuild: true
|
|
25133
|
+
},
|
|
25134
|
+
{
|
|
25135
|
+
presetId: "entr.3",
|
|
25136
|
+
label: "Blinds",
|
|
25137
|
+
category: "entrance",
|
|
25138
|
+
defaultDurationMs: 500,
|
|
25139
|
+
hasDirection: true,
|
|
25140
|
+
directions: ["horizontal", "vertical"],
|
|
25141
|
+
hasTextBuild: true
|
|
25142
|
+
},
|
|
25143
|
+
{
|
|
25144
|
+
presetId: "entr.4",
|
|
25145
|
+
label: "Box",
|
|
25146
|
+
category: "entrance",
|
|
25147
|
+
defaultDurationMs: 500,
|
|
25148
|
+
hasDirection: true,
|
|
25149
|
+
directions: ["in", "out"],
|
|
25150
|
+
hasTextBuild: true
|
|
25151
|
+
},
|
|
25152
|
+
{
|
|
25153
|
+
presetId: "entr.12",
|
|
25154
|
+
label: "Float Up",
|
|
25155
|
+
category: "entrance",
|
|
25156
|
+
defaultDurationMs: 500,
|
|
25157
|
+
hasDirection: false,
|
|
25158
|
+
hasTextBuild: true
|
|
25159
|
+
},
|
|
25160
|
+
{
|
|
25161
|
+
presetId: "entr.42",
|
|
25162
|
+
label: "Rise Up",
|
|
25163
|
+
category: "entrance",
|
|
25164
|
+
defaultDurationMs: 500,
|
|
25165
|
+
hasDirection: false,
|
|
25166
|
+
hasTextBuild: true
|
|
25167
|
+
},
|
|
25168
|
+
{
|
|
25169
|
+
presetId: "entr.45",
|
|
25170
|
+
label: "Swivel",
|
|
25171
|
+
category: "entrance",
|
|
25172
|
+
defaultDurationMs: 500,
|
|
25173
|
+
hasDirection: true,
|
|
25174
|
+
directions: ["horizontal", "vertical"],
|
|
25175
|
+
hasTextBuild: true
|
|
25176
|
+
},
|
|
25177
|
+
{
|
|
25178
|
+
presetId: "entr.17",
|
|
25179
|
+
label: "Checkerboard",
|
|
25180
|
+
category: "entrance",
|
|
25181
|
+
defaultDurationMs: 500,
|
|
25182
|
+
hasDirection: true,
|
|
25183
|
+
directions: ["across", "down"],
|
|
25184
|
+
hasTextBuild: true
|
|
25185
|
+
},
|
|
25186
|
+
{
|
|
25187
|
+
presetId: "entr.18",
|
|
25188
|
+
label: "Flash Once",
|
|
25189
|
+
category: "entrance",
|
|
25190
|
+
defaultDurationMs: 300,
|
|
25191
|
+
hasDirection: false,
|
|
25192
|
+
hasTextBuild: false
|
|
25193
|
+
},
|
|
25194
|
+
{
|
|
25195
|
+
presetId: "entr.19",
|
|
25196
|
+
label: "Peek In",
|
|
25197
|
+
category: "entrance",
|
|
25198
|
+
defaultDurationMs: 500,
|
|
25199
|
+
hasDirection: true,
|
|
25200
|
+
directions: ["fromBottom", "fromLeft", "fromRight", "fromTop"],
|
|
25201
|
+
hasTextBuild: true
|
|
25202
|
+
},
|
|
25203
|
+
{
|
|
25204
|
+
presetId: "entr.20",
|
|
25205
|
+
label: "Random Bars",
|
|
25206
|
+
category: "entrance",
|
|
25207
|
+
defaultDurationMs: 500,
|
|
25208
|
+
hasDirection: true,
|
|
25209
|
+
directions: ["horizontal", "vertical"],
|
|
25210
|
+
hasTextBuild: true
|
|
25211
|
+
},
|
|
25212
|
+
{
|
|
25213
|
+
presetId: "entr.49",
|
|
25214
|
+
label: "Expand",
|
|
25215
|
+
category: "entrance",
|
|
25216
|
+
defaultDurationMs: 500,
|
|
25217
|
+
hasDirection: false,
|
|
25218
|
+
hasTextBuild: true
|
|
25219
|
+
}
|
|
25220
|
+
];
|
|
25221
|
+
var EXIT_PRESETS = [
|
|
25222
|
+
{
|
|
25223
|
+
presetId: "exit.1",
|
|
25224
|
+
label: "Disappear",
|
|
25225
|
+
category: "exit",
|
|
25226
|
+
defaultDurationMs: 0,
|
|
25227
|
+
hasDirection: false,
|
|
25228
|
+
hasTextBuild: true
|
|
25229
|
+
},
|
|
25230
|
+
{
|
|
25231
|
+
presetId: "exit.10",
|
|
25232
|
+
label: "Fade",
|
|
25233
|
+
category: "exit",
|
|
25234
|
+
defaultDurationMs: 500,
|
|
25235
|
+
hasDirection: false,
|
|
25236
|
+
hasTextBuild: true
|
|
25237
|
+
},
|
|
25238
|
+
{
|
|
25239
|
+
presetId: "exit.2",
|
|
25240
|
+
label: "Fly Out",
|
|
25241
|
+
category: "exit",
|
|
25242
|
+
defaultDurationMs: 500,
|
|
25243
|
+
hasDirection: true,
|
|
25244
|
+
directions: ["toBottom", "toLeft", "toRight", "toTop"],
|
|
25245
|
+
hasTextBuild: true
|
|
25246
|
+
},
|
|
25247
|
+
{
|
|
25248
|
+
presetId: "exit.23",
|
|
25249
|
+
label: "Zoom",
|
|
25250
|
+
category: "exit",
|
|
25251
|
+
defaultDurationMs: 500,
|
|
25252
|
+
hasDirection: true,
|
|
25253
|
+
directions: ["outFromScreenCenter", "outSlightly", "objectCenter"],
|
|
25254
|
+
hasTextBuild: true
|
|
25255
|
+
},
|
|
25256
|
+
{
|
|
25257
|
+
presetId: "exit.14",
|
|
25258
|
+
label: "Bounce",
|
|
25259
|
+
category: "exit",
|
|
25260
|
+
defaultDurationMs: 1e3,
|
|
25261
|
+
hasDirection: false,
|
|
25262
|
+
hasTextBuild: true
|
|
25263
|
+
},
|
|
25264
|
+
{
|
|
25265
|
+
presetId: "exit.22",
|
|
25266
|
+
label: "Wipe",
|
|
25267
|
+
category: "exit",
|
|
25268
|
+
defaultDurationMs: 500,
|
|
25269
|
+
hasDirection: true,
|
|
25270
|
+
directions: ["fromBottom", "fromLeft", "fromRight", "fromTop"],
|
|
25271
|
+
hasTextBuild: true
|
|
25272
|
+
},
|
|
25273
|
+
{
|
|
25274
|
+
presetId: "exit.9",
|
|
25275
|
+
label: "Dissolve Out",
|
|
25276
|
+
category: "exit",
|
|
25277
|
+
defaultDurationMs: 700,
|
|
25278
|
+
hasDirection: false,
|
|
25279
|
+
hasTextBuild: true
|
|
25280
|
+
},
|
|
25281
|
+
{
|
|
25282
|
+
presetId: "exit.48",
|
|
25283
|
+
label: "Shrink & Turn",
|
|
25284
|
+
category: "exit",
|
|
25285
|
+
defaultDurationMs: 500,
|
|
25286
|
+
hasDirection: false,
|
|
25287
|
+
hasTextBuild: true
|
|
25288
|
+
}
|
|
25289
|
+
];
|
|
25290
|
+
var EMPHASIS_PRESETS = [
|
|
25291
|
+
{
|
|
25292
|
+
presetId: "emph.32",
|
|
25293
|
+
label: "Pulse",
|
|
25294
|
+
category: "emphasis",
|
|
25295
|
+
defaultDurationMs: 1e3,
|
|
25296
|
+
hasDirection: false,
|
|
25297
|
+
hasTextBuild: false
|
|
25298
|
+
},
|
|
25299
|
+
{
|
|
25300
|
+
presetId: "emph.8",
|
|
25301
|
+
label: "Spin",
|
|
25302
|
+
category: "emphasis",
|
|
25303
|
+
defaultDurationMs: 1e3,
|
|
25304
|
+
hasDirection: true,
|
|
25305
|
+
directions: ["clockwise", "counterClockwise"],
|
|
25306
|
+
hasTextBuild: false
|
|
25307
|
+
},
|
|
25308
|
+
{
|
|
25309
|
+
presetId: "emph.6",
|
|
25310
|
+
label: "Grow/Shrink",
|
|
25311
|
+
category: "emphasis",
|
|
25312
|
+
defaultDurationMs: 500,
|
|
25313
|
+
hasDirection: false,
|
|
25314
|
+
hasTextBuild: false
|
|
25315
|
+
},
|
|
25316
|
+
{
|
|
25317
|
+
presetId: "emph.35",
|
|
25318
|
+
label: "Teeter",
|
|
25319
|
+
category: "emphasis",
|
|
25320
|
+
defaultDurationMs: 1e3,
|
|
25321
|
+
hasDirection: false,
|
|
25322
|
+
hasTextBuild: false
|
|
25323
|
+
},
|
|
25324
|
+
{
|
|
25325
|
+
presetId: "emph.9",
|
|
25326
|
+
label: "Transparency",
|
|
25327
|
+
category: "emphasis",
|
|
25328
|
+
defaultDurationMs: 500,
|
|
25329
|
+
hasDirection: false,
|
|
25330
|
+
hasTextBuild: false
|
|
25331
|
+
},
|
|
25332
|
+
{
|
|
25333
|
+
presetId: "emph.34",
|
|
25334
|
+
label: "Bold Flash",
|
|
25335
|
+
category: "emphasis",
|
|
25336
|
+
defaultDurationMs: 500,
|
|
25337
|
+
hasDirection: false,
|
|
25338
|
+
hasTextBuild: false
|
|
25339
|
+
},
|
|
25340
|
+
{
|
|
25341
|
+
presetId: "emph.36",
|
|
25342
|
+
label: "Wave",
|
|
25343
|
+
category: "emphasis",
|
|
25344
|
+
defaultDurationMs: 1e3,
|
|
25345
|
+
hasDirection: false,
|
|
25346
|
+
hasTextBuild: false
|
|
25347
|
+
}
|
|
25348
|
+
];
|
|
25349
|
+
var MOTION_PATH_PRESETS = [
|
|
25350
|
+
{
|
|
25351
|
+
presetId: "path.line.down",
|
|
25352
|
+
label: "Lines: Down",
|
|
25353
|
+
category: "motionPath",
|
|
25354
|
+
defaultDurationMs: 2e3,
|
|
25355
|
+
hasDirection: false,
|
|
25356
|
+
hasTextBuild: false
|
|
25357
|
+
},
|
|
25358
|
+
{
|
|
25359
|
+
presetId: "path.line.left",
|
|
25360
|
+
label: "Lines: Left",
|
|
25361
|
+
category: "motionPath",
|
|
25362
|
+
defaultDurationMs: 2e3,
|
|
25363
|
+
hasDirection: false,
|
|
25364
|
+
hasTextBuild: false
|
|
25365
|
+
},
|
|
25366
|
+
{
|
|
25367
|
+
presetId: "path.line.right",
|
|
25368
|
+
label: "Lines: Right",
|
|
25369
|
+
category: "motionPath",
|
|
25370
|
+
defaultDurationMs: 2e3,
|
|
25371
|
+
hasDirection: false,
|
|
25372
|
+
hasTextBuild: false
|
|
25373
|
+
},
|
|
25374
|
+
{
|
|
25375
|
+
presetId: "path.line.up",
|
|
25376
|
+
label: "Lines: Up",
|
|
25377
|
+
category: "motionPath",
|
|
25378
|
+
defaultDurationMs: 2e3,
|
|
25379
|
+
hasDirection: false,
|
|
25380
|
+
hasTextBuild: false
|
|
25381
|
+
},
|
|
25382
|
+
{
|
|
25383
|
+
presetId: "path.arc.down",
|
|
25384
|
+
label: "Arcs: Down",
|
|
25385
|
+
category: "motionPath",
|
|
25386
|
+
defaultDurationMs: 2e3,
|
|
25387
|
+
hasDirection: false,
|
|
25388
|
+
hasTextBuild: false
|
|
25389
|
+
},
|
|
25390
|
+
{
|
|
25391
|
+
presetId: "path.circle",
|
|
25392
|
+
label: "Shapes: Circle",
|
|
25393
|
+
category: "motionPath",
|
|
25394
|
+
defaultDurationMs: 2e3,
|
|
25395
|
+
hasDirection: false,
|
|
25396
|
+
hasTextBuild: false
|
|
25397
|
+
},
|
|
25398
|
+
{
|
|
25399
|
+
presetId: "path.diamond",
|
|
25400
|
+
label: "Shapes: Diamond",
|
|
25401
|
+
category: "motionPath",
|
|
25402
|
+
defaultDurationMs: 2e3,
|
|
25403
|
+
hasDirection: false,
|
|
25404
|
+
hasTextBuild: false
|
|
25405
|
+
},
|
|
25406
|
+
{
|
|
25407
|
+
presetId: "path.custom",
|
|
25408
|
+
label: "Custom Path",
|
|
25409
|
+
category: "motionPath",
|
|
25410
|
+
defaultDurationMs: 2e3,
|
|
25411
|
+
hasDirection: false,
|
|
25412
|
+
hasTextBuild: false
|
|
25413
|
+
}
|
|
25414
|
+
];
|
|
25415
|
+
var ALL_ANIMATION_PRESETS = [
|
|
25416
|
+
...ENTRANCE_PRESETS,
|
|
25417
|
+
...EXIT_PRESETS,
|
|
25418
|
+
...EMPHASIS_PRESETS,
|
|
25419
|
+
...MOTION_PATH_PRESETS
|
|
25420
|
+
];
|
|
25421
|
+
function getAnimationPresetInfo(presetId) {
|
|
25422
|
+
return ALL_ANIMATION_PRESETS.find((p) => p.presetId === presetId);
|
|
25423
|
+
}
|
|
25424
|
+
function getPresetsByCategory(category) {
|
|
25425
|
+
switch (category) {
|
|
25426
|
+
case "entrance":
|
|
25427
|
+
return ENTRANCE_PRESETS;
|
|
25428
|
+
case "exit":
|
|
25429
|
+
return EXIT_PRESETS;
|
|
25430
|
+
case "emphasis":
|
|
25431
|
+
return EMPHASIS_PRESETS;
|
|
25432
|
+
case "motionPath":
|
|
25433
|
+
return MOTION_PATH_PRESETS;
|
|
25434
|
+
}
|
|
25435
|
+
}
|
|
25436
|
+
|
|
25437
|
+
// src/core/utils/smartart-relayout.ts
|
|
25438
|
+
function relayoutSmartArt(smartArtData, containerWidth, containerHeight) {
|
|
25439
|
+
if (!smartArtData.nodes || smartArtData.nodes.length === 0) {
|
|
25440
|
+
return [];
|
|
25441
|
+
}
|
|
25442
|
+
const bounds = {
|
|
25443
|
+
x: 0,
|
|
25444
|
+
y: 0,
|
|
25445
|
+
width: containerWidth,
|
|
25446
|
+
height: containerHeight
|
|
25447
|
+
};
|
|
25448
|
+
const engineShapes = computeSmartArtLayout(smartArtData, bounds);
|
|
25449
|
+
if (engineShapes && engineShapes.length > 0) {
|
|
25450
|
+
const layoutType = smartArtData.resolvedLayoutType ?? "list";
|
|
25451
|
+
return layoutEngineShapesToDrawingShapes(engineShapes, smartArtData.nodes, layoutType);
|
|
25452
|
+
}
|
|
25453
|
+
return smartArtData.drawingShapes ?? [];
|
|
25454
|
+
}
|
|
25455
|
+
|
|
24487
25456
|
// src/core/core/runtime/PptxHandlerRuntimeSaveParagraphHelpers.ts
|
|
24488
25457
|
var EMU_PER_PX5 = 9525;
|
|
24489
25458
|
function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spacing) {
|
|
@@ -24494,12 +25463,6 @@ function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spac
|
|
|
24494
25463
|
if (textStyle?.rtl !== void 0) {
|
|
24495
25464
|
paragraphProps["@_rtl"] = textStyle.rtl ? "1" : "0";
|
|
24496
25465
|
}
|
|
24497
|
-
if (spacing.spacingBefore) {
|
|
24498
|
-
paragraphProps["a:spcBef"] = spacing.spacingBefore;
|
|
24499
|
-
}
|
|
24500
|
-
if (spacing.spacingAfter) {
|
|
24501
|
-
paragraphProps["a:spcAft"] = spacing.spacingAfter;
|
|
24502
|
-
}
|
|
24503
25466
|
if (spacing.lineSpacing) {
|
|
24504
25467
|
paragraphProps["a:lnSpc"] = spacing.lineSpacing;
|
|
24505
25468
|
} else if (typeof spacing.lineSpacingExactPt === "number" && Number.isFinite(spacing.lineSpacingExactPt)) {
|
|
@@ -24509,6 +25472,12 @@ function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spac
|
|
|
24509
25472
|
}
|
|
24510
25473
|
};
|
|
24511
25474
|
}
|
|
25475
|
+
if (spacing.spacingBefore) {
|
|
25476
|
+
paragraphProps["a:spcBef"] = spacing.spacingBefore;
|
|
25477
|
+
}
|
|
25478
|
+
if (spacing.spacingAfter) {
|
|
25479
|
+
paragraphProps["a:spcAft"] = spacing.spacingAfter;
|
|
25480
|
+
}
|
|
24512
25481
|
if (typeof textStyle?.paragraphMarginLeft === "number" && Number.isFinite(textStyle.paragraphMarginLeft)) {
|
|
24513
25482
|
paragraphProps["@_marL"] = String(Math.round(textStyle.paragraphMarginLeft * EMU_PER_PX5));
|
|
24514
25483
|
}
|
|
@@ -24559,9 +25528,10 @@ function applyBulletProperties(paragraphProps, bulletInfo) {
|
|
|
24559
25528
|
paragraphProps["a:buNone"] = {};
|
|
24560
25529
|
return;
|
|
24561
25530
|
}
|
|
24562
|
-
if (bulletInfo.
|
|
24563
|
-
|
|
24564
|
-
|
|
25531
|
+
if (bulletInfo.color) {
|
|
25532
|
+
const colorHex = bulletInfo.color.replace("#", "");
|
|
25533
|
+
paragraphProps["a:buClr"] = {
|
|
25534
|
+
"a:srgbClr": { "@_val": colorHex }
|
|
24565
25535
|
};
|
|
24566
25536
|
}
|
|
24567
25537
|
if (bulletInfo.sizePercent !== void 0) {
|
|
@@ -24574,10 +25544,9 @@ function applyBulletProperties(paragraphProps, bulletInfo) {
|
|
|
24574
25544
|
"@_val": String(Math.round(bulletInfo.sizePts * 100))
|
|
24575
25545
|
};
|
|
24576
25546
|
}
|
|
24577
|
-
if (bulletInfo.
|
|
24578
|
-
|
|
24579
|
-
|
|
24580
|
-
"a:srgbClr": { "@_val": colorHex }
|
|
25547
|
+
if (bulletInfo.fontFamily) {
|
|
25548
|
+
paragraphProps["a:buFont"] = {
|
|
25549
|
+
"@_typeface": bulletInfo.fontFamily
|
|
24581
25550
|
};
|
|
24582
25551
|
}
|
|
24583
25552
|
if (bulletInfo.char) {
|
|
@@ -24600,9 +25569,8 @@ function applyBulletProperties(paragraphProps, bulletInfo) {
|
|
|
24600
25569
|
}
|
|
24601
25570
|
function assembleParagraphXml(runs, paragraphProps) {
|
|
24602
25571
|
const paragraph = {
|
|
24603
|
-
"a:
|
|
25572
|
+
"a:pPr": paragraphProps
|
|
24604
25573
|
};
|
|
24605
|
-
paragraph["a:pPr"] = paragraphProps;
|
|
24606
25574
|
const regularRuns = runs.filter((r) => !r.__isField);
|
|
24607
25575
|
const fieldRuns = runs.filter((r) => r.__isField).map((r) => {
|
|
24608
25576
|
const { __isField, ...rest } = r;
|
|
@@ -24621,6 +25589,7 @@ function assembleParagraphXml(runs, paragraphProps) {
|
|
|
24621
25589
|
if (cleanRegularRuns.length === 0 && fieldRuns.length === 0) {
|
|
24622
25590
|
paragraph["a:r"] = runs.length > 1 ? runs : runs[0];
|
|
24623
25591
|
}
|
|
25592
|
+
paragraph["a:endParaRPr"] = { "@_lang": "en-US" };
|
|
24624
25593
|
return paragraph;
|
|
24625
25594
|
}
|
|
24626
25595
|
function computeUniformSegmentOverrides(textStyle, textSegments) {
|
|
@@ -27459,9 +28428,6 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
27459
28428
|
if (style.textCaps && style.textCaps !== "none") {
|
|
27460
28429
|
runProps["@_cap"] = style.textCaps;
|
|
27461
28430
|
}
|
|
27462
|
-
if (style.rtl !== void 0) {
|
|
27463
|
-
runProps["@_rtl"] = style.rtl ? "1" : "0";
|
|
27464
|
-
}
|
|
27465
28431
|
if (style.kumimoji !== void 0) {
|
|
27466
28432
|
runProps["@_kumimoji"] = style.kumimoji ? "1" : "0";
|
|
27467
28433
|
}
|
|
@@ -27483,17 +28449,19 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
27483
28449
|
if (style.bookmark) {
|
|
27484
28450
|
runProps["@_bmk"] = style.bookmark;
|
|
27485
28451
|
}
|
|
27486
|
-
if (style.
|
|
27487
|
-
|
|
27488
|
-
|
|
27489
|
-
"@
|
|
27490
|
-
}
|
|
27491
|
-
|
|
27492
|
-
"
|
|
27493
|
-
|
|
27494
|
-
|
|
27495
|
-
|
|
27496
|
-
|
|
28452
|
+
if (style.textOutlineWidth || style.textOutlineColor) {
|
|
28453
|
+
const lnObj = {};
|
|
28454
|
+
if (typeof style.textOutlineWidth === "number" && style.textOutlineWidth > 0) {
|
|
28455
|
+
lnObj["@_w"] = String(Math.round(style.textOutlineWidth * _PptxHandlerRuntime.EMU_PER_PX));
|
|
28456
|
+
}
|
|
28457
|
+
if (style.textOutlineColor) {
|
|
28458
|
+
lnObj["a:solidFill"] = {
|
|
28459
|
+
"a:srgbClr": {
|
|
28460
|
+
"@_val": style.textOutlineColor.replace("#", "")
|
|
28461
|
+
}
|
|
28462
|
+
};
|
|
28463
|
+
}
|
|
28464
|
+
runProps["a:ln"] = lnObj;
|
|
27497
28465
|
}
|
|
27498
28466
|
if (style.color) {
|
|
27499
28467
|
runProps["a:solidFill"] = {
|
|
@@ -27501,15 +28469,7 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
27501
28469
|
"@_val": style.color.replace("#", "")
|
|
27502
28470
|
}
|
|
27503
28471
|
};
|
|
27504
|
-
}
|
|
27505
|
-
if (style.highlightColor) {
|
|
27506
|
-
runProps["a:highlight"] = {
|
|
27507
|
-
"a:srgbClr": {
|
|
27508
|
-
"@_val": style.highlightColor.replace("#", "")
|
|
27509
|
-
}
|
|
27510
|
-
};
|
|
27511
|
-
}
|
|
27512
|
-
if (style.textFillGradientStops && style.textFillGradientStops.length > 0) {
|
|
28472
|
+
} else if (style.textFillGradientStops && style.textFillGradientStops.length > 0) {
|
|
27513
28473
|
const gradStops = style.textFillGradientStops.filter((stop) => Boolean(stop?.color)).map((stop) => {
|
|
27514
28474
|
const rawPos = (stop.position ?? 0) / 100;
|
|
27515
28475
|
const posVal = Math.round(Math.max(0, Math.min(1, rawPos)) * 1e5);
|
|
@@ -27542,8 +28502,7 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
27542
28502
|
}
|
|
27543
28503
|
runProps["a:gradFill"] = gradFillXml;
|
|
27544
28504
|
}
|
|
27545
|
-
}
|
|
27546
|
-
if (style.textFillPattern) {
|
|
28505
|
+
} else if (style.textFillPattern) {
|
|
27547
28506
|
const pattFill = { "@_prst": style.textFillPattern };
|
|
27548
28507
|
if (style.textFillPatternForeground) {
|
|
27549
28508
|
pattFill["a:fgClr"] = {
|
|
@@ -27561,6 +28520,17 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
27561
28520
|
}
|
|
27562
28521
|
runProps["a:pattFill"] = pattFill;
|
|
27563
28522
|
}
|
|
28523
|
+
const textEffectLst = buildTextRunEffectListXml(style);
|
|
28524
|
+
if (textEffectLst) {
|
|
28525
|
+
runProps["a:effectLst"] = textEffectLst;
|
|
28526
|
+
}
|
|
28527
|
+
if (style.highlightColor) {
|
|
28528
|
+
runProps["a:highlight"] = {
|
|
28529
|
+
"a:srgbClr": {
|
|
28530
|
+
"@_val": style.highlightColor.replace("#", "")
|
|
28531
|
+
}
|
|
28532
|
+
};
|
|
28533
|
+
}
|
|
27564
28534
|
if (style.underline && style.underlineColor) {
|
|
27565
28535
|
runProps["a:uFill"] = {
|
|
27566
28536
|
"a:solidFill": {
|
|
@@ -27570,23 +28540,17 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
|
|
|
27570
28540
|
}
|
|
27571
28541
|
};
|
|
27572
28542
|
}
|
|
27573
|
-
if (style.
|
|
27574
|
-
|
|
27575
|
-
|
|
27576
|
-
|
|
27577
|
-
}
|
|
27578
|
-
|
|
27579
|
-
|
|
27580
|
-
|
|
27581
|
-
"@_val": style.textOutlineColor.replace("#", "")
|
|
27582
|
-
}
|
|
27583
|
-
};
|
|
27584
|
-
}
|
|
27585
|
-
runProps["a:ln"] = lnObj;
|
|
28543
|
+
if (style.fontFamily) {
|
|
28544
|
+
runProps["a:latin"] = { "@_typeface": style.fontFamily };
|
|
28545
|
+
runProps["a:ea"] = {
|
|
28546
|
+
"@_typeface": style.eastAsiaFont || style.fontFamily
|
|
28547
|
+
};
|
|
28548
|
+
runProps["a:cs"] = {
|
|
28549
|
+
"@_typeface": style.complexScriptFont || style.fontFamily
|
|
28550
|
+
};
|
|
27586
28551
|
}
|
|
27587
|
-
|
|
27588
|
-
|
|
27589
|
-
runProps["a:effectLst"] = textEffectLst;
|
|
28552
|
+
if (style.symbolFont) {
|
|
28553
|
+
runProps["a:sym"] = { "@_typeface": style.symbolFont };
|
|
27590
28554
|
}
|
|
27591
28555
|
if (style.hyperlink && resolveHyperlinkRelationshipId) {
|
|
27592
28556
|
const hyperlinkTarget = String(style.hyperlink).trim();
|
|
@@ -30507,32 +31471,58 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
|
|
|
30507
31471
|
};
|
|
30508
31472
|
for (const variant of variants) {
|
|
30509
31473
|
const fontData = variant.rawFontData;
|
|
30510
|
-
const
|
|
30511
|
-
const
|
|
30512
|
-
const
|
|
30513
|
-
|
|
30514
|
-
|
|
30515
|
-
|
|
31474
|
+
const hasOriginal = Boolean(variant.originalRId && variant.partPath);
|
|
31475
|
+
const reuseObfuscation = hasOriginal && Boolean(variant.fontGuid);
|
|
31476
|
+
const reuseVerbatim = hasOriginal && !variant.fontGuid && Boolean(variant.originalPartBytes);
|
|
31477
|
+
let guid;
|
|
31478
|
+
let fontPartPath;
|
|
31479
|
+
let relativeTarget;
|
|
30516
31480
|
let rId;
|
|
30517
|
-
|
|
30518
|
-
|
|
30519
|
-
)
|
|
30520
|
-
|
|
30521
|
-
|
|
31481
|
+
let bytesToWrite;
|
|
31482
|
+
let fontKeyForXml;
|
|
31483
|
+
if (reuseObfuscation) {
|
|
31484
|
+
guid = variant.fontGuid;
|
|
31485
|
+
fontPartPath = variant.partPath;
|
|
31486
|
+
relativeTarget = fontPartPath.startsWith("ppt/") ? fontPartPath.substring(4) : fontPartPath;
|
|
31487
|
+
rId = variant.originalRId;
|
|
31488
|
+
bytesToWrite = obfuscateFont(fontData, guid);
|
|
31489
|
+
fontKeyForXml = `{${guid}}`;
|
|
31490
|
+
} else if (reuseVerbatim) {
|
|
31491
|
+
guid = "";
|
|
31492
|
+
fontPartPath = variant.partPath;
|
|
31493
|
+
relativeTarget = fontPartPath.startsWith("ppt/") ? fontPartPath.substring(4) : fontPartPath;
|
|
31494
|
+
rId = variant.originalRId;
|
|
31495
|
+
bytesToWrite = variant.originalPartBytes;
|
|
31496
|
+
fontKeyForXml = void 0;
|
|
30522
31497
|
} else {
|
|
30523
|
-
|
|
30524
|
-
|
|
30525
|
-
|
|
30526
|
-
|
|
30527
|
-
|
|
30528
|
-
|
|
30529
|
-
|
|
31498
|
+
guid = variant.fontGuid ?? generateFontGuid();
|
|
31499
|
+
const fileName = `{${guid}}.fntdata`;
|
|
31500
|
+
fontPartPath = `ppt/fonts/${fileName}`;
|
|
31501
|
+
relativeTarget = `fonts/${fileName}`;
|
|
31502
|
+
bytesToWrite = obfuscateFont(fontData, guid);
|
|
31503
|
+
fontKeyForXml = `{${guid}}`;
|
|
31504
|
+
const existingRel = relationships.find(
|
|
31505
|
+
(r) => String(r?.["@_Target"] || "") === relativeTarget
|
|
31506
|
+
);
|
|
31507
|
+
if (existingRel) {
|
|
31508
|
+
rId = String(existingRel["@_Id"]);
|
|
31509
|
+
} else {
|
|
31510
|
+
maxId++;
|
|
31511
|
+
rId = `rId${maxId}`;
|
|
31512
|
+
relationships.push({
|
|
31513
|
+
"@_Id": rId,
|
|
31514
|
+
"@_Type": _PptxHandlerRuntime.FONT_REL_TYPE,
|
|
31515
|
+
"@_Target": relativeTarget
|
|
31516
|
+
});
|
|
31517
|
+
}
|
|
30530
31518
|
}
|
|
31519
|
+
this.zip.file(fontPartPath, bytesToWrite);
|
|
30531
31520
|
const variantKey = variant.bold && variant.italic ? "p:boldItalic" : variant.bold ? "p:bold" : variant.italic ? "p:italic" : "p:regular";
|
|
30532
|
-
|
|
30533
|
-
|
|
30534
|
-
"@_fontKey"
|
|
30535
|
-
}
|
|
31521
|
+
const variantEntry = { "@_r:id": rId };
|
|
31522
|
+
if (fontKeyForXml) {
|
|
31523
|
+
variantEntry["@_fontKey"] = fontKeyForXml;
|
|
31524
|
+
}
|
|
31525
|
+
entry[variantKey] = variantEntry;
|
|
30536
31526
|
}
|
|
30537
31527
|
embeddedFontEntries.push(entry);
|
|
30538
31528
|
}
|
|
@@ -30676,54 +31666,59 @@ var PptxHandlerRuntime25 = class extends PptxHandlerRuntime24 {
|
|
|
30676
31666
|
}
|
|
30677
31667
|
};
|
|
30678
31668
|
const root = propsData["p:presentationPr"] || {};
|
|
30679
|
-
const
|
|
30680
|
-
|
|
30681
|
-
|
|
30682
|
-
|
|
30683
|
-
|
|
30684
|
-
showPr["p:browse"] = {};
|
|
30685
|
-
} else if (properties.showType === "kiosk") {
|
|
30686
|
-
const kioskNode = {};
|
|
30687
|
-
if (properties.kioskRestartTime !== void 0 && properties.kioskRestartTime > 0) {
|
|
30688
|
-
kioskNode["@_restart"] = String(properties.kioskRestartTime);
|
|
31669
|
+
const existingShowPr = root["p:showPr"] || {};
|
|
31670
|
+
const rebuiltShowPr = {};
|
|
31671
|
+
for (const key of Object.keys(existingShowPr)) {
|
|
31672
|
+
if (key.startsWith("@_")) {
|
|
31673
|
+
rebuiltShowPr[key] = existingShowPr[key];
|
|
30689
31674
|
}
|
|
30690
|
-
showPr["p:kiosk"] = kioskNode;
|
|
30691
|
-
} else {
|
|
30692
|
-
showPr["p:present"] = {};
|
|
30693
31675
|
}
|
|
30694
31676
|
if (properties.loopContinuously !== void 0) {
|
|
30695
|
-
|
|
31677
|
+
rebuiltShowPr["@_loop"] = properties.loopContinuously ? "1" : "0";
|
|
30696
31678
|
}
|
|
30697
31679
|
if (properties.showWithNarration !== void 0) {
|
|
30698
|
-
|
|
31680
|
+
rebuiltShowPr["@_showNarration"] = properties.showWithNarration ? "1" : "0";
|
|
30699
31681
|
}
|
|
30700
31682
|
if (properties.showWithAnimation !== void 0) {
|
|
30701
|
-
|
|
31683
|
+
rebuiltShowPr["@_showAnimation"] = properties.showWithAnimation ? "1" : "0";
|
|
30702
31684
|
}
|
|
30703
31685
|
if (properties.advanceMode !== void 0) {
|
|
30704
|
-
|
|
31686
|
+
rebuiltShowPr["@_useTimings"] = properties.advanceMode === "useTimings" ? "1" : "0";
|
|
30705
31687
|
}
|
|
30706
|
-
if (properties.
|
|
30707
|
-
|
|
30708
|
-
|
|
30709
|
-
};
|
|
31688
|
+
if (properties.showType === "browsed") {
|
|
31689
|
+
rebuiltShowPr["p:browse"] = {};
|
|
31690
|
+
} else if (properties.showType === "kiosk") {
|
|
31691
|
+
const kioskNode = {};
|
|
31692
|
+
if (properties.kioskRestartTime !== void 0 && properties.kioskRestartTime > 0) {
|
|
31693
|
+
kioskNode["@_restart"] = String(properties.kioskRestartTime);
|
|
31694
|
+
}
|
|
31695
|
+
rebuiltShowPr["p:kiosk"] = kioskNode;
|
|
31696
|
+
} else {
|
|
31697
|
+
rebuiltShowPr["p:present"] = {};
|
|
30710
31698
|
}
|
|
30711
|
-
delete showPr["p:sldAll"];
|
|
30712
|
-
delete showPr["p:sldRg"];
|
|
30713
|
-
delete showPr["p:custShow"];
|
|
30714
31699
|
if (properties.showSlidesMode === "range") {
|
|
30715
|
-
|
|
31700
|
+
rebuiltShowPr["p:sldRg"] = {
|
|
30716
31701
|
"@_st": String(properties.showSlidesFrom ?? 1),
|
|
30717
31702
|
"@_end": String(properties.showSlidesTo ?? 1)
|
|
30718
31703
|
};
|
|
30719
31704
|
} else if (properties.showSlidesMode === "customShow" && properties.showSlidesCustomShowId) {
|
|
30720
|
-
|
|
31705
|
+
rebuiltShowPr["p:custShow"] = {
|
|
30721
31706
|
"@_id": properties.showSlidesCustomShowId
|
|
30722
31707
|
};
|
|
30723
31708
|
} else {
|
|
30724
|
-
|
|
31709
|
+
rebuiltShowPr["p:sldAll"] = {};
|
|
31710
|
+
}
|
|
31711
|
+
if (properties.penColor) {
|
|
31712
|
+
rebuiltShowPr["p:penClr"] = {
|
|
31713
|
+
"a:srgbClr": { "@_val": properties.penColor.replace("#", "") }
|
|
31714
|
+
};
|
|
31715
|
+
} else if (existingShowPr["p:penClr"] !== void 0) {
|
|
31716
|
+
rebuiltShowPr["p:penClr"] = existingShowPr["p:penClr"];
|
|
31717
|
+
}
|
|
31718
|
+
if (existingShowPr["p:extLst"] !== void 0) {
|
|
31719
|
+
rebuiltShowPr["p:extLst"] = existingShowPr["p:extLst"];
|
|
30725
31720
|
}
|
|
30726
|
-
root["p:showPr"] =
|
|
31721
|
+
root["p:showPr"] = rebuiltShowPr;
|
|
30727
31722
|
if (properties.printFrameSlides !== void 0 || properties.printSlidesPerPage !== void 0 || properties.printColorMode !== void 0) {
|
|
30728
31723
|
const prnPr = root["p:prnPr"] || {};
|
|
30729
31724
|
if (properties.printFrameSlides !== void 0) {
|
|
@@ -31854,7 +32849,12 @@ var PptxHandlerRuntime31 = class extends PptxHandlerRuntime30 {
|
|
|
31854
32849
|
shape = this.createPictureXml(el, relationshipId);
|
|
31855
32850
|
}
|
|
31856
32851
|
if (targetImagePath) {
|
|
31857
|
-
|
|
32852
|
+
const targetExt = targetImagePath.toLowerCase().match(/\.([^./\\]+)$/)?.[1];
|
|
32853
|
+
const parsedExt = parsedImage.extension.toLowerCase();
|
|
32854
|
+
const extensionMismatch = targetExt !== void 0 && targetExt !== parsedExt && !(targetExt === "jpg" && parsedExt === "jpeg") && !(targetExt === "jpeg" && parsedExt === "jpg");
|
|
32855
|
+
if (!extensionMismatch) {
|
|
32856
|
+
this.zip.file(targetImagePath, parsedImage.bytes);
|
|
32857
|
+
}
|
|
31858
32858
|
}
|
|
31859
32859
|
} else {
|
|
31860
32860
|
this.compatibilityService.reportWarning({
|
|
@@ -32259,6 +33259,7 @@ var PptxHandlerRuntime34 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
|
|
|
32259
33259
|
);
|
|
32260
33260
|
} else {
|
|
32261
33261
|
this.zip.remove("ppt/commentAuthors.xml");
|
|
33262
|
+
await this.stripPresentationCommentAuthorsRelationship();
|
|
32262
33263
|
}
|
|
32263
33264
|
const contentTypesXmlAfterComments = await this.zip.file("[Content_Types].xml")?.async("string");
|
|
32264
33265
|
if (contentTypesXmlAfterComments) {
|
|
@@ -32332,8 +33333,39 @@ var PptxHandlerRuntime34 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
|
|
|
32332
33333
|
if (effectiveConformance === "strict") {
|
|
32333
33334
|
await this.convertZipToStrictConformance();
|
|
32334
33335
|
}
|
|
33336
|
+
for (const name of Object.keys(this.zip.files)) {
|
|
33337
|
+
if (this.zip.files[name].dir) {
|
|
33338
|
+
delete this.zip.files[name];
|
|
33339
|
+
}
|
|
33340
|
+
}
|
|
32335
33341
|
return await this.zip.generateAsync({ type: "uint8array" });
|
|
32336
33342
|
}
|
|
33343
|
+
/**
|
|
33344
|
+
* Remove any Relationship in presentation.xml.rels whose Type matches either
|
|
33345
|
+
* the Transitional or Strict commentAuthors relationship URI.
|
|
33346
|
+
*/
|
|
33347
|
+
async stripPresentationCommentAuthorsRelationship() {
|
|
33348
|
+
const relsPath = "ppt/_rels/presentation.xml.rels";
|
|
33349
|
+
const relsXml = await this.zip.file(relsPath)?.async("string");
|
|
33350
|
+
if (!relsXml) {
|
|
33351
|
+
return;
|
|
33352
|
+
}
|
|
33353
|
+
const relsData = this.parser.parse(relsXml);
|
|
33354
|
+
const root = relsData["Relationships"];
|
|
33355
|
+
if (!root) {
|
|
33356
|
+
return;
|
|
33357
|
+
}
|
|
33358
|
+
const relationships = this.ensureArray(root["Relationship"]);
|
|
33359
|
+
const filtered = relationships.filter((relationship) => {
|
|
33360
|
+
const type = String(relationship?.["@_Type"] ?? "");
|
|
33361
|
+
return type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors" && type !== "http://purl.oclc.org/ooxml/officeDocument/relationships/commentAuthors";
|
|
33362
|
+
});
|
|
33363
|
+
if (filtered.length === relationships.length) {
|
|
33364
|
+
return;
|
|
33365
|
+
}
|
|
33366
|
+
root["Relationship"] = filtered;
|
|
33367
|
+
this.zip.file(relsPath, this.builder.build(relsData));
|
|
33368
|
+
}
|
|
32337
33369
|
};
|
|
32338
33370
|
|
|
32339
33371
|
// src/core/core/runtime/PptxHandlerRuntimeElementParsing.ts
|
|
@@ -34318,7 +35350,7 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
34318
35350
|
}
|
|
34319
35351
|
const shapeStyle = this.extractShapeStyle(effectiveSpPr, styleNode);
|
|
34320
35352
|
const hasText = text.trim().length > 0;
|
|
34321
|
-
const isPlainRect = !prstGeom || prstGeom === "rect";
|
|
35353
|
+
const isPlainRect = (!prstGeom || prstGeom === "rect") && !custGeom;
|
|
34322
35354
|
const hasVisibleStyle = shapeStyle.fillColor && shapeStyle.fillColor !== "transparent" || (shapeStyle.strokeWidth || 0) > 0;
|
|
34323
35355
|
let type = "shape";
|
|
34324
35356
|
if (hasText && isPlainRect && !hasVisibleStyle) {
|
|
@@ -34330,6 +35362,7 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
34330
35362
|
slideRelationshipMap,
|
|
34331
35363
|
this.orderedSlidePaths
|
|
34332
35364
|
);
|
|
35365
|
+
const elementName = cNvPrForActions?.["@_name"] ? String(cNvPrForActions["@_name"]).trim() : void 0;
|
|
34333
35366
|
const cNvSpPr = shape?.["p:nvSpPr"]?.["p:cNvSpPr"];
|
|
34334
35367
|
const spLocksNode = cNvSpPr?.["a:spLocks"];
|
|
34335
35368
|
const slideLocks = this.parseShapeLocks(spLocksNode);
|
|
@@ -34340,6 +35373,7 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
34340
35373
|
const promptText = !hasText && phDefaults?.promptText ? phDefaults.promptText : void 0;
|
|
34341
35374
|
const commonProps = {
|
|
34342
35375
|
id,
|
|
35376
|
+
name: elementName || void 0,
|
|
34343
35377
|
x,
|
|
34344
35378
|
y,
|
|
34345
35379
|
width,
|
|
@@ -34576,12 +35610,14 @@ var PptxHandlerRuntime45 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
34576
35610
|
picSlideRels,
|
|
34577
35611
|
this.orderedSlidePaths
|
|
34578
35612
|
);
|
|
35613
|
+
const picElementName = picCNvPr?.["@_name"] ? String(picCNvPr["@_name"]).trim() : void 0;
|
|
34579
35614
|
const picCNvPicPr = pic?.["p:nvPicPr"]?.["p:cNvPicPr"];
|
|
34580
35615
|
const picLocks = this.parseShapeLocks(
|
|
34581
35616
|
picCNvPicPr?.["a:picLocks"] ?? picCNvPicPr?.["a:spLocks"]
|
|
34582
35617
|
);
|
|
34583
35618
|
return {
|
|
34584
35619
|
id,
|
|
35620
|
+
name: picElementName || void 0,
|
|
34585
35621
|
type: "picture",
|
|
34586
35622
|
x,
|
|
34587
35623
|
y,
|
|
@@ -35128,9 +36164,11 @@ var PptxHandlerRuntime47 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
|
|
|
35128
36164
|
grpSlideRels,
|
|
35129
36165
|
this.orderedSlidePaths
|
|
35130
36166
|
);
|
|
36167
|
+
const grpElementName = grpCNvPr?.["@_name"] ? String(grpCNvPr["@_name"]).trim() : void 0;
|
|
35131
36168
|
const groupElement = {
|
|
35132
36169
|
type: "group",
|
|
35133
36170
|
id: baseId,
|
|
36171
|
+
name: grpElementName || void 0,
|
|
35134
36172
|
x: parentX,
|
|
35135
36173
|
y: parentY,
|
|
35136
36174
|
width: parentW || Math.max(...children.map((c) => c.x + c.width)),
|
|
@@ -39010,6 +40048,7 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
|
|
|
39010
40048
|
if (!fontBinary || fontBinary.length === 0) {
|
|
39011
40049
|
return null;
|
|
39012
40050
|
}
|
|
40051
|
+
const originalPartBytes = new Uint8Array(fontBinary);
|
|
39013
40052
|
let fontData;
|
|
39014
40053
|
let resolvedGuid;
|
|
39015
40054
|
if (isEotFormat(fontBinary)) {
|
|
@@ -39063,7 +40102,9 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
|
|
|
39063
40102
|
format,
|
|
39064
40103
|
rawFontData: fontData,
|
|
39065
40104
|
partPath: fontPath,
|
|
39066
|
-
fontGuid: resolvedGuid
|
|
40105
|
+
fontGuid: resolvedGuid,
|
|
40106
|
+
originalRId: rId,
|
|
40107
|
+
originalPartBytes
|
|
39067
40108
|
};
|
|
39068
40109
|
} catch {
|
|
39069
40110
|
return null;
|
|
@@ -40674,6 +41715,14 @@ var EXTENDED_SHAPE_DEFINITIONS = [
|
|
|
40674
41715
|
{ name: "line", label: "Line", category: "other" },
|
|
40675
41716
|
{ name: "lineInv", label: "Line Inverse", category: "other" },
|
|
40676
41717
|
{ name: "straightConnector1", label: "Straight Connector", category: "other" },
|
|
41718
|
+
{ name: "bentConnector2", label: "Elbow Connector (L)", category: "other" },
|
|
41719
|
+
{ name: "bentConnector3", label: "Elbow Connector (Z)", category: "other" },
|
|
41720
|
+
{ name: "bentConnector4", label: "Elbow Connector (3-Segment)", category: "other" },
|
|
41721
|
+
{ name: "bentConnector5", label: "Elbow Connector (4-Segment)", category: "other" },
|
|
41722
|
+
{ name: "curvedConnector2", label: "Curved Connector (L)", category: "other" },
|
|
41723
|
+
{ name: "curvedConnector3", label: "Curved Connector (2-Segment)", category: "other" },
|
|
41724
|
+
{ name: "curvedConnector4", label: "Curved Connector (3-Segment)", category: "other" },
|
|
41725
|
+
{ name: "curvedConnector5", label: "Curved Connector (4-Segment)", category: "other" },
|
|
40677
41726
|
// ── Arrows ────────────────────────────────────────────────────────────
|
|
40678
41727
|
{ name: "rightArrow", label: "Right Arrow", category: "arrows" },
|
|
40679
41728
|
{ name: "leftArrow", label: "Left Arrow", category: "arrows" },
|
|
@@ -49431,6 +50480,7 @@ var SvgExporter = class _SvgExporter {
|
|
|
49431
50480
|
}
|
|
49432
50481
|
};
|
|
49433
50482
|
|
|
50483
|
+
exports.ALL_ANIMATION_PRESETS = ALL_ANIMATION_PRESETS;
|
|
49434
50484
|
exports.COLOR_MAP_ALIAS_KEYS = COLOR_MAP_ALIAS_KEYS;
|
|
49435
50485
|
exports.CONNECTOR_ARROW_OPTIONS = CONNECTOR_ARROW_OPTIONS;
|
|
49436
50486
|
exports.CONNECTOR_GEOMETRY_OPTIONS = CONNECTOR_GEOMETRY_OPTIONS;
|
|
@@ -49452,6 +50502,7 @@ exports.DIGITAL_SIGNATURE_ORIGIN_REL_TYPE = DIGITAL_SIGNATURE_ORIGIN_REL_TYPE;
|
|
|
49452
50502
|
exports.DIGITAL_SIGNATURE_REL_TYPE = DIGITAL_SIGNATURE_REL_TYPE;
|
|
49453
50503
|
exports.DataIntegrityError = DataIntegrityError;
|
|
49454
50504
|
exports.DocumentConverter = DocumentConverter;
|
|
50505
|
+
exports.EMPHASIS_PRESETS = EMPHASIS_PRESETS;
|
|
49455
50506
|
exports.EMU_PER_INCH = EMU_PER_INCH;
|
|
49456
50507
|
exports.EMU_PER_PIXEL = EMU_PER_PIXEL2;
|
|
49457
50508
|
exports.EMU_PER_POINT = EMU_PER_POINT;
|
|
@@ -49461,6 +50512,8 @@ exports.ENTERPRISE_REQUIRE_REVOCATION_ENV = ENTERPRISE_REQUIRE_REVOCATION_ENV;
|
|
|
49461
50512
|
exports.ENTERPRISE_REQUIRE_TIMESTAMP_ENV = ENTERPRISE_REQUIRE_TIMESTAMP_ENV;
|
|
49462
50513
|
exports.ENTERPRISE_TRUST_ROOTS_FILE_ENV = ENTERPRISE_TRUST_ROOTS_FILE_ENV;
|
|
49463
50514
|
exports.ENTERPRISE_TRUST_ROOTS_PEM_ENV = ENTERPRISE_TRUST_ROOTS_PEM_ENV;
|
|
50515
|
+
exports.ENTRANCE_PRESETS = ENTRANCE_PRESETS;
|
|
50516
|
+
exports.EXIT_PRESETS = EXIT_PRESETS;
|
|
49464
50517
|
exports.EncryptedFileError = EncryptedFileError;
|
|
49465
50518
|
exports.FONT_SUBSTITUTION_MAP = FONT_SUBSTITUTION_MAP;
|
|
49466
50519
|
exports.FreeformPathBuilder = FreeformPathBuilder;
|
|
@@ -49468,6 +50521,7 @@ exports.GroupBuilder = GroupBuilder;
|
|
|
49468
50521
|
exports.ImageBuilder = ImageBuilder;
|
|
49469
50522
|
exports.IncorrectPasswordError = IncorrectPasswordError;
|
|
49470
50523
|
exports.MIN_ELEMENT_SIZE = MIN_ELEMENT_SIZE;
|
|
50524
|
+
exports.MOTION_PATH_PRESETS = MOTION_PATH_PRESETS;
|
|
49471
50525
|
exports.MediaBuilder = MediaBuilder;
|
|
49472
50526
|
exports.MediaContext = MediaContext;
|
|
49473
50527
|
exports.MediaGraphicFrameXmlFactory = MediaGraphicFrameXmlFactory;
|
|
@@ -49579,6 +50633,13 @@ exports.chartDataChangeType = chartDataChangeType;
|
|
|
49579
50633
|
exports.chartDataRemoveCategory = chartDataRemoveCategory;
|
|
49580
50634
|
exports.chartDataRemoveSeries = chartDataRemoveSeries;
|
|
49581
50635
|
exports.chartDataUpdatePoint = chartDataUpdatePoint;
|
|
50636
|
+
exports.checkBlankSlide = checkBlankSlide;
|
|
50637
|
+
exports.checkComplexTables = checkComplexTables;
|
|
50638
|
+
exports.checkDuplicateTitles = checkDuplicateTitles;
|
|
50639
|
+
exports.checkLowContrast = checkLowContrast;
|
|
50640
|
+
exports.checkMissingAltText = checkMissingAltText;
|
|
50641
|
+
exports.checkMissingSlideTitle = checkMissingSlideTitle;
|
|
50642
|
+
exports.checkPresentation = checkPresentation;
|
|
49582
50643
|
exports.clampUnitInterval = clampUnitInterval;
|
|
49583
50644
|
exports.classifyPanose = classifyPanose;
|
|
49584
50645
|
exports.cloneElement = cloneElement;
|
|
@@ -49591,6 +50652,7 @@ exports.cm = cm;
|
|
|
49591
50652
|
exports.cmToEmu = cmToEmu;
|
|
49592
50653
|
exports.colorWithOpacity = colorWithOpacity;
|
|
49593
50654
|
exports.combineShapes = combineShapes;
|
|
50655
|
+
exports.computeContrastRatio = computeContrastRatio;
|
|
49594
50656
|
exports.computeCycleLayout = computeCycleLayout;
|
|
49595
50657
|
exports.computeDetailStatus = computeDetailStatus;
|
|
49596
50658
|
exports.computeDigestBase64WebCrypto = computeDigestBase64;
|
|
@@ -49656,6 +50718,7 @@ exports.extractGuidFromPartName = extractGuidFromPartName;
|
|
|
49656
50718
|
exports.extractModel3DTransform = extractModel3DTransform;
|
|
49657
50719
|
exports.extractTagAttribute = extractTagAttribute;
|
|
49658
50720
|
exports.fetchUrlToBytes = fetchUrlToBytes;
|
|
50721
|
+
exports.findCustomShow = findCustomShow;
|
|
49659
50722
|
exports.findLayoutByName = findLayoutByName;
|
|
49660
50723
|
exports.findLayoutByType = findLayoutByType;
|
|
49661
50724
|
exports.findPlaceholders = findPlaceholders;
|
|
@@ -49665,6 +50728,7 @@ exports.fragmentShapes = fragmentShapes;
|
|
|
49665
50728
|
exports.generateFontGuid = generateFontGuid;
|
|
49666
50729
|
exports.generateLayoutXml = generateLayoutXml;
|
|
49667
50730
|
exports.generateMediaFilename = generateMediaFilename;
|
|
50731
|
+
exports.getAnimationPresetInfo = getAnimationPresetInfo;
|
|
49668
50732
|
exports.getCalloutLeaderLineGeometry = getCalloutLeaderLineGeometry;
|
|
49669
50733
|
exports.getCalloutTier = getCalloutTier;
|
|
49670
50734
|
exports.getCalloutViewBoxBounds = getCalloutViewBoxBounds;
|
|
@@ -49672,6 +50736,8 @@ exports.getCommentMarkerPosition = getCommentMarkerPosition;
|
|
|
49672
50736
|
exports.getConnectorAdjustment = getConnectorAdjustment;
|
|
49673
50737
|
exports.getConnectorPathGeometry = getConnectorPathGeometry;
|
|
49674
50738
|
exports.getCssBorderDashStyle = getCssBorderDashStyle;
|
|
50739
|
+
exports.getCustomShowNames = getCustomShowNames;
|
|
50740
|
+
exports.getCustomShowPositionLabel = getCustomShowPositionLabel;
|
|
49675
50741
|
exports.getDirectory = getDirectory;
|
|
49676
50742
|
exports.getElementLabel = getElementLabel;
|
|
49677
50743
|
exports.getElementTextContent = getElementTextContent;
|
|
@@ -49681,6 +50747,7 @@ exports.getLinkedTextBoxSegments = getLinkedTextBoxSegments;
|
|
|
49681
50747
|
exports.getOleObjectTypeLabel = getOleObjectTypeLabel;
|
|
49682
50748
|
exports.getPanoseWeight = getPanoseWeight;
|
|
49683
50749
|
exports.getPresetShapeClipPath = getPresetShapeClipPath;
|
|
50750
|
+
exports.getPresetsByCategory = getPresetsByCategory;
|
|
49684
50751
|
exports.getRoundRectRadiusPx = getRoundRectRadiusPx;
|
|
49685
50752
|
exports.getSectionForSlide = getSectionForSlide;
|
|
49686
50753
|
exports.getSectionSlideRange = getSectionSlideRange;
|
|
@@ -49730,9 +50797,11 @@ exports.layoutEngineShapesToDrawingShapes = layoutEngineShapesToDrawingShapes;
|
|
|
49730
50797
|
exports.mailMerge = mailMerge;
|
|
49731
50798
|
exports.mergePresentation = mergePresentation;
|
|
49732
50799
|
exports.mergeShapes = mergeShapes;
|
|
50800
|
+
exports.mergeStyleParts = mergeStyleParts;
|
|
49733
50801
|
exports.mergeThemeColorOverride = mergeThemeColorOverride;
|
|
49734
50802
|
exports.mm = mm;
|
|
49735
50803
|
exports.moveSlidesToSection = moveSlidesToSection;
|
|
50804
|
+
exports.navigateCustomShow = navigateCustomShow;
|
|
49736
50805
|
exports.normalizeHexColor = normalizeHexColor;
|
|
49737
50806
|
exports.normalizeNamespaceUri = normalizeNamespaceUri;
|
|
49738
50807
|
exports.normalizePartPath = normalizePartPath;
|
|
@@ -49759,6 +50828,7 @@ exports.parseDrawingHueDegrees = parseDrawingHueDegrees;
|
|
|
49759
50828
|
exports.parseDrawingPercent = parseDrawingPercent;
|
|
49760
50829
|
exports.parseEmbeddedXlsx = parseEmbeddedXlsx;
|
|
49761
50830
|
exports.parseGuideDefinitions = parseGuideDefinitions;
|
|
50831
|
+
exports.parseHexColor = parseHexColor;
|
|
49762
50832
|
exports.parseKinsoku = parseKinsoku;
|
|
49763
50833
|
exports.parseLayoutDefinition = parseLayoutDefinition;
|
|
49764
50834
|
exports.parseLineStyle = parseLineStyle;
|
|
@@ -49786,6 +50856,8 @@ exports.pt = pt;
|
|
|
49786
50856
|
exports.reResolveSlideColors = reResolveSlideColors;
|
|
49787
50857
|
exports.readFileAsDataUrl = readFileAsDataUrl;
|
|
49788
50858
|
exports.reflowSmartArtLayout = reflowSmartArtLayout;
|
|
50859
|
+
exports.relativeLuminance = relativeLuminance;
|
|
50860
|
+
exports.relayoutSmartArt = relayoutSmartArt;
|
|
49789
50861
|
exports.removeChartCategory = removeChartCategory;
|
|
49790
50862
|
exports.removeChartSeries = removeChartSeries;
|
|
49791
50863
|
exports.removeSection = removeSection;
|
|
@@ -49804,8 +50876,10 @@ exports.resetIdCounter = resetIdCounter;
|
|
|
49804
50876
|
exports.resetSectionIdCounter = resetSectionIdCounter;
|
|
49805
50877
|
exports.resetSmartArtEditCounter = resetSmartArtEditCounter;
|
|
49806
50878
|
exports.resolveCoordinate = resolveCoordinate;
|
|
50879
|
+
exports.resolveCustomShowSlideIndices = resolveCustomShowSlideIndices;
|
|
49807
50880
|
exports.resolveModel3DMimeType = resolveModel3DMimeType;
|
|
49808
50881
|
exports.resolveReferenceUriToPart = resolveReferenceUriToPart;
|
|
50882
|
+
exports.resolveTableCellStyle = resolveTableCellStyle;
|
|
49809
50883
|
exports.rgbToHsl = rgbToHsl;
|
|
49810
50884
|
exports.selectAlternateContentBranch = selectAlternateContentBranch;
|
|
49811
50885
|
exports.serializeCondition = serializeCondition;
|