pptx-react-viewer 4.34.0 → 4.36.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 (87) hide show
  1. package/CHANGELOG.md +49 -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-LNL6PAGZ.js → chunk-N67PQUQN.js} +1390 -1362
  12. package/dist/chunk-N67PQUQN.js.br +0 -0
  13. package/dist/chunk-N67PQUQN.js.gz +0 -0
  14. package/dist/{chunk-OWXES7IA.mjs → chunk-ON2ZUQWJ.mjs} +125 -97
  15. package/dist/chunk-ON2ZUQWJ.mjs.br +0 -0
  16. package/dist/chunk-ON2ZUQWJ.mjs.gz +0 -0
  17. package/dist/{chunk-LGZOY6W6.mjs → chunk-ORJPFBVE.mjs} +53 -44
  18. package/dist/chunk-ORJPFBVE.mjs.br +0 -0
  19. package/dist/chunk-ORJPFBVE.mjs.gz +0 -0
  20. package/dist/{chunk-K4UXDQZ6.mjs → chunk-SMPZ552M.mjs} +2 -1
  21. package/dist/chunk-SMPZ552M.mjs.br +0 -0
  22. package/dist/chunk-SMPZ552M.mjs.gz +0 -0
  23. package/dist/{chunk-XXGYLCRT.js → chunk-X5CTZHOP.js} +296 -287
  24. package/dist/chunk-X5CTZHOP.js.br +0 -0
  25. package/dist/chunk-X5CTZHOP.js.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.d.ts +2 -0
  51. package/dist/index.js +24 -24
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +3 -3
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +6 -2
  58. package/dist/internals.js +81 -81
  59. package/dist/internals.js.br +0 -0
  60. package/dist/internals.js.gz +0 -0
  61. package/dist/internals.mjs +2 -2
  62. package/dist/internals.mjs.br +0 -0
  63. package/dist/internals.mjs.gz +0 -0
  64. package/dist/viewer/index.d.ts +2 -0
  65. package/dist/viewer/index.js +19 -19
  66. package/dist/viewer/index.js.br +0 -0
  67. package/dist/viewer/index.js.gz +0 -0
  68. package/dist/viewer/index.mjs +3 -3
  69. package/dist/viewer/index.mjs.br +0 -0
  70. package/dist/viewer/index.mjs.gz +0 -0
  71. package/package.json +6 -6
  72. package/dist/AiChatPanel-CYD46SEM.mjs.br +0 -0
  73. package/dist/AiChatPanel-CYD46SEM.mjs.gz +0 -0
  74. package/dist/AiChatPanel-ONHWZEPV.js.br +0 -0
  75. package/dist/AiChatPanel-ONHWZEPV.js.gz +0 -0
  76. package/dist/chunk-7DGKSEIU.js.br +0 -0
  77. package/dist/chunk-7DGKSEIU.js.gz +0 -0
  78. package/dist/chunk-K4UXDQZ6.mjs.br +0 -0
  79. package/dist/chunk-K4UXDQZ6.mjs.gz +0 -0
  80. package/dist/chunk-LGZOY6W6.mjs.br +0 -0
  81. package/dist/chunk-LGZOY6W6.mjs.gz +0 -0
  82. package/dist/chunk-LNL6PAGZ.js.br +0 -0
  83. package/dist/chunk-LNL6PAGZ.js.gz +0 -0
  84. package/dist/chunk-OWXES7IA.mjs.br +0 -0
  85. package/dist/chunk-OWXES7IA.mjs.gz +0 -0
  86. package/dist/chunk-XXGYLCRT.js.br +0 -0
  87. 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,
@@ -4305,14 +4308,17 @@ function useViewerCoreState(_input) {
4305
4308
  ...derived
4306
4309
  };
4307
4310
  }
4308
- function useViewerUIState() {
4311
+ function useViewerUIState(inspectorInitiallyOpen) {
4309
4312
  const [isCompactToolbarOpen, setIsCompactToolbarOpen] = React17.useState(false);
4310
4313
  const [toolbarSection, setToolbarSection] = React17.useState("home");
4311
4314
  const [isSlidesPaneOpen, setIsSlidesPaneOpen] = React17.useState(
4312
4315
  () => typeof window === "undefined" ? true : window.innerWidth >= 768
4313
4316
  );
4314
4317
  const [isInspectorPaneOpen, setIsInspectorPaneOpen] = React17.useState(
4315
- () => typeof window === "undefined" ? true : window.innerWidth >= 768
4318
+ () => pptx.initialInspectorOpen(
4319
+ inspectorInitiallyOpen,
4320
+ typeof window === "undefined" || window.innerWidth >= 768
4321
+ )
4316
4322
  );
4317
4323
  const [isSlideNotesCollapsed, setIsSlideNotesCollapsed] = React17.useState(true);
4318
4324
  const [isOverflowMenuOpen, setIsOverflowMenuOpen] = React17.useState(false);
@@ -4435,7 +4441,7 @@ function useCropSessionState() {
4435
4441
  // src/viewer/hooks/useViewerState.ts
4436
4442
  function useViewerState(input) {
4437
4443
  const core = useViewerCoreState();
4438
- const ui = useViewerUIState();
4444
+ const ui = useViewerUIState(input.inspectorInitiallyOpen);
4439
4445
  const crop = useCropSessionState();
4440
4446
  return { ...core, ...ui, ...crop };
4441
4447
  }
@@ -4453,6 +4459,7 @@ function useLoadContent({
4453
4459
  setCanvasSize,
4454
4460
  setSlideSizeEmu,
4455
4461
  setHeaderFooter,
4462
+ setFirstSlideNumber,
4456
4463
  setLayoutOptions,
4457
4464
  setSlideMasters,
4458
4465
  setModernCommentAuthors,
@@ -4502,7 +4509,7 @@ function useLoadContent({
4502
4509
  }
4503
4510
  let cancelled = false;
4504
4511
  const token = ++renderTokenRef.current;
4505
- const handler = new chunk7DGKSEIU_js.dist_exports.PptxHandler();
4512
+ const handler = new chunk4MGJUBY7_js.dist_exports.PptxHandler();
4506
4513
  const resources = pptx.createPresentationLoadResources(handler);
4507
4514
  const loadBlobUrls = resources.blobUrls;
4508
4515
  (async () => {
@@ -4587,12 +4594,12 @@ function useLoadContent({
4587
4594
  }
4588
4595
  resources.commit();
4589
4596
  handlerRef.current = handler;
4590
- const partition = chunk7DGKSEIU_js.partitionTemplateElements(nextSlides);
4597
+ const partition = chunk4MGJUBY7_js.partitionTemplateElements(nextSlides);
4591
4598
  setSlides(partition.slides);
4592
4599
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4593
4600
  setCanvasSize({
4594
- width: parsed.width ?? chunk7DGKSEIU_js.DEFAULT_CANVAS_WIDTH,
4595
- height: parsed.height ?? chunk7DGKSEIU_js.DEFAULT_CANVAS_HEIGHT
4601
+ width: parsed.width ?? chunk4MGJUBY7_js.DEFAULT_CANVAS_WIDTH,
4602
+ height: parsed.height ?? chunk4MGJUBY7_js.DEFAULT_CANVAS_HEIGHT
4596
4603
  });
4597
4604
  setSlideSizeEmu(
4598
4605
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4602,6 +4609,7 @@ function useLoadContent({
4602
4609
  } : void 0
4603
4610
  );
4604
4611
  setHeaderFooter(parsed.headerFooter ?? {});
4612
+ setFirstSlideNumber(parsed.firstSlideNumber);
4605
4613
  setLayoutOptions(parsed.layoutOptions ?? []);
4606
4614
  setSlideMasters(parsed.slideMasters ?? []);
4607
4615
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
@@ -4655,7 +4663,7 @@ function useLoadContent({
4655
4663
  onContentApplied?.();
4656
4664
  } catch (err) {
4657
4665
  if (!cancelled && token === renderTokenRef.current) {
4658
- if (err instanceof chunk7DGKSEIU_js.dist_exports.EncryptedFileError) {
4666
+ if (err instanceof chunk4MGJUBY7_js.dist_exports.EncryptedFileError) {
4659
4667
  setIsEncrypted(true);
4660
4668
  } else {
4661
4669
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4780,7 +4788,7 @@ function useTextElementOperations(input) {
4780
4788
  updateSelectedElement
4781
4789
  } = input;
4782
4790
  const liveTextSegments = React17.useCallback(() => {
4783
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4791
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4784
4792
  return void 0;
4785
4793
  }
4786
4794
  if (selectedElement.id !== inlineEditingElementId) {
@@ -4798,7 +4806,7 @@ function useTextElementOperations(input) {
4798
4806
  }, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
4799
4807
  const updateSelectedTextStyle = React17.useCallback(
4800
4808
  (updates) => {
4801
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4809
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4802
4810
  return;
4803
4811
  }
4804
4812
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -4876,7 +4884,7 @@ function useTextElementOperations(input) {
4876
4884
  );
4877
4885
  const toggleSelectedBullets = React17.useCallback(
4878
4886
  (kind) => {
4879
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4887
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4880
4888
  return;
4881
4889
  }
4882
4890
  const currentSegments = liveTextSegments();
@@ -4927,7 +4935,7 @@ function useTextElementOperations(input) {
4927
4935
  );
4928
4936
  const updateSelectedTextCase = React17.useCallback(
4929
4937
  (mode) => {
4930
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4938
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4931
4939
  return;
4932
4940
  }
4933
4941
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -5043,7 +5051,7 @@ function useElementOperations(input) {
5043
5051
  );
5044
5052
  return;
5045
5053
  }
5046
- if (chunk7DGKSEIU_js.isTemplateElementId(elementId)) {
5054
+ if (chunk4MGJUBY7_js.isTemplateElementId(elementId)) {
5047
5055
  const slideId = activeSlide?.id;
5048
5056
  if (slideId) {
5049
5057
  setTemplateElementsBySlideId((prev) => ({
@@ -5079,7 +5087,7 @@ function useElementOperations(input) {
5079
5087
  );
5080
5088
  const updateSelectedShapeStyle = React17.useCallback(
5081
5089
  (updates) => {
5082
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(selectedElement)) {
5090
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(selectedElement)) {
5083
5091
  return;
5084
5092
  }
5085
5093
  updateSelectedElement({
@@ -5283,15 +5291,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
5283
5291
  // src/viewer/hooks/pointer-move-handlers.ts
5284
5292
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
5285
5293
  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 });
5294
+ let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk4MGJUBY7_js.MIN_ELEMENT_SIZE });
5287
5295
  if (lockAspect) {
5288
- resized = pptx.lockResizeAspect(resized, startBox, handle, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5296
+ resized = pptx.lockResizeAspect(resized, startBox, handle, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5289
5297
  }
5290
5298
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
5291
5299
  if (!snapToGrid) {
5292
5300
  return box;
5293
5301
  }
5294
- return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5302
+ return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5295
5303
  }
5296
5304
  function resolveLiveTarget(input) {
5297
5305
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -5404,7 +5412,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
5404
5412
  width: el.width,
5405
5413
  height: el.height
5406
5414
  }));
5407
- const snapResult = chunk7DGKSEIU_js.computeSnapToShape(
5415
+ const snapResult = chunk4MGJUBY7_js.computeSnapToShape(
5408
5416
  targetX,
5409
5417
  targetY,
5410
5418
  primaryEl.width,
@@ -5478,8 +5486,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
5478
5486
  rs.lastY = geo.y;
5479
5487
  rs.lastWidth = geo.width;
5480
5488
  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);
5489
+ const width = Math.max(geo.width, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5490
+ const height = Math.max(geo.height, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5483
5491
  if (rs.domEl) {
5484
5492
  rs.domEl.style.left = `${geo.x}px`;
5485
5493
  rs.domEl.style.top = `${geo.y}px`;
@@ -5572,13 +5580,13 @@ function processPointerUp(input) {
5572
5580
  if (i !== activeSlideIndex) {
5573
5581
  return s;
5574
5582
  }
5575
- const rerouted = chunk7DGKSEIU_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5583
+ const rerouted = chunk4MGJUBY7_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5576
5584
  if (rerouted.length === 0) {
5577
5585
  return s;
5578
5586
  }
5579
5587
  return {
5580
5588
  ...s,
5581
- elements: chunk7DGKSEIU_js.applyReroutedConnectors(s.elements, rerouted)
5589
+ elements: chunk4MGJUBY7_js.applyReroutedConnectors(s.elements, rerouted)
5582
5590
  };
5583
5591
  })
5584
5592
  );
@@ -5630,8 +5638,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
5630
5638
  }
5631
5639
  return { ...el, x: start.x + dx, y: start.y + dy };
5632
5640
  });
5633
- const rerouted = chunk7DGKSEIU_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5634
- return chunk7DGKSEIU_js.applyReroutedConnectors(movedElements, rerouted);
5641
+ const rerouted = chunk4MGJUBY7_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5642
+ return chunk4MGJUBY7_js.applyReroutedConnectors(movedElements, rerouted);
5635
5643
  };
5636
5644
  if (editTemplateMode) {
5637
5645
  const slideId = activeSlide?.id;
@@ -5819,7 +5827,7 @@ function useCanvasInteractions(input) {
5819
5827
  return;
5820
5828
  }
5821
5829
  const el = elementLookup.get(editId);
5822
- if (el && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el)) {
5830
+ if (el && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el)) {
5823
5831
  const reader = inlineEditingReaderRef?.current;
5824
5832
  const read = reader?.elementId === editId ? reader.read() : void 0;
5825
5833
  if (read?.kind === "unsupported") {
@@ -5866,7 +5874,7 @@ function useCanvasInteractions(input) {
5866
5874
  wasEditable.current = canEdit;
5867
5875
  }, [canEdit]);
5868
5876
  const openEquationEditorForElement = (el) => {
5869
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el)) {
5877
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el)) {
5870
5878
  return false;
5871
5879
  }
5872
5880
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5899,7 +5907,7 @@ function useCanvasInteractions(input) {
5899
5907
  justInteractedRef.current = false;
5900
5908
  } else {
5901
5909
  const el = elementLookup.get(elementId);
5902
- if (el && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5910
+ if (el && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5903
5911
  if (!openEquationEditorForElement(el)) {
5904
5912
  pptx.setPendingCaretPoint(e);
5905
5913
  setInlineEditingElementId(elementId);
@@ -5925,7 +5933,7 @@ function useCanvasInteractions(input) {
5925
5933
  if (openEquationEditorForElement(el)) {
5926
5934
  return;
5927
5935
  }
5928
- if ((0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5936
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5929
5937
  setInlineEditingElementId(elementId);
5930
5938
  setInlineEditingText(el.text ?? "");
5931
5939
  }
@@ -6390,7 +6398,7 @@ function createStructuredElementHandlers(deps) {
6390
6398
  return;
6391
6399
  }
6392
6400
  const resolved = resolveHyperlinkEditResult(data);
6393
- if (resolved.url && !chunk7DGKSEIU_js.isUrlSafe(resolved.url)) {
6401
+ if (resolved.url && !chunk4MGJUBY7_js.isUrlSafe(resolved.url)) {
6394
6402
  return;
6395
6403
  }
6396
6404
  const actionClick = {
@@ -6436,11 +6444,11 @@ function createStructuredElementHandlers(deps) {
6436
6444
  if (!activeSlide) {
6437
6445
  return;
6438
6446
  }
6439
- const preset = chunk7DGKSEIU_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6447
+ const preset = chunk4MGJUBY7_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6440
6448
  if (!preset) {
6441
6449
  return;
6442
6450
  }
6443
- const defaultPptxAction = (0, chunk7DGKSEIU_js.dist_exports.elementActionToPptxAction)({
6451
+ const defaultPptxAction = (0, chunk4MGJUBY7_js.dist_exports.elementActionToPptxAction)({
6444
6452
  trigger: "click",
6445
6453
  type: preset.defaultAction
6446
6454
  });
@@ -6523,7 +6531,7 @@ function useInsertElements(input) {
6523
6531
  width: 300,
6524
6532
  height: 60,
6525
6533
  text: "",
6526
- textStyle: { fontSize: chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE }
6534
+ textStyle: { fontSize: chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE }
6527
6535
  });
6528
6536
  };
6529
6537
  const handleAddShape = () => {
@@ -6550,7 +6558,7 @@ function useInsertElements(input) {
6550
6558
  return;
6551
6559
  }
6552
6560
  addElement({
6553
- ...pptx.newTableElement(chunk7DGKSEIU_js.DEFAULT_TABLE_ROWS, chunk7DGKSEIU_js.DEFAULT_TABLE_COLUMNS, 100, 200),
6561
+ ...pptx.newTableElement(chunk4MGJUBY7_js.DEFAULT_TABLE_ROWS, chunk4MGJUBY7_js.DEFAULT_TABLE_COLUMNS, 100, 200),
6554
6562
  id: pptx.generateElementId()
6555
6563
  });
6556
6564
  };
@@ -6719,7 +6727,7 @@ function useGroupAlignLayerHandlers(input) {
6719
6727
  history
6720
6728
  } = input;
6721
6729
  const updateElementsOwning = (elementId, updater) => {
6722
- if (editTemplateMode && !chunk7DGKSEIU_js.isTemplateElementId(elementId)) {
6730
+ if (editTemplateMode && !chunk4MGJUBY7_js.isTemplateElementId(elementId)) {
6723
6731
  ops.updateSlides(
6724
6732
  (prev) => prev.map(
6725
6733
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6753,9 +6761,9 @@ function useGroupAlignLayerHandlers(input) {
6753
6761
  return;
6754
6762
  }
6755
6763
  const group = selectedElement;
6756
- const intoTemplate = chunk7DGKSEIU_js.isTemplateElementId(group.id);
6764
+ const intoTemplate = chunk4MGJUBY7_js.isTemplateElementId(group.id);
6757
6765
  const childIds = group.children.map(
6758
- (child) => intoTemplate ? chunk7DGKSEIU_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6766
+ (child) => intoTemplate ? chunk4MGJUBY7_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6759
6767
  );
6760
6768
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6761
6769
  ops.activeElements,
@@ -7087,7 +7095,7 @@ function useSlideManagement(input) {
7087
7095
  if (!src) {
7088
7096
  continue;
7089
7097
  }
7090
- const clone = { ...(0, chunk7DGKSEIU_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7098
+ const clone = { ...(0, chunk4MGJUBY7_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7091
7099
  next.splice(i + offset + 1, 0, clone);
7092
7100
  offset++;
7093
7101
  }
@@ -7191,7 +7199,7 @@ function createTableMergeHandlers(input) {
7191
7199
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7192
7200
  return;
7193
7201
  }
7194
- const newTableData = chunk7DGKSEIU_js.mergeCells(
7202
+ const newTableData = chunk4MGJUBY7_js.mergeCells(
7195
7203
  [
7196
7204
  { row: rowIndex, col: columnIndex },
7197
7205
  { row: rowIndex, col: nextColIdx }
@@ -7199,7 +7207,7 @@ function createTableMergeHandlers(input) {
7199
7207
  td
7200
7208
  );
7201
7209
  const updates = { tableData: newTableData };
7202
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7210
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7203
7211
  if (newRawXml) {
7204
7212
  updates.rawXml = newRawXml;
7205
7213
  }
@@ -7225,7 +7233,7 @@ function createTableMergeHandlers(input) {
7225
7233
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7226
7234
  return;
7227
7235
  }
7228
- const newTableData = chunk7DGKSEIU_js.mergeCells(
7236
+ const newTableData = chunk4MGJUBY7_js.mergeCells(
7229
7237
  [
7230
7238
  { row: rowIndex, col: columnIndex },
7231
7239
  { row: targetNextRowIdx, col: columnIndex }
@@ -7233,7 +7241,7 @@ function createTableMergeHandlers(input) {
7233
7241
  td
7234
7242
  );
7235
7243
  const updates = { tableData: newTableData };
7236
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7244
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7237
7245
  if (newRawXml) {
7238
7246
  updates.rawXml = newRawXml;
7239
7247
  }
@@ -7248,9 +7256,9 @@ function createTableMergeHandlers(input) {
7248
7256
  return;
7249
7257
  }
7250
7258
  const td = selectedElement.tableData;
7251
- const newTableData = chunk7DGKSEIU_js.mergeCells(ts.selectedCells, td);
7259
+ const newTableData = chunk4MGJUBY7_js.mergeCells(ts.selectedCells, td);
7252
7260
  const updates = { tableData: newTableData };
7253
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7261
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7254
7262
  if (newRawXml) {
7255
7263
  updates.rawXml = newRawXml;
7256
7264
  }
@@ -7267,9 +7275,9 @@ function createTableMergeHandlers(input) {
7267
7275
  }
7268
7276
  const { rowIndex, columnIndex } = ts;
7269
7277
  const td = selectedElement.tableData;
7270
- const newTableData = chunk7DGKSEIU_js.splitCell(rowIndex, columnIndex, td);
7278
+ const newTableData = chunk4MGJUBY7_js.splitCell(rowIndex, columnIndex, td);
7271
7279
  const updates = { tableData: newTableData };
7272
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7280
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7273
7281
  if (newRawXml) {
7274
7282
  updates.rawXml = newRawXml;
7275
7283
  }
@@ -7304,7 +7312,7 @@ function createTableStructHandlers(input) {
7304
7312
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7305
7313
  }
7306
7314
  if (el.rawXml) {
7307
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7315
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7308
7316
  if (newRawXml) {
7309
7317
  updates.rawXml = newRawXml;
7310
7318
  }
@@ -7328,7 +7336,7 @@ function createTableStructHandlers(input) {
7328
7336
  const { rowIndex, columnIndex: colIndex } = ts;
7329
7337
  const updates = {};
7330
7338
  if (selectedElement.rawXml) {
7331
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateCellTextStyleInRawXml)(
7339
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateCellTextStyleInRawXml)(
7332
7340
  selectedElement,
7333
7341
  rowIndex,
7334
7342
  colIndex,
@@ -7495,7 +7503,7 @@ function useExportSaveAs(input) {
7495
7503
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7496
7504
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7497
7505
  const data = {
7498
- slides: chunk7DGKSEIU_js.buildSaveSlides(slides, templateElementsBySlideId),
7506
+ slides: chunk4MGJUBY7_js.buildSaveSlides(slides, templateElementsBySlideId),
7499
7507
  width: canvasSize.width,
7500
7508
  height: canvasSize.height,
7501
7509
  widthEmu: slideSize.widthEmu,
@@ -7653,7 +7661,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7653
7661
  }
7654
7662
  function tilesToPdfPage(tilesResult) {
7655
7663
  return tilesResult.tiles.map((tile) => ({
7656
- image: chunk7DGKSEIU_js.canvasToJpegData(tile.canvas),
7664
+ image: chunk4MGJUBY7_js.canvasToJpegData(tile.canvas),
7657
7665
  placement: pptx.placeTileOnPage(
7658
7666
  tile,
7659
7667
  tilesResult.fullWidth,
@@ -7686,7 +7694,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7686
7694
  if (pages.length === 0) {
7687
7695
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7688
7696
  }
7689
- const pdfBlobUrl = chunk7DGKSEIU_js.buildPdfFromTiledImageData(pages);
7697
+ const pdfBlobUrl = chunk4MGJUBY7_js.buildPdfFromTiledImageData(pages);
7690
7698
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7691
7699
  }
7692
7700
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7716,7 +7724,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7716
7724
  if (pages.length === 0) {
7717
7725
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7718
7726
  }
7719
- const pdfDataUrl = chunk7DGKSEIU_js.buildNotesPdf(pages);
7727
+ const pdfDataUrl = chunk4MGJUBY7_js.buildNotesPdf(pages);
7720
7728
  pptx.downloadDataUrl(pdfDataUrl, filename);
7721
7729
  }
7722
7730
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -7911,7 +7919,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7911
7919
  continue;
7912
7920
  }
7913
7921
  onProgress?.(processedCount, data.slides.length);
7914
- let svg = chunk7DGKSEIU_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7922
+ let svg = chunk4MGJUBY7_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7915
7923
  if (embedFonts && fontFaces?.length) {
7916
7924
  svg = injectFontFaces(svg, fontFaces);
7917
7925
  }
@@ -8500,10 +8508,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8500
8508
  return;
8501
8509
  }
8502
8510
  await handler.applyTheme(colorScheme, fontScheme, name);
8503
- const previousMap = theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8511
+ const previousMap = theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8504
8512
  bumpHistory();
8505
8513
  setSlides(
8506
- (slides) => (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(
8514
+ (slides) => (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(
8507
8515
  { slides, theme, themeColorMap: previousMap },
8508
8516
  colorScheme,
8509
8517
  fontScheme,
@@ -8514,8 +8522,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8514
8522
  (prev) => Object.fromEntries(
8515
8523
  Object.entries(prev).map(([id, elements]) => [
8516
8524
  id,
8517
- (0, chunk7DGKSEIU_js.dist_exports.reResolveElementFonts)(
8518
- (0, chunk7DGKSEIU_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8525
+ (0, chunk4MGJUBY7_js.dist_exports.reResolveElementFonts)(
8526
+ (0, chunk4MGJUBY7_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8519
8527
  theme?.fontScheme,
8520
8528
  fontScheme
8521
8529
  )
@@ -8573,13 +8581,13 @@ function useThemeHandlers(input) {
8573
8581
  return;
8574
8582
  }
8575
8583
  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));
8584
+ const previousMap = theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8585
+ setSlides((prev) => (0, chunk4MGJUBY7_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8578
8586
  if (Object.keys(templateElementsBySlideId).length > 0) {
8579
8587
  setTemplateElementsBySlideId((prev) => {
8580
8588
  const next = {};
8581
8589
  for (const [slideId, elements] of Object.entries(prev)) {
8582
- next[slideId] = (0, chunk7DGKSEIU_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8590
+ next[slideId] = (0, chunk4MGJUBY7_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8583
8591
  }
8584
8592
  return next;
8585
8593
  });
@@ -8690,7 +8698,7 @@ function useThemeSwitching(input) {
8690
8698
  }
8691
8699
  try {
8692
8700
  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);
8701
+ const newData = (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8694
8702
  onDataChange(newData);
8695
8703
  onThemeChanged?.(preset);
8696
8704
  } catch (error) {
@@ -8707,7 +8715,7 @@ function useThemeSwitching(input) {
8707
8715
  }
8708
8716
  try {
8709
8717
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8710
- const newData = (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8718
+ const newData = (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8711
8719
  onDataChange(newData);
8712
8720
  } catch (error) {
8713
8721
  console.error("Failed to switch to custom theme:", error);
@@ -8719,12 +8727,12 @@ function useThemeSwitching(input) {
8719
8727
  if (!data?.theme?.colorScheme) {
8720
8728
  return void 0;
8721
8729
  }
8722
- return chunk7DGKSEIU_js.dist_exports.THEME_PRESETS.find(
8723
- (p) => (0, chunk7DGKSEIU_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8730
+ return chunk4MGJUBY7_js.dist_exports.THEME_PRESETS.find(
8731
+ (p) => (0, chunk4MGJUBY7_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8724
8732
  );
8725
8733
  }, [data?.theme?.colorScheme]);
8726
8734
  return {
8727
- presets: chunk7DGKSEIU_js.dist_exports.THEME_PRESETS,
8735
+ presets: chunk4MGJUBY7_js.dist_exports.THEME_PRESETS,
8728
8736
  switchToPreset,
8729
8737
  switchToCustom,
8730
8738
  currentPreset
@@ -8801,7 +8809,7 @@ function usePropertyHandlers(input) {
8801
8809
  }
8802
8810
  try {
8803
8811
  const ab = await file.arrayBuffer();
8804
- const h = new chunk7DGKSEIU_js.dist_exports.PptxHandler();
8812
+ const h = new chunk4MGJUBY7_js.dist_exports.PptxHandler();
8805
8813
  const other = await h.load(ab);
8806
8814
  if (!other) {
8807
8815
  return;
@@ -8811,7 +8819,7 @@ function usePropertyHandlers(input) {
8811
8819
  width: canvasSize.width,
8812
8820
  height: canvasSize.height
8813
8821
  };
8814
- setCompareResult(chunk7DGKSEIU_js.comparePresentation(cur, other));
8822
+ setCompareResult(chunk4MGJUBY7_js.comparePresentation(cur, other));
8815
8823
  setIsComparePanelOpen(true);
8816
8824
  } catch (err) {
8817
8825
  console.warn("Compare failed:", err);
@@ -9164,7 +9172,7 @@ function useViewerDialogs(input) {
9164
9172
  };
9165
9173
  }
9166
9174
  function computeGridSpacingPx(documentGridSpacing) {
9167
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk7DGKSEIU_js.GRID_SIZE);
9175
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunk4MGJUBY7_js.GRID_SIZE);
9168
9176
  }
9169
9177
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
9170
9178
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -9173,7 +9181,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
9173
9181
  }
9174
9182
  function computeSlideSectionGroups(slides, sections) {
9175
9183
  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),
9184
+ id: group.section?.id ?? (sections.length > 0 ? chunk4MGJUBY7_js.UNGROUPED_SECTION_ID : chunk4MGJUBY7_js.DEFAULT_SECTION_GROUP_ID),
9177
9185
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
9178
9186
  slideIndexes: group.slideIndexes,
9179
9187
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -9218,10 +9226,10 @@ function useDerivedSlideState(input) {
9218
9226
  );
9219
9227
  const slideSectionGroups = React17.useMemo(
9220
9228
  () => computeSlideSectionGroups(slides, sections).map((group) => {
9221
- if (group.id === chunk7DGKSEIU_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9229
+ if (group.id === chunk4MGJUBY7_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9222
9230
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
9223
9231
  }
9224
- if (group.id === chunk7DGKSEIU_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9232
+ if (group.id === chunk4MGJUBY7_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9225
9233
  return { ...group, label: t("pptx.sections.slides") };
9226
9234
  }
9227
9235
  return group;
@@ -9328,7 +9336,7 @@ function useAnnotationHandlers(input) {
9328
9336
  if (nextMode === "present") {
9329
9337
  presentation.enterPresentMode();
9330
9338
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9331
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9339
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9332
9340
  if (promptKeepInkAnnotations) {
9333
9341
  pendingModeAfterAnnotationsRef.current = nextMode;
9334
9342
  setShowKeepAnnotationsDialog(true);
@@ -9338,7 +9346,7 @@ function useAnnotationHandlers(input) {
9338
9346
  }
9339
9347
  } else {
9340
9348
  if (mode === "present") {
9341
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9349
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9342
9350
  }
9343
9351
  setMode(nextMode);
9344
9352
  }
@@ -9409,7 +9417,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
9409
9417
  (slide) => !elementId ? slide : {
9410
9418
  ...slide,
9411
9419
  elements: slide.elements.map(
9412
- (element) => element.id === elementId && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) ? {
9420
+ (element) => element.id === elementId && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) ? {
9413
9421
  ...element,
9414
9422
  text,
9415
9423
  textSegments: pptx.remapTextToSegments(
@@ -9497,14 +9505,14 @@ function useSerialize(input) {
9497
9505
  const pptxGuides = guides.map((g) => ({
9498
9506
  id: g.id,
9499
9507
  orientation: g.axis === "h" ? "horz" : "vert",
9500
- positionEmu: (0, chunk7DGKSEIU_js.dist_exports.guidePxToEmu)(g.position)
9508
+ positionEmu: (0, chunk4MGJUBY7_js.dist_exports.guidePxToEmu)(g.position)
9501
9509
  }));
9502
9510
  return {
9503
9511
  ...slide,
9504
9512
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9505
9513
  };
9506
9514
  });
9507
- const slidesToSave = chunk7DGKSEIU_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9515
+ const slidesToSave = chunk4MGJUBY7_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9508
9516
  const saveOptions = pptx.buildDeckSaveOptions({
9509
9517
  // Without this the Slide Size card edited a viewer-only pixel value and
9510
9518
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9685,7 +9693,7 @@ function usePresentationSetup(input) {
9685
9693
  return;
9686
9694
  }
9687
9695
  if (mode === "present" && nextMode !== "present") {
9688
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9696
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9689
9697
  stopAnimationSound();
9690
9698
  const exitHandler = exitModeHandlerRef.current;
9691
9699
  if (exitHandler) {
@@ -9806,12 +9814,12 @@ function useCanvasImagePaste(input) {
9806
9814
  );
9807
9815
  }
9808
9816
  function formatPatchFor(element, format) {
9809
- const updated = chunk7DGKSEIU_js.applyFormatToElement(element, format);
9817
+ const updated = chunk4MGJUBY7_js.applyFormatToElement(element, format);
9810
9818
  const updates = {};
9811
- if ((0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(updated)) {
9819
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(updated)) {
9812
9820
  updates.shapeStyle = updated.shapeStyle;
9813
9821
  }
9814
- if ((0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(updated)) {
9822
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(updated)) {
9815
9823
  updates.textStyle = updated.textStyle;
9816
9824
  }
9817
9825
  return updates;
@@ -9829,7 +9837,7 @@ function useFormatPainterEditing(input) {
9829
9837
  const prevFormatPainterRef = React17.useRef(false);
9830
9838
  React17.useEffect(() => {
9831
9839
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9832
- copiedFormatRef.current = chunk7DGKSEIU_js.copyFormatFromElement(selectedElement);
9840
+ copiedFormatRef.current = chunk4MGJUBY7_js.copyFormatFromElement(selectedElement);
9833
9841
  } else if (!formatPainterActive) {
9834
9842
  copiedFormatRef.current = null;
9835
9843
  }
@@ -10535,6 +10543,7 @@ function useContentLifecycle(input) {
10535
10543
  setCanvasSize: state.setCanvasSize,
10536
10544
  setSlideSizeEmu: state.setSlideSizeEmu,
10537
10545
  setHeaderFooter: state.setHeaderFooter,
10546
+ setFirstSlideNumber: state.setFirstSlideNumber,
10538
10547
  setLayoutOptions: state.setLayoutOptions,
10539
10548
  setSlideMasters: state.setSlideMasters,
10540
10549
  setModernCommentAuthors: state.setModernCommentAuthors,
@@ -10918,7 +10927,7 @@ function useKeyboardShortcutWiring(input) {
10918
10927
  }
10919
10928
  function stepSelectedFontSize(state, ops, direction) {
10920
10929
  const selected = state.selectedElement;
10921
- const currentPx = (selected && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10930
+ const currentPx = (selected && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10922
10931
  const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
10923
10932
  ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
10924
10933
  }
@@ -11469,7 +11478,7 @@ function useCollaborationWriteBack(input) {
11469
11478
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11470
11479
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11471
11480
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11472
- mergeTemplateElements: chunk7DGKSEIU_js.buildSaveSlides
11481
+ mergeTemplateElements: chunk4MGJUBY7_js.buildSaveSlides
11473
11482
  }),
11474
11483
  [latest]
11475
11484
  );
@@ -12022,8 +12031,8 @@ function useTouchGestures(input) {
12022
12031
  }
12023
12032
  const recognizer = pptx.createTouchGestureRecognizer({
12024
12033
  getScale: () => scaleRef.current,
12025
- minScale: chunk7DGKSEIU_js.MIN_ZOOM_SCALE,
12026
- maxScale: chunk7DGKSEIU_js.MAX_ZOOM_SCALE,
12034
+ minScale: chunk4MGJUBY7_js.MIN_ZOOM_SCALE,
12035
+ maxScale: chunk4MGJUBY7_js.MAX_ZOOM_SCALE,
12027
12036
  callbacks: {
12028
12037
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
12029
12038
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -12139,14 +12148,15 @@ function buildCanvasProps(input) {
12139
12148
  const fieldContext = pptx.buildFieldSubstitutionContext({
12140
12149
  headerFooter: s.headerFooter,
12141
12150
  customProperties: s.customProperties,
12142
- slide: activeSlide
12151
+ slide: activeSlide,
12152
+ firstSlideNumber: s.firstSlideNumber
12143
12153
  });
12144
12154
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
12145
12155
  const openExternalUrl = (url, target) => {
12146
12156
  if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
12147
12157
  return;
12148
12158
  }
12149
- chunk7DGKSEIU_js.safeOpenUrl(url, target);
12159
+ chunk4MGJUBY7_js.safeOpenUrl(url, target);
12150
12160
  };
12151
12161
  const handleActionClick = (elementId, action) => {
12152
12162
  if (mode === "present") {
@@ -12161,9 +12171,9 @@ function buildCanvasProps(input) {
12161
12171
  }
12162
12172
  };
12163
12173
  const handleHyperlinkClick = (url, target) => {
12164
- if (chunk7DGKSEIU_js.isPpactionUrl(url)) {
12174
+ if (chunk4MGJUBY7_js.isPpactionUrl(url)) {
12165
12175
  if (mode === "present") {
12166
- const parsed = chunk7DGKSEIU_js.parsePpactionUrl(url);
12176
+ const parsed = chunk4MGJUBY7_js.parsePpactionUrl(url);
12167
12177
  if (parsed) {
12168
12178
  presentation.handlePresentationAction({
12169
12179
  action: parsed.action,
@@ -12556,7 +12566,7 @@ function buildToolbarProps(input) {
12556
12566
  isCommentsPanelOpen: s.isInspectorPaneOpen,
12557
12567
  slideCommentCount: activeSlide?.comments?.length ?? 0,
12558
12568
  formatPainterActive: s.formatPainterActive,
12559
- canActivateFormatPainter: chunk7DGKSEIU_js.hasCopyableFormat(selectedElement),
12569
+ canActivateFormatPainter: chunk4MGJUBY7_js.hasCopyableFormat(selectedElement),
12560
12570
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12561
12571
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12562
12572
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12804,7 +12814,9 @@ function useViewerBuildingBlocksCollaboration(input) {
12804
12814
  }
12805
12815
  function useViewerBuildingBlocksCore(input) {
12806
12816
  const { content} = input;
12807
- const state = useViewerState();
12817
+ const state = useViewerState({
12818
+ inspectorInitiallyOpen: input.inspectorInitiallyOpen
12819
+ });
12808
12820
  const {
12809
12821
  containerRef,
12810
12822
  mode,
@@ -12877,7 +12889,7 @@ function useViewerBuildingBlocksCore(input) {
12877
12889
  documentGridSpacing: state.viewProperties?.gridSpacing
12878
12890
  });
12879
12891
  const themeColorMap = React17.useMemo(
12880
- () => state.theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12892
+ () => state.theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12881
12893
  [state.theme?.colorScheme]
12882
12894
  );
12883
12895
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -13452,23 +13464,23 @@ function ColorChangedImage({
13452
13464
  className,
13453
13465
  alt
13454
13466
  }) {
13455
- const tolerance = tolerancePct ?? chunk7DGKSEIU_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13456
- const cacheKey = chunk7DGKSEIU_js.buildCacheKey(
13467
+ const tolerance = tolerancePct ?? chunk4MGJUBY7_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13468
+ const cacheKey = chunk4MGJUBY7_js.buildCacheKey(
13457
13469
  src,
13458
13470
  clrChange.clrFrom,
13459
13471
  clrChange.clrTo,
13460
13472
  tolerance,
13461
13473
  Boolean(clrChange.clrToTransparent)
13462
13474
  );
13463
- const cached = chunk7DGKSEIU_js.getCachedResult(cacheKey);
13475
+ const cached = chunk4MGJUBY7_js.getCachedResult(cacheKey);
13464
13476
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13465
13477
  React17.useEffect(() => {
13466
- if (chunk7DGKSEIU_js.getCachedResult(cacheKey)) {
13467
- setProcessedSrc(chunk7DGKSEIU_js.getCachedResult(cacheKey) ?? null);
13478
+ if (chunk4MGJUBY7_js.getCachedResult(cacheKey)) {
13479
+ setProcessedSrc(chunk4MGJUBY7_js.getCachedResult(cacheKey) ?? null);
13468
13480
  return;
13469
13481
  }
13470
13482
  let cancelled = false;
13471
- chunk7DGKSEIU_js.applyColorChange(
13483
+ chunk4MGJUBY7_js.applyColorChange(
13472
13484
  src,
13473
13485
  clrChange.clrFrom,
13474
13486
  clrChange.clrTo,
@@ -13476,7 +13488,7 @@ function ColorChangedImage({
13476
13488
  Boolean(clrChange.clrToTransparent)
13477
13489
  ).then((result) => {
13478
13490
  if (!cancelled) {
13479
- chunk7DGKSEIU_js.setCachedResult(cacheKey, result.dataUrl);
13491
+ chunk4MGJUBY7_js.setCachedResult(cacheKey, result.dataUrl);
13480
13492
  setProcessedSrc(result.dataUrl);
13481
13493
  }
13482
13494
  return void 0;
@@ -13568,7 +13580,7 @@ function TiledImageLayer({
13568
13580
  cancelled = true;
13569
13581
  };
13570
13582
  }, [src]);
13571
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk7DGKSEIU_js.getImageTilingStyle(element, nativeSize), ...style } });
13583
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk4MGJUBY7_js.getImageTilingStyle(element, nativeSize), ...style } });
13572
13584
  }
13573
13585
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13574
13586
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13637,7 +13649,7 @@ function renderImg(el, style, filter, alt, opacity) {
13637
13649
  ...filter ? { filter } : {},
13638
13650
  ...opacity !== void 0 ? { opacity } : {}
13639
13651
  };
13640
- if (chunk7DGKSEIU_js.isImageTiled(el)) {
13652
+ if (chunk4MGJUBY7_js.isImageTiled(el)) {
13641
13653
  const tileSrc = imgSrc(el);
13642
13654
  if (!tileSrc) {
13643
13655
  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 +13668,12 @@ function renderImg(el, style, filter, alt, opacity) {
13656
13668
  ] });
13657
13669
  }
13658
13670
  const colorWash = pptx.getImageColorWashStyle(
13659
- (0, chunk7DGKSEIU_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13671
+ (0, chunk4MGJUBY7_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13660
13672
  );
13661
13673
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13662
- const duotoneColors = chunk7DGKSEIU_js.getDuotoneColors(el);
13674
+ const duotoneColors = chunk4MGJUBY7_js.getDuotoneColors(el);
13663
13675
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13664
- const filterForImg = useDuotoneCanvas ? chunk7DGKSEIU_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13676
+ const filterForImg = useDuotoneCanvas ? chunk4MGJUBY7_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13665
13677
  const canvasEffectStyles = {
13666
13678
  ...filterForImg ? { filter: filterForImg } : {},
13667
13679
  ...opacity !== void 0 ? { opacity } : {}
@@ -13737,10 +13749,10 @@ function SlideBackgroundImageLayer({
13737
13749
  style: { zIndex: 0 },
13738
13750
  children: renderImg(
13739
13751
  backgroundElement,
13740
- chunk7DGKSEIU_js.getImageRenderStyle(backgroundElement),
13741
- chunk7DGKSEIU_js.getImageEffectsFilter(backgroundElement),
13752
+ chunk4MGJUBY7_js.getImageRenderStyle(backgroundElement),
13753
+ chunk4MGJUBY7_js.getImageEffectsFilter(backgroundElement),
13742
13754
  "",
13743
- chunk7DGKSEIU_js.getImageEffectsOpacity(backgroundElement)
13755
+ chunk4MGJUBY7_js.getImageEffectsOpacity(backgroundElement)
13744
13756
  )
13745
13757
  }
13746
13758
  );
@@ -14011,7 +14023,7 @@ function ChartElementView({
14011
14023
  pptx.getBarFacePicturePixelSampleVersion
14012
14024
  );
14013
14025
  const viewModel = React17.useMemo(() => {
14014
- return canEdit ? chunk7DGKSEIU_js.buildReactChartViewModel(element) : null;
14026
+ return canEdit ? chunk4MGJUBY7_js.buildReactChartViewModel(element) : null;
14015
14027
  }, [canEdit, element, barFacePictureSampleVersion]);
14016
14028
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
14017
14029
  React17.useEffect(() => {
@@ -14096,9 +14108,9 @@ function ChartElementView({
14096
14108
  textStyle: animationState?.textStyle,
14097
14109
  onSelect: chart3D.onSelect,
14098
14110
  onDrag: chart3D.onDrag,
14099
- children: chunk7DGKSEIU_js.renderChartElement(renderedElement)
14111
+ children: chunk4MGJUBY7_js.renderChartElement(renderedElement)
14100
14112
  }
14101
- ) : chunk7DGKSEIU_js.renderChartElement(renderedElement),
14113
+ ) : chunk4MGJUBY7_js.renderChartElement(renderedElement),
14102
14114
  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
14115
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
14104
14116
  "input",
@@ -14428,7 +14440,7 @@ function ResizeHandles({
14428
14440
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14429
14441
  "data-pptx-handle-kind": "resize",
14430
14442
  "data-pptx-compact": true,
14431
- className: chunk7DGKSEIU_js.cn(
14443
+ className: chunk4MGJUBY7_js.cn(
14432
14444
  "absolute z-10 group border-0 bg-transparent p-0",
14433
14445
  RESIZE_DEFAULT_CLASSES,
14434
14446
  posClass,
@@ -14454,7 +14466,7 @@ function ResizeHandles({
14454
14466
  "div",
14455
14467
  {
14456
14468
  "data-pptx-handle-hit": true,
14457
- className: chunk7DGKSEIU_js.cn(
14469
+ className: chunk4MGJUBY7_js.cn(
14458
14470
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14459
14471
  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
14472
  ),
@@ -14475,7 +14487,7 @@ function ResizeHandles({
14475
14487
  "aria-label": t("pptx.selectionOverlay.rotate"),
14476
14488
  "data-pptx-handle-kind": "rotate",
14477
14489
  "data-pptx-compact": true,
14478
- className: chunk7DGKSEIU_js.cn(
14490
+ className: chunk4MGJUBY7_js.cn(
14479
14491
  "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
14492
  ROTATE_DEFAULT_CLASSES
14481
14493
  ),
@@ -14545,17 +14557,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
14545
14557
  animationState,
14546
14558
  textStyleOverrideCss
14547
14559
  }) {
14548
- const shapeEl = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14560
+ const shapeEl = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14549
14561
  const viewWidth = Math.max(el.width, 0);
14550
14562
  const viewHeight = Math.max(el.height, 0);
14551
14563
  const svgWidth = Math.max(el.width, 1);
14552
14564
  const svgHeight = Math.max(el.height, 1);
14553
14565
  const ss = shapeEl?.shapeStyle;
14554
14566
  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(
14567
+ const strokeColor = chunk4MGJUBY7_js.normalizeHexColor(ss?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
14568
+ const strokePaint = chunk4MGJUBY7_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14569
+ const dashType = chunk4MGJUBY7_js.normalizeStrokeDashType(ss?.strokeDash);
14570
+ const dashArray = chunk4MGJUBY7_js.getSvgStrokeDasharray(
14559
14571
  dashType,
14560
14572
  Math.max(strokeWidth, 1),
14561
14573
  ss?.customDashSegments
@@ -14566,14 +14578,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14566
14578
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14567
14579
  const startMarkerId = `${markerSeed}-sel-start`;
14568
14580
  const endMarkerId = `${markerSeed}-sel-end`;
14569
- const compoundOffsets = chunk7DGKSEIU_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14570
- const compoundWidths = chunk7DGKSEIU_js.getCompoundLineWidths(compoundLine, strokeWidth);
14581
+ const compoundOffsets = chunk4MGJUBY7_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14582
+ const compoundWidths = chunk4MGJUBY7_js.getCompoundLineWidths(compoundLine, strokeWidth);
14571
14583
  const strokeCap = pptx.svgLineCap(ss?.lineCap);
14572
- const textEl = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14584
+ const textEl = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14573
14585
  const connectorText = textEl?.text?.trim() ?? "";
14574
14586
  const connectorTextSegments = textEl?.textSegments;
14575
14587
  const connectorTextStyle = textEl?.textStyle;
14576
- const pathGeometry = shapeEl ? chunk7DGKSEIU_js.getConnectorPathGeometry(shapeEl) : {
14588
+ const pathGeometry = shapeEl ? chunk4MGJUBY7_js.getConnectorPathGeometry(shapeEl) : {
14577
14589
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14578
14590
  startX: 0,
14579
14591
  startY: 0,
@@ -14582,16 +14594,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
14582
14594
  };
14583
14595
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14584
14596
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14585
- const lineShadow = chunk7DGKSEIU_js.buildLineShadowCss(el);
14586
- const lineGlow = chunk7DGKSEIU_js.buildLineGlowFilter(el);
14597
+ const lineShadow = chunk4MGJUBY7_js.buildLineShadowCss(el);
14598
+ const lineGlow = chunk4MGJUBY7_js.buildLineGlowFilter(el);
14587
14599
  return /* @__PURE__ */ jsxRuntime.jsxs(
14588
14600
  "div",
14589
14601
  {
14590
14602
  "data-pptx-element": "true",
14591
14603
  "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),
14604
+ role: chunk4MGJUBY7_js.getAriaRole(el, { actionable: false }),
14605
+ "aria-label": chunk4MGJUBY7_js.getAriaLabel(el),
14606
+ "aria-roledescription": chunk4MGJUBY7_js.getAriaRoleDescription(el),
14595
14607
  "aria-selected": isSelected ? true : void 0,
14596
14608
  className: "absolute",
14597
14609
  style: {
@@ -14624,14 +14636,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14624
14636
  style: { overflow: "visible", pointerEvents: "none" },
14625
14637
  children: [
14626
14638
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14627
- chunk7DGKSEIU_js.renderConnectorMarker(
14639
+ chunk4MGJUBY7_js.renderConnectorMarker(
14628
14640
  startMarkerId,
14629
14641
  startArrow,
14630
14642
  strokePaint,
14631
14643
  ss?.connectorStartArrowWidth,
14632
14644
  ss?.connectorStartArrowLength
14633
14645
  ),
14634
- chunk7DGKSEIU_js.renderConnectorMarker(
14646
+ chunk4MGJUBY7_js.renderConnectorMarker(
14635
14647
  endMarkerId,
14636
14648
  endArrow,
14637
14649
  strokePaint,
@@ -14837,14 +14849,14 @@ function getElementInteractionProps({
14837
14849
  };
14838
14850
  }
14839
14851
  function renderDagDuotoneFilterForElement(el) {
14840
- if (!chunk7DGKSEIU_js.hasDagDuotoneEffect(el)) {
14852
+ if (!chunk4MGJUBY7_js.hasDagDuotoneEffect(el)) {
14841
14853
  return null;
14842
14854
  }
14843
14855
  const duotone = el.shapeStyle?.dagDuotone;
14844
14856
  if (!duotone) {
14845
14857
  return null;
14846
14858
  }
14847
- return chunk7DGKSEIU_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14859
+ return chunk4MGJUBY7_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14848
14860
  }
14849
14861
  function getContainerStyle({
14850
14862
  el,
@@ -14857,7 +14869,7 @@ function getContainerStyle({
14857
14869
  has3DExtrusion,
14858
14870
  templateEditing
14859
14871
  }) {
14860
- const ss = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14872
+ const ss = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14861
14873
  const isPicture = el.type === "picture" || el.type === "image";
14862
14874
  const blurGrowVisible = Boolean(
14863
14875
  ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
@@ -14871,10 +14883,10 @@ function getContainerStyle({
14871
14883
  top: isFullscreenMedia ? fs.top : el.y,
14872
14884
  width: isFullscreenMedia ? fs.width : painted.width,
14873
14885
  ...heightStyle,
14874
- transform: isFullscreenMedia ? fs.transform : chunk7DGKSEIU_js.getElementTransform(el),
14886
+ transform: isFullscreenMedia ? fs.transform : chunk4MGJUBY7_js.getElementTransform(el),
14875
14887
  transformOrigin: "center",
14876
14888
  overflow: overflowValue,
14877
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk7DGKSEIU_js.getCropShapeClipPath(el) : void 0,
14889
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk4MGJUBY7_js.getCropShapeClipPath(el) : void 0,
14878
14890
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
14879
14891
  visibility: animationState?.visible === false ? "hidden" : "visible",
14880
14892
  animation: animationState?.cssAnimation,
@@ -14897,7 +14909,10 @@ function getContainerStyle({
14897
14909
  // bindings multiply the two; React spread the shape style over its own
14898
14910
  // `opacity` key, so a half-transparent element carrying a DAG alpha
14899
14911
  // rendered at the DAG's alpha alone.
14900
- opacity: typeof shapeVisualStyle.opacity === "number" ? (opacity ?? 1) * shapeVisualStyle.opacity : opacity,
14912
+ opacity: pptx.getAnimationOpacity(
14913
+ animationState,
14914
+ typeof shapeVisualStyle.opacity === "number" ? (opacity ?? 1) * shapeVisualStyle.opacity : opacity
14915
+ ),
14901
14916
  // Editable-template affordance: a distinct amber dashed ring + slight
14902
14917
  // transparency so inherited master/layout shapes read as "template" while
14903
14918
  // edit-template mode is on. Applied after the shape style so it wins; never
@@ -14906,11 +14921,11 @@ function getContainerStyle({
14906
14921
  };
14907
14922
  }
14908
14923
  function shapeParams(element) {
14909
- const style = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
14924
+ const style = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
14910
14925
  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);
14926
+ const strokeColor = chunk4MGJUBY7_js.normalizeHexColor(style?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
14927
+ const fillColor = chunk4MGJUBY7_js.normalizeHexColor(style?.fillColor, chunk4MGJUBY7_js.DEFAULT_FILL_COLOR);
14928
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk4MGJUBY7_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14914
14929
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
14915
14930
  }
14916
14931
  var Extrusion3DOverlay = React17__default.default.memo(
@@ -15015,7 +15030,7 @@ function ShapeEffectOverlay({
15015
15030
  const fillOverlayStyle = overlay ? {
15016
15031
  position: "absolute",
15017
15032
  inset: 0,
15018
- ...(0, chunk7DGKSEIU_js.dist_exports.isImageLikeElement)(element) ? chunk7DGKSEIU_js.getImageSurfaceMaskStyle(element) : {},
15033
+ ...(0, chunk4MGJUBY7_js.dist_exports.isImageLikeElement)(element) ? chunk4MGJUBY7_js.getImageSurfaceMaskStyle(element) : {},
15019
15034
  background: overlay.color,
15020
15035
  mixBlendMode: overlay.blendMode,
15021
15036
  pointerEvents: "none"
@@ -15216,12 +15231,13 @@ var ElementRenderer = React17__default.default.memo(
15216
15231
  const chartUpdateHandler = smartArtUpdateHandler;
15217
15232
  const { hf, fc, sw, sc } = shapeParams(el);
15218
15233
  const allow = pptx.resolveElementInteractivity(el);
15219
- const backgroundAnimationState = presentationElementStates?.get(`${el.id}::pptx-bg`);
15234
+ const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15235
+ const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15220
15236
  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;
15237
+ const isTxt = chunk4MGJUBY7_js.isEditableTextElement(el) && allow.textEditable;
15238
+ const txtSE = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15223
15239
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15224
- const ss = chunk7DGKSEIU_js.getShapeVisualStyle(
15240
+ const ss = chunk4MGJUBY7_js.getShapeVisualStyle(
15225
15241
  el,
15226
15242
  hf,
15227
15243
  fc,
@@ -15230,9 +15246,9 @@ var ElementRenderer = React17__default.default.memo(
15230
15246
  visualAnimationState?.animatesFill,
15231
15247
  visualAnimationState?.animatesStroke
15232
15248
  );
15233
- const ts = chunk7DGKSEIU_js.getTextStyleForElement(el, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR);
15249
+ const ts = chunk4MGJUBY7_js.getTextStyleForElement(el, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR);
15234
15250
  const isImg = el.type === "picture" || el.type === "image";
15235
- const vs = chunk7DGKSEIU_js.renderVectorShape(
15251
+ const vs = chunk4MGJUBY7_js.renderVectorShape(
15236
15252
  el,
15237
15253
  isImg ? false : hf,
15238
15254
  fc,
@@ -15242,10 +15258,10 @@ var ElementRenderer = React17__default.default.memo(
15242
15258
  visualAnimationState?.animatesStroke
15243
15259
  );
15244
15260
  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;
15261
+ const isConn = chunk4MGJUBY7_js.isConnectorOrLineElement(el);
15262
+ const shapeStyle3d = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15247
15263
  const extrusionData = React17.useMemo(
15248
- () => chunk7DGKSEIU_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15264
+ () => chunk4MGJUBY7_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15249
15265
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15250
15266
  );
15251
15267
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15298,6 +15314,7 @@ var ElementRenderer = React17__default.default.memo(
15298
15314
  });
15299
15315
  const hitTargetStyle = pptx.shouldRenderHitTarget(effectiveCanInteract, isPresentationPassive) ? pptx.elementHitTargetStyle(el) : void 0;
15300
15316
  const isFocusable = effectiveCanInteract || isActionable;
15317
+ const backgroundLayerStyle = backgroundAnimationState ? pptx.getShapeEffectAnimationLayerStyle(el, ss, backgroundAnimationState) : void 0;
15301
15318
  const containerStyle = getContainerStyle({
15302
15319
  el,
15303
15320
  isFullscreenMedia,
@@ -15334,7 +15351,7 @@ var ElementRenderer = React17__default.default.memo(
15334
15351
  "aria-hidden": aria.hidden ? true : void 0,
15335
15352
  "aria-selected": isSelected ? true : void 0,
15336
15353
  tabIndex: isFocusable ? 0 : -1,
15337
- className: chunk7DGKSEIU_js.cn(
15354
+ className: chunk4MGJUBY7_js.cn(
15338
15355
  "absolute",
15339
15356
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15340
15357
  cur,
@@ -15376,34 +15393,19 @@ var ElementRenderer = React17__default.default.memo(
15376
15393
  style: hitTargetStyle
15377
15394
  }
15378
15395
  ),
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(
15396
+ backgroundAnimationState && effectPlacement.beforeBody ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-animation-layer": "background", style: backgroundLayerStyle, children: [
15397
+ /* @__PURE__ */ jsxRuntime.jsx(
15398
+ ShapeEffectOverlay,
15399
+ {
15400
+ element: el,
15401
+ animatesFill: visualAnimationState?.animatesFill,
15402
+ animatesStroke: visualAnimationState?.animatesStroke
15403
+ }
15404
+ ),
15405
+ extrusionData.hasExtrusion && /* @__PURE__ */ jsxRuntime.jsx(Extrusion3DOverlay, { data: extrusionData }),
15406
+ isImg ? null : vs
15407
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15408
+ effectPlacement.beforeBody && /* @__PURE__ */ jsxRuntime.jsx(
15407
15409
  ShapeEffectOverlay,
15408
15410
  {
15409
15411
  element: el,
@@ -15422,9 +15424,9 @@ var ElementRenderer = React17__default.default.memo(
15422
15424
  txtSE,
15423
15425
  txtS: ts,
15424
15426
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15425
- imgStyle: chunk7DGKSEIU_js.getImageRenderStyle(el),
15426
- imgFilter: chunk7DGKSEIU_js.getImageEffectsFilter(el),
15427
- imgOpacity: chunk7DGKSEIU_js.getImageEffectsOpacity(el),
15427
+ imgStyle: chunk4MGJUBY7_js.getImageRenderStyle(el),
15428
+ imgFilter: chunk4MGJUBY7_js.getImageEffectsFilter(el),
15429
+ imgOpacity: chunk4MGJUBY7_js.getImageEffectsOpacity(el),
15428
15430
  imgAlt: imageAltText,
15429
15431
  isTxtEl: isTxt,
15430
15432
  media: mediaDataUrls,
@@ -15476,12 +15478,19 @@ var ElementRenderer = React17__default.default.memo(
15476
15478
  onUpdateChartElement: chartUpdateHandler,
15477
15479
  onFormatText
15478
15480
  }),
15479
- isImg && !backgroundAnimationState && /* @__PURE__ */ jsxRuntime.jsx(
15480
- ShapeEffectOverlay,
15481
+ effectPlacement.afterBody && /* @__PURE__ */ jsxRuntime.jsx(
15482
+ "div",
15481
15483
  {
15482
- element: el,
15483
- animatesFill: visualAnimationState?.animatesFill,
15484
- animatesStroke: visualAnimationState?.animatesStroke
15484
+ "data-pptx-animation-layer": backgroundAnimationState ? "background" : void 0,
15485
+ style: backgroundLayerStyle ?? { display: "contents" },
15486
+ children: /* @__PURE__ */ jsxRuntime.jsx(
15487
+ ShapeEffectOverlay,
15488
+ {
15489
+ element: el,
15490
+ animatesFill: visualAnimationState?.animatesFill,
15491
+ animatesStroke: visualAnimationState?.animatesStroke
15492
+ }
15493
+ )
15485
15494
  }
15486
15495
  ),
15487
15496
  /* @__PURE__ */ jsxRuntime.jsx(ActionAffordances, { affordance: actionAffordance })
@@ -15554,10 +15563,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15554
15563
  }
15555
15564
  function renderInk(el, options) {
15556
15565
  const replay = options?.replay ?? false;
15557
- const strokes = chunk7DGKSEIU_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15566
+ const strokes = chunk4MGJUBY7_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15558
15567
  strokes.some((s) => s.circles || s.nibMarks);
15559
15568
  const pressureSensitive = options?.pressureSensitive;
15560
- const replayStyles = replay ? chunk7DGKSEIU_js.getInkReplayStyles(el, options?.replayConfig) : null;
15569
+ const replayStyles = replay ? chunk4MGJUBY7_js.getInkReplayStyles(el, options?.replayConfig) : null;
15561
15570
  return /* @__PURE__ */ jsxRuntime.jsxs(
15562
15571
  "svg",
15563
15572
  {
@@ -15565,7 +15574,7 @@ function renderInk(el, options) {
15565
15574
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15566
15575
  preserveAspectRatio: "none",
15567
15576
  children: [
15568
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk7DGKSEIU_js.INK_REPLAY_KEYFRAMES }),
15577
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk4MGJUBY7_js.INK_REPLAY_KEYFRAMES }),
15569
15578
  strokes.map(
15570
15579
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15571
15580
  )
@@ -15576,7 +15585,7 @@ function renderInk(el, options) {
15576
15585
  function renderGroup(children, parentGroupFill) {
15577
15586
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15578
15587
  const { hf, fc, sw, sc } = shapeParams(c);
15579
- const baseSs = chunk7DGKSEIU_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15588
+ const baseSs = chunk4MGJUBY7_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15580
15589
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15581
15590
  const ss = inheritedFill ? {
15582
15591
  ...baseSs,
@@ -15587,9 +15596,9 @@ function renderGroup(children, parentGroupFill) {
15587
15596
  backgroundPosition: inheritedFill.backgroundPosition
15588
15597
  } : baseSs;
15589
15598
  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);
15599
+ const vs = chunk4MGJUBY7_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15600
+ const ts = chunk4MGJUBY7_js.getTextStyleForElement(c, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR);
15601
+ const isTxt = chunk4MGJUBY7_js.isEditableTextElement(c);
15593
15602
  return /* @__PURE__ */ jsxRuntime.jsxs(
15594
15603
  "div",
15595
15604
  {
@@ -15598,9 +15607,9 @@ function renderGroup(children, parentGroupFill) {
15598
15607
  style: {
15599
15608
  left: c.x,
15600
15609
  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),
15610
+ width: Math.max(c.width, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE),
15611
+ height: Math.max(c.height, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE),
15612
+ transform: chunk4MGJUBY7_js.getElementTransform(c),
15604
15613
  transformOrigin: "center",
15605
15614
  ...ss,
15606
15615
  ...isI ? {
@@ -15625,8 +15634,8 @@ function renderGroup(children, parentGroupFill) {
15625
15634
  // A nested group: recurse, chaining the inherited fill so a
15626
15635
  // `grpFill` shape under a fill-less sub-group still paints.
15627
15636
  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(
15637
+ ) : 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: [
15638
+ chunk4MGJUBY7_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15630
15639
  TiledImageLayer,
15631
15640
  {
15632
15641
  element: c,
@@ -15639,7 +15648,7 @@ function renderGroup(children, parentGroupFill) {
15639
15648
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15640
15649
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15641
15650
  className: "pointer-events-none select-none",
15642
- style: chunk7DGKSEIU_js.getImageRenderStyle(c),
15651
+ style: chunk4MGJUBY7_js.getImageRenderStyle(c),
15643
15652
  draggable: false
15644
15653
  }
15645
15654
  ),
@@ -15651,7 +15660,7 @@ function renderGroup(children, parentGroupFill) {
15651
15660
  {
15652
15661
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15653
15662
  style: ts,
15654
- children: chunk7DGKSEIU_js.renderTextSegments(c, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR)
15663
+ children: chunk4MGJUBY7_js.renderTextSegments(c, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR)
15655
15664
  }
15656
15665
  ) : null
15657
15666
  ] })
@@ -15665,8 +15674,8 @@ function renderContentPart(el, options) {
15665
15674
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15666
15675
  const replay = options?.replay ?? false;
15667
15676
  const pressureSensitive = options?.pressureSensitive ?? true;
15668
- const strokes = chunk7DGKSEIU_js.buildContentPartStrokes(el);
15669
- const replayStyles = replay ? chunk7DGKSEIU_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15677
+ const strokes = chunk4MGJUBY7_js.buildContentPartStrokes(el);
15678
+ const replayStyles = replay ? chunk4MGJUBY7_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15670
15679
  return /* @__PURE__ */ jsxRuntime.jsxs(
15671
15680
  "svg",
15672
15681
  {
@@ -15674,7 +15683,7 @@ function renderContentPart(el, options) {
15674
15683
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15675
15684
  preserveAspectRatio: "none",
15676
15685
  children: [
15677
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk7DGKSEIU_js.INK_REPLAY_KEYFRAMES }),
15686
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk4MGJUBY7_js.INK_REPLAY_KEYFRAMES }),
15678
15687
  strokes.map(
15679
15688
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15680
15689
  )
@@ -15901,9 +15910,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
15901
15910
  collaboration: connected,
15902
15911
  model: pptx.createInlineListModelObserver(element),
15903
15912
  activationSelection,
15904
- children: seed && !connected ? chunk7DGKSEIU_js.renderTextSegments(
15913
+ children: seed && !connected ? chunk4MGJUBY7_js.renderTextSegments(
15905
15914
  element,
15906
- chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
15915
+ chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
15907
15916
  void 0,
15908
15917
  void 0,
15909
15918
  void 0,
@@ -16073,7 +16082,7 @@ function InlineTextEditor({
16073
16082
  seedRef.current = {
16074
16083
  initialText,
16075
16084
  hasRichSegments: Boolean(
16076
- (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16085
+ (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16077
16086
  )
16078
16087
  };
16079
16088
  }
@@ -16139,8 +16148,8 @@ function InlineTextEditor({
16139
16148
  pending.endOffset
16140
16149
  );
16141
16150
  });
16142
- const warpStyle = chunk7DGKSEIU_js.getTextWarpStyle(textStyleRaw);
16143
- const compensationTransform = chunk7DGKSEIU_js.getTextCompensationTransform(element);
16151
+ const warpStyle = chunk4MGJUBY7_js.getTextWarpStyle(textStyleRaw);
16152
+ const compensationTransform = chunk4MGJUBY7_js.getTextCompensationTransform(element);
16144
16153
  const warpTransform = warpStyle?.transform;
16145
16154
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
16146
16155
  const wrapperStyle = {
@@ -16151,7 +16160,7 @@ function InlineTextEditor({
16151
16160
  transformOrigin: warpStyle?.transformOrigin || "center"
16152
16161
  };
16153
16162
  const nextInlineStyleValue = (property) => {
16154
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element)) {
16163
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element)) {
16155
16164
  return true;
16156
16165
  }
16157
16166
  const result = pptx.getInlineEditorSelectionResult(element.textSegments);
@@ -16227,7 +16236,7 @@ function InlineTextEditor({
16227
16236
  const text = e.clipboardData.getData("text/plain");
16228
16237
  document.execCommand("insertText", false, text);
16229
16238
  },
16230
- children: list.seed ? list.children : seed.hasRichSegments ? chunk7DGKSEIU_js.renderTextSegments(element, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR) : seed.initialText
16239
+ children: list.seed ? list.children : seed.hasRichSegments ? chunk4MGJUBY7_js.renderTextSegments(element, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR) : seed.initialText
16231
16240
  },
16232
16241
  list.seed?.paragraphs[0].token ?? "plain"
16233
16242
  );
@@ -17164,7 +17173,7 @@ function SmartArtRendererImpl({
17164
17173
  if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
17165
17174
  return;
17166
17175
  }
17167
- const updated = (0, chunk7DGKSEIU_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17176
+ const updated = (0, chunk4MGJUBY7_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17168
17177
  const box = { width: element.width, height: element.height };
17169
17178
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
17170
17179
  updated,
@@ -17180,7 +17189,7 @@ function SmartArtRendererImpl({
17180
17189
  if (!onUpdateElement) {
17181
17190
  return;
17182
17191
  }
17183
- const next = (0, chunk7DGKSEIU_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17192
+ const next = (0, chunk4MGJUBY7_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17184
17193
  if (next !== smartArtData) {
17185
17194
  const box = { width: element.width, height: element.height };
17186
17195
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
@@ -17374,7 +17383,7 @@ function groupIntoParagraphs(element, fieldContext) {
17374
17383
  element,
17375
17384
  fieldContext ? (seg) => {
17376
17385
  if (seg.fieldType) {
17377
- const substituted = chunk7DGKSEIU_js.substituteFieldText(
17386
+ const substituted = chunk4MGJUBY7_js.substituteFieldText(
17378
17387
  seg.text,
17379
17388
  seg.fieldType,
17380
17389
  fieldContext,
@@ -17409,13 +17418,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17409
17418
  if (s.strikethrough) {
17410
17419
  decos.push("line-through");
17411
17420
  }
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);
17421
+ 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
17422
  return {
17414
17423
  fill,
17415
- fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE,
17424
+ fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE,
17416
17425
  fontWeight: s.bold ? 700 : 400,
17417
17426
  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,
17427
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY,
17419
17428
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17420
17429
  };
17421
17430
  }
@@ -17423,8 +17432,8 @@ function resolveSegmentFont(segment, element) {
17423
17432
  const s = segment.style || {};
17424
17433
  const family = s.fontFamily || element.textStyle?.fontFamily;
17425
17434
  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,
17435
+ fontFamily: family ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(family) : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY,
17436
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE,
17428
17437
  bold: s.bold ?? element.textStyle?.bold,
17429
17438
  italic: s.italic ?? element.textStyle?.italic
17430
17439
  };
@@ -17490,7 +17499,7 @@ function WarpedText({
17490
17499
  fallbackColor,
17491
17500
  fieldContext
17492
17501
  }) {
17493
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element)) {
17502
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element)) {
17494
17503
  return null;
17495
17504
  }
17496
17505
  const textEl = element;
@@ -17508,9 +17517,9 @@ function WarpedText({
17508
17517
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17509
17518
  const align = textEl.textStyle?.align ?? "center";
17510
17519
  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);
17520
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE;
17521
+ const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY;
17522
+ const baseFill = chunk4MGJUBY7_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17514
17523
  if (pptx.hasGlyphEnvelope(preset)) {
17515
17524
  const perLine = pptx.buildGlyphEnvelopeBlock(
17516
17525
  preset,
@@ -17610,7 +17619,7 @@ function WarpedText({
17610
17619
  );
17611
17620
  }
17612
17621
  var GLYPH_BY_SHAPE = Object.fromEntries(
17613
- chunk7DGKSEIU_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17622
+ chunk4MGJUBY7_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17614
17623
  );
17615
17624
  GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
17616
17625
  GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
@@ -17680,11 +17689,11 @@ function renderTextElementBody(options) {
17680
17689
  const isLinkedTextBox = pptx.isLinkedTextBox(el);
17681
17690
  const linkedSegments = pptx.getOverflowSegments(el, slideElements);
17682
17691
  const useSvgWarp = pptx.shouldUseSvgWarp(
17683
- (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17692
+ (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17684
17693
  );
17685
- const scene3dStyle = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? chunk7DGKSEIU_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17694
+ const scene3dStyle = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? chunk4MGJUBY7_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17686
17695
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17687
- const composedTransform = [rotationTransform, chunk7DGKSEIU_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17696
+ const composedTransform = [rotationTransform, chunk4MGJUBY7_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17688
17697
  const transformStyle = {
17689
17698
  transform: composedTransform,
17690
17699
  // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
@@ -17714,18 +17723,18 @@ function renderTextElementBody(options) {
17714
17723
  shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
17715
17724
  "div",
17716
17725
  {
17717
- className: chunk7DGKSEIU_js.cn(
17726
+ className: chunk4MGJUBY7_js.cn(
17718
17727
  "relative z-10 w-full h-full",
17719
17728
  onHyperlinkClick ? "" : "pointer-events-none"
17720
17729
  ),
17721
- style: { ...chunk7DGKSEIU_js.getTextLayoutStyle(el), ...transformStyle },
17730
+ style: { ...chunk4MGJUBY7_js.getTextLayoutStyle(el), ...transformStyle },
17722
17731
  children: /* @__PURE__ */ jsxRuntime.jsx(
17723
17732
  WarpedText,
17724
17733
  {
17725
17734
  element: el,
17726
17735
  width: el.width,
17727
17736
  height: el.height,
17728
- fallbackColor: chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
17737
+ fallbackColor: chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
17729
17738
  findHighlights: findHl,
17730
17739
  fieldContext
17731
17740
  }
@@ -17734,19 +17743,19 @@ function renderTextElementBody(options) {
17734
17743
  ) : /* @__PURE__ */ jsxRuntime.jsx(
17735
17744
  "div",
17736
17745
  {
17737
- className: chunk7DGKSEIU_js.cn(
17746
+ className: chunk4MGJUBY7_js.cn(
17738
17747
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
17739
17748
  onHyperlinkClick ? "" : "pointer-events-none"
17740
17749
  ),
17741
17750
  style: {
17742
- ...chunk7DGKSEIU_js.getTextLayoutStyle(el),
17751
+ ...chunk4MGJUBY7_js.getTextLayoutStyle(el),
17743
17752
  ...txtS,
17744
- ...chunk7DGKSEIU_js.getTextWarpStyle(txtSE),
17753
+ ...chunk4MGJUBY7_js.getTextWarpStyle(txtSE),
17745
17754
  ...transformStyle
17746
17755
  },
17747
- children: chunk7DGKSEIU_js.renderTextSegments(
17756
+ children: chunk4MGJUBY7_js.renderTextSegments(
17748
17757
  el,
17749
- chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
17758
+ chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
17750
17759
  void 0,
17751
17760
  findHl,
17752
17761
  onHyperlinkClick,
@@ -18065,7 +18074,7 @@ function renderBody(options) {
18065
18074
  );
18066
18075
  }
18067
18076
  if (isImg) {
18068
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk7DGKSEIU_js.getImageSurfaceStyle(el), children: [
18077
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk4MGJUBY7_js.getImageSurfaceStyle(el), children: [
18069
18078
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
18070
18079
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
18071
18080
  ] });
@@ -18082,7 +18091,7 @@ function renderBody(options) {
18082
18091
  textDirection: txtSE?.textDirection,
18083
18092
  textStyle: txtS,
18084
18093
  textStyleRaw: txtSE,
18085
- layoutStyle: chunk7DGKSEIU_js.getTextLayoutStyle(el),
18094
+ layoutStyle: chunk4MGJUBY7_js.getTextLayoutStyle(el),
18086
18095
  element: el,
18087
18096
  onCommit,
18088
18097
  onCancel,
@@ -18093,7 +18102,7 @@ function renderBody(options) {
18093
18102
  ] });
18094
18103
  }
18095
18104
  if (el.type === "table") {
18096
- return chunk7DGKSEIU_js.renderTableElement(el, txtS, {
18105
+ return chunk4MGJUBY7_js.renderTableElement(el, txtS, {
18097
18106
  editable: isSel,
18098
18107
  selectedCell: isSel ? tableSt : null,
18099
18108
  onSelectCell: onCellSel,
@@ -18126,7 +18135,7 @@ function renderBody(options) {
18126
18135
  );
18127
18136
  }
18128
18137
  if (el.type === "media") {
18129
- return chunk7DGKSEIU_js.renderMediaElement(el, media, {
18138
+ return chunk4MGJUBY7_js.renderMediaElement(el, media, {
18130
18139
  // Present mode autoplays every media element on the active slide,
18131
18140
  // not only ones persisted with their own `autoPlay` flag (matching
18132
18141
  // the other four bindings' unconditional `presenting`-gated
@@ -18149,7 +18158,7 @@ function renderBody(options) {
18149
18158
  onPlayStateChange: handleMediaPlayStateChange
18150
18159
  });
18151
18160
  }
18152
- if (doInk && (0, chunk7DGKSEIU_js.dist_exports.isInkElement)(el)) {
18161
+ if (doInk && (0, chunk4MGJUBY7_js.dist_exports.isInkElement)(el)) {
18153
18162
  return renderInk(el, {
18154
18163
  replay: isPresentationPassive,
18155
18164
  pressureSensitive: true
@@ -18178,27 +18187,27 @@ function renderBody(options) {
18178
18187
  }
18179
18188
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
18180
18189
  }
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) });
18190
+ if (chunk4MGJUBY7_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18191
+ 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
18192
  }
18184
18193
  return renderTextElementBody(options);
18185
18194
  }
18186
18195
  function defaultTextColorForFill(fillColor) {
18187
18196
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18188
18197
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18189
- return chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR;
18198
+ return chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR;
18190
18199
  }
18191
18200
  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
18201
  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";
18202
+ return luminance > 0.179 ? chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR : "#ffffff";
18194
18203
  }
18195
18204
  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);
18205
+ const style = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18206
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk4MGJUBY7_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18207
+ const fill = chunk4MGJUBY7_js.normalizeHexColor(style?.fillColor, chunk4MGJUBY7_js.DEFAULT_FILL_COLOR);
18199
18208
  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);
18209
+ const stroke = chunk4MGJUBY7_js.normalizeHexColor(style?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
18210
+ const baseVisualStyle = chunk4MGJUBY7_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18202
18211
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18203
18212
  const visualStyle = inheritedFill ? {
18204
18213
  ...baseVisualStyle,
@@ -18208,13 +18217,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
18208
18217
  backgroundSize: inheritedFill.backgroundSize,
18209
18218
  backgroundPosition: inheritedFill.backgroundPosition
18210
18219
  } : baseVisualStyle;
18211
- const textStyle = chunk7DGKSEIU_js.getTextStyleForElement(
18220
+ const textStyle = chunk4MGJUBY7_js.getTextStyleForElement(
18212
18221
  element,
18213
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR
18222
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR
18214
18223
  );
18215
18224
  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;
18225
+ const letsTextOverflow = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18226
+ const shapeType = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18218
18227
  const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
18219
18228
  return {
18220
18229
  hasFill,
@@ -18235,7 +18244,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18235
18244
  return { action, isActionable, contractRole };
18236
18245
  }
18237
18246
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18238
- const overflowClass = visual.isImage || element.type === "group" || chunk7DGKSEIU_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18247
+ const overflowClass = visual.isImage || element.type === "group" || chunk4MGJUBY7_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18239
18248
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18240
18249
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18241
18250
  }
@@ -18318,7 +18327,7 @@ function StaticElementRendererImpl({
18318
18327
  top: positioned ? element.y : void 0,
18319
18328
  width: positioned ? Math.max(element.width, 1) : "100%",
18320
18329
  height: positioned ? Math.max(element.height, 1) : "100%",
18321
- transform: positioned ? chunk7DGKSEIU_js.getElementTransform(element) : void 0,
18330
+ transform: positioned ? chunk4MGJUBY7_js.getElementTransform(element) : void 0,
18322
18331
  transformOrigin: "center",
18323
18332
  zIndex,
18324
18333
  ...visualStyle,
@@ -18335,7 +18344,7 @@ function StaticElementRendererImpl({
18335
18344
  animation
18336
18345
  },
18337
18346
  children: [
18338
- !isImage && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection }),
18347
+ pptx.getShapeEffectLayerPlacement(element).beforeBody && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection }),
18339
18348
  element.type === "group" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full", children: (element.children ?? []).map((child, index) => /* @__PURE__ */ jsxRuntime.jsx(
18340
18349
  StaticElementRenderer,
18341
18350
  {
@@ -18359,20 +18368,20 @@ function StaticElementRendererImpl({
18359
18368
  isEditing: false,
18360
18369
  editText: "",
18361
18370
  spellCheck: false,
18362
- txtSE: (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18371
+ txtSE: (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18363
18372
  txtS: textStyle,
18364
- vecShape: chunk7DGKSEIU_js.renderVectorShape(
18373
+ vecShape: chunk4MGJUBY7_js.renderVectorShape(
18365
18374
  element,
18366
18375
  isImage ? false : hasFill,
18367
18376
  fill,
18368
18377
  strokeWidth,
18369
18378
  stroke
18370
18379
  ),
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),
18380
+ imgStyle: imageAnimation ? { ...chunk4MGJUBY7_js.getImageRenderStyle(element), animation: imageAnimation } : chunk4MGJUBY7_js.getImageRenderStyle(element),
18381
+ imgFilter: chunk4MGJUBY7_js.getImageEffectsFilter(element),
18382
+ imgOpacity: chunk4MGJUBY7_js.getImageEffectsOpacity(element),
18374
18383
  imgAlt: "",
18375
- isTxtEl: chunk7DGKSEIU_js.isEditableTextElement(element),
18384
+ isTxtEl: chunk4MGJUBY7_js.isEditableTextElement(element),
18376
18385
  media: mediaDataUrls,
18377
18386
  tableSt: null,
18378
18387
  isSel: false,
@@ -18396,7 +18405,7 @@ function StaticElementRendererImpl({
18396
18405
  canEditSmartArt: false,
18397
18406
  canEditChart: false
18398
18407
  }),
18399
- isImage && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection })
18408
+ pptx.getShapeEffectLayerPlacement(element).afterBody && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection })
18400
18409
  ]
18401
18410
  }
18402
18411
  );
@@ -18418,7 +18427,7 @@ function SlideLayer({
18418
18427
  style: {
18419
18428
  width: safeWidth,
18420
18429
  height: safeHeight,
18421
- backgroundColor: slide.backgroundColor ? chunk7DGKSEIU_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18430
+ backgroundColor: slide.backgroundColor ? chunk4MGJUBY7_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18422
18431
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18423
18432
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18424
18433
  backgroundPosition: slide.backgroundImage ? "center" : void 0