pptx-react-viewer 2.9.0 → 2.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 (125) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/dist/{AiChatPanel-6W6ZBAGU.mjs → AiChatPanel-EX2TBRJM.mjs} +4 -4
  3. package/dist/AiChatPanel-EX2TBRJM.mjs.br +0 -0
  4. package/dist/AiChatPanel-EX2TBRJM.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-MALC32TM.js → AiChatPanel-PJPSDMN4.js} +23 -23
  6. package/dist/AiChatPanel-PJPSDMN4.js.br +0 -0
  7. package/dist/AiChatPanel-PJPSDMN4.js.gz +0 -0
  8. package/dist/{Model3DScene-57HZ4NVD.mjs → Model3DScene-TTQFV7OS.mjs} +1 -1
  9. package/dist/Model3DScene-TTQFV7OS.mjs.br +0 -0
  10. package/dist/Model3DScene-TTQFV7OS.mjs.gz +0 -0
  11. package/dist/{Model3DScene-76R2YXSO.js → Model3DScene-UCBPTEAY.js} +2 -2
  12. package/dist/Model3DScene-UCBPTEAY.js.br +0 -0
  13. package/dist/Model3DScene-UCBPTEAY.js.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-JGOQNHSU.mjs → SurfaceChart3DScene-5SZCRHZI.mjs} +1 -1
  15. package/dist/{SurfaceChart3DScene-JGOQNHSU.mjs.br → SurfaceChart3DScene-5SZCRHZI.mjs.br} +0 -0
  16. package/dist/SurfaceChart3DScene-5SZCRHZI.mjs.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-2QZZTBV4.js → SurfaceChart3DScene-ADKCYYOQ.js} +2 -2
  18. package/dist/SurfaceChart3DScene-ADKCYYOQ.js.br +0 -0
  19. package/dist/SurfaceChart3DScene-ADKCYYOQ.js.gz +0 -0
  20. package/dist/{chunk-D6SHCB4V.js → chunk-4J7SPY64.js} +338 -324
  21. package/dist/chunk-4J7SPY64.js.br +0 -0
  22. package/dist/chunk-4J7SPY64.js.gz +0 -0
  23. package/dist/{chunk-CD434OFE.mjs → chunk-53NXKDMZ.mjs} +48 -0
  24. package/dist/chunk-53NXKDMZ.mjs.br +0 -0
  25. package/dist/chunk-53NXKDMZ.mjs.gz +0 -0
  26. package/dist/{chunk-L47Y62L6.mjs → chunk-C2UWTH42.mjs} +1168 -118
  27. package/dist/chunk-C2UWTH42.mjs.br +0 -0
  28. package/dist/chunk-C2UWTH42.mjs.gz +0 -0
  29. package/dist/{chunk-6UXRNLHD.js → chunk-E367QIKR.js} +2526 -1738
  30. package/dist/chunk-E367QIKR.js.br +0 -0
  31. package/dist/chunk-E367QIKR.js.gz +0 -0
  32. package/dist/{chunk-4FO4JMTN.mjs → chunk-HK2UERUX.mjs} +17 -3
  33. package/dist/chunk-HK2UERUX.mjs.br +0 -0
  34. package/dist/chunk-HK2UERUX.mjs.gz +0 -0
  35. package/dist/{chunk-IKISUZKE.js → chunk-HMQVOPQH.js} +1210 -118
  36. package/dist/chunk-HMQVOPQH.js.br +0 -0
  37. package/dist/chunk-HMQVOPQH.js.gz +0 -0
  38. package/dist/{chunk-NQLVK23T.mjs → chunk-L2CM5EUD.mjs} +885 -97
  39. package/dist/chunk-L2CM5EUD.mjs.br +0 -0
  40. package/dist/chunk-L2CM5EUD.mjs.gz +0 -0
  41. package/dist/{chunk-34BUZNKO.js → chunk-MM5RMRSP.js} +278 -291
  42. package/dist/chunk-MM5RMRSP.js.br +0 -0
  43. package/dist/chunk-MM5RMRSP.js.gz +0 -0
  44. package/dist/{chunk-2JDWFMIK.js → chunk-N6IHR6PS.js} +48 -0
  45. package/dist/chunk-N6IHR6PS.js.br +0 -0
  46. package/dist/chunk-N6IHR6PS.js.gz +0 -0
  47. package/dist/{chunk-JPTO6P5K.mjs → chunk-RJEY2KZH.mjs} +34 -48
  48. package/dist/chunk-RJEY2KZH.mjs.br +0 -0
  49. package/dist/chunk-RJEY2KZH.mjs.gz +0 -0
  50. package/dist/{chunk-6OLS3EJW.mjs → chunk-UZVRM6LD.mjs} +1 -1
  51. package/dist/chunk-UZVRM6LD.mjs.br +0 -0
  52. package/dist/chunk-UZVRM6LD.mjs.gz +0 -0
  53. package/dist/{chunk-YEM2VOAP.js → chunk-VNP627O5.js} +3 -3
  54. package/dist/chunk-VNP627O5.js.br +0 -0
  55. package/dist/chunk-VNP627O5.js.gz +0 -0
  56. package/dist/i18n.js +4 -4
  57. package/dist/i18n.js.br +0 -0
  58. package/dist/i18n.js.gz +0 -0
  59. package/dist/i18n.mjs +1 -1
  60. package/dist/i18n.mjs.br +0 -0
  61. package/dist/i18n.mjs.gz +0 -0
  62. package/dist/index.d.ts +26 -3
  63. package/dist/index.d.ts.map +1 -1
  64. package/dist/index.js +36 -36
  65. package/dist/index.js.br +0 -0
  66. package/dist/index.js.gz +0 -0
  67. package/dist/index.mjs +6 -6
  68. package/dist/index.mjs.br +0 -0
  69. package/dist/index.mjs.gz +0 -0
  70. package/dist/internals.d.ts +30 -2
  71. package/dist/internals.d.ts.map +1 -1
  72. package/dist/internals.js +79 -79
  73. package/dist/internals.js.br +0 -0
  74. package/dist/internals.js.gz +0 -0
  75. package/dist/internals.mjs +4 -4
  76. package/dist/internals.mjs.br +0 -0
  77. package/dist/internals.mjs.gz +0 -0
  78. package/dist/pptx-viewer.css +1 -1
  79. package/dist/pptx-viewer.css.br +0 -0
  80. package/dist/pptx-viewer.css.gz +0 -0
  81. package/dist/{useViewerBuildingBlocks-C59NY1qZ.d.ts → useViewerBuildingBlocks-Rqxm0pRS.d.ts} +19 -5
  82. package/dist/useViewerBuildingBlocks-Rqxm0pRS.d.ts.map +1 -0
  83. package/dist/viewer/index.js +22 -22
  84. package/dist/viewer/index.js.br +0 -0
  85. package/dist/viewer/index.js.gz +0 -0
  86. package/dist/viewer/index.mjs +6 -6
  87. package/dist/viewer/index.mjs.br +0 -0
  88. package/dist/viewer/index.mjs.gz +0 -0
  89. package/package.json +1 -1
  90. package/dist/AiChatPanel-6W6ZBAGU.mjs.br +0 -0
  91. package/dist/AiChatPanel-6W6ZBAGU.mjs.gz +0 -0
  92. package/dist/AiChatPanel-MALC32TM.js.br +0 -0
  93. package/dist/AiChatPanel-MALC32TM.js.gz +0 -0
  94. package/dist/Model3DScene-57HZ4NVD.mjs.br +0 -0
  95. package/dist/Model3DScene-57HZ4NVD.mjs.gz +0 -0
  96. package/dist/Model3DScene-76R2YXSO.js.br +0 -0
  97. package/dist/Model3DScene-76R2YXSO.js.gz +0 -0
  98. package/dist/SurfaceChart3DScene-2QZZTBV4.js.br +0 -0
  99. package/dist/SurfaceChart3DScene-2QZZTBV4.js.gz +0 -0
  100. package/dist/SurfaceChart3DScene-JGOQNHSU.mjs.gz +0 -0
  101. package/dist/chunk-2JDWFMIK.js.br +0 -0
  102. package/dist/chunk-2JDWFMIK.js.gz +0 -0
  103. package/dist/chunk-34BUZNKO.js.br +0 -0
  104. package/dist/chunk-34BUZNKO.js.gz +0 -0
  105. package/dist/chunk-4FO4JMTN.mjs.br +0 -0
  106. package/dist/chunk-4FO4JMTN.mjs.gz +0 -0
  107. package/dist/chunk-6OLS3EJW.mjs.br +0 -0
  108. package/dist/chunk-6OLS3EJW.mjs.gz +0 -0
  109. package/dist/chunk-6UXRNLHD.js.br +0 -0
  110. package/dist/chunk-6UXRNLHD.js.gz +0 -0
  111. package/dist/chunk-CD434OFE.mjs.br +0 -0
  112. package/dist/chunk-CD434OFE.mjs.gz +0 -0
  113. package/dist/chunk-D6SHCB4V.js.br +0 -0
  114. package/dist/chunk-D6SHCB4V.js.gz +0 -0
  115. package/dist/chunk-IKISUZKE.js.br +0 -0
  116. package/dist/chunk-IKISUZKE.js.gz +0 -0
  117. package/dist/chunk-JPTO6P5K.mjs.br +0 -0
  118. package/dist/chunk-JPTO6P5K.mjs.gz +0 -0
  119. package/dist/chunk-L47Y62L6.mjs.br +0 -0
  120. package/dist/chunk-L47Y62L6.mjs.gz +0 -0
  121. package/dist/chunk-NQLVK23T.mjs.br +0 -0
  122. package/dist/chunk-NQLVK23T.mjs.gz +0 -0
  123. package/dist/chunk-YEM2VOAP.js.br +0 -0
  124. package/dist/chunk-YEM2VOAP.js.gz +0 -0
  125. package/dist/useViewerBuildingBlocks-C59NY1qZ.d.ts.map +0 -1
@@ -46601,8 +46601,8 @@ function applyImageColorEffects(blip, effects, parseColor, extractOpacity) {
46601
46601
  const rawFrom = child19(change.rawXml, "clrFrom");
46602
46602
  const rawTo = child19(change.rawXml, "clrTo");
46603
46603
  const rawTransparent = rawTo ? (opacity(rawTo, extractOpacity) ?? 1) <= 0 : void 0;
46604
- const unchanged = sameRawColor(rawFrom, change.clrFrom, parseColor) && sameRawColor(rawTo, change.clrTo, parseColor) && (rawTransparent === void 0 || change.clrToTransparent === rawTransparent);
46605
- if (unchanged && change.rawXml) {
46604
+ const unchanged2 = sameRawColor(rawFrom, change.clrFrom, parseColor) && sameRawColor(rawTo, change.clrTo, parseColor) && (rawTransparent === void 0 || change.clrToTransparent === rawTransparent);
46605
+ if (unchanged2 && change.rawXml) {
46606
46606
  setChild6(blip, "clrChange", change.rawXml);
46607
46607
  } else {
46608
46608
  const fromChoice = sameRawColor(rawFrom, change.clrFrom, parseColor) ? extractColorChoiceXml(rawFrom) : buildSrgbColorChoice(change.clrFrom);
@@ -50607,8 +50607,8 @@ var PptxHandlerRuntime14 = class extends PptxHandlerRuntime13 {
50607
50607
  }
50608
50608
  const notesBodyShape = shapes.find((shape) => {
50609
50609
  const placeholder = shape?.["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"];
50610
- const placeholderType = String(placeholder?.["@_type"] || "").trim().toLowerCase();
50611
- return placeholderType === "body";
50610
+ const placeholderType2 = String(placeholder?.["@_type"] || "").trim().toLowerCase();
50611
+ return placeholderType2 === "body";
50612
50612
  }) || shapes.find((shape) => Boolean(shape?.["p:txBody"])) || shapes[0];
50613
50613
  if (!notesBodyShape) {
50614
50614
  return false;
@@ -51446,10 +51446,16 @@ var PptxHandlerRuntime17 = class extends PptxHandlerRuntime16 {
51446
51446
  * survive a save: collapsing them to the plain-text path silently downgrades
51447
51447
  * a field to static text (e.g. a slide-number field becomes a frozen number)
51448
51448
  * or drops the equation, ruby, or bullet.
51449
+ *
51450
+ * `paragraphLevel` (`a:pPr/@lvl`) belongs on this list for the same reason
51451
+ * and used to be missing from it: a nested bullet whose runs all share one
51452
+ * style looked "uniform", so the save path discarded its segments and rebuilt
51453
+ * the paragraph from the flat string, which carries no indent level. Every
51454
+ * such paragraph came back from a round-trip flattened to the top level.
51449
51455
  */
51450
51456
  isStructuralTextSegment(segment) {
51451
51457
  return Boolean(
51452
- segment.fieldType || segment.equationXml || segment.rubyText || segment.bulletInfo
51458
+ segment.fieldType || segment.equationXml || segment.rubyText || segment.bulletInfo || segment.paragraphLevel
51453
51459
  );
51454
51460
  }
51455
51461
  areTextSegmentsUniform(textSegments) {
@@ -86648,6 +86654,43 @@ var EQUATION_TEMPLATES = [
86648
86654
  i18nKey: "pptx.equation.template.trigIdentity"
86649
86655
  }
86650
86656
  ];
86657
+ function purifyFn() {
86658
+ const purify = DOMPurify;
86659
+ return typeof purify.sanitize === "function" ? purify.sanitize : void 0;
86660
+ }
86661
+ function sanitizeMarkupOrEmpty(markup, config) {
86662
+ const sanitize = purifyFn();
86663
+ return sanitize ? sanitize(markup, config) : "";
86664
+ }
86665
+ function sanitizeMathMl(markup) {
86666
+ const sanitized = sanitizeMarkupOrEmpty(markup, { USE_PROFILES: { mathMl: true, svg: true } });
86667
+ if (/<math(?:\s|>)/iu.test(markup) && !/<math(?:\s|>)/iu.test(sanitized) && sanitized) {
86668
+ return `<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">${sanitized}</math>`;
86669
+ }
86670
+ return sanitized;
86671
+ }
86672
+ function emptyResult() {
86673
+ return { mathml: "", omml: {} };
86674
+ }
86675
+ function compileLatexEquation(source) {
86676
+ const trimmed = source.trim();
86677
+ if (!trimmed) {
86678
+ return emptyResult();
86679
+ }
86680
+ try {
86681
+ const omml = convertLatexToOmml(trimmed);
86682
+ const raw = convertOmmlToMathMl(omml);
86683
+ return { mathml: raw ? sanitizeMathMl(raw) : "", omml };
86684
+ } catch {
86685
+ return emptyResult();
86686
+ }
86687
+ }
86688
+ function latexToMathMl(source) {
86689
+ return compileLatexEquation(source).mathml;
86690
+ }
86691
+ function compileEquationTemplateMathMl() {
86692
+ return EQUATION_TEMPLATES.map((tmpl) => latexToMathMl(tmpl.latex));
86693
+ }
86651
86694
  var ACCENT1 = "#4472C4";
86652
86695
  var ACCENT2 = "#ED7D31";
86653
86696
  var ACCENT3 = "#A5A5A5";
@@ -87103,6 +87146,14 @@ function resolveDataPointExplosion(series, pointIndex) {
87103
87146
  const point = findDataPoint(series, pointIndex);
87104
87147
  return point?.explosion ?? series.explosion ?? 0;
87105
87148
  }
87149
+ function resolveDataPointMarker(series, pointIndex) {
87150
+ const point = findDataPoint(series, pointIndex)?.marker;
87151
+ return {
87152
+ symbol: point?.symbol ?? series.marker?.symbol,
87153
+ size: point?.size ?? series.marker?.size,
87154
+ fill: point?.spPr?.fillColor ?? series.marker?.spPr?.fillColor
87155
+ };
87156
+ }
87106
87157
  function addChartSeries(data) {
87107
87158
  return chartDataAddSeries(data, {
87108
87159
  name: `Series ${data.series.length + 1}`,
@@ -87990,13 +88041,16 @@ function buildMarkerPrimitive(input) {
87990
88041
  return { kind: "circle", cx, cy, r, fill, part };
87991
88042
  }
87992
88043
  }
87993
- function pushMarker(out, series, cx, cy, fill, defaultRadius2, part, opacity2) {
88044
+ function pushMarker(out, series, pointIndex, cx, cy, fill, defaultRadius2, part, opacity2) {
88045
+ const marker = resolveDataPointMarker(series, pointIndex);
87994
88046
  const m = buildMarkerPrimitive({
87995
- symbol: series.marker?.symbol,
87996
- size: series.marker?.size,
88047
+ symbol: marker.symbol,
88048
+ size: marker.size,
87997
88049
  cx,
87998
88050
  cy,
87999
- fill,
88051
+ // A marker fill (series or per-point) wins over the plot fill, which is
88052
+ // what the line/area body is drawn with.
88053
+ fill: marker.fill ?? fill,
88000
88054
  defaultRadius: defaultRadius2,
88001
88055
  part
88002
88056
  });
@@ -88076,6 +88130,7 @@ function buildLines(chartData, catCount, layout, primaryRange, secondaryRange, s
88076
88130
  pushMarker(
88077
88131
  primitives,
88078
88132
  series,
88133
+ idx,
88079
88134
  pt.x,
88080
88135
  pt.y,
88081
88136
  resolveDataPointFill(series, idx, c) ?? c,
@@ -88147,6 +88202,7 @@ function buildAreas(chartData, catCount, layout, range, sourceIndices2, xPositio
88147
88202
  pushMarker(
88148
88203
  primitives,
88149
88204
  series,
88205
+ idx,
88150
88206
  pt.x,
88151
88207
  pt.y,
88152
88208
  resolveDataPointFill(series, idx, c) ?? c,
@@ -88190,6 +88246,7 @@ function buildScatter(chartData, layout, range) {
88190
88246
  pushMarker(
88191
88247
  primitives,
88192
88248
  series,
88249
+ vi,
88193
88250
  dot.cx,
88194
88251
  dot.cy,
88195
88252
  resolveDataPointFill(series, vi, c) ?? c,
@@ -93659,6 +93716,10 @@ function applyFlyDirection(effect, subtype) {
93659
93716
  const suffix = `${edge.charAt(0).toUpperCase()}${edge.slice(1)}`;
93660
93717
  return `${prefix}${suffix}`;
93661
93718
  }
93719
+ function slideOffset(percent2, axis) {
93720
+ const fallback = axis === "w" ? "1280px" : "720px";
93721
+ return `calc(var(--pptx-slide-${axis}, ${fallback}) * ${(percent2 / 100).toFixed(4)})`;
93722
+ }
93662
93723
  function buildDynamicKeyframe(anim, uid) {
93663
93724
  if (anim.motionPath) {
93664
93725
  const name = `pptx-tl-motion-${uid}`;
@@ -93669,8 +93730,8 @@ function buildDynamicKeyframe(anim, uid) {
93669
93730
  const lines = [];
93670
93731
  for (let i = 0; i < points3.length; i++) {
93671
93732
  const pct = Math.round(i / (points3.length - 1) * 100);
93672
- const tx = points3[i].x.toFixed(2);
93673
- const ty = points3[i].y.toFixed(2);
93733
+ const tx = slideOffset(points3[i].x, "w");
93734
+ const ty = slideOffset(points3[i].y, "h");
93674
93735
  if (anim.motionPathRotateAuto) {
93675
93736
  const next = i < points3.length - 1 ? points3[i + 1] : points3[i];
93676
93737
  const prev = i > 0 ? points3[i - 1] : points3[i];
@@ -93678,10 +93739,10 @@ function buildDynamicKeyframe(anim, uid) {
93678
93739
  const dy = i < points3.length - 1 ? next.y - points3[i].y : points3[i].y - prev.y;
93679
93740
  const angleDeg = Math.atan2(dy, dx) * (180 / Math.PI);
93680
93741
  lines.push(
93681
- ` ${pct}% { transform: translate(${tx}%, ${ty}%) rotate(${angleDeg.toFixed(2)}deg); }`
93742
+ ` ${pct}% { transform: translate(${tx}, ${ty}) rotate(${angleDeg.toFixed(2)}deg); }`
93682
93743
  );
93683
93744
  } else {
93684
- lines.push(` ${pct}% { transform: translate(${tx}%, ${ty}%); }`);
93745
+ lines.push(` ${pct}% { transform: translate(${tx}, ${ty}); }`);
93685
93746
  }
93686
93747
  }
93687
93748
  return {
@@ -94816,6 +94877,422 @@ var TimelineEngine = class _TimelineEngine {
94816
94877
  }
94817
94878
  }
94818
94879
  };
94880
+ var PRESET_TO_EFFECT = {
94881
+ fadeIn: "fadeIn",
94882
+ flyIn: "flyInBottom",
94883
+ zoomIn: "zoomIn",
94884
+ fadeOut: "fadeOut",
94885
+ flyOut: "flyOutBottom",
94886
+ zoomOut: "zoomOut",
94887
+ spin: "spin",
94888
+ pulse: "pulse",
94889
+ colorWave: "colorWave",
94890
+ bounce: "bounce",
94891
+ flash: "flash"
94892
+ };
94893
+ var DIRECTION_FLY_MAP = {
94894
+ fromLeft: { flyIn: "flyInLeft", flyOut: "flyOutLeft" },
94895
+ fromRight: { flyIn: "flyInRight", flyOut: "flyOutRight" },
94896
+ fromTop: { flyIn: "flyInTop", flyOut: "flyOutTop" },
94897
+ fromBottom: { flyIn: "flyInBottom", flyOut: "flyOutBottom" },
94898
+ fromTopLeft: { flyIn: "flyInTop", flyOut: "flyOutTop" },
94899
+ fromTopRight: { flyIn: "flyInTop", flyOut: "flyOutTop" },
94900
+ fromBottomLeft: { flyIn: "flyInBottom", flyOut: "flyOutBottom" },
94901
+ fromBottomRight: { flyIn: "flyInBottom", flyOut: "flyOutBottom" }
94902
+ };
94903
+ function resolvePreviewEffect(preset, direction) {
94904
+ if ((preset === "flyIn" || preset === "flyOut") && direction) {
94905
+ const dirMap = DIRECTION_FLY_MAP[direction];
94906
+ if (dirMap) {
94907
+ return preset === "flyIn" ? dirMap.flyIn : dirMap.flyOut;
94908
+ }
94909
+ }
94910
+ return PRESET_TO_EFFECT[preset];
94911
+ }
94912
+ function timingCurveToCss(curve, cubicBezierValues) {
94913
+ if (cubicBezierValues) {
94914
+ const parts = cubicBezierValues.split(",").map((s) => s.trim());
94915
+ if (parts.length === 4 && parts.every((p) => !Number.isNaN(Number(p)))) {
94916
+ return `cubic-bezier(${parts.join(", ")})`;
94917
+ }
94918
+ }
94919
+ switch (curve) {
94920
+ case "ease":
94921
+ return "ease";
94922
+ case "ease-in":
94923
+ return "ease-in";
94924
+ case "ease-out":
94925
+ return "ease-out";
94926
+ case "linear":
94927
+ return "linear";
94928
+ default:
94929
+ return "ease";
94930
+ }
94931
+ }
94932
+ function buildPreviewAnimation(preset, options) {
94933
+ if (preset === "none") {
94934
+ return void 0;
94935
+ }
94936
+ const effectName = resolvePreviewEffect(preset, options?.direction);
94937
+ if (!effectName) {
94938
+ return void 0;
94939
+ }
94940
+ const keyframeName = `pptx-${effectName}`;
94941
+ const keyframesCss = getEffectKeyframes(effectName);
94942
+ if (!keyframesCss) {
94943
+ return void 0;
94944
+ }
94945
+ const duration = options?.durationMs ?? 600;
94946
+ const easing = timingCurveToCss(options?.timingCurve, options?.cubicBezier);
94947
+ return {
94948
+ keyframeName,
94949
+ keyframesCss,
94950
+ cssAnimation: `${keyframeName} ${duration}ms ${easing} 0ms 1 normal both`,
94951
+ durationMs: duration
94952
+ };
94953
+ }
94954
+ var EDITABLE = /* @__PURE__ */ new Set(["M", "L", "C", "Z", "m", "l", "c", "z"]);
94955
+ var ARITY = { m: 2, l: 2, c: 6, z: 0 };
94956
+ function scanPath(path) {
94957
+ const tokens = path.match(/[A-Za-z]|-?\d*\.?\d+(?:[eE][-+]?\d+)?/gu);
94958
+ if (!tokens) {
94959
+ return void 0;
94960
+ }
94961
+ const segments = [];
94962
+ let i = 0;
94963
+ let cmd = "";
94964
+ while (i < tokens.length) {
94965
+ if (/^[A-Za-z]$/u.test(tokens[i])) {
94966
+ cmd = tokens[i];
94967
+ i++;
94968
+ if (!EDITABLE.has(cmd)) {
94969
+ return void 0;
94970
+ }
94971
+ if (cmd === "Z" || cmd === "z") {
94972
+ segments.push({ cmd, coords: [] });
94973
+ }
94974
+ continue;
94975
+ }
94976
+ const arity = ARITY[cmd.toLowerCase()];
94977
+ if (!arity) {
94978
+ return void 0;
94979
+ }
94980
+ const coords = [];
94981
+ for (let n = 0; n < arity; n++) {
94982
+ const value = Number(tokens[i++]);
94983
+ if (!Number.isFinite(value)) {
94984
+ return void 0;
94985
+ }
94986
+ coords.push(value);
94987
+ }
94988
+ segments.push({ cmd, coords });
94989
+ if (cmd === "M") {
94990
+ cmd = "L";
94991
+ } else if (cmd === "m") {
94992
+ cmd = "l";
94993
+ }
94994
+ }
94995
+ return segments.length > 0 ? segments : void 0;
94996
+ }
94997
+ function formatPath(segments) {
94998
+ return segments.map(
94999
+ (segment) => segment.coords.length === 0 ? segment.cmd : `${segment.cmd} ${segment.coords.map((n) => trimNumber(n)).join(" ")}`
95000
+ ).join(" ");
95001
+ }
95002
+ function trimNumber(value) {
95003
+ return String(Number(value.toFixed(4)));
95004
+ }
95005
+ function motionPathFractionPoints(path) {
95006
+ return parseMotionPathPoints(path).map((point) => ({ x: point.x / 100, y: point.y / 100 }));
95007
+ }
95008
+ function toPixels(point, frame2) {
95009
+ return {
95010
+ x: frame2.originX + point.x * frame2.slideWidth,
95011
+ y: frame2.originY + point.y * frame2.slideHeight
95012
+ };
95013
+ }
95014
+ function motionPathToSvgD(path, frame2) {
95015
+ const points3 = motionPathFractionPoints(path).map((point) => toPixels(point, frame2));
95016
+ if (points3.length === 0) {
95017
+ return "";
95018
+ }
95019
+ const head = `M ${trimNumber(frame2.originX)} ${trimNumber(frame2.originY)}`;
95020
+ const rest = points3.map((point) => `L ${trimNumber(point.x)} ${trimNumber(point.y)}`);
95021
+ return [head, ...rest].join(" ");
95022
+ }
95023
+ function motionPathEndPixel(path, frame2) {
95024
+ const points3 = motionPathFractionPoints(path);
95025
+ const last = points3.length > 0 ? points3[points3.length - 1] : void 0;
95026
+ return last ? toPixels(last, frame2) : { x: frame2.originX, y: frame2.originY };
95027
+ }
95028
+ function setMotionPathEnd(path, x, y) {
95029
+ const segments = scanPath(path);
95030
+ if (!segments) {
95031
+ return path;
95032
+ }
95033
+ let lastIndex = -1;
95034
+ for (let i = segments.length - 1; i >= 0; i--) {
95035
+ if (segments[i].coords.length > 0) {
95036
+ lastIndex = i;
95037
+ break;
95038
+ }
95039
+ }
95040
+ if (lastIndex < 0 || segments.some((segment) => segment.cmd === "Z" || segment.cmd === "z")) {
95041
+ return path;
95042
+ }
95043
+ const last = segments[lastIndex];
95044
+ if (last.cmd === last.cmd.toLowerCase()) {
95045
+ return path;
95046
+ }
95047
+ const coords = [...last.coords];
95048
+ const endX = coords[coords.length - 2];
95049
+ const endY = coords[coords.length - 1];
95050
+ const dx = x - endX;
95051
+ const dy = y - endY;
95052
+ coords[coords.length - 2] = x;
95053
+ coords[coords.length - 1] = y;
95054
+ if (last.cmd === "C") {
95055
+ coords[2] += dx;
95056
+ coords[3] += dy;
95057
+ }
95058
+ const next = segments.map(
95059
+ (segment, index) => index === lastIndex ? { ...last, coords } : segment
95060
+ );
95061
+ return formatPath(next);
95062
+ }
95063
+ function isEditableMotionPath(path) {
95064
+ const segments = scanPath(path);
95065
+ if (!segments) {
95066
+ return false;
95067
+ }
95068
+ return !segments.some((segment) => segment.cmd === "Z" || segment.cmd === "z");
95069
+ }
95070
+ function buildMotionPathKeyframes(args) {
95071
+ const points3 = motionPathFractionPoints(args.path);
95072
+ if (points3.length < 2) {
95073
+ return void 0;
95074
+ }
95075
+ const frames = points3.map((point, index) => {
95076
+ const percent2 = Math.round(index / (points3.length - 1) * 100);
95077
+ const x = trimNumber(point.x * args.slideWidth);
95078
+ const y = trimNumber(point.y * args.slideHeight);
95079
+ return ` ${percent2}% { transform: translate(${x}px, ${y}px); }`;
95080
+ });
95081
+ return {
95082
+ keyframeName: args.keyframeName,
95083
+ css: `@keyframes ${args.keyframeName} {
95084
+ ${frames.join("\n")}
95085
+ }`
95086
+ };
95087
+ }
95088
+ var K = 0.5523;
95089
+ var RX = 0.125;
95090
+ var RY = 0.2222;
95091
+ var CIRCLE = [
95092
+ "M 0 0",
95093
+ `C ${-K * RX} 0 ${-RX} ${-RY + K * RY} ${-RX} ${-RY}`,
95094
+ `C ${-RX} ${-RY - K * RY} ${-K * RX} ${ -2 * RY} 0 ${ -2 * RY}`,
95095
+ `C ${K * RX} ${ -2 * RY} ${RX} ${-RY - K * RY} ${RX} ${-RY}`,
95096
+ `C ${RX} ${-RY + K * RY} ${K * RX} 0 0 0`
95097
+ ].join(" ").replace(/(\d\.\d{4})\d+/gu, "$1");
95098
+ var MOTION_PATH_PRESETS2 = [
95099
+ // -- Lines ---------------------------------------------------------------
95100
+ { id: "lineRight", family: "lines", path: "M 0 0 L 0.25 0" },
95101
+ { id: "lineLeft", family: "lines", path: "M 0 0 L -0.25 0" },
95102
+ { id: "lineDown", family: "lines", path: "M 0 0 L 0 0.25" },
95103
+ { id: "lineUp", family: "lines", path: "M 0 0 L 0 -0.25" },
95104
+ { id: "lineDiagonalUpRight", family: "lines", path: "M 0 0 L 0.25 -0.25" },
95105
+ { id: "lineDiagonalDownRight", family: "lines", path: "M 0 0 L 0.25 0.25" },
95106
+ { id: "lineDiagonalUpLeft", family: "lines", path: "M 0 0 L -0.25 -0.25" },
95107
+ { id: "lineDiagonalDownLeft", family: "lines", path: "M 0 0 L -0.25 0.25" },
95108
+ // -- Arcs ----------------------------------------------------------------
95109
+ {
95110
+ id: "arcUp",
95111
+ family: "arcs",
95112
+ path: "M 0 0 C 0 -0.1227 0.0559 -0.2222 0.125 -0.2222 C 0.1941 -0.2222 0.25 -0.1227 0.25 0"
95113
+ },
95114
+ {
95115
+ id: "arcDown",
95116
+ family: "arcs",
95117
+ path: "M 0 0 C 0 0.1227 0.0559 0.2222 0.125 0.2222 C 0.1941 0.2222 0.25 0.1227 0.25 0"
95118
+ },
95119
+ {
95120
+ id: "arcRight",
95121
+ family: "arcs",
95122
+ path: "M 0 0 C 0.069 0 0.125 0.0995 0.125 0.2222 C 0.125 0.3449 0.069 0.4444 0 0.4444"
95123
+ },
95124
+ {
95125
+ id: "arcLeft",
95126
+ family: "arcs",
95127
+ path: "M 0 0 C -0.069 0 -0.125 0.0995 -0.125 0.2222 C -0.125 0.3449 -0.069 0.4444 0 0.4444"
95128
+ },
95129
+ // -- Turns ---------------------------------------------------------------
95130
+ { id: "turnUp", family: "turns", path: "M 0 0 L 0.25 0 L 0.25 -0.25" },
95131
+ { id: "turnDown", family: "turns", path: "M 0 0 L 0.25 0 L 0.25 0.25" },
95132
+ { id: "turnRight", family: "turns", path: "M 0 0 L 0 0.25 L 0.25 0.25" },
95133
+ { id: "turnLeft", family: "turns", path: "M 0 0 L 0 0.25 L -0.25 0.25" },
95134
+ {
95135
+ id: "sCurve",
95136
+ family: "turns",
95137
+ path: "M 0 0 C 0.0833 -0.1111 0.1667 0.1111 0.25 0"
95138
+ },
95139
+ {
95140
+ id: "zigzag",
95141
+ family: "turns",
95142
+ path: "M 0 0 L 0.0625 -0.1111 L 0.125 0 L 0.1875 -0.1111 L 0.25 0"
95143
+ },
95144
+ // -- Shapes --------------------------------------------------------------
95145
+ { id: "circle", family: "shapes", path: CIRCLE },
95146
+ { id: "square", family: "shapes", path: "M 0 0 L 0.125 0 L 0.125 -0.2222 L 0 -0.2222 Z" },
95147
+ { id: "triangle", family: "shapes", path: "M 0 0 L 0.0625 -0.2222 L 0.125 0 Z" },
95148
+ {
95149
+ id: "diamond",
95150
+ family: "shapes",
95151
+ path: "M 0 0 L 0.0625 -0.1111 L 0.125 0 L 0.0625 0.1111 Z"
95152
+ },
95153
+ {
95154
+ id: "hexagon",
95155
+ family: "shapes",
95156
+ path: "M 0 0 L 0.0417 -0.1111 L 0.125 -0.1111 L 0.1667 0 L 0.125 0.1111 L 0.0417 0.1111 Z"
95157
+ },
95158
+ // -- Loops ---------------------------------------------------------------
95159
+ {
95160
+ id: "loopDeLoop",
95161
+ family: "loops",
95162
+ path: "M 0 0 C 0.0625 0 0.0972 -0.2222 0.1667 -0.2222 C 0.2361 -0.2222 0.2708 0 0.1667 0 L 0.3333 0"
95163
+ },
95164
+ {
95165
+ id: "figureEight",
95166
+ family: "loops",
95167
+ path: "M 0 0 C -0.0833 0 -0.0833 -0.2222 0 -0.2222 C 0.0833 -0.2222 0.0833 0 0.1667 0 C 0.25 0 0.25 -0.2222 0.1667 -0.2222 C 0.0833 -0.2222 0.0833 0 0 0"
95168
+ },
95169
+ {
95170
+ id: "spiral",
95171
+ family: "loops",
95172
+ path: "M 0 0 C 0.0417 0 0.0417 -0.0741 0 -0.0741 C -0.0625 -0.0741 -0.0625 -0.1852 0 -0.1852 C 0.0833 -0.1852 0.0833 -0.3333 0 -0.3333"
95173
+ }
95174
+ ];
95175
+ var MOTION_PATH_FAMILIES = [
95176
+ "lines",
95177
+ "arcs",
95178
+ "turns",
95179
+ "shapes",
95180
+ "loops"
95181
+ ];
95182
+ function motionPathFamilyLabelKey(family) {
95183
+ return `pptx.animation.motionPath.family.${family}`;
95184
+ }
95185
+ function motionPathPresetLabelKey(presetId) {
95186
+ return `pptx.animation.motionPath.preset.${presetId}`;
95187
+ }
95188
+ function motionPathPresetById(presetId) {
95189
+ return MOTION_PATH_PRESETS2.find((preset) => preset.id === presetId);
95190
+ }
95191
+ function motionPathPresetsByFamily(family) {
95192
+ return MOTION_PATH_PRESETS2.filter((preset) => preset.family === family);
95193
+ }
95194
+ function motionPathPresetIdForPath(path) {
95195
+ if (!path) {
95196
+ return void 0;
95197
+ }
95198
+ const normalized = path.trim().replace(/\s+/gu, " ");
95199
+ return MOTION_PATH_PRESETS2.find(
95200
+ (preset) => preset.path.trim().replace(/\s+/gu, " ") === normalized
95201
+ )?.id;
95202
+ }
95203
+ var DEFAULT_MOTION_PATH_PRESET_ID = "lineRight";
95204
+ var DEFAULT_MOTION_PATH_DURATION_MS = 2e3;
95205
+ var DEFAULT_TRIGGER2 = "onClick";
95206
+ function motionPathFor(animations, elementId) {
95207
+ return animations.find((animation) => animation.elementId === elementId)?.motionPath;
95208
+ }
95209
+ function setMotionPath(animations, elementId, path) {
95210
+ const index = animations.findIndex((animation) => animation.elementId === elementId);
95211
+ if (index >= 0) {
95212
+ return animations.map(
95213
+ (animation, i) => i === index ? {
95214
+ ...animation,
95215
+ motionPath: path,
95216
+ motionPathEditMode: animation.motionPathEditMode ?? "relative",
95217
+ durationMs: animation.durationMs ?? DEFAULT_MOTION_PATH_DURATION_MS
95218
+ } : animation
95219
+ );
95220
+ }
95221
+ return [
95222
+ ...animations,
95223
+ {
95224
+ elementId,
95225
+ motionPath: path,
95226
+ motionPathEditMode: "relative",
95227
+ durationMs: DEFAULT_MOTION_PATH_DURATION_MS,
95228
+ order: animations.length,
95229
+ trigger: DEFAULT_TRIGGER2
95230
+ }
95231
+ ];
95232
+ }
95233
+ function applyMotionPathPreset(animations, elementId, presetId) {
95234
+ const preset = motionPathPresetById(presetId);
95235
+ if (!preset) {
95236
+ return [...animations];
95237
+ }
95238
+ return setMotionPath(animations, elementId, preset.path);
95239
+ }
95240
+ function clearMotionPath(animations, elementId) {
95241
+ const index = animations.findIndex((animation) => animation.elementId === elementId);
95242
+ if (index < 0) {
95243
+ return [...animations];
95244
+ }
95245
+ const current = animations[index];
95246
+ const stillHasEffect = Boolean(current.entrance || current.emphasis || current.exit);
95247
+ if (!stillHasEffect) {
95248
+ return animations.filter((animation) => animation.elementId !== elementId).map((animation, i) => ({ ...animation, order: i }));
95249
+ }
95250
+ return animations.map(
95251
+ (animation, i) => i === index ? {
95252
+ ...animation,
95253
+ motionPath: void 0,
95254
+ motionPathEditMode: void 0,
95255
+ motionPtsTypes: void 0
95256
+ } : animation
95257
+ );
95258
+ }
95259
+ function motionPathNativeAnimations(slide) {
95260
+ const native = slide.nativeAnimations ?? [];
95261
+ const alreadyNative = new Set(
95262
+ native.filter((animation) => animation.motionPath).map((animation) => animation.targetId)
95263
+ );
95264
+ return (slide.animations ?? []).filter((animation) => Boolean(animation.motionPath) && !alreadyNative.has(animation.elementId)).map((animation) => ({
95265
+ targetId: animation.elementId,
95266
+ trigger: animation.trigger ?? DEFAULT_TRIGGER2,
95267
+ triggerShapeId: animation.triggerShapeId,
95268
+ presetClass: "path",
95269
+ durationMs: animation.durationMs ?? DEFAULT_MOTION_PATH_DURATION_MS,
95270
+ delayMs: animation.delayMs ?? 0,
95271
+ motionPath: animation.motionPath,
95272
+ motionPathEditMode: animation.motionPathEditMode ?? "relative"
95273
+ }));
95274
+ }
95275
+ function buildMotionPathPreview(args) {
95276
+ const keyframeName = `pptx-motion-preview-${args.uid ?? 0}`;
95277
+ const keyframes = buildMotionPathKeyframes({
95278
+ path: args.path,
95279
+ slideWidth: args.slideWidth,
95280
+ slideHeight: args.slideHeight,
95281
+ keyframeName
95282
+ });
95283
+ if (!keyframes) {
95284
+ return void 0;
95285
+ }
95286
+ const durationMs = args.durationMs ?? DEFAULT_MOTION_PATH_DURATION_MS;
95287
+ const delayMs = args.delayMs ?? 0;
95288
+ const easing = timingCurveToCss(args.timingCurve);
95289
+ return {
95290
+ keyframeName,
95291
+ keyframesCss: keyframes.css,
95292
+ cssAnimation: `${keyframeName} ${durationMs}ms ${easing} ${delayMs}ms 1 normal both`,
95293
+ durationMs
95294
+ };
95295
+ }
94819
95296
  function buildSegmentCounts(slide, nativeAnims) {
94820
95297
  const segmentCounts = /* @__PURE__ */ new Map();
94821
95298
  for (const anim of nativeAnims) {
@@ -94848,7 +95325,7 @@ var PresentationAnimationController = class _PresentationAnimationController {
94848
95325
  * id list (base element ids + text-build sub-element ids) to track.
94849
95326
  */
94850
95327
  static fromSlide(slide) {
94851
- const nativeAnims = slide.nativeAnimations ?? [];
95328
+ const nativeAnims = [...slide.nativeAnimations ?? [], ...motionPathNativeAnimations(slide)];
94852
95329
  const segmentCounts = buildSegmentCounts(slide, nativeAnims);
94853
95330
  const expandedAnims = segmentCounts.size > 0 ? expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
94854
95331
  const engine = TimelineEngine.fromAnimations(expandedAnims);
@@ -94969,79 +95446,75 @@ var PresentationAnimationController = class _PresentationAnimationController {
94969
95446
  return ids;
94970
95447
  }
94971
95448
  };
94972
- var PRESET_TO_EFFECT = {
94973
- fadeIn: "fadeIn",
94974
- flyIn: "flyInBottom",
94975
- zoomIn: "zoomIn",
94976
- fadeOut: "fadeOut",
94977
- flyOut: "flyOutBottom",
94978
- zoomOut: "zoomOut",
94979
- spin: "spin",
94980
- pulse: "pulse",
94981
- colorWave: "colorWave",
94982
- bounce: "bounce",
94983
- flash: "flash"
94984
- };
94985
- var DIRECTION_FLY_MAP = {
94986
- fromLeft: { flyIn: "flyInLeft", flyOut: "flyOutLeft" },
94987
- fromRight: { flyIn: "flyInRight", flyOut: "flyOutRight" },
94988
- fromTop: { flyIn: "flyInTop", flyOut: "flyOutTop" },
94989
- fromBottom: { flyIn: "flyInBottom", flyOut: "flyOutBottom" },
94990
- fromTopLeft: { flyIn: "flyInTop", flyOut: "flyOutTop" },
94991
- fromTopRight: { flyIn: "flyInTop", flyOut: "flyOutTop" },
94992
- fromBottomLeft: { flyIn: "flyInBottom", flyOut: "flyOutBottom" },
94993
- fromBottomRight: { flyIn: "flyInBottom", flyOut: "flyOutBottom" }
94994
- };
94995
- function resolvePreviewEffect(preset, direction) {
94996
- if ((preset === "flyIn" || preset === "flyOut") && direction) {
94997
- const dirMap = DIRECTION_FLY_MAP[direction];
94998
- if (dirMap) {
94999
- return preset === "flyIn" ? dirMap.flyIn : dirMap.flyOut;
95000
- }
95001
- }
95002
- return PRESET_TO_EFFECT[preset];
95003
- }
95004
- function timingCurveToCss(curve, cubicBezierValues) {
95005
- if (cubicBezierValues) {
95006
- const parts = cubicBezierValues.split(",").map((s) => s.trim());
95007
- if (parts.length === 4 && parts.every((p) => !Number.isNaN(Number(p)))) {
95008
- return `cubic-bezier(${parts.join(", ")})`;
95449
+ function applyMediaCommandVerb(el, parsed) {
95450
+ const safePlay = () => {
95451
+ void el.play().catch(() => {
95452
+ });
95453
+ };
95454
+ const safeSeek = (seconds) => {
95455
+ try {
95456
+ el.currentTime = seconds;
95457
+ } catch {
95009
95458
  }
95010
- }
95011
- switch (curve) {
95012
- case "ease":
95013
- return "ease";
95014
- case "ease-in":
95015
- return "ease-in";
95016
- case "ease-out":
95017
- return "ease-out";
95018
- case "linear":
95019
- return "linear";
95459
+ };
95460
+ switch (parsed.verb) {
95461
+ case "playFrom":
95462
+ safeSeek(parsed.seekSeconds ?? 0);
95463
+ safePlay();
95464
+ return true;
95465
+ case "play":
95466
+ safePlay();
95467
+ return true;
95468
+ case "pause":
95469
+ el.pause();
95470
+ return true;
95471
+ case "stop":
95472
+ el.pause();
95473
+ safeSeek(0);
95474
+ return true;
95475
+ case "togglePlay":
95476
+ if (el.paused) {
95477
+ safePlay();
95478
+ } else {
95479
+ el.pause();
95480
+ }
95481
+ return true;
95020
95482
  default:
95021
- return "ease";
95483
+ return false;
95022
95484
  }
95023
95485
  }
95024
- function buildPreviewAnimation(preset, options) {
95025
- if (preset === "none") {
95486
+ function findMediaElementByElementId(targetId, root) {
95487
+ if (typeof HTMLMediaElement === "undefined") {
95026
95488
  return void 0;
95027
95489
  }
95028
- const effectName = resolvePreviewEffect(preset, options?.direction);
95029
- if (!effectName) {
95490
+ const scope = root ?? (typeof document === "undefined" ? null : document);
95491
+ if (!scope) {
95030
95492
  return void 0;
95031
95493
  }
95032
- const keyframeName = `pptx-${effectName}`;
95033
- const keyframesCss = getEffectKeyframes(effectName);
95034
- if (!keyframesCss) {
95035
- return void 0;
95494
+ for (const wrapper of scope.querySelectorAll("[data-element-id]")) {
95495
+ if (wrapper.dataset["elementId"] !== targetId) {
95496
+ continue;
95497
+ }
95498
+ if (wrapper instanceof HTMLMediaElement) {
95499
+ return wrapper;
95500
+ }
95501
+ const media = wrapper.querySelector("video, audio");
95502
+ if (media instanceof HTMLMediaElement) {
95503
+ return media;
95504
+ }
95036
95505
  }
95037
- const duration = options?.durationMs ?? 600;
95038
- const easing = timingCurveToCss(options?.timingCurve, options?.cubicBezier);
95039
- return {
95040
- keyframeName,
95041
- keyframesCss,
95042
- cssAnimation: `${keyframeName} ${duration}ms ${easing} 0ms 1 normal both`,
95043
- durationMs: duration
95044
- };
95506
+ return void 0;
95507
+ }
95508
+ function runMediaCommand(command, resolve) {
95509
+ const el = resolve(command.targetId);
95510
+ if (!el) {
95511
+ return false;
95512
+ }
95513
+ const parsed = parseMediaCommand(command.command);
95514
+ if (!parsed) {
95515
+ return false;
95516
+ }
95517
+ return applyMediaCommandVerb(el, parsed);
95045
95518
  }
95046
95519
  var CAMERA_PRESET_MAP = {
95047
95520
  orthographicFront: { rotateX: 0, rotateY: 0, rotateZ: 0 },
@@ -96504,6 +96977,110 @@ function deleteTableColumn(tableData, colIdx) {
96504
96977
  const newWidths = normalizeWidths(tableData.columnWidths.filter((_, i) => i !== colIdx));
96505
96978
  return { ...tableData, rows: newRows, columnWidths: newWidths };
96506
96979
  }
96980
+ function setCellText(element, rowIndex, colIndex, text2) {
96981
+ const tableData = element.tableData;
96982
+ if (!tableData) {
96983
+ return element;
96984
+ }
96985
+ const rows = tableData.rows.map((row, ri) => {
96986
+ if (ri !== rowIndex) {
96987
+ return row;
96988
+ }
96989
+ return {
96990
+ ...row,
96991
+ cells: row.cells.map((cell, ci) => ci === colIndex ? { ...cell, text: text2 } : cell)
96992
+ };
96993
+ });
96994
+ return { ...element, tableData: { ...tableData, rows } };
96995
+ }
96996
+ function buildTableDataGrid(element) {
96997
+ const tableData = element.tableData;
96998
+ const sourceRows = tableData?.rows ?? [];
96999
+ const colCount = tableData?.columnWidths.length ?? 0;
97000
+ const colIndices = Array.from({ length: colCount }, (_unused, index) => index);
97001
+ const rows = sourceRows.map((row, rowIndex) => ({
97002
+ rowIndex,
97003
+ cells: colIndices.map((colIndex) => ({
97004
+ rowIndex,
97005
+ colIndex,
97006
+ text: row.cells[colIndex]?.text ?? ""
97007
+ }))
97008
+ }));
97009
+ return {
97010
+ rowCount: sourceRows.length,
97011
+ colCount,
97012
+ colIndices,
97013
+ rows,
97014
+ canRemoveRow: sourceRows.length > 1,
97015
+ canRemoveColumn: colCount > 1
97016
+ };
97017
+ }
97018
+ function withTableData(element, transform) {
97019
+ const tableData = element.tableData;
97020
+ if (!tableData) {
97021
+ return element;
97022
+ }
97023
+ const next = transform(tableData);
97024
+ if (next === tableData) {
97025
+ return element;
97026
+ }
97027
+ const updated = { ...element, tableData: next };
97028
+ if (element.rawXml) {
97029
+ const rawXml = rebuildTableStructureInRawXml(element, next);
97030
+ if (rawXml) {
97031
+ updated.rawXml = rawXml;
97032
+ }
97033
+ }
97034
+ return updated;
97035
+ }
97036
+ function setTableElementCellText(element, rowIndex, colIndex, text2) {
97037
+ const updated = setCellText(element, rowIndex, colIndex, text2);
97038
+ if (updated === element || !element.rawXml) {
97039
+ return updated;
97040
+ }
97041
+ const rawXml = updateCellTextInRawXml(element, rowIndex, colIndex, text2);
97042
+ return rawXml ? { ...updated, rawXml } : updated;
97043
+ }
97044
+ function insertTableElementRow(element, rowIdx, position2) {
97045
+ return withTableData(element, (data) => insertTableRow(data, rowIdx, position2));
97046
+ }
97047
+ function removeTableElementRow(element, rowIdx) {
97048
+ return withTableData(element, (data) => deleteTableRow(data, rowIdx));
97049
+ }
97050
+ function insertTableElementColumn(element, colIdx, position2) {
97051
+ return withTableData(element, (data) => insertTableColumn(data, colIdx, position2));
97052
+ }
97053
+ function removeTableElementColumn(element, colIdx) {
97054
+ return withTableData(element, (data) => deleteTableColumn(data, colIdx));
97055
+ }
97056
+ function appendTableElementRow(element) {
97057
+ const rowCount = element.tableData?.rows.length ?? 0;
97058
+ if (rowCount === 0) {
97059
+ return element;
97060
+ }
97061
+ return insertTableElementRow(element, rowCount - 1, "below");
97062
+ }
97063
+ function removeLastTableElementRow(element) {
97064
+ const rowCount = element.tableData?.rows.length ?? 0;
97065
+ if (rowCount === 0) {
97066
+ return element;
97067
+ }
97068
+ return removeTableElementRow(element, rowCount - 1);
97069
+ }
97070
+ function appendTableElementColumn(element) {
97071
+ const colCount = element.tableData?.columnWidths.length ?? 0;
97072
+ if (colCount === 0) {
97073
+ return element;
97074
+ }
97075
+ return insertTableElementColumn(element, colCount - 1, "right");
97076
+ }
97077
+ function removeLastTableElementColumn(element) {
97078
+ const colCount = element.tableData?.columnWidths.length ?? 0;
97079
+ if (colCount === 0) {
97080
+ return element;
97081
+ }
97082
+ return removeTableElementColumn(element, colCount - 1);
97083
+ }
96507
97084
  function computeMergeCellRight(td, rowIndex, columnIndex) {
96508
97085
  const row = td.rows[rowIndex];
96509
97086
  if (!row) {
@@ -97977,14 +98554,43 @@ function computeAutoFitTextStyle(input) {
97977
98554
  }
97978
98555
  return result;
97979
98556
  }
98557
+ var MAX_GROUP_DEPTH2 = 64;
97980
98558
  function isLinkedTextBox(element) {
97981
98559
  return hasTextProperties(element) && element.linkedTxbxId !== void 0;
97982
98560
  }
98561
+ function flattenForChainResolution(elements) {
98562
+ if (!elements.some((el) => el.type === "group")) {
98563
+ return elements;
98564
+ }
98565
+ const flat = [];
98566
+ const seen = /* @__PURE__ */ new Set();
98567
+ const walk2 = (list, depth) => {
98568
+ for (const el of list) {
98569
+ if (el.type !== "group") {
98570
+ flat.push(el);
98571
+ continue;
98572
+ }
98573
+ if (seen.has(el)) {
98574
+ continue;
98575
+ }
98576
+ seen.add(el);
98577
+ flat.push(el);
98578
+ if (depth < MAX_GROUP_DEPTH2) {
98579
+ walk2(el.children ?? [], depth + 1);
98580
+ }
98581
+ }
98582
+ };
98583
+ walk2(elements, 0);
98584
+ return flat;
98585
+ }
97983
98586
  function getOverflowSegments(element, slideElements) {
97984
98587
  if (!slideElements || slideElements.length === 0) {
97985
98588
  return void 0;
97986
98589
  }
97987
- return getLinkedTextBoxSegments(element, slideElements);
98590
+ if (!isLinkedTextBox(element)) {
98591
+ return void 0;
98592
+ }
98593
+ return getLinkedTextBoxSegments(element, flattenForChainResolution(slideElements));
97988
98594
  }
97989
98595
  function resolveParagraphRtl(paraSegments, elementRtl) {
97990
98596
  for (const entry2 of paraSegments) {
@@ -98764,21 +99370,6 @@ function buildTextRunFilterChain(style) {
98764
99370
  }
98765
99371
  return parts.length > 0 ? parts.join(" ") : void 0;
98766
99372
  }
98767
- function purifyFn() {
98768
- const purify = DOMPurify;
98769
- return typeof purify.sanitize === "function" ? purify.sanitize : void 0;
98770
- }
98771
- function sanitizeMarkupOrEmpty(markup, config) {
98772
- const sanitize = purifyFn();
98773
- return sanitize ? sanitize(markup, config) : "";
98774
- }
98775
- function sanitizeMathMl(markup) {
98776
- const sanitized = sanitizeMarkupOrEmpty(markup, { USE_PROFILES: { mathMl: true, svg: true } });
98777
- if (/<math(?:\s|>)/iu.test(markup) && !/<math(?:\s|>)/iu.test(sanitized) && sanitized) {
98778
- return `<math xmlns="http://www.w3.org/1998/Math/MathML" display="inline">${sanitized}</math>`;
98779
- }
98780
- return sanitized;
98781
- }
98782
99373
  function resolveParagraphStrutFontSize(segments, bodyFontSize) {
98783
99374
  let largest;
98784
99375
  for (const segment of segments) {
@@ -106893,6 +107484,488 @@ function mapPresentationKey(input, buffer = createPresentationKeyBuffer()) {
106893
107484
  }
106894
107485
  return { action: "none" };
106895
107486
  }
107487
+ var READING_VIEW_ATTR = "data-pptx-reading-view";
107488
+ var READING_VIEW_COUNTER_ATTR = "data-pptx-reading-view-counter";
107489
+ var READING_VIEW_STAGE_ATTR = "data-pptx-reading-view-stage";
107490
+ var CLOSED_READING_VIEW = { open: false, slideIndex: 0 };
107491
+ function openReadingView(slideIndex, slideCount) {
107492
+ return { open: true, slideIndex: clampIndex(slideIndex, slideCount) };
107493
+ }
107494
+ function mapReadingViewKey(input, buffer) {
107495
+ const mapped = mapPresentationKey(input, buffer);
107496
+ switch (mapped.action) {
107497
+ case "next":
107498
+ return { command: "next" };
107499
+ case "previous":
107500
+ return { command: "previous" };
107501
+ case "first":
107502
+ return { command: "first" };
107503
+ case "last":
107504
+ return { command: "last" };
107505
+ case "goto":
107506
+ return { command: "goto", slideIndex: mapped.slideNumber - 1 };
107507
+ case "end":
107508
+ return { command: "exit" };
107509
+ default:
107510
+ return { command: "none" };
107511
+ }
107512
+ }
107513
+ function handleReadingViewKey(input, buffer) {
107514
+ const command = mapReadingViewKey(input, buffer);
107515
+ if (command.command !== "none") {
107516
+ return { command, swallow: true, preventDefault: true };
107517
+ }
107518
+ const isChord = Boolean(input.ctrlKey || input.metaKey || input.altKey);
107519
+ return { command, swallow: !isChord, preventDefault: false };
107520
+ }
107521
+ function applyReadingViewCommand(state, command, slideCount) {
107522
+ if (!state.open || slideCount <= 0) {
107523
+ return state.open ? CLOSED_READING_VIEW : state;
107524
+ }
107525
+ const last = slideCount - 1;
107526
+ switch (command.command) {
107527
+ case "next":
107528
+ return state.slideIndex >= last ? CLOSED_READING_VIEW : { open: true, slideIndex: state.slideIndex + 1 };
107529
+ case "previous":
107530
+ return { open: true, slideIndex: Math.max(0, state.slideIndex - 1) };
107531
+ case "first":
107532
+ return { open: true, slideIndex: 0 };
107533
+ case "last":
107534
+ return { open: true, slideIndex: last };
107535
+ case "goto":
107536
+ return { open: true, slideIndex: clampIndex(command.slideIndex, slideCount) };
107537
+ case "exit":
107538
+ return CLOSED_READING_VIEW;
107539
+ default:
107540
+ return state;
107541
+ }
107542
+ }
107543
+ function canGoPrevious(state) {
107544
+ return state.open && state.slideIndex > 0;
107545
+ }
107546
+ function canGoNext(state, slideCount) {
107547
+ return state.open && slideCount > 0;
107548
+ }
107549
+ function readingViewFitScale(canvas, viewport, padding = 0) {
107550
+ const available = {
107551
+ width: viewport.width - padding * 2,
107552
+ height: viewport.height - padding * 2
107553
+ };
107554
+ if (canvas.width <= 0 || canvas.height <= 0 || available.width <= 0 || available.height <= 0) {
107555
+ return 0;
107556
+ }
107557
+ return Math.min(available.width / canvas.width, available.height / canvas.height);
107558
+ }
107559
+ function clampIndex(index, slideCount) {
107560
+ if (!Number.isFinite(index) || slideCount <= 0) {
107561
+ return 0;
107562
+ }
107563
+ return Math.min(Math.max(Math.trunc(index), 0), slideCount - 1);
107564
+ }
107565
+ var OUTLINE_VIEW_ATTR = "data-pptx-outline-view";
107566
+ var OUTLINE_ROW_ATTR = "data-pptx-outline-row";
107567
+ var OUTLINE_SLIDE_ATTR = "data-pptx-outline-slide";
107568
+ var OUTLINE_LEVEL_ATTR = "data-pptx-outline-level";
107569
+ var MAX_PARAGRAPH_LEVEL = 8;
107570
+ var TITLE_PH_TYPES = /* @__PURE__ */ new Set(["title", "ctrtitle"]);
107571
+ var CHROME_PH_TYPES = /* @__PURE__ */ new Set(["ftr", "hdr", "dt", "sldnum"]);
107572
+ var OUTLINE_TITLE_ELEMENT_NAME = "Title";
107573
+ function placeholderType(element) {
107574
+ const ph = element.rawXml?.["p:nvSpPr"]?.["p:nvPr"]?.["p:ph"];
107575
+ if (!ph) {
107576
+ return void 0;
107577
+ }
107578
+ const type = typeof ph["@_type"] === "string" ? ph["@_type"].trim().toLowerCase() : "";
107579
+ return type.length > 0 ? type : "body";
107580
+ }
107581
+ function isTextBearing(element) {
107582
+ return hasTextProperties(element);
107583
+ }
107584
+ function elementHasText(element) {
107585
+ if (!hasTextProperties(element)) {
107586
+ return false;
107587
+ }
107588
+ if (typeof element.text === "string" && element.text.trim().length > 0) {
107589
+ return true;
107590
+ }
107591
+ return (element.textSegments ?? []).some((segment) => segment.text.trim().length > 0);
107592
+ }
107593
+ function resolveSlideOutlineElements(slide) {
107594
+ const elements = (slide.elements ?? []).filter(isTextBearing);
107595
+ const placeholderTitle = elements.find((element) => {
107596
+ const type = placeholderType(element);
107597
+ return type !== void 0 && TITLE_PH_TYPES.has(type);
107598
+ });
107599
+ const placeholderBody = elements.filter((element) => {
107600
+ const type = placeholderType(element);
107601
+ return type !== void 0 && !TITLE_PH_TYPES.has(type) && !CHROME_PH_TYPES.has(type);
107602
+ });
107603
+ if (placeholderTitle || placeholderBody.length > 0) {
107604
+ return { title: placeholderTitle ?? null, body: placeholderBody };
107605
+ }
107606
+ const named = elements.find(
107607
+ (element) => (element.name ?? "").trim().toLowerCase() === OUTLINE_TITLE_ELEMENT_NAME.toLowerCase()
107608
+ );
107609
+ const withText = elements.filter(elementHasText);
107610
+ const title = named ?? withText[0] ?? null;
107611
+ return { title, body: withText.filter((element) => element !== title) };
107612
+ }
107613
+ function isBulletMarker(segment) {
107614
+ const bullet = segment.bulletInfo;
107615
+ if (!bullet) {
107616
+ return false;
107617
+ }
107618
+ const marker = bullet.char ? `${bullet.char} ` : bullet.imageRelId || bullet.imageDataUrl ? "\u{1F4CE} " : bullet.autoNumType ? void 0 : "\u2022 ";
107619
+ return marker ? segment.text === marker : bullet.paragraphIndex !== void 0;
107620
+ }
107621
+ function isParagraphSeparator(segment) {
107622
+ return Boolean(segment.isParagraphBreak) || segment.text === "\n" && !segment.isLineBreak;
107623
+ }
107624
+ function groupElementParagraphs(element) {
107625
+ const withText = hasTextProperties(element) ? element : void 0;
107626
+ const segments = withText?.textSegments;
107627
+ if (!segments || segments.length === 0) {
107628
+ const style = { ...withText?.textStyle ?? {} };
107629
+ return (withText?.text ?? "").split("\n").map((text2) => ({
107630
+ content: [{ text: text2, style: { ...style } }]
107631
+ }));
107632
+ }
107633
+ const groups = [{ content: [] }];
107634
+ for (const segment of segments) {
107635
+ if (isParagraphSeparator(segment)) {
107636
+ groups.push({ content: [] });
107637
+ continue;
107638
+ }
107639
+ const current = groups[groups.length - 1];
107640
+ if (current.content.length === 0 && current.marker === void 0 && isBulletMarker(segment)) {
107641
+ current.marker = segment;
107642
+ continue;
107643
+ }
107644
+ current.content.push(segment);
107645
+ }
107646
+ return groups;
107647
+ }
107648
+ function paragraphGroupText(group) {
107649
+ return group.content.map((segment) => segment.isLineBreak ? " " : segment.text).join("");
107650
+ }
107651
+ function paragraphGroupLevel(group) {
107652
+ const first = group.marker ?? group.content[0];
107653
+ const level = first?.paragraphLevel;
107654
+ return typeof level === "number" && level > 0 ? Math.min(level, MAX_PARAGRAPH_LEVEL) : 0;
107655
+ }
107656
+ function readElementParagraphs(element) {
107657
+ const groups = groupElementParagraphs(element);
107658
+ const paragraphs = groups.map((group) => ({
107659
+ text: paragraphGroupText(group),
107660
+ level: paragraphGroupLevel(group)
107661
+ }));
107662
+ let last = paragraphs.length - 1;
107663
+ while (last >= 0 && paragraphs[last].text.length === 0) {
107664
+ last -= 1;
107665
+ }
107666
+ return paragraphs.slice(0, last + 1);
107667
+ }
107668
+ function outlineRowKey(slideId, elementId, paragraphIndex) {
107669
+ return `${slideId}|${elementId ?? "\0new-title"}|${paragraphIndex}`;
107670
+ }
107671
+ function pushElementRows(rows, element, kind, slide, slideIndex) {
107672
+ for (const [paragraphIndex, paragraph] of readElementParagraphs(element).entries()) {
107673
+ rows.push({
107674
+ key: outlineRowKey(slide.id, element.id, paragraphIndex),
107675
+ slideIndex,
107676
+ slideId: slide.id,
107677
+ kind,
107678
+ elementId: element.id,
107679
+ paragraphIndex,
107680
+ // A title always sits in the leftmost column; body text is pushed one
107681
+ // column right of it, so authored level 0 reads as outline level 1.
107682
+ level: kind === "title" ? 0 : paragraph.level + 1,
107683
+ text: paragraph.text
107684
+ });
107685
+ }
107686
+ }
107687
+ function buildOutline(slides) {
107688
+ const rows = [];
107689
+ for (const [slideIndex, slide] of slides.entries()) {
107690
+ const { title, body } = resolveSlideOutlineElements(slide);
107691
+ const before = rows.length;
107692
+ if (title) {
107693
+ pushElementRows(rows, title, "title", slide, slideIndex);
107694
+ }
107695
+ if (rows.length === before) {
107696
+ rows.push({
107697
+ key: outlineRowKey(slide.id, title?.id ?? null, 0),
107698
+ slideIndex,
107699
+ slideId: slide.id,
107700
+ kind: "title",
107701
+ elementId: title?.id ?? null,
107702
+ paragraphIndex: 0,
107703
+ level: 0,
107704
+ text: ""
107705
+ });
107706
+ }
107707
+ for (const element of body) {
107708
+ pushElementRows(rows, element, "body", slide, slideIndex);
107709
+ }
107710
+ }
107711
+ return rows;
107712
+ }
107713
+ function findOutlineRow(rows, key) {
107714
+ return rows.find((row) => row.key === key);
107715
+ }
107716
+ var PASTE_OFFSET_PX = 20;
107717
+ function generateElementId() {
107718
+ return `el-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
107719
+ }
107720
+ function makeCloneId(intoTemplate, sourceId) {
107721
+ if (!intoTemplate) {
107722
+ return generateElementId();
107723
+ }
107724
+ if (sourceId.startsWith("master-")) {
107725
+ return `master-${generateElementId()}`;
107726
+ }
107727
+ return `layout-${generateElementId()}`;
107728
+ }
107729
+ function buildElementClipboardPayload(element, isTemplate) {
107730
+ return { element: structuredClone(element), isTemplate };
107731
+ }
107732
+ function cloneElementForPaste(element, options = {}) {
107733
+ const clone3 = structuredClone(element);
107734
+ clone3.id = makeCloneId(options.intoTemplate ?? false, element.id);
107735
+ clone3.x += options.offsetX ?? PASTE_OFFSET_PX;
107736
+ clone3.y += options.offsetY ?? PASTE_OFFSET_PX;
107737
+ return clone3;
107738
+ }
107739
+ function mapOutlineKey(input, rowKey) {
107740
+ const none = { edit: null, preventDefault: false };
107741
+ if (input.ctrlKey || input.metaKey) {
107742
+ return none;
107743
+ }
107744
+ if (input.key === "Tab" && !input.altKey) {
107745
+ return {
107746
+ edit: { type: "indent", key: rowKey, delta: input.shiftKey ? -1 : 1 },
107747
+ preventDefault: true
107748
+ };
107749
+ }
107750
+ if (input.altKey && input.shiftKey && (input.key === "ArrowRight" || input.key === "ArrowLeft")) {
107751
+ return {
107752
+ edit: { type: "indent", key: rowKey, delta: input.key === "ArrowRight" ? 1 : -1 },
107753
+ preventDefault: true
107754
+ };
107755
+ }
107756
+ if (input.key === "Enter" && !input.shiftKey && !input.altKey) {
107757
+ return { edit: { type: "insertAfter", key: rowKey }, preventDefault: true };
107758
+ }
107759
+ return none;
107760
+ }
107761
+ function withLevel(segments, level) {
107762
+ return segments.map((segment, index) => {
107763
+ if (index > 0) {
107764
+ return segment;
107765
+ }
107766
+ const next = { ...segment };
107767
+ if (level > 0) {
107768
+ next.paragraphLevel = Math.min(level, MAX_PARAGRAPH_LEVEL);
107769
+ } else {
107770
+ delete next.paragraphLevel;
107771
+ }
107772
+ return next;
107773
+ });
107774
+ }
107775
+ function rebuildParagraph(group, donor, text2, elementStyle) {
107776
+ if (group && paragraphGroupText(group) === text2) {
107777
+ return [...group.marker ? [group.marker] : [], ...group.content];
107778
+ }
107779
+ const source = group ?? donor;
107780
+ const marker = source?.marker ? [source.marker] : [];
107781
+ const content = remapTextToSegments(text2, source?.content, elementStyle);
107782
+ return [...marker, ...content];
107783
+ }
107784
+ function writeElementParagraphs(element, paragraphs) {
107785
+ const groups = groupElementParagraphs(element);
107786
+ const donor = groups[groups.length - 1];
107787
+ const style = hasTextProperties(element) ? element.textStyle : void 0;
107788
+ const segments = [];
107789
+ for (const [index, paragraph] of paragraphs.entries()) {
107790
+ if (index > 0) {
107791
+ const previous = segments[segments.length - 1];
107792
+ segments.push({
107793
+ text: "\n",
107794
+ style: { ...previous?.style ?? style ?? {} },
107795
+ isParagraphBreak: true
107796
+ });
107797
+ }
107798
+ segments.push(
107799
+ ...withLevel(rebuildParagraph(groups[index], donor, paragraph.text, style), paragraph.level)
107800
+ );
107801
+ }
107802
+ return {
107803
+ ...element,
107804
+ text: paragraphs.map((paragraph) => paragraph.text).join("\n"),
107805
+ textSegments: segments
107806
+ };
107807
+ }
107808
+ var DEFAULT_CANVAS = { width: 960, height: 540 };
107809
+ function createTitleElement(text2, options) {
107810
+ const canvas = options.canvas ?? DEFAULT_CANVAS;
107811
+ return {
107812
+ type: "text",
107813
+ id: options.idGenerator ? options.idGenerator() : generateElementId(),
107814
+ name: OUTLINE_TITLE_ELEMENT_NAME,
107815
+ x: Math.round(canvas.width * 0.06),
107816
+ y: Math.round(canvas.height * 0.08),
107817
+ width: Math.round(canvas.width * 0.88),
107818
+ height: Math.round(canvas.height * 0.17),
107819
+ text: text2,
107820
+ textStyle: { fontSize: 36, bold: true },
107821
+ textSegments: [{ text: text2, style: { fontSize: 36, bold: true } }]
107822
+ };
107823
+ }
107824
+ function renumber(slides) {
107825
+ return slides.map((slide, index) => ({ ...slide, slideNumber: index + 1 }));
107826
+ }
107827
+ function unchanged(slides, row) {
107828
+ return {
107829
+ slides,
107830
+ changed: false,
107831
+ focusKey: row?.key ?? null,
107832
+ activeSlideIndex: row?.slideIndex ?? 0
107833
+ };
107834
+ }
107835
+ function replaceElement(slides, slideIndex, elementId, next) {
107836
+ return slides.map(
107837
+ (slide, index) => index === slideIndex ? {
107838
+ ...slide,
107839
+ elements: (slide.elements ?? []).map(
107840
+ (element) => element.id === elementId ? next : element
107841
+ )
107842
+ } : slide
107843
+ );
107844
+ }
107845
+ function editParagraphs(slides, row, mutate) {
107846
+ const slide = slides[row.slideIndex];
107847
+ const element = (slide?.elements ?? []).find((candidate) => candidate.id === row.elementId);
107848
+ if (!element) {
107849
+ return null;
107850
+ }
107851
+ const paragraphs = readElementParagraphs(element);
107852
+ while (paragraphs.length <= row.paragraphIndex) {
107853
+ paragraphs.push({ text: "", level: 0 });
107854
+ }
107855
+ const next = mutate(paragraphs);
107856
+ if (!next) {
107857
+ return null;
107858
+ }
107859
+ return {
107860
+ slides: replaceElement(
107861
+ slides,
107862
+ row.slideIndex,
107863
+ element.id,
107864
+ writeElementParagraphs(element, next)
107865
+ ),
107866
+ changed: true,
107867
+ focusKey: row.key,
107868
+ activeSlideIndex: row.slideIndex
107869
+ };
107870
+ }
107871
+ function oneLine(text2) {
107872
+ return text2.replace(/[\r\n]+/g, " ");
107873
+ }
107874
+ function applySetText(slides, row, raw, options) {
107875
+ const text2 = oneLine(raw);
107876
+ if (row.elementId === null) {
107877
+ if (text2.length === 0) {
107878
+ return unchanged([...slides], row);
107879
+ }
107880
+ const element = createTitleElement(text2, options);
107881
+ const next = slides.map(
107882
+ (slide, index) => index === row.slideIndex ? { ...slide, elements: [element, ...slide.elements ?? []] } : slide
107883
+ );
107884
+ return {
107885
+ slides: next,
107886
+ changed: true,
107887
+ focusKey: outlineRowKey(row.slideId, element.id, 0),
107888
+ activeSlideIndex: row.slideIndex
107889
+ };
107890
+ }
107891
+ const result = editParagraphs(slides, row, (paragraphs) => {
107892
+ if (paragraphs[row.paragraphIndex].text === text2) {
107893
+ return null;
107894
+ }
107895
+ const next = [...paragraphs];
107896
+ next[row.paragraphIndex] = { ...next[row.paragraphIndex], text: text2 };
107897
+ return next;
107898
+ });
107899
+ return result ?? unchanged([...slides], row);
107900
+ }
107901
+ function applyIndent(slides, row, delta) {
107902
+ if (row.kind !== "body" || row.elementId === null || delta === 0) {
107903
+ return unchanged([...slides], row);
107904
+ }
107905
+ const result = editParagraphs(slides, row, (paragraphs) => {
107906
+ const current = paragraphs[row.paragraphIndex];
107907
+ const level = Math.min(Math.max(current.level + (delta > 0 ? 1 : -1), 0), MAX_PARAGRAPH_LEVEL);
107908
+ if (level === current.level) {
107909
+ return null;
107910
+ }
107911
+ const next = [...paragraphs];
107912
+ next[row.paragraphIndex] = { ...current, level };
107913
+ return next;
107914
+ });
107915
+ return result ?? unchanged([...slides], row);
107916
+ }
107917
+ function applyInsertAfter(slides, row, options) {
107918
+ if (row.kind === "title") {
107919
+ const slide = {
107920
+ id: makeSlideId(options.idGenerator),
107921
+ rId: "",
107922
+ slideNumber: row.slideIndex + 2,
107923
+ elements: []
107924
+ };
107925
+ const next = renumber([
107926
+ ...slides.slice(0, row.slideIndex + 1),
107927
+ slide,
107928
+ ...slides.slice(row.slideIndex + 1)
107929
+ ]);
107930
+ return {
107931
+ slides: next,
107932
+ changed: true,
107933
+ focusKey: outlineRowKey(slide.id, null, 0),
107934
+ activeSlideIndex: row.slideIndex + 1
107935
+ };
107936
+ }
107937
+ const result = editParagraphs(slides, row, (paragraphs) => {
107938
+ const next = [...paragraphs];
107939
+ next.splice(row.paragraphIndex + 1, 0, {
107940
+ text: "",
107941
+ level: paragraphs[row.paragraphIndex].level
107942
+ });
107943
+ return next;
107944
+ });
107945
+ if (!result) {
107946
+ return unchanged([...slides], row);
107947
+ }
107948
+ return {
107949
+ ...result,
107950
+ focusKey: outlineRowKey(row.slideId, row.elementId, row.paragraphIndex + 1)
107951
+ };
107952
+ }
107953
+ function applyOutlineEdit(slides, edit, options = {}) {
107954
+ const row = findOutlineRow(buildOutline(slides), edit.key);
107955
+ if (!row) {
107956
+ return unchanged([...slides]);
107957
+ }
107958
+ switch (edit.type) {
107959
+ case "setText":
107960
+ return applySetText(slides, row, edit.text, options);
107961
+ case "indent":
107962
+ return applyIndent(slides, row, edit.delta);
107963
+ case "insertAfter":
107964
+ return applyInsertAfter(slides, row, options);
107965
+ default:
107966
+ return unchanged([...slides], row);
107967
+ }
107968
+ }
106896
107969
  var NUDGE_SMALL = 1;
106897
107970
  var NUDGE_LARGE = 10;
106898
107971
  var GUARD_DEFAULTS = {
@@ -108917,29 +109990,6 @@ var COMMON_FONTS = [
108917
109990
  "Tw Cen MT",
108918
109991
  "Verdana"
108919
109992
  ];
108920
- var PASTE_OFFSET_PX = 20;
108921
- function generateElementId() {
108922
- return `el-${Date.now()}-${Math.random().toString(36).slice(2, 8)}`;
108923
- }
108924
- function makeCloneId(intoTemplate, sourceId) {
108925
- if (!intoTemplate) {
108926
- return generateElementId();
108927
- }
108928
- if (sourceId.startsWith("master-")) {
108929
- return `master-${generateElementId()}`;
108930
- }
108931
- return `layout-${generateElementId()}`;
108932
- }
108933
- function buildElementClipboardPayload(element, isTemplate) {
108934
- return { element: structuredClone(element), isTemplate };
108935
- }
108936
- function cloneElementForPaste(element, options = {}) {
108937
- const clone3 = structuredClone(element);
108938
- clone3.id = makeCloneId(options.intoTemplate ?? false, element.id);
108939
- clone3.x += options.offsetX ?? PASTE_OFFSET_PX;
108940
- clone3.y += options.offsetY ?? PASTE_OFFSET_PX;
108941
- return clone3;
108942
- }
108943
109993
  var DEFAULT_PREVIEW_ELEMENT_CAP = 500;
108944
109994
  function buildPreviewElements(slide, templateElements = [], options) {
108945
109995
  const cap = options?.cap ?? DEFAULT_PREVIEW_ELEMENT_CAP;
@@ -112573,4 +113623,4 @@ function segmentFrameCount(durationMs, fps) {
112573
113623
  * `<p:extLst>` (optional)
112574
113624
  */
112575
113625
 
112576
- export { ACTION_BUTTON_PRESETS, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, COLOR_MAP_ALIAS_KEYS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_INSERT_CHART_TYPE, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, PATTERN_OPTIONS, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_LABELS, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptsPresentationInput, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTagToCollections, alignElements, appendPresentationInkPoint, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFormatToElement, applyPreferenceToOptions, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, availableQuickAccessCommands, backstageCardsFor, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMorphTransitionPlan, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBuildSpec, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canCommitActionType, canvasToJpegData, cell3DBevelCss, chartDataChangeType, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, computeAllNotesPages, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPresentationKeyBuffer, createPresentationSessionId, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demoteSmartArtNode, derivePresenceList, deriveSlideFieldContext, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, encodeGif, endAudienceDisplay, erasePresentationInkAt, evaluatePresetShape, extraQuickAccessCommands, extractPathPoints, filterCommands, filterRenderedElements, findChartPartTarget, findSmartArtNodeText, flattenTagCollections, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGradientTileFlipCss, getGradientTileRectCss, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeFilterId, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, insertTableColumn, insertTableRow, isActionHidden, isBrowserOpenableMime, isCalloutShape, isCellInRect, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementRendered, isExportAbortError, isFirstSlide, isImageLikeElement, isInkElement, isKeyboardOpen, isLastSlide, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isTemplateElement, isTemplateElementId2 as isTemplateElementId, isUrlSafe, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, makeCloneId, makeSlideId, mapEditorKey, mapPresentationKey, mayLeaveSlideShow, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parseMediaCommand, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationInkPath, presenterElapsed, presenterPaneAdvancesOnClick, pressuresToWidths, printPropertiesFrameSlides, printPropertiesSlidesPerPage, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, remapTextToSegments, removeChartCategory, removeChartSeries, removeQuickAccessCommand, removeSmartArtNode, renameSection, reorderSmartArtNode, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveActionType, resolveAudienceScreenPlacement, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveFontForScript, resolveFontRefIdx, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolveParagraphStrutFontSize, resolvePictureBullet, resolveProfileInitial, resolveRegionCode, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, resolveViewerAddinRows, restoreSegmentSelection, revealedSmartArtNodeCount, rulerDragToGuidePosition, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveViewerProfile, scanAvailableFontFamilies, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor2 as seriesColor, setCachedResult, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setPendingSelectionRestore, setSmartArtNodeStyle, shadeColor2, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, storeAudienceContent, substituteFieldText, suppressesCssBorder, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorSchemesEqual, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withFrameSlides, withSlidesPerPage, writeStoredViewerPrefs, zoomInScale, zoomOutScale };
113626
+ export { ACTION_BUTTON_PRESETS, ARTISTIC_EFFECTS, AVATAR_COLOR_SWATCHES, BACKSTAGE_NAV, BACKSTAGE_TEMPLATES, BEVEL_PRESETS, BROADCAST_THROTTLE_MS, CATEGORIES, COLOR_MAP_ALIAS_KEYS, COMMON_FONTS, CONNECTION_TIMEOUT_MS, DEFAULT_BROADCAST_SERVER_URL, DEFAULT_COLOR_CHANGE_TOLERANCE, DEFAULT_COLOR_MAP, DEFAULT_INSERT_CHART_TYPE, DEFAULT_MOTION_PATH_PRESET_ID, DEFAULT_QUICK_ACCESS_COMMAND_IDS, DEFAULT_ROW_HEIGHT, DEFAULT_VIEWER_OPTIONS, DEFAULT_VIEWER_PROFILE, DEFAULT_VIRTUAL_OVERSCAN, DIRECTIONAL_PRESETS, DUOTONE_PRESETS, ELEMENT_ACTION_TYPE_OPTIONS, EMPHASIS_PRESET_VALUES, ENTRANCE_PRESET_VALUES, EQUATION_TEMPLATES, EXIT_PRESET_VALUES, EXPORT_ASSEMBLING_PERCENT, EXPORT_DONE_PERCENT, EncryptedFileError, FILL_MODE_OPTIONS, GRADIENT_TYPE_OPTIONS, HANDOUT_OPTIONS, INK_REPLAY_KEYFRAMES, INSERT_CHART_TYPES, LBL, LOCAL_SYNC_ORIGIN, MATERIAL_PRESETS, MAX_ZOOM_SCALE, MIN_ZOOM_SCALE, MOBILE_BREAKPOINT, MOTION_PATH_FAMILIES, NOTES_FONT_SIZE_DEFAULT, NOTES_FONT_SIZE_MAX, NOTES_FONT_SIZE_MIN, NOTES_FONT_SIZE_STEP, NUM, OUTLINE_LEVEL_ATTR, OUTLINE_ROW_ATTR, OUTLINE_SLIDE_ATTR, OUTLINE_VIEW_ATTR, PATTERN_OPTIONS, PRESENTATION_CHANNEL_NAME, PRESENTATION_HASH, PRESENTATION_MESSAGE_ORIGIN, PRESENTATION_NONCE_KEY, PRESETS, PRESET_THEMES, PptxHandler, PptxMarkdownConverter, PresentationAnimationController, QUICK_ACCESS_COMMAND_CATALOG, READING_VIEW_ATTR, READING_VIEW_COUNTER_ATTR, READING_VIEW_STAGE_ATTR, RULER_FONT_SIZE, RULER_THICKNESS, SECTION_HEADING, SEL, SHAPE_PRESET_DEFS, SHAPE_QUICK_STYLES, SHORTCUT_REFERENCE_ITEMS, SLIDE_TRANSITION_KEYFRAMES, SLIDE_TRANSITION_OPTIONS, SLIDE_VIRTUALIZATION_THRESHOLD, STATUS_BAR_CLASSES, SWITCHABLE_LAYOUT_TYPES, SvgExporter, TABLET_BREAKPOINT, TABLE_STYLE_PRESETS, TAB_ROW_ACTION_CLASSES, TEXT_BUILD_ID_SEP, TEXT_WARP_PRESETS, THEME_CATALOG, THEME_COLOR_LABELS, THEME_COLOR_SCHEME_KEYS, THEME_PRESETS, TITLE_BAR_CLASSES, TITLE_BAR_DEFAULT_FILE_KEY, TOOLBAR_TABS, TRANSITION_DIR_ARROWS, TRANSITION_ORIENTATION_TYPES, TRANSITION_VALID_DIRECTIONS, ThemePresets, VIEWER_OPTIONS_TABS, VIEWER_PREFS_STORAGE_KEY, VIEWER_SHORTCUT_REFERENCE, WEBM_MIME_CANDIDATES, acceptsPresentationInput, activateModalFocus, addChartCategory, addChartSeries, addQuickAccessCommand, addSection, addSmartArtNode, addSmartArtNodeAsChild, addTagToCollections, alignElements, appendPresentationInkPoint, appendTableElementColumn, appendTableElementRow, apply3dEffects, applyAcceptAllSlides, applyAcceptSlide, applyCaseTransformToSegments, applyChartBuildReveal, applyColorChange, applyDuotone, applyFormatToElement, applyMotionPathPreset, applyOutlineEdit, applyPreferenceToOptions, applyReadingViewCommand, applyRehearsalTimings, applyReroutedConnectors, applyResize, applyStyleToSelectedSegments, applyThemeOverrideToSlide, applyThemeToData, availableQuickAccessCommands, backstageCardsFor, bringForward, bringToFront, build3DExtrusionData, buildBroadcastViewerUrl, buildCacheKey, buildCalloutLeaderLineSvgPath, buildChartViewModel, buildCollaborationShareUrl, buildContextMenuEntries, buildCreateCollaborationConfig, buildCssGradientFromShapeStyle, buildDirectionGrid, buildDuotoneCacheKey, buildElementClipboardPayload, buildFieldSubstitutionContext, buildGlowBoxShadow, buildHandoutsHtml, buildInitialGuides, buildInnerShadowCssFromShapeStyle, buildJoinCollaborationConfig, buildMorphTransitionPlan, buildMotionPathPreview, buildMultiLayerShadowCss, buildNotesHtml, buildNotesPdfBytes, buildOutline, buildOutlineHtml, buildPatternFillCss, buildPresentationAudienceUrl, buildPreviewAnimation, buildPreviewElements, buildPrintDocument, buildPrintHtmlDocument, buildReflectionCss, buildShadowCssFromShapeStyle, buildSlidesHtml, buildSlidesPdfBytes, buildSmartArt3DModel, buildSmartArtA11y, buildSmartArtPresetData, buildStrokeOutline, buildSummaryZoomView, buildSvgGradientDef, buildTableDataGrid, buildTextBlockStyle, buildTextBody3DSceneStyle, buildTextBuildSpec, buildTextFillCss, buildTextReflectionCss, buildTextRunFilterChain, buildTextShadowCss, buildThemeColorGrid, buildThemeColorMap, buildUserFontFaceStyles, canCommitActionType, canGoNext, canGoPrevious, canvasToJpegData, cell3DBevelCss, chartDataChangeType, chartPartToAttrs, clampCropValue, clampNotesFontSize, clampPercent, clampTransitionNumber, clampUnitInterval2 as clampUnitInterval, clampZoomScale, clearAllLocalViewerData, clearAudienceContent, clearLocalAwareness, clearMotionPath, clearStoredViewerPrefs, cloneElementForPaste, cloneHistorySnapshot, cloneSlide, cloneTemplateElementsBySlideId, collectImagePaths, collectMediaElements, collectUsedFonts, colorWithOpacity, comparePresentation, compileEquationTemplateMathMl, compileLatexEquation, computeAllNotesPages, computeColumnBoundaries, computeEntranceAnimationDelay, computeHandoutLayout, computeInlineEditorRect, computeKeyboardInset, computeLayout, computeLayoutOptions, computeMarqueeHitIds, computeMergeCellDown, computeMergeCellRight, computeResizedColumnWidths, computeResizedRowHeight, computeScrollDelta, computeSelectionRect, computeSmartArtLayout2 as computeSmartArtLayout, computeSnapToShape, computeSplitCell, computeValueRange, computeValueRangeForChart, computeVirtualRange, convertLatexToOmml, convertOmmlToLatex, convertOmmlToMathMl, copyFormatFromElement, createBackstagePresentation, createBlankSlide, createCollaborationLivePatcher, createDefaultChartElement, createDepartureChannel, createInitialPresentationSnapshot, createPresentationKeyBuffer, createPresentationSessionId, createPresenterTimer, createSyncGate, createTouchGestureRecognizer, createViewerOptionsStore, customGeometryPathsToSvgSubpaths, defaultCssVars, defaultRadius, defaultThemeColors, deleteAutosaveSnapshot, deleteSection, deleteTableColumn, deleteTableRow, deleteTagFromCollections, demoteSmartArtNode, derivePresenceList, deriveSlideFieldContext, detectOrientation, detectTouchDevice, distributeElements, downloadBlob, downloadDataUrl, dragAnchorViewY, dragValueForPart, elementActionToPptxAction, encodeGif, endAudienceDisplay, erasePresentationInkAt, evaluatePresetShape, extraQuickAccessCommands, extractPathPoints, filterCommands, filterRenderedElements, findChartPartTarget, findMediaElementByElementId, findSmartArtNodeText, flattenTagCollections, formatAxisValue, formatAxisValueWithUnits, formatBackstageDate, formatBackstageSize, formatBytes, formatCommentTimestamp, formatElapsed, formatMobileElapsed, formatRelativeTime, formatSlideCounter, formatTime, formatVersionTimestamp, fpsToFrameIntervalMs, generateBroadcastRoomId, generateElementId, generateLogTicks, generateNoteLineCount, generatePackageReadme, generatePressureCircles, generateTicks, getAnimationInitialStyle, getAriaLabel, getAriaRole, getAriaRoleDescription, getCachedResult, getCalloutLeaderLineGeometry, getCalloutViewBoxBounds, getCellDiagonalBorders, getChartStylePalette, getCommentMarkerPosition, getCompoundLineBorderWidth, getCompoundLineBoxShadow, getCompoundLineOffsets, getCompoundLineWidths, getComputedEffectStyle, getConnectionSites, getContentPartReplayStyles, getCssBorderDashStyle, getDisplayUnitLabel, getDuotoneCachedResult, getEffectDagFilter, getElementLabel, getElementTransform, getElementTransformWithoutRotation, getGradientTileFlipCss, getGradientTileRectCss, getGroupChildParentFill, getImageColorWashStyle, getImageEffectsFilter, getImageEffectsOpacity, getImageSvgFilters, getInkReplayStyles, getInlineEditorSelection, getKinsokuLineBreakStyles, getLocalStorageUsageSummary, getNotesPrintableArea, getOleBadgeLabel, getOleObjectTypeLabel, getOleTypeColor, getOleTypeLabel, getOverflowSegments, getPatternSvg, getPendingSelectionRestore, getPresetShapeClipPath, getPrintableArea, getResolvedShapeClipPath, getRoundRectRadiusPx, getSecondaryValueAxis, getShapeAdjustmentHandleDescriptor, getSlideBackgroundStyle, getSlideTransitionAnimations, getSoftEdgeFilterId, getSoftEdgeSvgFilter, getSubstituteFontFamily, getSvgStrokeDasharray, getTextAlphaOpacity, getTextCompensationTransform, getWarpPath, groupElements, groupIntoParagraphs, groupSlidesBySection, guidePxToEmu, handleReadingViewKey, hasCopyableFormat, hasDistinctScriptFonts, hasPressureVariation, hasShapeProperties, hasTextProperties, hexToRgbChannels2 as hexToRgbChannels, insertTableColumn, insertTableRow, isActionHidden, isBrowserOpenableMime, isCalloutShape, isCellInRect, isEditableMotionPath, isEditableTextElement, isEditorTextInputTarget, isElementActionable, isElementRendered, isExportAbortError, isFirstSlide, isImageLikeElement, isInkElement, isKeyboardOpen, isLastSlide, isLinkedTextBox, isMixedContentBlocked, isMobileViewport, isPpactionUrl, isPresentationAdvanceClick, isPresentationSessionMessage, isTemplateElement, isTemplateElementId2 as isTemplateElementId, isUrlSafe, listAutosaveSnapshots, listBackstageRecentFiles, loadAudienceContent, makeCloneId, makeSlideId, mapEditorKey, mapOutlineKey, mapPresentationKey, mayLeaveSlideShow, mergeAdditiveSelection, mergeCells, mergePresentationSnapshot, mergeShapes, mergeSlideTransition, mobileElapsedSince, mobileSlideCounter, morphOptionToMode, motionPathEndPixel, motionPathFamilyLabelKey, motionPathFor, motionPathPresetIdForPath, motionPathPresetLabelKey, motionPathPresetsByFamily, motionPathToSvgD, mountModel3D, mountSurfaceChart3D, movePresenterPointer, moveQuickAccessCommand, moveSectionDown, moveSectionUp, moveSlidesToSection, newTableElement, normalizeColorsForCapture, normalizeHexColor, normalizeStrokeDashType, normalizeValue, notesSegmentsToSpans, observeYDocSlides, ooxmlDashToCssBorderStyle, ooxmlGradientAngleToCssDegrees, openNativeEyeDropper, openPptxFile, openReadingView, openUrlInNewTab, paletteColor, parseDrawingColor, parseDrawingColorOpacity, parsePpactionUrl, pickSupportedMimeType, placeAudienceWindow, polygonsToSvgPath, pptxActionToElementAction, preprocessCssForCapture, presentationInkPath, presenterElapsed, presenterPaneAdvancesOnClick, pressuresToWidths, printPropertiesFrameSlides, printPropertiesSlidesPerPage, promoteSmartArtNode, publishLiveGeometry, publishLiveInlineText, quickStyleSwatchCss, reResolveSlideColors, readBackstageRecentFile, readSlidesFromYDoc, readStoredViewerPrefs, readViewportMetrics, readingViewFitScale, rebuildDrawingShapesIfCleared, rebuildTableStructureInRawXml, reconcileSlidesInYDoc, recordProgressPercent, rectToCells, registerCollaborationTeardown, remapTextToSegments, removeChartCategory, removeChartSeries, removeLastTableElementColumn, removeLastTableElementRow, removeQuickAccessCommand, removeSmartArtNode, removeTableElementColumn, removeTableElementRow, renameSection, reorderSmartArtNode, rerouteConnectorsForMovedElements, resetPresenterTimer, resolveActionType, resolveAudienceScreenPlacement, resolveAutoAdvanceDelayMs, resolveAutoFitFontScale, resolveCssTextAlign, resolveDrawingShapeNodeId, resolveFontForScript, resolveFontRefIdx, resolveGroupChildFill, resolveInkColor, resolveInkOpacity, resolveInkWidth, resolveOleType, resolveParagraphAlign, resolveParagraphRtl, resolveParagraphStrutFontSize, resolvePictureBullet, resolveProfileInitial, resolveRegionCode, resolveThemeCatalogEntry, resolveTitleBarStatusKey, resolveTransitionDurationMs, resolveTransportForServerUrl, resolveUnderlineDecorationStyle, resolveViewerAddinRows, restoreSegmentSelection, revealedSmartArtNodeCount, rulerDragToGuidePosition, runMediaCommand, safeOpenUrl, sanitizeColor, sanitizeDownloadFilename, sanitizeGradientStops, sanitizeMathMl, saveAutosaveSnapshot, saveViewerProfile, scanAvailableFontFamilies, segmentByScript, segmentFrameCount, sendBackward, sendToBack, sequentialColorScale, seriesColor2 as seriesColor, setCachedResult, setChartAxisGridlineStyle, setChartAxisLogScale, setChartAxisTitleStyle, setChartCategoryLabel, setChartCellValue, setChartDataPointExplosion, setChartDataPointFill, setChartDataPointLabel, setChartDataPointMarker, setChartSeriesChartType, setChartSeriesMarker, setDuotoneCachedResult, setMotionPath, setMotionPathEnd, setPendingSelectionRestore, setSmartArtNodeStyle, setTableElementCellText, shadeColor2, shouldAutoFollowBroadcaster, shouldCommitSmartArtNodeText, shouldConfirmExternalHyperlink, shouldLoopContinuously, shouldUseSvgWarp, slideProgressPercent, slideStatusLabel, snapBoxToGrid, splitCell, splitSeriesByAxis, stepPresenterZoom, storeAudienceContent, substituteFieldText, suppressesCssBorder, svgGradientFillRef, svgLineCap, svgPathToPolygons, swapPresentationWindows, switchSmartArtLayout, text3dEmuToPt, text3dPtToEmu, textBuildSpanStyle, themeColorSchemesEqual, themeToCssVars, tintColor2, toCssTextOrientation, toCssVerticalDirection, toCssWritingMode, toSlideIndex, togglePresenterTimer, toggleText3dExtrusion, transformTextCase, updateCellTextInRawXml, updateCellTextStyleInRawXml, updateMergeAttrsInRawXml, updateSmartArtNodeText, updateTagInCollections, validateRoomId, valueToY, vermilionDarkColors, vermilionDarkTheme, vermilionLightColors, vermilionLightTheme, vermilionRadius, viewerOptionsToPreferences, warpPreviewPath, withChartPointValue, withChartTitle, withFrameSlides, withSlidesPerPage, writeStoredViewerPrefs, zoomInScale, zoomOutScale };