ooxml-core 1.9.0 → 1.11.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (202) hide show
  1. package/dist/PptxHandler-DNZHAHUY.cjs +12 -0
  2. package/dist/PptxHandler-E44KDHMQ.mjs +3 -0
  3. package/dist/{PptxHandler-EX4WBIQQ.mjs → PptxHandler-NROFYT2N.mjs} +2 -2
  4. package/dist/automation/index.cjs +3236 -2258
  5. package/dist/automation/index.mjs +3236 -2258
  6. package/dist/{chunk-SWF7KVL5.cjs → chunk-2UVH6RHI.cjs} +1608 -1163
  7. package/dist/{chunk-M76PHYRR.mjs → chunk-7DSZI7S6.mjs} +1 -1
  8. package/dist/{chunk-AT66SA5M.cjs → chunk-7QZGRB3T.cjs} +28 -10
  9. package/dist/chunk-ANZ4Q6I3.cjs +21 -0
  10. package/dist/{chunk-CPKNMQLX.cjs → chunk-AWIDASUW.cjs} +25 -2
  11. package/dist/{chunk-SVQZXP3F.mjs → chunk-CBNKBVX5.mjs} +25 -2
  12. package/dist/{chunk-FIELY5PI.mjs → chunk-EC2W2MDY.mjs} +30 -2
  13. package/dist/chunk-EGTRL3QJ.mjs +19 -0
  14. package/dist/chunk-GXHKNSZX.mjs +9 -0
  15. package/dist/{chunk-OXHMZS7B.mjs → chunk-HCXUI5UC.mjs} +943 -273
  16. package/dist/chunk-HDQXPSHY.cjs +17 -0
  17. package/dist/chunk-KTYBFGEY.mjs +14 -0
  18. package/dist/chunk-QOO36KG4.cjs +42 -0
  19. package/dist/chunk-R2KZXD6U.mjs +39 -0
  20. package/dist/{chunk-IGOA57LE.mjs → chunk-U2DF3EGK.mjs} +1 -1
  21. package/dist/{chunk-OB277ZGE.mjs → chunk-UAY26XOI.mjs} +27 -9
  22. package/dist/{chunk-WSO4T2LJ.mjs → chunk-W5ARCUJB.mjs} +26 -3
  23. package/dist/chunk-XZPZHXV4.cjs +12 -0
  24. package/dist/{chunk-LCS3J3QI.mjs → chunk-YB5SRNFS.mjs} +717 -272
  25. package/dist/docx/layout/adapt-table.d.ts +2 -2
  26. package/dist/docx/layout/adapt-table.d.ts.map +1 -1
  27. package/dist/docx/layout/flow-table.d.ts.map +1 -1
  28. package/dist/docx/layout/index.cjs +554 -83
  29. package/dist/docx/layout/index.mjs +554 -84
  30. package/dist/docx/layout/nested-fragment-edges.d.ts +9 -0
  31. package/dist/docx/layout/nested-fragment-edges.d.ts.map +1 -0
  32. package/dist/docx/layout/nested-frame-profile.d.ts +9 -0
  33. package/dist/docx/layout/nested-frame-profile.d.ts.map +1 -0
  34. package/dist/docx/layout/page-cursor.d.ts +2 -0
  35. package/dist/docx/layout/page-cursor.d.ts.map +1 -1
  36. package/dist/docx/layout/result.d.ts +20 -0
  37. package/dist/docx/layout/result.d.ts.map +1 -1
  38. package/dist/docx/layout/table-border-layout.d.ts +16 -0
  39. package/dist/docx/layout/table-border-layout.d.ts.map +1 -0
  40. package/dist/docx/layout/table-cell-layout.d.ts +3 -2
  41. package/dist/docx/layout/table-cell-layout.d.ts.map +1 -1
  42. package/dist/docx/layout/table-content.d.ts +4 -0
  43. package/dist/docx/layout/table-content.d.ts.map +1 -0
  44. package/dist/docx/layout/table-footnotes.d.ts +5 -0
  45. package/dist/docx/layout/table-footnotes.d.ts.map +1 -1
  46. package/dist/docx/layout/table-frames.d.ts +4 -0
  47. package/dist/docx/layout/table-frames.d.ts.map +1 -0
  48. package/dist/docx/layout/table-layout.d.ts +8 -3
  49. package/dist/docx/layout/table-layout.d.ts.map +1 -1
  50. package/dist/docx/layout/table-note-completion.d.ts +5 -0
  51. package/dist/docx/layout/table-note-completion.d.ts.map +1 -0
  52. package/dist/docx/layout/table-note-stories.d.ts +6 -0
  53. package/dist/docx/layout/table-note-stories.d.ts.map +1 -0
  54. package/dist/pptx/automation/index.cjs +801 -296
  55. package/dist/pptx/automation/index.d.ts +5 -4
  56. package/dist/pptx/automation/index.d.ts.map +1 -1
  57. package/dist/pptx/automation/index.mjs +5 -5
  58. package/dist/pptx/chunks/{text-operations-BLodkuXE.d.ts → elements-DD3UGOMd.d.ts} +27 -3248
  59. package/dist/pptx/chunks/elements-DD3UGOMd.d.ts.map +1 -0
  60. package/dist/pptx/chunks/{index-B4cnSPNz.d.ts → index-BZrFyNtU.d.ts} +113 -5
  61. package/dist/pptx/chunks/index-BZrFyNtU.d.ts.map +1 -0
  62. package/dist/pptx/chunks/{index-BZh-IMkN.d.ts → index-DdX02BSm.d.ts} +19 -3
  63. package/dist/pptx/chunks/index-DdX02BSm.d.ts.map +1 -0
  64. package/dist/pptx/chunks/smart-art-ENMMEbmW.d.ts +1512 -0
  65. package/dist/pptx/chunks/smart-art-ENMMEbmW.d.ts.map +1 -0
  66. package/dist/pptx/chunks/text-D49FKllA.d.ts +1473 -0
  67. package/dist/pptx/chunks/text-D49FKllA.d.ts.map +1 -0
  68. package/dist/pptx/chunks/text-operations-CyMTMfID.d.ts +3261 -0
  69. package/dist/pptx/chunks/text-operations-CyMTMfID.d.ts.map +1 -0
  70. package/dist/pptx/cli/index.cjs +801 -296
  71. package/dist/pptx/cli/index.d.ts +1 -1
  72. package/dist/pptx/cli/index.mjs +4 -4
  73. package/dist/pptx/converter/index.cjs +1 -0
  74. package/dist/pptx/converter/index.d.ts +1 -1
  75. package/dist/pptx/converter/index.mjs +2 -2
  76. package/dist/pptx/editor/render/collaboration-live-patch-target.cjs +2 -2
  77. package/dist/pptx/editor/render/collaboration-live-patch-target.mjs +1 -1
  78. package/dist/pptx/editor/render/find-replace.cjs +19 -18
  79. package/dist/pptx/editor/render/find-replace.d.ts +2 -2
  80. package/dist/pptx/editor/render/find-replace.mjs +3 -2
  81. package/dist/pptx/editor/render/font-family-update.cjs +14 -0
  82. package/dist/pptx/editor/render/font-family-update.d.ts +17 -0
  83. package/dist/pptx/editor/render/font-family-update.d.ts.map +1 -0
  84. package/dist/pptx/editor/render/font-family-update.mjs +1 -0
  85. package/dist/pptx/editor/render/paragraph-geometry-overrides.cjs +14 -0
  86. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts +17 -0
  87. package/dist/pptx/editor/render/paragraph-geometry-overrides.d.ts.map +1 -0
  88. package/dist/pptx/editor/render/paragraph-geometry-overrides.mjs +12 -0
  89. package/dist/pptx/editor/render/remap-text.cjs +2 -2
  90. package/dist/pptx/editor/render/remap-text.d.ts.map +1 -1
  91. package/dist/pptx/editor/render/remap-text.mjs +1 -1
  92. package/dist/pptx/editor/render/slide-operations.cjs +9 -8
  93. package/dist/pptx/editor/render/slide-operations.mjs +3 -2
  94. package/dist/pptx/editor/render/table-data-grid-ops.cjs +1 -1
  95. package/dist/pptx/editor/render/table-data-grid-ops.mjs +1 -1
  96. package/dist/pptx/editor/render/text-content-style.cjs +18 -0
  97. package/dist/pptx/editor/render/text-content-style.d.ts +9 -0
  98. package/dist/pptx/editor/render/text-content-style.d.ts.map +1 -0
  99. package/dist/pptx/editor/render/text-content-style.mjs +5 -0
  100. package/dist/pptx/editor/render/text-runs-style-patch.cjs +17 -0
  101. package/dist/pptx/editor/render/text-runs-style-patch.d.ts +7 -0
  102. package/dist/pptx/editor/render/text-runs-style-patch.d.ts.map +1 -0
  103. package/dist/pptx/editor/render/text-runs-style-patch.mjs +15 -0
  104. package/dist/pptx/editor/render/text-style-scope.cjs +173 -0
  105. package/dist/pptx/editor/render/text-style-scope.d.ts +76 -0
  106. package/dist/pptx/editor/render/text-style-scope.d.ts.map +1 -0
  107. package/dist/pptx/editor/render/text-style-scope.mjs +164 -0
  108. package/dist/pptx/editor/render/theme-editor-model.cjs +1 -1
  109. package/dist/pptx/editor/render/theme-editor-model.mjs +1 -1
  110. package/dist/pptx/editor/render/update-text-segment-style.cjs +11 -0
  111. package/dist/pptx/editor/render/update-text-segment-style.d.ts +14 -0
  112. package/dist/pptx/editor/render/update-text-segment-style.d.ts.map +1 -0
  113. package/dist/pptx/editor/render/update-text-segment-style.mjs +2 -0
  114. package/dist/pptx/index.cjs +1091 -296
  115. package/dist/pptx/index.d.ts +7 -5
  116. package/dist/pptx/index.mjs +5 -5
  117. package/dist/pptx/smartart-layouts/index.d.ts +1 -1
  118. package/dist/teams/index.cjs +590 -122
  119. package/dist/teams/index.mjs +590 -122
  120. package/dist/visio/date-cache.d.ts +3 -0
  121. package/dist/visio/date-cache.d.ts.map +1 -0
  122. package/dist/visio/edit-commands.d.ts +3 -3
  123. package/dist/visio/edit-commands.d.ts.map +1 -1
  124. package/dist/visio/edit-formatting-scope.d.ts.map +1 -1
  125. package/dist/visio/edit-recalculate-index.d.ts.map +1 -1
  126. package/dist/visio/edit-text-field-commands.d.ts +15 -0
  127. package/dist/visio/edit-text-field-commands.d.ts.map +1 -1
  128. package/dist/visio/edit-text-field.d.ts +2 -2
  129. package/dist/visio/edit-text-field.d.ts.map +1 -1
  130. package/dist/visio/edit.d.ts +1 -1
  131. package/dist/visio/edit.d.ts.map +1 -1
  132. package/dist/visio/index.cjs +501 -220
  133. package/dist/visio/index.d.ts +1 -1
  134. package/dist/visio/index.d.ts.map +1 -1
  135. package/dist/visio/index.mjs +501 -220
  136. package/dist/visio/model.d.ts +6 -0
  137. package/dist/visio/model.d.ts.map +1 -1
  138. package/dist/visio/shape-metadata.d.ts.map +1 -1
  139. package/dist/visio/shapes.d.ts.map +1 -1
  140. package/dist/visio/style.d.ts +1 -1
  141. package/dist/visio/style.d.ts.map +1 -1
  142. package/dist/visio/text-field-display.d.ts +3 -0
  143. package/dist/visio/text-field-display.d.ts.map +1 -1
  144. package/dist/visio/text-field-editability.d.ts +6 -0
  145. package/dist/visio/text-field-editability.d.ts.map +1 -0
  146. package/dist/visio/text-field-fraction.d.ts +3 -0
  147. package/dist/visio/text-field-fraction.d.ts.map +1 -0
  148. package/dist/visio/text-field-independent.d.ts +4 -0
  149. package/dist/visio/text-field-independent.d.ts.map +1 -0
  150. package/dist/visio/text-field-numeric.d.ts +1 -1
  151. package/dist/visio/text-field-numeric.d.ts.map +1 -1
  152. package/dist/visio/text-field-source.d.ts +6 -0
  153. package/dist/visio/text-field-source.d.ts.map +1 -0
  154. package/dist/visio/text-field-system-date.d.ts +4 -0
  155. package/dist/visio/text-field-system-date.d.ts.map +1 -0
  156. package/dist/visio/text-fields.d.ts +1 -0
  157. package/dist/visio/text-fields.d.ts.map +1 -1
  158. package/dist/visio/ui/edit-commands.d.ts.map +1 -1
  159. package/dist/visio/ui/index.cjs +514 -221
  160. package/dist/visio/ui/index.mjs +514 -221
  161. package/dist/visio/ui/snapshot-scene.d.ts.map +1 -1
  162. package/dist/visio/ui/text-field-catalog.d.ts.map +1 -1
  163. package/dist/xlsx/edit/pivots.d.ts.map +1 -1
  164. package/dist/xlsx/index.cjs +1362 -659
  165. package/dist/xlsx/index.mjs +1361 -660
  166. package/dist/xlsx/load/index.cjs +1091 -430
  167. package/dist/xlsx/load/index.mjs +1091 -430
  168. package/dist/xlsx/model-pivots.d.ts +31 -2
  169. package/dist/xlsx/model-pivots.d.ts.map +1 -1
  170. package/dist/xlsx/pivot/admission.d.ts.map +1 -1
  171. package/dist/xlsx/pivot/aggregate.d.ts +3 -1
  172. package/dist/xlsx/pivot/aggregate.d.ts.map +1 -1
  173. package/dist/xlsx/pivot/data.d.ts +2 -2
  174. package/dist/xlsx/pivot/data.d.ts.map +1 -1
  175. package/dist/xlsx/pivot/hierarchy-first.d.ts +21 -0
  176. package/dist/xlsx/pivot/hierarchy-first.d.ts.map +1 -0
  177. package/dist/xlsx/pivot/hierarchy.d.ts +2 -4
  178. package/dist/xlsx/pivot/hierarchy.d.ts.map +1 -1
  179. package/dist/xlsx/pivot/index.d.ts +2 -0
  180. package/dist/xlsx/pivot/index.d.ts.map +1 -1
  181. package/dist/xlsx/pivot/measures.d.ts +13 -0
  182. package/dist/xlsx/pivot/measures.d.ts.map +1 -0
  183. package/dist/xlsx/pivot/page-filter-admission.d.ts +5 -0
  184. package/dist/xlsx/pivot/page-filter-admission.d.ts.map +1 -0
  185. package/dist/xlsx/pivot/page-filter.d.ts +11 -0
  186. package/dist/xlsx/pivot/page-filter.d.ts.map +1 -0
  187. package/dist/xlsx/pivot/read.d.ts.map +1 -1
  188. package/dist/xlsx/pivot/table-xml.d.ts.map +1 -1
  189. package/dist/xlsx/pivot/values-axis.d.ts +12 -0
  190. package/dist/xlsx/pivot/values-axis.d.ts.map +1 -0
  191. package/dist/xlsx/ui/commands/i18n/navigation.d.ts.map +1 -1
  192. package/dist/xlsx/ui/commands/i18n/pivots.d.ts.map +1 -1
  193. package/dist/xlsx/ui/index.cjs +640 -137
  194. package/dist/xlsx/ui/index.mjs +640 -137
  195. package/package.json +2 -2
  196. package/dist/PptxHandler-AT7FVG5Q.mjs +0 -2
  197. package/dist/PptxHandler-VFSCECPL.cjs +0 -11
  198. package/dist/pptx/chunks/index-B4cnSPNz.d.ts.map +0 -1
  199. package/dist/pptx/chunks/index-BZh-IMkN.d.ts.map +0 -1
  200. package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts +0 -2970
  201. package/dist/pptx/chunks/smart-art-Q2kZQtHh.d.ts.map +0 -1
  202. package/dist/pptx/chunks/text-operations-BLodkuXE.d.ts.map +0 -1
@@ -1010,6 +1010,7 @@ var init_presentation_field_keys = __esm({
1010
1010
  modernCommentAuthors: true,
1011
1011
  conformance: true,
1012
1012
  embedTrueTypeFonts: true,
1013
+ firstSlideNumber: true,
1013
1014
  defaultTextStyle: true
1014
1015
  };
1015
1016
  exports.PRESENTATION_FIELD_NAMES = Object.keys(exports.PRESENTATION_FIELD_KEYS);
@@ -1537,6 +1538,32 @@ function inheritCustomGeometryCommandOrder(target, ...sources) {
1537
1538
  }
1538
1539
  }
1539
1540
  }
1541
+ function pathListPaths(pathLst) {
1542
+ if (!pathLst || typeof pathLst !== "object") {
1543
+ return [];
1544
+ }
1545
+ return ensureArrayLocal(childByLocalName(pathLst, "path")).filter(
1546
+ (path2) => Boolean(path2) && typeof path2 === "object"
1547
+ );
1548
+ }
1549
+ function readPathListCommandOrder(pathLst) {
1550
+ const orders = pathListPaths(pathLst).map((path2) => [...commandOrder.get(path2) ?? []]);
1551
+ return orders.some((order) => order.length > 0) ? orders : void 0;
1552
+ }
1553
+ function restorePathListCommandOrder(pathLst, orders) {
1554
+ if (!orders || orders.length === 0) {
1555
+ return;
1556
+ }
1557
+ pathListPaths(pathLst).forEach((path2, index) => {
1558
+ const order = orders[index];
1559
+ if (!order || order.length === 0 || commandOrder.has(path2)) {
1560
+ return;
1561
+ }
1562
+ if (orderSignature([...order]) === pathSignature(path2)) {
1563
+ commandOrder.set(path2, [...order]);
1564
+ }
1565
+ });
1566
+ }
1540
1567
  function orderedXmlKey(baseName, order) {
1541
1568
  return `${baseName}${ORDER_SUFFIX}${order}`;
1542
1569
  }
@@ -4928,7 +4955,7 @@ function rootRelsXml() {
4928
4955
  <Relationship Id="rId3" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml"/>
4929
4956
  </Relationships>`;
4930
4957
  }
4931
- function presentationXml(width, height, slideCount) {
4958
+ function presentationXml(width, height, slideCount, firstSlideNumber) {
4932
4959
  const slideIdBase = 256;
4933
4960
  const slideRIdBase = 6;
4934
4961
  const sldIdLst = slideCount > 0 ? ` <p:sldIdLst>
@@ -4937,6 +4964,7 @@ ${Array.from(
4937
4964
  (_, i2) => ` <p:sldId id="${slideIdBase + i2}" r:id="rId${slideRIdBase + i2}"/>`
4938
4965
  ).join("\n")}
4939
4966
  </p:sldIdLst>` : "";
4967
+ const firstSlideNum = firstSlideNumber === void 0 ? "" : ` firstSlideNum="${Math.trunc(firstSlideNumber)}"`;
4940
4968
  return `<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
4941
4969
  <p:presentation xmlns:a="http://schemas.openxmlformats.org/drawingml/2006/main"
4942
4970
  xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships"
@@ -4944,7 +4972,7 @@ ${Array.from(
4944
4972
  xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
4945
4973
  xmlns:p14="http://schemas.microsoft.com/office/powerpoint/2010/main"
4946
4974
  xmlns:p15="http://schemas.microsoft.com/office/powerpoint/2012/main"
4947
- saveSubsetFonts="1">
4975
+ saveSubsetFonts="1"${firstSlideNum}>
4948
4976
  <p:sldMasterIdLst>
4949
4977
  <p:sldMasterId id="2147483648" r:id="rId1"/>
4950
4978
  </p:sldMasterIdLst>
@@ -5181,7 +5209,10 @@ async function buildBlankPresentationArchive(options) {
5181
5209
  const zip = new JSZip17__default.default();
5182
5210
  zip.file("[Content_Types].xml", contentTypesXml(layoutCount, initialSlideCount));
5183
5211
  zip.file("_rels/.rels", rootRelsXml());
5184
- zip.file("ppt/presentation.xml", presentationXml(width, height, initialSlideCount));
5212
+ zip.file(
5213
+ "ppt/presentation.xml",
5214
+ presentationXml(width, height, initialSlideCount, options?.firstSlideNumber)
5215
+ );
5185
5216
  zip.file("ppt/_rels/presentation.xml.rels", presentationRelsXml(layoutCount, initialSlideCount));
5186
5217
  zip.file("ppt/slideMasters/slideMaster1.xml", slideMasterXml(layoutCount));
5187
5218
  zip.file("ppt/slideMasters/_rels/slideMaster1.xml.rels", slideMasterRelsXml(layoutCount));
@@ -69823,6 +69854,7 @@ var init_custom_geometry_parser = __esm({
69823
69854
  // pptx/core/geometry/custom-geometry-live-eval.ts
69824
69855
  function pathNodesOf(rawData) {
69825
69856
  const pathLst = rawData?.pathLstXml;
69857
+ restorePathListCommandOrder(pathLst, rawData?.pathCommandOrder);
69826
69858
  return ensureArrayValue(pathLst?.["a:path"]);
69827
69859
  }
69828
69860
  function evaluateCustomGeometryPathData(rawData, pathWidth, pathHeight, overrides28) {
@@ -69871,6 +69903,7 @@ var init_custom_geometry_live_eval = __esm({
69871
69903
  "pptx/core/geometry/custom-geometry-live-eval.ts"() {
69872
69904
  init_utils();
69873
69905
  init_custom_geometry();
69906
+ init_custom_geometry_command_order();
69874
69907
  init_custom_geometry_guides();
69875
69908
  init_custom_geometry_parser();
69876
69909
  init_guide_formula_paths();
@@ -78563,7 +78596,7 @@ function parseShapeLockNode(node, spec) {
78563
78596
  return void 0;
78564
78597
  }
78565
78598
  const locks = {};
78566
- let hasAny = false;
78599
+ let hasAny2 = false;
78567
78600
  for (const prop of spec.permitted) {
78568
78601
  const raw = node[LOCK_ATTRIBUTE[prop]];
78569
78602
  if (raw === void 0) {
@@ -78571,9 +78604,9 @@ function parseShapeLockNode(node, spec) {
78571
78604
  }
78572
78605
  const value = String(raw).trim().toLowerCase();
78573
78606
  locks[prop] = value === "1" || value === "true";
78574
- hasAny = true;
78607
+ hasAny2 = true;
78575
78608
  }
78576
- return hasAny ? locks : void 0;
78609
+ return hasAny2 ? locks : void 0;
78577
78610
  }
78578
78611
  var LOCK_ATTRIBUTE, MODELLED_ATTRIBUTES, CARRIED_WHEN_UNSET;
78579
78612
  var init_shape_lock_node = __esm({
@@ -79440,6 +79473,7 @@ var init_PptxLoadDataBuilder = __esm({
79440
79473
  modernCommentAuthors;
79441
79474
  conformance;
79442
79475
  embedTrueTypeFonts;
79476
+ firstSlideNumber;
79443
79477
  defaultTextStyle;
79444
79478
  withDimensions(width, height, widthEmu, heightEmu) {
79445
79479
  this.width = width;
@@ -79609,6 +79643,10 @@ var init_PptxLoadDataBuilder = __esm({
79609
79643
  this.embedTrueTypeFonts = embedTrueTypeFonts;
79610
79644
  return this;
79611
79645
  }
79646
+ withFirstSlideNumber(firstSlideNumber) {
79647
+ this.firstSlideNumber = firstSlideNumber;
79648
+ return this;
79649
+ }
79612
79650
  withDefaultTextStyle(defaultTextStyle) {
79613
79651
  this.defaultTextStyle = defaultTextStyle;
79614
79652
  return this;
@@ -79660,6 +79698,7 @@ var init_PptxLoadDataBuilder = __esm({
79660
79698
  modernCommentAuthors: this.modernCommentAuthors,
79661
79699
  conformance: this.conformance,
79662
79700
  embedTrueTypeFonts: this.embedTrueTypeFonts,
79701
+ firstSlideNumber: this.firstSlideNumber,
79663
79702
  defaultTextStyle: this.defaultTextStyle
79664
79703
  };
79665
79704
  }
@@ -83715,6 +83754,371 @@ var init_native_animation_media_duration = __esm({
83715
83754
  }
83716
83755
  });
83717
83756
 
83757
+ // pptx/core/services/editor-animation-entry.ts
83758
+ function hasAuthoredAnimationEffect(entry2) {
83759
+ return Boolean(
83760
+ [entry2.entrance, entry2.exit, entry2.emphasis].some((preset2) => preset2 && preset2 !== "none") || entry2.motionPath
83761
+ );
83762
+ }
83763
+ function hasAnimation(animations, elementId) {
83764
+ const entry2 = animationFor(animations, elementId);
83765
+ return Boolean(entry2 && (entry2.entrance || entry2.exit || entry2.emphasis || entry2.motionPath));
83766
+ }
83767
+ function animationFor(slideAnimations, elementId) {
83768
+ return slideAnimations.find((a) => a.elementId === elementId);
83769
+ }
83770
+ function upsert(anims, elementId, updater) {
83771
+ const idx = anims.findIndex((a) => a.elementId === elementId);
83772
+ if (idx >= 0) {
83773
+ const updated2 = updater({ ...anims[idx] });
83774
+ if (updated2 === null) {
83775
+ return anims.filter((a) => a.elementId !== elementId);
83776
+ }
83777
+ return anims.map((a, i2) => i2 === idx ? updated2 : a);
83778
+ }
83779
+ const created = {
83780
+ elementId,
83781
+ durationMs: exports.DEFAULT_ANIMATION_DURATION_MS,
83782
+ order: anims.length,
83783
+ trigger: exports.DEFAULT_ANIMATION_TRIGGER
83784
+ };
83785
+ const updated = updater(created);
83786
+ if (updated === null) {
83787
+ return [...anims];
83788
+ }
83789
+ return [...anims, updated];
83790
+ }
83791
+ exports.DEFAULT_ANIMATION_DURATION_MS = void 0; exports.DEFAULT_ANIMATION_TRIGGER = void 0;
83792
+ var init_editor_animation_entry = __esm({
83793
+ "pptx/core/services/editor-animation-entry.ts"() {
83794
+ exports.DEFAULT_ANIMATION_DURATION_MS = 500;
83795
+ exports.DEFAULT_ANIMATION_TRIGGER = "onClick";
83796
+ }
83797
+ });
83798
+
83799
+ // pptx/core/services/native-animation-after-effect.ts
83800
+ function hasAfterEffectFlag(cTn) {
83801
+ const raw = cTn?.["@_afterEffect"];
83802
+ return raw === "1" || raw === "true";
83803
+ }
83804
+ function extractSrgbHex(colorContainer) {
83805
+ const srgb = colorContainer?.["a:srgbClr"];
83806
+ const val = srgb?.["@_val"];
83807
+ return val !== void 0 ? `#${String(val).toUpperCase()}` : void 0;
83808
+ }
83809
+ function findDimBehaviour(subTnLst) {
83810
+ for (const node of ensureArray11(subTnLst["p:animClr"])) {
83811
+ const cBhvr = node["p:cBhvr"];
83812
+ if (extractAttrNameFromCBhvr(cBhvr) !== "ppt_c") {
83813
+ continue;
83814
+ }
83815
+ if (!hasAfterEffectFlag(cBhvr?.["p:cTn"])) {
83816
+ continue;
83817
+ }
83818
+ const toNode = node["p:to"];
83819
+ const color2 = extractSrgbHex(toNode);
83820
+ if (color2) {
83821
+ return { action: "dimToColor", color: color2 };
83822
+ }
83823
+ const colorRef = themeColorRefFromSchemeClr(toNode?.["a:schemeClr"]);
83824
+ return colorRef ? { action: "dimToColor", colorRef } : { action: "dimToColor" };
83825
+ }
83826
+ return void 0;
83827
+ }
83828
+ function findHideBehaviour(subTnLst) {
83829
+ for (const node of ensureArray11(subTnLst["p:set"])) {
83830
+ const cBhvr = node["p:cBhvr"];
83831
+ if (extractAttrNameFromCBhvr(cBhvr) !== "style.visibility") {
83832
+ continue;
83833
+ }
83834
+ const innerCTn = cBhvr?.["p:cTn"];
83835
+ if (!hasAfterEffectFlag(innerCTn)) {
83836
+ continue;
83837
+ }
83838
+ const toNode = node["p:to"];
83839
+ const strVal = toNode?.["p:strVal"]?.["@_val"];
83840
+ if (String(strVal ?? "").toLowerCase() !== "hidden") {
83841
+ continue;
83842
+ }
83843
+ const action = innerCTn?.["@_masterRel"] === "sameClick" ? "hideAfterAnimation" : "hideOnNextClick";
83844
+ return { action };
83845
+ }
83846
+ return void 0;
83847
+ }
83848
+ function extractAfterAnimationFromSubTnLst(cTn) {
83849
+ const subTnLst = cTn["p:subTnLst"];
83850
+ if (!subTnLst) {
83851
+ return void 0;
83852
+ }
83853
+ return findDimBehaviour(subTnLst) ?? findHideBehaviour(subTnLst);
83854
+ }
83855
+ var init_native_animation_after_effect = __esm({
83856
+ "pptx/core/services/native-animation-after-effect.ts"() {
83857
+ init_theme_color_ref();
83858
+ init_native_animation_attr_name();
83859
+ init_native_animation_helpers();
83860
+ }
83861
+ });
83862
+
83863
+ // pptx/core/services/animation-after-effect-write.ts
83864
+ function assertAfterAnimationClearSupported(effectCTn) {
83865
+ const shapeIds = /* @__PURE__ */ new Set();
83866
+ const checkTarget = (value) => {
83867
+ if (Array.isArray(value)) {
83868
+ value.forEach(checkTarget);
83869
+ return;
83870
+ }
83871
+ if (!isXmlObject5(value)) return;
83872
+ const shapeTarget = value["p:spTgt"];
83873
+ if (isXmlObject5(shapeTarget) && shapeTarget["@_spid"] !== void 0)
83874
+ shapeIds.add(String(shapeTarget["@_spid"]));
83875
+ if ([
83876
+ "p:bg",
83877
+ "p:txEl",
83878
+ "p:subSp",
83879
+ "p:graphicEl",
83880
+ "p:oleChartEl",
83881
+ "p:sndTgt",
83882
+ "p:inkTgt",
83883
+ "p:sldTgt"
83884
+ ].some((key2) => value[key2] !== void 0))
83885
+ throw new Error("Clearing after-animation supports whole-shape targets only");
83886
+ Object.values(value).forEach(checkTarget);
83887
+ };
83888
+ checkTarget(effectCTn["p:childTnLst"]);
83889
+ if (shapeIds.size > 1)
83890
+ throw new Error("Editing after-animation supports a single whole-shape target only");
83891
+ const sub = effectCTn["p:subTnLst"];
83892
+ if (!isXmlObject5(sub)) return;
83893
+ const countAfterFlags = (value) => {
83894
+ if (Array.isArray(value))
83895
+ return value.reduce((count, child30) => count + countAfterFlags(child30), 0);
83896
+ if (!isXmlObject5(value)) return 0;
83897
+ return Object.entries(value).reduce(
83898
+ (count, [key2, child30]) => count + (key2 === "@_afterEffect" && ["1", "true"].includes(String(child30)) ? 1 : countAfterFlags(child30)),
83899
+ 0
83900
+ );
83901
+ };
83902
+ for (const [key2, value] of Object.entries(sub)) {
83903
+ for (const node of ensureArray11(value)) {
83904
+ const flags = countAfterFlags(node);
83905
+ if (!flags) continue;
83906
+ if (flags !== 1 || !extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: node } }))
83907
+ throw new Error("Cannot clear an unsupported native after-animation behavior");
83908
+ checkTarget(node);
83909
+ }
83910
+ }
83911
+ if (shapeIds.size > 1)
83912
+ throw new Error("Editing after-animation supports a single whole-shape target only");
83913
+ }
83914
+ function clearAfterAnimationBehavior(effectCTn) {
83915
+ const sub = effectCTn["p:subTnLst"];
83916
+ if (!isXmlObject5(sub)) return;
83917
+ for (const key2 of Object.keys(sub)) {
83918
+ const nodes = ensureArray11(sub[key2]);
83919
+ const remaining = nodes.filter(
83920
+ (node) => !extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: node } })
83921
+ );
83922
+ if (remaining.length === nodes.length) continue;
83923
+ if (remaining.length === 0) delete sub[key2];
83924
+ else sub[key2] = remaining.length === 1 ? remaining[0] : remaining;
83925
+ }
83926
+ if (Object.keys(sub).length === 0) delete effectCTn["p:subTnLst"];
83927
+ }
83928
+ function applyAfterAnimationBehavior(effectCTn, anim, shapeId) {
83929
+ if (anim.afterAnimation === void 0) return;
83930
+ if (anim.afterAnimation === "none") {
83931
+ assertAfterAnimationClearSupported(effectCTn);
83932
+ clearAfterAnimationBehavior(effectCTn);
83933
+ return;
83934
+ }
83935
+ assertAfterAnimationClearSupported(effectCTn);
83936
+ clearAfterAnimationBehavior(effectCTn);
83937
+ delete effectCTn["@_afterEffect"];
83938
+ if (anim.afterAnimation === "dimToColor" && anim.afterAnimationColor) {
83939
+ appendAfterAnimationBehavior(effectCTn, buildDimSubTnLst(shapeId, anim.afterAnimationColor));
83940
+ return;
83941
+ }
83942
+ if (anim.afterAnimation === "hideAfterAnimation") {
83943
+ const entranceId = effectCTn["@_id"] !== void 0 ? String(effectCTn["@_id"]) : "0";
83944
+ appendAfterAnimationBehavior(effectCTn, buildHideSubTnLst(shapeId, "sameClick", entranceId));
83945
+ return;
83946
+ }
83947
+ if (anim.afterAnimation === "hideOnNextClick") {
83948
+ appendAfterAnimationBehavior(effectCTn, buildHideSubTnLst(shapeId, "nextClick"));
83949
+ }
83950
+ }
83951
+ function appendAfterAnimationBehavior(effect, addition) {
83952
+ const sub = isXmlObject5(effect["p:subTnLst"]) ? effect["p:subTnLst"] : {};
83953
+ for (const [key2, value] of Object.entries(addition)) {
83954
+ const nodes = [...ensureArray11(sub[key2]), ...ensureArray11(value)];
83955
+ sub[key2] = nodes.length === 1 ? nodes[0] : nodes;
83956
+ }
83957
+ effect["p:subTnLst"] = sub;
83958
+ }
83959
+ function buildDimSubTnLst(shapeId, colorHex) {
83960
+ const hex3 = colorHex.replace(/^#/u, "").toUpperCase();
83961
+ return {
83962
+ "p:animClr": {
83963
+ "@_clrSpc": "rgb",
83964
+ "@_dir": "cw",
83965
+ "p:cBhvr": {
83966
+ "@_override": "childStyle",
83967
+ "p:cTn": {
83968
+ "@_dur": "1",
83969
+ "@_fill": "hold",
83970
+ "@_display": "0",
83971
+ "@_masterRel": "nextClick",
83972
+ "@_afterEffect": "1"
83973
+ },
83974
+ "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
83975
+ "p:attrNameLst": { "p:attrName": "ppt_c" }
83976
+ },
83977
+ "p:to": { "a:srgbClr": { "@_val": hex3 } }
83978
+ }
83979
+ };
83980
+ }
83981
+ function buildHideSubTnLst(shapeId, masterRel, entranceId) {
83982
+ const cTn = {
83983
+ "@_dur": "1",
83984
+ "@_fill": "hold",
83985
+ "@_display": "0",
83986
+ "@_masterRel": masterRel,
83987
+ "@_afterEffect": "1"
83988
+ };
83989
+ if (masterRel === "sameClick") {
83990
+ cTn["p:stCondLst"] = {
83991
+ "p:cond": {
83992
+ "@_evt": "end",
83993
+ "@_delay": "0",
83994
+ "p:tn": { "@_val": entranceId ?? "0" }
83995
+ }
83996
+ };
83997
+ }
83998
+ return {
83999
+ "p:set": {
84000
+ "p:cBhvr": {
84001
+ "@_override": "childStyle",
84002
+ "p:cTn": cTn,
84003
+ "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
84004
+ "p:attrNameLst": { "p:attrName": "style.visibility" }
84005
+ },
84006
+ "p:to": { "p:strVal": { "@_val": "hidden" } }
84007
+ }
84008
+ };
84009
+ }
84010
+ var init_animation_after_effect_write = __esm({
84011
+ "pptx/core/services/animation-after-effect-write.ts"() {
84012
+ init_native_animation_after_effect();
84013
+ init_native_animation_helpers();
84014
+ }
84015
+ });
84016
+
84017
+ // pptx/core/services/editor-animation-after-effect.ts
84018
+ function setAfterAnimation(anims, elementId, action) {
84019
+ return upsert(anims, elementId, (cur) => {
84020
+ const value = action;
84021
+ return {
84022
+ ...cur,
84023
+ afterAnimation: value,
84024
+ afterAnimationColor: value === "dimToColor" ? cur.afterAnimationColor ?? exports.DEFAULT_AFTER_ANIMATION_DIM_COLOR : void 0
84025
+ };
84026
+ });
84027
+ }
84028
+ function setAfterAnimationColor(anims, elementId, color2) {
84029
+ const entry2 = animationFor(anims, elementId);
84030
+ if (!entry2 || (entry2.afterAnimation ?? entry2.nativeAfterAnimation) !== "dimToColor") {
84031
+ return [...anims];
84032
+ }
84033
+ return upsert(anims, elementId, (cur) => ({
84034
+ ...cur,
84035
+ afterAnimation: "dimToColor",
84036
+ afterAnimationColor: color2
84037
+ }));
84038
+ }
84039
+ function getAfterAnimation(slideAnimations, elementId) {
84040
+ const entry2 = animationFor(slideAnimations, elementId);
84041
+ return entry2?.afterAnimation ?? entry2?.nativeAfterAnimation ?? "none";
84042
+ }
84043
+ function getAfterAnimationState(entry2) {
84044
+ const action = entry2?.afterAnimation ?? entry2?.nativeAfterAnimation ?? "none";
84045
+ return {
84046
+ action,
84047
+ color: action === "dimToColor" ? entry2?.afterAnimationColor ?? entry2?.nativeAfterAnimationColor : void 0,
84048
+ showColor: entry2?.afterAnimation !== void 0 || /^#[0-9a-f]{6}$/iu.test(entry2?.nativeAfterAnimationColor ?? "")
84049
+ };
84050
+ }
84051
+ function isNativeAfterAnimationOnly(entry2) {
84052
+ return Boolean(
84053
+ entry2?.nativeAfterAnimation && !entry2.entrance && !entry2.exit && !entry2.emphasis && !entry2.motionPath
84054
+ );
84055
+ }
84056
+ function mergeNativeAfterAnimationIntoEditorAnimations(nativeAnimations, animations, rawTiming) {
84057
+ for (const native of nativeAnimations ?? []) {
84058
+ const existing = native.targetId ? animationFor(animations, native.targetId) : void 0;
84059
+ const action = native.afterAnimationAction ?? (existing?.afterAnimation !== void 0 ? "none" : void 0);
84060
+ if ((nativeAnimations ?? []).filter(
84061
+ (other) => other.targetId === native.targetId && ["entr", "emph"].includes(other.presetClass ?? "")
84062
+ ).length !== 1)
84063
+ continue;
84064
+ if (!native.targetId || !action || !["entr", "emph"].includes(native.presetClass ?? "") || native.textTarget)
84065
+ continue;
84066
+ if (native.target && (native.target.type !== "shape" || native.target.backgroundOnly || native.target.subShapeId || native.target.graphicElement || native.target.oleChartElement))
84067
+ continue;
84068
+ try {
84069
+ if (rawTiming && native.target?.type === "shape" && indexEffectNodes(rawTiming).filter(
84070
+ (ref) => ref.spid === (native.target?.type === "shape" ? native.target.shapeId : void 0) && ["entr", "emph"].includes(ref.presetClass)
84071
+ ).length !== 1)
84072
+ continue;
84073
+ const effect = rawTiming ? indexEffectNodes(rawTiming).find(
84074
+ (ref) => String(ref.cTn["@_id"]) === String(native.nodeId) && native.target?.type === "shape" && ref.spid === native.target.shapeId
84075
+ ) : void 0;
84076
+ if (rawTiming && !effect) continue;
84077
+ assertAfterAnimationClearSupported(
84078
+ effect?.cTn ?? { "p:subTnLst": native.cTnAttributes?.["p:subTnLst"] }
84079
+ );
84080
+ } catch {
84081
+ continue;
84082
+ }
84083
+ let entry2 = animationFor(animations, native.targetId);
84084
+ if (!entry2) {
84085
+ entry2 = { elementId: native.targetId };
84086
+ animations.push(entry2);
84087
+ }
84088
+ if (entry2.nativeAfterAnimation !== void 0) continue;
84089
+ entry2.nativeAfterAnimation = action;
84090
+ entry2.nativeAfterAnimationColor = native.afterAnimationColor;
84091
+ }
84092
+ }
84093
+ function isNativeAfterAnimationFallback(entry2) {
84094
+ return entry2.nativeAfterAnimation !== void 0 && Object.entries(entry2).every(
84095
+ ([key2, value]) => value === void 0 || [
84096
+ "elementId",
84097
+ "nativeAfterAnimation",
84098
+ "nativeAfterAnimationColor",
84099
+ "soundRId",
84100
+ "soundPath",
84101
+ "soundName",
84102
+ "stopSound"
84103
+ ].includes(key2)
84104
+ );
84105
+ }
84106
+ exports.AFTER_ANIMATION_VALUES = void 0; exports.DEFAULT_AFTER_ANIMATION_DIM_COLOR = void 0;
84107
+ var init_editor_animation_after_effect = __esm({
84108
+ "pptx/core/services/editor-animation-after-effect.ts"() {
84109
+ init_editor_animation_entry();
84110
+ init_animation_after_effect_write();
84111
+ init_animation_timing_tree();
84112
+ exports.AFTER_ANIMATION_VALUES = [
84113
+ "none",
84114
+ "dimToColor",
84115
+ "hideAfterAnimation",
84116
+ "hideOnNextClick"
84117
+ ];
84118
+ exports.DEFAULT_AFTER_ANIMATION_DIM_COLOR = "#808080";
84119
+ }
84120
+ });
84121
+
83718
84122
  // pptx/core/services/slide-name.ts
83719
84123
  function asNode3(value) {
83720
84124
  return value && typeof value === "object" && !Array.isArray(value) ? value : void 0;
@@ -84045,6 +84449,7 @@ var init_PptxSlideLoaderService = __esm({
84045
84449
  init_animation_target_reconcile();
84046
84450
  init_animation_timeline_anchors();
84047
84451
  init_native_animation_media_duration();
84452
+ init_editor_animation_after_effect();
84048
84453
  init_slide_name();
84049
84454
  init_slide_transition_envelope();
84050
84455
  exports.PptxSlideLoaderService = class {
@@ -84256,6 +84661,8 @@ var init_PptxSlideLoaderService = __esm({
84256
84661
  }
84257
84662
  });
84258
84663
  reconcileAnimationTargets(elements3, nativeAnimations, animations, animationTimelineAnchors);
84664
+ animations ??= [];
84665
+ mergeNativeAfterAnimationIntoEditorAnimations(nativeAnimations, animations, rawTiming);
84259
84666
  mergeNativeSoundIntoEditorAnimations(nativeAnimations, animations);
84260
84667
  mergeNativeBuildTemplatesIntoEditorAnimations(nativeAnimations, animations);
84261
84668
  applyHiddenFlagFromRawXml(elements3);
@@ -84598,6 +85005,7 @@ function sortOrder(animation) {
84598
85005
  exports.PptxEditorAnimationService = void 0;
84599
85006
  var init_PptxEditorAnimationService = __esm({
84600
85007
  "pptx/core/services/PptxEditorAnimationService.ts"() {
85008
+ init_editor_animation_after_effect();
84601
85009
  init_editor_animation_normalizers();
84602
85010
  init_editor_animation_trigger_meta();
84603
85011
  exports.PptxEditorAnimationService = class {
@@ -84696,7 +85104,7 @@ var init_PptxEditorAnimationService = __esm({
84696
85104
  * @param animations - Editor animations to serialize.
84697
85105
  */
84698
85106
  applyEditorAnimations(slideNode, animations) {
84699
- const sequenced = [...animations].sort((left, right) => sortOrder(left) - sortOrder(right));
85107
+ const sequenced = animations.filter((entry2) => !isNativeAfterAnimationFallback(entry2)).sort((left, right) => sortOrder(left) - sortOrder(right));
84700
85108
  const sanitizedAnimations = sequenced.map((animation) => {
84701
85109
  const elementId = String(animation.elementId || "").trim();
84702
85110
  if (elementId.length === 0) {
@@ -84710,7 +85118,7 @@ var init_PptxEditorAnimationService = __esm({
84710
85118
  const orderIsTreeDerived = animation.orderFromTimeline !== void 0 && animation.order === animation.orderFromTimeline;
84711
85119
  const order = typeof animation.order === "number" && Number.isFinite(animation.order) && !orderIsTreeDerived ? Math.round(animation.order) : void 0;
84712
85120
  const repeatCount = typeof animation.repeatCount === "number" && Number.isFinite(animation.repeatCount) && animation.repeatCount > 0 ? animation.repeatCount : void 0;
84713
- if (!entrance && !exit3 && !emphasis && !animation.motionPath) {
85121
+ if (!entrance && !exit3 && !emphasis && !animation.motionPath && animation.afterAnimation === void 0) {
84714
85122
  return null;
84715
85123
  }
84716
85124
  return {
@@ -85144,121 +85552,6 @@ var init_native_animation_media_walk = __esm({
85144
85552
  }
85145
85553
  });
85146
85554
 
85147
- // pptx/core/services/animation-effect-filter-parsing.ts
85148
- function parseFilterToken(raw) {
85149
- const trimmed2 = raw.trim();
85150
- if (!trimmed2) {
85151
- return void 0;
85152
- }
85153
- const match = FILTER_TOKEN_RE.exec(trimmed2);
85154
- if (!match) {
85155
- return void 0;
85156
- }
85157
- const family = match[1].toLowerCase();
85158
- const subtypeToken = match[2];
85159
- const subtype = subtypeToken !== void 0 && subtypeToken !== "" ? subtypeToken : void 0;
85160
- return { family, subtype };
85161
- }
85162
- function parseAnimEffectFilter(childTnList) {
85163
- if (!childTnList) {
85164
- return void 0;
85165
- }
85166
- const rawAnimEffect = childTnList["p:animEffect"];
85167
- const animEffect = Array.isArray(rawAnimEffect) ? rawAnimEffect[0] : rawAnimEffect;
85168
- if (!animEffect || typeof animEffect !== "object") {
85169
- return void 0;
85170
- }
85171
- const node = animEffect;
85172
- const filterAttr = node["@_filter"];
85173
- if (filterAttr === void 0 || filterAttr === null) {
85174
- return void 0;
85175
- }
85176
- const raw = String(filterAttr);
85177
- const firstToken = raw.split(";")[0] ?? "";
85178
- const parsed = parseFilterToken(firstToken);
85179
- if (!parsed) {
85180
- return void 0;
85181
- }
85182
- const transitionAttr = node["@_transition"];
85183
- const transition = transitionAttr === "in" || transitionAttr === "out" || transitionAttr === "none" ? transitionAttr : void 0;
85184
- return {
85185
- family: parsed.family,
85186
- subtype: parsed.subtype,
85187
- transition,
85188
- raw
85189
- };
85190
- }
85191
- var FILTER_TOKEN_RE;
85192
- var init_animation_effect_filter_parsing = __esm({
85193
- "pptx/core/services/animation-effect-filter-parsing.ts"() {
85194
- FILTER_TOKEN_RE = /^([A-Za-z]+)(?:\(([^)]*)\))?$/;
85195
- }
85196
- });
85197
-
85198
- // pptx/core/services/native-animation-after-effect.ts
85199
- function hasAfterEffectFlag(cTn) {
85200
- const raw = cTn?.["@_afterEffect"];
85201
- return raw === "1" || raw === "true";
85202
- }
85203
- function extractSrgbHex(colorContainer) {
85204
- const srgb = colorContainer?.["a:srgbClr"];
85205
- const val = srgb?.["@_val"];
85206
- return val !== void 0 ? `#${String(val).toUpperCase()}` : void 0;
85207
- }
85208
- function findDimBehaviour(subTnLst) {
85209
- for (const node of ensureArray11(subTnLst["p:animClr"])) {
85210
- const cBhvr = node["p:cBhvr"];
85211
- if (extractAttrNameFromCBhvr(cBhvr) !== "ppt_c") {
85212
- continue;
85213
- }
85214
- if (!hasAfterEffectFlag(cBhvr?.["p:cTn"])) {
85215
- continue;
85216
- }
85217
- const toNode = node["p:to"];
85218
- const color2 = extractSrgbHex(toNode);
85219
- if (color2) {
85220
- return { action: "dimToColor", color: color2 };
85221
- }
85222
- const colorRef = themeColorRefFromSchemeClr(toNode?.["a:schemeClr"]);
85223
- return colorRef ? { action: "dimToColor", colorRef } : { action: "dimToColor" };
85224
- }
85225
- return void 0;
85226
- }
85227
- function findHideBehaviour(subTnLst) {
85228
- for (const node of ensureArray11(subTnLst["p:set"])) {
85229
- const cBhvr = node["p:cBhvr"];
85230
- if (extractAttrNameFromCBhvr(cBhvr) !== "style.visibility") {
85231
- continue;
85232
- }
85233
- const innerCTn = cBhvr?.["p:cTn"];
85234
- if (!hasAfterEffectFlag(innerCTn)) {
85235
- continue;
85236
- }
85237
- const toNode = node["p:to"];
85238
- const strVal = toNode?.["p:strVal"]?.["@_val"];
85239
- if (String(strVal ?? "").toLowerCase() !== "hidden") {
85240
- continue;
85241
- }
85242
- const action = innerCTn?.["@_masterRel"] === "sameClick" ? "hideAfterAnimation" : "hideOnNextClick";
85243
- return { action };
85244
- }
85245
- return void 0;
85246
- }
85247
- function extractAfterAnimationFromSubTnLst(cTn) {
85248
- const subTnLst = cTn["p:subTnLst"];
85249
- if (!subTnLst) {
85250
- return void 0;
85251
- }
85252
- return findDimBehaviour(subTnLst) ?? findHideBehaviour(subTnLst);
85253
- }
85254
- var init_native_animation_after_effect = __esm({
85255
- "pptx/core/services/native-animation-after-effect.ts"() {
85256
- init_theme_color_ref();
85257
- init_native_animation_attr_name();
85258
- init_native_animation_helpers();
85259
- }
85260
- });
85261
-
85262
85555
  // pptx/core/services/native-animation-cbhvr-attrs.ts
85263
85556
  function extractCBhvrAttrs(cBhvr) {
85264
85557
  if (!cBhvr) {
@@ -85335,59 +85628,6 @@ var init_native_animation_cbhvr_attrs = __esm({
85335
85628
  }
85336
85629
  });
85337
85630
 
85338
- // pptx/core/services/native-animation-attribute-components.ts
85339
- function extractBounceEndFraction(raw) {
85340
- if (raw === void 0) {
85341
- return void 0;
85342
- }
85343
- const parsed = Number(raw);
85344
- if (!Number.isFinite(parsed)) {
85345
- return void 0;
85346
- }
85347
- return Math.max(0, Math.min(1, parsed / 1e5));
85348
- }
85349
- function extractAttributeAnimations(childTnList) {
85350
- if (!childTnList) {
85351
- return void 0;
85352
- }
85353
- const components = [];
85354
- for (const node of ensureArray11(childTnList["p:anim"])) {
85355
- const attrName = extractAttrNameFromCBhvr(node["p:cBhvr"]);
85356
- const keyframes = extractKeyframes(node);
85357
- const from = node["@_from"] !== void 0 ? String(node["@_from"]) : void 0;
85358
- const to = node["@_to"] !== void 0 ? String(node["@_to"]) : void 0;
85359
- const by = node["@_by"] !== void 0 ? String(node["@_by"]) : void 0;
85360
- const hasKeyframes = Boolean(keyframes && keyframes.length > 0);
85361
- if (!attrName || !hasKeyframes && from === void 0 && to === void 0 && by === void 0) {
85362
- continue;
85363
- }
85364
- const behavior = node["p:cBhvr"];
85365
- const cTn = behavior?.["p:cTn"];
85366
- const calcMode = normalizeCalcMode(node["@_calcmode"]);
85367
- const bounceEnd = extractBounceEndFraction(node["@_p14:bounceEnd"]);
85368
- components.push({
85369
- attrName,
85370
- keyframes: keyframes ?? [],
85371
- durationMs: readTimingAttr(cTn?.["@_dur"]),
85372
- delayMs: cTn ? extractStartConditionDelayMs(cTn) : void 0,
85373
- ...calcMode ? { calcMode } : {},
85374
- ...from !== void 0 ? { from } : {},
85375
- ...to !== void 0 ? { to } : {},
85376
- ...by !== void 0 ? { by } : {},
85377
- ...bounceEnd !== void 0 ? { bounceEnd } : {}
85378
- });
85379
- }
85380
- return components.length > 0 ? components : void 0;
85381
- }
85382
- var init_native_animation_attribute_components = __esm({
85383
- "pptx/core/services/native-animation-attribute-components.ts"() {
85384
- init_native_animation_attr_name();
85385
- init_native_animation_cbhvr_attrs();
85386
- init_native_animation_extended_helpers();
85387
- init_native_animation_helpers();
85388
- }
85389
- });
85390
-
85391
85631
  // pptx/core/services/native-animation-behaviors.ts
85392
85632
  function attrText(raw) {
85393
85633
  if (raw === void 0 || raw === null) {
@@ -85407,6 +85647,16 @@ function readTiming(cTn) {
85407
85647
  return {};
85408
85648
  }
85409
85649
  const timing = {};
85650
+ const starts = ensureArray11(cTn["p:stCondLst"]?.["p:cond"]);
85651
+ if (starts.length > 1 || cTn["@_dur"] === "indefinite" || cTn["@_repeatCount"] === "indefinite" || cTn["@_repeatDur"] !== void 0 || cTn["p:endCondLst"] !== void 0 || cTn["p:endSync"] !== void 0 || starts.some(
85652
+ (condition) => condition === null || typeof condition !== "object" || condition["@_evt"] !== void 0 || condition["@_tn"] !== void 0 || condition["@_rtn"] !== void 0 || condition["p:tn"] !== void 0 || condition["p:rtn"] !== void 0 || condition["p:tgtEl"] !== void 0 || condition["@_delay"] !== void 0 && !/^\d+$/u.test(String(condition["@_delay"])) || condition["@_delay"] === "indefinite"
85653
+ )) {
85654
+ timing.unsupportedSetTiming = true;
85655
+ }
85656
+ const fill = cTn["@_fill"];
85657
+ if (fill === "remove" || fill === "freeze" || fill === "hold" || fill === "transition") {
85658
+ timing.fill = fill;
85659
+ }
85410
85660
  const durationMs = readTimingAttr(cTn["@_dur"]);
85411
85661
  if (durationMs !== void 0) {
85412
85662
  timing.durationMs = durationMs;
@@ -85579,6 +85829,221 @@ var init_native_animation_behaviors = __esm({
85579
85829
  }
85580
85830
  });
85581
85831
 
85832
+ // pptx/core/services/native-animation-visibility-timing.ts
85833
+ function hasNativeVisibilitySet(node) {
85834
+ if (node["@_presetClass"] !== "entr" || String(node["@_presetID"]) !== "0") return false;
85835
+ const children16 = node["p:childTnLst"];
85836
+ if (!isXmlObject5(children16)) return false;
85837
+ return ensureArray11(children16["p:set"]).some((set2) => {
85838
+ const common = set2["p:cBhvr"];
85839
+ const list2 = isXmlObject5(common) ? common["p:attrNameLst"] : void 0;
85840
+ const names = isXmlObject5(list2) ? list2["p:attrName"] : void 0;
85841
+ return (Array.isArray(names) ? names : [names]).some(
85842
+ (name) => String(isXmlObject5(name) ? name["#text"] : name).trim().toLowerCase() === "style.visibility"
85843
+ );
85844
+ });
85845
+ }
85846
+ function simpleStarts(node, clickGate = false) {
85847
+ const list2 = node["p:stCondLst"];
85848
+ if (list2 === void 0) return true;
85849
+ if (!isXmlObject5(list2) || Object.keys(list2).some((key2) => key2 !== "p:cond")) return false;
85850
+ const conditions = ensureArray11(list2["p:cond"]);
85851
+ return conditions.length === 1 && conditions.every(
85852
+ (condition) => Object.keys(condition).every((key2) => key2 === "@_delay") && (condition["@_delay"] === void 0 || /^\d+$/u.test(String(condition["@_delay"])) && Number.isSafeInteger(Number(condition["@_delay"])) && Number(condition["@_delay"]) <= 2147483647 || clickGate && condition["@_delay"] === "indefinite")
85853
+ );
85854
+ }
85855
+ function unsupportedVisibilityContainerTiming(node) {
85856
+ if (node["@_presetClass"] !== void 0) return false;
85857
+ const structuralRoot = ["tmRoot", "mainSeq"].includes(String(node["@_nodeType"] ?? ""));
85858
+ return !neutralTiming(node) || !simpleStarts(node, true) || ensureArray11(isXmlObject5(node["p:stCondLst"]) ? node["p:stCondLst"]["p:cond"] : void 0).some(
85859
+ (condition) => /^\d+$/u.test(String(condition["@_delay"])) && Number(condition["@_delay"]) > 0
85860
+ ) || node["@_dur"] !== void 0 && !(structuralRoot && node["@_dur"] === "indefinite") || node["@_fill"] !== void 0 && node["@_fill"] !== "hold" || node["p:subTnLst"] !== void 0;
85861
+ }
85862
+ function extractVisibilitySetTiming(node) {
85863
+ if (node["@_presetClass"] !== "entr" || String(node["@_presetID"]) !== "0" || String(node["@_presetSubtype"] ?? "0") !== "0" || node["@_dur"] !== void 0 || node["@_fill"] !== "hold" || !neutralTiming(node) || !simpleStarts(node))
85864
+ return void 0;
85865
+ const children16 = node["p:childTnLst"];
85866
+ if (!isXmlObject5(children16) || Object.keys(children16).length !== 1 || !children16["p:set"])
85867
+ return void 0;
85868
+ const sets = ensureArray11(children16["p:set"]);
85869
+ if (sets.length !== 1) return void 0;
85870
+ if (Object.keys(sets[0]).some((key2) => !["p:cBhvr", "p:to"].includes(key2))) return void 0;
85871
+ const to = sets[0]["p:to"];
85872
+ if (!isXmlObject5(to) || Object.keys(to).length !== 1 || !isXmlObject5(to["p:strVal"]) || Object.keys(to["p:strVal"]).some((key2) => key2 !== "@_val") || to["p:strVal"]["@_val"] !== "visible")
85873
+ return void 0;
85874
+ const common = sets[0]["p:cBhvr"];
85875
+ if (!isXmlObject5(common) || Object.keys(common).some(
85876
+ (key2) => !["p:cTn", "p:tgtEl", "p:attrNameLst", "@_additive"].includes(key2)
85877
+ ) || common["@_additive"] !== void 0 && !["base", "repl", "none"].includes(String(common["@_additive"])))
85878
+ return void 0;
85879
+ const target = common["p:tgtEl"];
85880
+ if (!isXmlObject5(target) || Object.keys(target).length !== 1 || !isXmlObject5(target["p:spTgt"]) || Object.keys(target["p:spTgt"]).some((key2) => key2 !== "@_spid") || !/^\d+$/u.test(String(target["p:spTgt"]["@_spid"])))
85881
+ return void 0;
85882
+ const child30 = common["p:cTn"];
85883
+ if (!isXmlObject5(child30) || !neutralTiming(child30) || !simpleStarts(child30) || String(child30["@_dur"]) !== "1" || child30["@_fill"] !== "hold")
85884
+ return void 0;
85885
+ const behavior = extractBehaviors(children16)?.[0];
85886
+ if (!behavior || behavior.kind !== "set" || behavior.value !== "visible" || behavior.attrNames.length !== 1 || behavior.attrNames[0] !== "style.visibility" || behavior.timing.unsupportedSetTiming)
85887
+ return void 0;
85888
+ try {
85889
+ assertAfterAnimationClearSupported(node);
85890
+ } catch {
85891
+ return void 0;
85892
+ }
85893
+ const sub = node["p:subTnLst"];
85894
+ if (sub !== void 0) {
85895
+ if (!isXmlObject5(sub)) return void 0;
85896
+ for (const [key2, raw] of Object.entries(sub)) {
85897
+ for (const value of ensureArray11(raw)) {
85898
+ if (!extractAfterAnimationFromSubTnLst({ "p:subTnLst": { [key2]: value } }))
85899
+ return void 0;
85900
+ }
85901
+ }
85902
+ }
85903
+ const delayMs = behavior.timing.delayMs ?? 0;
85904
+ if (!Number.isSafeInteger(delayMs) || delayMs < 0 || delayMs >= 2147483647) return void 0;
85905
+ return { delayMs, durationMs: 1 };
85906
+ }
85907
+ function resolveVisibilitySetTiming(anim) {
85908
+ const timing = anim.visibilitySetTiming;
85909
+ if (!timing || anim.presetClass !== "entr" || anim.presetId !== 0 || (anim.presetSubtype ?? 0) !== 0 || anim.fill !== "hold" || anim.seqConcurrent !== true || anim.seqNextAction !== "seek" || !["onClick", "withPrevious"].includes(anim.trigger ?? "") || anim.textTarget || !anim.target || anim.target.type !== "shape" || anim.target.backgroundOnly || anim.target.subShapeId || anim.target.graphicElement || anim.target.oleChartElement || anim.autoReverse || (anim.accel ?? 0) !== 0 || (anim.decel ?? 0) !== 0 || (anim.startConditions?.length ?? 0) > 1 || anim.startConditions?.some(
85910
+ (condition) => Object.entries(condition).some(([key2, value]) => value !== void 0 && key2 !== "delay") || condition.delay !== void 0 && (!Number.isSafeInteger(condition.delay) || condition.delay < 0)
85911
+ ) || (anim.repeatCount ?? 1) !== 1 || anim.repeatDurMs !== void 0 || (anim.speedPct ?? 100) !== 100 || anim.unsupportedOpacitySetTiming || anim.unsupportedVisibilitySet || anim.endConditions?.length || anim.rawEndCondLst !== void 0 || anim.cTnAttributes?.["@_tmFilter"] !== void 0 || anim.cTnAttributes?.["@_endSync"] !== void 0 || Object.keys(anim.cTnAttributes ?? {}).some((key2) => key2 !== "p:subTnLst") || !Number.isSafeInteger(timing.delayMs) || timing.delayMs < 0 || timing.delayMs >= 2147483647 || timing.durationMs !== 1 || anim.durationMs !== timing.delayMs + 1)
85912
+ return void 0;
85913
+ const behavior = anim.behaviors?.[0];
85914
+ if (anim.behaviors?.length !== 1 || !behavior || behavior.kind !== "set" || behavior.value !== "visible" || behavior.attrNames.length !== 1 || behavior.attrNames[0] !== "style.visibility" || behavior.timing.unsupportedSetTiming || behavior.timing.autoReverse || (behavior.timing.repeatCount ?? 1) !== 1 || behavior.timing.tmFilter !== void 0 || (behavior.timing.accel ?? 0) !== 0 || (behavior.timing.decel ?? 0) !== 0 || behavior.additive !== void 0 && !["base", "repl", "none"].includes(behavior.additive) || behavior.timing.fill !== "hold" || behavior.timing.durationMs !== 1 || (behavior.timing.delayMs ?? 0) !== timing.delayMs)
85915
+ return void 0;
85916
+ return timing;
85917
+ }
85918
+ var neutralTiming;
85919
+ var init_native_animation_visibility_timing = __esm({
85920
+ "pptx/core/services/native-animation-visibility-timing.ts"() {
85921
+ init_native_animation_behaviors();
85922
+ init_animation_after_effect_write();
85923
+ init_native_animation_after_effect();
85924
+ init_native_animation_helpers();
85925
+ neutralTiming = (node) => [
85926
+ "@_repeatDur",
85927
+ "@_tmFilter",
85928
+ "@_endSync",
85929
+ "@_evtFilter",
85930
+ "@_display",
85931
+ "@_masterRel",
85932
+ "@_syncBehavior",
85933
+ "@_nodePh",
85934
+ "@_progress",
85935
+ "@_p14:presetBounceEnd",
85936
+ "p:endCondLst",
85937
+ "p:endSync",
85938
+ "p:iterate"
85939
+ ].every((key2) => node[key2] === void 0) && (node["@_repeatCount"] === void 0 || String(node["@_repeatCount"]) === "1000") && (node["@_autoRev"] === void 0 || ["0", "false"].includes(String(node["@_autoRev"]))) && (node["@_spd"] === void 0 || String(node["@_spd"]) === "100000") && (node["@_accel"] === void 0 || String(node["@_accel"]) === "0") && (node["@_decel"] === void 0 || String(node["@_decel"]) === "0");
85940
+ }
85941
+ });
85942
+
85943
+ // pptx/core/services/animation-effect-filter-parsing.ts
85944
+ function parseFilterToken(raw) {
85945
+ const trimmed2 = raw.trim();
85946
+ if (!trimmed2) {
85947
+ return void 0;
85948
+ }
85949
+ const match = FILTER_TOKEN_RE.exec(trimmed2);
85950
+ if (!match) {
85951
+ return void 0;
85952
+ }
85953
+ const family = match[1].toLowerCase();
85954
+ const subtypeToken = match[2];
85955
+ const subtype = subtypeToken !== void 0 && subtypeToken !== "" ? subtypeToken : void 0;
85956
+ return { family, subtype };
85957
+ }
85958
+ function parseAnimEffectFilter(childTnList) {
85959
+ if (!childTnList) {
85960
+ return void 0;
85961
+ }
85962
+ const rawAnimEffect = childTnList["p:animEffect"];
85963
+ const animEffect = Array.isArray(rawAnimEffect) ? rawAnimEffect[0] : rawAnimEffect;
85964
+ if (!animEffect || typeof animEffect !== "object") {
85965
+ return void 0;
85966
+ }
85967
+ const node = animEffect;
85968
+ const filterAttr = node["@_filter"];
85969
+ if (filterAttr === void 0 || filterAttr === null) {
85970
+ return void 0;
85971
+ }
85972
+ const raw = String(filterAttr);
85973
+ const firstToken = raw.split(";")[0] ?? "";
85974
+ const parsed = parseFilterToken(firstToken);
85975
+ if (!parsed) {
85976
+ return void 0;
85977
+ }
85978
+ const transitionAttr = node["@_transition"];
85979
+ const transition = transitionAttr === "in" || transitionAttr === "out" || transitionAttr === "none" ? transitionAttr : void 0;
85980
+ return {
85981
+ family: parsed.family,
85982
+ subtype: parsed.subtype,
85983
+ transition,
85984
+ raw
85985
+ };
85986
+ }
85987
+ var FILTER_TOKEN_RE;
85988
+ var init_animation_effect_filter_parsing = __esm({
85989
+ "pptx/core/services/animation-effect-filter-parsing.ts"() {
85990
+ FILTER_TOKEN_RE = /^([A-Za-z]+)(?:\(([^)]*)\))?$/;
85991
+ }
85992
+ });
85993
+
85994
+ // pptx/core/services/native-animation-attribute-components.ts
85995
+ function extractBounceEndFraction(raw) {
85996
+ if (raw === void 0) {
85997
+ return void 0;
85998
+ }
85999
+ const parsed = Number(raw);
86000
+ if (!Number.isFinite(parsed)) {
86001
+ return void 0;
86002
+ }
86003
+ return Math.max(0, Math.min(1, parsed / 1e5));
86004
+ }
86005
+ function extractAttributeAnimations(childTnList) {
86006
+ if (!childTnList) {
86007
+ return void 0;
86008
+ }
86009
+ const components = [];
86010
+ for (const node of ensureArray11(childTnList["p:anim"])) {
86011
+ const attrName = extractAttrNameFromCBhvr(node["p:cBhvr"]);
86012
+ const keyframes = extractKeyframes(node);
86013
+ const from = node["@_from"] !== void 0 ? String(node["@_from"]) : void 0;
86014
+ const to = node["@_to"] !== void 0 ? String(node["@_to"]) : void 0;
86015
+ const by = node["@_by"] !== void 0 ? String(node["@_by"]) : void 0;
86016
+ const hasKeyframes = Boolean(keyframes && keyframes.length > 0);
86017
+ if (!attrName || !hasKeyframes && from === void 0 && to === void 0 && by === void 0) {
86018
+ continue;
86019
+ }
86020
+ const behavior = node["p:cBhvr"];
86021
+ const cTn = behavior?.["p:cTn"];
86022
+ const calcMode = normalizeCalcMode(node["@_calcmode"]);
86023
+ const bounceEnd = extractBounceEndFraction(node["@_p14:bounceEnd"]);
86024
+ components.push({
86025
+ attrName,
86026
+ keyframes: keyframes ?? [],
86027
+ durationMs: readTimingAttr(cTn?.["@_dur"]),
86028
+ delayMs: cTn ? extractStartConditionDelayMs(cTn) : void 0,
86029
+ ...calcMode ? { calcMode } : {},
86030
+ ...from !== void 0 ? { from } : {},
86031
+ ...to !== void 0 ? { to } : {},
86032
+ ...by !== void 0 ? { by } : {},
86033
+ ...bounceEnd !== void 0 ? { bounceEnd } : {}
86034
+ });
86035
+ }
86036
+ return components.length > 0 ? components : void 0;
86037
+ }
86038
+ var init_native_animation_attribute_components = __esm({
86039
+ "pptx/core/services/native-animation-attribute-components.ts"() {
86040
+ init_native_animation_attr_name();
86041
+ init_native_animation_cbhvr_attrs();
86042
+ init_native_animation_extended_helpers();
86043
+ init_native_animation_helpers();
86044
+ }
86045
+ });
86046
+
85582
86047
  // pptx/core/services/native-animation-child-timing.ts
85583
86048
  function isEnabled(value) {
85584
86049
  return value === true || value === 1 || value === "1" || value === "true";
@@ -85708,12 +86173,13 @@ function resolveNodeTrigger(cTn, currentTrigger) {
85708
86173
  }
85709
86174
  return trigger;
85710
86175
  }
85711
- function buildTimingNodeAnimation(cTn, trigger, group) {
86176
+ function buildTimingNodeAnimation(cTn, trigger, group, unsupportedVisibilityAncestor = false) {
85712
86177
  const presetClass = cTn["@_presetClass"];
85713
- const presetId = cTn["@_presetID"] ? Number.parseInt(String(cTn["@_presetID"]), 10) : void 0;
86178
+ const presetId = cTn["@_presetID"] !== void 0 ? Number.parseInt(String(cTn["@_presetID"]), 10) : void 0;
85714
86179
  const presetSubtype = cTn["@_presetSubtype"] !== void 0 ? Number.parseInt(String(cTn["@_presetSubtype"]), 10) : void 0;
85715
86180
  const childAutoReverseTiming = extractChildAutoReverseTiming(cTn, ensureArray11);
85716
- const durationMs = readTimingAttr(cTn["@_dur"]) ?? childAutoReverseTiming?.durationMs ?? extractChildBehaviourDurationMs(cTn, ensureArray11);
86181
+ const visibilitySetTiming = !unsupportedVisibilityAncestor && group.seqConcurrent === true && group.seqNextAction === "seek" && ["onClick", "withPrevious"].includes(trigger) ? extractVisibilitySetTiming(cTn) : void 0;
86182
+ const durationMs = readTimingAttr(cTn["@_dur"]) ?? childAutoReverseTiming?.durationMs ?? extractChildBehaviourDurationMs(cTn, ensureArray11) ?? (visibilitySetTiming ? visibilitySetTiming.delayMs + visibilitySetTiming.durationMs : void 0);
85717
86183
  const delayMs = readTimingAttr(cTn["@_delay"]) ?? extractStartConditionDelayMs(cTn);
85718
86184
  const accel = parseTimingPercentFraction(cTn["@_accel"]);
85719
86185
  const decel = parseTimingPercentFraction(cTn["@_decel"]);
@@ -85764,6 +86230,8 @@ function buildTimingNodeAnimation(cTn, trigger, group) {
85764
86230
  presetId,
85765
86231
  presetSubtype,
85766
86232
  durationMs,
86233
+ visibilitySetTiming,
86234
+ unsupportedVisibilitySet: hasNativeVisibilitySet(cTn) && !visibilitySetTiming || void 0,
85767
86235
  delayMs,
85768
86236
  accel,
85769
86237
  decel,
@@ -85812,6 +86280,7 @@ function buildTimingNodeAnimation(cTn, trigger, group) {
85812
86280
  commandString: cmdInfo.commandString,
85813
86281
  textTarget: textTarget ?? void 0,
85814
86282
  cTnAttributes: roundTripAttrs,
86283
+ unsupportedOpacitySetTiming: cTn["@_dur"] === "indefinite" || cTn["p:endSync"] !== void 0 || void 0,
85815
86284
  afterEffect: afterEffectFlag,
85816
86285
  afterAnimationAction: parsedAfterAnimation?.action,
85817
86286
  afterAnimationColor: parsedAfterAnimation?.color,
@@ -85858,22 +86327,24 @@ var init_native_animation_timing_node_extract = __esm({
85858
86327
  init_native_animation_child_timing();
85859
86328
  init_native_animation_extended_helpers();
85860
86329
  init_native_animation_helpers();
86330
+ init_native_animation_visibility_timing();
85861
86331
  init_native_animation_set_components();
85862
86332
  }
85863
86333
  });
85864
86334
 
85865
86335
  // pptx/core/services/native-animation-timing-walk.ts
85866
- function walkTimingTree(node, animations, currentTrigger, group, ctx) {
86336
+ function walkTimingTree(node, animations, currentTrigger, group, ctx, unsupportedVisibilityAncestor = false) {
85867
86337
  if (!node) {
85868
86338
  return;
85869
86339
  }
85870
86340
  const cTn = node["p:cTn"];
85871
86341
  if (cTn) {
85872
86342
  const trigger = resolveNodeTrigger(cTn, currentTrigger);
85873
- const animation = buildTimingNodeAnimation(cTn, trigger, group);
86343
+ const animation = buildTimingNodeAnimation(cTn, trigger, group, unsupportedVisibilityAncestor);
85874
86344
  if (animation) {
85875
86345
  animations.push(animation);
85876
86346
  }
86347
+ const unsupportedChildVisibility = unsupportedVisibilityAncestor || unsupportedVisibilityContainerTiming(cTn);
85877
86348
  const childTnList = cTn["p:childTnLst"];
85878
86349
  if (childTnList) {
85879
86350
  const isClickLevel = isMainSequence(cTn);
@@ -85893,7 +86364,8 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
85893
86364
  id: String(mainSequenceId)
85894
86365
  } : void 0
85895
86366
  }),
85896
- ctx
86367
+ ctx,
86368
+ unsupportedChildVisibility
85897
86369
  );
85898
86370
  }
85899
86371
  for (const sequence of sequences) {
@@ -85901,11 +86373,18 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
85901
86373
  continue;
85902
86374
  }
85903
86375
  const seqAttrs = extractSeqAttrs(sequence);
85904
- walkTimingTree(sequence, animations, trigger, { ...group, ...seqAttrs }, ctx);
86376
+ walkTimingTree(
86377
+ sequence,
86378
+ animations,
86379
+ trigger,
86380
+ { ...group, ...seqAttrs },
86381
+ ctx,
86382
+ unsupportedChildVisibility
86383
+ );
85905
86384
  }
85906
86385
  for (const excl of exclusives) {
85907
86386
  const exclAnims = [];
85908
- walkTimingTree(excl, exclAnims, trigger, group, ctx);
86387
+ walkTimingTree(excl, exclAnims, trigger, group, ctx, true);
85909
86388
  const exclGroupId = ctx.allocateExclGroupId();
85910
86389
  for (const a of exclAnims) {
85911
86390
  a.exclusive = true;
@@ -85925,7 +86404,8 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
85925
86404
  childGroupContext(group, parallel["p:cTn"], {
85926
86405
  isClickLevelGroup: false
85927
86406
  }),
85928
- ctx
86407
+ ctx,
86408
+ unsupportedVisibilityAncestor
85929
86409
  );
85930
86410
  }
85931
86411
  for (const sequence of directSequences) {
@@ -85933,7 +86413,14 @@ function walkTimingTree(node, animations, currentTrigger, group, ctx) {
85933
86413
  continue;
85934
86414
  }
85935
86415
  const seqAttrs = extractSeqAttrs(sequence);
85936
- walkTimingTree(sequence, animations, currentTrigger, { ...group, ...seqAttrs }, ctx);
86416
+ walkTimingTree(
86417
+ sequence,
86418
+ animations,
86419
+ currentTrigger,
86420
+ { ...group, ...seqAttrs },
86421
+ ctx,
86422
+ unsupportedVisibilityAncestor
86423
+ );
85937
86424
  }
85938
86425
  }
85939
86426
  var init_native_animation_timing_walk = __esm({
@@ -85941,6 +86428,7 @@ var init_native_animation_timing_walk = __esm({
85941
86428
  init_animation_group_context();
85942
86429
  init_animation_timing_attrs();
85943
86430
  init_native_animation_helpers();
86431
+ init_native_animation_visibility_timing();
85944
86432
  init_native_animation_interactive_predicate();
85945
86433
  init_native_animation_timing_node_extract();
85946
86434
  }
@@ -86615,79 +87103,6 @@ var init_PptxSlideTransitionService = __esm({
86615
87103
  }
86616
87104
  });
86617
87105
 
86618
- // pptx/core/services/animation-after-effect-write.ts
86619
- function applyAfterAnimationBehavior(effectCTn, anim, shapeId) {
86620
- delete effectCTn["p:subTnLst"];
86621
- delete effectCTn["@_afterEffect"];
86622
- if (anim.afterAnimation === "dimToColor" && anim.afterAnimationColor) {
86623
- effectCTn["p:subTnLst"] = buildDimSubTnLst(shapeId, anim.afterAnimationColor);
86624
- return;
86625
- }
86626
- if (anim.afterAnimation === "hideAfterAnimation") {
86627
- const entranceId = effectCTn["@_id"] !== void 0 ? String(effectCTn["@_id"]) : "0";
86628
- effectCTn["p:subTnLst"] = buildHideSubTnLst(shapeId, "sameClick", entranceId);
86629
- return;
86630
- }
86631
- if (anim.afterAnimation === "hideOnNextClick") {
86632
- effectCTn["p:subTnLst"] = buildHideSubTnLst(shapeId, "nextClick");
86633
- }
86634
- }
86635
- function buildDimSubTnLst(shapeId, colorHex) {
86636
- const hex3 = colorHex.replace(/^#/u, "").toUpperCase();
86637
- return {
86638
- "p:animClr": {
86639
- "@_clrSpc": "rgb",
86640
- "@_dir": "cw",
86641
- "p:cBhvr": {
86642
- "@_override": "childStyle",
86643
- "p:cTn": {
86644
- "@_dur": "1",
86645
- "@_fill": "hold",
86646
- "@_display": "0",
86647
- "@_masterRel": "nextClick",
86648
- "@_afterEffect": "1"
86649
- },
86650
- "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
86651
- "p:attrNameLst": { "p:attrName": "ppt_c" }
86652
- },
86653
- "p:to": { "a:srgbClr": { "@_val": hex3 } }
86654
- }
86655
- };
86656
- }
86657
- function buildHideSubTnLst(shapeId, masterRel, entranceId) {
86658
- const cTn = {
86659
- "@_dur": "1",
86660
- "@_fill": "hold",
86661
- "@_display": "0",
86662
- "@_masterRel": masterRel,
86663
- "@_afterEffect": "1"
86664
- };
86665
- if (masterRel === "sameClick") {
86666
- cTn["p:stCondLst"] = {
86667
- "p:cond": {
86668
- "@_evt": "end",
86669
- "@_delay": "0",
86670
- "p:tn": { "@_val": entranceId ?? "0" }
86671
- }
86672
- };
86673
- }
86674
- return {
86675
- "p:set": {
86676
- "p:cBhvr": {
86677
- "@_override": "childStyle",
86678
- "p:cTn": cTn,
86679
- "p:tgtEl": { "p:spTgt": { "@_spid": shapeId } },
86680
- "p:attrNameLst": { "p:attrName": "style.visibility" }
86681
- },
86682
- "p:to": { "p:strVal": { "@_val": "hidden" } }
86683
- }
86684
- };
86685
- }
86686
- var init_animation_after_effect_write = __esm({
86687
- "pptx/core/services/animation-after-effect-write.ts"() {
86688
- }
86689
- });
86690
-
86691
87106
  // pptx/core/services/animation-behavior-captures.json
86692
87107
  var animation_behavior_captures_default;
86693
87108
  var init_animation_behavior_captures = __esm({
@@ -104921,6 +105336,33 @@ function updateEffectNodeAttributes(cTn, anim, presetClass, shapeId, allocateId)
104921
105336
  applySoundToEffectCTn(cTn, anim);
104922
105337
  }
104923
105338
  function surgicallyUpdateTimingTree(rawTiming, animations) {
105339
+ const sourceRefs = indexEffectNodes(rawTiming);
105340
+ for (const entry2 of animations.filter((animation) => animation.afterAnimation !== void 0)) {
105341
+ if (sourceRefs.filter(
105342
+ (ref) => ref.spid === entry2.elementId && ["entr", "emph"].includes(ref.presetClass)
105343
+ ).length > 1)
105344
+ throw new Error(
105345
+ "Cannot edit an ambiguous native after-animation target with multiple effects"
105346
+ );
105347
+ }
105348
+ const explicitClears = new Map(
105349
+ animations.filter((a) => a.afterAnimation !== void 0 && !hasAuthoredAnimationEffect(a)).map((a) => [a.elementId, a])
105350
+ );
105351
+ const clearRefs = sourceRefs.filter(
105352
+ (ref) => ref.spid && explicitClears.has(ref.spid) && (ref.presetClass === "entr" || ref.presetClass === "emph")
105353
+ );
105354
+ for (const target of explicitClears.keys()) {
105355
+ if (!clearRefs.some((ref) => ref.spid === target))
105356
+ throw new Error("Cannot edit after-animation without a supported native effect");
105357
+ if (clearRefs.filter((ref) => ref.spid === target).length > 1)
105358
+ throw new Error(
105359
+ "Cannot clear an ambiguous native after-animation target with multiple effects"
105360
+ );
105361
+ }
105362
+ clearRefs.forEach((ref) => assertAfterAnimationClearSupported(ref.cTn));
105363
+ clearRefs.forEach(
105364
+ (ref) => applyAfterAnimationBehavior(ref.cTn, explicitClears.get(ref.spid), ref.spid)
105365
+ );
104924
105366
  const desired = collectDesiredEffects(animations);
104925
105367
  const previouslyOwned = readOwnedEffectKeys(rawTiming);
104926
105368
  if (desired.length === 0 && previouslyOwned.size === 0) {
@@ -104987,6 +105429,7 @@ function surgicallyUpdateTimingTree(rawTiming, animations) {
104987
105429
  }
104988
105430
  var init_animation_timing_surgical = __esm({
104989
105431
  "pptx/core/services/animation-timing-surgical.ts"() {
105432
+ init_editor_animation_entry();
104990
105433
  init_animation_after_effect_write();
104991
105434
  init_animation_behavior_captured();
104992
105435
  init_animation_timing_build_surgical();
@@ -105037,9 +105480,11 @@ var init_PptxAnimationWriteService = __esm({
105037
105480
  const validAnimations = animations.filter((a) => a.entrance || a.exit || a.emphasis || a.motionPath).sort((a, b) => (a.order ?? 0) - (b.order ?? 0));
105038
105481
  if (existingRawTiming) {
105039
105482
  const cloned = typeof structuredClone === "function" ? structuredClone(existingRawTiming) : JSON.parse(JSON.stringify(existingRawTiming));
105040
- return surgicallyUpdateTimingTree(cloned, validAnimations);
105483
+ return surgicallyUpdateTimingTree(cloned, animations);
105041
105484
  }
105042
105485
  if (validAnimations.length === 0) {
105486
+ if (animations.some((entry2) => entry2.afterAnimation !== void 0))
105487
+ throw new Error("Cannot edit after-animation without a supported native effect");
105043
105488
  return void 0;
105044
105489
  }
105045
105490
  this.nextId = 1;
@@ -105225,6 +105670,166 @@ var init_animation_behavior_native = __esm({
105225
105670
  }
105226
105671
  });
105227
105672
 
105673
+ // pptx/core/services/editor-animation-after-effect-precedence.ts
105674
+ function applyAfterAnimationFromEditorList(nativeAnimations, editorAnimations) {
105675
+ if (!editorAnimations || editorAnimations.length === 0) {
105676
+ return [...nativeAnimations];
105677
+ }
105678
+ const byElement = /* @__PURE__ */ new Map();
105679
+ for (const ea of editorAnimations) {
105680
+ if (ea.afterAnimation !== void 0) {
105681
+ byElement.set(ea.elementId, ea);
105682
+ }
105683
+ }
105684
+ if (byElement.size === 0) {
105685
+ return [...nativeAnimations];
105686
+ }
105687
+ for (const [id, editor] of byElement) {
105688
+ const matches = nativeAnimations.filter(
105689
+ (native) => native.targetId === id && ["entr", "emph"].includes(native.presetClass ?? "")
105690
+ );
105691
+ if (matches.length > 1)
105692
+ throw new Error(
105693
+ "Cannot edit an ambiguous native after-animation target with multiple effects"
105694
+ );
105695
+ if (matches.length === 0 && !hasAuthoredAnimationEffect(editor))
105696
+ throw new Error("Cannot edit after-animation without a supported native effect");
105697
+ for (const native of matches) {
105698
+ if (native.textTarget || native.target && (native.target.type !== "shape" || native.target.backgroundOnly || native.target.subShapeId || native.target.graphicElement || native.target.oleChartElement))
105699
+ throw new Error("Editing after-animation supports whole-shape targets only");
105700
+ assertAfterAnimationClearSupported({
105701
+ "p:subTnLst": native.cTnAttributes?.["p:subTnLst"]
105702
+ });
105703
+ }
105704
+ }
105705
+ return nativeAnimations.map((anim) => {
105706
+ if (!anim.targetId || !["entr", "emph"].includes(anim.presetClass ?? "")) {
105707
+ return anim;
105708
+ }
105709
+ const ea = byElement.get(anim.targetId);
105710
+ if (!ea) {
105711
+ return anim;
105712
+ }
105713
+ return {
105714
+ ...anim,
105715
+ afterAnimationAction: ea.afterAnimation === "none" ? void 0 : ea.afterAnimation,
105716
+ afterAnimationColor: ea.afterAnimationColor,
105717
+ // The editor's own model has no theme-colour-ref concept (it always
105718
+ // writes a concrete hex); clear a native scheme ref so a stale one
105719
+ // never survives an edit that overrides the colour.
105720
+ afterAnimationColorRef: void 0
105721
+ };
105722
+ });
105723
+ }
105724
+ var init_editor_animation_after_effect_precedence = __esm({
105725
+ "pptx/core/services/editor-animation-after-effect-precedence.ts"() {
105726
+ init_animation_after_effect_write();
105727
+ init_editor_animation_entry();
105728
+ }
105729
+ });
105730
+
105731
+ // pptx/core/services/animation-opacity-set.ts
105732
+ function resolveOpacitySet(anim) {
105733
+ if (anim.unsupportedOpacitySetTiming || anim.endConditions?.length || anim.rawEndCondLst !== void 0 || anim.cTnAttributes?.["@_tmFilter"] !== void 0 || anim.cTnAttributes?.["@_endSync"] !== void 0)
105734
+ return void 0;
105735
+ if (anim.afterAnimationAction !== void 0) return void 0;
105736
+ if (anim.target?.type === "shape" && (anim.target.backgroundOnly || anim.target.subShapeId || anim.target.graphicElement || anim.target.oleChartElement))
105737
+ return void 0;
105738
+ if (anim.textTarget || anim.target && anim.target.type !== "shape" || anim.trigger === "onHover")
105739
+ return void 0;
105740
+ if (anim.presetClass !== "emph" || anim.autoReverse || (anim.repeatCount ?? 1) !== 1 || anim.repeatDurMs !== void 0)
105741
+ return void 0;
105742
+ const behaviors = anim.behaviors;
105743
+ if (!behaviors?.length || behaviors.some(
105744
+ (b) => b.kind !== "set" && !(b.kind === "animEffect" && b.filter === "image" && (b.transition === void 0 || b.transition === "none"))
105745
+ ))
105746
+ return void 0;
105747
+ const sets = behaviors.filter((b) => b.kind === "set");
105748
+ if (sets.length !== 1) return void 0;
105749
+ const hints = behaviors.filter((b) => b.kind === "animEffect");
105750
+ if (hints.length > 1) return void 0;
105751
+ const hint = hints[0];
105752
+ if (hint && (hint.timing.unsupportedSetTiming || hint.timing.autoReverse || (hint.timing.repeatCount ?? 1) !== 1 || hint.timing.tmFilter !== void 0))
105753
+ return void 0;
105754
+ const set2 = sets[0];
105755
+ if (set2.attrNames.length !== 1 || set2.attrNames[0] !== "style.opacity" || set2.additive !== void 0 && !["base", "repl", "none"].includes(set2.additive))
105756
+ return void 0;
105757
+ const raw = set2.value;
105758
+ if (typeof raw !== "number" && (typeof raw !== "string" || !/^[+-]?(?:\d+(?:\.\d*)?|\.\d+)$/u.test(raw.trim())))
105759
+ return void 0;
105760
+ const value = Number(raw);
105761
+ const { timing } = set2;
105762
+ if (timing.unsupportedSetTiming) return void 0;
105763
+ if (anim.fill === "transition" || timing.fill === "transition") return void 0;
105764
+ if (!Number.isFinite(value) || value < 0 || value > 1 || timing.autoReverse || (timing.repeatCount ?? 1) !== 1 || timing.tmFilter !== void 0)
105765
+ return void 0;
105766
+ const delayMs = timing.delayMs ?? 0;
105767
+ const durationMs = timing.durationMs;
105768
+ if (!Number.isFinite(delayMs) || delayMs < 0 || durationMs === void 0 || !Number.isFinite(durationMs) || durationMs < 0)
105769
+ return void 0;
105770
+ const effectDuration = anim.durationMs ?? delayMs + durationMs;
105771
+ if (!Number.isFinite(effectDuration) || effectDuration < delayMs || (anim.speedPct ?? 100) !== 100)
105772
+ return void 0;
105773
+ const holdEndState = holds(anim.fill) && holds(timing.fill);
105774
+ return {
105775
+ value,
105776
+ delayMs,
105777
+ durationMs: holds(timing.fill) ? effectDuration - delayMs : Math.min(durationMs, effectDuration - delayMs),
105778
+ holdEndState
105779
+ };
105780
+ }
105781
+ var holds;
105782
+ var init_animation_opacity_set = __esm({
105783
+ "pptx/core/services/animation-opacity-set.ts"() {
105784
+ holds = (fill) => fill === "hold" || fill === "freeze";
105785
+ }
105786
+ });
105787
+
105788
+ // pptx/core/services/animation-effect-timing.ts
105789
+ function applySpeedToDuration(speedPct, baseDurationMs) {
105790
+ if (speedPct === void 0 || !Number.isFinite(speedPct) || speedPct <= 0) {
105791
+ return baseDurationMs;
105792
+ }
105793
+ return Math.max(1, Math.round(baseDurationMs / (speedPct / 100)));
105794
+ }
105795
+ function resolveIterationCount(repeatCount, repeatDurMs, adjustedDurationMs) {
105796
+ if (repeatCount !== void 0) {
105797
+ return repeatCount;
105798
+ }
105799
+ if (repeatDurMs === void 0) {
105800
+ return 1;
105801
+ }
105802
+ if (repeatDurMs === Infinity) {
105803
+ return Infinity;
105804
+ }
105805
+ if (adjustedDurationMs <= 0) {
105806
+ return 1;
105807
+ }
105808
+ return Math.max(1, Math.round(repeatDurMs / adjustedDurationMs));
105809
+ }
105810
+ function shouldHoldEndState(anim) {
105811
+ if (anim.presetClass !== "emph" && anim.presetClass !== "path") {
105812
+ return false;
105813
+ }
105814
+ return anim.fill === "hold" || anim.fill === "freeze" || anim.fill === "transition";
105815
+ }
105816
+ function resolveEffectTiming(anim, baseDurationMs) {
105817
+ const durationMs = applySpeedToDuration(anim.speedPct, baseDurationMs);
105818
+ const authoredIterations = resolveIterationCount(anim.repeatCount, anim.repeatDurMs, durationMs);
105819
+ const iterationCount = anim.autoReverse && anim.repeatDurMs === void 0 ? authoredIterations * 2 : authoredIterations;
105820
+ const activeDurationMs = Number.isFinite(iterationCount) ? durationMs * iterationCount : durationMs;
105821
+ return {
105822
+ durationMs,
105823
+ iterationCount,
105824
+ activeDurationMs,
105825
+ holdEndState: shouldHoldEndState(anim)
105826
+ };
105827
+ }
105828
+ var init_animation_effect_timing = __esm({
105829
+ "pptx/core/services/animation-effect-timing.ts"() {
105830
+ }
105831
+ });
105832
+
105228
105833
  // pptx/core/services/index.ts
105229
105834
  var init_services = __esm({
105230
105835
  "pptx/core/services/index.ts"() {
@@ -105247,10 +105852,16 @@ var init_services = __esm({
105247
105852
  init_animation_behavior_native();
105248
105853
  init_animation_write_node_builders();
105249
105854
  init_animation_after_effect_write();
105855
+ init_editor_animation_entry();
105856
+ init_editor_animation_after_effect();
105857
+ init_editor_animation_after_effect_precedence();
105250
105858
  init_native_animation_after_effect();
105251
105859
  init_native_animation_helpers();
105252
105860
  init_animation_target_build_helpers();
105253
105861
  init_animation_effect_filter_parsing();
105862
+ init_animation_opacity_set();
105863
+ init_animation_effect_timing();
105864
+ init_native_animation_visibility_timing();
105254
105865
  }
105255
105866
  });
105256
105867
 
@@ -121295,8 +121906,8 @@ function buildDefRPr(style, existing, resolveColor2) {
121295
121906
  return rPr;
121296
121907
  }
121297
121908
  function applyChartAxisTitleStyleToXml(axisNode, style, getLocalName2, resolveColor2) {
121298
- const hasAny = style.fontFamily !== void 0 || style.fontSize !== void 0 || style.fontBold !== void 0 || style.fontColor !== void 0;
121299
- if (!hasAny) {
121909
+ const hasAny2 = style.fontFamily !== void 0 || style.fontSize !== void 0 || style.fontBold !== void 0 || style.fontColor !== void 0;
121910
+ if (!hasAny2) {
121300
121911
  return;
121301
121912
  }
121302
121913
  const titleKey = findKey7(axisNode, "title", getLocalName2);
@@ -123150,8 +123761,8 @@ function applyRotationFlipToRawNode(node, rotation, flipH, flipV) {
123150
123761
  const spPrKey = findChildKey2(node, "spPr");
123151
123762
  const container2 = spPrKey ? node[spPrKey] ?? node : node;
123152
123763
  const xfrmKey = findChildKey2(container2, "xfrm");
123153
- const hasAny = Boolean(rotation) || Boolean(flipH) || Boolean(flipV);
123154
- if (!xfrmKey && !hasAny) {
123764
+ const hasAny2 = Boolean(rotation) || Boolean(flipH) || Boolean(flipV);
123765
+ if (!xfrmKey && !hasAny2) {
123155
123766
  return;
123156
123767
  }
123157
123768
  const xfrm = xfrmKey ? container2[xfrmKey] : {};
@@ -123186,24 +123797,24 @@ function hexVal(hex3) {
123186
123797
  }
123187
123798
  function buildRunProps(para) {
123188
123799
  const rPr = {};
123189
- let hasAny = false;
123800
+ let hasAny2 = false;
123190
123801
  if (para.fontSize !== void 0) {
123191
123802
  rPr["@_sz"] = String(Math.round(para.fontSize * 100));
123192
- hasAny = true;
123803
+ hasAny2 = true;
123193
123804
  }
123194
123805
  if (para.bold) {
123195
123806
  rPr["@_b"] = "1";
123196
- hasAny = true;
123807
+ hasAny2 = true;
123197
123808
  }
123198
123809
  if (para.italic) {
123199
123810
  rPr["@_i"] = "1";
123200
- hasAny = true;
123811
+ hasAny2 = true;
123201
123812
  }
123202
123813
  if (para.color) {
123203
123814
  rPr["a:solidFill"] = { "a:srgbClr": { "@_val": hexVal(para.color) } };
123204
- hasAny = true;
123815
+ hasAny2 = true;
123205
123816
  }
123206
- return hasAny ? rPr : void 0;
123817
+ return hasAny2 ? rPr : void 0;
123207
123818
  }
123208
123819
  function buildParagraphNode(para) {
123209
123820
  const node = {};
@@ -125246,7 +125857,7 @@ var init_blob_url_to_data_url = __esm({
125246
125857
 
125247
125858
  // pptx/core/core/runtime/image-a14-effects-model.ts
125248
125859
  function applyA14ExtensionToEffects(effects, a14) {
125249
- let hasAny = false;
125860
+ let hasAny2 = false;
125250
125861
  if (a14.artisticEffect !== void 0) {
125251
125862
  effects.artisticEffect = a14.artisticEffect;
125252
125863
  if (a14.originalImageRelId !== void 0) {
@@ -125258,15 +125869,15 @@ function applyA14ExtensionToEffects(effects, a14) {
125258
125869
  if (a14.artisticParams) {
125259
125870
  effects.artisticParams = a14.artisticParams;
125260
125871
  }
125261
- hasAny = true;
125872
+ hasAny2 = true;
125262
125873
  }
125263
125874
  if (a14.backgroundRemoval) {
125264
125875
  effects.backgroundRemoval = a14.backgroundRemoval;
125265
- hasAny = true;
125876
+ hasAny2 = true;
125266
125877
  }
125267
125878
  if (a14.originalImageRelId !== void 0) {
125268
125879
  effects.originalImageRelId = a14.originalImageRelId;
125269
- hasAny = true;
125880
+ hasAny2 = true;
125270
125881
  }
125271
125882
  const corrections = {};
125272
125883
  if (a14.sharpenSoften) {
@@ -125289,9 +125900,9 @@ function applyA14ExtensionToEffects(effects, a14) {
125289
125900
  if (a14.originalImageRelId !== void 0) {
125290
125901
  effects.prerenderedCorrections = corrections;
125291
125902
  }
125292
- hasAny = true;
125903
+ hasAny2 = true;
125293
125904
  }
125294
- return hasAny;
125905
+ return hasAny2;
125295
125906
  }
125296
125907
  var init_image_a14_effects_model = __esm({
125297
125908
  "pptx/core/core/runtime/image-a14-effects-model.ts"() {
@@ -127562,13 +128173,13 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127562
128173
  return null;
127563
128174
  }
127564
128175
  const effects = {};
127565
- let hasAny = false;
128176
+ let hasAny2 = false;
127566
128177
  const brightRaw = blip["@_bright"] ?? blip["@_brt"];
127567
128178
  if (brightRaw !== null) {
127568
128179
  const val = parseInt(String(brightRaw));
127569
128180
  if (Number.isFinite(val)) {
127570
128181
  effects.brightness = val / 1e3;
127571
- hasAny = true;
128182
+ hasAny2 = true;
127572
128183
  }
127573
128184
  }
127574
128185
  const contrastRaw = blip["@_contrast"] ?? blip["@_cont"];
@@ -127576,7 +128187,7 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127576
128187
  const val = parseInt(String(contrastRaw));
127577
128188
  if (Number.isFinite(val)) {
127578
128189
  effects.contrast = val / 1e3;
127579
- hasAny = true;
128190
+ hasAny2 = true;
127580
128191
  }
127581
128192
  }
127582
128193
  const colorEffects = parseImageColorEffects(
@@ -127586,12 +128197,12 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127586
128197
  );
127587
128198
  Object.assign(effects, colorEffects);
127588
128199
  if (Object.keys(colorEffects).length > 0) {
127589
- hasAny = true;
128200
+ hasAny2 = true;
127590
128201
  }
127591
128202
  const alphaEffects = parseImageAlphaEffects(blip, (node) => this.parseColor(node));
127592
128203
  Object.assign(effects, alphaEffects);
127593
128204
  if (Object.keys(alphaEffects).length > 0) {
127594
- hasAny = true;
128205
+ hasAny2 = true;
127595
128206
  }
127596
128207
  const lumNode = blip["a:lum"];
127597
128208
  if (lumNode) {
@@ -127611,7 +128222,7 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127611
128222
  }
127612
128223
  }
127613
128224
  effects.lum = lumEffect;
127614
- hasAny = true;
128225
+ hasAny2 = true;
127615
128226
  }
127616
128227
  const hslNode = blip["a:hsl"];
127617
128228
  if (hslNode) {
@@ -127638,7 +128249,7 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127638
128249
  }
127639
128250
  }
127640
128251
  effects.hsl = hslEffect;
127641
- hasAny = true;
128252
+ hasAny2 = true;
127642
128253
  }
127643
128254
  const tintNode = blip["a:tint"];
127644
128255
  if (tintNode) {
@@ -127658,7 +128269,7 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127658
128269
  }
127659
128270
  }
127660
128271
  effects.tint = tintEffect;
127661
- hasAny = true;
128272
+ hasAny2 = true;
127662
128273
  }
127663
128274
  const fillOverlay = blip["a:fillOverlay"];
127664
128275
  if (fillOverlay) {
@@ -127685,7 +128296,7 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127685
128296
  ...resolvedGradient ? { resolvedGradient } : {},
127686
128297
  ...resolvedPattern ? { resolvedPattern } : {}
127687
128298
  };
127688
- hasAny = true;
128299
+ hasAny2 = true;
127689
128300
  }
127690
128301
  const blurNode = blip["a:blur"];
127691
128302
  if (blurNode) {
@@ -127703,16 +128314,16 @@ var init_PptxHandlerRuntimeImageEffects = __esm({
127703
128314
  blurEffect.grow = s === "1" || s === "true";
127704
128315
  }
127705
128316
  effects.blur = blurEffect;
127706
- hasAny = true;
128317
+ hasAny2 = true;
127707
128318
  }
127708
128319
  const extLst = xmlChild(blip, "a:extLst");
127709
128320
  if (extLst) {
127710
128321
  const a14 = parseA14ImageExtension(this.ensureArray(extLst["a:ext"]));
127711
128322
  if (a14 && applyA14ExtensionToEffects(effects, a14)) {
127712
- hasAny = true;
128323
+ hasAny2 = true;
127713
128324
  }
127714
128325
  }
127715
- return hasAny ? effects : null;
128326
+ return hasAny2 ? effects : null;
127716
128327
  }
127717
128328
  /**
127718
128329
  * Resolve a blip `a:fillOverlay/a:gradFill` to the structured gradient a
@@ -129365,8 +129976,8 @@ function buildTextRunEffectListXml(style, parseColor) {
129365
129976
  const hasTextHsl = typeof style.textHslHue === "number" || typeof style.textHslSaturation === "number" || typeof style.textHslLuminance === "number";
129366
129977
  const hasTextClrChange = Boolean(style.textClrChangeFrom) && Boolean(style.textClrChangeTo);
129367
129978
  const hasTextDuotone = Boolean(style.textDuotone);
129368
- const hasAny = hasTextShadow || hasTextInnerShadow || hasTextPresetShadow || hasTextGlow || hasTextReflection || hasTextBlur || hasTextSoftEdge || hasTextAlphaModFix || hasTextAlphaMod || hasTextHsl || hasTextClrChange || hasTextDuotone;
129369
- if (!hasAny) {
129979
+ const hasAny2 = hasTextShadow || hasTextInnerShadow || hasTextPresetShadow || hasTextGlow || hasTextReflection || hasTextBlur || hasTextSoftEdge || hasTextAlphaModFix || hasTextAlphaMod || hasTextHsl || hasTextClrChange || hasTextDuotone;
129980
+ if (!hasAny2) {
129370
129981
  return void 0;
129371
129982
  }
129372
129983
  const effectLst = {};
@@ -133717,6 +134328,87 @@ var init_table_column_width_save = __esm({
133717
134328
  }
133718
134329
  });
133719
134330
 
134331
+ // pptx/core/core/runtime/table-style-change-cell-clear.ts
134332
+ function normaliseStyleId(id) {
134333
+ const text2 = typeof id === "string" || typeof id === "number" ? String(id) : "";
134334
+ const trimmed2 = text2.trim().toUpperCase();
134335
+ if (!trimmed2) {
134336
+ return "";
134337
+ }
134338
+ return trimmed2.startsWith("{") ? trimmed2 : `{${trimmed2}}`;
134339
+ }
134340
+ function xmlTableStyleId(tblPr) {
134341
+ if (!tblPr || typeof tblPr !== "object") {
134342
+ return "";
134343
+ }
134344
+ const props = tblPr;
134345
+ const node = props["a:tableStyleId"];
134346
+ const spec = normaliseStyleId(
134347
+ node && typeof node === "object" ? node["#text"] : node
134348
+ );
134349
+ if (spec) {
134350
+ return spec;
134351
+ }
134352
+ const legacy = props["a:tblStyle"];
134353
+ return normaliseStyleId(legacy?.["@_val"] || props["@_tblStyle"]);
134354
+ }
134355
+ function tableStyleIdChanged(tblPr, nextStyleId) {
134356
+ if (nextStyleId === void 0) {
134357
+ return false;
134358
+ }
134359
+ return normaliseStyleId(nextStyleId) !== xmlTableStyleId(tblPr);
134360
+ }
134361
+ function clearCellFormattingForStyleChange(xmlCell, style) {
134362
+ const tcPr = xmlCell["a:tcPr"];
134363
+ if (!tcPr || typeof tcPr !== "object") {
134364
+ return;
134365
+ }
134366
+ const props = tcPr;
134367
+ if (!hasAny(style, FILL_FIELDS)) {
134368
+ for (const key2 of FILL_KEYS) {
134369
+ delete props[key2];
134370
+ }
134371
+ }
134372
+ for (const [key2, fields] of LINE_KEYS) {
134373
+ if (!hasAny(style, fields)) {
134374
+ delete props[key2];
134375
+ }
134376
+ }
134377
+ if (!style?.cell3D) {
134378
+ delete props["a:cell3D"];
134379
+ }
134380
+ }
134381
+ var FILL_KEYS, LINE_KEYS, FILL_FIELDS, hasAny;
134382
+ var init_table_style_change_cell_clear = __esm({
134383
+ "pptx/core/core/runtime/table-style-change-cell-clear.ts"() {
134384
+ FILL_KEYS = [
134385
+ "a:noFill",
134386
+ "a:solidFill",
134387
+ "a:gradFill",
134388
+ "a:blipFill",
134389
+ "a:pattFill",
134390
+ "a:grpFill"
134391
+ ];
134392
+ LINE_KEYS = [
134393
+ ["a:lnL", ["borderLeftWidth", "borderLeftColor", "borderLeftDash"]],
134394
+ ["a:lnR", ["borderRightWidth", "borderRightColor", "borderRightDash"]],
134395
+ ["a:lnT", ["borderTopWidth", "borderTopColor", "borderTopDash"]],
134396
+ ["a:lnB", ["borderBottomWidth", "borderBottomColor", "borderBottomDash"]],
134397
+ ["a:lnTlToBr", ["borderDiagDownWidth", "borderDiagDownColor"]],
134398
+ ["a:lnBlToTr", ["borderDiagUpWidth", "borderDiagUpColor"]]
134399
+ ];
134400
+ FILL_FIELDS = [
134401
+ "fillMode",
134402
+ "backgroundColor",
134403
+ "gradientFillStops",
134404
+ "patternFillPreset",
134405
+ "backgroundImageFillPath",
134406
+ "backgroundImageFillData"
134407
+ ];
134408
+ hasAny = (style, keys) => keys.some((key2) => style?.[key2] !== void 0);
134409
+ }
134410
+ });
134411
+
133720
134412
  // pptx/core/core/runtime/table-paragraph-save-order.ts
133721
134413
  function runTag(run) {
133722
134414
  return run.isLineBreak ? "a:br" : run.isField ? "a:fld" : "a:r";
@@ -134755,6 +135447,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
134755
135447
  init_PptxHandlerRuntimeChartUserShapes();
134756
135448
  init_save_table_merge_helpers();
134757
135449
  init_table_column_width_save();
135450
+ init_table_style_change_cell_clear();
134758
135451
  init_table_paragraph_save_order();
134759
135452
  init_table_structural_ops();
134760
135453
  init_table_tblpr_save();
@@ -134776,6 +135469,7 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
134776
135469
  if (!tbl) {
134777
135470
  return;
134778
135471
  }
135472
+ const styleChanged = tableData.clearDirectCellFormatting === true || tableStyleIdChanged(tbl["a:tblPr"], tableData.tableStyleId);
134779
135473
  serializeTablePropertyFlags(tbl, tableData);
134780
135474
  writeTablePropertiesOwnFillAndEffects(tbl["a:tblPr"], tableData);
134781
135475
  const xmlRows = this.ensureArray(tbl["a:tr"]);
@@ -134807,6 +135501,9 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
134807
135501
  if (cell.text !== void 0) {
134808
135502
  this.writeTableCellText(xmlCell, cell.text);
134809
135503
  }
135504
+ if (styleChanged) {
135505
+ clearCellFormattingForStyleChange(xmlCell, cell.style);
135506
+ }
134810
135507
  if (cell.style) {
134811
135508
  this.writeTableCellStyle(xmlCell, cell.style, cell.paragraphs);
134812
135509
  }
@@ -134830,6 +135527,9 @@ var init_PptxHandlerRuntimeSaveDataSerialization = __esm({
134830
135527
  if (cell.text !== void 0) {
134831
135528
  this.writeTableCellText(xmlCell, cell.text);
134832
135529
  }
135530
+ if (styleChanged) {
135531
+ clearCellFormattingForStyleChange(xmlCell, cell.style);
135532
+ }
134833
135533
  if (cell.style) {
134834
135534
  this.writeTableCellStyle(xmlCell, cell.style, cell.paragraphs);
134835
135535
  }
@@ -145504,6 +146204,7 @@ var PptxHandlerRuntime60;
145504
146204
  var init_PptxHandlerRuntimeGeometryParsing = __esm({
145505
146205
  "pptx/core/core/runtime/PptxHandlerRuntimeGeometryParsing.ts"() {
145506
146206
  init_color_primitives();
146207
+ init_custom_geometry_command_order();
145507
146208
  init_custom_geometry_parser();
145508
146209
  init_guide_formula();
145509
146210
  init_PptxHandlerRuntimePlaceholderLookup();
@@ -145665,6 +146366,10 @@ var init_PptxHandlerRuntimeGeometryParsing = __esm({
145665
146366
  const pathLst = custGeom["a:pathLst"];
145666
146367
  if (isNonEmpty(pathLst)) {
145667
146368
  result.pathLstXml = pathLst;
146369
+ const pathCommandOrder = readPathListCommandOrder(pathLst);
146370
+ if (pathCommandOrder) {
146371
+ result.pathCommandOrder = pathCommandOrder;
146372
+ }
145668
146373
  }
145669
146374
  return Object.keys(result).length > 0 ? result : void 0;
145670
146375
  }
@@ -146575,7 +147280,7 @@ var init_PptxHandlerRuntimeShapeBodyParsing = __esm({
146575
147280
  return void 0;
146576
147281
  }
146577
147282
  const locks = {};
146578
- let hasAny = false;
147283
+ let hasAny2 = false;
146579
147284
  const boolAttr2 = (attr6) => {
146580
147285
  const raw = spLocks[attr6];
146581
147286
  if (raw === void 0) {
@@ -146588,7 +147293,7 @@ var init_PptxHandlerRuntimeShapeBodyParsing = __esm({
146588
147293
  const val = boolAttr2(attr6);
146589
147294
  if (val !== void 0) {
146590
147295
  fn(val);
146591
- hasAny = true;
147296
+ hasAny2 = true;
146592
147297
  }
146593
147298
  };
146594
147299
  set2("@_noGrp", (v) => {
@@ -146627,7 +147332,7 @@ var init_PptxHandlerRuntimeShapeBodyParsing = __esm({
146627
147332
  set2("@_noCrop", (v) => {
146628
147333
  locks.noCrop = v;
146629
147334
  });
146630
- return hasAny ? locks : void 0;
147335
+ return hasAny2 ? locks : void 0;
146631
147336
  }
146632
147337
  /**
146633
147338
  * Parse the `@txBox` attribute from a `p:cNvSpPr` node. Returns `true` /
@@ -146916,6 +147621,36 @@ var init_PptxHandlerRuntimeShapeTextParsing = __esm({
146916
147621
  )
146917
147622
  );
146918
147623
  const pPr = this.mergeXmlObjects(lstStyleParagraphDefaults, directPPr);
147624
+ if (!textStyle.inheritedParagraphSpacing) {
147625
+ textStyle.inheritedParagraphSpacing = {};
147626
+ for (let spacingLevel = 0; spacingLevel < 9; spacingLevel++) {
147627
+ const key2 = `a:lvl${spacingLevel + 1}pPr`;
147628
+ const defaults = this.mergeXmlObjects(
147629
+ this.mergeXmlObjects(
147630
+ inheritedLstStyle?.["a:defPPr"],
147631
+ inheritedLstStyle?.[key2]
147632
+ ),
147633
+ this.mergeXmlObjects(
147634
+ ownLstStyle?.["a:defPPr"],
147635
+ ownLstStyle?.[key2]
147636
+ )
147637
+ );
147638
+ const inherited = this.mergeXmlObjects(
147639
+ defaults,
147640
+ inheritedParagraph?.["a:pPr"]
147641
+ );
147642
+ const spacing = this.extractParagraphOwnProperties({ "a:pPr": inherited }, textStyle.fontSize) ?? {};
147643
+ const phLevel = ctx.effectiveLevelStyles?.[spacingLevel];
147644
+ const phBase = ctx.effectiveLevelStyles?.[-1];
147645
+ if (phLevel) this.applyPlaceholderLevelDefaults(spacing, phLevel);
147646
+ if (phBase) this.applyPlaceholderLevelDefaults(spacing, phBase);
147647
+ textStyle.inheritedParagraphSpacing[spacingLevel] = {
147648
+ paragraphSpacingBefore: spacing.paragraphSpacingBefore ?? 0,
147649
+ paragraphSpacingAfter: spacing.paragraphSpacingAfter ?? 0,
147650
+ ...spacing.lineSpacingExactPt !== void 0 ? { lineSpacingExactPt: spacing.lineSpacingExactPt } : { lineSpacing: spacing.lineSpacing ?? 1 }
147651
+ };
147652
+ }
147653
+ }
146919
147654
  const paragraphRtl = this.parseOptionalBooleanAttr(pPr?.["@_rtl"]);
146920
147655
  if (paragraphRtl !== void 0 && textStyle.rtl === void 0) {
146921
147656
  textStyle.rtl = paragraphRtl;
@@ -155255,13 +155990,15 @@ var init_PptxHandlerRuntimeChartParsing = __esm({
155255
155990
  });
155256
155991
 
155257
155992
  // pptx/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts
155258
- var PptxHandlerRuntime96;
155993
+ var XSD_INT_MIN, XSD_INT_MAX, PptxHandlerRuntime96;
155259
155994
  var init_PptxHandlerRuntimePresentationStructure = __esm({
155260
155995
  "pptx/core/core/runtime/PptxHandlerRuntimePresentationStructure.ts"() {
155261
155996
  init_kinsoku_parser();
155262
155997
  init_presentation_section_parser();
155263
155998
  init_header_footer_parts();
155264
155999
  init_PptxHandlerRuntimeChartParsing();
156000
+ XSD_INT_MIN = -2147483648;
156001
+ XSD_INT_MAX = 2147483647;
155265
156002
  PptxHandlerRuntime96 = class extends PptxHandlerRuntime95 {
155266
156003
  parseEditorAnimations(slideXml3) {
155267
156004
  return this.editorAnimationService.parseEditorAnimations(slideXml3);
@@ -155444,6 +156181,22 @@ var init_PptxHandlerRuntimePresentationStructure = __esm({
155444
156181
  const lexical = String(raw).trim().toLowerCase();
155445
156182
  return lexical !== "0" && lexical !== "false";
155446
156183
  }
156184
+ /**
156185
+ * Extract `p:presentation/@firstSlideNum` (ECMA-376 §19.2.1.26, an
156186
+ * `xsd:int`). `undefined` when absent, not an integer, or outside the
156187
+ * `xsd:int` range (-2147483648 to 2147483647, which also rejects digit
156188
+ * strings too long to parse), so the spec default (`1`) is never forced
156189
+ * onto the typed model.
156190
+ */
156191
+ extractFirstSlideNumber() {
156192
+ const pres = this.presentationData?.["p:presentation"];
156193
+ const lexical = String(pres?.["@_firstSlideNum"] ?? "").trim();
156194
+ if (!/^[+-]?\d+$/.test(lexical)) {
156195
+ return void 0;
156196
+ }
156197
+ const value = Number(lexical);
156198
+ return value >= XSD_INT_MIN && value <= XSD_INT_MAX ? value : void 0;
156199
+ }
155447
156200
  };
155448
156201
  }
155449
156202
  });
@@ -156114,7 +156867,7 @@ var init_PptxHandlerRuntimeLoadPipeline = __esm({
156114
156867
  this.commentAuthorDetails.size > 0 ? Array.from(this.commentAuthorDetails.values()) : void 0
156115
156868
  ).withModernCommentAuthors(
156116
156869
  this.modernCommentAuthors.size > 0 ? Array.from(this.modernCommentAuthors.values()) : void 0
156117
- ).withConformance(this.isStrictOoxml ? "strict" : "transitional").withEmbedTrueTypeFonts(embedTrueTypeFonts).withDefaultTextStyle(defaultTextStyle).build();
156870
+ ).withConformance(this.isStrictOoxml ? "strict" : "transitional").withEmbedTrueTypeFonts(embedTrueTypeFonts).withFirstSlideNumber(this.extractFirstSlideNumber()).withDefaultTextStyle(defaultTextStyle).build();
156118
156871
  }
156119
156872
  /**
156120
156873
  * Walk the raw XML of every slide to find the highest numeric `@_id`
@@ -160536,7 +161289,10 @@ var init_PptxHandler = __esm({
160536
161289
  const imported = deserializePptxFromJson(text2);
160537
161290
  const blankBytes = await buildBlankPresentationArchive({
160538
161291
  width: imported.widthEmu,
160539
- height: imported.heightEmu
161292
+ height: imported.heightEmu,
161293
+ // Saving writes presentation.xml from the loaded archive, not from
161294
+ // the overlaid model, so the archive must carry the value itself.
161295
+ firstSlideNumber: imported.firstSlideNumber
160540
161296
  });
160541
161297
  const base = await super.load(blankBytes, options);
160542
161298
  return applyImportedPptxData(base, imported);
@@ -169801,6 +170557,29 @@ assign26(["presentation:attribute:embedTrueTypeFonts"], {
169801
170557
  )
169802
170558
  ]
169803
170559
  });
170560
+ assign26(["presentation:attribute:firstSlideNum"], {
170561
+ parse: "native",
170562
+ preserve: "native",
170563
+ edit: "unassessed",
170564
+ serialize: "unassessed",
170565
+ note: "`p:presentation/@firstSlideNum` is parsed onto `PptxData.firstSlideNumber` (absent or non-integer stays `undefined`, spec default 1) and the shared field substitution shows `firstSlideNumber + index` for `slidenum` fields. A save keeps the attribute because the loaded presentation.xml object is rewritten in place; there is no save option to change it.",
170566
+ evidence: [
170567
+ testEvidence(
170568
+ "src/__tests__/integration/presentation-first-slide-number.test.ts",
170569
+ [
170570
+ "is undefined (spec default: 1) when the attribute is absent",
170571
+ "parses an explicit @firstSlideNum onto the typed model",
170572
+ "accepts zero and ignores a value that is not an integer"
170573
+ ],
170574
+ ["parse"]
170575
+ ),
170576
+ testEvidence(
170577
+ "src/__tests__/integration/presentation-first-slide-number.test.ts",
170578
+ ["survives a save that rewrites presentation.xml and reloads as the same value"],
170579
+ ["preserve"]
170580
+ )
170581
+ ]
170582
+ });
169804
170583
  assign26(["presentation:element:smartTags", "presentation:complexType:CT_SmartTags"], {
169805
170584
  parse: "native",
169806
170585
  preserve: "native",
@@ -178355,8 +179134,10 @@ exports.addSmartArtNodeAsChild = addSmartArtNodeAsChild;
178355
179134
  exports.addTableStyleToMap = addTableStyleToMap;
178356
179135
  exports.algorithmParam = algorithmParam;
178357
179136
  exports.alphaLabel = alphaLabel;
179137
+ exports.animationFor = animationFor;
178358
179138
  exports.applyActiveXControlsToSlide = applyActiveXControlsToSlide;
178359
179139
  exports.applyAfterAnimationBehavior = applyAfterAnimationBehavior;
179140
+ exports.applyAfterAnimationFromEditorList = applyAfterAnimationFromEditorList;
178360
179141
  exports.applyBubbleChartOptions = applyBubbleChartOptions;
178361
179142
  exports.applyChartLayouts = applyChartLayouts;
178362
179143
  exports.applyChartManualLayout = applyChartManualLayout;
@@ -178381,6 +179162,7 @@ exports.applySmartArtLayoutDefinition = applySmartArtLayoutDefinition;
178381
179162
  exports.applySmartArtQuickStyle3d = applySmartArtQuickStyle3d;
178382
179163
  exports.applySmartArtRoleColors = applySmartArtRoleColors;
178383
179164
  exports.applySoundToEffectCTn = applySoundToEffectCTn;
179165
+ exports.applySpeedToDuration = applySpeedToDuration;
178384
179166
  exports.applyTableCellTextAndStyle = applyTableCellTextAndStyle;
178385
179167
  exports.applyTemplate = applyTemplate;
178386
179168
  exports.applyThemeOverrideToSlide = applyThemeOverrideToSlide;
@@ -178583,6 +179365,8 @@ exports.generateMediaFilename = generateMediaFilename;
178583
179365
  exports.generateTableStyleGuid = generateTableStyleGuid;
178584
179366
  exports.getAdjustmentAwareClipPath = getAdjustmentAwareClipPath;
178585
179367
  exports.getAdjustmentAwareShapeClipPath = getAdjustmentAwareShapeClipPath;
179368
+ exports.getAfterAnimation = getAfterAnimation;
179369
+ exports.getAfterAnimationState = getAfterAnimationState;
178586
179370
  exports.getAnimationPresetInfo = getAnimationPresetInfo;
178587
179371
  exports.getCalloutLeaderLineGeometry = getCalloutLeaderLineGeometry;
178588
179372
  exports.getCalloutTier = getCalloutTier;
@@ -178636,6 +179420,7 @@ exports.groupElements = groupElements;
178636
179420
  exports.guidToKey = guidToKey;
178637
179421
  exports.guideEmuToPx = guideEmuToPx;
178638
179422
  exports.guidePxToEmu = guidePxToEmu;
179423
+ exports.hasAnimation = hasAnimation;
178639
179424
  exports.hasDirectSubstitution = hasDirectSubstitution;
178640
179425
  exports.hasNonTrivialOverride = hasNonTrivialOverride;
178641
179426
  exports.hasReference = hasReference;
@@ -178674,6 +179459,7 @@ exports.isImageLikeElement = isImageLikeElement;
178674
179459
  exports.isInkElement = isInkElement;
178675
179460
  exports.isLegacyPpt = isLegacyPpt;
178676
179461
  exports.isNamespaceSupported = isNamespaceSupported;
179462
+ exports.isNativeAfterAnimationOnly = isNativeAfterAnimationOnly;
178677
179463
  exports.isOle2CompoundFile = isOle2CompoundFile;
178678
179464
  exports.isParetoChartData = isParetoChartData;
178679
179465
  exports.isPptxJsonText = isPptxJsonText;
@@ -178700,6 +179486,7 @@ exports.lookupPresetShape = lookupPresetShape;
178700
179486
  exports.lookupPresetTextRectOverride = lookupPresetTextRectOverride;
178701
179487
  exports.mailMerge = mailMerge;
178702
179488
  exports.makeStoreAwareId = makeStoreAwareId;
179489
+ exports.mergeNativeAfterAnimationIntoEditorAnimations = mergeNativeAfterAnimationIntoEditorAnimations;
178703
179490
  exports.mergeNativeSoundIntoEditorAnimations = mergeNativeSoundIntoEditorAnimations;
178704
179491
  exports.mergePresentation = mergePresentation;
178705
179492
  exports.mergeShapes = mergeShapes;
@@ -178872,12 +179659,15 @@ exports.resolveCustomGeometryToken = resolveCustomGeometryToken;
178872
179659
  exports.resolveCustomShowSlideIndices = resolveCustomShowSlideIndices;
178873
179660
  exports.resolveDirectionSubtype = resolveDirectionSubtype;
178874
179661
  exports.resolveDisplayedChartTypeName = resolveDisplayedChartTypeName;
179662
+ exports.resolveEffectTiming = resolveEffectTiming;
178875
179663
  exports.resolveFlowDirection = resolveFlowDirection;
179664
+ exports.resolveIterationCount = resolveIterationCount;
178876
179665
  exports.resolveLayoutDisplayName = resolveLayoutDisplayName;
178877
179666
  exports.resolveModel3DMimeType = resolveModel3DMimeType;
178878
179667
  exports.resolveModifyVerifierAlgorithmName = resolveModifyVerifierAlgorithmName;
178879
179668
  exports.resolveOleEditorKindFromPayload = resolveOleEditorKindFromPayload;
178880
179669
  exports.resolveOoxmlPresetMapping = resolveOoxmlPresetMapping;
179670
+ exports.resolveOpacitySet = resolveOpacitySet;
178881
179671
  exports.resolveRatioConstraint = resolveRatioConstraint;
178882
179672
  exports.resolveReferenceUriToPart = resolveReferenceUriToPart;
178883
179673
  exports.resolveSmartArtEffectIntensity = resolveSmartArtEffectIntensity;
@@ -178885,6 +179675,7 @@ exports.resolveSmartArtNodeCoherent3DOff = resolveSmartArtNodeCoherent3DOff;
178885
179675
  exports.resolveSmartArtNodeStyleRoles = resolveSmartArtNodeStyleRoles;
178886
179676
  exports.resolveTableCellStyle = resolveTableCellStyle;
178887
179677
  exports.resolveThemeColorRef = resolveThemeColorRef;
179678
+ exports.resolveVisibilitySetTiming = resolveVisibilitySetTiming;
178888
179679
  exports.rgb = rgb;
178889
179680
  exports.rgbToHsl = rgbToHsl;
178890
179681
  exports.roleOf = roleOf;
@@ -178902,6 +179693,8 @@ exports.serializeSlidePackageClipboard = serializeSlidePackageClipboard;
178902
179693
  exports.serializeSmartArtDefinitionHeaderList = serializeSmartArtDefinitionHeaderList;
178903
179694
  exports.serializeSvgPath = serializeSvgPath;
178904
179695
  exports.serializeTimeTargetElement = serializeTimeTargetElement;
179696
+ exports.setAfterAnimation = setAfterAnimation;
179697
+ exports.setAfterAnimationColor = setAfterAnimationColor;
178905
179698
  exports.setChartAreaFormat = setChartAreaFormat;
178906
179699
  exports.setChartAxis = setChartAxis;
178907
179700
  exports.setChartAxisGridlineStyle = setChartAxisGridlineStyle;
@@ -178933,6 +179726,7 @@ exports.setOleObjectName = setOleObjectName;
178933
179726
  exports.setPresentationRunText = setPresentationRunText;
178934
179727
  exports.setSmartArtNodeStyle = setSmartArtNodeStyle;
178935
179728
  exports.shadowOffsetToDistanceAndDirection = shadowOffsetToDistanceAndDirection;
179729
+ exports.shouldHoldEndState = shouldHoldEndState;
178936
179730
  exports.shouldRenderFallbackLabel = shouldRenderFallbackLabel;
178937
179731
  exports.shouldReturnToZoomSlide = shouldReturnToZoomSlide;
178938
179732
  exports.smartArtQuickStyleHas3d = smartArtQuickStyleHas3d;
@@ -178988,6 +179782,7 @@ exports.updateChartUserShape = updateChartUserShape;
178988
179782
  exports.updateChartUserShapeAtPath = updateChartUserShapeAtPath;
178989
179783
  exports.updateMergeAttrsInRawXml = updateMergeAttrsInRawXml;
178990
179784
  exports.updateSmartArtNodeText = updateSmartArtNodeText;
179785
+ exports.upsert = upsert;
178991
179786
  exports.validatePptx = validatePptx;
178992
179787
  exports.validateSmartArtColorStyleLabels = validateSmartArtColorStyleLabels;
178993
179788
  exports.validateSmartArtConstraintRules = validateSmartArtConstraintRules;