pptx-react-viewer 1.24.0 → 1.25.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 (92) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/README.md +46 -21
  3. package/dist/{Model3DScene-RD4XEC3F.js → Model3DScene-G434BPF4.js} +2 -2
  4. package/dist/Model3DScene-G434BPF4.js.br +0 -0
  5. package/dist/Model3DScene-G434BPF4.js.gz +0 -0
  6. package/dist/{Model3DScene-QTNGCODM.mjs → Model3DScene-GGNUAOGD.mjs} +1 -1
  7. package/dist/Model3DScene-GGNUAOGD.mjs.br +0 -0
  8. package/dist/Model3DScene-GGNUAOGD.mjs.gz +0 -0
  9. package/dist/PowerPointViewer-CnADroqZ.d.ts.map +1 -1
  10. package/dist/{SurfaceChart3DScene-VKS3ELTU.mjs → SurfaceChart3DScene-JU737NN5.mjs} +1 -1
  11. package/dist/SurfaceChart3DScene-JU737NN5.mjs.br +0 -0
  12. package/dist/SurfaceChart3DScene-JU737NN5.mjs.gz +0 -0
  13. package/dist/{SurfaceChart3DScene-YR3GX4X6.js → SurfaceChart3DScene-UFFJ3P6T.js} +2 -2
  14. package/dist/{SurfaceChart3DScene-YR3GX4X6.js.br → SurfaceChart3DScene-UFFJ3P6T.js.br} +0 -0
  15. package/dist/SurfaceChart3DScene-UFFJ3P6T.js.gz +0 -0
  16. package/dist/{chunk-ZISXRMDJ.js → chunk-2EFVXYNA.js} +187 -1
  17. package/dist/chunk-2EFVXYNA.js.br +0 -0
  18. package/dist/{chunk-ZISXRMDJ.js.gz → chunk-2EFVXYNA.js.gz} +0 -0
  19. package/dist/{chunk-3YMK5VLS.js → chunk-EM77GISR.js} +1675 -1033
  20. package/dist/chunk-EM77GISR.js.br +0 -0
  21. package/dist/chunk-EM77GISR.js.gz +0 -0
  22. package/dist/{chunk-GKST4OS7.js → chunk-IHHK6WEQ.js} +555 -446
  23. package/dist/chunk-IHHK6WEQ.js.br +0 -0
  24. package/dist/chunk-IHHK6WEQ.js.gz +0 -0
  25. package/dist/{chunk-E3KJKCSV.mjs → chunk-M3SIFXWD.mjs} +187 -1
  26. package/dist/chunk-M3SIFXWD.mjs.br +0 -0
  27. package/dist/{chunk-E3KJKCSV.mjs.gz → chunk-M3SIFXWD.mjs.gz} +0 -0
  28. package/dist/{chunk-PUQ6GIOM.mjs → chunk-NKSIDFYP.mjs} +972 -330
  29. package/dist/chunk-NKSIDFYP.mjs.br +0 -0
  30. package/dist/chunk-NKSIDFYP.mjs.gz +0 -0
  31. package/dist/{chunk-KPT54MHG.mjs → chunk-QOBKJKLT.mjs} +861 -10
  32. package/dist/chunk-QOBKJKLT.mjs.br +0 -0
  33. package/dist/{chunk-KPT54MHG.mjs.gz → chunk-QOBKJKLT.mjs.gz} +0 -0
  34. package/dist/{chunk-YJVMOX2Y.mjs → chunk-VDALVGDT.mjs} +151 -43
  35. package/dist/chunk-VDALVGDT.mjs.br +0 -0
  36. package/dist/chunk-VDALVGDT.mjs.gz +0 -0
  37. package/dist/{chunk-I5SO5OV4.js → chunk-VKOVFVDJ.js} +876 -10
  38. package/dist/chunk-VKOVFVDJ.js.br +0 -0
  39. package/dist/{chunk-I5SO5OV4.js.gz → chunk-VKOVFVDJ.js.gz} +0 -0
  40. package/dist/hooks-unstable.d.ts +231 -4
  41. package/dist/hooks-unstable.d.ts.map +1 -1
  42. package/dist/hooks-unstable.js +81 -77
  43. package/dist/hooks-unstable.js.br +0 -0
  44. package/dist/hooks-unstable.js.gz +0 -0
  45. package/dist/hooks-unstable.mjs +3 -3
  46. package/dist/hooks-unstable.mjs.br +0 -0
  47. package/dist/hooks-unstable.mjs.gz +0 -0
  48. package/dist/i18n.js +4 -4
  49. package/dist/i18n.js.br +0 -0
  50. package/dist/i18n.js.gz +0 -0
  51. package/dist/i18n.mjs +1 -1
  52. package/dist/i18n.mjs.br +0 -0
  53. package/dist/i18n.mjs.gz +0 -0
  54. package/dist/{index-hm2FF-FU.d.ts → index-DWvM1PBB.d.ts} +25 -2
  55. package/dist/index-DWvM1PBB.d.ts.map +1 -0
  56. package/dist/index.d.ts +146 -26
  57. package/dist/index.js +34 -34
  58. package/dist/index.js.br +0 -0
  59. package/dist/index.js.gz +0 -0
  60. package/dist/index.mjs +4 -4
  61. package/dist/index.mjs.br +0 -0
  62. package/dist/index.mjs.gz +0 -0
  63. package/dist/pptx-viewer.css +1 -1
  64. package/dist/pptx-viewer.css.br +0 -0
  65. package/dist/pptx-viewer.css.gz +0 -0
  66. package/dist/viewer/index.js +20 -20
  67. package/dist/viewer/index.js.br +0 -0
  68. package/dist/viewer/index.js.gz +0 -0
  69. package/dist/viewer/index.mjs +4 -4
  70. package/dist/viewer/index.mjs.br +0 -0
  71. package/dist/viewer/index.mjs.gz +0 -0
  72. package/package.json +1 -1
  73. package/dist/Model3DScene-QTNGCODM.mjs.br +0 -0
  74. package/dist/Model3DScene-QTNGCODM.mjs.gz +0 -0
  75. package/dist/Model3DScene-RD4XEC3F.js.br +0 -0
  76. package/dist/Model3DScene-RD4XEC3F.js.gz +0 -0
  77. package/dist/SurfaceChart3DScene-VKS3ELTU.mjs.br +0 -0
  78. package/dist/SurfaceChart3DScene-VKS3ELTU.mjs.gz +0 -0
  79. package/dist/SurfaceChart3DScene-YR3GX4X6.js.gz +0 -0
  80. package/dist/chunk-3YMK5VLS.js.br +0 -0
  81. package/dist/chunk-3YMK5VLS.js.gz +0 -0
  82. package/dist/chunk-E3KJKCSV.mjs.br +0 -0
  83. package/dist/chunk-GKST4OS7.js.br +0 -0
  84. package/dist/chunk-GKST4OS7.js.gz +0 -0
  85. package/dist/chunk-I5SO5OV4.js.br +0 -0
  86. package/dist/chunk-KPT54MHG.mjs.br +0 -0
  87. package/dist/chunk-PUQ6GIOM.mjs.br +0 -0
  88. package/dist/chunk-PUQ6GIOM.mjs.gz +0 -0
  89. package/dist/chunk-YJVMOX2Y.mjs.br +0 -0
  90. package/dist/chunk-YJVMOX2Y.mjs.gz +0 -0
  91. package/dist/chunk-ZISXRMDJ.js.br +0 -0
  92. package/dist/index-hm2FF-FU.d.ts.map +0 -1
@@ -1,7 +1,7 @@
1
1
  'use strict';
2
2
 
3
- var chunkI5SO5OV4_js = require('./chunk-I5SO5OV4.js');
4
- var chunkZISXRMDJ_js = require('./chunk-ZISXRMDJ.js');
3
+ var chunkVKOVFVDJ_js = require('./chunk-VKOVFVDJ.js');
4
+ var chunk2EFVXYNA_js = require('./chunk-2EFVXYNA.js');
5
5
  var chunkKV3EOLP3_js = require('./chunk-KV3EOLP3.js');
6
6
  var React3 = require('react');
7
7
  var lu = require('react-icons/lu');
@@ -18,11 +18,11 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
18
18
 
19
19
  // src/viewer/utils/clone.ts
20
20
  function cloneHistorySnapshot2(snapshot) {
21
- return chunkI5SO5OV4_js.cloneHistorySnapshot(snapshot);
21
+ return chunkVKOVFVDJ_js.cloneHistorySnapshot(snapshot);
22
22
  }
23
23
 
24
24
  // src/viewer/hooks/useEditorHistory.ts
25
- var MAX_HISTORY_ENTRIES = 120;
25
+ var DEFAULT_MAX_HISTORY_ENTRIES = 120;
26
26
  function useEditorHistory(input) {
27
27
  const {
28
28
  slides,
@@ -31,6 +31,7 @@ function useEditorHistory(input) {
31
31
  templateElementsBySlideId,
32
32
  loading,
33
33
  error,
34
+ maxHistoryEntries = DEFAULT_MAX_HISTORY_ENTRIES,
34
35
  hasActivePointerInteraction,
35
36
  pointerCommitNonce,
36
37
  setSlides,
@@ -66,8 +67,8 @@ function useEditorHistory(input) {
66
67
  width: canvasSize.width,
67
68
  height: canvasSize.height,
68
69
  activeSlideIndex,
69
- slides: slides.map(chunkI5SO5OV4_js.cloneSlide),
70
- templateElementsBySlideId: chunkI5SO5OV4_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
70
+ slides: slides.map(chunkVKOVFVDJ_js.cloneSlide),
71
+ templateElementsBySlideId: chunkVKOVFVDJ_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
71
72
  ...actionLabel ? { actionLabel } : {}
72
73
  };
73
74
  },
@@ -80,9 +81,9 @@ function useEditorHistory(input) {
80
81
  width: snapshot.width,
81
82
  height: snapshot.height
82
83
  });
83
- setSlides(snapshot.slides.map(chunkI5SO5OV4_js.cloneSlide));
84
+ setSlides(snapshot.slides.map(chunkVKOVFVDJ_js.cloneSlide));
84
85
  setTemplateElementsBySlideId(
85
- chunkI5SO5OV4_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
86
+ chunkVKOVFVDJ_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
86
87
  );
87
88
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
88
89
  setSelectedElementIds([]);
@@ -205,7 +206,7 @@ function useEditorHistory(input) {
205
206
  return;
206
207
  }
207
208
  historyPastRef.current.push(cloneHistorySnapshot2(previousSnapshot));
208
- if (historyPastRef.current.length > MAX_HISTORY_ENTRIES) {
209
+ while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
209
210
  historyPastRef.current.shift();
210
211
  }
211
212
  historyFutureRef.current = [];
@@ -221,6 +222,7 @@ function useEditorHistory(input) {
221
222
  error,
222
223
  hasActivePointerInteraction,
223
224
  loading,
225
+ maxHistoryEntries,
224
226
  pointerCommitNonce,
225
227
  slides,
226
228
  updateHistoryAvailability
@@ -345,7 +347,7 @@ var GLYPH_COMPONENTS = {
345
347
  plus: lu.LuPlus,
346
348
  triangle: lu.LuTriangle
347
349
  };
348
- var SHAPE_PRESETS = chunkI5SO5OV4_js.SHAPE_PRESET_DEFS.map(
350
+ var SHAPE_PRESETS = chunkVKOVFVDJ_js.SHAPE_PRESET_DEFS.map(
349
351
  (def) => ({
350
352
  type: def.type,
351
353
  label: def.label,
@@ -662,19 +664,19 @@ function useAnimationPlayback(input) {
662
664
  if (anim.buildType && anim.buildType !== "allAtOnce" && anim.targetId) {
663
665
  const el = slide.elements.find((e) => e.id === anim.targetId);
664
666
  if (el && chunkKV3EOLP3_js.hasTextProperties(el) && el.textSegments && el.textSegments.length > 0) {
665
- segmentCounts.set(anim.targetId, chunkI5SO5OV4_js.countTextSegments(el.textSegments));
667
+ segmentCounts.set(anim.targetId, chunkVKOVFVDJ_js.countTextSegments(el.textSegments));
666
668
  }
667
669
  }
668
670
  }
669
- const expandedAnims = segmentCounts.size > 0 ? chunkI5SO5OV4_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
670
- const engine = chunkI5SO5OV4_js.TimelineEngine.fromAnimations(expandedAnims);
671
+ const expandedAnims = segmentCounts.size > 0 ? chunkVKOVFVDJ_js.expandTextBuildAnimations(nativeAnims, segmentCounts) : nativeAnims;
672
+ const engine = chunkVKOVFVDJ_js.TimelineEngine.fromAnimations(expandedAnims);
671
673
  timelineEngineRef.current = engine;
672
674
  setPresentationKeyframesCss(engine.getTimeline().keyframesCss);
673
675
  setInteractiveTriggerShapeIds(engine.getInteractiveTriggerShapeIds());
674
676
  setHoverTriggerShapeIds(engine.getHoverTriggerShapeIds());
675
677
  const allIds = slide.elements.map((element) => element.id);
676
678
  for (const anim of expandedAnims) {
677
- if (anim.targetId && anim.targetId.includes(chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP)) {
679
+ if (anim.targetId && anim.targetId.includes(chunkVKOVFVDJ_js.TEXT_BUILD_ID_SEP)) {
678
680
  allIds.push(anim.targetId);
679
681
  }
680
682
  }
@@ -806,7 +808,7 @@ function useAnimationPlayback(input) {
806
808
  }))
807
809
  );
808
810
  entranceAnimations.forEach((animation, animationIndex) => {
809
- const delay = chunkI5SO5OV4_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
811
+ const delay = chunkVKOVFVDJ_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
810
812
  const timer = window.setTimeout(() => {
811
813
  setPresentationAnimations(
812
814
  (previousAnimations) => previousAnimations.map(
@@ -863,7 +865,7 @@ function openDb() {
863
865
  }
864
866
  async function storeAudienceContent(content, sessionId) {
865
867
  if (sessionId) {
866
- return chunkI5SO5OV4_js.storePresentationDeck(sessionId, content);
868
+ return chunkVKOVFVDJ_js.storePresentationDeck(sessionId, content);
867
869
  }
868
870
  const db = await openDb();
869
871
  return new Promise((resolve, reject) => {
@@ -884,7 +886,7 @@ async function storeAudienceContent(content, sessionId) {
884
886
  }
885
887
  async function loadAudienceContent(sessionId) {
886
888
  if (sessionId) {
887
- return chunkI5SO5OV4_js.loadPresentationDeck(sessionId);
889
+ return chunkVKOVFVDJ_js.loadPresentationDeck(sessionId);
888
890
  }
889
891
  try {
890
892
  const db = await openDb();
@@ -925,7 +927,7 @@ async function loadAudienceContent(sessionId) {
925
927
  }
926
928
  async function clearAudienceContent(sessionId) {
927
929
  if (sessionId) {
928
- return chunkI5SO5OV4_js.clearPresentationDeck(sessionId);
930
+ return chunkVKOVFVDJ_js.clearPresentationDeck(sessionId);
929
931
  }
930
932
  try {
931
933
  const db = await openDb();
@@ -945,12 +947,12 @@ async function clearAudienceContent(sessionId) {
945
947
  } catch {
946
948
  }
947
949
  }
948
- var PRESENTER_CHANNEL_NAME = chunkI5SO5OV4_js.PRESENTATION_CHANNEL_NAME;
949
- var AUDIENCE_HASH = chunkI5SO5OV4_js.PRESENTATION_HASH;
950
- var PRESENTER_MSG_ORIGIN = chunkI5SO5OV4_js.PRESENTATION_MESSAGE_ORIGIN;
951
- var AUDIENCE_NONCE_KEY = chunkI5SO5OV4_js.PRESENTATION_NONCE_KEY;
950
+ var PRESENTER_CHANNEL_NAME = chunkVKOVFVDJ_js.PRESENTATION_CHANNEL_NAME;
951
+ var AUDIENCE_HASH = chunkVKOVFVDJ_js.PRESENTATION_HASH;
952
+ var PRESENTER_MSG_ORIGIN = chunkVKOVFVDJ_js.PRESENTATION_MESSAGE_ORIGIN;
953
+ var AUDIENCE_NONCE_KEY = chunkVKOVFVDJ_js.PRESENTATION_NONCE_KEY;
952
954
  function generateSessionId() {
953
- return chunkI5SO5OV4_js.createPresentationSessionId();
955
+ return chunkVKOVFVDJ_js.createPresentationSessionId();
954
956
  }
955
957
  function parseAudienceNonce() {
956
958
  const hash = window.location.hash;
@@ -986,7 +988,7 @@ function usePresenterWindow(input) {
986
988
  }, []);
987
989
  const swapDisplays = React3.useCallback(async () => {
988
990
  const audience = audienceWindowRef.current;
989
- return audience && !audience.closed ? chunkI5SO5OV4_js.swapPresentationWindows(window, audience) : false;
991
+ return audience && !audience.closed ? chunkVKOVFVDJ_js.swapPresentationWindows(window, audience) : false;
990
992
  }, []);
991
993
  const syncSlideToAudience = React3.useCallback(
992
994
  (slideIndex) => {
@@ -1068,10 +1070,10 @@ function usePresenterWindow(input) {
1068
1070
  audienceWindowRef.current = blankWin;
1069
1071
  const sessionId = generateSessionId();
1070
1072
  sessionIdRef.current = sessionId;
1071
- const audienceUrl = chunkI5SO5OV4_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1072
- void chunkI5SO5OV4_js.resolveAudienceScreenPlacement(window).then((placement) => {
1073
+ const audienceUrl = chunkVKOVFVDJ_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1074
+ void chunkVKOVFVDJ_js.resolveAudienceScreenPlacement(window).then((placement) => {
1073
1075
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1074
- chunkI5SO5OV4_js.placeAudienceWindow(blankWin, placement);
1076
+ chunkVKOVFVDJ_js.placeAudienceWindow(blankWin, placement);
1075
1077
  }
1076
1078
  return void 0;
1077
1079
  });
@@ -1127,7 +1129,7 @@ function usePresenterWindow(input) {
1127
1129
  }
1128
1130
  const handleMessage = (event) => {
1129
1131
  const message = event.data;
1130
- if (chunkI5SO5OV4_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1132
+ if (chunkVKOVFVDJ_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1131
1133
  syncStateToAudience(snapshotRef.current);
1132
1134
  }
1133
1135
  };
@@ -1209,7 +1211,7 @@ function useAudienceMode(input) {
1209
1211
  }
1210
1212
  channel.onmessage = (event) => {
1211
1213
  const data = event.data;
1212
- if (!chunkI5SO5OV4_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1214
+ if (!chunkVKOVFVDJ_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1213
1215
  return;
1214
1216
  }
1215
1217
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1235,7 +1237,7 @@ function useAudienceMode(input) {
1235
1237
  };
1236
1238
  if (expectedSessionId) {
1237
1239
  channel.postMessage({
1238
- origin: chunkI5SO5OV4_js.PRESENTATION_MESSAGE_ORIGIN,
1240
+ origin: chunkVKOVFVDJ_js.PRESENTATION_MESSAGE_ORIGIN,
1239
1241
  type: "audience-ready",
1240
1242
  sessionId: expectedSessionId
1241
1243
  });
@@ -1500,7 +1502,7 @@ function handlePresentationActionImpl(action, deps) {
1500
1502
  return;
1501
1503
  }
1502
1504
  if (action.url && !actionStr.includes("hlinksldjump")) {
1503
- if (chunkI5SO5OV4_js.isUrlSafe(action.url)) {
1505
+ if (chunkVKOVFVDJ_js.isUrlSafe(action.url)) {
1504
1506
  window.open(action.url, "_blank", "noopener,noreferrer");
1505
1507
  }
1506
1508
  }
@@ -1510,7 +1512,7 @@ function handlePresentationActionImpl(action, deps) {
1510
1512
  function executeSlideTransition(nextSlideIndex, deps) {
1511
1513
  const incomingSlide = deps.slides[nextSlideIndex];
1512
1514
  const transition = incomingSlide?.transition;
1513
- const durationMs = deps.playTransition ? chunkI5SO5OV4_js.resolveTransitionDurationMs(transition) : 0;
1515
+ const durationMs = deps.playTransition ? chunkVKOVFVDJ_js.resolveTransitionDurationMs(transition) : 0;
1514
1516
  deps.clearPresentationTimers();
1515
1517
  deps.setPresentationSlideIndex(nextSlideIndex);
1516
1518
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1551,6 +1553,7 @@ function useSlideNavigation(input) {
1551
1553
  onPlayActionSound,
1552
1554
  loopContinuously,
1553
1555
  useTimings,
1556
+ onAdvancePastLastSlide,
1554
1557
  playNextAnimationGroup,
1555
1558
  clearPresentationTimers,
1556
1559
  runPresentationEntranceAnimations,
@@ -1606,6 +1609,10 @@ function useSlideNavigation(input) {
1606
1609
  setShowRehearsalSummary(true);
1607
1610
  return;
1608
1611
  }
1612
+ if (!loopContinuously && !rehearsing && direction === 1 && nextPosition >= availableSlideIndexes.length && onAdvancePastLastSlide) {
1613
+ onAdvancePastLastSlide();
1614
+ return;
1615
+ }
1609
1616
  let resolvedPosition;
1610
1617
  if (loopContinuously && !rehearsing && direction === 1 && nextPosition >= availableSlideIndexes.length) {
1611
1618
  resolvedPosition = 0;
@@ -1638,6 +1645,7 @@ function useSlideNavigation(input) {
1638
1645
  [
1639
1646
  clearPresentationTimers,
1640
1647
  loopContinuously,
1648
+ onAdvancePastLastSlide,
1641
1649
  onPlayActionSound,
1642
1650
  onSetActiveSlideIndex,
1643
1651
  onSetMode,
@@ -1744,17 +1752,17 @@ function useZoomNavigation(input) {
1744
1752
  };
1745
1753
  }
1746
1754
  function usePresenterConsole(slideIndex) {
1747
- const timerRef = React3.useRef(chunkI5SO5OV4_js.createPresenterTimer());
1748
- const [snapshot, setSnapshot] = React3.useState(() => chunkI5SO5OV4_js.createInitialPresentationSnapshot(slideIndex));
1755
+ const timerRef = React3.useRef(chunkVKOVFVDJ_js.createPresenterTimer());
1756
+ const [snapshot, setSnapshot] = React3.useState(() => chunkVKOVFVDJ_js.createInitialPresentationSnapshot(slideIndex));
1749
1757
  const patch = React3.useCallback((value) => {
1750
- setSnapshot((current) => chunkI5SO5OV4_js.mergePresentationSnapshot(current, value));
1758
+ setSnapshot((current) => chunkVKOVFVDJ_js.mergePresentationSnapshot(current, value));
1751
1759
  }, []);
1752
1760
  React3.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
1753
1761
  React3.useEffect(() => {
1754
1762
  const timer = window.setInterval(() => {
1755
1763
  patch({
1756
1764
  paused: timerRef.current.paused,
1757
- elapsedMs: chunkI5SO5OV4_js.presenterElapsed(timerRef.current)
1765
+ elapsedMs: chunkVKOVFVDJ_js.presenterElapsed(timerRef.current)
1758
1766
  });
1759
1767
  }, 1e3);
1760
1768
  return () => window.clearInterval(timer);
@@ -1764,19 +1772,19 @@ function usePresenterConsole(slideIndex) {
1764
1772
  applyAudienceSnapshot: setSnapshot,
1765
1773
  setBlackout: (blackout) => patch({ blackout }),
1766
1774
  toggleTimer: () => {
1767
- timerRef.current = chunkI5SO5OV4_js.togglePresenterTimer(timerRef.current);
1775
+ timerRef.current = chunkVKOVFVDJ_js.togglePresenterTimer(timerRef.current);
1768
1776
  patch({
1769
1777
  paused: timerRef.current.paused,
1770
- elapsedMs: chunkI5SO5OV4_js.presenterElapsed(timerRef.current)
1778
+ elapsedMs: chunkVKOVFVDJ_js.presenterElapsed(timerRef.current)
1771
1779
  });
1772
1780
  },
1773
1781
  resetTimer: () => {
1774
- timerRef.current = chunkI5SO5OV4_js.resetPresenterTimer();
1782
+ timerRef.current = chunkVKOVFVDJ_js.resetPresenterTimer();
1775
1783
  patch({ paused: false, elapsedMs: 0 });
1776
1784
  },
1777
1785
  stepZoom: (direction) => setSnapshot(
1778
- (current) => chunkI5SO5OV4_js.mergePresentationSnapshot(current, {
1779
- zoom: chunkI5SO5OV4_js.stepPresenterZoom(
1786
+ (current) => chunkVKOVFVDJ_js.mergePresentationSnapshot(current, {
1787
+ zoom: chunkVKOVFVDJ_js.stepPresenterZoom(
1780
1788
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
1781
1789
  direction
1782
1790
  )
@@ -1808,7 +1816,8 @@ function usePresentationMode(input) {
1808
1816
  onSaveRehearsalTimings,
1809
1817
  loopContinuously,
1810
1818
  showWithAnimation,
1811
- useTimings
1819
+ useTimings,
1820
+ endWithBlackSlide = true
1812
1821
  } = input;
1813
1822
  const [presentationSlideIndex, setPresentationSlideIndex] = React3.useState(0);
1814
1823
  const [presentationSlideVisible, setPresentationSlideVisible] = React3.useState(true);
@@ -1817,6 +1826,7 @@ function usePresentationMode(input) {
1817
1826
  setTransitionOverlay(null);
1818
1827
  }, []);
1819
1828
  const [presenterMode, setPresenterMode] = React3.useState(false);
1829
+ const [endOfShowVisible, setEndOfShowVisible] = React3.useState(false);
1820
1830
  const [presentationStartTime, setPresentationStartTime] = React3.useState(null);
1821
1831
  const switchingToPresenterRef = React3.useRef(false);
1822
1832
  const {
@@ -1853,8 +1863,15 @@ function usePresentationMode(input) {
1853
1863
  setPresentationStartTime,
1854
1864
  setPresenterMode
1855
1865
  });
1866
+ const handleAdvancePastLastSlide = React3.useCallback(() => {
1867
+ if (endWithBlackSlide) {
1868
+ setEndOfShowVisible(true);
1869
+ } else {
1870
+ onSetMode("edit");
1871
+ }
1872
+ }, [endWithBlackSlide, onSetMode]);
1856
1873
  const {
1857
- movePresentationSlide,
1874
+ movePresentationSlide: moveNavigationSlide,
1858
1875
  navigateToSlide,
1859
1876
  handlePresentationAction,
1860
1877
  scheduleAutoAdvanceForSlide
@@ -1870,6 +1887,7 @@ function usePresentationMode(input) {
1870
1887
  onPlayActionSound,
1871
1888
  loopContinuously,
1872
1889
  useTimings,
1890
+ onAdvancePastLastSlide: handleAdvancePastLastSlide,
1873
1891
  playNextAnimationGroup,
1874
1892
  clearPresentationTimers,
1875
1893
  runPresentationEntranceAnimations,
@@ -1878,6 +1896,19 @@ function usePresentationMode(input) {
1878
1896
  recordCurrentSlideTime,
1879
1897
  setShowRehearsalSummary
1880
1898
  });
1899
+ const movePresentationSlide = React3.useCallback(
1900
+ (direction) => {
1901
+ if (endOfShowVisible) {
1902
+ setEndOfShowVisible(false);
1903
+ if (direction === 1) {
1904
+ onSetMode("edit");
1905
+ }
1906
+ return;
1907
+ }
1908
+ moveNavigationSlide(direction);
1909
+ },
1910
+ [endOfShowVisible, moveNavigationSlide, onSetMode]
1911
+ );
1881
1912
  const { handleZoomClick, zoomReturnSlideIndex, returnToZoomSlide, clearZoomReturn } = useZoomNavigation({ navigateToSlide });
1882
1913
  const presenterConsole = usePresenterConsole(presentationSlideIndex);
1883
1914
  const {
@@ -1983,6 +2014,7 @@ function usePresentationMode(input) {
1983
2014
  } else {
1984
2015
  setTransitionOverlay(null);
1985
2016
  }
2017
+ setEndOfShowVisible(false);
1986
2018
  }, [mode]);
1987
2019
  React3.useEffect(() => {
1988
2020
  if (mode !== "present") {
@@ -2054,6 +2086,7 @@ function usePresentationMode(input) {
2054
2086
  presentationKeyframesCss,
2055
2087
  clearPresentationTimers,
2056
2088
  runPresentationEntranceAnimations,
2089
+ endOfShowVisible,
2057
2090
  movePresentationSlide,
2058
2091
  navigateToSlide,
2059
2092
  handlePresentationAction,
@@ -2107,7 +2140,7 @@ function nextStrokeId() {
2107
2140
  return `stroke-${strokeIdCounter}`;
2108
2141
  }
2109
2142
  function usePresentationAnnotations(input) {
2110
- const { isActive, activeSlideIndex } = input;
2143
+ const { isActive, activeSlideIndex, popupToolbarEnabled = true } = input;
2111
2144
  const [presentationTool, setPresentationToolState] = React3.useState("none");
2112
2145
  const [penColor, setPenColor] = React3.useState("#ff0000");
2113
2146
  const [highlighterColor, setHighlighterColor] = React3.useState("#ffff00");
@@ -2260,6 +2293,9 @@ function usePresentationAnnotations(input) {
2260
2293
  setLaserPosition(null);
2261
2294
  return;
2262
2295
  }
2296
+ if (!popupToolbarEnabled) {
2297
+ return;
2298
+ }
2263
2299
  const handleMouseMove = () => {
2264
2300
  setToolbarVisible(true);
2265
2301
  window.clearTimeout(toolbarTimerRef.current);
@@ -2272,7 +2308,7 @@ function usePresentationAnnotations(input) {
2272
2308
  window.removeEventListener("mousemove", handleMouseMove);
2273
2309
  window.clearTimeout(toolbarTimerRef.current);
2274
2310
  };
2275
- }, [isActive]);
2311
+ }, [isActive, popupToolbarEnabled]);
2276
2312
  const getAllSlideAnnotations = React3.useCallback(() => {
2277
2313
  const map = new Map(slideAnnotationsRef.current);
2278
2314
  if (annotationStrokes.length > 0) {
@@ -3292,12 +3328,12 @@ function useViewerState(input) {
3292
3328
  function partitionTemplateElements(slides) {
3293
3329
  const templateElementsBySlideId = {};
3294
3330
  const nextSlides = slides.map((slide) => {
3295
- const template = slide.elements.filter((el) => chunkI5SO5OV4_js.isTemplateElement(el));
3331
+ const template = slide.elements.filter((el) => chunkVKOVFVDJ_js.isTemplateElement(el));
3296
3332
  if (template.length === 0) {
3297
3333
  return slide;
3298
3334
  }
3299
3335
  templateElementsBySlideId[slide.id] = template;
3300
- return { ...slide, elements: slide.elements.filter((el) => !chunkI5SO5OV4_js.isTemplateElement(el)) };
3336
+ return { ...slide, elements: slide.elements.filter((el) => !chunkVKOVFVDJ_js.isTemplateElement(el)) };
3301
3337
  });
3302
3338
  return { slides: nextSlides, templateElementsBySlideId };
3303
3339
  }
@@ -3345,7 +3381,8 @@ function useLoadContent({
3345
3381
  setLoading,
3346
3382
  setError,
3347
3383
  setIsDirty,
3348
- setIsEncrypted
3384
+ setIsEncrypted,
3385
+ onContentApplied
3349
3386
  }) {
3350
3387
  const handlerRef = React3.useRef(null);
3351
3388
  const originalBufferRef = React3.useRef(null);
@@ -3382,7 +3419,7 @@ function useLoadContent({
3382
3419
  handlerRef.current = null;
3383
3420
  const mediaElements = [];
3384
3421
  for (const slide of parsed.slides) {
3385
- chunkI5SO5OV4_js.collectMediaElements(slide.elements, mediaElements);
3422
+ chunkVKOVFVDJ_js.collectMediaElements(slide.elements, mediaElements);
3386
3423
  }
3387
3424
  for (const url of mediaDataUrls.values()) {
3388
3425
  if (url.startsWith("blob:")) {
@@ -3423,7 +3460,7 @@ function useLoadContent({
3423
3460
  }
3424
3461
  })
3425
3462
  );
3426
- const { paths: imagePaths, refs: imageRefs } = chunkI5SO5OV4_js.collectImagePaths(parsed.slides);
3463
+ const { paths: imagePaths, refs: imageRefs } = chunkVKOVFVDJ_js.collectImagePaths(parsed.slides);
3427
3464
  let nextSlides = parsed.slides;
3428
3465
  if (imagePaths.size > 0) {
3429
3466
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3512,11 +3549,12 @@ function useLoadContent({
3512
3549
  setHasMacros(parsed.hasMacros === true);
3513
3550
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3514
3551
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3515
- setGuides(chunkI5SO5OV4_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3552
+ setGuides(chunkVKOVFVDJ_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3516
3553
  setActiveSlideIndex(0);
3517
3554
  clearSelection();
3518
3555
  setIsDirty(false);
3519
3556
  history.resetHistory();
3557
+ onContentApplied?.();
3520
3558
  } catch (err) {
3521
3559
  if (!cancelled && token === renderTokenRef.current) {
3522
3560
  if (err instanceof chunkKV3EOLP3_js.EncryptedFileError) {
@@ -3596,7 +3634,7 @@ function useAutosave(input) {
3596
3634
  isSavingRef.current = false;
3597
3635
  return;
3598
3636
  }
3599
- await chunkI5SO5OV4_js.saveAutosaveSnapshot(filePathRef.current, data);
3637
+ await chunkVKOVFVDJ_js.saveAutosaveSnapshot(filePathRef.current, data);
3600
3638
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3601
3639
  } catch (err) {
3602
3640
  setAutosaveStatus({
@@ -3634,7 +3672,7 @@ function useAutosave(input) {
3634
3672
 
3635
3673
  // src/viewer/utils/animation-effects.ts
3636
3674
  function getAnimationInitialStyle2(preset, nativeAnimation) {
3637
- return chunkI5SO5OV4_js.getAnimationInitialStyle(preset, nativeAnimation);
3675
+ return chunkVKOVFVDJ_js.getAnimationInitialStyle(preset, nativeAnimation);
3638
3676
  }
3639
3677
  function cn(...inputs) {
3640
3678
  return tailwindMerge.twMerge(clsx.clsx(inputs));
@@ -3656,20 +3694,20 @@ function getTextStyleForElement(element, fallbackColor) {
3656
3694
  const textDecorationStyle = isDoubleStrike ? "double" : void 0;
3657
3695
  const hasItalicRuns = element.textStyle?.italic || Boolean(element.textSegments?.some((segment) => segment.style?.italic));
3658
3696
  const isRtl = element.textStyle?.rtl === true;
3659
- const resolvedTextColor = element.textStyle?.hyperlink ? chunkI5SO5OV4_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkI5SO5OV4_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3697
+ const resolvedTextColor = element.textStyle?.hyperlink ? chunkVKOVFVDJ_js.normalizeHexColor(element.textStyle?.color, HYPERLINK_COLOR) : chunkVKOVFVDJ_js.normalizeHexColor(element.textStyle?.color, fallbackColor);
3660
3698
  const bodyTop = element.textStyle?.bodyInsetTop ?? DEFAULT_BODY_INSET_TB_PX;
3661
3699
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3662
3700
  const bodyLeft = element.textStyle?.bodyInsetLeft ?? DEFAULT_BODY_INSET_LR_PX;
3663
3701
  const bodyRight = element.textStyle?.bodyInsetRight ?? DEFAULT_BODY_INSET_LR_PX;
3664
- const writingMode = chunkI5SO5OV4_js.toCssWritingMode(element.textStyle?.textDirection);
3665
- const textOrientation = chunkI5SO5OV4_js.toCssTextOrientation(element.textStyle?.textDirection);
3666
- const verticalDirection = chunkI5SO5OV4_js.toCssVerticalDirection(element.textStyle?.textDirection);
3702
+ const writingMode = chunkVKOVFVDJ_js.toCssWritingMode(element.textStyle?.textDirection);
3703
+ const textOrientation = chunkVKOVFVDJ_js.toCssTextOrientation(element.textStyle?.textDirection);
3704
+ const verticalDirection = chunkVKOVFVDJ_js.toCssVerticalDirection(element.textStyle?.textDirection);
3667
3705
  const resolvedDirection = verticalDirection || (isRtl ? "rtl" : "ltr");
3668
3706
  const resolvedUnicodeBidi = isRtl ? "plaintext" : void 0;
3669
3707
  const hasSegments = (element.textSegments?.length ?? 0) > 0;
3670
3708
  return {
3671
3709
  color: resolvedTextColor,
3672
- backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkI5SO5OV4_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3710
+ backgroundColor: !hasSegments && element.textStyle?.highlightColor ? chunkVKOVFVDJ_js.normalizeHexColor(element.textStyle.highlightColor, void 0) : void 0,
3673
3711
  textAlign: (() => {
3674
3712
  const a = element.textStyle?.align;
3675
3713
  if (a === "justLow" || a === "dist" || a === "thaiDist") {
@@ -3685,7 +3723,7 @@ function getTextStyleForElement(element, fallbackColor) {
3685
3723
  textDecorationLine: textDecorationTokens.length > 0 ? textDecorationTokens.join(" ") : "none",
3686
3724
  textDecorationStyle,
3687
3725
  fontFamily: element.textStyle?.fontFamily || DEFAULT_FONT_FAMILY,
3688
- lineHeight: chunkI5SO5OV4_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3726
+ lineHeight: chunkVKOVFVDJ_js.resolveLineHeight(element.textStyle, hasItalicRuns),
3689
3727
  paddingTop: bodyTop + (hasItalicRuns ? 1 : 0),
3690
3728
  paddingBottom: bodyBottom + (hasItalicRuns ? 1 : 0),
3691
3729
  paddingLeft: bodyLeft + (element.textStyle?.paragraphMarginLeft || 0),
@@ -3698,7 +3736,7 @@ function getTextStyleForElement(element, fallbackColor) {
3698
3736
  // Auto-fit: use OOXML-provided fontScale/lnSpcReduction when available,
3699
3737
  // otherwise fall back to heuristic estimation. The pure font-scale maths
3700
3738
  // now lives in pptx-viewer-shared (computeAutoFitTextStyle).
3701
- ...chunkI5SO5OV4_js.computeAutoFitTextStyle({
3739
+ ...chunkVKOVFVDJ_js.computeAutoFitTextStyle({
3702
3740
  textStyle: element.textStyle,
3703
3741
  text: element.text ?? "",
3704
3742
  width: element.width,
@@ -3735,9 +3773,9 @@ function getTextLayoutStyle(element) {
3735
3773
  return {};
3736
3774
  }
3737
3775
  const verticalAlign = element.textStyle?.vAlign || "top";
3738
- const writingMode = chunkI5SO5OV4_js.toCssWritingMode(element.textStyle?.textDirection);
3739
- const textOrientation = chunkI5SO5OV4_js.toCssTextOrientation(element.textStyle?.textDirection);
3740
- const verticalDirection = chunkI5SO5OV4_js.toCssVerticalDirection(element.textStyle?.textDirection);
3776
+ const writingMode = chunkVKOVFVDJ_js.toCssWritingMode(element.textStyle?.textDirection);
3777
+ const textOrientation = chunkVKOVFVDJ_js.toCssTextOrientation(element.textStyle?.textDirection);
3778
+ const verticalDirection = chunkVKOVFVDJ_js.toCssVerticalDirection(element.textStyle?.textDirection);
3741
3779
  const parsedColumnCount = Number(element.textStyle?.columnCount);
3742
3780
  const columnCount = Number.isFinite(parsedColumnCount) ? Math.max(1, Math.min(16, Math.round(parsedColumnCount))) : 1;
3743
3781
  const hasColumns = columnCount > 1;
@@ -3754,7 +3792,7 @@ function getTextLayoutStyle(element) {
3754
3792
  const bodyBottom = element.textStyle?.bodyInsetBottom ?? DEFAULT_BODY_INSET_TB_PX;
3755
3793
  const parsedColumnSpacing = Number(element.textStyle?.columnSpacing);
3756
3794
  const columnGap = Number.isFinite(parsedColumnSpacing) && parsedColumnSpacing > 0 ? `${parsedColumnSpacing}px` : "0.75em";
3757
- const kinsokuStyles = chunkI5SO5OV4_js.getKinsokuLineBreakStyles(element.textStyle);
3795
+ const kinsokuStyles = chunkVKOVFVDJ_js.getKinsokuLineBreakStyles(element.textStyle);
3758
3796
  if (hasColumns) {
3759
3797
  return {
3760
3798
  display: "block",
@@ -3797,10 +3835,10 @@ function getTextLayoutStyle(element) {
3797
3835
 
3798
3836
  // src/viewer/utils/text-effects.tsx
3799
3837
  function buildTextFillCss2(style) {
3800
- return chunkI5SO5OV4_js.buildTextFillCss(style);
3838
+ return chunkVKOVFVDJ_js.buildTextFillCss(style);
3801
3839
  }
3802
3840
  function buildTextBody3DSceneStyle2(textStyle) {
3803
- return chunkI5SO5OV4_js.buildTextBody3DSceneStyle(textStyle);
3841
+ return chunkVKOVFVDJ_js.buildTextBody3DSceneStyle(textStyle);
3804
3842
  }
3805
3843
 
3806
3844
  // src/viewer/utils/text-warp-css.tsx
@@ -3985,17 +4023,17 @@ function wrapWithTextBuildAnimation(elementId, paraIndex, renderedSegments, para
3985
4023
  if (!subElementAnimStates || subElementAnimStates.size === 0) {
3986
4024
  return renderedSegments;
3987
4025
  }
3988
- const paraKey = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
4026
+ const paraKey = `${elementId}${chunkVKOVFVDJ_js.TEXT_BUILD_ID_SEP}p${paraIndex}`;
3989
4027
  const paraState = subElementAnimStates.get(paraKey);
3990
4028
  if (paraState) {
3991
4029
  const style = buildAnimStyle(paraState);
3992
4030
  return /* @__PURE__ */ jsxRuntime.jsx("span", { "data-anim-id": paraKey, style: { display: "inline", ...style }, children: renderedSegments }, paraKey);
3993
4031
  }
3994
- const firstWordKey = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
4032
+ const firstWordKey = `${elementId}${chunkVKOVFVDJ_js.TEXT_BUILD_ID_SEP}w${paraIndex}-0`;
3995
4033
  if (subElementAnimStates.has(firstWordKey)) {
3996
4034
  return wrapByWord(elementId, paraIndex, paraSegments, subElementAnimStates);
3997
4035
  }
3998
- const firstCharKey = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
4036
+ const firstCharKey = `${elementId}${chunkVKOVFVDJ_js.TEXT_BUILD_ID_SEP}c${paraIndex}-0`;
3999
4037
  if (subElementAnimStates.has(firstCharKey)) {
4000
4038
  return wrapByChar(elementId, paraIndex, paraSegments, subElementAnimStates);
4001
4039
  }
@@ -4016,7 +4054,7 @@ function wrapByWord(elementId, paraIndex, paraSegments, states) {
4016
4054
  nodes.push(/* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: w }, `ws-${i}`));
4017
4055
  continue;
4018
4056
  }
4019
- const key = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4057
+ const key = `${elementId}${chunkVKOVFVDJ_js.TEXT_BUILD_ID_SEP}w${paraIndex}-${wordIdx}`;
4020
4058
  const state = states.get(key);
4021
4059
  const style = buildAnimStyle(state);
4022
4060
  nodes.push(
@@ -4030,7 +4068,7 @@ function wrapByChar(elementId, paraIndex, paraSegments, states) {
4030
4068
  const fullText = paraSegments.map((e) => e.segment.text).join("");
4031
4069
  const nodes = [];
4032
4070
  for (let i = 0; i < fullText.length; i++) {
4033
- const key = `${elementId}${chunkI5SO5OV4_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4071
+ const key = `${elementId}${chunkVKOVFVDJ_js.TEXT_BUILD_ID_SEP}c${paraIndex}-${i}`;
4034
4072
  const state = states.get(key);
4035
4073
  const style = buildAnimStyle(state);
4036
4074
  nodes.push(
@@ -4043,10 +4081,10 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4043
4081
  if (!needsScriptFonts || !text) {
4044
4082
  return text;
4045
4083
  }
4046
- const runs = chunkI5SO5OV4_js.segmentByScript(text);
4084
+ const runs = chunkVKOVFVDJ_js.segmentByScript(text);
4047
4085
  if (runs.length <= 1) {
4048
4086
  if (runs.length === 1) {
4049
- const font = chunkI5SO5OV4_js.resolveFontForScript(runs[0].script, scriptFonts);
4087
+ const font = chunkVKOVFVDJ_js.resolveFontForScript(runs[0].script, scriptFonts);
4050
4088
  if (font && font !== baseFontFamily) {
4051
4089
  return /* @__PURE__ */ jsxRuntime.jsx("span", { style: { fontFamily: font }, children: text });
4052
4090
  }
@@ -4054,7 +4092,7 @@ function renderScriptAwareText(text, needsScriptFonts, scriptFonts, baseFontFami
4054
4092
  return text;
4055
4093
  }
4056
4094
  return runs.map((run, i) => {
4057
- const font = chunkI5SO5OV4_js.resolveFontForScript(run.script, scriptFonts);
4095
+ const font = chunkVKOVFVDJ_js.resolveFontForScript(run.script, scriptFonts);
4058
4096
  if (!font || font === baseFontFamily) {
4059
4097
  return /* @__PURE__ */ jsxRuntime.jsx(React3__default.default.Fragment, { children: run.text }, `${keyPrefix}-r${i}`);
4060
4098
  }
@@ -4128,8 +4166,8 @@ function renderSegmentContent(elementId, segmentIndex, textValue, lines, needsSc
4128
4166
  );
4129
4167
  }
4130
4168
  function renderEquationSegment(elementId, segmentIndex, equationXml, equationNumber) {
4131
- const mathml = chunkI5SO5OV4_js.convertOmmlToMathMl(equationXml);
4132
- const safeMathml = mathml ? chunkI5SO5OV4_js.sanitizeMathMl(mathml) : "";
4169
+ const mathml = chunkVKOVFVDJ_js.convertOmmlToMathMl(equationXml);
4170
+ const safeMathml = mathml ? chunkVKOVFVDJ_js.sanitizeMathMl(mathml) : "";
4133
4171
  const equationContent = safeMathml ? /* @__PURE__ */ jsxRuntime.jsx(
4134
4172
  "span",
4135
4173
  {
@@ -4139,7 +4177,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
4139
4177
  },
4140
4178
  dangerouslySetInnerHTML: { __html: safeMathml }
4141
4179
  }
4142
- ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunkZISXRMDJ_js.translationsEn["pptx.textSegment.equationFallback"] });
4180
+ ) : /* @__PURE__ */ jsxRuntime.jsx("span", { className: "inline-block px-1 py-0.5 rounded text-xs bg-gray-200/20 text-gray-400 italic", children: chunk2EFVXYNA_js.translationsEn["pptx.textSegment.equationFallback"] });
4143
4181
  if (equationNumber) {
4144
4182
  return /* @__PURE__ */ jsxRuntime.jsxs(
4145
4183
  "span",
@@ -4179,7 +4217,7 @@ function renderEquationSegment(elementId, segmentIndex, equationXml, equationNum
4179
4217
  return /* @__PURE__ */ jsxRuntime.jsx("span", { children: equationContent }, `${elementId}-seg-${segmentIndex}`);
4180
4218
  }
4181
4219
  function renderPictureBullet(elementId, segmentIndex, bulletInfo, baseFontSize) {
4182
- const picture = chunkI5SO5OV4_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4220
+ const picture = chunkVKOVFVDJ_js.resolvePictureBullet(bulletInfo, baseFontSize) ?? {
4183
4221
  sizePx: baseFontSize,
4184
4222
  fallbackMarker: "\u2022",
4185
4223
  accessibleLabel: "Bullet"
@@ -4229,7 +4267,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4229
4267
  );
4230
4268
  }
4231
4269
  const segmentStyle = segment.style || {};
4232
- const textValue = chunkI5SO5OV4_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4270
+ const textValue = chunkVKOVFVDJ_js.substituteFieldText(segment.text || "", segment.fieldType, fieldContext);
4233
4271
  const lines = textValue.split("\n");
4234
4272
  const textDecorationTokens = [];
4235
4273
  if (segmentStyle.underline || segmentStyle.hyperlink) {
@@ -4239,8 +4277,8 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4239
4277
  textDecorationTokens.push("line-through");
4240
4278
  }
4241
4279
  const isDoubleStrike = segmentStyle.strikethrough && segmentStyle.strikeType === "dblStrike";
4242
- const resolvedSegmentColor = segmentStyle.hyperlink ? chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4243
- const underlineDecoration = chunkI5SO5OV4_js.resolveUnderlineDecorationStyle(
4280
+ const resolvedSegmentColor = segmentStyle.hyperlink ? chunkVKOVFVDJ_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, HYPERLINK_COLOR) : chunkVKOVFVDJ_js.normalizeHexColor(segmentStyle.color || element.textStyle?.color, fallbackColor);
4281
+ const underlineDecoration = chunkVKOVFVDJ_js.resolveUnderlineDecorationStyle(
4244
4282
  Boolean(isDoubleStrike),
4245
4283
  segmentStyle.underlineStyle
4246
4284
  );
@@ -4260,7 +4298,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4260
4298
  complexScript: segmentStyle.complexScriptFont || element.textStyle?.complexScriptFont || baseFontFamily,
4261
4299
  symbol: segmentStyle.symbolFont || element.textStyle?.symbolFont || baseFontFamily
4262
4300
  };
4263
- const needsScriptFonts = chunkI5SO5OV4_js.hasDistinctScriptFonts(scriptFonts);
4301
+ const needsScriptFonts = chunkVKOVFVDJ_js.hasDistinctScriptFonts(scriptFonts);
4264
4302
  const spanStyle = {
4265
4303
  color: resolvedSegmentColor,
4266
4304
  fontSize: baseFontSize * baselineFontScale,
@@ -4274,15 +4312,15 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4274
4312
  verticalAlign: baselineShift,
4275
4313
  letterSpacing,
4276
4314
  fontKerning,
4277
- backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4315
+ backgroundColor: textFillStyles ? void 0 : segmentStyle.highlightColor ? chunkVKOVFVDJ_js.normalizeHexColor(segmentStyle.highlightColor, "transparent") : void 0,
4278
4316
  ...textFillStyles,
4279
- textDecorationColor: segmentStyle.underlineColor ? chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4280
- WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkI5SO5OV4_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4317
+ textDecorationColor: segmentStyle.underlineColor ? chunkVKOVFVDJ_js.normalizeHexColor(segmentStyle.underlineColor, void 0) : void 0,
4318
+ WebkitTextStroke: segmentStyle.textOutlineWidth && segmentStyle.textOutlineColor ? `${segmentStyle.textOutlineWidth}px ${chunkVKOVFVDJ_js.normalizeHexColor(segmentStyle.textOutlineColor, "#000000")}` : segmentStyle.textOutlineWidth ? `${segmentStyle.textOutlineWidth}px currentColor` : void 0,
4281
4319
  paintOrder: segmentStyle.textOutlineWidth ? "stroke fill" : void 0,
4282
- textShadow: chunkI5SO5OV4_js.buildTextShadowCss(segmentStyle),
4283
- filter: chunkI5SO5OV4_js.buildTextRunFilterChain(segmentStyle),
4284
- opacity: chunkI5SO5OV4_js.getTextAlphaOpacity(segmentStyle),
4285
- WebkitBoxReflect: chunkI5SO5OV4_js.buildTextReflectionCss(segmentStyle)
4320
+ textShadow: chunkVKOVFVDJ_js.buildTextShadowCss(segmentStyle),
4321
+ filter: chunkVKOVFVDJ_js.buildTextRunFilterChain(segmentStyle),
4322
+ opacity: chunkVKOVFVDJ_js.getTextAlphaOpacity(segmentStyle),
4323
+ WebkitBoxReflect: chunkVKOVFVDJ_js.buildTextReflectionCss(segmentStyle)
4286
4324
  };
4287
4325
  const runRtl = segmentStyle.rtl;
4288
4326
  if (runRtl !== void 0 && runRtl !== paragraphRtl) {
@@ -4302,7 +4340,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4302
4340
  spanStyle.fontSize = baseFontSize * (bulletInfo.sizePercent / 100) * baselineFontScale;
4303
4341
  }
4304
4342
  if (bulletInfo.color) {
4305
- spanStyle.color = chunkI5SO5OV4_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4343
+ spanStyle.color = chunkVKOVFVDJ_js.normalizeHexColor(bulletInfo.color, resolvedSegmentColor);
4306
4344
  }
4307
4345
  }
4308
4346
  if (bulletInfo?.imageDataUrl || bulletInfo?.imageRelId) {
@@ -4334,7 +4372,7 @@ function renderSingleSegment(element, segment, segmentIndex, fallbackColor, find
4334
4372
  textAlign: segment.rubyAlignment === "l" ? "left" : segment.rubyAlignment === "r" ? "right" : segment.rubyAlignment === "dist" || segment.rubyAlignment === "distCat" || segment.rubyAlignment === "distLetter" ? "justify" : "center"
4335
4373
  };
4336
4374
  if (segment.rubyStyle?.color) {
4337
- rubyStyle.color = chunkI5SO5OV4_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4375
+ rubyStyle.color = chunkVKOVFVDJ_js.normalizeHexColor(segment.rubyStyle.color, resolvedSegmentColor);
4338
4376
  }
4339
4377
  innerContent = /* @__PURE__ */ jsxRuntime.jsxs("ruby", { children: [
4340
4378
  baseContent,
@@ -4441,14 +4479,14 @@ function renderTextSegments(element, fallbackColor, emptyFallback, findHighlight
4441
4479
  return Boolean(segment.text) && segment.text.trim().length > 0;
4442
4480
  });
4443
4481
  const hasBullet = bulletInfo && !bulletInfo.none && hasVisibleTextContent;
4444
- const paraRtl = chunkI5SO5OV4_js.resolveParagraphRtl(paraSegments, elementRtl);
4482
+ const paraRtl = chunkVKOVFVDJ_js.resolveParagraphRtl(paraSegments, elementRtl);
4445
4483
  const isRtlParagraph = paraRtl === true;
4446
- const paraAlign = chunkI5SO5OV4_js.resolveParagraphAlign(paraSegments, elementAlign);
4447
- const cssTextAlign = chunkI5SO5OV4_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4484
+ const paraAlign = chunkVKOVFVDJ_js.resolveParagraphAlign(paraSegments, elementAlign);
4485
+ const cssTextAlign = chunkVKOVFVDJ_js.resolveCssTextAlign(paraAlign, isRtlParagraph);
4448
4486
  const paraMarginLeft = isRtlParagraph ? void 0 : rawMarginLeft;
4449
4487
  const paraMarginRight = isRtlParagraph ? rawMarginLeft : void 0;
4450
4488
  const paraTextIndent = rawTextIndent;
4451
- const paraKinsokuStyle = chunkI5SO5OV4_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4489
+ const paraKinsokuStyle = chunkVKOVFVDJ_js.getKinsokuLineBreakStyles(firstSeg?.segment.style);
4452
4490
  const hasParaKinsoku = Object.keys(paraKinsokuStyle).length > 0;
4453
4491
  const paraStyle = {
4454
4492
  ...paraKinsokuStyle
@@ -4648,8 +4686,8 @@ function buildLineShadowCss(element) {
4648
4686
  const offsetY = typeof ss.lineShadowOffsetY === "number" ? ss.lineShadowOffsetY : 2;
4649
4687
  const blur = typeof ss.lineShadowBlur === "number" ? Math.max(0, ss.lineShadowBlur) : 4;
4650
4688
  const opacity = typeof ss.lineShadowOpacity === "number" ? Math.max(0, Math.min(1, ss.lineShadowOpacity)) : 0.35;
4651
- return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkI5SO5OV4_js.colorWithOpacity(
4652
- chunkI5SO5OV4_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4689
+ return `${Math.round(offsetX)}px ${Math.round(offsetY)}px ${Math.round(blur)}px ${chunkVKOVFVDJ_js.colorWithOpacity(
4690
+ chunkVKOVFVDJ_js.normalizeHexColor(ss.lineShadowColor, "#000000"),
4653
4691
  opacity
4654
4692
  )}`;
4655
4693
  }
@@ -4663,7 +4701,7 @@ function buildLineGlowFilter(element) {
4663
4701
  }
4664
4702
  const glowOpacity = typeof ss.lineGlowOpacity === "number" ? ss.lineGlowOpacity : 0.75;
4665
4703
  const glowRad = Math.round(Math.max(0, ss.lineGlowRadius));
4666
- const glowCol = chunkI5SO5OV4_js.colorWithOpacity(chunkI5SO5OV4_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4704
+ const glowCol = chunkVKOVFVDJ_js.colorWithOpacity(chunkVKOVFVDJ_js.normalizeHexColor(ss.lineGlowColor, "#ffff00"), glowOpacity);
4667
4705
  return `drop-shadow(0 0 ${glowRad}px ${glowCol})`;
4668
4706
  }
4669
4707
  function mapDagBlendModeToCss(blend) {
@@ -4750,7 +4788,7 @@ function getRoundRectRadiusPx2(element) {
4750
4788
 
4751
4789
  // src/viewer/utils/shape-visual-3d.ts
4752
4790
  function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elementHeight) {
4753
- return chunkI5SO5OV4_js.build3DExtrusionData(
4791
+ return chunkVKOVFVDJ_js.build3DExtrusionData(
4754
4792
  shape3d,
4755
4793
  scene3d,
4756
4794
  fillColor,
@@ -4759,7 +4797,7 @@ function build3DExtrusionData2(shape3d, scene3d, fillColor, elementWidth, elemen
4759
4797
  );
4760
4798
  }
4761
4799
  function apply3dEffects2(base, scene3d, shape3d) {
4762
- chunkI5SO5OV4_js.apply3dEffects(base, scene3d, shape3d);
4800
+ chunkVKOVFVDJ_js.apply3dEffects(base, scene3d, shape3d);
4763
4801
  }
4764
4802
 
4765
4803
  // src/viewer/utils/shape-visual-style.ts
@@ -4768,18 +4806,18 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4768
4806
  return {};
4769
4807
  }
4770
4808
  const normalizedShapeType = getShapeType(element.shapeType);
4771
- const clipPath = chunkI5SO5OV4_js.getResolvedShapeClipPath(element);
4809
+ const clipPath = chunkVKOVFVDJ_js.getResolvedShapeClipPath(element);
4772
4810
  const fillOpacity = element.shapeStyle?.fillOpacity;
4773
4811
  const strokeOpacity = element.shapeStyle?.strokeOpacity;
4774
- const strokeDash = chunkI5SO5OV4_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4775
- const fillGradient = chunkI5SO5OV4_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4776
- const shadowCss = chunkI5SO5OV4_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4777
- const innerShadowCss = chunkI5SO5OV4_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4778
- const resolvedFillColor = chunkI5SO5OV4_js.colorWithOpacity(fillColor, fillOpacity);
4779
- const resolvedStrokeColor = chunkI5SO5OV4_js.colorWithOpacity(strokeColor, strokeOpacity);
4812
+ const strokeDash = chunkVKOVFVDJ_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
4813
+ const fillGradient = chunkVKOVFVDJ_js.buildCssGradientFromShapeStyle(element.shapeStyle) || element.shapeStyle?.fillGradient;
4814
+ const shadowCss = chunkVKOVFVDJ_js.buildShadowCssFromShapeStyle(element.shapeStyle);
4815
+ const innerShadowCss = chunkVKOVFVDJ_js.buildInnerShadowCssFromShapeStyle(element.shapeStyle);
4816
+ const resolvedFillColor = chunkVKOVFVDJ_js.colorWithOpacity(fillColor, fillOpacity);
4817
+ const resolvedStrokeColor = chunkVKOVFVDJ_js.colorWithOpacity(strokeColor, strokeOpacity);
4780
4818
  const ss = element.shapeStyle;
4781
4819
  const combinedShadowParts = [];
4782
- const multiLayerShadow = chunkI5SO5OV4_js.buildMultiLayerShadowCss(element.shapeStyle);
4820
+ const multiLayerShadow = chunkVKOVFVDJ_js.buildMultiLayerShadowCss(element.shapeStyle);
4783
4821
  if (multiLayerShadow) {
4784
4822
  combinedShadowParts.push(multiLayerShadow);
4785
4823
  } else if (shadowCss) {
@@ -4788,7 +4826,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4788
4826
  if (innerShadowCss) {
4789
4827
  combinedShadowParts.push(innerShadowCss);
4790
4828
  }
4791
- const glowBoxShadow = chunkI5SO5OV4_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4829
+ const glowBoxShadow = chunkVKOVFVDJ_js.buildGlowBoxShadow(ss?.glowColor, ss?.glowRadius, ss?.glowOpacity);
4792
4830
  if (glowBoxShadow) {
4793
4831
  combinedShadowParts.push(glowBoxShadow);
4794
4832
  }
@@ -4796,7 +4834,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4796
4834
  if (lineShadow) {
4797
4835
  combinedShadowParts.push(lineShadow);
4798
4836
  }
4799
- const compoundLineShadow = chunkI5SO5OV4_js.getCompoundLineBoxShadow(
4837
+ const compoundLineShadow = chunkVKOVFVDJ_js.getCompoundLineBoxShadow(
4800
4838
  element.shapeStyle?.compoundLine,
4801
4839
  strokeWidth,
4802
4840
  resolvedStrokeColor
@@ -4809,7 +4847,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4809
4847
  if (ss?.glowColor && ss.glowColor !== "transparent" && ss.glowRadius) {
4810
4848
  const glowOpacity = typeof ss.glowOpacity === "number" ? ss.glowOpacity : 0.75;
4811
4849
  const glowRad = Math.round(Math.max(0, ss.glowRadius));
4812
- const glowCol = chunkI5SO5OV4_js.colorWithOpacity(chunkI5SO5OV4_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
4850
+ const glowCol = chunkVKOVFVDJ_js.colorWithOpacity(chunkVKOVFVDJ_js.normalizeHexColor(ss.glowColor, "#ffff00"), glowOpacity);
4813
4851
  filterParts.push(`drop-shadow(0 0 ${glowRad}px ${glowCol})`);
4814
4852
  }
4815
4853
  if (typeof ss?.softEdgeRadius === "number" && ss.softEdgeRadius > 0) {
@@ -4822,12 +4860,12 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4822
4860
  if (lineGlowCss) {
4823
4861
  filterParts.push(lineGlowCss);
4824
4862
  }
4825
- const dagFilter = chunkI5SO5OV4_js.getEffectDagFilter(ss, element.id);
4863
+ const dagFilter = chunkVKOVFVDJ_js.getEffectDagFilter(ss, element.id);
4826
4864
  if (dagFilter) {
4827
4865
  filterParts.push(dagFilter);
4828
4866
  }
4829
4867
  const lineJoinCss = ss?.lineJoin === "round" ? "round" : ss?.lineJoin === "bevel" ? "bevel" : void 0;
4830
- const patternFill = chunkI5SO5OV4_js.buildPatternFillCss(element.shapeStyle);
4868
+ const patternFill = chunkVKOVFVDJ_js.buildPatternFillCss(element.shapeStyle);
4831
4869
  const imageFillUrl = ss?.fillMode === "image" && ss.fillImageUrl ? ss.fillImageUrl : void 0;
4832
4870
  const imageFillMode = ss?.fillImageMode || "stretch";
4833
4871
  let reflectCss;
@@ -4839,7 +4877,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4839
4877
  const endOpacity = typeof ss.reflectionEndOpacity === "number" ? ss.reflectionEndOpacity : 0;
4840
4878
  const fadeLength = typeof ss.reflectionEndPosition === "number" ? Math.round(ss.reflectionEndPosition * Math.max(element.height, 1)) : 100;
4841
4879
  const blurRadius = typeof ss.reflectionBlurRadius === "number" ? ss.reflectionBlurRadius : 0;
4842
- reflectCss = chunkI5SO5OV4_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
4880
+ reflectCss = chunkVKOVFVDJ_js.buildReflectionCss(distance, startOpacity, endOpacity, fadeLength, blurRadius);
4843
4881
  }
4844
4882
  }
4845
4883
  const base = {
@@ -4853,9 +4891,9 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4853
4891
  filter: filterParts.length > 0 ? filterParts.join(" ") : void 0,
4854
4892
  opacity: typeof ss?.dagAlphaModFix === "number" ? Math.max(0, Math.min(1, ss.dagAlphaModFix / 100)) : void 0,
4855
4893
  mixBlendMode: mapDagBlendModeToCss(ss?.dagFillOverlayBlend),
4856
- borderWidth: strokeWidth > 0 ? chunkI5SO5OV4_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
4894
+ borderWidth: strokeWidth > 0 ? chunkVKOVFVDJ_js.getCompoundLineBorderWidth(ss?.compoundLine, strokeWidth) : void 0,
4857
4895
  borderColor: strokeWidth > 0 ? resolvedStrokeColor : void 0,
4858
- borderStyle: strokeWidth > 0 ? chunkI5SO5OV4_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
4896
+ borderStyle: strokeWidth > 0 ? chunkVKOVFVDJ_js.getCssBorderDashStyle(strokeDash, ss?.compoundLine) : void 0,
4859
4897
  strokeLinejoin: lineJoinCss,
4860
4898
  strokeLinecap: ss?.lineCap === "rnd" ? "round" : ss?.lineCap === "sq" ? "square" : void 0
4861
4899
  };
@@ -4896,7 +4934,7 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4896
4934
  borderWidth: 0,
4897
4935
  borderTopWidth: Math.max(strokeWidth, 2),
4898
4936
  borderTopColor: resolvedStrokeColor,
4899
- borderTopStyle: chunkI5SO5OV4_js.getCssBorderDashStyle(strokeDash)
4937
+ borderTopStyle: chunkVKOVFVDJ_js.getCssBorderDashStyle(strokeDash)
4900
4938
  };
4901
4939
  }
4902
4940
  if (normalizedShapeType === "cylinder") {
@@ -4910,13 +4948,13 @@ function getShapeVisualStyle(element, hasFill, fillColor, strokeWidth, strokeCol
4910
4948
  function getConnectorAdjustment(element, key, fallback) {
4911
4949
  const direct = element.shapeAdjustments?.[key];
4912
4950
  if (typeof direct === "number" && Number.isFinite(direct)) {
4913
- return chunkI5SO5OV4_js.clampUnitInterval(direct / 1e5);
4951
+ return chunkVKOVFVDJ_js.clampUnitInterval(direct / 1e5);
4914
4952
  }
4915
4953
  const fallbackKey = element.shapeAdjustments?.adj;
4916
4954
  if (typeof fallbackKey === "number" && Number.isFinite(fallbackKey)) {
4917
- return chunkI5SO5OV4_js.clampUnitInterval(fallbackKey / 1e5);
4955
+ return chunkVKOVFVDJ_js.clampUnitInterval(fallbackKey / 1e5);
4918
4956
  }
4919
- return chunkI5SO5OV4_js.clampUnitInterval(fallback);
4957
+ return chunkVKOVFVDJ_js.clampUnitInterval(fallback);
4920
4958
  }
4921
4959
  function getConnectorPathGeometry(element) {
4922
4960
  const width = Math.max(element.width, 1);
@@ -5047,10 +5085,10 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5047
5085
  return null;
5048
5086
  }
5049
5087
  const normalizedType = (element.shapeType || "").toLowerCase();
5050
- const fillPaint = chunkI5SO5OV4_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5051
- const strokePaint = chunkI5SO5OV4_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5052
- const dashType = chunkI5SO5OV4_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5053
- const dashArray = chunkI5SO5OV4_js.getSvgStrokeDasharray(
5088
+ const fillPaint = chunkVKOVFVDJ_js.colorWithOpacity(fillColor, element.shapeStyle?.fillOpacity);
5089
+ const strokePaint = chunkVKOVFVDJ_js.colorWithOpacity(strokeColor, element.shapeStyle?.strokeOpacity);
5090
+ const dashType = chunkVKOVFVDJ_js.normalizeStrokeDashType(element.shapeStyle?.strokeDash);
5091
+ const dashArray = chunkVKOVFVDJ_js.getSvgStrokeDasharray(
5054
5092
  dashType,
5055
5093
  Math.max(strokeWidth, 1),
5056
5094
  element.shapeStyle?.customDashSegments
@@ -5209,8 +5247,8 @@ function renderVectorShape(element, hasFill, fillColor, strokeWidth, strokeColor
5209
5247
  const endArrowL = element.shapeStyle?.connectorEndArrowLength;
5210
5248
  const compoundLine = element.shapeStyle?.compoundLine;
5211
5249
  const hitTargetWidth = Math.max(strokeWidth * 3, 12);
5212
- const offsets = chunkI5SO5OV4_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5213
- const widths = chunkI5SO5OV4_js.getCompoundLineWidths(compoundLine, strokeWidth);
5250
+ const offsets = chunkVKOVFVDJ_js.getCompoundLineOffsets(compoundLine, strokeWidth);
5251
+ const widths = chunkVKOVFVDJ_js.getCompoundLineWidths(compoundLine, strokeWidth);
5214
5252
  return /* @__PURE__ */ jsxRuntime.jsxs(
5215
5253
  "svg",
5216
5254
  {
@@ -5273,7 +5311,7 @@ function getImageMaskStyle(element) {
5273
5311
  }
5274
5312
  const normalized = shapeType.toLowerCase();
5275
5313
  if (normalized === "roundrect" || normalized === "round1rect" || normalized === "round2samerect" || normalized === "round2diagrect" || normalized === "sniproundrect" || normalized === "snip1rect" || normalized === "snip2diagrect") {
5276
- const radiusPx = chunkI5SO5OV4_js.getRoundRectRadiusPx(element);
5314
+ const radiusPx = chunkVKOVFVDJ_js.getRoundRectRadiusPx(element);
5277
5315
  if (radiusPx <= 0.01) {
5278
5316
  return void 0;
5279
5317
  }
@@ -5285,7 +5323,7 @@ function getImageMaskStyle(element) {
5285
5323
  if (normalized === "can" || normalized === "cylinder") {
5286
5324
  return { borderRadius: "48% / 12%" };
5287
5325
  }
5288
- const clipPath = chunkI5SO5OV4_js.getResolvedShapeClipPath(element);
5326
+ const clipPath = chunkVKOVFVDJ_js.getResolvedShapeClipPath(element);
5289
5327
  if (!clipPath) {
5290
5328
  return void 0;
5291
5329
  }
@@ -5301,10 +5339,10 @@ function getImageRenderStyle(element) {
5301
5339
  objectFit: "cover"
5302
5340
  };
5303
5341
  }
5304
- const cropLeft = chunkI5SO5OV4_js.clampCropValue(element.cropLeft);
5305
- const cropTop = chunkI5SO5OV4_js.clampCropValue(element.cropTop);
5306
- const cropRight = chunkI5SO5OV4_js.clampCropValue(element.cropRight);
5307
- const cropBottom = chunkI5SO5OV4_js.clampCropValue(element.cropBottom);
5342
+ const cropLeft = chunkVKOVFVDJ_js.clampCropValue(element.cropLeft);
5343
+ const cropTop = chunkVKOVFVDJ_js.clampCropValue(element.cropTop);
5344
+ const cropRight = chunkVKOVFVDJ_js.clampCropValue(element.cropRight);
5345
+ const cropBottom = chunkVKOVFVDJ_js.clampCropValue(element.cropBottom);
5308
5346
  const hasCrop = cropLeft + cropRight > 1e-4 || cropTop + cropBottom > 1e-4;
5309
5347
  if (!hasCrop) {
5310
5348
  return {
@@ -5316,10 +5354,10 @@ function getImageRenderStyle(element) {
5316
5354
  }
5317
5355
  const safeHorizontalScale = cropLeft + cropRight >= 0.99 ? 0.99 / (cropLeft + cropRight) : 1;
5318
5356
  const safeVerticalScale = cropTop + cropBottom >= 0.99 ? 0.99 / (cropTop + cropBottom) : 1;
5319
- const normalizedLeft = chunkI5SO5OV4_js.clampCropValue(cropLeft * safeHorizontalScale);
5320
- const normalizedRight = chunkI5SO5OV4_js.clampCropValue(cropRight * safeHorizontalScale);
5321
- const normalizedTop = chunkI5SO5OV4_js.clampCropValue(cropTop * safeVerticalScale);
5322
- const normalizedBottom = chunkI5SO5OV4_js.clampCropValue(cropBottom * safeVerticalScale);
5357
+ const normalizedLeft = chunkVKOVFVDJ_js.clampCropValue(cropLeft * safeHorizontalScale);
5358
+ const normalizedRight = chunkVKOVFVDJ_js.clampCropValue(cropRight * safeHorizontalScale);
5359
+ const normalizedTop = chunkVKOVFVDJ_js.clampCropValue(cropTop * safeVerticalScale);
5360
+ const normalizedBottom = chunkVKOVFVDJ_js.clampCropValue(cropBottom * safeVerticalScale);
5323
5361
  const remainingWidth = Math.max(0.01, 1 - normalizedLeft - normalizedRight);
5324
5362
  const remainingHeight = Math.max(0.01, 1 - normalizedTop - normalizedBottom);
5325
5363
  const tx = Math.round(-normalizedLeft / remainingWidth * 1e4) / 100;
@@ -5459,9 +5497,9 @@ function parseGradientFillCss(gradFill) {
5459
5497
  }
5460
5498
  const parsed = stops.map((gs) => {
5461
5499
  const pos = Number.parseInt(String(gs["@_pos"] || "0"), 10) / 1e3;
5462
- const color = chunkI5SO5OV4_js.parseDrawingColor(gs) ?? "#888888";
5463
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(gs);
5464
- return { pos, color: chunkI5SO5OV4_js.colorWithOpacity(color, opacity) };
5500
+ const color = chunkVKOVFVDJ_js.parseDrawingColor(gs) ?? "#888888";
5501
+ const opacity = chunkVKOVFVDJ_js.parseDrawingColorOpacity(gs);
5502
+ return { pos, color: chunkVKOVFVDJ_js.colorWithOpacity(color, opacity) };
5465
5503
  }).sort((a, b) => a.pos - b.pos);
5466
5504
  const stopStrings = parsed.map((s) => `${s.color} ${s.pos.toFixed(1)}%`).join(", ");
5467
5505
  const lin = gradFill["a:lin"];
@@ -5502,8 +5540,8 @@ function parsePatternFillCss(pattFill) {
5502
5540
  if (!pattFill) {
5503
5541
  return void 0;
5504
5542
  }
5505
- const fgColor = chunkI5SO5OV4_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5506
- const bgColor = chunkI5SO5OV4_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5543
+ const fgColor = chunkVKOVFVDJ_js.parseDrawingColor(pattFill["a:fgClr"]) ?? "#000000";
5544
+ const bgColor = chunkVKOVFVDJ_js.parseDrawingColor(pattFill["a:bgClr"]) ?? "#ffffff";
5507
5545
  const preset = String(pattFill["@_prst"] || "ltDnDiag");
5508
5546
  switch (preset) {
5509
5547
  case "ltHorz":
@@ -5614,11 +5652,11 @@ function parseCellBorders(cellProperties) {
5614
5652
  const prstDash = ln["a:prstDash"];
5615
5653
  const dashVal = prstDash ? String(prstDash["@_val"] || "") : void 0;
5616
5654
  const cssBorderStyle = ooxmlDashToCss(dashVal);
5617
- const color = chunkI5SO5OV4_js.parseDrawingColor(ln["a:solidFill"]);
5655
+ const color = chunkVKOVFVDJ_js.parseDrawingColor(ln["a:solidFill"]);
5618
5656
  if (color) {
5619
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5657
+ const opacity = chunkVKOVFVDJ_js.parseDrawingColorOpacity(ln["a:solidFill"]);
5620
5658
  const key = `${edge.prefix}`;
5621
- borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkI5SO5OV4_js.colorWithOpacity(color, opacity)}`;
5659
+ borderStyle[key] = `${widthPx}px ${cssBorderStyle} ${chunkVKOVFVDJ_js.colorWithOpacity(color, opacity)}`;
5622
5660
  }
5623
5661
  }
5624
5662
  return borderStyle;
@@ -5631,7 +5669,7 @@ function parseCellTextEffects(runProps) {
5631
5669
  const textShadowParts = [];
5632
5670
  const outerShdw = effectLst["a:outerShdw"];
5633
5671
  if (outerShdw) {
5634
- const shdwColor = chunkI5SO5OV4_js.parseDrawingColor(outerShdw);
5672
+ const shdwColor = chunkVKOVFVDJ_js.parseDrawingColor(outerShdw);
5635
5673
  if (shdwColor) {
5636
5674
  const blurRad = Number.parseInt(String(outerShdw["@_blurRad"] || "0"), 10);
5637
5675
  const blurPx = blurRad > 0 ? Math.round(blurRad / 12700) : 0;
@@ -5649,7 +5687,7 @@ function parseCellTextEffects(runProps) {
5649
5687
  }
5650
5688
  const glow = effectLst["a:glow"];
5651
5689
  if (glow) {
5652
- const glowColor = chunkI5SO5OV4_js.parseDrawingColor(glow);
5690
+ const glowColor = chunkVKOVFVDJ_js.parseDrawingColor(glow);
5653
5691
  if (glowColor) {
5654
5692
  const glowRad = Number.parseInt(String(glow["@_rad"] || "0"), 10);
5655
5693
  const glowPx = glowRad > 0 ? Math.round(glowRad / 12700) : 2;
@@ -5728,10 +5766,10 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5728
5766
  if (runProps?.["@_u"] !== void 0) {
5729
5767
  cellStyle.textDecorationLine = runProps["@_u"] === "sng" ? "underline" : "none";
5730
5768
  }
5731
- const runColor = chunkI5SO5OV4_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkI5SO5OV4_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5769
+ const runColor = chunkVKOVFVDJ_js.parseDrawingColor(runProps?.["a:solidFill"], schemeColorOverrides) || chunkVKOVFVDJ_js.parseDrawingColor(runProps?.["a:highlight"], schemeColorOverrides);
5732
5770
  if (runColor) {
5733
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5734
- cellStyle.color = chunkI5SO5OV4_js.colorWithOpacity(runColor, opacity);
5771
+ const opacity = chunkVKOVFVDJ_js.parseDrawingColorOpacity(runProps?.["a:solidFill"]);
5772
+ cellStyle.color = chunkVKOVFVDJ_js.colorWithOpacity(runColor, opacity);
5735
5773
  }
5736
5774
  const fontFamily = runProps?.["a:latin"]?.["@_typeface"] || runProps?.["a:ea"]?.["@_typeface"] || runProps?.["a:cs"]?.["@_typeface"];
5737
5775
  if (fontFamily) {
@@ -5741,15 +5779,15 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5741
5779
  cellStyle.textAlign = parseParagraphAlignment(paragraphProperties["@_algn"]);
5742
5780
  }
5743
5781
  const cellProperties = cellXml["a:tcPr"];
5744
- const cellFill = chunkI5SO5OV4_js.parseDrawingColor(
5782
+ const cellFill = chunkVKOVFVDJ_js.parseDrawingColor(
5745
5783
  cellProperties?.["a:solidFill"],
5746
5784
  schemeColorOverrides
5747
5785
  );
5748
5786
  if (cellFill) {
5749
- const opacity = chunkI5SO5OV4_js.parseDrawingColorOpacity(
5787
+ const opacity = chunkVKOVFVDJ_js.parseDrawingColorOpacity(
5750
5788
  cellProperties?.["a:solidFill"]
5751
5789
  );
5752
- cellStyle.backgroundColor = chunkI5SO5OV4_js.colorWithOpacity(cellFill, opacity);
5790
+ cellStyle.backgroundColor = chunkVKOVFVDJ_js.colorWithOpacity(cellFill, opacity);
5753
5791
  } else {
5754
5792
  const gradCss = parseGradientFillCss(cellProperties?.["a:gradFill"]);
5755
5793
  if (gradCss) {
@@ -5764,16 +5802,16 @@ function extractTableCellStyle(cellXml, fallbackStyle, schemeColorOverrides) {
5764
5802
  const edgeBorders = parseCellBorders(cellProperties);
5765
5803
  Object.assign(cellStyle, edgeBorders);
5766
5804
  if (!cellStyle.borderLeftColor && !cellStyle.borderRightColor && !cellStyle.borderTopColor && !cellStyle.borderBottomColor) {
5767
- const borderColor = chunkI5SO5OV4_js.parseDrawingColor(
5805
+ const borderColor = chunkVKOVFVDJ_js.parseDrawingColor(
5768
5806
  cellProperties?.["a:lnL"]?.["a:solidFill"],
5769
5807
  schemeColorOverrides
5770
- ) || chunkI5SO5OV4_js.parseDrawingColor(
5808
+ ) || chunkVKOVFVDJ_js.parseDrawingColor(
5771
5809
  cellProperties?.["a:lnR"]?.["a:solidFill"],
5772
5810
  schemeColorOverrides
5773
- ) || chunkI5SO5OV4_js.parseDrawingColor(
5811
+ ) || chunkVKOVFVDJ_js.parseDrawingColor(
5774
5812
  cellProperties?.["a:lnT"]?.["a:solidFill"],
5775
5813
  schemeColorOverrides
5776
- ) || chunkI5SO5OV4_js.parseDrawingColor(
5814
+ ) || chunkVKOVFVDJ_js.parseDrawingColor(
5777
5815
  cellProperties?.["a:lnB"]?.["a:solidFill"],
5778
5816
  schemeColorOverrides
5779
5817
  );
@@ -5852,10 +5890,10 @@ function resolveTableStyleFillColor(fill, colorScheme) {
5852
5890
  }
5853
5891
  let color = base;
5854
5892
  if (fill.tint !== void 0 && fill.tint > 0) {
5855
- color = chunkI5SO5OV4_js.tintColor2(color, fill.tint / 1e5);
5893
+ color = chunkVKOVFVDJ_js.tintColor2(color, fill.tint / 1e5);
5856
5894
  }
5857
5895
  if (fill.shade !== void 0 && fill.shade > 0) {
5858
- color = chunkI5SO5OV4_js.shadeColor2(color, 1 - fill.shade / 1e5);
5896
+ color = chunkVKOVFVDJ_js.shadeColor2(color, 1 - fill.shade / 1e5);
5859
5897
  }
5860
5898
  return color;
5861
5899
  }
@@ -5877,10 +5915,10 @@ function applyTableStyleText(text, colorScheme, style) {
5877
5915
  if (base) {
5878
5916
  let color = base;
5879
5917
  if (text.fontTint !== void 0 && text.fontTint > 0) {
5880
- color = chunkI5SO5OV4_js.tintColor2(color, text.fontTint / 1e5);
5918
+ color = chunkVKOVFVDJ_js.tintColor2(color, text.fontTint / 1e5);
5881
5919
  }
5882
5920
  if (text.fontShade !== void 0 && text.fontShade > 0) {
5883
- color = chunkI5SO5OV4_js.shadeColor2(color, 1 - text.fontShade / 1e5);
5921
+ color = chunkVKOVFVDJ_js.shadeColor2(color, 1 - text.fontShade / 1e5);
5884
5922
  }
5885
5923
  style.color = color;
5886
5924
  applied = true;
@@ -6162,9 +6200,9 @@ function cellStyleToCss(style) {
6162
6200
  if (style.gradientFillCss) {
6163
6201
  css.background = style.gradientFillCss;
6164
6202
  } else if (style.fillMode === "pattern" && style.patternFillPreset) {
6165
- const fg = chunkI5SO5OV4_js.normalizeHexColor(style.patternFillForeground, "#000000");
6166
- const bg = chunkI5SO5OV4_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6167
- const svgPattern = chunkI5SO5OV4_js.getPatternSvg(style.patternFillPreset, fg, bg);
6203
+ const fg = chunkVKOVFVDJ_js.normalizeHexColor(style.patternFillForeground, "#000000");
6204
+ const bg = chunkVKOVFVDJ_js.normalizeHexColor(style.patternFillBackground, "#ffffff");
6205
+ const svgPattern = chunkVKOVFVDJ_js.getPatternSvg(style.patternFillPreset, fg, bg);
6168
6206
  if (svgPattern) {
6169
6207
  const encoded = encodeURIComponent(svgPattern);
6170
6208
  css.backgroundImage = `url("data:image/svg+xml,${encoded}")`;
@@ -6233,7 +6271,7 @@ function cellStyleToCss(style) {
6233
6271
  if (edge.width || edge.color) {
6234
6272
  const w = edge.width ?? 1;
6235
6273
  const c = edge.color ?? style.borderColor ?? "#000000";
6236
- const s = chunkI5SO5OV4_js.ooxmlDashToCssBorderStyle(edge.dash);
6274
+ const s = chunkVKOVFVDJ_js.ooxmlDashToCssBorderStyle(edge.dash);
6237
6275
  css[edge.prefix] = `${w}px ${s} ${c}`;
6238
6276
  }
6239
6277
  }
@@ -6275,7 +6313,7 @@ function TableResizeOverlay({
6275
6313
  const containerRef = React3.useRef(null);
6276
6314
  const [rowBounds, setRowBounds] = React3.useState([]);
6277
6315
  const dragRef = React3.useRef(null);
6278
- const colBoundaries = React3.useMemo(() => chunkI5SO5OV4_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6316
+ const colBoundaries = React3.useMemo(() => chunkVKOVFVDJ_js.computeColumnBoundaries(columnWidths), [columnWidths]);
6279
6317
  const measureRows = React3.useCallback(() => {
6280
6318
  const container = containerRef.current;
6281
6319
  if (!container) {
@@ -6322,11 +6360,11 @@ function TableResizeOverlay({
6322
6360
  const rect = containerRef.current.getBoundingClientRect();
6323
6361
  if (drag.type === "col" && drag.initialWidths && onResizeColumns) {
6324
6362
  const deltaProp = (e.clientX - drag.startPos) / rect.width;
6325
- onResizeColumns(chunkI5SO5OV4_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6363
+ onResizeColumns(chunkVKOVFVDJ_js.computeResizedColumnWidths(drag.initialWidths, drag.index, deltaProp));
6326
6364
  } else if (drag.type === "row" && onResizeRow) {
6327
6365
  const deltaY = e.clientY - drag.startPos;
6328
- const newHeight = chunkI5SO5OV4_js.computeResizedRowHeight(
6329
- drag.initialRowHeight ?? chunkI5SO5OV4_js.DEFAULT_ROW_HEIGHT,
6366
+ const newHeight = chunkVKOVFVDJ_js.computeResizedRowHeight(
6367
+ drag.initialRowHeight ?? chunkVKOVFVDJ_js.DEFAULT_ROW_HEIGHT,
6330
6368
  deltaY
6331
6369
  );
6332
6370
  onResizeRow(drag.index, newHeight);
@@ -6364,7 +6402,7 @@ function TableResizeOverlay({
6364
6402
  e.stopPropagation();
6365
6403
  const table = containerRef.current?.querySelector("table");
6366
6404
  const tr = table?.querySelectorAll("tbody > tr")[index];
6367
- const actualHeight = tr?.offsetHeight ?? chunkI5SO5OV4_js.DEFAULT_ROW_HEIGHT;
6405
+ const actualHeight = tr?.offsetHeight ?? chunkVKOVFVDJ_js.DEFAULT_ROW_HEIGHT;
6368
6406
  document.body.style.cursor = "row-resize";
6369
6407
  document.body.style.userSelect = "none";
6370
6408
  dragRef.current = {
@@ -6410,7 +6448,7 @@ function renderTableFromTableData(element, textStyle, options) {
6410
6448
  }
6411
6449
  const first = selectedCell.selectedCells[0];
6412
6450
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6413
- return chunkI5SO5OV4_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6451
+ return chunkVKOVFVDJ_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableData);
6414
6452
  })();
6415
6453
  return /* @__PURE__ */ jsxRuntime.jsx(
6416
6454
  TableResizeOverlay,
@@ -6443,7 +6481,7 @@ function renderTableFromTableData(element, textStyle, options) {
6443
6481
  return null;
6444
6482
  }
6445
6483
  const isCellSelected = selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex;
6446
- const isInMultiSelection = chunkI5SO5OV4_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6484
+ const isInMultiSelection = chunkVKOVFVDJ_js.isCellInRect(rowIndex, cellIndex, selectionRect);
6447
6485
  const isCellEditing = isCellSelected && selectedCell?.isEditing;
6448
6486
  return /* @__PURE__ */ jsxRuntime.jsx(
6449
6487
  "td",
@@ -6466,7 +6504,7 @@ function renderTableFromTableData(element, textStyle, options) {
6466
6504
  }
6467
6505
  event.stopPropagation();
6468
6506
  if (event.shiftKey && selectedCell) {
6469
- const rect = chunkI5SO5OV4_js.computeSelectionRect(
6507
+ const rect = chunkVKOVFVDJ_js.computeSelectionRect(
6470
6508
  selectedCell.rowIndex,
6471
6509
  selectedCell.columnIndex,
6472
6510
  rowIndex,
@@ -6476,7 +6514,7 @@ function renderTableFromTableData(element, textStyle, options) {
6476
6514
  options?.onSelectCell?.({
6477
6515
  rowIndex: selectedCell.rowIndex,
6478
6516
  columnIndex: selectedCell.columnIndex,
6479
- selectedCells: chunkI5SO5OV4_js.rectToCells(rect)
6517
+ selectedCells: chunkVKOVFVDJ_js.rectToCells(rect)
6480
6518
  });
6481
6519
  } else {
6482
6520
  options?.onSelectCell?.({
@@ -6535,7 +6573,7 @@ function renderTableElement(element, textStyle, options) {
6535
6573
  if (tableEl2.tableData && tableEl2.tableData.rows.length > 0) {
6536
6574
  return renderTableFromTableData(tableEl2, textStyle, options);
6537
6575
  }
6538
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkZISXRMDJ_js.translationsEn["pptx.table.title"] });
6576
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk2EFVXYNA_js.translationsEn["pptx.table.title"] });
6539
6577
  }
6540
6578
  const selectedCell = options?.selectedCell || null;
6541
6579
  const isEditable2 = Boolean(options?.editable);
@@ -6550,7 +6588,7 @@ function renderTableElement(element, textStyle, options) {
6550
6588
  }
6551
6589
  const first = selectedCell.selectedCells[0];
6552
6590
  const last = selectedCell.selectedCells[selectedCell.selectedCells.length - 1];
6553
- return chunkI5SO5OV4_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6591
+ return chunkVKOVFVDJ_js.computeSelectionRect(first.row, first.col, last.row, last.col, tableEl.tableData);
6554
6592
  })();
6555
6593
  const schemeOverrides = options?.styleCtx?.theme?.colorScheme ? options.styleCtx.theme.colorScheme : void 0;
6556
6594
  return /* @__PURE__ */ jsxRuntime.jsx(
@@ -6615,7 +6653,7 @@ function renderTableElement(element, textStyle, options) {
6615
6653
  "border px-1 py-0.5 align-top",
6616
6654
  isEditable2 && hasCellSelectionHandler ? "border-blue-200/70 cursor-cell" : "border-white/30",
6617
6655
  selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex ? "ring-1 ring-inset ring-blue-500" : null,
6618
- chunkI5SO5OV4_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6656
+ chunkVKOVFVDJ_js.isCellInRect(rowIndex, cellIndex, xmlSelectionRect) && !(selectedCell?.rowIndex === rowIndex && selectedCell?.columnIndex === cellIndex) ? "bg-blue-500/15 ring-1 ring-inset ring-blue-400/50" : null
6619
6657
  ),
6620
6658
  colSpan,
6621
6659
  rowSpan: rSpan,
@@ -6626,7 +6664,7 @@ function renderTableElement(element, textStyle, options) {
6626
6664
  }
6627
6665
  event.stopPropagation();
6628
6666
  if (event.shiftKey && selectedCell && tableEl.tableData) {
6629
- const rect = chunkI5SO5OV4_js.computeSelectionRect(
6667
+ const rect = chunkVKOVFVDJ_js.computeSelectionRect(
6630
6668
  selectedCell.rowIndex,
6631
6669
  selectedCell.columnIndex,
6632
6670
  rowIndex,
@@ -6636,7 +6674,7 @@ function renderTableElement(element, textStyle, options) {
6636
6674
  options?.onSelectCell?.({
6637
6675
  rowIndex: selectedCell.rowIndex,
6638
6676
  columnIndex: selectedCell.columnIndex,
6639
- selectedCells: chunkI5SO5OV4_js.rectToCells(rect)
6677
+ selectedCells: chunkVKOVFVDJ_js.rectToCells(rect)
6640
6678
  });
6641
6679
  } else {
6642
6680
  options?.onSelectCell?.({
@@ -6688,24 +6726,24 @@ function renderTableElement(element, textStyle, options) {
6688
6726
  }
6689
6727
  var LEGEND_ITEM_WIDTH = 80;
6690
6728
  function partAttrs(part) {
6691
- return part ? chunkI5SO5OV4_js.chartPartToAttrs(part) : void 0;
6729
+ return part ? chunkVKOVFVDJ_js.chartPartToAttrs(part) : void 0;
6692
6730
  }
6693
6731
  function resolveReactPalette(chartData) {
6694
6732
  if (chartData.colorPalette && chartData.colorPalette.length > 0) {
6695
6733
  return chartData.colorPalette;
6696
6734
  }
6697
- return [...chunkI5SO5OV4_js.getChartStylePalette(chartData.style?.styleId)];
6735
+ return [...chunkVKOVFVDJ_js.getChartStylePalette(chartData.style?.styleId)];
6698
6736
  }
6699
6737
  function buildReactChartViewModel(element) {
6700
6738
  if (element.type !== "chart" || !element.chartData) {
6701
- return chunkI5SO5OV4_js.buildChartViewModel(element);
6739
+ return chunkVKOVFVDJ_js.buildChartViewModel(element);
6702
6740
  }
6703
6741
  const palette = resolveReactPalette(element.chartData);
6704
6742
  const themedElement = {
6705
6743
  ...element,
6706
6744
  chartData: { ...element.chartData, colorPalette: palette }
6707
6745
  };
6708
- return chunkI5SO5OV4_js.buildChartViewModel(themedElement);
6746
+ return chunkVKOVFVDJ_js.buildChartViewModel(themedElement);
6709
6747
  }
6710
6748
  function renderPrimitive(prim, key) {
6711
6749
  switch (prim.kind) {
@@ -7094,7 +7132,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7094
7132
  const unmatchedRows = [];
7095
7133
  categories.forEach((cat, i) => {
7096
7134
  const value = values[i] ?? 0;
7097
- const code = chunkI5SO5OV4_js.resolveRegionCode(cat);
7135
+ const code = chunkVKOVFVDJ_js.resolveRegionCode(cat);
7098
7136
  if (code) {
7099
7137
  regionValueMap.set(code, { value, label: cat });
7100
7138
  } else {
@@ -7132,8 +7170,8 @@ function renderMapChart(element, chartData, categoryLabels) {
7132
7170
  let fill = "#e2e8f0";
7133
7171
  let dataLabel = null;
7134
7172
  if (entry) {
7135
- const t = chunkI5SO5OV4_js.normalizeValue(entry.value, minVal, maxVal);
7136
- fill = chunkI5SO5OV4_js.sequentialColorScale(t);
7173
+ const t = chunkVKOVFVDJ_js.normalizeValue(entry.value, minVal, maxVal);
7174
+ fill = chunkVKOVFVDJ_js.sequentialColorScale(t);
7137
7175
  dataLabel = /* @__PURE__ */ jsxRuntime.jsx(
7138
7176
  "text",
7139
7177
  {
@@ -7144,7 +7182,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7144
7182
  fontWeight: 600,
7145
7183
  fill: "#1e293b",
7146
7184
  style: { pointerEvents: "none" },
7147
- children: chunkI5SO5OV4_js.formatAxisValue(entry.value)
7185
+ children: chunkVKOVFVDJ_js.formatAxisValue(entry.value)
7148
7186
  },
7149
7187
  `${element.id}-map-dl-${region.code}`
7150
7188
  );
@@ -7162,7 +7200,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7162
7200
  opacity: 0.9,
7163
7201
  children: /* @__PURE__ */ jsxRuntime.jsxs("title", { children: [
7164
7202
  region.name,
7165
- entry ? `: ${chunkI5SO5OV4_js.formatAxisValue(entry.value)}` : ""
7203
+ entry ? `: ${chunkVKOVFVDJ_js.formatAxisValue(entry.value)}` : ""
7166
7204
  ] })
7167
7205
  }
7168
7206
  ),
@@ -7200,7 +7238,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7200
7238
  fontSize: 7,
7201
7239
  fill: "#64748b",
7202
7240
  textAnchor: "middle",
7203
- children: chunkI5SO5OV4_js.formatAxisValue(minVal)
7241
+ children: chunkVKOVFVDJ_js.formatAxisValue(minVal)
7204
7242
  },
7205
7243
  `${element.id}-map-legend-min`
7206
7244
  ),
@@ -7212,7 +7250,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7212
7250
  fontSize: 7,
7213
7251
  fill: "#64748b",
7214
7252
  textAnchor: "middle",
7215
- children: chunkI5SO5OV4_js.formatAxisValue(maxVal)
7253
+ children: chunkVKOVFVDJ_js.formatAxisValue(maxVal)
7216
7254
  },
7217
7255
  `${element.id}-map-legend-max`
7218
7256
  )
@@ -7231,7 +7269,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7231
7269
  textAnchor: "middle",
7232
7270
  fontSize: 7,
7233
7271
  fill: "#94a3b8",
7234
- children: chunkZISXRMDJ_js.translationsEn["pptx.chart.additionalRegionsFallback"]
7272
+ children: chunk2EFVXYNA_js.translationsEn["pptx.chart.additionalRegionsFallback"]
7235
7273
  },
7236
7274
  `${element.id}-map-ft-hdr`
7237
7275
  )
@@ -7278,7 +7316,7 @@ function renderMapChart(element, chartData, categoryLabels) {
7278
7316
  y,
7279
7317
  fontSize,
7280
7318
  fill: "#475569",
7281
- children: chunkI5SO5OV4_js.formatAxisValue(row.value)
7319
+ children: chunkVKOVFVDJ_js.formatAxisValue(row.value)
7282
7320
  },
7283
7321
  `${element.id}-map-ft-val-${i}`
7284
7322
  )
@@ -7349,7 +7387,7 @@ function renderStackedBarChart(element, _chartData, _categoryLabels) {
7349
7387
 
7350
7388
  // src/viewer/utils/chart-overlay-utils.ts
7351
7389
  function sColor(series, idx) {
7352
- return chunkI5SO5OV4_js.seriesColor(series, idx);
7390
+ return chunkVKOVFVDJ_js.seriesColor(series, idx);
7353
7391
  }
7354
7392
  function valToY(val, range, topY, bottomY) {
7355
7393
  const usable = bottomY - topY;
@@ -7844,7 +7882,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
7844
7882
  width: 10,
7845
7883
  height: 10,
7846
7884
  rx: 2,
7847
- fill: chunkI5SO5OV4_js.seriesColor(s, i, style?.styleId, colorPalette)
7885
+ fill: chunkVKOVFVDJ_js.seriesColor(s, i, style?.styleId, colorPalette)
7848
7886
  },
7849
7887
  `${id}-leg-r-${i}`
7850
7888
  )
@@ -7868,7 +7906,7 @@ function renderLegend(id, style, series, layout, colorPalette) {
7868
7906
  width: 10,
7869
7907
  height: 10,
7870
7908
  rx: 2,
7871
- fill: chunkI5SO5OV4_js.seriesColor(s, i, style?.styleId, colorPalette)
7909
+ fill: chunkVKOVFVDJ_js.seriesColor(s, i, style?.styleId, colorPalette)
7872
7910
  }
7873
7911
  ),
7874
7912
  /* @__PURE__ */ jsxRuntime.jsx("text", { x: x + 14, y: cy + 8, fontSize: 9, fill: "#475569", children: s.name || `Series ${i + 1}` })
@@ -7881,9 +7919,9 @@ function renderGridlines(id, style, range, layout) {
7881
7919
  }
7882
7920
  const lines = [];
7883
7921
  if (range.logScale && range.logBase) {
7884
- const ticks = chunkI5SO5OV4_js.generateLogTicks(range);
7922
+ const ticks = chunkVKOVFVDJ_js.generateLogTicks(range);
7885
7923
  ticks.forEach((tickVal, i) => {
7886
- const y = chunkI5SO5OV4_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7924
+ const y = chunkVKOVFVDJ_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7887
7925
  lines.push(
7888
7926
  /* @__PURE__ */ jsxRuntime.jsx(
7889
7927
  "line",
@@ -7904,7 +7942,7 @@ function renderGridlines(id, style, range, layout) {
7904
7942
  const steps = 4;
7905
7943
  for (let i = 0; i <= steps; i++) {
7906
7944
  const val = range.min + range.span * i / steps;
7907
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7945
+ const y = chunkVKOVFVDJ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7908
7946
  lines.push(
7909
7947
  /* @__PURE__ */ jsxRuntime.jsx(
7910
7948
  "line",
@@ -7928,9 +7966,9 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7928
7966
  const labels = [];
7929
7967
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
7930
7968
  if (range.logScale && range.logBase) {
7931
- const ticks = chunkI5SO5OV4_js.generateLogTicks(range);
7969
+ const ticks = chunkVKOVFVDJ_js.generateLogTicks(range);
7932
7970
  ticks.forEach((tickVal, i) => {
7933
- const y = chunkI5SO5OV4_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7971
+ const y = chunkVKOVFVDJ_js.valueToY(tickVal, range, layout.plotTop, layout.plotBottom);
7934
7972
  labels.push(
7935
7973
  /* @__PURE__ */ jsxRuntime.jsx(
7936
7974
  "text",
@@ -7940,7 +7978,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7940
7978
  textAnchor: "end",
7941
7979
  fontSize: 8,
7942
7980
  fill: "#64748b",
7943
- children: hasDisplayUnits ? chunkI5SO5OV4_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkI5SO5OV4_js.formatAxisValue(tickVal)
7981
+ children: hasDisplayUnits ? chunkVKOVFVDJ_js.formatAxisValueWithUnits(tickVal, axisFormatting) : chunkVKOVFVDJ_js.formatAxisValue(tickVal)
7944
7982
  },
7945
7983
  `${id}-vaxis-log-${i}`
7946
7984
  )
@@ -7950,7 +7988,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7950
7988
  const steps = 4;
7951
7989
  for (let i = 0; i <= steps; i++) {
7952
7990
  const val = range.min + range.span * i / steps;
7953
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7991
+ const y = chunkVKOVFVDJ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
7954
7992
  labels.push(
7955
7993
  /* @__PURE__ */ jsxRuntime.jsx(
7956
7994
  "text",
@@ -7960,7 +7998,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7960
7998
  textAnchor: "end",
7961
7999
  fontSize: 8,
7962
8000
  fill: "#64748b",
7963
- children: hasDisplayUnits ? chunkI5SO5OV4_js.formatAxisValueWithUnits(val, axisFormatting) : chunkI5SO5OV4_js.formatAxisValue(val)
8001
+ children: hasDisplayUnits ? chunkVKOVFVDJ_js.formatAxisValueWithUnits(val, axisFormatting) : chunkVKOVFVDJ_js.formatAxisValue(val)
7964
8002
  },
7965
8003
  `${id}-vaxis-${i}`
7966
8004
  )
@@ -7968,7 +8006,7 @@ function renderValueAxis(id, range, layout, axisFormatting) {
7968
8006
  }
7969
8007
  }
7970
8008
  if (hasDisplayUnits) {
7971
- const unitLabel = chunkI5SO5OV4_js.getDisplayUnitLabel(
8009
+ const unitLabel = chunkVKOVFVDJ_js.getDisplayUnitLabel(
7972
8010
  axisFormatting.displayUnits,
7973
8011
  axisFormatting.displayUnitsLabel
7974
8012
  );
@@ -8043,7 +8081,7 @@ function renderZeroLine(id, range, layout) {
8043
8081
  if (range.min >= 0) {
8044
8082
  return null;
8045
8083
  }
8046
- const y = chunkI5SO5OV4_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8084
+ const y = chunkVKOVFVDJ_js.valueToY(0, range, layout.plotTop, layout.plotBottom);
8047
8085
  return /* @__PURE__ */ jsxRuntime.jsx(
8048
8086
  "line",
8049
8087
  {
@@ -8067,7 +8105,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8067
8105
  const hasDisplayUnits = Boolean(axisFormatting?.displayUnits);
8068
8106
  for (let i = 0; i <= steps; i++) {
8069
8107
  const val = range.min + range.span * i / steps;
8070
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8108
+ const y = chunkVKOVFVDJ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8071
8109
  labels.push(
8072
8110
  /* @__PURE__ */ jsxRuntime.jsx(
8073
8111
  "text",
@@ -8079,7 +8117,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8079
8117
  fontFamily,
8080
8118
  fontWeight,
8081
8119
  fill: fontColor,
8082
- children: hasDisplayUnits ? chunkI5SO5OV4_js.formatAxisValueWithUnits(val, axisFormatting) : chunkI5SO5OV4_js.formatAxisValue(val)
8120
+ children: hasDisplayUnits ? chunkVKOVFVDJ_js.formatAxisValueWithUnits(val, axisFormatting) : chunkVKOVFVDJ_js.formatAxisValue(val)
8083
8121
  },
8084
8122
  `${id}-sec-vaxis-${i}`
8085
8123
  )
@@ -8103,7 +8141,7 @@ function renderSecondaryValueAxis(id, range, layout, axisFormatting) {
8103
8141
  );
8104
8142
  }
8105
8143
  if (hasDisplayUnits) {
8106
- const unitLabel = chunkI5SO5OV4_js.getDisplayUnitLabel(
8144
+ const unitLabel = chunkVKOVFVDJ_js.getDisplayUnitLabel(
8107
8145
  axisFormatting.displayUnits,
8108
8146
  axisFormatting.displayUnitsLabel
8109
8147
  );
@@ -8134,7 +8172,7 @@ function renderSecondaryAxisTicks(id, range, layout) {
8134
8172
  const ticks = [];
8135
8173
  for (let i = 0; i <= steps; i++) {
8136
8174
  const val = range.min + range.span * i / steps;
8137
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8175
+ const y = chunkVKOVFVDJ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8138
8176
  ticks.push(
8139
8177
  /* @__PURE__ */ jsxRuntime.jsx(
8140
8178
  "line",
@@ -8161,7 +8199,7 @@ function renderSecondaryGridlines(id, range, layout, axisFormatting) {
8161
8199
  const gridColor = axisFormatting.majorGridlinesSpPr?.strokeColor ?? "#e2e8f0";
8162
8200
  for (let i = 0; i <= steps; i++) {
8163
8201
  const val = range.min + range.span * i / steps;
8164
- const y = chunkI5SO5OV4_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8202
+ const y = chunkVKOVFVDJ_js.valueToY(val, range, layout.plotTop, layout.plotBottom);
8165
8203
  lines.push(
8166
8204
  /* @__PURE__ */ jsxRuntime.jsx(
8167
8205
  "line",
@@ -8278,7 +8316,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8278
8316
  showK && /* @__PURE__ */ jsxRuntime.jsx(
8279
8317
  "th",
8280
8318
  {
8281
- "aria-label": chunkZISXRMDJ_js.translationsEn["pptx.chart.rowLabelsAria"],
8319
+ "aria-label": chunk2EFVXYNA_js.translationsEn["pptx.chart.rowLabelsAria"],
8282
8320
  style: {
8283
8321
  padding: "1px 4px",
8284
8322
  fontWeight: 400,
@@ -8322,7 +8360,7 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8322
8360
  width: 8,
8323
8361
  height: 8,
8324
8362
  borderRadius: 2,
8325
- backgroundColor: chunkI5SO5OV4_js.seriesColor(
8363
+ backgroundColor: chunkVKOVFVDJ_js.seriesColor(
8326
8364
  s,
8327
8365
  si,
8328
8366
  chartData.style?.styleId,
@@ -8361,8 +8399,8 @@ function renderChartDataTable(elementId, chartData, svgWidth) {
8361
8399
  function renderStockChart(element, chartData, categoryLabels) {
8362
8400
  const style = chartData.style;
8363
8401
  const legendPos = style?.legendPosition || "b";
8364
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8365
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos);
8402
+ const range = chunkVKOVFVDJ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8403
+ const layout = chunkVKOVFVDJ_js.computeLayout(element.width, element.height, style, true, legendPos);
8366
8404
  const catCount = Math.max(categoryLabels.length, 1);
8367
8405
  const barGroupWidth = layout.plotWidth / catCount;
8368
8406
  const candleWidth = barGroupWidth * 0.5;
@@ -8383,10 +8421,10 @@ function renderStockChart(element, chartData, categoryLabels) {
8383
8421
  const close = closeSeries.values[ci] ?? high;
8384
8422
  const isUp = close >= open;
8385
8423
  const cx = layout.plotLeft + barGroupWidth * ci + barGroupWidth / 2;
8386
- const highY = chunkI5SO5OV4_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8387
- const lowY = chunkI5SO5OV4_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8388
- const openY = chunkI5SO5OV4_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8389
- const closeY = chunkI5SO5OV4_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8424
+ const highY = chunkVKOVFVDJ_js.valueToY(high, range, layout.plotTop, layout.plotBottom);
8425
+ const lowY = chunkVKOVFVDJ_js.valueToY(low, range, layout.plotTop, layout.plotBottom);
8426
+ const openY = chunkVKOVFVDJ_js.valueToY(open, range, layout.plotTop, layout.plotBottom);
8427
+ const closeY = chunkVKOVFVDJ_js.valueToY(close, range, layout.plotTop, layout.plotBottom);
8390
8428
  elements.push(
8391
8429
  /* @__PURE__ */ jsxRuntime.jsx(
8392
8430
  "line",
@@ -8429,7 +8467,7 @@ function renderStockChart(element, chartData, categoryLabels) {
8429
8467
  textAnchor: "middle",
8430
8468
  fontSize: 7,
8431
8469
  fill: "#334155",
8432
- children: chunkI5SO5OV4_js.formatAxisValue(close)
8470
+ children: chunkVKOVFVDJ_js.formatAxisValue(close)
8433
8471
  },
8434
8472
  `${element.id}-stock-dl-${ci}`
8435
8473
  )
@@ -8471,7 +8509,7 @@ function FailedToLoad() {
8471
8509
  var LazySurfaceChart3DScene = React3__default.default.lazy(
8472
8510
  async () => {
8473
8511
  try {
8474
- return await import('./SurfaceChart3DScene-YR3GX4X6.js');
8512
+ return await import('./SurfaceChart3DScene-UFFJ3P6T.js');
8475
8513
  } catch {
8476
8514
  return { default: FailedToLoad };
8477
8515
  }
@@ -8495,7 +8533,7 @@ var SurfaceChart3DErrorBoundary = class extends React3__default.default.Componen
8495
8533
  function buildSurfaceData(chartData, categoryLabels) {
8496
8534
  const rows = chartData.series.length;
8497
8535
  const cols = Math.max(categoryLabels.length, 1);
8498
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8536
+ const range = chunkVKOVFVDJ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8499
8537
  const heightMap = new Float32Array(rows * cols);
8500
8538
  const colorMap = new Float32Array(rows * cols * 3);
8501
8539
  for (let r = 0; r < rows; r++) {
@@ -8615,8 +8653,8 @@ function darkenRgb(r, g, b, factor) {
8615
8653
  function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8616
8654
  const style = chartData.style;
8617
8655
  const legendPos = style?.legendPosition || "b";
8618
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, false, legendPos);
8619
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8656
+ const layout = chunkVKOVFVDJ_js.computeLayout(element.width, element.height, style, false, legendPos);
8657
+ const range = chunkVKOVFVDJ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8620
8658
  const catCount = Math.max(categoryLabels.length, 1);
8621
8659
  const seriesCount = chartData.series.length;
8622
8660
  const cols = catCount - 1;
@@ -8706,8 +8744,8 @@ function renderIsometricSurfaceChart(element, chartData, categoryLabels) {
8706
8744
  function renderFlatSurfaceChart(element, chartData, categoryLabels) {
8707
8745
  const style = chartData.style;
8708
8746
  const legendPos = style?.legendPosition || "b";
8709
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos);
8710
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8747
+ const layout = chunkVKOVFVDJ_js.computeLayout(element.width, element.height, style, true, legendPos);
8748
+ const range = chunkVKOVFVDJ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8711
8749
  const catCount = Math.max(categoryLabels.length, 1);
8712
8750
  const seriesCount = chartData.series.length;
8713
8751
  const cellW = layout.plotWidth / Math.max(catCount - 1, 1);
@@ -8770,7 +8808,7 @@ function renderSurfaceChart(element, chartData, categoryLabels) {
8770
8808
  function renderTreemapChart(element, chartData, categoryLabels) {
8771
8809
  const style = chartData.style;
8772
8810
  const legendPos = style?.legendPosition || "b";
8773
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, false, legendPos);
8811
+ const layout = chunkVKOVFVDJ_js.computeLayout(element.width, element.height, style, false, legendPos);
8774
8812
  const allValues = chartData.series.flatMap((s) => s.values);
8775
8813
  const totalAbs = allValues.reduce((sum, v) => sum + Math.abs(v), 0) || 1;
8776
8814
  const rects = [];
@@ -8793,7 +8831,7 @@ function renderTreemapChart(element, chartData, categoryLabels) {
8793
8831
  y: curY,
8794
8832
  width: Math.max(w - 1, 1),
8795
8833
  height: Math.max(h - 1, 1),
8796
- fill: chunkI5SO5OV4_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8834
+ fill: chunkVKOVFVDJ_js.paletteColor(item.index, chartData.style?.styleId, chartData.colorPalette),
8797
8835
  rx: 2,
8798
8836
  opacity: 0.85
8799
8837
  },
@@ -8846,8 +8884,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8846
8884
  const style = chartData.style;
8847
8885
  const legendPos = style?.legendPosition || "b";
8848
8886
  const values = chartData.series[0]?.values ?? [];
8849
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(chartData.series, chartData.axes);
8850
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos);
8887
+ const range = chunkVKOVFVDJ_js.computeValueRangeForChart(chartData.series, chartData.axes);
8888
+ const layout = chunkVKOVFVDJ_js.computeLayout(element.width, element.height, style, true, legendPos);
8851
8889
  const catCount = Math.max(categoryLabels.length, values.length, 1);
8852
8890
  const barWidth = layout.plotWidth / catCount * 0.6;
8853
8891
  const gap = layout.plotWidth / catCount * 0.2;
@@ -8858,8 +8896,8 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8858
8896
  const isLast = i === values.length - 1;
8859
8897
  const startVal = isLast ? 0 : runningTotal;
8860
8898
  const endVal = isLast ? runningTotal + val : runningTotal + val;
8861
- const barStartY = chunkI5SO5OV4_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
8862
- const barEndY = chunkI5SO5OV4_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
8899
+ const barStartY = chunkVKOVFVDJ_js.valueToY(startVal, range, layout.plotTop, layout.plotBottom);
8900
+ const barEndY = chunkVKOVFVDJ_js.valueToY(endVal, range, layout.plotTop, layout.plotBottom);
8863
8901
  const x = layout.plotLeft + layout.plotWidth / catCount * i + gap;
8864
8902
  const y = Math.min(barStartY, barEndY);
8865
8903
  const h = Math.max(Math.abs(barEndY - barStartY), 1);
@@ -8888,7 +8926,7 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8888
8926
  textAnchor: "middle",
8889
8927
  fontSize: 7,
8890
8928
  fill: "#334155",
8891
- children: chunkI5SO5OV4_js.formatAxisValue(isLast ? endVal : val)
8929
+ children: chunkVKOVFVDJ_js.formatAxisValue(isLast ? endVal : val)
8892
8930
  },
8893
8931
  `${element.id}-wf-dl-${i}`
8894
8932
  )
@@ -8936,18 +8974,18 @@ function renderWaterfallChart(element, chartData, categoryLabels) {
8936
8974
  function renderComboChart(element, chartData, categoryLabels) {
8937
8975
  const style = chartData.style;
8938
8976
  const legendPos = style?.legendPosition || "b";
8939
- const layoutOpts = chunkI5SO5OV4_js.computeLayoutOptions(
8977
+ const layoutOpts = chunkVKOVFVDJ_js.computeLayoutOptions(
8940
8978
  chartData.axes,
8941
8979
  chartData.dataTable,
8942
8980
  chartData.series.length
8943
8981
  );
8944
- const layout = chunkI5SO5OV4_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
8945
- const { primary, secondary } = chunkI5SO5OV4_js.splitSeriesByAxis(chartData.series, chartData.axes);
8982
+ const layout = chunkVKOVFVDJ_js.computeLayout(element.width, element.height, style, true, legendPos, layoutOpts);
8983
+ const { primary, secondary } = chunkVKOVFVDJ_js.splitSeriesByAxis(chartData.series, chartData.axes);
8946
8984
  const primarySeries = primary.length > 0 ? primary.map((e) => e.series) : chartData.series;
8947
8985
  const secondarySeries = secondary.map((e) => e.series);
8948
- const range = chunkI5SO5OV4_js.computeValueRangeForChart(primarySeries, chartData.axes);
8949
- const secondaryRange = secondarySeries.length > 0 ? chunkI5SO5OV4_js.computeValueRange(secondarySeries) : void 0;
8950
- const secondaryAxisFmt = chunkI5SO5OV4_js.getSecondaryValueAxis(chartData.axes);
8986
+ const range = chunkVKOVFVDJ_js.computeValueRangeForChart(primarySeries, chartData.axes);
8987
+ const secondaryRange = secondarySeries.length > 0 ? chunkVKOVFVDJ_js.computeValueRange(secondarySeries) : void 0;
8988
+ const secondaryAxisFmt = chunkVKOVFVDJ_js.getSecondaryValueAxis(chartData.axes);
8951
8989
  const catCount = Math.max(categoryLabels.length, 1);
8952
8990
  const barSeriesCount = 1;
8953
8991
  const barGroupWidth = layout.plotWidth / catCount;
@@ -8963,8 +9001,8 @@ function renderComboChart(element, chartData, categoryLabels) {
8963
9001
  const barRange = isBarSecondary && secondaryRange ? secondaryRange : range;
8964
9002
  barSeries.values.forEach((val, vi) => {
8965
9003
  const x = layout.plotLeft + barGroupWidth * vi + barOffset;
8966
- const zeroY = chunkI5SO5OV4_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
8967
- const valY = chunkI5SO5OV4_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
9004
+ const zeroY = chunkVKOVFVDJ_js.valueToY(0, barRange, layout.plotTop, layout.plotBottom);
9005
+ const valY = chunkVKOVFVDJ_js.valueToY(val, barRange, layout.plotTop, layout.plotBottom);
8968
9006
  const y = Math.min(zeroY, valY);
8969
9007
  const h = Math.max(Math.abs(zeroY - valY), 1);
8970
9008
  barElements.push(
@@ -8975,7 +9013,7 @@ function renderComboChart(element, chartData, categoryLabels) {
8975
9013
  y,
8976
9014
  width: barWidth,
8977
9015
  height: h,
8978
- fill: chunkI5SO5OV4_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
9016
+ fill: chunkVKOVFVDJ_js.seriesColor(barSeries, 0, chartData.style?.styleId, chartData.colorPalette),
8979
9017
  rx: 1
8980
9018
  },
8981
9019
  `${element.id}-combo-bar-${vi}`
@@ -8991,7 +9029,7 @@ function renderComboChart(element, chartData, categoryLabels) {
8991
9029
  textAnchor: "middle",
8992
9030
  fontSize: 7,
8993
9031
  fill: "#334155",
8994
- children: chunkI5SO5OV4_js.formatAxisValue(val)
9032
+ children: chunkVKOVFVDJ_js.formatAxisValue(val)
8995
9033
  },
8996
9034
  `${element.id}-combo-bar-dl-${vi}`
8997
9035
  )
@@ -9008,10 +9046,10 @@ function renderComboChart(element, chartData, categoryLabels) {
9008
9046
  const activeRange = isSecondary && secondaryRange ? secondaryRange : range;
9009
9047
  const points = series.values.map((val, vi) => {
9010
9048
  const x = layout.plotLeft + barGroupWidth * vi + barGroupWidth / 2;
9011
- const y = chunkI5SO5OV4_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9049
+ const y = chunkVKOVFVDJ_js.valueToY(val, activeRange, layout.plotTop, layout.plotBottom);
9012
9050
  return { x, y, val };
9013
9051
  });
9014
- const c = chunkI5SO5OV4_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9052
+ const c = chunkVKOVFVDJ_js.seriesColor(series, seriesIdx, chartData.style?.styleId, chartData.colorPalette);
9015
9053
  lineElements.push(
9016
9054
  /* @__PURE__ */ jsxRuntime.jsx(
9017
9055
  "polyline",
@@ -9038,7 +9076,7 @@ function renderComboChart(element, chartData, categoryLabels) {
9038
9076
  textAnchor: "middle",
9039
9077
  fontSize: 7,
9040
9078
  fill: "#334155",
9041
- children: chunkI5SO5OV4_js.formatAxisValue(p.val)
9079
+ children: chunkVKOVFVDJ_js.formatAxisValue(p.val)
9042
9080
  },
9043
9081
  `${element.id}-combo-line-dl-${si}-${vi}`
9044
9082
  )
@@ -9076,11 +9114,11 @@ function renderComboChart(element, chartData, categoryLabels) {
9076
9114
  }
9077
9115
  function renderChartElement(element) {
9078
9116
  if (element.type !== "chart") {
9079
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkZISXRMDJ_js.translationsEn["pptx.chart.heading"] });
9117
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk2EFVXYNA_js.translationsEn["pptx.chart.heading"] });
9080
9118
  }
9081
9119
  const chartData = element.chartData;
9082
9120
  if (!chartData || chartData.series.length === 0) {
9083
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkZISXRMDJ_js.translationsEn["pptx.chart.heading"] });
9121
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk2EFVXYNA_js.translationsEn["pptx.chart.heading"] });
9084
9122
  }
9085
9123
  const longestSeriesLength = chartData.series.reduce(
9086
9124
  (maxLength, series) => Math.max(maxLength, series.values.length),
@@ -10597,7 +10635,7 @@ function PresentationMediaController({
10597
10635
  }
10598
10636
  function renderMediaElement(element, mediaDataUrls, options) {
10599
10637
  if (element.type !== "media") {
10600
- return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunkZISXRMDJ_js.translationsEn["pptx.media.title"] });
10638
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "w-full h-full flex items-center justify-center text-[11px] text-white/80 pointer-events-none", children: chunk2EFVXYNA_js.translationsEn["pptx.media.title"] });
10601
10639
  }
10602
10640
  const mediaType = element.mediaType;
10603
10641
  const mediaPath = element.mediaPath;
@@ -10627,7 +10665,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
10627
10665
  "img",
10628
10666
  {
10629
10667
  src: posterUrl,
10630
- alt: chunkZISXRMDJ_js.translationsEn["pptx.media.posterAlt"],
10668
+ alt: chunk2EFVXYNA_js.translationsEn["pptx.media.posterAlt"],
10631
10669
  className: "w-full h-full object-contain opacity-50"
10632
10670
  }
10633
10671
  ),
@@ -10648,7 +10686,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
10648
10686
  ]
10649
10687
  }
10650
10688
  ),
10651
- /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: chunkZISXRMDJ_js.translationsEn["pptx.media.notFound"] })
10689
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "text-[10px] text-white/60", children: chunk2EFVXYNA_js.translationsEn["pptx.media.notFound"] })
10652
10690
  ] })
10653
10691
  ] });
10654
10692
  }
@@ -10689,7 +10727,7 @@ function renderMediaElement(element, mediaDataUrls, options) {
10689
10727
  "img",
10690
10728
  {
10691
10729
  src: posterUrl,
10692
- alt: chunkZISXRMDJ_js.translationsEn["pptx.media.videoPosterAlt"],
10730
+ alt: chunk2EFVXYNA_js.translationsEn["pptx.media.videoPosterAlt"],
10693
10731
  className: "w-full h-full object-contain"
10694
10732
  }
10695
10733
  ),
@@ -10792,14 +10830,14 @@ function buildNotesPdf(pages) {
10792
10830
  notes: page.notes,
10793
10831
  slideNumber: page.slideNumber
10794
10832
  }));
10795
- const bytes = chunkI5SO5OV4_js.buildNotesPdfBytes(images, meta);
10833
+ const bytes = chunkVKOVFVDJ_js.buildNotesPdfBytes(images, meta);
10796
10834
  const blob = new Blob([bytes], { type: "application/pdf" });
10797
10835
  return URL.createObjectURL(blob);
10798
10836
  }
10799
10837
 
10800
10838
  // src/viewer/utils/pdf-builder-slides.ts
10801
10839
  function buildPdfFromImageData(images) {
10802
- const bytes = chunkI5SO5OV4_js.buildSlidesPdfBytes(images);
10840
+ const bytes = chunkVKOVFVDJ_js.buildSlidesPdfBytes(images);
10803
10841
  const blob = new Blob([bytes], { type: "application/pdf" });
10804
10842
  return URL.createObjectURL(blob);
10805
10843
  }
@@ -10808,7 +10846,7 @@ function buildPdfFromImageData(images) {
10808
10846
  var activePreview = null;
10809
10847
  function startPreviewAnimation(elementId, preset, options) {
10810
10848
  stopPreviewAnimation();
10811
- const descriptor = chunkI5SO5OV4_js.buildPreviewAnimation(preset, options);
10849
+ const descriptor = chunkVKOVFVDJ_js.buildPreviewAnimation(preset, options);
10812
10850
  if (!descriptor) {
10813
10851
  return;
10814
10852
  }
@@ -10886,7 +10924,7 @@ function useElementOperations(input) {
10886
10924
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
10887
10925
  const updateElementById = React3.useCallback(
10888
10926
  (elementId, updates) => {
10889
- if (chunkI5SO5OV4_js.isTemplateElementId(elementId)) {
10927
+ if (chunkVKOVFVDJ_js.isTemplateElementId(elementId)) {
10890
10928
  const slideId = activeSlide?.id;
10891
10929
  if (slideId) {
10892
10930
  setTemplateElementsBySlideId((prev) => ({
@@ -10940,14 +10978,14 @@ function useElementOperations(input) {
10940
10978
  if (!selectedElement || !chunkKV3EOLP3_js.hasTextProperties(selectedElement)) {
10941
10979
  return;
10942
10980
  }
10943
- const inlineSel = chunkI5SO5OV4_js.getInlineEditorSelection(selectedElement.textSegments);
10981
+ const inlineSel = chunkVKOVFVDJ_js.getInlineEditorSelection(selectedElement.textSegments);
10944
10982
  if (inlineSel && selectedElement.textSegments) {
10945
- const { newSegments: newSegments2, newSelection } = chunkI5SO5OV4_js.applyStyleToSelectedSegments(
10983
+ const { newSegments: newSegments2, newSelection } = chunkVKOVFVDJ_js.applyStyleToSelectedSegments(
10946
10984
  selectedElement.textSegments,
10947
10985
  inlineSel,
10948
10986
  updates
10949
10987
  );
10950
- chunkI5SO5OV4_js.setPendingSelectionRestore(newSelection);
10988
+ chunkVKOVFVDJ_js.setPendingSelectionRestore(newSelection);
10951
10989
  updateSelectedElement({
10952
10990
  textSegments: newSegments2
10953
10991
  });
@@ -10970,9 +11008,9 @@ function useElementOperations(input) {
10970
11008
  if (!selectedElement || !chunkKV3EOLP3_js.hasTextProperties(selectedElement)) {
10971
11009
  return;
10972
11010
  }
10973
- const inlineSel = chunkI5SO5OV4_js.getInlineEditorSelection(selectedElement.textSegments);
11011
+ const inlineSel = chunkVKOVFVDJ_js.getInlineEditorSelection(selectedElement.textSegments);
10974
11012
  if (inlineSel && selectedElement.textSegments) {
10975
- const newSegments = chunkI5SO5OV4_js.applyCaseTransformToSegments(
11013
+ const newSegments = chunkVKOVFVDJ_js.applyCaseTransformToSegments(
10976
11014
  selectedElement.textSegments,
10977
11015
  inlineSel,
10978
11016
  mode
@@ -10982,14 +11020,14 @@ function useElementOperations(input) {
10982
11020
  }
10983
11021
  const updates = {};
10984
11022
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
10985
- updates.textSegments = chunkI5SO5OV4_js.applyCaseTransformToSegments(
11023
+ updates.textSegments = chunkVKOVFVDJ_js.applyCaseTransformToSegments(
10986
11024
  selectedElement.textSegments,
10987
11025
  null,
10988
11026
  mode
10989
11027
  );
10990
11028
  }
10991
11029
  if (typeof selectedElement.text === "string") {
10992
- updates.text = chunkI5SO5OV4_js.transformTextCase(selectedElement.text, mode);
11030
+ updates.text = chunkVKOVFVDJ_js.transformTextCase(selectedElement.text, mode);
10993
11031
  }
10994
11032
  updateSelectedElement(updates);
10995
11033
  },
@@ -11044,7 +11082,7 @@ function useSectionOperations(input) {
11044
11082
  const { sections, setSections, slides, setSlides, markDirty } = input;
11045
11083
  const addSection2 = React3.useCallback(
11046
11084
  (name, afterSlideIndex) => {
11047
- const result = chunkI5SO5OV4_js.addSection(sections, slides, name, afterSlideIndex);
11085
+ const result = chunkVKOVFVDJ_js.addSection(sections, slides, name, afterSlideIndex);
11048
11086
  setSlides(result.slides);
11049
11087
  setSections(result.sections);
11050
11088
  markDirty();
@@ -11053,7 +11091,7 @@ function useSectionOperations(input) {
11053
11091
  );
11054
11092
  const renameSection2 = React3.useCallback(
11055
11093
  (sectionId, newName) => {
11056
- const result = chunkI5SO5OV4_js.renameSection(sections, slides, sectionId, newName);
11094
+ const result = chunkVKOVFVDJ_js.renameSection(sections, slides, sectionId, newName);
11057
11095
  setSections(result.sections);
11058
11096
  setSlides(result.slides);
11059
11097
  markDirty();
@@ -11062,7 +11100,7 @@ function useSectionOperations(input) {
11062
11100
  );
11063
11101
  const deleteSection2 = React3.useCallback(
11064
11102
  (sectionId) => {
11065
- const result = chunkI5SO5OV4_js.deleteSection(sections, slides, sectionId);
11103
+ const result = chunkVKOVFVDJ_js.deleteSection(sections, slides, sectionId);
11066
11104
  setSections(result.sections);
11067
11105
  setSlides(result.slides);
11068
11106
  markDirty();
@@ -11071,21 +11109,21 @@ function useSectionOperations(input) {
11071
11109
  );
11072
11110
  const moveSectionUp2 = React3.useCallback(
11073
11111
  (sectionId) => {
11074
- setSections(chunkI5SO5OV4_js.moveSectionUp(sections, sectionId));
11112
+ setSections(chunkVKOVFVDJ_js.moveSectionUp(sections, sectionId));
11075
11113
  markDirty();
11076
11114
  },
11077
11115
  [sections, setSections, markDirty]
11078
11116
  );
11079
11117
  const moveSectionDown2 = React3.useCallback(
11080
11118
  (sectionId) => {
11081
- setSections(chunkI5SO5OV4_js.moveSectionDown(sections, sectionId));
11119
+ setSections(chunkVKOVFVDJ_js.moveSectionDown(sections, sectionId));
11082
11120
  markDirty();
11083
11121
  },
11084
11122
  [sections, setSections, markDirty]
11085
11123
  );
11086
11124
  const moveSlidesToSection2 = React3.useCallback(
11087
11125
  (slideIndexes, targetSectionId) => {
11088
- const result = chunkI5SO5OV4_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11126
+ const result = chunkVKOVFVDJ_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
11089
11127
  setSlides(result.slides);
11090
11128
  setSections(result.sections);
11091
11129
  markDirty();
@@ -11104,7 +11142,7 @@ function useSectionOperations(input) {
11104
11142
 
11105
11143
  // src/viewer/hooks/pointer-move-handlers.ts
11106
11144
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
11107
- const resized = chunkI5SO5OV4_js.applyResize(
11145
+ const resized = chunkVKOVFVDJ_js.applyResize(
11108
11146
  { x: startX, y: startY, width: startWidth, height: startHeight },
11109
11147
  handle,
11110
11148
  dx,
@@ -11116,7 +11154,7 @@ function computeResizeGeometry(handle, startX, startY, startWidth, startHeight,
11116
11154
  if (!snapToGrid) {
11117
11155
  return box;
11118
11156
  }
11119
- return chunkI5SO5OV4_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11157
+ return chunkVKOVFVDJ_js.snapBoxToGrid(box, handle, gridSpacingPx, MIN_ELEMENT_SIZE);
11120
11158
  }
11121
11159
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
11122
11160
  const range = startWidth || 200;
@@ -11226,7 +11264,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
11226
11264
  width: el.width,
11227
11265
  height: el.height
11228
11266
  }));
11229
- const snapResult = chunkI5SO5OV4_js.computeSnapToShape(
11267
+ const snapResult = chunkVKOVFVDJ_js.computeSnapToShape(
11230
11268
  targetX,
11231
11269
  targetY,
11232
11270
  primaryEl.width,
@@ -11369,13 +11407,13 @@ function processPointerUp(input) {
11369
11407
  if (i !== activeSlideIndex) {
11370
11408
  return s;
11371
11409
  }
11372
- const rerouted = chunkI5SO5OV4_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11410
+ const rerouted = chunkVKOVFVDJ_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
11373
11411
  if (rerouted.length === 0) {
11374
11412
  return s;
11375
11413
  }
11376
11414
  return {
11377
11415
  ...s,
11378
- elements: chunkI5SO5OV4_js.applyReroutedConnectors(s.elements, rerouted)
11416
+ elements: chunkVKOVFVDJ_js.applyReroutedConnectors(s.elements, rerouted)
11379
11417
  };
11380
11418
  })
11381
11419
  );
@@ -11394,9 +11432,9 @@ function processPointerUp(input) {
11394
11432
  }
11395
11433
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
11396
11434
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
11397
- const hitIds = chunkI5SO5OV4_js.computeMarqueeHitIds(marquee, sourceElements);
11435
+ const hitIds = chunkVKOVFVDJ_js.computeMarqueeHitIds(marquee, sourceElements);
11398
11436
  if (marquee.additive) {
11399
- const merged = chunkI5SO5OV4_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11437
+ const merged = chunkVKOVFVDJ_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
11400
11438
  if (merged.length > 0) {
11401
11439
  applySelection(merged[0], merged);
11402
11440
  } else {
@@ -11419,8 +11457,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
11419
11457
  }
11420
11458
  return { ...el, x: start.x + dx, y: start.y + dy };
11421
11459
  });
11422
- const rerouted = chunkI5SO5OV4_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11423
- return chunkI5SO5OV4_js.applyReroutedConnectors(movedElements, rerouted);
11460
+ const rerouted = chunkVKOVFVDJ_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
11461
+ return chunkVKOVFVDJ_js.applyReroutedConnectors(movedElements, rerouted);
11424
11462
  };
11425
11463
  if (editTemplateMode) {
11426
11464
  const slideId = activeSlide?.id;
@@ -11561,7 +11599,8 @@ function useCanvasInteractions(input) {
11561
11599
  presentationHandleAction,
11562
11600
  setEditingEquationOmml,
11563
11601
  setIsEquationDialogOpen,
11564
- setPointerCommitNonce
11602
+ setPointerCommitNonce,
11603
+ transformCommittedText
11565
11604
  } = input;
11566
11605
  const justSelectedRef = React3.useRef(false);
11567
11606
  const handleInlineEditCommit = () => {
@@ -11571,9 +11610,10 @@ function useCanvasInteractions(input) {
11571
11610
  }
11572
11611
  const el = elementLookup.get(editId);
11573
11612
  if (el && chunkKV3EOLP3_js.hasTextProperties(el)) {
11574
- const newSegments = chunkI5SO5OV4_js.remapTextToSegments(inlineEditingText, el.textSegments, el.textStyle);
11613
+ const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
11614
+ const newSegments = chunkVKOVFVDJ_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
11575
11615
  ops.updateElementById(editId, {
11576
- text: inlineEditingText,
11616
+ text: committedText,
11577
11617
  textSegments: newSegments
11578
11618
  });
11579
11619
  history.markDirty();
@@ -11675,6 +11715,9 @@ function useCanvasInteractions(input) {
11675
11715
  setSnapLines([]);
11676
11716
  };
11677
11717
  const handleElementContextMenu = (elementId, e) => {
11718
+ if (mode === "present") {
11719
+ return;
11720
+ }
11678
11721
  e.preventDefault();
11679
11722
  e.stopPropagation();
11680
11723
  if (!selectedElementIdSet.has(elementId)) {
@@ -11817,7 +11860,7 @@ function createFileHandlers(deps) {
11817
11860
  h = Math.round(h * scale);
11818
11861
  }
11819
11862
  addElement({
11820
- id: chunkI5SO5OV4_js.generateElementId(),
11863
+ id: chunkVKOVFVDJ_js.generateElementId(),
11821
11864
  type: "image",
11822
11865
  x: Math.round((canvasSize.width - w) / 2),
11823
11866
  y: Math.round((canvasSize.height - h) / 2),
@@ -11828,7 +11871,7 @@ function createFileHandlers(deps) {
11828
11871
  };
11829
11872
  img.onerror = () => {
11830
11873
  addElement({
11831
- id: chunkI5SO5OV4_js.generateElementId(),
11874
+ id: chunkVKOVFVDJ_js.generateElementId(),
11832
11875
  type: "image",
11833
11876
  x: 100,
11834
11877
  y: 100,
@@ -11854,7 +11897,7 @@ function createFileHandlers(deps) {
11854
11897
  const elFilePath = file.path;
11855
11898
  const insertMediaElement = (mediaSourceUrl, width, height) => {
11856
11899
  addElement({
11857
- id: chunkI5SO5OV4_js.generateElementId(),
11900
+ id: chunkVKOVFVDJ_js.generateElementId(),
11858
11901
  type: "media",
11859
11902
  mediaType,
11860
11903
  mediaMimeType: file.type || void 0,
@@ -12029,13 +12072,13 @@ function createStructuredElementHandlers(deps) {
12029
12072
  return;
12030
12073
  }
12031
12074
  addElement({
12032
- id: chunkI5SO5OV4_js.generateElementId(),
12075
+ id: chunkVKOVFVDJ_js.generateElementId(),
12033
12076
  type: "smartArt",
12034
12077
  x: 100,
12035
12078
  y: 120,
12036
12079
  width: 600,
12037
12080
  height: 340,
12038
- smartArtData: chunkI5SO5OV4_js.buildSmartArtPresetData(
12081
+ smartArtData: chunkVKOVFVDJ_js.buildSmartArtPresetData(
12039
12082
  layout,
12040
12083
  defaultItems,
12041
12084
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -12047,7 +12090,7 @@ function createStructuredElementHandlers(deps) {
12047
12090
  return;
12048
12091
  }
12049
12092
  addElement({
12050
- id: chunkI5SO5OV4_js.generateElementId(),
12093
+ id: chunkVKOVFVDJ_js.generateElementId(),
12051
12094
  type: "shape",
12052
12095
  x: 120,
12053
12096
  y: 200,
@@ -12106,7 +12149,7 @@ function createStructuredElementHandlers(deps) {
12106
12149
  const displayText = value || fieldTexts[fieldType] || fieldType;
12107
12150
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
12108
12151
  addElement({
12109
- id: chunkI5SO5OV4_js.generateElementId(),
12152
+ id: chunkVKOVFVDJ_js.generateElementId(),
12110
12153
  type: "shape",
12111
12154
  x: 120,
12112
12155
  y: 200,
@@ -12128,7 +12171,7 @@ function createStructuredElementHandlers(deps) {
12128
12171
  if (!activeSlide) {
12129
12172
  return;
12130
12173
  }
12131
- const preset = chunkI5SO5OV4_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12174
+ const preset = chunkVKOVFVDJ_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
12132
12175
  if (!preset) {
12133
12176
  return;
12134
12177
  }
@@ -12141,7 +12184,7 @@ function createStructuredElementHandlers(deps) {
12141
12184
  defaultPptxAction.highlightClick = true;
12142
12185
  }
12143
12186
  addElement({
12144
- id: chunkI5SO5OV4_js.generateElementId(),
12187
+ id: chunkVKOVFVDJ_js.generateElementId(),
12145
12188
  type: "shape",
12146
12189
  x: 150,
12147
12190
  y: 150,
@@ -12208,7 +12251,7 @@ function useInsertElements(input) {
12208
12251
  return;
12209
12252
  }
12210
12253
  addElement({
12211
- id: chunkI5SO5OV4_js.generateElementId(),
12254
+ id: chunkVKOVFVDJ_js.generateElementId(),
12212
12255
  type: "text",
12213
12256
  x: 100,
12214
12257
  y: 100,
@@ -12223,7 +12266,7 @@ function useInsertElements(input) {
12223
12266
  return;
12224
12267
  }
12225
12268
  addElement({
12226
- id: chunkI5SO5OV4_js.generateElementId(),
12269
+ id: chunkVKOVFVDJ_js.generateElementId(),
12227
12270
  type: "shape",
12228
12271
  x: 150,
12229
12272
  y: 150,
@@ -12242,15 +12285,15 @@ function useInsertElements(input) {
12242
12285
  return;
12243
12286
  }
12244
12287
  addElement({
12245
- ...chunkI5SO5OV4_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12246
- id: chunkI5SO5OV4_js.generateElementId()
12288
+ ...chunkVKOVFVDJ_js.newTableElement(DEFAULT_TABLE_ROWS, DEFAULT_TABLE_COLUMNS, 100, 200),
12289
+ id: chunkVKOVFVDJ_js.generateElementId()
12247
12290
  });
12248
12291
  };
12249
12292
  const handleAddChart = (chartType) => {
12250
12293
  if (!activeSlide) {
12251
12294
  return;
12252
12295
  }
12253
- addElement(chunkI5SO5OV4_js.createDefaultChartElement(chartType));
12296
+ addElement(chunkVKOVFVDJ_js.createDefaultChartElement(chartType));
12254
12297
  };
12255
12298
  const structured = createStructuredElementHandlers({
12256
12299
  activeSlide,
@@ -12320,7 +12363,7 @@ function useClipboardHandlers(input) {
12320
12363
  if (!selectedElement) {
12321
12364
  return;
12322
12365
  }
12323
- setClipboardPayload(chunkI5SO5OV4_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
12366
+ setClipboardPayload(chunkVKOVFVDJ_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
12324
12367
  };
12325
12368
  const handleDelete = () => {
12326
12369
  const idsToDelete = effectiveSelectedIds;
@@ -12337,7 +12380,7 @@ function useClipboardHandlers(input) {
12337
12380
  handleDelete();
12338
12381
  };
12339
12382
  const insertClone = (source) => {
12340
- const clone = chunkI5SO5OV4_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
12383
+ const clone = chunkVKOVFVDJ_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
12341
12384
  ops.updateActiveElements((els) => [...els, clone]);
12342
12385
  ops.applySelection(clone.id);
12343
12386
  history.markDirty();
@@ -12547,7 +12590,7 @@ function useMergeShapesHandler(input) {
12547
12590
  bounds.height
12548
12591
  );
12549
12592
  const newEl = {
12550
- id: chunkI5SO5OV4_js.generateElementId(),
12593
+ id: chunkVKOVFVDJ_js.generateElementId(),
12551
12594
  type: "shape",
12552
12595
  x: bounds.x,
12553
12596
  y: bounds.y,
@@ -12606,7 +12649,7 @@ function useMergeShapesHandler(input) {
12606
12649
  );
12607
12650
  const primary = targets[0];
12608
12651
  const newEl = {
12609
- id: chunkI5SO5OV4_js.generateElementId(),
12652
+ id: chunkVKOVFVDJ_js.generateElementId(),
12610
12653
  type: "shape",
12611
12654
  x: bounds.x,
12612
12655
  y: bounds.y,
@@ -12669,7 +12712,7 @@ function useGroupAlignLayerHandlers(input) {
12669
12712
  if (ids.length < 2 || !activeSlide) {
12670
12713
  return;
12671
12714
  }
12672
- const { elements, groupId } = chunkI5SO5OV4_js.groupElements(ops.activeElements, ids, chunkI5SO5OV4_js.generateElementId());
12715
+ const { elements, groupId } = chunkVKOVFVDJ_js.groupElements(ops.activeElements, ids, chunkVKOVFVDJ_js.generateElementId());
12673
12716
  if (groupId === null) {
12674
12717
  return;
12675
12718
  }
@@ -12682,12 +12725,12 @@ function useGroupAlignLayerHandlers(input) {
12682
12725
  return;
12683
12726
  }
12684
12727
  const group = selectedElement;
12685
- const intoTemplate = chunkI5SO5OV4_js.isTemplateElementId(group.id);
12728
+ const intoTemplate = chunkVKOVFVDJ_js.isTemplateElementId(group.id);
12686
12729
  const ungrouped = group.children.map((child) => ({
12687
12730
  ...structuredClone(child),
12688
12731
  // Keep child ids in the same store as the group so later edits route
12689
12732
  // correctly: template groups yield template-prefixed child ids.
12690
- id: intoTemplate ? chunkI5SO5OV4_js.makeCloneId(true, child.id || group.id) : child.id || chunkI5SO5OV4_js.generateElementId(),
12733
+ id: intoTemplate ? chunkVKOVFVDJ_js.makeCloneId(true, child.id || group.id) : child.id || chunkVKOVFVDJ_js.generateElementId(),
12691
12734
  x: child.x + group.x,
12692
12735
  y: child.y + group.y
12693
12736
  }));
@@ -12711,7 +12754,7 @@ function useGroupAlignLayerHandlers(input) {
12711
12754
  if (!edge) {
12712
12755
  return;
12713
12756
  }
12714
- const positions = chunkI5SO5OV4_js.alignElements(selectedElements, edge);
12757
+ const positions = chunkVKOVFVDJ_js.alignElements(selectedElements, edge);
12715
12758
  for (const [id, pos] of positions) {
12716
12759
  const el = elementLookup.get(id);
12717
12760
  if (!el) {
@@ -12729,7 +12772,7 @@ function useGroupAlignLayerHandlers(input) {
12729
12772
  if (!distAxis) {
12730
12773
  return;
12731
12774
  }
12732
- const positions = chunkI5SO5OV4_js.distributeElements(selectedElements, distAxis);
12775
+ const positions = chunkVKOVFVDJ_js.distributeElements(selectedElements, distAxis);
12733
12776
  for (const [id, pos] of positions) {
12734
12777
  const el = elementLookup.get(id);
12735
12778
  if (!el) {
@@ -12746,7 +12789,7 @@ function useGroupAlignLayerHandlers(input) {
12746
12789
  }
12747
12790
  const id = selectedElement.id;
12748
12791
  ops.updateActiveElements(
12749
- (els) => direction === "forward" ? chunkI5SO5OV4_js.bringForward(els, id) : direction === "backward" ? chunkI5SO5OV4_js.sendBackward(els, id) : els
12792
+ (els) => direction === "forward" ? chunkVKOVFVDJ_js.bringForward(els, id) : direction === "backward" ? chunkVKOVFVDJ_js.sendBackward(els, id) : els
12750
12793
  );
12751
12794
  history.markDirty();
12752
12795
  };
@@ -12756,7 +12799,7 @@ function useGroupAlignLayerHandlers(input) {
12756
12799
  }
12757
12800
  const id = selectedElement.id;
12758
12801
  ops.updateActiveElements(
12759
- (els) => direction === "front" ? chunkI5SO5OV4_js.bringToFront(els, id) : chunkI5SO5OV4_js.sendToBack(els, id)
12802
+ (els) => direction === "front" ? chunkVKOVFVDJ_js.bringToFront(els, id) : chunkVKOVFVDJ_js.sendToBack(els, id)
12760
12803
  );
12761
12804
  history.markDirty();
12762
12805
  };
@@ -12878,7 +12921,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
12878
12921
  function useSlideManagement(input) {
12879
12922
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
12880
12923
  const handleAddSlide = () => {
12881
- const newSlide = chunkI5SO5OV4_js.createBlankSlide(slides.length + 1);
12924
+ const newSlide = chunkVKOVFVDJ_js.createBlankSlide(slides.length + 1);
12882
12925
  ops.updateSlides((prev) => {
12883
12926
  const next = [...prev];
12884
12927
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -12941,7 +12984,7 @@ function useSlideManagement(input) {
12941
12984
  }
12942
12985
  const clone = {
12943
12986
  ...src,
12944
- id: chunkI5SO5OV4_js.makeSlideId(),
12987
+ id: chunkVKOVFVDJ_js.makeSlideId(),
12945
12988
  elements: src.elements.map((el) => ({
12946
12989
  ...el,
12947
12990
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -12973,7 +13016,7 @@ function useSlideManagement(input) {
12973
13016
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
12974
13017
  const insertAt = activeSlideIndex + 1;
12975
13018
  const draft = {
12976
- ...chunkI5SO5OV4_js.createBlankSlide(slides.length + 1),
13019
+ ...chunkVKOVFVDJ_js.createBlankSlide(slides.length + 1),
12977
13020
  layoutPath,
12978
13021
  ...layoutName ? { layoutName } : {}
12979
13022
  };
@@ -13034,7 +13077,7 @@ function createTableMergeHandlers(input) {
13034
13077
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
13035
13078
  return;
13036
13079
  }
13037
- const newTableData = chunkI5SO5OV4_js.mergeCells(
13080
+ const newTableData = chunkVKOVFVDJ_js.mergeCells(
13038
13081
  [
13039
13082
  { row: rowIndex, col: columnIndex },
13040
13083
  { row: rowIndex, col: nextColIdx }
@@ -13068,7 +13111,7 @@ function createTableMergeHandlers(input) {
13068
13111
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
13069
13112
  return;
13070
13113
  }
13071
- const newTableData = chunkI5SO5OV4_js.mergeCells(
13114
+ const newTableData = chunkVKOVFVDJ_js.mergeCells(
13072
13115
  [
13073
13116
  { row: rowIndex, col: columnIndex },
13074
13117
  { row: targetNextRowIdx, col: columnIndex }
@@ -13091,7 +13134,7 @@ function createTableMergeHandlers(input) {
13091
13134
  return;
13092
13135
  }
13093
13136
  const td = selectedElement.tableData;
13094
- const newTableData = chunkI5SO5OV4_js.mergeCells(ts.selectedCells, td);
13137
+ const newTableData = chunkVKOVFVDJ_js.mergeCells(ts.selectedCells, td);
13095
13138
  const updates = { tableData: newTableData };
13096
13139
  const newRawXml = chunkKV3EOLP3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13097
13140
  if (newRawXml) {
@@ -13110,7 +13153,7 @@ function createTableMergeHandlers(input) {
13110
13153
  }
13111
13154
  const { rowIndex, columnIndex } = ts;
13112
13155
  const td = selectedElement.tableData;
13113
- const newTableData = chunkI5SO5OV4_js.splitCell(rowIndex, columnIndex, td);
13156
+ const newTableData = chunkVKOVFVDJ_js.splitCell(rowIndex, columnIndex, td);
13114
13157
  const updates = { tableData: newTableData };
13115
13158
  const newRawXml = chunkKV3EOLP3_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
13116
13159
  if (newRawXml) {
@@ -13244,7 +13287,7 @@ function createTableStructHandlers(input) {
13244
13287
  return;
13245
13288
  }
13246
13289
  const rowIdx = ts?.rowIndex ?? 0;
13247
- const newTableData = chunkI5SO5OV4_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13290
+ const newTableData = chunkVKOVFVDJ_js.insertTableRow(selectedElement.tableData, rowIdx, position);
13248
13291
  const updates = { tableData: newTableData };
13249
13292
  const newRawXml = chunkKV3EOLP3_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13250
13293
  if (newRawXml) {
@@ -13259,7 +13302,7 @@ function createTableStructHandlers(input) {
13259
13302
  }
13260
13303
  const td = selectedElement.tableData;
13261
13304
  const rowIdx = ts?.rowIndex ?? 0;
13262
- const newTableData = chunkI5SO5OV4_js.deleteTableRow(td, rowIdx);
13305
+ const newTableData = chunkVKOVFVDJ_js.deleteTableRow(td, rowIdx);
13263
13306
  if (newTableData === td) {
13264
13307
  return;
13265
13308
  }
@@ -13276,7 +13319,7 @@ function createTableStructHandlers(input) {
13276
13319
  return;
13277
13320
  }
13278
13321
  const colIdx = ts?.columnIndex ?? 0;
13279
- const newTableData = chunkI5SO5OV4_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13322
+ const newTableData = chunkVKOVFVDJ_js.insertTableColumn(selectedElement.tableData, colIdx, position);
13280
13323
  const updates = { tableData: newTableData };
13281
13324
  const newRawXml = chunkKV3EOLP3_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
13282
13325
  if (newRawXml) {
@@ -13291,7 +13334,7 @@ function createTableStructHandlers(input) {
13291
13334
  }
13292
13335
  const td = selectedElement.tableData;
13293
13336
  const colIdx = ts?.columnIndex ?? 0;
13294
- const newTableData = chunkI5SO5OV4_js.deleteTableColumn(td, colIdx);
13337
+ const newTableData = chunkVKOVFVDJ_js.deleteTableColumn(td, colIdx);
13295
13338
  if (newTableData === td) {
13296
13339
  return;
13297
13340
  }
@@ -13332,8 +13375,8 @@ async function renderToCanvas(element, options = {}) {
13332
13375
  return html2canvasPro(element, {
13333
13376
  ...options,
13334
13377
  onclone: async (doc, clonedEl) => {
13335
- await chunkI5SO5OV4_js.normalizeColorsForCapture(doc, clonedEl);
13336
- chunkI5SO5OV4_js.preprocessCssForCapture(clonedEl);
13378
+ await chunkVKOVFVDJ_js.normalizeColorsForCapture(doc, clonedEl);
13379
+ chunkVKOVFVDJ_js.preprocessCssForCapture(clonedEl);
13337
13380
  if (typeof userOnClone === "function") {
13338
13381
  userOnClone(doc, clonedEl);
13339
13382
  }
@@ -13389,7 +13432,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
13389
13432
  }
13390
13433
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
13391
13434
  const blob = await exportSlideToPngBlob(slideElement, options);
13392
- chunkI5SO5OV4_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13435
+ chunkVKOVFVDJ_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
13393
13436
  }
13394
13437
  async function copySlideToClipboard(slideElement, options = {}) {
13395
13438
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -13411,15 +13454,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
13411
13454
  continue;
13412
13455
  }
13413
13456
  const canvas = await renderElementToCanvas(stageEl, scale);
13414
- images.push(chunkI5SO5OV4_js.canvasToJpegData(canvas));
13457
+ images.push(chunkVKOVFVDJ_js.canvasToJpegData(canvas));
13415
13458
  }
13416
13459
  onProgress?.(totalSlides, totalSlides);
13417
13460
  setActiveSlide(currentSlideIndex);
13418
13461
  if (images.length === 0) {
13419
- throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
13462
+ throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
13420
13463
  }
13421
13464
  const pdfBlobUrl = buildPdfFromImageData(images);
13422
- chunkI5SO5OV4_js.downloadDataUrl(pdfBlobUrl, filename);
13465
+ chunkVKOVFVDJ_js.downloadDataUrl(pdfBlobUrl, filename);
13423
13466
  }
13424
13467
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
13425
13468
  const { scale = 2, onProgress } = options;
@@ -13465,10 +13508,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
13465
13508
  onProgress?.(totalSlides, totalSlides);
13466
13509
  setActiveSlide(currentSlideIndex);
13467
13510
  if (pages.length === 0) {
13468
- throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
13511
+ throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
13469
13512
  }
13470
13513
  const pdfDataUrl = buildNotesPdf(pages);
13471
- chunkI5SO5OV4_js.downloadDataUrl(pdfDataUrl, filename);
13514
+ chunkVKOVFVDJ_js.downloadDataUrl(pdfDataUrl, filename);
13472
13515
  }
13473
13516
 
13474
13517
  // src/viewer/utils/export-video.ts
@@ -13499,7 +13542,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13499
13542
  }
13500
13543
  setActiveSlide(currentSlideIndex);
13501
13544
  if (slideCanvases.length === 0) {
13502
- throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
13545
+ throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
13503
13546
  }
13504
13547
  const firstCanvas = slideCanvases[0];
13505
13548
  const recordingCanvas = document.createElement("canvas");
@@ -13507,12 +13550,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13507
13550
  recordingCanvas.height = firstCanvas.height;
13508
13551
  const ctx = recordingCanvas.getContext("2d");
13509
13552
  if (!ctx) {
13510
- throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNo2dContext"]);
13553
+ throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNo2dContext"]);
13511
13554
  }
13512
13555
  const fps = 30;
13513
13556
  const stream = recordingCanvas.captureStream(fps);
13514
13557
  const recorder = new MediaRecorder(stream, {
13515
- mimeType: chunkI5SO5OV4_js.pickSupportedMimeType([...chunkI5SO5OV4_js.WEBM_MIME_CANDIDATES]),
13558
+ mimeType: chunkVKOVFVDJ_js.pickSupportedMimeType([...chunkVKOVFVDJ_js.WEBM_MIME_CANDIDATES]),
13516
13559
  videoBitsPerSecond: 5e6
13517
13560
  });
13518
13561
  const chunks = [];
@@ -13535,8 +13578,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
13535
13578
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
13536
13579
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
13537
13580
  ctx.drawImage(slideCanvases[i], 0, 0);
13538
- const frameInterval = chunkI5SO5OV4_js.fpsToFrameIntervalMs(fps);
13539
- const framesNeeded = chunkI5SO5OV4_js.segmentFrameCount(duration, fps);
13581
+ const frameInterval = chunkVKOVFVDJ_js.fpsToFrameIntervalMs(fps);
13582
+ const framesNeeded = chunkVKOVFVDJ_js.segmentFrameCount(duration, fps);
13540
13583
  for (let f = 0; f < framesNeeded; f++) {
13541
13584
  if (signal?.aborted) {
13542
13585
  recorder.stop();
@@ -13583,9 +13626,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
13583
13626
  }
13584
13627
  setActiveSlide(currentSlideIndex);
13585
13628
  if (frames.length === 0) {
13586
- throw new Error(chunkZISXRMDJ_js.translationsEn["pptx.export.errorNoSlidesGif"]);
13629
+ throw new Error(chunk2EFVXYNA_js.translationsEn["pptx.export.errorNoSlidesGif"]);
13587
13630
  }
13588
- const gifBytes = chunkI5SO5OV4_js.encodeGif(frames, Math.round(slideDurationMs / 10));
13631
+ const gifBytes = chunkVKOVFVDJ_js.encodeGif(frames, Math.round(slideDurationMs / 10));
13589
13632
  onProgress?.(totalSlides, totalSlides);
13590
13633
  const buf = new ArrayBuffer(gifBytes.length);
13591
13634
  new Uint8Array(buf).set(gifBytes);
@@ -13699,7 +13742,7 @@ function useExportSaveAs(input) {
13699
13742
  }
13700
13743
  setExportProgress(70);
13701
13744
  setExportStatusMessage("Writing README...");
13702
- const readme = chunkI5SO5OV4_js.generatePackageReadme(pptxFilename);
13745
+ const readme = chunkVKOVFVDJ_js.generatePackageReadme(pptxFilename);
13703
13746
  pkgFolder.file("README.txt", readme);
13704
13747
  if (abortCtrl.signal.aborted) {
13705
13748
  throw new DOMException("Export cancelled", "AbortError");
@@ -13710,7 +13753,7 @@ function useExportSaveAs(input) {
13710
13753
  setExportProgress(95);
13711
13754
  setExportStatusMessage("Downloading...");
13712
13755
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
13713
- chunkI5SO5OV4_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
13756
+ chunkVKOVFVDJ_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
13714
13757
  setExportProgress(100);
13715
13758
  } catch (err) {
13716
13759
  if (err.name !== "AbortError") {
@@ -13733,7 +13776,7 @@ function useExportSaveAs(input) {
13733
13776
  const blob = new Blob([data], {
13734
13777
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
13735
13778
  });
13736
- chunkI5SO5OV4_js.downloadBlob(blob, `${baseName}.${ext}`);
13779
+ chunkVKOVFVDJ_js.downloadBlob(blob, `${baseName}.${ext}`);
13737
13780
  } catch (err) {
13738
13781
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
13739
13782
  }
@@ -13810,7 +13853,7 @@ function safeConfirm(message) {
13810
13853
  }
13811
13854
  }
13812
13855
  function downloadBlob2(blob, filename) {
13813
- chunkI5SO5OV4_js.downloadBlob(blob, chunkI5SO5OV4_js.sanitizeDownloadFilename(filename));
13856
+ chunkVKOVFVDJ_js.downloadBlob(blob, chunkVKOVFVDJ_js.sanitizeDownloadFilename(filename));
13814
13857
  }
13815
13858
 
13816
13859
  // src/viewer/hooks/useExportHandlers.ts
@@ -13911,21 +13954,21 @@ function useExportHandlers(input) {
13911
13954
  {
13912
13955
  scale: 2,
13913
13956
  onProgress: (current, total) => {
13914
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total));
13915
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Rendering", current, total));
13957
+ setExportProgress(chunkVKOVFVDJ_js.slideProgressPercent(current, total));
13958
+ setExportStatusMessage(chunkVKOVFVDJ_js.slideStatusLabel("Rendering", current, total));
13916
13959
  },
13917
13960
  signal: abortCtrl.signal
13918
13961
  }
13919
13962
  );
13920
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
13963
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_ASSEMBLING_PERCENT);
13921
13964
  setExportStatusMessage("Building PDF...");
13922
13965
  await new Promise((r) => {
13923
13966
  setTimeout(r, 100);
13924
13967
  });
13925
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
13968
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_DONE_PERCENT);
13926
13969
  setExportStatusMessage("Done!");
13927
13970
  } catch (err) {
13928
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
13971
+ if (!chunkVKOVFVDJ_js.isExportAbortError(err)) {
13929
13972
  console.error("[PowerPointViewer] PDF export failed:", err);
13930
13973
  }
13931
13974
  } finally {
@@ -13955,21 +13998,21 @@ function useExportHandlers(input) {
13955
13998
  {
13956
13999
  scale: 2,
13957
14000
  onProgress: (current, total) => {
13958
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total));
13959
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Rendering", current, total));
14001
+ setExportProgress(chunkVKOVFVDJ_js.slideProgressPercent(current, total));
14002
+ setExportStatusMessage(chunkVKOVFVDJ_js.slideStatusLabel("Rendering", current, total));
13960
14003
  },
13961
14004
  signal: abortCtrl.signal
13962
14005
  }
13963
14006
  );
13964
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
14007
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_ASSEMBLING_PERCENT);
13965
14008
  setExportStatusMessage("Building PDF...");
13966
14009
  await new Promise((r) => {
13967
14010
  setTimeout(r, 100);
13968
14011
  });
13969
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
14012
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_DONE_PERCENT);
13970
14013
  setExportStatusMessage("Done!");
13971
14014
  } catch (err) {
13972
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
14015
+ if (!chunkVKOVFVDJ_js.isExportAbortError(err)) {
13973
14016
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
13974
14017
  }
13975
14018
  } finally {
@@ -14010,22 +14053,22 @@ function useExportHandlers(input) {
14010
14053
  scale: 1,
14011
14054
  slideDurationMs: 3e3,
14012
14055
  onProgress: (current, total) => {
14013
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total, 45));
14014
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Capturing", current, total));
14056
+ setExportProgress(chunkVKOVFVDJ_js.slideProgressPercent(current, total, 45));
14057
+ setExportStatusMessage(chunkVKOVFVDJ_js.slideStatusLabel("Capturing", current, total));
14015
14058
  },
14016
14059
  onRecordProgress: (current, total) => {
14017
- setExportProgress(chunkI5SO5OV4_js.recordProgressPercent(current, total));
14018
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Recording", current, total));
14060
+ setExportProgress(chunkVKOVFVDJ_js.recordProgressPercent(current, total));
14061
+ setExportStatusMessage(chunkVKOVFVDJ_js.slideStatusLabel("Recording", current, total));
14019
14062
  },
14020
14063
  signal: abortCtrl.signal
14021
14064
  }
14022
14065
  );
14023
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
14066
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_ASSEMBLING_PERCENT);
14024
14067
  setExportStatusMessage("Saving file...");
14025
14068
  downloadBlob2(blob, "presentation.webm");
14026
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
14069
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_DONE_PERCENT);
14027
14070
  } catch (err) {
14028
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
14071
+ if (!chunkVKOVFVDJ_js.isExportAbortError(err)) {
14029
14072
  console.error("[PowerPointViewer] Video export failed:", err);
14030
14073
  }
14031
14074
  } finally {
@@ -14053,18 +14096,18 @@ function useExportHandlers(input) {
14053
14096
  scale: 0.5,
14054
14097
  slideDurationMs: 2e3,
14055
14098
  onProgress: (current, total) => {
14056
- setExportProgress(chunkI5SO5OV4_js.slideProgressPercent(current, total));
14057
- setExportStatusMessage(chunkI5SO5OV4_js.slideStatusLabel("Encoding", current, total));
14099
+ setExportProgress(chunkVKOVFVDJ_js.slideProgressPercent(current, total));
14100
+ setExportStatusMessage(chunkVKOVFVDJ_js.slideStatusLabel("Encoding", current, total));
14058
14101
  },
14059
14102
  signal: abortCtrl.signal
14060
14103
  }
14061
14104
  );
14062
- setExportProgress(chunkI5SO5OV4_js.EXPORT_ASSEMBLING_PERCENT);
14105
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_ASSEMBLING_PERCENT);
14063
14106
  setExportStatusMessage("Saving file...");
14064
14107
  downloadBlob2(blob, "presentation.gif");
14065
- setExportProgress(chunkI5SO5OV4_js.EXPORT_DONE_PERCENT);
14108
+ setExportProgress(chunkVKOVFVDJ_js.EXPORT_DONE_PERCENT);
14066
14109
  } catch (err) {
14067
- if (!chunkI5SO5OV4_js.isExportAbortError(err)) {
14110
+ if (!chunkVKOVFVDJ_js.isExportAbortError(err)) {
14068
14111
  console.error("[PowerPointViewer] GIF export failed:", err);
14069
14112
  }
14070
14113
  } finally {
@@ -14104,7 +14147,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
14104
14147
  }
14105
14148
  printWindow.document.open();
14106
14149
  printWindow.document.write(
14107
- chunkI5SO5OV4_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14150
+ chunkVKOVFVDJ_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
14108
14151
  );
14109
14152
  printWindow.document.close();
14110
14153
  printWindow.focus();
@@ -14165,7 +14208,7 @@ function usePrintHandlers(input) {
14165
14208
  if (svgs.length === 0) {
14166
14209
  return;
14167
14210
  }
14168
- const printDoc = chunkI5SO5OV4_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14211
+ const printDoc = chunkVKOVFVDJ_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
14169
14212
  title: "Slides (Vector)",
14170
14213
  orientation: settings.orientation,
14171
14214
  colorFilter
@@ -14201,7 +14244,7 @@ function usePrintHandlers(input) {
14201
14244
  if (settings.printWhat === "outline") {
14202
14245
  openPrintWindow(
14203
14246
  "Outline",
14204
- `<div class="outline-page">${chunkI5SO5OV4_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14247
+ `<div class="outline-page">${chunkVKOVFVDJ_js.buildOutlineHtml(slideIndices, slides)}</div>`,
14205
14248
  settings.orientation,
14206
14249
  colorFilter,
14207
14250
  settings.frameSlides
@@ -14226,7 +14269,7 @@ function usePrintHandlers(input) {
14226
14269
  if (settings.printWhat === "slides") {
14227
14270
  openPrintWindow(
14228
14271
  "Slides",
14229
- chunkI5SO5OV4_js.buildSlidesHtml(slideImages, slideIndices),
14272
+ chunkVKOVFVDJ_js.buildSlidesHtml(slideImages, slideIndices),
14230
14273
  settings.orientation,
14231
14274
  colorFilter,
14232
14275
  settings.frameSlides
@@ -14236,7 +14279,7 @@ function usePrintHandlers(input) {
14236
14279
  if (settings.printWhat === "notes") {
14237
14280
  openPrintWindow(
14238
14281
  "Notes Pages",
14239
- chunkI5SO5OV4_js.buildNotesHtml(slideImages, slideIndices, slides),
14282
+ chunkVKOVFVDJ_js.buildNotesHtml(slideImages, slideIndices, slides),
14240
14283
  "portrait",
14241
14284
  colorFilter,
14242
14285
  settings.frameSlides
@@ -14247,7 +14290,7 @@ function usePrintHandlers(input) {
14247
14290
  const spp = settings.slidesPerPage;
14248
14291
  openPrintWindow(
14249
14292
  `Handout ${spp} per page`,
14250
- chunkI5SO5OV4_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14293
+ chunkVKOVFVDJ_js.buildHandoutsHtml(slideImages, slideIndices, spp),
14251
14294
  "portrait",
14252
14295
  colorFilter,
14253
14296
  settings.frameSlides
@@ -14530,7 +14573,7 @@ function usePropertyHandlers(input) {
14530
14573
  width: canvasSize.width,
14531
14574
  height: canvasSize.height
14532
14575
  };
14533
- setCompareResult(chunkI5SO5OV4_js.comparePresentation(cur, other));
14576
+ setCompareResult(chunkVKOVFVDJ_js.comparePresentation(cur, other));
14534
14577
  setIsComparePanelOpen(true);
14535
14578
  } catch (err) {
14536
14579
  console.warn("Compare failed:", err);
@@ -14547,7 +14590,7 @@ function usePropertyHandlers(input) {
14547
14590
  if (!diff || diff.status === "unchanged") {
14548
14591
  return;
14549
14592
  }
14550
- setSlides((prev) => chunkI5SO5OV4_js.applyAcceptSlide(prev, diff));
14593
+ setSlides((prev) => chunkVKOVFVDJ_js.applyAcceptSlide(prev, diff));
14551
14594
  setIsDirty(true);
14552
14595
  },
14553
14596
  [compareResult, setSlides, setIsDirty]
@@ -14558,10 +14601,10 @@ function usePropertyHandlers(input) {
14558
14601
  if (!compareResult) {
14559
14602
  return;
14560
14603
  }
14561
- setSlides((prev) => chunkI5SO5OV4_js.applyAcceptAllSlides(prev, compareResult));
14604
+ setSlides((prev) => chunkVKOVFVDJ_js.applyAcceptAllSlides(prev, compareResult));
14562
14605
  setIsDirty(true);
14563
14606
  }, [compareResult, setSlides, setIsDirty]);
14564
- const usedFontFamilies = React3.useMemo(() => chunkI5SO5OV4_js.collectUsedFonts(slides), [slides]);
14607
+ const usedFontFamilies = React3.useMemo(() => chunkVKOVFVDJ_js.collectUsedFonts(slides), [slides]);
14565
14608
  return {
14566
14609
  handleUpdateNotes,
14567
14610
  handleUpdateSlide,
@@ -14680,7 +14723,7 @@ function useIsMobile(input) {
14680
14723
  const containerRef = input?.containerRef;
14681
14724
  const isTouchDevice = React3.useSyncExternalStore(
14682
14725
  subscribeTouchCapability,
14683
- chunkI5SO5OV4_js.detectTouchDevice,
14726
+ chunkVKOVFVDJ_js.detectTouchDevice,
14684
14727
  () => false
14685
14728
  // server snapshot
14686
14729
  );
@@ -14696,7 +14739,7 @@ function useIsMobile(input) {
14696
14739
  }
14697
14740
  return containerRef?.current?.clientHeight ?? window.innerHeight;
14698
14741
  });
14699
- const [orientation, setOrientation] = React3.useState(chunkI5SO5OV4_js.detectOrientation);
14742
+ const [orientation, setOrientation] = React3.useState(chunkVKOVFVDJ_js.detectOrientation);
14700
14743
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = React3.useState(false);
14701
14744
  const [initialViewportHeight] = React3.useState(
14702
14745
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -14740,7 +14783,7 @@ function useIsMobile(input) {
14740
14783
  return;
14741
14784
  }
14742
14785
  const handleOrientationChange = () => {
14743
- setOrientation(chunkI5SO5OV4_js.detectOrientation());
14786
+ setOrientation(chunkVKOVFVDJ_js.detectOrientation());
14744
14787
  };
14745
14788
  if (screen.orientation) {
14746
14789
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -14770,9 +14813,9 @@ function useIsMobile(input) {
14770
14813
  window.addEventListener("resize", handleResize);
14771
14814
  return () => window.removeEventListener("resize", handleResize);
14772
14815
  }, [isTouchDevice, initialViewportHeight]);
14773
- const isMobile = chunkI5SO5OV4_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
14774
- const isTablet = !isMobile && containerWidth >= chunkI5SO5OV4_js.MOBILE_BREAKPOINT && containerWidth < chunkI5SO5OV4_js.TABLET_BREAKPOINT;
14775
- const isDesktop = !isMobile && containerWidth >= chunkI5SO5OV4_js.TABLET_BREAKPOINT;
14816
+ const isMobile = chunkVKOVFVDJ_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
14817
+ const isTablet = !isMobile && containerWidth >= chunkVKOVFVDJ_js.MOBILE_BREAKPOINT && containerWidth < chunkVKOVFVDJ_js.TABLET_BREAKPOINT;
14818
+ const isDesktop = !isMobile && containerWidth >= chunkVKOVFVDJ_js.TABLET_BREAKPOINT;
14776
14819
  return {
14777
14820
  isMobile,
14778
14821
  isTablet,
@@ -14833,11 +14876,11 @@ function useViewerDialogs(input) {
14833
14876
  );
14834
14877
  const [embedFontsEnabled, setEmbedFontsEnabled] = React3.useState(false);
14835
14878
  const [isNarrowViewport, setIsNarrowViewport] = React3.useState(
14836
- () => typeof window !== "undefined" ? chunkI5SO5OV4_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
14879
+ () => typeof window !== "undefined" ? chunkVKOVFVDJ_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
14837
14880
  );
14838
14881
  React3.useEffect(() => {
14839
14882
  const handleWindow = () => setIsNarrowViewport(
14840
- chunkI5SO5OV4_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
14883
+ chunkVKOVFVDJ_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
14841
14884
  );
14842
14885
  let observer = null;
14843
14886
  let raf = 0;
@@ -14851,12 +14894,12 @@ function useViewerDialogs(input) {
14851
14894
  const entry = entries[0];
14852
14895
  if (entry) {
14853
14896
  setIsNarrowViewport(
14854
- chunkI5SO5OV4_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
14897
+ chunkVKOVFVDJ_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
14855
14898
  );
14856
14899
  }
14857
14900
  });
14858
14901
  observer.observe(el);
14859
- setIsNarrowViewport(chunkI5SO5OV4_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
14902
+ setIsNarrowViewport(chunkVKOVFVDJ_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
14860
14903
  };
14861
14904
  attach();
14862
14905
  window.addEventListener("resize", handleWindow);
@@ -15033,7 +15076,7 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
15033
15076
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
15034
15077
  }
15035
15078
  function computeSlideSectionGroups(slides, sections) {
15036
- return chunkI5SO5OV4_js.groupSlidesBySection(sections, slides).map((group) => ({
15079
+ return chunkVKOVFVDJ_js.groupSlidesBySection(sections, slides).map((group) => ({
15037
15080
  id: group.section?.id ?? (sections.length > 0 ? UNGROUPED_SECTION_ID : "default"),
15038
15081
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
15039
15082
  slideIndexes: group.slideIndexes,
@@ -15111,26 +15154,17 @@ function useDerivedSlideState(input) {
15111
15154
  };
15112
15155
  }
15113
15156
  function useAnnotationHandlers(input) {
15114
- const { mode, presentation, annotations, history, setMode, setSlides } = input;
15157
+ const {
15158
+ mode,
15159
+ presentation,
15160
+ annotations,
15161
+ history,
15162
+ setMode,
15163
+ setSlides,
15164
+ promptKeepInkAnnotations = true
15165
+ } = input;
15115
15166
  const [showKeepAnnotationsDialog, setShowKeepAnnotationsDialog] = React3.useState(false);
15116
15167
  const pendingModeAfterAnnotationsRef = React3.useRef("edit");
15117
- const handleSetMode = React3.useCallback(
15118
- (nextMode) => {
15119
- if (nextMode === "present") {
15120
- presentation.enterPresentMode();
15121
- } else if (mode === "present" && annotations.hasAnyAnnotations) {
15122
- stopAllPersistentAudio();
15123
- pendingModeAfterAnnotationsRef.current = nextMode;
15124
- setShowKeepAnnotationsDialog(true);
15125
- } else {
15126
- if (mode === "present") {
15127
- stopAllPersistentAudio();
15128
- }
15129
- setMode(nextMode);
15130
- }
15131
- },
15132
- [presentation, mode, annotations.hasAnyAnnotations, setMode]
15133
- );
15134
15168
  const handleKeepAnnotations = React3.useCallback(() => {
15135
15169
  const annotationMap = annotations.allSlideAnnotations;
15136
15170
  if (annotationMap.size === 0) {
@@ -15199,6 +15233,34 @@ function useAnnotationHandlers(input) {
15199
15233
  setShowKeepAnnotationsDialog(false);
15200
15234
  setMode(pendingModeAfterAnnotationsRef.current);
15201
15235
  }, [annotations, setMode, setSlides, history]);
15236
+ const handleSetMode = React3.useCallback(
15237
+ (nextMode) => {
15238
+ if (nextMode === "present") {
15239
+ presentation.enterPresentMode();
15240
+ } else if (mode === "present" && annotations.hasAnyAnnotations) {
15241
+ stopAllPersistentAudio();
15242
+ pendingModeAfterAnnotationsRef.current = nextMode;
15243
+ if (promptKeepInkAnnotations) {
15244
+ setShowKeepAnnotationsDialog(true);
15245
+ } else {
15246
+ handleKeepAnnotations();
15247
+ }
15248
+ } else {
15249
+ if (mode === "present") {
15250
+ stopAllPersistentAudio();
15251
+ }
15252
+ setMode(nextMode);
15253
+ }
15254
+ },
15255
+ [
15256
+ presentation,
15257
+ mode,
15258
+ annotations.hasAnyAnnotations,
15259
+ promptKeepInkAnnotations,
15260
+ handleKeepAnnotations,
15261
+ setMode
15262
+ ]
15263
+ );
15202
15264
  const handleDiscardAnnotations = React3.useCallback(() => {
15203
15265
  annotations.clearAllAnnotations();
15204
15266
  setShowKeepAnnotationsDialog(false);
@@ -15257,7 +15319,7 @@ function useSerialize(input) {
15257
15319
  return {
15258
15320
  ...el,
15259
15321
  text: pendingEditText,
15260
- textSegments: chunkI5SO5OV4_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15322
+ textSegments: chunkVKOVFVDJ_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
15261
15323
  };
15262
15324
  });
15263
15325
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -15425,14 +15487,18 @@ function usePresentationSetup(input) {
15425
15487
  setMode,
15426
15488
  setActiveSlideIndex,
15427
15489
  setSlides,
15428
- history
15490
+ history,
15491
+ endWithBlackSlide = true,
15492
+ promptKeepInkAnnotations = true,
15493
+ popupToolbarEnabled = true
15429
15494
  } = input;
15430
15495
  const actionSoundHandlerRef = React3.useRef(null);
15431
15496
  const [, setShowKeepAnnotationsDialog] = React3.useState(false);
15432
15497
  const pendingModeRef = React3.useRef("edit");
15433
15498
  const annotations = usePresentationAnnotations({
15434
15499
  isActive: mode === "present",
15435
- activeSlideIndex
15500
+ activeSlideIndex,
15501
+ popupToolbarEnabled
15436
15502
  });
15437
15503
  const presentation = usePresentationMode({
15438
15504
  mode,
@@ -15442,7 +15508,7 @@ function usePresentationSetup(input) {
15442
15508
  containerRef,
15443
15509
  content,
15444
15510
  onSetMode: (nextMode) => {
15445
- if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations) {
15511
+ if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
15446
15512
  pendingModeRef.current = nextMode;
15447
15513
  setShowKeepAnnotationsDialog(true);
15448
15514
  } else {
@@ -15490,12 +15556,13 @@ function usePresentationSetup(input) {
15490
15556
  onToggleEraser: () => annotations.setPresentationTool("eraser"),
15491
15557
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
15492
15558
  onSaveRehearsalTimings: (timings) => {
15493
- setSlides((prev) => chunkI5SO5OV4_js.applyRehearsalTimings(prev, timings));
15559
+ setSlides((prev) => chunkVKOVFVDJ_js.applyRehearsalTimings(prev, timings));
15494
15560
  history.markDirty();
15495
15561
  },
15496
- loopContinuously: chunkI5SO5OV4_js.shouldLoopContinuously(presentationProperties),
15562
+ loopContinuously: chunkVKOVFVDJ_js.shouldLoopContinuously(presentationProperties),
15497
15563
  showWithAnimation: presentationProperties.showWithAnimation,
15498
- useTimings: presentationProperties.advanceMode !== "manual"
15564
+ useTimings: presentationProperties.advanceMode !== "manual",
15565
+ endWithBlackSlide
15499
15566
  });
15500
15567
  return { presentation, annotations, actionSoundHandlerRef };
15501
15568
  }
@@ -15516,7 +15583,8 @@ function useEditorOperations(input) {
15516
15583
  dialogs,
15517
15584
  presentation,
15518
15585
  userName,
15519
- handlerRef
15586
+ handlerRef,
15587
+ transformCommittedText
15520
15588
  } = input;
15521
15589
  const ops = useElementOperations({
15522
15590
  activeSlide,
@@ -15585,7 +15653,8 @@ function useEditorOperations(input) {
15585
15653
  presentationHandleAction: presentation.handlePresentationAction,
15586
15654
  setEditingEquationOmml: dialogs.setEditingEquationOmml,
15587
15655
  setIsEquationDialogOpen: dialogs.setIsEquationDialogOpen,
15588
- setPointerCommitNonce: state.setPointerCommitNonce
15656
+ setPointerCommitNonce: state.setPointerCommitNonce,
15657
+ transformCommittedText
15589
15658
  });
15590
15659
  const insertHandlers = useInsertElements({
15591
15660
  activeSlide,
@@ -15652,7 +15721,7 @@ function useEditorOperations(input) {
15652
15721
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
15653
15722
  React3.useEffect(() => {
15654
15723
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
15655
- copiedFormatRef.current = chunkI5SO5OV4_js.copyFormatFromElement(selectedElement);
15724
+ copiedFormatRef.current = chunkVKOVFVDJ_js.copyFormatFromElement(selectedElement);
15656
15725
  } else if (!formatPainterActive) {
15657
15726
  copiedFormatRef.current = null;
15658
15727
  }
@@ -15678,7 +15747,7 @@ function useEditorOperations(input) {
15678
15747
  e.stopPropagation();
15679
15748
  const element = elementLookup.get(elementId);
15680
15749
  if (element) {
15681
- const updated = chunkI5SO5OV4_js.applyFormatToElement(element, copiedFormatRef.current);
15750
+ const updated = chunkVKOVFVDJ_js.applyFormatToElement(element, copiedFormatRef.current);
15682
15751
  const updates = {};
15683
15752
  if (chunkKV3EOLP3_js.hasShapeProperties(updated)) {
15684
15753
  updates.shapeStyle = updated.shapeStyle;
@@ -15963,7 +16032,8 @@ function useContentLifecycle(input) {
15963
16032
  ops,
15964
16033
  actionSoundHandlerRef,
15965
16034
  setIsEncryptedDialogOpen,
15966
- password
16035
+ password,
16036
+ onContentApplied
15967
16037
  } = input;
15968
16038
  const { handlerRef } = useLoadContent({
15969
16039
  content,
@@ -15998,7 +16068,8 @@ function useContentLifecycle(input) {
15998
16068
  setLoading: state.setLoading,
15999
16069
  setError: state.setError,
16000
16070
  setIsDirty: state.setIsDirty,
16001
- setIsEncrypted: setIsEncryptedDialogOpen
16071
+ setIsEncrypted: setIsEncryptedDialogOpen,
16072
+ onContentApplied
16002
16073
  });
16003
16074
  React3.useEffect(() => {
16004
16075
  actionSoundHandlerRef.current = handlerRef.current;
@@ -16299,6 +16370,7 @@ function useViewerIntegration(input) {
16299
16370
  markDirty: history.markDirty
16300
16371
  });
16301
16372
  const [isEncryptedDialogOpen, setIsEncryptedDialogOpen] = React3.useState(false);
16373
+ const [loadVersion, setLoadVersion] = React3.useState(0);
16302
16374
  const { handlerRef, serializeSlides, autosaveStatus } = useContentLifecycle({
16303
16375
  content,
16304
16376
  filePath,
@@ -16309,7 +16381,8 @@ function useViewerIntegration(input) {
16309
16381
  ops: editorOps.ops,
16310
16382
  actionSoundHandlerRef,
16311
16383
  setIsEncryptedDialogOpen,
16312
- password: dialogs.presentationPassword ?? void 0
16384
+ password: dialogs.presentationPassword ?? void 0,
16385
+ onContentApplied: () => setLoadVersion((v) => v + 1)
16313
16386
  });
16314
16387
  const { exportHandlers, printHandlers, themeHandlers, propertyHandlers } = useIOHandlers({
16315
16388
  state,
@@ -16555,7 +16628,8 @@ function useViewerIntegration(input) {
16555
16628
  handleEnterRehearsalMode,
16556
16629
  autosaveStatus,
16557
16630
  isEncryptedDialogOpen,
16558
- setIsEncryptedDialogOpen
16631
+ setIsEncryptedDialogOpen,
16632
+ loadVersion
16559
16633
  };
16560
16634
  }
16561
16635
  function getSnapshot() {
@@ -16602,9 +16676,20 @@ function useReducedMotion() {
16602
16676
  setManualReducedMotion
16603
16677
  };
16604
16678
  }
16605
- var KNOWN_TAB_IDS = new Set(chunkI5SO5OV4_js.TOOLBAR_TABS.map((tab) => tab.id));
16679
+ function useViewerOptions() {
16680
+ const storeRef = React3.useRef(null);
16681
+ storeRef.current ??= chunkVKOVFVDJ_js.createViewerOptionsStore();
16682
+ const store = storeRef.current;
16683
+ const options = React3.useSyncExternalStore(
16684
+ (onStoreChange) => store.subscribe(onStoreChange),
16685
+ () => store.getOptions(),
16686
+ () => store.getOptions()
16687
+ );
16688
+ return { optionsStore: store, options };
16689
+ }
16690
+ var KNOWN_TAB_IDS = new Set(chunkVKOVFVDJ_js.TOOLBAR_TABS.map((tab) => tab.id));
16606
16691
  function computeToolbarVisibility(hiddenActions) {
16607
- const isHidden = (id) => chunkI5SO5OV4_js.isActionHidden(id, hiddenActions);
16692
+ const isHidden = (id) => chunkVKOVFVDJ_js.isActionHidden(id, hiddenActions);
16608
16693
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
16609
16694
  return { isHidden, isTabVisible };
16610
16695
  }
@@ -16621,7 +16706,7 @@ function useYjsProvider({ config }) {
16621
16706
  const timeoutRef = React3.useRef(null);
16622
16707
  const gateRef = React3.useRef(null);
16623
16708
  if (!gateRef.current) {
16624
- gateRef.current = chunkI5SO5OV4_js.createSyncGate(() => setSynced(true));
16709
+ gateRef.current = chunkVKOVFVDJ_js.createSyncGate(() => setSynced(true));
16625
16710
  }
16626
16711
  const teardown = React3.useCallback(() => {
16627
16712
  if (timeoutRef.current) {
@@ -16659,7 +16744,7 @@ function useYjsProvider({ config }) {
16659
16744
  if (config.authToken) {
16660
16745
  opts.password = config.authToken;
16661
16746
  }
16662
- const provider = new WebrtcProvider(chunkI5SO5OV4_js.validateRoomId(config.roomId), yDoc, opts);
16747
+ const provider = new WebrtcProvider(chunkVKOVFVDJ_js.validateRoomId(config.roomId), yDoc, opts);
16663
16748
  setDoc(yDoc);
16664
16749
  setAwareness(provider.awareness);
16665
16750
  setClientId(provider.awareness.clientID);
@@ -16701,13 +16786,13 @@ function useYjsProvider({ config }) {
16701
16786
  if (!config) {
16702
16787
  return;
16703
16788
  }
16704
- const roomId = chunkI5SO5OV4_js.validateRoomId(config.roomId);
16705
- const transport = config.transport ?? chunkI5SO5OV4_js.resolveTransportForServerUrl(config.serverUrl);
16789
+ const roomId = chunkVKOVFVDJ_js.validateRoomId(config.roomId);
16790
+ const transport = config.transport ?? chunkVKOVFVDJ_js.resolveTransportForServerUrl(config.serverUrl);
16706
16791
  if (transport === "webrtc") {
16707
16792
  await initWebrtc();
16708
16793
  return;
16709
16794
  }
16710
- if (chunkI5SO5OV4_js.isMixedContentBlocked(config.serverUrl)) {
16795
+ if (chunkVKOVFVDJ_js.isMixedContentBlocked(config.serverUrl)) {
16711
16796
  console.warn(
16712
16797
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
16713
16798
  );
@@ -16767,7 +16852,7 @@ function useYjsProvider({ config }) {
16767
16852
  cleanupRef.current = null;
16768
16853
  setStatus("error");
16769
16854
  }
16770
- }, chunkI5SO5OV4_js.CONNECTION_TIMEOUT_MS);
16855
+ }, chunkVKOVFVDJ_js.CONNECTION_TIMEOUT_MS);
16771
16856
  }
16772
16857
  setDoc(yDoc);
16773
16858
  setAwareness(provider.awareness);
@@ -16840,7 +16925,7 @@ function usePresenceTracking({
16840
16925
  awareness.setLocalStateField("presence", state);
16841
16926
  lastBroadcastRef.current = Date.now();
16842
16927
  };
16843
- if (elapsed >= chunkI5SO5OV4_js.BROADCAST_THROTTLE_MS) {
16928
+ if (elapsed >= chunkVKOVFVDJ_js.BROADCAST_THROTTLE_MS) {
16844
16929
  if (pendingBroadcastRef.current) {
16845
16930
  clearTimeout(pendingBroadcastRef.current);
16846
16931
  pendingBroadcastRef.current = null;
@@ -16850,7 +16935,7 @@ function usePresenceTracking({
16850
16935
  pendingBroadcastRef.current = setTimeout(() => {
16851
16936
  pendingBroadcastRef.current = null;
16852
16937
  flush();
16853
- }, chunkI5SO5OV4_js.BROADCAST_THROTTLE_MS - elapsed);
16938
+ }, chunkVKOVFVDJ_js.BROADCAST_THROTTLE_MS - elapsed);
16854
16939
  }
16855
16940
  },
16856
16941
  [awareness, userName, userColor, userAvatar, role]
@@ -16875,7 +16960,7 @@ function usePresenceTracking({
16875
16960
  return;
16876
16961
  }
16877
16962
  const handleChange = () => {
16878
- const users = chunkI5SO5OV4_js.derivePresenceList(
16963
+ const users = chunkVKOVFVDJ_js.derivePresenceList(
16879
16964
  awareness.getStates(),
16880
16965
  localClientId,
16881
16966
  canvasWidth,
@@ -16923,7 +17008,7 @@ function useCollaborativeState({
16923
17008
  canvasWidth,
16924
17009
  canvasHeight
16925
17010
  }) {
16926
- const userColor = chunkI5SO5OV4_js.sanitizeColor(config?.userColor, "#6366f1");
17011
+ const userColor = chunkVKOVFVDJ_js.sanitizeColor(config?.userColor, "#6366f1");
16927
17012
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
16928
17013
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
16929
17014
  awareness,
@@ -16988,13 +17073,15 @@ function useYjsDocumentSync({
16988
17073
  isConnected,
16989
17074
  isSynced = true,
16990
17075
  config,
16991
- getSourceBytes
17076
+ getSourceBytes,
17077
+ loadVersion = 0
16992
17078
  }) {
16993
17079
  const isApplyingRemoteRef = React3.useRef(false);
16994
17080
  const lastSyncedRef = React3.useRef("");
16995
17081
  const hasInitializedRef = React3.useRef(false);
16996
17082
  const writeBackTimerRef = React3.useRef(null);
16997
17083
  const factoriesRef = React3.useRef(null);
17084
+ const lastLoadVersionRef = React3.useRef(loadVersion);
16998
17085
  const getFactories = React3.useCallback(async () => {
16999
17086
  if (factoriesRef.current) {
17000
17087
  return factoriesRef.current;
@@ -17029,7 +17116,7 @@ function useYjsDocumentSync({
17029
17116
  const { PptxHandler: PptxHandler2 } = await import('./dist-XF3QJAEF.js');
17030
17117
  const handler = new PptxHandler2();
17031
17118
  await handler.load(sourceBytes.buffer);
17032
- const currentSlides = chunkI5SO5OV4_js.readSlidesFromYDoc(
17119
+ const currentSlides = chunkVKOVFVDJ_js.readSlidesFromYDoc(
17033
17120
  doc
17034
17121
  );
17035
17122
  const slidesToSave = buildSaveSlides(currentSlides, templateElementsBySlideId);
@@ -17039,6 +17126,27 @@ function useYjsDocumentSync({
17039
17126
  }
17040
17127
  }, debounceMs);
17041
17128
  }, [doc, config, getSourceBytes, templateElementsBySlideId]);
17129
+ React3.useEffect(() => {
17130
+ if (loadVersion === lastLoadVersionRef.current) {
17131
+ return;
17132
+ }
17133
+ lastLoadVersionRef.current = loadVersion;
17134
+ if (!doc || !isConnected) {
17135
+ return;
17136
+ }
17137
+ const docSlides = chunkVKOVFVDJ_js.readSlidesFromYDoc(
17138
+ doc
17139
+ );
17140
+ if (docSlides.length === 0) {
17141
+ return;
17142
+ }
17143
+ lastSyncedRef.current = JSON.stringify(docSlides);
17144
+ isApplyingRemoteRef.current = true;
17145
+ setSlides(docSlides);
17146
+ requestAnimationFrame(() => {
17147
+ isApplyingRemoteRef.current = false;
17148
+ });
17149
+ }, [loadVersion, doc, isConnected, setSlides]);
17042
17150
  React3.useEffect(() => {
17043
17151
  if (!isConnected || !isSynced || !doc || isApplyingRemoteRef.current || slides.length === 0) {
17044
17152
  return;
@@ -17050,11 +17158,11 @@ function useYjsDocumentSync({
17050
17158
  lastSyncedRef.current = serialized;
17051
17159
  void (async () => {
17052
17160
  const factories = await getFactories();
17053
- chunkI5SO5OV4_js.reconcileSlidesInYDoc(
17161
+ chunkVKOVFVDJ_js.reconcileSlidesInYDoc(
17054
17162
  slides,
17055
17163
  doc,
17056
17164
  factories,
17057
- chunkI5SO5OV4_js.LOCAL_SYNC_ORIGIN
17165
+ chunkVKOVFVDJ_js.LOCAL_SYNC_ORIGIN
17058
17166
  );
17059
17167
  scheduleWriteBack();
17060
17168
  })();
@@ -17064,10 +17172,10 @@ function useYjsDocumentSync({
17064
17172
  return;
17065
17173
  }
17066
17174
  const handleChange = (_events, transaction) => {
17067
- if (transaction?.origin === chunkI5SO5OV4_js.LOCAL_SYNC_ORIGIN) {
17175
+ if (transaction?.origin === chunkVKOVFVDJ_js.LOCAL_SYNC_ORIGIN) {
17068
17176
  return;
17069
17177
  }
17070
- const remoteSlides = chunkI5SO5OV4_js.readSlidesFromYDoc(
17178
+ const remoteSlides = chunkVKOVFVDJ_js.readSlidesFromYDoc(
17071
17179
  doc
17072
17180
  );
17073
17181
  if (remoteSlides.length === 0) {
@@ -17085,7 +17193,7 @@ function useYjsDocumentSync({
17085
17193
  });
17086
17194
  scheduleWriteBack();
17087
17195
  };
17088
- const unobserve = chunkI5SO5OV4_js.observeYDocSlides(
17196
+ const unobserve = chunkVKOVFVDJ_js.observeYDocSlides(
17089
17197
  doc,
17090
17198
  handleChange
17091
17199
  );
@@ -17236,7 +17344,7 @@ function useLayoutSwitching(input) {
17236
17344
  function useVirtualizedSlides({
17237
17345
  totalItems,
17238
17346
  itemHeight,
17239
- overscan = chunkI5SO5OV4_js.DEFAULT_VIRTUAL_OVERSCAN
17347
+ overscan = chunkVKOVFVDJ_js.DEFAULT_VIRTUAL_OVERSCAN
17240
17348
  }) {
17241
17349
  const scrollContainerRef = React3.useRef(null);
17242
17350
  const [scrollTop, setScrollTop] = React3.useState(0);
@@ -17266,7 +17374,7 @@ function useVirtualizedSlides({
17266
17374
  resizeObserver?.disconnect();
17267
17375
  };
17268
17376
  }, []);
17269
- const range = chunkI5SO5OV4_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
17377
+ const range = chunkVKOVFVDJ_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
17270
17378
  const safeItemHeight = Math.max(itemHeight, 1);
17271
17379
  const scrollToIndex = React3.useCallback(
17272
17380
  (index, behavior = "smooth") => {
@@ -17312,7 +17420,7 @@ function useTouchGestures(input) {
17312
17420
  if (!el || !enabled) {
17313
17421
  return;
17314
17422
  }
17315
- const recognizer = chunkI5SO5OV4_js.createTouchGestureRecognizer({
17423
+ const recognizer = chunkVKOVFVDJ_js.createTouchGestureRecognizer({
17316
17424
  getScale: () => scaleRef.current,
17317
17425
  minScale: MIN_ZOOM_SCALE,
17318
17426
  maxScale: MAX_ZOOM_SCALE,
@@ -17355,7 +17463,7 @@ function scrollFocusedIntoView(keyboardInset) {
17355
17463
  return;
17356
17464
  }
17357
17465
  const rect = active.getBoundingClientRect();
17358
- const delta = chunkI5SO5OV4_js.computeScrollDelta(
17466
+ const delta = chunkVKOVFVDJ_js.computeScrollDelta(
17359
17467
  { top: rect.top, bottom: rect.bottom },
17360
17468
  window.innerHeight,
17361
17469
  keyboardInset
@@ -17375,8 +17483,8 @@ function useKeyboardInsets(enabled = true) {
17375
17483
  return;
17376
17484
  }
17377
17485
  const update = () => {
17378
- const metrics = chunkI5SO5OV4_js.readViewportMetrics(window);
17379
- const inset = metrics ? chunkI5SO5OV4_js.computeKeyboardInset(metrics) : 0;
17486
+ const metrics = chunkVKOVFVDJ_js.readViewportMetrics(window);
17487
+ const inset = metrics ? chunkVKOVFVDJ_js.computeKeyboardInset(metrics) : 0;
17380
17488
  setKeyboardInset(inset);
17381
17489
  if (inset > 0) {
17382
17490
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -17387,8 +17495,8 @@ function useKeyboardInsets(enabled = true) {
17387
17495
  vv.addEventListener("scroll", update);
17388
17496
  const onFocusIn = () => {
17389
17497
  window.requestAnimationFrame(() => {
17390
- const metrics = chunkI5SO5OV4_js.readViewportMetrics(window);
17391
- const inset = metrics ? chunkI5SO5OV4_js.computeKeyboardInset(metrics) : 0;
17498
+ const metrics = chunkVKOVFVDJ_js.readViewportMetrics(window);
17499
+ const inset = metrics ? chunkVKOVFVDJ_js.computeKeyboardInset(metrics) : 0;
17392
17500
  if (inset > 0) {
17393
17501
  scrollFocusedIntoView(inset);
17394
17502
  }
@@ -17401,7 +17509,7 @@ function useKeyboardInsets(enabled = true) {
17401
17509
  document.removeEventListener("focusin", onFocusIn);
17402
17510
  };
17403
17511
  }, [enabled]);
17404
- return { keyboardInset, isKeyboardOpen: chunkI5SO5OV4_js.isKeyboardOpen(keyboardInset) };
17512
+ return { keyboardInset, isKeyboardOpen: chunkVKOVFVDJ_js.isKeyboardOpen(keyboardInset) };
17405
17513
  }
17406
17514
 
17407
17515
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -17456,13 +17564,13 @@ function buildCanvasProps(input) {
17456
17564
  if (mode === "present") {
17457
17565
  presentation.handlePresentationAction(action);
17458
17566
  } else if (action.url) {
17459
- chunkI5SO5OV4_js.safeOpenUrl(action.url);
17567
+ chunkVKOVFVDJ_js.safeOpenUrl(action.url);
17460
17568
  }
17461
17569
  };
17462
17570
  const handleHyperlinkClick = (url) => {
17463
- if (chunkI5SO5OV4_js.isPpactionUrl(url)) {
17571
+ if (chunkVKOVFVDJ_js.isPpactionUrl(url)) {
17464
17572
  if (mode === "present") {
17465
- const parsed = chunkI5SO5OV4_js.parsePpactionUrl(url);
17573
+ const parsed = chunkVKOVFVDJ_js.parsePpactionUrl(url);
17466
17574
  if (parsed) {
17467
17575
  presentation.handlePresentationAction({
17468
17576
  action: parsed.action,
@@ -17472,7 +17580,7 @@ function buildCanvasProps(input) {
17472
17580
  }
17473
17581
  return;
17474
17582
  }
17475
- chunkI5SO5OV4_js.safeOpenUrl(url);
17583
+ chunkVKOVFVDJ_js.safeOpenUrl(url);
17476
17584
  };
17477
17585
  return {
17478
17586
  activeSlide: effectiveSlide,
@@ -17792,7 +17900,7 @@ function buildToolbarProps(input) {
17792
17900
  onOpenFile,
17793
17901
  onOpenRecentFile,
17794
17902
  onCreatePresentation: (templateId) => {
17795
- s.setSlides(chunkI5SO5OV4_js.createBackstagePresentation(templateId));
17903
+ s.setSlides(chunkVKOVFVDJ_js.createBackstagePresentation(templateId));
17796
17904
  s.setActiveSlideIndex(0);
17797
17905
  s.setSelectedElementId(null);
17798
17906
  s.setSelectedElementIds([]);
@@ -17847,7 +17955,7 @@ function buildToolbarProps(input) {
17847
17955
  isCommentsPanelOpen: s.isInspectorPaneOpen,
17848
17956
  slideCommentCount: activeSlide?.comments?.length ?? 0,
17849
17957
  formatPainterActive: s.formatPainterActive,
17850
- canActivateFormatPainter: chunkI5SO5OV4_js.hasCopyableFormat(selectedElement),
17958
+ canActivateFormatPainter: chunkVKOVFVDJ_js.hasCopyableFormat(selectedElement),
17851
17959
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
17852
17960
  isSelectionPaneOpen: s.isSelectionPaneOpen,
17853
17961
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -18110,7 +18218,7 @@ function useViewerBuildingBlocks(input) {
18110
18218
  }, [incomingContent]);
18111
18219
  const onOpenFile = React3.useCallback(() => {
18112
18220
  void (async () => {
18113
- const picked = await chunkI5SO5OV4_js.openPptxFile();
18221
+ const picked = await chunkVKOVFVDJ_js.openPptxFile();
18114
18222
  if (picked) {
18115
18223
  setContent(picked.buffer);
18116
18224
  }
@@ -18118,7 +18226,7 @@ function useViewerBuildingBlocks(input) {
18118
18226
  }, []);
18119
18227
  const onOpenRecentFile = React3.useCallback((key) => {
18120
18228
  void (async () => {
18121
- const bytes = await chunkI5SO5OV4_js.readBackstageRecentFile(key);
18229
+ const bytes = await chunkVKOVFVDJ_js.readBackstageRecentFile(key);
18122
18230
  if (bytes) {
18123
18231
  setContent(bytes);
18124
18232
  }
@@ -18432,6 +18540,7 @@ exports.useViewerBuildingBlocks = useViewerBuildingBlocks;
18432
18540
  exports.useViewerCoreState = useViewerCoreState;
18433
18541
  exports.useViewerDialogs = useViewerDialogs;
18434
18542
  exports.useViewerIntegration = useViewerIntegration;
18543
+ exports.useViewerOptions = useViewerOptions;
18435
18544
  exports.useViewerState = useViewerState;
18436
18545
  exports.useViewerUIState = useViewerUIState;
18437
18546
  exports.useVirtualizedSlides = useVirtualizedSlides;