pptx-react-viewer 2.4.0 → 2.5.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 (102) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/{AiChatPanel-SXYMXFYS.mjs → AiChatPanel-EMF3UYCE.mjs} +3 -3
  3. package/dist/AiChatPanel-EMF3UYCE.mjs.br +0 -0
  4. package/dist/AiChatPanel-EMF3UYCE.mjs.gz +0 -0
  5. package/dist/{AiChatPanel-HLLGXBZF.js → AiChatPanel-OHSLJNYG.js} +22 -22
  6. package/dist/AiChatPanel-OHSLJNYG.js.br +0 -0
  7. package/dist/AiChatPanel-OHSLJNYG.js.gz +0 -0
  8. package/dist/{Model3DScene-ZQBWLAMC.js → Model3DScene-ULHIJPMU.js} +2 -2
  9. package/dist/Model3DScene-ULHIJPMU.js.br +0 -0
  10. package/dist/Model3DScene-ULHIJPMU.js.gz +0 -0
  11. package/dist/{Model3DScene-IECT4RWT.mjs → Model3DScene-X6QJTWHV.mjs} +1 -1
  12. package/dist/{Model3DScene-IECT4RWT.mjs.br → Model3DScene-X6QJTWHV.mjs.br} +0 -0
  13. package/dist/Model3DScene-X6QJTWHV.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-4KRMRWW6.js → SurfaceChart3DScene-K7Q5NYZ4.js} +2 -2
  15. package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-K7Q5NYZ4.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-52C3IMPQ.mjs → SurfaceChart3DScene-PRCKQJQQ.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-52C3IMPQ.mjs.br → SurfaceChart3DScene-PRCKQJQQ.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-PRCKQJQQ.mjs.gz +0 -0
  20. package/dist/{chunk-VEZO33T2.js → chunk-7Q7AEPO7.js} +378 -324
  21. package/dist/chunk-7Q7AEPO7.js.br +0 -0
  22. package/dist/chunk-7Q7AEPO7.js.gz +0 -0
  23. package/dist/{chunk-XSBFV6TL.js → chunk-I4AFCPUC.js} +843 -844
  24. package/dist/chunk-I4AFCPUC.js.br +0 -0
  25. package/dist/chunk-I4AFCPUC.js.gz +0 -0
  26. package/dist/{chunk-KK7FWBGO.mjs → chunk-JSFUU2BB.mjs} +7 -8
  27. package/dist/chunk-JSFUU2BB.mjs.br +0 -0
  28. package/dist/chunk-JSFUU2BB.mjs.gz +0 -0
  29. package/dist/{chunk-LRIXPSVT.mjs → chunk-LIQGO45T.mjs} +72 -18
  30. package/dist/chunk-LIQGO45T.mjs.br +0 -0
  31. package/dist/chunk-LIQGO45T.mjs.gz +0 -0
  32. package/dist/{chunk-WK56SFN7.js → chunk-LTEDT475.js} +392 -68
  33. package/dist/chunk-LTEDT475.js.br +0 -0
  34. package/dist/chunk-LTEDT475.js.gz +0 -0
  35. package/dist/{chunk-5GHLRHBR.js → chunk-MJAEB43A.js} +3 -3
  36. package/dist/chunk-MJAEB43A.js.br +0 -0
  37. package/dist/chunk-MJAEB43A.js.gz +0 -0
  38. package/dist/{chunk-5TPQJWEO.js → chunk-NVH3RIN7.js} +271 -279
  39. package/dist/chunk-NVH3RIN7.js.br +0 -0
  40. package/dist/chunk-NVH3RIN7.js.gz +0 -0
  41. package/dist/{chunk-G6Q3NXRV.mjs → chunk-TGVID6BB.mjs} +40 -48
  42. package/dist/chunk-TGVID6BB.mjs.br +0 -0
  43. package/dist/chunk-TGVID6BB.mjs.gz +0 -0
  44. package/dist/{chunk-QBZA2GMB.mjs → chunk-VOV2N3NY.mjs} +388 -69
  45. package/dist/chunk-VOV2N3NY.mjs.br +0 -0
  46. package/dist/chunk-VOV2N3NY.mjs.gz +0 -0
  47. package/dist/{chunk-Q6FC2552.mjs → chunk-WJKMTDXS.mjs} +1 -1
  48. package/dist/chunk-WJKMTDXS.mjs.br +0 -0
  49. package/dist/chunk-WJKMTDXS.mjs.gz +0 -0
  50. package/dist/index.d.ts +33 -0
  51. package/dist/index.js +34 -34
  52. package/dist/index.js.br +0 -0
  53. package/dist/index.js.gz +0 -0
  54. package/dist/index.mjs +5 -5
  55. package/dist/index.mjs.br +0 -0
  56. package/dist/index.mjs.gz +0 -0
  57. package/dist/internals.d.ts +58 -1
  58. package/dist/internals.d.ts.map +1 -1
  59. package/dist/internals.js +78 -78
  60. package/dist/internals.js.br +0 -0
  61. package/dist/internals.js.gz +0 -0
  62. package/dist/internals.mjs +3 -3
  63. package/dist/internals.mjs.br +0 -0
  64. package/dist/internals.mjs.gz +0 -0
  65. package/dist/viewer/index.d.ts +33 -0
  66. package/dist/viewer/index.js +21 -21
  67. package/dist/viewer/index.js.br +0 -0
  68. package/dist/viewer/index.js.gz +0 -0
  69. package/dist/viewer/index.mjs +5 -5
  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/AiChatPanel-HLLGXBZF.js.br +0 -0
  74. package/dist/AiChatPanel-HLLGXBZF.js.gz +0 -0
  75. package/dist/AiChatPanel-SXYMXFYS.mjs.br +0 -0
  76. package/dist/AiChatPanel-SXYMXFYS.mjs.gz +0 -0
  77. package/dist/Model3DScene-IECT4RWT.mjs.gz +0 -0
  78. package/dist/Model3DScene-ZQBWLAMC.js.br +0 -0
  79. package/dist/Model3DScene-ZQBWLAMC.js.gz +0 -0
  80. package/dist/SurfaceChart3DScene-4KRMRWW6.js.br +0 -0
  81. package/dist/SurfaceChart3DScene-4KRMRWW6.js.gz +0 -0
  82. package/dist/SurfaceChart3DScene-52C3IMPQ.mjs.gz +0 -0
  83. package/dist/chunk-5GHLRHBR.js.br +0 -0
  84. package/dist/chunk-5GHLRHBR.js.gz +0 -0
  85. package/dist/chunk-5TPQJWEO.js.br +0 -0
  86. package/dist/chunk-5TPQJWEO.js.gz +0 -0
  87. package/dist/chunk-G6Q3NXRV.mjs.br +0 -0
  88. package/dist/chunk-G6Q3NXRV.mjs.gz +0 -0
  89. package/dist/chunk-KK7FWBGO.mjs.br +0 -0
  90. package/dist/chunk-KK7FWBGO.mjs.gz +0 -0
  91. package/dist/chunk-LRIXPSVT.mjs.br +0 -0
  92. package/dist/chunk-LRIXPSVT.mjs.gz +0 -0
  93. package/dist/chunk-Q6FC2552.mjs.br +0 -0
  94. package/dist/chunk-Q6FC2552.mjs.gz +0 -0
  95. package/dist/chunk-QBZA2GMB.mjs.br +0 -0
  96. package/dist/chunk-QBZA2GMB.mjs.gz +0 -0
  97. package/dist/chunk-VEZO33T2.js.br +0 -0
  98. package/dist/chunk-VEZO33T2.js.gz +0 -0
  99. package/dist/chunk-WK56SFN7.js.br +0 -0
  100. package/dist/chunk-WK56SFN7.js.gz +0 -0
  101. package/dist/chunk-XSBFV6TL.js.br +0 -0
  102. package/dist/chunk-XSBFV6TL.js.gz +0 -0
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunk5TPQJWEO_js = require('./chunk-5TPQJWEO.js');
3
+ var chunkNVH3RIN7_js = require('./chunk-NVH3RIN7.js');
4
4
  var chunk25VSL2BB_js = require('./chunk-25VSL2BB.js');
5
- var chunkWK56SFN7_js = require('./chunk-WK56SFN7.js');
5
+ var chunkLTEDT475_js = require('./chunk-LTEDT475.js');
6
6
  var react = require('react');
7
7
  var JSZip = require('jszip');
8
8
  var reactI18next = require('react-i18next');
@@ -14,7 +14,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
14
14
  function useVirtualizedSlides({
15
15
  totalItems,
16
16
  itemHeight,
17
- overscan = chunkWK56SFN7_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkLTEDT475_js.DEFAULT_VIRTUAL_OVERSCAN
18
18
  }) {
19
19
  const scrollContainerRef = react.useRef(null);
20
20
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -44,7 +44,7 @@ function useVirtualizedSlides({
44
44
  resizeObserver?.disconnect();
45
45
  };
46
46
  }, []);
47
- const range = chunkWK56SFN7_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkLTEDT475_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
48
48
  const safeItemHeight = Math.max(itemHeight, 1);
49
49
  const scrollToIndex = react.useCallback(
50
50
  (index, behavior = "smooth") => {
@@ -107,7 +107,7 @@ function usePresenceTracking({
107
107
  awareness.setLocalStateField("presence", state);
108
108
  lastBroadcastRef.current = Date.now();
109
109
  };
110
- if (elapsed >= chunkWK56SFN7_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkLTEDT475_js.BROADCAST_THROTTLE_MS) {
111
111
  if (pendingBroadcastRef.current) {
112
112
  clearTimeout(pendingBroadcastRef.current);
113
113
  pendingBroadcastRef.current = null;
@@ -117,7 +117,7 @@ function usePresenceTracking({
117
117
  pendingBroadcastRef.current = setTimeout(() => {
118
118
  pendingBroadcastRef.current = null;
119
119
  flush();
120
- }, chunkWK56SFN7_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkLTEDT475_js.BROADCAST_THROTTLE_MS - elapsed);
121
121
  }
122
122
  },
123
123
  [awareness, userName, userColor, userAvatar, role]
@@ -142,7 +142,7 @@ function usePresenceTracking({
142
142
  return;
143
143
  }
144
144
  const handleChange = () => {
145
- const users = chunkWK56SFN7_js.derivePresenceList(
145
+ const users = chunkLTEDT475_js.derivePresenceList(
146
146
  awareness.getStates(),
147
147
  localClientId,
148
148
  canvasWidth,
@@ -194,7 +194,7 @@ function useYjsProvider({ config }) {
194
194
  const departureRef = react.useRef(null);
195
195
  const gateRef = react.useRef(null);
196
196
  if (!gateRef.current) {
197
- gateRef.current = chunkWK56SFN7_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkLTEDT475_js.createSyncGate(() => setSynced(true));
198
198
  }
199
199
  const teardown = react.useCallback(() => {
200
200
  if (timeoutRef.current) {
@@ -214,7 +214,7 @@ function useYjsProvider({ config }) {
214
214
  const buildCleanup = react.useCallback(
215
215
  (provider, yDoc) => () => {
216
216
  announceDeparture();
217
- chunkWK56SFN7_js.clearLocalAwareness(provider.awareness);
217
+ chunkLTEDT475_js.clearLocalAwareness(provider.awareness);
218
218
  provider.destroy();
219
219
  yDoc.destroy();
220
220
  setDoc(null);
@@ -239,9 +239,9 @@ function useYjsProvider({ config }) {
239
239
  if (config.authToken) {
240
240
  opts.password = config.authToken;
241
241
  }
242
- const roomId = chunkWK56SFN7_js.validateRoomId(config.roomId);
242
+ const roomId = chunkLTEDT475_js.validateRoomId(config.roomId);
243
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
244
- departureRef.current = chunkWK56SFN7_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkLTEDT475_js.createDepartureChannel(roomId, provider.awareness);
245
245
  setDoc(yDoc);
246
246
  setAwareness(provider.awareness);
247
247
  setClientId(provider.awareness.clientID);
@@ -283,13 +283,13 @@ function useYjsProvider({ config }) {
283
283
  if (!config) {
284
284
  return;
285
285
  }
286
- const roomId = chunkWK56SFN7_js.validateRoomId(config.roomId);
287
- const transport = config.transport ?? chunkWK56SFN7_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkLTEDT475_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkLTEDT475_js.resolveTransportForServerUrl(config.serverUrl);
288
288
  if (transport === "webrtc") {
289
289
  await initWebrtc();
290
290
  return;
291
291
  }
292
- if (chunkWK56SFN7_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkLTEDT475_js.isMixedContentBlocked(config.serverUrl)) {
293
293
  console.warn(
294
294
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
295
295
  );
@@ -303,7 +303,7 @@ function useYjsProvider({ config }) {
303
303
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
304
304
  params: config.authToken ? { token: config.authToken } : void 0
305
305
  });
306
- departureRef.current = chunkWK56SFN7_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkLTEDT475_js.createDepartureChannel(roomId, provider.awareness);
307
307
  let connected = false;
308
308
  const handleStatus = (event) => {
309
309
  if (event.status === "connected") {
@@ -343,7 +343,7 @@ function useYjsProvider({ config }) {
343
343
  provider.off("status", handleStatus);
344
344
  provider.off("sync", handleSynced);
345
345
  announceDeparture();
346
- chunkWK56SFN7_js.clearLocalAwareness(provider.awareness);
346
+ chunkLTEDT475_js.clearLocalAwareness(provider.awareness);
347
347
  provider.destroy();
348
348
  yDoc.destroy();
349
349
  setDoc(null);
@@ -352,7 +352,7 @@ function useYjsProvider({ config }) {
352
352
  cleanupRef.current = null;
353
353
  setStatus("error");
354
354
  }
355
- }, chunkWK56SFN7_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkLTEDT475_js.CONNECTION_TIMEOUT_MS);
356
356
  }
357
357
  setDoc(yDoc);
358
358
  setAwareness(provider.awareness);
@@ -361,7 +361,7 @@ function useYjsProvider({ config }) {
361
361
  provider.off("status", handleStatus);
362
362
  provider.off("sync", handleSynced);
363
363
  announceDeparture();
364
- chunkWK56SFN7_js.clearLocalAwareness(provider.awareness);
364
+ chunkLTEDT475_js.clearLocalAwareness(provider.awareness);
365
365
  provider.destroy();
366
366
  yDoc.destroy();
367
367
  setDoc(null);
@@ -387,7 +387,7 @@ function useYjsProvider({ config }) {
387
387
  ]);
388
388
  react.useEffect(() => {
389
389
  init();
390
- const disposeTeardown = chunkWK56SFN7_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkLTEDT475_js.registerCollaborationTeardown({
391
391
  leave: teardown,
392
392
  rejoin: init
393
393
  });
@@ -408,7 +408,7 @@ function useCollaborativeState({
408
408
  canvasWidth,
409
409
  canvasHeight
410
410
  }) {
411
- const userColor = chunkWK56SFN7_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkLTEDT475_js.sanitizeColor(config?.userColor, "#6366f1");
412
412
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
413
413
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
414
414
  awareness,
@@ -517,8 +517,8 @@ function useEditorHistory(input) {
517
517
  width: canvasSize.width,
518
518
  height: canvasSize.height,
519
519
  activeSlideIndex,
520
- slides: slides.map(chunkWK56SFN7_js.cloneSlide),
521
- templateElementsBySlideId: chunkWK56SFN7_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkLTEDT475_js.cloneSlide),
521
+ templateElementsBySlideId: chunkLTEDT475_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
522
522
  ...actionLabel ? { actionLabel } : {}
523
523
  };
524
524
  },
@@ -531,9 +531,9 @@ function useEditorHistory(input) {
531
531
  width: snapshot.width,
532
532
  height: snapshot.height
533
533
  });
534
- setSlides(snapshot.slides.map(chunkWK56SFN7_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkLTEDT475_js.cloneSlide));
535
535
  setTemplateElementsBySlideId(
536
- chunkWK56SFN7_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkLTEDT475_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
537
  );
538
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
539
539
  setSelectedElementIds([]);
@@ -567,8 +567,8 @@ function useEditorHistory(input) {
567
567
  const currentSnapshot = buildHistorySnapshot();
568
568
  historyFutureRef.current.push(currentSnapshot);
569
569
  isApplyingHistoryRef.current = true;
570
- const nextSnapshot = chunk5TPQJWEO_js.cloneHistorySnapshot(previousSnapshot);
571
- lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunkNVH3RIN7_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunkNVH3RIN7_js.cloneHistorySnapshot(nextSnapshot);
572
572
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
573
573
  applyHistorySnapshot(nextSnapshot);
574
574
  updateHistoryAvailability();
@@ -589,8 +589,8 @@ function useEditorHistory(input) {
589
589
  const currentSnapshot = buildHistorySnapshot();
590
590
  historyPastRef.current.push(currentSnapshot);
591
591
  isApplyingHistoryRef.current = true;
592
- const targetSnapshot = chunk5TPQJWEO_js.cloneHistorySnapshot(nextSnapshot);
593
- lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunkNVH3RIN7_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunkNVH3RIN7_js.cloneHistorySnapshot(targetSnapshot);
594
594
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
595
595
  applyHistorySnapshot(targetSnapshot);
596
596
  updateHistoryAvailability();
@@ -608,7 +608,7 @@ function useEditorHistory(input) {
608
608
  historyPastRef.current = [];
609
609
  historyFutureRef.current = [];
610
610
  if (initialSnapshot) {
611
- const clonedInitial = chunk5TPQJWEO_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunkNVH3RIN7_js.cloneHistorySnapshot(initialSnapshot);
612
612
  lastHistorySnapshotRef.current = clonedInitial;
613
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
614
614
  } else {
@@ -649,18 +649,18 @@ function useEditorHistory(input) {
649
649
  }
650
650
  const previousSnapshot = lastHistorySnapshotRef.current;
651
651
  if (!previousSnapshot) {
652
- lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunkNVH3RIN7_js.cloneHistorySnapshot(snapshot);
653
653
  lastHistorySerializedRef.current = serialized;
654
654
  lastCheapHashRef.current = cheapHash;
655
655
  updateHistoryAvailability();
656
656
  return;
657
657
  }
658
- historyPastRef.current.push(chunk5TPQJWEO_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunkNVH3RIN7_js.cloneHistorySnapshot(previousSnapshot));
659
659
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
660
660
  historyPastRef.current.shift();
661
661
  }
662
662
  historyFutureRef.current = [];
663
- lastHistorySnapshotRef.current = chunk5TPQJWEO_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunkNVH3RIN7_js.cloneHistorySnapshot(snapshot);
664
664
  lastHistorySerializedRef.current = serialized;
665
665
  lastCheapHashRef.current = cheapHash;
666
666
  updateHistoryAvailability();
@@ -749,7 +749,7 @@ function useZoomViewport({
749
749
  if (!wrapper || !canvasViewport) {
750
750
  return;
751
751
  }
752
- const boundedScale = Math.min(Math.max(nextScale, chunk5TPQJWEO_js.MIN_ZOOM_SCALE), chunk5TPQJWEO_js.MAX_ZOOM_SCALE);
752
+ const boundedScale = Math.min(Math.max(nextScale, chunkNVH3RIN7_js.MIN_ZOOM_SCALE), chunkNVH3RIN7_js.MAX_ZOOM_SCALE);
753
753
  const nextEditorScale = fitScale * boundedScale;
754
754
  const centerX = (bounds.minX + bounds.maxX) / 2;
755
755
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -764,10 +764,10 @@ function useZoomViewport({
764
764
  [fitScale]
765
765
  );
766
766
  const handleZoomIn = react.useCallback(() => {
767
- setScale((currentScale) => Math.min(currentScale + 0.1, chunk5TPQJWEO_js.MAX_ZOOM_SCALE));
767
+ setScale((currentScale) => Math.min(currentScale + 0.1, chunkNVH3RIN7_js.MAX_ZOOM_SCALE));
768
768
  }, []);
769
769
  const handleZoomOut = react.useCallback(() => {
770
- setScale((currentScale) => Math.max(currentScale - 0.1, chunk5TPQJWEO_js.MIN_ZOOM_SCALE));
770
+ setScale((currentScale) => Math.max(currentScale - 0.1, chunkNVH3RIN7_js.MIN_ZOOM_SCALE));
771
771
  }, []);
772
772
  const handleResetZoom = react.useCallback(() => {
773
773
  setScale(1);
@@ -786,22 +786,22 @@ function useZoomViewport({
786
786
  selectedElements.forEach((element) => {
787
787
  minX = Math.min(minX, element.x);
788
788
  minY = Math.min(minY, element.y);
789
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE));
790
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE));
789
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE));
790
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE));
791
791
  });
792
792
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
793
793
  return;
794
794
  }
795
795
  const selectionBounds = { minX, minY, maxX, maxY };
796
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE);
797
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE);
796
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE);
797
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE);
798
798
  const availableWidth = Math.max(
799
- effectiveEditorDimensions.width - chunk5TPQJWEO_js.ZOOM_TO_SELECTION_PADDING,
800
- chunk5TPQJWEO_js.MIN_ELEMENT_SIZE
799
+ effectiveEditorDimensions.width - chunkNVH3RIN7_js.ZOOM_TO_SELECTION_PADDING,
800
+ chunkNVH3RIN7_js.MIN_ELEMENT_SIZE
801
801
  );
802
802
  const availableHeight = Math.max(
803
- effectiveEditorDimensions.height - chunk5TPQJWEO_js.ZOOM_TO_SELECTION_PADDING,
804
- chunk5TPQJWEO_js.MIN_ELEMENT_SIZE
803
+ effectiveEditorDimensions.height - chunkNVH3RIN7_js.ZOOM_TO_SELECTION_PADDING,
804
+ chunkNVH3RIN7_js.MIN_ELEMENT_SIZE
805
805
  );
806
806
  const targetEditorScale = Math.min(
807
807
  availableWidth / boundsWidth,
@@ -809,8 +809,8 @@ function useZoomViewport({
809
809
  );
810
810
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
811
811
  const nextScale = Math.min(
812
- Math.max(targetEditorScale / safeFitScale, chunk5TPQJWEO_js.MIN_ZOOM_SCALE),
813
- chunk5TPQJWEO_js.MAX_ZOOM_SCALE
812
+ Math.max(targetEditorScale / safeFitScale, chunkNVH3RIN7_js.MIN_ZOOM_SCALE),
813
+ chunkNVH3RIN7_js.MAX_ZOOM_SCALE
814
814
  );
815
815
  setScale(nextScale);
816
816
  window.requestAnimationFrame(() => {
@@ -832,7 +832,7 @@ function useZoomViewport({
832
832
  event.preventDefault();
833
833
  const delta = event.deltaY * -1e-3;
834
834
  setScale(
835
- (currentScale) => Math.min(Math.max(currentScale + delta, chunk5TPQJWEO_js.MIN_ZOOM_SCALE), chunk5TPQJWEO_js.MAX_ZOOM_SCALE)
835
+ (currentScale) => Math.min(Math.max(currentScale + delta, chunkNVH3RIN7_js.MIN_ZOOM_SCALE), chunkNVH3RIN7_js.MAX_ZOOM_SCALE)
836
836
  );
837
837
  }, []);
838
838
  react.useEffect(() => {
@@ -910,7 +910,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
910
910
  const command = step.command;
911
911
  const timer = window.setTimeout(
912
912
  () => {
913
- chunk5TPQJWEO_js.executeMediaCommand(command);
913
+ chunkNVH3RIN7_js.executeMediaCommand(command);
914
914
  },
915
915
  Math.max(0, step.delayMs)
916
916
  );
@@ -1021,11 +1021,12 @@ function useAnimationPlayback(input) {
1021
1021
  const presentationTimersRef = react.useRef([]);
1022
1022
  const controllerRef = react.useRef(null);
1023
1023
  const buildRafRef = react.useRef(null);
1024
+ const seededCompletedRef = react.useRef(false);
1024
1025
  const startBuildReveal = react.useCallback(
1025
1026
  (controller, group) => {
1026
1027
  driveBuildReveal(
1027
1028
  controller,
1028
- chunkWK56SFN7_js.PresentationAnimationController.collectBuildStepIds(group),
1029
+ chunkLTEDT475_js.PresentationAnimationController.collectBuildStepIds(group),
1029
1030
  setPresentationElementStates,
1030
1031
  buildRafRef
1031
1032
  );
@@ -1088,7 +1089,7 @@ function useAnimationPlayback(input) {
1088
1089
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1089
1090
  return;
1090
1091
  }
1091
- const controller = chunkWK56SFN7_js.PresentationAnimationController.fromSlide(slide);
1092
+ const controller = chunkLTEDT475_js.PresentationAnimationController.fromSlide(slide);
1092
1093
  controllerRef.current = controller;
1093
1094
  setPresentationKeyframesCss(controller.keyframesCss);
1094
1095
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1173,7 +1174,7 @@ function useAnimationPlayback(input) {
1173
1174
  controller.resetHover(shapeId);
1174
1175
  }, []);
1175
1176
  const runPresentationEntranceAnimations = react.useCallback(
1176
- (slideIndex) => {
1177
+ (slideIndex, options) => {
1177
1178
  clearPresentationTimers();
1178
1179
  if (!animationsEnabled) {
1179
1180
  controllerRef.current = null;
@@ -1190,6 +1191,17 @@ function useAnimationPlayback(input) {
1190
1191
  setPresentationAnimations([]);
1191
1192
  return;
1192
1193
  }
1194
+ seededCompletedRef.current = false;
1195
+ if (options?.completed) {
1196
+ const seeded = controllerRef.current;
1197
+ if (seeded) {
1198
+ seededCompletedRef.current = seeded.hasMoreSteps();
1199
+ seeded.completeAll();
1200
+ setPresentationElementStates(seeded.computeStates());
1201
+ }
1202
+ setPresentationAnimations([]);
1203
+ return;
1204
+ }
1193
1205
  const controller = controllerRef.current;
1194
1206
  if (controller && controller.hasMoreSteps()) {
1195
1207
  const firstGroup = controller.peekNext();
@@ -1225,7 +1237,7 @@ function useAnimationPlayback(input) {
1225
1237
  }))
1226
1238
  );
1227
1239
  entranceAnimations.forEach((animation, animationIndex) => {
1228
- const delay = chunkWK56SFN7_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1240
+ const delay = chunkLTEDT475_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1229
1241
  const timer = window.setTimeout(() => {
1230
1242
  setPresentationAnimations(
1231
1243
  (previousAnimations) => previousAnimations.map(
@@ -1258,15 +1270,16 @@ function useAnimationPlayback(input) {
1258
1270
  handleHoverStart,
1259
1271
  handleHoverEnd,
1260
1272
  runPresentationEntranceAnimations,
1273
+ isSeededCompleted: () => seededCompletedRef.current,
1261
1274
  presentationTimersRef
1262
1275
  };
1263
1276
  }
1264
- var PRESENTER_CHANNEL_NAME = chunkWK56SFN7_js.PRESENTATION_CHANNEL_NAME;
1265
- var AUDIENCE_HASH = chunkWK56SFN7_js.PRESENTATION_HASH;
1266
- var PRESENTER_MSG_ORIGIN = chunkWK56SFN7_js.PRESENTATION_MESSAGE_ORIGIN;
1267
- var AUDIENCE_NONCE_KEY = chunkWK56SFN7_js.PRESENTATION_NONCE_KEY;
1277
+ var PRESENTER_CHANNEL_NAME = chunkLTEDT475_js.PRESENTATION_CHANNEL_NAME;
1278
+ var AUDIENCE_HASH = chunkLTEDT475_js.PRESENTATION_HASH;
1279
+ var PRESENTER_MSG_ORIGIN = chunkLTEDT475_js.PRESENTATION_MESSAGE_ORIGIN;
1280
+ var AUDIENCE_NONCE_KEY = chunkLTEDT475_js.PRESENTATION_NONCE_KEY;
1268
1281
  function generateSessionId() {
1269
- return chunkWK56SFN7_js.createPresentationSessionId();
1282
+ return chunkLTEDT475_js.createPresentationSessionId();
1270
1283
  }
1271
1284
  function parseAudienceNonce() {
1272
1285
  const hash = window.location.hash;
@@ -1302,7 +1315,7 @@ function usePresenterWindow(input) {
1302
1315
  }, []);
1303
1316
  const swapDisplays = react.useCallback(async () => {
1304
1317
  const audience = audienceWindowRef.current;
1305
- return audience && !audience.closed ? chunkWK56SFN7_js.swapPresentationWindows(window, audience) : false;
1318
+ return audience && !audience.closed ? chunkLTEDT475_js.swapPresentationWindows(window, audience) : false;
1306
1319
  }, []);
1307
1320
  const syncSlideToAudience = react.useCallback(
1308
1321
  (slideIndex) => {
@@ -1366,7 +1379,7 @@ function usePresenterWindow(input) {
1366
1379
  pollTimerRef.current = null;
1367
1380
  }
1368
1381
  if (closingSessionId) {
1369
- void chunkWK56SFN7_js.clearAudienceContent(closingSessionId);
1382
+ void chunkLTEDT475_js.clearAudienceContent(closingSessionId);
1370
1383
  }
1371
1384
  }, [getChannel]);
1372
1385
  const openAudienceWindow = react.useCallback(() => {
@@ -1384,10 +1397,10 @@ function usePresenterWindow(input) {
1384
1397
  audienceWindowRef.current = blankWin;
1385
1398
  const sessionId = generateSessionId();
1386
1399
  sessionIdRef.current = sessionId;
1387
- const audienceUrl = chunkWK56SFN7_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1388
- void chunkWK56SFN7_js.resolveAudienceScreenPlacement(window).then((placement) => {
1400
+ const audienceUrl = chunkLTEDT475_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1401
+ void chunkLTEDT475_js.resolveAudienceScreenPlacement(window).then((placement) => {
1389
1402
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1390
- chunkWK56SFN7_js.placeAudienceWindow(blankWin, placement);
1403
+ chunkLTEDT475_js.placeAudienceWindow(blankWin, placement);
1391
1404
  }
1392
1405
  return void 0;
1393
1406
  });
@@ -1417,7 +1430,7 @@ function usePresenterWindow(input) {
1417
1430
  }
1418
1431
  };
1419
1432
  if (content) {
1420
- void chunkWK56SFN7_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1433
+ void chunkLTEDT475_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1421
1434
  } else {
1422
1435
  navigateOrClose(true);
1423
1436
  }
@@ -1443,7 +1456,7 @@ function usePresenterWindow(input) {
1443
1456
  }
1444
1457
  const handleMessage = (event) => {
1445
1458
  const message = event.data;
1446
- if (chunkWK56SFN7_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1459
+ if (chunkLTEDT475_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1447
1460
  syncStateToAudience(snapshotRef.current);
1448
1461
  }
1449
1462
  };
@@ -1472,7 +1485,7 @@ function usePresenterWindow(input) {
1472
1485
  react.useEffect(() => {
1473
1486
  const handleBeforeUnload = () => {
1474
1487
  if (sessionIdRef.current) {
1475
- void chunkWK56SFN7_js.clearAudienceContent(sessionIdRef.current);
1488
+ void chunkLTEDT475_js.clearAudienceContent(sessionIdRef.current);
1476
1489
  }
1477
1490
  };
1478
1491
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1488,7 +1501,14 @@ function usePresenterWindow(input) {
1488
1501
  };
1489
1502
  }
1490
1503
  function useAudienceMode(input) {
1491
- const { mode: _mode, onSetMode, onSetActiveSlideIndex, containerRef, onSnapshot } = input;
1504
+ const {
1505
+ mode: _mode,
1506
+ onSetMode,
1507
+ onSetActiveSlideIndex,
1508
+ containerRef,
1509
+ onSnapshot,
1510
+ onPresenterEnded
1511
+ } = input;
1492
1512
  const initialised = react.useRef(false);
1493
1513
  react.useEffect(() => {
1494
1514
  if (!isAudienceTab()) {
@@ -1512,6 +1532,8 @@ function useAudienceMode(input) {
1512
1532
  document.removeEventListener("keydown", requestAudienceFullscreen);
1513
1533
  };
1514
1534
  }, [containerRef, onSetMode]);
1535
+ const handlersRef = react.useRef({ onSetActiveSlideIndex, onSnapshot, onPresenterEnded });
1536
+ handlersRef.current = { onSetActiveSlideIndex, onSnapshot, onPresenterEnded };
1515
1537
  react.useEffect(() => {
1516
1538
  if (!isAudienceTab()) {
1517
1539
  return;
@@ -1525,33 +1547,32 @@ function useAudienceMode(input) {
1525
1547
  }
1526
1548
  channel.onmessage = (event) => {
1527
1549
  const data = event.data;
1528
- if (!chunkWK56SFN7_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1550
+ if (!chunkLTEDT475_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1529
1551
  return;
1530
1552
  }
1531
1553
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
1532
1554
  return;
1533
1555
  }
1556
+ const handlers = handlersRef.current;
1534
1557
  if (data.type === "presenter-slide-change") {
1535
- onSetActiveSlideIndex(data.slideIndex);
1558
+ handlers.onSetActiveSlideIndex(data.slideIndex);
1536
1559
  }
1537
1560
  if (data.type === "presenter-state") {
1538
- onSetActiveSlideIndex(data.snapshot.slideIndex);
1539
- onSnapshot?.(data.snapshot);
1561
+ handlers.onSetActiveSlideIndex(data.snapshot.slideIndex);
1562
+ handlers.onSnapshot?.(data.snapshot);
1540
1563
  }
1541
1564
  if (data.type === "presenter-exit") {
1542
1565
  if (expectedSessionId) {
1543
- void chunkWK56SFN7_js.clearAudienceContent(expectedSessionId);
1566
+ void chunkLTEDT475_js.clearAudienceContent(expectedSessionId);
1544
1567
  }
1545
- onSetMode("edit");
1546
- try {
1547
- window.close();
1548
- } catch {
1568
+ if (chunkLTEDT475_js.endAudienceDisplay(window)) {
1569
+ handlers.onPresenterEnded?.();
1549
1570
  }
1550
1571
  }
1551
1572
  };
1552
1573
  if (expectedSessionId) {
1553
1574
  channel.postMessage({
1554
- origin: chunkWK56SFN7_js.PRESENTATION_MESSAGE_ORIGIN,
1575
+ origin: chunkLTEDT475_js.PRESENTATION_MESSAGE_ORIGIN,
1555
1576
  type: "audience-ready",
1556
1577
  sessionId: expectedSessionId
1557
1578
  });
@@ -1562,7 +1583,7 @@ function useAudienceMode(input) {
1562
1583
  } catch {
1563
1584
  }
1564
1585
  };
1565
- }, [onSetMode, onSetActiveSlideIndex, onSnapshot]);
1586
+ }, []);
1566
1587
  }
1567
1588
  function usePresentationKeyboard(input) {
1568
1589
  const {
@@ -1583,14 +1604,14 @@ function usePresentationKeyboard(input) {
1583
1604
  presentationSlideIndex,
1584
1605
  setShowRehearsalSummary
1585
1606
  } = input;
1586
- const keyBufferRef = react.useRef(chunkWK56SFN7_js.createPresentationKeyBuffer());
1607
+ const keyBufferRef = react.useRef(chunkLTEDT475_js.createPresentationKeyBuffer());
1587
1608
  react.useEffect(() => {
1588
- if (mode !== "present") {
1589
- keyBufferRef.current = chunkWK56SFN7_js.createPresentationKeyBuffer();
1609
+ if (mode !== "present" || !chunkLTEDT475_js.acceptsPresentationInput()) {
1610
+ keyBufferRef.current = chunkLTEDT475_js.createPresentationKeyBuffer();
1590
1611
  return;
1591
1612
  }
1592
1613
  const handleKeyDown = (event) => {
1593
- const mapped = chunkWK56SFN7_js.mapPresentationKey(event, keyBufferRef.current);
1614
+ const mapped = chunkLTEDT475_js.mapPresentationKey(event, keyBufferRef.current);
1594
1615
  if (mapped.action === "none") {
1595
1616
  return;
1596
1617
  }
@@ -1798,7 +1819,7 @@ function handlePresentationActionImpl(action, deps) {
1798
1819
  return;
1799
1820
  }
1800
1821
  if (action.url && !actionStr.includes("hlinksldjump")) {
1801
- if (chunkWK56SFN7_js.isUrlSafe(action.url)) {
1822
+ if (chunkLTEDT475_js.isUrlSafe(action.url)) {
1802
1823
  window.open(action.url, "_blank", "noopener,noreferrer");
1803
1824
  }
1804
1825
  }
@@ -1808,7 +1829,7 @@ function handlePresentationActionImpl(action, deps) {
1808
1829
  function executeSlideTransition(nextSlideIndex, deps) {
1809
1830
  const incomingSlide = deps.slides[nextSlideIndex];
1810
1831
  const transition = incomingSlide?.transition;
1811
- const durationMs = deps.playTransition ? chunkWK56SFN7_js.resolveTransitionDurationMs(transition) : 0;
1832
+ const durationMs = deps.playTransition ? chunkLTEDT475_js.resolveTransitionDurationMs(transition) : 0;
1812
1833
  deps.clearPresentationTimers();
1813
1834
  deps.setPresentationSlideIndex(nextSlideIndex);
1814
1835
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1824,14 +1845,16 @@ function executeSlideTransition(nextSlideIndex, deps) {
1824
1845
  durationMs
1825
1846
  });
1826
1847
  const timer = window.setTimeout(() => {
1827
- deps.runPresentationEntranceAnimations(nextSlideIndex);
1848
+ deps.runPresentationEntranceAnimations(nextSlideIndex, {
1849
+ completed: deps.seedCompleted
1850
+ });
1828
1851
  deps.scheduleAutoAdvanceForSlide?.(nextSlideIndex);
1829
1852
  }, durationMs);
1830
1853
  deps.presentationTimersRef.current.push(timer);
1831
1854
  return;
1832
1855
  }
1833
1856
  deps.setTransitionOverlay(null);
1834
- deps.runPresentationEntranceAnimations(nextSlideIndex);
1857
+ deps.runPresentationEntranceAnimations(nextSlideIndex, { completed: deps.seedCompleted });
1835
1858
  deps.scheduleAutoAdvanceForSlide?.(nextSlideIndex);
1836
1859
  }
1837
1860
 
@@ -1941,7 +1964,9 @@ function useSlideNavigation(input) {
1941
1964
  presentationTimersRef,
1942
1965
  setTransitionOverlay,
1943
1966
  // PowerPoint plays a slide's transition only when advancing into it.
1944
- playTransition: direction === 1
1967
+ playTransition: direction === 1,
1968
+ // Stepping back onto a slide shows it with its builds already played.
1969
+ seedCompleted: direction === -1
1945
1970
  });
1946
1971
  },
1947
1972
  [
@@ -2054,17 +2079,17 @@ function useZoomNavigation(input) {
2054
2079
  };
2055
2080
  }
2056
2081
  function usePresenterConsole(slideIndex) {
2057
- const timerRef = react.useRef(chunkWK56SFN7_js.createPresenterTimer());
2058
- const [snapshot, setSnapshot] = react.useState(() => chunkWK56SFN7_js.createInitialPresentationSnapshot(slideIndex));
2082
+ const timerRef = react.useRef(chunkLTEDT475_js.createPresenterTimer());
2083
+ const [snapshot, setSnapshot] = react.useState(() => chunkLTEDT475_js.createInitialPresentationSnapshot(slideIndex));
2059
2084
  const patch = react.useCallback((value) => {
2060
- setSnapshot((current) => chunkWK56SFN7_js.mergePresentationSnapshot(current, value));
2085
+ setSnapshot((current) => chunkLTEDT475_js.mergePresentationSnapshot(current, value));
2061
2086
  }, []);
2062
2087
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2063
2088
  react.useEffect(() => {
2064
2089
  const timer = window.setInterval(() => {
2065
2090
  patch({
2066
2091
  paused: timerRef.current.paused,
2067
- elapsedMs: chunkWK56SFN7_js.presenterElapsed(timerRef.current)
2092
+ elapsedMs: chunkLTEDT475_js.presenterElapsed(timerRef.current)
2068
2093
  });
2069
2094
  }, 1e3);
2070
2095
  return () => window.clearInterval(timer);
@@ -2074,19 +2099,19 @@ function usePresenterConsole(slideIndex) {
2074
2099
  applyAudienceSnapshot: setSnapshot,
2075
2100
  setBlackout: (blackout) => patch({ blackout }),
2076
2101
  toggleTimer: () => {
2077
- timerRef.current = chunkWK56SFN7_js.togglePresenterTimer(timerRef.current);
2102
+ timerRef.current = chunkLTEDT475_js.togglePresenterTimer(timerRef.current);
2078
2103
  patch({
2079
2104
  paused: timerRef.current.paused,
2080
- elapsedMs: chunkWK56SFN7_js.presenterElapsed(timerRef.current)
2105
+ elapsedMs: chunkLTEDT475_js.presenterElapsed(timerRef.current)
2081
2106
  });
2082
2107
  },
2083
2108
  resetTimer: () => {
2084
- timerRef.current = chunkWK56SFN7_js.resetPresenterTimer();
2109
+ timerRef.current = chunkLTEDT475_js.resetPresenterTimer();
2085
2110
  patch({ paused: false, elapsedMs: 0 });
2086
2111
  },
2087
2112
  stepZoom: (direction) => setSnapshot(
2088
- (current) => chunkWK56SFN7_js.mergePresentationSnapshot(current, {
2089
- zoom: chunkWK56SFN7_js.stepPresenterZoom(
2113
+ (current) => chunkLTEDT475_js.mergePresentationSnapshot(current, {
2114
+ zoom: chunkLTEDT475_js.stepPresenterZoom(
2090
2115
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2091
2116
  direction
2092
2117
  )
@@ -2144,6 +2169,7 @@ function usePresentationMode(input) {
2144
2169
  handleHoverStart,
2145
2170
  handleHoverEnd,
2146
2171
  runPresentationEntranceAnimations,
2172
+ isSeededCompleted,
2147
2173
  presentationTimersRef
2148
2174
  } = useAnimationPlayback({ slides, onPlayActionSound, showWithAnimation });
2149
2175
  const {
@@ -2166,6 +2192,11 @@ function usePresentationMode(input) {
2166
2192
  setPresentationStartTime,
2167
2193
  setPresenterMode
2168
2194
  });
2195
+ react.useEffect(() => {
2196
+ if (mode !== "present") {
2197
+ setPresenterMode(false);
2198
+ }
2199
+ }, [mode]);
2169
2200
  const handleAdvancePastLastSlide = react.useCallback(() => {
2170
2201
  if (endWithBlackSlide) {
2171
2202
  setEndOfShowVisible(true);
@@ -2201,6 +2232,9 @@ function usePresentationMode(input) {
2201
2232
  });
2202
2233
  const movePresentationSlide = react.useCallback(
2203
2234
  (direction, trigger = "explicit") => {
2235
+ if (!chunkLTEDT475_js.acceptsPresentationInput()) {
2236
+ return;
2237
+ }
2204
2238
  if (endOfShowVisible) {
2205
2239
  setEndOfShowVisible(false);
2206
2240
  if (direction === 1) {
@@ -2208,9 +2242,20 @@ function usePresentationMode(input) {
2208
2242
  }
2209
2243
  return;
2210
2244
  }
2245
+ if (direction === -1 && isSeededCompleted()) {
2246
+ runPresentationEntranceAnimations(presentationSlideIndex);
2247
+ return;
2248
+ }
2211
2249
  moveNavigationSlide(direction, trigger);
2212
2250
  },
2213
- [endOfShowVisible, moveNavigationSlide, onSetMode]
2251
+ [
2252
+ endOfShowVisible,
2253
+ isSeededCompleted,
2254
+ moveNavigationSlide,
2255
+ onSetMode,
2256
+ presentationSlideIndex,
2257
+ runPresentationEntranceAnimations
2258
+ ]
2214
2259
  );
2215
2260
  const { handleZoomClick, zoomReturnSlideIndex, returnToZoomSlide, clearZoomReturn } = useZoomNavigation({ navigateToSlide });
2216
2261
  const openAllSlides = react.useCallback(() => setAllSlidesOpen(true), []);
@@ -2236,7 +2281,10 @@ function usePresentationMode(input) {
2236
2281
  setPresentationSlideIndex(index);
2237
2282
  },
2238
2283
  containerRef,
2239
- onSnapshot: presenterConsole.applyAudienceSnapshot
2284
+ onSnapshot: presenterConsole.applyAudienceSnapshot,
2285
+ // The presenter ended the session but this tab could not close itself:
2286
+ // show the black end-of-slide-show screen rather than the editor.
2287
+ onPresenterEnded: () => setEndOfShowVisible(true)
2240
2288
  });
2241
2289
  const enterPresentMode = react.useCallback(() => {
2242
2290
  setPresenterMode(false);
@@ -2665,7 +2713,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2665
2713
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2666
2714
  slides.forEach((slide, slideIndex) => {
2667
2715
  for (const element of slide.elements || []) {
2668
- if (!chunkWK56SFN7_js.hasTextProperties(element)) {
2716
+ if (!chunkLTEDT475_js.hasTextProperties(element)) {
2669
2717
  continue;
2670
2718
  }
2671
2719
  const segments = element.textSegments ?? [];
@@ -2716,7 +2764,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2716
2764
  continue;
2717
2765
  }
2718
2766
  const element = slide.elements[elIdx];
2719
- if (!chunkWK56SFN7_js.hasTextProperties(element)) {
2767
+ if (!chunkLTEDT475_js.hasTextProperties(element)) {
2720
2768
  continue;
2721
2769
  }
2722
2770
  const segments = [...element.textSegments ?? []];
@@ -3314,7 +3362,7 @@ function useViewerCoreState(_input) {
3314
3362
  const shapeAdjustmentDragStateRef = react.useRef(null);
3315
3363
  const marqueeStateRef = react.useRef(null);
3316
3364
  const isDrawingRef = react.useRef(false);
3317
- const livePatcher = react.useMemo(() => chunkWK56SFN7_js.createCollaborationLivePatcher(), []);
3365
+ const livePatcher = react.useMemo(() => chunkLTEDT475_js.createCollaborationLivePatcher(), []);
3318
3366
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3319
3367
  const slidesRef = react.useRef([]);
3320
3368
  const [mode, setMode] = react.useState("edit");
@@ -3323,8 +3371,8 @@ function useViewerCoreState(_input) {
3323
3371
  const [slides, setSlides] = react.useState([]);
3324
3372
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3325
3373
  const [canvasSize, setCanvasSize] = react.useState({
3326
- width: chunk5TPQJWEO_js.DEFAULT_CANVAS_WIDTH,
3327
- height: chunk5TPQJWEO_js.DEFAULT_CANVAS_HEIGHT
3374
+ width: chunkNVH3RIN7_js.DEFAULT_CANVAS_WIDTH,
3375
+ height: chunkNVH3RIN7_js.DEFAULT_CANVAS_HEIGHT
3328
3376
  });
3329
3377
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3330
3378
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3344,7 +3392,7 @@ function useViewerCoreState(_input) {
3344
3392
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3345
3393
  inlineEditingTextRef.current = resolved;
3346
3394
  setInlineEditingTextBase(value);
3347
- chunkWK56SFN7_js.publishLiveInlineText(
3395
+ chunkLTEDT475_js.publishLiveInlineText(
3348
3396
  livePatcher,
3349
3397
  slidesRef.current[activeSlideIndexRef.current],
3350
3398
  inlineEditingElementIdRef.current,
@@ -3669,7 +3717,7 @@ function useLoadContent({
3669
3717
  );
3670
3718
  }
3671
3719
  const previousHandler = handlerRef.current;
3672
- const handler = new chunkWK56SFN7_js.PptxHandler();
3720
+ const handler = new chunkLTEDT475_js.PptxHandler();
3673
3721
  const parsed = await handler.load(buffer);
3674
3722
  if (cancelled || token !== renderTokenRef.current) {
3675
3723
  handler.dispose();
@@ -3681,7 +3729,7 @@ function useLoadContent({
3681
3729
  handlerRef.current = null;
3682
3730
  const mediaElements = [];
3683
3731
  for (const slide of parsed.slides) {
3684
- chunkWK56SFN7_js.collectMediaElements(slide.elements, mediaElements);
3732
+ chunkLTEDT475_js.collectMediaElements(slide.elements, mediaElements);
3685
3733
  }
3686
3734
  for (const url of mediaDataUrls.values()) {
3687
3735
  if (url.startsWith("blob:")) {
@@ -3722,7 +3770,7 @@ function useLoadContent({
3722
3770
  }
3723
3771
  })
3724
3772
  );
3725
- const { paths: imagePaths, refs: imageRefs } = chunkWK56SFN7_js.collectImagePaths(parsed.slides);
3773
+ const { paths: imagePaths, refs: imageRefs } = chunkLTEDT475_js.collectImagePaths(parsed.slides);
3726
3774
  let nextSlides = parsed.slides;
3727
3775
  if (imagePaths.size > 0) {
3728
3776
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3777,12 +3825,12 @@ function useLoadContent({
3777
3825
  }
3778
3826
  }
3779
3827
  handlerRef.current = handler;
3780
- const partition = chunk5TPQJWEO_js.partitionTemplateElements(nextSlides);
3828
+ const partition = chunkNVH3RIN7_js.partitionTemplateElements(nextSlides);
3781
3829
  setSlides(partition.slides);
3782
3830
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3783
3831
  setCanvasSize({
3784
- width: parsed.width ?? chunk5TPQJWEO_js.DEFAULT_CANVAS_WIDTH,
3785
- height: parsed.height ?? chunk5TPQJWEO_js.DEFAULT_CANVAS_HEIGHT
3832
+ width: parsed.width ?? chunkNVH3RIN7_js.DEFAULT_CANVAS_WIDTH,
3833
+ height: parsed.height ?? chunkNVH3RIN7_js.DEFAULT_CANVAS_HEIGHT
3786
3834
  });
3787
3835
  setHeaderFooter(parsed.headerFooter ?? {});
3788
3836
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3811,7 +3859,7 @@ function useLoadContent({
3811
3859
  setHasMacros(parsed.hasMacros === true);
3812
3860
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3813
3861
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3814
- setGuides(chunkWK56SFN7_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3862
+ setGuides(chunkLTEDT475_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3815
3863
  setActiveSlideIndex(0);
3816
3864
  clearSelection();
3817
3865
  setIsDirty(false);
@@ -3819,7 +3867,7 @@ function useLoadContent({
3819
3867
  onContentApplied?.();
3820
3868
  } catch (err) {
3821
3869
  if (!cancelled && token === renderTokenRef.current) {
3822
- if (err instanceof chunkWK56SFN7_js.EncryptedFileError) {
3870
+ if (err instanceof chunkLTEDT475_js.EncryptedFileError) {
3823
3871
  setIsEncrypted(true);
3824
3872
  } else {
3825
3873
  setError(err instanceof Error ? err.message : String(err));
@@ -3896,7 +3944,7 @@ function useAutosave(input) {
3896
3944
  isSavingRef.current = false;
3897
3945
  return;
3898
3946
  }
3899
- await chunkWK56SFN7_js.saveAutosaveSnapshot(filePathRef.current, data);
3947
+ await chunkLTEDT475_js.saveAutosaveSnapshot(filePathRef.current, data);
3900
3948
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3901
3949
  } catch (err) {
3902
3950
  setAutosaveStatus({
@@ -3961,7 +4009,7 @@ function useElementOperations(input) {
3961
4009
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
3962
4010
  const updateElementById = react.useCallback(
3963
4011
  (elementId, updates) => {
3964
- if (chunkWK56SFN7_js.isTemplateElementId(elementId)) {
4012
+ if (chunkLTEDT475_js.isTemplateElementId(elementId)) {
3965
4013
  const slideId = activeSlide?.id;
3966
4014
  if (slideId) {
3967
4015
  setTemplateElementsBySlideId((prev) => ({
@@ -4001,7 +4049,7 @@ function useElementOperations(input) {
4001
4049
  );
4002
4050
  const updateSelectedShapeStyle = react.useCallback(
4003
4051
  (updates) => {
4004
- if (!selectedElement || !chunkWK56SFN7_js.hasShapeProperties(selectedElement)) {
4052
+ if (!selectedElement || !chunkLTEDT475_js.hasShapeProperties(selectedElement)) {
4005
4053
  return;
4006
4054
  }
4007
4055
  updateSelectedElement({
@@ -4012,17 +4060,17 @@ function useElementOperations(input) {
4012
4060
  );
4013
4061
  const updateSelectedTextStyle = react.useCallback(
4014
4062
  (updates) => {
4015
- if (!selectedElement || !chunkWK56SFN7_js.hasTextProperties(selectedElement)) {
4063
+ if (!selectedElement || !chunkLTEDT475_js.hasTextProperties(selectedElement)) {
4016
4064
  return;
4017
4065
  }
4018
- const inlineSel = chunkWK56SFN7_js.getInlineEditorSelection(selectedElement.textSegments);
4066
+ const inlineSel = chunkLTEDT475_js.getInlineEditorSelection(selectedElement.textSegments);
4019
4067
  if (inlineSel && selectedElement.textSegments) {
4020
- const { newSegments: newSegments2, newSelection } = chunkWK56SFN7_js.applyStyleToSelectedSegments(
4068
+ const { newSegments: newSegments2, newSelection } = chunkLTEDT475_js.applyStyleToSelectedSegments(
4021
4069
  selectedElement.textSegments,
4022
4070
  inlineSel,
4023
4071
  updates
4024
4072
  );
4025
- chunkWK56SFN7_js.setPendingSelectionRestore(newSelection);
4073
+ chunkLTEDT475_js.setPendingSelectionRestore(newSelection);
4026
4074
  updateSelectedElement({
4027
4075
  textSegments: newSegments2
4028
4076
  });
@@ -4042,12 +4090,12 @@ function useElementOperations(input) {
4042
4090
  );
4043
4091
  const updateSelectedTextCase = react.useCallback(
4044
4092
  (mode) => {
4045
- if (!selectedElement || !chunkWK56SFN7_js.hasTextProperties(selectedElement)) {
4093
+ if (!selectedElement || !chunkLTEDT475_js.hasTextProperties(selectedElement)) {
4046
4094
  return;
4047
4095
  }
4048
- const inlineSel = chunkWK56SFN7_js.getInlineEditorSelection(selectedElement.textSegments);
4096
+ const inlineSel = chunkLTEDT475_js.getInlineEditorSelection(selectedElement.textSegments);
4049
4097
  if (inlineSel && selectedElement.textSegments) {
4050
- const newSegments = chunkWK56SFN7_js.applyCaseTransformToSegments(
4098
+ const newSegments = chunkLTEDT475_js.applyCaseTransformToSegments(
4051
4099
  selectedElement.textSegments,
4052
4100
  inlineSel,
4053
4101
  mode
@@ -4057,14 +4105,14 @@ function useElementOperations(input) {
4057
4105
  }
4058
4106
  const updates = {};
4059
4107
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4060
- updates.textSegments = chunkWK56SFN7_js.applyCaseTransformToSegments(
4108
+ updates.textSegments = chunkLTEDT475_js.applyCaseTransformToSegments(
4061
4109
  selectedElement.textSegments,
4062
4110
  null,
4063
4111
  mode
4064
4112
  );
4065
4113
  }
4066
4114
  if (typeof selectedElement.text === "string") {
4067
- updates.text = chunkWK56SFN7_js.transformTextCase(selectedElement.text, mode);
4115
+ updates.text = chunkLTEDT475_js.transformTextCase(selectedElement.text, mode);
4068
4116
  }
4069
4117
  updateSelectedElement(updates);
4070
4118
  },
@@ -4119,7 +4167,7 @@ function useSectionOperations(input) {
4119
4167
  const { sections, setSections, slides, setSlides, markDirty } = input;
4120
4168
  const addSection2 = react.useCallback(
4121
4169
  (name, afterSlideIndex) => {
4122
- const result = chunkWK56SFN7_js.addSection(sections, slides, name, afterSlideIndex);
4170
+ const result = chunkLTEDT475_js.addSection(sections, slides, name, afterSlideIndex);
4123
4171
  setSlides(result.slides);
4124
4172
  setSections(result.sections);
4125
4173
  markDirty();
@@ -4128,7 +4176,7 @@ function useSectionOperations(input) {
4128
4176
  );
4129
4177
  const renameSection2 = react.useCallback(
4130
4178
  (sectionId, newName) => {
4131
- const result = chunkWK56SFN7_js.renameSection(sections, slides, sectionId, newName);
4179
+ const result = chunkLTEDT475_js.renameSection(sections, slides, sectionId, newName);
4132
4180
  setSections(result.sections);
4133
4181
  setSlides(result.slides);
4134
4182
  markDirty();
@@ -4137,7 +4185,7 @@ function useSectionOperations(input) {
4137
4185
  );
4138
4186
  const deleteSection2 = react.useCallback(
4139
4187
  (sectionId) => {
4140
- const result = chunkWK56SFN7_js.deleteSection(sections, slides, sectionId);
4188
+ const result = chunkLTEDT475_js.deleteSection(sections, slides, sectionId);
4141
4189
  setSections(result.sections);
4142
4190
  setSlides(result.slides);
4143
4191
  markDirty();
@@ -4146,21 +4194,21 @@ function useSectionOperations(input) {
4146
4194
  );
4147
4195
  const moveSectionUp2 = react.useCallback(
4148
4196
  (sectionId) => {
4149
- setSections(chunkWK56SFN7_js.moveSectionUp(sections, sectionId));
4197
+ setSections(chunkLTEDT475_js.moveSectionUp(sections, sectionId));
4150
4198
  markDirty();
4151
4199
  },
4152
4200
  [sections, setSections, markDirty]
4153
4201
  );
4154
4202
  const moveSectionDown2 = react.useCallback(
4155
4203
  (sectionId) => {
4156
- setSections(chunkWK56SFN7_js.moveSectionDown(sections, sectionId));
4204
+ setSections(chunkLTEDT475_js.moveSectionDown(sections, sectionId));
4157
4205
  markDirty();
4158
4206
  },
4159
4207
  [sections, setSections, markDirty]
4160
4208
  );
4161
4209
  const moveSlidesToSection2 = react.useCallback(
4162
4210
  (slideIndexes, targetSectionId) => {
4163
- const result = chunkWK56SFN7_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4211
+ const result = chunkLTEDT475_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4164
4212
  setSlides(result.slides);
4165
4213
  setSections(result.sections);
4166
4214
  markDirty();
@@ -4179,19 +4227,19 @@ function useSectionOperations(input) {
4179
4227
 
4180
4228
  // src/viewer/hooks/pointer-move-handlers.ts
4181
4229
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4182
- const resized = chunkWK56SFN7_js.applyResize(
4230
+ const resized = chunkLTEDT475_js.applyResize(
4183
4231
  { x: startX, y: startY, width: startWidth, height: startHeight },
4184
4232
  handle,
4185
4233
  dx,
4186
4234
  dy,
4187
4235
  1,
4188
- { minSize: chunk5TPQJWEO_js.MIN_ELEMENT_SIZE }
4236
+ { minSize: chunkNVH3RIN7_js.MIN_ELEMENT_SIZE }
4189
4237
  );
4190
4238
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4191
4239
  if (!snapToGrid) {
4192
4240
  return box;
4193
4241
  }
4194
- return chunkWK56SFN7_js.snapBoxToGrid(box, handle, gridSpacingPx, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE);
4242
+ return chunkLTEDT475_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE);
4195
4243
  }
4196
4244
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4197
4245
  const range = startWidth || 200;
@@ -4309,7 +4357,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4309
4357
  width: el.width,
4310
4358
  height: el.height
4311
4359
  }));
4312
- const snapResult = chunkWK56SFN7_js.computeSnapToShape(
4360
+ const snapResult = chunkLTEDT475_js.computeSnapToShape(
4313
4361
  targetX,
4314
4362
  targetY,
4315
4363
  primaryEl.width,
@@ -4348,7 +4396,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4348
4396
  if (live) {
4349
4397
  for (const id of Object.keys(drag.startPositionsById)) {
4350
4398
  const start = drag.startPositionsById[id];
4351
- chunkWK56SFN7_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4399
+ chunkLTEDT475_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4352
4400
  x: start.x + appliedDx,
4353
4401
  y: start.y + appliedDy
4354
4402
  });
@@ -4382,15 +4430,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4382
4430
  if (rs.domEl) {
4383
4431
  rs.domEl.style.left = `${geo.x}px`;
4384
4432
  rs.domEl.style.top = `${geo.y}px`;
4385
- rs.domEl.style.width = `${Math.max(geo.width, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE)}px`;
4386
- rs.domEl.style.height = `${Math.max(geo.height, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE)}px`;
4433
+ rs.domEl.style.width = `${Math.max(geo.width, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE)}px`;
4434
+ rs.domEl.style.height = `${Math.max(geo.height, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE)}px`;
4387
4435
  }
4388
4436
  if (live) {
4389
- chunkWK56SFN7_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4437
+ chunkLTEDT475_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4390
4438
  x: geo.x,
4391
4439
  y: geo.y,
4392
- width: Math.max(geo.width, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE),
4393
- height: Math.max(geo.height, chunk5TPQJWEO_js.MIN_ELEMENT_SIZE)
4440
+ width: Math.max(geo.width, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE),
4441
+ height: Math.max(geo.height, chunkNVH3RIN7_js.MIN_ELEMENT_SIZE)
4394
4442
  });
4395
4443
  }
4396
4444
  }
@@ -4470,13 +4518,13 @@ function processPointerUp(input) {
4470
4518
  if (i !== activeSlideIndex) {
4471
4519
  return s;
4472
4520
  }
4473
- const rerouted = chunkWK56SFN7_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4521
+ const rerouted = chunkLTEDT475_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4474
4522
  if (rerouted.length === 0) {
4475
4523
  return s;
4476
4524
  }
4477
4525
  return {
4478
4526
  ...s,
4479
- elements: chunkWK56SFN7_js.applyReroutedConnectors(s.elements, rerouted)
4527
+ elements: chunkLTEDT475_js.applyReroutedConnectors(s.elements, rerouted)
4480
4528
  };
4481
4529
  })
4482
4530
  );
@@ -4498,9 +4546,9 @@ function processPointerUp(input) {
4498
4546
  }
4499
4547
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4500
4548
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4501
- const hitIds = chunkWK56SFN7_js.computeMarqueeHitIds(marquee, sourceElements);
4549
+ const hitIds = chunkLTEDT475_js.computeMarqueeHitIds(marquee, sourceElements);
4502
4550
  if (marquee.additive) {
4503
- const merged = chunkWK56SFN7_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4551
+ const merged = chunkLTEDT475_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4504
4552
  if (merged.length > 0) {
4505
4553
  applySelection(merged[0], merged);
4506
4554
  } else {
@@ -4523,8 +4571,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4523
4571
  }
4524
4572
  return { ...el, x: start.x + dx, y: start.y + dy };
4525
4573
  });
4526
- const rerouted = chunkWK56SFN7_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4527
- return chunkWK56SFN7_js.applyReroutedConnectors(movedElements, rerouted);
4574
+ const rerouted = chunkLTEDT475_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4575
+ return chunkLTEDT475_js.applyReroutedConnectors(movedElements, rerouted);
4528
4576
  };
4529
4577
  if (editTemplateMode) {
4530
4578
  const slideId = activeSlide?.id;
@@ -4677,9 +4725,9 @@ function useCanvasInteractions(input) {
4677
4725
  return;
4678
4726
  }
4679
4727
  const el = elementLookup.get(editId);
4680
- if (el && chunkWK56SFN7_js.hasTextProperties(el)) {
4728
+ if (el && chunkLTEDT475_js.hasTextProperties(el)) {
4681
4729
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4682
- const newSegments = chunkWK56SFN7_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4730
+ const newSegments = chunkLTEDT475_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4683
4731
  ops.updateElementById(editId, {
4684
4732
  text: committedText,
4685
4733
  textSegments: newSegments
@@ -4690,7 +4738,7 @@ function useCanvasInteractions(input) {
4690
4738
  setInlineEditingText("");
4691
4739
  };
4692
4740
  const openEquationEditorForElement = (el) => {
4693
- if (!chunkWK56SFN7_js.hasTextProperties(el)) {
4741
+ if (!chunkLTEDT475_js.hasTextProperties(el)) {
4694
4742
  return false;
4695
4743
  }
4696
4744
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4719,7 +4767,7 @@ function useCanvasInteractions(input) {
4719
4767
  justSelectedRef.current = false;
4720
4768
  } else {
4721
4769
  const el = elementLookup.get(elementId);
4722
- if (el && chunkWK56SFN7_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4770
+ if (el && chunkLTEDT475_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4723
4771
  if (!openEquationEditorForElement(el)) {
4724
4772
  setInlineEditingElementId(elementId);
4725
4773
  setInlineEditingText(el.text ?? "");
@@ -4738,7 +4786,7 @@ function useCanvasInteractions(input) {
4738
4786
  if (openEquationEditorForElement(el)) {
4739
4787
  return;
4740
4788
  }
4741
- if (chunkWK56SFN7_js.hasTextProperties(el)) {
4789
+ if (chunkLTEDT475_js.hasTextProperties(el)) {
4742
4790
  setInlineEditingElementId(elementId);
4743
4791
  setInlineEditingText(el.text ?? "");
4744
4792
  }
@@ -4928,7 +4976,7 @@ function createFileHandlers(deps) {
4928
4976
  h = Math.round(h * scale);
4929
4977
  }
4930
4978
  addElement({
4931
- id: chunkWK56SFN7_js.generateElementId(),
4979
+ id: chunkLTEDT475_js.generateElementId(),
4932
4980
  type: "image",
4933
4981
  x: Math.round((canvasSize.width - w) / 2),
4934
4982
  y: Math.round((canvasSize.height - h) / 2),
@@ -4939,7 +4987,7 @@ function createFileHandlers(deps) {
4939
4987
  };
4940
4988
  img.onerror = () => {
4941
4989
  addElement({
4942
- id: chunkWK56SFN7_js.generateElementId(),
4990
+ id: chunkLTEDT475_js.generateElementId(),
4943
4991
  type: "image",
4944
4992
  x: 100,
4945
4993
  y: 100,
@@ -4965,7 +5013,7 @@ function createFileHandlers(deps) {
4965
5013
  const elFilePath = file.path;
4966
5014
  const insertMediaElement = (mediaSourceUrl, width, height) => {
4967
5015
  addElement({
4968
- id: chunkWK56SFN7_js.generateElementId(),
5016
+ id: chunkLTEDT475_js.generateElementId(),
4969
5017
  type: "media",
4970
5018
  mediaType,
4971
5019
  mediaMimeType: file.type || void 0,
@@ -5140,13 +5188,13 @@ function createStructuredElementHandlers(deps) {
5140
5188
  return;
5141
5189
  }
5142
5190
  addElement({
5143
- id: chunkWK56SFN7_js.generateElementId(),
5191
+ id: chunkLTEDT475_js.generateElementId(),
5144
5192
  type: "smartArt",
5145
5193
  x: 100,
5146
5194
  y: 120,
5147
5195
  width: 600,
5148
5196
  height: 340,
5149
- smartArtData: chunkWK56SFN7_js.buildSmartArtPresetData(
5197
+ smartArtData: chunkLTEDT475_js.buildSmartArtPresetData(
5150
5198
  layout,
5151
5199
  defaultItems,
5152
5200
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5158,7 +5206,7 @@ function createStructuredElementHandlers(deps) {
5158
5206
  return;
5159
5207
  }
5160
5208
  addElement({
5161
- id: chunkWK56SFN7_js.generateElementId(),
5209
+ id: chunkLTEDT475_js.generateElementId(),
5162
5210
  type: "shape",
5163
5211
  x: 120,
5164
5212
  y: 200,
@@ -5217,7 +5265,7 @@ function createStructuredElementHandlers(deps) {
5217
5265
  const displayText = value || fieldTexts[fieldType] || fieldType;
5218
5266
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5219
5267
  addElement({
5220
- id: chunkWK56SFN7_js.generateElementId(),
5268
+ id: chunkLTEDT475_js.generateElementId(),
5221
5269
  type: "shape",
5222
5270
  x: 120,
5223
5271
  y: 200,
@@ -5239,11 +5287,11 @@ function createStructuredElementHandlers(deps) {
5239
5287
  if (!activeSlide) {
5240
5288
  return;
5241
5289
  }
5242
- const preset = chunkWK56SFN7_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5290
+ const preset = chunkLTEDT475_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5243
5291
  if (!preset) {
5244
5292
  return;
5245
5293
  }
5246
- const defaultPptxAction = chunkWK56SFN7_js.elementActionToPptxAction({
5294
+ const defaultPptxAction = chunkLTEDT475_js.elementActionToPptxAction({
5247
5295
  trigger: "click",
5248
5296
  type: preset.defaultAction
5249
5297
  });
@@ -5252,7 +5300,7 @@ function createStructuredElementHandlers(deps) {
5252
5300
  defaultPptxAction.highlightClick = true;
5253
5301
  }
5254
5302
  addElement({
5255
- id: chunkWK56SFN7_js.generateElementId(),
5303
+ id: chunkLTEDT475_js.generateElementId(),
5256
5304
  type: "shape",
5257
5305
  x: 150,
5258
5306
  y: 150,
@@ -5319,14 +5367,14 @@ function useInsertElements(input) {
5319
5367
  return;
5320
5368
  }
5321
5369
  addElement({
5322
- id: chunkWK56SFN7_js.generateElementId(),
5370
+ id: chunkLTEDT475_js.generateElementId(),
5323
5371
  type: "text",
5324
5372
  x: 100,
5325
5373
  y: 100,
5326
5374
  width: 300,
5327
5375
  height: 60,
5328
5376
  text: "",
5329
- textStyle: { fontSize: chunk5TPQJWEO_js.DEFAULT_TEXT_FONT_SIZE }
5377
+ textStyle: { fontSize: chunkNVH3RIN7_js.DEFAULT_TEXT_FONT_SIZE }
5330
5378
  });
5331
5379
  };
5332
5380
  const handleAddShape = () => {
@@ -5334,7 +5382,7 @@ function useInsertElements(input) {
5334
5382
  return;
5335
5383
  }
5336
5384
  addElement({
5337
- id: chunkWK56SFN7_js.generateElementId(),
5385
+ id: chunkLTEDT475_js.generateElementId(),
5338
5386
  type: "shape",
5339
5387
  x: 150,
5340
5388
  y: 150,
@@ -5353,15 +5401,15 @@ function useInsertElements(input) {
5353
5401
  return;
5354
5402
  }
5355
5403
  addElement({
5356
- ...chunkWK56SFN7_js.newTableElement(chunk5TPQJWEO_js.DEFAULT_TABLE_ROWS, chunk5TPQJWEO_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5357
- id: chunkWK56SFN7_js.generateElementId()
5404
+ ...chunkLTEDT475_js.newTableElement(chunkNVH3RIN7_js.DEFAULT_TABLE_ROWS, chunkNVH3RIN7_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5405
+ id: chunkLTEDT475_js.generateElementId()
5358
5406
  });
5359
5407
  };
5360
5408
  const handleAddChart = (chartType) => {
5361
5409
  if (!activeSlide) {
5362
5410
  return;
5363
5411
  }
5364
- addElement(chunkWK56SFN7_js.createDefaultChartElement(chartType));
5412
+ addElement(chunkLTEDT475_js.createDefaultChartElement(chartType));
5365
5413
  };
5366
5414
  const structured = createStructuredElementHandlers({
5367
5415
  activeSlide,
@@ -5431,7 +5479,7 @@ function useClipboardHandlers(input) {
5431
5479
  if (!selectedElement) {
5432
5480
  return;
5433
5481
  }
5434
- setClipboardPayload(chunkWK56SFN7_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5482
+ setClipboardPayload(chunkLTEDT475_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5435
5483
  };
5436
5484
  const handleDelete = () => {
5437
5485
  const idsToDelete = effectiveSelectedIds;
@@ -5448,7 +5496,7 @@ function useClipboardHandlers(input) {
5448
5496
  handleDelete();
5449
5497
  };
5450
5498
  const insertClone = (source) => {
5451
- const clone = chunkWK56SFN7_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5499
+ const clone = chunkLTEDT475_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5452
5500
  ops.updateActiveElements((els) => [...els, clone]);
5453
5501
  ops.applySelection(clone.id);
5454
5502
  history.markDirty();
@@ -5483,7 +5531,7 @@ function resolveShapePath(el) {
5483
5531
  return el.pathData;
5484
5532
  }
5485
5533
  if ("shapeType" in el && typeof el.shapeType === "string") {
5486
- const clipPath = chunkWK56SFN7_js.getPresetShapeClipPath(el.shapeType);
5534
+ const clipPath = chunkLTEDT475_js.getPresetShapeClipPath(el.shapeType);
5487
5535
  if (clipPath) {
5488
5536
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5489
5537
  if (svgPath) {
@@ -5534,7 +5582,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5534
5582
  return parts.join(" ");
5535
5583
  }
5536
5584
  function transformPathToGlobal(pathData, el) {
5537
- const polys = chunkWK56SFN7_js.svgPathToPolygons(pathData);
5585
+ const polys = chunkLTEDT475_js.svgPathToPolygons(pathData);
5538
5586
  if (polys.length === 0) {
5539
5587
  return pathData;
5540
5588
  }
@@ -5554,10 +5602,10 @@ function transformPathToGlobal(pathData, el) {
5554
5602
  y: pt.y * scaleY + el.y
5555
5603
  }))
5556
5604
  );
5557
- return chunkWK56SFN7_js.polygonsToSvgPath(transformed);
5605
+ return chunkLTEDT475_js.polygonsToSvgPath(transformed);
5558
5606
  }
5559
5607
  function transformPathToLocal(pathData, x, y, _width, _height) {
5560
- const polys = chunkWK56SFN7_js.svgPathToPolygons(pathData);
5608
+ const polys = chunkLTEDT475_js.svgPathToPolygons(pathData);
5561
5609
  if (polys.length === 0) {
5562
5610
  return pathData;
5563
5611
  }
@@ -5567,10 +5615,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5567
5615
  y: pt.y - y
5568
5616
  }))
5569
5617
  );
5570
- return chunkWK56SFN7_js.polygonsToSvgPath(transformed);
5618
+ return chunkLTEDT475_js.polygonsToSvgPath(transformed);
5571
5619
  }
5572
5620
  function pathBounds(pathData) {
5573
- const polys = chunkWK56SFN7_js.svgPathToPolygons(pathData);
5621
+ const polys = chunkLTEDT475_js.svgPathToPolygons(pathData);
5574
5622
  let minX = Infinity;
5575
5623
  let minY = Infinity;
5576
5624
  let maxX = -Infinity;
@@ -5629,7 +5677,7 @@ function useMergeShapesHandler(input) {
5629
5677
  let allFragments = [];
5630
5678
  let remaining = globalPaths[0];
5631
5679
  for (let i = 1; i < globalPaths.length; i++) {
5632
- const frags = chunkWK56SFN7_js.mergeShapes("fragment", remaining, globalPaths[i]);
5680
+ const frags = chunkLTEDT475_js.mergeShapes("fragment", remaining, globalPaths[i]);
5633
5681
  if (Array.isArray(frags)) {
5634
5682
  allFragments = frags;
5635
5683
  }
@@ -5658,7 +5706,7 @@ function useMergeShapesHandler(input) {
5658
5706
  bounds.height
5659
5707
  );
5660
5708
  const newEl = {
5661
- id: chunkWK56SFN7_js.generateElementId(),
5709
+ id: chunkLTEDT475_js.generateElementId(),
5662
5710
  type: "shape",
5663
5711
  x: bounds.x,
5664
5712
  y: bounds.y,
@@ -5696,7 +5744,7 @@ function useMergeShapesHandler(input) {
5696
5744
  } else {
5697
5745
  let resultPath = globalPaths[0];
5698
5746
  for (let i = 1; i < globalPaths.length; i++) {
5699
- const result = chunkWK56SFN7_js.mergeShapes(operation, resultPath, globalPaths[i]);
5747
+ const result = chunkLTEDT475_js.mergeShapes(operation, resultPath, globalPaths[i]);
5700
5748
  if (typeof result === "string") {
5701
5749
  resultPath = result;
5702
5750
  }
@@ -5717,7 +5765,7 @@ function useMergeShapesHandler(input) {
5717
5765
  );
5718
5766
  const primary = targets[0];
5719
5767
  const newEl = {
5720
- id: chunkWK56SFN7_js.generateElementId(),
5768
+ id: chunkLTEDT475_js.generateElementId(),
5721
5769
  type: "shape",
5722
5770
  x: bounds.x,
5723
5771
  y: bounds.y,
@@ -5780,7 +5828,7 @@ function useGroupAlignLayerHandlers(input) {
5780
5828
  if (ids.length < 2 || !activeSlide) {
5781
5829
  return;
5782
5830
  }
5783
- const { elements, groupId } = chunkWK56SFN7_js.groupElements(ops.activeElements, ids, chunkWK56SFN7_js.generateElementId());
5831
+ const { elements, groupId } = chunkLTEDT475_js.groupElements(ops.activeElements, ids, chunkLTEDT475_js.generateElementId());
5784
5832
  if (groupId === null) {
5785
5833
  return;
5786
5834
  }
@@ -5793,12 +5841,12 @@ function useGroupAlignLayerHandlers(input) {
5793
5841
  return;
5794
5842
  }
5795
5843
  const group = selectedElement;
5796
- const intoTemplate = chunkWK56SFN7_js.isTemplateElementId(group.id);
5844
+ const intoTemplate = chunkLTEDT475_js.isTemplateElementId(group.id);
5797
5845
  const ungrouped = group.children.map((child) => ({
5798
5846
  ...structuredClone(child),
5799
5847
  // Keep child ids in the same store as the group so later edits route
5800
5848
  // correctly: template groups yield template-prefixed child ids.
5801
- id: intoTemplate ? chunkWK56SFN7_js.makeCloneId(true, child.id || group.id) : child.id || chunkWK56SFN7_js.generateElementId(),
5849
+ id: intoTemplate ? chunkLTEDT475_js.makeCloneId(true, child.id || group.id) : child.id || chunkLTEDT475_js.generateElementId(),
5802
5850
  x: child.x + group.x,
5803
5851
  y: child.y + group.y
5804
5852
  }));
@@ -5822,7 +5870,7 @@ function useGroupAlignLayerHandlers(input) {
5822
5870
  if (!edge) {
5823
5871
  return;
5824
5872
  }
5825
- const positions = chunkWK56SFN7_js.alignElements(selectedElements, edge);
5873
+ const positions = chunkLTEDT475_js.alignElements(selectedElements, edge);
5826
5874
  for (const [id, pos] of positions) {
5827
5875
  const el = elementLookup.get(id);
5828
5876
  if (!el) {
@@ -5840,7 +5888,7 @@ function useGroupAlignLayerHandlers(input) {
5840
5888
  if (!distAxis) {
5841
5889
  return;
5842
5890
  }
5843
- const positions = chunkWK56SFN7_js.distributeElements(selectedElements, distAxis);
5891
+ const positions = chunkLTEDT475_js.distributeElements(selectedElements, distAxis);
5844
5892
  for (const [id, pos] of positions) {
5845
5893
  const el = elementLookup.get(id);
5846
5894
  if (!el) {
@@ -5857,7 +5905,7 @@ function useGroupAlignLayerHandlers(input) {
5857
5905
  }
5858
5906
  const id = selectedElement.id;
5859
5907
  ops.updateActiveElements(
5860
- (els) => direction === "forward" ? chunkWK56SFN7_js.bringForward(els, id) : direction === "backward" ? chunkWK56SFN7_js.sendBackward(els, id) : els
5908
+ (els) => direction === "forward" ? chunkLTEDT475_js.bringForward(els, id) : direction === "backward" ? chunkLTEDT475_js.sendBackward(els, id) : els
5861
5909
  );
5862
5910
  history.markDirty();
5863
5911
  };
@@ -5867,7 +5915,7 @@ function useGroupAlignLayerHandlers(input) {
5867
5915
  }
5868
5916
  const id = selectedElement.id;
5869
5917
  ops.updateActiveElements(
5870
- (els) => direction === "front" ? chunkWK56SFN7_js.bringToFront(els, id) : chunkWK56SFN7_js.sendToBack(els, id)
5918
+ (els) => direction === "front" ? chunkLTEDT475_js.bringToFront(els, id) : chunkLTEDT475_js.sendToBack(els, id)
5871
5919
  );
5872
5920
  history.markDirty();
5873
5921
  };
@@ -5989,7 +6037,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
5989
6037
  function useSlideManagement(input) {
5990
6038
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
5991
6039
  const handleAddSlide = () => {
5992
- const newSlide = chunkWK56SFN7_js.createBlankSlide(slides.length + 1);
6040
+ const newSlide = chunkLTEDT475_js.createBlankSlide(slides.length + 1);
5993
6041
  ops.updateSlides((prev) => {
5994
6042
  const next = [...prev];
5995
6043
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6052,7 +6100,7 @@ function useSlideManagement(input) {
6052
6100
  }
6053
6101
  const clone = {
6054
6102
  ...src,
6055
- id: chunkWK56SFN7_js.makeSlideId(),
6103
+ id: chunkLTEDT475_js.makeSlideId(),
6056
6104
  elements: src.elements.map((el) => ({
6057
6105
  ...el,
6058
6106
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6084,7 +6132,7 @@ function useSlideManagement(input) {
6084
6132
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6085
6133
  const insertAt = activeSlideIndex + 1;
6086
6134
  const draft = {
6087
- ...chunkWK56SFN7_js.createBlankSlide(slides.length + 1),
6135
+ ...chunkLTEDT475_js.createBlankSlide(slides.length + 1),
6088
6136
  layoutPath,
6089
6137
  ...layoutName ? { layoutName } : {}
6090
6138
  };
@@ -6145,7 +6193,7 @@ function createTableMergeHandlers(input) {
6145
6193
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6146
6194
  return;
6147
6195
  }
6148
- const newTableData = chunkWK56SFN7_js.mergeCells(
6196
+ const newTableData = chunkLTEDT475_js.mergeCells(
6149
6197
  [
6150
6198
  { row: rowIndex, col: columnIndex },
6151
6199
  { row: rowIndex, col: nextColIdx }
@@ -6153,7 +6201,7 @@ function createTableMergeHandlers(input) {
6153
6201
  td
6154
6202
  );
6155
6203
  const updates = { tableData: newTableData };
6156
- const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6204
+ const newRawXml = chunkLTEDT475_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6157
6205
  if (newRawXml) {
6158
6206
  updates.rawXml = newRawXml;
6159
6207
  }
@@ -6179,7 +6227,7 @@ function createTableMergeHandlers(input) {
6179
6227
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6180
6228
  return;
6181
6229
  }
6182
- const newTableData = chunkWK56SFN7_js.mergeCells(
6230
+ const newTableData = chunkLTEDT475_js.mergeCells(
6183
6231
  [
6184
6232
  { row: rowIndex, col: columnIndex },
6185
6233
  { row: targetNextRowIdx, col: columnIndex }
@@ -6187,7 +6235,7 @@ function createTableMergeHandlers(input) {
6187
6235
  td
6188
6236
  );
6189
6237
  const updates = { tableData: newTableData };
6190
- const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6238
+ const newRawXml = chunkLTEDT475_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6191
6239
  if (newRawXml) {
6192
6240
  updates.rawXml = newRawXml;
6193
6241
  }
@@ -6202,9 +6250,9 @@ function createTableMergeHandlers(input) {
6202
6250
  return;
6203
6251
  }
6204
6252
  const td = selectedElement.tableData;
6205
- const newTableData = chunkWK56SFN7_js.mergeCells(ts.selectedCells, td);
6253
+ const newTableData = chunkLTEDT475_js.mergeCells(ts.selectedCells, td);
6206
6254
  const updates = { tableData: newTableData };
6207
- const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6255
+ const newRawXml = chunkLTEDT475_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6208
6256
  if (newRawXml) {
6209
6257
  updates.rawXml = newRawXml;
6210
6258
  }
@@ -6221,9 +6269,9 @@ function createTableMergeHandlers(input) {
6221
6269
  }
6222
6270
  const { rowIndex, columnIndex } = ts;
6223
6271
  const td = selectedElement.tableData;
6224
- const newTableData = chunkWK56SFN7_js.splitCell(rowIndex, columnIndex, td);
6272
+ const newTableData = chunkLTEDT475_js.splitCell(rowIndex, columnIndex, td);
6225
6273
  const updates = { tableData: newTableData };
6226
- const newRawXml = chunkWK56SFN7_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6274
+ const newRawXml = chunkLTEDT475_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6227
6275
  if (newRawXml) {
6228
6276
  updates.rawXml = newRawXml;
6229
6277
  }
@@ -6267,7 +6315,7 @@ function createTableStructHandlers(input) {
6267
6315
  updates.tableData = { ...el.tableData, rows: newRows };
6268
6316
  }
6269
6317
  if (el.rawXml) {
6270
- const newRawXml = chunkWK56SFN7_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6318
+ const newRawXml = chunkLTEDT475_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6271
6319
  if (newRawXml) {
6272
6320
  updates.rawXml = newRawXml;
6273
6321
  }
@@ -6291,7 +6339,7 @@ function createTableStructHandlers(input) {
6291
6339
  const { rowIndex, columnIndex: colIndex } = ts;
6292
6340
  const updates = {};
6293
6341
  if (selectedElement.rawXml) {
6294
- const newRawXml = chunkWK56SFN7_js.updateCellTextStyleInRawXml(
6342
+ const newRawXml = chunkLTEDT475_js.updateCellTextStyleInRawXml(
6295
6343
  selectedElement,
6296
6344
  rowIndex,
6297
6345
  colIndex,
@@ -6355,9 +6403,9 @@ function createTableStructHandlers(input) {
6355
6403
  return;
6356
6404
  }
6357
6405
  const rowIdx = ts?.rowIndex ?? 0;
6358
- const newTableData = chunkWK56SFN7_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6406
+ const newTableData = chunkLTEDT475_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6359
6407
  const updates = { tableData: newTableData };
6360
- const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6408
+ const newRawXml = chunkLTEDT475_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6361
6409
  if (newRawXml) {
6362
6410
  updates.rawXml = newRawXml;
6363
6411
  }
@@ -6370,12 +6418,12 @@ function createTableStructHandlers(input) {
6370
6418
  }
6371
6419
  const td = selectedElement.tableData;
6372
6420
  const rowIdx = ts?.rowIndex ?? 0;
6373
- const newTableData = chunkWK56SFN7_js.deleteTableRow(td, rowIdx);
6421
+ const newTableData = chunkLTEDT475_js.deleteTableRow(td, rowIdx);
6374
6422
  if (newTableData === td) {
6375
6423
  return;
6376
6424
  }
6377
6425
  const updates = { tableData: newTableData };
6378
- const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6426
+ const newRawXml = chunkLTEDT475_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6379
6427
  if (newRawXml) {
6380
6428
  updates.rawXml = newRawXml;
6381
6429
  }
@@ -6387,9 +6435,9 @@ function createTableStructHandlers(input) {
6387
6435
  return;
6388
6436
  }
6389
6437
  const colIdx = ts?.columnIndex ?? 0;
6390
- const newTableData = chunkWK56SFN7_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6438
+ const newTableData = chunkLTEDT475_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6391
6439
  const updates = { tableData: newTableData };
6392
- const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6440
+ const newRawXml = chunkLTEDT475_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6393
6441
  if (newRawXml) {
6394
6442
  updates.rawXml = newRawXml;
6395
6443
  }
@@ -6402,12 +6450,12 @@ function createTableStructHandlers(input) {
6402
6450
  }
6403
6451
  const td = selectedElement.tableData;
6404
6452
  const colIdx = ts?.columnIndex ?? 0;
6405
- const newTableData = chunkWK56SFN7_js.deleteTableColumn(td, colIdx);
6453
+ const newTableData = chunkLTEDT475_js.deleteTableColumn(td, colIdx);
6406
6454
  if (newTableData === td) {
6407
6455
  return;
6408
6456
  }
6409
6457
  const updates = { tableData: newTableData };
6410
- const newRawXml = chunkWK56SFN7_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6458
+ const newRawXml = chunkLTEDT475_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6411
6459
  if (newRawXml) {
6412
6460
  updates.rawXml = newRawXml;
6413
6461
  }
@@ -6443,8 +6491,8 @@ async function renderToCanvas(element, options = {}) {
6443
6491
  return html2canvasPro(element, {
6444
6492
  ...options,
6445
6493
  onclone: async (doc, clonedEl) => {
6446
- await chunkWK56SFN7_js.normalizeColorsForCapture(doc, clonedEl);
6447
- chunkWK56SFN7_js.preprocessCssForCapture(clonedEl);
6494
+ await chunkLTEDT475_js.normalizeColorsForCapture(doc, clonedEl);
6495
+ chunkLTEDT475_js.preprocessCssForCapture(clonedEl);
6448
6496
  if (typeof userOnClone === "function") {
6449
6497
  userOnClone(doc, clonedEl);
6450
6498
  }
@@ -6500,7 +6548,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6500
6548
  }
6501
6549
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6502
6550
  const blob = await exportSlideToPngBlob(slideElement, options);
6503
- chunkWK56SFN7_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6551
+ chunkLTEDT475_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6504
6552
  }
6505
6553
  async function copySlideToClipboard(slideElement, options = {}) {
6506
6554
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6522,15 +6570,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6522
6570
  continue;
6523
6571
  }
6524
6572
  const canvas = await renderElementToCanvas(stageEl, scale);
6525
- images.push(chunkWK56SFN7_js.canvasToJpegData(canvas));
6573
+ images.push(chunkLTEDT475_js.canvasToJpegData(canvas));
6526
6574
  }
6527
6575
  onProgress?.(totalSlides, totalSlides);
6528
6576
  setActiveSlide(currentSlideIndex);
6529
6577
  if (images.length === 0) {
6530
6578
  throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6531
6579
  }
6532
- const pdfBlobUrl = chunk5TPQJWEO_js.buildPdfFromImageData(images);
6533
- chunkWK56SFN7_js.downloadDataUrl(pdfBlobUrl, filename);
6580
+ const pdfBlobUrl = chunkNVH3RIN7_js.buildPdfFromImageData(images);
6581
+ chunkLTEDT475_js.downloadDataUrl(pdfBlobUrl, filename);
6534
6582
  }
6535
6583
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6536
6584
  const { scale = 2, onProgress } = options;
@@ -6578,8 +6626,8 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6578
6626
  if (pages.length === 0) {
6579
6627
  throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6580
6628
  }
6581
- const pdfDataUrl = chunk5TPQJWEO_js.buildNotesPdf(pages);
6582
- chunkWK56SFN7_js.downloadDataUrl(pdfDataUrl, filename);
6629
+ const pdfDataUrl = chunkNVH3RIN7_js.buildNotesPdf(pages);
6630
+ chunkLTEDT475_js.downloadDataUrl(pdfDataUrl, filename);
6583
6631
  }
6584
6632
 
6585
6633
  // src/viewer/utils/export-video.ts
@@ -6623,7 +6671,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6623
6671
  const fps = 30;
6624
6672
  const stream = recordingCanvas.captureStream(fps);
6625
6673
  const recorder = new MediaRecorder(stream, {
6626
- mimeType: chunkWK56SFN7_js.pickSupportedMimeType([...chunkWK56SFN7_js.WEBM_MIME_CANDIDATES]),
6674
+ mimeType: chunkLTEDT475_js.pickSupportedMimeType([...chunkLTEDT475_js.WEBM_MIME_CANDIDATES]),
6627
6675
  videoBitsPerSecond: 5e6
6628
6676
  });
6629
6677
  const chunks = [];
@@ -6646,8 +6694,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6646
6694
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6647
6695
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6648
6696
  ctx.drawImage(slideCanvases[i], 0, 0);
6649
- const frameInterval = chunkWK56SFN7_js.fpsToFrameIntervalMs(fps);
6650
- const framesNeeded = chunkWK56SFN7_js.segmentFrameCount(duration, fps);
6697
+ const frameInterval = chunkLTEDT475_js.fpsToFrameIntervalMs(fps);
6698
+ const framesNeeded = chunkLTEDT475_js.segmentFrameCount(duration, fps);
6651
6699
  for (let f = 0; f < framesNeeded; f++) {
6652
6700
  if (signal?.aborted) {
6653
6701
  recorder.stop();
@@ -6696,7 +6744,7 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6696
6744
  if (frames.length === 0) {
6697
6745
  throw new Error(chunk25VSL2BB_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6698
6746
  }
6699
- const gifBytes = chunkWK56SFN7_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6747
+ const gifBytes = chunkLTEDT475_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6700
6748
  onProgress?.(totalSlides, totalSlides);
6701
6749
  const buf = new ArrayBuffer(gifBytes.length);
6702
6750
  new Uint8Array(buf).set(gifBytes);
@@ -6750,7 +6798,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6750
6798
  continue;
6751
6799
  }
6752
6800
  onProgress?.(processedCount, data.slides.length);
6753
- let svg = chunkWK56SFN7_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6801
+ let svg = chunkLTEDT475_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6754
6802
  if (embedFonts && fontFaces?.length) {
6755
6803
  svg = injectFontFaces(svg, fontFaces);
6756
6804
  }
@@ -6810,7 +6858,7 @@ function useExportSaveAs(input) {
6810
6858
  }
6811
6859
  setExportProgress(70);
6812
6860
  setExportStatusMessage("Writing README...");
6813
- const readme = chunkWK56SFN7_js.generatePackageReadme(pptxFilename);
6861
+ const readme = chunkLTEDT475_js.generatePackageReadme(pptxFilename);
6814
6862
  pkgFolder.file("README.txt", readme);
6815
6863
  if (abortCtrl.signal.aborted) {
6816
6864
  throw new DOMException("Export cancelled", "AbortError");
@@ -6821,7 +6869,7 @@ function useExportSaveAs(input) {
6821
6869
  setExportProgress(95);
6822
6870
  setExportStatusMessage("Downloading...");
6823
6871
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6824
- chunkWK56SFN7_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6872
+ chunkLTEDT475_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6825
6873
  setExportProgress(100);
6826
6874
  } catch (err) {
6827
6875
  if (err.name !== "AbortError") {
@@ -6844,7 +6892,7 @@ function useExportSaveAs(input) {
6844
6892
  const blob = new Blob([data], {
6845
6893
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6846
6894
  });
6847
- chunkWK56SFN7_js.downloadBlob(blob, `${baseName}.${ext}`);
6895
+ chunkLTEDT475_js.downloadBlob(blob, `${baseName}.${ext}`);
6848
6896
  } catch (err) {
6849
6897
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6850
6898
  }
@@ -6857,14 +6905,14 @@ function useExportSaveAs(input) {
6857
6905
  const pptxGuides = guides.map((g) => ({
6858
6906
  id: g.id,
6859
6907
  orientation: g.axis === "h" ? "horz" : "vert",
6860
- positionEmu: chunkWK56SFN7_js.guidePxToEmu(g.position)
6908
+ positionEmu: chunkLTEDT475_js.guidePxToEmu(g.position)
6861
6909
  }));
6862
6910
  return {
6863
6911
  ...slide,
6864
6912
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6865
6913
  };
6866
6914
  });
6867
- const slidesToSave = chunk5TPQJWEO_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6915
+ const slidesToSave = chunkNVH3RIN7_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6868
6916
  const saveOptions = {
6869
6917
  headerFooter,
6870
6918
  presentationProperties,
@@ -6921,7 +6969,7 @@ function safeConfirm(message) {
6921
6969
  }
6922
6970
  }
6923
6971
  function downloadBlob2(blob, filename) {
6924
- chunkWK56SFN7_js.downloadBlob(blob, chunkWK56SFN7_js.sanitizeDownloadFilename(filename));
6972
+ chunkLTEDT475_js.downloadBlob(blob, chunkLTEDT475_js.sanitizeDownloadFilename(filename));
6925
6973
  }
6926
6974
 
6927
6975
  // src/viewer/hooks/useExportHandlers.ts
@@ -7022,21 +7070,21 @@ function useExportHandlers(input) {
7022
7070
  {
7023
7071
  scale: 2,
7024
7072
  onProgress: (current, total) => {
7025
- setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total));
7026
- setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Rendering", current, total));
7073
+ setExportProgress(chunkLTEDT475_js.slideProgressPercent(current, total));
7074
+ setExportStatusMessage(chunkLTEDT475_js.slideStatusLabel("Rendering", current, total));
7027
7075
  },
7028
7076
  signal: abortCtrl.signal
7029
7077
  }
7030
7078
  );
7031
- setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7079
+ setExportProgress(chunkLTEDT475_js.EXPORT_ASSEMBLING_PERCENT);
7032
7080
  setExportStatusMessage("Building PDF...");
7033
7081
  await new Promise((r) => {
7034
7082
  setTimeout(r, 100);
7035
7083
  });
7036
- setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7084
+ setExportProgress(chunkLTEDT475_js.EXPORT_DONE_PERCENT);
7037
7085
  setExportStatusMessage("Done!");
7038
7086
  } catch (err) {
7039
- if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7087
+ if (!chunkLTEDT475_js.isExportAbortError(err)) {
7040
7088
  console.error("[PowerPointViewer] PDF export failed:", err);
7041
7089
  }
7042
7090
  } finally {
@@ -7066,21 +7114,21 @@ function useExportHandlers(input) {
7066
7114
  {
7067
7115
  scale: 2,
7068
7116
  onProgress: (current, total) => {
7069
- setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total));
7070
- setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Rendering", current, total));
7117
+ setExportProgress(chunkLTEDT475_js.slideProgressPercent(current, total));
7118
+ setExportStatusMessage(chunkLTEDT475_js.slideStatusLabel("Rendering", current, total));
7071
7119
  },
7072
7120
  signal: abortCtrl.signal
7073
7121
  }
7074
7122
  );
7075
- setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7123
+ setExportProgress(chunkLTEDT475_js.EXPORT_ASSEMBLING_PERCENT);
7076
7124
  setExportStatusMessage("Building PDF...");
7077
7125
  await new Promise((r) => {
7078
7126
  setTimeout(r, 100);
7079
7127
  });
7080
- setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7128
+ setExportProgress(chunkLTEDT475_js.EXPORT_DONE_PERCENT);
7081
7129
  setExportStatusMessage("Done!");
7082
7130
  } catch (err) {
7083
- if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7131
+ if (!chunkLTEDT475_js.isExportAbortError(err)) {
7084
7132
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7085
7133
  }
7086
7134
  } finally {
@@ -7121,22 +7169,22 @@ function useExportHandlers(input) {
7121
7169
  scale: 1,
7122
7170
  slideDurationMs: 3e3,
7123
7171
  onProgress: (current, total) => {
7124
- setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total, 45));
7125
- setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Capturing", current, total));
7172
+ setExportProgress(chunkLTEDT475_js.slideProgressPercent(current, total, 45));
7173
+ setExportStatusMessage(chunkLTEDT475_js.slideStatusLabel("Capturing", current, total));
7126
7174
  },
7127
7175
  onRecordProgress: (current, total) => {
7128
- setExportProgress(chunkWK56SFN7_js.recordProgressPercent(current, total));
7129
- setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Recording", current, total));
7176
+ setExportProgress(chunkLTEDT475_js.recordProgressPercent(current, total));
7177
+ setExportStatusMessage(chunkLTEDT475_js.slideStatusLabel("Recording", current, total));
7130
7178
  },
7131
7179
  signal: abortCtrl.signal
7132
7180
  }
7133
7181
  );
7134
- setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7182
+ setExportProgress(chunkLTEDT475_js.EXPORT_ASSEMBLING_PERCENT);
7135
7183
  setExportStatusMessage("Saving file...");
7136
7184
  downloadBlob2(blob, "presentation.webm");
7137
- setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7185
+ setExportProgress(chunkLTEDT475_js.EXPORT_DONE_PERCENT);
7138
7186
  } catch (err) {
7139
- if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7187
+ if (!chunkLTEDT475_js.isExportAbortError(err)) {
7140
7188
  console.error("[PowerPointViewer] Video export failed:", err);
7141
7189
  }
7142
7190
  } finally {
@@ -7164,18 +7212,18 @@ function useExportHandlers(input) {
7164
7212
  scale: 0.5,
7165
7213
  slideDurationMs: 2e3,
7166
7214
  onProgress: (current, total) => {
7167
- setExportProgress(chunkWK56SFN7_js.slideProgressPercent(current, total));
7168
- setExportStatusMessage(chunkWK56SFN7_js.slideStatusLabel("Encoding", current, total));
7215
+ setExportProgress(chunkLTEDT475_js.slideProgressPercent(current, total));
7216
+ setExportStatusMessage(chunkLTEDT475_js.slideStatusLabel("Encoding", current, total));
7169
7217
  },
7170
7218
  signal: abortCtrl.signal
7171
7219
  }
7172
7220
  );
7173
- setExportProgress(chunkWK56SFN7_js.EXPORT_ASSEMBLING_PERCENT);
7221
+ setExportProgress(chunkLTEDT475_js.EXPORT_ASSEMBLING_PERCENT);
7174
7222
  setExportStatusMessage("Saving file...");
7175
7223
  downloadBlob2(blob, "presentation.gif");
7176
- setExportProgress(chunkWK56SFN7_js.EXPORT_DONE_PERCENT);
7224
+ setExportProgress(chunkLTEDT475_js.EXPORT_DONE_PERCENT);
7177
7225
  } catch (err) {
7178
- if (!chunkWK56SFN7_js.isExportAbortError(err)) {
7226
+ if (!chunkLTEDT475_js.isExportAbortError(err)) {
7179
7227
  console.error("[PowerPointViewer] GIF export failed:", err);
7180
7228
  }
7181
7229
  } finally {
@@ -7215,7 +7263,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7215
7263
  }
7216
7264
  printWindow.document.open();
7217
7265
  printWindow.document.write(
7218
- chunkWK56SFN7_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7266
+ chunkLTEDT475_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7219
7267
  );
7220
7268
  printWindow.document.close();
7221
7269
  printWindow.focus();
@@ -7276,7 +7324,7 @@ function usePrintHandlers(input) {
7276
7324
  if (svgs.length === 0) {
7277
7325
  return;
7278
7326
  }
7279
- const printDoc = chunkWK56SFN7_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7327
+ const printDoc = chunkLTEDT475_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7280
7328
  title: "Slides (Vector)",
7281
7329
  orientation: settings.orientation,
7282
7330
  colorFilter
@@ -7312,7 +7360,7 @@ function usePrintHandlers(input) {
7312
7360
  if (settings.printWhat === "outline") {
7313
7361
  openPrintWindow(
7314
7362
  "Outline",
7315
- `<div class="outline-page">${chunkWK56SFN7_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7363
+ `<div class="outline-page">${chunkLTEDT475_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7316
7364
  settings.orientation,
7317
7365
  colorFilter,
7318
7366
  settings.frameSlides
@@ -7337,7 +7385,7 @@ function usePrintHandlers(input) {
7337
7385
  if (settings.printWhat === "slides") {
7338
7386
  openPrintWindow(
7339
7387
  "Slides",
7340
- chunkWK56SFN7_js.buildSlidesHtml(slideImages, slideIndices),
7388
+ chunkLTEDT475_js.buildSlidesHtml(slideImages, slideIndices),
7341
7389
  settings.orientation,
7342
7390
  colorFilter,
7343
7391
  settings.frameSlides
@@ -7347,7 +7395,7 @@ function usePrintHandlers(input) {
7347
7395
  if (settings.printWhat === "notes") {
7348
7396
  openPrintWindow(
7349
7397
  "Notes Pages",
7350
- chunkWK56SFN7_js.buildNotesHtml(slideImages, slideIndices, slides),
7398
+ chunkLTEDT475_js.buildNotesHtml(slideImages, slideIndices, slides),
7351
7399
  "portrait",
7352
7400
  colorFilter,
7353
7401
  settings.frameSlides
@@ -7358,7 +7406,7 @@ function usePrintHandlers(input) {
7358
7406
  const spp = settings.slidesPerPage;
7359
7407
  openPrintWindow(
7360
7408
  `Handout ${spp} per page`,
7361
- chunkWK56SFN7_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7409
+ chunkLTEDT475_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7362
7410
  "portrait",
7363
7411
  colorFilter,
7364
7412
  settings.frameSlides
@@ -7422,8 +7470,8 @@ function useThemeHandlers(input) {
7422
7470
  return;
7423
7471
  }
7424
7472
  await handler.updateThemeColorScheme(colorScheme);
7425
- const previousMap = theme?.colorScheme ? chunkWK56SFN7_js.buildThemeColorMap(theme.colorScheme) : {};
7426
- setSlides((prev) => chunkWK56SFN7_js.reResolveSlideColors(prev, previousMap, colorScheme));
7473
+ const previousMap = theme?.colorScheme ? chunkLTEDT475_js.buildThemeColorMap(theme.colorScheme) : {};
7474
+ setSlides((prev) => chunkLTEDT475_js.reResolveSlideColors(prev, previousMap, colorScheme));
7427
7475
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7428
7476
  bumpHistory();
7429
7477
  history.markDirty();
@@ -7528,7 +7576,7 @@ function useThemeSwitching(input) {
7528
7576
  }
7529
7577
  try {
7530
7578
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7531
- const newData = chunkWK56SFN7_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7579
+ const newData = chunkLTEDT475_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7532
7580
  onDataChange(newData);
7533
7581
  onThemeChanged?.(preset);
7534
7582
  } catch (error) {
@@ -7545,7 +7593,7 @@ function useThemeSwitching(input) {
7545
7593
  }
7546
7594
  try {
7547
7595
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7548
- const newData = chunkWK56SFN7_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7596
+ const newData = chunkLTEDT475_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7549
7597
  onDataChange(newData);
7550
7598
  } catch (error) {
7551
7599
  console.error("Failed to switch to custom theme:", error);
@@ -7557,12 +7605,12 @@ function useThemeSwitching(input) {
7557
7605
  if (!data?.theme?.colorScheme) {
7558
7606
  return void 0;
7559
7607
  }
7560
- return chunkWK56SFN7_js.THEME_PRESETS.find(
7561
- (p) => chunkWK56SFN7_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7608
+ return chunkLTEDT475_js.THEME_PRESETS.find(
7609
+ (p) => chunkLTEDT475_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7562
7610
  );
7563
7611
  }, [data?.theme?.colorScheme]);
7564
7612
  return {
7565
- presets: chunkWK56SFN7_js.THEME_PRESETS,
7613
+ presets: chunkLTEDT475_js.THEME_PRESETS,
7566
7614
  switchToPreset,
7567
7615
  switchToCustom,
7568
7616
  currentPreset
@@ -7637,7 +7685,7 @@ function usePropertyHandlers(input) {
7637
7685
  }
7638
7686
  try {
7639
7687
  const ab = await file.arrayBuffer();
7640
- const h = new chunkWK56SFN7_js.PptxHandler();
7688
+ const h = new chunkLTEDT475_js.PptxHandler();
7641
7689
  const other = await h.load(ab);
7642
7690
  if (!other) {
7643
7691
  return;
@@ -7647,7 +7695,7 @@ function usePropertyHandlers(input) {
7647
7695
  width: canvasSize.width,
7648
7696
  height: canvasSize.height
7649
7697
  };
7650
- setCompareResult(chunkWK56SFN7_js.comparePresentation(cur, other));
7698
+ setCompareResult(chunkLTEDT475_js.comparePresentation(cur, other));
7651
7699
  setIsComparePanelOpen(true);
7652
7700
  } catch (err) {
7653
7701
  console.warn("Compare failed:", err);
@@ -7664,7 +7712,7 @@ function usePropertyHandlers(input) {
7664
7712
  if (!diff || diff.status === "unchanged") {
7665
7713
  return;
7666
7714
  }
7667
- setSlides((prev) => chunkWK56SFN7_js.applyAcceptSlide(prev, diff));
7715
+ setSlides((prev) => chunkLTEDT475_js.applyAcceptSlide(prev, diff));
7668
7716
  setIsDirty(true);
7669
7717
  },
7670
7718
  [compareResult, setSlides, setIsDirty]
@@ -7675,10 +7723,10 @@ function usePropertyHandlers(input) {
7675
7723
  if (!compareResult) {
7676
7724
  return;
7677
7725
  }
7678
- setSlides((prev) => chunkWK56SFN7_js.applyAcceptAllSlides(prev, compareResult));
7726
+ setSlides((prev) => chunkLTEDT475_js.applyAcceptAllSlides(prev, compareResult));
7679
7727
  setIsDirty(true);
7680
7728
  }, [compareResult, setSlides, setIsDirty]);
7681
- const usedFontFamilies = react.useMemo(() => chunkWK56SFN7_js.collectUsedFonts(slides), [slides]);
7729
+ const usedFontFamilies = react.useMemo(() => chunkLTEDT475_js.collectUsedFonts(slides), [slides]);
7682
7730
  return {
7683
7731
  handleUpdateNotes,
7684
7732
  handleUpdateSlide,
@@ -7797,7 +7845,7 @@ function useIsMobile(input) {
7797
7845
  const containerRef = input?.containerRef;
7798
7846
  const isTouchDevice = react.useSyncExternalStore(
7799
7847
  subscribeTouchCapability,
7800
- chunkWK56SFN7_js.detectTouchDevice,
7848
+ chunkLTEDT475_js.detectTouchDevice,
7801
7849
  () => false
7802
7850
  // server snapshot
7803
7851
  );
@@ -7813,7 +7861,7 @@ function useIsMobile(input) {
7813
7861
  }
7814
7862
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7815
7863
  });
7816
- const [orientation, setOrientation] = react.useState(chunkWK56SFN7_js.detectOrientation);
7864
+ const [orientation, setOrientation] = react.useState(chunkLTEDT475_js.detectOrientation);
7817
7865
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7818
7866
  const [initialViewportHeight] = react.useState(
7819
7867
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7857,7 +7905,7 @@ function useIsMobile(input) {
7857
7905
  return;
7858
7906
  }
7859
7907
  const handleOrientationChange = () => {
7860
- setOrientation(chunkWK56SFN7_js.detectOrientation());
7908
+ setOrientation(chunkLTEDT475_js.detectOrientation());
7861
7909
  };
7862
7910
  if (screen.orientation) {
7863
7911
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7887,9 +7935,9 @@ function useIsMobile(input) {
7887
7935
  window.addEventListener("resize", handleResize);
7888
7936
  return () => window.removeEventListener("resize", handleResize);
7889
7937
  }, [isTouchDevice, initialViewportHeight]);
7890
- const isMobile = chunkWK56SFN7_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7891
- const isTablet = !isMobile && containerWidth >= chunkWK56SFN7_js.MOBILE_BREAKPOINT && containerWidth < chunkWK56SFN7_js.TABLET_BREAKPOINT;
7892
- const isDesktop = !isMobile && containerWidth >= chunkWK56SFN7_js.TABLET_BREAKPOINT;
7938
+ const isMobile = chunkLTEDT475_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7939
+ const isTablet = !isMobile && containerWidth >= chunkLTEDT475_js.MOBILE_BREAKPOINT && containerWidth < chunkLTEDT475_js.TABLET_BREAKPOINT;
7940
+ const isDesktop = !isMobile && containerWidth >= chunkLTEDT475_js.TABLET_BREAKPOINT;
7893
7941
  return {
7894
7942
  isMobile,
7895
7943
  isTablet,
@@ -7950,11 +7998,11 @@ function useViewerDialogs(input) {
7950
7998
  );
7951
7999
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
7952
8000
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
7953
- () => typeof window !== "undefined" ? chunkWK56SFN7_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8001
+ () => typeof window !== "undefined" ? chunkLTEDT475_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
7954
8002
  );
7955
8003
  react.useEffect(() => {
7956
8004
  const handleWindow = () => setIsNarrowViewport(
7957
- chunkWK56SFN7_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8005
+ chunkLTEDT475_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
7958
8006
  );
7959
8007
  let observer = null;
7960
8008
  let raf = 0;
@@ -7968,12 +8016,12 @@ function useViewerDialogs(input) {
7968
8016
  const entry = entries[0];
7969
8017
  if (entry) {
7970
8018
  setIsNarrowViewport(
7971
- chunkWK56SFN7_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8019
+ chunkLTEDT475_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
7972
8020
  );
7973
8021
  }
7974
8022
  });
7975
8023
  observer.observe(el);
7976
- setIsNarrowViewport(chunkWK56SFN7_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8024
+ setIsNarrowViewport(chunkLTEDT475_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
7977
8025
  };
7978
8026
  attach();
7979
8027
  window.addEventListener("resize", handleWindow);
@@ -8131,12 +8179,12 @@ function useViewerDialogs(input) {
8131
8179
  }
8132
8180
  function computeGridSpacingPx(presentationGridSpacing) {
8133
8181
  if (presentationGridSpacing) {
8134
- const px = Math.round(presentationGridSpacing.cx / chunk5TPQJWEO_js.EMU_PER_PX);
8182
+ const px = Math.round(presentationGridSpacing.cx / chunkNVH3RIN7_js.EMU_PER_PX);
8135
8183
  if (px > 0) {
8136
8184
  return px;
8137
8185
  }
8138
8186
  }
8139
- return chunk5TPQJWEO_js.GRID_SIZE;
8187
+ return chunkNVH3RIN7_js.GRID_SIZE;
8140
8188
  }
8141
8189
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8142
8190
  if (activeCustomShowId) {
@@ -8150,8 +8198,8 @@ function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8150
8198
  return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
8151
8199
  }
8152
8200
  function computeSlideSectionGroups(slides, sections) {
8153
- return chunkWK56SFN7_js.groupSlidesBySection(sections, slides).map((group) => ({
8154
- id: group.section?.id ?? (sections.length > 0 ? chunk5TPQJWEO_js.UNGROUPED_SECTION_ID : "default"),
8201
+ return chunkLTEDT475_js.groupSlidesBySection(sections, slides).map((group) => ({
8202
+ id: group.section?.id ?? (sections.length > 0 ? chunkNVH3RIN7_js.UNGROUPED_SECTION_ID : "default"),
8155
8203
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8156
8204
  slideIndexes: group.slideIndexes,
8157
8205
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8206,7 +8254,7 @@ function useDerivedSlideState(input) {
8206
8254
  );
8207
8255
  const slideSectionGroups = react.useMemo(
8208
8256
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8209
- if (group.id === chunk5TPQJWEO_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8257
+ if (group.id === chunkNVH3RIN7_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8210
8258
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8211
8259
  }
8212
8260
  if (group.id === "default" && group.label === "Slides") {
@@ -8309,10 +8357,13 @@ function useAnnotationHandlers(input) {
8309
8357
  }, [annotations, setMode, setSlides, history]);
8310
8358
  const handleSetMode = react.useCallback(
8311
8359
  (nextMode) => {
8360
+ if (mode === "present" && nextMode !== "present" && !chunkLTEDT475_js.mayLeaveSlideShow()) {
8361
+ return;
8362
+ }
8312
8363
  if (nextMode === "present") {
8313
8364
  presentation.enterPresentMode();
8314
8365
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8315
- chunk5TPQJWEO_js.stopAllPersistentAudio();
8366
+ chunkNVH3RIN7_js.stopAllPersistentAudio();
8316
8367
  pendingModeAfterAnnotationsRef.current = nextMode;
8317
8368
  if (promptKeepInkAnnotations) {
8318
8369
  setShowKeepAnnotationsDialog(true);
@@ -8321,7 +8372,7 @@ function useAnnotationHandlers(input) {
8321
8372
  }
8322
8373
  } else {
8323
8374
  if (mode === "present") {
8324
- chunk5TPQJWEO_js.stopAllPersistentAudio();
8375
+ chunkNVH3RIN7_js.stopAllPersistentAudio();
8325
8376
  }
8326
8377
  setMode(nextMode);
8327
8378
  }
@@ -8387,13 +8438,13 @@ function useSerialize(input) {
8387
8438
  let processedSlide = slide;
8388
8439
  if (pendingEditId) {
8389
8440
  const updatedElements = slide.elements.map((el) => {
8390
- if (el.id !== pendingEditId || !chunkWK56SFN7_js.hasTextProperties(el)) {
8441
+ if (el.id !== pendingEditId || !chunkLTEDT475_js.hasTextProperties(el)) {
8391
8442
  return el;
8392
8443
  }
8393
8444
  return {
8394
8445
  ...el,
8395
8446
  text: pendingEditText,
8396
- textSegments: chunkWK56SFN7_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8447
+ textSegments: chunkLTEDT475_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8397
8448
  };
8398
8449
  });
8399
8450
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8406,14 +8457,14 @@ function useSerialize(input) {
8406
8457
  const pptxGuides = guides.map((g) => ({
8407
8458
  id: g.id,
8408
8459
  orientation: g.axis === "h" ? "horz" : "vert",
8409
- positionEmu: chunkWK56SFN7_js.guidePxToEmu(g.position)
8460
+ positionEmu: chunkLTEDT475_js.guidePxToEmu(g.position)
8410
8461
  }));
8411
8462
  return {
8412
8463
  ...processedSlide,
8413
8464
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8414
8465
  };
8415
8466
  });
8416
- const slidesToSave = chunk5TPQJWEO_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8467
+ const slidesToSave = chunkNVH3RIN7_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8417
8468
  const saveOptions = {
8418
8469
  headerFooter,
8419
8470
  presentationProperties,
@@ -8582,12 +8633,15 @@ function usePresentationSetup(input) {
8582
8633
  containerRef,
8583
8634
  content,
8584
8635
  onSetMode: (nextMode) => {
8636
+ if (mode === "present" && nextMode !== "present" && !chunkLTEDT475_js.mayLeaveSlideShow()) {
8637
+ return;
8638
+ }
8585
8639
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
8586
8640
  pendingModeRef.current = nextMode;
8587
8641
  setShowKeepAnnotationsDialog(true);
8588
8642
  } else {
8589
8643
  if (mode === "present" && nextMode !== "present") {
8590
- chunk5TPQJWEO_js.stopAllPersistentAudio();
8644
+ chunkNVH3RIN7_js.stopAllPersistentAudio();
8591
8645
  stopAnimationSound();
8592
8646
  }
8593
8647
  setMode(nextMode);
@@ -8641,10 +8695,10 @@ function usePresentationSetup(input) {
8641
8695
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8642
8696
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8643
8697
  onSaveRehearsalTimings: (timings) => {
8644
- setSlides((prev) => chunkWK56SFN7_js.applyRehearsalTimings(prev, timings));
8698
+ setSlides((prev) => chunkLTEDT475_js.applyRehearsalTimings(prev, timings));
8645
8699
  history.markDirty();
8646
8700
  },
8647
- loopContinuously: chunkWK56SFN7_js.shouldLoopContinuously(presentationProperties),
8701
+ loopContinuously: chunkLTEDT475_js.shouldLoopContinuously(presentationProperties),
8648
8702
  showWithAnimation: presentationProperties.showWithAnimation,
8649
8703
  useTimings: presentationProperties.advanceMode !== "manual",
8650
8704
  endWithBlackSlide
@@ -8806,7 +8860,7 @@ function useEditorOperations(input) {
8806
8860
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8807
8861
  react.useEffect(() => {
8808
8862
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8809
- copiedFormatRef.current = chunkWK56SFN7_js.copyFormatFromElement(selectedElement);
8863
+ copiedFormatRef.current = chunkLTEDT475_js.copyFormatFromElement(selectedElement);
8810
8864
  } else if (!formatPainterActive) {
8811
8865
  copiedFormatRef.current = null;
8812
8866
  }
@@ -8832,12 +8886,12 @@ function useEditorOperations(input) {
8832
8886
  e.stopPropagation();
8833
8887
  const element = elementLookup.get(elementId);
8834
8888
  if (element) {
8835
- const updated = chunkWK56SFN7_js.applyFormatToElement(element, copiedFormatRef.current);
8889
+ const updated = chunkLTEDT475_js.applyFormatToElement(element, copiedFormatRef.current);
8836
8890
  const updates = {};
8837
- if (chunkWK56SFN7_js.hasShapeProperties(updated)) {
8891
+ if (chunkLTEDT475_js.hasShapeProperties(updated)) {
8838
8892
  updates.shapeStyle = updated.shapeStyle;
8839
8893
  }
8840
- if (chunkWK56SFN7_js.hasTextProperties(updated)) {
8894
+ if (chunkLTEDT475_js.hasTextProperties(updated)) {
8841
8895
  updates.textStyle = updated.textStyle;
8842
8896
  }
8843
8897
  ops.updateElementById(elementId, updates);
@@ -8984,7 +9038,7 @@ function collectReferencedFontFamilies(slides) {
8984
9038
  const families = /* @__PURE__ */ new Set();
8985
9039
  for (const slide of slides) {
8986
9040
  for (const el of slide.elements) {
8987
- if (chunkWK56SFN7_js.hasTextProperties(el) && el.textSegments) {
9041
+ if (chunkLTEDT475_js.hasTextProperties(el) && el.textSegments) {
8988
9042
  for (const seg of el.textSegments) {
8989
9043
  if (seg.style.fontFamily) {
8990
9044
  families.add(seg.style.fontFamily);
@@ -9553,7 +9607,7 @@ function useViewerIntegration(input) {
9553
9607
  return zoom.scale;
9554
9608
  },
9555
9609
  setZoom(level) {
9556
- zoom.setScale(Math.min(Math.max(level, chunk5TPQJWEO_js.MIN_ZOOM_SCALE), chunk5TPQJWEO_js.MAX_ZOOM_SCALE));
9610
+ zoom.setScale(Math.min(Math.max(level, chunkNVH3RIN7_js.MIN_ZOOM_SCALE), chunkNVH3RIN7_js.MAX_ZOOM_SCALE));
9557
9611
  },
9558
9612
  zoomIn() {
9559
9613
  zoom.handleZoomIn();
@@ -9768,7 +9822,7 @@ function useReducedMotion() {
9768
9822
  }
9769
9823
  function useViewerOptions() {
9770
9824
  const storeRef = react.useRef(null);
9771
- storeRef.current ??= chunkWK56SFN7_js.createViewerOptionsStore();
9825
+ storeRef.current ??= chunkLTEDT475_js.createViewerOptionsStore();
9772
9826
  const store = storeRef.current;
9773
9827
  const options = react.useSyncExternalStore(
9774
9828
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9777,9 +9831,9 @@ function useViewerOptions() {
9777
9831
  );
9778
9832
  return { optionsStore: store, options };
9779
9833
  }
9780
- var KNOWN_TAB_IDS = new Set(chunkWK56SFN7_js.TOOLBAR_TABS.map((tab) => tab.id));
9834
+ var KNOWN_TAB_IDS = new Set(chunkLTEDT475_js.TOOLBAR_TABS.map((tab) => tab.id));
9781
9835
  function computeToolbarVisibility(hiddenActions) {
9782
- const isHidden = (id) => chunkWK56SFN7_js.isActionHidden(id, hiddenActions);
9836
+ const isHidden = (id) => chunkLTEDT475_js.isActionHidden(id, hiddenActions);
9783
9837
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9784
9838
  return { isHidden, isTabVisible };
9785
9839
  }
@@ -9864,12 +9918,12 @@ function useYjsDocumentSync({
9864
9918
  return;
9865
9919
  }
9866
9920
  try {
9867
- const handler = new chunkWK56SFN7_js.PptxHandler();
9921
+ const handler = new chunkLTEDT475_js.PptxHandler();
9868
9922
  await handler.load(sourceBytes.buffer);
9869
- const currentSlides = chunkWK56SFN7_js.readSlidesFromYDoc(
9923
+ const currentSlides = chunkLTEDT475_js.readSlidesFromYDoc(
9870
9924
  doc
9871
9925
  );
9872
- const slidesToSave = chunk5TPQJWEO_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9926
+ const slidesToSave = chunkNVH3RIN7_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9873
9927
  const bytes = await handler.save(slidesToSave);
9874
9928
  config.onWriteBack(bytes);
9875
9929
  } catch {
@@ -9884,7 +9938,7 @@ function useYjsDocumentSync({
9884
9938
  if (!doc || !isConnected) {
9885
9939
  return;
9886
9940
  }
9887
- const docSlides = chunkWK56SFN7_js.readSlidesFromYDoc(
9941
+ const docSlides = chunkLTEDT475_js.readSlidesFromYDoc(
9888
9942
  doc
9889
9943
  );
9890
9944
  if (docSlides.length === 0) {
@@ -9906,11 +9960,11 @@ function useYjsDocumentSync({
9906
9960
  lastSyncedRef.current = serialized;
9907
9961
  void (async () => {
9908
9962
  const factories = await getFactories();
9909
- chunkWK56SFN7_js.reconcileSlidesInYDoc(
9963
+ chunkLTEDT475_js.reconcileSlidesInYDoc(
9910
9964
  slides,
9911
9965
  doc,
9912
9966
  factories,
9913
- chunkWK56SFN7_js.LOCAL_SYNC_ORIGIN
9967
+ chunkLTEDT475_js.LOCAL_SYNC_ORIGIN
9914
9968
  );
9915
9969
  scheduleWriteBack();
9916
9970
  })();
@@ -9924,10 +9978,10 @@ function useYjsDocumentSync({
9924
9978
  return;
9925
9979
  }
9926
9980
  const handleChange = (_events, transaction) => {
9927
- if (transaction?.origin === chunkWK56SFN7_js.LOCAL_SYNC_ORIGIN) {
9981
+ if (transaction?.origin === chunkLTEDT475_js.LOCAL_SYNC_ORIGIN) {
9928
9982
  return;
9929
9983
  }
9930
- const remoteSlides = chunkWK56SFN7_js.readSlidesFromYDoc(
9984
+ const remoteSlides = chunkLTEDT475_js.readSlidesFromYDoc(
9931
9985
  doc
9932
9986
  );
9933
9987
  if (remoteSlides.length === 0) {
@@ -9943,7 +9997,7 @@ function useYjsDocumentSync({
9943
9997
  isApplyingRemoteRef.current = false;
9944
9998
  scheduleWriteBack();
9945
9999
  };
9946
- const unobserve = chunkWK56SFN7_js.observeYDocSlides(
10000
+ const unobserve = chunkLTEDT475_js.observeYDocSlides(
9947
10001
  doc,
9948
10002
  handleChange
9949
10003
  );
@@ -9981,7 +10035,7 @@ function useBroadcastFollower({
9981
10035
  if (!broadcaster) {
9982
10036
  return;
9983
10037
  }
9984
- if (!chunkWK56SFN7_js.shouldAutoFollowBroadcaster({
10038
+ if (!chunkLTEDT475_js.shouldAutoFollowBroadcaster({
9985
10039
  localRole: collab.config.role,
9986
10040
  broadcasterRole: broadcaster.role
9987
10041
  })) {
@@ -10141,10 +10195,10 @@ function useTouchGestures(input) {
10141
10195
  if (!el || !enabled) {
10142
10196
  return;
10143
10197
  }
10144
- const recognizer = chunkWK56SFN7_js.createTouchGestureRecognizer({
10198
+ const recognizer = chunkLTEDT475_js.createTouchGestureRecognizer({
10145
10199
  getScale: () => scaleRef.current,
10146
- minScale: chunk5TPQJWEO_js.MIN_ZOOM_SCALE,
10147
- maxScale: chunk5TPQJWEO_js.MAX_ZOOM_SCALE,
10200
+ minScale: chunkNVH3RIN7_js.MIN_ZOOM_SCALE,
10201
+ maxScale: chunkNVH3RIN7_js.MAX_ZOOM_SCALE,
10148
10202
  callbacks: {
10149
10203
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10150
10204
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10184,7 +10238,7 @@ function scrollFocusedIntoView(keyboardInset) {
10184
10238
  return;
10185
10239
  }
10186
10240
  const rect = active.getBoundingClientRect();
10187
- const delta = chunkWK56SFN7_js.computeScrollDelta(
10241
+ const delta = chunkLTEDT475_js.computeScrollDelta(
10188
10242
  { top: rect.top, bottom: rect.bottom },
10189
10243
  window.innerHeight,
10190
10244
  keyboardInset
@@ -10204,8 +10258,8 @@ function useKeyboardInsets(enabled = true) {
10204
10258
  return;
10205
10259
  }
10206
10260
  const update = () => {
10207
- const metrics = chunkWK56SFN7_js.readViewportMetrics(window);
10208
- const inset = metrics ? chunkWK56SFN7_js.computeKeyboardInset(metrics) : 0;
10261
+ const metrics = chunkLTEDT475_js.readViewportMetrics(window);
10262
+ const inset = metrics ? chunkLTEDT475_js.computeKeyboardInset(metrics) : 0;
10209
10263
  setKeyboardInset(inset);
10210
10264
  if (inset > 0) {
10211
10265
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10216,8 +10270,8 @@ function useKeyboardInsets(enabled = true) {
10216
10270
  vv.addEventListener("scroll", update);
10217
10271
  const onFocusIn = () => {
10218
10272
  window.requestAnimationFrame(() => {
10219
- const metrics = chunkWK56SFN7_js.readViewportMetrics(window);
10220
- const inset = metrics ? chunkWK56SFN7_js.computeKeyboardInset(metrics) : 0;
10273
+ const metrics = chunkLTEDT475_js.readViewportMetrics(window);
10274
+ const inset = metrics ? chunkLTEDT475_js.computeKeyboardInset(metrics) : 0;
10221
10275
  if (inset > 0) {
10222
10276
  scrollFocusedIntoView(inset);
10223
10277
  }
@@ -10230,7 +10284,7 @@ function useKeyboardInsets(enabled = true) {
10230
10284
  document.removeEventListener("focusin", onFocusIn);
10231
10285
  };
10232
10286
  }, [enabled]);
10233
- return { keyboardInset, isKeyboardOpen: chunkWK56SFN7_js.isKeyboardOpen(keyboardInset) };
10287
+ return { keyboardInset, isKeyboardOpen: chunkLTEDT475_js.isKeyboardOpen(keyboardInset) };
10234
10288
  }
10235
10289
 
10236
10290
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10285,13 +10339,13 @@ function buildCanvasProps(input) {
10285
10339
  if (mode === "present") {
10286
10340
  presentation.handlePresentationAction(action);
10287
10341
  } else if (action.url) {
10288
- chunkWK56SFN7_js.safeOpenUrl(action.url);
10342
+ chunkLTEDT475_js.safeOpenUrl(action.url);
10289
10343
  }
10290
10344
  };
10291
10345
  const handleHyperlinkClick = (url) => {
10292
- if (chunkWK56SFN7_js.isPpactionUrl(url)) {
10346
+ if (chunkLTEDT475_js.isPpactionUrl(url)) {
10293
10347
  if (mode === "present") {
10294
- const parsed = chunkWK56SFN7_js.parsePpactionUrl(url);
10348
+ const parsed = chunkLTEDT475_js.parsePpactionUrl(url);
10295
10349
  if (parsed) {
10296
10350
  presentation.handlePresentationAction({
10297
10351
  action: parsed.action,
@@ -10301,7 +10355,7 @@ function buildCanvasProps(input) {
10301
10355
  }
10302
10356
  return;
10303
10357
  }
10304
- chunkWK56SFN7_js.safeOpenUrl(url);
10358
+ chunkLTEDT475_js.safeOpenUrl(url);
10305
10359
  };
10306
10360
  return {
10307
10361
  activeSlide: effectiveSlide,
@@ -10621,7 +10675,7 @@ function buildToolbarProps(input) {
10621
10675
  onOpenFile,
10622
10676
  onOpenRecentFile,
10623
10677
  onCreatePresentation: (templateId) => {
10624
- s.setSlides(chunkWK56SFN7_js.createBackstagePresentation(templateId));
10678
+ s.setSlides(chunkLTEDT475_js.createBackstagePresentation(templateId));
10625
10679
  s.setActiveSlideIndex(0);
10626
10680
  s.setSelectedElementId(null);
10627
10681
  s.setSelectedElementIds([]);
@@ -10676,7 +10730,7 @@ function buildToolbarProps(input) {
10676
10730
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10677
10731
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10678
10732
  formatPainterActive: s.formatPainterActive,
10679
- canActivateFormatPainter: chunkWK56SFN7_js.hasCopyableFormat(selectedElement),
10733
+ canActivateFormatPainter: chunkLTEDT475_js.hasCopyableFormat(selectedElement),
10680
10734
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10681
10735
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10682
10736
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
@@ -10939,7 +10993,7 @@ function useViewerBuildingBlocks(input) {
10939
10993
  }, [incomingContent]);
10940
10994
  const onOpenFile = react.useCallback(() => {
10941
10995
  void (async () => {
10942
- const picked = await chunkWK56SFN7_js.openPptxFile();
10996
+ const picked = await chunkLTEDT475_js.openPptxFile();
10943
10997
  if (picked) {
10944
10998
  setContent(picked.buffer);
10945
10999
  }
@@ -10947,7 +11001,7 @@ function useViewerBuildingBlocks(input) {
10947
11001
  }, []);
10948
11002
  const onOpenRecentFile = react.useCallback((key) => {
10949
11003
  void (async () => {
10950
- const bytes = await chunkWK56SFN7_js.readBackstageRecentFile(key);
11004
+ const bytes = await chunkLTEDT475_js.readBackstageRecentFile(key);
10951
11005
  if (bytes) {
10952
11006
  setContent(bytes);
10953
11007
  }