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