pptx-react-viewer 4.33.2 → 4.35.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (85) hide show
  1. package/CHANGELOG.md +43 -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-2OIJUZD5.mjs → chunk-6SRRGOV2.mjs} +85 -36
  12. package/dist/chunk-6SRRGOV2.mjs.br +0 -0
  13. package/dist/chunk-6SRRGOV2.mjs.gz +0 -0
  14. package/dist/{chunk-TVSTM5J5.js → chunk-EL2KJ7PU.js} +328 -279
  15. package/dist/chunk-EL2KJ7PU.js.br +0 -0
  16. package/dist/chunk-EL2KJ7PU.js.gz +0 -0
  17. package/dist/{chunk-P3ANCQX6.mjs → chunk-GKUPYPD3.mjs} +237 -96
  18. package/dist/chunk-GKUPYPD3.mjs.br +0 -0
  19. package/dist/chunk-GKUPYPD3.mjs.gz +0 -0
  20. package/dist/{chunk-DJ32R6VM.js → chunk-KYMELPA6.js} +1502 -1361
  21. package/dist/chunk-KYMELPA6.js.br +0 -0
  22. package/dist/chunk-KYMELPA6.js.gz +0 -0
  23. package/dist/{chunk-K4UXDQZ6.mjs → chunk-SMPZ552M.mjs} +2 -1
  24. package/dist/chunk-SMPZ552M.mjs.br +0 -0
  25. package/dist/chunk-SMPZ552M.mjs.gz +0 -0
  26. package/dist/i18n/de.cjs +10 -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 +10 -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 +10 -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 +10 -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 +10 -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 +10 -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 +10 -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 +10 -0
  48. package/dist/i18n/zh-CN.mjs.br +0 -0
  49. package/dist/i18n/zh-CN.mjs.gz +0 -0
  50. package/dist/index.js +24 -24
  51. package/dist/index.js.br +0 -0
  52. package/dist/index.js.gz +0 -0
  53. package/dist/index.mjs +3 -3
  54. package/dist/index.mjs.br +0 -0
  55. package/dist/index.mjs.gz +0 -0
  56. package/dist/internals.d.ts +12 -2
  57. package/dist/internals.js +81 -81
  58. package/dist/internals.js.br +0 -0
  59. package/dist/internals.js.gz +0 -0
  60. package/dist/internals.mjs +2 -2
  61. package/dist/internals.mjs.br +0 -0
  62. package/dist/internals.mjs.gz +0 -0
  63. package/dist/viewer/index.js +19 -19
  64. package/dist/viewer/index.js.br +0 -0
  65. package/dist/viewer/index.js.gz +0 -0
  66. package/dist/viewer/index.mjs +3 -3
  67. package/dist/viewer/index.mjs.br +0 -0
  68. package/dist/viewer/index.mjs.gz +0 -0
  69. package/package.json +3 -3
  70. package/dist/AiChatPanel-CYD46SEM.mjs.br +0 -0
  71. package/dist/AiChatPanel-CYD46SEM.mjs.gz +0 -0
  72. package/dist/AiChatPanel-ONHWZEPV.js.br +0 -0
  73. package/dist/AiChatPanel-ONHWZEPV.js.gz +0 -0
  74. package/dist/chunk-2OIJUZD5.mjs.br +0 -0
  75. package/dist/chunk-2OIJUZD5.mjs.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-DJ32R6VM.js.br +0 -0
  79. package/dist/chunk-DJ32R6VM.js.gz +0 -0
  80. package/dist/chunk-K4UXDQZ6.mjs.br +0 -0
  81. package/dist/chunk-K4UXDQZ6.mjs.gz +0 -0
  82. package/dist/chunk-P3ANCQX6.mjs.br +0 -0
  83. package/dist/chunk-P3ANCQX6.mjs.gz +0 -0
  84. package/dist/chunk-TVSTM5J5.js.br +0 -0
  85. package/dist/chunk-TVSTM5J5.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,
@@ -3302,6 +3302,9 @@ function useFindReplace({
3302
3302
  const [findQuery, setFindQuery] = React17.useState("");
3303
3303
  const [replaceQuery, setReplaceQuery] = React17.useState("");
3304
3304
  const [findMatchCase, setFindMatchCase] = React17.useState(false);
3305
+ const [findIncludeNotes, setFindIncludeNotes] = React17.useState(false);
3306
+ const [findIncludeChartTitles, setFindIncludeChartTitles] = React17.useState(true);
3307
+ const [findIncludeChartData, setFindIncludeChartData] = React17.useState(false);
3305
3308
  const [findResults, setFindResults] = React17.useState([]);
3306
3309
  const [findResultIndex, setFindResultIndex] = React17.useState(-1);
3307
3310
  const pendingRefindRef = React17.useRef(false);
@@ -3314,7 +3317,12 @@ function useFindReplace({
3314
3317
  pendingRefindRef.current = false;
3315
3318
  }, [findReplaceOpen]);
3316
3319
  const performFind = React17.useCallback(() => {
3317
- const results = pptx.findInSlides(slides, findQuery, { matchCase: findMatchCase });
3320
+ const results = pptx.findInSlides(slides, findQuery, {
3321
+ matchCase: findMatchCase,
3322
+ includeNotes: findIncludeNotes,
3323
+ includeChartTitles: findIncludeChartTitles,
3324
+ includeChartData: findIncludeChartData
3325
+ });
3318
3326
  if (!findQuery) {
3319
3327
  setFindResults([]);
3320
3328
  setFindResultIndex(-1);
@@ -3326,7 +3334,16 @@ function useFindReplace({
3326
3334
  onSetActiveSlideIndex(results[0].slideIndex);
3327
3335
  onSetSelectedElementId(results[0].elementId);
3328
3336
  }
3329
- }, [slides, findQuery, findMatchCase, onSetActiveSlideIndex, onSetSelectedElementId]);
3337
+ }, [
3338
+ slides,
3339
+ findQuery,
3340
+ findMatchCase,
3341
+ findIncludeNotes,
3342
+ findIncludeChartTitles,
3343
+ findIncludeChartData,
3344
+ onSetActiveSlideIndex,
3345
+ onSetSelectedElementId
3346
+ ]);
3330
3347
  const navigateFindResult = React17.useCallback(
3331
3348
  (direction) => {
3332
3349
  if (findResults.length === 0) {
@@ -3347,6 +3364,9 @@ function useFindReplace({
3347
3364
  if (toReplace.length === 0) {
3348
3365
  return;
3349
3366
  }
3367
+ if (toReplace.some((match) => match.readOnly)) {
3368
+ return;
3369
+ }
3350
3370
  onUpdateSlides(
3351
3371
  (prevSlides) => pptx.applyFindReplacements(prevSlides, toReplace, replaceQuery).slides
3352
3372
  );
@@ -3403,6 +3423,12 @@ function useFindReplace({
3403
3423
  setReplaceQuery,
3404
3424
  findMatchCase,
3405
3425
  setFindMatchCase,
3426
+ findIncludeNotes,
3427
+ setFindIncludeNotes,
3428
+ findIncludeChartTitles,
3429
+ findIncludeChartData,
3430
+ setFindIncludeChartTitles,
3431
+ setFindIncludeChartData,
3406
3432
  findResults,
3407
3433
  findResultIndex,
3408
3434
  performFind,
@@ -4099,8 +4125,8 @@ function useViewerCoreState(_input) {
4099
4125
  const { slides, setSlides, slidesRef } = useSlideState();
4100
4126
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
4101
4127
  const [canvasSize, setCanvasSize] = React17.useState({
4102
- width: chunk7DGKSEIU_js.DEFAULT_CANVAS_WIDTH,
4103
- height: chunk7DGKSEIU_js.DEFAULT_CANVAS_HEIGHT
4128
+ width: chunk4MGJUBY7_js.DEFAULT_CANVAS_WIDTH,
4129
+ height: chunk4MGJUBY7_js.DEFAULT_CANVAS_HEIGHT
4104
4130
  });
4105
4131
  const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
4106
4132
  const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
@@ -4125,6 +4151,7 @@ function useViewerCoreState(_input) {
4125
4151
  const [clipboardPayload, setClipboardPayload] = React17.useState(null);
4126
4152
  const [pointerCommitNonce, setPointerCommitNonce] = React17.useState(0);
4127
4153
  const [headerFooter, setHeaderFooter] = React17.useState({});
4154
+ const [firstSlideNumber, setFirstSlideNumber] = React17.useState();
4128
4155
  const [layoutOptions, setLayoutOptions] = React17.useState([]);
4129
4156
  const [slideMasters, setSlideMasters] = React17.useState([]);
4130
4157
  const [modernCommentAuthors, setModernCommentAuthors] = React17.useState([]);
@@ -4216,6 +4243,8 @@ function useViewerCoreState(_input) {
4216
4243
  setPointerCommitNonce,
4217
4244
  headerFooter,
4218
4245
  setHeaderFooter,
4246
+ firstSlideNumber,
4247
+ setFirstSlideNumber,
4219
4248
  layoutOptions,
4220
4249
  setLayoutOptions,
4221
4250
  slideMasters,
@@ -4427,6 +4456,7 @@ function useLoadContent({
4427
4456
  setCanvasSize,
4428
4457
  setSlideSizeEmu,
4429
4458
  setHeaderFooter,
4459
+ setFirstSlideNumber,
4430
4460
  setLayoutOptions,
4431
4461
  setSlideMasters,
4432
4462
  setModernCommentAuthors,
@@ -4476,7 +4506,7 @@ function useLoadContent({
4476
4506
  }
4477
4507
  let cancelled = false;
4478
4508
  const token = ++renderTokenRef.current;
4479
- const handler = new chunk7DGKSEIU_js.dist_exports.PptxHandler();
4509
+ const handler = new chunk4MGJUBY7_js.dist_exports.PptxHandler();
4480
4510
  const resources = pptx.createPresentationLoadResources(handler);
4481
4511
  const loadBlobUrls = resources.blobUrls;
4482
4512
  (async () => {
@@ -4561,12 +4591,12 @@ function useLoadContent({
4561
4591
  }
4562
4592
  resources.commit();
4563
4593
  handlerRef.current = handler;
4564
- const partition = chunk7DGKSEIU_js.partitionTemplateElements(nextSlides);
4594
+ const partition = chunk4MGJUBY7_js.partitionTemplateElements(nextSlides);
4565
4595
  setSlides(partition.slides);
4566
4596
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4567
4597
  setCanvasSize({
4568
- width: parsed.width ?? chunk7DGKSEIU_js.DEFAULT_CANVAS_WIDTH,
4569
- height: parsed.height ?? chunk7DGKSEIU_js.DEFAULT_CANVAS_HEIGHT
4598
+ width: parsed.width ?? chunk4MGJUBY7_js.DEFAULT_CANVAS_WIDTH,
4599
+ height: parsed.height ?? chunk4MGJUBY7_js.DEFAULT_CANVAS_HEIGHT
4570
4600
  });
4571
4601
  setSlideSizeEmu(
4572
4602
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -4576,6 +4606,7 @@ function useLoadContent({
4576
4606
  } : void 0
4577
4607
  );
4578
4608
  setHeaderFooter(parsed.headerFooter ?? {});
4609
+ setFirstSlideNumber(parsed.firstSlideNumber);
4579
4610
  setLayoutOptions(parsed.layoutOptions ?? []);
4580
4611
  setSlideMasters(parsed.slideMasters ?? []);
4581
4612
  setModernCommentAuthors(parsed.modernCommentAuthors ?? []);
@@ -4629,7 +4660,7 @@ function useLoadContent({
4629
4660
  onContentApplied?.();
4630
4661
  } catch (err) {
4631
4662
  if (!cancelled && token === renderTokenRef.current) {
4632
- if (err instanceof chunk7DGKSEIU_js.dist_exports.EncryptedFileError) {
4663
+ if (err instanceof chunk4MGJUBY7_js.dist_exports.EncryptedFileError) {
4633
4664
  setIsEncrypted(true);
4634
4665
  } else {
4635
4666
  console.error("[pptx] Failed to load presentation content:", err);
@@ -4754,7 +4785,7 @@ function useTextElementOperations(input) {
4754
4785
  updateSelectedElement
4755
4786
  } = input;
4756
4787
  const liveTextSegments = React17.useCallback(() => {
4757
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4788
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4758
4789
  return void 0;
4759
4790
  }
4760
4791
  if (selectedElement.id !== inlineEditingElementId) {
@@ -4772,7 +4803,7 @@ function useTextElementOperations(input) {
4772
4803
  }, [selectedElement, inlineEditingElementId, inlineEditingText, inlineEditingSnapshotRef]);
4773
4804
  const updateSelectedTextStyle = React17.useCallback(
4774
4805
  (updates) => {
4775
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4806
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4776
4807
  return;
4777
4808
  }
4778
4809
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -4850,7 +4881,7 @@ function useTextElementOperations(input) {
4850
4881
  );
4851
4882
  const toggleSelectedBullets = React17.useCallback(
4852
4883
  (kind) => {
4853
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4884
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4854
4885
  return;
4855
4886
  }
4856
4887
  const currentSegments = liveTextSegments();
@@ -4901,7 +4932,7 @@ function useTextElementOperations(input) {
4901
4932
  );
4902
4933
  const updateSelectedTextCase = React17.useCallback(
4903
4934
  (mode) => {
4904
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selectedElement)) {
4935
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selectedElement)) {
4905
4936
  return;
4906
4937
  }
4907
4938
  const isLiveEditing = selectedElement.id === inlineEditingElementId;
@@ -5017,7 +5048,7 @@ function useElementOperations(input) {
5017
5048
  );
5018
5049
  return;
5019
5050
  }
5020
- if (chunk7DGKSEIU_js.isTemplateElementId(elementId)) {
5051
+ if (chunk4MGJUBY7_js.isTemplateElementId(elementId)) {
5021
5052
  const slideId = activeSlide?.id;
5022
5053
  if (slideId) {
5023
5054
  setTemplateElementsBySlideId((prev) => ({
@@ -5053,7 +5084,7 @@ function useElementOperations(input) {
5053
5084
  );
5054
5085
  const updateSelectedShapeStyle = React17.useCallback(
5055
5086
  (updates) => {
5056
- if (!selectedElement || !(0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(selectedElement)) {
5087
+ if (!selectedElement || !(0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(selectedElement)) {
5057
5088
  return;
5058
5089
  }
5059
5090
  updateSelectedElement({
@@ -5257,15 +5288,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
5257
5288
  // src/viewer/hooks/pointer-move-handlers.ts
5258
5289
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
5259
5290
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
5260
- let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk7DGKSEIU_js.MIN_ELEMENT_SIZE });
5291
+ let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunk4MGJUBY7_js.MIN_ELEMENT_SIZE });
5261
5292
  if (lockAspect) {
5262
- resized = pptx.lockResizeAspect(resized, startBox, handle, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5293
+ resized = pptx.lockResizeAspect(resized, startBox, handle, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5263
5294
  }
5264
5295
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
5265
5296
  if (!snapToGrid) {
5266
5297
  return box;
5267
5298
  }
5268
- return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5299
+ return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5269
5300
  }
5270
5301
  function resolveLiveTarget(input) {
5271
5302
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -5378,7 +5409,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
5378
5409
  width: el.width,
5379
5410
  height: el.height
5380
5411
  }));
5381
- const snapResult = chunk7DGKSEIU_js.computeSnapToShape(
5412
+ const snapResult = chunk4MGJUBY7_js.computeSnapToShape(
5382
5413
  targetX,
5383
5414
  targetY,
5384
5415
  primaryEl.width,
@@ -5452,8 +5483,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
5452
5483
  rs.lastY = geo.y;
5453
5484
  rs.lastWidth = geo.width;
5454
5485
  rs.lastHeight = geo.height;
5455
- const width = Math.max(geo.width, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5456
- const height = Math.max(geo.height, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE);
5486
+ const width = Math.max(geo.width, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5487
+ const height = Math.max(geo.height, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE);
5457
5488
  if (rs.domEl) {
5458
5489
  rs.domEl.style.left = `${geo.x}px`;
5459
5490
  rs.domEl.style.top = `${geo.y}px`;
@@ -5546,13 +5577,13 @@ function processPointerUp(input) {
5546
5577
  if (i !== activeSlideIndex) {
5547
5578
  return s;
5548
5579
  }
5549
- const rerouted = chunk7DGKSEIU_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5580
+ const rerouted = chunk4MGJUBY7_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5550
5581
  if (rerouted.length === 0) {
5551
5582
  return s;
5552
5583
  }
5553
5584
  return {
5554
5585
  ...s,
5555
- elements: chunk7DGKSEIU_js.applyReroutedConnectors(s.elements, rerouted)
5586
+ elements: chunk4MGJUBY7_js.applyReroutedConnectors(s.elements, rerouted)
5556
5587
  };
5557
5588
  })
5558
5589
  );
@@ -5604,8 +5635,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
5604
5635
  }
5605
5636
  return { ...el, x: start.x + dx, y: start.y + dy };
5606
5637
  });
5607
- const rerouted = chunk7DGKSEIU_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5608
- return chunk7DGKSEIU_js.applyReroutedConnectors(movedElements, rerouted);
5638
+ const rerouted = chunk4MGJUBY7_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5639
+ return chunk4MGJUBY7_js.applyReroutedConnectors(movedElements, rerouted);
5609
5640
  };
5610
5641
  if (editTemplateMode) {
5611
5642
  const slideId = activeSlide?.id;
@@ -5793,7 +5824,7 @@ function useCanvasInteractions(input) {
5793
5824
  return;
5794
5825
  }
5795
5826
  const el = elementLookup.get(editId);
5796
- if (el && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el)) {
5827
+ if (el && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el)) {
5797
5828
  const reader = inlineEditingReaderRef?.current;
5798
5829
  const read = reader?.elementId === editId ? reader.read() : void 0;
5799
5830
  if (read?.kind === "unsupported") {
@@ -5840,7 +5871,7 @@ function useCanvasInteractions(input) {
5840
5871
  wasEditable.current = canEdit;
5841
5872
  }, [canEdit]);
5842
5873
  const openEquationEditorForElement = (el) => {
5843
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el)) {
5874
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el)) {
5844
5875
  return false;
5845
5876
  }
5846
5877
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -5873,7 +5904,7 @@ function useCanvasInteractions(input) {
5873
5904
  justInteractedRef.current = false;
5874
5905
  } else {
5875
5906
  const el = elementLookup.get(elementId);
5876
- if (el && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5907
+ if (el && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5877
5908
  if (!openEquationEditorForElement(el)) {
5878
5909
  pptx.setPendingCaretPoint(e);
5879
5910
  setInlineEditingElementId(elementId);
@@ -5899,7 +5930,7 @@ function useCanvasInteractions(input) {
5899
5930
  if (openEquationEditorForElement(el)) {
5900
5931
  return;
5901
5932
  }
5902
- if ((0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5933
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) && pptx.canInteractWithElement(el, "textEdit")) {
5903
5934
  setInlineEditingElementId(elementId);
5904
5935
  setInlineEditingText(el.text ?? "");
5905
5936
  }
@@ -6364,7 +6395,7 @@ function createStructuredElementHandlers(deps) {
6364
6395
  return;
6365
6396
  }
6366
6397
  const resolved = resolveHyperlinkEditResult(data);
6367
- if (resolved.url && !chunk7DGKSEIU_js.isUrlSafe(resolved.url)) {
6398
+ if (resolved.url && !chunk4MGJUBY7_js.isUrlSafe(resolved.url)) {
6368
6399
  return;
6369
6400
  }
6370
6401
  const actionClick = {
@@ -6410,11 +6441,11 @@ function createStructuredElementHandlers(deps) {
6410
6441
  if (!activeSlide) {
6411
6442
  return;
6412
6443
  }
6413
- const preset = chunk7DGKSEIU_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6444
+ const preset = chunk4MGJUBY7_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6414
6445
  if (!preset) {
6415
6446
  return;
6416
6447
  }
6417
- const defaultPptxAction = (0, chunk7DGKSEIU_js.dist_exports.elementActionToPptxAction)({
6448
+ const defaultPptxAction = (0, chunk4MGJUBY7_js.dist_exports.elementActionToPptxAction)({
6418
6449
  trigger: "click",
6419
6450
  type: preset.defaultAction
6420
6451
  });
@@ -6497,7 +6528,7 @@ function useInsertElements(input) {
6497
6528
  width: 300,
6498
6529
  height: 60,
6499
6530
  text: "",
6500
- textStyle: { fontSize: chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE }
6531
+ textStyle: { fontSize: chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE }
6501
6532
  });
6502
6533
  };
6503
6534
  const handleAddShape = () => {
@@ -6524,7 +6555,7 @@ function useInsertElements(input) {
6524
6555
  return;
6525
6556
  }
6526
6557
  addElement({
6527
- ...pptx.newTableElement(chunk7DGKSEIU_js.DEFAULT_TABLE_ROWS, chunk7DGKSEIU_js.DEFAULT_TABLE_COLUMNS, 100, 200),
6558
+ ...pptx.newTableElement(chunk4MGJUBY7_js.DEFAULT_TABLE_ROWS, chunk4MGJUBY7_js.DEFAULT_TABLE_COLUMNS, 100, 200),
6528
6559
  id: pptx.generateElementId()
6529
6560
  });
6530
6561
  };
@@ -6693,7 +6724,7 @@ function useGroupAlignLayerHandlers(input) {
6693
6724
  history
6694
6725
  } = input;
6695
6726
  const updateElementsOwning = (elementId, updater) => {
6696
- if (editTemplateMode && !chunk7DGKSEIU_js.isTemplateElementId(elementId)) {
6727
+ if (editTemplateMode && !chunk4MGJUBY7_js.isTemplateElementId(elementId)) {
6697
6728
  ops.updateSlides(
6698
6729
  (prev) => prev.map(
6699
6730
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6727,9 +6758,9 @@ function useGroupAlignLayerHandlers(input) {
6727
6758
  return;
6728
6759
  }
6729
6760
  const group = selectedElement;
6730
- const intoTemplate = chunk7DGKSEIU_js.isTemplateElementId(group.id);
6761
+ const intoTemplate = chunk4MGJUBY7_js.isTemplateElementId(group.id);
6731
6762
  const childIds = group.children.map(
6732
- (child) => intoTemplate ? chunk7DGKSEIU_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6763
+ (child) => intoTemplate ? chunk4MGJUBY7_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6733
6764
  );
6734
6765
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6735
6766
  ops.activeElements,
@@ -7039,6 +7070,15 @@ function useSlideManagement(input) {
7039
7070
  );
7040
7071
  history.markDirty();
7041
7072
  };
7073
+ const handlePasteSlides = (request) => {
7074
+ if (!request.copies.length) {
7075
+ return;
7076
+ }
7077
+ ops.updateSlides((previous) => pptx.insertSlidePaste(previous, request));
7078
+ setTemplateElementsBySlideId?.((previous) => pptx.applySlidePasteTemplates(previous, request));
7079
+ setActiveSlideIndex(request.insertAt);
7080
+ history.markDirty();
7081
+ };
7042
7082
  const handleDuplicateSlides = (indexes) => {
7043
7083
  if (indexes.length === 0) {
7044
7084
  return;
@@ -7052,7 +7092,7 @@ function useSlideManagement(input) {
7052
7092
  if (!src) {
7053
7093
  continue;
7054
7094
  }
7055
- const clone = { ...(0, chunk7DGKSEIU_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7095
+ const clone = { ...(0, chunk4MGJUBY7_js.dist_exports.duplicateSlide)(src, next.length + 1), id: pptx.makeSlideId() };
7056
7096
  next.splice(i + offset + 1, 0, clone);
7057
7097
  offset++;
7058
7098
  }
@@ -7130,6 +7170,7 @@ function useSlideManagement(input) {
7130
7170
  handleSlideContextMenu,
7131
7171
  handleDeleteSlides,
7132
7172
  handleDuplicateSlides,
7173
+ handlePasteSlides,
7133
7174
  handleToggleHideSlides,
7134
7175
  handleInsertSlideFromLayout,
7135
7176
  handleInsertSlideFromTemplate
@@ -7155,7 +7196,7 @@ function createTableMergeHandlers(input) {
7155
7196
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7156
7197
  return;
7157
7198
  }
7158
- const newTableData = chunk7DGKSEIU_js.mergeCells(
7199
+ const newTableData = chunk4MGJUBY7_js.mergeCells(
7159
7200
  [
7160
7201
  { row: rowIndex, col: columnIndex },
7161
7202
  { row: rowIndex, col: nextColIdx }
@@ -7163,7 +7204,7 @@ function createTableMergeHandlers(input) {
7163
7204
  td
7164
7205
  );
7165
7206
  const updates = { tableData: newTableData };
7166
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7207
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7167
7208
  if (newRawXml) {
7168
7209
  updates.rawXml = newRawXml;
7169
7210
  }
@@ -7189,7 +7230,7 @@ function createTableMergeHandlers(input) {
7189
7230
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7190
7231
  return;
7191
7232
  }
7192
- const newTableData = chunk7DGKSEIU_js.mergeCells(
7233
+ const newTableData = chunk4MGJUBY7_js.mergeCells(
7193
7234
  [
7194
7235
  { row: rowIndex, col: columnIndex },
7195
7236
  { row: targetNextRowIdx, col: columnIndex }
@@ -7197,7 +7238,7 @@ function createTableMergeHandlers(input) {
7197
7238
  td
7198
7239
  );
7199
7240
  const updates = { tableData: newTableData };
7200
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7241
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7201
7242
  if (newRawXml) {
7202
7243
  updates.rawXml = newRawXml;
7203
7244
  }
@@ -7212,9 +7253,9 @@ function createTableMergeHandlers(input) {
7212
7253
  return;
7213
7254
  }
7214
7255
  const td = selectedElement.tableData;
7215
- const newTableData = chunk7DGKSEIU_js.mergeCells(ts.selectedCells, td);
7256
+ const newTableData = chunk4MGJUBY7_js.mergeCells(ts.selectedCells, td);
7216
7257
  const updates = { tableData: newTableData };
7217
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7258
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7218
7259
  if (newRawXml) {
7219
7260
  updates.rawXml = newRawXml;
7220
7261
  }
@@ -7231,9 +7272,9 @@ function createTableMergeHandlers(input) {
7231
7272
  }
7232
7273
  const { rowIndex, columnIndex } = ts;
7233
7274
  const td = selectedElement.tableData;
7234
- const newTableData = chunk7DGKSEIU_js.splitCell(rowIndex, columnIndex, td);
7275
+ const newTableData = chunk4MGJUBY7_js.splitCell(rowIndex, columnIndex, td);
7235
7276
  const updates = { tableData: newTableData };
7236
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7277
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateMergeAttrsInRawXml)(selectedElement, newTableData);
7237
7278
  if (newRawXml) {
7238
7279
  updates.rawXml = newRawXml;
7239
7280
  }
@@ -7268,7 +7309,7 @@ function createTableStructHandlers(input) {
7268
7309
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7269
7310
  }
7270
7311
  if (el.rawXml) {
7271
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7312
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateCellTextInRawXml)(el, rowIndex, colIndex, text);
7272
7313
  if (newRawXml) {
7273
7314
  updates.rawXml = newRawXml;
7274
7315
  }
@@ -7292,7 +7333,7 @@ function createTableStructHandlers(input) {
7292
7333
  const { rowIndex, columnIndex: colIndex } = ts;
7293
7334
  const updates = {};
7294
7335
  if (selectedElement.rawXml) {
7295
- const newRawXml = (0, chunk7DGKSEIU_js.dist_exports.updateCellTextStyleInRawXml)(
7336
+ const newRawXml = (0, chunk4MGJUBY7_js.dist_exports.updateCellTextStyleInRawXml)(
7296
7337
  selectedElement,
7297
7338
  rowIndex,
7298
7339
  colIndex,
@@ -7459,7 +7500,7 @@ function useExportSaveAs(input) {
7459
7500
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7460
7501
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7461
7502
  const data = {
7462
- slides: chunk7DGKSEIU_js.buildSaveSlides(slides, templateElementsBySlideId),
7503
+ slides: chunk4MGJUBY7_js.buildSaveSlides(slides, templateElementsBySlideId),
7463
7504
  width: canvasSize.width,
7464
7505
  height: canvasSize.height,
7465
7506
  widthEmu: slideSize.widthEmu,
@@ -7617,7 +7658,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7617
7658
  }
7618
7659
  function tilesToPdfPage(tilesResult) {
7619
7660
  return tilesResult.tiles.map((tile) => ({
7620
- image: chunk7DGKSEIU_js.canvasToJpegData(tile.canvas),
7661
+ image: chunk4MGJUBY7_js.canvasToJpegData(tile.canvas),
7621
7662
  placement: pptx.placeTileOnPage(
7622
7663
  tile,
7623
7664
  tilesResult.fullWidth,
@@ -7650,7 +7691,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7650
7691
  if (pages.length === 0) {
7651
7692
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7652
7693
  }
7653
- const pdfBlobUrl = chunk7DGKSEIU_js.buildPdfFromTiledImageData(pages);
7694
+ const pdfBlobUrl = chunk4MGJUBY7_js.buildPdfFromTiledImageData(pages);
7654
7695
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7655
7696
  }
7656
7697
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7680,7 +7721,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7680
7721
  if (pages.length === 0) {
7681
7722
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7682
7723
  }
7683
- const pdfDataUrl = chunk7DGKSEIU_js.buildNotesPdf(pages);
7724
+ const pdfDataUrl = chunk4MGJUBY7_js.buildNotesPdf(pages);
7684
7725
  pptx.downloadDataUrl(pdfDataUrl, filename);
7685
7726
  }
7686
7727
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -7875,7 +7916,7 @@ function exportAllSlidesToSvg(data, options = {}) {
7875
7916
  continue;
7876
7917
  }
7877
7918
  onProgress?.(processedCount, data.slides.length);
7878
- let svg = chunk7DGKSEIU_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7919
+ let svg = chunk4MGJUBY7_js.dist_exports.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
7879
7920
  if (embedFonts && fontFaces?.length) {
7880
7921
  svg = injectFontFaces(svg, fontFaces);
7881
7922
  }
@@ -8464,10 +8505,10 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8464
8505
  return;
8465
8506
  }
8466
8507
  await handler.applyTheme(colorScheme, fontScheme, name);
8467
- const previousMap = theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8508
+ const previousMap = theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8468
8509
  bumpHistory();
8469
8510
  setSlides(
8470
- (slides) => (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(
8511
+ (slides) => (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(
8471
8512
  { slides, theme, themeColorMap: previousMap },
8472
8513
  colorScheme,
8473
8514
  fontScheme,
@@ -8478,8 +8519,8 @@ async function applyThemeEditorEdit(input, { colorScheme, fontScheme, name }) {
8478
8519
  (prev) => Object.fromEntries(
8479
8520
  Object.entries(prev).map(([id, elements]) => [
8480
8521
  id,
8481
- (0, chunk7DGKSEIU_js.dist_exports.reResolveElementFonts)(
8482
- (0, chunk7DGKSEIU_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8522
+ (0, chunk4MGJUBY7_js.dist_exports.reResolveElementFonts)(
8523
+ (0, chunk4MGJUBY7_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme),
8483
8524
  theme?.fontScheme,
8484
8525
  fontScheme
8485
8526
  )
@@ -8537,13 +8578,13 @@ function useThemeHandlers(input) {
8537
8578
  return;
8538
8579
  }
8539
8580
  await handler.updateThemeColorScheme(colorScheme);
8540
- const previousMap = theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8541
- setSlides((prev) => (0, chunk7DGKSEIU_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8581
+ const previousMap = theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(theme.colorScheme) : {};
8582
+ setSlides((prev) => (0, chunk4MGJUBY7_js.dist_exports.reResolveSlideColors)(prev, previousMap, colorScheme));
8542
8583
  if (Object.keys(templateElementsBySlideId).length > 0) {
8543
8584
  setTemplateElementsBySlideId((prev) => {
8544
8585
  const next = {};
8545
8586
  for (const [slideId, elements] of Object.entries(prev)) {
8546
- next[slideId] = (0, chunk7DGKSEIU_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8587
+ next[slideId] = (0, chunk4MGJUBY7_js.dist_exports.reResolveElementColors)(elements, previousMap, colorScheme);
8547
8588
  }
8548
8589
  return next;
8549
8590
  });
@@ -8654,7 +8695,7 @@ function useThemeSwitching(input) {
8654
8695
  }
8655
8696
  try {
8656
8697
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
8657
- const newData = (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8698
+ const newData = (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(data, preset.colorScheme, preset.fontScheme, preset.name);
8658
8699
  onDataChange(newData);
8659
8700
  onThemeChanged?.(preset);
8660
8701
  } catch (error) {
@@ -8671,7 +8712,7 @@ function useThemeSwitching(input) {
8671
8712
  }
8672
8713
  try {
8673
8714
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
8674
- const newData = (0, chunk7DGKSEIU_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8715
+ const newData = (0, chunk4MGJUBY7_js.dist_exports.applyThemeToData)(data, colorScheme, fontScheme, themeName);
8675
8716
  onDataChange(newData);
8676
8717
  } catch (error) {
8677
8718
  console.error("Failed to switch to custom theme:", error);
@@ -8683,12 +8724,12 @@ function useThemeSwitching(input) {
8683
8724
  if (!data?.theme?.colorScheme) {
8684
8725
  return void 0;
8685
8726
  }
8686
- return chunk7DGKSEIU_js.dist_exports.THEME_PRESETS.find(
8687
- (p) => (0, chunk7DGKSEIU_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8727
+ return chunk4MGJUBY7_js.dist_exports.THEME_PRESETS.find(
8728
+ (p) => (0, chunk4MGJUBY7_js.dist_exports.themeColorSchemesEqual)(data.theme?.colorScheme, p.colorScheme)
8688
8729
  );
8689
8730
  }, [data?.theme?.colorScheme]);
8690
8731
  return {
8691
- presets: chunk7DGKSEIU_js.dist_exports.THEME_PRESETS,
8732
+ presets: chunk4MGJUBY7_js.dist_exports.THEME_PRESETS,
8692
8733
  switchToPreset,
8693
8734
  switchToCustom,
8694
8735
  currentPreset
@@ -8765,7 +8806,7 @@ function usePropertyHandlers(input) {
8765
8806
  }
8766
8807
  try {
8767
8808
  const ab = await file.arrayBuffer();
8768
- const h = new chunk7DGKSEIU_js.dist_exports.PptxHandler();
8809
+ const h = new chunk4MGJUBY7_js.dist_exports.PptxHandler();
8769
8810
  const other = await h.load(ab);
8770
8811
  if (!other) {
8771
8812
  return;
@@ -8775,7 +8816,7 @@ function usePropertyHandlers(input) {
8775
8816
  width: canvasSize.width,
8776
8817
  height: canvasSize.height
8777
8818
  };
8778
- setCompareResult(chunk7DGKSEIU_js.comparePresentation(cur, other));
8819
+ setCompareResult(chunk4MGJUBY7_js.comparePresentation(cur, other));
8779
8820
  setIsComparePanelOpen(true);
8780
8821
  } catch (err) {
8781
8822
  console.warn("Compare failed:", err);
@@ -9128,7 +9169,7 @@ function useViewerDialogs(input) {
9128
9169
  };
9129
9170
  }
9130
9171
  function computeGridSpacingPx(documentGridSpacing) {
9131
- return pptx.computeGridSpacingPx(documentGridSpacing, chunk7DGKSEIU_js.GRID_SIZE);
9172
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunk4MGJUBY7_js.GRID_SIZE);
9132
9173
  }
9133
9174
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
9134
9175
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -9137,7 +9178,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
9137
9178
  }
9138
9179
  function computeSlideSectionGroups(slides, sections) {
9139
9180
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
9140
- id: group.section?.id ?? (sections.length > 0 ? chunk7DGKSEIU_js.UNGROUPED_SECTION_ID : chunk7DGKSEIU_js.DEFAULT_SECTION_GROUP_ID),
9181
+ id: group.section?.id ?? (sections.length > 0 ? chunk4MGJUBY7_js.UNGROUPED_SECTION_ID : chunk4MGJUBY7_js.DEFAULT_SECTION_GROUP_ID),
9141
9182
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
9142
9183
  slideIndexes: group.slideIndexes,
9143
9184
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -9182,10 +9223,10 @@ function useDerivedSlideState(input) {
9182
9223
  );
9183
9224
  const slideSectionGroups = React17.useMemo(
9184
9225
  () => computeSlideSectionGroups(slides, sections).map((group) => {
9185
- if (group.id === chunk7DGKSEIU_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9226
+ if (group.id === chunk4MGJUBY7_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9186
9227
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
9187
9228
  }
9188
- if (group.id === chunk7DGKSEIU_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9229
+ if (group.id === chunk4MGJUBY7_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9189
9230
  return { ...group, label: t("pptx.sections.slides") };
9190
9231
  }
9191
9232
  return group;
@@ -9292,7 +9333,7 @@ function useAnnotationHandlers(input) {
9292
9333
  if (nextMode === "present") {
9293
9334
  presentation.enterPresentMode();
9294
9335
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9295
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9336
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9296
9337
  if (promptKeepInkAnnotations) {
9297
9338
  pendingModeAfterAnnotationsRef.current = nextMode;
9298
9339
  setShowKeepAnnotationsDialog(true);
@@ -9302,7 +9343,7 @@ function useAnnotationHandlers(input) {
9302
9343
  }
9303
9344
  } else {
9304
9345
  if (mode === "present") {
9305
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9346
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9306
9347
  }
9307
9348
  setMode(nextMode);
9308
9349
  }
@@ -9373,7 +9414,7 @@ function overlayPendingInlineEdit(document2, elementId, text, snapshot, transfor
9373
9414
  (slide) => !elementId ? slide : {
9374
9415
  ...slide,
9375
9416
  elements: slide.elements.map(
9376
- (element) => element.id === elementId && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) ? {
9417
+ (element) => element.id === elementId && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) ? {
9377
9418
  ...element,
9378
9419
  text,
9379
9420
  textSegments: pptx.remapTextToSegments(
@@ -9461,14 +9502,14 @@ function useSerialize(input) {
9461
9502
  const pptxGuides = guides.map((g) => ({
9462
9503
  id: g.id,
9463
9504
  orientation: g.axis === "h" ? "horz" : "vert",
9464
- positionEmu: (0, chunk7DGKSEIU_js.dist_exports.guidePxToEmu)(g.position)
9505
+ positionEmu: (0, chunk4MGJUBY7_js.dist_exports.guidePxToEmu)(g.position)
9465
9506
  }));
9466
9507
  return {
9467
9508
  ...slide,
9468
9509
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9469
9510
  };
9470
9511
  });
9471
- const slidesToSave = chunk7DGKSEIU_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9512
+ const slidesToSave = chunk4MGJUBY7_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9472
9513
  const saveOptions = pptx.buildDeckSaveOptions({
9473
9514
  // Without this the Slide Size card edited a viewer-only pixel value and
9474
9515
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9649,7 +9690,7 @@ function usePresentationSetup(input) {
9649
9690
  return;
9650
9691
  }
9651
9692
  if (mode === "present" && nextMode !== "present") {
9652
- chunk7DGKSEIU_js.stopAllPersistentAudio();
9693
+ chunk4MGJUBY7_js.stopAllPersistentAudio();
9653
9694
  stopAnimationSound();
9654
9695
  const exitHandler = exitModeHandlerRef.current;
9655
9696
  if (exitHandler) {
@@ -9770,12 +9811,12 @@ function useCanvasImagePaste(input) {
9770
9811
  );
9771
9812
  }
9772
9813
  function formatPatchFor(element, format) {
9773
- const updated = chunk7DGKSEIU_js.applyFormatToElement(element, format);
9814
+ const updated = chunk4MGJUBY7_js.applyFormatToElement(element, format);
9774
9815
  const updates = {};
9775
- if ((0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(updated)) {
9816
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(updated)) {
9776
9817
  updates.shapeStyle = updated.shapeStyle;
9777
9818
  }
9778
- if ((0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(updated)) {
9819
+ if ((0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(updated)) {
9779
9820
  updates.textStyle = updated.textStyle;
9780
9821
  }
9781
9822
  return updates;
@@ -9793,7 +9834,7 @@ function useFormatPainterEditing(input) {
9793
9834
  const prevFormatPainterRef = React17.useRef(false);
9794
9835
  React17.useEffect(() => {
9795
9836
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9796
- copiedFormatRef.current = chunk7DGKSEIU_js.copyFormatFromElement(selectedElement);
9837
+ copiedFormatRef.current = chunk4MGJUBY7_js.copyFormatFromElement(selectedElement);
9797
9838
  } else if (!formatPainterActive) {
9798
9839
  copiedFormatRef.current = null;
9799
9840
  }
@@ -10499,6 +10540,7 @@ function useContentLifecycle(input) {
10499
10540
  setCanvasSize: state.setCanvasSize,
10500
10541
  setSlideSizeEmu: state.setSlideSizeEmu,
10501
10542
  setHeaderFooter: state.setHeaderFooter,
10543
+ setFirstSlideNumber: state.setFirstSlideNumber,
10502
10544
  setLayoutOptions: state.setLayoutOptions,
10503
10545
  setSlideMasters: state.setSlideMasters,
10504
10546
  setModernCommentAuthors: state.setModernCommentAuthors,
@@ -10882,7 +10924,7 @@ function useKeyboardShortcutWiring(input) {
10882
10924
  }
10883
10925
  function stepSelectedFontSize(state, ops, direction) {
10884
10926
  const selected = state.selectedElement;
10885
- const currentPx = (selected && (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10927
+ const currentPx = (selected && (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(selected) ? selected.textStyle?.fontSize : void 0) ?? pptx.textFontSizePtToPx(18);
10886
10928
  const nextPt = pptx.stepFontSizePt(pptx.textFontSizePxToPt(currentPx), direction);
10887
10929
  ops.updateSelectedTextStyle({ fontSize: pptx.textFontSizePtToPx(nextPt) });
10888
10930
  }
@@ -11433,7 +11475,7 @@ function useCollaborationWriteBack(input) {
11433
11475
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11434
11476
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11435
11477
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11436
- mergeTemplateElements: chunk7DGKSEIU_js.buildSaveSlides
11478
+ mergeTemplateElements: chunk4MGJUBY7_js.buildSaveSlides
11437
11479
  }),
11438
11480
  [latest]
11439
11481
  );
@@ -11986,8 +12028,8 @@ function useTouchGestures(input) {
11986
12028
  }
11987
12029
  const recognizer = pptx.createTouchGestureRecognizer({
11988
12030
  getScale: () => scaleRef.current,
11989
- minScale: chunk7DGKSEIU_js.MIN_ZOOM_SCALE,
11990
- maxScale: chunk7DGKSEIU_js.MAX_ZOOM_SCALE,
12031
+ minScale: chunk4MGJUBY7_js.MIN_ZOOM_SCALE,
12032
+ maxScale: chunk4MGJUBY7_js.MAX_ZOOM_SCALE,
11991
12033
  callbacks: {
11992
12034
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
11993
12035
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -12103,14 +12145,15 @@ function buildCanvasProps(input) {
12103
12145
  const fieldContext = pptx.buildFieldSubstitutionContext({
12104
12146
  headerFooter: s.headerFooter,
12105
12147
  customProperties: s.customProperties,
12106
- slide: activeSlide
12148
+ slide: activeSlide,
12149
+ firstSlideNumber: s.firstSlideNumber
12107
12150
  });
12108
12151
  const tableStyleContext = s.theme || s.tableStyleMap ? { theme: s.theme, tableStyleMap: s.tableStyleMap } : void 0;
12109
12152
  const openExternalUrl = (url, target) => {
12110
12153
  if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
12111
12154
  return;
12112
12155
  }
12113
- chunk7DGKSEIU_js.safeOpenUrl(url, target);
12156
+ chunk4MGJUBY7_js.safeOpenUrl(url, target);
12114
12157
  };
12115
12158
  const handleActionClick = (elementId, action) => {
12116
12159
  if (mode === "present") {
@@ -12125,9 +12168,9 @@ function buildCanvasProps(input) {
12125
12168
  }
12126
12169
  };
12127
12170
  const handleHyperlinkClick = (url, target) => {
12128
- if (chunk7DGKSEIU_js.isPpactionUrl(url)) {
12171
+ if (chunk4MGJUBY7_js.isPpactionUrl(url)) {
12129
12172
  if (mode === "present") {
12130
- const parsed = chunk7DGKSEIU_js.parsePpactionUrl(url);
12173
+ const parsed = chunk4MGJUBY7_js.parsePpactionUrl(url);
12131
12174
  if (parsed) {
12132
12175
  presentation.handlePresentationAction({
12133
12176
  action: parsed.action,
@@ -12520,7 +12563,7 @@ function buildToolbarProps(input) {
12520
12563
  isCommentsPanelOpen: s.isInspectorPaneOpen,
12521
12564
  slideCommentCount: activeSlide?.comments?.length ?? 0,
12522
12565
  formatPainterActive: s.formatPainterActive,
12523
- canActivateFormatPainter: chunk7DGKSEIU_js.hasCopyableFormat(selectedElement),
12566
+ canActivateFormatPainter: chunk4MGJUBY7_js.hasCopyableFormat(selectedElement),
12524
12567
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12525
12568
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12526
12569
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -12841,7 +12884,7 @@ function useViewerBuildingBlocksCore(input) {
12841
12884
  documentGridSpacing: state.viewProperties?.gridSpacing
12842
12885
  });
12843
12886
  const themeColorMap = React17.useMemo(
12844
- () => state.theme?.colorScheme ? (0, chunk7DGKSEIU_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12887
+ () => state.theme?.colorScheme ? (0, chunk4MGJUBY7_js.dist_exports.buildThemeColorMap)(state.theme.colorScheme) : void 0,
12845
12888
  [state.theme?.colorScheme]
12846
12889
  );
12847
12890
  const { presentation, annotations, actionSoundHandlerRef, setExitModeHandler } = usePresentationSetup({
@@ -13416,23 +13459,23 @@ function ColorChangedImage({
13416
13459
  className,
13417
13460
  alt
13418
13461
  }) {
13419
- const tolerance = tolerancePct ?? chunk7DGKSEIU_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13420
- const cacheKey = chunk7DGKSEIU_js.buildCacheKey(
13462
+ const tolerance = tolerancePct ?? chunk4MGJUBY7_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13463
+ const cacheKey = chunk4MGJUBY7_js.buildCacheKey(
13421
13464
  src,
13422
13465
  clrChange.clrFrom,
13423
13466
  clrChange.clrTo,
13424
13467
  tolerance,
13425
13468
  Boolean(clrChange.clrToTransparent)
13426
13469
  );
13427
- const cached = chunk7DGKSEIU_js.getCachedResult(cacheKey);
13470
+ const cached = chunk4MGJUBY7_js.getCachedResult(cacheKey);
13428
13471
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13429
13472
  React17.useEffect(() => {
13430
- if (chunk7DGKSEIU_js.getCachedResult(cacheKey)) {
13431
- setProcessedSrc(chunk7DGKSEIU_js.getCachedResult(cacheKey) ?? null);
13473
+ if (chunk4MGJUBY7_js.getCachedResult(cacheKey)) {
13474
+ setProcessedSrc(chunk4MGJUBY7_js.getCachedResult(cacheKey) ?? null);
13432
13475
  return;
13433
13476
  }
13434
13477
  let cancelled = false;
13435
- chunk7DGKSEIU_js.applyColorChange(
13478
+ chunk4MGJUBY7_js.applyColorChange(
13436
13479
  src,
13437
13480
  clrChange.clrFrom,
13438
13481
  clrChange.clrTo,
@@ -13440,7 +13483,7 @@ function ColorChangedImage({
13440
13483
  Boolean(clrChange.clrToTransparent)
13441
13484
  ).then((result) => {
13442
13485
  if (!cancelled) {
13443
- chunk7DGKSEIU_js.setCachedResult(cacheKey, result.dataUrl);
13486
+ chunk4MGJUBY7_js.setCachedResult(cacheKey, result.dataUrl);
13444
13487
  setProcessedSrc(result.dataUrl);
13445
13488
  }
13446
13489
  return void 0;
@@ -13532,7 +13575,7 @@ function TiledImageLayer({
13532
13575
  cancelled = true;
13533
13576
  };
13534
13577
  }, [src]);
13535
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk7DGKSEIU_js.getImageTilingStyle(element, nativeSize), ...style } });
13578
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunk4MGJUBY7_js.getImageTilingStyle(element, nativeSize), ...style } });
13536
13579
  }
13537
13580
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13538
13581
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13601,7 +13644,7 @@ function renderImg(el, style, filter, alt, opacity) {
13601
13644
  ...filter ? { filter } : {},
13602
13645
  ...opacity !== void 0 ? { opacity } : {}
13603
13646
  };
13604
- if (chunk7DGKSEIU_js.isImageTiled(el)) {
13647
+ if (chunk4MGJUBY7_js.isImageTiled(el)) {
13605
13648
  const tileSrc = imgSrc(el);
13606
13649
  if (!tileSrc) {
13607
13650
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-gray-500 bg-gray-100", children: "Image" });
@@ -13620,12 +13663,12 @@ function renderImg(el, style, filter, alt, opacity) {
13620
13663
  ] });
13621
13664
  }
13622
13665
  const colorWash = pptx.getImageColorWashStyle(
13623
- (0, chunk7DGKSEIU_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13666
+ (0, chunk4MGJUBY7_js.dist_exports.isImageLikeElement)(el) ? el.imageEffects?.colorWash : void 0
13624
13667
  );
13625
13668
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13626
- const duotoneColors = chunk7DGKSEIU_js.getDuotoneColors(el);
13669
+ const duotoneColors = chunk4MGJUBY7_js.getDuotoneColors(el);
13627
13670
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13628
- const filterForImg = useDuotoneCanvas ? chunk7DGKSEIU_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13671
+ const filterForImg = useDuotoneCanvas ? chunk4MGJUBY7_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13629
13672
  const canvasEffectStyles = {
13630
13673
  ...filterForImg ? { filter: filterForImg } : {},
13631
13674
  ...opacity !== void 0 ? { opacity } : {}
@@ -13701,10 +13744,10 @@ function SlideBackgroundImageLayer({
13701
13744
  style: { zIndex: 0 },
13702
13745
  children: renderImg(
13703
13746
  backgroundElement,
13704
- chunk7DGKSEIU_js.getImageRenderStyle(backgroundElement),
13705
- chunk7DGKSEIU_js.getImageEffectsFilter(backgroundElement),
13747
+ chunk4MGJUBY7_js.getImageRenderStyle(backgroundElement),
13748
+ chunk4MGJUBY7_js.getImageEffectsFilter(backgroundElement),
13706
13749
  "",
13707
- chunk7DGKSEIU_js.getImageEffectsOpacity(backgroundElement)
13750
+ chunk4MGJUBY7_js.getImageEffectsOpacity(backgroundElement)
13708
13751
  )
13709
13752
  }
13710
13753
  );
@@ -13975,7 +14018,7 @@ function ChartElementView({
13975
14018
  pptx.getBarFacePicturePixelSampleVersion
13976
14019
  );
13977
14020
  const viewModel = React17.useMemo(() => {
13978
- return canEdit ? chunk7DGKSEIU_js.buildReactChartViewModel(element) : null;
14021
+ return canEdit ? chunk4MGJUBY7_js.buildReactChartViewModel(element) : null;
13979
14022
  }, [canEdit, element, barFacePictureSampleVersion]);
13980
14023
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
13981
14024
  React17.useEffect(() => {
@@ -14060,9 +14103,9 @@ function ChartElementView({
14060
14103
  textStyle: animationState?.textStyle,
14061
14104
  onSelect: chart3D.onSelect,
14062
14105
  onDrag: chart3D.onDrag,
14063
- children: chunk7DGKSEIU_js.renderChartElement(renderedElement)
14106
+ children: chunk4MGJUBY7_js.renderChartElement(renderedElement)
14064
14107
  }
14065
- ) : chunk7DGKSEIU_js.renderChartElement(renderedElement),
14108
+ ) : chunk4MGJUBY7_js.renderChartElement(renderedElement),
14066
14109
  dragValue !== null && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "absolute top-1 right-1 z-10 rounded bg-primary/90 px-1.5 py-0.5 text-[10px] font-medium text-white pointer-events-none", children: pptx.formatAxisValue(dragValue) }),
14067
14110
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
14068
14111
  "input",
@@ -14392,7 +14435,7 @@ function ResizeHandles({
14392
14435
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14393
14436
  "data-pptx-handle-kind": "resize",
14394
14437
  "data-pptx-compact": true,
14395
- className: chunk7DGKSEIU_js.cn(
14438
+ className: chunk4MGJUBY7_js.cn(
14396
14439
  "absolute z-10 group border-0 bg-transparent p-0",
14397
14440
  RESIZE_DEFAULT_CLASSES,
14398
14441
  posClass,
@@ -14418,7 +14461,7 @@ function ResizeHandles({
14418
14461
  "div",
14419
14462
  {
14420
14463
  "data-pptx-handle-hit": true,
14421
- className: chunk7DGKSEIU_js.cn(
14464
+ className: chunk4MGJUBY7_js.cn(
14422
14465
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14423
14466
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14424
14467
  ),
@@ -14439,7 +14482,7 @@ function ResizeHandles({
14439
14482
  "aria-label": t("pptx.selectionOverlay.rotate"),
14440
14483
  "data-pptx-handle-kind": "rotate",
14441
14484
  "data-pptx-compact": true,
14442
- className: chunk7DGKSEIU_js.cn(
14485
+ className: chunk4MGJUBY7_js.cn(
14443
14486
  "absolute left-1/2 top-0 -translate-x-1/2 -translate-y-1/2 z-20 border-0 bg-transparent p-0 cursor-grab active:cursor-grabbing",
14444
14487
  ROTATE_DEFAULT_CLASSES
14445
14488
  ),
@@ -14509,17 +14552,17 @@ var ConnectorElementRenderer = React17__default.default.memo(
14509
14552
  animationState,
14510
14553
  textStyleOverrideCss
14511
14554
  }) {
14512
- const shapeEl = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14555
+ const shapeEl = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el : void 0;
14513
14556
  const viewWidth = Math.max(el.width, 0);
14514
14557
  const viewHeight = Math.max(el.height, 0);
14515
14558
  const svgWidth = Math.max(el.width, 1);
14516
14559
  const svgHeight = Math.max(el.height, 1);
14517
14560
  const ss = shapeEl?.shapeStyle;
14518
14561
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14519
- const strokeColor = chunk7DGKSEIU_js.normalizeHexColor(ss?.strokeColor, chunk7DGKSEIU_js.DEFAULT_STROKE_COLOR);
14520
- const strokePaint = chunk7DGKSEIU_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14521
- const dashType = chunk7DGKSEIU_js.normalizeStrokeDashType(ss?.strokeDash);
14522
- const dashArray = chunk7DGKSEIU_js.getSvgStrokeDasharray(
14562
+ const strokeColor = chunk4MGJUBY7_js.normalizeHexColor(ss?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
14563
+ const strokePaint = chunk4MGJUBY7_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14564
+ const dashType = chunk4MGJUBY7_js.normalizeStrokeDashType(ss?.strokeDash);
14565
+ const dashArray = chunk4MGJUBY7_js.getSvgStrokeDasharray(
14523
14566
  dashType,
14524
14567
  Math.max(strokeWidth, 1),
14525
14568
  ss?.customDashSegments
@@ -14530,14 +14573,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14530
14573
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14531
14574
  const startMarkerId = `${markerSeed}-sel-start`;
14532
14575
  const endMarkerId = `${markerSeed}-sel-end`;
14533
- const compoundOffsets = chunk7DGKSEIU_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14534
- const compoundWidths = chunk7DGKSEIU_js.getCompoundLineWidths(compoundLine, strokeWidth);
14576
+ const compoundOffsets = chunk4MGJUBY7_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14577
+ const compoundWidths = chunk4MGJUBY7_js.getCompoundLineWidths(compoundLine, strokeWidth);
14535
14578
  const strokeCap = pptx.svgLineCap(ss?.lineCap);
14536
- const textEl = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14579
+ const textEl = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el : void 0;
14537
14580
  const connectorText = textEl?.text?.trim() ?? "";
14538
14581
  const connectorTextSegments = textEl?.textSegments;
14539
14582
  const connectorTextStyle = textEl?.textStyle;
14540
- const pathGeometry = shapeEl ? chunk7DGKSEIU_js.getConnectorPathGeometry(shapeEl) : {
14583
+ const pathGeometry = shapeEl ? chunk4MGJUBY7_js.getConnectorPathGeometry(shapeEl) : {
14541
14584
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14542
14585
  startX: 0,
14543
14586
  startY: 0,
@@ -14546,16 +14589,16 @@ var ConnectorElementRenderer = React17__default.default.memo(
14546
14589
  };
14547
14590
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14548
14591
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14549
- const lineShadow = chunk7DGKSEIU_js.buildLineShadowCss(el);
14550
- const lineGlow = chunk7DGKSEIU_js.buildLineGlowFilter(el);
14592
+ const lineShadow = chunk4MGJUBY7_js.buildLineShadowCss(el);
14593
+ const lineGlow = chunk4MGJUBY7_js.buildLineGlowFilter(el);
14551
14594
  return /* @__PURE__ */ jsxRuntime.jsxs(
14552
14595
  "div",
14553
14596
  {
14554
14597
  "data-pptx-element": "true",
14555
14598
  "data-element-id": el.id,
14556
- role: chunk7DGKSEIU_js.getAriaRole(el, { actionable: false }),
14557
- "aria-label": chunk7DGKSEIU_js.getAriaLabel(el),
14558
- "aria-roledescription": chunk7DGKSEIU_js.getAriaRoleDescription(el),
14599
+ role: chunk4MGJUBY7_js.getAriaRole(el, { actionable: false }),
14600
+ "aria-label": chunk4MGJUBY7_js.getAriaLabel(el),
14601
+ "aria-roledescription": chunk4MGJUBY7_js.getAriaRoleDescription(el),
14559
14602
  "aria-selected": isSelected ? true : void 0,
14560
14603
  className: "absolute",
14561
14604
  style: {
@@ -14588,14 +14631,14 @@ var ConnectorElementRenderer = React17__default.default.memo(
14588
14631
  style: { overflow: "visible", pointerEvents: "none" },
14589
14632
  children: [
14590
14633
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14591
- chunk7DGKSEIU_js.renderConnectorMarker(
14634
+ chunk4MGJUBY7_js.renderConnectorMarker(
14592
14635
  startMarkerId,
14593
14636
  startArrow,
14594
14637
  strokePaint,
14595
14638
  ss?.connectorStartArrowWidth,
14596
14639
  ss?.connectorStartArrowLength
14597
14640
  ),
14598
- chunk7DGKSEIU_js.renderConnectorMarker(
14641
+ chunk4MGJUBY7_js.renderConnectorMarker(
14599
14642
  endMarkerId,
14600
14643
  endArrow,
14601
14644
  strokePaint,
@@ -14801,14 +14844,14 @@ function getElementInteractionProps({
14801
14844
  };
14802
14845
  }
14803
14846
  function renderDagDuotoneFilterForElement(el) {
14804
- if (!chunk7DGKSEIU_js.hasDagDuotoneEffect(el)) {
14847
+ if (!chunk4MGJUBY7_js.hasDagDuotoneEffect(el)) {
14805
14848
  return null;
14806
14849
  }
14807
14850
  const duotone = el.shapeStyle?.dagDuotone;
14808
14851
  if (!duotone) {
14809
14852
  return null;
14810
14853
  }
14811
- return chunk7DGKSEIU_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14854
+ return chunk4MGJUBY7_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
14812
14855
  }
14813
14856
  function getContainerStyle({
14814
14857
  el,
@@ -14821,7 +14864,7 @@ function getContainerStyle({
14821
14864
  has3DExtrusion,
14822
14865
  templateEditing
14823
14866
  }) {
14824
- const ss = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14867
+ const ss = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
14825
14868
  const isPicture = el.type === "picture" || el.type === "image";
14826
14869
  const blurGrowVisible = Boolean(
14827
14870
  ss?.blurGrow && typeof ss.blurRadius === "number" && ss.blurRadius > 0
@@ -14835,10 +14878,10 @@ function getContainerStyle({
14835
14878
  top: isFullscreenMedia ? fs.top : el.y,
14836
14879
  width: isFullscreenMedia ? fs.width : painted.width,
14837
14880
  ...heightStyle,
14838
- transform: isFullscreenMedia ? fs.transform : chunk7DGKSEIU_js.getElementTransform(el),
14881
+ transform: isFullscreenMedia ? fs.transform : chunk4MGJUBY7_js.getElementTransform(el),
14839
14882
  transformOrigin: "center",
14840
14883
  overflow: overflowValue,
14841
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk7DGKSEIU_js.getCropShapeClipPath(el) : void 0,
14884
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunk4MGJUBY7_js.getCropShapeClipPath(el) : void 0,
14842
14885
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
14843
14886
  visibility: animationState?.visible === false ? "hidden" : "visible",
14844
14887
  animation: animationState?.cssAnimation,
@@ -14861,7 +14904,10 @@ function getContainerStyle({
14861
14904
  // bindings multiply the two; React spread the shape style over its own
14862
14905
  // `opacity` key, so a half-transparent element carrying a DAG alpha
14863
14906
  // rendered at the DAG's alpha alone.
14864
- opacity: typeof shapeVisualStyle.opacity === "number" ? (opacity ?? 1) * shapeVisualStyle.opacity : opacity,
14907
+ opacity: pptx.getAnimationOpacity(
14908
+ animationState,
14909
+ typeof shapeVisualStyle.opacity === "number" ? (opacity ?? 1) * shapeVisualStyle.opacity : opacity
14910
+ ),
14865
14911
  // Editable-template affordance: a distinct amber dashed ring + slight
14866
14912
  // transparency so inherited master/layout shapes read as "template" while
14867
14913
  // edit-template mode is on. Applied after the shape style so it wins; never
@@ -14870,11 +14916,11 @@ function getContainerStyle({
14870
14916
  };
14871
14917
  }
14872
14918
  function shapeParams(element) {
14873
- const style = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
14919
+ const style = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
14874
14920
  const strokeWidth = pptx.paintedStrokeWidth(style);
14875
- const strokeColor = chunk7DGKSEIU_js.normalizeHexColor(style?.strokeColor, chunk7DGKSEIU_js.DEFAULT_STROKE_COLOR);
14876
- const fillColor = chunk7DGKSEIU_js.normalizeHexColor(style?.fillColor, chunk7DGKSEIU_js.DEFAULT_FILL_COLOR);
14877
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk7DGKSEIU_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14921
+ const strokeColor = chunk4MGJUBY7_js.normalizeHexColor(style?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
14922
+ const fillColor = chunk4MGJUBY7_js.normalizeHexColor(style?.fillColor, chunk4MGJUBY7_js.DEFAULT_FILL_COLOR);
14923
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk4MGJUBY7_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
14878
14924
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
14879
14925
  }
14880
14926
  var Extrusion3DOverlay = React17__default.default.memo(
@@ -14979,7 +15025,7 @@ function ShapeEffectOverlay({
14979
15025
  const fillOverlayStyle = overlay ? {
14980
15026
  position: "absolute",
14981
15027
  inset: 0,
14982
- ...(0, chunk7DGKSEIU_js.dist_exports.isImageLikeElement)(element) ? chunk7DGKSEIU_js.getImageSurfaceMaskStyle(element) : {},
15028
+ ...(0, chunk4MGJUBY7_js.dist_exports.isImageLikeElement)(element) ? chunk4MGJUBY7_js.getImageSurfaceMaskStyle(element) : {},
14983
15029
  background: overlay.color,
14984
15030
  mixBlendMode: overlay.blendMode,
14985
15031
  pointerEvents: "none"
@@ -15180,12 +15226,13 @@ var ElementRenderer = React17__default.default.memo(
15180
15226
  const chartUpdateHandler = smartArtUpdateHandler;
15181
15227
  const { hf, fc, sw, sc } = shapeParams(el);
15182
15228
  const allow = pptx.resolveElementInteractivity(el);
15183
- const backgroundAnimationState = presentationElementStates?.get(`${el.id}::pptx-bg`);
15229
+ const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15230
+ const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15184
15231
  const visualAnimationState = backgroundAnimationState ?? animationState;
15185
- const isTxt = chunk7DGKSEIU_js.isEditableTextElement(el) && allow.textEditable;
15186
- const txtSE = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15232
+ const isTxt = chunk4MGJUBY7_js.isEditableTextElement(el) && allow.textEditable;
15233
+ const txtSE = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el.textStyle : void 0;
15187
15234
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15188
- const ss = chunk7DGKSEIU_js.getShapeVisualStyle(
15235
+ const ss = chunk4MGJUBY7_js.getShapeVisualStyle(
15189
15236
  el,
15190
15237
  hf,
15191
15238
  fc,
@@ -15194,9 +15241,9 @@ var ElementRenderer = React17__default.default.memo(
15194
15241
  visualAnimationState?.animatesFill,
15195
15242
  visualAnimationState?.animatesStroke
15196
15243
  );
15197
- const ts = chunk7DGKSEIU_js.getTextStyleForElement(el, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR);
15244
+ const ts = chunk4MGJUBY7_js.getTextStyleForElement(el, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR);
15198
15245
  const isImg = el.type === "picture" || el.type === "image";
15199
- const vs = chunk7DGKSEIU_js.renderVectorShape(
15246
+ const vs = chunk4MGJUBY7_js.renderVectorShape(
15200
15247
  el,
15201
15248
  isImg ? false : hf,
15202
15249
  fc,
@@ -15206,10 +15253,10 @@ var ElementRenderer = React17__default.default.memo(
15206
15253
  visualAnimationState?.animatesStroke
15207
15254
  );
15208
15255
  const isModel3D = el.type === "model3d";
15209
- const isConn = chunk7DGKSEIU_js.isConnectorOrLineElement(el);
15210
- const shapeStyle3d = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15256
+ const isConn = chunk4MGJUBY7_js.isConnectorOrLineElement(el);
15257
+ const shapeStyle3d = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(el) ? el.shapeStyle : void 0;
15211
15258
  const extrusionData = React17.useMemo(
15212
- () => chunk7DGKSEIU_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15259
+ () => chunk4MGJUBY7_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15213
15260
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15214
15261
  );
15215
15262
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15262,6 +15309,7 @@ var ElementRenderer = React17__default.default.memo(
15262
15309
  });
15263
15310
  const hitTargetStyle = pptx.shouldRenderHitTarget(effectiveCanInteract, isPresentationPassive) ? pptx.elementHitTargetStyle(el) : void 0;
15264
15311
  const isFocusable = effectiveCanInteract || isActionable;
15312
+ const backgroundLayerStyle = backgroundAnimationState ? pptx.getShapeEffectAnimationLayerStyle(el, ss, backgroundAnimationState) : void 0;
15265
15313
  const containerStyle = getContainerStyle({
15266
15314
  el,
15267
15315
  isFullscreenMedia,
@@ -15298,7 +15346,7 @@ var ElementRenderer = React17__default.default.memo(
15298
15346
  "aria-hidden": aria.hidden ? true : void 0,
15299
15347
  "aria-selected": isSelected ? true : void 0,
15300
15348
  tabIndex: isFocusable ? 0 : -1,
15301
- className: chunk7DGKSEIU_js.cn(
15349
+ className: chunk4MGJUBY7_js.cn(
15302
15350
  "absolute",
15303
15351
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15304
15352
  cur,
@@ -15340,33 +15388,7 @@ var ElementRenderer = React17__default.default.memo(
15340
15388
  style: hitTargetStyle
15341
15389
  }
15342
15390
  ),
15343
- backgroundAnimationState ? /* @__PURE__ */ jsxRuntime.jsxs(
15344
- "div",
15345
- {
15346
- "data-pptx-animation-layer": "background",
15347
- style: {
15348
- ...ss,
15349
- position: "absolute",
15350
- inset: 0,
15351
- transformOrigin: "center",
15352
- visibility: backgroundAnimationState.visible === false ? "hidden" : "visible",
15353
- animation: backgroundAnimationState.cssAnimation,
15354
- pointerEvents: "none"
15355
- },
15356
- children: [
15357
- /* @__PURE__ */ jsxRuntime.jsx(
15358
- ShapeEffectOverlay,
15359
- {
15360
- element: el,
15361
- animatesFill: visualAnimationState?.animatesFill,
15362
- animatesStroke: visualAnimationState?.animatesStroke
15363
- }
15364
- ),
15365
- extrusionData.hasExtrusion && /* @__PURE__ */ jsxRuntime.jsx(Extrusion3DOverlay, { data: extrusionData }),
15366
- isImg ? null : vs
15367
- ]
15368
- }
15369
- ) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15391
+ backgroundAnimationState && effectPlacement.beforeBody ? /* @__PURE__ */ jsxRuntime.jsxs("div", { "data-pptx-animation-layer": "background", style: backgroundLayerStyle, children: [
15370
15392
  /* @__PURE__ */ jsxRuntime.jsx(
15371
15393
  ShapeEffectOverlay,
15372
15394
  {
@@ -15375,6 +15397,17 @@ var ElementRenderer = React17__default.default.memo(
15375
15397
  animatesStroke: visualAnimationState?.animatesStroke
15376
15398
  }
15377
15399
  ),
15400
+ extrusionData.hasExtrusion && /* @__PURE__ */ jsxRuntime.jsx(Extrusion3DOverlay, { data: extrusionData }),
15401
+ isImg ? null : vs
15402
+ ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
15403
+ effectPlacement.beforeBody && /* @__PURE__ */ jsxRuntime.jsx(
15404
+ ShapeEffectOverlay,
15405
+ {
15406
+ element: el,
15407
+ animatesFill: visualAnimationState?.animatesFill,
15408
+ animatesStroke: visualAnimationState?.animatesStroke
15409
+ }
15410
+ ),
15378
15411
  extrusionData.hasExtrusion && /* @__PURE__ */ jsxRuntime.jsx(Extrusion3DOverlay, { data: extrusionData })
15379
15412
  ] }),
15380
15413
  renderBody({
@@ -15386,9 +15419,9 @@ var ElementRenderer = React17__default.default.memo(
15386
15419
  txtSE,
15387
15420
  txtS: ts,
15388
15421
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15389
- imgStyle: chunk7DGKSEIU_js.getImageRenderStyle(el),
15390
- imgFilter: chunk7DGKSEIU_js.getImageEffectsFilter(el),
15391
- imgOpacity: chunk7DGKSEIU_js.getImageEffectsOpacity(el),
15422
+ imgStyle: chunk4MGJUBY7_js.getImageRenderStyle(el),
15423
+ imgFilter: chunk4MGJUBY7_js.getImageEffectsFilter(el),
15424
+ imgOpacity: chunk4MGJUBY7_js.getImageEffectsOpacity(el),
15392
15425
  imgAlt: imageAltText,
15393
15426
  isTxtEl: isTxt,
15394
15427
  media: mediaDataUrls,
@@ -15440,6 +15473,21 @@ var ElementRenderer = React17__default.default.memo(
15440
15473
  onUpdateChartElement: chartUpdateHandler,
15441
15474
  onFormatText
15442
15475
  }),
15476
+ effectPlacement.afterBody && /* @__PURE__ */ jsxRuntime.jsx(
15477
+ "div",
15478
+ {
15479
+ "data-pptx-animation-layer": backgroundAnimationState ? "background" : void 0,
15480
+ style: backgroundLayerStyle ?? { display: "contents" },
15481
+ children: /* @__PURE__ */ jsxRuntime.jsx(
15482
+ ShapeEffectOverlay,
15483
+ {
15484
+ element: el,
15485
+ animatesFill: visualAnimationState?.animatesFill,
15486
+ animatesStroke: visualAnimationState?.animatesStroke
15487
+ }
15488
+ )
15489
+ }
15490
+ ),
15443
15491
  /* @__PURE__ */ jsxRuntime.jsx(ActionAffordances, { affordance: actionAffordance })
15444
15492
  ]
15445
15493
  }
@@ -15510,10 +15558,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15510
15558
  }
15511
15559
  function renderInk(el, options) {
15512
15560
  const replay = options?.replay ?? false;
15513
- const strokes = chunk7DGKSEIU_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15561
+ const strokes = chunk4MGJUBY7_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15514
15562
  strokes.some((s) => s.circles || s.nibMarks);
15515
15563
  const pressureSensitive = options?.pressureSensitive;
15516
- const replayStyles = replay ? chunk7DGKSEIU_js.getInkReplayStyles(el, options?.replayConfig) : null;
15564
+ const replayStyles = replay ? chunk4MGJUBY7_js.getInkReplayStyles(el, options?.replayConfig) : null;
15517
15565
  return /* @__PURE__ */ jsxRuntime.jsxs(
15518
15566
  "svg",
15519
15567
  {
@@ -15521,7 +15569,7 @@ function renderInk(el, options) {
15521
15569
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15522
15570
  preserveAspectRatio: "none",
15523
15571
  children: [
15524
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk7DGKSEIU_js.INK_REPLAY_KEYFRAMES }),
15572
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk4MGJUBY7_js.INK_REPLAY_KEYFRAMES }),
15525
15573
  strokes.map(
15526
15574
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15527
15575
  )
@@ -15532,7 +15580,7 @@ function renderInk(el, options) {
15532
15580
  function renderGroup(children, parentGroupFill) {
15533
15581
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15534
15582
  const { hf, fc, sw, sc } = shapeParams(c);
15535
- const baseSs = chunk7DGKSEIU_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15583
+ const baseSs = chunk4MGJUBY7_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15536
15584
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15537
15585
  const ss = inheritedFill ? {
15538
15586
  ...baseSs,
@@ -15543,9 +15591,9 @@ function renderGroup(children, parentGroupFill) {
15543
15591
  backgroundPosition: inheritedFill.backgroundPosition
15544
15592
  } : baseSs;
15545
15593
  const isI = c.type === "picture" || c.type === "image";
15546
- const vs = chunk7DGKSEIU_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15547
- const ts = chunk7DGKSEIU_js.getTextStyleForElement(c, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR);
15548
- const isTxt = chunk7DGKSEIU_js.isEditableTextElement(c);
15594
+ const vs = chunk4MGJUBY7_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15595
+ const ts = chunk4MGJUBY7_js.getTextStyleForElement(c, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR);
15596
+ const isTxt = chunk4MGJUBY7_js.isEditableTextElement(c);
15549
15597
  return /* @__PURE__ */ jsxRuntime.jsxs(
15550
15598
  "div",
15551
15599
  {
@@ -15554,9 +15602,9 @@ function renderGroup(children, parentGroupFill) {
15554
15602
  style: {
15555
15603
  left: c.x,
15556
15604
  top: c.y,
15557
- width: Math.max(c.width, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE),
15558
- height: Math.max(c.height, chunk7DGKSEIU_js.MIN_ELEMENT_SIZE),
15559
- transform: chunk7DGKSEIU_js.getElementTransform(c),
15605
+ width: Math.max(c.width, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE),
15606
+ height: Math.max(c.height, chunk4MGJUBY7_js.MIN_ELEMENT_SIZE),
15607
+ transform: chunk4MGJUBY7_js.getElementTransform(c),
15560
15608
  transformOrigin: "center",
15561
15609
  ...ss,
15562
15610
  ...isI ? {
@@ -15581,8 +15629,8 @@ function renderGroup(children, parentGroupFill) {
15581
15629
  // A nested group: recurse, chaining the inherited fill so a
15582
15630
  // `grpFill` shape under a fill-less sub-group still paints.
15583
15631
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15584
- ) : 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: [
15585
- chunk7DGKSEIU_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15632
+ ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk4MGJUBY7_js.getImageSurfaceStyle(c), children: [
15633
+ chunk4MGJUBY7_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15586
15634
  TiledImageLayer,
15587
15635
  {
15588
15636
  element: c,
@@ -15595,7 +15643,7 @@ function renderGroup(children, parentGroupFill) {
15595
15643
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15596
15644
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15597
15645
  className: "pointer-events-none select-none",
15598
- style: chunk7DGKSEIU_js.getImageRenderStyle(c),
15646
+ style: chunk4MGJUBY7_js.getImageRenderStyle(c),
15599
15647
  draggable: false
15600
15648
  }
15601
15649
  ),
@@ -15607,7 +15655,7 @@ function renderGroup(children, parentGroupFill) {
15607
15655
  {
15608
15656
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15609
15657
  style: ts,
15610
- children: chunk7DGKSEIU_js.renderTextSegments(c, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR)
15658
+ children: chunk4MGJUBY7_js.renderTextSegments(c, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR)
15611
15659
  }
15612
15660
  ) : null
15613
15661
  ] })
@@ -15621,8 +15669,8 @@ function renderContentPart(el, options) {
15621
15669
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15622
15670
  const replay = options?.replay ?? false;
15623
15671
  const pressureSensitive = options?.pressureSensitive ?? true;
15624
- const strokes = chunk7DGKSEIU_js.buildContentPartStrokes(el);
15625
- const replayStyles = replay ? chunk7DGKSEIU_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15672
+ const strokes = chunk4MGJUBY7_js.buildContentPartStrokes(el);
15673
+ const replayStyles = replay ? chunk4MGJUBY7_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15626
15674
  return /* @__PURE__ */ jsxRuntime.jsxs(
15627
15675
  "svg",
15628
15676
  {
@@ -15630,7 +15678,7 @@ function renderContentPart(el, options) {
15630
15678
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15631
15679
  preserveAspectRatio: "none",
15632
15680
  children: [
15633
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk7DGKSEIU_js.INK_REPLAY_KEYFRAMES }),
15681
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunk4MGJUBY7_js.INK_REPLAY_KEYFRAMES }),
15634
15682
  strokes.map(
15635
15683
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15636
15684
  )
@@ -15857,9 +15905,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
15857
15905
  collaboration: connected,
15858
15906
  model: pptx.createInlineListModelObserver(element),
15859
15907
  activationSelection,
15860
- children: seed && !connected ? chunk7DGKSEIU_js.renderTextSegments(
15908
+ children: seed && !connected ? chunk4MGJUBY7_js.renderTextSegments(
15861
15909
  element,
15862
- chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
15910
+ chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
15863
15911
  void 0,
15864
15912
  void 0,
15865
15913
  void 0,
@@ -16029,7 +16077,7 @@ function InlineTextEditor({
16029
16077
  seedRef.current = {
16030
16078
  initialText,
16031
16079
  hasRichSegments: Boolean(
16032
- (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16080
+ (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) && element.textSegments && element.textSegments.length > 0
16033
16081
  )
16034
16082
  };
16035
16083
  }
@@ -16095,8 +16143,8 @@ function InlineTextEditor({
16095
16143
  pending.endOffset
16096
16144
  );
16097
16145
  });
16098
- const warpStyle = chunk7DGKSEIU_js.getTextWarpStyle(textStyleRaw);
16099
- const compensationTransform = chunk7DGKSEIU_js.getTextCompensationTransform(element);
16146
+ const warpStyle = chunk4MGJUBY7_js.getTextWarpStyle(textStyleRaw);
16147
+ const compensationTransform = chunk4MGJUBY7_js.getTextCompensationTransform(element);
16100
16148
  const warpTransform = warpStyle?.transform;
16101
16149
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
16102
16150
  const wrapperStyle = {
@@ -16107,7 +16155,7 @@ function InlineTextEditor({
16107
16155
  transformOrigin: warpStyle?.transformOrigin || "center"
16108
16156
  };
16109
16157
  const nextInlineStyleValue = (property) => {
16110
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element)) {
16158
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element)) {
16111
16159
  return true;
16112
16160
  }
16113
16161
  const result = pptx.getInlineEditorSelectionResult(element.textSegments);
@@ -16183,7 +16231,7 @@ function InlineTextEditor({
16183
16231
  const text = e.clipboardData.getData("text/plain");
16184
16232
  document.execCommand("insertText", false, text);
16185
16233
  },
16186
- children: list.seed ? list.children : seed.hasRichSegments ? chunk7DGKSEIU_js.renderTextSegments(element, chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR) : seed.initialText
16234
+ children: list.seed ? list.children : seed.hasRichSegments ? chunk4MGJUBY7_js.renderTextSegments(element, chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR) : seed.initialText
16187
16235
  },
16188
16236
  list.seed?.paragraphs[0].token ?? "plain"
16189
16237
  );
@@ -17120,7 +17168,7 @@ function SmartArtRendererImpl({
17120
17168
  if (!onUpdateElement || !pptx.shouldCommitSmartArtNodeText(smartArtData, nodeId, text)) {
17121
17169
  return;
17122
17170
  }
17123
- const updated = (0, chunk7DGKSEIU_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17171
+ const updated = (0, chunk4MGJUBY7_js.dist_exports.updateSmartArtNodeText)(smartArtData, nodeId, text);
17124
17172
  const box = { width: element.width, height: element.height };
17125
17173
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
17126
17174
  updated,
@@ -17136,7 +17184,7 @@ function SmartArtRendererImpl({
17136
17184
  if (!onUpdateElement) {
17137
17185
  return;
17138
17186
  }
17139
- const next = (0, chunk7DGKSEIU_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17187
+ const next = (0, chunk4MGJUBY7_js.dist_exports.setSmartArtNodeStyle)(smartArtData, nodeId, { fillColor: fill });
17140
17188
  if (next !== smartArtData) {
17141
17189
  const box = { width: element.width, height: element.height };
17142
17190
  const reflowed = pptx.rebuildDrawingShapesIfCleared(
@@ -17330,7 +17378,7 @@ function groupIntoParagraphs(element, fieldContext) {
17330
17378
  element,
17331
17379
  fieldContext ? (seg) => {
17332
17380
  if (seg.fieldType) {
17333
- const substituted = chunk7DGKSEIU_js.substituteFieldText(
17381
+ const substituted = chunk4MGJUBY7_js.substituteFieldText(
17334
17382
  seg.text,
17335
17383
  seg.fieldType,
17336
17384
  fieldContext,
@@ -17365,13 +17413,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17365
17413
  if (s.strikethrough) {
17366
17414
  decos.push("line-through");
17367
17415
  }
17368
- const fill = s.hyperlink ? chunk7DGKSEIU_js.normalizeHexColor(s.color || element.textStyle?.color, chunk7DGKSEIU_js.HYPERLINK_COLOR) : chunk7DGKSEIU_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17416
+ const fill = s.hyperlink ? chunk4MGJUBY7_js.normalizeHexColor(s.color || element.textStyle?.color, chunk4MGJUBY7_js.HYPERLINK_COLOR) : chunk4MGJUBY7_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17369
17417
  return {
17370
17418
  fill,
17371
- fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE,
17419
+ fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE,
17372
17420
  fontWeight: s.bold ? 700 : 400,
17373
17421
  fontStyle: s.italic ? "italic" : void 0,
17374
- fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk7DGKSEIU_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk7DGKSEIU_js.DEFAULT_FONT_FAMILY,
17422
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(s.fontFamily || element.textStyle?.fontFamily || "") : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY,
17375
17423
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17376
17424
  };
17377
17425
  }
@@ -17379,8 +17427,8 @@ function resolveSegmentFont(segment, element) {
17379
17427
  const s = segment.style || {};
17380
17428
  const family = s.fontFamily || element.textStyle?.fontFamily;
17381
17429
  return {
17382
- fontFamily: family ? (0, chunk7DGKSEIU_js.dist_exports.getSubstituteFontFamily)(family) : chunk7DGKSEIU_js.DEFAULT_FONT_FAMILY,
17383
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE,
17430
+ fontFamily: family ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(family) : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY,
17431
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE,
17384
17432
  bold: s.bold ?? element.textStyle?.bold,
17385
17433
  italic: s.italic ?? element.textStyle?.italic
17386
17434
  };
@@ -17446,7 +17494,7 @@ function WarpedText({
17446
17494
  fallbackColor,
17447
17495
  fieldContext
17448
17496
  }) {
17449
- if (!(0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element)) {
17497
+ if (!(0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element)) {
17450
17498
  return null;
17451
17499
  }
17452
17500
  const textEl = element;
@@ -17464,9 +17512,9 @@ function WarpedText({
17464
17512
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17465
17513
  const align = textEl.textStyle?.align ?? "center";
17466
17514
  const { startOffset, textAnchor } = getAlignmentProps(align);
17467
- const baseFontSize = textEl.textStyle?.fontSize ?? chunk7DGKSEIU_js.DEFAULT_TEXT_FONT_SIZE;
17468
- const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk7DGKSEIU_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk7DGKSEIU_js.DEFAULT_FONT_FAMILY;
17469
- const baseFill = chunk7DGKSEIU_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17515
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunk4MGJUBY7_js.DEFAULT_TEXT_FONT_SIZE;
17516
+ const baseFontFamily = textEl.textStyle?.fontFamily ? (0, chunk4MGJUBY7_js.dist_exports.getSubstituteFontFamily)(textEl.textStyle.fontFamily) : chunk4MGJUBY7_js.DEFAULT_FONT_FAMILY;
17517
+ const baseFill = chunk4MGJUBY7_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17470
17518
  if (pptx.hasGlyphEnvelope(preset)) {
17471
17519
  const perLine = pptx.buildGlyphEnvelopeBlock(
17472
17520
  preset,
@@ -17566,7 +17614,7 @@ function WarpedText({
17566
17614
  );
17567
17615
  }
17568
17616
  var GLYPH_BY_SHAPE = Object.fromEntries(
17569
- chunk7DGKSEIU_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17617
+ chunk4MGJUBY7_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17570
17618
  );
17571
17619
  GLYPH_BY_SHAPE["actionButtonForwardOrNext"] = GLYPH_BY_SHAPE["actionButtonForwardNext"];
17572
17620
  GLYPH_BY_SHAPE["actionButtonBackOrPrevious"] = GLYPH_BY_SHAPE["actionButtonBackPrevious"];
@@ -17636,11 +17684,11 @@ function renderTextElementBody(options) {
17636
17684
  const isLinkedTextBox = pptx.isLinkedTextBox(el);
17637
17685
  const linkedSegments = pptx.getOverflowSegments(el, slideElements);
17638
17686
  const useSvgWarp = pptx.shouldUseSvgWarp(
17639
- (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17687
+ (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? el.textStyle?.textWarpPreset : void 0
17640
17688
  );
17641
- const scene3dStyle = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(el) ? chunk7DGKSEIU_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17689
+ const scene3dStyle = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(el) ? chunk4MGJUBY7_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17642
17690
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17643
- const composedTransform = [rotationTransform, chunk7DGKSEIU_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17691
+ const composedTransform = [rotationTransform, chunk4MGJUBY7_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17644
17692
  const transformStyle = {
17645
17693
  transform: composedTransform,
17646
17694
  // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
@@ -17670,18 +17718,18 @@ function renderTextElementBody(options) {
17670
17718
  shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
17671
17719
  "div",
17672
17720
  {
17673
- className: chunk7DGKSEIU_js.cn(
17721
+ className: chunk4MGJUBY7_js.cn(
17674
17722
  "relative z-10 w-full h-full",
17675
17723
  onHyperlinkClick ? "" : "pointer-events-none"
17676
17724
  ),
17677
- style: { ...chunk7DGKSEIU_js.getTextLayoutStyle(el), ...transformStyle },
17725
+ style: { ...chunk4MGJUBY7_js.getTextLayoutStyle(el), ...transformStyle },
17678
17726
  children: /* @__PURE__ */ jsxRuntime.jsx(
17679
17727
  WarpedText,
17680
17728
  {
17681
17729
  element: el,
17682
17730
  width: el.width,
17683
17731
  height: el.height,
17684
- fallbackColor: chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
17732
+ fallbackColor: chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
17685
17733
  findHighlights: findHl,
17686
17734
  fieldContext
17687
17735
  }
@@ -17690,19 +17738,19 @@ function renderTextElementBody(options) {
17690
17738
  ) : /* @__PURE__ */ jsxRuntime.jsx(
17691
17739
  "div",
17692
17740
  {
17693
- className: chunk7DGKSEIU_js.cn(
17741
+ className: chunk4MGJUBY7_js.cn(
17694
17742
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
17695
17743
  onHyperlinkClick ? "" : "pointer-events-none"
17696
17744
  ),
17697
17745
  style: {
17698
- ...chunk7DGKSEIU_js.getTextLayoutStyle(el),
17746
+ ...chunk4MGJUBY7_js.getTextLayoutStyle(el),
17699
17747
  ...txtS,
17700
- ...chunk7DGKSEIU_js.getTextWarpStyle(txtSE),
17748
+ ...chunk4MGJUBY7_js.getTextWarpStyle(txtSE),
17701
17749
  ...transformStyle
17702
17750
  },
17703
- children: chunk7DGKSEIU_js.renderTextSegments(
17751
+ children: chunk4MGJUBY7_js.renderTextSegments(
17704
17752
  el,
17705
- chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR,
17753
+ chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR,
17706
17754
  void 0,
17707
17755
  findHl,
17708
17756
  onHyperlinkClick,
@@ -18021,7 +18069,7 @@ function renderBody(options) {
18021
18069
  );
18022
18070
  }
18023
18071
  if (isImg) {
18024
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk7DGKSEIU_js.getImageSurfaceStyle(el), children: [
18072
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunk4MGJUBY7_js.getImageSurfaceStyle(el), children: [
18025
18073
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
18026
18074
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
18027
18075
  ] });
@@ -18038,7 +18086,7 @@ function renderBody(options) {
18038
18086
  textDirection: txtSE?.textDirection,
18039
18087
  textStyle: txtS,
18040
18088
  textStyleRaw: txtSE,
18041
- layoutStyle: chunk7DGKSEIU_js.getTextLayoutStyle(el),
18089
+ layoutStyle: chunk4MGJUBY7_js.getTextLayoutStyle(el),
18042
18090
  element: el,
18043
18091
  onCommit,
18044
18092
  onCancel,
@@ -18049,7 +18097,7 @@ function renderBody(options) {
18049
18097
  ] });
18050
18098
  }
18051
18099
  if (el.type === "table") {
18052
- return chunk7DGKSEIU_js.renderTableElement(el, txtS, {
18100
+ return chunk4MGJUBY7_js.renderTableElement(el, txtS, {
18053
18101
  editable: isSel,
18054
18102
  selectedCell: isSel ? tableSt : null,
18055
18103
  onSelectCell: onCellSel,
@@ -18082,7 +18130,7 @@ function renderBody(options) {
18082
18130
  );
18083
18131
  }
18084
18132
  if (el.type === "media") {
18085
- return chunk7DGKSEIU_js.renderMediaElement(el, media, {
18133
+ return chunk4MGJUBY7_js.renderMediaElement(el, media, {
18086
18134
  // Present mode autoplays every media element on the active slide,
18087
18135
  // not only ones persisted with their own `autoPlay` flag (matching
18088
18136
  // the other four bindings' unconditional `presenting`-gated
@@ -18105,7 +18153,7 @@ function renderBody(options) {
18105
18153
  onPlayStateChange: handleMediaPlayStateChange
18106
18154
  });
18107
18155
  }
18108
- if (doInk && (0, chunk7DGKSEIU_js.dist_exports.isInkElement)(el)) {
18156
+ if (doInk && (0, chunk4MGJUBY7_js.dist_exports.isInkElement)(el)) {
18109
18157
  return renderInk(el, {
18110
18158
  replay: isPresentationPassive,
18111
18159
  pressureSensitive: true
@@ -18134,27 +18182,27 @@ function renderBody(options) {
18134
18182
  }
18135
18183
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
18136
18184
  }
18137
- if (chunk7DGKSEIU_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18138
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk7DGKSEIU_js.getElementLabel(el) });
18185
+ if (chunk4MGJUBY7_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18186
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk4MGJUBY7_js.getElementLabel(el) });
18139
18187
  }
18140
18188
  return renderTextElementBody(options);
18141
18189
  }
18142
18190
  function defaultTextColorForFill(fillColor) {
18143
18191
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18144
18192
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18145
- return chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR;
18193
+ return chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR;
18146
18194
  }
18147
18195
  const channels = [0, 2, 4].map((offset) => Number.parseInt(hex.slice(offset, offset + 2), 16) / 255).map((channel) => channel <= 0.04045 ? channel / 12.92 : ((channel + 0.055) / 1.055) ** 2.4);
18148
18196
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
18149
- return luminance > 0.179 ? chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR : "#ffffff";
18197
+ return luminance > 0.179 ? chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR : "#ffffff";
18150
18198
  }
18151
18199
  function getStaticElementVisualState(element, parentGroupFill) {
18152
- const style = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18153
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk7DGKSEIU_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18154
- const fill = chunk7DGKSEIU_js.normalizeHexColor(style?.fillColor, chunk7DGKSEIU_js.DEFAULT_FILL_COLOR);
18200
+ const style = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeStyle : void 0;
18201
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunk4MGJUBY7_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18202
+ const fill = chunk4MGJUBY7_js.normalizeHexColor(style?.fillColor, chunk4MGJUBY7_js.DEFAULT_FILL_COLOR);
18155
18203
  const strokeWidth = pptx.paintedStrokeWidth(style);
18156
- const stroke = chunk7DGKSEIU_js.normalizeHexColor(style?.strokeColor, chunk7DGKSEIU_js.DEFAULT_STROKE_COLOR);
18157
- const baseVisualStyle = chunk7DGKSEIU_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18204
+ const stroke = chunk4MGJUBY7_js.normalizeHexColor(style?.strokeColor, chunk4MGJUBY7_js.DEFAULT_STROKE_COLOR);
18205
+ const baseVisualStyle = chunk4MGJUBY7_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18158
18206
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18159
18207
  const visualStyle = inheritedFill ? {
18160
18208
  ...baseVisualStyle,
@@ -18164,13 +18212,13 @@ function getStaticElementVisualState(element, parentGroupFill) {
18164
18212
  backgroundSize: inheritedFill.backgroundSize,
18165
18213
  backgroundPosition: inheritedFill.backgroundPosition
18166
18214
  } : baseVisualStyle;
18167
- const textStyle = chunk7DGKSEIU_js.getTextStyleForElement(
18215
+ const textStyle = chunk4MGJUBY7_js.getTextStyleForElement(
18168
18216
  element,
18169
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk7DGKSEIU_js.DEFAULT_TEXT_COLOR
18217
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunk4MGJUBY7_js.DEFAULT_TEXT_COLOR
18170
18218
  );
18171
18219
  const isImage = element.type === "picture" || element.type === "image";
18172
- const letsTextOverflow = (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18173
- const shapeType = (0, chunk7DGKSEIU_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18220
+ const letsTextOverflow = (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
18221
+ const shapeType = (0, chunk4MGJUBY7_js.dist_exports.hasShapeProperties)(element) ? element.shapeType : void 0;
18174
18222
  const isCallout = pptx.isWedgeCalloutPresetShape(shapeType) || String(shapeType ?? "").toLowerCase().includes("callout");
18175
18223
  return {
18176
18224
  hasFill,
@@ -18191,7 +18239,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18191
18239
  return { action, isActionable, contractRole };
18192
18240
  }
18193
18241
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18194
- const overflowClass = visual.isImage || element.type === "group" || chunk7DGKSEIU_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18242
+ const overflowClass = visual.isImage || element.type === "group" || chunk4MGJUBY7_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18195
18243
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18196
18244
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18197
18245
  }
@@ -18274,7 +18322,7 @@ function StaticElementRendererImpl({
18274
18322
  top: positioned ? element.y : void 0,
18275
18323
  width: positioned ? Math.max(element.width, 1) : "100%",
18276
18324
  height: positioned ? Math.max(element.height, 1) : "100%",
18277
- transform: positioned ? chunk7DGKSEIU_js.getElementTransform(element) : void 0,
18325
+ transform: positioned ? chunk4MGJUBY7_js.getElementTransform(element) : void 0,
18278
18326
  transformOrigin: "center",
18279
18327
  zIndex,
18280
18328
  ...visualStyle,
@@ -18291,7 +18339,7 @@ function StaticElementRendererImpl({
18291
18339
  animation
18292
18340
  },
18293
18341
  children: [
18294
- /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection }),
18342
+ pptx.getShapeEffectLayerPlacement(element).beforeBody && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection }),
18295
18343
  element.type === "group" ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full", children: (element.children ?? []).map((child, index) => /* @__PURE__ */ jsxRuntime.jsx(
18296
18344
  StaticElementRenderer,
18297
18345
  {
@@ -18315,20 +18363,20 @@ function StaticElementRendererImpl({
18315
18363
  isEditing: false,
18316
18364
  editText: "",
18317
18365
  spellCheck: false,
18318
- txtSE: (0, chunk7DGKSEIU_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18366
+ txtSE: (0, chunk4MGJUBY7_js.dist_exports.hasTextProperties)(element) ? element.textStyle : void 0,
18319
18367
  txtS: textStyle,
18320
- vecShape: chunk7DGKSEIU_js.renderVectorShape(
18368
+ vecShape: chunk4MGJUBY7_js.renderVectorShape(
18321
18369
  element,
18322
18370
  isImage ? false : hasFill,
18323
18371
  fill,
18324
18372
  strokeWidth,
18325
18373
  stroke
18326
18374
  ),
18327
- imgStyle: imageAnimation ? { ...chunk7DGKSEIU_js.getImageRenderStyle(element), animation: imageAnimation } : chunk7DGKSEIU_js.getImageRenderStyle(element),
18328
- imgFilter: chunk7DGKSEIU_js.getImageEffectsFilter(element),
18329
- imgOpacity: chunk7DGKSEIU_js.getImageEffectsOpacity(element),
18375
+ imgStyle: imageAnimation ? { ...chunk4MGJUBY7_js.getImageRenderStyle(element), animation: imageAnimation } : chunk4MGJUBY7_js.getImageRenderStyle(element),
18376
+ imgFilter: chunk4MGJUBY7_js.getImageEffectsFilter(element),
18377
+ imgOpacity: chunk4MGJUBY7_js.getImageEffectsOpacity(element),
18330
18378
  imgAlt: "",
18331
- isTxtEl: chunk7DGKSEIU_js.isEditableTextElement(element),
18379
+ isTxtEl: chunk4MGJUBY7_js.isEditableTextElement(element),
18332
18380
  media: mediaDataUrls,
18333
18381
  tableSt: null,
18334
18382
  isSel: false,
@@ -18351,7 +18399,8 @@ function StaticElementRendererImpl({
18351
18399
  tableStyleContext,
18352
18400
  canEditSmartArt: false,
18353
18401
  canEditChart: false
18354
- })
18402
+ }),
18403
+ pptx.getShapeEffectLayerPlacement(element).afterBody && /* @__PURE__ */ jsxRuntime.jsx(ShapeEffectOverlay, { element, suppressReflection })
18355
18404
  ]
18356
18405
  }
18357
18406
  );
@@ -18373,7 +18422,7 @@ function SlideLayer({
18373
18422
  style: {
18374
18423
  width: safeWidth,
18375
18424
  height: safeHeight,
18376
- backgroundColor: slide.backgroundColor ? chunk7DGKSEIU_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18425
+ backgroundColor: slide.backgroundColor ? chunk4MGJUBY7_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18377
18426
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18378
18427
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18379
18428
  backgroundPosition: slide.backgroundImage ? "center" : void 0