pptx-react-viewer 2.11.0 → 2.11.1

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 (117) hide show
  1. package/CHANGELOG.md +2 -0
  2. package/dist/{AiChatPanel-PJPSDMN4.js → AiChatPanel-E6W3EACA.js} +23 -23
  3. package/dist/AiChatPanel-E6W3EACA.js.br +0 -0
  4. package/dist/AiChatPanel-E6W3EACA.js.gz +0 -0
  5. package/dist/{AiChatPanel-EX2TBRJM.mjs → AiChatPanel-RMQIJDUJ.mjs} +4 -4
  6. package/dist/AiChatPanel-RMQIJDUJ.mjs.br +0 -0
  7. package/dist/AiChatPanel-RMQIJDUJ.mjs.gz +0 -0
  8. package/dist/{Model3DScene-UCBPTEAY.js → Model3DScene-U4B4NZJT.js} +2 -2
  9. package/dist/Model3DScene-U4B4NZJT.js.br +0 -0
  10. package/dist/Model3DScene-U4B4NZJT.js.gz +0 -0
  11. package/dist/{Model3DScene-TTQFV7OS.mjs → Model3DScene-WHSHBMR5.mjs} +1 -1
  12. package/dist/Model3DScene-WHSHBMR5.mjs.br +0 -0
  13. package/dist/Model3DScene-WHSHBMR5.mjs.gz +0 -0
  14. package/dist/{SurfaceChart3DScene-ADKCYYOQ.js → SurfaceChart3DScene-5S43UBRD.js} +2 -2
  15. package/dist/SurfaceChart3DScene-5S43UBRD.js.br +0 -0
  16. package/dist/SurfaceChart3DScene-5S43UBRD.js.gz +0 -0
  17. package/dist/{SurfaceChart3DScene-5SZCRHZI.mjs → SurfaceChart3DScene-77JP5XH5.mjs} +1 -1
  18. package/dist/{SurfaceChart3DScene-5SZCRHZI.mjs.br → SurfaceChart3DScene-77JP5XH5.mjs.br} +0 -0
  19. package/dist/SurfaceChart3DScene-77JP5XH5.mjs.gz +0 -0
  20. package/dist/{chunk-RJEY2KZH.mjs → chunk-DD54KUDG.mjs} +3 -3
  21. package/dist/chunk-DD54KUDG.mjs.br +0 -0
  22. package/dist/chunk-DD54KUDG.mjs.gz +0 -0
  23. package/dist/{chunk-MM5RMRSP.js → chunk-FAP6OPLL.js} +250 -250
  24. package/dist/chunk-FAP6OPLL.js.br +0 -0
  25. package/dist/chunk-FAP6OPLL.js.gz +0 -0
  26. package/dist/{chunk-C2UWTH42.mjs → chunk-FV7HEYCX.mjs} +211 -3
  27. package/dist/chunk-FV7HEYCX.mjs.br +0 -0
  28. package/dist/{chunk-C2UWTH42.mjs.gz → chunk-FV7HEYCX.mjs.gz} +0 -0
  29. package/dist/{chunk-UZVRM6LD.mjs → chunk-HF6L2CTF.mjs} +1 -1
  30. package/dist/chunk-HF6L2CTF.mjs.br +0 -0
  31. package/dist/chunk-HF6L2CTF.mjs.gz +0 -0
  32. package/dist/{chunk-N6IHR6PS.js → chunk-IOVOQ6ZJ.js} +89 -1
  33. package/dist/chunk-IOVOQ6ZJ.js.br +0 -0
  34. package/dist/{chunk-N6IHR6PS.js.gz → chunk-IOVOQ6ZJ.js.gz} +0 -0
  35. package/dist/{chunk-E367QIKR.js → chunk-IXBM3HWH.js} +1109 -1070
  36. package/dist/chunk-IXBM3HWH.js.br +0 -0
  37. package/dist/chunk-IXBM3HWH.js.gz +0 -0
  38. package/dist/{chunk-HMQVOPQH.js → chunk-KDJBWJJH.js} +222 -2
  39. package/dist/chunk-KDJBWJJH.js.br +0 -0
  40. package/dist/{chunk-HMQVOPQH.js.gz → chunk-KDJBWJJH.js.gz} +0 -0
  41. package/dist/{chunk-HK2UERUX.mjs → chunk-NJ4PTG4F.mjs} +30 -28
  42. package/dist/chunk-NJ4PTG4F.mjs.br +0 -0
  43. package/dist/chunk-NJ4PTG4F.mjs.gz +0 -0
  44. package/dist/{chunk-L2CM5EUD.mjs → chunk-PXYZFWDA.mjs} +142 -103
  45. package/dist/chunk-PXYZFWDA.mjs.br +0 -0
  46. package/dist/chunk-PXYZFWDA.mjs.gz +0 -0
  47. package/dist/{chunk-4J7SPY64.js → chunk-QT6BPOZM.js} +352 -350
  48. package/dist/chunk-QT6BPOZM.js.br +0 -0
  49. package/dist/chunk-QT6BPOZM.js.gz +0 -0
  50. package/dist/{chunk-53NXKDMZ.mjs → chunk-RHR7GTDX.mjs} +89 -1
  51. package/dist/chunk-RHR7GTDX.mjs.br +0 -0
  52. package/dist/{chunk-53NXKDMZ.mjs.gz → chunk-RHR7GTDX.mjs.gz} +0 -0
  53. package/dist/{chunk-VNP627O5.js → chunk-X3SFCKAF.js} +3 -3
  54. package/dist/chunk-X3SFCKAF.js.br +0 -0
  55. package/dist/chunk-X3SFCKAF.js.gz +0 -0
  56. package/dist/i18n.js +4 -4
  57. package/dist/i18n.js.br +0 -0
  58. package/dist/i18n.js.gz +0 -0
  59. package/dist/i18n.mjs +1 -1
  60. package/dist/i18n.mjs.br +0 -0
  61. package/dist/i18n.mjs.gz +0 -0
  62. package/dist/index.d.ts +4 -0
  63. package/dist/index.js +36 -36
  64. package/dist/index.js.br +0 -0
  65. package/dist/index.js.gz +0 -0
  66. package/dist/index.mjs +6 -6
  67. package/dist/index.mjs.br +0 -0
  68. package/dist/index.mjs.gz +0 -0
  69. package/dist/internals.d.ts +12 -1
  70. package/dist/internals.d.ts.map +1 -1
  71. package/dist/internals.js +79 -79
  72. package/dist/internals.js.br +0 -0
  73. package/dist/internals.js.gz +0 -0
  74. package/dist/internals.mjs +4 -4
  75. package/dist/internals.mjs.br +0 -0
  76. package/dist/internals.mjs.gz +0 -0
  77. package/dist/{useViewerBuildingBlocks-Rqxm0pRS.d.ts → useViewerBuildingBlocks-YvCYsxa3.d.ts} +5 -1
  78. package/dist/useViewerBuildingBlocks-YvCYsxa3.d.ts.map +1 -0
  79. package/dist/viewer/index.js +22 -22
  80. package/dist/viewer/index.js.br +0 -0
  81. package/dist/viewer/index.js.gz +0 -0
  82. package/dist/viewer/index.mjs +6 -6
  83. package/dist/viewer/index.mjs.br +0 -0
  84. package/dist/viewer/index.mjs.gz +0 -0
  85. package/package.json +1 -1
  86. package/dist/AiChatPanel-EX2TBRJM.mjs.br +0 -0
  87. package/dist/AiChatPanel-EX2TBRJM.mjs.gz +0 -0
  88. package/dist/AiChatPanel-PJPSDMN4.js.br +0 -0
  89. package/dist/AiChatPanel-PJPSDMN4.js.gz +0 -0
  90. package/dist/Model3DScene-TTQFV7OS.mjs.br +0 -0
  91. package/dist/Model3DScene-TTQFV7OS.mjs.gz +0 -0
  92. package/dist/Model3DScene-UCBPTEAY.js.br +0 -0
  93. package/dist/Model3DScene-UCBPTEAY.js.gz +0 -0
  94. package/dist/SurfaceChart3DScene-5SZCRHZI.mjs.gz +0 -0
  95. package/dist/SurfaceChart3DScene-ADKCYYOQ.js.br +0 -0
  96. package/dist/SurfaceChart3DScene-ADKCYYOQ.js.gz +0 -0
  97. package/dist/chunk-4J7SPY64.js.br +0 -0
  98. package/dist/chunk-4J7SPY64.js.gz +0 -0
  99. package/dist/chunk-53NXKDMZ.mjs.br +0 -0
  100. package/dist/chunk-C2UWTH42.mjs.br +0 -0
  101. package/dist/chunk-E367QIKR.js.br +0 -0
  102. package/dist/chunk-E367QIKR.js.gz +0 -0
  103. package/dist/chunk-HK2UERUX.mjs.br +0 -0
  104. package/dist/chunk-HK2UERUX.mjs.gz +0 -0
  105. package/dist/chunk-HMQVOPQH.js.br +0 -0
  106. package/dist/chunk-L2CM5EUD.mjs.br +0 -0
  107. package/dist/chunk-L2CM5EUD.mjs.gz +0 -0
  108. package/dist/chunk-MM5RMRSP.js.br +0 -0
  109. package/dist/chunk-MM5RMRSP.js.gz +0 -0
  110. package/dist/chunk-N6IHR6PS.js.br +0 -0
  111. package/dist/chunk-RJEY2KZH.mjs.br +0 -0
  112. package/dist/chunk-RJEY2KZH.mjs.gz +0 -0
  113. package/dist/chunk-UZVRM6LD.mjs.br +0 -0
  114. package/dist/chunk-UZVRM6LD.mjs.gz +0 -0
  115. package/dist/chunk-VNP627O5.js.br +0 -0
  116. package/dist/chunk-VNP627O5.js.gz +0 -0
  117. package/dist/useViewerBuildingBlocks-Rqxm0pRS.d.ts.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var chunkMM5RMRSP_js = require('./chunk-MM5RMRSP.js');
4
- var chunkN6IHR6PS_js = require('./chunk-N6IHR6PS.js');
5
- var chunkHMQVOPQH_js = require('./chunk-HMQVOPQH.js');
3
+ var chunkFAP6OPLL_js = require('./chunk-FAP6OPLL.js');
4
+ var chunkIOVOQ6ZJ_js = require('./chunk-IOVOQ6ZJ.js');
5
+ var chunkKDJBWJJH_js = require('./chunk-KDJBWJJH.js');
6
6
  var react = require('react');
7
7
  var JSZip = require('jszip');
8
8
  var reactI18next = require('react-i18next');
@@ -14,7 +14,7 @@ var JSZip__default = /*#__PURE__*/_interopDefault(JSZip);
14
14
  function useVirtualizedSlides({
15
15
  totalItems,
16
16
  itemHeight,
17
- overscan = chunkHMQVOPQH_js.DEFAULT_VIRTUAL_OVERSCAN
17
+ overscan = chunkKDJBWJJH_js.DEFAULT_VIRTUAL_OVERSCAN
18
18
  }) {
19
19
  const scrollContainerRef = react.useRef(null);
20
20
  const [scrollTop, setScrollTop] = react.useState(0);
@@ -44,7 +44,7 @@ function useVirtualizedSlides({
44
44
  resizeObserver?.disconnect();
45
45
  };
46
46
  }, []);
47
- const range = chunkHMQVOPQH_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
47
+ const range = chunkKDJBWJJH_js.computeVirtualRange(totalItems, itemHeight, scrollTop, viewportHeight, overscan);
48
48
  const safeItemHeight = Math.max(itemHeight, 1);
49
49
  const scrollToIndex = react.useCallback(
50
50
  (index, behavior = "smooth") => {
@@ -107,7 +107,7 @@ function usePresenceTracking({
107
107
  awareness.setLocalStateField("presence", state);
108
108
  lastBroadcastRef.current = Date.now();
109
109
  };
110
- if (elapsed >= chunkHMQVOPQH_js.BROADCAST_THROTTLE_MS) {
110
+ if (elapsed >= chunkKDJBWJJH_js.BROADCAST_THROTTLE_MS) {
111
111
  if (pendingBroadcastRef.current) {
112
112
  clearTimeout(pendingBroadcastRef.current);
113
113
  pendingBroadcastRef.current = null;
@@ -117,7 +117,7 @@ function usePresenceTracking({
117
117
  pendingBroadcastRef.current = setTimeout(() => {
118
118
  pendingBroadcastRef.current = null;
119
119
  flush();
120
- }, chunkHMQVOPQH_js.BROADCAST_THROTTLE_MS - elapsed);
120
+ }, chunkKDJBWJJH_js.BROADCAST_THROTTLE_MS - elapsed);
121
121
  }
122
122
  },
123
123
  [awareness, userName, userColor, userAvatar, role]
@@ -142,7 +142,7 @@ function usePresenceTracking({
142
142
  return;
143
143
  }
144
144
  const handleChange = () => {
145
- const users = chunkHMQVOPQH_js.derivePresenceList(
145
+ const users = chunkKDJBWJJH_js.derivePresenceList(
146
146
  awareness.getStates(),
147
147
  localClientId,
148
148
  canvasWidth,
@@ -194,7 +194,7 @@ function useYjsProvider({ config }) {
194
194
  const departureRef = react.useRef(null);
195
195
  const gateRef = react.useRef(null);
196
196
  if (!gateRef.current) {
197
- gateRef.current = chunkHMQVOPQH_js.createSyncGate(() => setSynced(true));
197
+ gateRef.current = chunkKDJBWJJH_js.createSyncGate(() => setSynced(true));
198
198
  }
199
199
  const teardown = react.useCallback(() => {
200
200
  if (timeoutRef.current) {
@@ -214,7 +214,7 @@ function useYjsProvider({ config }) {
214
214
  const buildCleanup = react.useCallback(
215
215
  (provider, yDoc) => () => {
216
216
  announceDeparture();
217
- chunkHMQVOPQH_js.clearLocalAwareness(provider.awareness);
217
+ chunkKDJBWJJH_js.clearLocalAwareness(provider.awareness);
218
218
  provider.destroy();
219
219
  yDoc.destroy();
220
220
  setDoc(null);
@@ -239,9 +239,9 @@ function useYjsProvider({ config }) {
239
239
  if (config.authToken) {
240
240
  opts.password = config.authToken;
241
241
  }
242
- const roomId = chunkHMQVOPQH_js.validateRoomId(config.roomId);
242
+ const roomId = chunkKDJBWJJH_js.validateRoomId(config.roomId);
243
243
  const provider = new WebrtcProvider(roomId, yDoc, opts);
244
- departureRef.current = chunkHMQVOPQH_js.createDepartureChannel(roomId, provider.awareness);
244
+ departureRef.current = chunkKDJBWJJH_js.createDepartureChannel(roomId, provider.awareness);
245
245
  setDoc(yDoc);
246
246
  setAwareness(provider.awareness);
247
247
  setClientId(provider.awareness.clientID);
@@ -283,13 +283,13 @@ function useYjsProvider({ config }) {
283
283
  if (!config) {
284
284
  return;
285
285
  }
286
- const roomId = chunkHMQVOPQH_js.validateRoomId(config.roomId);
287
- const transport = config.transport ?? chunkHMQVOPQH_js.resolveTransportForServerUrl(config.serverUrl);
286
+ const roomId = chunkKDJBWJJH_js.validateRoomId(config.roomId);
287
+ const transport = config.transport ?? chunkKDJBWJJH_js.resolveTransportForServerUrl(config.serverUrl);
288
288
  if (transport === "webrtc") {
289
289
  await initWebrtc();
290
290
  return;
291
291
  }
292
- if (chunkHMQVOPQH_js.isMixedContentBlocked(config.serverUrl)) {
292
+ if (chunkKDJBWJJH_js.isMixedContentBlocked(config.serverUrl)) {
293
293
  console.warn(
294
294
  `[pptx-viewer] Refusing to connect: insecure ws:// server "${config.serverUrl}" is blocked from a secure (https) page. Use a wss:// URL.`
295
295
  );
@@ -303,7 +303,7 @@ function useYjsProvider({ config }) {
303
303
  const provider = new WebsocketProvider(config.serverUrl, roomId, yDoc, {
304
304
  params: config.authToken ? { token: config.authToken } : void 0
305
305
  });
306
- departureRef.current = chunkHMQVOPQH_js.createDepartureChannel(roomId, provider.awareness);
306
+ departureRef.current = chunkKDJBWJJH_js.createDepartureChannel(roomId, provider.awareness);
307
307
  let connected = false;
308
308
  const handleStatus = (event) => {
309
309
  if (event.status === "connected") {
@@ -343,7 +343,7 @@ function useYjsProvider({ config }) {
343
343
  provider.off("status", handleStatus);
344
344
  provider.off("sync", handleSynced);
345
345
  announceDeparture();
346
- chunkHMQVOPQH_js.clearLocalAwareness(provider.awareness);
346
+ chunkKDJBWJJH_js.clearLocalAwareness(provider.awareness);
347
347
  provider.destroy();
348
348
  yDoc.destroy();
349
349
  setDoc(null);
@@ -352,7 +352,7 @@ function useYjsProvider({ config }) {
352
352
  cleanupRef.current = null;
353
353
  setStatus("error");
354
354
  }
355
- }, chunkHMQVOPQH_js.CONNECTION_TIMEOUT_MS);
355
+ }, chunkKDJBWJJH_js.CONNECTION_TIMEOUT_MS);
356
356
  }
357
357
  setDoc(yDoc);
358
358
  setAwareness(provider.awareness);
@@ -361,7 +361,7 @@ function useYjsProvider({ config }) {
361
361
  provider.off("status", handleStatus);
362
362
  provider.off("sync", handleSynced);
363
363
  announceDeparture();
364
- chunkHMQVOPQH_js.clearLocalAwareness(provider.awareness);
364
+ chunkKDJBWJJH_js.clearLocalAwareness(provider.awareness);
365
365
  provider.destroy();
366
366
  yDoc.destroy();
367
367
  setDoc(null);
@@ -387,7 +387,7 @@ function useYjsProvider({ config }) {
387
387
  ]);
388
388
  react.useEffect(() => {
389
389
  init();
390
- const disposeTeardown = chunkHMQVOPQH_js.registerCollaborationTeardown({
390
+ const disposeTeardown = chunkKDJBWJJH_js.registerCollaborationTeardown({
391
391
  leave: teardown,
392
392
  rejoin: init
393
393
  });
@@ -408,7 +408,7 @@ function useCollaborativeState({
408
408
  canvasWidth,
409
409
  canvasHeight
410
410
  }) {
411
- const userColor = chunkHMQVOPQH_js.sanitizeColor(config?.userColor, "#6366f1");
411
+ const userColor = chunkKDJBWJJH_js.sanitizeColor(config?.userColor, "#6366f1");
412
412
  const { status, awareness, doc, clientId, synced, retry } = useYjsProvider({ config });
413
413
  const { remoteUsers, broadcastPresence } = usePresenceTracking({
414
414
  awareness,
@@ -517,8 +517,8 @@ function useEditorHistory(input) {
517
517
  width: canvasSize.width,
518
518
  height: canvasSize.height,
519
519
  activeSlideIndex,
520
- slides: slides.map(chunkHMQVOPQH_js.cloneSlide),
521
- templateElementsBySlideId: chunkHMQVOPQH_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
520
+ slides: slides.map(chunkKDJBWJJH_js.cloneSlide),
521
+ templateElementsBySlideId: chunkKDJBWJJH_js.cloneTemplateElementsBySlideId(templateElementsBySlideId),
522
522
  ...actionLabel ? { actionLabel } : {}
523
523
  };
524
524
  },
@@ -531,9 +531,9 @@ function useEditorHistory(input) {
531
531
  width: snapshot.width,
532
532
  height: snapshot.height
533
533
  });
534
- setSlides(snapshot.slides.map(chunkHMQVOPQH_js.cloneSlide));
534
+ setSlides(snapshot.slides.map(chunkKDJBWJJH_js.cloneSlide));
535
535
  setTemplateElementsBySlideId(
536
- chunkHMQVOPQH_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
536
+ chunkKDJBWJJH_js.cloneTemplateElementsBySlideId(snapshot.templateElementsBySlideId)
537
537
  );
538
538
  setActiveSlideIndex(Math.min(snapshot.activeSlideIndex, maxSlideIndex));
539
539
  setSelectedElementIds([]);
@@ -567,8 +567,8 @@ function useEditorHistory(input) {
567
567
  const currentSnapshot = buildHistorySnapshot();
568
568
  historyFutureRef.current.push(currentSnapshot);
569
569
  isApplyingHistoryRef.current = true;
570
- const nextSnapshot = chunkMM5RMRSP_js.cloneHistorySnapshot(previousSnapshot);
571
- lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(nextSnapshot);
570
+ const nextSnapshot = chunkFAP6OPLL_js.cloneHistorySnapshot(previousSnapshot);
571
+ lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(nextSnapshot);
572
572
  lastHistorySerializedRef.current = JSON.stringify(nextSnapshot);
573
573
  applyHistorySnapshot(nextSnapshot);
574
574
  updateHistoryAvailability();
@@ -589,8 +589,8 @@ function useEditorHistory(input) {
589
589
  const currentSnapshot = buildHistorySnapshot();
590
590
  historyPastRef.current.push(currentSnapshot);
591
591
  isApplyingHistoryRef.current = true;
592
- const targetSnapshot = chunkMM5RMRSP_js.cloneHistorySnapshot(nextSnapshot);
593
- lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(targetSnapshot);
592
+ const targetSnapshot = chunkFAP6OPLL_js.cloneHistorySnapshot(nextSnapshot);
593
+ lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(targetSnapshot);
594
594
  lastHistorySerializedRef.current = JSON.stringify(targetSnapshot);
595
595
  applyHistorySnapshot(targetSnapshot);
596
596
  updateHistoryAvailability();
@@ -608,7 +608,7 @@ function useEditorHistory(input) {
608
608
  historyPastRef.current = [];
609
609
  historyFutureRef.current = [];
610
610
  if (initialSnapshot) {
611
- const clonedInitial = chunkMM5RMRSP_js.cloneHistorySnapshot(initialSnapshot);
611
+ const clonedInitial = chunkFAP6OPLL_js.cloneHistorySnapshot(initialSnapshot);
612
612
  lastHistorySnapshotRef.current = clonedInitial;
613
613
  lastHistorySerializedRef.current = JSON.stringify(clonedInitial);
614
614
  } else {
@@ -649,18 +649,18 @@ function useEditorHistory(input) {
649
649
  }
650
650
  const previousSnapshot = lastHistorySnapshotRef.current;
651
651
  if (!previousSnapshot) {
652
- lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(snapshot);
652
+ lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(snapshot);
653
653
  lastHistorySerializedRef.current = serialized;
654
654
  lastCheapHashRef.current = cheapHash;
655
655
  updateHistoryAvailability();
656
656
  return;
657
657
  }
658
- historyPastRef.current.push(chunkMM5RMRSP_js.cloneHistorySnapshot(previousSnapshot));
658
+ historyPastRef.current.push(chunkFAP6OPLL_js.cloneHistorySnapshot(previousSnapshot));
659
659
  while (historyPastRef.current.length > Math.max(1, maxHistoryEntries)) {
660
660
  historyPastRef.current.shift();
661
661
  }
662
662
  historyFutureRef.current = [];
663
- lastHistorySnapshotRef.current = chunkMM5RMRSP_js.cloneHistorySnapshot(snapshot);
663
+ lastHistorySnapshotRef.current = chunkFAP6OPLL_js.cloneHistorySnapshot(snapshot);
664
664
  lastHistorySerializedRef.current = serialized;
665
665
  lastCheapHashRef.current = cheapHash;
666
666
  updateHistoryAvailability();
@@ -749,7 +749,7 @@ function useZoomViewport({
749
749
  if (!wrapper || !canvasViewport) {
750
750
  return;
751
751
  }
752
- const boundedScale = chunkHMQVOPQH_js.clampZoomScale(nextScale);
752
+ const boundedScale = chunkKDJBWJJH_js.clampZoomScale(nextScale);
753
753
  const nextEditorScale = fitScale * boundedScale;
754
754
  const centerX = (bounds.minX + bounds.maxX) / 2;
755
755
  const centerY = (bounds.minY + bounds.maxY) / 2;
@@ -764,10 +764,10 @@ function useZoomViewport({
764
764
  [fitScale]
765
765
  );
766
766
  const handleZoomIn = react.useCallback(() => {
767
- setScale((currentScale) => chunkHMQVOPQH_js.zoomInScale(currentScale));
767
+ setScale((currentScale) => chunkKDJBWJJH_js.zoomInScale(currentScale));
768
768
  }, []);
769
769
  const handleZoomOut = react.useCallback(() => {
770
- setScale((currentScale) => chunkHMQVOPQH_js.zoomOutScale(currentScale));
770
+ setScale((currentScale) => chunkKDJBWJJH_js.zoomOutScale(currentScale));
771
771
  }, []);
772
772
  const handleResetZoom = react.useCallback(() => {
773
773
  setScale(1);
@@ -786,29 +786,29 @@ function useZoomViewport({
786
786
  selectedElements.forEach((element) => {
787
787
  minX = Math.min(minX, element.x);
788
788
  minY = Math.min(minY, element.y);
789
- maxX = Math.max(maxX, element.x + Math.max(element.width, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE));
790
- maxY = Math.max(maxY, element.y + Math.max(element.height, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE));
789
+ maxX = Math.max(maxX, element.x + Math.max(element.width, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE));
790
+ maxY = Math.max(maxY, element.y + Math.max(element.height, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE));
791
791
  });
792
792
  if (!Number.isFinite(minX) || !Number.isFinite(minY) || !Number.isFinite(maxX) || !Number.isFinite(maxY)) {
793
793
  return;
794
794
  }
795
795
  const selectionBounds = { minX, minY, maxX, maxY };
796
- const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE);
797
- const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE);
796
+ const boundsWidth = Math.max(selectionBounds.maxX - selectionBounds.minX, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE);
797
+ const boundsHeight = Math.max(selectionBounds.maxY - selectionBounds.minY, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE);
798
798
  const availableWidth = Math.max(
799
- effectiveEditorDimensions.width - chunkMM5RMRSP_js.ZOOM_TO_SELECTION_PADDING,
800
- chunkMM5RMRSP_js.MIN_ELEMENT_SIZE
799
+ effectiveEditorDimensions.width - chunkFAP6OPLL_js.ZOOM_TO_SELECTION_PADDING,
800
+ chunkFAP6OPLL_js.MIN_ELEMENT_SIZE
801
801
  );
802
802
  const availableHeight = Math.max(
803
- effectiveEditorDimensions.height - chunkMM5RMRSP_js.ZOOM_TO_SELECTION_PADDING,
804
- chunkMM5RMRSP_js.MIN_ELEMENT_SIZE
803
+ effectiveEditorDimensions.height - chunkFAP6OPLL_js.ZOOM_TO_SELECTION_PADDING,
804
+ chunkFAP6OPLL_js.MIN_ELEMENT_SIZE
805
805
  );
806
806
  const targetEditorScale = Math.min(
807
807
  availableWidth / boundsWidth,
808
808
  availableHeight / boundsHeight
809
809
  );
810
810
  const safeFitScale = fitScale > Number.EPSILON ? fitScale : Number.EPSILON;
811
- const nextScale = chunkHMQVOPQH_js.clampZoomScale(targetEditorScale / safeFitScale);
811
+ const nextScale = chunkKDJBWJJH_js.clampZoomScale(targetEditorScale / safeFitScale);
812
812
  setScale(nextScale);
813
813
  window.requestAnimationFrame(() => {
814
814
  window.requestAnimationFrame(() => {
@@ -828,7 +828,7 @@ function useZoomViewport({
828
828
  }
829
829
  event.preventDefault();
830
830
  const delta = event.deltaY * -1e-3;
831
- setScale((currentScale) => chunkHMQVOPQH_js.clampZoomScale(currentScale + delta));
831
+ setScale((currentScale) => chunkKDJBWJJH_js.clampZoomScale(currentScale + delta));
832
832
  }, []);
833
833
  react.useEffect(() => {
834
834
  const viewport = canvasViewportRef.current;
@@ -905,7 +905,7 @@ function applyAnimationGroupSteps(group, onPlayActionSound, setPresentationEleme
905
905
  const command = step.command;
906
906
  const timer = window.setTimeout(
907
907
  () => {
908
- chunkMM5RMRSP_js.executeMediaCommand(command);
908
+ chunkFAP6OPLL_js.executeMediaCommand(command);
909
909
  },
910
910
  Math.max(0, step.delayMs)
911
911
  );
@@ -1021,7 +1021,7 @@ function useAnimationPlayback(input) {
1021
1021
  (controller, group) => {
1022
1022
  driveBuildReveal(
1023
1023
  controller,
1024
- chunkHMQVOPQH_js.PresentationAnimationController.collectBuildStepIds(group),
1024
+ chunkKDJBWJJH_js.PresentationAnimationController.collectBuildStepIds(group),
1025
1025
  setPresentationElementStates,
1026
1026
  buildRafRef
1027
1027
  );
@@ -1084,7 +1084,7 @@ function useAnimationPlayback(input) {
1084
1084
  setHoverTriggerShapeIds(/* @__PURE__ */ new Set());
1085
1085
  return;
1086
1086
  }
1087
- const controller = chunkHMQVOPQH_js.PresentationAnimationController.fromSlide(slide);
1087
+ const controller = chunkKDJBWJJH_js.PresentationAnimationController.fromSlide(slide);
1088
1088
  controllerRef.current = controller;
1089
1089
  setPresentationKeyframesCss(controller.keyframesCss);
1090
1090
  setInteractiveTriggerShapeIds(controller.interactiveTriggerShapeIds);
@@ -1232,7 +1232,7 @@ function useAnimationPlayback(input) {
1232
1232
  }))
1233
1233
  );
1234
1234
  entranceAnimations.forEach((animation, animationIndex) => {
1235
- const delay = chunkHMQVOPQH_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1235
+ const delay = chunkKDJBWJJH_js.computeEntranceAnimationDelay(animation.delayMs, animationIndex);
1236
1236
  const timer = window.setTimeout(() => {
1237
1237
  setPresentationAnimations(
1238
1238
  (previousAnimations) => previousAnimations.map(
@@ -1269,12 +1269,12 @@ function useAnimationPlayback(input) {
1269
1269
  presentationTimersRef
1270
1270
  };
1271
1271
  }
1272
- var PRESENTER_CHANNEL_NAME = chunkHMQVOPQH_js.PRESENTATION_CHANNEL_NAME;
1273
- var AUDIENCE_HASH = chunkHMQVOPQH_js.PRESENTATION_HASH;
1274
- var PRESENTER_MSG_ORIGIN = chunkHMQVOPQH_js.PRESENTATION_MESSAGE_ORIGIN;
1275
- var AUDIENCE_NONCE_KEY = chunkHMQVOPQH_js.PRESENTATION_NONCE_KEY;
1272
+ var PRESENTER_CHANNEL_NAME = chunkKDJBWJJH_js.PRESENTATION_CHANNEL_NAME;
1273
+ var AUDIENCE_HASH = chunkKDJBWJJH_js.PRESENTATION_HASH;
1274
+ var PRESENTER_MSG_ORIGIN = chunkKDJBWJJH_js.PRESENTATION_MESSAGE_ORIGIN;
1275
+ var AUDIENCE_NONCE_KEY = chunkKDJBWJJH_js.PRESENTATION_NONCE_KEY;
1276
1276
  function generateSessionId() {
1277
- return chunkHMQVOPQH_js.createPresentationSessionId();
1277
+ return chunkKDJBWJJH_js.createPresentationSessionId();
1278
1278
  }
1279
1279
  function parseAudienceNonce() {
1280
1280
  const hash = window.location.hash;
@@ -1310,7 +1310,7 @@ function usePresenterWindow(input) {
1310
1310
  }, []);
1311
1311
  const swapDisplays = react.useCallback(async () => {
1312
1312
  const audience = audienceWindowRef.current;
1313
- return audience && !audience.closed ? chunkHMQVOPQH_js.swapPresentationWindows(window, audience) : false;
1313
+ return audience && !audience.closed ? chunkKDJBWJJH_js.swapPresentationWindows(window, audience) : false;
1314
1314
  }, []);
1315
1315
  const syncSlideToAudience = react.useCallback(
1316
1316
  (slideIndex) => {
@@ -1374,7 +1374,7 @@ function usePresenterWindow(input) {
1374
1374
  pollTimerRef.current = null;
1375
1375
  }
1376
1376
  if (closingSessionId) {
1377
- void chunkHMQVOPQH_js.clearAudienceContent(closingSessionId);
1377
+ void chunkKDJBWJJH_js.clearAudienceContent(closingSessionId);
1378
1378
  }
1379
1379
  }, [getChannel]);
1380
1380
  const openAudienceWindow = react.useCallback(() => {
@@ -1392,10 +1392,10 @@ function usePresenterWindow(input) {
1392
1392
  audienceWindowRef.current = blankWin;
1393
1393
  const sessionId = generateSessionId();
1394
1394
  sessionIdRef.current = sessionId;
1395
- const audienceUrl = chunkHMQVOPQH_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
- void chunkHMQVOPQH_js.resolveAudienceScreenPlacement(window).then((placement) => {
1395
+ const audienceUrl = chunkKDJBWJJH_js.buildPresentationAudienceUrl(window.location.href, sessionId);
1396
+ void chunkKDJBWJJH_js.resolveAudienceScreenPlacement(window).then((placement) => {
1397
1397
  if (placement && audienceWindowRef.current === blankWin && !blankWin.closed) {
1398
- chunkHMQVOPQH_js.placeAudienceWindow(blankWin, placement);
1398
+ chunkKDJBWJJH_js.placeAudienceWindow(blankWin, placement);
1399
1399
  }
1400
1400
  return void 0;
1401
1401
  });
@@ -1425,7 +1425,7 @@ function usePresenterWindow(input) {
1425
1425
  }
1426
1426
  };
1427
1427
  if (content) {
1428
- void chunkHMQVOPQH_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1428
+ void chunkKDJBWJJH_js.storeAudienceContent(content, sessionId).then(() => navigateOrClose(true)).catch(() => navigateOrClose(false));
1429
1429
  } else {
1430
1430
  navigateOrClose(true);
1431
1431
  }
@@ -1451,7 +1451,7 @@ function usePresenterWindow(input) {
1451
1451
  }
1452
1452
  const handleMessage = (event) => {
1453
1453
  const message = event.data;
1454
- if (chunkHMQVOPQH_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1454
+ if (chunkKDJBWJJH_js.isPresentationSessionMessage(message) && message.type === "audience-ready" && message.sessionId === sessionIdRef.current) {
1455
1455
  syncStateToAudience(snapshotRef.current);
1456
1456
  }
1457
1457
  };
@@ -1480,7 +1480,7 @@ function usePresenterWindow(input) {
1480
1480
  react.useEffect(() => {
1481
1481
  const handleBeforeUnload = () => {
1482
1482
  if (sessionIdRef.current) {
1483
- void chunkHMQVOPQH_js.clearAudienceContent(sessionIdRef.current);
1483
+ void chunkKDJBWJJH_js.clearAudienceContent(sessionIdRef.current);
1484
1484
  }
1485
1485
  };
1486
1486
  window.addEventListener("beforeunload", handleBeforeUnload);
@@ -1542,7 +1542,7 @@ function useAudienceMode(input) {
1542
1542
  }
1543
1543
  channel.onmessage = (event) => {
1544
1544
  const data = event.data;
1545
- if (!chunkHMQVOPQH_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1545
+ if (!chunkKDJBWJJH_js.isPresentationSessionMessage(data) || data.origin !== PRESENTER_MSG_ORIGIN) {
1546
1546
  return;
1547
1547
  }
1548
1548
  if (expectedSessionId && data.sessionId !== expectedSessionId) {
@@ -1558,16 +1558,16 @@ function useAudienceMode(input) {
1558
1558
  }
1559
1559
  if (data.type === "presenter-exit") {
1560
1560
  if (expectedSessionId) {
1561
- void chunkHMQVOPQH_js.clearAudienceContent(expectedSessionId);
1561
+ void chunkKDJBWJJH_js.clearAudienceContent(expectedSessionId);
1562
1562
  }
1563
- if (chunkHMQVOPQH_js.endAudienceDisplay(window)) {
1563
+ if (chunkKDJBWJJH_js.endAudienceDisplay(window)) {
1564
1564
  handlers.onPresenterEnded?.();
1565
1565
  }
1566
1566
  }
1567
1567
  };
1568
1568
  if (expectedSessionId) {
1569
1569
  channel.postMessage({
1570
- origin: chunkHMQVOPQH_js.PRESENTATION_MESSAGE_ORIGIN,
1570
+ origin: chunkKDJBWJJH_js.PRESENTATION_MESSAGE_ORIGIN,
1571
1571
  type: "audience-ready",
1572
1572
  sessionId: expectedSessionId
1573
1573
  });
@@ -1586,6 +1586,7 @@ function usePresentationKeyboard(input) {
1586
1586
  movePresentationSlide,
1587
1587
  navigateToSlide,
1588
1588
  slideCount,
1589
+ showSlideIndexes,
1589
1590
  onSetMode,
1590
1591
  onSetPointerTool,
1591
1592
  onEraseAnnotations,
@@ -1599,14 +1600,14 @@ function usePresentationKeyboard(input) {
1599
1600
  presentationSlideIndex,
1600
1601
  setShowRehearsalSummary
1601
1602
  } = input;
1602
- const keyBufferRef = react.useRef(chunkHMQVOPQH_js.createPresentationKeyBuffer());
1603
+ const keyBufferRef = react.useRef(chunkKDJBWJJH_js.createPresentationKeyBuffer());
1603
1604
  react.useEffect(() => {
1604
- if (mode !== "present" || !chunkHMQVOPQH_js.acceptsPresentationInput()) {
1605
- keyBufferRef.current = chunkHMQVOPQH_js.createPresentationKeyBuffer();
1605
+ if (mode !== "present" || !chunkKDJBWJJH_js.acceptsPresentationInput()) {
1606
+ keyBufferRef.current = chunkKDJBWJJH_js.createPresentationKeyBuffer();
1606
1607
  return;
1607
1608
  }
1608
1609
  const handleKeyDown = (event) => {
1609
- const mapped = chunkHMQVOPQH_js.mapPresentationKey(event, keyBufferRef.current);
1610
+ const mapped = chunkKDJBWJJH_js.mapPresentationKey(event, keyBufferRef.current);
1610
1611
  if (mapped.action === "none") {
1611
1612
  return;
1612
1613
  }
@@ -1625,12 +1626,16 @@ function usePresentationKeyboard(input) {
1625
1626
  case "previous":
1626
1627
  movePresentationSlide(-1);
1627
1628
  return;
1628
- case "first":
1629
- navigateToSlide(0);
1629
+ case "first": {
1630
+ const first = chunkKDJBWJJH_js.firstShowSlideIndex(showSlideIndexes);
1631
+ navigateToSlide(first ?? 0);
1630
1632
  return;
1631
- case "last":
1632
- navigateToSlide(Math.max(0, slideCount - 1));
1633
+ }
1634
+ case "last": {
1635
+ const last = chunkKDJBWJJH_js.lastShowSlideIndex(showSlideIndexes);
1636
+ navigateToSlide(last ?? Math.max(0, slideCount - 1));
1633
1637
  return;
1638
+ }
1634
1639
  case "goto": {
1635
1640
  const index = mapped.slideNumber - 1;
1636
1641
  if (index >= 0 && index < slideCount) {
@@ -1670,6 +1675,7 @@ function usePresentationKeyboard(input) {
1670
1675
  movePresentationSlide,
1671
1676
  navigateToSlide,
1672
1677
  slideCount,
1678
+ showSlideIndexes,
1673
1679
  onSetMode,
1674
1680
  onSetPointerTool,
1675
1681
  onEraseAnnotations,
@@ -1814,7 +1820,7 @@ function handlePresentationActionImpl(action, deps) {
1814
1820
  return;
1815
1821
  }
1816
1822
  if (action.url && !actionStr.includes("hlinksldjump")) {
1817
- if (chunkHMQVOPQH_js.isUrlSafe(action.url)) {
1823
+ if (chunkKDJBWJJH_js.isUrlSafe(action.url)) {
1818
1824
  window.open(action.url, "_blank", "noopener,noreferrer");
1819
1825
  }
1820
1826
  }
@@ -1824,7 +1830,7 @@ function handlePresentationActionImpl(action, deps) {
1824
1830
  function executeSlideTransition(nextSlideIndex, deps) {
1825
1831
  const incomingSlide = deps.slides[nextSlideIndex];
1826
1832
  const transition = incomingSlide?.transition;
1827
- const durationMs = deps.playTransition ? chunkHMQVOPQH_js.resolveTransitionDurationMs(transition) : 0;
1833
+ const durationMs = deps.playTransition ? chunkKDJBWJJH_js.resolveTransitionDurationMs(transition) : 0;
1828
1834
  deps.clearPresentationTimers();
1829
1835
  deps.setPresentationSlideIndex(nextSlideIndex);
1830
1836
  deps.onSetActiveSlideIndex(nextSlideIndex);
@@ -1883,7 +1889,7 @@ function useSlideNavigation(input) {
1883
1889
  });
1884
1890
  const scheduleAutoAdvanceForSlide = react.useCallback(
1885
1891
  (slideIndex) => {
1886
- const delayMs = chunkHMQVOPQH_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1892
+ const delayMs = chunkKDJBWJJH_js.resolveAutoAdvanceDelayMs(slides[slideIndex], { useTimings });
1887
1893
  if (delayMs === void 0) {
1888
1894
  return;
1889
1895
  }
@@ -1906,10 +1912,8 @@ function useSlideNavigation(input) {
1906
1912
  if (availableSlideIndexes.length === 0) {
1907
1913
  return;
1908
1914
  }
1909
- const currentVisiblePosition = availableSlideIndexes.indexOf(presentationSlideIndex);
1910
- const normalizedCurrentPosition = currentVisiblePosition >= 0 ? currentVisiblePosition : 0;
1911
- const nextPosition = normalizedCurrentPosition + direction;
1912
- if (rehearsing && direction === 1 && nextPosition >= availableSlideIndexes.length) {
1915
+ const pastLastSlide = direction === 1 && !chunkKDJBWJJH_js.hasShowSlideAfter(presentationSlideIndex, availableSlideIndexes);
1916
+ if (rehearsing && pastLastSlide) {
1913
1917
  recordCurrentSlideTime(presentationSlideIndex);
1914
1918
  try {
1915
1919
  if (document.fullscreenElement) {
@@ -1922,17 +1926,13 @@ function useSlideNavigation(input) {
1922
1926
  setShowRehearsalSummary(true);
1923
1927
  return;
1924
1928
  }
1925
- if (!loopContinuously && !rehearsing && direction === 1 && nextPosition >= availableSlideIndexes.length && onAdvancePastLastSlide) {
1929
+ if (!loopContinuously && !rehearsing && pastLastSlide && onAdvancePastLastSlide) {
1926
1930
  onAdvancePastLastSlide();
1927
1931
  return;
1928
1932
  }
1929
- let resolvedPosition;
1930
- if (loopContinuously && !rehearsing && direction === 1 && nextPosition >= availableSlideIndexes.length) {
1931
- resolvedPosition = 0;
1932
- } else {
1933
- resolvedPosition = Math.min(availableSlideIndexes.length - 1, Math.max(0, nextPosition));
1934
- }
1935
- const nextSlideIndex = availableSlideIndexes[resolvedPosition];
1933
+ const nextSlideIndex = direction === 1 ? chunkKDJBWJJH_js.nextShowSlideIndex(presentationSlideIndex, availableSlideIndexes, {
1934
+ loop: Boolean(loopContinuously) && !rehearsing
1935
+ }) : chunkKDJBWJJH_js.previousShowSlideIndex(presentationSlideIndex, availableSlideIndexes);
1936
1936
  if (nextSlideIndex === void 0 || nextSlideIndex === presentationSlideIndex) {
1937
1937
  return;
1938
1938
  }
@@ -2073,17 +2073,17 @@ function useZoomNavigation(input) {
2073
2073
  };
2074
2074
  }
2075
2075
  function usePresenterConsole(slideIndex) {
2076
- const timerRef = react.useRef(chunkHMQVOPQH_js.createPresenterTimer());
2077
- const [snapshot, setSnapshot] = react.useState(() => chunkHMQVOPQH_js.createInitialPresentationSnapshot(slideIndex));
2076
+ const timerRef = react.useRef(chunkKDJBWJJH_js.createPresenterTimer());
2077
+ const [snapshot, setSnapshot] = react.useState(() => chunkKDJBWJJH_js.createInitialPresentationSnapshot(slideIndex));
2078
2078
  const patch = react.useCallback((value) => {
2079
- setSnapshot((current) => chunkHMQVOPQH_js.mergePresentationSnapshot(current, value));
2079
+ setSnapshot((current) => chunkKDJBWJJH_js.mergePresentationSnapshot(current, value));
2080
2080
  }, []);
2081
2081
  react.useEffect(() => patch({ slideIndex }), [patch, slideIndex]);
2082
2082
  react.useEffect(() => {
2083
2083
  const timer = window.setInterval(() => {
2084
2084
  patch({
2085
2085
  paused: timerRef.current.paused,
2086
- elapsedMs: chunkHMQVOPQH_js.presenterElapsed(timerRef.current)
2086
+ elapsedMs: chunkKDJBWJJH_js.presenterElapsed(timerRef.current)
2087
2087
  });
2088
2088
  }, 1e3);
2089
2089
  return () => window.clearInterval(timer);
@@ -2093,19 +2093,19 @@ function usePresenterConsole(slideIndex) {
2093
2093
  applyAudienceSnapshot: setSnapshot,
2094
2094
  setBlackout: (blackout) => patch({ blackout }),
2095
2095
  toggleTimer: () => {
2096
- timerRef.current = chunkHMQVOPQH_js.togglePresenterTimer(timerRef.current);
2096
+ timerRef.current = chunkKDJBWJJH_js.togglePresenterTimer(timerRef.current);
2097
2097
  patch({
2098
2098
  paused: timerRef.current.paused,
2099
- elapsedMs: chunkHMQVOPQH_js.presenterElapsed(timerRef.current)
2099
+ elapsedMs: chunkKDJBWJJH_js.presenterElapsed(timerRef.current)
2100
2100
  });
2101
2101
  },
2102
2102
  resetTimer: () => {
2103
- timerRef.current = chunkHMQVOPQH_js.resetPresenterTimer();
2103
+ timerRef.current = chunkKDJBWJJH_js.resetPresenterTimer();
2104
2104
  patch({ paused: false, elapsedMs: 0 });
2105
2105
  },
2106
2106
  stepZoom: (direction) => setSnapshot(
2107
- (current) => chunkHMQVOPQH_js.mergePresentationSnapshot(current, {
2108
- zoom: chunkHMQVOPQH_js.stepPresenterZoom(
2107
+ (current) => chunkKDJBWJJH_js.mergePresentationSnapshot(current, {
2108
+ zoom: chunkKDJBWJJH_js.stepPresenterZoom(
2109
2109
  current.zoom ?? { scale: 1, originX: 0.5, originY: 0.5 },
2110
2110
  direction
2111
2111
  )
@@ -2226,7 +2226,7 @@ function usePresentationMode(input) {
2226
2226
  });
2227
2227
  const movePresentationSlide = react.useCallback(
2228
2228
  (direction, trigger = "explicit") => {
2229
- if (!chunkHMQVOPQH_js.acceptsPresentationInput()) {
2229
+ if (!chunkKDJBWJJH_js.acceptsPresentationInput()) {
2230
2230
  return;
2231
2231
  }
2232
2232
  if (endOfShowVisible) {
@@ -2331,6 +2331,7 @@ function usePresentationMode(input) {
2331
2331
  movePresentationSlide,
2332
2332
  navigateToSlide,
2333
2333
  slideCount: slides.length,
2334
+ showSlideIndexes: visibleSlideIndexes,
2334
2335
  onSetMode,
2335
2336
  onSetPointerTool,
2336
2337
  onEraseAnnotations,
@@ -2428,11 +2429,11 @@ function usePresentationMode(input) {
2428
2429
  if (!transitionOverlay || transitionOverlay.transition.type !== "morph") {
2429
2430
  return void 0;
2430
2431
  }
2431
- return chunkHMQVOPQH_js.buildMorphTransitionPlan(
2432
+ return chunkKDJBWJJH_js.buildMorphTransitionPlan(
2432
2433
  slides[transitionOverlay.outgoingSlideIndex],
2433
2434
  slides[transitionOverlay.incomingSlideIndex],
2434
2435
  transitionOverlay.durationMs,
2435
- chunkHMQVOPQH_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2436
+ chunkKDJBWJJH_js.morphOptionToMode(transitionOverlay.transition.morphOption)
2436
2437
  );
2437
2438
  }, [transitionOverlay, slides]);
2438
2439
  const morphedElementStates = react.useMemo(() => {
@@ -2738,7 +2739,7 @@ function findInSlides(slides, findQuery, findMatchCase) {
2738
2739
  const normalised = findMatchCase ? findQuery : findQuery.toLowerCase();
2739
2740
  slides.forEach((slide, slideIndex) => {
2740
2741
  for (const element of slide.elements || []) {
2741
- if (!chunkHMQVOPQH_js.hasTextProperties(element)) {
2742
+ if (!chunkKDJBWJJH_js.hasTextProperties(element)) {
2742
2743
  continue;
2743
2744
  }
2744
2745
  const segments = element.textSegments ?? [];
@@ -2789,7 +2790,7 @@ function applyFindReplacements(slides, toReplace, replaceQuery) {
2789
2790
  continue;
2790
2791
  }
2791
2792
  const element = slide.elements[elIdx];
2792
- if (!chunkHMQVOPQH_js.hasTextProperties(element)) {
2793
+ if (!chunkKDJBWJJH_js.hasTextProperties(element)) {
2793
2794
  continue;
2794
2795
  }
2795
2796
  const segments = [...element.textSegments ?? []];
@@ -3387,7 +3388,7 @@ function useViewerCoreState(_input) {
3387
3388
  const shapeAdjustmentDragStateRef = react.useRef(null);
3388
3389
  const marqueeStateRef = react.useRef(null);
3389
3390
  const isDrawingRef = react.useRef(false);
3390
- const livePatcher = react.useMemo(() => chunkHMQVOPQH_js.createCollaborationLivePatcher(), []);
3391
+ const livePatcher = react.useMemo(() => chunkKDJBWJJH_js.createCollaborationLivePatcher(), []);
3391
3392
  react.useEffect(() => () => livePatcher.dispose(), [livePatcher]);
3392
3393
  const slidesRef = react.useRef([]);
3393
3394
  const [mode, setMode] = react.useState("edit");
@@ -3396,8 +3397,8 @@ function useViewerCoreState(_input) {
3396
3397
  const [slides, setSlides] = react.useState([]);
3397
3398
  const [templateElementsBySlideId, setTemplateElementsBySlideId] = react.useState({});
3398
3399
  const [canvasSize, setCanvasSize] = react.useState({
3399
- width: chunkMM5RMRSP_js.DEFAULT_CANVAS_WIDTH,
3400
- height: chunkMM5RMRSP_js.DEFAULT_CANVAS_HEIGHT
3400
+ width: chunkFAP6OPLL_js.DEFAULT_CANVAS_WIDTH,
3401
+ height: chunkFAP6OPLL_js.DEFAULT_CANVAS_HEIGHT
3401
3402
  });
3402
3403
  const [activeSlideIndex, setActiveSlideIndex] = react.useState(0);
3403
3404
  const [selectedElementId, setSelectedElementId] = react.useState(null);
@@ -3417,7 +3418,7 @@ function useViewerCoreState(_input) {
3417
3418
  const resolved = typeof value === "function" ? value(inlineEditingTextRef.current) : value;
3418
3419
  inlineEditingTextRef.current = resolved;
3419
3420
  setInlineEditingTextBase(value);
3420
- chunkHMQVOPQH_js.publishLiveInlineText(
3421
+ chunkKDJBWJJH_js.publishLiveInlineText(
3421
3422
  livePatcher,
3422
3423
  slidesRef.current[activeSlideIndexRef.current],
3423
3424
  inlineEditingElementIdRef.current,
@@ -3751,7 +3752,7 @@ function useLoadContent({
3751
3752
  );
3752
3753
  }
3753
3754
  const previousHandler = handlerRef.current;
3754
- const handler = new chunkHMQVOPQH_js.PptxHandler();
3755
+ const handler = new chunkKDJBWJJH_js.PptxHandler();
3755
3756
  const parsed = await handler.load(buffer);
3756
3757
  if (cancelled || token !== renderTokenRef.current) {
3757
3758
  handler.dispose();
@@ -3763,7 +3764,7 @@ function useLoadContent({
3763
3764
  handlerRef.current = null;
3764
3765
  const mediaElements = [];
3765
3766
  for (const slide of parsed.slides) {
3766
- chunkHMQVOPQH_js.collectMediaElements(slide.elements, mediaElements);
3767
+ chunkKDJBWJJH_js.collectMediaElements(slide.elements, mediaElements);
3767
3768
  }
3768
3769
  for (const url of mediaDataUrls.values()) {
3769
3770
  if (url.startsWith("blob:")) {
@@ -3804,7 +3805,7 @@ function useLoadContent({
3804
3805
  }
3805
3806
  })
3806
3807
  );
3807
- const { paths: imagePaths, refs: imageRefs } = chunkHMQVOPQH_js.collectImagePaths(parsed.slides);
3808
+ const { paths: imagePaths, refs: imageRefs } = chunkKDJBWJJH_js.collectImagePaths(parsed.slides);
3808
3809
  let nextSlides = parsed.slides;
3809
3810
  if (imagePaths.size > 0) {
3810
3811
  const resolvedMap = /* @__PURE__ */ new Map();
@@ -3859,12 +3860,12 @@ function useLoadContent({
3859
3860
  }
3860
3861
  }
3861
3862
  handlerRef.current = handler;
3862
- const partition = chunkMM5RMRSP_js.partitionTemplateElements(nextSlides);
3863
+ const partition = chunkFAP6OPLL_js.partitionTemplateElements(nextSlides);
3863
3864
  setSlides(partition.slides);
3864
3865
  setTemplateElementsBySlideId(partition.templateElementsBySlideId);
3865
3866
  setCanvasSize({
3866
- width: parsed.width ?? chunkMM5RMRSP_js.DEFAULT_CANVAS_WIDTH,
3867
- height: parsed.height ?? chunkMM5RMRSP_js.DEFAULT_CANVAS_HEIGHT
3867
+ width: parsed.width ?? chunkFAP6OPLL_js.DEFAULT_CANVAS_WIDTH,
3868
+ height: parsed.height ?? chunkFAP6OPLL_js.DEFAULT_CANVAS_HEIGHT
3868
3869
  });
3869
3870
  setHeaderFooter(parsed.headerFooter ?? {});
3870
3871
  setLayoutOptions(parsed.layoutOptions ?? []);
@@ -3893,7 +3894,7 @@ function useLoadContent({
3893
3894
  setHasMacros(parsed.hasMacros === true);
3894
3895
  setHasDigitalSignatures(parsed.hasDigitalSignatures === true);
3895
3896
  setDigitalSignatureCount(parsed.digitalSignatureCount ?? 0);
3896
- setGuides(chunkHMQVOPQH_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3897
+ setGuides(chunkKDJBWJJH_js.buildInitialGuides(parsed.presentationGuides, parsed.slides[0]?.guides));
3897
3898
  setActiveSlideIndex(0);
3898
3899
  clearSelection();
3899
3900
  setIsDirty(false);
@@ -3901,7 +3902,7 @@ function useLoadContent({
3901
3902
  onContentApplied?.();
3902
3903
  } catch (err) {
3903
3904
  if (!cancelled && token === renderTokenRef.current) {
3904
- if (err instanceof chunkHMQVOPQH_js.EncryptedFileError) {
3905
+ if (err instanceof chunkKDJBWJJH_js.EncryptedFileError) {
3905
3906
  setIsEncrypted(true);
3906
3907
  } else {
3907
3908
  setError(err instanceof Error ? err.message : String(err));
@@ -3978,7 +3979,7 @@ function useAutosave(input) {
3978
3979
  isSavingRef.current = false;
3979
3980
  return;
3980
3981
  }
3981
- await chunkHMQVOPQH_js.saveAutosaveSnapshot(filePathRef.current, data);
3982
+ await chunkKDJBWJJH_js.saveAutosaveSnapshot(filePathRef.current, data);
3982
3983
  setAutosaveStatus({ state: "saved", timestamp: Date.now() });
3983
3984
  } catch (err) {
3984
3985
  setAutosaveStatus({
@@ -4043,7 +4044,7 @@ function useElementOperations(input) {
4043
4044
  }, [applySelection, setInlineEditingElementId, setContextMenuState]);
4044
4045
  const updateElementById = react.useCallback(
4045
4046
  (elementId, updates) => {
4046
- if (chunkHMQVOPQH_js.isTemplateElementId(elementId)) {
4047
+ if (chunkKDJBWJJH_js.isTemplateElementId(elementId)) {
4047
4048
  const slideId = activeSlide?.id;
4048
4049
  if (slideId) {
4049
4050
  setTemplateElementsBySlideId((prev) => ({
@@ -4083,7 +4084,7 @@ function useElementOperations(input) {
4083
4084
  );
4084
4085
  const updateSelectedShapeStyle = react.useCallback(
4085
4086
  (updates) => {
4086
- if (!selectedElement || !chunkHMQVOPQH_js.hasShapeProperties(selectedElement)) {
4087
+ if (!selectedElement || !chunkKDJBWJJH_js.hasShapeProperties(selectedElement)) {
4087
4088
  return;
4088
4089
  }
4089
4090
  updateSelectedElement({
@@ -4094,17 +4095,17 @@ function useElementOperations(input) {
4094
4095
  );
4095
4096
  const updateSelectedTextStyle = react.useCallback(
4096
4097
  (updates) => {
4097
- if (!selectedElement || !chunkHMQVOPQH_js.hasTextProperties(selectedElement)) {
4098
+ if (!selectedElement || !chunkKDJBWJJH_js.hasTextProperties(selectedElement)) {
4098
4099
  return;
4099
4100
  }
4100
- const inlineSel = chunkHMQVOPQH_js.getInlineEditorSelection(selectedElement.textSegments);
4101
+ const inlineSel = chunkKDJBWJJH_js.getInlineEditorSelection(selectedElement.textSegments);
4101
4102
  if (inlineSel && selectedElement.textSegments) {
4102
- const { newSegments: newSegments2, newSelection } = chunkHMQVOPQH_js.applyStyleToSelectedSegments(
4103
+ const { newSegments: newSegments2, newSelection } = chunkKDJBWJJH_js.applyStyleToSelectedSegments(
4103
4104
  selectedElement.textSegments,
4104
4105
  inlineSel,
4105
4106
  updates
4106
4107
  );
4107
- chunkHMQVOPQH_js.setPendingSelectionRestore(newSelection);
4108
+ chunkKDJBWJJH_js.setPendingSelectionRestore(newSelection);
4108
4109
  updateSelectedElement({
4109
4110
  textSegments: newSegments2
4110
4111
  });
@@ -4124,12 +4125,12 @@ function useElementOperations(input) {
4124
4125
  );
4125
4126
  const updateSelectedTextCase = react.useCallback(
4126
4127
  (mode) => {
4127
- if (!selectedElement || !chunkHMQVOPQH_js.hasTextProperties(selectedElement)) {
4128
+ if (!selectedElement || !chunkKDJBWJJH_js.hasTextProperties(selectedElement)) {
4128
4129
  return;
4129
4130
  }
4130
- const inlineSel = chunkHMQVOPQH_js.getInlineEditorSelection(selectedElement.textSegments);
4131
+ const inlineSel = chunkKDJBWJJH_js.getInlineEditorSelection(selectedElement.textSegments);
4131
4132
  if (inlineSel && selectedElement.textSegments) {
4132
- const newSegments = chunkHMQVOPQH_js.applyCaseTransformToSegments(
4133
+ const newSegments = chunkKDJBWJJH_js.applyCaseTransformToSegments(
4133
4134
  selectedElement.textSegments,
4134
4135
  inlineSel,
4135
4136
  mode
@@ -4139,14 +4140,14 @@ function useElementOperations(input) {
4139
4140
  }
4140
4141
  const updates = {};
4141
4142
  if (selectedElement.textSegments && selectedElement.textSegments.length > 0) {
4142
- updates.textSegments = chunkHMQVOPQH_js.applyCaseTransformToSegments(
4143
+ updates.textSegments = chunkKDJBWJJH_js.applyCaseTransformToSegments(
4143
4144
  selectedElement.textSegments,
4144
4145
  null,
4145
4146
  mode
4146
4147
  );
4147
4148
  }
4148
4149
  if (typeof selectedElement.text === "string") {
4149
- updates.text = chunkHMQVOPQH_js.transformTextCase(selectedElement.text, mode);
4150
+ updates.text = chunkKDJBWJJH_js.transformTextCase(selectedElement.text, mode);
4150
4151
  }
4151
4152
  updateSelectedElement(updates);
4152
4153
  },
@@ -4201,7 +4202,7 @@ function useSectionOperations(input) {
4201
4202
  const { sections, setSections, slides, setSlides, markDirty } = input;
4202
4203
  const addSection2 = react.useCallback(
4203
4204
  (name, afterSlideIndex) => {
4204
- const result = chunkHMQVOPQH_js.addSection(sections, slides, name, afterSlideIndex);
4205
+ const result = chunkKDJBWJJH_js.addSection(sections, slides, name, afterSlideIndex);
4205
4206
  setSlides(result.slides);
4206
4207
  setSections(result.sections);
4207
4208
  markDirty();
@@ -4210,7 +4211,7 @@ function useSectionOperations(input) {
4210
4211
  );
4211
4212
  const renameSection2 = react.useCallback(
4212
4213
  (sectionId, newName) => {
4213
- const result = chunkHMQVOPQH_js.renameSection(sections, slides, sectionId, newName);
4214
+ const result = chunkKDJBWJJH_js.renameSection(sections, slides, sectionId, newName);
4214
4215
  setSections(result.sections);
4215
4216
  setSlides(result.slides);
4216
4217
  markDirty();
@@ -4219,7 +4220,7 @@ function useSectionOperations(input) {
4219
4220
  );
4220
4221
  const deleteSection2 = react.useCallback(
4221
4222
  (sectionId) => {
4222
- const result = chunkHMQVOPQH_js.deleteSection(sections, slides, sectionId);
4223
+ const result = chunkKDJBWJJH_js.deleteSection(sections, slides, sectionId);
4223
4224
  setSections(result.sections);
4224
4225
  setSlides(result.slides);
4225
4226
  markDirty();
@@ -4228,21 +4229,21 @@ function useSectionOperations(input) {
4228
4229
  );
4229
4230
  const moveSectionUp2 = react.useCallback(
4230
4231
  (sectionId) => {
4231
- setSections(chunkHMQVOPQH_js.moveSectionUp(sections, sectionId));
4232
+ setSections(chunkKDJBWJJH_js.moveSectionUp(sections, sectionId));
4232
4233
  markDirty();
4233
4234
  },
4234
4235
  [sections, setSections, markDirty]
4235
4236
  );
4236
4237
  const moveSectionDown2 = react.useCallback(
4237
4238
  (sectionId) => {
4238
- setSections(chunkHMQVOPQH_js.moveSectionDown(sections, sectionId));
4239
+ setSections(chunkKDJBWJJH_js.moveSectionDown(sections, sectionId));
4239
4240
  markDirty();
4240
4241
  },
4241
4242
  [sections, setSections, markDirty]
4242
4243
  );
4243
4244
  const moveSlidesToSection2 = react.useCallback(
4244
4245
  (slideIndexes, targetSectionId) => {
4245
- const result = chunkHMQVOPQH_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4246
+ const result = chunkKDJBWJJH_js.moveSlidesToSection(sections, slides, slideIndexes, targetSectionId);
4246
4247
  setSlides(result.slides);
4247
4248
  setSections(result.sections);
4248
4249
  markDirty();
@@ -4261,19 +4262,19 @@ function useSectionOperations(input) {
4261
4262
 
4262
4263
  // src/viewer/hooks/pointer-move-handlers.ts
4263
4264
  function computeResizeGeometry(handle, startX, startY, startWidth, startHeight, dx, dy, snapToGrid, gridSpacingPx) {
4264
- const resized = chunkHMQVOPQH_js.applyResize(
4265
+ const resized = chunkKDJBWJJH_js.applyResize(
4265
4266
  { x: startX, y: startY, width: startWidth, height: startHeight },
4266
4267
  handle,
4267
4268
  dx,
4268
4269
  dy,
4269
4270
  1,
4270
- { minSize: chunkMM5RMRSP_js.MIN_ELEMENT_SIZE }
4271
+ { minSize: chunkFAP6OPLL_js.MIN_ELEMENT_SIZE }
4271
4272
  );
4272
4273
  const box = { x: resized.x, y: resized.y, width: resized.width, height: resized.height };
4273
4274
  if (!snapToGrid) {
4274
4275
  return box;
4275
4276
  }
4276
- return chunkHMQVOPQH_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE);
4277
+ return chunkKDJBWJJH_js.snapBoxToGrid(box, handle, gridSpacingPx, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE);
4277
4278
  }
4278
4279
  function computeAdjustmentValue(startAdjustment, dx, startWidth) {
4279
4280
  const range = startWidth || 200;
@@ -4391,7 +4392,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4391
4392
  width: el.width,
4392
4393
  height: el.height
4393
4394
  }));
4394
- const snapResult = chunkHMQVOPQH_js.computeSnapToShape(
4395
+ const snapResult = chunkKDJBWJJH_js.computeSnapToShape(
4395
4396
  targetX,
4396
4397
  targetY,
4397
4398
  primaryEl.width,
@@ -4430,7 +4431,7 @@ function processDragMove(e, drag, editorScale, snapToGrid, snapToShape, gridSpac
4430
4431
  if (live) {
4431
4432
  for (const id of Object.keys(drag.startPositionsById)) {
4432
4433
  const start = drag.startPositionsById[id];
4433
- chunkHMQVOPQH_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4434
+ chunkKDJBWJJH_js.publishLiveGeometry(live.patcher, live.slideId, id, {
4434
4435
  x: start.x + appliedDx,
4435
4436
  y: start.y + appliedDy
4436
4437
  });
@@ -4464,15 +4465,15 @@ function processResizeMove(e, rs, editorScale, snapToGrid, gridSpacingPx, live)
4464
4465
  if (rs.domEl) {
4465
4466
  rs.domEl.style.left = `${geo.x}px`;
4466
4467
  rs.domEl.style.top = `${geo.y}px`;
4467
- rs.domEl.style.width = `${Math.max(geo.width, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE)}px`;
4468
- rs.domEl.style.height = `${Math.max(geo.height, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE)}px`;
4468
+ rs.domEl.style.width = `${Math.max(geo.width, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE)}px`;
4469
+ rs.domEl.style.height = `${Math.max(geo.height, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE)}px`;
4469
4470
  }
4470
4471
  if (live) {
4471
- chunkHMQVOPQH_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4472
+ chunkKDJBWJJH_js.publishLiveGeometry(live.patcher, live.slideId, rs.elementId, {
4472
4473
  x: geo.x,
4473
4474
  y: geo.y,
4474
- width: Math.max(geo.width, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE),
4475
- height: Math.max(geo.height, chunkMM5RMRSP_js.MIN_ELEMENT_SIZE)
4475
+ width: Math.max(geo.width, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE),
4476
+ height: Math.max(geo.height, chunkFAP6OPLL_js.MIN_ELEMENT_SIZE)
4476
4477
  });
4477
4478
  }
4478
4479
  }
@@ -4552,13 +4553,13 @@ function processPointerUp(input) {
4552
4553
  if (i !== activeSlideIndex) {
4553
4554
  return s;
4554
4555
  }
4555
- const rerouted = chunkHMQVOPQH_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4556
+ const rerouted = chunkKDJBWJJH_js.rerouteConnectorsForMovedElements(s.elements, movedIds);
4556
4557
  if (rerouted.length === 0) {
4557
4558
  return s;
4558
4559
  }
4559
4560
  return {
4560
4561
  ...s,
4561
- elements: chunkHMQVOPQH_js.applyReroutedConnectors(s.elements, rerouted)
4562
+ elements: chunkKDJBWJJH_js.applyReroutedConnectors(s.elements, rerouted)
4562
4563
  };
4563
4564
  })
4564
4565
  );
@@ -4580,9 +4581,9 @@ function processPointerUp(input) {
4580
4581
  }
4581
4582
  function commitMarquee(marquee, editTemplateMode, templateElements, activeSlide, applySelection, clearSelection) {
4582
4583
  const sourceElements = editTemplateMode ? templateElements : activeSlide?.elements ?? [];
4583
- const hitIds = chunkHMQVOPQH_js.computeMarqueeHitIds(marquee, sourceElements);
4584
+ const hitIds = chunkKDJBWJJH_js.computeMarqueeHitIds(marquee, sourceElements);
4584
4585
  if (marquee.additive) {
4585
- const merged = chunkHMQVOPQH_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4586
+ const merged = chunkKDJBWJJH_js.mergeAdditiveSelection(marquee.baseSelectionIds, hitIds);
4586
4587
  if (merged.length > 0) {
4587
4588
  applySelection(merged[0], merged);
4588
4589
  } else {
@@ -4605,8 +4606,8 @@ function commitDrag(drag, editTemplateMode, activeSlide, activeSlideIndex, setTe
4605
4606
  }
4606
4607
  return { ...el, x: start.x + dx, y: start.y + dy };
4607
4608
  });
4608
- const rerouted = chunkHMQVOPQH_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4609
- return chunkHMQVOPQH_js.applyReroutedConnectors(movedElements, rerouted);
4609
+ const rerouted = chunkKDJBWJJH_js.rerouteConnectorsForMovedElements(movedElements, movedIds);
4610
+ return chunkKDJBWJJH_js.applyReroutedConnectors(movedElements, rerouted);
4610
4611
  };
4611
4612
  if (editTemplateMode) {
4612
4613
  const slideId = activeSlide?.id;
@@ -4762,9 +4763,9 @@ function useCanvasInteractions(input) {
4762
4763
  return;
4763
4764
  }
4764
4765
  const el = elementLookup.get(editId);
4765
- if (el && chunkHMQVOPQH_js.hasTextProperties(el)) {
4766
+ if (el && chunkKDJBWJJH_js.hasTextProperties(el)) {
4766
4767
  const committedText = transformCommittedText ? transformCommittedText(inlineEditingText) : inlineEditingText;
4767
- const newSegments = chunkHMQVOPQH_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4768
+ const newSegments = chunkKDJBWJJH_js.remapTextToSegments(committedText, el.textSegments, el.textStyle);
4768
4769
  ops.updateElementById(editId, {
4769
4770
  text: committedText,
4770
4771
  textSegments: newSegments
@@ -4775,7 +4776,7 @@ function useCanvasInteractions(input) {
4775
4776
  setInlineEditingText("");
4776
4777
  };
4777
4778
  const openEquationEditorForElement = (el) => {
4778
- if (!chunkHMQVOPQH_js.hasTextProperties(el)) {
4779
+ if (!chunkKDJBWJJH_js.hasTextProperties(el)) {
4779
4780
  return false;
4780
4781
  }
4781
4782
  const eqSeg = el.textSegments?.find((seg) => seg.equationXml);
@@ -4804,7 +4805,7 @@ function useCanvasInteractions(input) {
4804
4805
  justSelectedRef.current = false;
4805
4806
  } else {
4806
4807
  const el = elementLookup.get(elementId);
4807
- if (el && chunkHMQVOPQH_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4808
+ if (el && chunkKDJBWJJH_js.hasTextProperties(el) && !el.locks?.noTextEdit) {
4808
4809
  if (!openEquationEditorForElement(el)) {
4809
4810
  setInlineEditingElementId(elementId);
4810
4811
  setInlineEditingText(el.text ?? "");
@@ -4823,7 +4824,7 @@ function useCanvasInteractions(input) {
4823
4824
  if (openEquationEditorForElement(el)) {
4824
4825
  return;
4825
4826
  }
4826
- if (chunkHMQVOPQH_js.hasTextProperties(el)) {
4827
+ if (chunkKDJBWJJH_js.hasTextProperties(el)) {
4827
4828
  setInlineEditingElementId(elementId);
4828
4829
  setInlineEditingText(el.text ?? "");
4829
4830
  }
@@ -5016,7 +5017,7 @@ function createFileHandlers(deps) {
5016
5017
  h = Math.round(h * scale);
5017
5018
  }
5018
5019
  addElement({
5019
- id: chunkHMQVOPQH_js.generateElementId(),
5020
+ id: chunkKDJBWJJH_js.generateElementId(),
5020
5021
  type: "image",
5021
5022
  x: Math.round((canvasSize.width - w) / 2),
5022
5023
  y: Math.round((canvasSize.height - h) / 2),
@@ -5027,7 +5028,7 @@ function createFileHandlers(deps) {
5027
5028
  };
5028
5029
  img.onerror = () => {
5029
5030
  addElement({
5030
- id: chunkHMQVOPQH_js.generateElementId(),
5031
+ id: chunkKDJBWJJH_js.generateElementId(),
5031
5032
  type: "image",
5032
5033
  x: 100,
5033
5034
  y: 100,
@@ -5053,7 +5054,7 @@ function createFileHandlers(deps) {
5053
5054
  const elFilePath = file.path;
5054
5055
  const insertMediaElement = (mediaSourceUrl, width, height) => {
5055
5056
  addElement({
5056
- id: chunkHMQVOPQH_js.generateElementId(),
5057
+ id: chunkKDJBWJJH_js.generateElementId(),
5057
5058
  type: "media",
5058
5059
  mediaType,
5059
5060
  mediaMimeType: file.type || void 0,
@@ -5228,13 +5229,13 @@ function createStructuredElementHandlers(deps) {
5228
5229
  return;
5229
5230
  }
5230
5231
  addElement({
5231
- id: chunkHMQVOPQH_js.generateElementId(),
5232
+ id: chunkKDJBWJJH_js.generateElementId(),
5232
5233
  type: "smartArt",
5233
5234
  x: 100,
5234
5235
  y: 120,
5235
5236
  width: 600,
5236
5237
  height: 340,
5237
- smartArtData: chunkHMQVOPQH_js.buildSmartArtPresetData(
5238
+ smartArtData: chunkKDJBWJJH_js.buildSmartArtPresetData(
5238
5239
  layout,
5239
5240
  defaultItems,
5240
5241
  (i) => `node-${Date.now()}-${i}-${Math.random().toString(36).slice(2, 8)}`
@@ -5246,7 +5247,7 @@ function createStructuredElementHandlers(deps) {
5246
5247
  return;
5247
5248
  }
5248
5249
  addElement({
5249
- id: chunkHMQVOPQH_js.generateElementId(),
5250
+ id: chunkKDJBWJJH_js.generateElementId(),
5250
5251
  type: "shape",
5251
5252
  x: 120,
5252
5253
  y: 200,
@@ -5305,7 +5306,7 @@ function createStructuredElementHandlers(deps) {
5305
5306
  const displayText = value || fieldTexts[fieldType] || fieldType;
5306
5307
  const fieldGuid = `{${crypto.randomUUID().toUpperCase()}}`;
5307
5308
  addElement({
5308
- id: chunkHMQVOPQH_js.generateElementId(),
5309
+ id: chunkKDJBWJJH_js.generateElementId(),
5309
5310
  type: "shape",
5310
5311
  x: 120,
5311
5312
  y: 200,
@@ -5327,11 +5328,11 @@ function createStructuredElementHandlers(deps) {
5327
5328
  if (!activeSlide) {
5328
5329
  return;
5329
5330
  }
5330
- const preset = chunkHMQVOPQH_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5331
+ const preset = chunkKDJBWJJH_js.ACTION_BUTTON_PRESETS.find((p) => p.shapeType === shapeType);
5331
5332
  if (!preset) {
5332
5333
  return;
5333
5334
  }
5334
- const defaultPptxAction = chunkHMQVOPQH_js.elementActionToPptxAction({
5335
+ const defaultPptxAction = chunkKDJBWJJH_js.elementActionToPptxAction({
5335
5336
  trigger: "click",
5336
5337
  type: preset.defaultAction
5337
5338
  });
@@ -5340,7 +5341,7 @@ function createStructuredElementHandlers(deps) {
5340
5341
  defaultPptxAction.highlightClick = true;
5341
5342
  }
5342
5343
  addElement({
5343
- id: chunkHMQVOPQH_js.generateElementId(),
5344
+ id: chunkKDJBWJJH_js.generateElementId(),
5344
5345
  type: "shape",
5345
5346
  x: 150,
5346
5347
  y: 150,
@@ -5407,14 +5408,14 @@ function useInsertElements(input) {
5407
5408
  return;
5408
5409
  }
5409
5410
  addElement({
5410
- id: chunkHMQVOPQH_js.generateElementId(),
5411
+ id: chunkKDJBWJJH_js.generateElementId(),
5411
5412
  type: "text",
5412
5413
  x: 100,
5413
5414
  y: 100,
5414
5415
  width: 300,
5415
5416
  height: 60,
5416
5417
  text: "",
5417
- textStyle: { fontSize: chunkMM5RMRSP_js.DEFAULT_TEXT_FONT_SIZE }
5418
+ textStyle: { fontSize: chunkFAP6OPLL_js.DEFAULT_TEXT_FONT_SIZE }
5418
5419
  });
5419
5420
  };
5420
5421
  const handleAddShape = () => {
@@ -5422,7 +5423,7 @@ function useInsertElements(input) {
5422
5423
  return;
5423
5424
  }
5424
5425
  addElement({
5425
- id: chunkHMQVOPQH_js.generateElementId(),
5426
+ id: chunkKDJBWJJH_js.generateElementId(),
5426
5427
  type: "shape",
5427
5428
  x: 150,
5428
5429
  y: 150,
@@ -5441,15 +5442,15 @@ function useInsertElements(input) {
5441
5442
  return;
5442
5443
  }
5443
5444
  addElement({
5444
- ...chunkHMQVOPQH_js.newTableElement(chunkMM5RMRSP_js.DEFAULT_TABLE_ROWS, chunkMM5RMRSP_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5445
- id: chunkHMQVOPQH_js.generateElementId()
5445
+ ...chunkKDJBWJJH_js.newTableElement(chunkFAP6OPLL_js.DEFAULT_TABLE_ROWS, chunkFAP6OPLL_js.DEFAULT_TABLE_COLUMNS, 100, 200),
5446
+ id: chunkKDJBWJJH_js.generateElementId()
5446
5447
  });
5447
5448
  };
5448
5449
  const handleAddChart = (chartType) => {
5449
5450
  if (!activeSlide) {
5450
5451
  return;
5451
5452
  }
5452
- addElement(chunkHMQVOPQH_js.createDefaultChartElement(chartType));
5453
+ addElement(chunkKDJBWJJH_js.createDefaultChartElement(chartType));
5453
5454
  };
5454
5455
  const structured = createStructuredElementHandlers({
5455
5456
  activeSlide,
@@ -5519,7 +5520,7 @@ function useClipboardHandlers(input) {
5519
5520
  if (!selectedElement) {
5520
5521
  return;
5521
5522
  }
5522
- setClipboardPayload(chunkHMQVOPQH_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5523
+ setClipboardPayload(chunkKDJBWJJH_js.buildElementClipboardPayload(selectedElement, editTemplateMode));
5523
5524
  };
5524
5525
  const handleDelete = () => {
5525
5526
  const idsToDelete = effectiveSelectedIds;
@@ -5536,7 +5537,7 @@ function useClipboardHandlers(input) {
5536
5537
  handleDelete();
5537
5538
  };
5538
5539
  const insertClone = (source) => {
5539
- const clone = chunkHMQVOPQH_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5540
+ const clone = chunkKDJBWJJH_js.cloneElementForPaste(source, { intoTemplate: editTemplateMode });
5540
5541
  ops.updateActiveElements((els) => [...els, clone]);
5541
5542
  ops.applySelection(clone.id);
5542
5543
  history.markDirty();
@@ -5571,7 +5572,7 @@ function resolveShapePath(el) {
5571
5572
  return el.pathData;
5572
5573
  }
5573
5574
  if ("shapeType" in el && typeof el.shapeType === "string") {
5574
- const clipPath = chunkHMQVOPQH_js.getPresetShapeClipPath(el.shapeType);
5575
+ const clipPath = chunkKDJBWJJH_js.getPresetShapeClipPath(el.shapeType);
5575
5576
  if (clipPath) {
5576
5577
  const svgPath = clipPathToSvgPath(clipPath, el.width, el.height);
5577
5578
  if (svgPath) {
@@ -5622,7 +5623,7 @@ function clipPathToSvgPath(clipPath, width, height) {
5622
5623
  return parts.join(" ");
5623
5624
  }
5624
5625
  function transformPathToGlobal(pathData, el) {
5625
- const polys = chunkHMQVOPQH_js.svgPathToPolygons(pathData);
5626
+ const polys = chunkKDJBWJJH_js.svgPathToPolygons(pathData);
5626
5627
  if (polys.length === 0) {
5627
5628
  return pathData;
5628
5629
  }
@@ -5642,10 +5643,10 @@ function transformPathToGlobal(pathData, el) {
5642
5643
  y: pt.y * scaleY + el.y
5643
5644
  }))
5644
5645
  );
5645
- return chunkHMQVOPQH_js.polygonsToSvgPath(transformed);
5646
+ return chunkKDJBWJJH_js.polygonsToSvgPath(transformed);
5646
5647
  }
5647
5648
  function transformPathToLocal(pathData, x, y, _width, _height) {
5648
- const polys = chunkHMQVOPQH_js.svgPathToPolygons(pathData);
5649
+ const polys = chunkKDJBWJJH_js.svgPathToPolygons(pathData);
5649
5650
  if (polys.length === 0) {
5650
5651
  return pathData;
5651
5652
  }
@@ -5655,10 +5656,10 @@ function transformPathToLocal(pathData, x, y, _width, _height) {
5655
5656
  y: pt.y - y
5656
5657
  }))
5657
5658
  );
5658
- return chunkHMQVOPQH_js.polygonsToSvgPath(transformed);
5659
+ return chunkKDJBWJJH_js.polygonsToSvgPath(transformed);
5659
5660
  }
5660
5661
  function pathBounds(pathData) {
5661
- const polys = chunkHMQVOPQH_js.svgPathToPolygons(pathData);
5662
+ const polys = chunkKDJBWJJH_js.svgPathToPolygons(pathData);
5662
5663
  let minX = Infinity;
5663
5664
  let minY = Infinity;
5664
5665
  let maxX = -Infinity;
@@ -5717,7 +5718,7 @@ function useMergeShapesHandler(input) {
5717
5718
  let allFragments = [];
5718
5719
  let remaining = globalPaths[0];
5719
5720
  for (let i = 1; i < globalPaths.length; i++) {
5720
- const frags = chunkHMQVOPQH_js.mergeShapes("fragment", remaining, globalPaths[i]);
5721
+ const frags = chunkKDJBWJJH_js.mergeShapes("fragment", remaining, globalPaths[i]);
5721
5722
  if (Array.isArray(frags)) {
5722
5723
  allFragments = frags;
5723
5724
  }
@@ -5746,7 +5747,7 @@ function useMergeShapesHandler(input) {
5746
5747
  bounds.height
5747
5748
  );
5748
5749
  const newEl = {
5749
- id: chunkHMQVOPQH_js.generateElementId(),
5750
+ id: chunkKDJBWJJH_js.generateElementId(),
5750
5751
  type: "shape",
5751
5752
  x: bounds.x,
5752
5753
  y: bounds.y,
@@ -5784,7 +5785,7 @@ function useMergeShapesHandler(input) {
5784
5785
  } else {
5785
5786
  let resultPath = globalPaths[0];
5786
5787
  for (let i = 1; i < globalPaths.length; i++) {
5787
- const result = chunkHMQVOPQH_js.mergeShapes(operation, resultPath, globalPaths[i]);
5788
+ const result = chunkKDJBWJJH_js.mergeShapes(operation, resultPath, globalPaths[i]);
5788
5789
  if (typeof result === "string") {
5789
5790
  resultPath = result;
5790
5791
  }
@@ -5805,7 +5806,7 @@ function useMergeShapesHandler(input) {
5805
5806
  );
5806
5807
  const primary = targets[0];
5807
5808
  const newEl = {
5808
- id: chunkHMQVOPQH_js.generateElementId(),
5809
+ id: chunkKDJBWJJH_js.generateElementId(),
5809
5810
  type: "shape",
5810
5811
  x: bounds.x,
5811
5812
  y: bounds.y,
@@ -5868,7 +5869,7 @@ function useGroupAlignLayerHandlers(input) {
5868
5869
  if (ids.length < 2 || !activeSlide) {
5869
5870
  return;
5870
5871
  }
5871
- const { elements, groupId } = chunkHMQVOPQH_js.groupElements(ops.activeElements, ids, chunkHMQVOPQH_js.generateElementId());
5872
+ const { elements, groupId } = chunkKDJBWJJH_js.groupElements(ops.activeElements, ids, chunkKDJBWJJH_js.generateElementId());
5872
5873
  if (groupId === null) {
5873
5874
  return;
5874
5875
  }
@@ -5881,12 +5882,12 @@ function useGroupAlignLayerHandlers(input) {
5881
5882
  return;
5882
5883
  }
5883
5884
  const group = selectedElement;
5884
- const intoTemplate = chunkHMQVOPQH_js.isTemplateElementId(group.id);
5885
+ const intoTemplate = chunkKDJBWJJH_js.isTemplateElementId(group.id);
5885
5886
  const ungrouped = group.children.map((child) => ({
5886
5887
  ...structuredClone(child),
5887
5888
  // Keep child ids in the same store as the group so later edits route
5888
5889
  // correctly: template groups yield template-prefixed child ids.
5889
- id: intoTemplate ? chunkHMQVOPQH_js.makeCloneId(true, child.id || group.id) : child.id || chunkHMQVOPQH_js.generateElementId(),
5890
+ id: intoTemplate ? chunkKDJBWJJH_js.makeCloneId(true, child.id || group.id) : child.id || chunkKDJBWJJH_js.generateElementId(),
5890
5891
  x: child.x + group.x,
5891
5892
  y: child.y + group.y
5892
5893
  }));
@@ -5910,7 +5911,7 @@ function useGroupAlignLayerHandlers(input) {
5910
5911
  if (!edge) {
5911
5912
  return;
5912
5913
  }
5913
- const positions = chunkHMQVOPQH_js.alignElements(selectedElements, edge);
5914
+ const positions = chunkKDJBWJJH_js.alignElements(selectedElements, edge);
5914
5915
  for (const [id, pos] of positions) {
5915
5916
  const el = elementLookup.get(id);
5916
5917
  if (!el) {
@@ -5928,7 +5929,7 @@ function useGroupAlignLayerHandlers(input) {
5928
5929
  if (!distAxis) {
5929
5930
  return;
5930
5931
  }
5931
- const positions = chunkHMQVOPQH_js.distributeElements(selectedElements, distAxis);
5932
+ const positions = chunkKDJBWJJH_js.distributeElements(selectedElements, distAxis);
5932
5933
  for (const [id, pos] of positions) {
5933
5934
  const el = elementLookup.get(id);
5934
5935
  if (!el) {
@@ -5945,7 +5946,7 @@ function useGroupAlignLayerHandlers(input) {
5945
5946
  }
5946
5947
  const id = selectedElement.id;
5947
5948
  ops.updateActiveElements(
5948
- (els) => direction === "forward" ? chunkHMQVOPQH_js.bringForward(els, id) : direction === "backward" ? chunkHMQVOPQH_js.sendBackward(els, id) : els
5949
+ (els) => direction === "forward" ? chunkKDJBWJJH_js.bringForward(els, id) : direction === "backward" ? chunkKDJBWJJH_js.sendBackward(els, id) : els
5949
5950
  );
5950
5951
  history.markDirty();
5951
5952
  };
@@ -5955,7 +5956,7 @@ function useGroupAlignLayerHandlers(input) {
5955
5956
  }
5956
5957
  const id = selectedElement.id;
5957
5958
  ops.updateActiveElements(
5958
- (els) => direction === "front" ? chunkHMQVOPQH_js.bringToFront(els, id) : chunkHMQVOPQH_js.sendToBack(els, id)
5959
+ (els) => direction === "front" ? chunkKDJBWJJH_js.bringToFront(els, id) : chunkKDJBWJJH_js.sendToBack(els, id)
5959
5960
  );
5960
5961
  history.markDirty();
5961
5962
  };
@@ -6077,7 +6078,7 @@ function insertSlideFromLayoutUpdater(slides, activeIndex, draft) {
6077
6078
  function useSlideManagement(input) {
6078
6079
  const { slides, activeSlideIndex, setActiveSlideIndex, ops, history, handlerRef } = input;
6079
6080
  const handleAddSlide = () => {
6080
- const newSlide = chunkHMQVOPQH_js.createBlankSlide(slides.length + 1);
6081
+ const newSlide = chunkKDJBWJJH_js.createBlankSlide(slides.length + 1);
6081
6082
  ops.updateSlides((prev) => {
6082
6083
  const next = [...prev];
6083
6084
  next.splice(activeSlideIndex + 1, 0, newSlide);
@@ -6140,7 +6141,7 @@ function useSlideManagement(input) {
6140
6141
  }
6141
6142
  const clone = {
6142
6143
  ...src,
6143
- id: chunkHMQVOPQH_js.makeSlideId(),
6144
+ id: chunkKDJBWJJH_js.makeSlideId(),
6144
6145
  elements: src.elements.map((el) => ({
6145
6146
  ...el,
6146
6147
  id: `${el.id}-dup-${Math.random().toString(36).slice(2, 6)}`
@@ -6172,7 +6173,7 @@ function useSlideManagement(input) {
6172
6173
  const handleInsertSlideFromLayout = (layoutPath, layoutName) => {
6173
6174
  const insertAt = activeSlideIndex + 1;
6174
6175
  const draft = {
6175
- ...chunkHMQVOPQH_js.createBlankSlide(slides.length + 1),
6176
+ ...chunkKDJBWJJH_js.createBlankSlide(slides.length + 1),
6176
6177
  layoutPath,
6177
6178
  ...layoutName ? { layoutName } : {}
6178
6179
  };
@@ -6233,7 +6234,7 @@ function createTableMergeHandlers(input) {
6233
6234
  if (!nextCell || nextCell.hMerge || nextCell.vMerge) {
6234
6235
  return;
6235
6236
  }
6236
- const newTableData = chunkHMQVOPQH_js.mergeCells(
6237
+ const newTableData = chunkKDJBWJJH_js.mergeCells(
6237
6238
  [
6238
6239
  { row: rowIndex, col: columnIndex },
6239
6240
  { row: rowIndex, col: nextColIdx }
@@ -6241,7 +6242,7 @@ function createTableMergeHandlers(input) {
6241
6242
  td
6242
6243
  );
6243
6244
  const updates = { tableData: newTableData };
6244
- const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6245
+ const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6245
6246
  if (newRawXml) {
6246
6247
  updates.rawXml = newRawXml;
6247
6248
  }
@@ -6267,7 +6268,7 @@ function createTableMergeHandlers(input) {
6267
6268
  if (!targetNextCell || targetNextCell.hMerge || targetNextCell.vMerge) {
6268
6269
  return;
6269
6270
  }
6270
- const newTableData = chunkHMQVOPQH_js.mergeCells(
6271
+ const newTableData = chunkKDJBWJJH_js.mergeCells(
6271
6272
  [
6272
6273
  { row: rowIndex, col: columnIndex },
6273
6274
  { row: targetNextRowIdx, col: columnIndex }
@@ -6275,7 +6276,7 @@ function createTableMergeHandlers(input) {
6275
6276
  td
6276
6277
  );
6277
6278
  const updates = { tableData: newTableData };
6278
- const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6279
+ const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6279
6280
  if (newRawXml) {
6280
6281
  updates.rawXml = newRawXml;
6281
6282
  }
@@ -6290,9 +6291,9 @@ function createTableMergeHandlers(input) {
6290
6291
  return;
6291
6292
  }
6292
6293
  const td = selectedElement.tableData;
6293
- const newTableData = chunkHMQVOPQH_js.mergeCells(ts.selectedCells, td);
6294
+ const newTableData = chunkKDJBWJJH_js.mergeCells(ts.selectedCells, td);
6294
6295
  const updates = { tableData: newTableData };
6295
- const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6296
+ const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6296
6297
  if (newRawXml) {
6297
6298
  updates.rawXml = newRawXml;
6298
6299
  }
@@ -6309,9 +6310,9 @@ function createTableMergeHandlers(input) {
6309
6310
  }
6310
6311
  const { rowIndex, columnIndex } = ts;
6311
6312
  const td = selectedElement.tableData;
6312
- const newTableData = chunkHMQVOPQH_js.splitCell(rowIndex, columnIndex, td);
6313
+ const newTableData = chunkKDJBWJJH_js.splitCell(rowIndex, columnIndex, td);
6313
6314
  const updates = { tableData: newTableData };
6314
- const newRawXml = chunkHMQVOPQH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6315
+ const newRawXml = chunkKDJBWJJH_js.updateMergeAttrsInRawXml(selectedElement, newTableData);
6315
6316
  if (newRawXml) {
6316
6317
  updates.rawXml = newRawXml;
6317
6318
  }
@@ -6355,7 +6356,7 @@ function createTableStructHandlers(input) {
6355
6356
  updates.tableData = { ...el.tableData, rows: newRows };
6356
6357
  }
6357
6358
  if (el.rawXml) {
6358
- const newRawXml = chunkHMQVOPQH_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6359
+ const newRawXml = chunkKDJBWJJH_js.updateCellTextInRawXml(el, rowIndex, colIndex, text);
6359
6360
  if (newRawXml) {
6360
6361
  updates.rawXml = newRawXml;
6361
6362
  }
@@ -6379,7 +6380,7 @@ function createTableStructHandlers(input) {
6379
6380
  const { rowIndex, columnIndex: colIndex } = ts;
6380
6381
  const updates = {};
6381
6382
  if (selectedElement.rawXml) {
6382
- const newRawXml = chunkHMQVOPQH_js.updateCellTextStyleInRawXml(
6383
+ const newRawXml = chunkKDJBWJJH_js.updateCellTextStyleInRawXml(
6383
6384
  selectedElement,
6384
6385
  rowIndex,
6385
6386
  colIndex,
@@ -6443,9 +6444,9 @@ function createTableStructHandlers(input) {
6443
6444
  return;
6444
6445
  }
6445
6446
  const rowIdx = ts?.rowIndex ?? 0;
6446
- const newTableData = chunkHMQVOPQH_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6447
+ const newTableData = chunkKDJBWJJH_js.insertTableRow(selectedElement.tableData, rowIdx, position);
6447
6448
  const updates = { tableData: newTableData };
6448
- const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6449
+ const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6449
6450
  if (newRawXml) {
6450
6451
  updates.rawXml = newRawXml;
6451
6452
  }
@@ -6458,12 +6459,12 @@ function createTableStructHandlers(input) {
6458
6459
  }
6459
6460
  const td = selectedElement.tableData;
6460
6461
  const rowIdx = ts?.rowIndex ?? 0;
6461
- const newTableData = chunkHMQVOPQH_js.deleteTableRow(td, rowIdx);
6462
+ const newTableData = chunkKDJBWJJH_js.deleteTableRow(td, rowIdx);
6462
6463
  if (newTableData === td) {
6463
6464
  return;
6464
6465
  }
6465
6466
  const updates = { tableData: newTableData };
6466
- const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6467
+ const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6467
6468
  if (newRawXml) {
6468
6469
  updates.rawXml = newRawXml;
6469
6470
  }
@@ -6475,9 +6476,9 @@ function createTableStructHandlers(input) {
6475
6476
  return;
6476
6477
  }
6477
6478
  const colIdx = ts?.columnIndex ?? 0;
6478
- const newTableData = chunkHMQVOPQH_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6479
+ const newTableData = chunkKDJBWJJH_js.insertTableColumn(selectedElement.tableData, colIdx, position);
6479
6480
  const updates = { tableData: newTableData };
6480
- const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6481
+ const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6481
6482
  if (newRawXml) {
6482
6483
  updates.rawXml = newRawXml;
6483
6484
  }
@@ -6490,12 +6491,12 @@ function createTableStructHandlers(input) {
6490
6491
  }
6491
6492
  const td = selectedElement.tableData;
6492
6493
  const colIdx = ts?.columnIndex ?? 0;
6493
- const newTableData = chunkHMQVOPQH_js.deleteTableColumn(td, colIdx);
6494
+ const newTableData = chunkKDJBWJJH_js.deleteTableColumn(td, colIdx);
6494
6495
  if (newTableData === td) {
6495
6496
  return;
6496
6497
  }
6497
6498
  const updates = { tableData: newTableData };
6498
- const newRawXml = chunkHMQVOPQH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6499
+ const newRawXml = chunkKDJBWJJH_js.rebuildTableStructureInRawXml(selectedElement, newTableData);
6499
6500
  if (newRawXml) {
6500
6501
  updates.rawXml = newRawXml;
6501
6502
  }
@@ -6531,8 +6532,8 @@ async function renderToCanvas(element, options = {}) {
6531
6532
  return html2canvasPro(element, {
6532
6533
  ...options,
6533
6534
  onclone: async (doc, clonedEl) => {
6534
- await chunkHMQVOPQH_js.normalizeColorsForCapture(doc, clonedEl);
6535
- chunkHMQVOPQH_js.preprocessCssForCapture(clonedEl);
6535
+ await chunkKDJBWJJH_js.normalizeColorsForCapture(doc, clonedEl);
6536
+ chunkKDJBWJJH_js.preprocessCssForCapture(clonedEl);
6536
6537
  if (typeof userOnClone === "function") {
6537
6538
  userOnClone(doc, clonedEl);
6538
6539
  }
@@ -6588,7 +6589,7 @@ async function exportSlideToPngBlob(slideElement, options = {}) {
6588
6589
  }
6589
6590
  async function exportSlideAsPng(slideElement, slideIndex, options = {}) {
6590
6591
  const blob = await exportSlideToPngBlob(slideElement, options);
6591
- chunkHMQVOPQH_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6592
+ chunkKDJBWJJH_js.downloadBlob(blob, `slide-${slideIndex + 1}.png`);
6592
6593
  }
6593
6594
  async function copySlideToClipboard(slideElement, options = {}) {
6594
6595
  const blob = await exportSlideToPngBlob(slideElement, options);
@@ -6610,15 +6611,15 @@ async function exportAllSlidesAsPdf(slideStageRef, totalSlides, setActiveSlide,
6610
6611
  continue;
6611
6612
  }
6612
6613
  const canvas = await renderElementToCanvas(stageEl, scale);
6613
- images.push(chunkHMQVOPQH_js.canvasToJpegData(canvas));
6614
+ images.push(chunkKDJBWJJH_js.canvasToJpegData(canvas));
6614
6615
  }
6615
6616
  onProgress?.(totalSlides, totalSlides);
6616
6617
  setActiveSlide(currentSlideIndex);
6617
6618
  if (images.length === 0) {
6618
- throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6619
+ throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesPdf"]);
6619
6620
  }
6620
- const pdfBlobUrl = chunkMM5RMRSP_js.buildPdfFromImageData(images);
6621
- chunkHMQVOPQH_js.downloadDataUrl(pdfBlobUrl, filename);
6621
+ const pdfBlobUrl = chunkFAP6OPLL_js.buildPdfFromImageData(images);
6622
+ chunkKDJBWJJH_js.downloadDataUrl(pdfBlobUrl, filename);
6622
6623
  }
6623
6624
  async function captureAllSlidesAsPngDataUrls(slideStageRef, totalSlides, setActiveSlide, currentSlideIndex, options = {}) {
6624
6625
  const { scale = 2, onProgress } = options;
@@ -6664,10 +6665,10 @@ async function exportAllSlidesAsNotesPdf(slideStageRef, totalSlides, setActiveSl
6664
6665
  onProgress?.(totalSlides, totalSlides);
6665
6666
  setActiveSlide(currentSlideIndex);
6666
6667
  if (pages.length === 0) {
6667
- throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6668
+ throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesNotesPdf"]);
6668
6669
  }
6669
- const pdfDataUrl = chunkMM5RMRSP_js.buildNotesPdf(pages);
6670
- chunkHMQVOPQH_js.downloadDataUrl(pdfDataUrl, filename);
6670
+ const pdfDataUrl = chunkFAP6OPLL_js.buildNotesPdf(pages);
6671
+ chunkKDJBWJJH_js.downloadDataUrl(pdfDataUrl, filename);
6671
6672
  }
6672
6673
 
6673
6674
  // src/viewer/utils/export-video.ts
@@ -6698,7 +6699,7 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6698
6699
  }
6699
6700
  setActiveSlide(currentSlideIndex);
6700
6701
  if (slideCanvases.length === 0) {
6701
- throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6702
+ throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesVideo"]);
6702
6703
  }
6703
6704
  const firstCanvas = slideCanvases[0];
6704
6705
  const recordingCanvas = document.createElement("canvas");
@@ -6706,12 +6707,12 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6706
6707
  recordingCanvas.height = firstCanvas.height;
6707
6708
  const ctx = recordingCanvas.getContext("2d");
6708
6709
  if (!ctx) {
6709
- throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNo2dContext"]);
6710
+ throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNo2dContext"]);
6710
6711
  }
6711
6712
  const fps = 30;
6712
6713
  const stream = recordingCanvas.captureStream(fps);
6713
6714
  const recorder = new MediaRecorder(stream, {
6714
- mimeType: chunkHMQVOPQH_js.pickSupportedMimeType([...chunkHMQVOPQH_js.WEBM_MIME_CANDIDATES]),
6715
+ mimeType: chunkKDJBWJJH_js.pickSupportedMimeType([...chunkKDJBWJJH_js.WEBM_MIME_CANDIDATES]),
6715
6716
  videoBitsPerSecond: 5e6
6716
6717
  });
6717
6718
  const chunks = [];
@@ -6734,8 +6735,8 @@ async function exportAllSlidesAsVideo(slideStageRef, totalSlides, setActiveSlide
6734
6735
  const duration = slideTimingsMs?.[i] ?? slideDurationMs;
6735
6736
  ctx.clearRect(0, 0, recordingCanvas.width, recordingCanvas.height);
6736
6737
  ctx.drawImage(slideCanvases[i], 0, 0);
6737
- const frameInterval = chunkHMQVOPQH_js.fpsToFrameIntervalMs(fps);
6738
- const framesNeeded = chunkHMQVOPQH_js.segmentFrameCount(duration, fps);
6738
+ const frameInterval = chunkKDJBWJJH_js.fpsToFrameIntervalMs(fps);
6739
+ const framesNeeded = chunkKDJBWJJH_js.segmentFrameCount(duration, fps);
6739
6740
  for (let f = 0; f < framesNeeded; f++) {
6740
6741
  if (signal?.aborted) {
6741
6742
  recorder.stop();
@@ -6782,9 +6783,9 @@ async function exportAllSlidesAsGif(slideStageRef, totalSlides, setActiveSlide,
6782
6783
  }
6783
6784
  setActiveSlide(currentSlideIndex);
6784
6785
  if (frames.length === 0) {
6785
- throw new Error(chunkN6IHR6PS_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6786
+ throw new Error(chunkIOVOQ6ZJ_js.translationsEn["pptx.export.errorNoSlidesGif"]);
6786
6787
  }
6787
- const gifBytes = chunkHMQVOPQH_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6788
+ const gifBytes = chunkKDJBWJJH_js.encodeGif(frames, Math.round(slideDurationMs / 10));
6788
6789
  onProgress?.(totalSlides, totalSlides);
6789
6790
  const buf = new ArrayBuffer(gifBytes.length);
6790
6791
  new Uint8Array(buf).set(gifBytes);
@@ -6838,7 +6839,7 @@ function exportAllSlidesToSvg(data, options = {}) {
6838
6839
  continue;
6839
6840
  }
6840
6841
  onProgress?.(processedCount, data.slides.length);
6841
- let svg = chunkHMQVOPQH_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6842
+ let svg = chunkKDJBWJJH_js.SvgExporter.exportSlide(slide, data.width, data.height, svgOptions);
6842
6843
  if (embedFonts && fontFaces?.length) {
6843
6844
  svg = injectFontFaces(svg, fontFaces);
6844
6845
  }
@@ -6898,7 +6899,7 @@ function useExportSaveAs(input) {
6898
6899
  }
6899
6900
  setExportProgress(70);
6900
6901
  setExportStatusMessage("Writing README...");
6901
- const readme = chunkHMQVOPQH_js.generatePackageReadme(pptxFilename);
6902
+ const readme = chunkKDJBWJJH_js.generatePackageReadme(pptxFilename);
6902
6903
  pkgFolder.file("README.txt", readme);
6903
6904
  if (abortCtrl.signal.aborted) {
6904
6905
  throw new DOMException("Export cancelled", "AbortError");
@@ -6909,7 +6910,7 @@ function useExportSaveAs(input) {
6909
6910
  setExportProgress(95);
6910
6911
  setExportStatusMessage("Downloading...");
6911
6912
  const baseName = pptxFilename.replace(/\.[^.]+$/u, "");
6912
- chunkHMQVOPQH_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6913
+ chunkKDJBWJJH_js.downloadBlob(zipBlob, `${baseName}-package.zip`);
6913
6914
  setExportProgress(100);
6914
6915
  } catch (err) {
6915
6916
  if (err.name !== "AbortError") {
@@ -6932,7 +6933,7 @@ function useExportSaveAs(input) {
6932
6933
  const blob = new Blob([data], {
6933
6934
  type: "application/vnd.openxmlformats-officedocument.presentationml.presentation"
6934
6935
  });
6935
- chunkHMQVOPQH_js.downloadBlob(blob, `${baseName}.${ext}`);
6936
+ chunkKDJBWJJH_js.downloadBlob(blob, `${baseName}.${ext}`);
6936
6937
  } catch (err) {
6937
6938
  console.error(`[PowerPointViewer] Save as .${ext} failed:`, err);
6938
6939
  }
@@ -6945,14 +6946,14 @@ function useExportSaveAs(input) {
6945
6946
  const pptxGuides = guides.map((g) => ({
6946
6947
  id: g.id,
6947
6948
  orientation: g.axis === "h" ? "horz" : "vert",
6948
- positionEmu: chunkHMQVOPQH_js.guidePxToEmu(g.position)
6949
+ positionEmu: chunkKDJBWJJH_js.guidePxToEmu(g.position)
6949
6950
  }));
6950
6951
  return {
6951
6952
  ...slide,
6952
6953
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
6953
6954
  };
6954
6955
  });
6955
- const slidesToSave = chunkMM5RMRSP_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6956
+ const slidesToSave = chunkFAP6OPLL_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
6956
6957
  const saveOptions = {
6957
6958
  headerFooter,
6958
6959
  presentationProperties,
@@ -7009,7 +7010,7 @@ function safeConfirm(message) {
7009
7010
  }
7010
7011
  }
7011
7012
  function downloadBlob2(blob, filename) {
7012
- chunkHMQVOPQH_js.downloadBlob(blob, chunkHMQVOPQH_js.sanitizeDownloadFilename(filename));
7013
+ chunkKDJBWJJH_js.downloadBlob(blob, chunkKDJBWJJH_js.sanitizeDownloadFilename(filename));
7013
7014
  }
7014
7015
 
7015
7016
  // src/viewer/hooks/useExportHandlers.ts
@@ -7110,21 +7111,21 @@ function useExportHandlers(input) {
7110
7111
  {
7111
7112
  scale: 2,
7112
7113
  onProgress: (current, total) => {
7113
- setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total));
7114
- setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Rendering", current, total));
7114
+ setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total));
7115
+ setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Rendering", current, total));
7115
7116
  },
7116
7117
  signal: abortCtrl.signal
7117
7118
  }
7118
7119
  );
7119
- setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7120
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7120
7121
  setExportStatusMessage("Building PDF...");
7121
7122
  await new Promise((r) => {
7122
7123
  setTimeout(r, 100);
7123
7124
  });
7124
- setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7125
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7125
7126
  setExportStatusMessage("Done!");
7126
7127
  } catch (err) {
7127
- if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7128
+ if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7128
7129
  console.error("[PowerPointViewer] PDF export failed:", err);
7129
7130
  }
7130
7131
  } finally {
@@ -7154,21 +7155,21 @@ function useExportHandlers(input) {
7154
7155
  {
7155
7156
  scale: 2,
7156
7157
  onProgress: (current, total) => {
7157
- setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total));
7158
- setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Rendering", current, total));
7158
+ setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total));
7159
+ setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Rendering", current, total));
7159
7160
  },
7160
7161
  signal: abortCtrl.signal
7161
7162
  }
7162
7163
  );
7163
- setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7164
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7164
7165
  setExportStatusMessage("Building PDF...");
7165
7166
  await new Promise((r) => {
7166
7167
  setTimeout(r, 100);
7167
7168
  });
7168
- setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7169
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7169
7170
  setExportStatusMessage("Done!");
7170
7171
  } catch (err) {
7171
- if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7172
+ if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7172
7173
  console.error("[PowerPointViewer] Notes PDF export failed:", err);
7173
7174
  }
7174
7175
  } finally {
@@ -7209,22 +7210,22 @@ function useExportHandlers(input) {
7209
7210
  scale: 1,
7210
7211
  slideDurationMs: 3e3,
7211
7212
  onProgress: (current, total) => {
7212
- setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total, 45));
7213
- setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Capturing", current, total));
7213
+ setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total, 45));
7214
+ setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Capturing", current, total));
7214
7215
  },
7215
7216
  onRecordProgress: (current, total) => {
7216
- setExportProgress(chunkHMQVOPQH_js.recordProgressPercent(current, total));
7217
- setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Recording", current, total));
7217
+ setExportProgress(chunkKDJBWJJH_js.recordProgressPercent(current, total));
7218
+ setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Recording", current, total));
7218
7219
  },
7219
7220
  signal: abortCtrl.signal
7220
7221
  }
7221
7222
  );
7222
- setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7223
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7223
7224
  setExportStatusMessage("Saving file...");
7224
7225
  downloadBlob2(blob, "presentation.webm");
7225
- setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7226
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7226
7227
  } catch (err) {
7227
- if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7228
+ if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7228
7229
  console.error("[PowerPointViewer] Video export failed:", err);
7229
7230
  }
7230
7231
  } finally {
@@ -7252,18 +7253,18 @@ function useExportHandlers(input) {
7252
7253
  scale: 0.5,
7253
7254
  slideDurationMs: 2e3,
7254
7255
  onProgress: (current, total) => {
7255
- setExportProgress(chunkHMQVOPQH_js.slideProgressPercent(current, total));
7256
- setExportStatusMessage(chunkHMQVOPQH_js.slideStatusLabel("Encoding", current, total));
7256
+ setExportProgress(chunkKDJBWJJH_js.slideProgressPercent(current, total));
7257
+ setExportStatusMessage(chunkKDJBWJJH_js.slideStatusLabel("Encoding", current, total));
7257
7258
  },
7258
7259
  signal: abortCtrl.signal
7259
7260
  }
7260
7261
  );
7261
- setExportProgress(chunkHMQVOPQH_js.EXPORT_ASSEMBLING_PERCENT);
7262
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_ASSEMBLING_PERCENT);
7262
7263
  setExportStatusMessage("Saving file...");
7263
7264
  downloadBlob2(blob, "presentation.gif");
7264
- setExportProgress(chunkHMQVOPQH_js.EXPORT_DONE_PERCENT);
7265
+ setExportProgress(chunkKDJBWJJH_js.EXPORT_DONE_PERCENT);
7265
7266
  } catch (err) {
7266
- if (!chunkHMQVOPQH_js.isExportAbortError(err)) {
7267
+ if (!chunkKDJBWJJH_js.isExportAbortError(err)) {
7267
7268
  console.error("[PowerPointViewer] GIF export failed:", err);
7268
7269
  }
7269
7270
  } finally {
@@ -7303,7 +7304,7 @@ function openPrintWindow(title, bodyHtml, orientation, colorFilter, frameSlides)
7303
7304
  }
7304
7305
  printWindow.document.open();
7305
7306
  printWindow.document.write(
7306
- chunkHMQVOPQH_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7307
+ chunkKDJBWJJH_js.buildPrintHtmlDocument({ title, bodyHtml, orientation, colorFilter, frameSlides })
7307
7308
  );
7308
7309
  printWindow.document.close();
7309
7310
  printWindow.focus();
@@ -7364,7 +7365,7 @@ function usePrintHandlers(input) {
7364
7365
  if (svgs.length === 0) {
7365
7366
  return;
7366
7367
  }
7367
- const printDoc = chunkHMQVOPQH_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7368
+ const printDoc = chunkKDJBWJJH_js.buildPrintDocument(svgs, pptxData.width, pptxData.height, {
7368
7369
  title: "Slides (Vector)",
7369
7370
  orientation: settings.orientation,
7370
7371
  colorFilter
@@ -7400,7 +7401,7 @@ function usePrintHandlers(input) {
7400
7401
  if (settings.printWhat === "outline") {
7401
7402
  openPrintWindow(
7402
7403
  "Outline",
7403
- `<div class="outline-page">${chunkHMQVOPQH_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7404
+ `<div class="outline-page">${chunkKDJBWJJH_js.buildOutlineHtml(slideIndices, slides)}</div>`,
7404
7405
  settings.orientation,
7405
7406
  colorFilter,
7406
7407
  settings.frameSlides
@@ -7425,7 +7426,7 @@ function usePrintHandlers(input) {
7425
7426
  if (settings.printWhat === "slides") {
7426
7427
  openPrintWindow(
7427
7428
  "Slides",
7428
- chunkHMQVOPQH_js.buildSlidesHtml(slideImages, slideIndices),
7429
+ chunkKDJBWJJH_js.buildSlidesHtml(slideImages, slideIndices),
7429
7430
  settings.orientation,
7430
7431
  colorFilter,
7431
7432
  settings.frameSlides
@@ -7435,7 +7436,7 @@ function usePrintHandlers(input) {
7435
7436
  if (settings.printWhat === "notes") {
7436
7437
  openPrintWindow(
7437
7438
  "Notes Pages",
7438
- chunkHMQVOPQH_js.buildNotesHtml(slideImages, slideIndices, slides),
7439
+ chunkKDJBWJJH_js.buildNotesHtml(slideImages, slideIndices, slides),
7439
7440
  "portrait",
7440
7441
  colorFilter,
7441
7442
  settings.frameSlides
@@ -7446,7 +7447,7 @@ function usePrintHandlers(input) {
7446
7447
  const spp = settings.slidesPerPage;
7447
7448
  openPrintWindow(
7448
7449
  `Handout ${spp} per page`,
7449
- chunkHMQVOPQH_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7450
+ chunkKDJBWJJH_js.buildHandoutsHtml(slideImages, slideIndices, spp),
7450
7451
  "portrait",
7451
7452
  colorFilter,
7452
7453
  settings.frameSlides
@@ -7510,8 +7511,8 @@ function useThemeHandlers(input) {
7510
7511
  return;
7511
7512
  }
7512
7513
  await handler.updateThemeColorScheme(colorScheme);
7513
- const previousMap = theme?.colorScheme ? chunkHMQVOPQH_js.buildThemeColorMap(theme.colorScheme) : {};
7514
- setSlides((prev) => chunkHMQVOPQH_js.reResolveSlideColors(prev, previousMap, colorScheme));
7514
+ const previousMap = theme?.colorScheme ? chunkKDJBWJJH_js.buildThemeColorMap(theme.colorScheme) : {};
7515
+ setSlides((prev) => chunkKDJBWJJH_js.reResolveSlideColors(prev, previousMap, colorScheme));
7515
7516
  setTheme((prev) => prev ? { ...prev, colorScheme } : { colorScheme });
7516
7517
  bumpHistory();
7517
7518
  history.markDirty();
@@ -7616,7 +7617,7 @@ function useThemeSwitching(input) {
7616
7617
  }
7617
7618
  try {
7618
7619
  await handler.applyTheme(preset.colorScheme, preset.fontScheme, preset.name);
7619
- const newData = chunkHMQVOPQH_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7620
+ const newData = chunkKDJBWJJH_js.applyThemeToData(data, preset.colorScheme, preset.fontScheme, preset.name);
7620
7621
  onDataChange(newData);
7621
7622
  onThemeChanged?.(preset);
7622
7623
  } catch (error) {
@@ -7633,7 +7634,7 @@ function useThemeSwitching(input) {
7633
7634
  }
7634
7635
  try {
7635
7636
  await handler.applyTheme(colorScheme, fontScheme ?? {}, themeName);
7636
- const newData = chunkHMQVOPQH_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7637
+ const newData = chunkKDJBWJJH_js.applyThemeToData(data, colorScheme, fontScheme, themeName);
7637
7638
  onDataChange(newData);
7638
7639
  } catch (error) {
7639
7640
  console.error("Failed to switch to custom theme:", error);
@@ -7645,12 +7646,12 @@ function useThemeSwitching(input) {
7645
7646
  if (!data?.theme?.colorScheme) {
7646
7647
  return void 0;
7647
7648
  }
7648
- return chunkHMQVOPQH_js.THEME_PRESETS.find(
7649
- (p) => chunkHMQVOPQH_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7649
+ return chunkKDJBWJJH_js.THEME_PRESETS.find(
7650
+ (p) => chunkKDJBWJJH_js.themeColorSchemesEqual(data.theme?.colorScheme, p.colorScheme)
7650
7651
  );
7651
7652
  }, [data?.theme?.colorScheme]);
7652
7653
  return {
7653
- presets: chunkHMQVOPQH_js.THEME_PRESETS,
7654
+ presets: chunkKDJBWJJH_js.THEME_PRESETS,
7654
7655
  switchToPreset,
7655
7656
  switchToCustom,
7656
7657
  currentPreset
@@ -7725,7 +7726,7 @@ function usePropertyHandlers(input) {
7725
7726
  }
7726
7727
  try {
7727
7728
  const ab = await file.arrayBuffer();
7728
- const h = new chunkHMQVOPQH_js.PptxHandler();
7729
+ const h = new chunkKDJBWJJH_js.PptxHandler();
7729
7730
  const other = await h.load(ab);
7730
7731
  if (!other) {
7731
7732
  return;
@@ -7735,7 +7736,7 @@ function usePropertyHandlers(input) {
7735
7736
  width: canvasSize.width,
7736
7737
  height: canvasSize.height
7737
7738
  };
7738
- setCompareResult(chunkHMQVOPQH_js.comparePresentation(cur, other));
7739
+ setCompareResult(chunkKDJBWJJH_js.comparePresentation(cur, other));
7739
7740
  setIsComparePanelOpen(true);
7740
7741
  } catch (err) {
7741
7742
  console.warn("Compare failed:", err);
@@ -7752,7 +7753,7 @@ function usePropertyHandlers(input) {
7752
7753
  if (!diff || diff.status === "unchanged") {
7753
7754
  return;
7754
7755
  }
7755
- setSlides((prev) => chunkHMQVOPQH_js.applyAcceptSlide(prev, diff));
7756
+ setSlides((prev) => chunkKDJBWJJH_js.applyAcceptSlide(prev, diff));
7756
7757
  setIsDirty(true);
7757
7758
  },
7758
7759
  [compareResult, setSlides, setIsDirty]
@@ -7763,10 +7764,10 @@ function usePropertyHandlers(input) {
7763
7764
  if (!compareResult) {
7764
7765
  return;
7765
7766
  }
7766
- setSlides((prev) => chunkHMQVOPQH_js.applyAcceptAllSlides(prev, compareResult));
7767
+ setSlides((prev) => chunkKDJBWJJH_js.applyAcceptAllSlides(prev, compareResult));
7767
7768
  setIsDirty(true);
7768
7769
  }, [compareResult, setSlides, setIsDirty]);
7769
- const usedFontFamilies = react.useMemo(() => chunkHMQVOPQH_js.collectUsedFonts(slides), [slides]);
7770
+ const usedFontFamilies = react.useMemo(() => chunkKDJBWJJH_js.collectUsedFonts(slides), [slides]);
7770
7771
  return {
7771
7772
  handleUpdateNotes,
7772
7773
  handleUpdateSlide,
@@ -7885,7 +7886,7 @@ function useIsMobile(input) {
7885
7886
  const containerRef = input?.containerRef;
7886
7887
  const isTouchDevice = react.useSyncExternalStore(
7887
7888
  subscribeTouchCapability,
7888
- chunkHMQVOPQH_js.detectTouchDevice,
7889
+ chunkKDJBWJJH_js.detectTouchDevice,
7889
7890
  () => false
7890
7891
  // server snapshot
7891
7892
  );
@@ -7901,7 +7902,7 @@ function useIsMobile(input) {
7901
7902
  }
7902
7903
  return containerRef?.current?.clientHeight ?? window.innerHeight;
7903
7904
  });
7904
- const [orientation, setOrientation] = react.useState(chunkHMQVOPQH_js.detectOrientation);
7905
+ const [orientation, setOrientation] = react.useState(chunkKDJBWJJH_js.detectOrientation);
7905
7906
  const [isVirtualKeyboardOpen, setIsVirtualKeyboardOpen] = react.useState(false);
7906
7907
  const [initialViewportHeight] = react.useState(
7907
7908
  () => typeof window !== "undefined" ? window.innerHeight : 800
@@ -7945,7 +7946,7 @@ function useIsMobile(input) {
7945
7946
  return;
7946
7947
  }
7947
7948
  const handleOrientationChange = () => {
7948
- setOrientation(chunkHMQVOPQH_js.detectOrientation());
7949
+ setOrientation(chunkKDJBWJJH_js.detectOrientation());
7949
7950
  };
7950
7951
  if (screen.orientation) {
7951
7952
  screen.orientation.addEventListener("change", handleOrientationChange);
@@ -7975,9 +7976,9 @@ function useIsMobile(input) {
7975
7976
  window.addEventListener("resize", handleResize);
7976
7977
  return () => window.removeEventListener("resize", handleResize);
7977
7978
  }, [isTouchDevice, initialViewportHeight]);
7978
- const isMobile = chunkHMQVOPQH_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7979
- const isTablet = !isMobile && containerWidth >= chunkHMQVOPQH_js.MOBILE_BREAKPOINT && containerWidth < chunkHMQVOPQH_js.TABLET_BREAKPOINT;
7980
- const isDesktop = !isMobile && containerWidth >= chunkHMQVOPQH_js.TABLET_BREAKPOINT;
7979
+ const isMobile = chunkKDJBWJJH_js.isMobileViewport(containerWidth, containerHeight, isTouchDevice);
7980
+ const isTablet = !isMobile && containerWidth >= chunkKDJBWJJH_js.MOBILE_BREAKPOINT && containerWidth < chunkKDJBWJJH_js.TABLET_BREAKPOINT;
7981
+ const isDesktop = !isMobile && containerWidth >= chunkKDJBWJJH_js.TABLET_BREAKPOINT;
7981
7982
  return {
7982
7983
  isMobile,
7983
7984
  isTablet,
@@ -8038,11 +8039,11 @@ function useViewerDialogs(input) {
8038
8039
  );
8039
8040
  const [embedFontsEnabled, setEmbedFontsEnabled] = react.useState(false);
8040
8041
  const [isNarrowViewport, setIsNarrowViewport] = react.useState(
8041
- () => typeof window !== "undefined" ? chunkHMQVOPQH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8042
+ () => typeof window !== "undefined" ? chunkKDJBWJJH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch()) : false
8042
8043
  );
8043
8044
  react.useEffect(() => {
8044
8045
  const handleWindow = () => setIsNarrowViewport(
8045
- chunkHMQVOPQH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8046
+ chunkKDJBWJJH_js.isMobileViewport(window.innerWidth, window.innerHeight, viewportIsTouch())
8046
8047
  );
8047
8048
  let observer = null;
8048
8049
  let raf = 0;
@@ -8056,12 +8057,12 @@ function useViewerDialogs(input) {
8056
8057
  const entry = entries[0];
8057
8058
  if (entry) {
8058
8059
  setIsNarrowViewport(
8059
- chunkHMQVOPQH_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8060
+ chunkKDJBWJJH_js.isMobileViewport(entry.contentRect.width, entry.contentRect.height, viewportIsTouch())
8060
8061
  );
8061
8062
  }
8062
8063
  });
8063
8064
  observer.observe(el);
8064
- setIsNarrowViewport(chunkHMQVOPQH_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8065
+ setIsNarrowViewport(chunkKDJBWJJH_js.isMobileViewport(el.clientWidth, el.clientHeight, viewportIsTouch()));
8065
8066
  };
8066
8067
  attach();
8067
8068
  window.addEventListener("resize", handleWindow);
@@ -8219,27 +8220,20 @@ function useViewerDialogs(input) {
8219
8220
  }
8220
8221
  function computeGridSpacingPx(presentationGridSpacing) {
8221
8222
  if (presentationGridSpacing) {
8222
- const px = Math.round(presentationGridSpacing.cx / chunkMM5RMRSP_js.EMU_PER_PX);
8223
+ const px = Math.round(presentationGridSpacing.cx / chunkFAP6OPLL_js.EMU_PER_PX);
8223
8224
  if (px > 0) {
8224
8225
  return px;
8225
8226
  }
8226
8227
  }
8227
- return chunkMM5RMRSP_js.GRID_SIZE;
8228
+ return chunkFAP6OPLL_js.GRID_SIZE;
8228
8229
  }
8229
8230
  function computeVisibleSlideIndexes(slides, activeCustomShowId, customShows) {
8230
- if (activeCustomShowId) {
8231
- const show = customShows.find((s) => s.id === activeCustomShowId);
8232
- if (show) {
8233
- const rIdToIndex = /* @__PURE__ */ new Map();
8234
- slides.forEach((s, i) => rIdToIndex.set(s.rId, i));
8235
- return show.slideRIds.map((rId) => rIdToIndex.get(rId)).filter((i) => i !== void 0);
8236
- }
8237
- }
8238
- return slides.map((_, i) => i).filter((i) => !slides[i]?.hidden);
8231
+ const activeShow = activeCustomShowId ? customShows.find((show) => show.id === activeCustomShowId) : void 0;
8232
+ return chunkKDJBWJJH_js.resolveShowSlideIndexes(slides, activeShow);
8239
8233
  }
8240
8234
  function computeSlideSectionGroups(slides, sections) {
8241
- return chunkHMQVOPQH_js.groupSlidesBySection(sections, slides).map((group) => ({
8242
- id: group.section?.id ?? (sections.length > 0 ? chunkMM5RMRSP_js.UNGROUPED_SECTION_ID : "default"),
8235
+ return chunkKDJBWJJH_js.groupSlidesBySection(sections, slides).map((group) => ({
8236
+ id: group.section?.id ?? (sections.length > 0 ? chunkFAP6OPLL_js.UNGROUPED_SECTION_ID : "default"),
8243
8237
  label: group.section?.name ?? (sections.length > 0 ? "Ungrouped Slides" : "Slides"),
8244
8238
  slideIndexes: group.slideIndexes,
8245
8239
  ...group.section?.color !== void 0 ? { color: group.section.color } : {},
@@ -8294,7 +8288,7 @@ function useDerivedSlideState(input) {
8294
8288
  );
8295
8289
  const slideSectionGroups = react.useMemo(
8296
8290
  () => computeSlideSectionGroups(slides, sections).map((group) => {
8297
- if (group.id === chunkMM5RMRSP_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8291
+ if (group.id === chunkFAP6OPLL_js.UNGROUPED_SECTION_ID && group.label === "Ungrouped Slides") {
8298
8292
  return { ...group, label: t("pptx.slides.ungroupedSlides") };
8299
8293
  }
8300
8294
  if (group.id === "default" && group.label === "Slides") {
@@ -8397,13 +8391,13 @@ function useAnnotationHandlers(input) {
8397
8391
  }, [annotations, setMode, setSlides, history]);
8398
8392
  const handleSetMode = react.useCallback(
8399
8393
  (nextMode) => {
8400
- if (mode === "present" && nextMode !== "present" && !chunkHMQVOPQH_js.mayLeaveSlideShow()) {
8394
+ if (mode === "present" && nextMode !== "present" && !chunkKDJBWJJH_js.mayLeaveSlideShow()) {
8401
8395
  return;
8402
8396
  }
8403
8397
  if (nextMode === "present") {
8404
8398
  presentation.enterPresentMode();
8405
8399
  } else if (mode === "present" && annotations.hasAnyAnnotations) {
8406
- chunkMM5RMRSP_js.stopAllPersistentAudio();
8400
+ chunkFAP6OPLL_js.stopAllPersistentAudio();
8407
8401
  pendingModeAfterAnnotationsRef.current = nextMode;
8408
8402
  if (promptKeepInkAnnotations) {
8409
8403
  setShowKeepAnnotationsDialog(true);
@@ -8412,7 +8406,7 @@ function useAnnotationHandlers(input) {
8412
8406
  }
8413
8407
  } else {
8414
8408
  if (mode === "present") {
8415
- chunkMM5RMRSP_js.stopAllPersistentAudio();
8409
+ chunkFAP6OPLL_js.stopAllPersistentAudio();
8416
8410
  }
8417
8411
  setMode(nextMode);
8418
8412
  }
@@ -8478,13 +8472,13 @@ function useSerialize(input) {
8478
8472
  let processedSlide = slide;
8479
8473
  if (pendingEditId) {
8480
8474
  const updatedElements = slide.elements.map((el) => {
8481
- if (el.id !== pendingEditId || !chunkHMQVOPQH_js.hasTextProperties(el)) {
8475
+ if (el.id !== pendingEditId || !chunkKDJBWJJH_js.hasTextProperties(el)) {
8482
8476
  return el;
8483
8477
  }
8484
8478
  return {
8485
8479
  ...el,
8486
8480
  text: pendingEditText,
8487
- textSegments: chunkHMQVOPQH_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8481
+ textSegments: chunkKDJBWJJH_js.remapTextToSegments(pendingEditText, el.textSegments, el.textStyle)
8488
8482
  };
8489
8483
  });
8490
8484
  if (updatedElements.some((el, i) => el !== slide.elements[i])) {
@@ -8497,14 +8491,14 @@ function useSerialize(input) {
8497
8491
  const pptxGuides = guides.map((g) => ({
8498
8492
  id: g.id,
8499
8493
  orientation: g.axis === "h" ? "horz" : "vert",
8500
- positionEmu: chunkHMQVOPQH_js.guidePxToEmu(g.position)
8494
+ positionEmu: chunkKDJBWJJH_js.guidePxToEmu(g.position)
8501
8495
  }));
8502
8496
  return {
8503
8497
  ...processedSlide,
8504
8498
  guides: pptxGuides.length > 0 ? pptxGuides : void 0
8505
8499
  };
8506
8500
  });
8507
- const slidesToSave = chunkMM5RMRSP_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8501
+ const slidesToSave = chunkFAP6OPLL_js.buildSaveSlides(slidesWithGuides, templateElementsBySlideId);
8508
8502
  const saveOptions = {
8509
8503
  headerFooter,
8510
8504
  presentationProperties,
@@ -8673,7 +8667,7 @@ function usePresentationSetup(input) {
8673
8667
  containerRef,
8674
8668
  content,
8675
8669
  onSetMode: (nextMode) => {
8676
- if (mode === "present" && nextMode !== "present" && !chunkHMQVOPQH_js.mayLeaveSlideShow()) {
8670
+ if (mode === "present" && nextMode !== "present" && !chunkKDJBWJJH_js.mayLeaveSlideShow()) {
8677
8671
  return;
8678
8672
  }
8679
8673
  if (mode === "present" && nextMode !== "present" && annotations.hasAnyAnnotations && promptKeepInkAnnotations) {
@@ -8681,7 +8675,7 @@ function usePresentationSetup(input) {
8681
8675
  setShowKeepAnnotationsDialog(true);
8682
8676
  } else {
8683
8677
  if (mode === "present" && nextMode !== "present") {
8684
- chunkMM5RMRSP_js.stopAllPersistentAudio();
8678
+ chunkFAP6OPLL_js.stopAllPersistentAudio();
8685
8679
  stopAnimationSound();
8686
8680
  }
8687
8681
  setMode(nextMode);
@@ -8735,10 +8729,10 @@ function usePresentationSetup(input) {
8735
8729
  onToggleInkMarkup: () => annotations.setInkMarkupVisible(!annotations.inkMarkupVisible),
8736
8730
  onToggleToolbar: () => annotations.setToolbarVisible(!annotations.toolbarVisible),
8737
8731
  onSaveRehearsalTimings: (timings) => {
8738
- setSlides((prev) => chunkHMQVOPQH_js.applyRehearsalTimings(prev, timings));
8732
+ setSlides((prev) => chunkKDJBWJJH_js.applyRehearsalTimings(prev, timings));
8739
8733
  history.markDirty();
8740
8734
  },
8741
- loopContinuously: chunkHMQVOPQH_js.shouldLoopContinuously(presentationProperties),
8735
+ loopContinuously: chunkKDJBWJJH_js.shouldLoopContinuously(presentationProperties),
8742
8736
  showWithAnimation: presentationProperties.showWithAnimation,
8743
8737
  useTimings: presentationProperties.advanceMode !== "manual",
8744
8738
  endWithBlackSlide
@@ -8900,7 +8894,7 @@ function useEditorOperations(input) {
8900
8894
  const { formatPainterActive, setFormatPainterActive, elementLookup } = state;
8901
8895
  react.useEffect(() => {
8902
8896
  if (formatPainterActive && !prevFormatPainterRef.current && selectedElement) {
8903
- copiedFormatRef.current = chunkHMQVOPQH_js.copyFormatFromElement(selectedElement);
8897
+ copiedFormatRef.current = chunkKDJBWJJH_js.copyFormatFromElement(selectedElement);
8904
8898
  } else if (!formatPainterActive) {
8905
8899
  copiedFormatRef.current = null;
8906
8900
  }
@@ -8926,12 +8920,12 @@ function useEditorOperations(input) {
8926
8920
  e.stopPropagation();
8927
8921
  const element = elementLookup.get(elementId);
8928
8922
  if (element) {
8929
- const updated = chunkHMQVOPQH_js.applyFormatToElement(element, copiedFormatRef.current);
8923
+ const updated = chunkKDJBWJJH_js.applyFormatToElement(element, copiedFormatRef.current);
8930
8924
  const updates = {};
8931
- if (chunkHMQVOPQH_js.hasShapeProperties(updated)) {
8925
+ if (chunkKDJBWJJH_js.hasShapeProperties(updated)) {
8932
8926
  updates.shapeStyle = updated.shapeStyle;
8933
8927
  }
8934
- if (chunkHMQVOPQH_js.hasTextProperties(updated)) {
8928
+ if (chunkKDJBWJJH_js.hasTextProperties(updated)) {
8935
8929
  updates.textStyle = updated.textStyle;
8936
8930
  }
8937
8931
  ops.updateElementById(elementId, updates);
@@ -9078,7 +9072,7 @@ function collectReferencedFontFamilies(slides) {
9078
9072
  const families = /* @__PURE__ */ new Set();
9079
9073
  for (const slide of slides) {
9080
9074
  for (const el of slide.elements) {
9081
- if (chunkHMQVOPQH_js.hasTextProperties(el) && el.textSegments) {
9075
+ if (chunkKDJBWJJH_js.hasTextProperties(el) && el.textSegments) {
9082
9076
  for (const seg of el.textSegments) {
9083
9077
  if (seg.style.fontFamily) {
9084
9078
  families.add(seg.style.fontFamily);
@@ -9290,13 +9284,13 @@ function useKeyboardShortcuts(input) {
9290
9284
  inputRef.current = input;
9291
9285
  const handleKeyDown = react.useCallback((e) => {
9292
9286
  const current = inputRef.current;
9293
- const { action, dx, dy } = chunkHMQVOPQH_js.mapEditorKey(e, {
9287
+ const { action, dx, dy } = chunkKDJBWJJH_js.mapEditorKey(e, {
9294
9288
  canEdit: current.canEdit,
9295
9289
  isPresenting: current.mode !== "edit",
9296
9290
  hasSelection: current.hasSelection,
9297
9291
  isEditingText: Boolean(current.inlineEditingElementId || current.tableEditorState?.isEditing),
9298
9292
  isDrawing: current.activeTool !== "select",
9299
- isTextInputTarget: chunkHMQVOPQH_js.isEditorTextInputTarget(e.target)
9293
+ isTextInputTarget: chunkKDJBWJJH_js.isEditorTextInputTarget(e.target)
9300
9294
  });
9301
9295
  if (action === null) {
9302
9296
  return;
@@ -9589,7 +9583,7 @@ function useViewerIntegration(input) {
9589
9583
  return zoom.scale;
9590
9584
  },
9591
9585
  setZoom(level) {
9592
- zoom.setScale(chunkHMQVOPQH_js.clampZoomScale(level));
9586
+ zoom.setScale(chunkKDJBWJJH_js.clampZoomScale(level));
9593
9587
  },
9594
9588
  zoomIn() {
9595
9589
  zoom.handleZoomIn();
@@ -9804,7 +9798,7 @@ function useReducedMotion() {
9804
9798
  }
9805
9799
  function useViewerOptions() {
9806
9800
  const storeRef = react.useRef(null);
9807
- storeRef.current ??= chunkHMQVOPQH_js.createViewerOptionsStore();
9801
+ storeRef.current ??= chunkKDJBWJJH_js.createViewerOptionsStore();
9808
9802
  const store = storeRef.current;
9809
9803
  const options = react.useSyncExternalStore(
9810
9804
  (onStoreChange) => store.subscribe(onStoreChange),
@@ -9813,9 +9807,9 @@ function useViewerOptions() {
9813
9807
  );
9814
9808
  return { optionsStore: store, options };
9815
9809
  }
9816
- var KNOWN_TAB_IDS = new Set(chunkHMQVOPQH_js.TOOLBAR_TABS.map((tab) => tab.id));
9810
+ var KNOWN_TAB_IDS = new Set(chunkKDJBWJJH_js.TOOLBAR_TABS.map((tab) => tab.id));
9817
9811
  function computeToolbarVisibility(hiddenActions) {
9818
- const isHidden = (id) => chunkHMQVOPQH_js.isActionHidden(id, hiddenActions);
9812
+ const isHidden = (id) => chunkKDJBWJJH_js.isActionHidden(id, hiddenActions);
9819
9813
  const isTabVisible = (id) => !KNOWN_TAB_IDS.has(id) || !isHidden(id);
9820
9814
  return { isHidden, isTabVisible };
9821
9815
  }
@@ -9900,12 +9894,12 @@ function useYjsDocumentSync({
9900
9894
  return;
9901
9895
  }
9902
9896
  try {
9903
- const handler = new chunkHMQVOPQH_js.PptxHandler();
9897
+ const handler = new chunkKDJBWJJH_js.PptxHandler();
9904
9898
  await handler.load(sourceBytes.buffer);
9905
- const currentSlides = chunkHMQVOPQH_js.readSlidesFromYDoc(
9899
+ const currentSlides = chunkKDJBWJJH_js.readSlidesFromYDoc(
9906
9900
  doc
9907
9901
  );
9908
- const slidesToSave = chunkMM5RMRSP_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9902
+ const slidesToSave = chunkFAP6OPLL_js.buildSaveSlides(currentSlides, templateElementsBySlideId);
9909
9903
  const bytes = await handler.save(slidesToSave);
9910
9904
  config.onWriteBack(bytes);
9911
9905
  } catch {
@@ -9920,7 +9914,7 @@ function useYjsDocumentSync({
9920
9914
  if (!doc || !isConnected) {
9921
9915
  return;
9922
9916
  }
9923
- const docSlides = chunkHMQVOPQH_js.readSlidesFromYDoc(
9917
+ const docSlides = chunkKDJBWJJH_js.readSlidesFromYDoc(
9924
9918
  doc
9925
9919
  );
9926
9920
  if (docSlides.length === 0) {
@@ -9942,11 +9936,11 @@ function useYjsDocumentSync({
9942
9936
  lastSyncedRef.current = serialized;
9943
9937
  void (async () => {
9944
9938
  const factories = await getFactories();
9945
- chunkHMQVOPQH_js.reconcileSlidesInYDoc(
9939
+ chunkKDJBWJJH_js.reconcileSlidesInYDoc(
9946
9940
  slides,
9947
9941
  doc,
9948
9942
  factories,
9949
- chunkHMQVOPQH_js.LOCAL_SYNC_ORIGIN
9943
+ chunkKDJBWJJH_js.LOCAL_SYNC_ORIGIN
9950
9944
  );
9951
9945
  scheduleWriteBack();
9952
9946
  })();
@@ -9960,10 +9954,10 @@ function useYjsDocumentSync({
9960
9954
  return;
9961
9955
  }
9962
9956
  const handleChange = (_events, transaction) => {
9963
- if (transaction?.origin === chunkHMQVOPQH_js.LOCAL_SYNC_ORIGIN) {
9957
+ if (transaction?.origin === chunkKDJBWJJH_js.LOCAL_SYNC_ORIGIN) {
9964
9958
  return;
9965
9959
  }
9966
- const remoteSlides = chunkHMQVOPQH_js.readSlidesFromYDoc(
9960
+ const remoteSlides = chunkKDJBWJJH_js.readSlidesFromYDoc(
9967
9961
  doc
9968
9962
  );
9969
9963
  if (remoteSlides.length === 0) {
@@ -9979,7 +9973,7 @@ function useYjsDocumentSync({
9979
9973
  isApplyingRemoteRef.current = false;
9980
9974
  scheduleWriteBack();
9981
9975
  };
9982
- const unobserve = chunkHMQVOPQH_js.observeYDocSlides(
9976
+ const unobserve = chunkKDJBWJJH_js.observeYDocSlides(
9983
9977
  doc,
9984
9978
  handleChange
9985
9979
  );
@@ -10017,7 +10011,7 @@ function useBroadcastFollower({
10017
10011
  if (!broadcaster) {
10018
10012
  return;
10019
10013
  }
10020
- if (!chunkHMQVOPQH_js.shouldAutoFollowBroadcaster({
10014
+ if (!chunkKDJBWJJH_js.shouldAutoFollowBroadcaster({
10021
10015
  localRole: collab.config.role,
10022
10016
  broadcasterRole: broadcaster.role
10023
10017
  })) {
@@ -10177,10 +10171,10 @@ function useTouchGestures(input) {
10177
10171
  if (!el || !enabled) {
10178
10172
  return;
10179
10173
  }
10180
- const recognizer = chunkHMQVOPQH_js.createTouchGestureRecognizer({
10174
+ const recognizer = chunkKDJBWJJH_js.createTouchGestureRecognizer({
10181
10175
  getScale: () => scaleRef.current,
10182
- minScale: chunkHMQVOPQH_js.MIN_ZOOM_SCALE,
10183
- maxScale: chunkHMQVOPQH_js.MAX_ZOOM_SCALE,
10176
+ minScale: chunkKDJBWJJH_js.MIN_ZOOM_SCALE,
10177
+ maxScale: chunkKDJBWJJH_js.MAX_ZOOM_SCALE,
10184
10178
  callbacks: {
10185
10179
  onPinchZoom: (newScale) => callbacksRef.current.onPinchZoom?.(newScale),
10186
10180
  onSwipe: (direction) => callbacksRef.current.onSwipe?.(direction),
@@ -10220,7 +10214,7 @@ function scrollFocusedIntoView(keyboardInset) {
10220
10214
  return;
10221
10215
  }
10222
10216
  const rect = active.getBoundingClientRect();
10223
- const delta = chunkHMQVOPQH_js.computeScrollDelta(
10217
+ const delta = chunkKDJBWJJH_js.computeScrollDelta(
10224
10218
  { top: rect.top, bottom: rect.bottom },
10225
10219
  window.innerHeight,
10226
10220
  keyboardInset
@@ -10240,8 +10234,8 @@ function useKeyboardInsets(enabled = true) {
10240
10234
  return;
10241
10235
  }
10242
10236
  const update = () => {
10243
- const metrics = chunkHMQVOPQH_js.readViewportMetrics(window);
10244
- const inset = metrics ? chunkHMQVOPQH_js.computeKeyboardInset(metrics) : 0;
10237
+ const metrics = chunkKDJBWJJH_js.readViewportMetrics(window);
10238
+ const inset = metrics ? chunkKDJBWJJH_js.computeKeyboardInset(metrics) : 0;
10245
10239
  setKeyboardInset(inset);
10246
10240
  if (inset > 0) {
10247
10241
  window.requestAnimationFrame(() => scrollFocusedIntoView(inset));
@@ -10252,8 +10246,8 @@ function useKeyboardInsets(enabled = true) {
10252
10246
  vv.addEventListener("scroll", update);
10253
10247
  const onFocusIn = () => {
10254
10248
  window.requestAnimationFrame(() => {
10255
- const metrics = chunkHMQVOPQH_js.readViewportMetrics(window);
10256
- const inset = metrics ? chunkHMQVOPQH_js.computeKeyboardInset(metrics) : 0;
10249
+ const metrics = chunkKDJBWJJH_js.readViewportMetrics(window);
10250
+ const inset = metrics ? chunkKDJBWJJH_js.computeKeyboardInset(metrics) : 0;
10257
10251
  if (inset > 0) {
10258
10252
  scrollFocusedIntoView(inset);
10259
10253
  }
@@ -10266,7 +10260,7 @@ function useKeyboardInsets(enabled = true) {
10266
10260
  document.removeEventListener("focusin", onFocusIn);
10267
10261
  };
10268
10262
  }, [enabled]);
10269
- return { keyboardInset, isKeyboardOpen: chunkHMQVOPQH_js.isKeyboardOpen(keyboardInset) };
10263
+ return { keyboardInset, isKeyboardOpen: chunkKDJBWJJH_js.isKeyboardOpen(keyboardInset) };
10270
10264
  }
10271
10265
 
10272
10266
  // src/viewer/hooks/useViewerBuildingBlocks-canvas-props.ts
@@ -10293,7 +10287,7 @@ function buildCanvasProps(input) {
10293
10287
  } = input;
10294
10288
  const effectiveSlide = mode === "master" ? masterPseudoSlide : activeSlide;
10295
10289
  const effectiveTemplateElements = mode === "master" ? s.activeLayout ? s.activeMaster?.elements ?? [] : [] : templateElements;
10296
- const fieldContext = chunkHMQVOPQH_js.buildFieldSubstitutionContext({
10290
+ const fieldContext = chunkKDJBWJJH_js.buildFieldSubstitutionContext({
10297
10291
  headerFooter: s.headerFooter,
10298
10292
  customProperties: s.customProperties,
10299
10293
  slide: activeSlide
@@ -10303,13 +10297,13 @@ function buildCanvasProps(input) {
10303
10297
  if (mode === "present") {
10304
10298
  presentation.handlePresentationAction(action);
10305
10299
  } else if (action.url) {
10306
- chunkHMQVOPQH_js.safeOpenUrl(action.url);
10300
+ chunkKDJBWJJH_js.safeOpenUrl(action.url);
10307
10301
  }
10308
10302
  };
10309
10303
  const handleHyperlinkClick = (url) => {
10310
- if (chunkHMQVOPQH_js.isPpactionUrl(url)) {
10304
+ if (chunkKDJBWJJH_js.isPpactionUrl(url)) {
10311
10305
  if (mode === "present") {
10312
- const parsed = chunkHMQVOPQH_js.parsePpactionUrl(url);
10306
+ const parsed = chunkKDJBWJJH_js.parsePpactionUrl(url);
10313
10307
  if (parsed) {
10314
10308
  presentation.handlePresentationAction({
10315
10309
  action: parsed.action,
@@ -10319,7 +10313,7 @@ function buildCanvasProps(input) {
10319
10313
  }
10320
10314
  return;
10321
10315
  }
10322
- chunkHMQVOPQH_js.safeOpenUrl(url);
10316
+ chunkKDJBWJJH_js.safeOpenUrl(url);
10323
10317
  };
10324
10318
  return {
10325
10319
  activeSlide: effectiveSlide,
@@ -10462,7 +10456,7 @@ function buildToolbarAnimationHandlers(input) {
10462
10456
  const current = activeSlide.animations ?? [];
10463
10457
  if (group === "motionPath") {
10464
10458
  propertyHandlers.handleUpdateSlide({
10465
- animations: chunkHMQVOPQH_js.applyMotionPathPreset(current, selectedElement.id, preset)
10459
+ animations: chunkKDJBWJJH_js.applyMotionPathPreset(current, selectedElement.id, preset)
10466
10460
  });
10467
10461
  return;
10468
10462
  }
@@ -10523,6 +10517,7 @@ function buildToolbarProps(input) {
10523
10517
  state: s,
10524
10518
  selectedElement,
10525
10519
  activeSlide,
10520
+ activeSlideIndex,
10526
10521
  zoom,
10527
10522
  history,
10528
10523
  findReplace,
@@ -10655,7 +10650,7 @@ function buildToolbarProps(input) {
10655
10650
  onOpenFile,
10656
10651
  onOpenRecentFile,
10657
10652
  onCreatePresentation: (templateId) => {
10658
- s.setSlides(chunkHMQVOPQH_js.createBackstagePresentation(templateId));
10653
+ s.setSlides(chunkKDJBWJJH_js.createBackstagePresentation(templateId));
10659
10654
  s.setActiveSlideIndex(0);
10660
10655
  s.setSelectedElementId(null);
10661
10656
  s.setSelectedElementIds([]);
@@ -10712,13 +10707,17 @@ function buildToolbarProps(input) {
10712
10707
  isCommentsPanelOpen: s.isInspectorPaneOpen,
10713
10708
  slideCommentCount: activeSlide?.comments?.length ?? 0,
10714
10709
  formatPainterActive: s.formatPainterActive,
10715
- canActivateFormatPainter: chunkHMQVOPQH_js.hasCopyableFormat(selectedElement),
10710
+ canActivateFormatPainter: chunkKDJBWJJH_js.hasCopyableFormat(selectedElement),
10716
10711
  onToggleFormatPainter: () => s.setFormatPainterActive((p) => !p),
10717
10712
  isSelectionPaneOpen: s.isSelectionPaneOpen,
10718
10713
  onToggleSelectionPane: () => s.setIsSelectionPaneOpen((p) => !p),
10719
10714
  eyedropperActive: s.eyedropperActive,
10720
10715
  onToggleEyedropper: () => s.setEyedropperActive((p) => !p),
10721
10716
  onOpenSetUpSlideShow: () => dialogs.setIsSetUpSlideShowOpen(true),
10717
+ // PowerPoint's Hide Slide: skip the active slide during the show while
10718
+ // leaving it in the deck, the rail and the sorter.
10719
+ onToggleHideSlide: () => slideOps.handleToggleHideSlides([activeSlideIndex]),
10720
+ activeSlideHidden: Boolean(activeSlide?.hidden),
10722
10721
  onOpenBroadcastDialog: () => dialogs.setIsBroadcastDialogOpen(true),
10723
10722
  onToggleSubtitles: dialogs.handleToggleSubtitles,
10724
10723
  showSubtitles: Boolean(s.presentationProperties.showSubtitles),
@@ -10788,10 +10787,12 @@ function useViewerBuildingBlocksCore(input) {
10788
10787
  activeMaster: state.activeMaster,
10789
10788
  presentationGridSpacing: state.presentationProperties.gridSpacing
10790
10789
  });
10790
+ const { options: viewerOptions } = useViewerOptions();
10791
10791
  const { presentation, annotations, actionSoundHandlerRef } = usePresentationSetup({
10792
10792
  mode,
10793
10793
  slides,
10794
10794
  visibleSlideIndexes,
10795
+ endWithBlackSlide: viewerOptions.advanced.slideShowEndWithBlackSlide,
10795
10796
  activeSlideIndex,
10796
10797
  containerRef,
10797
10798
  content,
@@ -10975,7 +10976,7 @@ function useViewerBuildingBlocks(input) {
10975
10976
  }, [incomingContent]);
10976
10977
  const onOpenFile = react.useCallback(() => {
10977
10978
  void (async () => {
10978
- const picked = await chunkHMQVOPQH_js.openPptxFile();
10979
+ const picked = await chunkKDJBWJJH_js.openPptxFile();
10979
10980
  if (picked) {
10980
10981
  setContent(picked.buffer);
10981
10982
  }
@@ -10983,7 +10984,7 @@ function useViewerBuildingBlocks(input) {
10983
10984
  }, []);
10984
10985
  const onOpenRecentFile = react.useCallback((key) => {
10985
10986
  void (async () => {
10986
- const bytes = await chunkHMQVOPQH_js.readBackstageRecentFile(key);
10987
+ const bytes = await chunkKDJBWJJH_js.readBackstageRecentFile(key);
10987
10988
  if (bytes) {
10988
10989
  setContent(bytes);
10989
10990
  }
@@ -11047,6 +11048,7 @@ function useViewerBuildingBlocks(input) {
11047
11048
  printHandlers,
11048
11049
  propertyHandlers,
11049
11050
  dialogs,
11051
+ activeSlideIndex,
11050
11052
  slideOps: editorOps.slideOps,
11051
11053
  ops: editorOps.ops,
11052
11054
  onSetMode: handleSetMode,