pptx-react-viewer 4.34.0 → 4.35.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 (85) hide show
  1. package/CHANGELOG.md +26 -0
  2. package/dist/{AiChatPanel-CYD46SEM.mjs → AiChatPanel-CX74JT77.mjs} +1 -1
  3. package/dist/AiChatPanel-CX74JT77.mjs.br +0 -0
  4. package/dist/AiChatPanel-CX74JT77.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-ONHWZEPV.js → AiChatPanel-PVRSPIAY.js} +9 -9
  6. package/dist/AiChatPanel-PVRSPIAY.js.br +0 -0
  7. package/dist/AiChatPanel-PVRSPIAY.js.gz +0 -0
  8. package/dist/{chunk-7DGKSEIU.js → chunk-4MGJUBY7.js} +2 -1
  9. package/dist/chunk-4MGJUBY7.js.br +0 -0
  10. package/dist/chunk-4MGJUBY7.js.gz +0 -0
  11. package/dist/{chunk-LGZOY6W6.mjs → chunk-6SRRGOV2.mjs} +44 -40
  12. package/dist/chunk-6SRRGOV2.mjs.br +0 -0
  13. package/dist/chunk-6SRRGOV2.mjs.gz +0 -0
  14. package/dist/{chunk-XXGYLCRT.js → chunk-EL2KJ7PU.js} +287 -283
  15. package/dist/chunk-EL2KJ7PU.js.br +0 -0
  16. package/dist/chunk-EL2KJ7PU.js.gz +0 -0
  17. package/dist/{chunk-OWXES7IA.mjs → chunk-GKUPYPD3.mjs} +104 -80
  18. package/dist/chunk-GKUPYPD3.mjs.br +0 -0
  19. package/dist/chunk-GKUPYPD3.mjs.gz +0 -0
  20. package/dist/{chunk-LNL6PAGZ.js → chunk-KYMELPA6.js} +1371 -1347
  21. package/dist/chunk-KYMELPA6.js.br +0 -0
  22. package/dist/chunk-KYMELPA6.js.gz +0 -0
  23. package/dist/{chunk-K4UXDQZ6.mjs → chunk-SMPZ552M.mjs} +2 -1
  24. package/dist/chunk-SMPZ552M.mjs.br +0 -0
  25. package/dist/chunk-SMPZ552M.mjs.gz +0 -0
  26. package/dist/i18n/de.cjs +1 -0
  27. package/dist/i18n/de.cjs.br +0 -0
  28. package/dist/i18n/de.cjs.gz +0 -0
  29. package/dist/i18n/de.mjs +1 -0
  30. package/dist/i18n/de.mjs.br +0 -0
  31. package/dist/i18n/de.mjs.gz +0 -0
  32. package/dist/i18n/es.cjs +1 -0
  33. package/dist/i18n/es.cjs.br +0 -0
  34. package/dist/i18n/es.cjs.gz +0 -0
  35. package/dist/i18n/es.mjs +1 -0
  36. package/dist/i18n/es.mjs.br +0 -0
  37. package/dist/i18n/es.mjs.gz +0 -0
  38. package/dist/i18n/fr.cjs +1 -0
  39. package/dist/i18n/fr.cjs.br +0 -0
  40. package/dist/i18n/fr.cjs.gz +0 -0
  41. package/dist/i18n/fr.mjs +1 -0
  42. package/dist/i18n/fr.mjs.br +0 -0
  43. package/dist/i18n/fr.mjs.gz +0 -0
  44. package/dist/i18n/zh-CN.cjs +1 -0
  45. package/dist/i18n/zh-CN.cjs.br +0 -0
  46. package/dist/i18n/zh-CN.cjs.gz +0 -0
  47. package/dist/i18n/zh-CN.mjs +1 -0
  48. package/dist/i18n/zh-CN.mjs.br +0 -0
  49. package/dist/i18n/zh-CN.mjs.gz +0 -0
  50. package/dist/index.js +24 -24
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +3 -3
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.d.ts +4 -1
  57. package/dist/internals.js +81 -81
  58. package/dist/internals.js.br +0 -0
  59. package/dist/internals.js.gz +0 -0
  60. package/dist/internals.mjs +2 -2
  61. package/dist/internals.mjs.br +0 -0
  62. package/dist/internals.mjs.gz +0 -0
  63. package/dist/viewer/index.js +19 -19
  64. package/dist/viewer/index.js.br +0 -0
  65. package/dist/viewer/index.js.gz +0 -0
  66. package/dist/viewer/index.mjs +3 -3
  67. package/dist/viewer/index.mjs.br +0 -0
  68. package/dist/viewer/index.mjs.gz +0 -0
  69. package/package.json +3 -3
  70. package/dist/AiChatPanel-CYD46SEM.mjs.br +0 -0
  71. package/dist/AiChatPanel-CYD46SEM.mjs.gz +0 -0
  72. package/dist/AiChatPanel-ONHWZEPV.js.br +0 -0
  73. package/dist/AiChatPanel-ONHWZEPV.js.gz +0 -0
  74. package/dist/chunk-7DGKSEIU.js.br +0 -0
  75. package/dist/chunk-7DGKSEIU.js.gz +0 -0
  76. package/dist/chunk-K4UXDQZ6.mjs.br +0 -0
  77. package/dist/chunk-K4UXDQZ6.mjs.gz +0 -0
  78. package/dist/chunk-LGZOY6W6.mjs.br +0 -0
  79. package/dist/chunk-LGZOY6W6.mjs.gz +0 -0
  80. package/dist/chunk-LNL6PAGZ.js.br +0 -0
  81. package/dist/chunk-LNL6PAGZ.js.gz +0 -0
  82. package/dist/chunk-OWXES7IA.mjs.br +0 -0
  83. package/dist/chunk-OWXES7IA.mjs.gz +0 -0
  84. package/dist/chunk-XXGYLCRT.js.br +0 -0
  85. package/dist/chunk-XXGYLCRT.js.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunk7DGKSEIU_js = require('./chunk-7DGKSEIU.js');
3
+ var chunk4MGJUBY7_js = require('./chunk-4MGJUBY7.js');
4
4
  var pptx = require('ooxml-ui/pptx');
5
5
  var React17 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -684,9 +684,9 @@ function serializeHistoryDocument(snapshot) {
684
684
  }
685
685
  function recordExplicitSlideUpdate(past, future, previous, before, label, maxDepth) {
686
686
  if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
687
- past.push(chunk7DGKSEIU_js.cloneHistorySnapshot(previous));
687
+ past.push(chunk4MGJUBY7_js.cloneHistorySnapshot(previous));
688
688
  }
689
- past.push({ ...chunk7DGKSEIU_js.cloneHistorySnapshot(before), actionLabel: label });
689
+ past.push({ ...chunk4MGJUBY7_js.cloneHistorySnapshot(before), actionLabel: label });
690
690
  while (past.length > Math.max(1, maxDepth)) {
691
691
  past.shift();
692
692
  }
@@ -775,8 +775,8 @@ function useEditorHistory(input) {
775
775
  width: canvasSize.width,
776
776
  height: canvasSize.height,
777
777
  activeSlideIndex,
778
- slides: slides.map(chunk7DGKSEIU_js.cloneSlide),
779
- templateElementsBySlideId: chunk7DGKSEIU_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
778
+ slides: slides.map(chunk4MGJUBY7_js.cloneSlide),
779
+ templateElementsBySlideId: chunk4MGJUBY7_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
780
780
  ...actionLabel ? { actionLabel } : {}
781
781
  };
782
782
  },
@@ -789,9 +789,9 @@ function useEditorHistory(input) {
789
789
  width: snapshot.width,
790
790
  height: snapshot.height
791
791
  });
792
- setSlides(snapshot.slides.map(chunk7DGKSEIU_js.cloneSlide));
792
+ setSlides(snapshot.slides.map(chunk4MGJUBY7_js.cloneSlide));
793
793
  setTemplateElementsBySlideId(
794
- chunk7DGKSEIU_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
794
+ chunk4MGJUBY7_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
795
795
  );
796
796
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
797
797
  setSelectedElementIds([]);
@@ -830,8 +830,8 @@ function useEditorHistory(input) {
830
830
  const currentSnapshot = buildHistorySnapshot(previousSnapshot.actionLabel);
831
831
  historyFutureRef.current.push(currentSnapshot);
832
832
  isApplyingHistoryRef.current = true;
833
- const nextSnapshot = chunk7DGKSEIU_js.cloneHistorySnapshot(previousSnapshot);
834
- lastHistorySnapshotRef.current = chunk7DGKSEIU_js.cloneHistorySnapshot(nextSnapshot);
833
+ const nextSnapshot = chunk4MGJUBY7_js.cloneHistorySnapshot(previousSnapshot);
834
+ lastHistorySnapshotRef.current = chunk4MGJUBY7_js.cloneHistorySnapshot(nextSnapshot);
835
835
  lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
836
836
  applyHistorySnapshot(nextSnapshot);
837
837
  updateHistoryAvailability();
@@ -852,8 +852,8 @@ function useEditorHistory(input) {
852
852
  const currentSnapshot = buildHistorySnapshot(nextSnapshot.actionLabel);
853
853
  historyPastRef.current.push(currentSnapshot);
854
854
  isApplyingHistoryRef.current = true;
855
- const targetSnapshot = chunk7DGKSEIU_js.cloneHistorySnapshot(nextSnapshot);
856
- lastHistorySnapshotRef.current = chunk7DGKSEIU_js.cloneHistorySnapshot(targetSnapshot);
855
+ const targetSnapshot = chunk4MGJUBY7_js.cloneHistorySnapshot(nextSnapshot);
856
+ lastHistorySnapshotRef.current = chunk4MGJUBY7_js.cloneHistorySnapshot(targetSnapshot);
857
857
  lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
858
858
  applyHistorySnapshot(targetSnapshot);
859
859
  updateHistoryAvailability();
@@ -871,7 +871,7 @@ function useEditorHistory(input) {
871
871
  historyPastRef.current = [];
872
872
  historyFutureRef.current = [];
873
873
  if (initialSnapshot) {
874
- const clonedInitial = chunk7DGKSEIU_js.cloneHistorySnapshot(initialSnapshot);
874
+ const clonedInitial = chunk4MGJUBY7_js.cloneHistorySnapshot(initialSnapshot);
875
875
  lastHistorySnapshotRef.current = clonedInitial;
876
876
  lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
877
877
  } else {
@@ -953,8 +953,8 @@ function useEditorHistory(input) {
953
953
  updateHistoryAvailability
954
954
  ]);
955
955
  const commitSlides = (nextSlides, label, beforeSlides = slides) => {
956
- const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk7DGKSEIU_js.cloneSlide) };
957
- const after = { ...before, slides: nextSlides.map(chunk7DGKSEIU_js.cloneSlide) };
956
+ const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunk4MGJUBY7_js.cloneSlide) };
957
+ const after = { ...before, slides: nextSlides.map(chunk4MGJUBY7_js.cloneSlide) };
958
958
  recordExplicitSlideUpdate(
959
959
  historyPastRef.current,
960
960
  historyFutureRef.current,
@@ -963,7 +963,7 @@ function useEditorHistory(input) {
963
963
  label,
964
964
  maxHistoryEntries
965
965
  );
966
- lastHistorySnapshotRef.current = chunk7DGKSEIU_js.cloneHistorySnapshot(after);
966
+ lastHistorySnapshotRef.current = chunk4MGJUBY7_js.cloneHistorySnapshot(after);
967
967
  lastHistorySerializedRef.current = serializeHistoryDocument(after);
968
968
  isApplyingHistoryRef.current = false;
969
969
  setSlides(nextSlides);
@@ -1143,22 +1143,22 @@ function useZoomViewport({
1143
1143
  selectedElements.forEach((element) => {
1144
1144
  minX = Math.min(minX, element.x);
1145
1145
  minY = Math.min(minY, element.y);
1146
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE));
1147
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE));
1146
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE));
1147
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE));
1148
1148
  });
1149
1149
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
1150
1150
  return;
1151
1151
  }
1152
1152
  const selectionBounds = { minX, minY, maxX, maxY };
1153
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
1154
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
1153
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
1154
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
1155
1155
  const availableWidth = Math.max(
1156
- effectiveEditorDimensions.width - chunk7DGKSEIU_js.ZOOM_TO_SELECTION_PADDING,
1157
- chunk7DGKSEIU_js.MIN_ELEMENT_SIZE
1156
+ effectiveEditorDimensions.width - chunk4MGJUBY7_js.ZOOM_TO_SELECTION_PADDING,
1157
+ chunk4MGJUBY7_js.MIN_ELEMENT_SIZE
1158
1158
  );
1159
1159
  const availableHeight = Math.max(
1160
- effectiveEditorDimensions.height - chunk7DGKSEIU_js.ZOOM_TO_SELECTION_PADDING,
1161
- chunk7DGKSEIU_js.MIN_ELEMENT_SIZE
1160
+ effectiveEditorDimensions.height - chunk4MGJUBY7_js.ZOOM_TO_SELECTION_PADDING,
1161
+ chunk4MGJUBY7_js.MIN_ELEMENT_SIZE
1162
1162
  );
1163
1163
  const targetEditorScale = Math.min(
1164
1164
  availableWidth / boundsWidth,
@@ -4125,8 +4125,8 @@ function useViewerCoreState(_input) {
4125
4125
  const { slides, setSlides, slidesRef } = useSlideState();
4126
4126
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
4127
4127
  const [canvasSize, setCanvasSize] = React17.useState({
4128
- width: chunk7DGKSEIU_js.DEFAULT_CANVAS_WIDTH,
4129
- height: chunk7DGKSEIU_js.DEFAULT_CANVAS_HEIGHT
4128
+ width: chunk4MGJUBY7_js.DEFAULT_CANVAS_WIDTH,
4129
+ height: chunk4MGJUBY7_js.DEFAULT_CANVAS_HEIGHT
4130
4130
  });
4131
4131
  const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
4132
4132
  const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
@@ -4151,6 +4151,7 @@ function useViewerCoreState(_input) {
4151
4151
  const [clipboardPayload, setClipboardPayload] = React17.useState(null);
4152
4152
  const [pointerCommitNonce, setPointerCommitNonce] = React17.useState(0);
4153
4153
  const [headerFooter, setHeaderFooter] = React17.useState({});
4154
+ const [firstSlideNumber, setFirstSlideNumber] = React17.useState();
4154
4155
  const [layoutOptions, setLayoutOptions] = React17.useState([]);
4155
4156
  const [slideMasters, setSlideMasters] = React17.useState([]);
4156
4157
  const [modernCommentAuthors, setModernCommentAuthors] = React17.useState([]);
@@ -4242,6 +4243,8 @@ function useViewerCoreState(_input) {
4242
4243
  setPointerCommitNonce,
4243
4244
  headerFooter,
4244
4245
  setHeaderFooter,
4246
+ firstSlideNumber,
4247
+ setFirstSlideNumber,
4245
4248
  layoutOptions,
4246
4249
  setLayoutOptions,
4247
4250
  slideMasters,
@@ -4453,6 +4456,7 @@ function useLoadContent({
4453
4456
  setCanvasSize,
4454
4457
  setSlideSizeEmu,
4455
4458
  setHeaderFooter,
4459
+ setFirstSlideNumber,
4456
4460
  setLayoutOptions,
4457
4461
  setSlideMasters,
4458
4462
  setModernCommentAuthors,
@@ -4502,7 +4506,7 @@ function useLoadContent({
4502
4506
  }
4503
4507
  let cancelled = false;
4504
4508
  const token = ++renderTokenRef.current;
4505
- const handler = new chunk7DGKSEIU_js.dist_exports.PptxHandler();
4509
+ const handler = new chunk4MGJUBY7_js.dist_exports.PptxHandler();
4506
4510
  const resources = pptx.createPresentationLoadResources(handler);
4507
4511
  const loadBlobUrls = resources.blobUrls;
4508
4512
  (async () => {
@@ -4587,12 +4591,12 @@ function useLoadContent({
4587
4591
  }
4588
4592
  resources.commit();
4589
4593
  handlerRef.current = handler;
4590
- const partition = chunk7DGKSEIU_js.partitionTemplateElements(nextSlides);
4594
+ const partition = chunk4MGJUBY7_js.partitionTemplateElements(nextSlides);
4591
4595
  setSlides(partition.slides);
4592
4596
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4593
4597
  setCanvasSize({
4594
- width: parsed.width ?? chunk7DGKSEIU_js.DEFAULT_CANVAS_WIDTH,
4595
- height: parsed.height ?? chunk7DGKSEIU_js.DEFAULT_CANVAS_HEIGHT
4598
+ width: parsed.width ?? chunk4MGJUBY7_js.DEFAULT_CANVAS_WIDTH,
4599
+ height: parsed.height ?? chunk4MGJUBY7_js.DEFAULT_CANVAS_HEIGHT
4596
4600
  });
4597
4601
  setSlideSizeEmu(
4598
4602
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4602,6 +4606,7 @@ function useLoadContent({
4602
4606
  } : void 0
4603
4607
  );
4604
4608
  setHeaderFooter(parsed.headerFooter ?? {});
4609
+ setFirstSlideNumber(parsed.firstSlideNumber);
4605
4610
  setLayoutOptions(parsed.layoutOptions ?? []);
4606
4611
  setSlideMasters(parsed.slideMasters ?? []);
4607
4612
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
@@ -4655,7 +4660,7 @@ function useLoadContent({
4655
4660
  onContentApplied?.();
4656
4661
  } catch (err) {
4657
4662
  if (!cancelled && token === renderTokenRef.current) {
4658
- if (err instanceof chunk7DGKSEIU_js.dist_exports.EncryptedFileError) {
4663
+ if (err instanceof chunk4MGJUBY7_js.dist_exports.EncryptedFileError) {
4659
4664
  setIsEncrypted(true);
4660
4665
  } else {
4661
4666
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4780,7 +4785,7 @@ function useTextElementOperations(input) {
4780
4785
  updateSelectedElement
4781
4786
  } = input;
4782
4787
  const liveTextSegments = React17.useCallback(() => {
4783
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4788
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4784
4789
  return void 0;
4785
4790
  }
4786
4791
  if (selectedElement.id !== inlineEditingElementId) {
@@ -4798,7 +4803,7 @@ function useTextElementOperations(input) {
4798
4803
  }, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
4799
4804
  const updateSelectedTextStyle = React17.useCallback(
4800
4805
  (updates) => {
4801
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4806
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4802
4807
  return;
4803
4808
  }
4804
4809
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -4876,7 +4881,7 @@ function useTextElementOperations(input) {
4876
4881
  );
4877
4882
  const toggleSelectedBullets = React17.useCallback(
4878
4883
  (kind) => {
4879
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4884
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4880
4885
  return;
4881
4886
  }
4882
4887
  const currentSegments = liveTextSegments();
@@ -4927,7 +4932,7 @@ function useTextElementOperations(input) {
4927
4932
  );
4928
4933
  const updateSelectedTextCase = React17.useCallback(
4929
4934
  (mode) => {
4930
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4935
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4931
4936
  return;
4932
4937
  }
4933
4938
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -5043,7 +5048,7 @@ function useElementOperations(input) {
5043
5048
  );
5044
5049
  return;
5045
5050
  }
5046
- if (chunk7DGKSEIU_js.isTemplateElementId(elementId)) {
5051
+ if (chunk4MGJUBY7_js.isTemplateElementId(elementId)) {
5047
5052
  const slideId = activeSlide?.id;
5048
5053
  if (slideId) {
5049
5054
  setTemplateElementsBySlideId((prev) => ({
@@ -5079,7 +5084,7 @@ function useElementOperations(input) {
5079
5084
  );
5080
5085
  const updateSelectedShapeStyle = React17.useCallback(
5081
5086
  (updates) => {
5082
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(selectedElement)) {
5087
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(selectedElement)) {
5083
5088
  return;
5084
5089
  }
5085
5090
  updateSelectedElement({
@@ -5283,15 +5288,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
5283
5288
  // src/viewer/hooks/pointer-move-handlers.ts
5284
5289
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
5285
5290
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
5286
- let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk7DGKSEIU_js.MIN_ELEMENT_SIZE });
5291
+ let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk4MGJUBY7_js.MIN_ELEMENT_SIZE });
5287
5292
  if (lockAspect) {
5288
- resized = pptx.lockResizeAspect(resized, startBox, handle, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5293
+ resized = pptx.lockResizeAspect(resized, startBox, handle, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5289
5294
  }
5290
5295
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
5291
5296
  if (!snapToGrid) {
5292
5297
  return box;
5293
5298
  }
5294
- return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5299
+ return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5295
5300
  }
5296
5301
  function resolveLiveTarget(input) {
5297
5302
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -5404,7 +5409,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
5404
5409
  width: el.width,
5405
5410
  height: el.height
5406
5411
  }));
5407
- const snapResult = chunk7DGKSEIU_js.computeSnapToShape(
5412
+ const snapResult = chunk4MGJUBY7_js.computeSnapToShape(
5408
5413
  targetX,
5409
5414
  targetY,
5410
5415
  primaryEl.width,
@@ -5478,8 +5483,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
5478
5483
  rs.lastY = geo.y;
5479
5484
  rs.lastWidth = geo.width;
5480
5485
  rs.lastHeight = geo.height;
5481
- const width = Math.max(geo.width, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5482
- const height = Math.max(geo.height, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5486
+ const width = Math.max(geo.width, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5487
+ const height = Math.max(geo.height, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5483
5488
  if (rs.domEl) {
5484
5489
  rs.domEl.style.left = `${geo.x}px`;
5485
5490
  rs.domEl.style.top = `${geo.y}px`;
@@ -5572,13 +5577,13 @@ function processPointerUp(input) {
5572
5577
  if (i !== activeSlideIndex) {
5573
5578
  return s;
5574
5579
  }
5575
- const rerouted = chunk7DGKSEIU_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5580
+ const rerouted = chunk4MGJUBY7_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5576
5581
  if (rerouted.length === 0) {
5577
5582
  return s;
5578
5583
  }
5579
5584
  return {
5580
5585
  ...s,
5581
- elements: chunk7DGKSEIU_js.applyReroutedConnectors(s.elements, rerouted)
5586
+ elements: chunk4MGJUBY7_js.applyReroutedConnectors(s.elements, rerouted)
5582
5587
  };
5583
5588
  })
5584
5589
  );
@@ -5630,8 +5635,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
5630
5635
  }
5631
5636
  return { ...el, x: start.x + dx, y: start.y + dy };
5632
5637
  });
5633
- const rerouted = chunk7DGKSEIU_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5634
- return chunk7DGKSEIU_js.applyReroutedConnectors(movedElements, rerouted);
5638
+ const rerouted = chunk4MGJUBY7_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5639
+ return chunk4MGJUBY7_js.applyReroutedConnectors(movedElements, rerouted);
5635
5640
  };
5636
5641
  if (editTemplateMode) {
5637
5642
  const slideId = activeSlide?.id;
@@ -5819,7 +5824,7 @@ function useCanvasInteractions(input) {
5819
5824
  return;
5820
5825
  }
5821
5826
  const el = elementLookup.get(editId);
5822
- if (el && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el)) {
5827
+ if (el && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el)) {
5823
5828
  const reader = inlineEditingReaderRef?.current;
5824
5829
  const read = reader?.elementId === editId ? reader.read() : void 0;
5825
5830
  if (read?.kind === "unsupported") {
@@ -5866,7 +5871,7 @@ function useCanvasInteractions(input) {
5866
5871
  wasEditable.current = canEdit;
5867
5872
  }, [canEdit]);
5868
5873
  const openEquationEditorForElement = (el) => {
5869
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el)) {
5874
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el)) {
5870
5875
  return false;
5871
5876
  }
5872
5877
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5899,7 +5904,7 @@ function useCanvasInteractions(input) {
5899
5904
  justInteractedRef.current = false;
5900
5905
  } else {
5901
5906
  const el = elementLookup.get(elementId);
5902
- if (el && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5907
+ if (el && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5903
5908
  if (!openEquationEditorForElement(el)) {
5904
5909
  pptx.setPendingCaretPoint(e);
5905
5910
  setInlineEditingElementId(elementId);
@@ -5925,7 +5930,7 @@ function useCanvasInteractions(input) {
5925
5930
  if (openEquationEditorForElement(el)) {
5926
5931
  return;
5927
5932
  }
5928
- if ((0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5933
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5929
5934
  setInlineEditingElementId(elementId);
5930
5935
  setInlineEditingText(el.text ?? "");
5931
5936
  }
@@ -6390,7 +6395,7 @@ function createStructuredElementHandlers(deps) {
6390
6395
  return;
6391
6396
  }
6392
6397
  const resolved = resolveHyperlinkEditResult(data);
6393
- if (resolved.url && !chunk7DGKSEIU_js.isUrlSafe(resolved.url)) {
6398
+ if (resolved.url && !chunk4MGJUBY7_js.isUrlSafe(resolved.url)) {
6394
6399
  return;
6395
6400
  }
6396
6401
  const actionClick = {
@@ -6436,11 +6441,11 @@ function createStructuredElementHandlers(deps) {
6436
6441
  if (!activeSlide) {
6437
6442
  return;
6438
6443
  }
6439
- const preset = chunk7DGKSEIU_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6444
+ const preset = chunk4MGJUBY7_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6440
6445
  if (!preset) {
6441
6446
  return;
6442
6447
  }
6443
- const defaultPptxAction = (0, chunk7DGKSEIU_js.dist_exports.elementActionToPptxAction)({
6448
+ const defaultPptxAction = (0, chunk4MGJUBY7_js.dist_exports.elementActionToPptxAction)({
6444
6449
  trigger: "click",
6445
6450
  type: preset.defaultAction
6446
6451
  });
@@ -6523,7 +6528,7 @@ function useInsertElements(input) {
6523
6528
  width: 300,
6524
6529
  height: 60,
6525
6530
  text: "",
6526
- textStyle: { fontSize: chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE }
6531
+ textStyle: { fontSize: chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE }
6527
6532
  });
6528
6533
  };
6529
6534
  const handleAddShape = () => {
@@ -6550,7 +6555,7 @@ function useInsertElements(input) {
6550
6555
  return;
6551
6556
  }
6552
6557
  addElement({
6553
- ...pptx.newTableElement(chunk7DGKSEIU_js.DEFAULT_TABLE_ROWS, chunk7DGKSEIU_js.DEFAULT_TABLE_COLUMNS, 100, 200),
6558
+ ...pptx.newTableElement(chunk4MGJUBY7_js.DEFAULT_TABLE_ROWS, chunk4MGJUBY7_js.DEFAULT_TABLE_COLUMNS, 100, 200),
6554
6559
  id: pptx.generateElementId()
6555
6560
  });
6556
6561
  };
@@ -6719,7 +6724,7 @@ function useGroupAlignLayerHandlers(input) {
6719
6724
  history
6720
6725
  } = input;
6721
6726
  const updateElementsOwning = (elementId, updater) => {
6722
- if (editTemplateMode && !chunk7DGKSEIU_js.isTemplateElementId(elementId)) {
6727
+ if (editTemplateMode && !chunk4MGJUBY7_js.isTemplateElementId(elementId)) {
6723
6728
  ops.updateSlides(
6724
6729
  (prev) => prev.map(
6725
6730
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6753,9 +6758,9 @@ function useGroupAlignLayerHandlers(input) {
6753
6758
  return;
6754
6759
  }
6755
6760
  const group = selectedElement;
6756
- const intoTemplate = chunk7DGKSEIU_js.isTemplateElementId(group.id);
6761
+ const intoTemplate = chunk4MGJUBY7_js.isTemplateElementId(group.id);
6757
6762
  const childIds = group.children.map(
6758
- (child) => intoTemplate ? chunk7DGKSEIU_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6763
+ (child) => intoTemplate ? chunk4MGJUBY7_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6759
6764
  );
6760
6765
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6761
6766
  ops.activeElements,
@@ -7087,7 +7092,7 @@ function useSlideManagement(input) {
7087
7092
  if (!src) {
7088
7093
  continue;
7089
7094
  }
7090
- const clone = { ...(0, chunk7DGKSEIU_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7095
+ const clone = { ...(0, chunk4MGJUBY7_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7091
7096
  next.splice(i + offset + 1, 0, clone);
7092
7097
  offset++;
7093
7098
  }
@@ -7191,7 +7196,7 @@ function createTableMergeHandlers(input) {
7191
7196
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7192
7197
  return;
7193
7198
  }
7194
- const newTableData = chunk7DGKSEIU_js.mergeCells(
7199
+ const newTableData = chunk4MGJUBY7_js.mergeCells(
7195
7200
  [
7196
7201
  { row: rowIndex, col: columnIndex },
7197
7202
  { row: rowIndex, col: nextColIdx }
@@ -7199,7 +7204,7 @@ function createTableMergeHandlers(input) {
7199
7204
  td
7200
7205
  );
7201
7206
  const updates = { tableData: newTableData };
7202
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7207
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7203
7208
  if (newRawXml) {
7204
7209
  updates.rawXml = newRawXml;
7205
7210
  }
@@ -7225,7 +7230,7 @@ function createTableMergeHandlers(input) {
7225
7230
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7226
7231
  return;
7227
7232
  }
7228
- const newTableData = chunk7DGKSEIU_js.mergeCells(
7233
+ const newTableData = chunk4MGJUBY7_js.mergeCells(
7229
7234
  [
7230
7235
  { row: rowIndex, col: columnIndex },
7231
7236
  { row: targetNextRowIdx, col: columnIndex }
@@ -7233,7 +7238,7 @@ function createTableMergeHandlers(input) {
7233
7238
  td
7234
7239
  );
7235
7240
  const updates = { tableData: newTableData };
7236
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7241
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7237
7242
  if (newRawXml) {
7238
7243
  updates.rawXml = newRawXml;
7239
7244
  }
@@ -7248,9 +7253,9 @@ function createTableMergeHandlers(input) {
7248
7253
  return;
7249
7254
  }
7250
7255
  const td = selectedElement.tableData;
7251
- const newTableData = chunk7DGKSEIU_js.mergeCells(ts.selectedCells, td);
7256
+ const newTableData = chunk4MGJUBY7_js.mergeCells(ts.selectedCells, td);
7252
7257
  const updates = { tableData: newTableData };
7253
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7258
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7254
7259
  if (newRawXml) {
7255
7260
  updates.rawXml = newRawXml;
7256
7261
  }
@@ -7267,9 +7272,9 @@ function createTableMergeHandlers(input) {
7267
7272
  }
7268
7273
  const { rowIndex, columnIndex } = ts;
7269
7274
  const td = selectedElement.tableData;
7270
- const newTableData = chunk7DGKSEIU_js.splitCell(rowIndex, columnIndex, td);
7275
+ const newTableData = chunk4MGJUBY7_js.splitCell(rowIndex, columnIndex, td);
7271
7276
  const updates = { tableData: newTableData };
7272
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7277
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7273
7278
  if (newRawXml) {
7274
7279
  updates.rawXml = newRawXml;
7275
7280
  }
@@ -7304,7 +7309,7 @@ function createTableStructHandlers(input) {
7304
7309
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7305
7310
  }
7306
7311
  if (el.rawXml) {
7307
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7312
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7308
7313
  if (newRawXml) {
7309
7314
  updates.rawXml = newRawXml;
7310
7315
  }
@@ -7328,7 +7333,7 @@ function createTableStructHandlers(input) {
7328
7333
  const { rowIndex, columnIndex: colIndex } = ts;
7329
7334
  const updates = {};
7330
7335
  if (selectedElement.rawXml) {
7331
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateCellTextStyleInRawXml)(
7336
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateCellTextStyleInRawXml)(
7332
7337
  selectedElement,
7333
7338
  rowIndex,
7334
7339
  colIndex,
@@ -7495,7 +7500,7 @@ function useExportSaveAs(input) {
7495
7500
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7496
7501
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7497
7502
  const data = {
7498
- slides: chunk7DGKSEIU_js.buildSaveSlides(slides, templateElementsBySlideId),
7503
+ slides: chunk4MGJUBY7_js.buildSaveSlides(slides, templateElementsBySlideId),
7499
7504
  width: canvasSize.width,
7500
7505
  height: canvasSize.height,
7501
7506
  widthEmu: slideSize.widthEmu,
@@ -7653,7 +7658,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7653
7658
  }
7654
7659
  function tilesToPdfPage(tilesResult) {
7655
7660
  return tilesResult.tiles.map((tile) => ({
7656
- image: chunk7DGKSEIU_js.canvasToJpegData(tile.canvas),
7661
+ image: chunk4MGJUBY7_js.canvasToJpegData(tile.canvas),
7657
7662
  placement: pptx.placeTileOnPage(
7658
7663
  tile,
7659
7664
  tilesResult.fullWidth,
@@ -7686,7 +7691,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7686
7691
  if (pages.length === 0) {
7687
7692
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7688
7693
  }
7689
- const pdfBlobUrl = chunk7DGKSEIU_js.buildPdfFromTiledImageData(pages);
7694
+ const pdfBlobUrl = chunk4MGJUBY7_js.buildPdfFromTiledImageData(pages);
7690
7695
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7691
7696
  }
7692
7697
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7716,7 +7721,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7716
7721
  if (pages.length === 0) {
7717
7722
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7718
7723
  }
7719
- const pdfDataUrl = chunk7DGKSEIU_js.buildNotesPdf(pages);
7724
+ const pdfDataUrl = chunk4MGJUBY7_js.buildNotesPdf(pages);
7720
7725
  pptx.downloadDataUrl(pdfDataUrl, filename);
7721
7726
  }
7722
7727
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -7911,7 +7916,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7911
7916
  continue;
7912
7917
  }
7913
7918
  onProgress?.(processedCount, data.slides.length);
7914
- let svg = chunk7DGKSEIU_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7919
+ let svg = chunk4MGJUBY7_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7915
7920
  if (embedFonts && fontFaces?.length) {
7916
7921
  svg = injectFontFaces(svg, fontFaces);
7917
7922
  }
@@ -8500,10 +8505,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8500
8505
  return;
8501
8506
  }
8502
8507
  await handler.applyTheme(colorScheme, fontScheme, name);
8503
- const previousMap = theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8508
+ const previousMap = theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8504
8509
  bumpHistory();
8505
8510
  setSlides(
8506
- (slides) => (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(
8511
+ (slides) => (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(
8507
8512
  { slides, theme, themeColorMap: previousMap },
8508
8513
  colorScheme,
8509
8514
  fontScheme,
@@ -8514,8 +8519,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8514
8519
  (prev) => Object.fromEntries(
8515
8520
  Object.entries(prev).map(([id, elements]) => [
8516
8521
  id,
8517
- (0, chunk7DGKSEIU_js.dist_exports.reResolveElementFonts)(
8518
- (0, chunk7DGKSEIU_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8522
+ (0, chunk4MGJUBY7_js.dist_exports.reResolveElementFonts)(
8523
+ (0, chunk4MGJUBY7_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8519
8524
  theme?.fontScheme,
8520
8525
  fontScheme
8521
8526
  )
@@ -8573,13 +8578,13 @@ function useThemeHandlers(input) {
8573
8578
  return;
8574
8579
  }
8575
8580
  await handler.updateThemeColorScheme(colorScheme);
8576
- const previousMap = theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8577
- setSlides((prev) => (0, chunk7DGKSEIU_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8581
+ const previousMap = theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8582
+ setSlides((prev) => (0, chunk4MGJUBY7_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8578
8583
  if (Object.keys(templateElementsBySlideId).length > 0) {
8579
8584
  setTemplateElementsBySlideId((prev) => {
8580
8585
  const next = {};
8581
8586
  for (const [slideId, elements] of Object.entries(prev)) {
8582
- next[slideId] = (0, chunk7DGKSEIU_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8587
+ next[slideId] = (0, chunk4MGJUBY7_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8583
8588
  }
8584
8589
  return next;
8585
8590
  });
@@ -8690,7 +8695,7 @@ function useThemeSwitching(input) {
8690
8695
  }
8691
8696
  try {
8692
8697
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
8693
- const newData = (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8698
+ const newData = (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8694
8699
  onDataChange(newData);
8695
8700
  onThemeChanged?.(preset);
8696
8701
  } catch (error) {
@@ -8707,7 +8712,7 @@ function useThemeSwitching(input) {
8707
8712
  }
8708
8713
  try {
8709
8714
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8710
- const newData = (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8715
+ const newData = (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8711
8716
  onDataChange(newData);
8712
8717
  } catch (error) {
8713
8718
  console.error("Failed to switch to custom theme:", error);
@@ -8719,12 +8724,12 @@ function useThemeSwitching(input) {
8719
8724
  if (!data?.theme?.colorScheme) {
8720
8725
  return void 0;
8721
8726
  }
8722
- return chunk7DGKSEIU_js.dist_exports.THEME_PRESETS.find(
8723
- (p) => (0, chunk7DGKSEIU_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8727
+ return chunk4MGJUBY7_js.dist_exports.THEME_PRESETS.find(
8728
+ (p) => (0, chunk4MGJUBY7_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8724
8729
  );
8725
8730
  }, [data?.theme?.colorScheme]);
8726
8731
  return {
8727
- presets: chunk7DGKSEIU_js.dist_exports.THEME_PRESETS,
8732
+ presets: chunk4MGJUBY7_js.dist_exports.THEME_PRESETS,
8728
8733
  switchToPreset,
8729
8734
  switchToCustom,
8730
8735
  currentPreset
@@ -8801,7 +8806,7 @@ function usePropertyHandlers(input) {
8801
8806
  }
8802
8807
  try {
8803
8808
  const ab = await file.arrayBuffer();
8804
- const h = new chunk7DGKSEIU_js.dist_exports.PptxHandler();
8809
+ const h = new chunk4MGJUBY7_js.dist_exports.PptxHandler();
8805
8810
  const other = await h.load(ab);
8806
8811
  if (!other) {
8807
8812
  return;
@@ -8811,7 +8816,7 @@ function usePropertyHandlers(input) {
8811
8816
  width: canvasSize.width,
8812
8817
  height: canvasSize.height
8813
8818
  };
8814
- setCompareResult(chunk7DGKSEIU_js.comparePresentation(cur, other));
8819
+ setCompareResult(chunk4MGJUBY7_js.comparePresentation(cur, other));
8815
8820
  setIsComparePanelOpen(true);
8816
8821
  } catch (err) {
8817
8822
  console.warn("Compare failed:", err);
@@ -9164,7 +9169,7 @@ function useViewerDialogs(input) {
9164
9169
  };
9165
9170
  }
9166
9171
  function computeGridSpacingPx(documentGridSpacing) {
9167
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk7DGKSEIU_js.GRID_SIZE);
9172
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunk4MGJUBY7_js.GRID_SIZE);
9168
9173
  }
9169
9174
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
9170
9175
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -9173,7 +9178,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
9173
9178
  }
9174
9179
  function computeSlideSectionGroups(slides, sections) {
9175
9180
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
9176
- id: group.section?.id ?? (sections.length > 0 ? chunk7DGKSEIU_js.UNGROUPED_SECTION_ID : chunk7DGKSEIU_js.DEFAULT_SECTION_GROUP_ID),
9181
+ id: group.section?.id ?? (sections.length > 0 ? chunk4MGJUBY7_js.UNGROUPED_SECTION_ID : chunk4MGJUBY7_js.DEFAULT_SECTION_GROUP_ID),
9177
9182
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
9178
9183
  slideIndexes: group.slideIndexes,
9179
9184
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -9218,10 +9223,10 @@ function useDerivedSlideState(input) {
9218
9223
  );
9219
9224
  const slideSectionGroups = React17.useMemo(
9220
9225
  () => computeSlideSectionGroups(slides, sections).map((group) => {
9221
- if (group.id === chunk7DGKSEIU_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9226
+ if (group.id === chunk4MGJUBY7_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9222
9227
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
9223
9228
  }
9224
- if (group.id === chunk7DGKSEIU_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9229
+ if (group.id === chunk4MGJUBY7_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9225
9230
  return { ...group, label: t("pptx.sections.slides") };
9226
9231
  }
9227
9232
  return group;
@@ -9328,7 +9333,7 @@ function useAnnotationHandlers(input) {
9328
9333
  if (nextMode === "present") {
9329
9334
  presentation.enterPresentMode();
9330
9335
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9331
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9336
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9332
9337
  if (promptKeepInkAnnotations) {
9333
9338
  pendingModeAfterAnnotationsRef.current = nextMode;
9334
9339
  setShowKeepAnnotationsDialog(true);
@@ -9338,7 +9343,7 @@ function useAnnotationHandlers(input) {
9338
9343
  }
9339
9344
  } else {
9340
9345
  if (mode === "present") {
9341
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9346
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9342
9347
  }
9343
9348
  setMode(nextMode);
9344
9349
  }
@@ -9409,7 +9414,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
9409
9414
  (slide) => !elementId ? slide : {
9410
9415
  ...slide,
9411
9416
  elements: slide.elements.map(
9412
- (element) => element.id === elementId && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) ? {
9417
+ (element) => element.id === elementId && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) ? {
9413
9418
  ...element,
9414
9419
  text,
9415
9420
  textSegments: pptx.remapTextToSegments(
@@ -9497,14 +9502,14 @@ function useSerialize(input) {
9497
9502
  const pptxGuides = guides.map((g) => ({
9498
9503
  id: g.id,
9499
9504
  orientation: g.axis === "h" ? "horz" : "vert",
9500
- positionEmu: (0, chunk7DGKSEIU_js.dist_exports.guidePxToEmu)(g.position)
9505
+ positionEmu: (0, chunk4MGJUBY7_js.dist_exports.guidePxToEmu)(g.position)
9501
9506
  }));
9502
9507
  return {
9503
9508
  ...slide,
9504
9509
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9505
9510
  };
9506
9511
  });
9507
- const slidesToSave = chunk7DGKSEIU_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9512
+ const slidesToSave = chunk4MGJUBY7_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9508
9513
  const saveOptions = pptx.buildDeckSaveOptions({
9509
9514
  // Without this the Slide Size card edited a viewer-only pixel value and
9510
9515
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9685,7 +9690,7 @@ function usePresentationSetup(input) {
9685
9690
  return;
9686
9691
  }
9687
9692
  if (mode === "present" && nextMode !== "present") {
9688
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9693
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9689
9694
  stopAnimationSound();
9690
9695
  const exitHandler = exitModeHandlerRef.current;
9691
9696
  if (exitHandler) {
@@ -9806,12 +9811,12 @@ function useCanvasImagePaste(input) {
9806
9811
  );
9807
9812
  }
9808
9813
  function formatPatchFor(element, format) {
9809
- const updated = chunk7DGKSEIU_js.applyFormatToElement(element, format);
9814
+ const updated = chunk4MGJUBY7_js.applyFormatToElement(element, format);
9810
9815
  const updates = {};
9811
- if ((0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(updated)) {
9816
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(updated)) {
9812
9817
  updates.shapeStyle = updated.shapeStyle;
9813
9818
  }
9814
- if ((0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(updated)) {
9819
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(updated)) {
9815
9820
  updates.textStyle = updated.textStyle;
9816
9821
  }
9817
9822
  return updates;
@@ -9829,7 +9834,7 @@ function useFormatPainterEditing(input) {
9829
9834
  const prevFormatPainterRef = React17.useRef(false);
9830
9835
  React17.useEffect(() => {
9831
9836
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9832
- copiedFormatRef.current = chunk7DGKSEIU_js.copyFormatFromElement(selectedElement);
9837
+ copiedFormatRef.current = chunk4MGJUBY7_js.copyFormatFromElement(selectedElement);
9833
9838
  } else if (!formatPainterActive) {
9834
9839
  copiedFormatRef.current = null;
9835
9840
  }
@@ -10535,6 +10540,7 @@ function useContentLifecycle(input) {
10535
10540
  setCanvasSize: state.setCanvasSize,
10536
10541
  setSlideSizeEmu: state.setSlideSizeEmu,
10537
10542
  setHeaderFooter: state.setHeaderFooter,
10543
+ setFirstSlideNumber: state.setFirstSlideNumber,
10538
10544
  setLayoutOptions: state.setLayoutOptions,
10539
10545
  setSlideMasters: state.setSlideMasters,
10540
10546
  setModernCommentAuthors: state.setModernCommentAuthors,
@@ -10918,7 +10924,7 @@ function useKeyboardShortcutWiring(input) {
10918
10924
  }
10919
10925
  function stepSelectedFontSize(state, ops, direction) {
10920
10926
  const selected = state.selectedElement;
10921
- const currentPx = (selected && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10927
+ const currentPx = (selected && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10922
10928
  const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
10923
10929
  ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
10924
10930
  }
@@ -11469,7 +11475,7 @@ function useCollaborationWriteBack(input) {
11469
11475
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11470
11476
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11471
11477
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11472
- mergeTemplateElements: chunk7DGKSEIU_js.buildSaveSlides
11478
+ mergeTemplateElements: chunk4MGJUBY7_js.buildSaveSlides
11473
11479
  }),
11474
11480
  [latest]
11475
11481
  );
@@ -12022,8 +12028,8 @@ function useTouchGestures(input) {
12022
12028
  }
12023
12029
  const recognizer = pptx.createTouchGestureRecognizer({
12024
12030
  getScale: () => scaleRef.current,
12025
- minScale: chunk7DGKSEIU_js.MIN_ZOOM_SCALE,
12026
- maxScale: chunk7DGKSEIU_js.MAX_ZOOM_SCALE,
12031
+ minScale: chunk4MGJUBY7_js.MIN_ZOOM_SCALE,
12032
+ maxScale: chunk4MGJUBY7_js.MAX_ZOOM_SCALE,
12027
12033
  callbacks: {
12028
12034
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
12029
12035
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -12139,14 +12145,15 @@ function buildCanvasProps(input) {
12139
12145
  const fieldContext = pptx.buildFieldSubstitutionContext({
12140
12146
  headerFooter: s.headerFooter,
12141
12147
  customProperties: s.customProperties,
12142
- slide: activeSlide
12148
+ slide: activeSlide,
12149
+ firstSlideNumber: s.firstSlideNumber
12143
12150
  });
12144
12151
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
12145
12152
  const openExternalUrl = (url, target) => {
12146
12153
  if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
12147
12154
  return;
12148
12155
  }
12149
- chunk7DGKSEIU_js.safeOpenUrl(url, target);
12156
+ chunk4MGJUBY7_js.safeOpenUrl(url, target);
12150
12157
  };
12151
12158
  const handleActionClick = (elementId, action) => {
12152
12159
  if (mode === "present") {
@@ -12161,9 +12168,9 @@ function buildCanvasProps(input) {
12161
12168
  }
12162
12169
  };
12163
12170
  const handleHyperlinkClick = (url, target) => {
12164
- if (chunk7DGKSEIU_js.isPpactionUrl(url)) {
12171
+ if (chunk4MGJUBY7_js.isPpactionUrl(url)) {
12165
12172
  if (mode === "present") {
12166
- const parsed = chunk7DGKSEIU_js.parsePpactionUrl(url);
12173
+ const parsed = chunk4MGJUBY7_js.parsePpactionUrl(url);
12167
12174
  if (parsed) {
12168
12175
  presentation.handlePresentationAction({
12169
12176
  action: parsed.action,
@@ -12556,7 +12563,7 @@ function buildToolbarProps(input) {
12556
12563
  isCommentsPanelOpen: s.isInspectorPaneOpen,
12557
12564
  slideCommentCount: activeSlide?.comments?.length ?? 0,
12558
12565
  formatPainterActive: s.formatPainterActive,
12559
- canActivateFormatPainter: chunk7DGKSEIU_js.hasCopyableFormat(selectedElement),
12566
+ canActivateFormatPainter: chunk4MGJUBY7_js.hasCopyableFormat(selectedElement),
12560
12567
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12561
12568
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12562
12569
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12877,7 +12884,7 @@ function useViewerBuildingBlocksCore(input) {
12877
12884
  documentGridSpacing: state.viewProperties?.gridSpacing
12878
12885
  });
12879
12886
  const themeColorMap = React17.useMemo(
12880
- () => state.theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12887
+ () => state.theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12881
12888
  [state.theme?.colorScheme]
12882
12889
  );
12883
12890
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -13452,23 +13459,23 @@ function ColorChangedImage({
13452
13459
  className,
13453
13460
  alt
13454
13461
  }) {
13455
- const tolerance = tolerancePct ?? chunk7DGKSEIU_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13456
- const cacheKey = chunk7DGKSEIU_js.buildCacheKey(
13462
+ const tolerance = tolerancePct ?? chunk4MGJUBY7_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13463
+ const cacheKey = chunk4MGJUBY7_js.buildCacheKey(
13457
13464
  src,
13458
13465
  clrChange.clrFrom,
13459
13466
  clrChange.clrTo,
13460
13467
  tolerance,
13461
13468
  Boolean(clrChange.clrToTransparent)
13462
13469
  );
13463
- const cached = chunk7DGKSEIU_js.getCachedResult(cacheKey);
13470
+ const cached = chunk4MGJUBY7_js.getCachedResult(cacheKey);
13464
13471
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13465
13472
  React17.useEffect(() => {
13466
- if (chunk7DGKSEIU_js.getCachedResult(cacheKey)) {
13467
- setProcessedSrc(chunk7DGKSEIU_js.getCachedResult(cacheKey) ?? null);
13473
+ if (chunk4MGJUBY7_js.getCachedResult(cacheKey)) {
13474
+ setProcessedSrc(chunk4MGJUBY7_js.getCachedResult(cacheKey) ?? null);
13468
13475
  return;
13469
13476
  }
13470
13477
  let cancelled = false;
13471
- chunk7DGKSEIU_js.applyColorChange(
13478
+ chunk4MGJUBY7_js.applyColorChange(
13472
13479
  src,
13473
13480
  clrChange.clrFrom,
13474
13481
  clrChange.clrTo,
@@ -13476,7 +13483,7 @@ function ColorChangedImage({
13476
13483
  Boolean(clrChange.clrToTransparent)
13477
13484
  ).then((result) => {
13478
13485
  if (!cancelled) {
13479
- chunk7DGKSEIU_js.setCachedResult(cacheKey, result.dataUrl);
13486
+ chunk4MGJUBY7_js.setCachedResult(cacheKey, result.dataUrl);
13480
13487
  setProcessedSrc(result.dataUrl);
13481
13488
  }
13482
13489
  return void 0;
@@ -13568,7 +13575,7 @@ function TiledImageLayer({
13568
13575
  cancelled = true;
13569
13576
  };
13570
13577
  }, [src]);
13571
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk7DGKSEIU_js.getImageTilingStyle(element, nativeSize), ...style } });
13578
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk4MGJUBY7_js.getImageTilingStyle(element, nativeSize), ...style } });
13572
13579
  }
13573
13580
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13574
13581
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13637,7 +13644,7 @@ function renderImg(el, style, filter, alt, opacity) {
13637
13644
  ...filter ? { filter } : {},
13638
13645
  ...opacity !== void 0 ? { opacity } : {}
13639
13646
  };
13640
- if (chunk7DGKSEIU_js.isImageTiled(el)) {
13647
+ if (chunk4MGJUBY7_js.isImageTiled(el)) {
13641
13648
  const tileSrc = imgSrc(el);
13642
13649
  if (!tileSrc) {
13643
13650
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
@@ -13656,12 +13663,12 @@ function renderImg(el, style, filter, alt, opacity) {
13656
13663
  ] });
13657
13664
  }
13658
13665
  const colorWash = pptx.getImageColorWashStyle(
13659
- (0, chunk7DGKSEIU_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13666
+ (0, chunk4MGJUBY7_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13660
13667
  );
13661
13668
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13662
- const duotoneColors = chunk7DGKSEIU_js.getDuotoneColors(el);
13669
+ const duotoneColors = chunk4MGJUBY7_js.getDuotoneColors(el);
13663
13670
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13664
- const filterForImg = useDuotoneCanvas ? chunk7DGKSEIU_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13671
+ const filterForImg = useDuotoneCanvas ? chunk4MGJUBY7_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13665
13672
  const canvasEffectStyles = {
13666
13673
  ...filterForImg ? { filter: filterForImg } : {},
13667
13674
  ...opacity !== void 0 ? { opacity } : {}
@@ -13737,10 +13744,10 @@ function SlideBackgroundImageLayer({
13737
13744
  style: { zIndex: 0 },
13738
13745
  children: renderImg(
13739
13746
  backgroundElement,
13740
- chunk7DGKSEIU_js.getImageRenderStyle(backgroundElement),
13741
- chunk7DGKSEIU_js.getImageEffectsFilter(backgroundElement),
13747
+ chunk4MGJUBY7_js.getImageRenderStyle(backgroundElement),
13748
+ chunk4MGJUBY7_js.getImageEffectsFilter(backgroundElement),
13742
13749
  "",
13743
- chunk7DGKSEIU_js.getImageEffectsOpacity(backgroundElement)
13750
+ chunk4MGJUBY7_js.getImageEffectsOpacity(backgroundElement)
13744
13751
  )
13745
13752
  }
13746
13753
  );
@@ -14011,7 +14018,7 @@ function ChartElementView({
14011
14018
  pptx.getBarFacePicturePixelSampleVersion
14012
14019
  );
14013
14020
  const viewModel = React17.useMemo(() => {
14014
- return canEdit ? chunk7DGKSEIU_js.buildReactChartViewModel(element) : null;
14021
+ return canEdit ? chunk4MGJUBY7_js.buildReactChartViewModel(element) : null;
14015
14022
  }, [canEdit, element, barFacePictureSampleVersion]);
14016
14023
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
14017
14024
  React17.useEffect(() => {
@@ -14096,9 +14103,9 @@ function ChartElementView({
14096
14103
  textStyle: animationState?.textStyle,
14097
14104
  onSelect: chart3D.onSelect,
14098
14105
  onDrag: chart3D.onDrag,
14099
- children: chunk7DGKSEIU_js.renderChartElement(renderedElement)
14106
+ children: chunk4MGJUBY7_js.renderChartElement(renderedElement)
14100
14107
  }
14101
- ) : chunk7DGKSEIU_js.renderChartElement(renderedElement),
14108
+ ) : chunk4MGJUBY7_js.renderChartElement(renderedElement),
14102
14109
  dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: pptx.formatAxisValue(dragValue) }),
14103
14110
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
14104
14111
  "input",
@@ -14428,7 +14435,7 @@ function ResizeHandles({
14428
14435
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14429
14436
  "data-pptx-handle-kind": "resize",
14430
14437
  "data-pptx-compact": true,
14431
- className: chunk7DGKSEIU_js.cn(
14438
+ className: chunk4MGJUBY7_js.cn(
14432
14439
  "absolute z-10 group border-0 bg-transparent p-0",
14433
14440
  RESIZE_DEFAULT_CLASSES,
14434
14441
  posClass,
@@ -14454,7 +14461,7 @@ function ResizeHandles({
14454
14461
  "div",
14455
14462
  {
14456
14463
  "data-pptx-handle-hit": true,
14457
- className: chunk7DGKSEIU_js.cn(
14464
+ className: chunk4MGJUBY7_js.cn(
14458
14465
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14459
14466
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14460
14467
  ),
@@ -14475,7 +14482,7 @@ function ResizeHandles({
14475
14482
  "aria-label": t("pptx.selectionOverlay.rotate"),
14476
14483
  "data-pptx-handle-kind": "rotate",
14477
14484
  "data-pptx-compact": true,
14478
- className: chunk7DGKSEIU_js.cn(
14485
+ className: chunk4MGJUBY7_js.cn(
14479
14486
  "absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 border-0 bg-transparent p-0 cursor-grab active:cursor-grabbing",
14480
14487
  ROTATE_DEFAULT_CLASSES
14481
14488
  ),
@@ -14545,17 +14552,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
14545
14552
  animationState,
14546
14553
  textStyleOverrideCss
14547
14554
  }) {
14548
- const shapeEl = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14555
+ const shapeEl = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14549
14556
  const viewWidth = Math.max(el.width, 0);
14550
14557
  const viewHeight = Math.max(el.height, 0);
14551
14558
  const svgWidth = Math.max(el.width, 1);
14552
14559
  const svgHeight = Math.max(el.height, 1);
14553
14560
  const ss = shapeEl?.shapeStyle;
14554
14561
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14555
- const strokeColor = chunk7DGKSEIU_js.normalizeHexColor(ss?.strokeColor, chunk7DGKSEIU_js.DEFAULT_STROKE_COLOR);
14556
- const strokePaint = chunk7DGKSEIU_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14557
- const dashType = chunk7DGKSEIU_js.normalizeStrokeDashType(ss?.strokeDash);
14558
- const dashArray = chunk7DGKSEIU_js.getSvgStrokeDasharray(
14562
+ const strokeColor = chunk4MGJUBY7_js.normalizeHexColor(ss?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
14563
+ const strokePaint = chunk4MGJUBY7_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14564
+ const dashType = chunk4MGJUBY7_js.normalizeStrokeDashType(ss?.strokeDash);
14565
+ const dashArray = chunk4MGJUBY7_js.getSvgStrokeDasharray(
14559
14566
  dashType,
14560
14567
  Math.max(strokeWidth, 1),
14561
14568
  ss?.customDashSegments
@@ -14566,14 +14573,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14566
14573
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14567
14574
  const startMarkerId = `${markerSeed}-sel-start`;
14568
14575
  const endMarkerId = `${markerSeed}-sel-end`;
14569
- const compoundOffsets = chunk7DGKSEIU_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14570
- const compoundWidths = chunk7DGKSEIU_js.getCompoundLineWidths(compoundLine, strokeWidth);
14576
+ const compoundOffsets = chunk4MGJUBY7_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14577
+ const compoundWidths = chunk4MGJUBY7_js.getCompoundLineWidths(compoundLine, strokeWidth);
14571
14578
  const strokeCap = pptx.svgLineCap(ss?.lineCap);
14572
- const textEl = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14579
+ const textEl = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14573
14580
  const connectorText = textEl?.text?.trim() ?? "";
14574
14581
  const connectorTextSegments = textEl?.textSegments;
14575
14582
  const connectorTextStyle = textEl?.textStyle;
14576
- const pathGeometry = shapeEl ? chunk7DGKSEIU_js.getConnectorPathGeometry(shapeEl) : {
14583
+ const pathGeometry = shapeEl ? chunk4MGJUBY7_js.getConnectorPathGeometry(shapeEl) : {
14577
14584
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14578
14585
  startX: 0,
14579
14586
  startY: 0,
@@ -14582,16 +14589,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
14582
14589
  };
14583
14590
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14584
14591
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14585
- const lineShadow = chunk7DGKSEIU_js.buildLineShadowCss(el);
14586
- const lineGlow = chunk7DGKSEIU_js.buildLineGlowFilter(el);
14592
+ const lineShadow = chunk4MGJUBY7_js.buildLineShadowCss(el);
14593
+ const lineGlow = chunk4MGJUBY7_js.buildLineGlowFilter(el);
14587
14594
  return /* @__PURE__ */ jsxRuntime.jsxs(
14588
14595
  "div",
14589
14596
  {
14590
14597
  "data-pptx-element": "true",
14591
14598
  "data-element-id": el.id,
14592
- role: chunk7DGKSEIU_js.getAriaRole(el, { actionable: false }),
14593
- "aria-label": chunk7DGKSEIU_js.getAriaLabel(el),
14594
- "aria-roledescription": chunk7DGKSEIU_js.getAriaRoleDescription(el),
14599
+ role: chunk4MGJUBY7_js.getAriaRole(el, { actionable: false }),
14600
+ "aria-label": chunk4MGJUBY7_js.getAriaLabel(el),
14601
+ "aria-roledescription": chunk4MGJUBY7_js.getAriaRoleDescription(el),
14595
14602
  "aria-selected": isSelected ? true : void 0,
14596
14603
  className: "absolute",
14597
14604
  style: {
@@ -14624,14 +14631,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14624
14631
  style: { overflow: "visible", pointerEvents: "none" },
14625
14632
  children: [
14626
14633
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14627
- chunk7DGKSEIU_js.renderConnectorMarker(
14634
+ chunk4MGJUBY7_js.renderConnectorMarker(
14628
14635
  startMarkerId,
14629
14636
  startArrow,
14630
14637
  strokePaint,
14631
14638
  ss?.connectorStartArrowWidth,
14632
14639
  ss?.connectorStartArrowLength
14633
14640
  ),
14634
- chunk7DGKSEIU_js.renderConnectorMarker(
14641
+ chunk4MGJUBY7_js.renderConnectorMarker(
14635
14642
  endMarkerId,
14636
14643
  endArrow,
14637
14644
  strokePaint,
@@ -14837,14 +14844,14 @@ function getElementInteractionProps({
14837
14844
  };
14838
14845
  }
14839
14846
  function renderDagDuotoneFilterForElement(el) {
14840
- if (!chunk7DGKSEIU_js.hasDagDuotoneEffect(el)) {
14847
+ if (!chunk4MGJUBY7_js.hasDagDuotoneEffect(el)) {
14841
14848
  return null;
14842
14849
  }
14843
14850
  const duotone = el.shapeStyle?.dagDuotone;
14844
14851
  if (!duotone) {
14845
14852
  return null;
14846
14853
  }
14847
- return chunk7DGKSEIU_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14854
+ return chunk4MGJUBY7_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14848
14855
  }
14849
14856
  function getContainerStyle({
14850
14857
  el,
@@ -14857,7 +14864,7 @@ function getContainerStyle({
14857
14864
  has3DExtrusion,
14858
14865
  templateEditing
14859
14866
  }) {
14860
- const ss = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14867
+ const ss = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14861
14868
  const isPicture = el.type === "picture" || el.type === "image";
14862
14869
  const blurGrowVisible = Boolean(
14863
14870
  ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
@@ -14871,10 +14878,10 @@ function getContainerStyle({
14871
14878
  top: isFullscreenMedia ? fs.top : el.y,
14872
14879
  width: isFullscreenMedia ? fs.width : painted.width,
14873
14880
  ...heightStyle,
14874
- transform: isFullscreenMedia ? fs.transform : chunk7DGKSEIU_js.getElementTransform(el),
14881
+ transform: isFullscreenMedia ? fs.transform : chunk4MGJUBY7_js.getElementTransform(el),
14875
14882
  transformOrigin: "center",
14876
14883
  overflow: overflowValue,
14877
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk7DGKSEIU_js.getCropShapeClipPath(el) : void 0,
14884
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk4MGJUBY7_js.getCropShapeClipPath(el) : void 0,
14878
14885
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
14879
14886
  visibility: animationState?.visible === false ? "hidden" : "visible",
14880
14887
  animation: animationState?.cssAnimation,
@@ -14897,7 +14904,10 @@ function getContainerStyle({
14897
14904
  // bindings multiply the two; React spread the shape style over its own
14898
14905
  // `opacity` key, so a half-transparent element carrying a DAG alpha
14899
14906
  // rendered at the DAG's alpha alone.
14900
- opacity: typeof shapeVisualStyle.opacity === "number" ? (opacity ?? 1) * shapeVisualStyle.opacity : opacity,
14907
+ opacity: pptx.getAnimationOpacity(
14908
+ animationState,
14909
+ typeof shapeVisualStyle.opacity === "number" ? (opacity ?? 1) * shapeVisualStyle.opacity : opacity
14910
+ ),
14901
14911
  // Editable-template affordance: a distinct amber dashed ring + slight
14902
14912
  // transparency so inherited master/layout shapes read as "template" while
14903
14913
  // edit-template mode is on. Applied after the shape style so it wins; never
@@ -14906,11 +14916,11 @@ function getContainerStyle({
14906
14916
  };
14907
14917
  }
14908
14918
  function shapeParams(element) {
14909
- const style = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
14919
+ const style = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
14910
14920
  const strokeWidth = pptx.paintedStrokeWidth(style);
14911
- const strokeColor = chunk7DGKSEIU_js.normalizeHexColor(style?.strokeColor, chunk7DGKSEIU_js.DEFAULT_STROKE_COLOR);
14912
- const fillColor = chunk7DGKSEIU_js.normalizeHexColor(style?.fillColor, chunk7DGKSEIU_js.DEFAULT_FILL_COLOR);
14913
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk7DGKSEIU_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14921
+ const strokeColor = chunk4MGJUBY7_js.normalizeHexColor(style?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
14922
+ const fillColor = chunk4MGJUBY7_js.normalizeHexColor(style?.fillColor, chunk4MGJUBY7_js.DEFAULT_FILL_COLOR);
14923
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk4MGJUBY7_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14914
14924
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
14915
14925
  }
14916
14926
  var Extrusion3DOverlay = React17__default.default.memo(
@@ -15015,7 +15025,7 @@ function ShapeEffectOverlay({
15015
15025
  const fillOverlayStyle = overlay ? {
15016
15026
  position: "absolute",
15017
15027
  inset: 0,
15018
- ...(0, chunk7DGKSEIU_js.dist_exports.isImageLikeElement)(element) ? chunk7DGKSEIU_js.getImageSurfaceMaskStyle(element) : {},
15028
+ ...(0, chunk4MGJUBY7_js.dist_exports.isImageLikeElement)(element) ? chunk4MGJUBY7_js.getImageSurfaceMaskStyle(element) : {},
15019
15029
  background: overlay.color,
15020
15030
  mixBlendMode: overlay.blendMode,
15021
15031
  pointerEvents: "none"
@@ -15216,12 +15226,13 @@ var ElementRenderer = React17__default.default.memo(
15216
15226
  const chartUpdateHandler = smartArtUpdateHandler;
15217
15227
  const { hf, fc, sw, sc } = shapeParams(el);
15218
15228
  const allow = pptx.resolveElementInteractivity(el);
15219
- const backgroundAnimationState = presentationElementStates?.get(`${el.id}::pptx-bg`);
15229
+ const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15230
+ const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15220
15231
  const visualAnimationState = backgroundAnimationState ?? animationState;
15221
- const isTxt = chunk7DGKSEIU_js.isEditableTextElement(el) && allow.textEditable;
15222
- const txtSE = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15232
+ const isTxt = chunk4MGJUBY7_js.isEditableTextElement(el) && allow.textEditable;
15233
+ const txtSE = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15223
15234
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15224
- const ss = chunk7DGKSEIU_js.getShapeVisualStyle(
15235
+ const ss = chunk4MGJUBY7_js.getShapeVisualStyle(
15225
15236
  el,
15226
15237
  hf,
15227
15238
  fc,
@@ -15230,9 +15241,9 @@ var ElementRenderer = React17__default.default.memo(
15230
15241
  visualAnimationState?.animatesFill,
15231
15242
  visualAnimationState?.animatesStroke
15232
15243
  );
15233
- const ts = chunk7DGKSEIU_js.getTextStyleForElement(el, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR);
15244
+ const ts = chunk4MGJUBY7_js.getTextStyleForElement(el, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR);
15234
15245
  const isImg = el.type === "picture" || el.type === "image";
15235
- const vs = chunk7DGKSEIU_js.renderVectorShape(
15246
+ const vs = chunk4MGJUBY7_js.renderVectorShape(
15236
15247
  el,
15237
15248
  isImg ? false : hf,
15238
15249
  fc,
@@ -15242,10 +15253,10 @@ var ElementRenderer = React17__default.default.memo(
15242
15253
  visualAnimationState?.animatesStroke
15243
15254
  );
15244
15255
  const isModel3D = el.type === "model3d";
15245
- const isConn = chunk7DGKSEIU_js.isConnectorOrLineElement(el);
15246
- const shapeStyle3d = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15256
+ const isConn = chunk4MGJUBY7_js.isConnectorOrLineElement(el);
15257
+ const shapeStyle3d = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15247
15258
  const extrusionData = React17.useMemo(
15248
- () => chunk7DGKSEIU_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15259
+ () => chunk4MGJUBY7_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15249
15260
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15250
15261
  );
15251
15262
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15298,6 +15309,7 @@ var ElementRenderer = React17__default.default.memo(
15298
15309
  });
15299
15310
  const hitTargetStyle = pptx.shouldRenderHitTarget(effectiveCanInteract, isPresentationPassive) ? pptx.elementHitTargetStyle(el) : void 0;
15300
15311
  const isFocusable = effectiveCanInteract || isActionable;
15312
+ const backgroundLayerStyle = backgroundAnimationState ? pptx.getShapeEffectAnimationLayerStyle(el, ss, backgroundAnimationState) : void 0;
15301
15313
  const containerStyle = getContainerStyle({
15302
15314
  el,
15303
15315
  isFullscreenMedia,
@@ -15334,7 +15346,7 @@ var ElementRenderer = React17__default.default.memo(
15334
15346
  "aria-hidden": aria.hidden ? true : void 0,
15335
15347
  "aria-selected": isSelected ? true : void 0,
15336
15348
  tabIndex: isFocusable ? 0 : -1,
15337
- className: chunk7DGKSEIU_js.cn(
15349
+ className: chunk4MGJUBY7_js.cn(
15338
15350
  "absolute",
15339
15351
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15340
15352
  cur,
@@ -15376,34 +15388,19 @@ var ElementRenderer = React17__default.default.memo(
15376
15388
  style: hitTargetStyle
15377
15389
  }
15378
15390
  ),
15379
- backgroundAnimationState ? /* @__PURE__ */ jsxRuntime.jsxs(
15380
- "div",
15381
- {
15382
- "data-pptx-animation-layer": "background",
15383
- style: {
15384
- ...ss,
15385
- position: "absolute",
15386
- inset: 0,
15387
- transformOrigin: "center",
15388
- visibility: backgroundAnimationState.visible === false ? "hidden" : "visible",
15389
- animation: backgroundAnimationState.cssAnimation,
15390
- pointerEvents: "none"
15391
- },
15392
- children: [
15393
- /* @__PURE__ */ jsxRuntime.jsx(
15394
- ShapeEffectOverlay,
15395
- {
15396
- element: el,
15397
- animatesFill: visualAnimationState?.animatesFill,
15398
- animatesStroke: visualAnimationState?.animatesStroke
15399
- }
15400
- ),
15401
- extrusionData.hasExtrusion && /* @__PURE__ */ jsxRuntime.jsx(Extrusion3DOverlay, { data: extrusionData }),
15402
- isImg ? null : vs
15403
- ]
15404
- }
15405
- ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15406
- !isImg && /* @__PURE__ */ jsxRuntime.jsx(
15391
+ backgroundAnimationState && effectPlacement.beforeBody ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-animation-layer": "background", style: backgroundLayerStyle, children: [
15392
+ /* @__PURE__ */ jsxRuntime.jsx(
15393
+ ShapeEffectOverlay,
15394
+ {
15395
+ element: el,
15396
+ animatesFill: visualAnimationState?.animatesFill,
15397
+ animatesStroke: visualAnimationState?.animatesStroke
15398
+ }
15399
+ ),
15400
+ extrusionData.hasExtrusion && /* @__PURE__ */ jsxRuntime.jsx(Extrusion3DOverlay, { data: extrusionData }),
15401
+ isImg ? null : vs
15402
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15403
+ effectPlacement.beforeBody && /* @__PURE__ */ jsxRuntime.jsx(
15407
15404
  ShapeEffectOverlay,
15408
15405
  {
15409
15406
  element: el,
@@ -15422,9 +15419,9 @@ var ElementRenderer = React17__default.default.memo(
15422
15419
  txtSE,
15423
15420
  txtS: ts,
15424
15421
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15425
- imgStyle: chunk7DGKSEIU_js.getImageRenderStyle(el),
15426
- imgFilter: chunk7DGKSEIU_js.getImageEffectsFilter(el),
15427
- imgOpacity: chunk7DGKSEIU_js.getImageEffectsOpacity(el),
15422
+ imgStyle: chunk4MGJUBY7_js.getImageRenderStyle(el),
15423
+ imgFilter: chunk4MGJUBY7_js.getImageEffectsFilter(el),
15424
+ imgOpacity: chunk4MGJUBY7_js.getImageEffectsOpacity(el),
15428
15425
  imgAlt: imageAltText,
15429
15426
  isTxtEl: isTxt,
15430
15427
  media: mediaDataUrls,
@@ -15476,12 +15473,19 @@ var ElementRenderer = React17__default.default.memo(
15476
15473
  onUpdateChartElement: chartUpdateHandler,
15477
15474
  onFormatText
15478
15475
  }),
15479
- isImg && !backgroundAnimationState && /* @__PURE__ */ jsxRuntime.jsx(
15480
- ShapeEffectOverlay,
15476
+ effectPlacement.afterBody && /* @__PURE__ */ jsxRuntime.jsx(
15477
+ "div",
15481
15478
  {
15482
- element: el,
15483
- animatesFill: visualAnimationState?.animatesFill,
15484
- animatesStroke: visualAnimationState?.animatesStroke
15479
+ "data-pptx-animation-layer": backgroundAnimationState ? "background" : void 0,
15480
+ style: backgroundLayerStyle ?? { display: "contents" },
15481
+ children: /* @__PURE__ */ jsxRuntime.jsx(
15482
+ ShapeEffectOverlay,
15483
+ {
15484
+ element: el,
15485
+ animatesFill: visualAnimationState?.animatesFill,
15486
+ animatesStroke: visualAnimationState?.animatesStroke
15487
+ }
15488
+ )
15485
15489
  }
15486
15490
  ),
15487
15491
  /* @__PURE__ */ jsxRuntime.jsx(ActionAffordances, { affordance: actionAffordance })
@@ -15554,10 +15558,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15554
15558
  }
15555
15559
  function renderInk(el, options) {
15556
15560
  const replay = options?.replay ?? false;
15557
- const strokes = chunk7DGKSEIU_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15561
+ const strokes = chunk4MGJUBY7_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15558
15562
  strokes.some((s) => s.circles || s.nibMarks);
15559
15563
  const pressureSensitive = options?.pressureSensitive;
15560
- const replayStyles = replay ? chunk7DGKSEIU_js.getInkReplayStyles(el, options?.replayConfig) : null;
15564
+ const replayStyles = replay ? chunk4MGJUBY7_js.getInkReplayStyles(el, options?.replayConfig) : null;
15561
15565
  return /* @__PURE__ */ jsxRuntime.jsxs(
15562
15566
  "svg",
15563
15567
  {
@@ -15565,7 +15569,7 @@ function renderInk(el, options) {
15565
15569
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15566
15570
  preserveAspectRatio: "none",
15567
15571
  children: [
15568
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk7DGKSEIU_js.INK_REPLAY_KEYFRAMES }),
15572
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk4MGJUBY7_js.INK_REPLAY_KEYFRAMES }),
15569
15573
  strokes.map(
15570
15574
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15571
15575
  )
@@ -15576,7 +15580,7 @@ function renderInk(el, options) {
15576
15580
  function renderGroup(children, parentGroupFill) {
15577
15581
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15578
15582
  const { hf, fc, sw, sc } = shapeParams(c);
15579
- const baseSs = chunk7DGKSEIU_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15583
+ const baseSs = chunk4MGJUBY7_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15580
15584
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15581
15585
  const ss = inheritedFill ? {
15582
15586
  ...baseSs,
@@ -15587,9 +15591,9 @@ function renderGroup(children, parentGroupFill) {
15587
15591
  backgroundPosition: inheritedFill.backgroundPosition
15588
15592
  } : baseSs;
15589
15593
  const isI = c.type === "picture" || c.type === "image";
15590
- const vs = chunk7DGKSEIU_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15591
- const ts = chunk7DGKSEIU_js.getTextStyleForElement(c, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR);
15592
- const isTxt = chunk7DGKSEIU_js.isEditableTextElement(c);
15594
+ const vs = chunk4MGJUBY7_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15595
+ const ts = chunk4MGJUBY7_js.getTextStyleForElement(c, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR);
15596
+ const isTxt = chunk4MGJUBY7_js.isEditableTextElement(c);
15593
15597
  return /* @__PURE__ */ jsxRuntime.jsxs(
15594
15598
  "div",
15595
15599
  {
@@ -15598,9 +15602,9 @@ function renderGroup(children, parentGroupFill) {
15598
15602
  style: {
15599
15603
  left: c.x,
15600
15604
  top: c.y,
15601
- width: Math.max(c.width, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE),
15602
- height: Math.max(c.height, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE),
15603
- transform: chunk7DGKSEIU_js.getElementTransform(c),
15605
+ width: Math.max(c.width, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE),
15606
+ height: Math.max(c.height, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE),
15607
+ transform: chunk4MGJUBY7_js.getElementTransform(c),
15604
15608
  transformOrigin: "center",
15605
15609
  ...ss,
15606
15610
  ...isI ? {
@@ -15625,8 +15629,8 @@ function renderGroup(children, parentGroupFill) {
15625
15629
  // A nested group: recurse, chaining the inherited fill so a
15626
15630
  // `grpFill` shape under a fill-less sub-group still paints.
15627
15631
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15628
- ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk7DGKSEIU_js.getImageSurfaceStyle(c), children: [
15629
- chunk7DGKSEIU_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15632
+ ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk4MGJUBY7_js.getImageSurfaceStyle(c), children: [
15633
+ chunk4MGJUBY7_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15630
15634
  TiledImageLayer,
15631
15635
  {
15632
15636
  element: c,
@@ -15639,7 +15643,7 @@ function renderGroup(children, parentGroupFill) {
15639
15643
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15640
15644
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15641
15645
  className: "pointer-events-none select-none",
15642
- style: chunk7DGKSEIU_js.getImageRenderStyle(c),
15646
+ style: chunk4MGJUBY7_js.getImageRenderStyle(c),
15643
15647
  draggable: false
15644
15648
  }
15645
15649
  ),
@@ -15651,7 +15655,7 @@ function renderGroup(children, parentGroupFill) {
15651
15655
  {
15652
15656
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15653
15657
  style: ts,
15654
- children: chunk7DGKSEIU_js.renderTextSegments(c, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR)
15658
+ children: chunk4MGJUBY7_js.renderTextSegments(c, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR)
15655
15659
  }
15656
15660
  ) : null
15657
15661
  ] })
@@ -15665,8 +15669,8 @@ function renderContentPart(el, options) {
15665
15669
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15666
15670
  const replay = options?.replay ?? false;
15667
15671
  const pressureSensitive = options?.pressureSensitive ?? true;
15668
- const strokes = chunk7DGKSEIU_js.buildContentPartStrokes(el);
15669
- const replayStyles = replay ? chunk7DGKSEIU_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15672
+ const strokes = chunk4MGJUBY7_js.buildContentPartStrokes(el);
15673
+ const replayStyles = replay ? chunk4MGJUBY7_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15670
15674
  return /* @__PURE__ */ jsxRuntime.jsxs(
15671
15675
  "svg",
15672
15676
  {
@@ -15674,7 +15678,7 @@ function renderContentPart(el, options) {
15674
15678
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15675
15679
  preserveAspectRatio: "none",
15676
15680
  children: [
15677
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk7DGKSEIU_js.INK_REPLAY_KEYFRAMES }),
15681
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk4MGJUBY7_js.INK_REPLAY_KEYFRAMES }),
15678
15682
  strokes.map(
15679
15683
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15680
15684
  )
@@ -15901,9 +15905,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
15901
15905
  collaboration: connected,
15902
15906
  model: pptx.createInlineListModelObserver(element),
15903
15907
  activationSelection,
15904
- children: seed && !connected ? chunk7DGKSEIU_js.renderTextSegments(
15908
+ children: seed && !connected ? chunk4MGJUBY7_js.renderTextSegments(
15905
15909
  element,
15906
- chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
15910
+ chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
15907
15911
  void 0,
15908
15912
  void 0,
15909
15913
  void 0,
@@ -16073,7 +16077,7 @@ function InlineTextEditor({
16073
16077
  seedRef.current = {
16074
16078
  initialText,
16075
16079
  hasRichSegments: Boolean(
16076
- (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16080
+ (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16077
16081
  )
16078
16082
  };
16079
16083
  }
@@ -16139,8 +16143,8 @@ function InlineTextEditor({
16139
16143
  pending.endOffset
16140
16144
  );
16141
16145
  });
16142
- const warpStyle = chunk7DGKSEIU_js.getTextWarpStyle(textStyleRaw);
16143
- const compensationTransform = chunk7DGKSEIU_js.getTextCompensationTransform(element);
16146
+ const warpStyle = chunk4MGJUBY7_js.getTextWarpStyle(textStyleRaw);
16147
+ const compensationTransform = chunk4MGJUBY7_js.getTextCompensationTransform(element);
16144
16148
  const warpTransform = warpStyle?.transform;
16145
16149
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
16146
16150
  const wrapperStyle = {
@@ -16151,7 +16155,7 @@ function InlineTextEditor({
16151
16155
  transformOrigin: warpStyle?.transformOrigin || "center"
16152
16156
  };
16153
16157
  const nextInlineStyleValue = (property) => {
16154
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element)) {
16158
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element)) {
16155
16159
  return true;
16156
16160
  }
16157
16161
  const result = pptx.getInlineEditorSelectionResult(element.textSegments);
@@ -16227,7 +16231,7 @@ function InlineTextEditor({
16227
16231
  const text = e.clipboardData.getData("text/plain");
16228
16232
  document.execCommand("insertText", false, text);
16229
16233
  },
16230
- children: list.seed ? list.children : seed.hasRichSegments ? chunk7DGKSEIU_js.renderTextSegments(element, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR) : seed.initialText
16234
+ children: list.seed ? list.children : seed.hasRichSegments ? chunk4MGJUBY7_js.renderTextSegments(element, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR) : seed.initialText
16231
16235
  },
16232
16236
  list.seed?.paragraphs[0].token ?? "plain"
16233
16237
  );
@@ -17164,7 +17168,7 @@ function SmartArtRendererImpl({
17164
17168
  if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
17165
17169
  return;
17166
17170
  }
17167
- const updated = (0, chunk7DGKSEIU_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17171
+ const updated = (0, chunk4MGJUBY7_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17168
17172
  const box = { width: element.width, height: element.height };
17169
17173
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
17170
17174
  updated,
@@ -17180,7 +17184,7 @@ function SmartArtRendererImpl({
17180
17184
  if (!onUpdateElement) {
17181
17185
  return;
17182
17186
  }
17183
- const next = (0, chunk7DGKSEIU_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17187
+ const next = (0, chunk4MGJUBY7_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17184
17188
  if (next !== smartArtData) {
17185
17189
  const box = { width: element.width, height: element.height };
17186
17190
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
@@ -17374,7 +17378,7 @@ function groupIntoParagraphs(element, fieldContext) {
17374
17378
  element,
17375
17379
  fieldContext ? (seg) => {
17376
17380
  if (seg.fieldType) {
17377
- const substituted = chunk7DGKSEIU_js.substituteFieldText(
17381
+ const substituted = chunk4MGJUBY7_js.substituteFieldText(
17378
17382
  seg.text,
17379
17383
  seg.fieldType,
17380
17384
  fieldContext,
@@ -17409,13 +17413,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17409
17413
  if (s.strikethrough) {
17410
17414
  decos.push("line-through");
17411
17415
  }
17412
- const fill = s.hyperlink ? chunk7DGKSEIU_js.normalizeHexColor(s.color || element.textStyle?.color, chunk7DGKSEIU_js.HYPERLINK_COLOR) : chunk7DGKSEIU_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17416
+ const fill = s.hyperlink ? chunk4MGJUBY7_js.normalizeHexColor(s.color || element.textStyle?.color, chunk4MGJUBY7_js.HYPERLINK_COLOR) : chunk4MGJUBY7_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17413
17417
  return {
17414
17418
  fill,
17415
- fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE,
17419
+ fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE,
17416
17420
  fontWeight: s.bold ? 700 : 400,
17417
17421
  fontStyle: s.italic ? "italic" : void 0,
17418
- fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk7DGKSEIU_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk7DGKSEIU_js.DEFAULT_FONT_FAMILY,
17422
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY,
17419
17423
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17420
17424
  };
17421
17425
  }
@@ -17423,8 +17427,8 @@ function resolveSegmentFont(segment, element) {
17423
17427
  const s = segment.style || {};
17424
17428
  const family = s.fontFamily || element.textStyle?.fontFamily;
17425
17429
  return {
17426
- fontFamily: family ? (0, chunk7DGKSEIU_js.dist_exports.getSubstituteFontFamily)(family) : chunk7DGKSEIU_js.DEFAULT_FONT_FAMILY,
17427
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE,
17430
+ fontFamily: family ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(family) : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY,
17431
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE,
17428
17432
  bold: s.bold ?? element.textStyle?.bold,
17429
17433
  italic: s.italic ?? element.textStyle?.italic
17430
17434
  };
@@ -17490,7 +17494,7 @@ function WarpedText({
17490
17494
  fallbackColor,
17491
17495
  fieldContext
17492
17496
  }) {
17493
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element)) {
17497
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element)) {
17494
17498
  return null;
17495
17499
  }
17496
17500
  const textEl = element;
@@ -17508,9 +17512,9 @@ function WarpedText({
17508
17512
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17509
17513
  const align = textEl.textStyle?.align ?? "center";
17510
17514
  const { startOffset, textAnchor } = getAlignmentProps(align);
17511
- const baseFontSize = textEl.textStyle?.fontSize ?? chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE;
17512
- const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk7DGKSEIU_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk7DGKSEIU_js.DEFAULT_FONT_FAMILY;
17513
- const baseFill = chunk7DGKSEIU_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17515
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE;
17516
+ const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY;
17517
+ const baseFill = chunk4MGJUBY7_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17514
17518
  if (pptx.hasGlyphEnvelope(preset)) {
17515
17519
  const perLine = pptx.buildGlyphEnvelopeBlock(
17516
17520
  preset,
@@ -17610,7 +17614,7 @@ function WarpedText({
17610
17614
  );
17611
17615
  }
17612
17616
  var GLYPH_BY_SHAPE = Object.fromEntries(
17613
- chunk7DGKSEIU_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17617
+ chunk4MGJUBY7_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17614
17618
  );
17615
17619
  GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
17616
17620
  GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
@@ -17680,11 +17684,11 @@ function renderTextElementBody(options) {
17680
17684
  const isLinkedTextBox = pptx.isLinkedTextBox(el);
17681
17685
  const linkedSegments = pptx.getOverflowSegments(el, slideElements);
17682
17686
  const useSvgWarp = pptx.shouldUseSvgWarp(
17683
- (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17687
+ (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17684
17688
  );
17685
- const scene3dStyle = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? chunk7DGKSEIU_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17689
+ const scene3dStyle = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? chunk4MGJUBY7_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17686
17690
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17687
- const composedTransform = [rotationTransform, chunk7DGKSEIU_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17691
+ const composedTransform = [rotationTransform, chunk4MGJUBY7_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17688
17692
  const transformStyle = {
17689
17693
  transform: composedTransform,
17690
17694
  // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
@@ -17714,18 +17718,18 @@ function renderTextElementBody(options) {
17714
17718
  shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
17715
17719
  "div",
17716
17720
  {
17717
- className: chunk7DGKSEIU_js.cn(
17721
+ className: chunk4MGJUBY7_js.cn(
17718
17722
  "relative z-10 w-full h-full",
17719
17723
  onHyperlinkClick ? "" : "pointer-events-none"
17720
17724
  ),
17721
- style: { ...chunk7DGKSEIU_js.getTextLayoutStyle(el), ...transformStyle },
17725
+ style: { ...chunk4MGJUBY7_js.getTextLayoutStyle(el), ...transformStyle },
17722
17726
  children: /* @__PURE__ */ jsxRuntime.jsx(
17723
17727
  WarpedText,
17724
17728
  {
17725
17729
  element: el,
17726
17730
  width: el.width,
17727
17731
  height: el.height,
17728
- fallbackColor: chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
17732
+ fallbackColor: chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
17729
17733
  findHighlights: findHl,
17730
17734
  fieldContext
17731
17735
  }
@@ -17734,19 +17738,19 @@ function renderTextElementBody(options) {
17734
17738
  ) : /* @__PURE__ */ jsxRuntime.jsx(
17735
17739
  "div",
17736
17740
  {
17737
- className: chunk7DGKSEIU_js.cn(
17741
+ className: chunk4MGJUBY7_js.cn(
17738
17742
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
17739
17743
  onHyperlinkClick ? "" : "pointer-events-none"
17740
17744
  ),
17741
17745
  style: {
17742
- ...chunk7DGKSEIU_js.getTextLayoutStyle(el),
17746
+ ...chunk4MGJUBY7_js.getTextLayoutStyle(el),
17743
17747
  ...txtS,
17744
- ...chunk7DGKSEIU_js.getTextWarpStyle(txtSE),
17748
+ ...chunk4MGJUBY7_js.getTextWarpStyle(txtSE),
17745
17749
  ...transformStyle
17746
17750
  },
17747
- children: chunk7DGKSEIU_js.renderTextSegments(
17751
+ children: chunk4MGJUBY7_js.renderTextSegments(
17748
17752
  el,
17749
- chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
17753
+ chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
17750
17754
  void 0,
17751
17755
  findHl,
17752
17756
  onHyperlinkClick,
@@ -18065,7 +18069,7 @@ function renderBody(options) {
18065
18069
  );
18066
18070
  }
18067
18071
  if (isImg) {
18068
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk7DGKSEIU_js.getImageSurfaceStyle(el), children: [
18072
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk4MGJUBY7_js.getImageSurfaceStyle(el), children: [
18069
18073
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
18070
18074
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
18071
18075
  ] });
@@ -18082,7 +18086,7 @@ function renderBody(options) {
18082
18086
  textDirection: txtSE?.textDirection,
18083
18087
  textStyle: txtS,
18084
18088
  textStyleRaw: txtSE,
18085
- layoutStyle: chunk7DGKSEIU_js.getTextLayoutStyle(el),
18089
+ layoutStyle: chunk4MGJUBY7_js.getTextLayoutStyle(el),
18086
18090
  element: el,
18087
18091
  onCommit,
18088
18092
  onCancel,
@@ -18093,7 +18097,7 @@ function renderBody(options) {
18093
18097
  ] });
18094
18098
  }
18095
18099
  if (el.type === "table") {
18096
- return chunk7DGKSEIU_js.renderTableElement(el, txtS, {
18100
+ return chunk4MGJUBY7_js.renderTableElement(el, txtS, {
18097
18101
  editable: isSel,
18098
18102
  selectedCell: isSel ? tableSt : null,
18099
18103
  onSelectCell: onCellSel,
@@ -18126,7 +18130,7 @@ function renderBody(options) {
18126
18130
  );
18127
18131
  }
18128
18132
  if (el.type === "media") {
18129
- return chunk7DGKSEIU_js.renderMediaElement(el, media, {
18133
+ return chunk4MGJUBY7_js.renderMediaElement(el, media, {
18130
18134
  // Present mode autoplays every media element on the active slide,
18131
18135
  // not only ones persisted with their own `autoPlay` flag (matching
18132
18136
  // the other four bindings' unconditional `presenting`-gated
@@ -18149,7 +18153,7 @@ function renderBody(options) {
18149
18153
  onPlayStateChange: handleMediaPlayStateChange
18150
18154
  });
18151
18155
  }
18152
- if (doInk && (0, chunk7DGKSEIU_js.dist_exports.isInkElement)(el)) {
18156
+ if (doInk && (0, chunk4MGJUBY7_js.dist_exports.isInkElement)(el)) {
18153
18157
  return renderInk(el, {
18154
18158
  replay: isPresentationPassive,
18155
18159
  pressureSensitive: true
@@ -18178,27 +18182,27 @@ function renderBody(options) {
18178
18182
  }
18179
18183
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
18180
18184
  }
18181
- if (chunk7DGKSEIU_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18182
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk7DGKSEIU_js.getElementLabel(el) });
18185
+ if (chunk4MGJUBY7_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18186
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk4MGJUBY7_js.getElementLabel(el) });
18183
18187
  }
18184
18188
  return renderTextElementBody(options);
18185
18189
  }
18186
18190
  function defaultTextColorForFill(fillColor) {
18187
18191
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18188
18192
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18189
- return chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR;
18193
+ return chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR;
18190
18194
  }
18191
18195
  const channels = [0, 2, 4].map((offset) => Number.parseInt(hex.slice(offset, offset + 2), 16) / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
18192
18196
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
18193
- return luminance > 0.179 ? chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR : "#ffffff";
18197
+ return luminance > 0.179 ? chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR : "#ffffff";
18194
18198
  }
18195
18199
  function getStaticElementVisualState(element, parentGroupFill) {
18196
- const style = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18197
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk7DGKSEIU_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18198
- const fill = chunk7DGKSEIU_js.normalizeHexColor(style?.fillColor, chunk7DGKSEIU_js.DEFAULT_FILL_COLOR);
18200
+ const style = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18201
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk4MGJUBY7_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18202
+ const fill = chunk4MGJUBY7_js.normalizeHexColor(style?.fillColor, chunk4MGJUBY7_js.DEFAULT_FILL_COLOR);
18199
18203
  const strokeWidth = pptx.paintedStrokeWidth(style);
18200
- const stroke = chunk7DGKSEIU_js.normalizeHexColor(style?.strokeColor, chunk7DGKSEIU_js.DEFAULT_STROKE_COLOR);
18201
- const baseVisualStyle = chunk7DGKSEIU_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18204
+ const stroke = chunk4MGJUBY7_js.normalizeHexColor(style?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
18205
+ const baseVisualStyle = chunk4MGJUBY7_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18202
18206
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18203
18207
  const visualStyle = inheritedFill ? {
18204
18208
  ...baseVisualStyle,
@@ -18208,13 +18212,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
18208
18212
  backgroundSize: inheritedFill.backgroundSize,
18209
18213
  backgroundPosition: inheritedFill.backgroundPosition
18210
18214
  } : baseVisualStyle;
18211
- const textStyle = chunk7DGKSEIU_js.getTextStyleForElement(
18215
+ const textStyle = chunk4MGJUBY7_js.getTextStyleForElement(
18212
18216
  element,
18213
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR
18217
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR
18214
18218
  );
18215
18219
  const isImage = element.type === "picture" || element.type === "image";
18216
- const letsTextOverflow = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18217
- const shapeType = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18220
+ const letsTextOverflow = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18221
+ const shapeType = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18218
18222
  const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
18219
18223
  return {
18220
18224
  hasFill,
@@ -18235,7 +18239,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18235
18239
  return { action, isActionable, contractRole };
18236
18240
  }
18237
18241
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18238
- const overflowClass = visual.isImage || element.type === "group" || chunk7DGKSEIU_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18242
+ const overflowClass = visual.isImage || element.type === "group" || chunk4MGJUBY7_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18239
18243
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18240
18244
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18241
18245
  }
@@ -18318,7 +18322,7 @@ function StaticElementRendererImpl({
18318
18322
  top: positioned ? element.y : void 0,
18319
18323
  width: positioned ? Math.max(element.width, 1) : "100%",
18320
18324
  height: positioned ? Math.max(element.height, 1) : "100%",
18321
- transform: positioned ? chunk7DGKSEIU_js.getElementTransform(element) : void 0,
18325
+ transform: positioned ? chunk4MGJUBY7_js.getElementTransform(element) : void 0,
18322
18326
  transformOrigin: "center",
18323
18327
  zIndex,
18324
18328
  ...visualStyle,
@@ -18335,7 +18339,7 @@ function StaticElementRendererImpl({
18335
18339
  animation
18336
18340
  },
18337
18341
  children: [
18338
- !isImage && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection }),
18342
+ pptx.getShapeEffectLayerPlacement(element).beforeBody && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection }),
18339
18343
  element.type === "group" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full", children: (element.children ?? []).map((child, index) => /* @__PURE__ */ jsxRuntime.jsx(
18340
18344
  StaticElementRenderer,
18341
18345
  {
@@ -18359,20 +18363,20 @@ function StaticElementRendererImpl({
18359
18363
  isEditing: false,
18360
18364
  editText: "",
18361
18365
  spellCheck: false,
18362
- txtSE: (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18366
+ txtSE: (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18363
18367
  txtS: textStyle,
18364
- vecShape: chunk7DGKSEIU_js.renderVectorShape(
18368
+ vecShape: chunk4MGJUBY7_js.renderVectorShape(
18365
18369
  element,
18366
18370
  isImage ? false : hasFill,
18367
18371
  fill,
18368
18372
  strokeWidth,
18369
18373
  stroke
18370
18374
  ),
18371
- imgStyle: imageAnimation ? { ...chunk7DGKSEIU_js.getImageRenderStyle(element), animation: imageAnimation } : chunk7DGKSEIU_js.getImageRenderStyle(element),
18372
- imgFilter: chunk7DGKSEIU_js.getImageEffectsFilter(element),
18373
- imgOpacity: chunk7DGKSEIU_js.getImageEffectsOpacity(element),
18375
+ imgStyle: imageAnimation ? { ...chunk4MGJUBY7_js.getImageRenderStyle(element), animation: imageAnimation } : chunk4MGJUBY7_js.getImageRenderStyle(element),
18376
+ imgFilter: chunk4MGJUBY7_js.getImageEffectsFilter(element),
18377
+ imgOpacity: chunk4MGJUBY7_js.getImageEffectsOpacity(element),
18374
18378
  imgAlt: "",
18375
- isTxtEl: chunk7DGKSEIU_js.isEditableTextElement(element),
18379
+ isTxtEl: chunk4MGJUBY7_js.isEditableTextElement(element),
18376
18380
  media: mediaDataUrls,
18377
18381
  tableSt: null,
18378
18382
  isSel: false,
@@ -18396,7 +18400,7 @@ function StaticElementRendererImpl({
18396
18400
  canEditSmartArt: false,
18397
18401
  canEditChart: false
18398
18402
  }),
18399
- isImage && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection })
18403
+ pptx.getShapeEffectLayerPlacement(element).afterBody && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection })
18400
18404
  ]
18401
18405
  }
18402
18406
  );
@@ -18418,7 +18422,7 @@ function SlideLayer({
18418
18422
  style: {
18419
18423
  width: safeWidth,
18420
18424
  height: safeHeight,
18421
- backgroundColor: slide.backgroundColor ? chunk7DGKSEIU_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18425
+ backgroundColor: slide.backgroundColor ? chunk4MGJUBY7_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18422
18426
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18423
18427
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18424
18428
  backgroundPosition: slide.backgroundImage ? "center" : void 0