pptx-react-viewer 1.25.3 → 1.25.5

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 (97) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{Model3DScene-IQLE5JLL.mjs → Model3DScene-XVYOISVJ.mjs} +2 -2
  3. package/dist/Model3DScene-XVYOISVJ.mjs.br +0 -0
  4. package/dist/Model3DScene-XVYOISVJ.mjs.gz +0 -0
  5. package/dist/{Model3DScene-F2GUSTZI.js → Model3DScene-Y5ABLO7K.js} +3 -3
  6. package/dist/Model3DScene-Y5ABLO7K.js.br +0 -0
  7. package/dist/Model3DScene-Y5ABLO7K.js.gz +0 -0
  8. package/dist/{SurfaceChart3DScene-JG26PJ7O.mjs → SurfaceChart3DScene-RXZADECL.mjs} +2 -2
  9. package/dist/SurfaceChart3DScene-RXZADECL.mjs.br +0 -0
  10. package/dist/SurfaceChart3DScene-RXZADECL.mjs.gz +0 -0
  11. package/dist/{SurfaceChart3DScene-4OMD7LWR.js → SurfaceChart3DScene-WMY5JTW4.js} +3 -3
  12. package/dist/{SurfaceChart3DScene-4OMD7LWR.js.br → SurfaceChart3DScene-WMY5JTW4.js.br} +0 -0
  13. package/dist/SurfaceChart3DScene-WMY5JTW4.js.gz +0 -0
  14. package/dist/{chunk-5G3SPYQE.js → chunk-7CSBUYRN.js} +849 -808
  15. package/dist/chunk-7CSBUYRN.js.br +0 -0
  16. package/dist/chunk-7CSBUYRN.js.gz +0 -0
  17. package/dist/{chunk-ZUJHFLOR.js → chunk-E55Q4AC7.js} +556 -476
  18. package/dist/chunk-E55Q4AC7.js.br +0 -0
  19. package/dist/chunk-E55Q4AC7.js.gz +0 -0
  20. package/dist/{chunk-NYBERTS7.mjs → chunk-F4WPQRZU.mjs} +96 -16
  21. package/dist/chunk-F4WPQRZU.mjs.br +0 -0
  22. package/dist/chunk-F4WPQRZU.mjs.gz +0 -0
  23. package/dist/{chunk-DAI4KM5W.mjs → chunk-FOMF7POV.mjs} +2285 -490
  24. package/dist/chunk-FOMF7POV.mjs.br +0 -0
  25. package/dist/chunk-FOMF7POV.mjs.gz +0 -0
  26. package/dist/{chunk-DVM75RMN.mjs → chunk-FVQDRA5N.mjs} +1100 -126
  27. package/dist/chunk-FVQDRA5N.mjs.br +0 -0
  28. package/dist/chunk-FVQDRA5N.mjs.gz +0 -0
  29. package/dist/{chunk-2V6BD4JQ.js → chunk-IPYAN574.js} +2288 -490
  30. package/dist/chunk-IPYAN574.js.br +0 -0
  31. package/dist/chunk-IPYAN574.js.gz +0 -0
  32. package/dist/{chunk-GNXWU7UG.mjs → chunk-L4ZADJOM.mjs} +48 -7
  33. package/dist/chunk-L4ZADJOM.mjs.br +0 -0
  34. package/dist/chunk-L4ZADJOM.mjs.gz +0 -0
  35. package/dist/{chunk-UXVFNGJH.js → chunk-TEN35NUX.js} +1133 -159
  36. package/dist/chunk-TEN35NUX.js.br +0 -0
  37. package/dist/chunk-TEN35NUX.js.gz +0 -0
  38. package/dist/{dist-ZA77P2O5.js → dist-755SJ3ZH.js} +574 -562
  39. package/dist/dist-755SJ3ZH.js.br +0 -0
  40. package/dist/dist-755SJ3ZH.js.gz +0 -0
  41. package/dist/dist-FFWP5NQZ.mjs +2 -0
  42. package/dist/dist-FFWP5NQZ.mjs.br +0 -0
  43. package/dist/dist-FFWP5NQZ.mjs.gz +0 -0
  44. package/dist/hooks-unstable.d.ts +350 -5
  45. package/dist/hooks-unstable.d.ts.map +1 -1
  46. package/dist/hooks-unstable.js +78 -78
  47. package/dist/hooks-unstable.js.br +0 -0
  48. package/dist/hooks-unstable.js.gz +0 -0
  49. package/dist/hooks-unstable.mjs +3 -3
  50. package/dist/hooks-unstable.mjs.br +0 -0
  51. package/dist/hooks-unstable.mjs.gz +0 -0
  52. package/dist/{index-DWvM1PBB.d.ts → index-J6IuHQ2_.d.ts} +21 -4
  53. package/dist/index-J6IuHQ2_.d.ts.map +1 -0
  54. package/dist/index.d.ts +330 -2
  55. package/dist/index.js +33 -33
  56. package/dist/index.js.br +0 -0
  57. package/dist/index.js.gz +0 -0
  58. package/dist/index.mjs +4 -4
  59. package/dist/index.mjs.br +0 -0
  60. package/dist/index.mjs.gz +0 -0
  61. package/dist/viewer/index.d.ts +330 -2
  62. package/dist/viewer/index.js +20 -20
  63. package/dist/viewer/index.js.br +0 -0
  64. package/dist/viewer/index.js.gz +0 -0
  65. package/dist/viewer/index.mjs +4 -4
  66. package/dist/viewer/index.mjs.br +0 -0
  67. package/dist/viewer/index.mjs.gz +0 -0
  68. package/package.json +1 -1
  69. package/dist/Model3DScene-F2GUSTZI.js.br +0 -0
  70. package/dist/Model3DScene-F2GUSTZI.js.gz +0 -0
  71. package/dist/Model3DScene-IQLE5JLL.mjs.br +0 -0
  72. package/dist/Model3DScene-IQLE5JLL.mjs.gz +0 -0
  73. package/dist/SurfaceChart3DScene-4OMD7LWR.js.gz +0 -0
  74. package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.br +0 -0
  75. package/dist/SurfaceChart3DScene-JG26PJ7O.mjs.gz +0 -0
  76. package/dist/chunk-2V6BD4JQ.js.br +0 -0
  77. package/dist/chunk-2V6BD4JQ.js.gz +0 -0
  78. package/dist/chunk-5G3SPYQE.js.br +0 -0
  79. package/dist/chunk-5G3SPYQE.js.gz +0 -0
  80. package/dist/chunk-DAI4KM5W.mjs.br +0 -0
  81. package/dist/chunk-DAI4KM5W.mjs.gz +0 -0
  82. package/dist/chunk-DVM75RMN.mjs.br +0 -0
  83. package/dist/chunk-DVM75RMN.mjs.gz +0 -0
  84. package/dist/chunk-GNXWU7UG.mjs.br +0 -0
  85. package/dist/chunk-GNXWU7UG.mjs.gz +0 -0
  86. package/dist/chunk-NYBERTS7.mjs.br +0 -0
  87. package/dist/chunk-NYBERTS7.mjs.gz +0 -0
  88. package/dist/chunk-UXVFNGJH.js.br +0 -0
  89. package/dist/chunk-UXVFNGJH.js.gz +0 -0
  90. package/dist/chunk-ZUJHFLOR.js.br +0 -0
  91. package/dist/chunk-ZUJHFLOR.js.gz +0 -0
  92. package/dist/dist-E3IHM3OU.mjs +0 -2
  93. package/dist/dist-E3IHM3OU.mjs.br +0 -0
  94. package/dist/dist-E3IHM3OU.mjs.gz +0 -0
  95. package/dist/dist-ZA77P2O5.js.br +0 -0
  96. package/dist/dist-ZA77P2O5.js.gz +0 -0
  97. package/dist/index-DWvM1PBB.d.ts.map +0 -1
@@ -1628,8 +1628,8 @@ function decompressEotFont(fontData, compressed, encrypted) {
1628
1628
 
1629
1629
  // ../../node_modules/.bun/emf-converter@1.6.0/node_modules/emf-converter/dist/index.mjs
1630
1630
  function colorRefToHex(r, g, b) {
1631
- const toHex3 = (v) => v.toString(16).padStart(2, "0");
1632
- return `#${toHex3(r & 255)}${toHex3(g & 255)}${toHex3(b & 255)}`;
1631
+ const toHex4 = (v) => v.toString(16).padStart(2, "0");
1632
+ return `#${toHex4(r & 255)}${toHex4(g & 255)}${toHex4(b & 255)}`;
1633
1633
  }
1634
1634
  function readColorRef(view, offset) {
1635
1635
  const r = view.getUint8(offset);
@@ -1665,8 +1665,8 @@ function invertCssColor(color2) {
1665
1665
  const shortHex = /^#([0-9a-f]{3})$/i.exec(color2);
1666
1666
  if (shortHex) {
1667
1667
  const [r, g, b] = shortHex[1].split("").map((c) => parseInt(c + c, 16));
1668
- const toHex3 = (v) => (255 - v).toString(16).padStart(2, "0");
1669
- return `#${toHex3(r)}${toHex3(g)}${toHex3(b)}`;
1668
+ const toHex4 = (v) => (255 - v).toString(16).padStart(2, "0");
1669
+ return `#${toHex4(r)}${toHex4(g)}${toHex4(b)}`;
1670
1670
  }
1671
1671
  const rgba = /^rgba?\(\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*([\d.]+)\s*)?\)$/i.exec(color2);
1672
1672
  if (rgba) {
@@ -9171,6 +9171,7 @@ var TextShapeXmlFactory = class {
9171
9171
  createXmlElement(init) {
9172
9172
  const { element } = init;
9173
9173
  const isText = element.type === "text";
9174
+ const isTextBox = element.locks?.txBox ?? isText;
9174
9175
  const name = isText ? "TextBox" : "Rectangle";
9175
9176
  const geometry = this.context.normalizePresetGeometry(element.shapeType);
9176
9177
  const adjustmentEntries = Object.entries(element.shapeAdjustments || {}).filter(
@@ -9190,7 +9191,7 @@ var TextShapeXmlFactory = class {
9190
9191
  "@_name": `${name} ${elementId}`
9191
9192
  },
9192
9193
  "p:cNvSpPr": {
9193
- "@_txBox": isText ? "1" : "0"
9194
+ "@_txBox": isTextBox ? "1" : "0"
9194
9195
  },
9195
9196
  "p:nvPr": {}
9196
9197
  },
@@ -9804,6 +9805,21 @@ function cloneXmlObject(value) {
9804
9805
  }
9805
9806
  }
9806
9807
  var SECTION_EXTENSION_URI = "{521415D9-36F7-43E2-AB2F-B90AF26B5E84}";
9808
+ function remapReferenceList(references, mapping, removed) {
9809
+ const result = [];
9810
+ for (const reference of references) {
9811
+ const mapped = mapping.get(reference);
9812
+ if (mapped !== void 0) {
9813
+ result.push(mapped);
9814
+ continue;
9815
+ }
9816
+ if (removed.has(reference)) {
9817
+ continue;
9818
+ }
9819
+ result.push(reference);
9820
+ }
9821
+ return result;
9822
+ }
9807
9823
  function localName4(key) {
9808
9824
  return key.split(":").pop() ?? key;
9809
9825
  }
@@ -9870,7 +9886,7 @@ function updateCustomShow(show, existing) {
9870
9886
  replaceChildren(node, "sldLst", slideList, "p:sldLst");
9871
9887
  return node;
9872
9888
  }
9873
- function applyCustomShows(presentation, shows, lookup) {
9889
+ function applyCustomShows(presentation, shows, lookup, remap) {
9874
9890
  if (shows === void 0) {
9875
9891
  return;
9876
9892
  }
@@ -9884,14 +9900,18 @@ function applyCustomShows(presentation, shows, lookup) {
9884
9900
  const oldList = key ? presentation[key] : void 0;
9885
9901
  const list = cloneXmlObject(oldList) ?? {};
9886
9902
  const oldShows = lookup.getChildrenArrayByLocalName(oldList, "custShow");
9887
- const updated = shows.map(
9888
- (show) => updateCustomShow(
9889
- show,
9903
+ const updated = shows.map((show) => {
9904
+ const effective = remap && remap.changed ? {
9905
+ ...show,
9906
+ slideRIds: remapReferenceList(show.slideRIds, remap.rIdByOldRId, remap.removedRIds)
9907
+ } : show;
9908
+ return updateCustomShow(
9909
+ effective,
9890
9910
  oldShows.find(
9891
9911
  (node) => String(node[attributeKey(node, "id") ?? ""]) === show.id || String(node[attributeKey(node, "name") ?? ""]) === show.name
9892
9912
  )
9893
- )
9894
- );
9913
+ );
9914
+ });
9895
9915
  replaceChildren(list, "custShow", updated, "p:custShow");
9896
9916
  presentation[key ?? "p:custShowLst"] = list;
9897
9917
  }
@@ -9940,7 +9960,7 @@ function updateSection(section) {
9940
9960
  }
9941
9961
  return node;
9942
9962
  }
9943
- function applySections(presentation, sections, lookup) {
9963
+ function applySections(presentation, sections, lookup, remap) {
9944
9964
  if (sections === void 0) {
9945
9965
  return;
9946
9966
  }
@@ -9962,7 +9982,15 @@ function applySections(presentation, sections, lookup) {
9962
9982
  location = { parent: ext, key: "p14:sectionLst", list: ext["p14:sectionLst"] };
9963
9983
  }
9964
9984
  const list = cloneXmlObject(location.list) ?? {};
9965
- replaceChildren(list, "section", sections.map(updateSection), "p14:section");
9985
+ const effectiveSections = remap && remap.changed ? sections.map((section) => ({
9986
+ ...section,
9987
+ slideIds: remapReferenceList(
9988
+ section.slideIds,
9989
+ remap.sldIdByOldSldId,
9990
+ remap.removedSldIds
9991
+ )
9992
+ })) : sections;
9993
+ replaceChildren(list, "section", effectiveSections.map(updateSection), "p14:section");
9966
9994
  location.parent[location.key] = list;
9967
9995
  }
9968
9996
  var PptxPresentationSaveBuilder = class {
@@ -9981,8 +10009,18 @@ var PptxPresentationSaveBuilder = class {
9981
10009
  init.rawSlideHeightEmu,
9982
10010
  init.rawSlideSizeType
9983
10011
  );
9984
- applyCustomShows(presentation, init.options?.customShows, init.xmlLookupService);
9985
- applySections(presentation, init.options?.sections, init.xmlLookupService);
10012
+ applyCustomShows(
10013
+ presentation,
10014
+ init.options?.customShows,
10015
+ init.xmlLookupService,
10016
+ init.slideReferenceRemap
10017
+ );
10018
+ applySections(
10019
+ presentation,
10020
+ init.options?.sections,
10021
+ init.xmlLookupService,
10022
+ init.slideReferenceRemap
10023
+ );
9986
10024
  this.applyPhotoAlbum(presentation, init.options?.photoAlbum);
9987
10025
  presentation = this.applyKinsoku(presentation, init.options?.kinsoku);
9988
10026
  this.applyModifyVerifier(presentation, init.options?.modifyVerifier);
@@ -10076,6 +10114,51 @@ var PptxPresentationSaveBuilder = class {
10076
10114
  presentation["p:modifyVerifier"] = mv;
10077
10115
  }
10078
10116
  };
10117
+ function buildSlideReferenceRemap(init) {
10118
+ const pathToNewRId = /* @__PURE__ */ new Map();
10119
+ for (const slide of init.slides) {
10120
+ pathToNewRId.set(slide.id, slide.rId);
10121
+ }
10122
+ const newRIdToNumeric = /* @__PURE__ */ new Map();
10123
+ for (const entry of init.rebuiltSlideIds) {
10124
+ const relationshipId2 = String(entry?.["@_r:id"] ?? "");
10125
+ const numericSlideId = String(entry?.["@_id"] ?? "");
10126
+ if (relationshipId2.length > 0 && numericSlideId.length > 0) {
10127
+ newRIdToNumeric.set(relationshipId2, numericSlideId);
10128
+ }
10129
+ }
10130
+ const rIdByOldRId = /* @__PURE__ */ new Map();
10131
+ const removedRIds = /* @__PURE__ */ new Set();
10132
+ let changed = false;
10133
+ for (const [oldRId, path] of init.originalRIdToPath.entries()) {
10134
+ const newRId = pathToNewRId.get(path);
10135
+ if (newRId === void 0) {
10136
+ removedRIds.add(oldRId);
10137
+ changed = true;
10138
+ continue;
10139
+ }
10140
+ rIdByOldRId.set(oldRId, newRId);
10141
+ if (newRId !== oldRId) {
10142
+ changed = true;
10143
+ }
10144
+ }
10145
+ const sldIdByOldSldId = /* @__PURE__ */ new Map();
10146
+ const removedSldIds = /* @__PURE__ */ new Set();
10147
+ for (const [oldSldId, path] of init.originalSldIdToPath.entries()) {
10148
+ const newRId = pathToNewRId.get(path);
10149
+ const newSldId = newRId === void 0 ? void 0 : newRIdToNumeric.get(newRId);
10150
+ if (newSldId === void 0) {
10151
+ removedSldIds.add(oldSldId);
10152
+ changed = true;
10153
+ continue;
10154
+ }
10155
+ sldIdByOldSldId.set(oldSldId, newSldId);
10156
+ if (newSldId !== oldSldId) {
10157
+ changed = true;
10158
+ }
10159
+ }
10160
+ return { rIdByOldRId, sldIdByOldSldId, removedRIds, removedSldIds, changed };
10161
+ }
10079
10162
  var PptxPresentationSlidesReconciler = class {
10080
10163
  async reconcile(input) {
10081
10164
  const presentationRelsXml2 = await input.zip.file("ppt/_rels/presentation.xml.rels")?.async("string");
@@ -10120,6 +10203,10 @@ var PptxPresentationSlidesReconciler = class {
10120
10203
  const existingSlideIds = slideIdList ? this.ensureArray(slideIdList["p:sldId"]) : [];
10121
10204
  const slideIdByRid = /* @__PURE__ */ new Map();
10122
10205
  let maxNumericSlideId = 255;
10206
+ const originalRIdToPath = /* @__PURE__ */ new Map();
10207
+ for (const [relationshipId2, target] of slideTargetByRid.entries()) {
10208
+ originalRIdToPath.set(relationshipId2, input.toSlidePathFromTarget(target));
10209
+ }
10123
10210
  for (const slideIdEntry of existingSlideIds) {
10124
10211
  const relationshipId2 = slideIdEntry?.["@_r:id"];
10125
10212
  if (typeof relationshipId2 === "string" && relationshipId2.length > 0) {
@@ -10130,6 +10217,15 @@ var PptxPresentationSlidesReconciler = class {
10130
10217
  maxNumericSlideId = Math.max(maxNumericSlideId, numericSlideId);
10131
10218
  }
10132
10219
  }
10220
+ const originalSldIdToPath = /* @__PURE__ */ new Map();
10221
+ for (const slideIdEntry of existingSlideIds) {
10222
+ const relationshipId2 = String(slideIdEntry?.["@_r:id"] ?? "");
10223
+ const numericSlideId = String(slideIdEntry?.["@_id"] ?? "");
10224
+ const slidePath = originalRIdToPath.get(relationshipId2);
10225
+ if (numericSlideId.length > 0 && slidePath !== void 0) {
10226
+ originalSldIdToPath.set(numericSlideId, slidePath);
10227
+ }
10228
+ }
10133
10229
  for (let index = 0; index < input.slides.length; index++) {
10134
10230
  const slide = input.slides[index];
10135
10231
  slide.slideNumber = index + 1;
@@ -10166,6 +10262,7 @@ var PptxPresentationSlidesReconciler = class {
10166
10262
  ];
10167
10263
  presentationRelsData["Relationships"] = relRoot;
10168
10264
  input.zip.file("ppt/_rels/presentation.xml.rels", input.xmlBuilder.build(presentationRelsData));
10265
+ const rebuiltSlideIds = [];
10169
10266
  if (presentation && slideIdList && input.presentationData) {
10170
10267
  slideIdList["p:sldId"] = input.slides.map((slide) => {
10171
10268
  const existing = slideIdByRid.get(slide.rId);
@@ -10178,11 +10275,18 @@ var PptxPresentationSlidesReconciler = class {
10178
10275
  "@_r:id": slide.rId
10179
10276
  };
10180
10277
  });
10278
+ rebuiltSlideIds.push(...slideIdList["p:sldId"]);
10181
10279
  input.presentationData["p:presentation"] = this.insertSlideIdListInOrder(
10182
10280
  presentation,
10183
10281
  slideIdList
10184
10282
  );
10185
10283
  }
10284
+ return buildSlideReferenceRemap({
10285
+ slides: input.slides,
10286
+ originalRIdToPath,
10287
+ originalSldIdToPath,
10288
+ rebuiltSlideIds
10289
+ });
10186
10290
  }
10187
10291
  /**
10188
10292
  * Return a new presentation XML object whose `p:sldIdLst` child sits in the
@@ -10830,7 +10934,7 @@ var SHAPE_STYLE_ORDER = [
10830
10934
  "a:fontRef"
10831
10935
  ];
10832
10936
  var PptxSlideBackgroundBuilder = class {
10833
- applyBackground(init) {
10937
+ async applyBackground(init) {
10834
10938
  const hasBackgroundColor = typeof init.slide.backgroundColor === "string" && init.slide.backgroundColor.length > 0 && init.slide.backgroundColor !== "transparent";
10835
10939
  const rawBackgroundImage = typeof init.slide.backgroundImage === "string" ? init.slide.backgroundImage : "";
10836
10940
  const hasBackgroundImage = rawBackgroundImage.length > 0;
@@ -10851,8 +10955,8 @@ var PptxSlideBackgroundBuilder = class {
10851
10955
  return;
10852
10956
  }
10853
10957
  const backgroundProperties = {};
10854
- if (hasDataUrlBackgroundImage) {
10855
- const parsedBackgroundImage = init.parseDataUrlToBytes(rawBackgroundImage);
10958
+ if (hasBackgroundImage) {
10959
+ const parsedBackgroundImage = await init.resolveImageToBytes(rawBackgroundImage);
10856
10960
  if (parsedBackgroundImage) {
10857
10961
  const backgroundImagePath = init.saveState.nextMediaPath(parsedBackgroundImage.extension);
10858
10962
  init.zip.file(backgroundImagePath, parsedBackgroundImage.bytes);
@@ -10870,8 +10974,11 @@ var PptxSlideBackgroundBuilder = class {
10870
10974
  },
10871
10975
  BLIP_FILL_ORDER
10872
10976
  );
10977
+ } else {
10978
+ init.reportUnsupportedBackground?.(rawBackgroundImage);
10873
10979
  }
10874
- } else if (hasBackgroundColor && init.slide.backgroundColor) {
10980
+ }
10981
+ if (backgroundProperties["a:blipFill"] === void 0 && hasBackgroundColor && init.slide.backgroundColor) {
10875
10982
  backgroundProperties["a:solidFill"] = {
10876
10983
  "a:srgbClr": {
10877
10984
  "@_val": init.slide.backgroundColor.replace("#", "").toUpperCase()
@@ -10888,6 +10995,11 @@ var PptxSlideBackgroundBuilder = class {
10888
10995
  backgroundProperties["@_shadeToTitle"] = "0";
10889
10996
  }
10890
10997
  if (!hasFillChild) {
10998
+ if (existingBg !== void 0) {
10999
+ this.reorderCSldBgFirst(cSld, existingBg);
11000
+ init.slideNode["p:cSld"] = cSld;
11001
+ return;
11002
+ }
10891
11003
  delete cSld["p:bg"];
10892
11004
  init.slideNode["p:cSld"] = cSld;
10893
11005
  return;
@@ -10959,6 +11071,11 @@ function parseDrawingPercent(value) {
10959
11071
  }
10960
11072
  return clampUnitInterval(parsed / 1e5);
10961
11073
  }
11074
+ function scrgbLinearToSrgb8(linear) {
11075
+ const l = Math.min(1, Math.max(0, linear));
11076
+ const companded = l <= 31308e-7 ? 12.92 * l : 1.055 * l ** (1 / 2.4) - 0.055;
11077
+ return Math.min(255, Math.max(0, Math.round(companded * 255)));
11078
+ }
10962
11079
  function toHex(value) {
10963
11080
  return Math.min(255, Math.max(0, Math.round(value))).toString(16).padStart(2, "0").toUpperCase();
10964
11081
  }
@@ -11504,11 +11621,15 @@ var PptxColorTransformCodec = class {
11504
11621
  }
11505
11622
  if (colorChoice["a:scrgbClr"]) {
11506
11623
  const scrgb = colorChoice["a:scrgbClr"];
11507
- const red = this.percentAttrToUnit(scrgb["@_r"]);
11508
- const green = this.percentAttrToUnit(scrgb["@_g"]);
11509
- const blue = this.percentAttrToUnit(scrgb["@_b"]);
11624
+ const red = parseDrawingFraction(scrgb["@_r"]);
11625
+ const green = parseDrawingFraction(scrgb["@_g"]);
11626
+ const blue = parseDrawingFraction(scrgb["@_b"]);
11510
11627
  if (red !== void 0 && green !== void 0 && blue !== void 0) {
11511
- const base = this.rgbToHex(red * 255, green * 255, blue * 255);
11628
+ const base = this.rgbToHex(
11629
+ scrgbLinearToSrgb8(red),
11630
+ scrgbLinearToSrgb8(green),
11631
+ scrgbLinearToSrgb8(blue)
11632
+ );
11512
11633
  return this.applyColorTransforms(base, scrgb);
11513
11634
  }
11514
11635
  }
@@ -11599,8 +11720,8 @@ var PptxColorTransformCodec = class {
11599
11720
  };
11600
11721
  }
11601
11722
  rgbToHex(r, g, b) {
11602
- const toHex3 = (channelValue) => this.clampColorChannel(channelValue).toString(16).padStart(2, "0").toUpperCase();
11603
- return `#${toHex3(r)}${toHex3(g)}${toHex3(b)}`;
11723
+ const toHex4 = (channelValue) => this.clampColorChannel(channelValue).toString(16).padStart(2, "0").toUpperCase();
11724
+ return `#${toHex4(r)}${toHex4(g)}${toHex4(b)}`;
11604
11725
  }
11605
11726
  applyColorTransforms(baseColor, colorNode) {
11606
11727
  return applyDrawingColorTransforms(baseColor, colorNode);
@@ -11684,6 +11805,22 @@ function mergeDrawingFillXml(original, generated, modeledChildren, childOrder2)
11684
11805
  }
11685
11806
  return result;
11686
11807
  }
11808
+ function extractGradientTileRect(gradFill) {
11809
+ const tileRect = drawingChild(gradFill, "tileRect");
11810
+ if (!tileRect) {
11811
+ return void 0;
11812
+ }
11813
+ const toFraction = (raw) => {
11814
+ const parsed = Number.parseInt(String(raw ?? "0"), 10);
11815
+ return Number.isFinite(parsed) ? parsed / 1e5 : 0;
11816
+ };
11817
+ return {
11818
+ l: toFraction(tileRect["@_l"]),
11819
+ t: toFraction(tileRect["@_t"]),
11820
+ r: toFraction(tileRect["@_r"]),
11821
+ b: toFraction(tileRect["@_b"])
11822
+ };
11823
+ }
11687
11824
  var PptxGradientStyleCodec = class {
11688
11825
  context;
11689
11826
  constructor(context) {
@@ -11794,6 +11931,9 @@ var PptxGradientStyleCodec = class {
11794
11931
  b: Number.isFinite(b) ? this.context.clampUnitInterval(b / 1e5) : 0
11795
11932
  };
11796
11933
  }
11934
+ extractGradientTileRect(gradFill) {
11935
+ return extractGradientTileRect(gradFill);
11936
+ }
11797
11937
  extractGradientFlip(gradFill) {
11798
11938
  const flipRaw = String(gradFill["@_flip"] || "").trim().toLowerCase();
11799
11939
  if (flipRaw === "x" || flipRaw === "y" || flipRaw === "xy" || flipRaw === "none") {
@@ -11965,6 +12105,15 @@ var PptxGradientStyleCodec = class {
11965
12105
  }
11966
12106
  gradientXml["a:lin"] = linNode;
11967
12107
  }
12108
+ if (shapeStyle.fillGradientTileRect) {
12109
+ const tr = shapeStyle.fillGradientTileRect;
12110
+ gradientXml["a:tileRect"] = {
12111
+ "@_l": String(Math.round(tr.l * 1e5)),
12112
+ "@_t": String(Math.round(tr.t * 1e5)),
12113
+ "@_r": String(Math.round(tr.r * 1e5)),
12114
+ "@_b": String(Math.round(tr.b * 1e5))
12115
+ };
12116
+ }
11968
12117
  return mergeDrawingFillXml(
11969
12118
  shapeStyle.fillGradientXml,
11970
12119
  gradientXml,
@@ -13470,7 +13619,7 @@ var PptxColorStyleCodec = class {
13470
13619
  const alphaMod = this.percentAttrToUnit(
13471
13620
  choiceNode["a:alphaMod"]?.["@_val"]
13472
13621
  );
13473
- const alphaOff = this.percentAttrToUnit(
13622
+ const alphaOff = this.signedPercentToUnit(
13474
13623
  choiceNode["a:alphaOff"]?.["@_val"]
13475
13624
  );
13476
13625
  if (alpha === void 0 && alphaMod === void 0 && alphaOff === void 0) {
@@ -13485,6 +13634,18 @@ var PptxColorStyleCodec = class {
13485
13634
  }
13486
13635
  return this.clampUnitInterval(opacity2);
13487
13636
  }
13637
+ /**
13638
+ * Parse an OOXML percentage (thousandths, `100000` = 100%) into a fraction
13639
+ * WITHOUT clamping to [0, 1]. Used for additive offsets like `a:alphaOff`
13640
+ * that legitimately carry negative values.
13641
+ */
13642
+ signedPercentToUnit(value) {
13643
+ const parsed = Number.parseFloat(String(value ?? "").trim());
13644
+ if (!Number.isFinite(parsed)) {
13645
+ return void 0;
13646
+ }
13647
+ return parsed / 1e5;
13648
+ }
13488
13649
  colorWithOpacity(color2, opacity2) {
13489
13650
  if (opacity2 === void 0) {
13490
13651
  return color2;
@@ -13591,26 +13752,49 @@ function applyScene3dStyle(shapeProps, style) {
13591
13752
  const camera = scene3dNode["a:camera"];
13592
13753
  const lightRig = scene3dNode["a:lightRig"];
13593
13754
  const cameraRot = camera?.["a:rot"];
13755
+ const lightRigRot = lightRig?.["a:rot"];
13594
13756
  style.scene3d = {
13595
13757
  cameraPreset: String(camera?.["@_prst"] || "").trim() || void 0,
13596
- cameraRotX: cameraRot?.["@_lat"] !== void 0 ? parseInt(String(cameraRot["@_lat"]), 10) : void 0,
13597
- cameraRotY: cameraRot?.["@_lon"] !== void 0 ? parseInt(String(cameraRot["@_lon"]), 10) : void 0,
13598
- cameraRotZ: cameraRot?.["@_rev"] !== void 0 ? parseInt(String(cameraRot["@_rev"]), 10) : void 0,
13758
+ cameraFieldOfView: intAttr(camera?.["@_fov"]),
13759
+ cameraZoom: floatAttr(camera?.["@_zoom"]),
13760
+ cameraRotX: intAttr(cameraRot?.["@_lat"]),
13761
+ cameraRotY: intAttr(cameraRot?.["@_lon"]),
13762
+ cameraRotZ: intAttr(cameraRot?.["@_rev"]),
13599
13763
  lightRigType: String(lightRig?.["@_rig"] || "").trim() || void 0,
13600
- lightRigDirection: String(lightRig?.["@_dir"] || "").trim() || void 0
13764
+ lightRigDirection: String(lightRig?.["@_dir"] || "").trim() || void 0,
13765
+ lightRigRotX: intAttr(lightRigRot?.["@_lat"]),
13766
+ lightRigRotY: intAttr(lightRigRot?.["@_lon"]),
13767
+ lightRigRotZ: intAttr(lightRigRot?.["@_rev"])
13601
13768
  };
13602
13769
  const backdrop = scene3dNode["a:backdrop"];
13603
13770
  if (backdrop) {
13604
13771
  style.scene3d.hasBackdrop = true;
13605
13772
  const anchor = backdrop["a:anchor"];
13606
- const anchorAttrs = anchor;
13607
- if (anchorAttrs) {
13608
- style.scene3d.backdropAnchorX = parseInt(String(anchorAttrs["@_x"] || "0"), 10);
13609
- style.scene3d.backdropAnchorY = parseInt(String(anchorAttrs["@_y"] || "0"), 10);
13610
- style.scene3d.backdropAnchorZ = parseInt(String(anchorAttrs["@_z"] || "0"), 10);
13773
+ if (anchor) {
13774
+ style.scene3d.backdropAnchorX = intAttr(anchor["@_x"]) ?? 0;
13775
+ style.scene3d.backdropAnchorY = intAttr(anchor["@_y"]) ?? 0;
13776
+ style.scene3d.backdropAnchorZ = intAttr(anchor["@_z"]) ?? 0;
13777
+ }
13778
+ const norm = backdrop["a:norm"];
13779
+ if (norm) {
13780
+ style.scene3d.backdropNormalX = intAttr(norm["@_dx"]) ?? 0;
13781
+ style.scene3d.backdropNormalY = intAttr(norm["@_dy"]) ?? 0;
13782
+ style.scene3d.backdropNormalZ = intAttr(norm["@_dz"]) ?? 0;
13783
+ }
13784
+ const up = backdrop["a:up"];
13785
+ if (up) {
13786
+ style.scene3d.backdropUpX = intAttr(up["@_dx"]) ?? 0;
13787
+ style.scene3d.backdropUpY = intAttr(up["@_dy"]) ?? 0;
13788
+ style.scene3d.backdropUpZ = intAttr(up["@_dz"]) ?? 0;
13611
13789
  }
13612
13790
  }
13613
13791
  }
13792
+ function intAttr(value) {
13793
+ return value !== void 0 ? parseInt(String(value), 10) : void 0;
13794
+ }
13795
+ function floatAttr(value) {
13796
+ return value !== void 0 ? parseFloat(String(value)) : void 0;
13797
+ }
13614
13798
  function applyShape3dStyle(shapeProps, style, context) {
13615
13799
  const shape3dNode = shapeProps["a:sp3d"];
13616
13800
  if (!shape3dNode) {
@@ -13641,10 +13825,12 @@ function applyLineProperties(lineNode, shapeProps, style, context, resolveHidden
13641
13825
  }
13642
13826
  const hiddenLineFill = hiddenLineProps["a:solidFill"];
13643
13827
  if (hiddenLineFill) {
13828
+ style.strokeFillMode = "solid";
13644
13829
  style.strokeColor = context.parseColor(hiddenLineFill);
13645
13830
  style.strokeOpacity = context.extractColorOpacity(hiddenLineFill);
13646
13831
  }
13647
13832
  } else {
13833
+ style.strokeFillMode = "none";
13648
13834
  style.strokeWidth = 0;
13649
13835
  style.strokeColor = "transparent";
13650
13836
  }
@@ -13662,6 +13848,7 @@ function applyLineProperties(lineNode, shapeProps, style, context, resolveHidden
13662
13848
  }
13663
13849
  function applyStrokeColor(lineNode, style, context) {
13664
13850
  if (lineNode["a:solidFill"]) {
13851
+ style.strokeFillMode = "solid";
13665
13852
  const lineFill = lineNode["a:solidFill"];
13666
13853
  style.strokeColor = context.parseColor(lineFill);
13667
13854
  style.strokeOpacity = context.extractColorOpacity(lineFill);
@@ -13670,10 +13857,15 @@ function applyStrokeColor(lineNode, style, context) {
13670
13857
  style.strokeColorXml = strokeColorXml;
13671
13858
  }
13672
13859
  } else if (lineNode["a:gradFill"]) {
13673
- style.strokeColor = context.extractGradientFillColor(lineNode["a:gradFill"]);
13674
- style.strokeOpacity = context.extractGradientOpacity(lineNode["a:gradFill"]);
13860
+ style.strokeFillMode = "gradient";
13861
+ const lineGradFill = lineNode["a:gradFill"];
13862
+ style.strokeGradientXml = lineGradFill;
13863
+ style.strokeColor = context.extractGradientFillColor(lineGradFill);
13864
+ style.strokeOpacity = context.extractGradientOpacity(lineGradFill);
13675
13865
  } else if (lineNode["a:pattFill"]) {
13866
+ style.strokeFillMode = "pattern";
13676
13867
  const linePatternFill = lineNode["a:pattFill"];
13868
+ style.strokePatternXml = linePatternFill;
13677
13869
  style.strokeColor = context.parseColor(linePatternFill["a:fgClr"]) || context.parseColor(linePatternFill["a:bgClr"]);
13678
13870
  style.strokeOpacity = context.extractColorOpacity(linePatternFill["a:fgClr"]) || context.extractColorOpacity(linePatternFill["a:bgClr"]);
13679
13871
  }
@@ -13800,6 +13992,10 @@ var PptxShapeStyleExtractor = class {
13800
13992
  style.fillGradientPathType = this.context.extractGradientPathType(gradFill);
13801
13993
  style.fillGradientFocalPoint = this.context.extractGradientFocalPoint(gradFill);
13802
13994
  style.fillGradientFillToRect = this.context.extractGradientFillToRect(gradFill);
13995
+ const gradTileRect = extractGradientTileRect(gradFill);
13996
+ if (gradTileRect) {
13997
+ style.fillGradientTileRect = gradTileRect;
13998
+ }
13803
13999
  const gradFlip = this.context.extractGradientFlip(gradFill);
13804
14000
  if (gradFlip) {
13805
14001
  style.fillGradientFlip = gradFlip;
@@ -14480,7 +14676,7 @@ var MEDIA_REFERENCE_NAMES = [
14480
14676
  "videoFile",
14481
14677
  "quickTimeFile"
14482
14678
  ];
14483
- function parseDrawingMediaReference(container) {
14679
+ function parseDrawingMediaReference(container, externalRelIds) {
14484
14680
  if (!container) {
14485
14681
  return void 0;
14486
14682
  }
@@ -14489,11 +14685,17 @@ function parseDrawingMediaReference(container) {
14489
14685
  if (!node) {
14490
14686
  continue;
14491
14687
  }
14688
+ const linkId = String(attribute2(node, "link") ?? "").trim() || void 0;
14689
+ const embedId = String(attribute2(node, "embed") ?? "").trim() || void 0;
14492
14690
  return {
14493
14691
  kind,
14494
14692
  mediaType: kind === "videoFile" || kind === "quickTimeFile" ? "video" : "audio",
14495
- relationshipId: String(attribute2(node, "link") ?? attribute2(node, "embed") ?? "").trim() || void 0,
14496
- isLinked: attribute2(node, "link") !== void 0,
14693
+ relationshipId: linkId ?? embedId,
14694
+ // Embedded media legitimately uses r:link pointing at an INTERNAL
14695
+ // media part, so link presence alone does not imply a linked clip.
14696
+ // It is only truly linked when the referenced relationship is
14697
+ // external (TargetMode="External"), mirroring the OLE parser.
14698
+ isLinked: linkId !== void 0 && externalRelIds?.has(linkId) === true,
14497
14699
  name: kind === "wavAudioFile" ? String(attribute2(node, "name") ?? "") || void 0 : void 0,
14498
14700
  contentType: kind === "audioFile" ? String(attribute2(node, "contentType") ?? "") || void 0 : void 0,
14499
14701
  audioCdStart: kind === "audioCd" ? parseAudioCdPosition(child2(node, "st")) : void 0,
@@ -14622,7 +14824,10 @@ var PptxMediaDataParser = class {
14622
14824
  parseMediaData(graphicData, slidePath) {
14623
14825
  const result = {};
14624
14826
  try {
14625
- const reference = parseDrawingMediaReference(graphicData);
14827
+ const reference = parseDrawingMediaReference(
14828
+ graphicData,
14829
+ this.context.externalRelsMap.get(slidePath)
14830
+ );
14626
14831
  if (reference) {
14627
14832
  result.mediaType = reference.mediaType;
14628
14833
  result.mediaReferenceKind = reference.kind;
@@ -15225,6 +15430,7 @@ var PptxLoadDataBuilder = class {
15225
15430
  layoutOptions = [];
15226
15431
  headerFooter;
15227
15432
  presentationProperties;
15433
+ viewProperties;
15228
15434
  customShows;
15229
15435
  sections;
15230
15436
  warnings = [];
@@ -15284,6 +15490,10 @@ var PptxLoadDataBuilder = class {
15284
15490
  this.presentationProperties = presentationProperties;
15285
15491
  return this;
15286
15492
  }
15493
+ withViewProperties(viewProperties) {
15494
+ this.viewProperties = viewProperties;
15495
+ return this;
15496
+ }
15287
15497
  withCustomShows(customShows) {
15288
15498
  this.customShows = customShows;
15289
15499
  return this;
@@ -15421,6 +15631,7 @@ var PptxLoadDataBuilder = class {
15421
15631
  layoutOptions: this.layoutOptions,
15422
15632
  headerFooter: this.headerFooter,
15423
15633
  presentationProperties: this.presentationProperties,
15634
+ viewProperties: this.viewProperties,
15424
15635
  customShows: this.customShows,
15425
15636
  sections: this.sections,
15426
15637
  warnings: this.warnings,
@@ -15795,7 +16006,7 @@ var PptxSlideCommentsXmlFactory = class {
15795
16006
  const createdAtIso = this.resolveCreatedAt(comment.createdAt);
15796
16007
  const x = init.saveState.toEmu(comment.x, 0);
15797
16008
  const y = init.saveState.toEmu(comment.y, 0);
15798
- return {
16009
+ const node = {
15799
16010
  ...withoutChildrenByLocalName(comment.rawXml ?? {}, /* @__PURE__ */ new Set(["pos", "text"])),
15800
16011
  "@_authorId": authorId,
15801
16012
  "@_dt": createdAtIso,
@@ -15806,6 +16017,28 @@ var PptxSlideCommentsXmlFactory = class {
15806
16017
  },
15807
16018
  "p:text": String(comment.text || "")
15808
16019
  };
16020
+ this.applyResolvedState(node, comment);
16021
+ return node;
16022
+ }
16023
+ /**
16024
+ * Reflect the (possibly edited) `resolved` flag onto the legacy comment
16025
+ * node. PowerPoint's legacy comment schema has no standard resolved marker,
16026
+ * but the parser reads a non-standard `@_done` / `@_resolved` attribute, so
16027
+ * we re-emit the current state rather than leaving the stale value carried
16028
+ * over from `rawXml`. The original attribute name is preserved when present.
16029
+ */
16030
+ applyResolvedState(node, comment) {
16031
+ const raw = comment.rawXml;
16032
+ const hadResolvedAttr = raw?.["@_resolved"] !== void 0;
16033
+ const hadDoneAttr = raw?.["@_done"] !== void 0;
16034
+ const key = hadResolvedAttr && !hadDoneAttr ? "@_resolved" : "@_done";
16035
+ delete node["@_done"];
16036
+ delete node["@_resolved"];
16037
+ if (comment.resolved === true) {
16038
+ node[key] = "1";
16039
+ } else if (hadResolvedAttr || hadDoneAttr) {
16040
+ node[key] = "0";
16041
+ }
15809
16042
  }
15810
16043
  resolveCreatedAt(createdAt) {
15811
16044
  const candidate = String(createdAt || "").trim();
@@ -17089,6 +17322,220 @@ var PptxCompatibilityService = class {
17089
17322
  ].join("|");
17090
17323
  }
17091
17324
  };
17325
+ var ATTR_PREFIX = "@_";
17326
+ var TEXT_KEY = "#text";
17327
+ function isXmlObject(value) {
17328
+ return typeof value === "object" && value !== null && !Array.isArray(value);
17329
+ }
17330
+ function coerceString(value) {
17331
+ if (typeof value === "string") {
17332
+ return value;
17333
+ }
17334
+ if (typeof value === "number" || typeof value === "boolean") {
17335
+ return String(value);
17336
+ }
17337
+ return void 0;
17338
+ }
17339
+ function xmlChild(node, key) {
17340
+ if (!isXmlObject(node)) {
17341
+ return void 0;
17342
+ }
17343
+ const value = node[key];
17344
+ if (Array.isArray(value)) {
17345
+ const first = value[0];
17346
+ return isXmlObject(first) ? first : void 0;
17347
+ }
17348
+ return isXmlObject(value) ? value : void 0;
17349
+ }
17350
+ function xmlChildren(node, key) {
17351
+ if (!isXmlObject(node)) {
17352
+ return [];
17353
+ }
17354
+ const value = node[key];
17355
+ if (value === void 0 || value === null) {
17356
+ return [];
17357
+ }
17358
+ if (Array.isArray(value)) {
17359
+ return value.filter(isXmlObject);
17360
+ }
17361
+ return isXmlObject(value) ? [value] : [];
17362
+ }
17363
+ function xmlHasChild(node, key) {
17364
+ return isXmlObject(node) && Object.hasOwn(node, key);
17365
+ }
17366
+ function xmlAttr(node, name) {
17367
+ if (!isXmlObject(node)) {
17368
+ return void 0;
17369
+ }
17370
+ return coerceString(node[ATTR_PREFIX + name]);
17371
+ }
17372
+ function xmlAttrNumber(node, name) {
17373
+ const raw = xmlAttr(node, name);
17374
+ if (raw === void 0) {
17375
+ return void 0;
17376
+ }
17377
+ const parsed = Number(raw);
17378
+ return Number.isFinite(parsed) ? parsed : void 0;
17379
+ }
17380
+ function xmlAttrBool(node, name) {
17381
+ const raw = xmlAttr(node, name);
17382
+ if (raw === void 0) {
17383
+ return void 0;
17384
+ }
17385
+ const normalized = raw.trim().toLowerCase();
17386
+ if (normalized === "1" || normalized === "true") {
17387
+ return true;
17388
+ }
17389
+ if (normalized === "0" || normalized === "false") {
17390
+ return false;
17391
+ }
17392
+ return void 0;
17393
+ }
17394
+ function xmlText(node) {
17395
+ if (typeof node === "string") {
17396
+ return node;
17397
+ }
17398
+ if (!isXmlObject(node)) {
17399
+ return void 0;
17400
+ }
17401
+ return coerceString(node[TEXT_KEY]);
17402
+ }
17403
+ function xmlPath(node, ...keys) {
17404
+ let current = isXmlObject(node) ? node : void 0;
17405
+ for (const key of keys) {
17406
+ if (!current) {
17407
+ return void 0;
17408
+ }
17409
+ current = xmlChild(current, key);
17410
+ }
17411
+ return current;
17412
+ }
17413
+ function isXmlNode(value) {
17414
+ return isXmlObject(value);
17415
+ }
17416
+ var SLIDE_TITLES_NAME = "Slide Titles";
17417
+ function coerceText(value) {
17418
+ if (typeof value === "string") {
17419
+ return value;
17420
+ }
17421
+ if (typeof value === "number" || typeof value === "boolean") {
17422
+ return String(value);
17423
+ }
17424
+ if (isXmlNode(value)) {
17425
+ const text2 = value["#text"];
17426
+ return text2 === void 0 || text2 === null ? "" : String(text2);
17427
+ }
17428
+ return "";
17429
+ }
17430
+ function coerceCount(value) {
17431
+ const parsed = Number.parseInt(coerceText(value), 10);
17432
+ return Number.isFinite(parsed) && parsed > 0 ? parsed : 0;
17433
+ }
17434
+ function readLpstrList(vector) {
17435
+ if (!vector) {
17436
+ return [];
17437
+ }
17438
+ const raw = vector["vt:lpstr"];
17439
+ if (raw === void 0 || raw === null) {
17440
+ return [];
17441
+ }
17442
+ return (Array.isArray(raw) ? raw : [raw]).map(coerceText);
17443
+ }
17444
+ function isSlideTitlesCategory(name) {
17445
+ const normalized = name.trim().toLowerCase();
17446
+ return normalized === "slide titles" || normalized.includes("slide") && normalized.includes("title");
17447
+ }
17448
+ function readCategories(headingPairs, titlesOfParts) {
17449
+ const variants = xmlChildren(xmlChild(headingPairs, "vt:vector"), "vt:variant");
17450
+ const entries = readLpstrList(xmlChild(titlesOfParts, "vt:vector"));
17451
+ const categories = [];
17452
+ let offset = 0;
17453
+ for (let i = 0; i + 1 < variants.length; i += 2) {
17454
+ const name = coerceText(variants[i]["vt:lpstr"]);
17455
+ const count = coerceCount(variants[i + 1]["vt:i4"]);
17456
+ categories.push({ name, entries: entries.slice(offset, offset + count) });
17457
+ offset += count;
17458
+ }
17459
+ return categories;
17460
+ }
17461
+ function writeHeadingPairs(appProps, categories) {
17462
+ const variants = [];
17463
+ for (const category of categories) {
17464
+ variants.push({ "vt:lpstr": category.name });
17465
+ variants.push({ "vt:i4": String(category.entries.length) });
17466
+ }
17467
+ appProps["HeadingPairs"] = {
17468
+ "vt:vector": {
17469
+ "@_size": String(variants.length),
17470
+ "@_baseType": "variant",
17471
+ "vt:variant": variants
17472
+ }
17473
+ };
17474
+ }
17475
+ function writeTitlesOfParts(appProps, categories) {
17476
+ const allEntries = categories.flatMap((category) => category.entries);
17477
+ const lpstr = allEntries.map((entry) => ({ "#text": entry }));
17478
+ appProps["TitlesOfParts"] = {
17479
+ "vt:vector": {
17480
+ "@_size": String(allEntries.length),
17481
+ "@_baseType": "lpstr",
17482
+ "vt:lpstr": lpstr
17483
+ }
17484
+ };
17485
+ }
17486
+ function applySlideTitlesToAppProps(appProps, titles) {
17487
+ const headingPairs = xmlChild(appProps, "HeadingPairs");
17488
+ if (!headingPairs) {
17489
+ return;
17490
+ }
17491
+ const titlesOfParts = xmlChild(appProps, "TitlesOfParts");
17492
+ const categories = readCategories(headingPairs, titlesOfParts);
17493
+ const slideCategory = categories.find((category) => isSlideTitlesCategory(category.name));
17494
+ if (slideCategory) {
17495
+ slideCategory.entries = titles;
17496
+ } else {
17497
+ categories.push({ name: SLIDE_TITLES_NAME, entries: titles });
17498
+ }
17499
+ writeHeadingPairs(appProps, categories);
17500
+ writeTitlesOfParts(appProps, categories);
17501
+ }
17502
+ var TITLE_PLACEHOLDER_TYPES = /* @__PURE__ */ new Set(["title", "ctrtitle"]);
17503
+ function getElementPlaceholderType(element) {
17504
+ const explicit = element.placeholderType;
17505
+ if (typeof explicit === "string" && explicit.trim().length > 0) {
17506
+ return explicit.trim().toLowerCase();
17507
+ }
17508
+ const ph = xmlPath(element.rawXml, "p:nvSpPr", "p:nvPr", "p:ph");
17509
+ const type = xmlAttr(ph, "type");
17510
+ return type ? type.trim().toLowerCase() : void 0;
17511
+ }
17512
+ function getElementPlainText(element) {
17513
+ const maybe = element;
17514
+ if (typeof maybe.text === "string" && maybe.text.trim().length > 0) {
17515
+ return maybe.text.trim();
17516
+ }
17517
+ if (Array.isArray(maybe.textSegments)) {
17518
+ const joined = maybe.textSegments.map((segment) => typeof segment?.text === "string" ? segment.text : "").join("");
17519
+ return joined.trim();
17520
+ }
17521
+ return "";
17522
+ }
17523
+ function deriveSlideTitle(slide) {
17524
+ const elements2 = slide.elements ?? [];
17525
+ for (const element of elements2) {
17526
+ const phType = getElementPlaceholderType(element);
17527
+ if (phType && TITLE_PLACEHOLDER_TYPES.has(phType)) {
17528
+ const text2 = getElementPlainText(element);
17529
+ if (text2) {
17530
+ return text2;
17531
+ }
17532
+ }
17533
+ }
17534
+ return "";
17535
+ }
17536
+ function deriveSlideTitles(slides) {
17537
+ return slides.map((slide) => deriveSlideTitle(slide));
17538
+ }
17092
17539
  var PptxDocumentPropertiesUpdater = class {
17093
17540
  context;
17094
17541
  constructor(context) {
@@ -17151,6 +17598,7 @@ var PptxDocumentPropertiesUpdater = class {
17151
17598
  appProps["Slides"] = String(slides.length);
17152
17599
  appProps["HiddenSlides"] = String(hiddenSlidesCount);
17153
17600
  appProps["Notes"] = String(notesCount);
17601
+ this.updateSlideTitleProperties(appProps, slides);
17154
17602
  appData["Properties"] = appProps;
17155
17603
  this.context.zip.file("docProps/app.xml", this.context.builder.build(appData));
17156
17604
  } catch (error) {
@@ -17193,6 +17641,15 @@ var PptxDocumentPropertiesUpdater = class {
17193
17641
  }
17194
17642
  }
17195
17643
  }
17644
+ /**
17645
+ * Recompute `TitlesOfParts` / `HeadingPairs` from the current slide set so
17646
+ * the per-slide title list in `app.xml` stays consistent after slides are
17647
+ * added, removed, or retitled. Delegates the vector rebuild to a pure
17648
+ * helper; here we only derive the ordered titles.
17649
+ */
17650
+ updateSlideTitleProperties(appProps, slides) {
17651
+ applySlideTitlesToAppProps(appProps, deriveSlideTitles(slides));
17652
+ }
17196
17653
  applyAppPropertiesOverrides(appProps, overrides10) {
17197
17654
  if (!overrides10) {
17198
17655
  return;
@@ -18999,6 +19456,16 @@ function extractChildKeyframes(childTnList) {
18999
19456
  }
19000
19457
  return void 0;
19001
19458
  }
19459
+ function parseTimingPercentFraction(raw) {
19460
+ if (raw === void 0 || raw === null) {
19461
+ return void 0;
19462
+ }
19463
+ const parsed = Number.parseInt(String(raw), 10);
19464
+ if (!Number.isFinite(parsed) || parsed <= 0) {
19465
+ return void 0;
19466
+ }
19467
+ return Math.min(1, parsed / 1e5);
19468
+ }
19002
19469
  function extractRepeatInfo(cTn) {
19003
19470
  let repeatCount;
19004
19471
  let autoReverse;
@@ -19142,11 +19609,11 @@ function ensureArray4(value) {
19142
19609
  return [];
19143
19610
  }
19144
19611
  if (!Array.isArray(value)) {
19145
- return isXmlObject(value) ? [value] : [];
19612
+ return isXmlObject2(value) ? [value] : [];
19146
19613
  }
19147
- return value.filter((entry) => isXmlObject(entry));
19614
+ return value.filter((entry) => isXmlObject2(entry));
19148
19615
  }
19149
- function isXmlObject(value) {
19616
+ function isXmlObject2(value) {
19150
19617
  return typeof value === "object" && value !== null && !Array.isArray(value);
19151
19618
  }
19152
19619
  var VALID_CONDITION_EVENTS = /* @__PURE__ */ new Set([
@@ -19507,8 +19974,11 @@ var PptxNativeAnimationService = class {
19507
19974
  const nodeType = String(cTn["@_nodeType"] || "");
19508
19975
  const presetClass = cTn["@_presetClass"];
19509
19976
  const presetId = cTn["@_presetID"] ? Number.parseInt(String(cTn["@_presetID"]), 10) : void 0;
19977
+ const presetSubtype = cTn["@_presetSubtype"] !== void 0 ? Number.parseInt(String(cTn["@_presetSubtype"]), 10) : void 0;
19510
19978
  const durationMs = cTn["@_dur"] ? Number.parseInt(String(cTn["@_dur"]), 10) : void 0;
19511
19979
  const delayMs = cTn["@_delay"] ? Number.parseInt(String(cTn["@_delay"]), 10) : void 0;
19980
+ const accel = parseTimingPercentFraction(cTn["@_accel"]);
19981
+ const decel = parseTimingPercentFraction(cTn["@_decel"]);
19512
19982
  let trigger = currentTrigger;
19513
19983
  if (nodeType === "afterPrevious" || nodeType === "afterPrev") {
19514
19984
  trigger = "afterPrevious";
@@ -19558,8 +20028,11 @@ var PptxNativeAnimationService = class {
19558
20028
  trigger,
19559
20029
  presetClass: validPresetClass,
19560
20030
  presetId,
20031
+ presetSubtype,
19561
20032
  durationMs,
19562
20033
  delayMs,
20034
+ accel,
20035
+ decel,
19563
20036
  triggerDelayMs: trigger === "afterDelay" ? delayMs : void 0,
19564
20037
  motionPath: childMotion.motionPath,
19565
20038
  motionOrigin: childMotion.motionOrigin,
@@ -19865,6 +20338,72 @@ function buildP14ExtLst(transitionType, direction, orient, pattern, rawExtLst, x
19865
20338
  }
19866
20339
  return { "p:ext": transitionExt };
19867
20340
  }
20341
+ var P15_TRANSITION_PRESETS = /* @__PURE__ */ new Set([
20342
+ "fallOver",
20343
+ "drape",
20344
+ "curtains",
20345
+ "wind",
20346
+ "prestige",
20347
+ "fracture",
20348
+ "crush",
20349
+ "peelOff",
20350
+ "pageCurlDouble",
20351
+ "pageCurlSingle",
20352
+ "airplane",
20353
+ "origami"
20354
+ ]);
20355
+ var PRSTTRANS_EXT_URI = "{D42A27DB-BD31-4B8C-83A1-F6EECF244321}";
20356
+ function optionalBoolean(value) {
20357
+ const valueToken = value === void 0 || value === null ? "" : String(value).trim().toLowerCase();
20358
+ if (valueToken === "1" || valueToken === "true") {
20359
+ return true;
20360
+ }
20361
+ if (valueToken === "0" || valueToken === "false") {
20362
+ return false;
20363
+ }
20364
+ return void 0;
20365
+ }
20366
+ function parseP15FromExtLst(extLstNode, xmlLookupService, getXmlLocalName) {
20367
+ const extEntries = xmlLookupService.getChildrenArrayByLocalName(extLstNode, "ext");
20368
+ for (const ext of extEntries) {
20369
+ if (!ext) {
20370
+ continue;
20371
+ }
20372
+ for (const [key, value] of Object.entries(ext)) {
20373
+ if (key.startsWith("@_")) {
20374
+ continue;
20375
+ }
20376
+ if (getXmlLocalName(key) !== "prstTrans") {
20377
+ continue;
20378
+ }
20379
+ if (!value || typeof value !== "object" || Array.isArray(value)) {
20380
+ continue;
20381
+ }
20382
+ const detail = value;
20383
+ const prst = String(detail["@_prst"] || "").trim();
20384
+ if (!P15_TRANSITION_PRESETS.has(prst)) {
20385
+ continue;
20386
+ }
20387
+ return {
20388
+ type: prst,
20389
+ invX: optionalBoolean(detail["@_invX"]),
20390
+ invY: optionalBoolean(detail["@_invY"])
20391
+ };
20392
+ }
20393
+ }
20394
+ return void 0;
20395
+ }
20396
+ function buildP15ExtLst(transitionType, invX, invY) {
20397
+ const prstTrans = {
20398
+ "@_xmlns:p15": "http://schemas.microsoft.com/office/powerpoint/2012/main",
20399
+ "@_prst": transitionType
20400
+ };
20401
+ const ext = {
20402
+ "@_uri": PRSTTRANS_EXT_URI,
20403
+ "p15:prstTrans": prstTrans
20404
+ };
20405
+ return { "p:ext": ext };
20406
+ }
19868
20407
  var STANDARD_TRANSITION_TYPES = /* @__PURE__ */ new Set([
19869
20408
  "fade",
19870
20409
  "push",
@@ -19929,7 +20468,7 @@ function parseTransitionDetails(node, localName22) {
19929
20468
  if (pattern) {
19930
20469
  result.pattern = pattern;
19931
20470
  }
19932
- const thruBlk = optionalBoolean(detail["@_thruBlk"]);
20471
+ const thruBlk = optionalBoolean2(detail["@_thruBlk"]);
19933
20472
  if (thruBlk !== void 0) {
19934
20473
  result.thruBlk = thruBlk;
19935
20474
  }
@@ -19940,7 +20479,7 @@ function parseTransitionAttributes(node) {
19940
20479
  const speedToken = token(node["@_spd"]);
19941
20480
  const speed = SPEEDS.has(speedToken) ? speedToken : void 0;
19942
20481
  const durationMs = unsignedInteger2(node["@_dur"] ?? node["@_p14:dur"], 1);
19943
- const advanceOnClick = optionalBoolean(node["@_advClick"]);
20482
+ const advanceOnClick = optionalBoolean2(node["@_advClick"]);
19944
20483
  const advanceAfterMs = unsignedInteger2(node["@_advTm"]);
19945
20484
  return { speed, durationMs, advanceOnClick, advanceAfterMs };
19946
20485
  }
@@ -19954,7 +20493,7 @@ function parseTransitionSound(raw, lookup, localName22) {
19954
20493
  return {
19955
20494
  soundRId: sound ? attributeByLocalName(sound, "embed", localName22) : void 0,
19956
20495
  soundName: sound ? attributeByLocalName(sound, "name", localName22) : void 0,
19957
- soundLoop: optionalBoolean(start["@_loop"])
20496
+ soundLoop: optionalBoolean2(start["@_loop"])
19958
20497
  };
19959
20498
  }
19960
20499
  const stopSound = Object.keys(raw).some(
@@ -20063,7 +20602,7 @@ function attributeByLocalName(node, name, localName22) {
20063
20602
  function token(value) {
20064
20603
  return value === void 0 || value === null ? "" : String(value).trim();
20065
20604
  }
20066
- function optionalBoolean(value) {
20605
+ function optionalBoolean2(value) {
20067
20606
  const valueToken = token(value).toLowerCase();
20068
20607
  if (!valueToken) {
20069
20608
  return void 0;
@@ -20107,6 +20646,7 @@ var PptxSlideTransitionService = class {
20107
20646
  const { spokes, thruBlk, rawSoundAction, rawExtLst } = details;
20108
20647
  if (rawExtLst && transitionType === "cut") {
20109
20648
  const p14Result = parseP14FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
20649
+ const p15Result = p14Result ? void 0 : parseP15FromExtLst(rawExtLst, this.xmlLookupService, this.getXmlLocalName);
20110
20650
  if (p14Result) {
20111
20651
  transitionType = p14Result.type;
20112
20652
  if (p14Result.direction) {
@@ -20118,6 +20658,8 @@ var PptxSlideTransitionService = class {
20118
20658
  if (p14Result.pattern) {
20119
20659
  pattern = p14Result.pattern;
20120
20660
  }
20661
+ } else if (p15Result) {
20662
+ transitionType = p15Result.type;
20121
20663
  } else if (this.parseMorphFromExtLst(rawExtLst)) {
20122
20664
  transitionType = "morph";
20123
20665
  }
@@ -20199,6 +20741,7 @@ var PptxSlideTransitionService = class {
20199
20741
  }
20200
20742
  const transitionType = transition.type || "cut";
20201
20743
  const isP14Type = P14_TRANSITION_TYPES.has(transitionType);
20744
+ const isP15Type = P15_TRANSITION_PRESETS.has(transitionType);
20202
20745
  const isMorphType = transitionType === "morph";
20203
20746
  const node = createPreservedTransitionNode(transition.rawTransition, this.getXmlLocalName);
20204
20747
  if (isP14Type) {
@@ -20211,6 +20754,8 @@ var PptxSlideTransitionService = class {
20211
20754
  this.xmlLookupService,
20212
20755
  this.getXmlLocalName
20213
20756
  );
20757
+ } else if (isP15Type) {
20758
+ node["p:extLst"] = transition.rawExtLst ?? buildP15ExtLst(transitionType);
20214
20759
  } else if (isMorphType) {
20215
20760
  node["p:extLst"] = this.buildMorphExtLst(transition.rawExtLst);
20216
20761
  } else {
@@ -20221,7 +20766,7 @@ var PptxSlideTransitionService = class {
20221
20766
  if (soundAction) {
20222
20767
  node["p:sndAc"] = soundAction;
20223
20768
  }
20224
- if (transition.rawExtLst && !isP14Type && !isMorphType) {
20769
+ if (transition.rawExtLst && !isP14Type && !isP15Type && !isMorphType) {
20225
20770
  node["p:extLst"] = transition.rawExtLst;
20226
20771
  }
20227
20772
  return node;
@@ -20716,7 +21261,7 @@ function updateEffectNodeAttributes(cTn, anim, currentPresetClass) {
20716
21261
  if (stCondList && anim.delayMs !== void 0) {
20717
21262
  const conditions = ensureArray4(stCondList["p:cond"]);
20718
21263
  for (const cond of conditions) {
20719
- if (isXmlObject(cond)) {
21264
+ if (isXmlObject2(cond)) {
20720
21265
  cond["@_delay"] = String(anim.delayMs);
20721
21266
  }
20722
21267
  }
@@ -30734,7 +31279,7 @@ function getCalloutViewBoxBounds(width, height, geometry, padding = 2) {
30734
31279
  viewHeight: maxY - minY + padding * 2
30735
31280
  };
30736
31281
  }
30737
- function isXmlObject2(value) {
31282
+ function isXmlObject3(value) {
30738
31283
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
30739
31284
  }
30740
31285
  function ensureItems(value) {
@@ -30837,7 +31382,7 @@ function collectParsedOmathNodes(root) {
30837
31382
  }
30838
31383
  if (localName9(key) === "oMath") {
30839
31384
  for (const item of ensureItems(value)) {
30840
- if (isXmlObject2(item)) {
31385
+ if (isXmlObject3(item)) {
30841
31386
  result.push(item);
30842
31387
  }
30843
31388
  }
@@ -30900,7 +31445,7 @@ function reorderContainer(node, rawInner) {
30900
31445
  occurrence.set(child20.tag, index + 1);
30901
31446
  const value = ensureItems(node[child20.tag])[index];
30902
31447
  resolved.push({ tag: child20.tag, value });
30903
- if (isXmlObject2(value) && child20.inner) {
31448
+ if (isXmlObject3(value) && child20.inner) {
30904
31449
  reorderContainer(value, child20.inner);
30905
31450
  }
30906
31451
  }
@@ -30942,7 +31487,7 @@ function localName10(name) {
30942
31487
  const colon = name.indexOf(":");
30943
31488
  return colon >= 0 ? name.slice(colon + 1) : name;
30944
31489
  }
30945
- function isXmlObject3(value) {
31490
+ function isXmlObject4(value) {
30946
31491
  return Boolean(value && typeof value === "object" && !Array.isArray(value));
30947
31492
  }
30948
31493
  function collectParsedParagraphs(root) {
@@ -30967,7 +31512,7 @@ function collectParsedParagraphs(root) {
30967
31512
  continue;
30968
31513
  }
30969
31514
  paragraphs.push(
30970
- ...(Array.isArray(childValue) ? childValue : [childValue]).filter(isXmlObject3)
31515
+ ...(Array.isArray(childValue) ? childValue : [childValue]).filter(isXmlObject4)
30971
31516
  );
30972
31517
  }
30973
31518
  } else {
@@ -31014,7 +31559,7 @@ function directChildrenByLocalName(paragraphs, name) {
31014
31559
  return [];
31015
31560
  }
31016
31561
  const values = Array.isArray(value) ? value : [value];
31017
- return values.filter(isXmlObject3);
31562
+ return values.filter(isXmlObject4);
31018
31563
  })
31019
31564
  );
31020
31565
  }
@@ -32402,97 +32947,6 @@ function detectFontFormat(data) {
32402
32947
  }
32403
32948
  return "truetype";
32404
32949
  }
32405
- var ATTR_PREFIX = "@_";
32406
- var TEXT_KEY = "#text";
32407
- function isXmlObject4(value) {
32408
- return typeof value === "object" && value !== null && !Array.isArray(value);
32409
- }
32410
- function coerceString(value) {
32411
- if (typeof value === "string") {
32412
- return value;
32413
- }
32414
- if (typeof value === "number" || typeof value === "boolean") {
32415
- return String(value);
32416
- }
32417
- return void 0;
32418
- }
32419
- function xmlChild(node, key) {
32420
- if (!isXmlObject4(node)) {
32421
- return void 0;
32422
- }
32423
- const value = node[key];
32424
- if (Array.isArray(value)) {
32425
- const first = value[0];
32426
- return isXmlObject4(first) ? first : void 0;
32427
- }
32428
- return isXmlObject4(value) ? value : void 0;
32429
- }
32430
- function xmlChildren(node, key) {
32431
- if (!isXmlObject4(node)) {
32432
- return [];
32433
- }
32434
- const value = node[key];
32435
- if (value === void 0 || value === null) {
32436
- return [];
32437
- }
32438
- if (Array.isArray(value)) {
32439
- return value.filter(isXmlObject4);
32440
- }
32441
- return isXmlObject4(value) ? [value] : [];
32442
- }
32443
- function xmlHasChild(node, key) {
32444
- return isXmlObject4(node) && Object.hasOwn(node, key);
32445
- }
32446
- function xmlAttr(node, name) {
32447
- if (!isXmlObject4(node)) {
32448
- return void 0;
32449
- }
32450
- return coerceString(node[ATTR_PREFIX + name]);
32451
- }
32452
- function xmlAttrNumber(node, name) {
32453
- const raw = xmlAttr(node, name);
32454
- if (raw === void 0) {
32455
- return void 0;
32456
- }
32457
- const parsed = Number(raw);
32458
- return Number.isFinite(parsed) ? parsed : void 0;
32459
- }
32460
- function xmlAttrBool(node, name) {
32461
- const raw = xmlAttr(node, name);
32462
- if (raw === void 0) {
32463
- return void 0;
32464
- }
32465
- const normalized = raw.trim().toLowerCase();
32466
- if (normalized === "1" || normalized === "true") {
32467
- return true;
32468
- }
32469
- if (normalized === "0" || normalized === "false") {
32470
- return false;
32471
- }
32472
- return void 0;
32473
- }
32474
- function xmlText(node) {
32475
- if (typeof node === "string") {
32476
- return node;
32477
- }
32478
- if (!isXmlObject4(node)) {
32479
- return void 0;
32480
- }
32481
- return coerceString(node[TEXT_KEY]);
32482
- }
32483
- function xmlPath(node, ...keys) {
32484
- let current = isXmlObject4(node) ? node : void 0;
32485
- for (const key of keys) {
32486
- if (!current) {
32487
- return void 0;
32488
- }
32489
- current = xmlChild(current, key);
32490
- }
32491
- return current;
32492
- }
32493
- function isXmlNode(value) {
32494
- return isXmlObject4(value);
32495
- }
32496
32950
  function findSectionList2(presentation, lookup) {
32497
32951
  const direct = lookup.getChildByLocalName(presentation, "sectionLst");
32498
32952
  if (direct) {
@@ -35769,6 +36223,7 @@ function getSvgStrokeDasharray(dashType, strokeWidth, customDashSegments) {
35769
36223
  }
35770
36224
  function createTemplateShapeRawXml(element) {
35771
36225
  const isText = element.type === "text";
36226
+ const isTextBox = element.locks?.txBox ?? isText;
35772
36227
  const name = isText ? "TextBox" : "Rectangle";
35773
36228
  const geometry = element.shapeType === "cylinder" ? "can" : element.shapeType || "rect";
35774
36229
  const adjustmentEntries = Object.entries(element.shapeAdjustments || {}).filter(
@@ -35787,7 +36242,7 @@ function createTemplateShapeRawXml(element) {
35787
36242
  "@_name": `${name} ${Math.floor(Math.random() * 100)}`
35788
36243
  },
35789
36244
  "p:cNvSpPr": {
35790
- "@_txBox": isText ? "1" : "0"
36245
+ "@_txBox": isTextBox ? "1" : "0"
35791
36246
  },
35792
36247
  "p:nvPr": {}
35793
36248
  },
@@ -36059,35 +36514,197 @@ async function fetchUrlToBytes(url, options = {}) {
36059
36514
  return null;
36060
36515
  }
36061
36516
  }
36517
+ function resolveChannelOrder(root) {
36518
+ const traceFormat = findFirstByLocalName(root, "traceFormat");
36519
+ if (!traceFormat) {
36520
+ return ["X", "Y"];
36521
+ }
36522
+ const channels = ensureArray5(nsGet(traceFormat, "channel"));
36523
+ const names = channels.map(
36524
+ (channel) => String(nsAttr(channel, "name") ?? "").trim().toUpperCase()
36525
+ ).filter((name) => name.length > 0);
36526
+ return names.length > 0 ? names : ["X", "Y"];
36527
+ }
36528
+ function decodeTracePoints(text2, channelOrder) {
36529
+ const points3 = [];
36530
+ const modes = channelOrder.map(() => "explicit");
36531
+ const lastValue = channelOrder.map(() => 0);
36532
+ const lastVelocity = channelOrder.map(() => 0);
36533
+ for (const rawPoint of text2.split(",")) {
36534
+ const tokens = rawPoint.trim().split(/\s+/u).filter((token2) => token2.length > 0);
36535
+ if (tokens.length === 0) {
36536
+ continue;
36537
+ }
36538
+ const decoded = [];
36539
+ for (let i = 0; i < tokens.length && i < channelOrder.length; i++) {
36540
+ const parsed = parseValueToken(tokens[i], modes[i]);
36541
+ if (parsed === void 0) {
36542
+ decoded.push(lastValue[i]);
36543
+ continue;
36544
+ }
36545
+ modes[i] = parsed.mode;
36546
+ const value = applyDiffMode(parsed, i, lastValue, lastVelocity);
36547
+ decoded.push(value);
36548
+ }
36549
+ if (decoded.length >= 2) {
36550
+ points3.push(decoded);
36551
+ }
36552
+ }
36553
+ return points3;
36554
+ }
36555
+ function parseValueToken(token2, currentMode) {
36556
+ let mode = currentMode;
36557
+ let body = token2;
36558
+ const prefix = token2[0];
36559
+ if (prefix === "!") {
36560
+ mode = "explicit";
36561
+ body = token2.slice(1);
36562
+ } else if (prefix === "'") {
36563
+ mode = "single";
36564
+ body = token2.slice(1);
36565
+ } else if (prefix === '"') {
36566
+ mode = "double";
36567
+ body = token2.slice(1);
36568
+ }
36569
+ if (body.length === 0) {
36570
+ return void 0;
36571
+ }
36572
+ const value = Number(body);
36573
+ return Number.isFinite(value) ? { value, mode } : void 0;
36574
+ }
36575
+ function applyDiffMode(parsed, index, lastValue, lastVelocity) {
36576
+ if (parsed.mode === "single") {
36577
+ lastVelocity[index] = parsed.value;
36578
+ lastValue[index] += parsed.value;
36579
+ } else if (parsed.mode === "double") {
36580
+ lastVelocity[index] += parsed.value;
36581
+ lastValue[index] += lastVelocity[index];
36582
+ } else {
36583
+ lastValue[index] = parsed.value;
36584
+ lastVelocity[index] = 0;
36585
+ }
36586
+ return lastValue[index];
36587
+ }
36588
+ function pointsToSvgPath(points3, channelOrder) {
36589
+ const xi = channelOrder.indexOf("X");
36590
+ const yi = channelOrder.indexOf("Y");
36591
+ const xIndex = xi >= 0 ? xi : 0;
36592
+ const yIndex = yi >= 0 ? yi : 1;
36593
+ const segments = [];
36594
+ for (const point of points3) {
36595
+ const x = point[xIndex];
36596
+ const y = point[yIndex];
36597
+ if (!Number.isFinite(x) || !Number.isFinite(y)) {
36598
+ continue;
36599
+ }
36600
+ segments.push(`${segments.length === 0 ? "M" : "L"} ${x} ${y}`);
36601
+ }
36602
+ return segments.join(" ");
36603
+ }
36604
+ function pointsToPressures(points3, channelOrder) {
36605
+ const fIndex = channelOrder.indexOf("F");
36606
+ if (fIndex < 0) {
36607
+ return [];
36608
+ }
36609
+ const pressures = [];
36610
+ for (const point of points3) {
36611
+ const raw = point[fIndex];
36612
+ if (Number.isFinite(raw)) {
36613
+ const normalised = raw > 1 ? raw / 32767 : raw;
36614
+ pressures.push(Math.max(0, Math.min(1, normalised)));
36615
+ }
36616
+ }
36617
+ return pressures;
36618
+ }
36619
+ function nsGet(obj, localName22) {
36620
+ if (localName22 in obj) {
36621
+ return obj[localName22];
36622
+ }
36623
+ for (const key of Object.keys(obj)) {
36624
+ if (localNameOf(key) === localName22 && !key.startsWith("@_")) {
36625
+ return obj[key];
36626
+ }
36627
+ }
36628
+ return void 0;
36629
+ }
36630
+ function nsAttr(obj, localName22) {
36631
+ const direct = obj[`@_${localName22}`];
36632
+ if (direct !== void 0) {
36633
+ return direct;
36634
+ }
36635
+ for (const key of Object.keys(obj)) {
36636
+ if (key.startsWith("@_") && localNameOf(key.slice(2)) === localName22) {
36637
+ return obj[key];
36638
+ }
36639
+ }
36640
+ return void 0;
36641
+ }
36642
+ function localNameOf(key) {
36643
+ const colon = key.indexOf(":");
36644
+ return colon >= 0 ? key.slice(colon + 1) : key;
36645
+ }
36646
+ function findFirstByLocalName(node, localName22) {
36647
+ const direct = nsGet(node, localName22);
36648
+ if (direct && typeof direct === "object") {
36649
+ return Array.isArray(direct) ? direct[0] : direct;
36650
+ }
36651
+ for (const key of Object.keys(node)) {
36652
+ if (key.startsWith("@_") || key === "#text") {
36653
+ continue;
36654
+ }
36655
+ for (const child20 of ensureArray5(node[key])) {
36656
+ if (typeof child20 !== "object") {
36657
+ continue;
36658
+ }
36659
+ const found = findFirstByLocalName(child20, localName22);
36660
+ if (found) {
36661
+ return found;
36662
+ }
36663
+ }
36664
+ }
36665
+ return void 0;
36666
+ }
36667
+ function ensureArray5(value) {
36668
+ if (value === void 0 || value === null) {
36669
+ return [];
36670
+ }
36671
+ return Array.isArray(value) ? value : [value];
36672
+ }
36062
36673
  var INKML_NAMESPACE = "http://www.w3.org/2003/InkML";
36063
36674
  var METADATA_NAMESPACE = "https://pptx-viewer.dev/inkml/metadata";
36064
36675
  function parseInkMlContent(data) {
36065
- const root = data["ink:ink"] ?? data["ink"];
36676
+ const root = nsGet(data, "ink") ?? data["ink"];
36066
36677
  if (!root) {
36067
36678
  return { strokes: [], rawXml: data };
36068
36679
  }
36069
36680
  const brushes = /* @__PURE__ */ new Map();
36070
- for (const brush of ensureArray5(root["ink:brush"] ?? root["brush"])) {
36071
- const properties = ensureArray5(brush["ink:brushProperty"] ?? brush["brushProperty"]);
36681
+ for (const brush of ensureArray5(nsGet(root, "brush"))) {
36682
+ const properties = ensureArray5(nsGet(brush, "brushProperty"));
36072
36683
  const valueByName = new Map(
36073
- properties.map((property) => [String(property["@_name"] ?? ""), property["@_value"]])
36684
+ properties.map((property) => [
36685
+ String(nsAttr(property, "name") ?? ""),
36686
+ nsAttr(property, "value")
36687
+ ])
36074
36688
  );
36075
- brushes.set(String(brush["@_id"] ?? ""), {
36689
+ brushes.set(String(nsAttr(brush, "id") ?? ""), {
36076
36690
  color: String(valueByName.get("color") ?? "#000000"),
36077
36691
  width: finiteNumber(valueByName.get("width"), 1),
36078
36692
  opacity: finiteNumber(valueByName.get("opacity"), 1)
36079
36693
  });
36080
36694
  }
36695
+ const channelOrder = resolveChannelOrder(root);
36081
36696
  const strokes = [];
36082
- for (const trace of ensureArray5(root["ink:trace"] ?? root["trace"])) {
36697
+ for (const trace of ensureArray5(nsGet(root, "trace"))) {
36083
36698
  const text2 = typeof trace === "string" ? trace : String(trace["#text"] ?? "").trim();
36084
- const path = typeof trace === "string" ? text2 : String(trace["@_pva:path"] ?? "").trim() || text2;
36699
+ const authored = typeof trace === "string" ? "" : String(nsAttr(trace, "path") ?? "").trim();
36700
+ const points3 = authored ? [] : decodeTracePoints(text2, channelOrder);
36701
+ const path = authored || pointsToSvgPath(points3, channelOrder);
36085
36702
  if (!path) {
36086
36703
  continue;
36087
36704
  }
36088
- const brushRef = typeof trace === "string" ? "" : String(trace["@_brushRef"] ?? "").replace("#", "");
36705
+ const brushRef = typeof trace === "string" ? "" : String(nsAttr(trace, "brushRef") ?? "").replace("#", "");
36089
36706
  const brush = brushes.get(brushRef) ?? { color: "#000000", width: 1, opacity: 1 };
36090
- const pressures = tracePressures(text2);
36707
+ const pressures = authored ? tracePressures(text2) : pointsToPressures(points3, channelOrder);
36091
36708
  strokes.push({ ...brush, path, ...pressures.length > 0 ? { pressures } : {} });
36092
36709
  }
36093
36710
  return { strokes, rawXml: data };
@@ -36146,12 +36763,6 @@ function finiteNumber(value, fallback) {
36146
36763
  const parsed = Number(value);
36147
36764
  return Number.isFinite(parsed) ? parsed : fallback;
36148
36765
  }
36149
- function ensureArray5(value) {
36150
- if (value === void 0 || value === null) {
36151
- return [];
36152
- }
36153
- return Array.isArray(value) ? value : [value];
36154
- }
36155
36766
  var DEFAULT_ACCENT_COLORS = [
36156
36767
  "#4472C4",
36157
36768
  "#ED7D31",
@@ -38783,6 +39394,120 @@ function applyNodeStylesToElements(elements2, nodes) {
38783
39394
  };
38784
39395
  });
38785
39396
  }
39397
+ var CONTAINER_LOCAL_NAMES = /* @__PURE__ */ new Set(["presLayoutVars", "varLst"]);
39398
+ function localNameOf2(key) {
39399
+ const idx = key.indexOf(":");
39400
+ return idx >= 0 ? key.slice(idx + 1) : key;
39401
+ }
39402
+ function findVarsContainer(node) {
39403
+ if (!node || typeof node !== "object") {
39404
+ return void 0;
39405
+ }
39406
+ if (Array.isArray(node)) {
39407
+ for (const entry of node) {
39408
+ const found = findVarsContainer(entry);
39409
+ if (found) {
39410
+ return found;
39411
+ }
39412
+ }
39413
+ return void 0;
39414
+ }
39415
+ for (const [key, value] of Object.entries(node)) {
39416
+ if (key.startsWith("@_")) {
39417
+ continue;
39418
+ }
39419
+ if (CONTAINER_LOCAL_NAMES.has(localNameOf2(key))) {
39420
+ const container = Array.isArray(value) ? value[0] : value;
39421
+ if (container && typeof container === "object") {
39422
+ return container;
39423
+ }
39424
+ }
39425
+ const nested = findVarsContainer(value);
39426
+ if (nested) {
39427
+ return nested;
39428
+ }
39429
+ }
39430
+ return void 0;
39431
+ }
39432
+ function varValue(container, name) {
39433
+ for (const [key, value] of Object.entries(container)) {
39434
+ if (key.startsWith("@_") || localNameOf2(key) !== name) {
39435
+ continue;
39436
+ }
39437
+ const node = Array.isArray(value) ? value[0] : value;
39438
+ if (node && typeof node === "object") {
39439
+ const raw = node["@_val"];
39440
+ const str = String(raw ?? "").trim();
39441
+ return str.length > 0 ? str : void 0;
39442
+ }
39443
+ }
39444
+ return void 0;
39445
+ }
39446
+ function boolValue2(container, name) {
39447
+ const raw = varValue(container, name);
39448
+ if (raw === void 0) {
39449
+ return void 0;
39450
+ }
39451
+ const lower = raw.toLowerCase();
39452
+ return lower === "1" || lower === "true" || lower === "on";
39453
+ }
39454
+ function intValue(container, name) {
39455
+ const raw = varValue(container, name);
39456
+ if (raw === void 0) {
39457
+ return void 0;
39458
+ }
39459
+ const parsed = Number.parseInt(raw, 10);
39460
+ return Number.isFinite(parsed) ? parsed : void 0;
39461
+ }
39462
+ var DIRECTIONS = /* @__PURE__ */ new Set(["norm", "rev"]);
39463
+ var HIER_BRANCHES = /* @__PURE__ */ new Set(["std", "init", "l", "r", "hang"]);
39464
+ function parseSmartArtPresLayoutVars(container) {
39465
+ if (!container) {
39466
+ return void 0;
39467
+ }
39468
+ const vars = findVarsContainer(container);
39469
+ if (!vars) {
39470
+ return void 0;
39471
+ }
39472
+ const result = {};
39473
+ const direction = varValue(vars, "dir");
39474
+ if (direction && DIRECTIONS.has(direction)) {
39475
+ result.direction = direction;
39476
+ }
39477
+ const hierBranch = varValue(vars, "hierBranch");
39478
+ if (hierBranch && HIER_BRANCHES.has(hierBranch)) {
39479
+ result.hierarchyBranch = hierBranch;
39480
+ }
39481
+ const orgChart = boolValue2(vars, "orgChart");
39482
+ if (orgChart !== void 0) {
39483
+ result.orgChart = orgChart;
39484
+ }
39485
+ const chMax = intValue(vars, "chMax");
39486
+ if (chMax !== void 0) {
39487
+ result.childMax = chMax;
39488
+ }
39489
+ const chPref = intValue(vars, "chPref");
39490
+ if (chPref !== void 0) {
39491
+ result.childPreferred = chPref;
39492
+ }
39493
+ const bulletEnabled = boolValue2(vars, "bulletEnabled");
39494
+ if (bulletEnabled !== void 0) {
39495
+ result.bulletEnabled = bulletEnabled;
39496
+ }
39497
+ const animLvl = varValue(vars, "animLvl");
39498
+ if (animLvl !== void 0) {
39499
+ result.animationLevel = animLvl;
39500
+ }
39501
+ const animOne = varValue(vars, "animOne");
39502
+ if (animOne !== void 0) {
39503
+ result.animateOne = animOne;
39504
+ }
39505
+ const resizeHandles = varValue(vars, "resizeHandles");
39506
+ if (resizeHandles !== void 0) {
39507
+ result.resizeHandles = resizeHandles;
39508
+ }
39509
+ return Object.keys(result).length > 0 ? result : void 0;
39510
+ }
38786
39511
  function quickStyleStrokeScale(quickStyle) {
38787
39512
  if (!quickStyle?.effectIntensity) {
38788
39513
  return 1;
@@ -38887,15 +39612,27 @@ function decomposeSmartArt(smartArtData, containerBounds, themeColorMap, layoutD
38887
39612
  smartArtData.colorTransform?.fillColors
38888
39613
  );
38889
39614
  const layoutType = resolveEffectiveLayoutType(smartArtData);
39615
+ const layoutVars = smartArtData.presLayoutVars ?? parseSmartArtPresLayoutVars(smartArtData.layoutDefinition?.rawXml);
39616
+ const orderedNodes = layoutVars?.direction === "rev" ? [...nodes].reverse() : nodes;
38890
39617
  const namedLayout = smartArtData.layout;
38891
39618
  if (namedLayout) {
38892
- const namedResult = dispatchNamedLayout(namedLayout, nodes, containerBounds, effectiveThemeMap);
39619
+ const namedResult = dispatchNamedLayout(
39620
+ namedLayout,
39621
+ orderedNodes,
39622
+ containerBounds,
39623
+ effectiveThemeMap
39624
+ );
38893
39625
  if (namedResult) {
38894
- return applyNodeStylesToElements(namedResult, nodes);
39626
+ return applyNodeStylesToElements(namedResult, orderedNodes);
38895
39627
  }
38896
39628
  }
38897
- const algorithmic = dispatchLayoutByType(layoutType, nodes, containerBounds, effectiveThemeMap);
38898
- return algorithmic ? applyNodeStylesToElements(algorithmic, nodes) : algorithmic;
39629
+ const algorithmic = dispatchLayoutByType(
39630
+ layoutType,
39631
+ orderedNodes,
39632
+ containerBounds,
39633
+ effectiveThemeMap
39634
+ );
39635
+ return algorithmic ? applyNodeStylesToElements(algorithmic, orderedNodes) : algorithmic;
38899
39636
  }
38900
39637
  function dispatchLayoutByType(layoutType, nodes, containerBounds, effectiveThemeMap) {
38901
39638
  switch (layoutType) {
@@ -48553,6 +49290,126 @@ function applySmartArtConnectionAttributes(xml, connection, fallbackModelId) {
48553
49290
  applyNullableAttribute(xml, "@_sibTransId", connection.siblingTransitionId);
48554
49291
  applyNullableAttribute(xml, "@_presId", connection.presentationId);
48555
49292
  }
49293
+ var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
49294
+ "srgbClr",
49295
+ "schemeClr",
49296
+ "scrgbClr",
49297
+ "sysClr",
49298
+ "prstClr",
49299
+ "hslClr"
49300
+ ]);
49301
+ var COLOR_METHODS2 = /* @__PURE__ */ new Set(["span", "cycle", "repeat"]);
49302
+ var HUE_DIRECTIONS2 = /* @__PURE__ */ new Set(["cw", "ccw"]);
49303
+ var PRIMARY_LABEL_PRIORITY = ["node0", "node1", "node2", "node3", "node4", "node"];
49304
+ function localNameOf3(key) {
49305
+ const idx = key.indexOf(":");
49306
+ return idx >= 0 ? key.slice(idx + 1) : key;
49307
+ }
49308
+ function parseSmartArtColorListHexes(list, deps) {
49309
+ if (!list) {
49310
+ return [];
49311
+ }
49312
+ const out = [];
49313
+ for (const [key, value] of Object.entries(list)) {
49314
+ if (key.startsWith("@_")) {
49315
+ continue;
49316
+ }
49317
+ const local = localNameOf3(key);
49318
+ if (!COLOR_LOCAL_NAMES.has(local)) {
49319
+ continue;
49320
+ }
49321
+ const nodes = Array.isArray(value) ? value : [value];
49322
+ for (const node of nodes) {
49323
+ if (!node || typeof node !== "object") {
49324
+ continue;
49325
+ }
49326
+ const wrapper = { [`a:${local}`]: node };
49327
+ const hex10 = deps.parseColorChoice(wrapper) ?? deps.resolveScheme(node);
49328
+ if (hex10) {
49329
+ out.push(hex10);
49330
+ }
49331
+ }
49332
+ }
49333
+ return out;
49334
+ }
49335
+ function listInterpolation(list) {
49336
+ if (!list) {
49337
+ return void 0;
49338
+ }
49339
+ const method = String(list["@_meth"] ?? "").trim();
49340
+ const hueDir = String(list["@_hueDir"] ?? "").trim();
49341
+ const meta = {};
49342
+ if (COLOR_METHODS2.has(method)) {
49343
+ meta.method = method;
49344
+ }
49345
+ if (HUE_DIRECTIONS2.has(hueDir)) {
49346
+ meta.hueDirection = hueDir;
49347
+ }
49348
+ return meta.method || meta.hueDirection ? meta : void 0;
49349
+ }
49350
+ function parseLabel(lbl, deps) {
49351
+ const fillList = deps.getChild(lbl, "fillClrLst");
49352
+ const lineList = deps.getChild(lbl, "linClrLst");
49353
+ return {
49354
+ name: String(lbl["@_name"] ?? "").trim(),
49355
+ fill: parseSmartArtColorListHexes(fillList, deps),
49356
+ line: parseSmartArtColorListHexes(lineList, deps),
49357
+ textFill: parseSmartArtColorListHexes(deps.getChild(lbl, "txFillClrLst"), deps),
49358
+ textLine: parseSmartArtColorListHexes(deps.getChild(lbl, "txLinClrLst"), deps),
49359
+ effect: parseSmartArtColorListHexes(deps.getChild(lbl, "effectClrLst"), deps),
49360
+ textEffect: parseSmartArtColorListHexes(deps.getChild(lbl, "txEffectClrLst"), deps),
49361
+ fillInterpolation: listInterpolation(fillList),
49362
+ lineInterpolation: listInterpolation(lineList)
49363
+ };
49364
+ }
49365
+ function selectPrimary(parsed) {
49366
+ const byName = new Map(parsed.map((p) => [p.name, p]));
49367
+ for (const name of PRIMARY_LABEL_PRIORITY) {
49368
+ const candidate = byName.get(name);
49369
+ if (candidate && candidate.fill.length > 0) {
49370
+ return candidate;
49371
+ }
49372
+ }
49373
+ for (const name of PRIMARY_LABEL_PRIORITY) {
49374
+ const candidate = byName.get(name);
49375
+ if (candidate && (candidate.line.length > 0 || candidate.fill.length > 0)) {
49376
+ return candidate;
49377
+ }
49378
+ }
49379
+ return parsed.find((p) => p.fill.length > 0) ?? parsed.find((p) => p.line.length > 0);
49380
+ }
49381
+ function buildSmartArtColorLists(styleLbls, deps) {
49382
+ const parsed = styleLbls.map((lbl) => parseLabel(lbl, deps));
49383
+ const primary = selectPrimary(parsed);
49384
+ let fillColors = primary?.fill ?? [];
49385
+ let lineColors = primary?.line ?? [];
49386
+ if (fillColors.length === 0) {
49387
+ fillColors = parsed.map((p) => p.fill[0]).filter((c) => Boolean(c));
49388
+ }
49389
+ if (lineColors.length === 0) {
49390
+ lineColors = parsed.map((p) => p.line[0]).filter((c) => Boolean(c));
49391
+ }
49392
+ const result = { fillColors, lineColors };
49393
+ if (primary?.textFill.length) {
49394
+ result.textFillColors = primary.textFill;
49395
+ }
49396
+ if (primary?.textLine.length) {
49397
+ result.textLineColors = primary.textLine;
49398
+ }
49399
+ if (primary?.effect.length) {
49400
+ result.effectColors = primary.effect;
49401
+ }
49402
+ if (primary?.textEffect.length) {
49403
+ result.textEffectColors = primary.textEffect;
49404
+ }
49405
+ if (primary?.fillInterpolation) {
49406
+ result.fillInterpolation = primary.fillInterpolation;
49407
+ }
49408
+ if (primary?.lineInterpolation) {
49409
+ result.lineInterpolation = primary.lineInterpolation;
49410
+ }
49411
+ return result;
49412
+ }
48556
49413
  var MODERN_COMMENT_NAMESPACE = "http://schemas.microsoft.com/office/powerpoint/2018/8/main";
48557
49414
  var MODERN_COMMENT_RELATIONSHIP = "http://schemas.microsoft.com/office/2018/10/relationships/comments";
48558
49415
  var MODERN_AUTHOR_RELATIONSHIP = "http://schemas.microsoft.com/office/2018/10/relationships/authors";
@@ -50819,6 +51676,26 @@ function buildGeneratedChartAxis(axId, crossId, pos2, formatting) {
50819
51676
  }
50820
51677
  return axis;
50821
51678
  }
51679
+ var CONTAINER_MAP = {
51680
+ pie: { tag: "c:pieChart", family: "pie" },
51681
+ pie3D: { tag: "c:pie3DChart", family: "pie" },
51682
+ ofPie: { tag: "c:ofPieChart", family: "ofPie" },
51683
+ doughnut: { tag: "c:doughnutChart", family: "doughnut" },
51684
+ scatter: { tag: "c:scatterChart", family: "scatter" },
51685
+ bubble: { tag: "c:bubbleChart", family: "bubble" },
51686
+ line: { tag: "c:lineChart", family: "line" },
51687
+ line3D: { tag: "c:line3DChart", family: "line" },
51688
+ area: { tag: "c:areaChart", family: "area" },
51689
+ area3D: { tag: "c:area3DChart", family: "area" },
51690
+ radar: { tag: "c:radarChart", family: "radar" },
51691
+ stock: { tag: "c:stockChart", family: "stock" },
51692
+ surface: { tag: "c:surfaceChart", family: "surface" },
51693
+ bar: { tag: "c:barChart", family: "bar" },
51694
+ bar3D: { tag: "c:bar3DChart", family: "bar" }
51695
+ };
51696
+ function resolveChartContainerType(type) {
51697
+ return CONTAINER_MAP[type] ?? { tag: "c:barChart", family: "bar" };
51698
+ }
50822
51699
  var NS_C = "http://schemas.openxmlformats.org/drawingml/2006/chart";
50823
51700
  var NS_A2 = "http://schemas.openxmlformats.org/drawingml/2006/main";
50824
51701
  var NS_R2 = "http://schemas.openxmlformats.org/officeDocument/2006/relationships";
@@ -50848,29 +51725,6 @@ function strLit(values) {
50848
51725
  }
50849
51726
  };
50850
51727
  }
50851
- function resolveType(type) {
50852
- switch (type) {
50853
- case "pie":
50854
- case "pie3D":
50855
- return { tag: "c:pieChart", family: "pie" };
50856
- case "doughnut":
50857
- return { tag: "c:doughnutChart", family: "doughnut" };
50858
- case "scatter":
50859
- return { tag: "c:scatterChart", family: "scatter" };
50860
- case "bubble":
50861
- return { tag: "c:bubbleChart", family: "bubble" };
50862
- case "line":
50863
- case "line3D":
50864
- return { tag: "c:lineChart", family: "line" };
50865
- case "area":
50866
- case "area3D":
50867
- return { tag: "c:areaChart", family: "area" };
50868
- case "radar":
50869
- return { tag: "c:radarChart", family: "radar" };
50870
- default:
50871
- return { tag: "c:barChart", family: "bar" };
50872
- }
50873
- }
50874
51728
  function fillSpPr(color2, asLine) {
50875
51729
  const h = hex6(color2);
50876
51730
  if (!h) {
@@ -50938,7 +51792,11 @@ function buildChartTypeContainer(chartData, family) {
50938
51792
  } else if (family === "scatter") {
50939
51793
  container["c:scatterStyle"] = { "@_val": "lineMarker" };
50940
51794
  container["c:varyColors"] = { "@_val": "0" };
50941
- } else {
51795
+ } else if (family === "ofPie") {
51796
+ container["c:ofPieType"] = { "@_val": "pie" };
51797
+ container["c:varyColors"] = { "@_val": "1" };
51798
+ } else if (family === "stock" || family === "surface") ;
51799
+ else {
50942
51800
  container["c:varyColors"] = { "@_val": family === "bubble" ? "0" : "1" };
50943
51801
  }
50944
51802
  container["c:ser"] = chartData.series.map(
@@ -50950,12 +51808,13 @@ function buildChartTypeContainer(chartData, family) {
50950
51808
  if (family === "line" && chartData.upDownBars !== void 0) {
50951
51809
  applyChartUpDownBars(container, chartData.upDownBars, (key) => key.replace(/^.*:/u, ""));
50952
51810
  }
50953
- if (family === "bar") {
51811
+ if (family === "bar" || family === "ofPie") {
50954
51812
  container["c:gapWidth"] = { "@_val": "150" };
50955
- container["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
50956
- } else if (family === "line" || family === "area" || family === "radar") {
50957
- container["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
50958
- } else if (family === "scatter" || family === "bubble") {
51813
+ }
51814
+ if (family === "stock") {
51815
+ container["c:hiLowLines"] = {};
51816
+ }
51817
+ if (family === "bar" || family === "line" || family === "area" || family === "radar" || family === "scatter" || family === "bubble" || family === "stock" || family === "surface") {
50959
51818
  container["c:axId"] = [{ "@_val": String(CAT_AX_ID) }, { "@_val": String(VAL_AX_ID) }];
50960
51819
  } else if (family === "doughnut") {
50961
51820
  container["c:holeSize"] = { "@_val": "50" };
@@ -50968,7 +51827,8 @@ function buildPlotArea(chartData, tag, family) {
50968
51827
  if (chartData.style) {
50969
51828
  applyChartDataLabelsToXml(plotArea, chartData.style, (key) => key.replace(/^.*:/u, ""));
50970
51829
  }
50971
- if (family !== "pie" && family !== "doughnut" && SCATTER_LIKE.has(chartData.chartType)) {
51830
+ const hasAxes = family !== "pie" && family !== "doughnut" && family !== "ofPie";
51831
+ if (hasAxes && SCATTER_LIKE.has(chartData.chartType)) {
50972
51832
  plotArea["c:valAx"] = [
50973
51833
  buildGeneratedChartAxis(
50974
51834
  CAT_AX_ID,
@@ -50983,7 +51843,7 @@ function buildPlotArea(chartData, tag, family) {
50983
51843
  axisFormatting(chartData, "valAx", VAL_AX_ID, 1)
50984
51844
  )
50985
51845
  ];
50986
- } else if (family !== "pie" && family !== "doughnut") {
51846
+ } else if (hasAxes) {
50987
51847
  const dateAxis = chartData.dateCategories ? axisFormatting(chartData, "dateAx", CAT_AX_ID) : void 0;
50988
51848
  plotArea[dateAxis ? "c:dateAx" : "c:catAx"] = buildGeneratedChartAxis(
50989
51849
  CAT_AX_ID,
@@ -51002,7 +51862,7 @@ function buildPlotArea(chartData, tag, family) {
51002
51862
  return plotArea;
51003
51863
  }
51004
51864
  function buildChartSpaceXml(chartData) {
51005
- const { tag, family } = resolveType(chartData.chartType);
51865
+ const { tag, family } = resolveChartContainerType(chartData.chartType);
51006
51866
  const chart = {};
51007
51867
  if (chartData.title) {
51008
51868
  chart["c:title"] = {
@@ -52908,6 +53768,7 @@ function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray16)
52908
53768
  let playbackSpeed;
52909
53769
  let trimStartMs;
52910
53770
  let trimEndMs;
53771
+ let embedRId;
52911
53772
  const bookmarks = [];
52912
53773
  const extLst = mediaNode["p:extLst"] ?? cMediaNode["p:extLst"];
52913
53774
  if (extLst) {
@@ -52915,6 +53776,13 @@ function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray16)
52915
53776
  for (const ext of exts) {
52916
53777
  const p14Media = ext["p14:media"];
52917
53778
  if (p14Media) {
53779
+ if (embedRId === void 0) {
53780
+ const embedRaw = p14Media["@_r:embed"] ?? p14Media["@_embed"];
53781
+ const embedStr = embedRaw === void 0 ? "" : String(embedRaw).trim();
53782
+ if (embedStr.length > 0) {
53783
+ embedRId = embedStr;
53784
+ }
53785
+ }
52918
53786
  const p14Trim = p14Media["p14:trim"];
52919
53787
  if (p14Trim) {
52920
53788
  const st = p14Trim["@_st"];
@@ -52984,7 +53852,8 @@ function parseMediaExtensionData(mediaNode, cMediaNode, shapeId, ensureArray16)
52984
53852
  fadeInDuration,
52985
53853
  fadeOutDuration,
52986
53854
  playbackSpeed,
52987
- bookmarks
53855
+ bookmarks,
53856
+ embedRId
52988
53857
  };
52989
53858
  }
52990
53859
  var PptxHandlerRuntime = class {
@@ -53212,6 +54081,12 @@ var PptxHandlerRuntime = class {
53212
54081
  loadedEmbeddedFonts = [];
53213
54082
  /** Typed source metadata for lossless embedded-font list round trips. */
53214
54083
  loadedEmbeddedFontList;
54084
+ /**
54085
+ * View properties parsed from `ppt/viewProps.xml` during load, preserved so
54086
+ * an unmodified load -> save round-trips the typed model and callers that do
54087
+ * not override `saveOptions.viewProperties` still persist the loaded state.
54088
+ */
54089
+ loadedViewProperties;
53215
54090
  /** Map of comment author IDs to display names (from `ppt/commentAuthors.xml`). */
53216
54091
  commentAuthorMap = /* @__PURE__ */ new Map();
53217
54092
  /** Full comment author details keyed by author ID, preserving initials/lastIdx/clrIdx for round-trip. */
@@ -53350,18 +54225,261 @@ var PptxHandlerRuntime = class {
53350
54225
  }
53351
54226
  }
53352
54227
  };
54228
+ var EMU_PER_PIXEL = 9525;
54229
+ var BORDER_SIDES = [
54230
+ "left",
54231
+ "right",
54232
+ "top",
54233
+ "bottom",
54234
+ "insideH",
54235
+ "insideV",
54236
+ "tl2br",
54237
+ "bl2tr"
54238
+ ];
54239
+ function parseSolidFillStyle(solidFill2) {
54240
+ if (!solidFill2) {
54241
+ return void 0;
54242
+ }
54243
+ const schemeClr = solidFill2["a:schemeClr"];
54244
+ if (!schemeClr) {
54245
+ return void 0;
54246
+ }
54247
+ const schemeColor = String(schemeClr["@_val"] || "").trim() || void 0;
54248
+ if (!schemeColor) {
54249
+ return void 0;
54250
+ }
54251
+ const tintRaw = schemeClr["a:tint"];
54252
+ const tint = tintRaw ? parseInt(String(tintRaw["@_val"] || "0"), 10) || void 0 : void 0;
54253
+ const shadeRaw = schemeClr["a:shade"];
54254
+ const shade = shadeRaw ? parseInt(String(shadeRaw["@_val"] || "0"), 10) || void 0 : void 0;
54255
+ return { schemeColor, tint, shade };
54256
+ }
54257
+ function parseBorderSide(side) {
54258
+ if (!side) {
54259
+ return void 0;
54260
+ }
54261
+ const ln = side["a:ln"];
54262
+ if (!ln) {
54263
+ return void 0;
54264
+ }
54265
+ const border = {};
54266
+ let has = false;
54267
+ if (ln["a:noFill"] !== void 0) {
54268
+ border.noFill = true;
54269
+ has = true;
54270
+ }
54271
+ const widthEmu = parseInt(String(ln["@_w"] || "0"), 10);
54272
+ if (widthEmu > 0) {
54273
+ border.width = Math.max(1, Math.round(widthEmu / EMU_PER_PIXEL));
54274
+ has = true;
54275
+ }
54276
+ const prstDash = ln["a:prstDash"];
54277
+ const dashVal = prstDash ? String(prstDash["@_val"] || "").trim() : "";
54278
+ if (dashVal) {
54279
+ border.dash = dashVal;
54280
+ has = true;
54281
+ }
54282
+ const solidFill2 = ln["a:solidFill"];
54283
+ const fill = parseSolidFillStyle(solidFill2);
54284
+ if (fill) {
54285
+ border.fill = fill;
54286
+ has = true;
54287
+ } else {
54288
+ const srgb = solidFill2?.["a:srgbClr"];
54289
+ const hex10 = srgb ? String(srgb["@_val"] || "").trim() : "";
54290
+ if (hex10) {
54291
+ border.color = hex10.startsWith("#") ? hex10 : `#${hex10}`;
54292
+ has = true;
54293
+ }
54294
+ }
54295
+ return has ? border : void 0;
54296
+ }
54297
+ function parseTableStyleBorders(tcStyle) {
54298
+ const tcBdr = tcStyle?.["a:tcBdr"];
54299
+ if (!tcBdr) {
54300
+ return void 0;
54301
+ }
54302
+ const result = {};
54303
+ let has = false;
54304
+ for (const name of BORDER_SIDES) {
54305
+ const border = parseBorderSide(tcBdr[`a:${name}`]);
54306
+ if (border) {
54307
+ result[name] = border;
54308
+ has = true;
54309
+ }
54310
+ }
54311
+ return has ? result : void 0;
54312
+ }
54313
+ function toHex3(raw) {
54314
+ const hex10 = String(raw ?? "").trim();
54315
+ if (!hex10) {
54316
+ return void 0;
54317
+ }
54318
+ return hex10.startsWith("#") ? hex10 : `#${hex10}`;
54319
+ }
54320
+ function parseColorChoiceFill(node) {
54321
+ if (!node) {
54322
+ return void 0;
54323
+ }
54324
+ const scheme = parseSolidFillStyle(node);
54325
+ if (scheme) {
54326
+ return scheme;
54327
+ }
54328
+ const srgb = node["a:srgbClr"];
54329
+ const color2 = toHex3(srgb?.["@_val"]);
54330
+ if (!color2) {
54331
+ return void 0;
54332
+ }
54333
+ const fill = { schemeColor: "", color: color2 };
54334
+ const tintRaw = srgb?.["a:tint"];
54335
+ const tint = tintRaw ? parseInt(String(tintRaw["@_val"] || "0"), 10) || void 0 : void 0;
54336
+ if (tint !== void 0) {
54337
+ fill.tint = tint;
54338
+ }
54339
+ const shadeRaw = srgb?.["a:shade"];
54340
+ const shade = shadeRaw ? parseInt(String(shadeRaw["@_val"] || "0"), 10) || void 0 : void 0;
54341
+ if (shade !== void 0) {
54342
+ fill.shade = shade;
54343
+ }
54344
+ return fill;
54345
+ }
54346
+ function parseGradientFill(gradFill) {
54347
+ const gsLst = gradFill["a:gsLst"];
54348
+ const rawStops = gsLst?.["a:gs"];
54349
+ const gsNodes = Array.isArray(rawStops) ? rawStops : rawStops ? [rawStops] : [];
54350
+ const stops = [];
54351
+ for (const gs of gsNodes) {
54352
+ const fill = parseColorChoiceFill(gs);
54353
+ if (!fill) {
54354
+ continue;
54355
+ }
54356
+ const position2 = (parseInt(String(gs["@_pos"] || "0"), 10) || 0) / 1e3;
54357
+ stops.push({ position: position2, fill });
54358
+ }
54359
+ if (stops.length === 0) {
54360
+ return void 0;
54361
+ }
54362
+ const lin = gradFill["a:lin"];
54363
+ if (lin) {
54364
+ const angRaw = parseInt(String(lin["@_ang"] || "0"), 10) || 0;
54365
+ const angle = (angRaw / 6e4 % 360 + 360) % 360;
54366
+ return { stops, angle, type: "linear" };
54367
+ }
54368
+ if (gradFill["a:path"] !== void 0) {
54369
+ return { stops, type: "radial" };
54370
+ }
54371
+ return { stops, type: "linear" };
54372
+ }
54373
+ function parsePatternFill(pattFill) {
54374
+ const preset = String(pattFill["@_prst"] || "").trim();
54375
+ if (!preset) {
54376
+ return void 0;
54377
+ }
54378
+ const pattern = { preset };
54379
+ const foreground = parseColorChoiceFill(pattFill["a:fgClr"]);
54380
+ if (foreground) {
54381
+ pattern.foreground = foreground;
54382
+ }
54383
+ const background = parseColorChoiceFill(pattFill["a:bgClr"]);
54384
+ if (background) {
54385
+ pattern.background = background;
54386
+ }
54387
+ return pattern;
54388
+ }
54389
+ function parseTableStyleSectionFill(section) {
54390
+ if (!section) {
54391
+ return void 0;
54392
+ }
54393
+ const tcStyle = section["a:tcStyle"];
54394
+ const fillWrap = tcStyle?.["a:fill"];
54395
+ if (!fillWrap) {
54396
+ return void 0;
54397
+ }
54398
+ if (fillWrap["a:noFill"] !== void 0) {
54399
+ return { schemeColor: "", noFill: true };
54400
+ }
54401
+ const solid = fillWrap["a:solidFill"];
54402
+ if (solid) {
54403
+ return parseColorChoiceFill(solid);
54404
+ }
54405
+ const grad = fillWrap["a:gradFill"];
54406
+ if (grad) {
54407
+ const gradient = parseGradientFill(grad);
54408
+ if (gradient) {
54409
+ return { schemeColor: "", gradient };
54410
+ }
54411
+ }
54412
+ const patt = fillWrap["a:pattFill"];
54413
+ if (patt) {
54414
+ const pattern = parsePatternFill(patt);
54415
+ if (pattern) {
54416
+ return { schemeColor: "", pattern };
54417
+ }
54418
+ }
54419
+ return void 0;
54420
+ }
54421
+ function parseTableStyleSectionText(section) {
54422
+ const tcTxStyle = section?.["a:tcTxStyle"];
54423
+ if (!tcTxStyle) {
54424
+ return void 0;
54425
+ }
54426
+ const result = {};
54427
+ let hasProps = false;
54428
+ if (tcTxStyle["@_b"] === "on") {
54429
+ result.bold = true;
54430
+ hasProps = true;
54431
+ }
54432
+ if (tcTxStyle["@_i"] === "on") {
54433
+ result.italic = true;
54434
+ hasProps = true;
54435
+ }
54436
+ const underline = String(tcTxStyle["@_u"] || "").trim();
54437
+ if (underline && underline !== "none") {
54438
+ result.underline = true;
54439
+ hasProps = true;
54440
+ }
54441
+ const font = tcTxStyle["a:font"];
54442
+ const face = font ? String(font["@_typeface"] || "").trim() : "";
54443
+ if (face) {
54444
+ result.fontFace = face;
54445
+ hasProps = true;
54446
+ }
54447
+ const fontRef = tcTxStyle["a:fontRef"];
54448
+ const idx = fontRef ? String(fontRef["@_idx"] || "").trim() : "";
54449
+ if (idx) {
54450
+ result.fontRefIdx = idx;
54451
+ hasProps = true;
54452
+ }
54453
+ const schemeClr = fontRef?.["a:schemeClr"] ?? tcTxStyle["a:schemeClr"];
54454
+ if (schemeClr) {
54455
+ const val = String(schemeClr["@_val"] || "").trim();
54456
+ if (val) {
54457
+ result.fontSchemeColor = val;
54458
+ hasProps = true;
54459
+ const tintNode = schemeClr["a:tint"];
54460
+ if (tintNode) {
54461
+ result.fontTint = parseInt(String(tintNode["@_val"] || "0"), 10) || void 0;
54462
+ }
54463
+ const shadeNode = schemeClr["a:shade"];
54464
+ if (shadeNode) {
54465
+ result.fontShade = parseInt(String(shadeNode["@_val"] || "0"), 10) || void 0;
54466
+ }
54467
+ }
54468
+ } else {
54469
+ const srgb = fontRef?.["a:srgbClr"] ?? tcTxStyle["a:srgbClr"];
54470
+ const hex10 = toHex3(srgb?.["@_val"]);
54471
+ if (hex10) {
54472
+ result.fontColor = hex10;
54473
+ hasProps = true;
54474
+ }
54475
+ }
54476
+ return hasProps ? result : void 0;
54477
+ }
53353
54478
  var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
53354
54479
  /**
53355
- * Export slides to a raster/vector format.
53356
- *
53357
- * This is a stub that signals export intent. Actual rendering requires a
53358
- * platform-specific canvas or PDF library (e.g. Puppeteer, node-canvas,
53359
- * pdfkit). Host applications should override or extend this method with
53360
- * their own rendering pipeline.
53361
- *
53362
- * @param _slides The slides to export.
53363
- * @param _options Export options (format, DPI, slide indices, etc.).
53364
- * @returns A map of slide index → exported binary data.
54480
+ * Export slides to a raster/vector format. This is a stub that signals
54481
+ * export intent; actual rendering requires a platform-specific canvas or
54482
+ * PDF backend that host applications wire in by overriding this method.
53365
54483
  */
53366
54484
  async exportSlides(slides, options) {
53367
54485
  this.compatibilityService.reportWarning({
@@ -53426,77 +54544,26 @@ var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
53426
54544
  }
53427
54545
  /**
53428
54546
  * Extract fill information from a table style section element
53429
- * (e.g. `a:wholeTbl`, `a:band1H`, `a:firstRow`).
54547
+ * (e.g. `a:wholeTbl`, `a:band1H`, `a:firstRow`). Handles scheme + sRGB
54548
+ * solids, gradients, preset patterns, and `a:noFill` (issue #95).
53430
54549
  */
53431
54550
  extractTableStyleSectionFill(section) {
53432
- if (!section) {
53433
- return void 0;
53434
- }
53435
- const tcStyle = section["a:tcStyle"];
53436
- if (!tcStyle) {
53437
- return void 0;
53438
- }
53439
- const fill = tcStyle["a:fill"];
53440
- if (!fill) {
53441
- return void 0;
53442
- }
53443
- const solidFill2 = fill["a:solidFill"];
53444
- if (!solidFill2) {
53445
- return void 0;
53446
- }
53447
- const schemeClr = solidFill2["a:schemeClr"];
53448
- if (!schemeClr) {
53449
- return void 0;
53450
- }
53451
- const schemeColor = String(schemeClr["@_val"] || "").trim() || void 0;
53452
- if (!schemeColor) {
53453
- return void 0;
53454
- }
53455
- const tintRaw = schemeClr["a:tint"];
53456
- const tint = tintRaw ? parseInt(String(tintRaw["@_val"] || "0"), 10) || void 0 : void 0;
53457
- const shadeRaw = schemeClr["a:shade"];
53458
- const shade = shadeRaw ? parseInt(String(shadeRaw["@_val"] || "0"), 10) || void 0 : void 0;
53459
- return { schemeColor, tint, shade };
54551
+ return parseTableStyleSectionFill(section);
54552
+ }
54553
+ /**
54554
+ * Extract border styling from a table style section's
54555
+ * `a:tcStyle/a:tcBdr` (per-side line width, dash, and colour).
54556
+ */
54557
+ extractTableStyleSectionBorders(section) {
54558
+ return parseTableStyleBorders(section?.["a:tcStyle"]);
53460
54559
  }
53461
54560
  /**
53462
- * Extract text properties from a:tcTxStyle in a table style section.
54561
+ * Extract text properties from `a:tcTxStyle` in a table style section.
54562
+ * Captures bold/italic/underline, typeface, font-collection index, and the
54563
+ * font colour (scheme or sRGB) (issue #95).
53463
54564
  */
53464
54565
  extractTableStyleSectionText(section) {
53465
- if (!section) {
53466
- return void 0;
53467
- }
53468
- const tcTxStyle = section["a:tcTxStyle"];
53469
- if (!tcTxStyle) {
53470
- return void 0;
53471
- }
53472
- const result = {};
53473
- let hasProps = false;
53474
- if (tcTxStyle["@_b"] === "on") {
53475
- result.bold = true;
53476
- hasProps = true;
53477
- }
53478
- if (tcTxStyle["@_i"] === "on") {
53479
- result.italic = true;
53480
- hasProps = true;
53481
- }
53482
- const fontClr = tcTxStyle["a:fontRef"];
53483
- const schemeClr = fontClr?.["a:schemeClr"] ?? tcTxStyle["a:schemeClr"];
53484
- if (schemeClr) {
53485
- const val = String(schemeClr["@_val"] || "").trim();
53486
- if (val) {
53487
- result.fontSchemeColor = val;
53488
- hasProps = true;
53489
- const tintNode = schemeClr["a:tint"];
53490
- if (tintNode) {
53491
- result.fontTint = parseInt(String(tintNode["@_val"] || "0"), 10) || void 0;
53492
- }
53493
- const shadeNode = schemeClr["a:shade"];
53494
- if (shadeNode) {
53495
- result.fontShade = parseInt(String(shadeNode["@_val"] || "0"), 10) || void 0;
53496
- }
53497
- }
53498
- }
53499
- return hasProps ? result : void 0;
54566
+ return parseTableStyleSectionText(section);
53500
54567
  }
53501
54568
  ensureArray(val) {
53502
54569
  if (!val) {
@@ -53603,6 +54670,15 @@ var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
53603
54670
  textProps[`${name}Text`] = text2;
53604
54671
  }
53605
54672
  }
54673
+ const borderProps = {};
54674
+ for (const name of sectionNames) {
54675
+ const borders = this.extractTableStyleSectionBorders(
54676
+ style[`a:${name}`]
54677
+ );
54678
+ if (borders) {
54679
+ borderProps[`${name}Borders`] = borders;
54680
+ }
54681
+ }
53606
54682
  const entry = {
53607
54683
  styleId,
53608
54684
  styleName,
@@ -53621,7 +54697,8 @@ var PptxHandlerRuntime2 = class extends PptxHandlerRuntime {
53621
54697
  ...swCellFill ? { swCellFill } : {},
53622
54698
  ...neCellFill ? { neCellFill } : {},
53623
54699
  ...nwCellFill ? { nwCellFill } : {},
53624
- ...textProps
54700
+ ...textProps,
54701
+ ...borderProps
53625
54702
  };
53626
54703
  map[styleId] = entry;
53627
54704
  }
@@ -54158,6 +55235,7 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
54158
55235
  );
54159
55236
  const trimStartMs = timing.trimStartMs ?? extData.trimStartMs;
54160
55237
  const trimEndMs = timing.trimEndMs ?? extData.trimEndMs;
55238
+ const mediaEmbedPath = extData.embedRId ? this.resolveRelationshipTarget(slidePath, extData.embedRId) : void 0;
54161
55239
  result.set(shapeId, {
54162
55240
  trimStartMs: trimStartMs !== void 0 && !isNaN(trimStartMs) ? trimStartMs : void 0,
54163
55241
  trimEndMs: trimEndMs !== void 0 && !isNaN(trimEndMs) ? trimEndMs : void 0,
@@ -54171,7 +55249,8 @@ var PptxHandlerRuntime6 = class extends PptxHandlerRuntime5 {
54171
55249
  playAcrossSlides: timing.playAcrossSlides || void 0,
54172
55250
  hideWhenNotPlaying: hideWhenNotPlaying || void 0,
54173
55251
  bookmarks: extData.bookmarks.length > 0 ? extData.bookmarks : void 0,
54174
- playbackSpeed: extData.playbackSpeed
55252
+ playbackSpeed: extData.playbackSpeed,
55253
+ mediaEmbedPath
54175
55254
  });
54176
55255
  }
54177
55256
  }
@@ -54345,6 +55424,10 @@ var PptxHandlerRuntime7 = class extends PptxHandlerRuntime6 {
54345
55424
  if (!timing) {
54346
55425
  continue;
54347
55426
  }
55427
+ if (timing.mediaEmbedPath && (typeof el.mediaPath !== "string" || el.mediaPath.length === 0)) {
55428
+ el.mediaPath = timing.mediaEmbedPath;
55429
+ el.mediaMimeType = this.getImageMimeType(timing.mediaEmbedPath);
55430
+ }
54348
55431
  if (timing.trimStartMs !== void 0) {
54349
55432
  el.trimStartMs = timing.trimStartMs;
54350
55433
  }
@@ -55343,7 +56426,7 @@ var PptxHandlerRuntime11 = class extends PptxHandlerRuntime10 {
55343
56426
  }
55344
56427
  }
55345
56428
  async reconcilePresentationSlidesForSave(params) {
55346
- await this.presentationSlidesReconciler.reconcile({
56429
+ return await this.presentationSlidesReconciler.reconcile({
55347
56430
  ...params,
55348
56431
  zip: this.zip,
55349
56432
  parser: this.parser,
@@ -55414,6 +56497,15 @@ var PptxHandlerRuntime11 = class extends PptxHandlerRuntime10 {
55414
56497
  if (align === "justify") {
55415
56498
  return "just";
55416
56499
  }
56500
+ if (align === "justLow") {
56501
+ return "justLow";
56502
+ }
56503
+ if (align === "dist") {
56504
+ return "dist";
56505
+ }
56506
+ if (align === "thaiDist") {
56507
+ return "thaiDist";
56508
+ }
55417
56509
  return void 0;
55418
56510
  }
55419
56511
  pixelsToPoints(px2) {
@@ -55623,6 +56715,31 @@ function applyFontMetadata(fontNode, panose, pitchFamily, charset) {
55623
56715
  }
55624
56716
  return fontNode;
55625
56717
  }
56718
+ function buildUnderlineLineXml(line2) {
56719
+ const uln = {};
56720
+ if (typeof line2.widthEmu === "number" && Number.isFinite(line2.widthEmu)) {
56721
+ uln["@_w"] = String(Math.round(line2.widthEmu));
56722
+ }
56723
+ if (line2.compound) {
56724
+ uln["@_cmpd"] = line2.compound;
56725
+ }
56726
+ if (line2.cap) {
56727
+ uln["@_cap"] = line2.cap;
56728
+ }
56729
+ if (line2.algn) {
56730
+ uln["@_algn"] = line2.algn;
56731
+ }
56732
+ if (line2.prstDash) {
56733
+ uln["a:prstDash"] = { "@_val": line2.prstDash };
56734
+ }
56735
+ if (line2.headEndXml) {
56736
+ uln["a:headEnd"] = line2.headEndXml;
56737
+ }
56738
+ if (line2.tailEndXml) {
56739
+ uln["a:tailEnd"] = line2.tailEndXml;
56740
+ }
56741
+ return uln;
56742
+ }
55626
56743
  var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime11 {
55627
56744
  createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId) {
55628
56745
  const runProps = {
@@ -55643,6 +56760,8 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
55643
56760
  }
55644
56761
  if (style.underline) {
55645
56762
  runProps["@_u"] = style.underlineStyle || "sng";
56763
+ } else if (style.underlineExplicitNone) {
56764
+ runProps["@_u"] = "none";
55646
56765
  }
55647
56766
  if (style.strikethrough !== void 0) {
55648
56767
  runProps["@_strike"] = style.strikethrough ? style.strikeType || "sngStrike" : "noStrike";
@@ -55658,6 +56777,8 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
55658
56777
  }
55659
56778
  if (style.textCaps && style.textCaps !== "none") {
55660
56779
  runProps["@_cap"] = style.textCaps;
56780
+ } else if (style.textCapsExplicitNone) {
56781
+ runProps["@_cap"] = "none";
55661
56782
  }
55662
56783
  if (style.kumimoji !== void 0) {
55663
56784
  runProps["@_kumimoji"] = style.kumimoji ? "1" : "0";
@@ -55766,13 +56887,21 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
55766
56887
  runProps["a:effectDag"] = style.textEffectDagXml;
55767
56888
  }
55768
56889
  if (style.highlightColor) {
55769
- runProps["a:highlight"] = {
55770
- "a:srgbClr": {
55771
- "@_val": style.highlightColor.replace("#", "")
55772
- }
55773
- };
56890
+ const resolvedHighlight = style.highlightColorXml ? this.parseColor(style.highlightColorXml) : void 0;
56891
+ runProps["a:highlight"] = serializeColorChoice(
56892
+ style.highlightColorXml,
56893
+ resolvedHighlight,
56894
+ style.highlightColor
56895
+ );
55774
56896
  }
55775
- if (style.underline && style.underlineColor) {
56897
+ if (style.underlineLineFollowsText) {
56898
+ runProps["a:uLnTx"] = {};
56899
+ } else if (style.underlineLine) {
56900
+ runProps["a:uLn"] = buildUnderlineLineXml(style.underlineLine);
56901
+ }
56902
+ if (style.underlineFillFollowsText) {
56903
+ runProps["a:uFillTx"] = {};
56904
+ } else if (style.underline && style.underlineColor) {
55776
56905
  runProps["a:uFill"] = {
55777
56906
  "a:solidFill": {
55778
56907
  "a:srgbClr": {
@@ -55781,21 +56910,28 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
55781
56910
  }
55782
56911
  };
55783
56912
  }
55784
- if (style.fontFamily) {
56913
+ const latinFace = style.latinFontThemeToken ?? style.fontFamily;
56914
+ if (latinFace) {
55785
56915
  runProps["a:latin"] = applyFontMetadata(
55786
- { "@_typeface": style.fontFamily },
56916
+ { "@_typeface": latinFace },
55787
56917
  style.latinFontPanose,
55788
56918
  style.latinFontPitchFamily,
55789
56919
  style.latinFontCharset
55790
56920
  );
56921
+ }
56922
+ const eastAsiaFace = style.eastAsiaFontThemeToken ?? style.eastAsiaFont;
56923
+ if (eastAsiaFace) {
55791
56924
  runProps["a:ea"] = applyFontMetadata(
55792
- { "@_typeface": style.eastAsiaFont || style.fontFamily },
56925
+ { "@_typeface": eastAsiaFace },
55793
56926
  style.eastAsiaFontPanose,
55794
56927
  style.eastAsiaFontPitchFamily,
55795
56928
  style.eastAsiaFontCharset
55796
56929
  );
56930
+ }
56931
+ const complexScriptFace = style.complexScriptFontThemeToken ?? style.complexScriptFont;
56932
+ if (complexScriptFace) {
55797
56933
  runProps["a:cs"] = applyFontMetadata(
55798
- { "@_typeface": style.complexScriptFont || style.fontFamily },
56934
+ { "@_typeface": complexScriptFace },
55799
56935
  style.complexScriptFontPanose,
55800
56936
  style.complexScriptFontPitchFamily,
55801
56937
  style.complexScriptFontCharset
@@ -55845,12 +56981,17 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
55845
56981
  if (mouseOverTarget.length > 0) {
55846
56982
  const mouseOverRelId = resolveHyperlinkRelationshipId(mouseOverTarget);
55847
56983
  if (mouseOverRelId) {
55848
- runProps["a:hlinkMouseOver"] = {
55849
- "@_r:id": mouseOverRelId
55850
- };
56984
+ const mouseOverNode = { "@_r:id": mouseOverRelId };
56985
+ if (style.hyperlinkMouseOverSoundXml && typeof style.hyperlinkMouseOverSoundXml === "object") {
56986
+ mouseOverNode["a:snd"] = style.hyperlinkMouseOverSoundXml;
56987
+ }
56988
+ runProps["a:hlinkMouseOver"] = mouseOverNode;
55851
56989
  }
55852
56990
  }
55853
56991
  }
56992
+ if (style.runPropertiesExtLstXml && typeof style.runPropertiesExtLstXml === "object") {
56993
+ runProps["a:extLst"] = style.runPropertiesExtLstXml;
56994
+ }
55854
56995
  return runProps;
55855
56996
  }
55856
56997
  applyHyperlinkExtraAttrs(hlinkNode, style) {
@@ -55869,20 +57010,24 @@ var PptxHandlerRuntime12 = class _PptxHandlerRuntime2 extends PptxHandlerRuntime
55869
57010
  if (style.hyperlinkEndSound !== void 0) {
55870
57011
  hlinkNode["@_endSnd"] = style.hyperlinkEndSound ? "1" : "0";
55871
57012
  }
57013
+ if (style.hyperlinkSoundXml && typeof style.hyperlinkSoundXml === "object") {
57014
+ hlinkNode["a:snd"] = style.hyperlinkSoundXml;
57015
+ }
55872
57016
  }
55873
57017
  };
55874
57018
  var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
55875
57019
  createParagraphsFromTextContent(text2, textStyle, textSegments, resolveHyperlinkRelationshipId) {
55876
- const paragraphAlign = this.textAlignToDrawingValue(textStyle?.align);
55877
- const spacing = {
55878
- spacingBefore: this.createParagraphSpacingXmlFromPx(textStyle?.paragraphSpacingBefore),
55879
- spacingAfter: this.createParagraphSpacingXmlFromPx(textStyle?.paragraphSpacingAfter),
55880
- lineSpacing: this.createLineSpacingXmlFromMultiplier(textStyle?.lineSpacing),
55881
- lineSpacingExactPt: textStyle?.lineSpacingExactPt
55882
- };
55883
- const createParagraph = (runs, bulletInfo, level, endParaRunProperties) => {
57020
+ const createParagraph = (runs, bulletInfo, level, endParaRunProperties, paragraphProperties2) => {
57021
+ const effectiveStyle = paragraphProperties2 ? { ...textStyle, ...paragraphProperties2 } : textStyle;
57022
+ const paragraphAlign = this.textAlignToDrawingValue(effectiveStyle?.align);
57023
+ const spacing = {
57024
+ spacingBefore: this.createParagraphSpacingXmlFromPx(effectiveStyle?.paragraphSpacingBefore),
57025
+ spacingAfter: this.createParagraphSpacingXmlFromPx(effectiveStyle?.paragraphSpacingAfter),
57026
+ lineSpacing: this.createLineSpacingXmlFromMultiplier(effectiveStyle?.lineSpacing),
57027
+ lineSpacingExactPt: effectiveStyle?.lineSpacingExactPt
57028
+ };
55884
57029
  const paragraphProps = buildParagraphPropertiesXml(
55885
- textStyle,
57030
+ effectiveStyle,
55886
57031
  paragraphAlign,
55887
57032
  bulletInfo,
55888
57033
  spacing,
@@ -55894,12 +57039,22 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
55894
57039
  "a:rPr": this.createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId),
55895
57040
  "a:t": runText
55896
57041
  });
55897
- const createFieldRun = (runText, style, fieldType, fieldGuid) => ({
55898
- "@_type": fieldType,
55899
- ...fieldGuid ? { "@_id": fieldGuid } : {},
55900
- "a:rPr": this.createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId),
55901
- "a:t": runText
55902
- });
57042
+ const createFieldRun = (runText, style, fieldType, fieldGuid, fieldGuidAttr, fieldParagraphPropertiesXml) => {
57043
+ const fld = { "@_type": fieldType };
57044
+ if (fieldGuid) {
57045
+ if (fieldGuidAttr === "uuid") {
57046
+ fld["@_uuid"] = fieldGuid;
57047
+ } else {
57048
+ fld["@_id"] = fieldGuid;
57049
+ }
57050
+ }
57051
+ fld["a:rPr"] = this.createRunPropertiesFromTextStyle(style, resolveHyperlinkRelationshipId);
57052
+ if (fieldParagraphPropertiesXml && typeof fieldParagraphPropertiesXml === "object") {
57053
+ fld["a:pPr"] = fieldParagraphPropertiesXml;
57054
+ }
57055
+ fld["a:t"] = runText;
57056
+ return fld;
57057
+ };
55903
57058
  const createRubyRun = (segment, style) => {
55904
57059
  const rubyPr = {};
55905
57060
  if (segment.rubyAlignment) {
@@ -55938,17 +57093,27 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
55938
57093
  let currentBulletInfo;
55939
57094
  let currentLevel;
55940
57095
  let currentEndParaRunProperties;
57096
+ let currentParagraphProperties;
57097
+ let capturedParagraphMeta = false;
55941
57098
  const pushParagraph = () => {
55942
57099
  if (currentRuns.length === 0) {
55943
57100
  currentRuns.push(createRun("", textStyle));
55944
57101
  }
55945
57102
  paragraphs.push(
55946
- createParagraph(currentRuns, currentBulletInfo, currentLevel, currentEndParaRunProperties)
57103
+ createParagraph(
57104
+ currentRuns,
57105
+ currentBulletInfo,
57106
+ currentLevel,
57107
+ currentEndParaRunProperties,
57108
+ currentParagraphProperties
57109
+ )
55947
57110
  );
55948
57111
  currentRuns = [];
55949
57112
  currentBulletInfo = void 0;
55950
57113
  currentLevel = void 0;
55951
57114
  currentEndParaRunProperties = void 0;
57115
+ currentParagraphProperties = void 0;
57116
+ capturedParagraphMeta = false;
55952
57117
  };
55953
57118
  if (textSegments && textSegments.length > 0) {
55954
57119
  const uniformSegmentOverrides = computeUniformSegmentOverrides(textStyle, textSegments);
@@ -55958,7 +57123,7 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
55958
57123
  ...segment.style,
55959
57124
  ...uniformSegmentOverrides
55960
57125
  };
55961
- if (currentRuns.length === 0) {
57126
+ if (!capturedParagraphMeta) {
55962
57127
  if (segment.bulletInfo) {
55963
57128
  currentBulletInfo = segment.bulletInfo;
55964
57129
  }
@@ -55968,6 +57133,10 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
55968
57133
  if (segment.endParaRunProperties) {
55969
57134
  currentEndParaRunProperties = segment.endParaRunProperties;
55970
57135
  }
57136
+ if (segment.paragraphProperties) {
57137
+ currentParagraphProperties = segment.paragraphProperties;
57138
+ }
57139
+ capturedParagraphMeta = true;
55971
57140
  }
55972
57141
  if (segment.isLineBreak) {
55973
57142
  const brNode = {};
@@ -56002,7 +57171,9 @@ var PptxHandlerRuntime13 = class extends PptxHandlerRuntime12 {
56002
57171
  linePart,
56003
57172
  segmentStyle,
56004
57173
  segment.fieldType,
56005
- segment.fieldGuid
57174
+ segment.fieldGuid,
57175
+ segment.fieldGuidAttr,
57176
+ segment.fieldParagraphPropertiesXml
56006
57177
  );
56007
57178
  fieldRun.__isField = true;
56008
57179
  currentRuns.push(fieldRun);
@@ -56458,6 +57629,16 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime3 extends PptxHandlerRuntime
56458
57629
  const chOffY = 0;
56459
57630
  const chExtCx = extCx;
56460
57631
  const chExtCy = extCy;
57632
+ const xfrmAttrs = {};
57633
+ if (typeof group.rotation === "number" && group.rotation !== 0) {
57634
+ xfrmAttrs["@_rot"] = String(Math.round(group.rotation * 6e4));
57635
+ }
57636
+ if (group.flipHorizontal) {
57637
+ xfrmAttrs["@_flipH"] = "1";
57638
+ }
57639
+ if (group.flipVertical) {
57640
+ xfrmAttrs["@_flipV"] = "1";
57641
+ }
56461
57642
  const grpXml = {
56462
57643
  "p:nvGrpSpPr": {
56463
57644
  "p:cNvPr": { "@_id": "0", "@_name": group.id },
@@ -56466,6 +57647,7 @@ var PptxHandlerRuntime15 = class _PptxHandlerRuntime3 extends PptxHandlerRuntime
56466
57647
  },
56467
57648
  "p:grpSpPr": {
56468
57649
  "a:xfrm": {
57650
+ ...xfrmAttrs,
56469
57651
  "a:off": {
56470
57652
  "@_x": String(offX),
56471
57653
  "@_y": String(offY)
@@ -56748,7 +57930,95 @@ var PptxHandlerRuntime16 = class extends PptxHandlerRuntime15 {
56748
57930
  );
56749
57931
  }
56750
57932
  };
57933
+ var SCRIPT_CANDIDATES = {
57934
+ cjk: ["Hans", "Hant", "Jpan", "Hang"],
57935
+ kana: ["Jpan", "Hans", "Hant"],
57936
+ hangul: ["Hang"],
57937
+ arabic: ["Arab"],
57938
+ hebrew: ["Hebr"],
57939
+ thai: ["Thai"]
57940
+ };
57941
+ function aggregateFontScriptOverrides(perPathMap) {
57942
+ const aggregate = {};
57943
+ for (const overrides10 of perPathMap.values()) {
57944
+ for (const [script, typeface] of Object.entries(overrides10)) {
57945
+ if (!(script in aggregate)) {
57946
+ aggregate[script] = typeface;
57947
+ }
57948
+ }
57949
+ }
57950
+ return aggregate;
57951
+ }
57952
+ function detectDominantScript(text2) {
57953
+ const counts = {};
57954
+ for (const ch of text2) {
57955
+ const code = ch.codePointAt(0) ?? 0;
57956
+ let cat;
57957
+ if (code >= 4352 && code <= 4607) {
57958
+ cat = "hangul";
57959
+ } else if (code >= 44032 && code <= 55215) {
57960
+ cat = "hangul";
57961
+ } else if (code >= 12352 && code <= 12543) {
57962
+ cat = "kana";
57963
+ } else if (code >= 19968 && code <= 40959 || code >= 13312 && code <= 19903 || code >= 63744 && code <= 64255) {
57964
+ cat = "cjk";
57965
+ } else if (code >= 1536 && code <= 1791) {
57966
+ cat = "arabic";
57967
+ } else if (code >= 1424 && code <= 1535) {
57968
+ cat = "hebrew";
57969
+ } else if (code >= 3584 && code <= 3711) {
57970
+ cat = "thai";
57971
+ }
57972
+ if (cat) {
57973
+ counts[cat] = (counts[cat] ?? 0) + 1;
57974
+ }
57975
+ }
57976
+ let best;
57977
+ let bestCount = 0;
57978
+ for (const [cat, count] of Object.entries(counts)) {
57979
+ if (count > bestCount) {
57980
+ best = cat;
57981
+ bestCount = count;
57982
+ }
57983
+ }
57984
+ return best;
57985
+ }
56751
57986
  var PptxHandlerRuntime17 = class extends PptxHandlerRuntime16 {
57987
+ /**
57988
+ * Resolve the automatic per-script fallback face for a run's text from the
57989
+ * theme's `<a:font script="...">` overrides (#83). Body (minor) fonts win
57990
+ * over heading (major) fonts. Returns `undefined` when the deck declares no
57991
+ * script overrides or the text needs no fallback.
57992
+ */
57993
+ resolveScriptFallbackFont(text2) {
57994
+ if (!text2) {
57995
+ return void 0;
57996
+ }
57997
+ if (this.masterThemeMinorFontScripts.size === 0 && this.masterThemeMajorFontScripts.size === 0) {
57998
+ return void 0;
57999
+ }
58000
+ const category = detectDominantScript(text2);
58001
+ if (!category) {
58002
+ return void 0;
58003
+ }
58004
+ const candidates = SCRIPT_CANDIDATES[category];
58005
+ if (!candidates) {
58006
+ return void 0;
58007
+ }
58008
+ const minor = aggregateFontScriptOverrides(this.masterThemeMinorFontScripts);
58009
+ for (const key of candidates) {
58010
+ if (minor[key]) {
58011
+ return minor[key];
58012
+ }
58013
+ }
58014
+ const major = aggregateFontScriptOverrides(this.masterThemeMajorFontScripts);
58015
+ for (const key of candidates) {
58016
+ if (major[key]) {
58017
+ return major[key];
58018
+ }
58019
+ }
58020
+ return void 0;
58021
+ }
56752
58022
  textStylesEqual(left, right) {
56753
58023
  const keys = [
56754
58024
  "fontFamily",
@@ -56907,6 +58177,10 @@ var PptxHandlerRuntime18 = class extends PptxHandlerRuntime17 {
56907
58177
  const esVal = String(endSnd).trim().toLowerCase();
56908
58178
  style.hyperlinkEndSound = esVal === "1" || esVal === "true";
56909
58179
  }
58180
+ const clickSnd = hyperlinkNode["a:snd"];
58181
+ if (clickSnd && typeof clickSnd === "object") {
58182
+ style.hyperlinkSoundXml = clickSnd;
58183
+ }
56910
58184
  }
56911
58185
  const actionStr = String(hyperlinkNode?.["@_action"] || "").trim();
56912
58186
  if (actionStr) {
@@ -56936,6 +58210,10 @@ var PptxHandlerRuntime18 = class extends PptxHandlerRuntime17 {
56936
58210
  } else {
56937
58211
  style.hyperlinkMouseOver = mouseOverRelId;
56938
58212
  }
58213
+ const mouseOverSnd = hlinkMouseOver["a:snd"];
58214
+ if (mouseOverSnd && typeof mouseOverSnd === "object") {
58215
+ style.hyperlinkMouseOverSoundXml = mouseOverSnd;
58216
+ }
56939
58217
  }
56940
58218
  }
56941
58219
  }
@@ -57160,6 +58438,8 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57160
58438
  if (rawU.length > 0 && rawU !== "none") {
57161
58439
  style.underlineStyle = rawU;
57162
58440
  }
58441
+ } else if (underlineToken === "none") {
58442
+ style.underlineExplicitNone = true;
57163
58443
  }
57164
58444
  }
57165
58445
  const uFill = runProperties2["a:uFill"];
@@ -57171,6 +58451,46 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57171
58451
  style.underlineColor = underlineColor;
57172
58452
  }
57173
58453
  }
58454
+ if (uLn) {
58455
+ const line2 = {};
58456
+ const widthEmu = Number.parseInt(String(uLn["@_w"] ?? ""), 10);
58457
+ if (Number.isFinite(widthEmu)) {
58458
+ line2.widthEmu = widthEmu;
58459
+ }
58460
+ const compound = String(uLn["@_cmpd"] ?? "").trim();
58461
+ if (compound) {
58462
+ line2.compound = compound;
58463
+ }
58464
+ const cap = String(uLn["@_cap"] ?? "").trim();
58465
+ if (cap) {
58466
+ line2.cap = cap;
58467
+ }
58468
+ const algn = String(uLn["@_algn"] ?? "").trim();
58469
+ if (algn) {
58470
+ line2.algn = algn;
58471
+ }
58472
+ const prstDash = String(uLn["a:prstDash"]?.["@_val"] ?? "").trim();
58473
+ if (prstDash) {
58474
+ line2.prstDash = prstDash;
58475
+ }
58476
+ const headEnd = uLn["a:headEnd"];
58477
+ if (headEnd && typeof headEnd === "object") {
58478
+ line2.headEndXml = headEnd;
58479
+ }
58480
+ const tailEnd = uLn["a:tailEnd"];
58481
+ if (tailEnd && typeof tailEnd === "object") {
58482
+ line2.tailEndXml = tailEnd;
58483
+ }
58484
+ if (Object.keys(line2).length > 0) {
58485
+ style.underlineLine = line2;
58486
+ }
58487
+ }
58488
+ if (runProperties2["a:uLnTx"] !== void 0) {
58489
+ style.underlineLineFollowsText = true;
58490
+ }
58491
+ if (runProperties2["a:uFillTx"] !== void 0) {
58492
+ style.underlineFillFollowsText = true;
58493
+ }
57174
58494
  if (runProperties2["@_strike"] !== void 0) {
57175
58495
  const strikeToken = String(runProperties2["@_strike"] || "").trim().toLowerCase();
57176
58496
  style.strikethrough = strikeToken.length > 0 && strikeToken !== "nostrike" && strikeToken !== "none" && strikeToken !== "0" && strikeToken !== "false";
@@ -57214,10 +58534,15 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57214
58534
  }
57215
58535
  }
57216
58536
  if (runProperties2["a:highlight"]) {
57217
- const highlightHex = this.parseColor(xmlChild(runProperties2, "a:highlight"));
58537
+ const highlightNode = xmlChild(runProperties2, "a:highlight");
58538
+ const highlightHex = this.parseColor(highlightNode);
57218
58539
  if (highlightHex) {
57219
58540
  style.highlightColor = highlightHex;
57220
58541
  }
58542
+ const highlightXml = extractColorChoiceXml(highlightNode);
58543
+ if (highlightXml) {
58544
+ style.highlightColorXml = highlightXml;
58545
+ }
57221
58546
  }
57222
58547
  const textFillVariants = this.extractTextFillVariants(runProperties2);
57223
58548
  if (textFillVariants.textFillGradient) {
@@ -57238,16 +58563,28 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57238
58563
  const latin = xmlChild(runProperties2, "a:latin");
57239
58564
  const eastAsian = xmlChild(runProperties2, "a:ea");
57240
58565
  const complexScript = xmlChild(runProperties2, "a:cs");
57241
- const chosenTypeface = xmlAttr(latin, "typeface") || xmlAttr(eastAsian, "typeface") || xmlAttr(complexScript, "typeface");
58566
+ const latinTypefaceToken = xmlAttr(latin, "typeface");
58567
+ const eaTypefaceToken = xmlAttr(eastAsian, "typeface");
58568
+ const csTypefaceToken = xmlAttr(complexScript, "typeface");
58569
+ const chosenTypeface = latinTypefaceToken || eaTypefaceToken || csTypefaceToken;
57242
58570
  const resolvedTypeface = this.resolveThemeTypeface(chosenTypeface);
57243
58571
  if (resolvedTypeface) {
57244
58572
  style.fontFamily = resolvedTypeface;
57245
58573
  }
57246
- const eaTypeface = this.resolveThemeTypeface(xmlAttr(eastAsian, "typeface"));
58574
+ if (latinTypefaceToken && latinTypefaceToken.startsWith("+")) {
58575
+ style.latinFontThemeToken = latinTypefaceToken;
58576
+ }
58577
+ if (eaTypefaceToken && eaTypefaceToken.startsWith("+")) {
58578
+ style.eastAsiaFontThemeToken = eaTypefaceToken;
58579
+ }
58580
+ if (csTypefaceToken && csTypefaceToken.startsWith("+")) {
58581
+ style.complexScriptFontThemeToken = csTypefaceToken;
58582
+ }
58583
+ const eaTypeface = this.resolveThemeTypeface(eaTypefaceToken);
57247
58584
  if (eaTypeface) {
57248
58585
  style.eastAsiaFont = eaTypeface;
57249
58586
  }
57250
- const csTypeface = this.resolveThemeTypeface(xmlAttr(complexScript, "typeface"));
58587
+ const csTypeface = this.resolveThemeTypeface(csTypefaceToken);
57251
58588
  if (csTypeface) {
57252
58589
  style.complexScriptFont = csTypeface;
57253
58590
  }
@@ -57263,6 +58600,9 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57263
58600
  const capAttr = String(runProperties2["@_cap"] || "").trim().toLowerCase();
57264
58601
  if (capAttr === "all" || capAttr === "small") {
57265
58602
  style.textCaps = capAttr;
58603
+ } else if (capAttr === "none") {
58604
+ style.textCaps = "none";
58605
+ style.textCapsExplicitNone = true;
57266
58606
  }
57267
58607
  const symNode = xmlChild(runProperties2, "a:sym");
57268
58608
  if (symNode) {
@@ -57322,6 +58662,12 @@ var PptxHandlerRuntime19 = class _PptxHandlerRuntime4 extends PptxHandlerRuntime
57322
58662
  this.applyTextRunEffects(style, runEffectList);
57323
58663
  }
57324
58664
  this.applyTextRunEffectDag(style, runProperties2);
58665
+ if (includeDefaultAlignment) {
58666
+ const runExtLst = runProperties2["a:extLst"];
58667
+ if (runExtLst && typeof runExtLst === "object") {
58668
+ style.runPropertiesExtLstXml = runExtLst;
58669
+ }
58670
+ }
57325
58671
  return style;
57326
58672
  }
57327
58673
  /**
@@ -57985,12 +59331,63 @@ function writeCellTextFormatting(xmlCell, style, ensureArray16) {
57985
59331
  }
57986
59332
  }
57987
59333
  }
59334
+ function flattenCellTxBodyText(txBody, ensureArray16) {
59335
+ if (!txBody) {
59336
+ return "";
59337
+ }
59338
+ const paragraphs = ensureArray16(txBody["a:p"]);
59339
+ const lines = [];
59340
+ for (const paragraph of paragraphs) {
59341
+ const runs = ensureArray16(paragraph?.["a:r"]);
59342
+ const fields = ensureArray16(paragraph?.["a:fld"]);
59343
+ let lineText = "";
59344
+ for (const run of runs) {
59345
+ lineText += String(run?.["a:t"] ?? "");
59346
+ }
59347
+ for (const field of fields) {
59348
+ lineText += String(field?.["a:t"] ?? "");
59349
+ }
59350
+ lines.push(lineText);
59351
+ }
59352
+ return lines.join("\n");
59353
+ }
59354
+ function isRichCellTxBody(txBody, ensureArray16) {
59355
+ if (!txBody) {
59356
+ return false;
59357
+ }
59358
+ const paragraphs = ensureArray16(txBody["a:p"]);
59359
+ let totalRuns = 0;
59360
+ for (const paragraph of paragraphs) {
59361
+ const runs = ensureArray16(paragraph?.["a:r"]);
59362
+ totalRuns += runs.length;
59363
+ if (totalRuns > 1) {
59364
+ return true;
59365
+ }
59366
+ if (ensureArray16(paragraph?.["a:fld"]).length > 0) {
59367
+ return true;
59368
+ }
59369
+ for (const run of runs) {
59370
+ const rPr = run?.["a:rPr"];
59371
+ if (rPr?.["a:hlinkClick"] !== void 0) {
59372
+ return true;
59373
+ }
59374
+ }
59375
+ }
59376
+ return false;
59377
+ }
57988
59378
  var PptxHandlerRuntime22 = class _PptxHandlerRuntime5 extends PptxHandlerRuntime21 {
57989
59379
  /**
57990
59380
  * Write plain text into a table cell's txBody, preserving
57991
59381
  * existing run properties where possible.
57992
59382
  */
57993
59383
  writeTableCellText(xmlCell, text2) {
59384
+ const ensureArray16 = this.ensureArray.bind(this);
59385
+ const existingTxBody = xmlCell["a:txBody"];
59386
+ if (existingTxBody && ensureArray16(existingTxBody["a:p"]).length > 0) {
59387
+ if (flattenCellTxBodyText(existingTxBody, ensureArray16) === text2) {
59388
+ return;
59389
+ }
59390
+ }
57994
59391
  if (!xmlCell["a:txBody"]) {
57995
59392
  xmlCell["a:txBody"] = { "a:bodyPr": {}, "a:p": {} };
57996
59393
  }
@@ -58118,7 +59515,9 @@ var PptxHandlerRuntime22 = class _PptxHandlerRuntime5 extends PptxHandlerRuntime
58118
59515
  }
58119
59516
  delete tcPr["a:tcMar"];
58120
59517
  writeDiagonalBorders(tcPr, style, _PptxHandlerRuntime5.EMU_PER_PX);
58121
- writeCellTextFormatting(xmlCell, style, this.ensureArray.bind(this));
59518
+ if (!isRichCellTxBody(xmlCell["a:txBody"], this.ensureArray.bind(this))) {
59519
+ writeCellTextFormatting(xmlCell, style, this.ensureArray.bind(this));
59520
+ }
58122
59521
  const reordered = reorderObjectKeys(tcPr, TC_PR_BORDERS_ORDER);
58123
59522
  for (const key of Object.keys(tcPr)) {
58124
59523
  delete tcPr[key];
@@ -59787,7 +61186,7 @@ function findKey19(obj, name, getLocalName2) {
59787
61186
  function hex9(value) {
59788
61187
  return value.replace("#", "");
59789
61188
  }
59790
- var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
61189
+ var COLOR_LOCAL_NAMES2 = /* @__PURE__ */ new Set([
59791
61190
  "srgbClr",
59792
61191
  "schemeClr",
59793
61192
  "sysClr",
@@ -59796,7 +61195,7 @@ var COLOR_LOCAL_NAMES = /* @__PURE__ */ new Set([
59796
61195
  "hslClr"
59797
61196
  ]);
59798
61197
  function applyColorToList(list, value, getLocalName2) {
59799
- const colorKey = Object.keys(list).find((k) => COLOR_LOCAL_NAMES.has(getLocalName2(k)));
61198
+ const colorKey = Object.keys(list).find((k) => COLOR_LOCAL_NAMES2.has(getLocalName2(k)));
59800
61199
  const srgb = { "@_val": hex9(value) };
59801
61200
  if (!colorKey) {
59802
61201
  list["a:srgbClr"] = srgb;
@@ -62259,6 +63658,31 @@ var PptxHandlerRuntime27 = class extends PptxHandlerRuntime26 {
62259
63658
  return shape;
62260
63659
  }
62261
63660
  };
63661
+ function writeLineFill(lineNode, shapeStyle, parseColor) {
63662
+ delete lineNode["a:noFill"];
63663
+ delete lineNode["a:solidFill"];
63664
+ delete lineNode["a:gradFill"];
63665
+ delete lineNode["a:pattFill"];
63666
+ if (shapeStyle.strokeColor === "transparent" || shapeStyle.strokeWidth === 0) {
63667
+ lineNode["a:noFill"] = {};
63668
+ return;
63669
+ }
63670
+ if (shapeStyle.strokeFillMode === "gradient" && shapeStyle.strokeGradientXml) {
63671
+ lineNode["a:gradFill"] = shapeStyle.strokeGradientXml;
63672
+ return;
63673
+ }
63674
+ if (shapeStyle.strokeFillMode === "pattern" && shapeStyle.strokePatternXml) {
63675
+ lineNode["a:pattFill"] = shapeStyle.strokePatternXml;
63676
+ return;
63677
+ }
63678
+ const resolvedStrokeOriginal = shapeStyle.strokeColorXml ? parseColor(shapeStyle.strokeColorXml) : void 0;
63679
+ lineNode["a:solidFill"] = serializeColorChoice(
63680
+ shapeStyle.strokeColorXml,
63681
+ resolvedStrokeOriginal,
63682
+ shapeStyle.strokeColor ?? "#000000",
63683
+ shapeStyle.strokeOpacity
63684
+ );
63685
+ }
62262
63686
  var PptxHandlerRuntime28 = class _PptxHandlerRuntime8 extends PptxHandlerRuntime27 {
62263
63687
  /**
62264
63688
  * Serialize shape fill, stroke, dash, arrows, line join/cap/compound,
@@ -62328,26 +63752,14 @@ var PptxHandlerRuntime28 = class _PptxHandlerRuntime8 extends PptxHandlerRuntime
62328
63752
  );
62329
63753
  }
62330
63754
  }
62331
- if (shapeStyle.strokeColor !== void 0) {
63755
+ if (shapeStyle.strokeColor !== void 0 || shapeStyle.strokeFillMode === "gradient" || shapeStyle.strokeFillMode === "pattern") {
62332
63756
  if (!spPr["a:ln"]) {
62333
63757
  spPr["a:ln"] = {};
62334
63758
  }
62335
63759
  const lineNode = spPr["a:ln"];
62336
63760
  const w = Math.round((shapeStyle.strokeWidth || 1) * _PptxHandlerRuntime8.EMU_PER_PX);
62337
63761
  lineNode["@_w"] = String(w);
62338
- if (shapeStyle.strokeColor === "transparent" || shapeStyle.strokeWidth === 0) {
62339
- lineNode["a:noFill"] = {};
62340
- delete lineNode["a:solidFill"];
62341
- } else {
62342
- delete lineNode["a:noFill"];
62343
- const resolvedStrokeOriginal = shapeStyle.strokeColorXml ? this.parseColor(shapeStyle.strokeColorXml) : void 0;
62344
- lineNode["a:solidFill"] = serializeColorChoice(
62345
- shapeStyle.strokeColorXml,
62346
- resolvedStrokeOriginal,
62347
- shapeStyle.strokeColor,
62348
- shapeStyle.strokeOpacity
62349
- );
62350
- }
63762
+ this.applyLineFill(lineNode, shapeStyle);
62351
63763
  }
62352
63764
  if (shapeStyle.strokeDash !== void 0) {
62353
63765
  if (!spPr["a:ln"]) {
@@ -62437,6 +63849,15 @@ var PptxHandlerRuntime28 = class _PptxHandlerRuntime8 extends PptxHandlerRuntime
62437
63849
  spPr["a:ln"]["a:effectLst"] = lineEffectListXml;
62438
63850
  }
62439
63851
  }
63852
+ /**
63853
+ * Emit the single fill child of an `<a:ln>` (CT_LineProperties allows at
63854
+ * most one of noFill/solidFill/gradFill/pattFill). Delegates to
63855
+ * {@link writeLineFill} so the logic stays unit-testable without the full
63856
+ * save runtime (issue #87).
63857
+ */
63858
+ applyLineFill(lineNode, shapeStyle) {
63859
+ writeLineFill(lineNode, shapeStyle, (colorNode) => this.parseColor(colorNode));
63860
+ }
62440
63861
  /**
62441
63862
  * Serialize the shape's `<p:style>` block (CT_ShapeStyle §20.1.2.2.36)
62442
63863
  * from the persisted ref indices/colour XML. Emits children in spec
@@ -62590,45 +64011,18 @@ var PptxHandlerRuntime29 = class extends PptxHandlerRuntime28 {
62590
64011
  const s3d = shapeStyle.scene3d;
62591
64012
  const hasData = s3d.cameraPreset || s3d.lightRigType;
62592
64013
  if (hasData) {
62593
- const cameraObj = {};
62594
- if (s3d.cameraPreset) {
62595
- cameraObj["@_prst"] = s3d.cameraPreset;
62596
- }
62597
- if (s3d.cameraRotX !== void 0 || s3d.cameraRotY !== void 0 || s3d.cameraRotZ !== void 0) {
62598
- const rot = {};
62599
- if (s3d.cameraRotX !== void 0) {
62600
- rot["@_lat"] = String(s3d.cameraRotX);
62601
- }
62602
- if (s3d.cameraRotY !== void 0) {
62603
- rot["@_lon"] = String(s3d.cameraRotY);
62604
- }
62605
- if (s3d.cameraRotZ !== void 0) {
62606
- rot["@_rev"] = String(s3d.cameraRotZ);
62607
- }
62608
- cameraObj["a:rot"] = rot;
62609
- }
62610
- const lightRigObj = {};
62611
- if (s3d.lightRigType) {
62612
- lightRigObj["@_rig"] = s3d.lightRigType;
62613
- }
62614
- if (s3d.lightRigDirection) {
62615
- lightRigObj["@_dir"] = s3d.lightRigDirection;
62616
- }
62617
- const scene3dXml = {};
62618
- scene3dXml["a:camera"] = cameraObj;
62619
- if (Object.keys(lightRigObj).length > 0) {
62620
- scene3dXml["a:lightRig"] = lightRigObj;
62621
- }
62622
- if (s3d.hasBackdrop) {
62623
- const backdropObj = {};
62624
- if (s3d.backdropAnchorX !== void 0 || s3d.backdropAnchorY !== void 0 || s3d.backdropAnchorZ !== void 0) {
62625
- backdropObj["a:anchor"] = {
62626
- "@_x": String(s3d.backdropAnchorX ?? 0),
62627
- "@_y": String(s3d.backdropAnchorY ?? 0),
62628
- "@_z": String(s3d.backdropAnchorZ ?? 0)
62629
- };
62630
- }
62631
- scene3dXml["a:backdrop"] = backdropObj;
64014
+ const source = spPr["a:scene3d"] ?? {};
64015
+ const scene3dXml = { ...source };
64016
+ scene3dXml["a:camera"] = buildScene3dCamera(s3d, source);
64017
+ const lightRig = buildScene3dLightRig(s3d, source);
64018
+ if (lightRig) {
64019
+ scene3dXml["a:lightRig"] = lightRig;
64020
+ }
64021
+ const backdrop = buildScene3dBackdrop(s3d);
64022
+ if (backdrop) {
64023
+ scene3dXml["a:backdrop"] = backdrop;
64024
+ } else {
64025
+ delete scene3dXml["a:backdrop"];
62632
64026
  }
62633
64027
  spPr["a:scene3d"] = scene3dXml;
62634
64028
  } else {
@@ -62673,12 +64067,12 @@ var PptxHandlerRuntime29 = class extends PptxHandlerRuntime28 {
62673
64067
  }
62674
64068
  if (sh3d.extrusionColor) {
62675
64069
  sp3dXml["a:extrusionClr"] = {
62676
- "a:srgbClr": { "@_val": sh3d.extrusionColor }
64070
+ "a:srgbClr": { "@_val": sh3d.extrusionColor.replace("#", "") }
62677
64071
  };
62678
64072
  }
62679
64073
  if (sh3d.contourColor) {
62680
64074
  sp3dXml["a:contourClr"] = {
62681
- "a:srgbClr": { "@_val": sh3d.contourColor }
64075
+ "a:srgbClr": { "@_val": sh3d.contourColor.replace("#", "") }
62682
64076
  };
62683
64077
  }
62684
64078
  spPr["a:sp3d"] = sp3dXml;
@@ -62690,6 +64084,77 @@ var PptxHandlerRuntime29 = class extends PptxHandlerRuntime28 {
62690
64084
  }
62691
64085
  }
62692
64086
  };
64087
+ function buildSphereRot(lat, lon, rev) {
64088
+ if (lat === void 0 && lon === void 0 && rev === void 0) {
64089
+ return void 0;
64090
+ }
64091
+ const rot = {};
64092
+ if (lat !== void 0) {
64093
+ rot["@_lat"] = String(lat);
64094
+ }
64095
+ if (lon !== void 0) {
64096
+ rot["@_lon"] = String(lon);
64097
+ }
64098
+ if (rev !== void 0) {
64099
+ rot["@_rev"] = String(rev);
64100
+ }
64101
+ return rot;
64102
+ }
64103
+ function buildScene3dCamera(s3d, source) {
64104
+ const camera = { ...source["a:camera"] ?? {} };
64105
+ if (s3d.cameraPreset) {
64106
+ camera["@_prst"] = s3d.cameraPreset;
64107
+ }
64108
+ if (s3d.cameraFieldOfView !== void 0) {
64109
+ camera["@_fov"] = String(s3d.cameraFieldOfView);
64110
+ }
64111
+ if (s3d.cameraZoom !== void 0) {
64112
+ camera["@_zoom"] = String(s3d.cameraZoom);
64113
+ }
64114
+ const rot = buildSphereRot(s3d.cameraRotX, s3d.cameraRotY, s3d.cameraRotZ);
64115
+ if (rot) {
64116
+ camera["a:rot"] = rot;
64117
+ }
64118
+ return camera;
64119
+ }
64120
+ function buildScene3dLightRig(s3d, source) {
64121
+ const lightRig = { ...source["a:lightRig"] ?? {} };
64122
+ if (s3d.lightRigType) {
64123
+ lightRig["@_rig"] = s3d.lightRigType;
64124
+ }
64125
+ if (s3d.lightRigDirection) {
64126
+ lightRig["@_dir"] = s3d.lightRigDirection;
64127
+ }
64128
+ const rot = buildSphereRot(s3d.lightRigRotX, s3d.lightRigRotY, s3d.lightRigRotZ);
64129
+ if (rot) {
64130
+ lightRig["a:rot"] = rot;
64131
+ }
64132
+ return Object.keys(lightRig).length > 0 ? lightRig : void 0;
64133
+ }
64134
+ function buildScene3dBackdrop(s3d) {
64135
+ const hasNorm = s3d.backdropNormalX !== void 0 || s3d.backdropNormalY !== void 0 || s3d.backdropNormalZ !== void 0;
64136
+ const hasUp = s3d.backdropUpX !== void 0 || s3d.backdropUpY !== void 0 || s3d.backdropUpZ !== void 0;
64137
+ if (!s3d.hasBackdrop || !hasNorm || !hasUp) {
64138
+ return void 0;
64139
+ }
64140
+ return {
64141
+ "a:anchor": {
64142
+ "@_x": String(s3d.backdropAnchorX ?? 0),
64143
+ "@_y": String(s3d.backdropAnchorY ?? 0),
64144
+ "@_z": String(s3d.backdropAnchorZ ?? 0)
64145
+ },
64146
+ "a:norm": {
64147
+ "@_dx": String(s3d.backdropNormalX ?? 0),
64148
+ "@_dy": String(s3d.backdropNormalY ?? 0),
64149
+ "@_dz": String(s3d.backdropNormalZ ?? 0)
64150
+ },
64151
+ "a:up": {
64152
+ "@_dx": String(s3d.backdropUpX ?? 0),
64153
+ "@_dy": String(s3d.backdropUpY ?? 0),
64154
+ "@_dz": String(s3d.backdropUpZ ?? 0)
64155
+ }
64156
+ };
64157
+ }
62693
64158
  var PptxHandlerRuntime30 = class _PptxHandlerRuntime9 extends PptxHandlerRuntime29 {
62694
64159
  /**
62695
64160
  * Build and write the text body (`p:txBody`) for shapes, text boxes,
@@ -64704,14 +66169,20 @@ var PptxHandlerRuntime41 = class _PptxHandlerRuntime17 extends PptxHandlerRuntim
64704
66169
  relationshipType: constants.slideSyncRelationshipType,
64705
66170
  contentType: constants.slideSyncContentType
64706
66171
  });
64707
- this.slideBackgroundBuilder.applyBackground({
66172
+ await this.slideBackgroundBuilder.applyBackground({
64708
66173
  slideNode,
64709
66174
  slide,
64710
66175
  zip: this.zip,
64711
66176
  saveState: saveSession,
64712
66177
  relationshipRegistry: slideRelationshipRegistry,
64713
66178
  slideImageRelationshipType: constants.slideImageRelationshipType,
64714
- parseDataUrlToBytes: (dataUrl) => this.parseDataUrlToBytes(dataUrl)
66179
+ resolveImageToBytes: (url) => this.resolveMediaToBytes(url),
66180
+ reportUnsupportedBackground: (imageUrl) => this.compatibilityService.reportWarning({
66181
+ code: "SAVE_BACKGROUND_IMAGE_UNSUPPORTED",
66182
+ message: `Slide background image could not be embedded and was preserved as-is or omitted: ${imageUrl.slice(0, 120)}`,
66183
+ scope: "save",
66184
+ slideId: slide.id
66185
+ })
64715
66186
  });
64716
66187
  this.slideCommentPartWriter.writeComments({
64717
66188
  slide,
@@ -66196,7 +67667,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
66196
67667
  } = saveConstants;
66197
67668
  this.compatibilityService.resetWarnings();
66198
67669
  const saveSession = new PptxSaveStateBuilder().withZip(this.zip).withCommentAuthorMap(this.commentAuthorMap).withCommentAuthorDetails(this.commentAuthorDetails).withCommentAuthorsRootXml(this.commentAuthorsRootXml).withEmuPerPx(_PptxHandlerRuntime18.EMU_PER_PX).build();
66199
- await this.reconcilePresentationSlidesForSave({
67670
+ const slideReferenceRemap = await this.reconcilePresentationSlidesForSave({
66200
67671
  slides,
66201
67672
  saveSession,
66202
67673
  slideRelationshipType,
@@ -66291,7 +67762,8 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
66291
67762
  rawSlideWidthEmu: this.rawSlideWidthEmu,
66292
67763
  rawSlideHeightEmu: this.rawSlideHeightEmu,
66293
67764
  rawSlideSizeType: this.rawSlideSizeType,
66294
- xmlLookupService: this.xmlLookupService
67765
+ xmlLookupService: this.xmlLookupService,
67766
+ slideReferenceRemap
66295
67767
  });
66296
67768
  this.deduplicateExtensionLists(this.presentationData);
66297
67769
  if (effectiveConformance === "transitional") {
@@ -66308,7 +67780,7 @@ var PptxHandlerRuntime51 = class _PptxHandlerRuntime18 extends PptxHandlerRuntim
66308
67780
  printSlidesPerPage: options.handoutMaster.slidesPerPage
66309
67781
  } : options?.presentationProperties;
66310
67782
  await this.applyPresentationPropertiesPart(presentationProperties);
66311
- await this.applyViewPropertiesPart(options?.viewProperties);
67783
+ await this.applyViewPropertiesPart(options?.viewProperties ?? this.loadedViewProperties);
66312
67784
  await this.applyTableStylesPart(options?.tableStyles);
66313
67785
  await this.documentPropertiesUpdater.updateOnSave(slides, {
66314
67786
  coreProperties: options?.coreProperties,
@@ -66594,26 +68066,16 @@ var PptxHandlerRuntime52 = class _PptxHandlerRuntime19 extends PptxHandlerRuntim
66594
68066
  return true;
66595
68067
  }
66596
68068
  const typesMatch = source.type === target.type || source.type === "ctrtitle" && target.type === "title" || source.type === "subtitle" && target.type === "body";
66597
- if (source.idx !== void 0 && target.idx !== void 0) {
66598
- if (source.idx !== target.idx) {
66599
- return false;
66600
- }
66601
- if (source.type && target.type && !typesMatch) {
66602
- return false;
66603
- }
66604
- return true;
66605
- }
66606
- if (source.idx !== void 0 && target.idx === void 0) {
66607
- const singletonTypes = /* @__PURE__ */ new Set(["title", "ctrtitle", "subtitle", "dt", "ftr", "sldnum"]);
66608
- if (source.type && singletonTypes.has(source.type)) {
66609
- return typesMatch;
66610
- }
68069
+ const sourceIdx = source.idx ?? "0";
68070
+ const targetIdx = target.idx ?? "0";
68071
+ if (sourceIdx !== targetIdx) {
66611
68072
  return false;
66612
68073
  }
66613
68074
  if (source.type && target.type && !typesMatch) {
66614
68075
  return false;
66615
68076
  }
66616
- if (source.type && !target.type) {
68077
+ const bothHaveExplicitIdx = source.idx !== void 0 && target.idx !== void 0;
68078
+ if (!bothHaveExplicitIdx && source.type && !target.type) {
66617
68079
  return false;
66618
68080
  }
66619
68081
  return true;
@@ -68041,6 +69503,19 @@ var PptxHandlerRuntime61 = class _PptxHandlerRuntime25 extends PptxHandlerRuntim
68041
69503
  });
68042
69504
  return hasAny ? locks : void 0;
68043
69505
  }
69506
+ /**
69507
+ * Parse the `@txBox` attribute from a `p:cNvSpPr` node. Returns `true` /
69508
+ * `false` when the attribute is present, or `undefined` when absent so
69509
+ * callers can distinguish "not a text box" from "unspecified".
69510
+ */
69511
+ parseTxBoxFlag(cNvSpPr) {
69512
+ const raw = cNvSpPr?.["@_txBox"];
69513
+ if (raw === void 0) {
69514
+ return void 0;
69515
+ }
69516
+ const val = String(raw).trim().toLowerCase();
69517
+ return val === "1" || val === "true";
69518
+ }
68044
69519
  /**
68045
69520
  * Extract body-level text properties from `a:bodyPr` and apply them to the
68046
69521
  * provided {@link TextStyle}. Returns linked-textbox info when present.
@@ -68221,6 +69696,62 @@ var PptxHandlerRuntime61 = class _PptxHandlerRuntime25 extends PptxHandlerRuntim
68221
69696
  }
68222
69697
  };
68223
69698
  var PptxHandlerRuntime62 = class _PptxHandlerRuntime26 extends PptxHandlerRuntime61 {
69699
+ /**
69700
+ * Extract a paragraph's OWN `a:pPr` geometry (align, spacing, margins,
69701
+ * indent, tabs, rtl) as a partial {@link TextStyle} so per-paragraph
69702
+ * formatting round-trips rather than collapsing to one shape-level pPr
69703
+ * (#69). Inherited layout/master values are not re-stamped.
69704
+ */
69705
+ extractParagraphOwnProperties(p, basisFontSize) {
69706
+ const pPr = p["a:pPr"];
69707
+ if (!pPr) {
69708
+ return void 0;
69709
+ }
69710
+ const pp = { ...parseParagraphMargins(pPr) };
69711
+ const align = pPr["@_algn"] !== void 0 ? parseAlignmentAttr2(String(pPr["@_algn"])) : void 0;
69712
+ if (align) {
69713
+ pp.align = align;
69714
+ }
69715
+ const rtl = parseParagraphRtl(pPr);
69716
+ if (rtl !== void 0) {
69717
+ pp.rtl = rtl;
69718
+ }
69719
+ const spcBef = this.parseParagraphSpacingPx(
69720
+ pPr["a:spcBef"],
69721
+ basisFontSize
69722
+ );
69723
+ if (spcBef !== void 0) {
69724
+ pp.paragraphSpacingBefore = spcBef;
69725
+ }
69726
+ const spcAft = this.parseParagraphSpacingPx(
69727
+ pPr["a:spcAft"],
69728
+ basisFontSize
69729
+ );
69730
+ if (spcAft !== void 0) {
69731
+ pp.paragraphSpacingAfter = spcAft;
69732
+ }
69733
+ const lnSpcNode = pPr["a:lnSpc"];
69734
+ const lineSpacing = this.parseLineSpacingMultiplier(lnSpcNode);
69735
+ const exactPt = lineSpacing === void 0 ? this.parseLineSpacingExactPt(lnSpcNode) : void 0;
69736
+ if (lineSpacing !== void 0) {
69737
+ pp.lineSpacing = lineSpacing;
69738
+ } else if (exactPt !== void 0) {
69739
+ pp.lineSpacingExactPt = exactPt;
69740
+ }
69741
+ const tabStops = parseTabStops(pPr);
69742
+ if (tabStops && tabStops.length > 0) {
69743
+ pp.tabStops = tabStops;
69744
+ }
69745
+ const defRPr = pPr["a:defRPr"];
69746
+ if (defRPr && typeof defRPr === "object") {
69747
+ pp.paragraphDefaultRunPropertiesXml = defRPr;
69748
+ }
69749
+ const pPrExtLst = pPr["a:extLst"];
69750
+ if (pPrExtLst && typeof pPrExtLst === "object") {
69751
+ pp.paragraphPropertiesExtLstXml = pPrExtLst;
69752
+ }
69753
+ return Object.keys(pp).length > 0 ? pp : void 0;
69754
+ }
68224
69755
  /**
68225
69756
  * Resolve paragraph-level styles (alignment, spacing, margins, tabs,
68226
69757
  * level styles) for a single paragraph. Modifies `textStyle` in place
@@ -68467,6 +69998,12 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
68467
69998
  ...mergedDefaultRunStyle,
68468
69999
  ...this.extractTextRunStyle(runProps, paraAlign, ctx.slideRelationshipMap)
68469
70000
  };
70001
+ if (!runStyle2.scriptFallbackFont) {
70002
+ const fallback = this.resolveScriptFallbackFont(runText);
70003
+ if (fallback) {
70004
+ runStyle2.scriptFallbackFont = fallback;
70005
+ }
70006
+ }
68470
70007
  parts.push(runText);
68471
70008
  segments.push({ text: runText, style: runStyle2 });
68472
70009
  maybeSeed(runStyle2);
@@ -68508,14 +70045,25 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
68508
70045
  )
68509
70046
  };
68510
70047
  const fldType = String(field["@_type"] || "").trim() || void 0;
68511
- const fldGuid = String(field["@_uuid"] || field["@_id"] || "").trim() || void 0;
70048
+ const uuidAttr = String(field["@_uuid"] || "").trim();
70049
+ const idAttr = String(field["@_id"] || "").trim();
70050
+ const fldGuid = uuidAttr || idAttr || void 0;
70051
+ const fldGuidAttr = uuidAttr ? "uuid" : idAttr ? "id" : void 0;
68512
70052
  parts.push(fieldText);
68513
- segments.push({
70053
+ const fieldSegment = {
68514
70054
  text: fieldText,
68515
70055
  style: fieldRunStyle,
68516
70056
  fieldType: fldType,
68517
70057
  fieldGuid: fldGuid
68518
- });
70058
+ };
70059
+ if (fldGuidAttr) {
70060
+ fieldSegment.fieldGuidAttr = fldGuidAttr;
70061
+ }
70062
+ const fieldPPr = field["a:pPr"];
70063
+ if (fieldPPr && typeof fieldPPr === "object") {
70064
+ fieldSegment.fieldParagraphPropertiesXml = fieldPPr;
70065
+ }
70066
+ segments.push(fieldSegment);
68519
70067
  maybeSeed(fieldRunStyle);
68520
70068
  };
68521
70069
  const processMathElement = (mathEl) => {
@@ -68642,6 +70190,11 @@ var PptxHandlerRuntime63 = class extends PptxHandlerRuntime62 {
68642
70190
  ...endParaRPrRaw
68643
70191
  };
68644
70192
  }
70193
+ const basisFontSize = typeof mergedDefaultRunStyle.fontSize === "number" ? mergedDefaultRunStyle.fontSize : void 0;
70194
+ const paragraphOwnProps = this.extractParagraphOwnProperties(p, basisFontSize);
70195
+ if (paragraphOwnProps) {
70196
+ segments[firstSegmentIndex].paragraphProperties = paragraphOwnProps;
70197
+ }
68645
70198
  }
68646
70199
  return { parts, segments, seedStyle };
68647
70200
  }
@@ -68948,7 +70501,11 @@ var PptxHandlerRuntime64 = class _PptxHandlerRuntime27 extends PptxHandlerRuntim
68948
70501
  const inheritedCNvSpPr = xmlPath(inheritedPlaceholder?.shape, "p:nvSpPr", "p:cNvSpPr") ?? xmlPath(inheritedPlaceholder?.picture, "p:nvPicPr", "p:cNvPicPr");
68949
70502
  const inheritedLockNode = inheritedCNvSpPr?.["a:spLocks"] ?? inheritedCNvSpPr?.["a:picLocks"];
68950
70503
  const inheritedLocks = this.parseShapeLocks(inheritedLockNode);
68951
- const locks = inheritedLocks ? { ...inheritedLocks, ...slideLocks } : slideLocks;
70504
+ let locks = inheritedLocks ? { ...inheritedLocks, ...slideLocks } : slideLocks;
70505
+ const txBox = this.parseTxBoxFlag(cNvSpPr);
70506
+ if (txBox !== void 0) {
70507
+ locks = { ...locks ?? {}, txBox };
70508
+ }
68952
70509
  const promptText = !hasText && phDefaults?.promptText ? phDefaults.promptText : void 0;
68953
70510
  const opaqueExtLstXml = this.extractOpaqueSpPrExtLst(effectiveSpPr);
68954
70511
  const commonProps = {
@@ -69045,7 +70602,7 @@ var PptxHandlerRuntime65 = class _PptxHandlerRuntime28 extends PptxHandlerRuntim
69045
70602
  const skewY = xfrm["@_skewY"] ? parseEmuInt(xfrm["@_skewY"]) / 6e4 : void 0;
69046
70603
  const { flipHorizontal, flipVertical } = this.readFlipState(xfrm);
69047
70604
  const nvPr = pic?.["p:nvPicPr"]?.["p:nvPr"];
69048
- const mediaReference = parseDrawingMediaReference(nvPr);
70605
+ const mediaReference = parseDrawingMediaReference(nvPr, this.externalRelsMap.get(slidePath));
69049
70606
  if (mediaReference) {
69050
70607
  this.compatibilityService.inspectMediaReferenceCompatibility(
69051
70608
  mediaReference.kind,
@@ -69809,6 +71366,9 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
69809
71366
  const grpSpPr = group["p:grpSpPr"];
69810
71367
  const xfrm = grpSpPr?.["a:xfrm"];
69811
71368
  let parentX = 0, parentY = 0, parentW = 0, parentH = 0;
71369
+ let groupRotation;
71370
+ let flipHorizontal = false;
71371
+ let flipVertical = false;
69812
71372
  if (xfrm) {
69813
71373
  const off = xfrm["a:off"];
69814
71374
  if (off) {
@@ -69820,6 +71380,12 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
69820
71380
  parentW = Math.round(parseEmuInt2(ext["@_cx"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69821
71381
  parentH = Math.round(parseEmuInt2(ext["@_cy"]) / _PptxHandlerRuntime30.EMU_PER_PX);
69822
71382
  }
71383
+ if (xfrm["@_rot"] !== void 0 && xfrm["@_rot"] !== null) {
71384
+ const rot = parseInt(String(xfrm["@_rot"]), 10) / 6e4;
71385
+ groupRotation = Number.isFinite(rot) && rot !== 0 ? rot : void 0;
71386
+ }
71387
+ flipHorizontal = this.parseBooleanAttr(xfrm["@_flipH"]);
71388
+ flipVertical = this.parseBooleanAttr(xfrm["@_flipV"]);
69823
71389
  }
69824
71390
  const grpFillStyle = grpSpPr ? this.extractShapeStyle(grpSpPr) : void 0;
69825
71391
  const hasGroupFill = grpFillStyle && grpFillStyle.fillMode && grpFillStyle.fillMode !== "none";
@@ -69865,6 +71431,9 @@ var PptxHandlerRuntime67 = class _PptxHandlerRuntime30 extends PptxHandlerRuntim
69865
71431
  y: parentY,
69866
71432
  width: parentW || Math.max(...children10.map((c) => c.x + c.width)),
69867
71433
  height: parentH || Math.max(...children10.map((c) => c.y + c.height)),
71434
+ rotation: groupRotation,
71435
+ flipHorizontal: flipHorizontal || void 0,
71436
+ flipVertical: flipVertical || void 0,
69868
71437
  children: children10,
69869
71438
  rawXml: group,
69870
71439
  actionClick: grpActionClick,
@@ -70871,9 +72440,9 @@ var PptxHandlerRuntime72 = class _PptxHandlerRuntime31 extends PptxHandlerRuntim
70871
72440
  }
70872
72441
  const buClr = levelProps["a:buClr"];
70873
72442
  if (buClr) {
70874
- const srgb = buClr["a:srgbClr"];
70875
- if (srgb?.["@_val"]) {
70876
- style.bulletColor = String(srgb["@_val"]);
72443
+ const bulletColor = this.parseColor(buClr);
72444
+ if (bulletColor) {
72445
+ style.bulletColor = bulletColor;
70877
72446
  }
70878
72447
  }
70879
72448
  const buSzPts = levelProps["a:buSzPts"];
@@ -72457,16 +74026,20 @@ var PptxHandlerRuntime80 = class extends PptxHandlerRuntime79 {
72457
74026
  }
72458
74027
  let fontScheme;
72459
74028
  if (hasFonts) {
74029
+ const majorByScript = this.aggregateFontScriptOverrides(this.masterThemeMajorFontScripts);
74030
+ const minorByScript = this.aggregateFontScriptOverrides(this.masterThemeMinorFontScripts);
72460
74031
  fontScheme = {
72461
74032
  majorFont: {
72462
74033
  latin: this.themeFontMap["mj-lt"],
72463
74034
  eastAsia: this.themeFontMap["mj-ea"],
72464
- complexScript: this.themeFontMap["mj-cs"]
74035
+ complexScript: this.themeFontMap["mj-cs"],
74036
+ ...Object.keys(majorByScript).length > 0 ? { byScript: majorByScript } : {}
72465
74037
  },
72466
74038
  minorFont: {
72467
74039
  latin: this.themeFontMap["mn-lt"],
72468
74040
  eastAsia: this.themeFontMap["mn-ea"],
72469
- complexScript: this.themeFontMap["mn-cs"]
74041
+ complexScript: this.themeFontMap["mn-cs"],
74042
+ ...Object.keys(minorByScript).length > 0 ? { byScript: minorByScript } : {}
72470
74043
  }
72471
74044
  };
72472
74045
  }
@@ -72674,6 +74247,23 @@ var PptxHandlerRuntime80 = class extends PptxHandlerRuntime79 {
72674
74247
  *
72675
74248
  * Phase 4 Stream A / M4.
72676
74249
  */
74250
+ /**
74251
+ * Flatten a per-theme-path script-override map (`themePath -> {script ->
74252
+ * typeface}`) into a single `{script -> typeface}` lookup for
74253
+ * {@link buildThemeObject}. Earlier entries win on collision, which matches
74254
+ * the primary-theme-first parse order. Phase 4 Stream A / M4 (#83).
74255
+ */
74256
+ aggregateFontScriptOverrides(perPathMap) {
74257
+ const aggregate = {};
74258
+ for (const overrides10 of perPathMap.values()) {
74259
+ for (const [script, typeface] of Object.entries(overrides10)) {
74260
+ if (!(script in aggregate)) {
74261
+ aggregate[script] = typeface;
74262
+ }
74263
+ }
74264
+ }
74265
+ return aggregate;
74266
+ }
72677
74267
  collectFontScriptOverrides(fontNode) {
72678
74268
  const overrides10 = {};
72679
74269
  if (!fontNode) {
@@ -73303,33 +74893,16 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
73303
74893
  const metadata = parseSmartArtDefinitionMetadata(colorsDef, localName22);
73304
74894
  const labels = parseSmartArtColorStyleLabels(colorsDef, localName22);
73305
74895
  const name = metadata.titles?.[0]?.value || String(colorsDef["@_title"] || colorsDef["@_uniqueId"] || "").trim() || void 0;
73306
- const fillColors = [];
73307
- const lineColors = [];
73308
74896
  const styleLbls = this.xmlLookupService.getChildrenArrayByLocalName(colorsDef, "styleLbl");
73309
- for (const lbl of styleLbls) {
73310
- const fillClrLst = this.xmlLookupService.getChildByLocalName(lbl, "fillClrLst");
73311
- const linClrLst = this.xmlLookupService.getChildByLocalName(lbl, "linClrLst");
73312
- if (fillClrLst) {
73313
- const color2 = this.parseColor(fillClrLst) ?? this.resolveSmartArtSchemeColor(
73314
- this.xmlLookupService.getChildByLocalName(fillClrLst, "schemeClr")
73315
- );
73316
- if (color2) {
73317
- fillColors.push(color2);
73318
- }
73319
- }
73320
- if (linClrLst) {
73321
- const color2 = this.parseColor(linClrLst) ?? this.resolveSmartArtSchemeColor(
73322
- this.xmlLookupService.getChildByLocalName(linClrLst, "schemeClr")
73323
- );
73324
- if (color2) {
73325
- lineColors.push(color2);
73326
- }
73327
- }
73328
- }
73329
- if (fillColors.length === 0 && lineColors.length === 0) {
74897
+ const colorLists = buildSmartArtColorLists(styleLbls, {
74898
+ getChild: (node, childName) => this.xmlLookupService.getChildByLocalName(node, childName),
74899
+ parseColorChoice: (colorChoice) => this.parseColor(colorChoice),
74900
+ resolveScheme: (colorNode) => this.resolveSmartArtSchemeColor(colorNode)
74901
+ });
74902
+ if (colorLists.fillColors.length === 0 && colorLists.lineColors.length === 0) {
73330
74903
  return void 0;
73331
74904
  }
73332
- return { ...metadata, name, fillColors, lineColors, labels };
74905
+ return { ...metadata, name, ...colorLists, labels };
73333
74906
  } catch {
73334
74907
  return void 0;
73335
74908
  }
@@ -73352,6 +74925,87 @@ var PptxHandlerRuntime83 = class extends PptxHandlerRuntime82 {
73352
74925
  return void 0;
73353
74926
  }
73354
74927
  };
74928
+ function extractDrawingShapeFill(spPr, deps) {
74929
+ const result = {};
74930
+ const solidFill2 = deps.getChild(spPr, "solidFill");
74931
+ if (solidFill2) {
74932
+ result.fillColor = deps.parseColor(solidFill2) ?? void 0;
74933
+ }
74934
+ const gradFill = !solidFill2 ? deps.getChild(spPr, "gradFill") : void 0;
74935
+ if (gradFill) {
74936
+ const stops = deps.extractGradientStops(gradFill).map((stop) => ({
74937
+ color: stop.color,
74938
+ position: stop.position,
74939
+ ...stop.opacity !== void 0 ? { opacity: stop.opacity } : {}
74940
+ }));
74941
+ if (stops.length > 0) {
74942
+ result.fillGradientStops = stops;
74943
+ result.fillGradientType = deps.extractGradientType(gradFill);
74944
+ result.fillGradientAngle = deps.extractGradientAngle(gradFill);
74945
+ result.fillColor ??= stops[Math.floor(stops.length / 2)]?.color;
74946
+ }
74947
+ }
74948
+ const pattFill = !solidFill2 && !gradFill ? deps.getChild(spPr, "pattFill") : void 0;
74949
+ if (pattFill) {
74950
+ const preset = String(pattFill["@_prst"] || "").trim();
74951
+ if (preset) {
74952
+ result.fillPatternPreset = preset;
74953
+ }
74954
+ const fg = deps.parseColor(deps.getChild(pattFill, "fgClr"));
74955
+ const bg = deps.parseColor(deps.getChild(pattFill, "bgClr"));
74956
+ if (fg) {
74957
+ result.fillPatternForegroundColor = fg;
74958
+ }
74959
+ if (bg) {
74960
+ result.fillPatternBackgroundColor = bg;
74961
+ }
74962
+ result.fillColor ??= fg ?? bg;
74963
+ }
74964
+ const blipFill = !solidFill2 && !gradFill && !pattFill ? deps.getChild(spPr, "blipFill") : void 0;
74965
+ if (blipFill) {
74966
+ const blip = deps.getChild(blipFill, "blip");
74967
+ const embed = String(
74968
+ blip?.["@_r:embed"] || blip?.["@_embed"] || blip?.["@_r:link"] || ""
74969
+ ).trim();
74970
+ if (embed) {
74971
+ result.fillBlipEmbedId = embed;
74972
+ }
74973
+ }
74974
+ const shadowColor = deps.extractShadowColor(spPr);
74975
+ if (shadowColor) {
74976
+ result.hasShadow = true;
74977
+ result.shadowColor = shadowColor;
74978
+ }
74979
+ return result;
74980
+ }
74981
+ function extractDrawingShapeTextStyle(txBody, deps) {
74982
+ let fontSize;
74983
+ let fontColor;
74984
+ if (!txBody) {
74985
+ return { fontSize, fontColor };
74986
+ }
74987
+ const paragraphs = deps.getChildren(txBody, "p");
74988
+ for (const p of paragraphs) {
74989
+ const runs = deps.getChildren(p, "r");
74990
+ for (const r of runs) {
74991
+ const rPr = deps.getChild(r, "rPr");
74992
+ if (rPr && !fontSize) {
74993
+ const szRaw = parseInt(String(rPr["@_sz"] || ""), 10);
74994
+ if (Number.isFinite(szRaw) && szRaw > 0) {
74995
+ fontSize = szRaw / 100;
74996
+ }
74997
+ fontColor = deps.parseColor(deps.getChild(rPr, "solidFill")) ?? void 0;
74998
+ }
74999
+ if (fontSize) {
75000
+ break;
75001
+ }
75002
+ }
75003
+ if (fontSize) {
75004
+ break;
75005
+ }
75006
+ }
75007
+ return { fontSize, fontColor };
75008
+ }
73355
75009
  function resolveSmartArtTextStyles(paragraphs, resolve) {
73356
75010
  for (const paragraph of paragraphs ?? []) {
73357
75011
  if (paragraph.endParaRPr) {
@@ -73524,8 +75178,7 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
73524
75178
  };
73525
75179
  }
73526
75180
  }
73527
- const solidFill2 = this.xmlLookupService.getChildByLocalName(spPr, "solidFill");
73528
- const fillColor = this.parseColor(solidFill2);
75181
+ const fill = extractDrawingShapeFill(spPr, this.drawingShapeStyleDeps());
73529
75182
  const lnNode = this.xmlLookupService.getChildByLocalName(spPr, "ln");
73530
75183
  const lnFill = lnNode ? this.xmlLookupService.getChildByLocalName(lnNode, "solidFill") : void 0;
73531
75184
  const strokeColor = this.parseColor(lnFill);
@@ -73537,7 +75190,10 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
73537
75190
  this.collectLocalTextValues(txBody, "t", textValues2);
73538
75191
  }
73539
75192
  const text2 = textValues2.join("").trim() || void 0;
73540
- const { fontSize, fontColor } = this.extractDrawingShapeTextStyle(txBody);
75193
+ const { fontSize, fontColor } = extractDrawingShapeTextStyle(
75194
+ txBody,
75195
+ this.drawingShapeStyleDeps()
75196
+ );
73541
75197
  const paragraphs = txBody ? resolveSmartArtTextStyles(
73542
75198
  parseSmartArtTextParagraphs({ "dgm:t": txBody }),
73543
75199
  (rPr) => this.extractTextRunStyle(rPr, void 0, void 0, false)
@@ -73563,7 +75219,8 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
73563
75219
  rotation,
73564
75220
  skewX,
73565
75221
  skewY,
73566
- fillColor: fillColor ?? void 0,
75222
+ ...fill,
75223
+ fillColor: fill.fillColor ?? void 0,
73567
75224
  strokeColor: strokeColor ?? void 0,
73568
75225
  strokeWidth,
73569
75226
  text: structuredText,
@@ -73573,36 +75230,124 @@ var PptxHandlerRuntime84 = class _PptxHandlerRuntime35 extends PptxHandlerRuntim
73573
75230
  ...customGeometry
73574
75231
  };
73575
75232
  }
73576
- extractDrawingShapeTextStyle(txBody) {
73577
- let fontSize;
73578
- let fontColor;
73579
- if (!txBody) {
73580
- return { fontSize, fontColor };
73581
- }
73582
- const paragraphs = this.xmlLookupService.getChildrenArrayByLocalName(txBody, "p");
73583
- for (const p of paragraphs) {
73584
- const runs = this.xmlLookupService.getChildrenArrayByLocalName(p, "r");
73585
- for (const r of runs) {
73586
- const rPr = this.xmlLookupService.getChildByLocalName(r, "rPr");
73587
- if (rPr && !fontSize) {
73588
- const szRaw = parseInt(String(rPr["@_sz"] || ""), 10);
73589
- if (Number.isFinite(szRaw) && szRaw > 0) {
73590
- fontSize = szRaw / 100;
73591
- }
73592
- const rprFill = this.xmlLookupService.getChildByLocalName(rPr, "solidFill");
73593
- fontColor = this.parseColor(rprFill) ?? void 0;
73594
- }
73595
- if (fontSize) {
73596
- break;
73597
- }
73598
- }
73599
- if (fontSize) {
73600
- break;
75233
+ /**
75234
+ * Build the injected accessor bundle used by the pure drawing-shape style
75235
+ * helpers, binding the shared XML-lookup / colour / gradient / shadow codec
75236
+ * methods so no new colour logic is duplicated here.
75237
+ */
75238
+ drawingShapeStyleDeps() {
75239
+ return {
75240
+ getChild: (node, local) => this.xmlLookupService.getChildByLocalName(node, local),
75241
+ getChildren: (node, local) => this.xmlLookupService.getChildrenArrayByLocalName(node, local),
75242
+ parseColor: (node) => this.parseColor(node),
75243
+ extractGradientStops: (gradFill) => this.extractGradientStops(gradFill),
75244
+ extractGradientType: (gradFill) => this.extractGradientType(gradFill),
75245
+ extractGradientAngle: (gradFill) => this.extractGradientAngle(gradFill),
75246
+ extractShadowColor: (spPr) => this.extractShadowStyle(spPr).shadowColor
75247
+ };
75248
+ }
75249
+ };
75250
+ function collectDrawingShapeNodes(root, getChildren) {
75251
+ const out = [];
75252
+ const walk = (container) => {
75253
+ if (!container) {
75254
+ return;
75255
+ }
75256
+ for (const sp of getChildren(container, "sp")) {
75257
+ out.push({ node: sp, isPic: false });
75258
+ }
75259
+ for (const pic of getChildren(container, "pic")) {
75260
+ out.push({ node: pic, isPic: true });
75261
+ }
75262
+ for (const grp of getChildren(container, "grpSp")) {
75263
+ walk(grp);
75264
+ }
75265
+ };
75266
+ walk(root);
75267
+ return out;
75268
+ }
75269
+ function picBlipEmbedId(pic, getChild) {
75270
+ const blip = getChild(getChild(pic, "blipFill"), "blip");
75271
+ if (!blip) {
75272
+ return void 0;
75273
+ }
75274
+ const embed = String(blip["@_r:embed"] || blip["@_embed"] || blip["@_r:link"] || "").trim();
75275
+ return embed.length > 0 ? embed : void 0;
75276
+ }
75277
+ function parseDrawingRelTargets(relsXml, parse, ensureArray16) {
75278
+ const map = /* @__PURE__ */ new Map();
75279
+ try {
75280
+ const relsRoot = parse(relsXml)["Relationships"];
75281
+ if (!relsRoot) {
75282
+ return map;
75283
+ }
75284
+ for (const rel of ensureArray16(relsRoot["Relationship"])) {
75285
+ const id = String(rel?.["@_Id"] || "").trim();
75286
+ const target = String(rel?.["@_Target"] || "").trim();
75287
+ if (id.length > 0 && target.length > 0) {
75288
+ map.set(id, target);
73601
75289
  }
73602
75290
  }
73603
- return { fontSize, fontColor };
75291
+ } catch {
73604
75292
  }
73605
- };
75293
+ return map;
75294
+ }
75295
+ async function resolveDrawingBlipFills(shapes, drawingPath, deps) {
75296
+ const pending = shapes.filter((shape) => shape.fillBlipEmbedId && !shape.fillImageUrl);
75297
+ if (pending.length === 0) {
75298
+ return;
75299
+ }
75300
+ const dir = drawingPath.replace(/\/[^/]+$/u, "");
75301
+ const file = drawingPath.split("/").pop() ?? "";
75302
+ const relsXml = await deps.readText(`${dir}/_rels/${file}.rels`);
75303
+ if (!relsXml) {
75304
+ return;
75305
+ }
75306
+ const targets = parseDrawingRelTargets(relsXml, deps.parse, deps.ensureArray);
75307
+ for (const shape of pending) {
75308
+ const target = targets.get(shape.fillBlipEmbedId ?? "");
75309
+ if (!target) {
75310
+ continue;
75311
+ }
75312
+ const source = /^(?:https?:|data:)/u.test(target) ? target : deps.resolveImagePath(drawingPath, target);
75313
+ const resolved = await deps.getImageData(source);
75314
+ if (resolved) {
75315
+ shape.fillImageUrl = resolved;
75316
+ }
75317
+ }
75318
+ }
75319
+ async function parseDrawingShapesFromPart(drawingPath, deps) {
75320
+ const xmlString = await deps.readText(drawingPath);
75321
+ if (!xmlString) {
75322
+ return [];
75323
+ }
75324
+ try {
75325
+ const xml = deps.parse(xmlString);
75326
+ const drawing = deps.getChild(xml, "drawing");
75327
+ const spTree = deps.getChild(drawing || xml, "spTree");
75328
+ if (!spTree) {
75329
+ return [];
75330
+ }
75331
+ const shapes = [];
75332
+ collectDrawingShapeNodes(spTree, deps.getChildren).forEach(({ node, isPic }, index) => {
75333
+ const shape = deps.parseDrawingShape(node, index, deps.emuPerPx);
75334
+ if (!shape) {
75335
+ return;
75336
+ }
75337
+ if (isPic && !shape.fillBlipEmbedId) {
75338
+ const embed = picBlipEmbedId(node, deps.getChild);
75339
+ if (embed) {
75340
+ shape.fillBlipEmbedId = embed;
75341
+ }
75342
+ }
75343
+ shapes.push(shape);
75344
+ });
75345
+ await resolveDrawingBlipFills(shapes, drawingPath, deps);
75346
+ return shapes;
75347
+ } catch {
75348
+ return [];
75349
+ }
75350
+ }
73606
75351
  var CATEGORY_FAMILY = {
73607
75352
  list: "list",
73608
75353
  process: "process",
@@ -73735,6 +75480,7 @@ var PptxHandlerRuntime85 = class _PptxHandlerRuntime36 extends PptxHandlerRuntim
73735
75480
  layoutDefinition,
73736
75481
  nodes,
73737
75482
  connections: parsedConnections.length > 0 ? parsedConnections : void 0,
75483
+ presLayoutVars: parseSmartArtPresLayoutVars(dataModel),
73738
75484
  drawingShapes: drawingShapes.length > 0 ? drawingShapes : void 0,
73739
75485
  chrome,
73740
75486
  colorTransform,
@@ -73813,30 +75559,28 @@ var PptxHandlerRuntime85 = class _PptxHandlerRuntime36 extends PptxHandlerRuntim
73813
75559
  }
73814
75560
  }
73815
75561
  /**
73816
- * Parse SmartArt drawing shapes given an absolute part path.
75562
+ * Parse cached SmartArt drawing shapes from an absolute part path.
73817
75563
  *
73818
- * Wraps `parseSmartArtDrawingShapes` (which expects a slide-relative
73819
- * relationship id) with a path-based lookup so the resolution layer
73820
- * can pull the part from anywhere in the package.
75564
+ * Enumerates `dsp:sp` / bare `dsp:pic` (incl. nested `dsp:grpSp`) and
75565
+ * resolves picture (blip) fills to data URLs via the drawing part's own
75566
+ * relationships. Delegates to a pure helper with an injected dep bundle.
73821
75567
  */
73822
75568
  async parseSmartArtDrawingShapesFromPath(drawingPath) {
73823
- const xmlString = await this.zip.file(drawingPath)?.async("string");
73824
- if (!xmlString) {
73825
- return [];
73826
- }
73827
- try {
73828
- const xml = this.parser.parse(xmlString);
73829
- const drawing = this.xmlLookupService.getChildByLocalName(xml, "drawing");
73830
- const spTree = this.xmlLookupService.getChildByLocalName(drawing || xml, "spTree");
73831
- if (!spTree) {
73832
- return [];
73833
- }
73834
- const shapes = this.xmlLookupService.getChildrenArrayByLocalName(spTree, "sp");
73835
- const emuPerPx = _PptxHandlerRuntime36.EMU_PER_PX;
73836
- return shapes.map((sp, index) => this.parseDrawingShape(sp, index, emuPerPx)).filter((entry) => entry !== null);
73837
- } catch {
73838
- return [];
73839
- }
75569
+ return parseDrawingShapesFromPart(drawingPath, this.drawingBlipDeps());
75570
+ }
75571
+ /** Bind runtime zip / parser / lookup / image helpers for the drawing parser. */
75572
+ drawingBlipDeps() {
75573
+ return {
75574
+ readText: (path) => this.zip.file(path)?.async("string") ?? Promise.resolve(void 0),
75575
+ parse: (xml) => this.parser.parse(xml),
75576
+ getChild: (node, local) => this.xmlLookupService.getChildByLocalName(node, local),
75577
+ getChildren: (node, local) => this.xmlLookupService.getChildrenArrayByLocalName(node, local),
75578
+ parseDrawingShape: (sp, index, emuPerPx) => this.parseDrawingShape(sp, index, emuPerPx),
75579
+ emuPerPx: _PptxHandlerRuntime36.EMU_PER_PX,
75580
+ ensureArray: (value) => this.ensureArray(value),
75581
+ resolveImagePath: (base, target) => this.resolveImagePath(base, target),
75582
+ getImageData: (path) => this.getImageData(path)
75583
+ };
73840
75584
  }
73841
75585
  };
73842
75586
  var PptxHandlerRuntime86 = class extends PptxHandlerRuntime85 {
@@ -74524,6 +76268,11 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
74524
76268
  grouping = "clustered";
74525
76269
  }
74526
76270
  }
76271
+ const varyColors = this.parseChartBoolVal(seriesContainer, "varyColors");
76272
+ const firstSliceAngle = this.parseChartNumberVal(seriesContainer, "firstSliceAng");
76273
+ const doughnutHoleSize = this.parseChartNumberVal(seriesContainer, "holeSize");
76274
+ const barGapWidth = this.parseChartNumberVal(seriesContainer, "gapWidth");
76275
+ const barOverlap = this.parseChartNumberVal(seriesContainer, "overlap");
74527
76276
  const chartPartPath = chartPart.partPath;
74528
76277
  const dataTable = parseDataTable(plotArea, this.xmlLookupService);
74529
76278
  const dropLines = parseLineStyle(
@@ -74600,6 +76349,11 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
74600
76349
  title: titleTextValues[0],
74601
76350
  style: chartStyle,
74602
76351
  grouping,
76352
+ ...varyColors !== void 0 ? { varyColors } : {},
76353
+ ...firstSliceAngle !== void 0 ? { firstSliceAngle } : {},
76354
+ ...doughnutHoleSize !== void 0 ? { doughnutHoleSize } : {},
76355
+ ...barGapWidth !== void 0 ? { barGapWidth } : {},
76356
+ ...barOverlap !== void 0 ? { barOverlap } : {},
74603
76357
  chartPartPath,
74604
76358
  chartRelationshipId,
74605
76359
  ...dataTable ? { dataTable } : {},
@@ -74676,6 +76430,35 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
74676
76430
  }
74677
76431
  return { categories, series };
74678
76432
  }
76433
+ /**
76434
+ * Read a numeric `@val` from a named child of a chart-type container.
76435
+ * Returns `undefined` when the child or its `@val` is absent/non-finite.
76436
+ */
76437
+ parseChartNumberVal(container, localName22) {
76438
+ const node = this.xmlLookupService.getChildByLocalName(container, localName22);
76439
+ const raw = node?.["@_val"];
76440
+ if (raw === void 0 || raw === null || raw === "") {
76441
+ return void 0;
76442
+ }
76443
+ const num = Number.parseFloat(String(raw));
76444
+ return Number.isFinite(num) ? num : void 0;
76445
+ }
76446
+ /**
76447
+ * Read a boolean `@val` from a named child of a chart-type container.
76448
+ * A present element with no `@val` follows the OOXML `CT_Boolean` default
76449
+ * of `true`; `undefined` when the child is absent.
76450
+ */
76451
+ parseChartBoolVal(container, localName22) {
76452
+ const node = this.xmlLookupService.getChildByLocalName(container, localName22);
76453
+ if (!node) {
76454
+ return void 0;
76455
+ }
76456
+ const raw = node["@_val"];
76457
+ if (raw === void 0 || raw === null || raw === "") {
76458
+ return true;
76459
+ }
76460
+ return !(raw === "0" || raw === "false");
76461
+ }
74679
76462
  /**
74680
76463
  * Build the series array from raw OOXML `c:ser` nodes.
74681
76464
  *
@@ -74719,6 +76502,10 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
74719
76502
  );
74720
76503
  const dataLabels = parseSeriesDataLabels(seriesNode, this.xmlLookupService);
74721
76504
  const explosion = parseSeriesExplosion(seriesNode, this.xmlLookupService);
76505
+ const smoothNode = this.xmlLookupService.getChildByLocalName(seriesNode, "smooth");
76506
+ const smooth = smoothNode ? !(smoothNode["@_val"] === "0" || smoothNode["@_val"] === "false") : void 0;
76507
+ const invertNode = this.xmlLookupService.getChildByLocalName(seriesNode, "invertIfNegative");
76508
+ const invertIfNegative = invertNode ? !(invertNode["@_val"] === "0" || invertNode["@_val"] === "false") : void 0;
74722
76509
  return {
74723
76510
  name: seriesName.trim().length > 0 ? seriesName : `Series ${seriesIndex + 1}`,
74724
76511
  values: fallbackValues,
@@ -74729,6 +76516,8 @@ var PptxHandlerRuntime90 = class extends PptxHandlerRuntime89 {
74729
76516
  ...seriesMarker ? { marker: seriesMarker } : {},
74730
76517
  ...dataLabels.length > 0 ? { dataLabels } : {},
74731
76518
  ...explosion !== void 0 ? { explosion } : {},
76519
+ ...invertIfNegative !== void 0 ? { invertIfNegative } : {},
76520
+ ...smooth !== void 0 ? { smooth } : {},
74732
76521
  ...axisId !== void 0 ? { axisId } : {},
74733
76522
  ...seriesChartType ? { seriesChartType } : {}
74734
76523
  };
@@ -75547,6 +77336,8 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
75547
77336
  async buildLoadData(presentationState, slidesWithWarnings, slideMasters) {
75548
77337
  const headerFooter = this.extractHeaderFooter();
75549
77338
  const presentationProperties = await this.parsePresentationProperties();
77339
+ const viewProperties = await this.parseViewProperties();
77340
+ this.loadedViewProperties = viewProperties;
75550
77341
  const customShows = this.parseCustomShows();
75551
77342
  const tableStyleMap = await this.parseTableStyles();
75552
77343
  const embeddedFontList = parseEmbeddedFontList(this.presentationData);
@@ -75576,7 +77367,7 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
75576
77367
  presentationState.height,
75577
77368
  this.rawSlideWidthEmu,
75578
77369
  this.rawSlideHeightEmu
75579
- ).withNotesDimensions(presentationState.notesWidthEmu, presentationState.notesHeightEmu).withSlides(slidesWithWarnings).withLayoutOptions(this.getLayoutOptions()).withHeaderFooter(headerFooter).withPresentationProperties(presentationProperties).withCustomShows(customShows).withSections(
77370
+ ).withNotesDimensions(presentationState.notesWidthEmu, presentationState.notesHeightEmu).withSlides(slidesWithWarnings).withLayoutOptions(this.getLayoutOptions()).withHeaderFooter(headerFooter).withPresentationProperties(presentationProperties).withViewProperties(viewProperties).withCustomShows(customShows).withSections(
75580
77371
  presentationState.orderedSections.length > 0 ? presentationState.orderedSections : void 0
75581
77372
  ).withWarnings(this.compatibilityService.getWarnings()).withThemeColorMap({ ...this.themeColorMap }).withTheme(this.buildThemeObject()).withThemeOptions(themeOptions.length > 0 ? themeOptions : void 0).withTableStyleMap(tableStyleMap).withEmbeddedFonts(embeddedFonts.length > 0 ? embeddedFonts : void 0).withEmbeddedFontList(embeddedFontList).withMruColors(presentationProperties?.mruColors).withNotesMaster(notesMaster).withHandoutMaster(handoutMaster).withSlideMasters(slideMasters.length > 0 ? slideMasters : void 0).withTags(tags.length > 0 ? tags : void 0).withCustomProperties(customProperties.length > 0 ? customProperties : void 0).withCoreProperties(coreProperties).withAppProperties(appProperties).withHasMacros(this.vbaProjectBin !== null ? true : void 0).withHasDigitalSignatures(this.signatureDetection?.hasSignatures || void 0).withDigitalSignatureCount(
75582
77373
  this.signatureDetection?.signatureCount && this.signatureDetection.signatureCount > 0 ? this.signatureDetection.signatureCount : void 0
@@ -75707,6 +77498,7 @@ var PptxHandlerRuntime94 = class extends PptxHandlerRuntime93 {
75707
77498
  this.customXmlParts = [];
75708
77499
  this.loadedEmbeddedFonts = [];
75709
77500
  this.loadedEmbeddedFontList = void 0;
77501
+ this.loadedViewProperties = void 0;
75710
77502
  this.orderedSlidePaths = [];
75711
77503
  this.zip = null;
75712
77504
  }
@@ -76050,6 +77842,7 @@ var PptxHandlerRuntime95 = class _PptxHandlerRuntime38 extends PptxHandlerRuntim
76050
77842
  });
76051
77843
  this.mediaDataParser = new PptxMediaDataParser({
76052
77844
  slideRelsMap: this.slideRelsMap,
77845
+ externalRelsMap: this.externalRelsMap,
76053
77846
  resolvePath: (base, relative) => this.resolvePath(base, relative),
76054
77847
  getPathExtension: (pathValue) => this.getPathExtension(pathValue)
76055
77848
  });
@@ -76651,11 +78444,13 @@ function parseDrawingColorChoice(colorNode) {
76651
78444
  }
76652
78445
  if (colorNode["a:scrgbClr"]) {
76653
78446
  const scrgb = colorNode["a:scrgbClr"];
76654
- const red = parseDrawingPercent(scrgb["@_r"]);
76655
- const green = parseDrawingPercent(scrgb["@_g"]);
76656
- const blue = parseDrawingPercent(scrgb["@_b"]);
78447
+ const red = parseDrawingFraction(scrgb["@_r"]);
78448
+ const green = parseDrawingFraction(scrgb["@_g"]);
78449
+ const blue = parseDrawingFraction(scrgb["@_b"]);
76657
78450
  if (red !== void 0 && green !== void 0 && blue !== void 0) {
76658
- const base = `#${toHex(red * 255)}${toHex(green * 255)}${toHex(blue * 255)}`;
78451
+ const base = `#${toHex(scrgbLinearToSrgb8(red))}${toHex(scrgbLinearToSrgb8(green))}${toHex(
78452
+ scrgbLinearToSrgb8(blue)
78453
+ )}`;
76659
78454
  return applyDrawingColorTransforms(base, scrgb);
76660
78455
  }
76661
78456
  }
@@ -76740,7 +78535,7 @@ function parseDrawingColorOpacity(colorNode) {
76740
78535
  const alphaMod = parseDrawingPercent(
76741
78536
  colorChoice["a:alphaMod"]?.["@_val"]
76742
78537
  );
76743
- const alphaOff = parseDrawingPercent(
78538
+ const alphaOff = parseDrawingFraction(
76744
78539
  colorChoice["a:alphaOff"]?.["@_val"]
76745
78540
  );
76746
78541
  if (alpha === void 0 && alphaMod === void 0 && alphaOff === void 0) {
@@ -78704,9 +80499,9 @@ function removeEmptyDataPoint(series, pointIndex) {
78704
80499
  }
78705
80500
  }
78706
80501
  }
78707
- var EMU_PER_PIXEL = 9525;
80502
+ var EMU_PER_PIXEL2 = 9525;
78708
80503
  function pxToEmu(px2) {
78709
- return Math.round(px2 * EMU_PER_PIXEL);
80504
+ return Math.round(px2 * EMU_PER_PIXEL2);
78710
80505
  }
78711
80506
  function placeholderSpXml(ph, shapeId) {
78712
80507
  const name = ph.name ?? `${ph.type.charAt(0).toUpperCase() + ph.type.slice(1)} Placeholder ${shapeId - 1}`;
@@ -80438,7 +82233,7 @@ var GroupBuilder = class _GroupBuilder {
80438
82233
  };
80439
82234
  var PPI = 96;
80440
82235
  var POINTS_PER_INCH = 72;
80441
- var EMU_PER_PIXEL2 = 9525;
82236
+ var EMU_PER_PIXEL3 = 9525;
80442
82237
  var EMU_PER_INCH = 914400;
80443
82238
  var EMU_PER_POINT = 12700;
80444
82239
  function inches(value) {
@@ -80454,10 +82249,10 @@ function pt(value) {
80454
82249
  return Math.round(value / POINTS_PER_INCH * PPI);
80455
82250
  }
80456
82251
  function emuToPixels(emu) {
80457
- return Math.round(emu / EMU_PER_PIXEL2);
82252
+ return Math.round(emu / EMU_PER_PIXEL3);
80458
82253
  }
80459
82254
  function pixelsToEmu(px2) {
80460
- return Math.round(px2 * EMU_PER_PIXEL2);
82255
+ return Math.round(px2 * EMU_PER_PIXEL3);
80461
82256
  }
80462
82257
  function inchesToEmu(value) {
80463
82258
  return Math.round(value * EMU_PER_INCH);
@@ -90683,4 +92478,4 @@ var SvgExporter = class _SvgExporter {
90683
92478
  * `<p:extLst>` (optional)
90684
92479
  */
90685
92480
 
90686
- export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, ELEMENT_FIELD_KIND, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL2, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime96, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, 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, SLIDE_FIELD_KIND, SMART_ART_DEFINITION_PARTS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyBubbleChartOptions, applyChartLayouts, applyChartManualLayout, applyChartUpDownBars, applyCustomShows, applyDiagramRelationshipIds, applyDrawingColorTransforms, applyDrawingLineDash, applyDrawingMediaReference, applyKinsokuToXml, applySections, applySmartArtConstraintRules, applySmartArtLayoutDefinition, applyTableCellTextAndStyle, applyTemplate, applyThemeOverrideToSlide, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildInkMlContent, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64, 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, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decodeOle10Native, decodeXmlEntities, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGraphicBuilds, extractGuidFromPartName, extractModel3DTransform, extractStyleReferenceColorXml, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isAlternateContentChoiceSupported, isAlternateContentChoiceXmlSupported, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isOle2CompoundFile, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2, layoutEngineShapesToDrawingShapes, listUnassessedOpenXmlCoverage, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, oleBytesToDataUrl, ooxmlArcToSvg, ooxmlToPresetName, orderedXmlKey, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseBubbleChartOptions, parseChart3DSurfaces, parseChartAxes, parseChartLayouts, parseChartManualLayout, parseChartUpDownBars, parseCondition, parseConditionList, parseCustomShows, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDiagramRelationshipIds, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingLineDash, parseDrawingMediaReference, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseInkMlContent, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSmartArtColorStyleLabels, parseSmartArtConstraintRules, parseSmartArtDefinitionHeaderList, parseSmartArtDefinitionMetadata, parseSmartArtLayoutDefinition, parseSmartArtQuickStyleLabels, parseStructuredCustomGeometry, parseSvgPath, parseTimeTargetElement, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reconcileAnimationTargets, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeSmartArtDefinitionHeaderList, serializeSvgPath, serializeTimeTargetElement, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, setElementLocked, setSmartArtNodeStyle, shouldRenderFallbackLabel, shouldReturnToZoomSlide, stripParentDirSegments, stripXmlOrderSuffix, subtractPolygons, subtractShapes, subtractSvgPaths, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, svgPathToPolygons, switchSmartArtLayout, themeColorSchemesEqual, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, validateSmartArtColorStyleLabels, validateSmartArtConstraintRules, validateSmartArtDefinitionHeaderList, validateSmartArtDefinitionMetadata, validateSmartArtLayoutDefinition, verifyModifyPassword, verifyPassword, verifySignatureDigests, withThemePlaceholderColor, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };
92481
+ export { ALL_ANIMATION_PRESETS, BLIP_FILL_ORDER, CLOUD_CALLOUT_TAIL_COUNT, CLOUD_LOBE_COUNT, COLOR_MAP_ALIAS_KEYS, CONNECTOR_ARROW_OPTIONS, CONNECTOR_GEOMETRY_OPTIONS, ChartBuilder, ConnectorBuilder, ConnectorXmlFactory, DEFAULT_CANVAS_HEIGHT, DEFAULT_CANVAS_WIDTH, DEFAULT_COLOR_MAP, DEFAULT_FILL_COLOR, DEFAULT_FONT_FAMILY, DEFAULT_MAX_UNCOMPRESSED_BYTES, DEFAULT_SCHEME_COLOR_MAP, DEFAULT_STROKE_COLOR, DEFAULT_TEXT_COLOR, DEFAULT_TEXT_FONT_SIZE, DIGEST_ALGORITHM_TO_HASH, DIGEST_ALGORITHM_TO_WEB_CRYPTO, DIGITAL_SIGNATURE_ORIGIN_REL_TYPE, DIGITAL_SIGNATURE_REL_TYPE, DataIntegrityError, DocumentConverter, EFFECT_LST_ORDER, ELEMENT_FIELD_KIND, EMPHASIS_PRESETS, EMU_PER_INCH, EMU_PER_PIXEL3, EMU_PER_POINT, EMU_PER_PX, ENTERPRISE_FAIL_ON_REVOCATION_UNKNOWN_ENV, ENTERPRISE_REQUIRE_REVOCATION_ENV, ENTERPRISE_REQUIRE_TIMESTAMP_ENV, ENTERPRISE_TRUST_ROOTS_FILE_ENV, ENTERPRISE_TRUST_ROOTS_PEM_ENV, ENTRANCE_PRESETS, EXIT_PRESETS, EncryptedFileError, FONT_SUBSTITUTION_MAP, FreeformPathBuilder, GroupBuilder, ImageBuilder, IncorrectPasswordError, MAX_TABLE_DIMENSION, MAX_ZIP_ENTRY_COUNT, MIN_ELEMENT_SIZE, MIN_TABLE_DIMENSION, MOTION_PATH_PRESETS, MediaBuilder, MediaContext, MediaGraphicFrameXmlFactory, OOXML_TO_PRESET_EMPH, OOXML_TO_PRESET_ENTR, OOXML_TO_PRESET_EXIT, OPC_RELATIONSHIP_TRANSFORM, OPENXML_COVERAGE, OPENXML_SCHEMA_CONSTRUCT_IDS, OPENXML_STRICT_SCHEMA_CONSTRUCT_IDS, OPENXML_TRANSITIONAL_SCHEMA_CONSTRUCT_IDS, Ole2ParseError, P14_GUIDE_URI, P15_GUIDE_URI, PANOSE_FAMILY_MAP, PANOSE_MONOSPACE_PROPORTION, PANOSE_SANS_SERIF_STYLES, PANOSE_WEIGHT_MAP, POWERPOINT_PRESENCE_KEY, PPTX_VIEWER_MANIFEST_NS, PRESET_COLOR_MAP, PRESET_SHAPE_CATEGORY_LABELS, PRESET_SHAPE_CLIP_PATHS, PRESET_SHAPE_DEFINITIONS, PRESET_SHAPE_GEOMETRY_TABLE, PRESET_TO_OOXML, PictureXmlFactory, PptxAnimationWriteService, PptxColorStyleCodec, PptxCommentAuthorsXmlFactory, PptxCommentXmlFactoryProvider, PptxCompatibilityService, PptxConnectorParser, PptxContentTypesBuilder, PptxDocumentPropertiesUpdater, PptxEditorAnimationService, PptxElementTransformUpdater, PptxElementXmlBuilder, PptxGraphicFrameParser, PptxHandler, PptxHandlerRuntime96, PptxHandlerRuntimeFactory, PptxLoadDataBuilder, PptxMarkdownConverter, PptxMediaDataParser, PptxNativeAnimationService, PptxPresentationSaveBuilder, PptxPresentationSlidesReconciler, PptxRuntimeDependencyFactory, PptxSaveConstantsFactory, 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, SLIDE_FIELD_KIND, SMART_ART_DEFINITION_PARTS, SP_PR_ORDER, STROKE_DASH_OPTIONS, SUPPORTED_XML_CANON_TRANSFORMS, SWITCHABLE_LAYOUT_TYPES, SYSTEM_COLOR_MAP, ShapeBuilder, SlideBuilder, SlideProcessor, SlideSizes, SvgExporter, TC_PR_BORDERS_ORDER, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TRANSITION_VALID_DIRECTIONS, TableBuilder, TextBuilder, TextShapeXmlFactory, ThemePresets, VML_SHAPE_TAGS, XMLDSIG_NS, XML_TRANSFORM_ENVELOPED_SIGNATURE, ZipBombError, addChartCategory, addChartSeries, addSection, addSmartArtNode, addSmartArtNodeAsChild, applyBubbleChartOptions, applyChartLayouts, applyChartManualLayout, applyChartUpDownBars, applyCustomShows, applyDiagramRelationshipIds, applyDrawingColorTransforms, applyDrawingLineDash, applyDrawingMediaReference, applyKinsokuToXml, applySections, applySmartArtConstraintRules, applySmartArtLayoutDefinition, applyTableCellTextAndStyle, applyTemplate, applyThemeOverrideToSlide, applyThemeToData, areNamespacesSupported, buildCalloutLeaderLineSvgPath, buildClrMapOverrideXml, buildFontFamilyString, buildGuideListExtension, buildInkMlContent, buildLinkedTextBoxChains, buildOle2, buildSingleEffectNode, buildSlideReferenceRemap, buildSrgbColorChoice, buildThemeColorMap, catmullRomToBezier, chartDataAddCategory, chartDataAddSeries, chartDataChangeType, chartDataRemoveCategory, chartDataRemoveSeries, chartDataUpdatePoint, checkBlankSlide, checkComplexTables, checkDuplicateTitles, checkLowContrast, checkMissingAltText, checkMissingSlideTitle, checkPresentation, clampUnitInterval, classifyPanose, cloneElement, cloneShapeStyle, cloneSlide, cloneTemplateElementsBySlideId, cloneTextStyle, cloneXmlObject, cm, cmToEmu, colorWithOpacity, colorsEqual, combineShapes, computeContrastRatio, computeCycleLayout, computeDetailStatus, computeDigestBase64, 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, createTableCellXml, createTableElement, createTableGraphicFrameRawXml, createTemplateConnectorRawXml, createTemplateShapeRawXml, createTextElement, createUniformTextSegments, dataUrlToMediaBytes, decodeOle10Native, decodeXmlEntities, decomposeSmartArt, decryptPptx, demoteSmartArtNode, deobfuscateFont, deriveOutputPath, deriveSlideTitle, deriveSlideTitles, detectDigitalSignatures, detectFileFormat, detectFontFormat, detectOleObjectType, detectStrictConformance, diffPresentations, diffSlides, distributeSegmentsAcrossChain, douglasPeucker, duplicateElement, duplicateSlide, elementActionToPptxAction, elementHasAction, emuToPixels, encryptPptx, ensureArrayValue, escapeXmlAttr, escapeXmlText, estimateTextBoxCapacity, evaluateGeometryPaths, evaluateGuides, evaluatePresetShape, extractAllTagText, extractColorChoiceXml, extractFirstTagText, extractGraphicBuilds, extractGuidFromPartName, extractModel3DTransform, extractStyleReferenceColorXml, extractTagAttribute, fetchUrlToBytes, findCustomShow, findLayoutByName, findLayoutByType, findOpenXmlCoverage, findPlaceholders, findText, formatCommentTimestamp, fragmentShapes, generateFontGuid, generateLayoutXml, generateMediaFilename, getAdjustmentAwareClipPath, getAdjustmentAwareShapeClipPath, getAnimationPresetInfo, getCalloutLeaderLineGeometry, getCalloutTier, getCalloutViewBoxBounds, getCloudCalloutClipPath, getCloudClipPath, getCloudPathForRendering, getCommentMarkerPosition, getConnectorAdjustment, getConnectorPathGeometry, getCssBorderDashStyle, getCustomShowNames, getCustomShowPositionLabel, getDirectory, getElementLabel, getElementTextContent, getElementTransform, getImageMaskStyle, getLinkedTextBoxSegments, getNativeAnimationPresetMetadata, getOleObjectTypeLabel, getPanoseWeight, getPresetShapeClipPath, getPresetsByCategory, getRoundRectRadiusPx, getSectionForSlide, getSectionSlideRange, getShapeClipPath, getShapeClipPathFromPreset, getShapeType, getSignaturePathsToStrip, getSubstituteFontFamily, getSubstituteFonts, getSupportedNamespaces, getSvgStrokeDasharray, getTextCompensationTransform, getThemePreset, getZoomElements, getZoomTargetSlideIndexes, guidToKey, guideEmuToPx, guidePxToEmu, hasDirectSubstitution, hasNonTrivialOverride, hasShapeProperties, hasTextProperties, hexToRgbChannels, hslToRgb, inches, inchesToEmu, inferOleExtensionFromTarget, interpolateShapeGeometry, intersectPolygons, intersectShapes, intersectSvgPaths, isAlternateContentChoiceSupported, isAlternateContentChoiceXmlSupported, isCalloutShape, isConnectorElement, isEditableTextElement, isImageLikeElement, isInkElement, isNamespaceSupported, isOle2CompoundFile, isShapeElement, isStrictNamespaceUri, isSummaryZoomSlide, isSwitchableLayoutType, isTemplateElement, isTextElement, isTransitionalNamespaceUri, isValidBase64, isXmlNode, isZoomElement, isZoomElement2, layoutEngineShapesToDrawingShapes, listUnassessedOpenXmlCoverage, lookupPresetShape, mailMerge, mergePresentation, mergeShapes, mergeStyleParts, mergeThemeColorOverride, mimeTypeForOleFile, mm, moveSlidesToSection, navigateCustomShow, normalizeHexColor, normalizeNamespaceUri, normalizePartPath, normalizePath, normalizeStrictXml, normalizeStrokeDashType, obfuscateFont, oleBytesToDataUrl, ooxmlArcToSvg, ooxmlToPresetName, orderedXmlKey, parseActiveXControlsFromSlide, parseAdjustmentValues, parseBodyPrBooleanAttrs, parseBubbleChartOptions, parseChart3DSurfaces, parseChartAxes, parseChartLayouts, parseChartManualLayout, parseChartUpDownBars, parseCondition, parseConditionList, parseCustomShows, parseCxChartSeries, parseDataTable, parseDataUrlToBytes, parseDiagramRelationshipIds, parseDrawingColor, parseDrawingColorChoice, parseDrawingColorOpacity, parseDrawingFraction, parseDrawingHueDegrees, parseDrawingLineDash, parseDrawingMediaReference, parseDrawingPercent, parseEmbeddedXlsx, parseGuideDefinitions, parseHexColor, parseInkMlContent, parseKinsoku, parseLayoutDefinition, parseLineStyle, parseMarker, parseOle2, parsePanoseBytes, parsePanoseString, parsePresentationDrawingGuides, parseSeriesDataLabels, parseSeriesDataPoints, parseSeriesErrBars, parseSeriesExplosion, parseSeriesTrendlines, parseShapeProps, parseSignatureXml, parseSlideDrawingGuides, parseSmartArtColorStyleLabels, parseSmartArtConstraintRules, parseSmartArtDefinitionHeaderList, parseSmartArtDefinitionMetadata, parseSmartArtLayoutDefinition, parseSmartArtQuickStyleLabels, parseStructuredCustomGeometry, parseSvgPath, parseTimeTargetElement, parseVmlElement, parseVmlElements, pixelsToEmu, polygonsToSvgPath, pptxActionToElementAction, promoteSmartArtNode, pt, reResolveSlideColors, readFileAsDataUrl, rebuildTableStructureInRawXml, reconcileAnimationTargets, reflowSmartArtLayout, relativeLuminance, relayoutSmartArt, remapEditorAnimationsToShapeIds, removeChartCategory, removeChartSeries, removeSection, removeSmartArtNode, reorderObjectKeys, reorderSections, reorderSmartArtNode, reorderSmartArtNodeToIndex, repairPptx, replaceShapeGeometry, replaceText, replaceTextInSlide, replaceWithCustomGeometry, resetCloneIdCounter, resetDecomposeCounter, resetIdCounter, resetSectionIdCounter, resetSmartArtEditCounter, resolveCoordinate, resolveCustomShowSlideIndices, resolveLayoutDisplayName, resolveModel3DMimeType, resolveReferenceUriToPart, resolveTableCellStyle, rgbToHsl, selectAlternateContentBranch, serializeColorChoice, serializeCondition, serializeConditionList, serializeGraphicBuild, serializeSmartArtDefinitionHeaderList, serializeSvgPath, serializeTimeTargetElement, setChartAxis, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategories, setChartDataLabels, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartGrouping, setChartLegend, setChartSeriesChartType, setChartSeriesColor, setChartSeriesErrorBars, setChartSeriesMarker, setChartSeriesTrendline, setChartTitle, setChartType, setElementLocked, setSmartArtNodeStyle, shouldRenderFallbackLabel, shouldReturnToZoomSlide, stripParentDirSegments, stripXmlOrderSuffix, subtractPolygons, subtractShapes, subtractSvgPaths, summarizeOpenXmlCoverage, summarizeOpenXmlCoverageByVocabulary, svgPathToPolygons, switchSmartArtLayout, themeColorSchemesEqual, toHex, toStrictNamespaceUri, unionPolygons, unionShapes, unionSvgPaths, unwrapAlternateContent, unwrapOleEmbedding, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateChartDataPoint, updateChartSeriesValues, updateMergeAttrsInRawXml, updateSmartArtNodeText, validatePptx, validateSmartArtColorStyleLabels, validateSmartArtConstraintRules, validateSmartArtDefinitionHeaderList, validateSmartArtDefinitionMetadata, validateSmartArtLayoutDefinition, verifyModifyPassword, verifyPassword, verifySignatureDigests, withThemePlaceholderColor, writeBodyPrBooleanAttrs, xmlAttr, xmlAttrBool, xmlAttrNumber, xmlChild, xmlChildren, xmlPath, xmlText };