pptx-react-viewer 1.0.12 → 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.
Files changed (35) hide show
  1. package/dist/{PowerPointViewer-DtLlYf0r.d.mts → PowerPointViewer-CX0a7wz_.d.mts} +2 -0
  2. package/dist/{PowerPointViewer-DtLlYf0r.d.ts → PowerPointViewer-CX0a7wz_.d.ts} +2 -0
  3. package/dist/index.d.mts +2 -2
  4. package/dist/index.d.ts +2 -2
  5. package/dist/index.js +373 -64
  6. package/dist/index.mjs +373 -64
  7. package/dist/pptx-viewer.css +1 -1
  8. package/dist/viewer/index.d.mts +11 -3
  9. package/dist/viewer/index.d.ts +11 -3
  10. package/dist/viewer/index.js +373 -64
  11. package/dist/viewer/index.mjs +373 -64
  12. package/node_modules/emf-converter/package.json +1 -1
  13. package/node_modules/mtx-decompressor/dist/index.d.mts +2 -1
  14. package/node_modules/mtx-decompressor/dist/index.d.ts +2 -1
  15. package/node_modules/mtx-decompressor/dist/index.js +85 -93
  16. package/node_modules/mtx-decompressor/dist/index.mjs +85 -93
  17. package/node_modules/mtx-decompressor/package.json +1 -1
  18. package/node_modules/pptx-viewer-core/dist/{SvgExporter-CPr1npgo.d.ts → SvgExporter--H1PDfAY.d.ts} +1 -1
  19. package/node_modules/pptx-viewer-core/dist/{SvgExporter-B4-1_Hjp.d.mts → SvgExporter-Dq_2eV_r.d.mts} +1 -1
  20. package/node_modules/pptx-viewer-core/dist/cli/index.d.mts +2 -2
  21. package/node_modules/pptx-viewer-core/dist/cli/index.d.ts +2 -2
  22. package/node_modules/pptx-viewer-core/dist/cli/index.js +339 -235
  23. package/node_modules/pptx-viewer-core/dist/cli/index.mjs +339 -235
  24. package/node_modules/pptx-viewer-core/dist/converter/index.d.mts +3 -3
  25. package/node_modules/pptx-viewer-core/dist/converter/index.d.ts +3 -3
  26. package/node_modules/pptx-viewer-core/dist/index.d.mts +297 -6
  27. package/node_modules/pptx-viewer-core/dist/index.d.ts +297 -6
  28. package/node_modules/pptx-viewer-core/dist/index.js +1309 -235
  29. package/node_modules/pptx-viewer-core/dist/index.mjs +1285 -236
  30. package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.mts → presentation-BozkirFp.d.mts} +17 -1
  31. package/node_modules/pptx-viewer-core/dist/{presentation-DgkIYhXo.d.ts → presentation-BozkirFp.d.ts} +17 -1
  32. package/node_modules/pptx-viewer-core/dist/{text-operations-dYKZp3zE.d.mts → text-operations-B2JbPA5H.d.mts} +1 -1
  33. package/node_modules/pptx-viewer-core/dist/{text-operations-B6U6XxWt.d.ts → text-operations-zwF6i4eH.d.ts} +1 -1
  34. package/node_modules/pptx-viewer-core/package.json +1 -1
  35. package/package.json +4 -4
@@ -2534,33 +2534,10 @@ var PptxPresentationSaveBuilder = class {
2534
2534
  init.presentationData["p:presentation"] = presentation;
2535
2535
  return init.presentationData;
2536
2536
  }
2537
- applyHeaderFooter(presentation, headerFooter) {
2538
- if (!headerFooter) {
2539
- return;
2540
- }
2541
- const hf = presentation["p:hf"] || {};
2542
- if (headerFooter.hasHeader !== void 0) {
2543
- hf["@_hdr"] = headerFooter.hasHeader ? "1" : "0";
2544
- }
2545
- if (headerFooter.hasFooter !== void 0) {
2546
- hf["@_ftr"] = headerFooter.hasFooter ? "1" : "0";
2547
- }
2548
- if (headerFooter.hasDateTime !== void 0) {
2549
- hf["@_dt"] = headerFooter.hasDateTime ? "1" : "0";
2550
- }
2551
- if (headerFooter.hasSlideNumber !== void 0) {
2552
- hf["@_sldNum"] = headerFooter.hasSlideNumber ? "1" : "0";
2553
- }
2554
- if (headerFooter.footerText !== void 0) {
2555
- hf["@_ftrText"] = headerFooter.footerText;
2556
- }
2557
- if (headerFooter.dateTimeText !== void 0) {
2558
- hf["@_dtText"] = headerFooter.dateTimeText;
2559
- }
2560
- if (headerFooter.dateFormat !== void 0) {
2561
- hf["@_dtFmt"] = headerFooter.dateFormat;
2537
+ applyHeaderFooter(presentation, _headerFooter) {
2538
+ if (presentation["p:hf"] !== void 0) {
2539
+ delete presentation["p:hf"];
2562
2540
  }
2563
- presentation["p:hf"] = hf;
2564
2541
  }
2565
2542
  applySlideDimensions(presentation, rawSlideWidthEmu, rawSlideHeightEmu, rawSlideSizeType) {
2566
2543
  const slideSize = presentation["p:sldSz"];
@@ -3236,7 +3213,9 @@ var PptxSlideNotesPartUpdater = class {
3236
3213
  var PptxSlideBackgroundBuilder = class {
3237
3214
  applyBackground(init) {
3238
3215
  const hasBackgroundColor = typeof init.slide.backgroundColor === "string" && init.slide.backgroundColor.length > 0 && init.slide.backgroundColor !== "transparent";
3239
- const hasBackgroundImage = typeof init.slide.backgroundImage === "string" && init.slide.backgroundImage.length > 0;
3216
+ const rawBackgroundImage = typeof init.slide.backgroundImage === "string" ? init.slide.backgroundImage : "";
3217
+ const hasBackgroundImage = rawBackgroundImage.length > 0;
3218
+ const hasDataUrlBackgroundImage = hasBackgroundImage && rawBackgroundImage.startsWith("data:");
3240
3219
  const hasBackgroundGradient = typeof init.slide.backgroundGradient === "string" && init.slide.backgroundGradient.length > 0;
3241
3220
  const cSld = init.slideNode["p:cSld"] || {};
3242
3221
  if (!(hasBackgroundColor || hasBackgroundImage || hasBackgroundGradient)) {
@@ -3244,9 +3223,17 @@ var PptxSlideBackgroundBuilder = class {
3244
3223
  init.slideNode["p:cSld"] = cSld;
3245
3224
  return;
3246
3225
  }
3226
+ const existingBg = cSld["p:bg"];
3227
+ const existingBgPr = existingBg?.["p:bgPr"];
3228
+ const existingHasBlipFill = existingBgPr?.["a:blipFill"] !== void 0;
3229
+ if (!hasDataUrlBackgroundImage && existingHasBlipFill) {
3230
+ this.reorderCSldBgFirst(cSld, existingBg);
3231
+ init.slideNode["p:cSld"] = cSld;
3232
+ return;
3233
+ }
3247
3234
  const backgroundProperties = {};
3248
- if (hasBackgroundImage && init.slide.backgroundImage) {
3249
- const parsedBackgroundImage = init.parseDataUrlToBytes(init.slide.backgroundImage);
3235
+ if (hasDataUrlBackgroundImage) {
3236
+ const parsedBackgroundImage = init.parseDataUrlToBytes(rawBackgroundImage);
3250
3237
  if (parsedBackgroundImage) {
3251
3238
  const backgroundImagePath = init.saveState.nextMediaPath(parsedBackgroundImage.extension);
3252
3239
  init.zip.file(backgroundImagePath, parsedBackgroundImage.bytes);
@@ -3269,9 +3256,42 @@ var PptxSlideBackgroundBuilder = class {
3269
3256
  }
3270
3257
  };
3271
3258
  }
3272
- backgroundProperties["a:effectLst"] = {};
3273
- cSld["p:bg"] = { "p:bgPr": backgroundProperties };
3274
- init.slideNode["p:cSld"] = cSld;
3259
+ 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;
3260
+ if (hasFillChild) {
3261
+ backgroundProperties["a:effectLst"] = {};
3262
+ }
3263
+ if (!hasFillChild) {
3264
+ delete cSld["p:bg"];
3265
+ init.slideNode["p:cSld"] = cSld;
3266
+ return;
3267
+ }
3268
+ const rebuiltCSld = { "p:bg": { "p:bgPr": backgroundProperties } };
3269
+ for (const key of Object.keys(cSld)) {
3270
+ if (key === "p:bg") {
3271
+ continue;
3272
+ }
3273
+ rebuiltCSld[key] = cSld[key];
3274
+ }
3275
+ init.slideNode["p:cSld"] = rebuiltCSld;
3276
+ }
3277
+ reorderCSldBgFirst(cSld, bg) {
3278
+ const keys = Object.keys(cSld);
3279
+ if (keys.length > 0 && keys[0] === "p:bg") {
3280
+ return;
3281
+ }
3282
+ const reordered = { "p:bg": bg };
3283
+ for (const key of keys) {
3284
+ if (key === "p:bg") {
3285
+ continue;
3286
+ }
3287
+ reordered[key] = cSld[key];
3288
+ }
3289
+ for (const key of Object.keys(cSld)) {
3290
+ delete cSld[key];
3291
+ }
3292
+ for (const key of Object.keys(reordered)) {
3293
+ cSld[key] = reordered[key];
3294
+ }
3275
3295
  }
3276
3296
  };
3277
3297
 
@@ -6244,6 +6264,7 @@ var PptxConnectorParser = class {
6244
6264
  slideRelationships,
6245
6265
  this.context.getOrderedSlidePaths()
6246
6266
  );
6267
+ const connElementName = cNvPr?.["@_name"] ? String(cNvPr["@_name"]).trim() : void 0;
6247
6268
  const locks = this.context.parseShapeLocks(
6248
6269
  cNvConnectionShapeProperties?.["a:cxnSpLocks"] ?? cNvConnectionShapeProperties?.["a:spLocks"]
6249
6270
  );
@@ -6251,6 +6272,7 @@ var PptxConnectorParser = class {
6251
6272
  const textResult = this.context.parseConnectorTextBody?.(txBody, slidePath);
6252
6273
  return {
6253
6274
  id,
6275
+ name: connElementName || void 0,
6254
6276
  type: "connector",
6255
6277
  x: Math.round(parseInt(String(offset["@_x"] || "0"), 10) / this.context.emuPerPx),
6256
6278
  y: Math.round(parseInt(String(offset["@_y"] || "0"), 10) / this.context.emuPerPx),
@@ -9821,7 +9843,16 @@ var PptxRuntimeDependencyFactory = class {
9821
9843
  return new XMLParser({
9822
9844
  ignoreAttributes: false,
9823
9845
  attributeNamePrefix: "@_",
9824
- parseAttributeValue: false
9846
+ parseAttributeValue: false,
9847
+ // Keep element text as strings. When true (the fast-xml-parser
9848
+ // default), `<AppVersion>16.0000</AppVersion>` is coerced to the
9849
+ // JS number 16, losing the trailing zeros. On save we write back
9850
+ // "16", which fails PowerPoint's strict `[0-9]+\.[0-9]{4}` match
9851
+ // on AppVersion — the loader rejects the package with HRESULT
9852
+ // 0x80070570 (ERROR_FILE_CORRUPT) and shows the repair dialog.
9853
+ // More generally, OOXML element text is always an untyped string;
9854
+ // downstream callers coerce where needed.
9855
+ parseTagValue: false
9825
9856
  });
9826
9857
  }
9827
9858
  createBuilder() {
@@ -10689,7 +10720,7 @@ var TRIPLET_ENCODINGS = [
10689
10720
  { byteCount: 2, xBits: 4, yBits: 4, deltaX: 49, deltaY: 49, xSign: 1, ySign: -1 },
10690
10721
  { byteCount: 2, xBits: 4, yBits: 4, deltaX: 49, deltaY: 49, xSign: -1, ySign: 1 },
10691
10722
  { byteCount: 2, xBits: 4, yBits: 4, deltaX: 49, deltaY: 49, xSign: 1, ySign: 1 },
10692
- // Indices 84-107: 8-bit X + 8-bit Y (3 bytes total)
10723
+ // Indices 84-119: 8-bit X + 8-bit Y (3 bytes total)
10693
10724
  { byteCount: 3, xBits: 8, yBits: 8, deltaX: 1, deltaY: 1, xSign: -1, ySign: -1 },
10694
10725
  { byteCount: 3, xBits: 8, yBits: 8, deltaX: 1, deltaY: 1, xSign: 1, ySign: -1 },
10695
10726
  { byteCount: 3, xBits: 8, yBits: 8, deltaX: 1, deltaY: 1, xSign: -1, ySign: 1 },
@@ -10726,12 +10757,12 @@ var TRIPLET_ENCODINGS = [
10726
10757
  { byteCount: 3, xBits: 8, yBits: 8, deltaX: 513, deltaY: 513, xSign: 1, ySign: -1 },
10727
10758
  { byteCount: 3, xBits: 8, yBits: 8, deltaX: 513, deltaY: 513, xSign: -1, ySign: 1 },
10728
10759
  { byteCount: 3, xBits: 8, yBits: 8, deltaX: 513, deltaY: 513, xSign: 1, ySign: 1 },
10729
- // Indices 108-111: 12-bit X + 12-bit Y (4 bytes total)
10760
+ // Indices 120-123: 12-bit X + 12-bit Y (4 bytes total)
10730
10761
  { byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: -1, ySign: -1 },
10731
10762
  { byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: 1, ySign: -1 },
10732
10763
  { byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: -1, ySign: 1 },
10733
10764
  { byteCount: 4, xBits: 12, yBits: 12, deltaX: 0, deltaY: 0, xSign: 1, ySign: 1 },
10734
- // Indices 112-115: 16-bit X + 16-bit Y (5 bytes total)
10765
+ // Indices 124-127: 16-bit X + 16-bit Y (5 bytes total)
10735
10766
  { byteCount: 5, xBits: 16, yBits: 16, deltaX: 0, deltaY: 0, xSign: -1, ySign: -1 },
10736
10767
  { byteCount: 5, xBits: 16, yBits: 16, deltaX: 0, deltaY: 0, xSign: 1, ySign: -1 },
10737
10768
  { byteCount: 5, xBits: 16, yBits: 16, deltaX: 0, deltaY: 0, xSign: -1, ySign: 1 },
@@ -10820,14 +10851,15 @@ function decodePushInstructions(sIn, sOut, pushCount) {
10820
10851
  if (pushCount === 0) {
10821
10852
  return;
10822
10853
  }
10823
- const values = [];
10824
- let isShort = false;
10854
+ const data = [];
10825
10855
  let remaining = pushCount;
10856
+ let isShort = false;
10857
+ const runValues = [];
10826
10858
  function flush() {
10827
- if (values.length === 0) {
10859
+ if (runValues.length === 0) {
10828
10860
  return;
10829
10861
  }
10830
- const count = values.length;
10862
+ const count = runValues.length;
10831
10863
  if (isShort) {
10832
10864
  if (count < 8) {
10833
10865
  sOut.writeU8(PUSHW + (count - 1));
@@ -10835,7 +10867,7 @@ function decodePushInstructions(sIn, sOut, pushCount) {
10835
10867
  sOut.writeU8(NPUSHW);
10836
10868
  sOut.writeU8(count);
10837
10869
  }
10838
- for (const v of values) {
10870
+ for (const v of runValues) {
10839
10871
  sOut.writeS16(v);
10840
10872
  }
10841
10873
  } else {
@@ -10845,54 +10877,50 @@ function decodePushInstructions(sIn, sOut, pushCount) {
10845
10877
  sOut.writeU8(NPUSHB);
10846
10878
  sOut.writeU8(count);
10847
10879
  }
10848
- for (const v of values) {
10880
+ for (const v of runValues) {
10849
10881
  sOut.writeU8(v & 255);
10850
10882
  }
10851
10883
  }
10852
- values.length = 0;
10884
+ runValues.length = 0;
10853
10885
  }
10854
- function addValue(v) {
10886
+ function put(v) {
10887
+ data.push(v);
10855
10888
  const needsShort = v < 0 || v > 255;
10856
- if (values.length > 0 && needsShort !== isShort) {
10889
+ if (runValues.length > 0 && needsShort !== isShort) {
10857
10890
  flush();
10858
10891
  }
10859
- if (values.length === 0) {
10892
+ if (runValues.length === 0) {
10860
10893
  isShort = needsShort;
10861
10894
  }
10862
- values.push(v);
10863
- if (values.length >= 255) {
10895
+ runValues.push(v);
10896
+ if (runValues.length >= 255) {
10864
10897
  flush();
10865
10898
  }
10866
10899
  }
10867
10900
  while (remaining > 0) {
10868
- const code = sIn.readU8();
10869
- if (code === 251 && remaining >= 4) {
10870
- const a = read255Short(sIn);
10871
- const b = read255Short(sIn);
10872
- const c = read255Short(sIn);
10873
- addValue(a);
10874
- addValue(b);
10875
- addValue(a);
10876
- addValue(c);
10877
- addValue(a);
10878
- remaining -= 5;
10879
- } else if (code === 252 && remaining >= 6) {
10880
- const a = read255Short(sIn);
10881
- const b = read255Short(sIn);
10901
+ const code = sIn.peekU8();
10902
+ if (code === 251 && remaining >= 3 && data.length >= 2) {
10903
+ sIn.readU8();
10904
+ const prev = data[data.length - 2];
10905
+ put(prev);
10906
+ const val = read255Short(sIn);
10907
+ put(val);
10908
+ put(prev);
10909
+ remaining -= 3;
10910
+ } else if (code === 252 && remaining >= 5 && data.length >= 2) {
10911
+ sIn.readU8();
10912
+ const prev = data[data.length - 2];
10913
+ put(prev);
10882
10914
  const c = read255Short(sIn);
10915
+ put(c);
10916
+ put(prev);
10883
10917
  const d = read255Short(sIn);
10884
- addValue(a);
10885
- addValue(b);
10886
- addValue(a);
10887
- addValue(c);
10888
- addValue(a);
10889
- addValue(d);
10890
- addValue(a);
10891
- remaining -= 7;
10918
+ put(d);
10919
+ put(prev);
10920
+ remaining -= 5;
10892
10921
  } else {
10893
- sIn.seekRelative(-1);
10894
10922
  const v = read255Short(sIn);
10895
- addValue(v);
10923
+ put(v);
10896
10924
  remaining -= 1;
10897
10925
  }
10898
10926
  }
@@ -10920,6 +10948,9 @@ function makeGlyphFlags(x, y, onCurve, firstTime) {
10920
10948
  return flags;
10921
10949
  }
10922
10950
  function decodeSimpleGlyph(numContours, streams, out, calcBBox, minX, minY, maxX, maxY) {
10951
+ if (numContours === 0) {
10952
+ return;
10953
+ }
10923
10954
  const sGlyph = streams[0];
10924
10955
  out.writeS16(numContours);
10925
10956
  const bboxPos = out.pos;
@@ -10940,13 +10971,12 @@ function decodeSimpleGlyph(numContours, streams, out, calcBBox, minX, minY, maxX
10940
10971
  }
10941
10972
  let totalPoints = 0;
10942
10973
  for (let c = 0; c < numContours; c++) {
10943
- const pointsInContour = read255UShort(sGlyph);
10944
- totalPoints += pointsInContour;
10945
10974
  if (c === 0) {
10946
- out.writeU16(pointsInContour - 1);
10947
- } else {
10948
- out.writeU16(totalPoints - 1);
10975
+ totalPoints = 1;
10949
10976
  }
10977
+ const pointsInContour = read255UShort(sGlyph);
10978
+ totalPoints += pointsInContour;
10979
+ out.writeU16(totalPoints - 1);
10950
10980
  }
10951
10981
  const flagBytes = new Uint8Array(totalPoints);
10952
10982
  for (let i = 0; i < totalPoints; i++) {
@@ -10959,7 +10989,7 @@ function decodeSimpleGlyph(numContours, streams, out, calcBBox, minX, minY, maxX
10959
10989
  let cumulativeY = 0;
10960
10990
  for (let i = 0; i < totalPoints; i++) {
10961
10991
  const flag = flagBytes[i];
10962
- onCurve[i] = flag >> 7;
10992
+ onCurve[i] = flag & 128 ? 0 : 1;
10963
10993
  const enc = TRIPLET_ENCODINGS[flag & 127];
10964
10994
  const extraBytes = enc.byteCount - 1;
10965
10995
  const subBuf = new Uint8Array(extraBytes);
@@ -11298,7 +11328,10 @@ var AHuff = class _AHuff {
11298
11328
  this.bio = bio;
11299
11329
  this.range = range;
11300
11330
  this.bitCount = bitsUsed(range - 1);
11301
- this.bitCount2 = this.bitCount > 8 ? this.bitCount - 8 : 0;
11331
+ this.bitCount2 = 0;
11332
+ if (range > 256 && range < 512) {
11333
+ this.bitCount2 = bitsUsed(range - 256 - 1) + 1;
11334
+ }
11302
11335
  const treeSize = 2 * range;
11303
11336
  this.tree = Array.from({ length: treeSize });
11304
11337
  for (let i = 0; i < treeSize; i++) {
@@ -11306,6 +11339,7 @@ var AHuff = class _AHuff {
11306
11339
  }
11307
11340
  for (let i = 2; i < treeSize; i++) {
11308
11341
  this.tree[i].up = i >> 1;
11342
+ this.tree[i].weight = 1;
11309
11343
  }
11310
11344
  for (let i = 1; i < range; i++) {
11311
11345
  this.tree[i].left = 2 * i;
@@ -11315,7 +11349,8 @@ var AHuff = class _AHuff {
11315
11349
  for (let i = 0; i < range; i++) {
11316
11350
  const leafIdx = range + i;
11317
11351
  this.tree[leafIdx].code = i;
11318
- this.tree[leafIdx].weight = 1;
11352
+ this.tree[leafIdx].left = -1;
11353
+ this.tree[leafIdx].right = -1;
11319
11354
  }
11320
11355
  this.symbolIndex = Array.from({ length: range });
11321
11356
  for (let i = 0; i < range; i++) {
@@ -11355,15 +11390,13 @@ var AHuff = class _AHuff {
11355
11390
  */
11356
11391
  readSymbol() {
11357
11392
  let a = _AHuff.ROOT;
11358
- while (this.tree[a].code < 0) {
11359
- if (this.bio.inputBit()) {
11360
- a = this.tree[a].right;
11361
- } else {
11362
- a = this.tree[a].left;
11363
- }
11364
- }
11393
+ let symbol;
11394
+ do {
11395
+ a = this.bio.inputBit() ? this.tree[a].right : this.tree[a].left;
11396
+ symbol = this.tree[a].code;
11397
+ } while (symbol < 0);
11365
11398
  this.updateWeight(a);
11366
- return this.tree[a].code;
11399
+ return symbol;
11367
11400
  }
11368
11401
  // --------------------------------------------------------------------
11369
11402
  // Private helpers
@@ -11387,17 +11420,19 @@ var AHuff = class _AHuff {
11387
11420
  updateWeight(a) {
11388
11421
  const tree = this.tree;
11389
11422
  for (; a !== _AHuff.ROOT; a = tree[a].up) {
11423
+ const weightA = tree[a].weight;
11390
11424
  let b = a - 1;
11391
- if (b > 0 && tree[b].weight === tree[a].weight) {
11392
- while (b > _AHuff.ROOT && tree[b - 1].weight === tree[a].weight) {
11425
+ if (tree[b].weight === weightA) {
11426
+ do {
11393
11427
  b--;
11394
- }
11395
- if (b > _AHuff.ROOT && b !== a) {
11428
+ } while (tree[b].weight === weightA);
11429
+ b++;
11430
+ if (b > _AHuff.ROOT) {
11396
11431
  this.swapNodes(a, b);
11397
11432
  a = b;
11398
11433
  }
11399
11434
  }
11400
- tree[a].weight++;
11435
+ tree[a].weight = weightA + 1;
11401
11436
  }
11402
11437
  tree[_AHuff.ROOT].weight++;
11403
11438
  }
@@ -11417,38 +11452,26 @@ var AHuff = class _AHuff {
11417
11452
  */
11418
11453
  swapNodes(a, b) {
11419
11454
  const tree = this.tree;
11420
- const na = tree[a];
11421
- const nb = tree[b];
11422
- let tmp;
11423
- tmp = na.left;
11424
- na.left = nb.left;
11425
- nb.left = tmp;
11426
- tmp = na.right;
11427
- na.right = nb.right;
11428
- nb.right = tmp;
11429
- tmp = na.code;
11430
- na.code = nb.code;
11431
- nb.code = tmp;
11432
- tmp = na.weight;
11433
- na.weight = nb.weight;
11434
- nb.weight = tmp;
11435
- if (na.left) {
11436
- tree[na.left].up = a;
11437
- }
11438
- if (na.right) {
11439
- tree[na.right].up = a;
11440
- }
11441
- if (nb.left) {
11442
- tree[nb.left].up = b;
11443
- }
11444
- if (nb.right) {
11445
- tree[nb.right].up = b;
11446
- }
11447
- if (na.code >= 0) {
11448
- this.symbolIndex[na.code] = a;
11455
+ const upa = tree[a].up;
11456
+ const upb = tree[b].up;
11457
+ const tmp = tree[a];
11458
+ tree[a] = tree[b];
11459
+ tree[b] = tmp;
11460
+ tree[a].up = upa;
11461
+ tree[b].up = upb;
11462
+ let code = tree[a].code;
11463
+ if (code < 0) {
11464
+ tree[tree[a].left].up = a;
11465
+ tree[tree[a].right].up = a;
11466
+ } else {
11467
+ this.symbolIndex[code] = a;
11449
11468
  }
11450
- if (nb.code >= 0) {
11451
- this.symbolIndex[nb.code] = b;
11469
+ code = tree[b].code;
11470
+ if (code < 0) {
11471
+ tree[tree[b].left].up = b;
11472
+ tree[tree[b].right].up = b;
11473
+ } else {
11474
+ this.symbolIndex[code] = b;
11452
11475
  }
11453
11476
  }
11454
11477
  /**
@@ -11827,12 +11850,12 @@ function unpackMtx(data, size) {
11827
11850
  const offset2 = data[4] << 16 | data[5] << 8 | data[6];
11828
11851
  const offset3 = data[7] << 16 | data[8] << 8 | data[9];
11829
11852
  const offsets = [10, offset2, offset3];
11830
- const sizes = [offset2 - 10, offset3 - offset2, size - offset3];
11853
+ const blockSizes = [offset2 - 10, offset3 - offset2, size - offset3];
11831
11854
  const streams = [];
11832
11855
  const decompressedSizes = [];
11833
11856
  for (let i = 0; i < 3; i++) {
11834
11857
  const block = data.subarray(offsets[i]);
11835
- const decompressed = lzcompDecompress(block, sizes[i], versionMagic);
11858
+ const decompressed = lzcompDecompress(block, blockSizes[i], versionMagic);
11836
11859
  streams.push(decompressed);
11837
11860
  decompressedSizes.push(decompressed.length);
11838
11861
  }
@@ -11924,6 +11947,15 @@ function parseEotHeader(data) {
11924
11947
  const fullName = readNameString();
11925
11948
  if (version >= 131074) {
11926
11949
  readNameString();
11950
+ offset += 8;
11951
+ if (offset + 4 <= data.length) {
11952
+ const signatureSize = readUint16LE(data, offset + 2);
11953
+ offset += 4 + signatureSize;
11954
+ }
11955
+ if (offset + 8 <= data.length) {
11956
+ const eudcFontSize = readUint32LE(data, offset + 4);
11957
+ offset += 8 + eudcFontSize;
11958
+ }
11927
11959
  }
11928
11960
  return {
11929
11961
  eotSize,
@@ -24478,6 +24510,943 @@ function applyThemeToData(data, newColorScheme, newFontScheme, themeName) {
24478
24510
  };
24479
24511
  }
24480
24512
 
24513
+ // src/core/utils/accessibility-checker.ts
24514
+ function parseHexColor(hex) {
24515
+ const cleaned = hex.replace(/^#/, "");
24516
+ if (!/^[\da-fA-F]+$/.test(cleaned)) {
24517
+ return null;
24518
+ }
24519
+ if (cleaned.length === 3) {
24520
+ const r = Number.parseInt(cleaned[0] + cleaned[0], 16);
24521
+ const g = Number.parseInt(cleaned[1] + cleaned[1], 16);
24522
+ const b = Number.parseInt(cleaned[2] + cleaned[2], 16);
24523
+ return [r, g, b];
24524
+ }
24525
+ if (cleaned.length === 6) {
24526
+ const r = Number.parseInt(cleaned.slice(0, 2), 16);
24527
+ const g = Number.parseInt(cleaned.slice(2, 4), 16);
24528
+ const b = Number.parseInt(cleaned.slice(4, 6), 16);
24529
+ return [r, g, b];
24530
+ }
24531
+ return null;
24532
+ }
24533
+ function relativeLuminance(r, g, b) {
24534
+ const [rs, gs, bs] = [r, g, b].map((c) => {
24535
+ const s = c / 255;
24536
+ return s <= 0.04045 ? s / 12.92 : ((s + 0.055) / 1.055) ** 2.4;
24537
+ });
24538
+ return 0.2126 * rs + 0.7152 * gs + 0.0722 * bs;
24539
+ }
24540
+ function computeContrastRatio(fg, bg) {
24541
+ const fgRgb = parseHexColor(fg);
24542
+ const bgRgb = parseHexColor(bg);
24543
+ if (!fgRgb || !bgRgb) {
24544
+ return 21;
24545
+ }
24546
+ const l1 = relativeLuminance(...fgRgb);
24547
+ const l2 = relativeLuminance(...bgRgb);
24548
+ const lighter = Math.max(l1, l2);
24549
+ const darker = Math.min(l1, l2);
24550
+ return (lighter + 0.05) / (darker + 0.05);
24551
+ }
24552
+ var IMAGE_LIKE_TYPES = /* @__PURE__ */ new Set(["image", "picture"]);
24553
+ var VISUAL_CONTENT_TYPES = /* @__PURE__ */ new Set(["image", "picture", "chart", "smartArt", "media"]);
24554
+ function getElementText(el) {
24555
+ if ("text" in el && typeof el.text === "string") {
24556
+ return el.text;
24557
+ }
24558
+ if ("textSegments" in el && Array.isArray(el.textSegments)) {
24559
+ return el.textSegments.map((s) => s.text || "").join("");
24560
+ }
24561
+ return "";
24562
+ }
24563
+ function getAltText(el) {
24564
+ if ("altText" in el) {
24565
+ return el.altText;
24566
+ }
24567
+ return void 0;
24568
+ }
24569
+ function getTextColor(el) {
24570
+ if ("textStyle" in el && el.textStyle) {
24571
+ return el.textStyle.color;
24572
+ }
24573
+ if ("textSegments" in el && Array.isArray(el.textSegments) && el.textSegments.length > 0) {
24574
+ const firstStyle = el.textSegments[0]?.style;
24575
+ return firstStyle?.color;
24576
+ }
24577
+ return void 0;
24578
+ }
24579
+ function getBackgroundColor(el) {
24580
+ if ("shapeStyle" in el && el.shapeStyle) {
24581
+ return el.shapeStyle.fillColor;
24582
+ }
24583
+ return void 0;
24584
+ }
24585
+ function isTitleElement(el) {
24586
+ const id = el.id.toLowerCase();
24587
+ return id.includes("title") || id.startsWith("ctr") || id.includes("ctrtitle");
24588
+ }
24589
+ function isVisibleElement(el) {
24590
+ if ("hidden" in el && el.hidden) {
24591
+ return false;
24592
+ }
24593
+ if ("opacity" in el && typeof el.opacity === "number" && el.opacity <= 0) {
24594
+ return false;
24595
+ }
24596
+ return true;
24597
+ }
24598
+ function checkMissingAltText(slide, slideIndex) {
24599
+ const issues = [];
24600
+ for (const el of slide.elements) {
24601
+ if (!isVisibleElement(el)) {
24602
+ continue;
24603
+ }
24604
+ if (!VISUAL_CONTENT_TYPES.has(el.type)) {
24605
+ continue;
24606
+ }
24607
+ const alt = getAltText(el);
24608
+ if (!alt || alt.trim() === "") {
24609
+ const label = IMAGE_LIKE_TYPES.has(el.type) ? "Image" : el.type === "chart" ? "Chart" : el.type === "smartArt" ? "SmartArt" : "Media";
24610
+ issues.push({
24611
+ type: "missingAltText",
24612
+ severity: "error",
24613
+ slideIndex,
24614
+ elementId: el.id,
24615
+ message: `${label} is missing alternative text.`,
24616
+ suggestion: `Add a description to the ${label.toLowerCase()} so screen readers can describe it.`
24617
+ });
24618
+ }
24619
+ }
24620
+ return issues;
24621
+ }
24622
+ function checkMissingSlideTitle(slide, slideIndex) {
24623
+ const titleElement = slide.elements.find((el) => isTitleElement(el) && isVisibleElement(el));
24624
+ if (!titleElement) {
24625
+ return [
24626
+ {
24627
+ type: "missingSlideTitle",
24628
+ severity: "warning",
24629
+ slideIndex,
24630
+ message: "Slide is missing a title.",
24631
+ suggestion: "Add a title element so screen readers can navigate between slides."
24632
+ }
24633
+ ];
24634
+ }
24635
+ const text = getElementText(titleElement).trim();
24636
+ if (text === "") {
24637
+ return [
24638
+ {
24639
+ type: "missingSlideTitle",
24640
+ severity: "warning",
24641
+ slideIndex,
24642
+ elementId: titleElement.id,
24643
+ message: "Slide title is empty.",
24644
+ suggestion: "Add text to the title element."
24645
+ }
24646
+ ];
24647
+ }
24648
+ return [];
24649
+ }
24650
+ function checkLowContrast(slide, slideIndex, minRatio, slideBg) {
24651
+ const issues = [];
24652
+ const defaultBg = slideBg || "#FFFFFF";
24653
+ for (const el of slide.elements) {
24654
+ if (!isVisibleElement(el)) {
24655
+ continue;
24656
+ }
24657
+ const text = getElementText(el);
24658
+ if (!text.trim()) {
24659
+ continue;
24660
+ }
24661
+ const fg = getTextColor(el);
24662
+ if (!fg) {
24663
+ continue;
24664
+ }
24665
+ const bg = getBackgroundColor(el) || defaultBg;
24666
+ const ratio = computeContrastRatio(fg, bg);
24667
+ if (ratio < minRatio) {
24668
+ issues.push({
24669
+ type: "lowContrast",
24670
+ severity: "warning",
24671
+ slideIndex,
24672
+ elementId: el.id,
24673
+ message: `Text contrast ratio is ${ratio.toFixed(1)}:1 (minimum ${minRatio}:1).`,
24674
+ suggestion: "Increase contrast between text colour and background."
24675
+ });
24676
+ }
24677
+ }
24678
+ return issues;
24679
+ }
24680
+ function checkComplexTables(slide, slideIndex) {
24681
+ const issues = [];
24682
+ for (const el of slide.elements) {
24683
+ if (el.type !== "table") {
24684
+ continue;
24685
+ }
24686
+ const tableData = el.tableData;
24687
+ if (!tableData) {
24688
+ continue;
24689
+ }
24690
+ let mergeCount = 0;
24691
+ for (const row of tableData.rows) {
24692
+ for (const cell of row.cells) {
24693
+ if (cell.gridSpan && cell.gridSpan > 1 || cell.rowSpan && cell.rowSpan > 1) {
24694
+ mergeCount++;
24695
+ }
24696
+ }
24697
+ }
24698
+ if (mergeCount > 2) {
24699
+ issues.push({
24700
+ type: "complexTable",
24701
+ severity: "warning",
24702
+ slideIndex,
24703
+ elementId: el.id,
24704
+ message: `Table has ${mergeCount} merged cell regions, which can confuse screen readers.`,
24705
+ suggestion: "Simplify the table structure or split into multiple simpler tables."
24706
+ });
24707
+ }
24708
+ }
24709
+ return issues;
24710
+ }
24711
+ function checkDuplicateTitles(slides) {
24712
+ const issues = [];
24713
+ const titleMap = /* @__PURE__ */ new Map();
24714
+ for (let i = 0; i < slides.length; i++) {
24715
+ const slide = slides[i];
24716
+ const titleEl = slide.elements.find((el) => isTitleElement(el) && isVisibleElement(el));
24717
+ if (!titleEl) {
24718
+ continue;
24719
+ }
24720
+ const text = getElementText(titleEl).trim().toLowerCase();
24721
+ if (!text) {
24722
+ continue;
24723
+ }
24724
+ const existing = titleMap.get(text);
24725
+ if (existing) {
24726
+ existing.push(i);
24727
+ } else {
24728
+ titleMap.set(text, [i]);
24729
+ }
24730
+ }
24731
+ for (const [title, indices] of titleMap) {
24732
+ if (indices.length > 1) {
24733
+ for (const idx of indices) {
24734
+ issues.push({
24735
+ type: "duplicateTitle",
24736
+ severity: "tip",
24737
+ slideIndex: idx,
24738
+ message: `Slide title "${title}" is duplicated across ${indices.length} slides.`,
24739
+ suggestion: "Use unique titles to help screen reader users distinguish slides."
24740
+ });
24741
+ }
24742
+ }
24743
+ }
24744
+ return issues;
24745
+ }
24746
+ function checkBlankSlide(slide, slideIndex) {
24747
+ const hasVisibleContent = slide.elements.some((el) => {
24748
+ if (!isVisibleElement(el)) {
24749
+ return false;
24750
+ }
24751
+ if (el.type === "text" || el.type === "shape") {
24752
+ return getElementText(el).trim() !== "";
24753
+ }
24754
+ return true;
24755
+ });
24756
+ if (!hasVisibleContent) {
24757
+ return [
24758
+ {
24759
+ type: "blankSlide",
24760
+ severity: "tip",
24761
+ slideIndex,
24762
+ message: "Slide appears to have no visible content.",
24763
+ suggestion: "Add content or remove the blank slide."
24764
+ }
24765
+ ];
24766
+ }
24767
+ return [];
24768
+ }
24769
+ function checkPresentation(data, options = {}) {
24770
+ const { minContrastRatio = 4.5, skipContrast = false, skipBlankSlide = false } = options;
24771
+ const issues = [];
24772
+ for (let i = 0; i < data.slides.length; i++) {
24773
+ const slide = data.slides[i];
24774
+ issues.push(...checkMissingAltText(slide, i));
24775
+ issues.push(...checkMissingSlideTitle(slide, i));
24776
+ if (!skipContrast) {
24777
+ issues.push(...checkLowContrast(slide, i, minContrastRatio, slide.backgroundColor));
24778
+ }
24779
+ issues.push(...checkComplexTables(slide, i));
24780
+ if (!skipBlankSlide) {
24781
+ issues.push(...checkBlankSlide(slide, i));
24782
+ }
24783
+ }
24784
+ issues.push(...checkDuplicateTitles(data.slides));
24785
+ const severityOrder = { error: 0, warning: 1, tip: 2 };
24786
+ issues.sort(
24787
+ (a, b) => a.slideIndex - b.slideIndex || severityOrder[a.severity] - severityOrder[b.severity]
24788
+ );
24789
+ return issues;
24790
+ }
24791
+
24792
+ // src/core/utils/custom-show-utils.ts
24793
+ function findCustomShow(customShows, nameOrId) {
24794
+ if (!customShows || customShows.length === 0) {
24795
+ return void 0;
24796
+ }
24797
+ const lower = nameOrId.toLowerCase();
24798
+ return customShows.find((s) => s.id === nameOrId) || customShows.find((s) => s.name.toLowerCase() === lower);
24799
+ }
24800
+ function resolveCustomShowSlideIndices(customShow, slides) {
24801
+ const rIdToIndex = /* @__PURE__ */ new Map();
24802
+ for (let i = 0; i < slides.length; i++) {
24803
+ rIdToIndex.set(slides[i].rId, i);
24804
+ }
24805
+ const indices = [];
24806
+ for (const rId of customShow.slideRIds) {
24807
+ const idx = rIdToIndex.get(rId);
24808
+ if (idx !== void 0) {
24809
+ indices.push(idx);
24810
+ }
24811
+ }
24812
+ return indices;
24813
+ }
24814
+ function getCustomShowNames(customShows) {
24815
+ if (!customShows) {
24816
+ return [];
24817
+ }
24818
+ return customShows.map((s) => s.name);
24819
+ }
24820
+ function navigateCustomShow(currentSlideIndex, direction, filteredIndices, wrap = false) {
24821
+ if (filteredIndices.length === 0) {
24822
+ return currentSlideIndex;
24823
+ }
24824
+ const posInShow = filteredIndices.indexOf(currentSlideIndex);
24825
+ if (posInShow === -1) {
24826
+ return filteredIndices[0];
24827
+ }
24828
+ const nextPos = posInShow + direction;
24829
+ if (nextPos < 0) {
24830
+ return wrap ? filteredIndices[filteredIndices.length - 1] : currentSlideIndex;
24831
+ }
24832
+ if (nextPos >= filteredIndices.length) {
24833
+ return wrap ? filteredIndices[0] : currentSlideIndex;
24834
+ }
24835
+ return filteredIndices[nextPos];
24836
+ }
24837
+ function getCustomShowPositionLabel(currentSlideIndex, filteredIndices) {
24838
+ const pos2 = filteredIndices.indexOf(currentSlideIndex);
24839
+ if (pos2 === -1) {
24840
+ return "";
24841
+ }
24842
+ return `${pos2 + 1} of ${filteredIndices.length}`;
24843
+ }
24844
+
24845
+ // src/core/utils/table-style-resolver.ts
24846
+ function mergeBorder(base, override) {
24847
+ if (!base && !override) {
24848
+ return void 0;
24849
+ }
24850
+ if (!base) {
24851
+ return override;
24852
+ }
24853
+ if (!override) {
24854
+ return base;
24855
+ }
24856
+ return {
24857
+ width: override.width ?? base.width,
24858
+ color: override.color ?? base.color,
24859
+ dash: override.dash ?? base.dash
24860
+ };
24861
+ }
24862
+ function mergeStyleParts(base, override) {
24863
+ if (!base && !override) {
24864
+ return void 0;
24865
+ }
24866
+ if (!base) {
24867
+ return override;
24868
+ }
24869
+ if (!override) {
24870
+ return base;
24871
+ }
24872
+ const merged = {};
24873
+ if (override.fill || base.fill) {
24874
+ merged.fill = {
24875
+ color: override.fill?.color ?? base.fill?.color,
24876
+ gradient: override.fill?.gradient ?? base.fill?.gradient,
24877
+ pattern: override.fill?.pattern ?? base.fill?.pattern
24878
+ };
24879
+ }
24880
+ if (override.borders || base.borders) {
24881
+ merged.borders = {
24882
+ top: mergeBorder(base.borders?.top, override.borders?.top),
24883
+ bottom: mergeBorder(base.borders?.bottom, override.borders?.bottom),
24884
+ left: mergeBorder(base.borders?.left, override.borders?.left),
24885
+ right: mergeBorder(base.borders?.right, override.borders?.right)
24886
+ };
24887
+ }
24888
+ if (override.text || base.text) {
24889
+ merged.text = {
24890
+ bold: override.text?.bold ?? base.text?.bold,
24891
+ italic: override.text?.italic ?? base.text?.italic,
24892
+ color: override.text?.color ?? base.text?.color,
24893
+ fontSize: override.text?.fontSize ?? base.text?.fontSize
24894
+ };
24895
+ }
24896
+ return merged;
24897
+ }
24898
+ function resolveTableCellStyle(rowIndex, colIndex, totalRows, totalCols, flags, style) {
24899
+ let effective = style.wholeTbl ? { ...style.wholeTbl } : void 0;
24900
+ if (flags.bandedRows) {
24901
+ const cycle = flags.bandRowCycle ?? 1;
24902
+ const bandRow = flags.firstRow ? rowIndex - 1 : rowIndex;
24903
+ if (bandRow >= 0) {
24904
+ const bandIndex = Math.floor(bandRow / cycle) % 2;
24905
+ const bandPart = bandIndex === 0 ? style.band1H : style.band2H;
24906
+ if (bandPart) {
24907
+ effective = mergeStyleParts(effective, bandPart);
24908
+ }
24909
+ }
24910
+ }
24911
+ if (flags.bandedColumns) {
24912
+ const cycle = flags.bandColCycle ?? 1;
24913
+ const bandCol = flags.firstCol ? colIndex - 1 : colIndex;
24914
+ if (bandCol >= 0) {
24915
+ const bandIndex = Math.floor(bandCol / cycle) % 2;
24916
+ const bandPart = bandIndex === 0 ? style.band1V : style.band2V;
24917
+ if (bandPart) {
24918
+ effective = mergeStyleParts(effective, bandPart);
24919
+ }
24920
+ }
24921
+ }
24922
+ if (flags.lastRow && rowIndex === totalRows - 1 && style.lastRow) {
24923
+ effective = mergeStyleParts(effective, style.lastRow);
24924
+ }
24925
+ if (flags.firstRow && rowIndex === 0 && style.firstRow) {
24926
+ effective = mergeStyleParts(effective, style.firstRow);
24927
+ }
24928
+ if (flags.lastCol && colIndex === totalCols - 1 && style.lastCol) {
24929
+ effective = mergeStyleParts(effective, style.lastCol);
24930
+ }
24931
+ if (flags.firstCol && colIndex === 0 && style.firstCol) {
24932
+ effective = mergeStyleParts(effective, style.firstCol);
24933
+ }
24934
+ const isFirstRow = flags.firstRow && rowIndex === 0;
24935
+ const isLastRow = flags.lastRow && rowIndex === totalRows - 1;
24936
+ const isFirstCol = flags.firstCol && colIndex === 0;
24937
+ const isLastCol = flags.lastCol && colIndex === totalCols - 1;
24938
+ if (isLastRow && isLastCol && style.seCell) {
24939
+ effective = mergeStyleParts(effective, style.seCell);
24940
+ }
24941
+ if (isLastRow && isFirstCol && style.swCell) {
24942
+ effective = mergeStyleParts(effective, style.swCell);
24943
+ }
24944
+ if (isFirstRow && isLastCol && style.neCell) {
24945
+ effective = mergeStyleParts(effective, style.neCell);
24946
+ }
24947
+ if (isFirstRow && isFirstCol && style.nwCell) {
24948
+ effective = mergeStyleParts(effective, style.nwCell);
24949
+ }
24950
+ return partToCellStyle(effective);
24951
+ }
24952
+ function partToCellStyle(part) {
24953
+ if (!part) {
24954
+ return {};
24955
+ }
24956
+ const result = {};
24957
+ if (part.fill) {
24958
+ if (part.fill.color) {
24959
+ result.backgroundColor = part.fill.color;
24960
+ result.fillMode = "solid";
24961
+ }
24962
+ if (part.fill.gradient) {
24963
+ result.fillMode = "gradient";
24964
+ }
24965
+ if (part.fill.pattern) {
24966
+ result.fillMode = "pattern";
24967
+ }
24968
+ }
24969
+ if (part.borders) {
24970
+ if (part.borders.top) {
24971
+ if (part.borders.top.width !== void 0) {
24972
+ result.borderTopWidth = part.borders.top.width;
24973
+ }
24974
+ if (part.borders.top.color) {
24975
+ result.borderTopColor = part.borders.top.color;
24976
+ }
24977
+ if (part.borders.top.dash) {
24978
+ result.borderTopDash = part.borders.top.dash;
24979
+ }
24980
+ }
24981
+ if (part.borders.bottom) {
24982
+ if (part.borders.bottom.width !== void 0) {
24983
+ result.borderBottomWidth = part.borders.bottom.width;
24984
+ }
24985
+ if (part.borders.bottom.color) {
24986
+ result.borderBottomColor = part.borders.bottom.color;
24987
+ }
24988
+ if (part.borders.bottom.dash) {
24989
+ result.borderBottomDash = part.borders.bottom.dash;
24990
+ }
24991
+ }
24992
+ if (part.borders.left) {
24993
+ if (part.borders.left.width !== void 0) {
24994
+ result.borderLeftWidth = part.borders.left.width;
24995
+ }
24996
+ if (part.borders.left.color) {
24997
+ result.borderLeftColor = part.borders.left.color;
24998
+ }
24999
+ if (part.borders.left.dash) {
25000
+ result.borderLeftDash = part.borders.left.dash;
25001
+ }
25002
+ }
25003
+ if (part.borders.right) {
25004
+ if (part.borders.right.width !== void 0) {
25005
+ result.borderRightWidth = part.borders.right.width;
25006
+ }
25007
+ if (part.borders.right.color) {
25008
+ result.borderRightColor = part.borders.right.color;
25009
+ }
25010
+ if (part.borders.right.dash) {
25011
+ result.borderRightDash = part.borders.right.dash;
25012
+ }
25013
+ }
25014
+ }
25015
+ if (part.text) {
25016
+ if (part.text.bold !== void 0) {
25017
+ result.bold = part.text.bold;
25018
+ }
25019
+ if (part.text.italic !== void 0) {
25020
+ result.italic = part.text.italic;
25021
+ }
25022
+ if (part.text.color) {
25023
+ result.color = part.text.color;
25024
+ }
25025
+ if (part.text.fontSize !== void 0) {
25026
+ result.fontSize = part.text.fontSize;
25027
+ }
25028
+ }
25029
+ return result;
25030
+ }
25031
+
25032
+ // src/core/utils/animation-preset-catalog.ts
25033
+ var ENTRANCE_PRESETS = [
25034
+ {
25035
+ presetId: "entr.1",
25036
+ label: "Appear",
25037
+ category: "entrance",
25038
+ defaultDurationMs: 0,
25039
+ hasDirection: false,
25040
+ hasTextBuild: true
25041
+ },
25042
+ {
25043
+ presetId: "entr.10",
25044
+ label: "Fade",
25045
+ category: "entrance",
25046
+ defaultDurationMs: 500,
25047
+ hasDirection: false,
25048
+ hasTextBuild: true
25049
+ },
25050
+ {
25051
+ presetId: "entr.2",
25052
+ label: "Fly In",
25053
+ category: "entrance",
25054
+ defaultDurationMs: 500,
25055
+ hasDirection: true,
25056
+ directions: [
25057
+ "fromBottom",
25058
+ "fromLeft",
25059
+ "fromRight",
25060
+ "fromTop",
25061
+ "fromBottomLeft",
25062
+ "fromBottomRight",
25063
+ "fromTopLeft",
25064
+ "fromTopRight"
25065
+ ],
25066
+ hasTextBuild: true
25067
+ },
25068
+ {
25069
+ presetId: "entr.53",
25070
+ label: "Grow & Turn",
25071
+ category: "entrance",
25072
+ defaultDurationMs: 500,
25073
+ hasDirection: false,
25074
+ hasTextBuild: true
25075
+ },
25076
+ {
25077
+ presetId: "entr.23",
25078
+ label: "Zoom",
25079
+ category: "entrance",
25080
+ defaultDurationMs: 500,
25081
+ hasDirection: true,
25082
+ directions: ["inFromScreenCenter", "inSlightly", "objectCenter"],
25083
+ hasTextBuild: true
25084
+ },
25085
+ {
25086
+ presetId: "entr.14",
25087
+ label: "Bounce",
25088
+ category: "entrance",
25089
+ defaultDurationMs: 1e3,
25090
+ hasDirection: false,
25091
+ hasTextBuild: true
25092
+ },
25093
+ {
25094
+ presetId: "entr.22",
25095
+ label: "Wipe",
25096
+ category: "entrance",
25097
+ defaultDurationMs: 500,
25098
+ hasDirection: true,
25099
+ directions: ["fromBottom", "fromLeft", "fromRight", "fromTop"],
25100
+ hasTextBuild: true
25101
+ },
25102
+ {
25103
+ presetId: "entr.16",
25104
+ label: "Split",
25105
+ category: "entrance",
25106
+ defaultDurationMs: 500,
25107
+ hasDirection: true,
25108
+ directions: ["horizontalIn", "horizontalOut", "verticalIn", "verticalOut"],
25109
+ hasTextBuild: true
25110
+ },
25111
+ {
25112
+ presetId: "entr.9",
25113
+ label: "Dissolve In",
25114
+ category: "entrance",
25115
+ defaultDurationMs: 700,
25116
+ hasDirection: false,
25117
+ hasTextBuild: true
25118
+ },
25119
+ {
25120
+ presetId: "entr.21",
25121
+ label: "Wheel",
25122
+ category: "entrance",
25123
+ defaultDurationMs: 1e3,
25124
+ hasDirection: true,
25125
+ directions: ["1spoke", "2spoke", "3spoke", "4spoke", "8spoke"],
25126
+ hasTextBuild: true
25127
+ },
25128
+ {
25129
+ presetId: "entr.3",
25130
+ label: "Blinds",
25131
+ category: "entrance",
25132
+ defaultDurationMs: 500,
25133
+ hasDirection: true,
25134
+ directions: ["horizontal", "vertical"],
25135
+ hasTextBuild: true
25136
+ },
25137
+ {
25138
+ presetId: "entr.4",
25139
+ label: "Box",
25140
+ category: "entrance",
25141
+ defaultDurationMs: 500,
25142
+ hasDirection: true,
25143
+ directions: ["in", "out"],
25144
+ hasTextBuild: true
25145
+ },
25146
+ {
25147
+ presetId: "entr.12",
25148
+ label: "Float Up",
25149
+ category: "entrance",
25150
+ defaultDurationMs: 500,
25151
+ hasDirection: false,
25152
+ hasTextBuild: true
25153
+ },
25154
+ {
25155
+ presetId: "entr.42",
25156
+ label: "Rise Up",
25157
+ category: "entrance",
25158
+ defaultDurationMs: 500,
25159
+ hasDirection: false,
25160
+ hasTextBuild: true
25161
+ },
25162
+ {
25163
+ presetId: "entr.45",
25164
+ label: "Swivel",
25165
+ category: "entrance",
25166
+ defaultDurationMs: 500,
25167
+ hasDirection: true,
25168
+ directions: ["horizontal", "vertical"],
25169
+ hasTextBuild: true
25170
+ },
25171
+ {
25172
+ presetId: "entr.17",
25173
+ label: "Checkerboard",
25174
+ category: "entrance",
25175
+ defaultDurationMs: 500,
25176
+ hasDirection: true,
25177
+ directions: ["across", "down"],
25178
+ hasTextBuild: true
25179
+ },
25180
+ {
25181
+ presetId: "entr.18",
25182
+ label: "Flash Once",
25183
+ category: "entrance",
25184
+ defaultDurationMs: 300,
25185
+ hasDirection: false,
25186
+ hasTextBuild: false
25187
+ },
25188
+ {
25189
+ presetId: "entr.19",
25190
+ label: "Peek In",
25191
+ category: "entrance",
25192
+ defaultDurationMs: 500,
25193
+ hasDirection: true,
25194
+ directions: ["fromBottom", "fromLeft", "fromRight", "fromTop"],
25195
+ hasTextBuild: true
25196
+ },
25197
+ {
25198
+ presetId: "entr.20",
25199
+ label: "Random Bars",
25200
+ category: "entrance",
25201
+ defaultDurationMs: 500,
25202
+ hasDirection: true,
25203
+ directions: ["horizontal", "vertical"],
25204
+ hasTextBuild: true
25205
+ },
25206
+ {
25207
+ presetId: "entr.49",
25208
+ label: "Expand",
25209
+ category: "entrance",
25210
+ defaultDurationMs: 500,
25211
+ hasDirection: false,
25212
+ hasTextBuild: true
25213
+ }
25214
+ ];
25215
+ var EXIT_PRESETS = [
25216
+ {
25217
+ presetId: "exit.1",
25218
+ label: "Disappear",
25219
+ category: "exit",
25220
+ defaultDurationMs: 0,
25221
+ hasDirection: false,
25222
+ hasTextBuild: true
25223
+ },
25224
+ {
25225
+ presetId: "exit.10",
25226
+ label: "Fade",
25227
+ category: "exit",
25228
+ defaultDurationMs: 500,
25229
+ hasDirection: false,
25230
+ hasTextBuild: true
25231
+ },
25232
+ {
25233
+ presetId: "exit.2",
25234
+ label: "Fly Out",
25235
+ category: "exit",
25236
+ defaultDurationMs: 500,
25237
+ hasDirection: true,
25238
+ directions: ["toBottom", "toLeft", "toRight", "toTop"],
25239
+ hasTextBuild: true
25240
+ },
25241
+ {
25242
+ presetId: "exit.23",
25243
+ label: "Zoom",
25244
+ category: "exit",
25245
+ defaultDurationMs: 500,
25246
+ hasDirection: true,
25247
+ directions: ["outFromScreenCenter", "outSlightly", "objectCenter"],
25248
+ hasTextBuild: true
25249
+ },
25250
+ {
25251
+ presetId: "exit.14",
25252
+ label: "Bounce",
25253
+ category: "exit",
25254
+ defaultDurationMs: 1e3,
25255
+ hasDirection: false,
25256
+ hasTextBuild: true
25257
+ },
25258
+ {
25259
+ presetId: "exit.22",
25260
+ label: "Wipe",
25261
+ category: "exit",
25262
+ defaultDurationMs: 500,
25263
+ hasDirection: true,
25264
+ directions: ["fromBottom", "fromLeft", "fromRight", "fromTop"],
25265
+ hasTextBuild: true
25266
+ },
25267
+ {
25268
+ presetId: "exit.9",
25269
+ label: "Dissolve Out",
25270
+ category: "exit",
25271
+ defaultDurationMs: 700,
25272
+ hasDirection: false,
25273
+ hasTextBuild: true
25274
+ },
25275
+ {
25276
+ presetId: "exit.48",
25277
+ label: "Shrink & Turn",
25278
+ category: "exit",
25279
+ defaultDurationMs: 500,
25280
+ hasDirection: false,
25281
+ hasTextBuild: true
25282
+ }
25283
+ ];
25284
+ var EMPHASIS_PRESETS = [
25285
+ {
25286
+ presetId: "emph.32",
25287
+ label: "Pulse",
25288
+ category: "emphasis",
25289
+ defaultDurationMs: 1e3,
25290
+ hasDirection: false,
25291
+ hasTextBuild: false
25292
+ },
25293
+ {
25294
+ presetId: "emph.8",
25295
+ label: "Spin",
25296
+ category: "emphasis",
25297
+ defaultDurationMs: 1e3,
25298
+ hasDirection: true,
25299
+ directions: ["clockwise", "counterClockwise"],
25300
+ hasTextBuild: false
25301
+ },
25302
+ {
25303
+ presetId: "emph.6",
25304
+ label: "Grow/Shrink",
25305
+ category: "emphasis",
25306
+ defaultDurationMs: 500,
25307
+ hasDirection: false,
25308
+ hasTextBuild: false
25309
+ },
25310
+ {
25311
+ presetId: "emph.35",
25312
+ label: "Teeter",
25313
+ category: "emphasis",
25314
+ defaultDurationMs: 1e3,
25315
+ hasDirection: false,
25316
+ hasTextBuild: false
25317
+ },
25318
+ {
25319
+ presetId: "emph.9",
25320
+ label: "Transparency",
25321
+ category: "emphasis",
25322
+ defaultDurationMs: 500,
25323
+ hasDirection: false,
25324
+ hasTextBuild: false
25325
+ },
25326
+ {
25327
+ presetId: "emph.34",
25328
+ label: "Bold Flash",
25329
+ category: "emphasis",
25330
+ defaultDurationMs: 500,
25331
+ hasDirection: false,
25332
+ hasTextBuild: false
25333
+ },
25334
+ {
25335
+ presetId: "emph.36",
25336
+ label: "Wave",
25337
+ category: "emphasis",
25338
+ defaultDurationMs: 1e3,
25339
+ hasDirection: false,
25340
+ hasTextBuild: false
25341
+ }
25342
+ ];
25343
+ var MOTION_PATH_PRESETS = [
25344
+ {
25345
+ presetId: "path.line.down",
25346
+ label: "Lines: Down",
25347
+ category: "motionPath",
25348
+ defaultDurationMs: 2e3,
25349
+ hasDirection: false,
25350
+ hasTextBuild: false
25351
+ },
25352
+ {
25353
+ presetId: "path.line.left",
25354
+ label: "Lines: Left",
25355
+ category: "motionPath",
25356
+ defaultDurationMs: 2e3,
25357
+ hasDirection: false,
25358
+ hasTextBuild: false
25359
+ },
25360
+ {
25361
+ presetId: "path.line.right",
25362
+ label: "Lines: Right",
25363
+ category: "motionPath",
25364
+ defaultDurationMs: 2e3,
25365
+ hasDirection: false,
25366
+ hasTextBuild: false
25367
+ },
25368
+ {
25369
+ presetId: "path.line.up",
25370
+ label: "Lines: Up",
25371
+ category: "motionPath",
25372
+ defaultDurationMs: 2e3,
25373
+ hasDirection: false,
25374
+ hasTextBuild: false
25375
+ },
25376
+ {
25377
+ presetId: "path.arc.down",
25378
+ label: "Arcs: Down",
25379
+ category: "motionPath",
25380
+ defaultDurationMs: 2e3,
25381
+ hasDirection: false,
25382
+ hasTextBuild: false
25383
+ },
25384
+ {
25385
+ presetId: "path.circle",
25386
+ label: "Shapes: Circle",
25387
+ category: "motionPath",
25388
+ defaultDurationMs: 2e3,
25389
+ hasDirection: false,
25390
+ hasTextBuild: false
25391
+ },
25392
+ {
25393
+ presetId: "path.diamond",
25394
+ label: "Shapes: Diamond",
25395
+ category: "motionPath",
25396
+ defaultDurationMs: 2e3,
25397
+ hasDirection: false,
25398
+ hasTextBuild: false
25399
+ },
25400
+ {
25401
+ presetId: "path.custom",
25402
+ label: "Custom Path",
25403
+ category: "motionPath",
25404
+ defaultDurationMs: 2e3,
25405
+ hasDirection: false,
25406
+ hasTextBuild: false
25407
+ }
25408
+ ];
25409
+ var ALL_ANIMATION_PRESETS = [
25410
+ ...ENTRANCE_PRESETS,
25411
+ ...EXIT_PRESETS,
25412
+ ...EMPHASIS_PRESETS,
25413
+ ...MOTION_PATH_PRESETS
25414
+ ];
25415
+ function getAnimationPresetInfo(presetId) {
25416
+ return ALL_ANIMATION_PRESETS.find((p) => p.presetId === presetId);
25417
+ }
25418
+ function getPresetsByCategory(category) {
25419
+ switch (category) {
25420
+ case "entrance":
25421
+ return ENTRANCE_PRESETS;
25422
+ case "exit":
25423
+ return EXIT_PRESETS;
25424
+ case "emphasis":
25425
+ return EMPHASIS_PRESETS;
25426
+ case "motionPath":
25427
+ return MOTION_PATH_PRESETS;
25428
+ }
25429
+ }
25430
+
25431
+ // src/core/utils/smartart-relayout.ts
25432
+ function relayoutSmartArt(smartArtData, containerWidth, containerHeight) {
25433
+ if (!smartArtData.nodes || smartArtData.nodes.length === 0) {
25434
+ return [];
25435
+ }
25436
+ const bounds = {
25437
+ x: 0,
25438
+ y: 0,
25439
+ width: containerWidth,
25440
+ height: containerHeight
25441
+ };
25442
+ const engineShapes = computeSmartArtLayout(smartArtData, bounds);
25443
+ if (engineShapes && engineShapes.length > 0) {
25444
+ const layoutType = smartArtData.resolvedLayoutType ?? "list";
25445
+ return layoutEngineShapesToDrawingShapes(engineShapes, smartArtData.nodes, layoutType);
25446
+ }
25447
+ return smartArtData.drawingShapes ?? [];
25448
+ }
25449
+
24481
25450
  // src/core/core/runtime/PptxHandlerRuntimeSaveParagraphHelpers.ts
24482
25451
  var EMU_PER_PX5 = 9525;
24483
25452
  function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spacing) {
@@ -24488,12 +25457,6 @@ function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spac
24488
25457
  if (textStyle?.rtl !== void 0) {
24489
25458
  paragraphProps["@_rtl"] = textStyle.rtl ? "1" : "0";
24490
25459
  }
24491
- if (spacing.spacingBefore) {
24492
- paragraphProps["a:spcBef"] = spacing.spacingBefore;
24493
- }
24494
- if (spacing.spacingAfter) {
24495
- paragraphProps["a:spcAft"] = spacing.spacingAfter;
24496
- }
24497
25460
  if (spacing.lineSpacing) {
24498
25461
  paragraphProps["a:lnSpc"] = spacing.lineSpacing;
24499
25462
  } else if (typeof spacing.lineSpacingExactPt === "number" && Number.isFinite(spacing.lineSpacingExactPt)) {
@@ -24503,6 +25466,12 @@ function buildParagraphPropertiesXml(textStyle, paragraphAlign, bulletInfo, spac
24503
25466
  }
24504
25467
  };
24505
25468
  }
25469
+ if (spacing.spacingBefore) {
25470
+ paragraphProps["a:spcBef"] = spacing.spacingBefore;
25471
+ }
25472
+ if (spacing.spacingAfter) {
25473
+ paragraphProps["a:spcAft"] = spacing.spacingAfter;
25474
+ }
24506
25475
  if (typeof textStyle?.paragraphMarginLeft === "number" && Number.isFinite(textStyle.paragraphMarginLeft)) {
24507
25476
  paragraphProps["@_marL"] = String(Math.round(textStyle.paragraphMarginLeft * EMU_PER_PX5));
24508
25477
  }
@@ -24553,9 +25522,10 @@ function applyBulletProperties(paragraphProps, bulletInfo) {
24553
25522
  paragraphProps["a:buNone"] = {};
24554
25523
  return;
24555
25524
  }
24556
- if (bulletInfo.fontFamily) {
24557
- paragraphProps["a:buFont"] = {
24558
- "@_typeface": bulletInfo.fontFamily
25525
+ if (bulletInfo.color) {
25526
+ const colorHex = bulletInfo.color.replace("#", "");
25527
+ paragraphProps["a:buClr"] = {
25528
+ "a:srgbClr": { "@_val": colorHex }
24559
25529
  };
24560
25530
  }
24561
25531
  if (bulletInfo.sizePercent !== void 0) {
@@ -24568,10 +25538,9 @@ function applyBulletProperties(paragraphProps, bulletInfo) {
24568
25538
  "@_val": String(Math.round(bulletInfo.sizePts * 100))
24569
25539
  };
24570
25540
  }
24571
- if (bulletInfo.color) {
24572
- const colorHex = bulletInfo.color.replace("#", "");
24573
- paragraphProps["a:buClr"] = {
24574
- "a:srgbClr": { "@_val": colorHex }
25541
+ if (bulletInfo.fontFamily) {
25542
+ paragraphProps["a:buFont"] = {
25543
+ "@_typeface": bulletInfo.fontFamily
24575
25544
  };
24576
25545
  }
24577
25546
  if (bulletInfo.char) {
@@ -24594,9 +25563,8 @@ function applyBulletProperties(paragraphProps, bulletInfo) {
24594
25563
  }
24595
25564
  function assembleParagraphXml(runs, paragraphProps) {
24596
25565
  const paragraph = {
24597
- "a:endParaRPr": { "@_lang": "en-US" }
25566
+ "a:pPr": paragraphProps
24598
25567
  };
24599
- paragraph["a:pPr"] = paragraphProps;
24600
25568
  const regularRuns = runs.filter((r) => !r.__isField);
24601
25569
  const fieldRuns = runs.filter((r) => r.__isField).map((r) => {
24602
25570
  const { __isField, ...rest } = r;
@@ -24615,6 +25583,7 @@ function assembleParagraphXml(runs, paragraphProps) {
24615
25583
  if (cleanRegularRuns.length === 0 && fieldRuns.length === 0) {
24616
25584
  paragraph["a:r"] = runs.length > 1 ? runs : runs[0];
24617
25585
  }
25586
+ paragraph["a:endParaRPr"] = { "@_lang": "en-US" };
24618
25587
  return paragraph;
24619
25588
  }
24620
25589
  function computeUniformSegmentOverrides(textStyle, textSegments) {
@@ -27453,9 +28422,6 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
27453
28422
  if (style.textCaps && style.textCaps !== "none") {
27454
28423
  runProps["@_cap"] = style.textCaps;
27455
28424
  }
27456
- if (style.rtl !== void 0) {
27457
- runProps["@_rtl"] = style.rtl ? "1" : "0";
27458
- }
27459
28425
  if (style.kumimoji !== void 0) {
27460
28426
  runProps["@_kumimoji"] = style.kumimoji ? "1" : "0";
27461
28427
  }
@@ -27477,17 +28443,19 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
27477
28443
  if (style.bookmark) {
27478
28444
  runProps["@_bmk"] = style.bookmark;
27479
28445
  }
27480
- if (style.fontFamily) {
27481
- runProps["a:latin"] = { "@_typeface": style.fontFamily };
27482
- runProps["a:ea"] = {
27483
- "@_typeface": style.eastAsiaFont || style.fontFamily
27484
- };
27485
- runProps["a:cs"] = {
27486
- "@_typeface": style.complexScriptFont || style.fontFamily
27487
- };
27488
- }
27489
- if (style.symbolFont) {
27490
- runProps["a:sym"] = { "@_typeface": style.symbolFont };
28446
+ if (style.textOutlineWidth || style.textOutlineColor) {
28447
+ const lnObj = {};
28448
+ if (typeof style.textOutlineWidth === "number" && style.textOutlineWidth > 0) {
28449
+ lnObj["@_w"] = String(Math.round(style.textOutlineWidth * _PptxHandlerRuntime.EMU_PER_PX));
28450
+ }
28451
+ if (style.textOutlineColor) {
28452
+ lnObj["a:solidFill"] = {
28453
+ "a:srgbClr": {
28454
+ "@_val": style.textOutlineColor.replace("#", "")
28455
+ }
28456
+ };
28457
+ }
28458
+ runProps["a:ln"] = lnObj;
27491
28459
  }
27492
28460
  if (style.color) {
27493
28461
  runProps["a:solidFill"] = {
@@ -27495,15 +28463,7 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
27495
28463
  "@_val": style.color.replace("#", "")
27496
28464
  }
27497
28465
  };
27498
- }
27499
- if (style.highlightColor) {
27500
- runProps["a:highlight"] = {
27501
- "a:srgbClr": {
27502
- "@_val": style.highlightColor.replace("#", "")
27503
- }
27504
- };
27505
- }
27506
- if (style.textFillGradientStops && style.textFillGradientStops.length > 0) {
28466
+ } else if (style.textFillGradientStops && style.textFillGradientStops.length > 0) {
27507
28467
  const gradStops = style.textFillGradientStops.filter((stop) => Boolean(stop?.color)).map((stop) => {
27508
28468
  const rawPos = (stop.position ?? 0) / 100;
27509
28469
  const posVal = Math.round(Math.max(0, Math.min(1, rawPos)) * 1e5);
@@ -27536,8 +28496,7 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
27536
28496
  }
27537
28497
  runProps["a:gradFill"] = gradFillXml;
27538
28498
  }
27539
- }
27540
- if (style.textFillPattern) {
28499
+ } else if (style.textFillPattern) {
27541
28500
  const pattFill = { "@_prst": style.textFillPattern };
27542
28501
  if (style.textFillPatternForeground) {
27543
28502
  pattFill["a:fgClr"] = {
@@ -27555,6 +28514,17 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
27555
28514
  }
27556
28515
  runProps["a:pattFill"] = pattFill;
27557
28516
  }
28517
+ const textEffectLst = buildTextRunEffectListXml(style);
28518
+ if (textEffectLst) {
28519
+ runProps["a:effectLst"] = textEffectLst;
28520
+ }
28521
+ if (style.highlightColor) {
28522
+ runProps["a:highlight"] = {
28523
+ "a:srgbClr": {
28524
+ "@_val": style.highlightColor.replace("#", "")
28525
+ }
28526
+ };
28527
+ }
27558
28528
  if (style.underline && style.underlineColor) {
27559
28529
  runProps["a:uFill"] = {
27560
28530
  "a:solidFill": {
@@ -27564,23 +28534,17 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime extends PptxHandlerRuntime1
27564
28534
  }
27565
28535
  };
27566
28536
  }
27567
- if (style.textOutlineWidth || style.textOutlineColor) {
27568
- const lnObj = {};
27569
- if (typeof style.textOutlineWidth === "number" && style.textOutlineWidth > 0) {
27570
- lnObj["@_w"] = String(Math.round(style.textOutlineWidth * _PptxHandlerRuntime.EMU_PER_PX));
27571
- }
27572
- if (style.textOutlineColor) {
27573
- lnObj["a:solidFill"] = {
27574
- "a:srgbClr": {
27575
- "@_val": style.textOutlineColor.replace("#", "")
27576
- }
27577
- };
27578
- }
27579
- runProps["a:ln"] = lnObj;
28537
+ if (style.fontFamily) {
28538
+ runProps["a:latin"] = { "@_typeface": style.fontFamily };
28539
+ runProps["a:ea"] = {
28540
+ "@_typeface": style.eastAsiaFont || style.fontFamily
28541
+ };
28542
+ runProps["a:cs"] = {
28543
+ "@_typeface": style.complexScriptFont || style.fontFamily
28544
+ };
27580
28545
  }
27581
- const textEffectLst = buildTextRunEffectListXml(style);
27582
- if (textEffectLst) {
27583
- runProps["a:effectLst"] = textEffectLst;
28546
+ if (style.symbolFont) {
28547
+ runProps["a:sym"] = { "@_typeface": style.symbolFont };
27584
28548
  }
27585
28549
  if (style.hyperlink && resolveHyperlinkRelationshipId) {
27586
28550
  const hyperlinkTarget = String(style.hyperlink).trim();
@@ -30501,32 +31465,58 @@ var PptxHandlerRuntime24 = class _PptxHandlerRuntime extends PptxHandlerRuntime2
30501
31465
  };
30502
31466
  for (const variant of variants) {
30503
31467
  const fontData = variant.rawFontData;
30504
- const guid = variant.fontGuid ?? generateFontGuid();
30505
- const fileName = `{${guid}}.fntdata`;
30506
- const fontPartPath = `ppt/fonts/${fileName}`;
30507
- const relativeTarget = `fonts/${fileName}`;
30508
- const obfuscated = obfuscateFont(fontData, guid);
30509
- this.zip.file(fontPartPath, obfuscated);
31468
+ const hasOriginal = Boolean(variant.originalRId && variant.partPath);
31469
+ const reuseObfuscation = hasOriginal && Boolean(variant.fontGuid);
31470
+ const reuseVerbatim = hasOriginal && !variant.fontGuid && Boolean(variant.originalPartBytes);
31471
+ let guid;
31472
+ let fontPartPath;
31473
+ let relativeTarget;
30510
31474
  let rId;
30511
- const existingRel = relationships.find(
30512
- (r) => String(r?.["@_Target"] || "") === relativeTarget
30513
- );
30514
- if (existingRel) {
30515
- rId = String(existingRel["@_Id"]);
31475
+ let bytesToWrite;
31476
+ let fontKeyForXml;
31477
+ if (reuseObfuscation) {
31478
+ guid = variant.fontGuid;
31479
+ fontPartPath = variant.partPath;
31480
+ relativeTarget = fontPartPath.startsWith("ppt/") ? fontPartPath.substring(4) : fontPartPath;
31481
+ rId = variant.originalRId;
31482
+ bytesToWrite = obfuscateFont(fontData, guid);
31483
+ fontKeyForXml = `{${guid}}`;
31484
+ } else if (reuseVerbatim) {
31485
+ guid = "";
31486
+ fontPartPath = variant.partPath;
31487
+ relativeTarget = fontPartPath.startsWith("ppt/") ? fontPartPath.substring(4) : fontPartPath;
31488
+ rId = variant.originalRId;
31489
+ bytesToWrite = variant.originalPartBytes;
31490
+ fontKeyForXml = void 0;
30516
31491
  } else {
30517
- maxId++;
30518
- rId = `rId${maxId}`;
30519
- relationships.push({
30520
- "@_Id": rId,
30521
- "@_Type": _PptxHandlerRuntime.FONT_REL_TYPE,
30522
- "@_Target": relativeTarget
30523
- });
31492
+ guid = variant.fontGuid ?? generateFontGuid();
31493
+ const fileName = `{${guid}}.fntdata`;
31494
+ fontPartPath = `ppt/fonts/${fileName}`;
31495
+ relativeTarget = `fonts/${fileName}`;
31496
+ bytesToWrite = obfuscateFont(fontData, guid);
31497
+ fontKeyForXml = `{${guid}}`;
31498
+ const existingRel = relationships.find(
31499
+ (r) => String(r?.["@_Target"] || "") === relativeTarget
31500
+ );
31501
+ if (existingRel) {
31502
+ rId = String(existingRel["@_Id"]);
31503
+ } else {
31504
+ maxId++;
31505
+ rId = `rId${maxId}`;
31506
+ relationships.push({
31507
+ "@_Id": rId,
31508
+ "@_Type": _PptxHandlerRuntime.FONT_REL_TYPE,
31509
+ "@_Target": relativeTarget
31510
+ });
31511
+ }
30524
31512
  }
31513
+ this.zip.file(fontPartPath, bytesToWrite);
30525
31514
  const variantKey = variant.bold && variant.italic ? "p:boldItalic" : variant.bold ? "p:bold" : variant.italic ? "p:italic" : "p:regular";
30526
- entry[variantKey] = {
30527
- "@_r:id": rId,
30528
- "@_fontKey": `{${guid}}`
30529
- };
31515
+ const variantEntry = { "@_r:id": rId };
31516
+ if (fontKeyForXml) {
31517
+ variantEntry["@_fontKey"] = fontKeyForXml;
31518
+ }
31519
+ entry[variantKey] = variantEntry;
30530
31520
  }
30531
31521
  embeddedFontEntries.push(entry);
30532
31522
  }
@@ -30670,54 +31660,59 @@ var PptxHandlerRuntime25 = class extends PptxHandlerRuntime24 {
30670
31660
  }
30671
31661
  };
30672
31662
  const root = propsData["p:presentationPr"] || {};
30673
- const showPr = root["p:showPr"] || {};
30674
- delete showPr["p:present"];
30675
- delete showPr["p:browse"];
30676
- delete showPr["p:kiosk"];
30677
- if (properties.showType === "browsed") {
30678
- showPr["p:browse"] = {};
30679
- } else if (properties.showType === "kiosk") {
30680
- const kioskNode = {};
30681
- if (properties.kioskRestartTime !== void 0 && properties.kioskRestartTime > 0) {
30682
- kioskNode["@_restart"] = String(properties.kioskRestartTime);
31663
+ const existingShowPr = root["p:showPr"] || {};
31664
+ const rebuiltShowPr = {};
31665
+ for (const key of Object.keys(existingShowPr)) {
31666
+ if (key.startsWith("@_")) {
31667
+ rebuiltShowPr[key] = existingShowPr[key];
30683
31668
  }
30684
- showPr["p:kiosk"] = kioskNode;
30685
- } else {
30686
- showPr["p:present"] = {};
30687
31669
  }
30688
31670
  if (properties.loopContinuously !== void 0) {
30689
- showPr["@_loop"] = properties.loopContinuously ? "1" : "0";
31671
+ rebuiltShowPr["@_loop"] = properties.loopContinuously ? "1" : "0";
30690
31672
  }
30691
31673
  if (properties.showWithNarration !== void 0) {
30692
- showPr["@_showNarration"] = properties.showWithNarration ? "1" : "0";
31674
+ rebuiltShowPr["@_showNarration"] = properties.showWithNarration ? "1" : "0";
30693
31675
  }
30694
31676
  if (properties.showWithAnimation !== void 0) {
30695
- showPr["@_showAnimation"] = properties.showWithAnimation ? "1" : "0";
31677
+ rebuiltShowPr["@_showAnimation"] = properties.showWithAnimation ? "1" : "0";
30696
31678
  }
30697
31679
  if (properties.advanceMode !== void 0) {
30698
- showPr["@_useTimings"] = properties.advanceMode === "useTimings" ? "1" : "0";
31680
+ rebuiltShowPr["@_useTimings"] = properties.advanceMode === "useTimings" ? "1" : "0";
30699
31681
  }
30700
- if (properties.penColor) {
30701
- showPr["p:penClr"] = {
30702
- "a:srgbClr": { "@_val": properties.penColor.replace("#", "") }
30703
- };
31682
+ if (properties.showType === "browsed") {
31683
+ rebuiltShowPr["p:browse"] = {};
31684
+ } else if (properties.showType === "kiosk") {
31685
+ const kioskNode = {};
31686
+ if (properties.kioskRestartTime !== void 0 && properties.kioskRestartTime > 0) {
31687
+ kioskNode["@_restart"] = String(properties.kioskRestartTime);
31688
+ }
31689
+ rebuiltShowPr["p:kiosk"] = kioskNode;
31690
+ } else {
31691
+ rebuiltShowPr["p:present"] = {};
30704
31692
  }
30705
- delete showPr["p:sldAll"];
30706
- delete showPr["p:sldRg"];
30707
- delete showPr["p:custShow"];
30708
31693
  if (properties.showSlidesMode === "range") {
30709
- showPr["p:sldRg"] = {
31694
+ rebuiltShowPr["p:sldRg"] = {
30710
31695
  "@_st": String(properties.showSlidesFrom ?? 1),
30711
31696
  "@_end": String(properties.showSlidesTo ?? 1)
30712
31697
  };
30713
31698
  } else if (properties.showSlidesMode === "customShow" && properties.showSlidesCustomShowId) {
30714
- showPr["p:custShow"] = {
31699
+ rebuiltShowPr["p:custShow"] = {
30715
31700
  "@_id": properties.showSlidesCustomShowId
30716
31701
  };
30717
31702
  } else {
30718
- showPr["p:sldAll"] = {};
31703
+ rebuiltShowPr["p:sldAll"] = {};
31704
+ }
31705
+ if (properties.penColor) {
31706
+ rebuiltShowPr["p:penClr"] = {
31707
+ "a:srgbClr": { "@_val": properties.penColor.replace("#", "") }
31708
+ };
31709
+ } else if (existingShowPr["p:penClr"] !== void 0) {
31710
+ rebuiltShowPr["p:penClr"] = existingShowPr["p:penClr"];
31711
+ }
31712
+ if (existingShowPr["p:extLst"] !== void 0) {
31713
+ rebuiltShowPr["p:extLst"] = existingShowPr["p:extLst"];
30719
31714
  }
30720
- root["p:showPr"] = showPr;
31715
+ root["p:showPr"] = rebuiltShowPr;
30721
31716
  if (properties.printFrameSlides !== void 0 || properties.printSlidesPerPage !== void 0 || properties.printColorMode !== void 0) {
30722
31717
  const prnPr = root["p:prnPr"] || {};
30723
31718
  if (properties.printFrameSlides !== void 0) {
@@ -31848,7 +32843,12 @@ var PptxHandlerRuntime31 = class extends PptxHandlerRuntime30 {
31848
32843
  shape = this.createPictureXml(el, relationshipId);
31849
32844
  }
31850
32845
  if (targetImagePath) {
31851
- this.zip.file(targetImagePath, parsedImage.bytes);
32846
+ const targetExt = targetImagePath.toLowerCase().match(/\.([^./\\]+)$/)?.[1];
32847
+ const parsedExt = parsedImage.extension.toLowerCase();
32848
+ const extensionMismatch = targetExt !== void 0 && targetExt !== parsedExt && !(targetExt === "jpg" && parsedExt === "jpeg") && !(targetExt === "jpeg" && parsedExt === "jpg");
32849
+ if (!extensionMismatch) {
32850
+ this.zip.file(targetImagePath, parsedImage.bytes);
32851
+ }
31852
32852
  }
31853
32853
  } else {
31854
32854
  this.compatibilityService.reportWarning({
@@ -32253,6 +33253,7 @@ var PptxHandlerRuntime34 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
32253
33253
  );
32254
33254
  } else {
32255
33255
  this.zip.remove("ppt/commentAuthors.xml");
33256
+ await this.stripPresentationCommentAuthorsRelationship();
32256
33257
  }
32257
33258
  const contentTypesXmlAfterComments = await this.zip.file("[Content_Types].xml")?.async("string");
32258
33259
  if (contentTypesXmlAfterComments) {
@@ -32326,8 +33327,39 @@ var PptxHandlerRuntime34 = class _PptxHandlerRuntime extends PptxHandlerRuntime3
32326
33327
  if (effectiveConformance === "strict") {
32327
33328
  await this.convertZipToStrictConformance();
32328
33329
  }
33330
+ for (const name of Object.keys(this.zip.files)) {
33331
+ if (this.zip.files[name].dir) {
33332
+ delete this.zip.files[name];
33333
+ }
33334
+ }
32329
33335
  return await this.zip.generateAsync({ type: "uint8array" });
32330
33336
  }
33337
+ /**
33338
+ * Remove any Relationship in presentation.xml.rels whose Type matches either
33339
+ * the Transitional or Strict commentAuthors relationship URI.
33340
+ */
33341
+ async stripPresentationCommentAuthorsRelationship() {
33342
+ const relsPath = "ppt/_rels/presentation.xml.rels";
33343
+ const relsXml = await this.zip.file(relsPath)?.async("string");
33344
+ if (!relsXml) {
33345
+ return;
33346
+ }
33347
+ const relsData = this.parser.parse(relsXml);
33348
+ const root = relsData["Relationships"];
33349
+ if (!root) {
33350
+ return;
33351
+ }
33352
+ const relationships = this.ensureArray(root["Relationship"]);
33353
+ const filtered = relationships.filter((relationship) => {
33354
+ const type = String(relationship?.["@_Type"] ?? "");
33355
+ return type !== "http://schemas.openxmlformats.org/officeDocument/2006/relationships/commentAuthors" && type !== "http://purl.oclc.org/ooxml/officeDocument/relationships/commentAuthors";
33356
+ });
33357
+ if (filtered.length === relationships.length) {
33358
+ return;
33359
+ }
33360
+ root["Relationship"] = filtered;
33361
+ this.zip.file(relsPath, this.builder.build(relsData));
33362
+ }
32331
33363
  };
32332
33364
 
32333
33365
  // src/core/core/runtime/PptxHandlerRuntimeElementParsing.ts
@@ -34312,7 +35344,7 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
34312
35344
  }
34313
35345
  const shapeStyle = this.extractShapeStyle(effectiveSpPr, styleNode);
34314
35346
  const hasText = text.trim().length > 0;
34315
- const isPlainRect = !prstGeom || prstGeom === "rect";
35347
+ const isPlainRect = (!prstGeom || prstGeom === "rect") && !custGeom;
34316
35348
  const hasVisibleStyle = shapeStyle.fillColor && shapeStyle.fillColor !== "transparent" || (shapeStyle.strokeWidth || 0) > 0;
34317
35349
  let type = "shape";
34318
35350
  if (hasText && isPlainRect && !hasVisibleStyle) {
@@ -34324,6 +35356,7 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
34324
35356
  slideRelationshipMap,
34325
35357
  this.orderedSlidePaths
34326
35358
  );
35359
+ const elementName = cNvPrForActions?.["@_name"] ? String(cNvPrForActions["@_name"]).trim() : void 0;
34327
35360
  const cNvSpPr = shape?.["p:nvSpPr"]?.["p:cNvSpPr"];
34328
35361
  const spLocksNode = cNvSpPr?.["a:spLocks"];
34329
35362
  const slideLocks = this.parseShapeLocks(spLocksNode);
@@ -34334,6 +35367,7 @@ var PptxHandlerRuntime44 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
34334
35367
  const promptText = !hasText && phDefaults?.promptText ? phDefaults.promptText : void 0;
34335
35368
  const commonProps = {
34336
35369
  id,
35370
+ name: elementName || void 0,
34337
35371
  x,
34338
35372
  y,
34339
35373
  width,
@@ -34570,12 +35604,14 @@ var PptxHandlerRuntime45 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
34570
35604
  picSlideRels,
34571
35605
  this.orderedSlidePaths
34572
35606
  );
35607
+ const picElementName = picCNvPr?.["@_name"] ? String(picCNvPr["@_name"]).trim() : void 0;
34573
35608
  const picCNvPicPr = pic?.["p:nvPicPr"]?.["p:cNvPicPr"];
34574
35609
  const picLocks = this.parseShapeLocks(
34575
35610
  picCNvPicPr?.["a:picLocks"] ?? picCNvPicPr?.["a:spLocks"]
34576
35611
  );
34577
35612
  return {
34578
35613
  id,
35614
+ name: picElementName || void 0,
34579
35615
  type: "picture",
34580
35616
  x,
34581
35617
  y,
@@ -35122,9 +36158,11 @@ var PptxHandlerRuntime47 = class _PptxHandlerRuntime extends PptxHandlerRuntime4
35122
36158
  grpSlideRels,
35123
36159
  this.orderedSlidePaths
35124
36160
  );
36161
+ const grpElementName = grpCNvPr?.["@_name"] ? String(grpCNvPr["@_name"]).trim() : void 0;
35125
36162
  const groupElement = {
35126
36163
  type: "group",
35127
36164
  id: baseId,
36165
+ name: grpElementName || void 0,
35128
36166
  x: parentX,
35129
36167
  y: parentY,
35130
36168
  width: parentW || Math.max(...children.map((c) => c.x + c.width)),
@@ -39004,6 +40042,7 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
39004
40042
  if (!fontBinary || fontBinary.length === 0) {
39005
40043
  return null;
39006
40044
  }
40045
+ const originalPartBytes = new Uint8Array(fontBinary);
39007
40046
  let fontData;
39008
40047
  let resolvedGuid;
39009
40048
  if (isEotFormat(fontBinary)) {
@@ -39057,7 +40096,9 @@ var PptxHandlerRuntime71 = class extends PptxHandlerRuntime70 {
39057
40096
  format,
39058
40097
  rawFontData: fontData,
39059
40098
  partPath: fontPath,
39060
- fontGuid: resolvedGuid
40099
+ fontGuid: resolvedGuid,
40100
+ originalRId: rId,
40101
+ originalPartBytes
39061
40102
  };
39062
40103
  } catch {
39063
40104
  return null;
@@ -40668,6 +41709,14 @@ var EXTENDED_SHAPE_DEFINITIONS = [
40668
41709
  { name: "line", label: "Line", category: "other" },
40669
41710
  { name: "lineInv", label: "Line Inverse", category: "other" },
40670
41711
  { name: "straightConnector1", label: "Straight Connector", category: "other" },
41712
+ { name: "bentConnector2", label: "Elbow Connector (L)", category: "other" },
41713
+ { name: "bentConnector3", label: "Elbow Connector (Z)", category: "other" },
41714
+ { name: "bentConnector4", label: "Elbow Connector (3-Segment)", category: "other" },
41715
+ { name: "bentConnector5", label: "Elbow Connector (4-Segment)", category: "other" },
41716
+ { name: "curvedConnector2", label: "Curved Connector (L)", category: "other" },
41717
+ { name: "curvedConnector3", label: "Curved Connector (2-Segment)", category: "other" },
41718
+ { name: "curvedConnector4", label: "Curved Connector (3-Segment)", category: "other" },
41719
+ { name: "curvedConnector5", label: "Curved Connector (4-Segment)", category: "other" },
40671
41720
  // ── Arrows ────────────────────────────────────────────────────────────
40672
41721
  { name: "rightArrow", label: "Right Arrow", category: "arrows" },
40673
41722
  { name: "leftArrow", label: "Left Arrow", category: "arrows" },
@@ -49425,4 +50474,4 @@ var SvgExporter = class _SvgExporter {
49425
50474
  }
49426
50475
  };
49427
50476
 
49428
- export { 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_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, 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, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MIN_ELEMENT_SIZE, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, 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_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime75 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, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, combineShapes, 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, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, extractAllTagText, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, 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, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, mailMerge, mergePresentation, mergeShapes, mergeThemeColorOverride, mm, moveSlidesToSection, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, ooxmlArcToSvg, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseChart3DSurfaces, parseChartAxes, parseCondition, parseConditionList, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, 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, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveModel3DMimeType, resolveReferenceUriToPart, rgbToHsl, selectAlternateContentBranch, 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 };
50477
+ export { ALL_ANIMATION_PRESETS, 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_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, 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, MIN_ELEMENT_SIZE, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, 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_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime75 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, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyDrawingColorTransforms, applyKinsokuToXml, applyTemplate, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, 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, 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, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, extractAllTagText, extractFirstTagText, extractGuidFromPartName, extractModel3DTransform, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, 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, isZoomElement, isZoomElement2 as isZoomElementUtil, layoutEngineShapesToDrawingShapes, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, ooxmlArcToSvg, 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, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, 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 };