pptx-react-viewer 4.47.1 → 4.49.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 (63) hide show
  1. package/CHANGELOG.md +36 -0
  2. package/dist/{AiChatPanel-6S4LWXGM.mjs → AiChatPanel-NKTBHT5B.mjs} +1 -1
  3. package/dist/AiChatPanel-NKTBHT5B.mjs.br +0 -0
  4. package/dist/AiChatPanel-NKTBHT5B.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-IEM43TTZ.js → AiChatPanel-S4WNQCY4.js} +9 -9
  6. package/dist/AiChatPanel-S4WNQCY4.js.br +0 -0
  7. package/dist/AiChatPanel-S4WNQCY4.js.gz +0 -0
  8. package/dist/{chunk-TANR7L7E.js → chunk-2ZXXHNNR.js} +1444 -1500
  9. package/dist/chunk-2ZXXHNNR.js.br +0 -0
  10. package/dist/chunk-2ZXXHNNR.js.gz +0 -0
  11. package/dist/{chunk-MA2BI7LX.js → chunk-JAI42EXQ.js} +0 -4
  12. package/dist/chunk-JAI42EXQ.js.br +0 -0
  13. package/dist/{chunk-MA2BI7LX.js.gz → chunk-JAI42EXQ.js.gz} +0 -0
  14. package/dist/{chunk-VUVBSQLT.js → chunk-ME5QRTVS.js} +271 -290
  15. package/dist/chunk-ME5QRTVS.js.br +0 -0
  16. package/dist/chunk-ME5QRTVS.js.gz +0 -0
  17. package/dist/{chunk-BVQSH5SS.mjs → chunk-PFV626ED.mjs} +1 -1
  18. package/dist/chunk-PFV626ED.mjs.br +0 -0
  19. package/dist/chunk-PFV626ED.mjs.gz +0 -0
  20. package/dist/{chunk-2I7ZAM4F.mjs → chunk-YKLL2Z33.mjs} +182 -238
  21. package/dist/chunk-YKLL2Z33.mjs.br +0 -0
  22. package/dist/chunk-YKLL2Z33.mjs.gz +0 -0
  23. package/dist/{chunk-BL7UYXYD.mjs → chunk-Z62JFXMZ.mjs} +79 -98
  24. package/dist/chunk-Z62JFXMZ.mjs.br +0 -0
  25. package/dist/chunk-Z62JFXMZ.mjs.gz +0 -0
  26. package/dist/index.js +24 -24
  27. package/dist/index.js.br +0 -0
  28. package/dist/index.js.gz +0 -0
  29. package/dist/index.mjs +3 -3
  30. package/dist/index.mjs.br +0 -0
  31. package/dist/index.mjs.gz +0 -0
  32. package/dist/internals.d.ts +8 -1
  33. package/dist/internals.js +81 -81
  34. package/dist/internals.js.br +0 -0
  35. package/dist/internals.js.gz +0 -0
  36. package/dist/internals.mjs +2 -2
  37. package/dist/internals.mjs.br +0 -0
  38. package/dist/internals.mjs.gz +0 -0
  39. package/dist/pptx-viewer.css +1 -1
  40. package/dist/pptx-viewer.css.br +0 -0
  41. package/dist/pptx-viewer.css.gz +0 -0
  42. package/dist/viewer/index.js +19 -19
  43. package/dist/viewer/index.js.br +0 -0
  44. package/dist/viewer/index.js.gz +0 -0
  45. package/dist/viewer/index.mjs +3 -3
  46. package/dist/viewer/index.mjs.br +0 -0
  47. package/dist/viewer/index.mjs.gz +0 -0
  48. package/package.json +3 -3
  49. package/dist/AiChatPanel-6S4LWXGM.mjs.br +0 -0
  50. package/dist/AiChatPanel-6S4LWXGM.mjs.gz +0 -0
  51. package/dist/AiChatPanel-IEM43TTZ.js.br +0 -0
  52. package/dist/AiChatPanel-IEM43TTZ.js.gz +0 -0
  53. package/dist/chunk-2I7ZAM4F.mjs.br +0 -0
  54. package/dist/chunk-2I7ZAM4F.mjs.gz +0 -0
  55. package/dist/chunk-BL7UYXYD.mjs.br +0 -0
  56. package/dist/chunk-BL7UYXYD.mjs.gz +0 -0
  57. package/dist/chunk-BVQSH5SS.mjs.br +0 -0
  58. package/dist/chunk-BVQSH5SS.mjs.gz +0 -0
  59. package/dist/chunk-MA2BI7LX.js.br +0 -0
  60. package/dist/chunk-TANR7L7E.js.br +0 -0
  61. package/dist/chunk-TANR7L7E.js.gz +0 -0
  62. package/dist/chunk-VUVBSQLT.js.br +0 -0
  63. package/dist/chunk-VUVBSQLT.js.gz +0 -0
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var chunkMA2BI7LX_js = require('./chunk-MA2BI7LX.js');
3
+ var chunkJAI42EXQ_js = require('./chunk-JAI42EXQ.js');
4
4
  var pptx = require('ooxml-ui/pptx');
5
5
  var React17 = require('react');
6
6
  var jsxRuntime = require('react/jsx-runtime');
@@ -764,9 +764,9 @@ function serializeHistoryDocument(snapshot) {
764
764
  }
765
765
  function recordExplicitSlideUpdate(past, future, previous, before, label, maxDepth) {
766
766
  if (previous && serializeHistoryDocument(previous) !== serializeHistoryDocument(before)) {
767
- past.push(chunkMA2BI7LX_js.cloneHistorySnapshot(previous));
767
+ past.push(chunkJAI42EXQ_js.cloneHistorySnapshot(previous));
768
768
  }
769
- past.push({ ...chunkMA2BI7LX_js.cloneHistorySnapshot(before), actionLabel: label });
769
+ past.push({ ...chunkJAI42EXQ_js.cloneHistorySnapshot(before), actionLabel: label });
770
770
  while (past.length > Math.max(1, maxDepth)) {
771
771
  past.shift();
772
772
  }
@@ -856,8 +856,8 @@ function useEditorHistory(input) {
856
856
  width: canvasSize.width,
857
857
  height: canvasSize.height,
858
858
  activeSlideIndex,
859
- slides: slides.map(chunkMA2BI7LX_js.cloneSlide),
860
- templateElementsBySlideId: chunkMA2BI7LX_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
859
+ slides: slides.map(chunkJAI42EXQ_js.cloneSlide),
860
+ templateElementsBySlideId: chunkJAI42EXQ_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
861
861
  ...actionLabel ? { actionLabel } : {}
862
862
  };
863
863
  },
@@ -870,9 +870,9 @@ function useEditorHistory(input) {
870
870
  width: snapshot.width,
871
871
  height: snapshot.height
872
872
  });
873
- setSlides(snapshot.slides.map(chunkMA2BI7LX_js.cloneSlide));
873
+ setSlides(snapshot.slides.map(chunkJAI42EXQ_js.cloneSlide));
874
874
  setTemplateElementsBySlideId(
875
- chunkMA2BI7LX_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
875
+ chunkJAI42EXQ_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
876
876
  );
877
877
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
878
878
  setSelectedElementIds([]);
@@ -911,8 +911,8 @@ function useEditorHistory(input) {
911
911
  const currentSnapshot = buildHistorySnapshot(previousSnapshot.actionLabel);
912
912
  historyFutureRef.current.push(currentSnapshot);
913
913
  isApplyingHistoryRef.current = true;
914
- const nextSnapshot = chunkMA2BI7LX_js.cloneHistorySnapshot(previousSnapshot);
915
- lastHistorySnapshotRef.current = chunkMA2BI7LX_js.cloneHistorySnapshot(nextSnapshot);
914
+ const nextSnapshot = chunkJAI42EXQ_js.cloneHistorySnapshot(previousSnapshot);
915
+ lastHistorySnapshotRef.current = chunkJAI42EXQ_js.cloneHistorySnapshot(nextSnapshot);
916
916
  lastHistorySerializedRef.current = serializeHistoryDocument(nextSnapshot);
917
917
  applyHistorySnapshot(nextSnapshot);
918
918
  updateHistoryAvailability();
@@ -933,8 +933,8 @@ function useEditorHistory(input) {
933
933
  const currentSnapshot = buildHistorySnapshot(nextSnapshot.actionLabel);
934
934
  historyPastRef.current.push(currentSnapshot);
935
935
  isApplyingHistoryRef.current = true;
936
- const targetSnapshot = chunkMA2BI7LX_js.cloneHistorySnapshot(nextSnapshot);
937
- lastHistorySnapshotRef.current = chunkMA2BI7LX_js.cloneHistorySnapshot(targetSnapshot);
936
+ const targetSnapshot = chunkJAI42EXQ_js.cloneHistorySnapshot(nextSnapshot);
937
+ lastHistorySnapshotRef.current = chunkJAI42EXQ_js.cloneHistorySnapshot(targetSnapshot);
938
938
  lastHistorySerializedRef.current = serializeHistoryDocument(targetSnapshot);
939
939
  applyHistorySnapshot(targetSnapshot);
940
940
  updateHistoryAvailability();
@@ -952,7 +952,7 @@ function useEditorHistory(input) {
952
952
  historyPastRef.current = [];
953
953
  historyFutureRef.current = [];
954
954
  if (initialSnapshot) {
955
- const clonedInitial = chunkMA2BI7LX_js.cloneHistorySnapshot(initialSnapshot);
955
+ const clonedInitial = chunkJAI42EXQ_js.cloneHistorySnapshot(initialSnapshot);
956
956
  lastHistorySnapshotRef.current = clonedInitial;
957
957
  lastHistorySerializedRef.current = serializeHistoryDocument(clonedInitial);
958
958
  } else {
@@ -1034,8 +1034,8 @@ function useEditorHistory(input) {
1034
1034
  updateHistoryAvailability
1035
1035
  ]);
1036
1036
  const commitSlides = (nextSlides, label, beforeSlides = slides) => {
1037
- const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunkMA2BI7LX_js.cloneSlide) };
1038
- const after = { ...before, slides: nextSlides.map(chunkMA2BI7LX_js.cloneSlide) };
1037
+ const before = { ...buildHistorySnapshot(), slides: beforeSlides.map(chunkJAI42EXQ_js.cloneSlide) };
1038
+ const after = { ...before, slides: nextSlides.map(chunkJAI42EXQ_js.cloneSlide) };
1039
1039
  recordExplicitSlideUpdate(
1040
1040
  historyPastRef.current,
1041
1041
  historyFutureRef.current,
@@ -1044,7 +1044,7 @@ function useEditorHistory(input) {
1044
1044
  label,
1045
1045
  maxHistoryEntries
1046
1046
  );
1047
- lastHistorySnapshotRef.current = chunkMA2BI7LX_js.cloneHistorySnapshot(after);
1047
+ lastHistorySnapshotRef.current = chunkJAI42EXQ_js.cloneHistorySnapshot(after);
1048
1048
  lastHistorySerializedRef.current = serializeHistoryDocument(after);
1049
1049
  isApplyingHistoryRef.current = false;
1050
1050
  setSlides(nextSlides);
@@ -1230,22 +1230,22 @@ function useZoomViewport({
1230
1230
  selectedElements.forEach((element) => {
1231
1231
  minX = Math.min(minX, element.x);
1232
1232
  minY = Math.min(minY, element.y);
1233
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE));
1234
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE));
1233
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE));
1234
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE));
1235
1235
  });
1236
1236
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
1237
1237
  return;
1238
1238
  }
1239
1239
  const selectionBounds = { minX, minY, maxX, maxY };
1240
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE);
1241
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE);
1240
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
1241
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
1242
1242
  const availableWidth = Math.max(
1243
- effectiveEditorDimensions.width - chunkMA2BI7LX_js.ZOOM_TO_SELECTION_PADDING,
1244
- chunkMA2BI7LX_js.MIN_ELEMENT_SIZE
1243
+ effectiveEditorDimensions.width - chunkJAI42EXQ_js.ZOOM_TO_SELECTION_PADDING,
1244
+ chunkJAI42EXQ_js.MIN_ELEMENT_SIZE
1245
1245
  );
1246
1246
  const availableHeight = Math.max(
1247
- effectiveEditorDimensions.height - chunkMA2BI7LX_js.ZOOM_TO_SELECTION_PADDING,
1248
- chunkMA2BI7LX_js.MIN_ELEMENT_SIZE
1247
+ effectiveEditorDimensions.height - chunkJAI42EXQ_js.ZOOM_TO_SELECTION_PADDING,
1248
+ chunkJAI42EXQ_js.MIN_ELEMENT_SIZE
1249
1249
  );
1250
1250
  const targetEditorScale = Math.min(
1251
1251
  availableWidth / boundsWidth,
@@ -4212,8 +4212,8 @@ function useViewerCoreState(_input) {
4212
4212
  const { slides, setSlides, slidesRef } = useSlideState();
4213
4213
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = React17.useState({});
4214
4214
  const [canvasSize, setCanvasSize] = React17.useState({
4215
- width: chunkMA2BI7LX_js.DEFAULT_CANVAS_WIDTH,
4216
- height: chunkMA2BI7LX_js.DEFAULT_CANVAS_HEIGHT
4215
+ width: chunkJAI42EXQ_js.DEFAULT_CANVAS_WIDTH,
4216
+ height: chunkJAI42EXQ_js.DEFAULT_CANVAS_HEIGHT
4217
4217
  });
4218
4218
  const [slideSizeEmu, setSlideSizeEmu] = React17.useState();
4219
4219
  const [activeSlideIndex, setActiveSlideIndex] = React17.useState(0);
@@ -4686,12 +4686,12 @@ function useLoadContent({
4686
4686
  }
4687
4687
  resources.commit();
4688
4688
  handlerRef.current = handler;
4689
- const partition = chunkMA2BI7LX_js.partitionTemplateElements(nextSlides);
4689
+ const partition = chunkJAI42EXQ_js.partitionTemplateElements(nextSlides);
4690
4690
  setSlides(partition.slides);
4691
4691
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
4692
4692
  setCanvasSize({
4693
- width: parsed.width ?? chunkMA2BI7LX_js.DEFAULT_CANVAS_WIDTH,
4694
- height: parsed.height ?? chunkMA2BI7LX_js.DEFAULT_CANVAS_HEIGHT
4693
+ width: parsed.width ?? chunkJAI42EXQ_js.DEFAULT_CANVAS_WIDTH,
4694
+ height: parsed.height ?? chunkJAI42EXQ_js.DEFAULT_CANVAS_HEIGHT
4695
4695
  });
4696
4696
  setSlideSizeEmu(
4697
4697
  typeof parsed.widthEmu === "number" && typeof parsed.heightEmu === "number" && parsed.widthEmu > 0 && parsed.heightEmu > 0 ? {
@@ -5150,7 +5150,7 @@ function useElementOperations(input) {
5150
5150
  );
5151
5151
  return;
5152
5152
  }
5153
- if (chunkMA2BI7LX_js.isTemplateElementId(elementId)) {
5153
+ if (chunkJAI42EXQ_js.isTemplateElementId(elementId)) {
5154
5154
  const slideId = activeSlide?.id;
5155
5155
  if (slideId) {
5156
5156
  setTemplateElementsBySlideId((prev) => ({
@@ -5390,15 +5390,15 @@ function syncSelectionHandleOverlay(elementNode, elementId, geometry) {
5390
5390
  // src/viewer/hooks/pointer-move-handlers.ts
5391
5391
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx, lockAspect = false) {
5392
5392
  const startBox = { x: startX, y: startY, width: startWidth, height: startHeight };
5393
- let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkMA2BI7LX_js.MIN_ELEMENT_SIZE });
5393
+ let resized = pptx.applyResize(startBox, handle, dx, dy, 1, { minSize: chunkJAI42EXQ_js.MIN_ELEMENT_SIZE });
5394
5394
  if (lockAspect) {
5395
- resized = pptx.lockResizeAspect(resized, startBox, handle, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE);
5395
+ resized = pptx.lockResizeAspect(resized, startBox, handle, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
5396
5396
  }
5397
5397
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
5398
5398
  if (!snapToGrid) {
5399
5399
  return box;
5400
5400
  }
5401
- return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE);
5401
+ return pptx.snapBoxToGrid(box, handle, gridSpacingPx, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
5402
5402
  }
5403
5403
  function resolveLiveTarget(input) {
5404
5404
  const { livePatcher, editTemplateMode, activeSlide } = input;
@@ -5511,7 +5511,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
5511
5511
  width: el.width,
5512
5512
  height: el.height
5513
5513
  }));
5514
- const snapResult = chunkMA2BI7LX_js.computeSnapToShape(
5514
+ const snapResult = chunkJAI42EXQ_js.computeSnapToShape(
5515
5515
  targetX,
5516
5516
  targetY,
5517
5517
  primaryEl.width,
@@ -5585,8 +5585,8 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
5585
5585
  rs.lastY = geo.y;
5586
5586
  rs.lastWidth = geo.width;
5587
5587
  rs.lastHeight = geo.height;
5588
- const width = Math.max(geo.width, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE);
5589
- const height = Math.max(geo.height, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE);
5588
+ const width = Math.max(geo.width, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
5589
+ const height = Math.max(geo.height, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE);
5590
5590
  if (rs.domEl) {
5591
5591
  rs.domEl.style.left = `${geo.x}px`;
5592
5592
  rs.domEl.style.top = `${geo.y}px`;
@@ -5679,13 +5679,13 @@ function processPointerUp(input) {
5679
5679
  if (i !== activeSlideIndex) {
5680
5680
  return s;
5681
5681
  }
5682
- const rerouted = chunkMA2BI7LX_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5682
+ const rerouted = chunkJAI42EXQ_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
5683
5683
  if (rerouted.length === 0) {
5684
5684
  return s;
5685
5685
  }
5686
5686
  return {
5687
5687
  ...s,
5688
- elements: chunkMA2BI7LX_js.applyReroutedConnectors(s.elements, rerouted)
5688
+ elements: chunkJAI42EXQ_js.applyReroutedConnectors(s.elements, rerouted)
5689
5689
  };
5690
5690
  })
5691
5691
  );
@@ -5737,8 +5737,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
5737
5737
  }
5738
5738
  return { ...el, x: start.x + dx, y: start.y + dy };
5739
5739
  });
5740
- const rerouted = chunkMA2BI7LX_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5741
- return chunkMA2BI7LX_js.applyReroutedConnectors(movedElements, rerouted);
5740
+ const rerouted = chunkJAI42EXQ_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
5741
+ return chunkJAI42EXQ_js.applyReroutedConnectors(movedElements, rerouted);
5742
5742
  };
5743
5743
  if (editTemplateMode) {
5744
5744
  const slideId = activeSlide?.id;
@@ -6497,7 +6497,7 @@ function createStructuredElementHandlers(deps) {
6497
6497
  return;
6498
6498
  }
6499
6499
  const resolved = resolveHyperlinkEditResult(data);
6500
- if (resolved.url && !chunkMA2BI7LX_js.isUrlSafe(resolved.url)) {
6500
+ if (resolved.url && !chunkJAI42EXQ_js.isUrlSafe(resolved.url)) {
6501
6501
  return;
6502
6502
  }
6503
6503
  const actionClick = {
@@ -6543,7 +6543,7 @@ function createStructuredElementHandlers(deps) {
6543
6543
  if (!activeSlide) {
6544
6544
  return;
6545
6545
  }
6546
- const preset = chunkMA2BI7LX_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6546
+ const preset = chunkJAI42EXQ_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
6547
6547
  if (!preset) {
6548
6548
  return;
6549
6549
  }
@@ -6630,7 +6630,7 @@ function useInsertElements(input) {
6630
6630
  width: 300,
6631
6631
  height: 60,
6632
6632
  text: "",
6633
- textStyle: { fontSize: chunkMA2BI7LX_js.DEFAULT_TEXT_FONT_SIZE }
6633
+ textStyle: { fontSize: chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE }
6634
6634
  });
6635
6635
  };
6636
6636
  const handleAddShape = () => {
@@ -6652,7 +6652,7 @@ function useInsertElements(input) {
6652
6652
  }
6653
6653
  });
6654
6654
  };
6655
- const handleAddTable = (rows = chunkMA2BI7LX_js.DEFAULT_TABLE_ROWS, columns = chunkMA2BI7LX_js.DEFAULT_TABLE_COLUMNS) => {
6655
+ const handleAddTable = (rows = chunkJAI42EXQ_js.DEFAULT_TABLE_ROWS, columns = chunkJAI42EXQ_js.DEFAULT_TABLE_COLUMNS) => {
6656
6656
  if (!activeSlide) {
6657
6657
  return;
6658
6658
  }
@@ -6826,7 +6826,7 @@ function useGroupAlignLayerHandlers(input) {
6826
6826
  history
6827
6827
  } = input;
6828
6828
  const updateElementsOwning = (elementId, updater) => {
6829
- if (editTemplateMode && !chunkMA2BI7LX_js.isTemplateElementId(elementId)) {
6829
+ if (editTemplateMode && !chunkJAI42EXQ_js.isTemplateElementId(elementId)) {
6830
6830
  ops.updateSlides(
6831
6831
  (prev) => prev.map(
6832
6832
  (slide, index) => index === activeSlideIndex ? { ...slide, elements: updater(slide.elements) } : slide
@@ -6860,9 +6860,9 @@ function useGroupAlignLayerHandlers(input) {
6860
6860
  return;
6861
6861
  }
6862
6862
  const group = selectedElement;
6863
- const intoTemplate = chunkMA2BI7LX_js.isTemplateElementId(group.id);
6863
+ const intoTemplate = chunkJAI42EXQ_js.isTemplateElementId(group.id);
6864
6864
  const childIds = group.children.map(
6865
- (child) => intoTemplate ? chunkMA2BI7LX_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6865
+ (child) => intoTemplate ? chunkJAI42EXQ_js.makeCloneId(true, child.id || group.id) : child.id || pptx.generateElementId()
6866
6866
  );
6867
6867
  const { elements, childIds: usedIds } = pptx.ungroupElements(
6868
6868
  ops.activeElements,
@@ -7298,7 +7298,7 @@ function createTableMergeHandlers(input) {
7298
7298
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
7299
7299
  return;
7300
7300
  }
7301
- const newTableData = chunkMA2BI7LX_js.mergeCells(
7301
+ const newTableData = chunkJAI42EXQ_js.mergeCells(
7302
7302
  [
7303
7303
  { row: rowIndex, col: columnIndex },
7304
7304
  { row: rowIndex, col: nextColIdx }
@@ -7306,7 +7306,7 @@ function createTableMergeHandlers(input) {
7306
7306
  td
7307
7307
  );
7308
7308
  const updates = { tableData: newTableData };
7309
- const newRawXml = chunkMA2BI7LX_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7309
+ const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7310
7310
  if (newRawXml) {
7311
7311
  updates.rawXml = newRawXml;
7312
7312
  }
@@ -7332,7 +7332,7 @@ function createTableMergeHandlers(input) {
7332
7332
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
7333
7333
  return;
7334
7334
  }
7335
- const newTableData = chunkMA2BI7LX_js.mergeCells(
7335
+ const newTableData = chunkJAI42EXQ_js.mergeCells(
7336
7336
  [
7337
7337
  { row: rowIndex, col: columnIndex },
7338
7338
  { row: targetNextRowIdx, col: columnIndex }
@@ -7340,7 +7340,7 @@ function createTableMergeHandlers(input) {
7340
7340
  td
7341
7341
  );
7342
7342
  const updates = { tableData: newTableData };
7343
- const newRawXml = chunkMA2BI7LX_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7343
+ const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7344
7344
  if (newRawXml) {
7345
7345
  updates.rawXml = newRawXml;
7346
7346
  }
@@ -7355,9 +7355,9 @@ function createTableMergeHandlers(input) {
7355
7355
  return;
7356
7356
  }
7357
7357
  const td = selectedElement.tableData;
7358
- const newTableData = chunkMA2BI7LX_js.mergeCells(ts.selectedCells, td);
7358
+ const newTableData = chunkJAI42EXQ_js.mergeCells(ts.selectedCells, td);
7359
7359
  const updates = { tableData: newTableData };
7360
- const newRawXml = chunkMA2BI7LX_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7360
+ const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7361
7361
  if (newRawXml) {
7362
7362
  updates.rawXml = newRawXml;
7363
7363
  }
@@ -7374,9 +7374,9 @@ function createTableMergeHandlers(input) {
7374
7374
  }
7375
7375
  const { rowIndex, columnIndex } = ts;
7376
7376
  const td = selectedElement.tableData;
7377
- const newTableData = chunkMA2BI7LX_js.splitCell(rowIndex, columnIndex, td);
7377
+ const newTableData = chunkJAI42EXQ_js.splitCell(rowIndex, columnIndex, td);
7378
7378
  const updates = { tableData: newTableData };
7379
- const newRawXml = chunkMA2BI7LX_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7379
+ const newRawXml = chunkJAI42EXQ_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
7380
7380
  if (newRawXml) {
7381
7381
  updates.rawXml = newRawXml;
7382
7382
  }
@@ -7411,7 +7411,7 @@ function createTableStructHandlers(input) {
7411
7411
  updates.tableData = pptx.setCellText(el, rowIndex, colIndex, text).tableData;
7412
7412
  }
7413
7413
  if (el.rawXml) {
7414
- const newRawXml = chunkMA2BI7LX_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7414
+ const newRawXml = chunkJAI42EXQ_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
7415
7415
  if (newRawXml) {
7416
7416
  updates.rawXml = newRawXml;
7417
7417
  }
@@ -7435,7 +7435,7 @@ function createTableStructHandlers(input) {
7435
7435
  const { rowIndex, columnIndex: colIndex } = ts;
7436
7436
  const updates = {};
7437
7437
  if (selectedElement.rawXml) {
7438
- const newRawXml = chunkMA2BI7LX_js.updateCellTextStyleInRawXml(
7438
+ const newRawXml = chunkJAI42EXQ_js.updateCellTextStyleInRawXml(
7439
7439
  selectedElement,
7440
7440
  rowIndex,
7441
7441
  colIndex,
@@ -7556,6 +7556,8 @@ async function renderToCanvas(element, options = {}) {
7556
7556
  const { default: html2canvasPro } = await import('html2canvas-pro');
7557
7557
  return html2canvasPro(element, {
7558
7558
  ...options,
7559
+ // Clone only the captured element's branch: html2canvas would copy the whole page.
7560
+ ignoreElements: pptx.html2canvasCaptureScope(element, options.ignoreElements),
7559
7561
  onclone: async (doc, clonedEl) => {
7560
7562
  await pptx.prepareHtml2CanvasClone(element, doc, clonedEl);
7561
7563
  if (typeof userOnClone === "function") {
@@ -7611,7 +7613,7 @@ function useExportSaveAs(input) {
7611
7613
  const sourceName = filePath ? filePath.replace(/\\/gu, "/").split("/").pop() : void 0;
7612
7614
  const slideSize = pptx.resolveSlideSizeSelection({ current: slideSizeEmu, canvas: canvasSize }).size;
7613
7615
  const data = {
7614
- slides: chunkMA2BI7LX_js.buildSaveSlides(slides, templateElementsBySlideId),
7616
+ slides: chunkJAI42EXQ_js.buildSaveSlides(slides, templateElementsBySlideId),
7615
7617
  width: canvasSize.width,
7616
7618
  height: canvasSize.height,
7617
7619
  widthEmu: slideSize.widthEmu,
@@ -7773,7 +7775,7 @@ async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActi
7773
7775
  }
7774
7776
  function tilesToPdfPage(tilesResult) {
7775
7777
  return tilesResult.tiles.map((tile) => ({
7776
- image: chunkMA2BI7LX_js.canvasToJpegData(tile.canvas),
7778
+ image: chunkJAI42EXQ_js.canvasToJpegData(tile.canvas),
7777
7779
  placement: pptx.placeTileOnPage(
7778
7780
  tile,
7779
7781
  tilesResult.fullWidth,
@@ -7806,7 +7808,7 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
7806
7808
  if (pages.length === 0) {
7807
7809
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesPdf"]);
7808
7810
  }
7809
- const pdfBlobUrl = chunkMA2BI7LX_js.buildPdfFromTiledImageData(pages);
7811
+ const pdfBlobUrl = chunkJAI42EXQ_js.buildPdfFromTiledImageData(pages);
7810
7812
  pptx.downloadDataUrl(pdfBlobUrl, filename);
7811
7813
  }
7812
7814
  async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, slideNotes, filename = "presentation-notes.pdf", options = {}) {
@@ -7836,7 +7838,7 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
7836
7838
  if (pages.length === 0) {
7837
7839
  throw new Error(i18n.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
7838
7840
  }
7839
- const pdfDataUrl = chunkMA2BI7LX_js.buildNotesPdf(pages);
7841
+ const pdfDataUrl = chunkJAI42EXQ_js.buildNotesPdf(pages);
7840
7842
  pptx.downloadDataUrl(pdfDataUrl, filename);
7841
7843
  }
7842
7844
  async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
@@ -8939,7 +8941,7 @@ function usePropertyHandlers(input) {
8939
8941
  width: canvasSize.width,
8940
8942
  height: canvasSize.height
8941
8943
  };
8942
- setCompareResult(chunkMA2BI7LX_js.comparePresentation(cur, other));
8944
+ setCompareResult(chunkJAI42EXQ_js.comparePresentation(cur, other));
8943
8945
  setIsComparePanelOpen(true);
8944
8946
  } catch (err) {
8945
8947
  console.warn("Compare failed:", err);
@@ -9292,7 +9294,7 @@ function useViewerDialogs(input) {
9292
9294
  };
9293
9295
  }
9294
9296
  function computeGridSpacingPx(documentGridSpacing) {
9295
- return pptx.computeGridSpacingPx(documentGridSpacing, chunkMA2BI7LX_js.GRID_SIZE);
9297
+ return pptx.computeGridSpacingPx(documentGridSpacing, chunkJAI42EXQ_js.GRID_SIZE);
9296
9298
  }
9297
9299
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, presentationProperties) {
9298
9300
  const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
@@ -9301,7 +9303,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows, pre
9301
9303
  }
9302
9304
  function computeSlideSectionGroups(slides, sections) {
9303
9305
  return pptx.groupSlidesBySection(sections, slides).map((group) => ({
9304
- id: group.section?.id ?? (sections.length > 0 ? chunkMA2BI7LX_js.UNGROUPED_SECTION_ID : chunkMA2BI7LX_js.DEFAULT_SECTION_GROUP_ID),
9306
+ id: group.section?.id ?? (sections.length > 0 ? chunkJAI42EXQ_js.UNGROUPED_SECTION_ID : chunkJAI42EXQ_js.DEFAULT_SECTION_GROUP_ID),
9305
9307
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
9306
9308
  slideIndexes: group.slideIndexes,
9307
9309
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -9346,10 +9348,10 @@ function useDerivedSlideState(input) {
9346
9348
  );
9347
9349
  const slideSectionGroups = React17.useMemo(
9348
9350
  () => computeSlideSectionGroups(slides, sections).map((group) => {
9349
- if (group.id === chunkMA2BI7LX_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9351
+ if (group.id === chunkJAI42EXQ_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
9350
9352
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
9351
9353
  }
9352
- if (group.id === chunkMA2BI7LX_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9354
+ if (group.id === chunkJAI42EXQ_js.DEFAULT_SECTION_GROUP_ID && group.label === "Slides") {
9353
9355
  return { ...group, label: t("pptx.sections.slides") };
9354
9356
  }
9355
9357
  return group;
@@ -9456,7 +9458,7 @@ function useAnnotationHandlers(input) {
9456
9458
  if (nextMode === "present") {
9457
9459
  presentation.enterPresentMode();
9458
9460
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
9459
- chunkMA2BI7LX_js.stopAllPersistentAudio();
9461
+ chunkJAI42EXQ_js.stopAllPersistentAudio();
9460
9462
  if (promptKeepInkAnnotations) {
9461
9463
  pendingModeAfterAnnotationsRef.current = nextMode;
9462
9464
  setShowKeepAnnotationsDialog(true);
@@ -9466,7 +9468,7 @@ function useAnnotationHandlers(input) {
9466
9468
  }
9467
9469
  } else {
9468
9470
  if (mode === "present") {
9469
- chunkMA2BI7LX_js.stopAllPersistentAudio();
9471
+ chunkJAI42EXQ_js.stopAllPersistentAudio();
9470
9472
  }
9471
9473
  setMode(nextMode);
9472
9474
  }
@@ -9633,7 +9635,7 @@ function useSerialize(input) {
9633
9635
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
9634
9636
  };
9635
9637
  });
9636
- const slidesToSave = chunkMA2BI7LX_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9638
+ const slidesToSave = chunkJAI42EXQ_js.buildSaveSlides(slidesWithGuides, pending.templateElementsBySlideId);
9637
9639
  const saveOptions = pptx.buildDeckSaveOptions({
9638
9640
  // Without this the Slide Size card edited a viewer-only pixel value and
9639
9641
  // the saved `p:sldSz` never moved: passing `slideSize` is the only way a
@@ -9826,7 +9828,7 @@ function usePresentationSetup(input) {
9826
9828
  return;
9827
9829
  }
9828
9830
  if (mode === "present" && nextMode !== "present") {
9829
- chunkMA2BI7LX_js.stopAllPersistentAudio();
9831
+ chunkJAI42EXQ_js.stopAllPersistentAudio();
9830
9832
  stopAnimationSound();
9831
9833
  const exitHandler = exitModeHandlerRef.current;
9832
9834
  if (exitHandler) {
@@ -9947,7 +9949,7 @@ function useCanvasImagePaste(input) {
9947
9949
  );
9948
9950
  }
9949
9951
  function formatPatchFor(element, format) {
9950
- const updated = chunkMA2BI7LX_js.applyFormatToElement(element, format);
9952
+ const updated = chunkJAI42EXQ_js.applyFormatToElement(element, format);
9951
9953
  const updates = {};
9952
9954
  if (pptx$1.hasShapeProperties(updated)) {
9953
9955
  updates.shapeStyle = updated.shapeStyle;
@@ -9970,7 +9972,7 @@ function useFormatPainterEditing(input) {
9970
9972
  const prevFormatPainterRef = React17.useRef(false);
9971
9973
  React17.useEffect(() => {
9972
9974
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
9973
- copiedFormatRef.current = chunkMA2BI7LX_js.copyFormatFromElement(selectedElement);
9975
+ copiedFormatRef.current = chunkJAI42EXQ_js.copyFormatFromElement(selectedElement);
9974
9976
  } else if (!formatPainterActive) {
9975
9977
  copiedFormatRef.current = null;
9976
9978
  }
@@ -11662,7 +11664,7 @@ function useCollaborationWriteBack(input) {
11662
11664
  getSourceBytes: () => latest.current.getSourceBytes?.() ?? null,
11663
11665
  getSaveOptions: () => latest.current.getSaveOptions?.(),
11664
11666
  getTemplateElements: () => latest.current.templateElementsBySlideId,
11665
- mergeTemplateElements: chunkMA2BI7LX_js.buildSaveSlides,
11667
+ mergeTemplateElements: chunkJAI42EXQ_js.buildSaveSlides,
11666
11668
  onWriteBackStatus: () => latest.current.onWriteBackStatus?.(
11667
11669
  pptx.writeBackReport(latest.current.config, created.getState())
11668
11670
  )
@@ -12221,8 +12223,8 @@ function useTouchGestures(input) {
12221
12223
  }
12222
12224
  const recognizer = pptx.createTouchGestureRecognizer({
12223
12225
  getScale: () => scaleRef.current,
12224
- minScale: chunkMA2BI7LX_js.MIN_ZOOM_SCALE,
12225
- maxScale: chunkMA2BI7LX_js.MAX_ZOOM_SCALE,
12226
+ minScale: chunkJAI42EXQ_js.MIN_ZOOM_SCALE,
12227
+ maxScale: chunkJAI42EXQ_js.MAX_ZOOM_SCALE,
12226
12228
  callbacks: {
12227
12229
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
12228
12230
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -12346,7 +12348,7 @@ function buildCanvasProps(input) {
12346
12348
  if (pptx.shouldConfirmExternalHyperlink(viewerOptions, url) && !window.confirm(buildHyperlinkConfirmMessage(url))) {
12347
12349
  return;
12348
12350
  }
12349
- chunkMA2BI7LX_js.safeOpenUrl(url, target);
12351
+ chunkJAI42EXQ_js.safeOpenUrl(url, target);
12350
12352
  };
12351
12353
  const handleActionClick = (elementId, action) => {
12352
12354
  if (mode === "present") {
@@ -12361,9 +12363,9 @@ function buildCanvasProps(input) {
12361
12363
  }
12362
12364
  };
12363
12365
  const handleHyperlinkClick = (url, target) => {
12364
- if (chunkMA2BI7LX_js.isPpactionUrl(url)) {
12366
+ if (chunkJAI42EXQ_js.isPpactionUrl(url)) {
12365
12367
  if (mode === "present") {
12366
- const parsed = chunkMA2BI7LX_js.parsePpactionUrl(url);
12368
+ const parsed = chunkJAI42EXQ_js.parsePpactionUrl(url);
12367
12369
  if (parsed) {
12368
12370
  presentation.handlePresentationAction({
12369
12371
  action: parsed.action,
@@ -12790,7 +12792,7 @@ function buildToolbarProps(input) {
12790
12792
  markDirty: history.markDirty
12791
12793
  }),
12792
12794
  formatPainterActive: s.formatPainterActive,
12793
- canActivateFormatPainter: chunkMA2BI7LX_js.hasCopyableFormat(selectedElement),
12795
+ canActivateFormatPainter: chunkJAI42EXQ_js.hasCopyableFormat(selectedElement),
12794
12796
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
12795
12797
  isSelectionPaneOpen: s.isSelectionPaneOpen,
12796
12798
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -13183,73 +13185,47 @@ function useReadOnlyRecommendationState(content) {
13183
13185
  () => pptx.readOnlyRecommendation(void 0)
13184
13186
  );
13185
13187
  const [modifyVerifier, setModifyVerifier] = React17.useState(void 0);
13186
- const [bannerHidden, setBannerHidden] = React17.useState(false);
13187
- const [editAnywayActive, setEditAnywayActive] = React17.useState(false);
13188
- const [passwordPromptOpen, setPasswordPromptOpen] = React17.useState(false);
13189
- const [passwordError, setPasswordError] = React17.useState(null);
13190
- const [checkingPassword, setCheckingPassword] = React17.useState(false);
13191
- React17.useEffect(() => {
13192
- setBannerHidden(false);
13193
- setEditAnywayActive(false);
13194
- setPasswordPromptOpen(false);
13195
- setPasswordError(null);
13196
- setCheckingPassword(false);
13197
- }, [content]);
13198
- const unlock = React17.useCallback(() => {
13199
- setEditAnywayActive(true);
13200
- setBannerHidden(true);
13201
- setPasswordPromptOpen(false);
13202
- setPasswordError(null);
13203
- }, []);
13204
- const editAnyway = React17.useCallback(() => {
13205
- if (recommendation.requiresPassword) {
13206
- setPasswordPromptOpen(true);
13207
- setPasswordError(null);
13208
- return;
13209
- }
13210
- unlock();
13211
- }, [recommendation.requiresPassword, unlock]);
13212
- const dismiss = React17.useCallback(() => {
13213
- setBannerHidden(true);
13214
- }, []);
13215
- const cancelPasswordPrompt = React17.useCallback(() => {
13216
- setPasswordPromptOpen(false);
13217
- setPasswordError(null);
13218
- }, []);
13219
- const submitPassword = React17.useCallback(
13220
- async (password) => {
13221
- setCheckingPassword(true);
13222
- try {
13223
- const result = await pptx.checkModifyPassword(modifyVerifier, password);
13224
- if (result.ok) {
13225
- unlock();
13226
- } else {
13227
- setPasswordError(result.reason);
13228
- }
13229
- } finally {
13230
- setCheckingPassword(false);
13188
+ const [session, setSession] = React17.useState(pptx.INITIAL_READ_ONLY_SESSION);
13189
+ const latestSession = React17.useRef(session);
13190
+ const store = React17.useMemo(
13191
+ () => ({
13192
+ get: () => latestSession.current,
13193
+ set: (next) => {
13194
+ latestSession.current = next;
13195
+ setSession(next);
13231
13196
  }
13232
- },
13233
- // oxlint-disable-next-line react/memo-dependencies -- see comment above
13234
- [modifyVerifier, unlock]
13197
+ }),
13198
+ []
13199
+ );
13200
+ const actions = React17.useMemo(
13201
+ () => pptx.readOnlySessionActions(store, {
13202
+ recommendation: () => recommendation,
13203
+ modifyVerifier: () => modifyVerifier
13204
+ }),
13205
+ [store, recommendation, modifyVerifier]
13235
13206
  );
13207
+ React17.useEffect(() => {
13208
+ pptx.applyReadOnlySessionEvent(store, { type: "reset" });
13209
+ }, [content, store]);
13236
13210
  return {
13237
13211
  recommendation,
13238
13212
  setRecommendation,
13239
13213
  setModifyVerifier,
13240
13214
  /** Whether the viewer's `canEdit` should be forced off. */
13241
- locked: recommendation.defaultReadOnly && !editAnywayActive,
13242
- bannerVisible: recommendation.kind !== null && !bannerHidden,
13243
- editAnyway,
13244
- dismiss,
13215
+ locked: pptx.readOnlyLocked(recommendation, session),
13216
+ bannerVisible: pptx.readOnlyBannerVisible(recommendation, session),
13217
+ /** The banner's "Edit anyway": opens the password prompt when one is required, else unlocks. */
13218
+ editAnyway: actions.editAnyway,
13219
+ dismiss: actions.dismiss,
13245
13220
  /** Whether the inline password prompt should render in place of the banner's buttons. */
13246
- passwordPromptOpen,
13221
+ passwordPromptOpen: session.passwordPromptOpen,
13247
13222
  /** Reason the last password attempt failed, or null before any attempt / after success. */
13248
- passwordError,
13223
+ passwordError: session.passwordError,
13249
13224
  /** True while `submitPassword`'s check is in flight (disables the form). */
13250
- checkingPassword,
13251
- submitPassword,
13252
- cancelPasswordPrompt
13225
+ checkingPassword: session.checkingPassword,
13226
+ /** Check `password` against the deck's `modifyVerifier`; unlocks on a match. */
13227
+ submitPassword: actions.submitPassword,
13228
+ cancelPasswordPrompt: actions.cancelPassword
13253
13229
  };
13254
13230
  }
13255
13231
  function useViewPreferencesSync(input) {
@@ -13694,23 +13670,23 @@ function ColorChangedImage({
13694
13670
  className,
13695
13671
  alt
13696
13672
  }) {
13697
- const tolerance = tolerancePct ?? chunkMA2BI7LX_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13698
- const cacheKey = chunkMA2BI7LX_js.buildCacheKey(
13673
+ const tolerance = tolerancePct ?? chunkJAI42EXQ_js.DEFAULT_COLOR_CHANGE_TOLERANCE;
13674
+ const cacheKey = chunkJAI42EXQ_js.buildCacheKey(
13699
13675
  src,
13700
13676
  clrChange.clrFrom,
13701
13677
  clrChange.clrTo,
13702
13678
  tolerance,
13703
13679
  Boolean(clrChange.clrToTransparent)
13704
13680
  );
13705
- const cached = chunkMA2BI7LX_js.getCachedResult(cacheKey);
13681
+ const cached = chunkJAI42EXQ_js.getCachedResult(cacheKey);
13706
13682
  const [processedSrc, setProcessedSrc] = React17.useState(cached ?? null);
13707
13683
  React17.useEffect(() => {
13708
- if (chunkMA2BI7LX_js.getCachedResult(cacheKey)) {
13709
- setProcessedSrc(chunkMA2BI7LX_js.getCachedResult(cacheKey) ?? null);
13684
+ if (chunkJAI42EXQ_js.getCachedResult(cacheKey)) {
13685
+ setProcessedSrc(chunkJAI42EXQ_js.getCachedResult(cacheKey) ?? null);
13710
13686
  return;
13711
13687
  }
13712
13688
  let cancelled = false;
13713
- chunkMA2BI7LX_js.applyColorChange(
13689
+ chunkJAI42EXQ_js.applyColorChange(
13714
13690
  src,
13715
13691
  clrChange.clrFrom,
13716
13692
  clrChange.clrTo,
@@ -13718,7 +13694,7 @@ function ColorChangedImage({
13718
13694
  Boolean(clrChange.clrToTransparent)
13719
13695
  ).then((result) => {
13720
13696
  if (!cancelled) {
13721
- chunkMA2BI7LX_js.setCachedResult(cacheKey, result.dataUrl);
13697
+ chunkJAI42EXQ_js.setCachedResult(cacheKey, result.dataUrl);
13722
13698
  setProcessedSrc(result.dataUrl);
13723
13699
  }
13724
13700
  return void 0;
@@ -13810,7 +13786,7 @@ function TiledImageLayer({
13810
13786
  cancelled = true;
13811
13787
  };
13812
13788
  }, [src]);
13813
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkMA2BI7LX_js.getImageTilingStyle(element, nativeSize), ...style } });
13789
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className, style: { ...chunkJAI42EXQ_js.getImageTilingStyle(element, nativeSize), ...style } });
13814
13790
  }
13815
13791
  function renderImageEffectDefinitions(element, excludeDuotone = false) {
13816
13792
  return pptx.getImageSvgFilters(element).filter((definition) => !excludeDuotone || definition.id !== `duotone-${element.id}`).map((definition) => /* @__PURE__ */ jsxRuntime.jsx(
@@ -13879,7 +13855,7 @@ function renderImg(el, style, filter, alt, opacity) {
13879
13855
  ...filter ? { filter } : {},
13880
13856
  ...opacity !== void 0 ? { opacity } : {}
13881
13857
  };
13882
- if (chunkMA2BI7LX_js.isImageTiled(el)) {
13858
+ if (chunkJAI42EXQ_js.isImageTiled(el)) {
13883
13859
  const tileSrc = imgSrc(el);
13884
13860
  if (!tileSrc) {
13885
13861
  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" });
@@ -13901,9 +13877,9 @@ function renderImg(el, style, filter, alt, opacity) {
13901
13877
  pptx$1.isImageLikeElement(el) ? el.imageEffects?.colorWash : void 0
13902
13878
  );
13903
13879
  const clrChange = "imageEffects" in el ? el.imageEffects?.clrChange : void 0;
13904
- const duotoneColors = chunkMA2BI7LX_js.getDuotoneColors(el);
13880
+ const duotoneColors = chunkJAI42EXQ_js.getDuotoneColors(el);
13905
13881
  const useDuotoneCanvas = Boolean(duotoneColors && !clrChange);
13906
- const filterForImg = useDuotoneCanvas ? chunkMA2BI7LX_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13882
+ const filterForImg = useDuotoneCanvas ? chunkJAI42EXQ_js.getImageEffectsFilter(el, { excludeDuotone: true }) : filter;
13907
13883
  const canvasEffectStyles = {
13908
13884
  ...filterForImg ? { filter: filterForImg } : {},
13909
13885
  ...opacity !== void 0 ? { opacity } : {}
@@ -13979,10 +13955,10 @@ function SlideBackgroundImageLayer({
13979
13955
  style: { zIndex: 0 },
13980
13956
  children: renderImg(
13981
13957
  backgroundElement,
13982
- chunkMA2BI7LX_js.getImageRenderStyle(backgroundElement),
13983
- chunkMA2BI7LX_js.getImageEffectsFilter(backgroundElement),
13958
+ chunkJAI42EXQ_js.getImageRenderStyle(backgroundElement),
13959
+ chunkJAI42EXQ_js.getImageEffectsFilter(backgroundElement),
13984
13960
  "",
13985
- chunkMA2BI7LX_js.getImageEffectsOpacity(backgroundElement)
13961
+ chunkJAI42EXQ_js.getImageEffectsOpacity(backgroundElement)
13986
13962
  )
13987
13963
  }
13988
13964
  );
@@ -14268,7 +14244,7 @@ function ChartElementView({
14268
14244
  pptx.getBarFacePicturePixelSampleVersion
14269
14245
  );
14270
14246
  const viewModel = React17.useMemo(() => {
14271
- return canEdit ? chunkMA2BI7LX_js.buildReactChartViewModel(element) : null;
14247
+ return canEdit ? chunkJAI42EXQ_js.buildReactChartViewModel(element) : null;
14272
14248
  }, [canEdit, element, barFacePictureSampleVersion]);
14273
14249
  React17.useEffect(pptx.ensureChartInteractionStyles, []);
14274
14250
  React17.useEffect(() => {
@@ -14373,9 +14349,9 @@ function ChartElementView({
14373
14349
  textStyle: animationState?.textStyle,
14374
14350
  onSelect: chart3D.onSelect,
14375
14351
  onDrag: chart3D.onDrag,
14376
- children: chunkMA2BI7LX_js.renderChartElement(renderedElement, (key) => t(key))
14352
+ children: chunkJAI42EXQ_js.renderChartElement(renderedElement, (key) => t(key))
14377
14353
  }
14378
- ) : chunkMA2BI7LX_js.renderChartElement(renderedElement, (key) => t(key)),
14354
+ ) : chunkJAI42EXQ_js.renderChartElement(renderedElement, (key) => t(key)),
14379
14355
  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) }),
14380
14356
  titleDraft !== null && /* @__PURE__ */ jsxRuntime.jsx(
14381
14357
  "input",
@@ -14705,7 +14681,7 @@ function ResizeHandles({
14705
14681
  "aria-label": t("pptx.selectionOverlay.resize", { handle }),
14706
14682
  "data-pptx-handle-kind": "resize",
14707
14683
  "data-pptx-compact": true,
14708
- className: chunkMA2BI7LX_js.cn(
14684
+ className: chunkJAI42EXQ_js.cn(
14709
14685
  "absolute z-10 group border-0 bg-transparent p-0",
14710
14686
  RESIZE_DEFAULT_CLASSES,
14711
14687
  posClass,
@@ -14731,7 +14707,7 @@ function ResizeHandles({
14731
14707
  "div",
14732
14708
  {
14733
14709
  "data-pptx-handle-hit": true,
14734
- className: chunkMA2BI7LX_js.cn(
14710
+ className: chunkJAI42EXQ_js.cn(
14735
14711
  "absolute -inset-px pointer-events-auto [--pptx-handle-hit-inset:-1px]",
14736
14712
  corner ? "max-md:-inset-1.5 max-md:[--pptx-handle-hit-inset:-6px]" : "max-md:-inset-2 max-md:[--pptx-handle-hit-inset:-8px]"
14737
14713
  ),
@@ -14752,7 +14728,7 @@ function ResizeHandles({
14752
14728
  "aria-label": t("pptx.selectionOverlay.rotate"),
14753
14729
  "data-pptx-handle-kind": "rotate",
14754
14730
  "data-pptx-compact": true,
14755
- className: chunkMA2BI7LX_js.cn(
14731
+ className: chunkJAI42EXQ_js.cn(
14756
14732
  "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",
14757
14733
  ROTATE_DEFAULT_CLASSES
14758
14734
  ),
@@ -14829,10 +14805,10 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14829
14805
  const svgHeight = Math.max(el.height, 1);
14830
14806
  const ss = shapeEl?.shapeStyle;
14831
14807
  const strokeWidth = Math.max(0, ss?.strokeWidth ?? 2);
14832
- const strokeColor = chunkMA2BI7LX_js.normalizeHexColor(ss?.strokeColor, chunkMA2BI7LX_js.DEFAULT_STROKE_COLOR);
14833
- const strokePaint = chunkMA2BI7LX_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14834
- const dashType = chunkMA2BI7LX_js.normalizeStrokeDashType(ss?.strokeDash);
14835
- const dashArray = chunkMA2BI7LX_js.getSvgStrokeDasharray(
14808
+ const strokeColor = chunkJAI42EXQ_js.normalizeHexColor(ss?.strokeColor, chunkJAI42EXQ_js.DEFAULT_STROKE_COLOR);
14809
+ const strokePaint = chunkJAI42EXQ_js.colorWithOpacity(strokeColor, ss?.strokeOpacity);
14810
+ const dashType = chunkJAI42EXQ_js.normalizeStrokeDashType(ss?.strokeDash);
14811
+ const dashArray = chunkJAI42EXQ_js.getSvgStrokeDasharray(
14836
14812
  dashType,
14837
14813
  Math.max(strokeWidth, 1),
14838
14814
  ss?.customDashSegments
@@ -14843,14 +14819,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14843
14819
  const markerSeed = el.id.replace(/[^a-zA-Z0-9_-]/gu, "_");
14844
14820
  const startMarkerId = `${markerSeed}-sel-start`;
14845
14821
  const endMarkerId = `${markerSeed}-sel-end`;
14846
- const compoundOffsets = chunkMA2BI7LX_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14847
- const compoundWidths = chunkMA2BI7LX_js.getCompoundLineWidths(compoundLine, strokeWidth);
14822
+ const compoundOffsets = chunkJAI42EXQ_js.getCompoundLineOffsets(compoundLine, strokeWidth);
14823
+ const compoundWidths = chunkJAI42EXQ_js.getCompoundLineWidths(compoundLine, strokeWidth);
14848
14824
  const strokeCap = pptx.svgLineCap(ss?.lineCap);
14849
14825
  const textEl = pptx$1.hasTextProperties(el) ? el : void 0;
14850
14826
  const connectorText = textEl?.text?.trim() ?? "";
14851
14827
  const connectorTextSegments = textEl?.textSegments;
14852
14828
  const connectorTextStyle = textEl?.textStyle;
14853
- const pathGeometry = shapeEl ? chunkMA2BI7LX_js.getConnectorPathGeometry(shapeEl) : {
14829
+ const pathGeometry = shapeEl ? chunkJAI42EXQ_js.getConnectorPathGeometry(shapeEl) : {
14854
14830
  pathData: `M 0 0 L ${viewWidth} ${viewHeight}`,
14855
14831
  startX: 0,
14856
14832
  startY: 0,
@@ -14859,16 +14835,16 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14859
14835
  };
14860
14836
  const hitTargetWidth = Math.max(strokeWidth * 3, 14);
14861
14837
  const selColor = selClr === "blue-400" ? "#60a5fa" : "#3b82f6";
14862
- const lineShadow = chunkMA2BI7LX_js.buildLineShadowCss(el);
14863
- const lineGlow = chunkMA2BI7LX_js.buildLineGlowFilter(el);
14838
+ const lineShadow = chunkJAI42EXQ_js.buildLineShadowCss(el);
14839
+ const lineGlow = chunkJAI42EXQ_js.buildLineGlowFilter(el);
14864
14840
  return /* @__PURE__ */ jsxRuntime.jsxs(
14865
14841
  "div",
14866
14842
  {
14867
14843
  "data-pptx-element": "true",
14868
14844
  "data-element-id": el.id,
14869
- role: chunkMA2BI7LX_js.getAriaRole(el, { actionable: false }),
14870
- "aria-label": chunkMA2BI7LX_js.getAriaLabel(el),
14871
- "aria-roledescription": chunkMA2BI7LX_js.getAriaRoleDescription(el),
14845
+ role: chunkJAI42EXQ_js.getAriaRole(el, { actionable: false }),
14846
+ "aria-label": chunkJAI42EXQ_js.getAriaLabel(el),
14847
+ "aria-roledescription": chunkJAI42EXQ_js.getAriaRoleDescription(el),
14872
14848
  "aria-selected": isSelected ? true : void 0,
14873
14849
  className: "absolute",
14874
14850
  style: {
@@ -14901,14 +14877,14 @@ var ConnectorElementRendererMemo = /* @__PURE__ */ React17__default.default.memo
14901
14877
  style: { overflow: "visible", pointerEvents: "none" },
14902
14878
  children: [
14903
14879
  /* @__PURE__ */ jsxRuntime.jsxs("defs", { children: [
14904
- chunkMA2BI7LX_js.renderConnectorMarker(
14880
+ chunkJAI42EXQ_js.renderConnectorMarker(
14905
14881
  startMarkerId,
14906
14882
  startArrow,
14907
14883
  strokePaint,
14908
14884
  ss?.connectorStartArrowWidth,
14909
14885
  ss?.connectorStartArrowLength
14910
14886
  ),
14911
- chunkMA2BI7LX_js.renderConnectorMarker(
14887
+ chunkJAI42EXQ_js.renderConnectorMarker(
14912
14888
  endMarkerId,
14913
14889
  endArrow,
14914
14890
  strokePaint,
@@ -15117,14 +15093,14 @@ function getElementInteractionProps({
15117
15093
  };
15118
15094
  }
15119
15095
  function renderDagDuotoneFilterForElement(el) {
15120
- if (!chunkMA2BI7LX_js.hasDagDuotoneEffect(el)) {
15096
+ if (!chunkJAI42EXQ_js.hasDagDuotoneEffect(el)) {
15121
15097
  return null;
15122
15098
  }
15123
15099
  const duotone = el.shapeStyle?.dagDuotone;
15124
15100
  if (!duotone) {
15125
15101
  return null;
15126
15102
  }
15127
- return chunkMA2BI7LX_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
15103
+ return chunkJAI42EXQ_js.renderDagDuotoneSvgFilter(el.id, duotone.color1, duotone.color2);
15128
15104
  }
15129
15105
  function getContainerStyle({
15130
15106
  el,
@@ -15151,10 +15127,10 @@ function getContainerStyle({
15151
15127
  top: isFullscreenMedia ? fs.top : el.y,
15152
15128
  width: isFullscreenMedia ? fs.width : painted.width,
15153
15129
  ...heightStyle,
15154
- transform: isFullscreenMedia ? fs.transform : chunkMA2BI7LX_js.getElementTransform(el),
15130
+ transform: isFullscreenMedia ? fs.transform : chunkJAI42EXQ_js.getElementTransform(el),
15155
15131
  transformOrigin: "center",
15156
15132
  overflow: overflowValue,
15157
- clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkMA2BI7LX_js.getCropShapeClipPath(el) : void 0,
15133
+ clipPath: isPicture ? void 0 : isImg && !has3DExtrusion ? chunkJAI42EXQ_js.getCropShapeClipPath(el) : void 0,
15158
15134
  zIndex: isFullscreenMedia ? fs.zIndex : zIndex,
15159
15135
  visibility: animationState?.visible === false ? "hidden" : "visible",
15160
15136
  animation: animationState?.cssAnimation,
@@ -15191,9 +15167,9 @@ function getContainerStyle({
15191
15167
  function shapeParams(element) {
15192
15168
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
15193
15169
  const strokeWidth = pptx.paintedStrokeWidth(style);
15194
- const strokeColor = chunkMA2BI7LX_js.normalizeHexColor(style?.strokeColor, chunkMA2BI7LX_js.DEFAULT_STROKE_COLOR);
15195
- const fillColor = chunkMA2BI7LX_js.normalizeHexColor(style?.fillColor, chunkMA2BI7LX_js.DEFAULT_FILL_COLOR);
15196
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkMA2BI7LX_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
15170
+ const strokeColor = chunkJAI42EXQ_js.normalizeHexColor(style?.strokeColor, chunkJAI42EXQ_js.DEFAULT_STROKE_COLOR);
15171
+ const fillColor = chunkJAI42EXQ_js.normalizeHexColor(style?.fillColor, chunkJAI42EXQ_js.DEFAULT_FILL_COLOR);
15172
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkJAI42EXQ_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
15197
15173
  return { hf: hasFill, fc: fillColor, sw: strokeWidth, sc: strokeColor };
15198
15174
  }
15199
15175
  var Extrusion3DOverlayMemo = /* @__PURE__ */ React17__default.default.memo(
@@ -15301,7 +15277,7 @@ function ShapeEffectOverlay({
15301
15277
  const fillOverlayStyle = overlay ? {
15302
15278
  position: "absolute",
15303
15279
  inset: 0,
15304
- ...pptx$1.isImageLikeElement(element) ? chunkMA2BI7LX_js.getImageSurfaceMaskStyle(element) : {},
15280
+ ...pptx$1.isImageLikeElement(element) ? chunkJAI42EXQ_js.getImageSurfaceMaskStyle(element) : {},
15305
15281
  background: overlay.color,
15306
15282
  mixBlendMode: overlay.blendMode,
15307
15283
  pointerEvents: "none"
@@ -15508,10 +15484,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15508
15484
  const backgroundAnimationState = pptx.getBackgroundAnimationState(el, presentationElementStates);
15509
15485
  const effectPlacement = pptx.getShapeEffectLayerPlacement(el);
15510
15486
  const visualAnimationState = backgroundAnimationState ?? animationState;
15511
- const isTxt = chunkMA2BI7LX_js.isEditableTextElement(el) && allow.textEditable;
15487
+ const isTxt = chunkJAI42EXQ_js.isEditableTextElement(el) && allow.textEditable;
15512
15488
  const txtSE = pptx$1.hasTextProperties(el) ? el.textStyle : void 0;
15513
15489
  const textStyleOverrideCss = pptx.buildTextStyleOverrideCss(el.id, visualAnimationState?.textStyle);
15514
- const ss = chunkMA2BI7LX_js.getShapeVisualStyle(
15490
+ const ss = chunkJAI42EXQ_js.getShapeVisualStyle(
15515
15491
  el,
15516
15492
  hf,
15517
15493
  fc,
@@ -15520,9 +15496,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15520
15496
  visualAnimationState?.animatesFill,
15521
15497
  visualAnimationState?.animatesStroke
15522
15498
  );
15523
- const ts = chunkMA2BI7LX_js.getTextStyleForElement(el, chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR);
15499
+ const ts = chunkJAI42EXQ_js.getTextStyleForElement(el, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR);
15524
15500
  const isImg = el.type === "picture" || el.type === "image";
15525
- const vs = chunkMA2BI7LX_js.renderVectorShape(
15501
+ const vs = chunkJAI42EXQ_js.renderVectorShape(
15526
15502
  el,
15527
15503
  isImg ? false : hf,
15528
15504
  fc,
@@ -15532,10 +15508,10 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15532
15508
  visualAnimationState?.animatesStroke
15533
15509
  );
15534
15510
  const isModel3D = el.type === "model3d";
15535
- const isConn = chunkMA2BI7LX_js.isConnectorOrLineElement(el);
15511
+ const isConn = chunkJAI42EXQ_js.isConnectorOrLineElement(el);
15536
15512
  const shapeStyle3d = pptx$1.hasShapeProperties(el) ? el.shapeStyle : void 0;
15537
15513
  const extrusionData = React17.useMemo(
15538
- () => chunkMA2BI7LX_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15514
+ () => chunkJAI42EXQ_js.build3DExtrusionData(shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height),
15539
15515
  [shapeStyle3d?.shape3d, shapeStyle3d?.scene3d, fc, el.width, el.height]
15540
15516
  );
15541
15517
  const actionAffordance = useActionAffordance(el, canInteract);
@@ -15625,7 +15601,7 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15625
15601
  "aria-hidden": aria.hidden ? true : void 0,
15626
15602
  "aria-selected": isSelected ? true : void 0,
15627
15603
  tabIndex: isFocusable ? 0 : -1,
15628
- className: chunkMA2BI7LX_js.cn(
15604
+ className: chunkJAI42EXQ_js.cn(
15629
15605
  "absolute",
15630
15606
  "focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-blue-500",
15631
15607
  cur,
@@ -15698,9 +15674,9 @@ var ElementRenderer = /* @__PURE__ */ React17__default.default.memo(
15698
15674
  txtSE,
15699
15675
  txtS: ts,
15700
15676
  vecShape: backgroundAnimationState && !isImg ? null : vs,
15701
- imgStyle: chunkMA2BI7LX_js.getImageRenderStyle(el),
15702
- imgFilter: chunkMA2BI7LX_js.getImageEffectsFilter(el),
15703
- imgOpacity: chunkMA2BI7LX_js.getImageEffectsOpacity(el),
15677
+ imgStyle: chunkJAI42EXQ_js.getImageRenderStyle(el),
15678
+ imgFilter: chunkJAI42EXQ_js.getImageEffectsFilter(el),
15679
+ imgOpacity: chunkJAI42EXQ_js.getImageEffectsOpacity(el),
15704
15680
  imgAlt: imageAltText,
15705
15681
  isTxtEl: isTxt,
15706
15682
  media: mediaDataUrls,
@@ -15837,10 +15813,10 @@ function renderStrokeView(view, pressureSensitive, replayStyle, key) {
15837
15813
  }
15838
15814
  function renderInk(el, options) {
15839
15815
  const replay = options?.replay ?? false;
15840
- const strokes = chunkMA2BI7LX_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15816
+ const strokes = chunkJAI42EXQ_js.buildInkGroupStrokes(el, { color: "#000", width: 3 });
15841
15817
  strokes.some((s) => s.circles || s.nibMarks);
15842
15818
  const pressureSensitive = options?.pressureSensitive;
15843
- const replayStyles = replay ? chunkMA2BI7LX_js.getInkReplayStyles(el, options?.replayConfig) : null;
15819
+ const replayStyles = replay ? chunkJAI42EXQ_js.getInkReplayStyles(el, options?.replayConfig) : null;
15844
15820
  return /* @__PURE__ */ jsxRuntime.jsxs(
15845
15821
  "svg",
15846
15822
  {
@@ -15848,7 +15824,7 @@ function renderInk(el, options) {
15848
15824
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15849
15825
  preserveAspectRatio: "none",
15850
15826
  children: [
15851
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkMA2BI7LX_js.INK_REPLAY_KEYFRAMES }),
15827
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkJAI42EXQ_js.INK_REPLAY_KEYFRAMES }),
15852
15828
  strokes.map(
15853
15829
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-ink-${i}`)
15854
15830
  )
@@ -15859,7 +15835,7 @@ function renderInk(el, options) {
15859
15835
  function renderGroup(children, parentGroupFill) {
15860
15836
  return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "relative w-full h-full pointer-events-none", children: pptx.filterRenderedElements(children).map((c, childIndex) => {
15861
15837
  const { hf, fc, sw, sc } = shapeParams(c);
15862
- const baseSs = chunkMA2BI7LX_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15838
+ const baseSs = chunkJAI42EXQ_js.getShapeVisualStyle(c, hf, fc, sw, sc);
15863
15839
  const inheritedFill = pptx.resolveGroupChildFill(c, parentGroupFill);
15864
15840
  const ss = inheritedFill ? {
15865
15841
  ...baseSs,
@@ -15870,9 +15846,9 @@ function renderGroup(children, parentGroupFill) {
15870
15846
  backgroundPosition: inheritedFill.backgroundPosition
15871
15847
  } : baseSs;
15872
15848
  const isI = c.type === "picture" || c.type === "image";
15873
- const vs = chunkMA2BI7LX_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15874
- const ts = chunkMA2BI7LX_js.getTextStyleForElement(c, chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR);
15875
- const isTxt = chunkMA2BI7LX_js.isEditableTextElement(c);
15849
+ const vs = chunkJAI42EXQ_js.renderVectorShape(c, isI ? false : hf, fc, sw, sc);
15850
+ const ts = chunkJAI42EXQ_js.getTextStyleForElement(c, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR);
15851
+ const isTxt = chunkJAI42EXQ_js.isEditableTextElement(c);
15876
15852
  return /* @__PURE__ */ jsxRuntime.jsxs(
15877
15853
  "div",
15878
15854
  {
@@ -15881,9 +15857,9 @@ function renderGroup(children, parentGroupFill) {
15881
15857
  style: {
15882
15858
  left: c.x,
15883
15859
  top: c.y,
15884
- width: Math.max(c.width, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE),
15885
- height: Math.max(c.height, chunkMA2BI7LX_js.MIN_ELEMENT_SIZE),
15886
- transform: chunkMA2BI7LX_js.getElementTransform(c),
15860
+ width: Math.max(c.width, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE),
15861
+ height: Math.max(c.height, chunkJAI42EXQ_js.MIN_ELEMENT_SIZE),
15862
+ transform: chunkJAI42EXQ_js.getElementTransform(c),
15887
15863
  transformOrigin: "center",
15888
15864
  ...ss,
15889
15865
  ...isI ? {
@@ -15908,8 +15884,8 @@ function renderGroup(children, parentGroupFill) {
15908
15884
  // A nested group: recurse, chaining the inherited fill so a
15909
15885
  // `grpFill` shape under a fill-less sub-group still paints.
15910
15886
  renderGroup(c.children, pptx.getGroupChildParentFill(c, parentGroupFill))
15911
- ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkMA2BI7LX_js.getImageSurfaceStyle(c), children: [
15912
- chunkMA2BI7LX_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15887
+ ) : isI && ("svgData" in c && c.svgData || "imageData" in c && c.imageData) ? /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkJAI42EXQ_js.getImageSurfaceStyle(c), children: [
15888
+ chunkJAI42EXQ_js.isImageTiled(c) ? /* @__PURE__ */ jsxRuntime.jsx(
15913
15889
  TiledImageLayer,
15914
15890
  {
15915
15891
  element: c,
@@ -15922,7 +15898,7 @@ function renderGroup(children, parentGroupFill) {
15922
15898
  src: "svgData" in c && c.svgData ? c.svgData : c.imageData,
15923
15899
  alt: i18n.translationsEn["pptx.ink.groupChildAlt"],
15924
15900
  className: "pointer-events-none select-none",
15925
- style: chunkMA2BI7LX_js.getImageRenderStyle(c),
15901
+ style: chunkJAI42EXQ_js.getImageRenderStyle(c),
15926
15902
  draggable: false
15927
15903
  }
15928
15904
  ),
@@ -15934,7 +15910,7 @@ function renderGroup(children, parentGroupFill) {
15934
15910
  {
15935
15911
  className: "relative z-10 w-full h-full pointer-events-none whitespace-pre-wrap break-words leading-[1.3]",
15936
15912
  style: ts,
15937
- children: chunkMA2BI7LX_js.renderTextSegments(c, chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR)
15913
+ children: chunkJAI42EXQ_js.renderTextSegments(c, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR)
15938
15914
  }
15939
15915
  ) : null
15940
15916
  ] })
@@ -15948,8 +15924,8 @@ function renderContentPart(el, options) {
15948
15924
  if (el.inkStrokes && el.inkStrokes.length > 0) {
15949
15925
  const replay = options?.replay ?? false;
15950
15926
  const pressureSensitive = options?.pressureSensitive ?? true;
15951
- const strokes = chunkMA2BI7LX_js.buildContentPartStrokes(el);
15952
- const replayStyles = replay ? chunkMA2BI7LX_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15927
+ const strokes = chunkJAI42EXQ_js.buildContentPartStrokes(el);
15928
+ const replayStyles = replay ? chunkJAI42EXQ_js.getContentPartReplayStyles(el.inkStrokes, options?.replayConfig) : null;
15953
15929
  return /* @__PURE__ */ jsxRuntime.jsxs(
15954
15930
  "svg",
15955
15931
  {
@@ -15957,7 +15933,7 @@ function renderContentPart(el, options) {
15957
15933
  viewBox: `0 0 ${Math.max(el.width, 1)} ${Math.max(el.height, 1)}`,
15958
15934
  preserveAspectRatio: "none",
15959
15935
  children: [
15960
- replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkMA2BI7LX_js.INK_REPLAY_KEYFRAMES }),
15936
+ replay && /* @__PURE__ */ jsxRuntime.jsx("style", { children: chunkJAI42EXQ_js.INK_REPLAY_KEYFRAMES }),
15961
15937
  strokes.map(
15962
15938
  (s, i) => renderStrokeView(s, pressureSensitive, replayStyles?.[i], `${el.id}-cp-ink-${i}`)
15963
15939
  )
@@ -16184,9 +16160,9 @@ function useInlineListEditor(element, rootRef, onChange, onModelReplacement) {
16184
16160
  collaboration: connected,
16185
16161
  model: pptx.createInlineListModelObserver(element),
16186
16162
  activationSelection,
16187
- children: seed && !connected ? chunkMA2BI7LX_js.renderTextSegments(
16163
+ children: seed && !connected ? chunkJAI42EXQ_js.renderTextSegments(
16188
16164
  element,
16189
- chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR,
16165
+ chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR,
16190
16166
  void 0,
16191
16167
  void 0,
16192
16168
  void 0,
@@ -16422,8 +16398,8 @@ function InlineTextEditor({
16422
16398
  pending.endOffset
16423
16399
  );
16424
16400
  });
16425
- const warpStyle = chunkMA2BI7LX_js.getTextWarpStyle(textStyleRaw);
16426
- const compensationTransform = chunkMA2BI7LX_js.getTextCompensationTransform(element);
16401
+ const warpStyle = chunkJAI42EXQ_js.getTextWarpStyle(textStyleRaw);
16402
+ const compensationTransform = chunkJAI42EXQ_js.getTextCompensationTransform(element);
16427
16403
  const warpTransform = warpStyle?.transform;
16428
16404
  const mergedTransform = [compensationTransform, warpTransform].filter(Boolean).join(" ") || void 0;
16429
16405
  const wrapperStyle = {
@@ -16511,7 +16487,7 @@ function InlineTextEditor({
16511
16487
  const text = e.clipboardData.getData("text/plain");
16512
16488
  document.execCommand("insertText", false, text);
16513
16489
  },
16514
- children: list.seed ? list.children : seed.hasRichSegments ? chunkMA2BI7LX_js.renderTextSegments(element, chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR) : seed.initialText
16490
+ children: list.seed ? list.children : seed.hasRichSegments ? chunkJAI42EXQ_js.renderTextSegments(element, chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR) : seed.initialText
16515
16491
  },
16516
16492
  list.seed?.paragraphs[0].token ?? "plain"
16517
16493
  );
@@ -17658,7 +17634,7 @@ function groupIntoParagraphs(element, fieldContext) {
17658
17634
  element,
17659
17635
  fieldContext ? (seg) => {
17660
17636
  if (seg.fieldType) {
17661
- const substituted = chunkMA2BI7LX_js.substituteFieldText(
17637
+ const substituted = chunkJAI42EXQ_js.substituteFieldText(
17662
17638
  seg.text,
17663
17639
  seg.fieldType,
17664
17640
  fieldContext,
@@ -17693,13 +17669,13 @@ function getSegmentTspanProps(segment, element, fallbackColor) {
17693
17669
  if (s.strikethrough) {
17694
17670
  decos.push("line-through");
17695
17671
  }
17696
- const fill = s.hyperlink ? chunkMA2BI7LX_js.normalizeHexColor(s.color || element.textStyle?.color, chunkMA2BI7LX_js.HYPERLINK_COLOR) : chunkMA2BI7LX_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17672
+ const fill = s.hyperlink ? chunkJAI42EXQ_js.normalizeHexColor(s.color || element.textStyle?.color, chunkJAI42EXQ_js.HYPERLINK_COLOR) : chunkJAI42EXQ_js.normalizeHexColor(s.color || element.textStyle?.color, fallbackColor);
17697
17673
  return {
17698
17674
  fill,
17699
- fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkMA2BI7LX_js.DEFAULT_TEXT_FONT_SIZE,
17675
+ fontSize: s.fontSize ?? element.textStyle?.fontSize ?? chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE,
17700
17676
  fontWeight: pptx.resolveFontWeight(s.fontFamily || element.textStyle?.fontFamily, s.bold),
17701
17677
  fontStyle: pptx.resolveFontItalic(s.fontFamily || element.textStyle?.fontFamily, s.italic) ? "italic" : void 0,
17702
- fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunkMA2BI7LX_js.DEFAULT_FONT_FAMILY,
17678
+ fontFamily: s.fontFamily || element.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(s.fontFamily || element.textStyle?.fontFamily || "") : chunkJAI42EXQ_js.DEFAULT_FONT_FAMILY,
17703
17679
  textDecoration: decos.length > 0 ? decos.join(" ") : void 0
17704
17680
  };
17705
17681
  }
@@ -17707,8 +17683,8 @@ function resolveSegmentFont(segment, element) {
17707
17683
  const s = segment.style || {};
17708
17684
  const family = s.fontFamily || element.textStyle?.fontFamily;
17709
17685
  return {
17710
- fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunkMA2BI7LX_js.DEFAULT_FONT_FAMILY,
17711
- fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkMA2BI7LX_js.DEFAULT_TEXT_FONT_SIZE,
17686
+ fontFamily: family ? pptx$1.getSubstituteFontFamily(family) : chunkJAI42EXQ_js.DEFAULT_FONT_FAMILY,
17687
+ fontSizePx: s.fontSize ?? element.textStyle?.fontSize ?? chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE,
17712
17688
  bold: s.bold ?? element.textStyle?.bold,
17713
17689
  italic: s.italic ?? element.textStyle?.italic
17714
17690
  };
@@ -17792,9 +17768,9 @@ function WarpedText({
17792
17768
  const warpAdj2 = textEl.textStyle?.textWarpAdj2;
17793
17769
  const align = textEl.textStyle?.align ?? "center";
17794
17770
  const { startOffset, textAnchor } = getAlignmentProps(align);
17795
- const baseFontSize = textEl.textStyle?.fontSize ?? chunkMA2BI7LX_js.DEFAULT_TEXT_FONT_SIZE;
17796
- const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkMA2BI7LX_js.DEFAULT_FONT_FAMILY;
17797
- const baseFill = chunkMA2BI7LX_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17771
+ const baseFontSize = textEl.textStyle?.fontSize ?? chunkJAI42EXQ_js.DEFAULT_TEXT_FONT_SIZE;
17772
+ const baseFontFamily = textEl.textStyle?.fontFamily ? pptx$1.getSubstituteFontFamily(textEl.textStyle.fontFamily) : chunkJAI42EXQ_js.DEFAULT_FONT_FAMILY;
17773
+ const baseFill = chunkJAI42EXQ_js.normalizeHexColor(textEl.textStyle?.color, fallbackColor);
17798
17774
  if (pptx.hasGlyphEnvelope(preset)) {
17799
17775
  const perLine = pptx.buildGlyphEnvelopeBlock(
17800
17776
  preset,
@@ -17896,7 +17872,7 @@ function WarpedText({
17896
17872
  var GLYPH_BY_SHAPE = /* @__PURE__ */ buildGlyphByShape();
17897
17873
  function buildGlyphByShape() {
17898
17874
  const glyphs = Object.fromEntries(
17899
- chunkMA2BI7LX_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17875
+ chunkJAI42EXQ_js.ACTION_BUTTON_PRESETS.map((p) => [p.shapeType, p.iconPath])
17900
17876
  );
17901
17877
  glyphs["actionButtonForwardOrNext"] = glyphs["actionButtonForwardNext"];
17902
17878
  glyphs["actionButtonBackOrPrevious"] = glyphs["actionButtonBackPrevious"];
@@ -17970,9 +17946,9 @@ function renderTextElementBody(options) {
17970
17946
  const useSvgWarp = pptx.shouldUseSvgWarp(
17971
17947
  pptx$1.hasTextProperties(el) ? el.textStyle?.textWarpPreset : void 0
17972
17948
  );
17973
- const scene3dStyle = pptx$1.hasTextProperties(el) ? chunkMA2BI7LX_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17949
+ const scene3dStyle = pptx$1.hasTextProperties(el) ? chunkJAI42EXQ_js.buildTextBody3DSceneStyle(el.textStyle, { width: el.width, height: el.height }) : void 0;
17974
17950
  const rotationTransform = pptx.getTextBodyRotationTransform(el);
17975
- const composedTransform = [rotationTransform, chunkMA2BI7LX_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17951
+ const composedTransform = [rotationTransform, chunkJAI42EXQ_js.getTextCompensationTransform(el), scene3dStyle?.transform].filter(Boolean).join(" ") || void 0;
17976
17952
  const transformStyle = {
17977
17953
  transform: composedTransform,
17978
17954
  // A COM-measured homography (`scene3dStyle.transformOrigin === '0 0'`)
@@ -18002,18 +17978,18 @@ function renderTextElementBody(options) {
18002
17978
  shouldRenderText && (useSvgWarp ? /* @__PURE__ */ jsxRuntime.jsx(
18003
17979
  "div",
18004
17980
  {
18005
- className: chunkMA2BI7LX_js.cn(
17981
+ className: chunkJAI42EXQ_js.cn(
18006
17982
  "relative z-10 w-full h-full",
18007
17983
  onHyperlinkClick ? "" : "pointer-events-none"
18008
17984
  ),
18009
- style: { ...chunkMA2BI7LX_js.getTextLayoutStyle(el), ...transformStyle },
17985
+ style: { ...chunkJAI42EXQ_js.getTextLayoutStyle(el), ...transformStyle },
18010
17986
  children: /* @__PURE__ */ jsxRuntime.jsx(
18011
17987
  WarpedText,
18012
17988
  {
18013
17989
  element: el,
18014
17990
  width: el.width,
18015
17991
  height: el.height,
18016
- fallbackColor: chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR,
17992
+ fallbackColor: chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR,
18017
17993
  findHighlights: findHl,
18018
17994
  fieldContext
18019
17995
  }
@@ -18022,19 +17998,19 @@ function renderTextElementBody(options) {
18022
17998
  ) : /* @__PURE__ */ jsxRuntime.jsx(
18023
17999
  "div",
18024
18000
  {
18025
- className: chunkMA2BI7LX_js.cn(
18001
+ className: chunkJAI42EXQ_js.cn(
18026
18002
  "relative z-10 w-full h-full whitespace-pre-wrap break-words leading-[1.3]",
18027
18003
  onHyperlinkClick ? "" : "pointer-events-none"
18028
18004
  ),
18029
18005
  style: {
18030
- ...chunkMA2BI7LX_js.getTextLayoutStyle(el),
18006
+ ...chunkJAI42EXQ_js.getTextLayoutStyle(el),
18031
18007
  ...txtS,
18032
- ...chunkMA2BI7LX_js.getTextWarpStyle(txtSE),
18008
+ ...chunkJAI42EXQ_js.getTextWarpStyle(txtSE),
18033
18009
  ...transformStyle
18034
18010
  },
18035
- children: chunkMA2BI7LX_js.renderTextSegments(
18011
+ children: chunkJAI42EXQ_js.renderTextSegments(
18036
18012
  el,
18037
- chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR,
18013
+ chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR,
18038
18014
  void 0,
18039
18015
  findHl,
18040
18016
  onHyperlinkClick,
@@ -18353,7 +18329,7 @@ function renderBody(options) {
18353
18329
  );
18354
18330
  }
18355
18331
  if (isImg) {
18356
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkMA2BI7LX_js.getImageSurfaceStyle(el), children: [
18332
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "absolute inset-0 pointer-events-none", style: chunkJAI42EXQ_js.getImageSurfaceStyle(el), children: [
18357
18333
  renderImg(el, imgStyle, imgFilter, imgAlt, imgOpacity),
18358
18334
  vecShape ? /* @__PURE__ */ jsxRuntime.jsx("div", { className: "pointer-events-none absolute inset-0", children: vecShape }) : null
18359
18335
  ] });
@@ -18370,7 +18346,7 @@ function renderBody(options) {
18370
18346
  textDirection: txtSE?.textDirection,
18371
18347
  textStyle: txtS,
18372
18348
  textStyleRaw: txtSE,
18373
- layoutStyle: chunkMA2BI7LX_js.getTextLayoutStyle(el),
18349
+ layoutStyle: chunkJAI42EXQ_js.getTextLayoutStyle(el),
18374
18350
  element: el,
18375
18351
  onCommit,
18376
18352
  onCancel,
@@ -18381,7 +18357,7 @@ function renderBody(options) {
18381
18357
  ] });
18382
18358
  }
18383
18359
  if (el.type === "table") {
18384
- return chunkMA2BI7LX_js.renderTableElement(el, txtS, {
18360
+ return chunkJAI42EXQ_js.renderTableElement(el, txtS, {
18385
18361
  editable: isSel,
18386
18362
  selectedCell: isSel ? tableSt : null,
18387
18363
  onSelectCell: onCellSel,
@@ -18414,7 +18390,7 @@ function renderBody(options) {
18414
18390
  );
18415
18391
  }
18416
18392
  if (el.type === "media") {
18417
- return chunkMA2BI7LX_js.renderMediaElement(el, media, {
18393
+ return chunkJAI42EXQ_js.renderMediaElement(el, media, {
18418
18394
  // Present mode autoplays every media element on the active slide,
18419
18395
  // not only ones persisted with their own `autoPlay` flag (matching
18420
18396
  // the other four bindings' unconditional `presenting`-gated
@@ -18466,27 +18442,27 @@ function renderBody(options) {
18466
18442
  }
18467
18443
  return renderGroup(el.children, pptx.getGroupChildParentFill(el));
18468
18444
  }
18469
- if (chunkMA2BI7LX_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18470
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkMA2BI7LX_js.getElementLabel(el) });
18445
+ if (chunkJAI42EXQ_js.shouldRenderFallbackLabel(el, isTxtEl)) {
18446
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkJAI42EXQ_js.getElementLabel(el) });
18471
18447
  }
18472
18448
  return renderTextElementBody(options);
18473
18449
  }
18474
18450
  function defaultTextColorForFill(fillColor) {
18475
18451
  const hex = String(fillColor ?? "").replace(/^#/u, "");
18476
18452
  if (!/^[0-9a-f]{6}$/iu.test(hex)) {
18477
- return chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR;
18453
+ return chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR;
18478
18454
  }
18479
18455
  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);
18480
18456
  const luminance = channels[0] * 0.2126 + channels[1] * 0.7152 + channels[2] * 0.0722;
18481
- return luminance > 0.179 ? chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR : "#ffffff";
18457
+ return luminance > 0.179 ? chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR : "#ffffff";
18482
18458
  }
18483
18459
  function getStaticElementVisualState(element, parentGroupFill) {
18484
18460
  const style = pptx$1.hasShapeProperties(element) ? element.shapeStyle : void 0;
18485
- const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkMA2BI7LX_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18486
- const fill = chunkMA2BI7LX_js.normalizeHexColor(style?.fillColor, chunkMA2BI7LX_js.DEFAULT_FILL_COLOR);
18461
+ const hasFill = style?.fillColor !== void 0 && style.fillColor !== "transparent" || Boolean(chunkJAI42EXQ_js.buildCssGradientFromShapeStyle(style) || style?.fillGradient) || style?.fillMode === "pattern" && Boolean(style.fillPatternPreset);
18462
+ const fill = chunkJAI42EXQ_js.normalizeHexColor(style?.fillColor, chunkJAI42EXQ_js.DEFAULT_FILL_COLOR);
18487
18463
  const strokeWidth = pptx.paintedStrokeWidth(style);
18488
- const stroke = chunkMA2BI7LX_js.normalizeHexColor(style?.strokeColor, chunkMA2BI7LX_js.DEFAULT_STROKE_COLOR);
18489
- const baseVisualStyle = chunkMA2BI7LX_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18464
+ const stroke = chunkJAI42EXQ_js.normalizeHexColor(style?.strokeColor, chunkJAI42EXQ_js.DEFAULT_STROKE_COLOR);
18465
+ const baseVisualStyle = chunkJAI42EXQ_js.getShapeVisualStyle(element, hasFill, fill, strokeWidth, stroke);
18490
18466
  const inheritedFill = pptx.resolveGroupChildFill(element, parentGroupFill);
18491
18467
  const visualStyle = inheritedFill ? {
18492
18468
  ...baseVisualStyle,
@@ -18496,9 +18472,9 @@ function getStaticElementVisualState(element, parentGroupFill) {
18496
18472
  backgroundSize: inheritedFill.backgroundSize,
18497
18473
  backgroundPosition: inheritedFill.backgroundPosition
18498
18474
  } : baseVisualStyle;
18499
- const textStyle = chunkMA2BI7LX_js.getTextStyleForElement(
18475
+ const textStyle = chunkJAI42EXQ_js.getTextStyleForElement(
18500
18476
  element,
18501
- element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkMA2BI7LX_js.DEFAULT_TEXT_COLOR
18477
+ element.type === "shape" && hasFill ? defaultTextColorForFill(fill) : chunkJAI42EXQ_js.DEFAULT_TEXT_COLOR
18502
18478
  );
18503
18479
  const isImage = element.type === "picture" || element.type === "image";
18504
18480
  const letsTextOverflow = pptx$1.hasTextProperties(element) && element.textStyle?.autoFitMode === "shrink" && (element.type === "text" || element.locks?.txBox === true);
@@ -18523,7 +18499,7 @@ function getStaticElementInteractionState(element, hasActionHandler, exposeEleme
18523
18499
  return { action, isActionable, contractRole };
18524
18500
  }
18525
18501
  function getStaticElementWrapperClassName(element, visual, positioned, isActionable) {
18526
- const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunkMA2BI7LX_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18502
+ const overflowClass = visual.isImage || visual.strokeWidth > 0 || element.type === "group" || chunkJAI42EXQ_js.isConnectorOrLineElement(element) || visual.isCallout || visual.letsTextOverflow ? "" : "overflow-hidden";
18527
18503
  const pointerClass = isActionable ? "pointer-events-auto cursor-pointer" : "pointer-events-none";
18528
18504
  return `${positioned ? "absolute" : "relative"} ${overflowClass} ${pointerClass}`;
18529
18505
  }
@@ -18606,7 +18582,7 @@ function StaticElementRendererImpl({
18606
18582
  top: positioned ? element.y : void 0,
18607
18583
  width: positioned ? Math.max(element.width, 1) : "100%",
18608
18584
  height: positioned ? Math.max(element.height, 1) : "100%",
18609
- transform: positioned ? chunkMA2BI7LX_js.getElementTransform(element) : void 0,
18585
+ transform: positioned ? chunkJAI42EXQ_js.getElementTransform(element) : void 0,
18610
18586
  transformOrigin: "center",
18611
18587
  zIndex,
18612
18588
  ...visualStyle,
@@ -18649,18 +18625,18 @@ function StaticElementRendererImpl({
18649
18625
  spellCheck: false,
18650
18626
  txtSE: pptx$1.hasTextProperties(element) ? element.textStyle : void 0,
18651
18627
  txtS: textStyle,
18652
- vecShape: chunkMA2BI7LX_js.renderVectorShape(
18628
+ vecShape: chunkJAI42EXQ_js.renderVectorShape(
18653
18629
  element,
18654
18630
  isImage ? false : hasFill,
18655
18631
  fill,
18656
18632
  strokeWidth,
18657
18633
  stroke
18658
18634
  ),
18659
- imgStyle: imageAnimation ? { ...chunkMA2BI7LX_js.getImageRenderStyle(element), animation: imageAnimation } : chunkMA2BI7LX_js.getImageRenderStyle(element),
18660
- imgFilter: chunkMA2BI7LX_js.getImageEffectsFilter(element),
18661
- imgOpacity: chunkMA2BI7LX_js.getImageEffectsOpacity(element),
18635
+ imgStyle: imageAnimation ? { ...chunkJAI42EXQ_js.getImageRenderStyle(element), animation: imageAnimation } : chunkJAI42EXQ_js.getImageRenderStyle(element),
18636
+ imgFilter: chunkJAI42EXQ_js.getImageEffectsFilter(element),
18637
+ imgOpacity: chunkJAI42EXQ_js.getImageEffectsOpacity(element),
18662
18638
  imgAlt: "",
18663
- isTxtEl: chunkMA2BI7LX_js.isEditableTextElement(element),
18639
+ isTxtEl: chunkJAI42EXQ_js.isEditableTextElement(element),
18664
18640
  media: mediaDataUrls,
18665
18641
  tableSt: null,
18666
18642
  isSel: false,
@@ -18708,7 +18684,7 @@ function SlideLayer({
18708
18684
  style: {
18709
18685
  width: safeWidth,
18710
18686
  height: safeHeight,
18711
- backgroundColor: slide.backgroundColor ? chunkMA2BI7LX_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18687
+ backgroundColor: slide.backgroundColor ? chunkJAI42EXQ_js.normalizeHexColor(slide.backgroundColor, "#ffffff") : "#ffffff",
18712
18688
  backgroundImage: slide.backgroundImage ? `url(${slide.backgroundImage})` : slide.backgroundGradient ? slide.backgroundGradient : void 0,
18713
18689
  backgroundSize: slide.backgroundImage ? "cover" : void 0,
18714
18690
  backgroundPosition: slide.backgroundImage ? "center" : void 0
@@ -18781,6 +18757,9 @@ function FragmentedTransitionLayer({
18781
18757
  }
18782
18758
  );
18783
18759
  }
18760
+ function overlayEntries(plan, incomingSlide) {
18761
+ return plan.overlayLayers.filter((layer) => layer.side === "outgoing" || incomingSlide !== void 0).flatMap((layer) => layer.elements.map((element) => ({ element, side: layer.side }))).map((entry, zIndex) => ({ ...entry, zIndex }));
18762
+ }
18784
18763
  function MorphTransitionOverlay({
18785
18764
  canvasSize,
18786
18765
  scale,
@@ -18820,43 +18799,44 @@ function MorphTransitionOverlay({
18820
18799
  position: "relative"
18821
18800
  },
18822
18801
  children: [
18823
- morphPlan.outgoingElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
18824
- "div",
18825
- {
18826
- "data-pptx-morph-outgoing": element.id,
18827
- style: { position: "absolute", inset: 0 },
18828
- children: /* @__PURE__ */ jsxRuntime.jsx(
18829
- StaticElementRenderer,
18830
- {
18831
- element,
18832
- activeSlide: outgoingSlide,
18833
- allSlides: [outgoingSlide],
18834
- zIndex: index,
18835
- animation: morphPlan.outgoingAnimations.get(element.id),
18836
- imageAnimation: morphPlan.outgoingImageAnimations.get(element.id)
18837
- }
18838
- )
18839
- },
18840
- element.id
18841
- )),
18842
- incomingSlide && morphPlan.overlayIncomingElements.map((element, index) => /* @__PURE__ */ jsxRuntime.jsx(
18843
- "div",
18844
- {
18845
- "data-pptx-morph-lifted": element.id,
18846
- style: { position: "absolute", inset: 0 },
18847
- children: /* @__PURE__ */ jsxRuntime.jsx(
18848
- StaticElementRenderer,
18849
- {
18850
- element,
18851
- activeSlide: incomingSlide,
18852
- allSlides: [incomingSlide],
18853
- zIndex: morphPlan.outgoingElements.length + index,
18854
- animation: morphPlan.overlayIncomingAnimations.get(element.id)
18855
- }
18856
- )
18857
- },
18858
- element.id
18859
- )),
18802
+ overlayEntries(morphPlan, incomingSlide).map(
18803
+ ({ element, side, zIndex }) => side === "outgoing" ? /* @__PURE__ */ jsxRuntime.jsx(
18804
+ "div",
18805
+ {
18806
+ "data-pptx-morph-outgoing": element.id,
18807
+ style: { position: "absolute", inset: 0 },
18808
+ children: /* @__PURE__ */ jsxRuntime.jsx(
18809
+ StaticElementRenderer,
18810
+ {
18811
+ element,
18812
+ activeSlide: outgoingSlide,
18813
+ allSlides: [outgoingSlide],
18814
+ zIndex,
18815
+ animation: morphPlan.outgoingAnimations.get(element.id),
18816
+ imageAnimation: morphPlan.outgoingImageAnimations.get(element.id)
18817
+ }
18818
+ )
18819
+ },
18820
+ element.id
18821
+ ) : incomingSlide && /* @__PURE__ */ jsxRuntime.jsx(
18822
+ "div",
18823
+ {
18824
+ "data-pptx-morph-lifted": element.id,
18825
+ style: { position: "absolute", inset: 0 },
18826
+ children: /* @__PURE__ */ jsxRuntime.jsx(
18827
+ StaticElementRenderer,
18828
+ {
18829
+ element,
18830
+ activeSlide: incomingSlide,
18831
+ allSlides: [incomingSlide],
18832
+ zIndex,
18833
+ animation: morphPlan.overlayIncomingAnimations.get(element.id)
18834
+ }
18835
+ )
18836
+ },
18837
+ element.id
18838
+ )
18839
+ ),
18860
18840
  incomingSlide && morphPlan.crossfadeGroups.map((group, index) => /* @__PURE__ */ jsxRuntime.jsxs(
18861
18841
  "div",
18862
18842
  {
@@ -18921,6 +18901,7 @@ function PresentationTransitionOverlay({
18921
18901
  scale: stageScale,
18922
18902
  morphPlan,
18923
18903
  incomingSlide,
18904
+ incomingTemplateElements = templateElements,
18924
18905
  onComplete
18925
18906
  }) {
18926
18907
  const containerRef = React17.useRef(null);
@@ -19010,7 +18991,7 @@ function PresentationTransitionOverlay({
19010
18991
  {
19011
18992
  layer: fragmented.incoming,
19012
18993
  slide: incomingSlide,
19013
- templateElements,
18994
+ templateElements: incomingTemplateElements,
19014
18995
  canvasSize,
19015
18996
  scale,
19016
18997
  zIndex: animations.outgoingOnTop ? 0 : 10,
@@ -19040,7 +19021,7 @@ function PresentationTransitionOverlay({
19040
19021
  SlideLayer,
19041
19022
  {
19042
19023
  slide: incomingSlide,
19043
- templateElements,
19024
+ templateElements: incomingTemplateElements,
19044
19025
  canvasSize
19045
19026
  }
19046
19027
  )